1 --- a/Documentation/kernel-parameters.txt
2 +++ b/Documentation/kernel-parameters.txt
4 See Documentation/isdn/README.HiSax.
6 hugepages= [HW,X86-32,IA-64] Maximal number of HugeTLB pages.
7 + hugepagesz= [HW,IA-64,PPC] The size of the HugeTLB pages.
9 i8042.direct [HW] Put keyboard port into non-translated mode
10 i8042.dumbkbd [HW] Pretend that controller can only read data from
11 --- a/Documentation/powerpc/00-INDEX
12 +++ b/Documentation/powerpc/00-INDEX
14 - info on sound support under Linux/PPC
16 - info on the kernel images for Linux/PPC
18 + - describes the layout of firmware binaries for the Freescale QUICC
19 + Engine and the code that parses and uploads the microcode therein.
20 --- a/Documentation/powerpc/booting-without-of.txt
21 +++ b/Documentation/powerpc/booting-without-of.txt
23 i) Freescale QUICC Engine module (QE)
24 j) CFI or JEDEC memory-mapped NOR flash
25 k) Global Utilities Block
27 + l) Freescale Communications Processor Module
28 + m) Chipselect/Local Bus
29 + n) 4xx/Axon EMAC ethernet nodes
31 + p) Freescale Synchronous Serial Interface
33 VII - Specifying interrupt information for devices
34 1) interrupts property
37 In general, the format of an address for a device is defined by the
38 parent bus type, based on the #address-cells and #size-cells
39 -property. In the absence of such a property, the parent's parent
40 -values are used, etc... The kernel requires the root node to have
41 -those properties defining addresses format for devices directly mapped
42 -on the processor bus.
43 +properties. Note that the parent's parent definitions of #address-cells
44 +and #size-cells are not inhereted so every node with children must specify
45 +them. The kernel requires the root node to have those properties defining
46 +addresses format for devices directly mapped on the processor bus.
48 Those 2 properties define 'cells' for representing an address and a
49 size. A "cell" is a 32-bit number. For example, if both contain 2
51 like address space bits, you'll have to add a bus translator to the
52 prom_parse.c file of the recent kernels for your bus type.
54 -The "reg" property only defines addresses and sizes (if #size-cells
55 -is non-0) within a given bus. In order to translate addresses upward
56 +The "reg" property only defines addresses and sizes (if #size-cells is
57 +non-0) within a given bus. In order to translate addresses upward
58 (that is into parent bus addresses, and possibly into CPU physical
59 addresses), all busses must contain a "ranges" property. If the
60 "ranges" property is missing at a given level, it's assumed that
61 -translation isn't possible. The format of the "ranges" property for a
63 +translation isn't possible, i.e., the registers are not visible on the
64 +parent bus. The format of the "ranges" property for a bus is a list
67 bus address, parent bus address, size
70 1/1 format, unless the processor supports physical addresses greater
71 than 32-bits, in which case a 2/1 format is recommended.
73 +Alternatively, the "ranges" property may be empty, indicating that the
74 +registers are visible on the parent bus using an identity mapping
75 +translation. In other words, the parent bus address space is the same
76 +as the child bus address space.
78 2) Note about "compatible" properties
79 -------------------------------------
80 @@ -1218,16 +1227,14 @@
83 - reg : Offset and length of the register set for the device
84 - - device_type : Should be "mdio"
85 - compatible : Should define the compatible device type for the
86 - mdio. Currently, this is most likely to be "gianfar"
87 + mdio. Currently, this is most likely to be "fsl,gianfar-mdio"
93 - device_type = "mdio";
94 - compatible = "gianfar";
95 + compatible = "fsl,gianfar-mdio";
99 @@ -1254,6 +1261,10 @@
100 services interrupts for this device.
101 - phy-handle : The phandle for the PHY connected to this ethernet
103 + - fixed-link : <a b c d e> where a is emulated phy id - choose any,
104 + but unique to the all specified fixed-links, b is duplex - 0 half,
105 + 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no
106 + pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause.
108 Recommended properties:
110 @@ -1408,7 +1419,6 @@
112 Example multi port host USB controller device node :
114 - device_type = "usb";
115 compatible = "fsl-usb2-mph";
117 #address-cells = <1>;
118 @@ -1422,7 +1432,6 @@
120 Example dual role USB controller device node :
122 - device_type = "usb";
123 compatible = "fsl-usb2-dr";
125 #address-cells = <1>;
126 @@ -1586,7 +1595,6 @@
127 iii) USB (Universal Serial Bus Controller)
130 - - device_type : should be "usb".
131 - compatible : could be "qe_udc" or "fhci-hcd".
132 - mode : the could be "host" or "slave".
133 - reg : Offset and length of the register set for the device
134 @@ -1600,7 +1608,6 @@
138 - device_type = "usb";
139 compatible = "qe_udc";
142 @@ -1613,7 +1620,7 @@
145 - device_type : should be "network", "hldc", "uart", "transparent"
147 + "bisync", "atm", or "serial".
148 - compatible : could be "ucc_geth" or "fsl_atm" and so on.
149 - model : should be "UCC".
150 - device-id : the ucc number(1-8), corresponding to UCCx in UM.
151 @@ -1626,6 +1633,26 @@
152 - interrupt-parent : the phandle for the interrupt controller that
153 services interrupts for this device.
154 - pio-handle : The phandle for the Parallel I/O port configuration.
155 + - port-number : for UART drivers, the port number to use, between 0 and 3.
156 + This usually corresponds to the /dev/ttyQE device, e.g. <0> = /dev/ttyQE0.
157 + The port number is added to the minor number of the device. Unlike the
158 + CPM UART driver, the port-number is required for the QE UART driver.
159 + - soft-uart : for UART drivers, if specified this means the QE UART device
160 + driver should use "Soft-UART" mode, which is needed on some SOCs that have
161 + broken UART hardware. Soft-UART is provided via a microcode upload.
162 + - rx-clock-name: the UCC receive clock source
163 + "none": clock source is disabled
164 + "brg1" through "brg16": clock source is BRG1-BRG16, respectively
165 + "clk1" through "clk24": clock source is CLK1-CLK24, respectively
166 + - tx-clock-name: the UCC transmit clock source
167 + "none": clock source is disabled
168 + "brg1" through "brg16": clock source is BRG1-BRG16, respectively
169 + "clk1" through "clk24": clock source is CLK1-CLK24, respectively
170 + The following two properties are deprecated. rx-clock has been replaced
171 + with rx-clock-name, and tx-clock has been replaced with tx-clock-name.
172 + Drivers that currently use the deprecated properties should continue to
173 + do so, in order to support older device trees, but they should be updated
174 + to check for the new properties first.
175 - rx-clock : represents the UCC receive clock source.
176 0x00 : clock source is disabled;
177 0x1~0x10 : clock source is BRG1~BRG16 respectively;
178 @@ -1772,6 +1799,32 @@
182 + viii) Uploaded QE firmware
184 + If a new firwmare has been uploaded to the QE (usually by the
185 + boot loader), then a 'firmware' child node should be added to the QE
186 + node. This node provides information on the uploaded firmware that
187 + device drivers may need.
189 + Required properties:
190 + - id: The string name of the firmware. This is taken from the 'id'
191 + member of the qe_firmware structure of the uploaded firmware.
192 + Device drivers can search this string to determine if the
193 + firmware they want is already present.
194 + - extended-modes: The Extended Modes bitfield, taken from the
195 + firmware binary. It is a 64-bit number represented
196 + as an array of two 32-bit numbers.
197 + - virtual-traps: The virtual traps, taken from the firmware binary.
198 + It is an array of 8 32-bit numbers.
204 + extended-modes = <0 0>;
205 + virtual-traps = <0 0 0 0 0 0 0 0>;
208 j) CFI or JEDEC memory-mapped NOR flash
210 Flash chips (Memory Technology Devices) are often used for solid state
211 @@ -2075,8 +2128,7 @@
215 - compatible = "fsl,mpc8272ads-localbus",
216 - "fsl,mpc8272-localbus",
217 + compatible = "fsl,mpc8272-localbus",
219 #address-cells = <2>;
221 @@ -2254,7 +2306,7 @@
228 The Xilinx EDK toolchain ships with a set of IP cores (devices) for use
229 in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range
230 @@ -2276,7 +2328,7 @@
231 properties of the device node. In general, device nodes for IP-cores
232 will take the following form:
234 - (name)@(base-address) {
235 + (name): (generic-name)@(base-address) {
236 compatible = "xlnx,(ip-core-name)-(HW_VER)"
237 [, (list of compatible devices), ...];
238 reg = <(baseaddr) (size)>;
239 @@ -2286,6 +2338,9 @@
240 xlnx,(parameter2) = <(int-value)>;
243 + (generic-name): an open firmware-style name that describes the
244 + generic class of device. Preferably, this is one word, such
245 + as 'serial' or 'ethernet'.
246 (ip-core-name): the name of the ip block (given after the BEGIN
247 directive in system.mhs). Should be in lowercase
248 and all underscores '_' converted to dashes '-'.
249 @@ -2294,9 +2349,9 @@
250 dropped from the parameter name, the name is converted
251 to lowercase and all underscore '_' characters are
252 converted to dashes '-'.
253 - (baseaddr): the C_BASEADDR parameter.
254 + (baseaddr): the baseaddr parameter value (often named C_BASEADDR).
255 (HW_VER): from the HW_VER parameter.
256 - (size): equals C_HIGHADDR - C_BASEADDR + 1
257 + (size): the address range size (often C_HIGHADDR - C_BASEADDR + 1).
259 Typically, the compatible list will include the exact IP core version
260 followed by an older IP core version which implements the same
261 @@ -2326,11 +2381,11 @@
263 becomes the following device tree node:
265 - opb-uartlite-0@ec100000 {
266 + opb_uartlite_0: serial@ec100000 {
267 device_type = "serial";
268 compatible = "xlnx,opb-uartlite-1.00.b";
269 reg = <ec100000 10000>;
270 - interrupt-parent = <&opb-intc>;
271 + interrupt-parent = <&opb_intc_0>;
272 interrupts = <1 0>; // got this from the opb_intc parameters
273 current-speed = <d#115200>; // standard serial device prop
274 clock-frequency = <d#50000000>; // standard serial device prop
275 @@ -2339,16 +2394,19 @@
276 xlnx,use-parity = <0>;
279 - Some IP cores actually implement 2 or more logical devices. In this case,
280 - the device should still describe the whole IP core with a single node
281 - and add a child node for each logical device. The ranges property can
282 - be used to translate from parent IP-core to the registers of each device.
283 - (Note: this makes the assumption that both logical devices have the same
284 - bus binding. If this is not true, then separate nodes should be used for
285 - each logical device). The 'cell-index' property can be used to enumerate
286 - logical devices within an IP core. For example, the following is the
287 - system.mhs entry for the dual ps2 controller found on the ml403 reference
289 + Some IP cores actually implement 2 or more logical devices. In
290 + this case, the device should still describe the whole IP core with
291 + a single node and add a child node for each logical device. The
292 + ranges property can be used to translate from parent IP-core to the
293 + registers of each device. In addition, the parent node should be
294 + compatible with the bus type 'xlnx,compound', and should contain
295 + #address-cells and #size-cells, as with any other bus. (Note: this
296 + makes the assumption that both logical devices have the same bus
297 + binding. If this is not true, then separate nodes should be used
298 + for each logical device). The 'cell-index' property can be used to
299 + enumerate logical devices within an IP core. For example, the
300 + following is the system.mhs entry for the dual ps2 controller found
301 + on the ml403 reference design.
303 BEGIN opb_ps2_dual_ref
304 PARAMETER INSTANCE = opb_ps2_dual_ref_0
305 @@ -2370,21 +2428,24 @@
307 It would result in the following device tree nodes:
309 - opb_ps2_dual_ref_0@a9000000 {
310 + opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {
311 + #address-cells = <1>;
313 + compatible = "xlnx,compound";
314 ranges = <0 a9000000 2000>;
315 // If this device had extra parameters, then they would
318 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
320 - interrupt-parent = <&opb-intc>;
321 + interrupt-parent = <&opb_intc_0>;
326 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
328 - interrupt-parent = <&opb-intc>;
329 + interrupt-parent = <&opb_intc_0>;
333 @@ -2447,17 +2508,18 @@
335 Gives this device tree (some properties removed for clarity):
339 #address-cells = <1>;
341 + compatible = "xlnx,plb-v34-1.02.a";
342 device_type = "ibm,plb";
343 ranges; // 1:1 translation
345 - plb-bram-if-cntrl-0@ffff0000 {
346 + plb_bram_if_cntrl_0: bram@ffff0000 {
347 reg = <ffff0000 10000>;
352 #address-cells = <1>;
354 ranges = <20000000 20000000 20000000
355 @@ -2465,11 +2527,11 @@
356 80000000 80000000 40000000
357 c0000000 c0000000 20000000>;
359 - opb-uart16550-0@a0000000 {
360 + opb_uart16550_0: serial@a0000000 {
361 reg = <a00000000 2000>;
364 - opb-intc-0@d1000fc0 {
365 + opb_intc_0: interrupt-controller@d1000fc0 {
369 @@ -2514,6 +2576,46 @@
371 - current-speed : Baud rate of uartlite
373 + p) Freescale Synchronous Serial Interface
375 + The SSI is a serial device that communicates with audio codecs. It can
376 + be programmed in AC97, I2S, left-justified, or right-justified modes.
378 + Required properties:
379 + - compatible : compatible list, containing "fsl,ssi"
380 + - cell-index : the SSI, <0> = SSI1, <1> = SSI2, and so on
381 + - reg : offset and length of the register set for the device
382 + - interrupts : <a b> where a is the interrupt number and b is a
383 + field that represents an encoding of the sense and
384 + level information for the interrupt. This should be
385 + encoded based on the information in section 2)
386 + depending on the type of interrupt controller you
388 + - interrupt-parent : the phandle for the interrupt controller that
389 + services interrupts for this device.
390 + - fsl,mode : the operating mode for the SSI interface
391 + "i2s-slave" - I2S mode, SSI is clock slave
392 + "i2s-master" - I2S mode, SSI is clock master
393 + "lj-slave" - left-justified mode, SSI is clock slave
394 + "lj-master" - l.j. mode, SSI is clock master
395 + "rj-slave" - right-justified mode, SSI is clock slave
396 + "rj-master" - r.j., SSI is clock master
397 + "ac97-slave" - AC97 mode, SSI is clock slave
398 + "ac97-master" - AC97 mode, SSI is clock master
400 + Optional properties:
401 + - codec-handle : phandle to a 'codec' node that defines an audio
402 + codec connected to this SSI. This node is typically
403 + a child of an I2C or other control node.
405 + Child 'codec' node required properties:
406 + - compatible : compatible list, contains the name of the codec
408 + Child 'codec' node optional properties:
409 + - clock-frequency : The frequency of the input clock, which typically
410 + comes from an on-board dedicated oscillator.
413 More devices will be defined as this spec matures.
415 VII - Specifying interrupt information for devices
417 +++ b/Documentation/powerpc/qe_firmware.txt
419 + Freescale QUICC Engine Firmware Uploading
420 + -----------------------------------------
422 +(c) 2007 Timur Tabi <timur at freescale.com>,
423 + Freescale Semiconductor
428 + I - Software License for Firmware
430 + II - Microcode Availability
432 + III - Description and Terminology
434 + IV - Microcode Programming Details
436 + V - Firmware Structure Layout
438 + VI - Sample Code for Creating Firmware Files
440 +Revision Information
441 +====================
443 +November 30, 2007: Rev 1.0 - Initial version
445 +I - Software License for Firmware
446 +=================================
448 +Each firmware file comes with its own software license. For information on
449 +the particular license, please see the license text that is distributed with
452 +II - Microcode Availability
453 +===========================
455 +Firmware files are distributed through various channels. Some are available on
456 +http://opensource.freescale.com. For other firmware files, please contact
457 +your Freescale representative or your operating system vendor.
459 +III - Description and Terminology
460 +================================
462 +In this document, the term 'microcode' refers to the sequence of 32-bit
463 +integers that compose the actual QE microcode.
465 +The term 'firmware' refers to a binary blob that contains the microcode as
466 +well as other data that
468 + 1) describes the microcode's purpose
469 + 2) describes how and where to upload the microcode
470 + 3) specifies the values of various registers
471 + 4) includes additional data for use by specific device drivers
473 +Firmware files are binary files that contain only a firmware.
475 +IV - Microcode Programming Details
476 +===================================
478 +The QE architecture allows for only one microcode present in I-RAM for each
479 +RISC processor. To replace any current microcode, a full QE reset (which
480 +disables the microcode) must be performed first.
482 +QE microcode is uploaded using the following procedure:
484 +1) The microcode is placed into I-RAM at a specific location, using the
485 + IRAM.IADD and IRAM.IDATA registers.
487 +2) The CERCR.CIR bit is set to 0 or 1, depending on whether the firmware
488 + needs split I-RAM. Split I-RAM is only meaningful for SOCs that have
489 + QEs with multiple RISC processors, such as the 8360. Splitting the I-RAM
490 + allows each processor to run a different microcode, effectively creating an
491 + asymmetric multiprocessing (AMP) system.
493 +3) The TIBCR trap registers are loaded with the addresses of the trap handlers
496 +4) The RSP.ECCR register is programmed with the value provided.
498 +5) If necessary, device drivers that need the virtual traps and extended mode
499 + data will use them.
501 +Virtual Microcode Traps
503 +These virtual traps are conditional branches in the microcode. These are
504 +"soft" provisional introduced in the ROMcode in order to enable higher
505 +flexibility and save h/w traps If new features are activated or an issue is
506 +being fixed in the RAM package utilizing they should be activated. This data
507 +structure signals the microcode which of these virtual traps is active.
509 +This structure contains 6 words that the application should copy to some
510 +specific been defined. This table describes the structure.
512 + ---------------------------------------------------------------
513 + | Offset in | | Destination Offset | Size of |
514 + | array | Protocol | within PRAM | Operand |
515 + --------------------------------------------------------------|
516 + | 0 | Ethernet | 0xF8 | 4 bytes |
517 + | | interworking | | |
518 + ---------------------------------------------------------------
519 + | 4 | ATM | 0xF8 | 4 bytes |
520 + | | interworking | | |
521 + ---------------------------------------------------------------
522 + | 8 | PPP | 0xF8 | 4 bytes |
523 + | | interworking | | |
524 + ---------------------------------------------------------------
525 + | 12 | Ethernet RX | 0x22 | 1 byte |
526 + | | Distributor Page | | |
527 + ---------------------------------------------------------------
528 + | 16 | ATM Globtal | 0x28 | 1 byte |
529 + | | Params Table | | |
530 + ---------------------------------------------------------------
531 + | 20 | Insert Frame | 0xF8 | 4 bytes |
532 + ---------------------------------------------------------------
537 +This is a double word bit array (64 bits) that defines special functionality
538 +which has an impact on the softwarew drivers. Each bit has its own impact
539 +and has special instructions for the s/w associated with it. This structure is
540 +described in this table:
542 + -----------------------------------------------------------------------
543 + | Bit # | Name | Description |
544 + -----------------------------------------------------------------------
545 + | 0 | General | Indicates that prior to each host command |
546 + | | push command | given by the application, the software must |
547 + | | | assert a special host command (push command)|
548 + | | | CECDR = 0x00800000. |
549 + | | | CECR = 0x01c1000f. |
550 + -----------------------------------------------------------------------
551 + | 1 | UCC ATM | Indicates that after issuing ATM RX INIT |
552 + | | RX INIT | command, the host must issue another special|
553 + | | push command | command (push command) and immediately |
554 + | | | following that re-issue the ATM RX INIT |
555 + | | | command. (This makes the sequence of |
556 + | | | initializing the ATM receiver a sequence of |
557 + | | | three host commands) |
558 + | | | CECDR = 0x00800000. |
559 + | | | CECR = 0x01c1000f. |
560 + -----------------------------------------------------------------------
561 + | 2 | Add/remove | Indicates that following the specific host |
562 + | | command | command: "Add/Remove entry in Hash Lookup |
563 + | | validation | Table" used in Interworking setup, the user |
564 + | | | must issue another command. |
565 + | | | CECDR = 0xce000003. |
566 + | | | CECR = 0x01c10f58. |
567 + -----------------------------------------------------------------------
568 + | 3 | General push | Indicates that the s/w has to initialize |
569 + | | command | some pointers in the Ethernet thread pages |
570 + | | | which are used when Header Compression is |
571 + | | | activated. The full details of these |
572 + | | | pointers is located in the software drivers.|
573 + -----------------------------------------------------------------------
574 + | 4 | General push | Indicates that after issuing Ethernet TX |
575 + | | command | INIT command, user must issue this command |
576 + | | | for each SNUM of Ethernet TX thread. |
577 + | | | CECDR = 0x00800003. |
578 + | | | CECR = 0x7'b{0}, 8'b{Enet TX thread SNUM}, |
579 + | | | 1'b{1}, 12'b{0}, 4'b{1} |
580 + -----------------------------------------------------------------------
581 + | 5 - 31 | N/A | Reserved, set to zero. |
582 + -----------------------------------------------------------------------
584 +V - Firmware Structure Layout
585 +==============================
587 +QE microcode from Freescale is typically provided as a header file. This
588 +header file contains macros that define the microcode binary itself as well as
589 +some other data used in uploading that microcode. The format of these files
590 +do not lend themselves to simple inclusion into other code. Hence,
591 +the need for a more portable format. This section defines that format.
593 +Instead of distributing a header file, the microcode and related data are
594 +embedded into a binary blob. This blob is passed to the qe_upload_firmware()
595 +function, which parses the blob and performs everything necessary to upload
598 +All integers are big-endian. See the comments for function
599 +qe_upload_firmware() for up-to-date implementation information.
601 +This structure supports versioning, where the version of the structure is
602 +embedded into the structure itself. To ensure forward and backwards
603 +compatibility, all versions of the structure must use the same 'qe_header'
604 +structure at the beginning.
606 +'header' (type: struct qe_header):
607 + The 'length' field is the size, in bytes, of the entire structure,
608 + including all the microcode embedded in it, as well as the CRC (if
611 + The 'magic' field is an array of three bytes that contains the letters
612 + 'Q', 'E', and 'F'. This is an identifier that indicates that this
613 + structure is a QE Firmware structure.
615 + The 'version' field is a single byte that indicates the version of this
616 + structure. If the layout of the structure should ever need to be
617 + changed to add support for additional types of microcode, then the
618 + version number should also be changed.
620 +The 'id' field is a null-terminated string(suitable for printing) that
621 +identifies the firmware.
623 +The 'count' field indicates the number of 'microcode' structures. There
624 +must be one and only one 'microcode' structure for each RISC processor.
625 +Therefore, this field also represents the number of RISC processors for this
628 +The 'soc' structure contains the SOC numbers and revisions used to match
629 +the microcode to the SOC itself. Normally, the microcode loader should
630 +check the data in this structure with the SOC number and revisions, and
631 +only upload the microcode if there's a match. However, this check is not
632 +made on all platforms.
634 +Although it is not recommended, you can specify '0' in the soc.model
635 +field to skip matching SOCs altogether.
637 +The 'model' field is a 16-bit number that matches the actual SOC. The
638 +'major' and 'minor' fields are the major and minor revision numbrs,
639 +respectively, of the SOC.
641 +For example, to match the 8323, revision 1.0:
646 +'padding' is neccessary for structure alignment. This field ensures that the
647 +'extended_modes' field is aligned on a 64-bit boundary.
649 +'extended_modes' is a bitfield that defines special functionality which has an
650 +impact on the device drivers. Each bit has its own impact and has special
651 +instructions for the driver associated with it. This field is stored in
652 +the QE library and available to any driver that calles qe_get_firmware_info().
654 +'vtraps' is an array of 8 words that contain virtual trap values for each
655 +virtual traps. As with 'extended_modes', this field is stored in the QE
656 +library and available to any driver that calles qe_get_firmware_info().
658 +'microcode' (type: struct qe_microcode):
659 + For each RISC processor there is one 'microcode' structure. The first
660 + 'microcode' structure is for the first RISC, and so on.
662 + The 'id' field is a null-terminated string suitable for printing that
663 + identifies this particular microcode.
665 + 'traps' is an array of 16 words that contain hardware trap values
666 + for each of the 16 traps. If trap[i] is 0, then this particular
667 + trap is to be ignored (i.e. not written to TIBCR[i]). The entire value
668 + is written as-is to the TIBCR[i] register, so be sure to set the EN
669 + and T_IBP bits if necessary.
671 + 'eccr' is the value to program into the ECCR register.
673 + 'iram_offset' is the offset into IRAM to start writing the
676 + 'count' is the number of 32-bit words in the microcode.
678 + 'code_offset' is the offset, in bytes, from the beginning of this
679 + structure where the microcode itself can be found. The first
680 + microcode binary should be located immediately after the 'microcode'
683 + 'major', 'minor', and 'revision' are the major, minor, and revision
684 + version numbers, respectively, of the microcode. If all values are 0,
685 + then these fields are ignored.
687 + 'reserved' is necessary for structure alignment. Since 'microcode'
688 + is an array, the 64-bit 'extended_modes' field needs to be aligned
689 + on a 64-bit boundary, and this can only happen if the size of
690 + 'microcode' is a multiple of 8 bytes. To ensure that, we add
693 +After the last microcode is a 32-bit CRC. It can be calculated using
696 +u32 crc32(const u8 *p, unsigned int len)
703 + for (i = 0; i < 8; i++)
704 + crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0);
709 +VI - Sample Code for Creating Firmware Files
710 +============================================
712 +A Python program that creates firmware binaries from the header files normally
713 +distributed by Freescale can be found on http://opensource.freescale.com.
714 --- a/arch/powerpc/Kconfig
715 +++ b/arch/powerpc/Kconfig
717 Used to allow a board to specify it wants a uImage built by default
725 depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL))
726 @@ -160,11 +163,13 @@
728 config PPC_OF_PLATFORM_PCI
731 depends on PPC64 # not supported on 32 bits yet
734 source "init/Kconfig"
736 +source "arch/powerpc/sysdev/Kconfig"
737 source "arch/powerpc/platforms/Kconfig"
739 menu "Kernel options"
745 + default !PPC_ISERIES || PCI
751 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
752 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
755 default y if !40x && !CPM2 && !8xx && !PPC_83xx \
756 && !PPC_85xx && !PPC_86xx
757 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx
758 --- a/arch/powerpc/Kconfig.debug
759 +++ b/arch/powerpc/Kconfig.debug
762 config PPC_EARLY_DEBUG
763 bool "Early debugging (dangerous)"
765 + Say Y to enable some early debugging facilities that may be available
766 + for your processor/board combination. Those facilities are hacks
767 + intended to debug problems early during boot, this should not be
768 + enabled in a production kernel.
769 + Note that enabling this will also cause the kernel default log level
770 + to be pushed to max automatically very early during boot
773 prompt "Early debugging console"
777 Select this to enable early debugging for IBM 44x chips via the
778 - inbuilt serial port.
779 + inbuilt serial port. If you enable this, ensure you set
780 + PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board.
782 +config PPC_EARLY_DEBUG_40x
783 + bool "Early serial debugging for IBM/AMCC 40x CPUs"
786 + Select this to enable early debugging for IBM 40x chips via the
787 + inbuilt serial port. This works on chips with a 16550 compatible
788 + UART. Xilinx chips with uartlite cannot use this option.
790 config PPC_EARLY_DEBUG_CPM
791 bool "Early serial debugging for Freescale CPM-based serial ports"
792 @@ -235,12 +251,20 @@
793 hex "Low 32 bits of early debug UART physical address"
794 depends on PPC_EARLY_DEBUG_44x
797 + You probably want 0x40000200 for ebony boards and
798 + 0x40000300 for taishan
800 config PPC_EARLY_DEBUG_44x_PHYSHIGH
801 hex "EPRN of early debug UART physical address"
802 depends on PPC_EARLY_DEBUG_44x
805 +config PPC_EARLY_DEBUG_40x_PHYSADDR
806 + hex "Early debug UART physical address"
807 + depends on PPC_EARLY_DEBUG_40x
808 + default "0xef600300"
810 config PPC_EARLY_DEBUG_CPM_ADDR
811 hex "CPM UART early debug transmit descriptor address"
812 depends on PPC_EARLY_DEBUG_CPM
813 --- a/arch/powerpc/Makefile
814 +++ b/arch/powerpc/Makefile
816 $(BOOT_TARGETS): vmlinux
817 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
819 +bootwrapper_install:
820 + $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
823 @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
824 @echo ' install - Install kernel using'
825 --- a/arch/powerpc/boot/4xx.c
826 +++ b/arch/powerpc/boot/4xx.c
830 /* Read the 4xx SDRAM controller to get size of system memory. */
831 -void ibm4xx_fixup_memsize(void)
832 +void ibm4xx_sdram_fixup_memsize(void)
835 unsigned long memsize, bank_config;
838 for (i = 0; i < ARRAY_SIZE(sdram_bxcr); i++) {
839 - mtdcr(DCRN_SDRAM0_CFGADDR, sdram_bxcr[i]);
840 - bank_config = mfdcr(DCRN_SDRAM0_CFGDATA);
842 + bank_config = SDRAM0_READ(sdram_bxcr[i]);
843 if (bank_config & SDRAM_CONFIG_BANK_ENABLE)
844 memsize += SDRAM_CONFIG_BANK_SIZE(bank_config);
847 dt_fixup_memory(0, memsize);
850 +/* Read the 440SPe MQ controller to get size of system memory. */
851 +#define DCRN_MQ0_B0BAS 0x40
852 +#define DCRN_MQ0_B1BAS 0x41
853 +#define DCRN_MQ0_B2BAS 0x42
854 +#define DCRN_MQ0_B3BAS 0x43
856 +static u64 ibm440spe_decode_bas(u32 bas)
858 + u64 base = ((u64)(bas & 0xFFE00000u)) << 2;
860 + /* open coded because I'm paranoid about invalid values */
861 + switch ((bas >> 4) & 0xFFF) {
865 + return base + 0x000800000ull;
867 + return base + 0x001000000ull;
869 + return base + 0x002000000ull;
871 + return base + 0x004000000ull;
873 + return base + 0x008000000ull;
875 + return base + 0x010000000ull;
877 + return base + 0x020000000ull;
879 + return base + 0x040000000ull;
881 + return base + 0x080000000ull;
883 + return base + 0x100000000ull;
885 + printf("Memory BAS value 0x%08x unsupported !\n", bas);
889 +void ibm440spe_fixup_memsize(void)
891 + u64 banktop, memsize = 0;
893 + /* Ultimately, we should directly construct the memory node
894 + * so we are able to handle holes in the memory address space
896 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B0BAS));
897 + if (banktop > memsize)
899 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B1BAS));
900 + if (banktop > memsize)
902 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B2BAS));
903 + if (banktop > memsize)
905 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B3BAS));
906 + if (banktop > memsize)
909 + dt_fixup_memory(0, memsize);
913 /* 4xx DDR1/2 Denali memory controller support */
918 #define DDR_GET_VAL(val, mask, shift) (((val) >> (shift)) & (mask))
920 -static inline u32 mfdcr_sdram0(u32 reg)
922 - mtdcr(DCRN_SDRAM0_CFGADDR, reg);
923 - return mfdcr(DCRN_SDRAM0_CFGDATA);
926 void ibm4xx_denali_fixup_memsize(void)
928 u32 val, max_cs, max_col, max_row;
929 u32 cs, col, row, bank, dpath;
930 unsigned long memsize;
932 - val = mfdcr_sdram0(DDR0_02);
933 + val = SDRAM0_READ(DDR0_02);
934 if (!DDR_GET_VAL(val, DDR_START, DDR_START_SHIFT))
935 fatal("DDR controller is not initialized\n");
938 max_row = DDR_GET_VAL(val, DDR_MAX_ROW_REG, DDR_MAX_ROW_REG_SHIFT);
941 - val = mfdcr_sdram0(DDR0_10);
942 + val = SDRAM0_READ(DDR0_10);
944 val = DDR_GET_VAL(val, DDR_CS_MAP, DDR_CS_MAP_SHIFT);
952 @@ -115,15 +170,15 @@
953 fatal("DDR wrong CS configuration\n");
955 /* get data path bytes */
956 - val = mfdcr_sdram0(DDR0_14);
957 + val = SDRAM0_READ(DDR0_14);
959 if (DDR_GET_VAL(val, DDR_REDUC, DDR_REDUC_SHIFT))
960 dpath = 8; /* 64 bits */
962 dpath = 4; /* 32 bits */
964 - /* get adress pins (rows) */
965 - val = mfdcr_sdram0(DDR0_42);
966 + /* get address pins (rows) */
967 + val = SDRAM0_READ(DDR0_42);
969 row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT);
974 /* get collomn size and banks */
975 - val = mfdcr_sdram0(DDR0_43);
976 + val = SDRAM0_READ(DDR0_43);
978 col = DDR_GET_VAL(val, DDR_COL_SZ, DDR_COL_SZ_SHIFT);
980 @@ -179,13 +234,17 @@
981 #define EMAC_RESET 0x20000000
982 void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1)
984 - /* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't do this for us */
985 + /* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't
993 mtdcr(DCRN_MAL0_CFG, MAL_RESET);
994 + while (mfdcr(DCRN_MAL0_CFG) & MAL_RESET)
995 + ; /* loop until reset takes effect */
998 /* Read 4xx EBC bus bridge registers to get mappings of the peripheral
999 @@ -217,84 +276,335 @@
1000 setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32));
1003 -#define SPRN_CCR1 0x378
1004 -void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
1005 +/* Calculate 440GP clocks */
1006 +void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
1008 - u32 cpu, plb, opb, ebc, tb, uart0, m, vco;
1010 - u32 fwdva, fwdvb, fbdv, lfbdv, opbdv0, perdv0, spcid0, prbdv0, tmp;
1012 - mtdcr(DCRN_CPR0_ADDR, CPR0_PLLD0);
1013 - reg = mfdcr(DCRN_CPR0_DATA);
1014 - tmp = (reg & 0x000F0000) >> 16;
1015 - fwdva = tmp ? tmp : 16;
1016 - tmp = (reg & 0x00000700) >> 8;
1017 - fwdvb = tmp ? tmp : 8;
1018 - tmp = (reg & 0x1F000000) >> 24;
1019 - fbdv = tmp ? tmp : 32;
1020 - lfbdv = (reg & 0x0000007F);
1022 - mtdcr(DCRN_CPR0_ADDR, CPR0_OPBD0);
1023 - reg = mfdcr(DCRN_CPR0_DATA);
1024 - tmp = (reg & 0x03000000) >> 24;
1025 - opbdv0 = tmp ? tmp : 4;
1027 - mtdcr(DCRN_CPR0_ADDR, CPR0_PERD0);
1028 - reg = mfdcr(DCRN_CPR0_DATA);
1029 - tmp = (reg & 0x07000000) >> 24;
1030 - perdv0 = tmp ? tmp : 8;
1032 - mtdcr(DCRN_CPR0_ADDR, CPR0_PRIMBD0);
1033 - reg = mfdcr(DCRN_CPR0_DATA);
1034 - tmp = (reg & 0x07000000) >> 24;
1035 - prbdv0 = tmp ? tmp : 8;
1037 - mtdcr(DCRN_CPR0_ADDR, CPR0_SCPID);
1038 - reg = mfdcr(DCRN_CPR0_DATA);
1039 - tmp = (reg & 0x03000000) >> 24;
1040 - spcid0 = tmp ? tmp : 4;
1043 - mtdcr(DCRN_CPR0_ADDR, CPR0_PLLC0);
1044 - reg = mfdcr(DCRN_CPR0_DATA);
1045 - tmp = (reg & 0x03000000) >> 24;
1046 - if (tmp == 0) { /* PLL output */
1047 - tmp = (reg & 0x20000000) >> 29;
1048 - if (!tmp) /* PLLOUTA */
1049 - m = fbdv * lfbdv * fwdva;
1050 + u32 sys0 = mfdcr(DCRN_CPC0_SYS0);
1051 + u32 cr0 = mfdcr(DCRN_CPC0_CR0);
1052 + u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
1053 + u32 opdv = CPC0_SYS0_OPDV(sys0);
1054 + u32 epdv = CPC0_SYS0_EPDV(sys0);
1056 + if (sys0 & CPC0_SYS0_BYPASS) {
1057 + /* Bypass system PLL */
1058 + cpu = plb = sys_clk;
1060 + if (sys0 & CPC0_SYS0_EXTSL)
1062 + m = CPC0_SYS0_FWDVB(sys0) * opdv * epdv;
1064 - m = fbdv * lfbdv * fwdvb;
1066 + m = CPC0_SYS0_FBDV(sys0) * CPC0_SYS0_FWDVA(sys0);
1067 + cpu = sys_clk * m / CPC0_SYS0_FWDVA(sys0);
1068 + plb = sys_clk * m / CPC0_SYS0_FWDVB(sys0);
1070 - else if (tmp == 1) /* CPU output */
1076 + /* FIXME: Check if this is for all 440GP, or just Ebony */
1077 + if ((mfpvr() & 0xf0000fff) == 0x40000440)
1078 + /* Rev. B 440GP, use external system clock */
1081 - m = perdv0 * opbdv0 * fwdvb;
1082 + /* Rev. C 440GP, errata force us to use internal clock */
1085 - vco = (m * sysclk) + (m >> 1);
1086 - cpu = vco / fwdva;
1087 - plb = vco / fwdvb / prbdv0;
1088 - opb = plb / opbdv0;
1089 - ebc = plb / perdv0;
1090 + if (cr0 & CPC0_CR0_U0EC)
1091 + /* External UART clock */
1094 + /* Internal UART clock */
1095 + uart0 = plb / CPC0_CR0_UDIV(cr0);
1099 + if (cr0 & CPC0_CR0_U1EC)
1100 + /* External UART clock */
1103 + /* Internal UART clock */
1104 + uart1 = plb / CPC0_CR0_UDIV(cr0);
1106 + printf("PPC440GP: SysClk = %dMHz (%x)\n\r",
1107 + (sys_clk + 500000) / 1000000, sys_clk);
1109 + dt_fixup_cpu_clocks(cpu, tb, 0);
1111 + dt_fixup_clock("/plb", plb);
1112 + dt_fixup_clock("/plb/opb", opb);
1113 + dt_fixup_clock("/plb/opb/ebc", ebc);
1114 + dt_fixup_clock("/plb/opb/serial@40000200", uart0);
1115 + dt_fixup_clock("/plb/opb/serial@40000300", uart1);
1118 +#define SPRN_CCR1 0x378
1120 +static inline u32 __fix_zero(u32 v, u32 def)
1122 + return v ? v : def;
1125 +static unsigned int __ibm440eplike_fixup_clocks(unsigned int sys_clk,
1126 + unsigned int tmr_clk,
1127 + int per_clk_from_opb)
1130 + u32 pllc = CPR0_READ(DCRN_CPR0_PLLC);
1131 + u32 plld = CPR0_READ(DCRN_CPR0_PLLD);
1134 + u32 fbdv = __fix_zero((plld >> 24) & 0x1f, 32);
1135 + u32 fwdva = __fix_zero((plld >> 16) & 0xf, 16);
1136 + u32 fwdvb = __fix_zero((plld >> 8) & 7, 8);
1137 + u32 lfbdv = __fix_zero(plld & 0x3f, 64);
1138 + u32 pradv0 = __fix_zero((CPR0_READ(DCRN_CPR0_PRIMAD) >> 24) & 7, 8);
1139 + u32 prbdv0 = __fix_zero((CPR0_READ(DCRN_CPR0_PRIMBD) >> 24) & 7, 8);
1140 + u32 opbdv0 = __fix_zero((CPR0_READ(DCRN_CPR0_OPBD) >> 24) & 3, 4);
1141 + u32 perdv0 = __fix_zero((CPR0_READ(DCRN_CPR0_PERD) >> 24) & 3, 4);
1143 + /* Input clocks for primary dividers */
1146 + /* Resulting clocks */
1147 + u32 cpu, plb, opb, ebc, vco;
1150 + u32 ccr1, tb = tmr_clk;
1152 + if (pllc & 0x40000000) {
1155 + /* Feedback path */
1156 + switch ((pllc >> 24) & 7) {
1159 + m = ((pllc & 0x20000000) ? fwdvb : fwdva) * lfbdv;
1163 + m = fwdva * pradv0;
1167 + m = fwdvb * prbdv0 * opbdv0 * perdv0;
1170 + printf("WARNING ! Invalid PLL feedback source !\n");
1174 + vco = sys_clk * m;
1175 + clk_a = vco / fwdva;
1176 + clk_b = vco / fwdvb;
1179 + /* Bypass system PLL */
1181 + clk_a = clk_b = sys_clk;
1184 + cpu = clk_a / pradv0;
1185 + plb = clk_b / prbdv0;
1186 + opb = plb / opbdv0;
1187 + ebc = (per_clk_from_opb ? opb : plb) / perdv0;
1189 /* Figure out timebase. Either CPU or default TmrClk */
1193 - "=&r"(reg) : "i"(SPRN_CCR1));
1195 - tb = 25000000; /* TmrClk is 25MHz */
1197 + ccr1 = mfspr(SPRN_CCR1);
1199 + /* If passed a 0 tmr_clk, force CPU clock */
1202 + mtspr(SPRN_CCR1, ccr1);
1204 + if ((ccr1 & 0x0080) == 0)
1207 dt_fixup_cpu_clocks(cpu, tb, 0);
1208 dt_fixup_clock("/plb", plb);
1209 dt_fixup_clock("/plb/opb", opb);
1210 dt_fixup_clock("/plb/opb/ebc", ebc);
1215 +static void eplike_fixup_uart_clk(int index, const char *path,
1216 + unsigned int ser_clk,
1217 + unsigned int plb_clk)
1220 + unsigned int clock;
1224 + sdr = SDR0_READ(DCRN_SDR0_UART0);
1227 + sdr = SDR0_READ(DCRN_SDR0_UART1);
1230 + sdr = SDR0_READ(DCRN_SDR0_UART2);
1233 + sdr = SDR0_READ(DCRN_SDR0_UART3);
1239 + if (sdr & 0x00800000u)
1242 + clock = plb_clk / __fix_zero(sdr & 0xff, 256);
1244 + dt_fixup_clock(path, clock);
1247 +void ibm440ep_fixup_clocks(unsigned int sys_clk,
1248 + unsigned int ser_clk,
1249 + unsigned int tmr_clk)
1251 + unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 0);
1253 + /* serial clocks beed fixup based on int/ext */
1254 + eplike_fixup_uart_clk(0, "/plb/opb/serial@ef600300", ser_clk, plb_clk);
1255 + eplike_fixup_uart_clk(1, "/plb/opb/serial@ef600400", ser_clk, plb_clk);
1256 + eplike_fixup_uart_clk(2, "/plb/opb/serial@ef600500", ser_clk, plb_clk);
1257 + eplike_fixup_uart_clk(3, "/plb/opb/serial@ef600600", ser_clk, plb_clk);
1260 +void ibm440gx_fixup_clocks(unsigned int sys_clk,
1261 + unsigned int ser_clk,
1262 + unsigned int tmr_clk)
1264 + unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
1266 + /* serial clocks beed fixup based on int/ext */
1267 + eplike_fixup_uart_clk(0, "/plb/opb/serial@40000200", ser_clk, plb_clk);
1268 + eplike_fixup_uart_clk(1, "/plb/opb/serial@40000300", ser_clk, plb_clk);
1271 +void ibm440spe_fixup_clocks(unsigned int sys_clk,
1272 + unsigned int ser_clk,
1273 + unsigned int tmr_clk)
1275 + unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
1277 + /* serial clocks beed fixup based on int/ext */
1278 + eplike_fixup_uart_clk(0, "/plb/opb/serial@10000200", ser_clk, plb_clk);
1279 + eplike_fixup_uart_clk(1, "/plb/opb/serial@10000300", ser_clk, plb_clk);
1280 + eplike_fixup_uart_clk(2, "/plb/opb/serial@10000600", ser_clk, plb_clk);
1283 +void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
1285 + u32 pllmr = mfdcr(DCRN_CPC0_PLLMR);
1286 + u32 cpc0_cr0 = mfdcr(DCRN_405_CPC0_CR0);
1287 + u32 cpc0_cr1 = mfdcr(DCRN_405_CPC0_CR1);
1288 + u32 psr = mfdcr(DCRN_405_CPC0_PSR);
1289 + u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
1290 + u32 fwdv, fwdvb, fbdv, cbdv, opdv, epdv, ppdv, udiv;
1292 + fwdv = (8 - ((pllmr & 0xe0000000) >> 29));
1293 + fbdv = (pllmr & 0x1e000000) >> 25;
1296 + cbdv = ((pllmr & 0x00060000) >> 17) + 1; /* CPU:PLB */
1297 + opdv = ((pllmr & 0x00018000) >> 15) + 1; /* PLB:OPB */
1298 + ppdv = ((pllmr & 0x00001800) >> 13) + 1; /* PLB:PCI */
1299 + epdv = ((pllmr & 0x00001800) >> 11) + 2; /* PLB:EBC */
1300 + udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1;
1302 + /* check for 405GPr */
1303 + if ((mfpvr() & 0xfffffff0) == (0x50910951 & 0xfffffff0)) {
1304 + fwdvb = 8 - (pllmr & 0x00000007);
1305 + if (!(psr & 0x00001000)) /* PCI async mode enable == 0 */
1306 + if (psr & 0x00000020) /* New mode enable */
1307 + m = fwdvb * 2 * ppdv;
1309 + m = fwdvb * cbdv * ppdv;
1310 + else if (psr & 0x00000020) /* New mode enable */
1311 + if (psr & 0x00000800) /* PerClk synch mode */
1312 + m = fwdvb * 2 * epdv;
1315 + else if (epdv == fbdv)
1316 + m = fbdv * cbdv * epdv;
1318 + m = fbdv * fwdvb * cbdv;
1320 + cpu = sys_clk * m / fwdv;
1321 + plb = sys_clk * m / (fwdvb * cbdv);
1323 + m = fwdv * fbdv * cbdv;
1324 + cpu = sys_clk * m / fwdv;
1330 + if (cpc0_cr0 & 0x80)
1331 + /* uart0 uses the external clock */
1334 + uart0 = cpu / udiv;
1336 + if (cpc0_cr0 & 0x40)
1337 + /* uart1 uses the external clock */
1340 + uart1 = cpu / udiv;
1342 + /* setup the timebase clock to tick at the cpu frequency */
1343 + cpc0_cr1 = cpc0_cr1 & ~0x00800000;
1344 + mtdcr(DCRN_405_CPC0_CR1, cpc0_cr1);
1347 + dt_fixup_cpu_clocks(cpu, tb, 0);
1348 + dt_fixup_clock("/plb", plb);
1349 + dt_fixup_clock("/plb/opb", opb);
1350 + dt_fixup_clock("/plb/ebc", ebc);
1351 + dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
1352 + dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
1356 +void ibm405ep_fixup_clocks(unsigned int sys_clk)
1358 + u32 pllmr0 = mfdcr(DCRN_CPC0_PLLMR0);
1359 + u32 pllmr1 = mfdcr(DCRN_CPC0_PLLMR1);
1360 + u32 cpc0_ucr = mfdcr(DCRN_CPC0_UCR);
1361 + u32 cpu, plb, opb, ebc, uart0, uart1;
1362 + u32 fwdva, fwdvb, fbdv, cbdv, opdv, epdv;
1363 + u32 pllmr0_ccdv, tb, m;
1365 + fwdva = 8 - ((pllmr1 & 0x00070000) >> 16);
1366 + fwdvb = 8 - ((pllmr1 & 0x00007000) >> 12);
1367 + fbdv = (pllmr1 & 0x00f00000) >> 20;
1371 + cbdv = ((pllmr0 & 0x00030000) >> 16) + 1; /* CPU:PLB */
1372 + epdv = ((pllmr0 & 0x00000300) >> 8) + 2; /* PLB:EBC */
1373 + opdv = ((pllmr0 & 0x00003000) >> 12) + 1; /* PLB:OPB */
1377 + pllmr0_ccdv = ((pllmr0 & 0x00300000) >> 20) + 1;
1378 + if (pllmr1 & 0x80000000)
1379 + cpu = sys_clk * m / (fwdva * pllmr0_ccdv);
1381 + cpu = sys_clk / pllmr0_ccdv;
1387 + uart0 = cpu / (cpc0_ucr & 0x0000007f);
1388 + uart1 = cpu / ((cpc0_ucr & 0x00007f00) >> 8);
1390 + dt_fixup_cpu_clocks(cpu, tb, 0);
1391 + dt_fixup_clock("/plb", plb);
1392 + dt_fixup_clock("/plb/opb", opb);
1393 + dt_fixup_clock("/plb/ebc", ebc);
1394 dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
1395 - dt_fixup_clock("/plb/opb/serial@ef600400", uart0);
1396 - dt_fixup_clock("/plb/opb/serial@ef600500", uart0);
1397 - dt_fixup_clock("/plb/opb/serial@ef600600", uart0);
1398 + dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
1400 --- a/arch/powerpc/boot/4xx.h
1401 +++ b/arch/powerpc/boot/4xx.h
1403 #ifndef _POWERPC_BOOT_4XX_H_
1404 #define _POWERPC_BOOT_4XX_H_
1406 -void ibm4xx_fixup_memsize(void);
1407 +void ibm4xx_sdram_fixup_memsize(void);
1408 +void ibm440spe_fixup_memsize(void);
1409 void ibm4xx_denali_fixup_memsize(void);
1410 void ibm44x_dbcr_reset(void);
1411 void ibm40x_dbcr_reset(void);
1412 void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1);
1413 void ibm4xx_fixup_ebc_ranges(const char *ebc);
1414 -void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk);
1416 +void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk);
1417 +void ibm405ep_fixup_clocks(unsigned int sys_clk);
1418 +void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk);
1419 +void ibm440ep_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
1420 + unsigned int tmr_clk);
1421 +void ibm440gx_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
1422 + unsigned int tmr_clk);
1423 +void ibm440spe_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
1424 + unsigned int tmr_clk);
1426 #endif /* _POWERPC_BOOT_4XX_H_ */
1427 --- a/arch/powerpc/boot/Makefile
1428 +++ b/arch/powerpc/boot/Makefile
1430 BOOTCFLAGS += -fno-stack-protector
1433 -BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
1434 +BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) -I$(srctree)/$(src)/libfdt
1436 $(obj)/4xx.o: BOOTCFLAGS += -mcpu=440
1437 $(obj)/ebony.o: BOOTCFLAGS += -mcpu=440
1438 +$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=440
1439 +$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
1440 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
1443 zlib := inffast.c inflate.c inftrees.c
1444 zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h
1445 zliblinuxheader := zlib.h zconf.h zutil.h
1447 $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \
1448 $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
1450 -src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
1451 +src-libfdt := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
1452 +src-wlib := string.S crt0.S stdio.c main.c \
1453 + $(addprefix libfdt/,$(src-libfdt)) libfdt-wrapper.c \
1454 ns16550.c serial.c simple_alloc.c div64.S util.S \
1455 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
1456 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \
1457 cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \
1458 fsl-soc.c mpc8xx.c pq2.c
1459 -src-plat := of.c cuboot-52xx.c cuboot-83xx.c cuboot-85xx.c holly.c \
1460 +src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \
1461 cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
1462 ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \
1463 cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c cuboot-bamboo.c \
1464 - fixed-head.S ep88xc.c cuboot-hpc2.c
1465 + fixed-head.S ep88xc.c cuboot-hpc2.c ep405.c cuboot-taishan.c \
1466 + cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
1468 src-boot := $(src-wlib) $(src-plat) empty.c
1470 src-boot := $(addprefix $(obj)/, $(src-boot))
1471 @@ -101,24 +108,61 @@
1472 cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
1474 $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c FORCE
1475 + $(Q)mkdir -p $(dir $@)
1476 $(call if_changed_dep,bootcc)
1477 $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S FORCE
1478 + $(Q)mkdir -p $(dir $@)
1479 $(call if_changed_dep,bootas)
1481 $(obj)/wrapper.a: $(obj-wlib) FORCE
1482 $(call if_changed,bootar)
1484 -hostprogs-y := addnote addRamDisk hack-coff mktree
1485 +hostprogs-y := addnote addRamDisk hack-coff mktree dtc
1487 targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
1488 extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
1489 $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
1491 wrapper :=$(srctree)/$(src)/wrapper
1492 -wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
1493 +wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree dtc) \
1497 +# Bits for building dtc
1498 +# DTC_GENPARSER := 1 # Uncomment to rebuild flex/bison output
1500 +dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o srcpos.o checks.o
1501 +dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
1502 +dtc-objs := $(addprefix dtc-src/, $(dtc-objs))
1504 +# prerequisites on generated files needs to be explicit
1505 +$(obj)/dtc-src/dtc-parser.tab.o: $(obj)/dtc-src/dtc-parser.tab.c $(obj)/dtc-src/dtc-parser.tab.h
1506 +$(obj)/dtc-src/dtc-lexer.lex.o: $(obj)/dtc-src/dtc-lexer.lex.c $(obj)/dtc-src/dtc-parser.tab.h
1508 +HOSTCFLAGS += -I$(src)/dtc-src/ -I$(src)/libfdt/
1510 +targets += dtc-src/dtc-parser.tab.c
1511 +targets += dtc-src/dtc-lexer.lex.c
1513 +ifdef DTC_GENPARSER
1517 +quiet_cmd_bison = BISON $@
1518 + cmd_bison = $(BISON) -o$@ -d $<; cp $@ $@_shipped
1519 +quiet_cmd_flex = FLEX $@
1520 + cmd_flex = $(FLEX) -o$@ $<; cp $@ $@_shipped
1522 +$(obj)/dtc-src/dtc-parser.tab.c: $(src)/dtc-src/dtc-parser.y FORCE
1523 + $(call if_changed,bison)
1525 +$(obj)/dtc-src/dtc-parser.tab.h: $(obj)/dtc-src/dtc-parser.tab.c
1527 +$(obj)/dtc-src/dtc-lexer.lex.c: $(src)/dtc-src/dtc-lexer.l FORCE
1528 + $(call if_changed,flex)
1532 # Bits for building various flavours of zImage
1534 ifneq ($(CROSS32_COMPILE),)
1535 @@ -150,15 +194,26 @@
1536 ifneq ($(CONFIG_DEVICE_TREE),"")
1537 image-$(CONFIG_PPC_8xx) += cuImage.8xx
1538 image-$(CONFIG_PPC_EP88XC) += zImage.ep88xc
1539 +image-$(CONFIG_EP405) += zImage.ep405
1540 image-$(CONFIG_8260) += cuImage.pq2
1541 +image-$(CONFIG_EP8248E) += zImage.ep8248e
1542 image-$(CONFIG_PPC_MPC52xx) += cuImage.52xx
1543 +image-$(CONFIG_STORCENTER) += cuImage.824x
1544 image-$(CONFIG_PPC_83xx) += cuImage.83xx
1545 image-$(CONFIG_PPC_85xx) += cuImage.85xx
1546 image-$(CONFIG_MPC7448HPC2) += cuImage.hpc2
1547 image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony
1548 image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo
1549 image-$(CONFIG_SEQUOIA) += cuImage.sequoia
1550 +image-$(CONFIG_RAINIER) += cuImage.rainier
1551 image-$(CONFIG_WALNUT) += treeImage.walnut
1552 +image-$(CONFIG_TAISHAN) += cuImage.taishan
1553 +image-$(CONFIG_KATMAI) += cuImage.katmai
1554 +image-$(CONFIG_WARP) += cuImage.warp
1557 +ifneq ($(CONFIG_REDBOOT),"")
1558 +image-$(CONFIG_PPC_8xx) += zImage.redboot-8xx
1561 # For 32-bit powermacs, build the COFF and miboot images
1562 @@ -243,3 +298,51 @@
1563 clean-kernel += $(addsuffix .gz,$(clean-kernel))
1564 # If not absolute clean-files are relative to $(obj).
1565 clean-files += $(addprefix $(objtree)/, $(clean-kernel))
1567 +WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
1568 +WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
1569 +WRAPPER_BINDIR := /usr/sbin
1572 +extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
1573 +hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs-y))
1574 +wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
1575 +dts-installed := $(patsubst $(obj)/dts/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(obj)/dts/*.dts))
1577 +all-installed := $(extra-installed) $(hostprogs-installed) $(wrapper-installed) $(dts-installed)
1579 +quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
1580 + cmd_mkdir = mkdir -p $@
1582 +quiet_cmd_install = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,%,$@)
1583 + cmd_install = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,$(obj)/%,$@) $@
1585 +quiet_cmd_install_dts = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,dts/%,$@)
1586 + cmd_install_dts = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,$(srctree)/$(obj)/dts/%,$@) $@
1588 +quiet_cmd_install_exe = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@)
1589 + cmd_install_exe = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(obj)/%,$@) $@
1591 +quiet_cmd_install_wrapper = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@)
1592 + cmd_install_wrapper = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(srctree)/$(obj)/%,$@) $@ ;\
1593 + sed -i $@ -e 's%^object=.*%object=$(WRAPPER_OBJDIR)%' \
1594 + -e 's%^objbin=.*%objbin=$(WRAPPER_BINDIR)%' \
1597 +$(DESTDIR)$(WRAPPER_OBJDIR) $(DESTDIR)$(WRAPPER_DTSDIR) $(DESTDIR)$(WRAPPER_BINDIR):
1600 +$(extra-installed) : $(DESTDIR)$(WRAPPER_OBJDIR)/% : $(obj)/% | $(DESTDIR)$(WRAPPER_OBJDIR)
1601 + $(call cmd,install)
1603 +$(hostprogs-installed) : $(DESTDIR)$(WRAPPER_BINDIR)/% : $(obj)/% | $(DESTDIR)$(WRAPPER_BINDIR)
1604 + $(call cmd,install_exe)
1606 +$(dts-installed) : $(DESTDIR)$(WRAPPER_DTSDIR)/% : $(srctree)/$(obj)/dts/% | $(DESTDIR)$(WRAPPER_DTSDIR)
1607 + $(call cmd,install_dts)
1609 +$(wrapper-installed): $(DESTDIR)$(WRAPPER_BINDIR) $(srctree)/$(obj)/wrapper | $(DESTDIR)$(WRAPPER_BINDIR)
1610 + $(call cmd,install_wrapper)
1612 +$(obj)/bootwrapper_install: $(all-installed)
1614 --- a/arch/powerpc/boot/bamboo.c
1615 +++ b/arch/powerpc/boot/bamboo.c
1618 unsigned long sysclk = 33333333;
1620 - ibm440ep_fixup_clocks(sysclk, 11059200);
1621 - ibm4xx_fixup_memsize();
1622 + ibm440ep_fixup_clocks(sysclk, 11059200, 25000000);
1623 + ibm4xx_sdram_fixup_memsize();
1624 ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
1625 dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1);
1628 platform_ops.exit = ibm44x_dbcr_reset;
1631 - ft_init(_dtb_start, 0, 32);
1632 + fdt_init(_dtb_start);
1633 serial_console_init();
1635 --- a/arch/powerpc/boot/cuboot-52xx.c
1636 +++ b/arch/powerpc/boot/cuboot-52xx.c
1638 unsigned long r6, unsigned long r7)
1641 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1642 + fdt_init(_dtb_start);
1643 serial_console_init();
1644 platform_ops.fixups = platform_fixups;
1647 +++ b/arch/powerpc/boot/cuboot-824x.c
1650 + * Old U-boot compatibility for 824x
1652 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
1654 + * This program is free software; you can redistribute it and/or modify it
1655 + * under the terms of the GNU General Public License version 2 as published
1656 + * by the Free Software Foundation.
1661 +#include "cuboot.h"
1663 +#define TARGET_824x
1664 +#include "ppcboot.h"
1669 +static void platform_fixups(void)
1673 + dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
1674 + dt_fixup_mac_addresses(bd.bi_enetaddr);
1675 + dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
1677 + soc = find_node_by_devtype(NULL, "soc");
1679 + void *serial = NULL;
1681 + setprop(soc, "bus-frequency", &bd.bi_busfreq,
1682 + sizeof(bd.bi_busfreq));
1684 + while ((serial = find_node_by_devtype(serial, "serial"))) {
1685 + if (get_parent(serial) != soc)
1688 + setprop(serial, "clock-frequency", &bd.bi_busfreq,
1689 + sizeof(bd.bi_busfreq));
1694 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1695 + unsigned long r6, unsigned long r7)
1698 + fdt_init(_dtb_start);
1699 + serial_console_init();
1700 + platform_ops.fixups = platform_fixups;
1702 --- a/arch/powerpc/boot/cuboot-83xx.c
1703 +++ b/arch/powerpc/boot/cuboot-83xx.c
1707 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
1708 - dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
1709 + dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
1710 + dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
1711 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
1713 /* Unfortunately, the specific model number is encoded in the
1715 unsigned long r6, unsigned long r7)
1718 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1719 + fdt_init(_dtb_start);
1720 serial_console_init();
1721 platform_ops.fixups = platform_fixups;
1723 --- a/arch/powerpc/boot/cuboot-85xx.c
1724 +++ b/arch/powerpc/boot/cuboot-85xx.c
1728 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
1729 - dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr,
1731 + dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
1732 + dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
1733 + dt_fixup_mac_address_by_alias("ethernet2", bd.bi_enet2addr);
1734 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 8, bd.bi_busfreq);
1736 /* Unfortunately, the specific model number is encoded in the
1738 unsigned long r6, unsigned long r7)
1741 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1742 + fdt_init(_dtb_start);
1743 serial_console_init();
1744 platform_ops.fixups = platform_fixups;
1746 --- a/arch/powerpc/boot/cuboot-8xx.c
1747 +++ b/arch/powerpc/boot/cuboot-8xx.c
1749 unsigned long r6, unsigned long r7)
1752 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1753 + fdt_init(_dtb_start);
1754 serial_console_init();
1755 platform_ops.fixups = platform_fixups;
1757 --- a/arch/powerpc/boot/cuboot-hpc2.c
1758 +++ b/arch/powerpc/boot/cuboot-hpc2.c
1760 unsigned long r6, unsigned long r7)
1763 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1764 + fdt_init(_dtb_start);
1765 serial_console_init();
1766 platform_ops.fixups = platform_fixups;
1769 +++ b/arch/powerpc/boot/cuboot-katmai.c
1772 + * Old U-boot compatibility for Katmai
1774 + * Author: Hugh Blemings <hugh@au.ibm.com>
1776 + * Copyright 2007 Hugh Blemings, IBM Corporation.
1777 + * Based on cuboot-ebony.c which is:
1778 + * Copyright 2007 David Gibson, IBM Corporation.
1779 + * Based on cuboot-83xx.c, which is:
1780 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
1782 + * This program is free software; you can redistribute it and/or modify it
1783 + * under the terms of the GNU General Public License version 2 as published
1784 + * by the Free Software Foundation.
1793 +#include "cuboot.h"
1796 +#include "ppcboot.h"
1802 +static void katmai_fixups(void)
1804 + unsigned long sysclk = 33333000;
1806 + /* 440SP Clock logic is all but identical to 440GX
1807 + * so we just use that code for now at least
1809 + ibm440spe_fixup_clocks(sysclk, 6 * 1843200, 0);
1811 + ibm440spe_fixup_memsize();
1813 + dt_fixup_mac_address(0, bd.bi_enetaddr);
1815 + ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
1818 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1819 + unsigned long r6, unsigned long r7)
1823 + platform_ops.fixups = katmai_fixups;
1824 + fdt_init(_dtb_start);
1825 + serial_console_init();
1827 --- a/arch/powerpc/boot/cuboot-pq2.c
1828 +++ b/arch/powerpc/boot/cuboot-pq2.c
1830 unsigned long r6, unsigned long r7)
1833 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1834 + fdt_init(_dtb_start);
1835 serial_console_init();
1836 platform_ops.fixups = pq2_platform_fixups;
1839 +++ b/arch/powerpc/boot/cuboot-rainier.c
1842 + * Old U-boot compatibility for Rainier
1844 + * Valentine Barshak <vbarshak@ru.mvista.com>
1845 + * Copyright 2007 MontaVista Software, Inc
1847 + * Based on Ebony code by David Gibson <david@gibson.dropbear.id.au>
1848 + * Copyright IBM Corporation, 2007
1850 + * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com>
1851 + * Copyright IBM Corporation, 2007
1853 + * This program is free software; you can redistribute it and/or
1854 + * modify it under the terms of the GNU General Public License
1855 + * as published by the Free Software Foundation; version 2 of the License
1858 +#include <stdarg.h>
1859 +#include <stddef.h>
1862 +#include "string.h"
1869 +#include "cuboot.h"
1873 +#include "ppcboot.h"
1878 +static void rainier_fixups(void)
1880 + unsigned long sysclk = 33333333;
1882 + ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
1883 + ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
1884 + ibm4xx_denali_fixup_memsize();
1885 + dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr);
1888 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1889 + unsigned long r6, unsigned long r7)
1892 + platform_ops.fixups = rainier_fixups;
1893 + platform_ops.exit = ibm44x_dbcr_reset;
1894 + fdt_init(_dtb_start);
1895 + serial_console_init();
1897 --- a/arch/powerpc/boot/cuboot-sequoia.c
1898 +++ b/arch/powerpc/boot/cuboot-sequoia.c
1901 unsigned long sysclk = 33333333;
1903 - ibm440ep_fixup_clocks(sysclk, 11059200);
1904 + ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
1905 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
1906 ibm4xx_denali_fixup_memsize();
1907 dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr);
1910 platform_ops.fixups = sequoia_fixups;
1911 platform_ops.exit = ibm44x_dbcr_reset;
1912 - ft_init(_dtb_start, 0, 32);
1913 + fdt_init(_dtb_start);
1914 serial_console_init();
1917 +++ b/arch/powerpc/boot/cuboot-taishan.c
1920 + * Old U-boot compatibility for Taishan
1922 + * Author: Hugh Blemings <hugh@au.ibm.com>
1924 + * Copyright 2007 Hugh Blemings, IBM Corporation.
1925 + * Based on cuboot-ebony.c which is:
1926 + * Copyright 2007 David Gibson, IBM Corporation.
1927 + * Based on cuboot-83xx.c, which is:
1928 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
1930 + * This program is free software; you can redistribute it and/or modify it
1931 + * under the terms of the GNU General Public License version 2 as published
1932 + * by the Free Software Foundation.
1937 +#include "cuboot.h"
1943 +#include "ppcboot.h"
1949 +static void taishan_fixups(void)
1951 + /* FIXME: sysclk should be derived by reading the FPGA
1953 + unsigned long sysclk = 33000000;
1955 + ibm440gx_fixup_clocks(sysclk, 6 * 1843200, 25000000);
1957 + ibm4xx_sdram_fixup_memsize();
1959 + dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
1961 + ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
1964 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1965 + unsigned long r6, unsigned long r7)
1969 + platform_ops.fixups = taishan_fixups;
1970 + fdt_init(_dtb_start);
1971 + serial_console_init();
1974 +++ b/arch/powerpc/boot/cuboot-warp.c
1977 + * Copyright (c) 2008 PIKA Technologies
1978 + * Sean MacLennan <smaclennan@pikatech.com>
1980 + * This program is free software; you can redistribute it and/or modify it
1981 + * under the terms of the GNU General Public License version 2 as published
1982 + * by the Free Software Foundation.
1987 +#include "cuboot.h"
1990 +#include "ppcboot.h"
1994 +static void warp_fixups(void)
1996 + unsigned long sysclk = 66000000;
1998 + ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
1999 + ibm4xx_sdram_fixup_memsize();
2000 + ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
2001 + dt_fixup_mac_addresses(&bd.bi_enetaddr);
2005 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
2006 + unsigned long r6, unsigned long r7)
2010 + platform_ops.fixups = warp_fixups;
2011 + platform_ops.exit = ibm44x_dbcr_reset;
2012 + fdt_init(_dtb_start);
2013 + serial_console_init();
2015 --- a/arch/powerpc/boot/dcr.h
2016 +++ b/arch/powerpc/boot/dcr.h
2018 #define DCRN_SDRAM0_CFGADDR 0x010
2019 #define DCRN_SDRAM0_CFGDATA 0x011
2021 +#define SDRAM0_READ(offset) ({\
2022 + mtdcr(DCRN_SDRAM0_CFGADDR, offset); \
2023 + mfdcr(DCRN_SDRAM0_CFGDATA); })
2024 +#define SDRAM0_WRITE(offset, data) ({\
2025 + mtdcr(DCRN_SDRAM0_CFGADDR, offset); \
2026 + mtdcr(DCRN_SDRAM0_CFGDATA, data); })
2028 #define SDRAM0_B0CR 0x40
2029 #define SDRAM0_B1CR 0x44
2030 #define SDRAM0_B2CR 0x48
2031 #define SDRAM0_B3CR 0x4c
2033 -static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR, SDRAM0_B2CR, SDRAM0_B3CR };
2034 +static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR,
2035 + SDRAM0_B2CR, SDRAM0_B3CR };
2037 #define SDRAM_CONFIG_BANK_ENABLE 0x00000001
2038 #define SDRAM_CONFIG_SIZE_MASK 0x000e0000
2039 @@ -138,5 +146,54 @@
2040 #define DCRN_CPC0_PLLMR 0xb0
2041 #define DCRN_405_CPC0_CR0 0xb1
2042 #define DCRN_405_CPC0_CR1 0xb2
2043 +#define DCRN_405_CPC0_PSR 0xb4
2045 +/* 405EP Clocking/Power Management/Chip Control regs */
2046 +#define DCRN_CPC0_PLLMR0 0xf0
2047 +#define DCRN_CPC0_PLLMR1 0xf4
2048 +#define DCRN_CPC0_UCR 0xf5
2050 +/* 440GX Clock control etc */
2053 +#define DCRN_CPR0_CLKUPD 0x020
2054 +#define DCRN_CPR0_PLLC 0x040
2055 +#define DCRN_CPR0_PLLD 0x060
2056 +#define DCRN_CPR0_PRIMAD 0x080
2057 +#define DCRN_CPR0_PRIMBD 0x0a0
2058 +#define DCRN_CPR0_OPBD 0x0c0
2059 +#define DCRN_CPR0_PERD 0x0e0
2060 +#define DCRN_CPR0_MALD 0x100
2062 +#define DCRN_SDR0_CONFIG_ADDR 0xe
2063 +#define DCRN_SDR0_CONFIG_DATA 0xf
2065 +/* SDR read/write helper macros */
2066 +#define SDR0_READ(offset) ({\
2067 + mtdcr(DCRN_SDR0_CONFIG_ADDR, offset); \
2068 + mfdcr(DCRN_SDR0_CONFIG_DATA); })
2069 +#define SDR0_WRITE(offset, data) ({\
2070 + mtdcr(DCRN_SDR0_CONFIG_ADDR, offset); \
2071 + mtdcr(DCRN_SDR0_CONFIG_DATA, data); })
2073 +#define DCRN_SDR0_UART0 0x0120
2074 +#define DCRN_SDR0_UART1 0x0121
2075 +#define DCRN_SDR0_UART2 0x0122
2076 +#define DCRN_SDR0_UART3 0x0123
2079 +/* CPRs read/write helper macros - based off include/asm-ppc/ibm44x.h */
2081 +#define DCRN_CPR0_CFGADDR 0xc
2082 +#define DCRN_CPR0_CFGDATA 0xd
2084 +#define CPR0_READ(offset) ({\
2085 + mtdcr(DCRN_CPR0_CFGADDR, offset); \
2086 + mfdcr(DCRN_CPR0_CFGDATA); })
2087 +#define CPR0_WRITE(offset, data) ({\
2088 + mtdcr(DCRN_CPR0_CFGADDR, offset); \
2089 + mtdcr(DCRN_CPR0_CFGDATA, data); })
2093 #endif /* _PPC_BOOT_DCR_H_ */
2094 --- a/arch/powerpc/boot/devtree.c
2095 +++ b/arch/powerpc/boot/devtree.c
2100 +void dt_fixup_mac_address_by_alias(const char *alias, const u8 *addr)
2102 + void *devp = find_node_by_alias(alias);
2105 + printf("%s: local-mac-address <-"
2106 + " %02x:%02x:%02x:%02x:%02x:%02x\n\r", alias,
2107 + addr[0], addr[1], addr[2],
2108 + addr[3], addr[4], addr[5]);
2110 + setprop(devp, "local-mac-address", addr, 6);
2114 void dt_fixup_mac_address(u32 index, const u8 *addr)
2116 void *devp = find_node_by_prop_value(NULL, "linux,network-index",
2118 +++ b/arch/powerpc/boot/dtc-src/Makefile.dtc
2122 +# This is not a complete Makefile of itself. Instead, it is designed to
2123 +# be easily embeddable into other systems of Makefiles.
2125 +DTC_SRCS = dtc.c flattree.c fstree.c data.c livetree.c treesource.c srcpos.c \
2127 +DTC_EXTRA = dtc.h srcpos.h
2128 +DTC_LEXFILES = dtc-lexer.l
2129 +DTC_BISONFILES = dtc-parser.y
2131 +DTC_LEX_SRCS = $(DTC_LEXFILES:%.l=%.lex.c)
2132 +DTC_BISON_SRCS = $(DTC_BISONFILES:%.y=%.tab.c)
2133 +DTC_BISON_INCLUDES = $(DTC_BISONFILES:%.y=%.tab.h)
2135 +DTC_GEN_SRCS = $(DTC_LEX_SRCS) $(DTC_BISON_SRCS)
2136 +DTC_GEN_ALL = $(DTC_GEN_SRCS) $(DTC_BISON_INCLUDES)
2137 +DTC_OBJS = $(DTC_SRCS:%.c=%.o) $(DTC_GEN_SRCS:%.c=%.o)
2139 +DTC_CLEANFILES = $(DTC_GEN_ALL)
2141 +# We assume the containing Makefile system can do auto-dependencies for most
2142 +# things, but we supply the dependencies on generated header files explicitly
2144 +$(addprefix $(DTC_objdir)/,$(DTC_GEN_SRCS:%.c=%.o)): $(addprefix $(DTC_objdir)/,$(DTC_BISON_INCLUDES))
2146 +++ b/arch/powerpc/boot/dtc-src/checks.c
2149 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2007.
2152 + * This program is free software; you can redistribute it and/or
2153 + * modify it under the terms of the GNU General Public License as
2154 + * published by the Free Software Foundation; either version 2 of the
2155 + * License, or (at your option) any later version.
2157 + * This program is distributed in the hope that it will be useful,
2158 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2159 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2160 + * General Public License for more details.
2162 + * You should have received a copy of the GNU General Public License
2163 + * along with this program; if not, write to the Free Software
2164 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
2170 +#ifdef TRACE_CHECKS
2171 +#define TRACE(c, ...) \
2173 + fprintf(stderr, "=== %s: ", (c)->name); \
2174 + fprintf(stderr, __VA_ARGS__); \
2175 + fprintf(stderr, "\n"); \
2178 +#define TRACE(c, fmt, ...) do { } while (0)
2196 +typedef void (*tree_check_fn)(struct check *c, struct node *dt);
2197 +typedef void (*node_check_fn)(struct check *c, struct node *dt, struct node *node);
2198 +typedef void (*prop_check_fn)(struct check *c, struct node *dt,
2199 + struct node *node, struct property *prop);
2203 + tree_check_fn tree_fn;
2204 + node_check_fn node_fn;
2205 + prop_check_fn prop_fn;
2207 + enum checklevel level;
2208 + enum checkstatus status;
2211 + struct check **prereq;
2214 +#define CHECK(nm, tfn, nfn, pfn, d, lvl, ...) \
2215 + static struct check *nm##_prereqs[] = { __VA_ARGS__ }; \
2216 + static struct check nm = { \
2218 + .tree_fn = (tfn), \
2219 + .node_fn = (nfn), \
2220 + .prop_fn = (pfn), \
2223 + .status = UNCHECKED, \
2224 + .num_prereqs = ARRAY_SIZE(nm##_prereqs), \
2225 + .prereq = nm##_prereqs, \
2228 +#define TREE_CHECK(nm, d, lvl, ...) \
2229 + CHECK(nm, check_##nm, NULL, NULL, d, lvl, __VA_ARGS__)
2230 +#define NODE_CHECK(nm, d, lvl, ...) \
2231 + CHECK(nm, NULL, check_##nm, NULL, d, lvl, __VA_ARGS__)
2232 +#define PROP_CHECK(nm, d, lvl, ...) \
2233 + CHECK(nm, NULL, NULL, check_##nm, d, lvl, __VA_ARGS__)
2234 +#define BATCH_CHECK(nm, lvl, ...) \
2235 + CHECK(nm, NULL, NULL, NULL, NULL, lvl, __VA_ARGS__)
2238 +static inline void check_msg(struct check *c, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
2240 +static inline void check_msg(struct check *c, const char *fmt, ...)
2243 + va_start(ap, fmt);
2245 + if ((c->level < WARN) || (c->level <= quiet))
2246 + return; /* Suppress message */
2248 + fprintf(stderr, "%s (%s): ",
2249 + (c->level == ERROR) ? "ERROR" : "Warning", c->name);
2250 + vfprintf(stderr, fmt, ap);
2251 + fprintf(stderr, "\n");
2254 +#define FAIL(c, ...) \
2256 + TRACE((c), "\t\tFAILED at %s:%d", __FILE__, __LINE__); \
2257 + (c)->status = FAILED; \
2258 + check_msg((c), __VA_ARGS__); \
2261 +static void check_nodes_props(struct check *c, struct node *dt, struct node *node)
2263 + struct node *child;
2264 + struct property *prop;
2266 + TRACE(c, "%s", node->fullpath);
2268 + c->node_fn(c, dt, node);
2271 + for_each_property(node, prop) {
2272 + TRACE(c, "%s\t'%s'", node->fullpath, prop->name);
2273 + c->prop_fn(c, dt, node, prop);
2276 + for_each_child(node, child)
2277 + check_nodes_props(c, dt, child);
2280 +static int run_check(struct check *c, struct node *dt)
2285 + assert(!c->inprogress);
2287 + if (c->status != UNCHECKED)
2290 + c->inprogress = 1;
2292 + for (i = 0; i < c->num_prereqs; i++) {
2293 + struct check *prq = c->prereq[i];
2294 + error |= run_check(prq, dt);
2295 + if (prq->status != PASSED) {
2296 + c->status = PREREQ;
2297 + check_msg(c, "Failed prerequisite '%s'",
2298 + c->prereq[i]->name);
2302 + if (c->status != UNCHECKED)
2305 + if (c->node_fn || c->prop_fn)
2306 + check_nodes_props(c, dt, dt);
2309 + c->tree_fn(c, dt);
2310 + if (c->status == UNCHECKED)
2311 + c->status = PASSED;
2313 + TRACE(c, "\tCompleted, status %d", c->status);
2316 + c->inprogress = 0;
2317 + if ((c->status != PASSED) && (c->level == ERROR))
2323 + * Utility check functions
2326 +static void check_is_string(struct check *c, struct node *root,
2327 + struct node *node)
2329 + struct property *prop;
2330 + char *propname = c->data;
2332 + prop = get_property(node, propname);
2334 + return; /* Not present, assumed ok */
2336 + if (!data_is_one_string(prop->val))
2337 + FAIL(c, "\"%s\" property in %s is not a string",
2338 + propname, node->fullpath);
2340 +#define CHECK_IS_STRING(nm, propname, lvl) \
2341 + CHECK(nm, NULL, check_is_string, NULL, (propname), (lvl))
2343 +static void check_is_cell(struct check *c, struct node *root,
2344 + struct node *node)
2346 + struct property *prop;
2347 + char *propname = c->data;
2349 + prop = get_property(node, propname);
2351 + return; /* Not present, assumed ok */
2353 + if (prop->val.len != sizeof(cell_t))
2354 + FAIL(c, "\"%s\" property in %s is not a single cell",
2355 + propname, node->fullpath);
2357 +#define CHECK_IS_CELL(nm, propname, lvl) \
2358 + CHECK(nm, NULL, check_is_cell, NULL, (propname), (lvl))
2361 + * Structural check functions
2364 +static void check_duplicate_node_names(struct check *c, struct node *dt,
2365 + struct node *node)
2367 + struct node *child, *child2;
2369 + for_each_child(node, child)
2370 + for (child2 = child->next_sibling;
2372 + child2 = child2->next_sibling)
2373 + if (streq(child->name, child2->name))
2374 + FAIL(c, "Duplicate node name %s",
2377 +NODE_CHECK(duplicate_node_names, NULL, ERROR);
2379 +static void check_duplicate_property_names(struct check *c, struct node *dt,
2380 + struct node *node)
2382 + struct property *prop, *prop2;
2384 + for_each_property(node, prop)
2385 + for (prop2 = prop->next; prop2; prop2 = prop2->next)
2386 + if (streq(prop->name, prop2->name))
2387 + FAIL(c, "Duplicate property name %s in %s",
2388 + prop->name, node->fullpath);
2390 +NODE_CHECK(duplicate_property_names, NULL, ERROR);
2392 +static void check_explicit_phandles(struct check *c, struct node *root,
2393 + struct node *node)
2395 + struct property *prop;
2396 + struct node *other;
2399 + prop = get_property(node, "linux,phandle");
2401 + return; /* No phandle, that's fine */
2403 + if (prop->val.len != sizeof(cell_t)) {
2404 + FAIL(c, "%s has bad length (%d) linux,phandle property",
2405 + node->fullpath, prop->val.len);
2409 + phandle = propval_cell(prop);
2410 + if ((phandle == 0) || (phandle == -1)) {
2411 + FAIL(c, "%s has invalid linux,phandle value 0x%x",
2412 + node->fullpath, phandle);
2416 + other = get_node_by_phandle(root, phandle);
2418 + FAIL(c, "%s has duplicated phandle 0x%x (seen before at %s)",
2419 + node->fullpath, phandle, other->fullpath);
2423 + node->phandle = phandle;
2425 +NODE_CHECK(explicit_phandles, NULL, ERROR);
2427 +static void check_name_properties(struct check *c, struct node *root,
2428 + struct node *node)
2430 + struct property *prop;
2432 + prop = get_property(node, "name");
2434 + return; /* No name property, that's fine */
2436 + if ((prop->val.len != node->basenamelen+1)
2437 + || (memcmp(prop->val.val, node->name, node->basenamelen) != 0))
2438 + FAIL(c, "\"name\" property in %s is incorrect (\"%s\" instead"
2439 + " of base node name)", node->fullpath, prop->val.val);
2441 +CHECK_IS_STRING(name_is_string, "name", ERROR);
2442 +NODE_CHECK(name_properties, NULL, ERROR, &name_is_string);
2445 + * Reference fixup functions
2448 +static void fixup_phandle_references(struct check *c, struct node *dt,
2449 + struct node *node, struct property *prop)
2451 + struct marker *m = prop->val.markers;
2452 + struct node *refnode;
2455 + for_each_marker_of_type(m, REF_PHANDLE) {
2456 + assert(m->offset + sizeof(cell_t) <= prop->val.len);
2458 + refnode = get_node_by_ref(dt, m->ref);
2460 + FAIL(c, "Reference to non-existent node or label \"%s\"\n",
2465 + phandle = get_node_phandle(dt, refnode);
2466 + *((cell_t *)(prop->val.val + m->offset)) = cpu_to_be32(phandle);
2469 +CHECK(phandle_references, NULL, NULL, fixup_phandle_references, NULL, ERROR,
2470 + &duplicate_node_names, &explicit_phandles);
2472 +static void fixup_path_references(struct check *c, struct node *dt,
2473 + struct node *node, struct property *prop)
2475 + struct marker *m = prop->val.markers;
2476 + struct node *refnode;
2479 + for_each_marker_of_type(m, REF_PATH) {
2480 + assert(m->offset <= prop->val.len);
2482 + refnode = get_node_by_ref(dt, m->ref);
2484 + FAIL(c, "Reference to non-existent node or label \"%s\"\n",
2489 + path = refnode->fullpath;
2490 + prop->val = data_insert_at_marker(prop->val, m, path,
2491 + strlen(path) + 1);
2494 +CHECK(path_references, NULL, NULL, fixup_path_references, NULL, ERROR,
2495 + &duplicate_node_names);
2500 +CHECK_IS_CELL(address_cells_is_cell, "#address-cells", WARN);
2501 +CHECK_IS_CELL(size_cells_is_cell, "#size-cells", WARN);
2502 +CHECK_IS_CELL(interrupt_cells_is_cell, "#interrupt-cells", WARN);
2504 +CHECK_IS_STRING(device_type_is_string, "device_type", WARN);
2505 +CHECK_IS_STRING(model_is_string, "model", WARN);
2506 +CHECK_IS_STRING(status_is_string, "status", WARN);
2508 +static void fixup_addr_size_cells(struct check *c, struct node *dt,
2509 + struct node *node)
2511 + struct property *prop;
2513 + node->addr_cells = -1;
2514 + node->size_cells = -1;
2516 + prop = get_property(node, "#address-cells");
2518 + node->addr_cells = propval_cell(prop);
2520 + prop = get_property(node, "#size-cells");
2522 + node->size_cells = propval_cell(prop);
2524 +CHECK(addr_size_cells, NULL, fixup_addr_size_cells, NULL, NULL, WARN,
2525 + &address_cells_is_cell, &size_cells_is_cell);
2527 +#define node_addr_cells(n) \
2528 + (((n)->addr_cells == -1) ? 2 : (n)->addr_cells)
2529 +#define node_size_cells(n) \
2530 + (((n)->size_cells == -1) ? 1 : (n)->size_cells)
2532 +static void check_reg_format(struct check *c, struct node *dt,
2533 + struct node *node)
2535 + struct property *prop;
2536 + int addr_cells, size_cells, entrylen;
2538 + prop = get_property(node, "reg");
2540 + return; /* No "reg", that's fine */
2542 + if (!node->parent) {
2543 + FAIL(c, "Root node has a \"reg\" property");
2547 + if (prop->val.len == 0)
2548 + FAIL(c, "\"reg\" property in %s is empty", node->fullpath);
2550 + addr_cells = node_addr_cells(node->parent);
2551 + size_cells = node_size_cells(node->parent);
2552 + entrylen = (addr_cells + size_cells) * sizeof(cell_t);
2554 + if ((prop->val.len % entrylen) != 0)
2555 + FAIL(c, "\"reg\" property in %s has invalid length (%d bytes) "
2556 + "(#address-cells == %d, #size-cells == %d)",
2557 + node->fullpath, prop->val.len, addr_cells, size_cells);
2559 +NODE_CHECK(reg_format, NULL, WARN, &addr_size_cells);
2561 +static void check_ranges_format(struct check *c, struct node *dt,
2562 + struct node *node)
2564 + struct property *prop;
2565 + int c_addr_cells, p_addr_cells, c_size_cells, p_size_cells, entrylen;
2567 + prop = get_property(node, "ranges");
2571 + if (!node->parent) {
2572 + FAIL(c, "Root node has a \"ranges\" property");
2576 + p_addr_cells = node_addr_cells(node->parent);
2577 + p_size_cells = node_size_cells(node->parent);
2578 + c_addr_cells = node_addr_cells(node);
2579 + c_size_cells = node_size_cells(node);
2580 + entrylen = (p_addr_cells + c_addr_cells + c_size_cells) * sizeof(cell_t);
2582 + if (prop->val.len == 0) {
2583 + if (p_addr_cells != c_addr_cells)
2584 + FAIL(c, "%s has empty \"ranges\" property but its "
2585 + "#address-cells (%d) differs from %s (%d)",
2586 + node->fullpath, c_addr_cells, node->parent->fullpath,
2588 + if (p_size_cells != c_size_cells)
2589 + FAIL(c, "%s has empty \"ranges\" property but its "
2590 + "#size-cells (%d) differs from %s (%d)",
2591 + node->fullpath, c_size_cells, node->parent->fullpath,
2593 + } else if ((prop->val.len % entrylen) != 0) {
2594 + FAIL(c, "\"ranges\" property in %s has invalid length (%d bytes) "
2595 + "(parent #address-cells == %d, child #address-cells == %d, "
2596 + "#size-cells == %d)", node->fullpath, prop->val.len,
2597 + p_addr_cells, c_addr_cells, c_size_cells);
2600 +NODE_CHECK(ranges_format, NULL, WARN, &addr_size_cells);
2605 +static void check_avoid_default_addr_size(struct check *c, struct node *dt,
2606 + struct node *node)
2608 + struct property *reg, *ranges;
2610 + if (!node->parent)
2611 + return; /* Ignore root node */
2613 + reg = get_property(node, "reg");
2614 + ranges = get_property(node, "ranges");
2616 + if (!reg && !ranges)
2619 + if ((node->parent->addr_cells == -1))
2620 + FAIL(c, "Relying on default #address-cells value for %s",
2623 + if ((node->parent->size_cells == -1))
2624 + FAIL(c, "Relying on default #size-cells value for %s",
2627 +NODE_CHECK(avoid_default_addr_size, NULL, WARN, &addr_size_cells);
2629 +static void check_obsolete_chosen_interrupt_controller(struct check *c,
2632 + struct node *chosen;
2633 + struct property *prop;
2635 + chosen = get_node_by_path(dt, "/chosen");
2639 + prop = get_property(chosen, "interrupt-controller");
2641 + FAIL(c, "/chosen has obsolete \"interrupt-controller\" "
2644 +TREE_CHECK(obsolete_chosen_interrupt_controller, NULL, WARN);
2646 +static struct check *check_table[] = {
2647 + &duplicate_node_names, &duplicate_property_names,
2648 + &name_is_string, &name_properties,
2649 + &explicit_phandles,
2650 + &phandle_references, &path_references,
2652 + &address_cells_is_cell, &size_cells_is_cell, &interrupt_cells_is_cell,
2653 + &device_type_is_string, &model_is_string, &status_is_string,
2655 + &addr_size_cells, ®_format, &ranges_format,
2657 + &avoid_default_addr_size,
2658 + &obsolete_chosen_interrupt_controller,
2661 +int check_semantics(struct node *dt, int outversion, int boot_cpuid_phys);
2663 +void process_checks(int force, struct boot_info *bi,
2664 + int checkflag, int outversion, int boot_cpuid_phys)
2666 + struct node *dt = bi->dt;
2670 + for (i = 0; i < ARRAY_SIZE(check_table); i++) {
2671 + struct check *c = check_table[i];
2673 + if (c->level != IGNORE)
2674 + error = error || run_check(c, dt);
2679 + fprintf(stderr, "ERROR: Input tree has errors, aborting "
2680 + "(use -f to force output)\n");
2682 + } else if (quiet < 3) {
2683 + fprintf(stderr, "Warning: Input tree has errors, "
2684 + "output forced\n");
2690 + fprintf(stderr, "Warning: Skipping semantic checks due to structural errors\n");
2692 + if (!check_semantics(bi->dt, outversion,
2694 + fprintf(stderr, "Warning: Input tree has semantic errors\n");
2700 + * Semantic check functions
2703 +#define ERRMSG(...) if (quiet < 2) fprintf(stderr, "ERROR: " __VA_ARGS__)
2704 +#define WARNMSG(...) if (quiet < 1) fprintf(stderr, "Warning: " __VA_ARGS__)
2706 +#define DO_ERR(...) do {ERRMSG(__VA_ARGS__); ok = 0; } while (0)
2708 +#define CHECK_HAVE(node, propname) \
2710 + if (! (prop = get_property((node), (propname)))) \
2711 + DO_ERR("Missing \"%s\" property in %s\n", (propname), \
2712 + (node)->fullpath); \
2715 +#define CHECK_HAVE_WARN(node, propname) \
2717 + if (! (prop = get_property((node), (propname)))) \
2718 + WARNMSG("%s has no \"%s\" property\n", \
2719 + (node)->fullpath, (propname)); \
2722 +#define CHECK_HAVE_STRING(node, propname) \
2724 + CHECK_HAVE((node), (propname)); \
2725 + if (prop && !data_is_one_string(prop->val)) \
2726 + DO_ERR("\"%s\" property in %s is not a string\n", \
2727 + (propname), (node)->fullpath); \
2730 +#define CHECK_HAVE_STREQ(node, propname, value) \
2732 + CHECK_HAVE_STRING((node), (propname)); \
2733 + if (prop && !streq(prop->val.val, (value))) \
2734 + DO_ERR("%s has wrong %s, %s (should be %s\n", \
2735 + (node)->fullpath, (propname), \
2736 + prop->val.val, (value)); \
2739 +#define CHECK_HAVE_ONECELL(node, propname) \
2741 + CHECK_HAVE((node), (propname)); \
2742 + if (prop && (prop->val.len != sizeof(cell_t))) \
2743 + DO_ERR("\"%s\" property in %s has wrong size %d (should be 1 cell)\n", (propname), (node)->fullpath, prop->val.len); \
2746 +#define CHECK_HAVE_WARN_ONECELL(node, propname) \
2748 + CHECK_HAVE_WARN((node), (propname)); \
2749 + if (prop && (prop->val.len != sizeof(cell_t))) \
2750 + DO_ERR("\"%s\" property in %s has wrong size %d (should be 1 cell)\n", (propname), (node)->fullpath, prop->val.len); \
2753 +#define CHECK_HAVE_WARN_PHANDLE(xnode, propname, root) \
2755 + struct node *ref; \
2756 + CHECK_HAVE_WARN_ONECELL((xnode), (propname)); \
2758 + cell_t phandle = propval_cell(prop); \
2759 + if ((phandle == 0) || (phandle == -1)) { \
2760 + DO_ERR("\"%s\" property in %s contains an invalid phandle %x\n", (propname), (xnode)->fullpath, phandle); \
2762 + ref = get_node_by_phandle((root), propval_cell(prop)); \
2764 + DO_ERR("\"%s\" property in %s refers to non-existant phandle %x\n", (propname), (xnode)->fullpath, propval_cell(prop)); \
2769 +#define CHECK_HAVE_WARN_STRING(node, propname) \
2771 + CHECK_HAVE_WARN((node), (propname)); \
2772 + if (prop && !data_is_one_string(prop->val)) \
2773 + DO_ERR("\"%s\" property in %s is not a string\n", \
2774 + (propname), (node)->fullpath); \
2777 +static int check_root(struct node *root)
2779 + struct property *prop;
2782 + CHECK_HAVE_STRING(root, "model");
2783 + CHECK_HAVE_WARN(root, "compatible");
2788 +static int check_cpus(struct node *root, int outversion, int boot_cpuid_phys)
2790 + struct node *cpus, *cpu;
2791 + struct property *prop;
2792 + struct node *bootcpu = NULL;
2795 + cpus = get_subnode(root, "cpus");
2797 + ERRMSG("Missing /cpus node\n");
2801 + if (cpus->addr_cells != 1)
2802 + DO_ERR("%s has bad #address-cells value %d (should be 1)\n",
2803 + cpus->fullpath, cpus->addr_cells);
2804 + if (cpus->size_cells != 0)
2805 + DO_ERR("%s has bad #size-cells value %d (should be 0)\n",
2806 + cpus->fullpath, cpus->size_cells);
2808 + for_each_child(cpus, cpu) {
2809 + CHECK_HAVE_STREQ(cpu, "device_type", "cpu");
2811 + CHECK_HAVE_ONECELL(cpu, "reg");
2816 + unitnum = strtol(get_unitname(cpu), &eptr, 16);
2818 + WARNMSG("%s has bad format unit name %s (should be CPU number\n",
2819 + cpu->fullpath, get_unitname(cpu));
2820 + } else if (unitnum != propval_cell(prop)) {
2821 + WARNMSG("%s unit name \"%s\" does not match \"reg\" property <%x>\n",
2822 + cpu->fullpath, get_unitname(cpu),
2823 + propval_cell(prop));
2827 +/* CHECK_HAVE_ONECELL(cpu, "d-cache-line-size"); */
2828 +/* CHECK_HAVE_ONECELL(cpu, "i-cache-line-size"); */
2829 + CHECK_HAVE_ONECELL(cpu, "d-cache-size");
2830 + CHECK_HAVE_ONECELL(cpu, "i-cache-size");
2832 + CHECK_HAVE_WARN_ONECELL(cpu, "clock-frequency");
2833 + CHECK_HAVE_WARN_ONECELL(cpu, "timebase-frequency");
2835 + prop = get_property(cpu, "linux,boot-cpu");
2837 + if (prop->val.len)
2838 + WARNMSG("\"linux,boot-cpu\" property in %s is non-empty\n",
2841 + DO_ERR("Multiple boot cpus (%s and %s)\n",
2842 + bootcpu->fullpath, cpu->fullpath);
2848 + if (outversion < 2) {
2850 + WARNMSG("No cpu has \"linux,boot-cpu\" property\n");
2853 + WARNMSG("\"linux,boot-cpu\" property is deprecated in blob version 2 or higher\n");
2854 + if (boot_cpuid_phys == 0xfeedbeef)
2855 + WARNMSG("physical boot CPU not set. Use -b option to set\n");
2861 +static int check_memory(struct node *root)
2864 + struct property *prop;
2868 + for_each_child(root, mem) {
2869 + if (! strneq(mem->name, "memory", mem->basenamelen))
2874 + CHECK_HAVE_STREQ(mem, "device_type", "memory");
2875 + CHECK_HAVE(mem, "reg");
2878 + if (nnodes == 0) {
2879 + ERRMSG("No memory nodes\n");
2886 +int check_semantics(struct node *dt, int outversion, int boot_cpuid_phys)
2890 + ok = ok && check_root(dt);
2891 + ok = ok && check_cpus(dt, outversion, boot_cpuid_phys);
2892 + ok = ok && check_memory(dt);
2899 +++ b/arch/powerpc/boot/dtc-src/data.c
2902 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
2905 + * This program is free software; you can redistribute it and/or
2906 + * modify it under the terms of the GNU General Public License as
2907 + * published by the Free Software Foundation; either version 2 of the
2908 + * License, or (at your option) any later version.
2910 + * This program is distributed in the hope that it will be useful,
2911 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2912 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2913 + * General Public License for more details.
2915 + * You should have received a copy of the GNU General Public License
2916 + * along with this program; if not, write to the Free Software
2917 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
2923 +void data_free(struct data d)
2925 + struct marker *m, *nm;
2935 + assert(!d.val || d.asize);
2941 +struct data data_grow_for(struct data d, int xlen)
2946 + /* we must start with an allocated datum */
2947 + assert(!d.val || d.asize);
2956 + while ((d.len + xlen) > newsize)
2959 + nd.asize = newsize;
2960 + nd.val = xrealloc(d.val, newsize);
2962 + assert(nd.asize >= (d.len + xlen));
2967 +struct data data_copy_mem(const char *mem, int len)
2971 + d = data_grow_for(empty_data, len);
2974 + memcpy(d.val, mem, len);
2979 +static char get_oct_char(const char *s, int *i)
2993 + val = strtol(x, &endx, 8);
2994 + if ((endx - x) == 0)
2995 + fprintf(stderr, "Empty \\nnn escape\n");
3001 +static char get_hex_char(const char *s, int *i)
3012 + val = strtol(x, &endx, 16);
3013 + if ((endx - x) == 0)
3014 + fprintf(stderr, "Empty \\x escape\n");
3020 +struct data data_copy_escape_string(const char *s, int len)
3026 + d = data_grow_for(empty_data, strlen(s)+1);
3041 + q[d.len++] = '\a';
3044 + q[d.len++] = '\b';
3047 + q[d.len++] = '\t';
3050 + q[d.len++] = '\n';
3053 + q[d.len++] = '\v';
3056 + q[d.len++] = '\f';
3059 + q[d.len++] = '\r';
3069 + i--; /* need to re-read the first digit as
3070 + * part of the octal value */
3071 + q[d.len++] = get_oct_char(s, &i);
3074 + q[d.len++] = get_hex_char(s, &i);
3081 + q[d.len++] = '\0';
3085 +struct data data_copy_file(FILE *f, size_t len)
3089 + d = data_grow_for(empty_data, len);
3092 + fread(d.val, len, 1, f);
3097 +struct data data_append_data(struct data d, const void *p, int len)
3099 + d = data_grow_for(d, len);
3100 + memcpy(d.val + d.len, p, len);
3105 +struct data data_insert_at_marker(struct data d, struct marker *m,
3106 + const void *p, int len)
3108 + d = data_grow_for(d, len);
3109 + memmove(d.val + m->offset + len, d.val + m->offset, d.len - m->offset);
3110 + memcpy(d.val + m->offset, p, len);
3113 + /* Adjust all markers after the one we're inserting at */
3115 + for_each_marker(m)
3120 +struct data data_append_markers(struct data d, struct marker *m)
3122 + struct marker **mp = &d.markers;
3124 + /* Find the end of the markerlist */
3126 + mp = &((*mp)->next);
3131 +struct data data_merge(struct data d1, struct data d2)
3134 + struct marker *m2 = d2.markers;
3136 + d = data_append_markers(data_append_data(d1, d2.val, d2.len), m2);
3138 + /* Adjust for the length of d1 */
3139 + for_each_marker(m2)
3140 + m2->offset += d1.len;
3142 + d2.markers = NULL; /* So data_free() doesn't clobber them */
3148 +struct data data_append_cell(struct data d, cell_t word)
3150 + cell_t beword = cpu_to_be32(word);
3152 + return data_append_data(d, &beword, sizeof(beword));
3155 +struct data data_append_re(struct data d, const struct fdt_reserve_entry *re)
3157 + struct fdt_reserve_entry bere;
3159 + bere.address = cpu_to_be64(re->address);
3160 + bere.size = cpu_to_be64(re->size);
3162 + return data_append_data(d, &bere, sizeof(bere));
3165 +struct data data_append_addr(struct data d, u64 addr)
3167 + u64 beaddr = cpu_to_be64(addr);
3169 + return data_append_data(d, &beaddr, sizeof(beaddr));
3172 +struct data data_append_byte(struct data d, uint8_t byte)
3174 + return data_append_data(d, &byte, 1);
3177 +struct data data_append_zeroes(struct data d, int len)
3179 + d = data_grow_for(d, len);
3181 + memset(d.val + d.len, 0, len);
3186 +struct data data_append_align(struct data d, int align)
3188 + int newlen = ALIGN(d.len, align);
3189 + return data_append_zeroes(d, newlen - d.len);
3192 +struct data data_add_marker(struct data d, enum markertype type, char *ref)
3196 + m = xmalloc(sizeof(*m));
3197 + m->offset = d.len;
3202 + return data_append_markers(d, m);
3205 +int data_is_one_string(struct data d)
3213 + for (i = 0; i < len-1; i++)
3214 + if (d.val[i] == '\0')
3217 + if (d.val[len-1] != '\0')
3223 +++ b/arch/powerpc/boot/dtc-src/dtc-lexer.l
3226 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3229 + * This program is free software; you can redistribute it and/or
3230 + * modify it under the terms of the GNU General Public License as
3231 + * published by the Free Software Foundation; either version 2 of the
3232 + * License, or (at your option) any later version.
3234 + * This program is distributed in the hope that it will be useful,
3235 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3236 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3237 + * General Public License for more details.
3239 + * You should have received a copy of the GNU General Public License
3240 + * along with this program; if not, write to the Free Software
3241 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
3245 +%option noyywrap nounput yylineno
3252 +PROPNODECHAR [a-zA-Z0-9,._+*#?@-]
3253 +PATHCHAR ({PROPNODECHAR}|[/])
3254 +LABEL [a-zA-Z_][a-zA-Z0-9_]*
3258 +#include "srcpos.h"
3259 +#include "dtc-parser.tab.h"
3262 +/*#define LEXDEBUG 1*/
3265 +#define DPRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
3267 +#define DPRINT(fmt, ...) do { } while (0)
3270 +static int dts_version; /* = 0 */
3272 +#define BEGIN_DEFAULT() if (dts_version == 0) { \
3273 + DPRINT("<INITIAL>\n"); \
3276 + DPRINT("<V1>\n"); \
3282 +<*>"/include/" BEGIN(INCLUDE);
3284 +<INCLUDE>\"[^"\n]*\" {
3285 + yytext[strlen(yytext) - 1] = 0;
3286 + if (!push_input_file(yytext + 1)) {
3287 + /* Some unrecoverable error.*/
3295 + if (!pop_input_file()) {
3300 +<*>\"([^\\"]|\\.)*\" {
3301 + yylloc.filenum = srcpos_filenum;
3302 + yylloc.first_line = yylineno;
3303 + DPRINT("String: %s\n", yytext);
3304 + yylval.data = data_copy_escape_string(yytext+1,
3306 + yylloc.first_line = yylineno;
3311 + yylloc.filenum = srcpos_filenum;
3312 + yylloc.first_line = yylineno;
3313 + DPRINT("Keyword: /dts-v1/\n");
3319 +<*>"/memreserve/" {
3320 + yylloc.filenum = srcpos_filenum;
3321 + yylloc.first_line = yylineno;
3322 + DPRINT("Keyword: /memreserve/\n");
3324 + return DT_MEMRESERVE;
3328 + yylloc.filenum = srcpos_filenum;
3329 + yylloc.first_line = yylineno;
3330 + DPRINT("Label: %s\n", yytext);
3331 + yylval.labelref = strdup(yytext);
3332 + yylval.labelref[yyleng-1] = '\0';
3337 + yylloc.filenum = srcpos_filenum;
3338 + yylloc.first_line = yylineno;
3339 + if (*yytext == 'b')
3341 + else if (*yytext == 'o')
3343 + else if (*yytext == 'd')
3344 + yylval.cbase = 10;
3346 + yylval.cbase = 16;
3347 + DPRINT("Base: %d\n", yylval.cbase);
3351 +<INITIAL>[0-9a-fA-F]+ {
3352 + yylloc.filenum = srcpos_filenum;
3353 + yylloc.first_line = yylineno;
3354 + yylval.literal = strdup(yytext);
3355 + DPRINT("Literal: '%s'\n", yylval.literal);
3356 + return DT_LEGACYLITERAL;
3359 +<V1>[0-9]+|0[xX][0-9a-fA-F]+ {
3360 + yylloc.filenum = srcpos_filenum;
3361 + yylloc.first_line = yylineno;
3362 + yylval.literal = strdup(yytext);
3363 + DPRINT("Literal: '%s'\n", yylval.literal);
3364 + return DT_LITERAL;
3367 +\&{LABEL} { /* label reference */
3368 + yylloc.filenum = srcpos_filenum;
3369 + yylloc.first_line = yylineno;
3370 + DPRINT("Ref: %s\n", yytext+1);
3371 + yylval.labelref = strdup(yytext+1);
3375 +"&{/"{PATHCHAR}+\} { /* new-style path reference */
3376 + yylloc.filenum = srcpos_filenum;
3377 + yylloc.first_line = yylineno;
3378 + yytext[yyleng-1] = '\0';
3379 + DPRINT("Ref: %s\n", yytext+2);
3380 + yylval.labelref = strdup(yytext+2);
3384 +<INITIAL>"&/"{PATHCHAR}+ { /* old-style path reference */
3385 + yylloc.filenum = srcpos_filenum;
3386 + yylloc.first_line = yylineno;
3387 + DPRINT("Ref: %s\n", yytext+1);
3388 + yylval.labelref = strdup(yytext+1);
3392 +<BYTESTRING>[0-9a-fA-F]{2} {
3393 + yylloc.filenum = srcpos_filenum;
3394 + yylloc.first_line = yylineno;
3395 + yylval.byte = strtol(yytext, NULL, 16);
3396 + DPRINT("Byte: %02x\n", (int)yylval.byte);
3401 + yylloc.filenum = srcpos_filenum;
3402 + yylloc.first_line = yylineno;
3403 + DPRINT("/BYTESTRING\n");
3408 +<PROPNODENAME>{PROPNODECHAR}+ {
3409 + yylloc.filenum = srcpos_filenum;
3410 + yylloc.first_line = yylineno;
3411 + DPRINT("PropNodeName: %s\n", yytext);
3412 + yylval.propnodename = strdup(yytext);
3414 + return DT_PROPNODENAME;
3418 +<*>[[:space:]]+ /* eat whitespace */
3420 +<*>"/*"([^*]|\*+[^*/])*\*+"/" {
3421 + yylloc.filenum = srcpos_filenum;
3422 + yylloc.first_line = yylineno;
3423 + DPRINT("Comment: %s\n", yytext);
3424 + /* eat comments */
3427 +<*>"//".*\n /* eat line comments */
3430 + yylloc.filenum = srcpos_filenum;
3431 + yylloc.first_line = yylineno;
3432 + DPRINT("Char: %c (\\x%02x)\n", yytext[0],
3433 + (unsigned)yytext[0]);
3434 + if (yytext[0] == '[') {
3435 + DPRINT("<BYTESTRING>\n");
3436 + BEGIN(BYTESTRING);
3438 + if ((yytext[0] == '{')
3439 + || (yytext[0] == ';')) {
3440 + DPRINT("<PROPNODENAME>\n");
3441 + BEGIN(PROPNODENAME);
3450 + * Stack of nested include file contexts.
3456 + YY_BUFFER_STATE yy_prev_buf;
3457 + int yy_prev_lineno;
3458 + struct incl_file *prev;
3461 +struct incl_file *incl_file_stack;
3465 + * Detect infinite include recursion.
3467 +#define MAX_INCLUDE_DEPTH (100)
3469 +static int incl_depth = 0;
3472 +int push_input_file(const char *filename)
3475 + struct incl_file *incl_file;
3478 + yyerror("No include file name given.");
3482 + if (incl_depth++ >= MAX_INCLUDE_DEPTH) {
3483 + yyerror("Includes nested too deeply");
3487 + f = dtc_open_file(filename);
3489 + incl_file = malloc(sizeof(struct incl_file));
3491 + yyerror("Can not allocate include file space.");
3496 + * Save current context.
3498 + incl_file->yy_prev_buf = YY_CURRENT_BUFFER;
3499 + incl_file->yy_prev_lineno = yylineno;
3500 + incl_file->filenum = srcpos_filenum;
3501 + incl_file->file = yyin;
3502 + incl_file->prev = incl_file_stack;
3504 + incl_file_stack = incl_file;
3507 + * Establish new context.
3509 + srcpos_filenum = lookup_file_name(filename, 0);
3512 + yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
3518 +int pop_input_file(void)
3520 + struct incl_file *incl_file;
3522 + if (incl_file_stack == 0)
3531 + incl_file = incl_file_stack;
3532 + incl_file_stack = incl_file->prev;
3535 + * Recover old context.
3537 + yy_delete_buffer(YY_CURRENT_BUFFER);
3538 + yy_switch_to_buffer(incl_file->yy_prev_buf);
3539 + yylineno = incl_file->yy_prev_lineno;
3540 + srcpos_filenum = incl_file->filenum;
3541 + yyin = incl_file->file;
3548 + if (YY_CURRENT_BUFFER == 0)
3554 +++ b/arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped
3556 +#line 2 "dtc-lexer.lex.c"
3558 +#line 4 "dtc-lexer.lex.c"
3560 +#define YY_INT_ALIGNED short int
3562 +/* A lexical scanner generated by flex */
3564 +#define FLEX_SCANNER
3565 +#define YY_FLEX_MAJOR_VERSION 2
3566 +#define YY_FLEX_MINOR_VERSION 5
3567 +#define YY_FLEX_SUBMINOR_VERSION 33
3568 +#if YY_FLEX_SUBMINOR_VERSION > 0
3572 +/* First, we deal with platform-specific or compiler-specific issues. */
3574 +/* begin standard C headers. */
3576 +#include <string.h>
3578 +#include <stdlib.h>
3580 +/* end standard C headers. */
3582 +/* flex integer type definitions */
3587 +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
3589 +#if __STDC_VERSION__ >= 199901L
3591 +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
3592 + * if you want the limit (max/min) macros for int types.
3594 +#ifndef __STDC_LIMIT_MACROS
3595 +#define __STDC_LIMIT_MACROS 1
3598 +#include <inttypes.h>
3599 +typedef int8_t flex_int8_t;
3600 +typedef uint8_t flex_uint8_t;
3601 +typedef int16_t flex_int16_t;
3602 +typedef uint16_t flex_uint16_t;
3603 +typedef int32_t flex_int32_t;
3604 +typedef uint32_t flex_uint32_t;
3606 +typedef signed char flex_int8_t;
3607 +typedef short int flex_int16_t;
3608 +typedef int flex_int32_t;
3609 +typedef unsigned char flex_uint8_t;
3610 +typedef unsigned short int flex_uint16_t;
3611 +typedef unsigned int flex_uint32_t;
3614 +/* Limits of integral types. */
3616 +#define INT8_MIN (-128)
3619 +#define INT16_MIN (-32767-1)
3622 +#define INT32_MIN (-2147483647-1)
3625 +#define INT8_MAX (127)
3628 +#define INT16_MAX (32767)
3631 +#define INT32_MAX (2147483647)
3634 +#define UINT8_MAX (255U)
3637 +#define UINT16_MAX (65535U)
3640 +#define UINT32_MAX (4294967295U)
3643 +#endif /* ! FLEXINT_H */
3647 +/* The "const" storage-class-modifier is valid. */
3648 +#define YY_USE_CONST
3650 +#else /* ! __cplusplus */
3654 +#define YY_USE_CONST
3656 +#endif /* __STDC__ */
3657 +#endif /* ! __cplusplus */
3659 +#ifdef YY_USE_CONST
3660 +#define yyconst const
3665 +/* Returned upon end-of-file. */
3668 +/* Promotes a possibly negative, possibly signed char to an unsigned
3669 + * integer for use as an array index. If the signed char is negative,
3670 + * we want to instead treat it as an 8-bit unsigned char, hence the
3673 +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
3675 +/* Enter a start condition. This macro really ought to take a parameter,
3676 + * but we do it the disgusting crufty way forced on us by the ()-less
3677 + * definition of BEGIN.
3679 +#define BEGIN (yy_start) = 1 + 2 *
3681 +/* Translate the current start state into a value that can be later handed
3682 + * to BEGIN to return to the state. The YYSTATE alias is for lex
3685 +#define YY_START (((yy_start) - 1) / 2)
3686 +#define YYSTATE YY_START
3688 +/* Action number for EOF rule of a given start state. */
3689 +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
3691 +/* Special action meaning "start processing a new file". */
3692 +#define YY_NEW_FILE yyrestart(yyin )
3694 +#define YY_END_OF_BUFFER_CHAR 0
3696 +/* Size of default input buffer. */
3697 +#ifndef YY_BUF_SIZE
3698 +#define YY_BUF_SIZE 16384
3701 +/* The state buf must be large enough to hold one state per character in the main buffer.
3703 +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
3705 +#ifndef YY_TYPEDEF_YY_BUFFER_STATE
3706 +#define YY_TYPEDEF_YY_BUFFER_STATE
3707 +typedef struct yy_buffer_state *YY_BUFFER_STATE;
3712 +extern FILE *yyin, *yyout;
3714 +#define EOB_ACT_CONTINUE_SCAN 0
3715 +#define EOB_ACT_END_OF_FILE 1
3716 +#define EOB_ACT_LAST_MATCH 2
3718 + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
3719 + * access to the local variable yy_act. Since yyless() is a macro, it would break
3720 + * existing scanners that call yyless() from OUTSIDE yylex.
3721 + * One obvious solution it to make yy_act a global. I tried that, and saw
3722 + * a 5% performance hit in a non-yylineno scanner, because yy_act is
3723 + * normally declared as a register variable-- so it is not worth it.
3725 + #define YY_LESS_LINENO(n) \
3728 + for ( yyl = n; yyl < yyleng; ++yyl )\
3729 + if ( yytext[yyl] == '\n' )\
3733 +/* Return all but the first "n" matched characters back to the input stream. */
3734 +#define yyless(n) \
3737 + /* Undo effects of setting up yytext. */ \
3738 + int yyless_macro_arg = (n); \
3739 + YY_LESS_LINENO(yyless_macro_arg);\
3740 + *yy_cp = (yy_hold_char); \
3741 + YY_RESTORE_YY_MORE_OFFSET \
3742 + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
3743 + YY_DO_BEFORE_ACTION; /* set up yytext again */ \
3747 +#define unput(c) yyunput( c, (yytext_ptr) )
3749 +/* The following is because we cannot portably get our hands on size_t
3750 + * (without autoconf's help, which isn't available because we want
3751 + * flex-generated scanners to compile on their own).
3754 +#ifndef YY_TYPEDEF_YY_SIZE_T
3755 +#define YY_TYPEDEF_YY_SIZE_T
3756 +typedef unsigned int yy_size_t;
3759 +#ifndef YY_STRUCT_YY_BUFFER_STATE
3760 +#define YY_STRUCT_YY_BUFFER_STATE
3761 +struct yy_buffer_state
3763 + FILE *yy_input_file;
3765 + char *yy_ch_buf; /* input buffer */
3766 + char *yy_buf_pos; /* current position in input buffer */
3768 + /* Size of input buffer in bytes, not including room for EOB
3771 + yy_size_t yy_buf_size;
3773 + /* Number of characters read into yy_ch_buf, not including EOB
3778 + /* Whether we "own" the buffer - i.e., we know we created it,
3779 + * and can realloc() it to grow it, and should free() it to
3782 + int yy_is_our_buffer;
3784 + /* Whether this is an "interactive" input source; if so, and
3785 + * if we're using stdio for input, then we want to use getc()
3786 + * instead of fread(), to make sure we stop fetching input after
3789 + int yy_is_interactive;
3791 + /* Whether we're considered to be at the beginning of a line.
3792 + * If so, '^' rules will be active on the next match, otherwise
3797 + int yy_bs_lineno; /**< The line count. */
3798 + int yy_bs_column; /**< The column count. */
3800 + /* Whether to try to fill the input buffer when we reach the
3803 + int yy_fill_buffer;
3805 + int yy_buffer_status;
3807 +#define YY_BUFFER_NEW 0
3808 +#define YY_BUFFER_NORMAL 1
3809 + /* When an EOF's been seen but there's still some text to process
3810 + * then we mark the buffer as YY_EOF_PENDING, to indicate that we
3811 + * shouldn't try reading from the input source any more. We might
3812 + * still have a bunch of tokens to match, though, because of
3813 + * possible backing-up.
3815 + * When we actually see the EOF, we change the status to "new"
3816 + * (via yyrestart()), so that the user can continue scanning by
3817 + * just pointing yyin at a new input file.
3819 +#define YY_BUFFER_EOF_PENDING 2
3822 +#endif /* !YY_STRUCT_YY_BUFFER_STATE */
3824 +/* Stack of input buffers. */
3825 +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
3826 +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
3827 +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
3829 +/* We provide macros for accessing buffer states in case in the
3830 + * future we want to put the buffer states in a more general
3831 + * "scanner state".
3833 + * Returns the top of the stack, or NULL.
3835 +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
3836 + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
3839 +/* Same as previous macro, but useful when we know that the buffer stack is not
3840 + * NULL or when we need an lvalue. For internal use only.
3842 +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
3844 +/* yy_hold_char holds the character lost when yytext is formed. */
3845 +static char yy_hold_char;
3846 +static int yy_n_chars; /* number of characters read into yy_ch_buf */
3849 +/* Points to current character in buffer. */
3850 +static char *yy_c_buf_p = (char *) 0;
3851 +static int yy_init = 0; /* whether we need to initialize */
3852 +static int yy_start = 0; /* start state number */
3854 +/* Flag which is used to allow yywrap()'s to do buffer switches
3855 + * instead of setting up a fresh yyin. A bit of a hack ...
3857 +static int yy_did_buffer_switch_on_eof;
3859 +void yyrestart (FILE *input_file );
3860 +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
3861 +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
3862 +void yy_delete_buffer (YY_BUFFER_STATE b );
3863 +void yy_flush_buffer (YY_BUFFER_STATE b );
3864 +void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
3865 +void yypop_buffer_state (void );
3867 +static void yyensure_buffer_stack (void );
3868 +static void yy_load_buffer_state (void );
3869 +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
3871 +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
3873 +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
3874 +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
3875 +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
3877 +void *yyalloc (yy_size_t );
3878 +void *yyrealloc (void *,yy_size_t );
3879 +void yyfree (void * );
3881 +#define yy_new_buffer yy_create_buffer
3883 +#define yy_set_interactive(is_interactive) \
3885 + if ( ! YY_CURRENT_BUFFER ){ \
3886 + yyensure_buffer_stack (); \
3887 + YY_CURRENT_BUFFER_LVALUE = \
3888 + yy_create_buffer(yyin,YY_BUF_SIZE ); \
3890 + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
3893 +#define yy_set_bol(at_bol) \
3895 + if ( ! YY_CURRENT_BUFFER ){\
3896 + yyensure_buffer_stack (); \
3897 + YY_CURRENT_BUFFER_LVALUE = \
3898 + yy_create_buffer(yyin,YY_BUF_SIZE ); \
3900 + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
3903 +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
3905 +/* Begin user sect3 */
3908 +#define YY_SKIP_YYWRAP
3910 +typedef unsigned char YY_CHAR;
3912 +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
3914 +typedef int yy_state_type;
3916 +extern int yylineno;
3920 +extern char *yytext;
3921 +#define yytext_ptr yytext
3923 +static yy_state_type yy_get_previous_state (void );
3924 +static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
3925 +static int yy_get_next_buffer (void );
3926 +static void yy_fatal_error (yyconst char msg[] );
3928 +/* Done after the current pattern has been matched and before the
3929 + * corresponding action - sets up yytext.
3931 +#define YY_DO_BEFORE_ACTION \
3932 + (yytext_ptr) = yy_bp; \
3933 + yyleng = (size_t) (yy_cp - yy_bp); \
3934 + (yy_hold_char) = *yy_cp; \
3936 + (yy_c_buf_p) = yy_cp;
3938 +#define YY_NUM_RULES 20
3939 +#define YY_END_OF_BUFFER 21
3940 +/* This struct is not used in this scanner,
3941 + but its presence is necessary. */
3942 +struct yy_trans_info
3944 + flex_int32_t yy_verify;
3945 + flex_int32_t yy_nxt;
3947 +static yyconst flex_int16_t yy_accept[94] =
3949 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3950 + 21, 19, 16, 16, 19, 19, 19, 8, 8, 19,
3951 + 8, 19, 19, 19, 19, 14, 15, 15, 19, 9,
3952 + 9, 16, 0, 3, 0, 0, 10, 0, 0, 0,
3953 + 0, 0, 0, 8, 8, 6, 0, 7, 0, 2,
3954 + 0, 13, 13, 15, 15, 9, 0, 12, 10, 0,
3955 + 0, 0, 0, 18, 0, 0, 0, 2, 9, 0,
3956 + 17, 0, 0, 0, 11, 0, 0, 0, 0, 0,
3957 + 0, 0, 0, 0, 4, 0, 0, 1, 0, 0,
3962 +static yyconst flex_int32_t yy_ec[256] =
3964 + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
3965 + 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
3966 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3967 + 1, 2, 1, 4, 5, 1, 1, 6, 1, 1,
3968 + 1, 7, 8, 8, 9, 8, 10, 11, 12, 13,
3969 + 13, 13, 13, 13, 13, 13, 13, 14, 1, 1,
3970 + 1, 1, 8, 8, 15, 15, 15, 15, 15, 15,
3971 + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
3972 + 16, 16, 16, 16, 16, 16, 16, 17, 16, 16,
3973 + 1, 18, 19, 1, 16, 1, 15, 20, 21, 22,
3975 + 23, 15, 16, 24, 25, 16, 16, 26, 27, 28,
3976 + 24, 16, 16, 29, 30, 31, 32, 33, 16, 17,
3977 + 16, 16, 34, 1, 35, 1, 1, 1, 1, 1,
3978 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3979 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3980 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3981 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3982 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3983 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3984 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3986 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3987 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3988 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3989 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3990 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3994 +static yyconst flex_int32_t yy_meta[36] =
3996 + 1, 1, 1, 1, 2, 1, 2, 2, 2, 3,
3997 + 4, 4, 4, 5, 6, 7, 7, 1, 1, 6,
3998 + 6, 6, 6, 7, 7, 7, 7, 7, 7, 7,
4002 +static yyconst flex_int16_t yy_base[107] =
4004 + 0, 0, 32, 0, 53, 0, 76, 0, 108, 111,
4005 + 280, 288, 37, 39, 33, 36, 106, 0, 123, 146,
4006 + 255, 251, 45, 0, 159, 288, 0, 53, 108, 172,
4007 + 114, 127, 158, 288, 245, 0, 0, 234, 235, 236,
4008 + 197, 195, 199, 0, 0, 288, 0, 288, 160, 288,
4009 + 183, 288, 0, 0, 183, 182, 0, 0, 0, 0,
4010 + 204, 189, 207, 288, 179, 187, 180, 194, 0, 171,
4011 + 288, 196, 178, 174, 288, 169, 169, 177, 165, 153,
4012 + 143, 155, 137, 118, 288, 122, 42, 288, 36, 36,
4013 + 40, 288, 288, 212, 218, 223, 229, 234, 239, 245,
4015 + 251, 255, 262, 270, 275, 280
4018 +static yyconst flex_int16_t yy_def[107] =
4020 + 93, 1, 1, 3, 3, 5, 93, 7, 3, 3,
4021 + 93, 93, 93, 93, 94, 95, 93, 96, 93, 19,
4022 + 19, 20, 97, 98, 20, 93, 99, 100, 95, 93,
4023 + 93, 93, 94, 93, 94, 101, 102, 93, 103, 104,
4024 + 93, 93, 93, 96, 19, 93, 20, 93, 97, 93,
4025 + 97, 93, 20, 99, 100, 93, 105, 101, 102, 106,
4026 + 103, 103, 104, 93, 93, 93, 93, 94, 105, 106,
4027 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4028 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4029 + 93, 93, 0, 93, 93, 93, 93, 93, 93, 93,
4031 + 93, 93, 93, 93, 93, 93
4034 +static yyconst flex_int16_t yy_nxt[324] =
4036 + 12, 13, 14, 15, 12, 16, 12, 12, 12, 17,
4037 + 18, 18, 18, 12, 19, 20, 20, 12, 12, 21,
4038 + 19, 21, 19, 22, 20, 20, 20, 20, 20, 20,
4039 + 20, 20, 20, 12, 12, 23, 34, 12, 32, 32,
4040 + 32, 32, 12, 12, 12, 36, 20, 33, 50, 92,
4041 + 35, 20, 20, 20, 20, 20, 15, 54, 91, 54,
4042 + 54, 54, 51, 24, 24, 24, 46, 25, 90, 38,
4043 + 89, 26, 25, 25, 25, 25, 12, 13, 14, 15,
4044 + 27, 12, 27, 27, 27, 17, 27, 27, 27, 12,
4045 + 28, 28, 28, 12, 12, 28, 28, 28, 28, 28,
4047 + 28, 28, 28, 28, 28, 28, 28, 28, 28, 12,
4048 + 12, 15, 39, 29, 15, 40, 29, 93, 30, 31,
4049 + 31, 30, 31, 31, 56, 56, 56, 41, 32, 32,
4050 + 42, 88, 43, 45, 45, 45, 46, 45, 47, 47,
4051 + 87, 38, 45, 45, 45, 45, 47, 47, 47, 47,
4052 + 47, 47, 47, 47, 47, 47, 47, 47, 47, 86,
4053 + 47, 34, 33, 50, 85, 47, 47, 47, 47, 53,
4054 + 53, 53, 84, 53, 83, 35, 82, 51, 53, 53,
4055 + 53, 53, 56, 56, 56, 93, 68, 54, 57, 54,
4056 + 54, 54, 56, 56, 56, 62, 46, 34, 71, 81,
4058 + 80, 79, 78, 77, 76, 75, 74, 73, 72, 64,
4059 + 62, 35, 33, 33, 33, 33, 33, 33, 33, 33,
4060 + 37, 67, 66, 37, 37, 37, 44, 65, 44, 49,
4061 + 49, 49, 49, 49, 49, 49, 49, 52, 64, 52,
4062 + 54, 62, 54, 60, 54, 54, 55, 93, 55, 55,
4063 + 55, 55, 58, 58, 58, 48, 58, 58, 59, 48,
4064 + 59, 59, 61, 61, 61, 61, 61, 61, 61, 61,
4065 + 63, 63, 63, 63, 63, 63, 63, 63, 69, 93,
4066 + 69, 70, 70, 70, 93, 70, 70, 11, 93, 93,
4067 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4069 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4070 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4074 +static yyconst flex_int16_t yy_chk[324] =
4076 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4077 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4078 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4079 + 1, 1, 1, 1, 1, 3, 15, 3, 13, 13,
4080 + 14, 14, 3, 3, 3, 16, 3, 23, 23, 91,
4081 + 15, 3, 3, 3, 3, 3, 5, 28, 90, 28,
4082 + 28, 28, 23, 5, 5, 5, 28, 5, 89, 16,
4083 + 87, 5, 5, 5, 5, 5, 7, 7, 7, 7,
4084 + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
4085 + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
4087 + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
4088 + 7, 9, 17, 9, 10, 17, 10, 29, 9, 9,
4089 + 9, 10, 10, 10, 31, 31, 31, 17, 32, 32,
4090 + 17, 86, 17, 19, 19, 19, 19, 19, 19, 19,
4091 + 84, 29, 19, 19, 19, 19, 19, 19, 19, 19,
4092 + 19, 19, 19, 19, 19, 19, 20, 20, 20, 83,
4093 + 20, 33, 49, 49, 82, 20, 20, 20, 20, 25,
4094 + 25, 25, 81, 25, 80, 33, 79, 49, 25, 25,
4095 + 25, 25, 30, 30, 30, 51, 51, 55, 30, 55,
4096 + 55, 55, 56, 56, 56, 62, 55, 68, 62, 78,
4098 + 77, 76, 74, 73, 72, 70, 67, 66, 65, 63,
4099 + 61, 68, 94, 94, 94, 94, 94, 94, 94, 94,
4100 + 95, 43, 42, 95, 95, 95, 96, 41, 96, 97,
4101 + 97, 97, 97, 97, 97, 97, 97, 98, 40, 98,
4102 + 99, 39, 99, 38, 99, 99, 100, 35, 100, 100,
4103 + 100, 100, 101, 101, 101, 22, 101, 101, 102, 21,
4104 + 102, 102, 103, 103, 103, 103, 103, 103, 103, 103,
4105 + 104, 104, 104, 104, 104, 104, 104, 104, 105, 11,
4106 + 105, 106, 106, 106, 0, 106, 106, 93, 93, 93,
4107 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4109 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4110 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4114 +/* Table of booleans, true if rule could match eol. */
4115 +static yyconst flex_int32_t yy_rule_can_match_eol[21] =
4117 +0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,
4120 +static yy_state_type yy_last_accepting_state;
4121 +static char *yy_last_accepting_cpos;
4123 +extern int yy_flex_debug;
4124 +int yy_flex_debug = 0;
4126 +/* The intent behind this definition is that it'll catch
4127 + * any uses of REJECT which flex missed.
4129 +#define REJECT reject_used_but_not_detected
4130 +#define yymore() yymore_used_but_not_detected
4131 +#define YY_MORE_ADJ 0
4132 +#define YY_RESTORE_YY_MORE_OFFSET
4134 +#line 1 "dtc-lexer.l"
4136 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
4139 + * This program is free software; you can redistribute it and/or
4140 + * modify it under the terms of the GNU General Public License as
4141 + * published by the Free Software Foundation; either version 2 of the
4142 + * License, or (at your option) any later version.
4144 + * This program is distributed in the hope that it will be useful,
4145 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4146 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4147 + * General Public License for more details.
4149 + * You should have received a copy of the GNU General Public License
4150 + * along with this program; if not, write to the Free Software
4151 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
4158 +#line 33 "dtc-lexer.l"
4160 +#include "srcpos.h"
4161 +#include "dtc-parser.tab.h"
4164 +/*#define LEXDEBUG 1*/
4167 +#define DPRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
4169 +#define DPRINT(fmt, ...) do { } while (0)
4172 +static int dts_version; /* = 0 */
4174 +#define BEGIN_DEFAULT() if (dts_version == 0) { \
4175 + DPRINT("<INITIAL>\n"); \
4178 + DPRINT("<V1>\n"); \
4181 +#line 627 "dtc-lexer.lex.c"
4185 +#define BYTESTRING 2
4186 +#define PROPNODENAME 3
4189 +#ifndef YY_NO_UNISTD_H
4190 +/* Special case for "unistd.h", since it is non-ANSI. We include it way
4191 + * down here because we want the user's section 1 to have been scanned first.
4192 + * The user has a chance to override it with an option.
4194 +#include <unistd.h>
4197 +#ifndef YY_EXTRA_TYPE
4198 +#define YY_EXTRA_TYPE void *
4201 +static int yy_init_globals (void );
4203 +/* Macros after this point can all be overridden by user definitions in
4207 +#ifndef YY_SKIP_YYWRAP
4209 +extern "C" int yywrap (void );
4211 +extern int yywrap (void );
4216 +static void yy_flex_strncpy (char *,yyconst char *,int );
4219 +#ifdef YY_NEED_STRLEN
4220 +static int yy_flex_strlen (yyconst char * );
4223 +#ifndef YY_NO_INPUT
4226 +static int yyinput (void );
4228 +static int input (void );
4233 +/* Amount of stuff to slurp up with each read. */
4234 +#ifndef YY_READ_BUF_SIZE
4235 +#define YY_READ_BUF_SIZE 8192
4238 +/* Copy whatever the last rule matched to the standard output. */
4240 +/* This used to be an fputs(), but since the string might contain NUL's,
4241 + * we now use fwrite().
4243 +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
4246 +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
4247 + * is returned in "result".
4250 +#define YY_INPUT(buf,result,max_size) \
4251 + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
4255 + for ( n = 0; n < max_size && \
4256 + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
4257 + buf[n] = (char) c; \
4258 + if ( c == '\n' ) \
4259 + buf[n++] = (char) c; \
4260 + if ( c == EOF && ferror( yyin ) ) \
4261 + YY_FATAL_ERROR( "input in flex scanner failed" ); \
4267 + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
4269 + if( errno != EINTR) \
4271 + YY_FATAL_ERROR( "input in flex scanner failed" ); \
4282 +/* No semi-colon after return; correct usage is to write "yyterminate();" -
4283 + * we don't want an extra ';' after the "return" because that will cause
4284 + * some compilers to complain about unreachable statements.
4286 +#ifndef yyterminate
4287 +#define yyterminate() return YY_NULL
4290 +/* Number of entries by which start-condition stack grows. */
4291 +#ifndef YY_START_STACK_INCR
4292 +#define YY_START_STACK_INCR 25
4295 +/* Report a fatal error. */
4296 +#ifndef YY_FATAL_ERROR
4297 +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
4300 +/* end tables serialization structures and prototypes */
4302 +/* Default declaration of generated scanner - a define so the user can
4303 + * easily add parameters.
4306 +#define YY_DECL_IS_OURS 1
4308 +extern int yylex (void);
4310 +#define YY_DECL int yylex (void)
4311 +#endif /* !YY_DECL */
4313 +/* Code executed at the beginning of each rule, after yytext and yyleng
4314 + * have been set up.
4316 +#ifndef YY_USER_ACTION
4317 +#define YY_USER_ACTION
4320 +/* Code executed at the end of each rule. */
4322 +#define YY_BREAK break;
4325 +#define YY_RULE_SETUP \
4328 +/** The main scanner function which does all the work.
4332 + register yy_state_type yy_current_state;
4333 + register char *yy_cp, *yy_bp;
4334 + register int yy_act;
4336 +#line 57 "dtc-lexer.l"
4338 +#line 784 "dtc-lexer.lex.c"
4344 +#ifdef YY_USER_INIT
4348 + if ( ! (yy_start) )
4349 + (yy_start) = 1; /* first start state */
4357 + if ( ! YY_CURRENT_BUFFER ) {
4358 + yyensure_buffer_stack ();
4359 + YY_CURRENT_BUFFER_LVALUE =
4360 + yy_create_buffer(yyin,YY_BUF_SIZE );
4363 + yy_load_buffer_state( );
4366 + while ( 1 ) /* loops until end-of-file is reached */
4368 + yy_cp = (yy_c_buf_p);
4370 + /* Support of yytext. */
4371 + *yy_cp = (yy_hold_char);
4373 + /* yy_bp points to the position in yy_ch_buf of the start of
4374 + * the current run.
4378 + yy_current_state = (yy_start);
4382 + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
4383 + if ( yy_accept[yy_current_state] )
4385 + (yy_last_accepting_state) = yy_current_state;
4386 + (yy_last_accepting_cpos) = yy_cp;
4388 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4390 + yy_current_state = (int) yy_def[yy_current_state];
4391 + if ( yy_current_state >= 94 )
4392 + yy_c = yy_meta[(unsigned int) yy_c];
4394 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4397 + while ( yy_base[yy_current_state] != 288 );
4400 + yy_act = yy_accept[yy_current_state];
4401 + if ( yy_act == 0 )
4402 + { /* have to back up */
4403 + yy_cp = (yy_last_accepting_cpos);
4404 + yy_current_state = (yy_last_accepting_state);
4405 + yy_act = yy_accept[yy_current_state];
4408 + YY_DO_BEFORE_ACTION;
4410 + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
4413 + for ( yyl = 0; yyl < yyleng; ++yyl )
4414 + if ( yytext[yyl] == '\n' )
4420 +do_action: /* This label is used only to access EOF actions. */
4423 + { /* beginning of action switch */
4424 + case 0: /* must back up */
4425 + /* undo the effects of YY_DO_BEFORE_ACTION */
4426 + *yy_cp = (yy_hold_char);
4427 + yy_cp = (yy_last_accepting_cpos);
4428 + yy_current_state = (yy_last_accepting_state);
4429 + goto yy_find_action;
4433 +#line 58 "dtc-lexer.l"
4438 +#line 60 "dtc-lexer.l"
4440 + yytext[strlen(yytext) - 1] = 0;
4441 + if (!push_input_file(yytext + 1)) {
4442 + /* Some unrecoverable error.*/
4448 +case YY_STATE_EOF(INITIAL):
4449 +case YY_STATE_EOF(INCLUDE):
4450 +case YY_STATE_EOF(BYTESTRING):
4451 +case YY_STATE_EOF(PROPNODENAME):
4452 +case YY_STATE_EOF(V1):
4453 +#line 70 "dtc-lexer.l"
4455 + if (!pop_input_file()) {
4461 +/* rule 3 can match eol */
4463 +#line 76 "dtc-lexer.l"
4465 + yylloc.filenum = srcpos_filenum;
4466 + yylloc.first_line = yylineno;
4467 + DPRINT("String: %s\n", yytext);
4468 + yylval.data = data_copy_escape_string(yytext+1,
4470 + yylloc.first_line = yylineno;
4476 +#line 86 "dtc-lexer.l"
4478 + yylloc.filenum = srcpos_filenum;
4479 + yylloc.first_line = yylineno;
4480 + DPRINT("Keyword: /dts-v1/\n");
4488 +#line 95 "dtc-lexer.l"
4490 + yylloc.filenum = srcpos_filenum;
4491 + yylloc.first_line = yylineno;
4492 + DPRINT("Keyword: /memreserve/\n");
4494 + return DT_MEMRESERVE;
4499 +#line 103 "dtc-lexer.l"
4501 + yylloc.filenum = srcpos_filenum;
4502 + yylloc.first_line = yylineno;
4503 + DPRINT("Label: %s\n", yytext);
4504 + yylval.labelref = strdup(yytext);
4505 + yylval.labelref[yyleng-1] = '\0';
4511 +#line 112 "dtc-lexer.l"
4513 + yylloc.filenum = srcpos_filenum;
4514 + yylloc.first_line = yylineno;
4515 + if (*yytext == 'b')
4517 + else if (*yytext == 'o')
4519 + else if (*yytext == 'd')
4520 + yylval.cbase = 10;
4522 + yylval.cbase = 16;
4523 + DPRINT("Base: %d\n", yylval.cbase);
4529 +#line 127 "dtc-lexer.l"
4531 + yylloc.filenum = srcpos_filenum;
4532 + yylloc.first_line = yylineno;
4533 + yylval.literal = strdup(yytext);
4534 + DPRINT("Literal: '%s'\n", yylval.literal);
4535 + return DT_LEGACYLITERAL;
4540 +#line 135 "dtc-lexer.l"
4542 + yylloc.filenum = srcpos_filenum;
4543 + yylloc.first_line = yylineno;
4544 + yylval.literal = strdup(yytext);
4545 + DPRINT("Literal: '%s'\n", yylval.literal);
4546 + return DT_LITERAL;
4551 +#line 143 "dtc-lexer.l"
4552 +{ /* label reference */
4553 + yylloc.filenum = srcpos_filenum;
4554 + yylloc.first_line = yylineno;
4555 + DPRINT("Ref: %s\n", yytext+1);
4556 + yylval.labelref = strdup(yytext+1);
4562 +#line 151 "dtc-lexer.l"
4563 +{ /* new-style path reference */
4564 + yylloc.filenum = srcpos_filenum;
4565 + yylloc.first_line = yylineno;
4566 + yytext[yyleng-1] = '\0';
4567 + DPRINT("Ref: %s\n", yytext+2);
4568 + yylval.labelref = strdup(yytext+2);
4574 +#line 160 "dtc-lexer.l"
4575 +{ /* old-style path reference */
4576 + yylloc.filenum = srcpos_filenum;
4577 + yylloc.first_line = yylineno;
4578 + DPRINT("Ref: %s\n", yytext+1);
4579 + yylval.labelref = strdup(yytext+1);
4585 +#line 168 "dtc-lexer.l"
4587 + yylloc.filenum = srcpos_filenum;
4588 + yylloc.first_line = yylineno;
4589 + yylval.byte = strtol(yytext, NULL, 16);
4590 + DPRINT("Byte: %02x\n", (int)yylval.byte);
4596 +#line 176 "dtc-lexer.l"
4598 + yylloc.filenum = srcpos_filenum;
4599 + yylloc.first_line = yylineno;
4600 + DPRINT("/BYTESTRING\n");
4607 +#line 184 "dtc-lexer.l"
4609 + yylloc.filenum = srcpos_filenum;
4610 + yylloc.first_line = yylineno;
4611 + DPRINT("PropNodeName: %s\n", yytext);
4612 + yylval.propnodename = strdup(yytext);
4614 + return DT_PROPNODENAME;
4618 +/* rule 16 can match eol */
4620 +#line 194 "dtc-lexer.l"
4621 +/* eat whitespace */
4624 +/* rule 17 can match eol */
4626 +#line 196 "dtc-lexer.l"
4628 + yylloc.filenum = srcpos_filenum;
4629 + yylloc.first_line = yylineno;
4630 + DPRINT("Comment: %s\n", yytext);
4631 + /* eat comments */
4635 +/* rule 18 can match eol */
4637 +#line 203 "dtc-lexer.l"
4638 +/* eat line comments */
4642 +#line 205 "dtc-lexer.l"
4644 + yylloc.filenum = srcpos_filenum;
4645 + yylloc.first_line = yylineno;
4646 + DPRINT("Char: %c (\\x%02x)\n", yytext[0],
4647 + (unsigned)yytext[0]);
4648 + if (yytext[0] == '[') {
4649 + DPRINT("<BYTESTRING>\n");
4650 + BEGIN(BYTESTRING);
4652 + if ((yytext[0] == '{')
4653 + || (yytext[0] == ';')) {
4654 + DPRINT("<PROPNODENAME>\n");
4655 + BEGIN(PROPNODENAME);
4662 +#line 222 "dtc-lexer.l"
4665 +#line 1111 "dtc-lexer.lex.c"
4667 + case YY_END_OF_BUFFER:
4669 + /* Amount of text matched not including the EOB char. */
4670 + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
4672 + /* Undo the effects of YY_DO_BEFORE_ACTION. */
4673 + *yy_cp = (yy_hold_char);
4674 + YY_RESTORE_YY_MORE_OFFSET
4676 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
4678 + /* We're scanning a new file or input source. It's
4679 + * possible that this happened because the user
4680 + * just pointed yyin at a new source and called
4681 + * yylex(). If so, then we have to assure
4682 + * consistency between YY_CURRENT_BUFFER and our
4683 + * globals. Here is the right place to do so, because
4684 + * this is the first action (other than possibly a
4685 + * back-up) that will match for the new input source.
4687 + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
4688 + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
4689 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
4692 + /* Note that here we test for yy_c_buf_p "<=" to the position
4693 + * of the first EOB in the buffer, since yy_c_buf_p will
4694 + * already have been incremented past the NUL character
4695 + * (since all states make transitions on EOB to the
4696 + * end-of-buffer state). Contrast this with the test
4699 + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
4700 + { /* This was really a NUL. */
4701 + yy_state_type yy_next_state;
4703 + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
4705 + yy_current_state = yy_get_previous_state( );
4707 + /* Okay, we're now positioned to make the NUL
4708 + * transition. We couldn't have
4709 + * yy_get_previous_state() go ahead and do it
4710 + * for us because it doesn't know how to deal
4711 + * with the possibility of jamming (and we don't
4712 + * want to build jamming into it because then it
4713 + * will run more slowly).
4716 + yy_next_state = yy_try_NUL_trans( yy_current_state );
4718 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
4720 + if ( yy_next_state )
4722 + /* Consume the NUL. */
4723 + yy_cp = ++(yy_c_buf_p);
4724 + yy_current_state = yy_next_state;
4730 + yy_cp = (yy_c_buf_p);
4731 + goto yy_find_action;
4735 + else switch ( yy_get_next_buffer( ) )
4737 + case EOB_ACT_END_OF_FILE:
4739 + (yy_did_buffer_switch_on_eof) = 0;
4743 + /* Note: because we've taken care in
4744 + * yy_get_next_buffer() to have set up
4745 + * yytext, we can now set up
4746 + * yy_c_buf_p so that if some total
4747 + * hoser (like flex itself) wants to
4748 + * call the scanner after we return the
4749 + * YY_NULL, it'll still work - another
4750 + * YY_NULL will get returned.
4752 + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
4754 + yy_act = YY_STATE_EOF(YY_START);
4760 + if ( ! (yy_did_buffer_switch_on_eof) )
4766 + case EOB_ACT_CONTINUE_SCAN:
4768 + (yytext_ptr) + yy_amount_of_matched_text;
4770 + yy_current_state = yy_get_previous_state( );
4772 + yy_cp = (yy_c_buf_p);
4773 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
4776 + case EOB_ACT_LAST_MATCH:
4778 + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
4780 + yy_current_state = yy_get_previous_state( );
4782 + yy_cp = (yy_c_buf_p);
4783 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
4784 + goto yy_find_action;
4791 + "fatal flex scanner internal error--no action found" );
4792 + } /* end of action switch */
4793 + } /* end of scanning one token */
4794 +} /* end of yylex */
4796 +/* yy_get_next_buffer - try to read in a new buffer
4798 + * Returns a code representing an action:
4799 + * EOB_ACT_LAST_MATCH -
4800 + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
4801 + * EOB_ACT_END_OF_FILE - end of file
4803 +static int yy_get_next_buffer (void)
4805 + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
4806 + register char *source = (yytext_ptr);
4807 + register int number_to_move, i;
4810 + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
4812 + "fatal flex scanner internal error--end of buffer missed" );
4814 + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
4815 + { /* Don't try to fill the buffer, so this is an EOF. */
4816 + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
4818 + /* We matched a single character, the EOB, so
4819 + * treat this as a final EOF.
4821 + return EOB_ACT_END_OF_FILE;
4826 + /* We matched some text prior to the EOB, first
4829 + return EOB_ACT_LAST_MATCH;
4833 + /* Try to read more data. */
4835 + /* First move last chars to start of buffer. */
4836 + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
4838 + for ( i = 0; i < number_to_move; ++i )
4839 + *(dest++) = *(source++);
4841 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
4842 + /* don't do the read, it's not guaranteed to return an EOF,
4843 + * just force an EOF
4845 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
4850 + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
4852 + while ( num_to_read <= 0 )
4853 + { /* Not enough room in the buffer - grow it. */
4855 + /* just a shorter name for the current buffer */
4856 + YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
4858 + int yy_c_buf_p_offset =
4859 + (int) ((yy_c_buf_p) - b->yy_ch_buf);
4861 + if ( b->yy_is_our_buffer )
4863 + int new_size = b->yy_buf_size * 2;
4865 + if ( new_size <= 0 )
4866 + b->yy_buf_size += b->yy_buf_size / 8;
4868 + b->yy_buf_size *= 2;
4870 + b->yy_ch_buf = (char *)
4871 + /* Include room in for 2 EOB chars. */
4872 + yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
4875 + /* Can't grow it, we don't own it. */
4878 + if ( ! b->yy_ch_buf )
4880 + "fatal error - scanner input buffer overflow" );
4882 + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
4884 + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
4885 + number_to_move - 1;
4889 + if ( num_to_read > YY_READ_BUF_SIZE )
4890 + num_to_read = YY_READ_BUF_SIZE;
4892 + /* Read in more data. */
4893 + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
4894 + (yy_n_chars), (size_t) num_to_read );
4896 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
4899 + if ( (yy_n_chars) == 0 )
4901 + if ( number_to_move == YY_MORE_ADJ )
4903 + ret_val = EOB_ACT_END_OF_FILE;
4909 + ret_val = EOB_ACT_LAST_MATCH;
4910 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
4911 + YY_BUFFER_EOF_PENDING;
4916 + ret_val = EOB_ACT_CONTINUE_SCAN;
4918 + (yy_n_chars) += number_to_move;
4919 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
4920 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
4922 + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
4927 +/* yy_get_previous_state - get the state just before the EOB char was reached */
4929 + static yy_state_type yy_get_previous_state (void)
4931 + register yy_state_type yy_current_state;
4932 + register char *yy_cp;
4934 + yy_current_state = (yy_start);
4936 + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
4938 + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
4939 + if ( yy_accept[yy_current_state] )
4941 + (yy_last_accepting_state) = yy_current_state;
4942 + (yy_last_accepting_cpos) = yy_cp;
4944 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4946 + yy_current_state = (int) yy_def[yy_current_state];
4947 + if ( yy_current_state >= 94 )
4948 + yy_c = yy_meta[(unsigned int) yy_c];
4950 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4953 + return yy_current_state;
4956 +/* yy_try_NUL_trans - try to make a transition on the NUL character
4959 + * next_state = yy_try_NUL_trans( current_state );
4961 + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
4963 + register int yy_is_jam;
4964 + register char *yy_cp = (yy_c_buf_p);
4966 + register YY_CHAR yy_c = 1;
4967 + if ( yy_accept[yy_current_state] )
4969 + (yy_last_accepting_state) = yy_current_state;
4970 + (yy_last_accepting_cpos) = yy_cp;
4972 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4974 + yy_current_state = (int) yy_def[yy_current_state];
4975 + if ( yy_current_state >= 94 )
4976 + yy_c = yy_meta[(unsigned int) yy_c];
4978 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4979 + yy_is_jam = (yy_current_state == 93);
4981 + return yy_is_jam ? 0 : yy_current_state;
4984 +#ifndef YY_NO_INPUT
4986 + static int yyinput (void)
4988 + static int input (void)
4994 + *(yy_c_buf_p) = (yy_hold_char);
4996 + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
4998 + /* yy_c_buf_p now points to the character we want to return.
4999 + * If this occurs *before* the EOB characters, then it's a
5000 + * valid NUL; if not, then we've hit the end of the buffer.
5002 + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
5003 + /* This was really a NUL. */
5004 + *(yy_c_buf_p) = '\0';
5007 + { /* need more input */
5008 + int offset = (yy_c_buf_p) - (yytext_ptr);
5011 + switch ( yy_get_next_buffer( ) )
5013 + case EOB_ACT_LAST_MATCH:
5014 + /* This happens because yy_g_n_b()
5015 + * sees that we've accumulated a
5016 + * token and flags that we need to
5017 + * try matching the token before
5018 + * proceeding. But for input(),
5019 + * there's no matching to consider.
5020 + * So convert the EOB_ACT_LAST_MATCH
5021 + * to EOB_ACT_END_OF_FILE.
5024 + /* Reset buffer status. */
5029 + case EOB_ACT_END_OF_FILE:
5034 + if ( ! (yy_did_buffer_switch_on_eof) )
5043 + case EOB_ACT_CONTINUE_SCAN:
5044 + (yy_c_buf_p) = (yytext_ptr) + offset;
5050 + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
5051 + *(yy_c_buf_p) = '\0'; /* preserve yytext */
5052 + (yy_hold_char) = *++(yy_c_buf_p);
5061 +#endif /* ifndef YY_NO_INPUT */
5063 +/** Immediately switch to a different input stream.
5064 + * @param input_file A readable stream.
5066 + * @note This function does not reset the start condition to @c INITIAL .
5068 + void yyrestart (FILE * input_file )
5071 + if ( ! YY_CURRENT_BUFFER ){
5072 + yyensure_buffer_stack ();
5073 + YY_CURRENT_BUFFER_LVALUE =
5074 + yy_create_buffer(yyin,YY_BUF_SIZE );
5077 + yy_init_buffer(YY_CURRENT_BUFFER,input_file );
5078 + yy_load_buffer_state( );
5081 +/** Switch to a different input buffer.
5082 + * @param new_buffer The new input buffer.
5085 + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
5088 + /* TODO. We should be able to replace this entire function body
5090 + * yypop_buffer_state();
5091 + * yypush_buffer_state(new_buffer);
5093 + yyensure_buffer_stack ();
5094 + if ( YY_CURRENT_BUFFER == new_buffer )
5097 + if ( YY_CURRENT_BUFFER )
5099 + /* Flush out information for old buffer. */
5100 + *(yy_c_buf_p) = (yy_hold_char);
5101 + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
5102 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
5105 + YY_CURRENT_BUFFER_LVALUE = new_buffer;
5106 + yy_load_buffer_state( );
5108 + /* We don't actually know whether we did this switch during
5109 + * EOF (yywrap()) processing, but the only time this flag
5110 + * is looked at is after yywrap() is called, so it's safe
5111 + * to go ahead and always set it.
5113 + (yy_did_buffer_switch_on_eof) = 1;
5116 +static void yy_load_buffer_state (void)
5118 + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
5119 + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
5120 + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
5121 + (yy_hold_char) = *(yy_c_buf_p);
5124 +/** Allocate and initialize an input buffer state.
5125 + * @param file A readable stream.
5126 + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
5128 + * @return the allocated buffer state.
5130 + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
5132 + YY_BUFFER_STATE b;
5134 + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
5136 + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
5138 + b->yy_buf_size = size;
5140 + /* yy_ch_buf has to be 2 characters longer than the size given because
5141 + * we need to put in 2 end-of-buffer characters.
5143 + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
5144 + if ( ! b->yy_ch_buf )
5145 + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
5147 + b->yy_is_our_buffer = 1;
5149 + yy_init_buffer(b,file );
5154 +/** Destroy the buffer.
5155 + * @param b a buffer created with yy_create_buffer()
5158 + void yy_delete_buffer (YY_BUFFER_STATE b )
5164 + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
5165 + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
5167 + if ( b->yy_is_our_buffer )
5168 + yyfree((void *) b->yy_ch_buf );
5170 + yyfree((void *) b );
5173 +#ifndef __cplusplus
5174 +extern int isatty (int );
5175 +#endif /* __cplusplus */
5177 +/* Initializes or reinitializes a buffer.
5178 + * This function is sometimes called more than once on the same buffer,
5179 + * such as during a yyrestart() or at EOF.
5181 + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
5184 + int oerrno = errno;
5186 + yy_flush_buffer(b );
5188 + b->yy_input_file = file;
5189 + b->yy_fill_buffer = 1;
5191 + /* If b is the current buffer, then yy_init_buffer was _probably_
5192 + * called from yyrestart() or through yy_get_next_buffer.
5193 + * In that case, we don't want to reset the lineno or column.
5195 + if (b != YY_CURRENT_BUFFER){
5196 + b->yy_bs_lineno = 1;
5197 + b->yy_bs_column = 0;
5200 + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
5205 +/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
5206 + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
5209 + void yy_flush_buffer (YY_BUFFER_STATE b )
5214 + b->yy_n_chars = 0;
5216 + /* We always need two end-of-buffer characters. The first causes
5217 + * a transition to the end-of-buffer state. The second causes
5218 + * a jam in that state.
5220 + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
5221 + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
5223 + b->yy_buf_pos = &b->yy_ch_buf[0];
5226 + b->yy_buffer_status = YY_BUFFER_NEW;
5228 + if ( b == YY_CURRENT_BUFFER )
5229 + yy_load_buffer_state( );
5232 +/** Pushes the new state onto the stack. The new state becomes
5233 + * the current state. This function will allocate the stack
5235 + * @param new_buffer The new state.
5238 +void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
5240 + if (new_buffer == NULL)
5243 + yyensure_buffer_stack();
5245 + /* This block is copied from yy_switch_to_buffer. */
5246 + if ( YY_CURRENT_BUFFER )
5248 + /* Flush out information for old buffer. */
5249 + *(yy_c_buf_p) = (yy_hold_char);
5250 + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
5251 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
5254 + /* Only push if top exists. Otherwise, replace top. */
5255 + if (YY_CURRENT_BUFFER)
5256 + (yy_buffer_stack_top)++;
5257 + YY_CURRENT_BUFFER_LVALUE = new_buffer;
5259 + /* copied from yy_switch_to_buffer. */
5260 + yy_load_buffer_state( );
5261 + (yy_did_buffer_switch_on_eof) = 1;
5264 +/** Removes and deletes the top of the stack, if present.
5265 + * The next element becomes the new top.
5268 +void yypop_buffer_state (void)
5270 + if (!YY_CURRENT_BUFFER)
5273 + yy_delete_buffer(YY_CURRENT_BUFFER );
5274 + YY_CURRENT_BUFFER_LVALUE = NULL;
5275 + if ((yy_buffer_stack_top) > 0)
5276 + --(yy_buffer_stack_top);
5278 + if (YY_CURRENT_BUFFER) {
5279 + yy_load_buffer_state( );
5280 + (yy_did_buffer_switch_on_eof) = 1;
5284 +/* Allocates the stack if it does not exist.
5285 + * Guarantees space for at least one push.
5287 +static void yyensure_buffer_stack (void)
5291 + if (!(yy_buffer_stack)) {
5293 + /* First allocation is just for 2 elements, since we don't know if this
5294 + * scanner will even need a stack. We use 2 instead of 1 to avoid an
5295 + * immediate realloc on the next call.
5298 + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
5299 + (num_to_alloc * sizeof(struct yy_buffer_state*)
5302 + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
5304 + (yy_buffer_stack_max) = num_to_alloc;
5305 + (yy_buffer_stack_top) = 0;
5309 + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
5311 + /* Increase the buffer to prepare for a possible push. */
5312 + int grow_size = 8 /* arbitrary grow size */;
5314 + num_to_alloc = (yy_buffer_stack_max) + grow_size;
5315 + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
5316 + ((yy_buffer_stack),
5317 + num_to_alloc * sizeof(struct yy_buffer_state*)
5320 + /* zero only the new slots.*/
5321 + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
5322 + (yy_buffer_stack_max) = num_to_alloc;
5326 +/** Setup the input buffer state to scan directly from a user-specified character buffer.
5327 + * @param base the character buffer
5328 + * @param size the size in bytes of the character buffer
5330 + * @return the newly allocated buffer state object.
5332 +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
5334 + YY_BUFFER_STATE b;
5337 + base[size-2] != YY_END_OF_BUFFER_CHAR ||
5338 + base[size-1] != YY_END_OF_BUFFER_CHAR )
5339 + /* They forgot to leave room for the EOB's. */
5342 + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
5344 + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
5346 + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
5347 + b->yy_buf_pos = b->yy_ch_buf = base;
5348 + b->yy_is_our_buffer = 0;
5349 + b->yy_input_file = 0;
5350 + b->yy_n_chars = b->yy_buf_size;
5351 + b->yy_is_interactive = 0;
5353 + b->yy_fill_buffer = 0;
5354 + b->yy_buffer_status = YY_BUFFER_NEW;
5356 + yy_switch_to_buffer(b );
5361 +/** Setup the input buffer state to scan a string. The next call to yylex() will
5362 + * scan from a @e copy of @a str.
5363 + * @param yystr a NUL-terminated string to scan
5365 + * @return the newly allocated buffer state object.
5366 + * @note If you want to scan bytes that may contain NUL values, then use
5367 + * yy_scan_bytes() instead.
5369 +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
5372 + return yy_scan_bytes(yystr,strlen(yystr) );
5375 +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
5376 + * scan from a @e copy of @a bytes.
5377 + * @param bytes the byte buffer to scan
5378 + * @param len the number of bytes in the buffer pointed to by @a bytes.
5380 + * @return the newly allocated buffer state object.
5382 +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
5384 + YY_BUFFER_STATE b;
5389 + /* Get memory for full buffer, including space for trailing EOB's. */
5390 + n = _yybytes_len + 2;
5391 + buf = (char *) yyalloc(n );
5393 + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
5395 + for ( i = 0; i < _yybytes_len; ++i )
5396 + buf[i] = yybytes[i];
5398 + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
5400 + b = yy_scan_buffer(buf,n );
5402 + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
5404 + /* It's okay to grow etc. this buffer, and we should throw it
5405 + * away when we're done.
5407 + b->yy_is_our_buffer = 1;
5412 +#ifndef YY_EXIT_FAILURE
5413 +#define YY_EXIT_FAILURE 2
5416 +static void yy_fatal_error (yyconst char* msg )
5418 + (void) fprintf( stderr, "%s\n", msg );
5419 + exit( YY_EXIT_FAILURE );
5422 +/* Redefine yyless() so it works in section 3 code. */
5425 +#define yyless(n) \
5428 + /* Undo effects of setting up yytext. */ \
5429 + int yyless_macro_arg = (n); \
5430 + YY_LESS_LINENO(yyless_macro_arg);\
5431 + yytext[yyleng] = (yy_hold_char); \
5432 + (yy_c_buf_p) = yytext + yyless_macro_arg; \
5433 + (yy_hold_char) = *(yy_c_buf_p); \
5434 + *(yy_c_buf_p) = '\0'; \
5435 + yyleng = yyless_macro_arg; \
5439 +/* Accessor methods (get/set functions) to struct members. */
5441 +/** Get the current line number.
5444 +int yyget_lineno (void)
5450 +/** Get the input stream.
5453 +FILE *yyget_in (void)
5458 +/** Get the output stream.
5461 +FILE *yyget_out (void)
5466 +/** Get the length of the current token.
5469 +int yyget_leng (void)
5474 +/** Get the current token.
5478 +char *yyget_text (void)
5483 +/** Set the current line number.
5484 + * @param line_number
5487 +void yyset_lineno (int line_number )
5490 + yylineno = line_number;
5493 +/** Set the input stream. This does not discard the current
5495 + * @param in_str A readable stream.
5497 + * @see yy_switch_to_buffer
5499 +void yyset_in (FILE * in_str )
5504 +void yyset_out (FILE * out_str )
5509 +int yyget_debug (void)
5511 + return yy_flex_debug;
5514 +void yyset_debug (int bdebug )
5516 + yy_flex_debug = bdebug ;
5519 +static int yy_init_globals (void)
5521 + /* Initialization is the same as for the non-reentrant scanner.
5522 + * This function is called from yylex_destroy(), so don't allocate here.
5525 + /* We do not touch yylineno unless the option is enabled. */
5528 + (yy_buffer_stack) = 0;
5529 + (yy_buffer_stack_top) = 0;
5530 + (yy_buffer_stack_max) = 0;
5531 + (yy_c_buf_p) = (char *) 0;
5535 +/* Defined in main.c */
5540 + yyin = (FILE *) 0;
5541 + yyout = (FILE *) 0;
5544 + /* For future reference: Set errno on error, since we are called by
5550 +/* yylex_destroy is for both reentrant and non-reentrant scanners. */
5551 +int yylex_destroy (void)
5554 + /* Pop the buffer stack, destroying each element. */
5555 + while(YY_CURRENT_BUFFER){
5556 + yy_delete_buffer(YY_CURRENT_BUFFER );
5557 + YY_CURRENT_BUFFER_LVALUE = NULL;
5558 + yypop_buffer_state();
5561 + /* Destroy the stack itself. */
5562 + yyfree((yy_buffer_stack) );
5563 + (yy_buffer_stack) = NULL;
5565 + /* Reset the globals. This is important in a non-reentrant scanner so the next time
5566 + * yylex() is called, initialization will occur. */
5567 + yy_init_globals( );
5573 + * Internal utility routines.
5577 +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
5580 + for ( i = 0; i < n; ++i )
5585 +#ifdef YY_NEED_STRLEN
5586 +static int yy_flex_strlen (yyconst char * s )
5589 + for ( n = 0; s[n]; ++n )
5596 +void *yyalloc (yy_size_t size )
5598 + return (void *) malloc( size );
5601 +void *yyrealloc (void * ptr, yy_size_t size )
5603 + /* The cast to (char *) in the following accommodates both
5604 + * implementations that use char* generic pointers, and those
5605 + * that use void* generic pointers. It works with the latter
5606 + * because both ANSI C and C++ allow castless assignment from
5607 + * any pointer type to void*, and deal with argument conversions
5608 + * as though doing an assignment.
5610 + return (void *) realloc( (char *) ptr, size );
5613 +void yyfree (void * ptr )
5615 + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
5618 +#define YYTABLES_NAME "yytables"
5620 +#line 222 "dtc-lexer.l"
5626 + * Stack of nested include file contexts.
5632 + YY_BUFFER_STATE yy_prev_buf;
5633 + int yy_prev_lineno;
5634 + struct incl_file *prev;
5637 +struct incl_file *incl_file_stack;
5641 + * Detect infinite include recursion.
5643 +#define MAX_INCLUDE_DEPTH (100)
5645 +static int incl_depth = 0;
5648 +int push_input_file(const char *filename)
5651 + struct incl_file *incl_file;
5654 + yyerror("No include file name given.");
5658 + if (incl_depth++ >= MAX_INCLUDE_DEPTH) {
5659 + yyerror("Includes nested too deeply");
5663 + f = dtc_open_file(filename);
5665 + incl_file = malloc(sizeof(struct incl_file));
5667 + yyerror("Can not allocate include file space.");
5672 + * Save current context.
5674 + incl_file->yy_prev_buf = YY_CURRENT_BUFFER;
5675 + incl_file->yy_prev_lineno = yylineno;
5676 + incl_file->filenum = srcpos_filenum;
5677 + incl_file->file = yyin;
5678 + incl_file->prev = incl_file_stack;
5680 + incl_file_stack = incl_file;
5683 + * Establish new context.
5685 + srcpos_filenum = lookup_file_name(filename, 0);
5688 + yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
5694 +int pop_input_file(void)
5696 + struct incl_file *incl_file;
5698 + if (incl_file_stack == 0)
5707 + incl_file = incl_file_stack;
5708 + incl_file_stack = incl_file->prev;
5711 + * Recover old context.
5713 + yy_delete_buffer(YY_CURRENT_BUFFER);
5714 + yy_switch_to_buffer(incl_file->yy_prev_buf);
5715 + yylineno = incl_file->yy_prev_lineno;
5716 + srcpos_filenum = incl_file->filenum;
5717 + yyin = incl_file->file;
5724 + if (YY_CURRENT_BUFFER == 0)
5731 +++ b/arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped
5733 +/* A Bison parser, made by GNU Bison 2.3. */
5735 +/* Skeleton implementation for Bison's Yacc-like parsers in C
5737 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
5738 + Free Software Foundation, Inc.
5740 + This program is free software; you can redistribute it and/or modify
5741 + it under the terms of the GNU General Public License as published by
5742 + the Free Software Foundation; either version 2, or (at your option)
5743 + any later version.
5745 + This program is distributed in the hope that it will be useful,
5746 + but WITHOUT ANY WARRANTY; without even the implied warranty of
5747 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5748 + GNU General Public License for more details.
5750 + You should have received a copy of the GNU General Public License
5751 + along with this program; if not, write to the Free Software
5752 + Foundation, Inc., 51 Franklin Street, Fifth Floor,
5753 + Boston, MA 02110-1301, USA. */
5755 +/* As a special exception, you may create a larger work that contains
5756 + part or all of the Bison parser skeleton and distribute that work
5757 + under terms of your choice, so long as that work isn't itself a
5758 + parser generator using the skeleton or a modified version thereof
5759 + as a parser skeleton. Alternatively, if you modify or redistribute
5760 + the parser skeleton itself, you may (at your option) remove this
5761 + special exception, which will cause the skeleton and the resulting
5762 + Bison output files to be licensed under the GNU General Public
5763 + License without this special exception.
5765 + This special exception was added by the Free Software Foundation in
5766 + version 2.2 of Bison. */
5768 +/* C LALR(1) parser skeleton written by Richard Stallman, by
5769 + simplifying the original so-called "semantic" parser. */
5771 +/* All symbols defined below should begin with yy or YY, to avoid
5772 + infringing on user name space. This should be done even for local
5773 + variables, as they might otherwise be expanded by user macros.
5774 + There are some unavoidable exceptions within include files to
5775 + define necessary library symbols; they are noted "INFRINGES ON
5776 + USER NAME SPACE" below. */
5778 +/* Identify Bison output. */
5781 +/* Bison version. */
5782 +#define YYBISON_VERSION "2.3"
5784 +/* Skeleton name. */
5785 +#define YYSKELETON_NAME "yacc.c"
5787 +/* Pure parsers. */
5790 +/* Using locations. */
5791 +#define YYLSP_NEEDED 1
5796 +#ifndef YYTOKENTYPE
5797 +# define YYTOKENTYPE
5798 + /* Put the tokens into the symbol table, so that GDB and other debuggers
5799 + know about them. */
5800 + enum yytokentype {
5802 + DT_MEMRESERVE = 259,
5803 + DT_PROPNODENAME = 260,
5805 + DT_LEGACYLITERAL = 262,
5815 +#define DT_MEMRESERVE 259
5816 +#define DT_PROPNODENAME 260
5817 +#define DT_LITERAL 261
5818 +#define DT_LEGACYLITERAL 262
5819 +#define DT_BASE 263
5820 +#define DT_BYTE 264
5821 +#define DT_STRING 265
5822 +#define DT_LABEL 266
5828 +/* Copy the first part of user declarations. */
5829 +#line 23 "dtc-parser.y"
5832 +#include "srcpos.h"
5835 +unsigned long long eval_literal(const char *s, int base, int bits);
5837 +extern struct boot_info *the_boot_info;
5841 +/* Enabling traces. */
5846 +/* Enabling verbose error messages. */
5847 +#ifdef YYERROR_VERBOSE
5848 +# undef YYERROR_VERBOSE
5849 +# define YYERROR_VERBOSE 1
5851 +# define YYERROR_VERBOSE 0
5854 +/* Enabling the token table. */
5855 +#ifndef YYTOKEN_TABLE
5856 +# define YYTOKEN_TABLE 0
5859 +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
5860 +typedef union YYSTYPE
5861 +#line 34 "dtc-parser.y"
5863 + char *propnodename;
5866 + unsigned int cbase;
5872 + struct property *prop;
5873 + struct property *proplist;
5874 + struct node *node;
5875 + struct node *nodelist;
5876 + struct reserve_info *re;
5878 +/* Line 187 of yacc.c. */
5879 +#line 148 "dtc-parser.tab.c"
5881 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
5882 +# define YYSTYPE_IS_DECLARED 1
5883 +# define YYSTYPE_IS_TRIVIAL 1
5886 +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
5887 +typedef struct YYLTYPE
5894 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
5895 +# define YYLTYPE_IS_DECLARED 1
5896 +# define YYLTYPE_IS_TRIVIAL 1
5900 +/* Copy the second part of user declarations. */
5903 +/* Line 216 of yacc.c. */
5904 +#line 173 "dtc-parser.tab.c"
5910 +#ifdef YYTYPE_UINT8
5911 +typedef YYTYPE_UINT8 yytype_uint8;
5913 +typedef unsigned char yytype_uint8;
5917 +typedef YYTYPE_INT8 yytype_int8;
5918 +#elif (defined __STDC__ || defined __C99__FUNC__ \
5919 + || defined __cplusplus || defined _MSC_VER)
5920 +typedef signed char yytype_int8;
5922 +typedef short int yytype_int8;
5925 +#ifdef YYTYPE_UINT16
5926 +typedef YYTYPE_UINT16 yytype_uint16;
5928 +typedef unsigned short int yytype_uint16;
5931 +#ifdef YYTYPE_INT16
5932 +typedef YYTYPE_INT16 yytype_int16;
5934 +typedef short int yytype_int16;
5938 +# ifdef __SIZE_TYPE__
5939 +# define YYSIZE_T __SIZE_TYPE__
5940 +# elif defined size_t
5941 +# define YYSIZE_T size_t
5942 +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
5943 + || defined __cplusplus || defined _MSC_VER)
5944 +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
5945 +# define YYSIZE_T size_t
5947 +# define YYSIZE_T unsigned int
5951 +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
5956 +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
5957 +# define YY_(msgid) dgettext ("bison-runtime", msgid)
5961 +# define YY_(msgid) msgid
5965 +/* Suppress unused-variable warnings by "using" E. */
5966 +#if ! defined lint || defined __GNUC__
5967 +# define YYUSE(e) ((void) (e))
5969 +# define YYUSE(e) /* empty */
5972 +/* Identity function, used to suppress warnings about constant conditions. */
5974 +# define YYID(n) (n)
5976 +#if (defined __STDC__ || defined __C99__FUNC__ \
5977 + || defined __cplusplus || defined _MSC_VER)
5990 +#if ! defined yyoverflow || YYERROR_VERBOSE
5992 +/* The parser invokes alloca or malloc; define the necessary symbols. */
5994 +# ifdef YYSTACK_USE_ALLOCA
5995 +# if YYSTACK_USE_ALLOCA
5997 +# define YYSTACK_ALLOC __builtin_alloca
5998 +# elif defined __BUILTIN_VA_ARG_INCR
5999 +# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
6000 +# elif defined _AIX
6001 +# define YYSTACK_ALLOC __alloca
6002 +# elif defined _MSC_VER
6003 +# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
6004 +# define alloca _alloca
6006 +# define YYSTACK_ALLOC alloca
6007 +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
6008 + || defined __cplusplus || defined _MSC_VER)
6009 +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
6011 +# define _STDLIB_H 1
6018 +# ifdef YYSTACK_ALLOC
6019 + /* Pacify GCC's `empty if-body' warning. */
6020 +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
6021 +# ifndef YYSTACK_ALLOC_MAXIMUM
6022 + /* The OS might guarantee only one guard page at the bottom of the stack,
6023 + and a page size can be as small as 4096 bytes. So we cannot safely
6024 + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
6025 + to allow for a few compiler-allocated temporary stack slots. */
6026 +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
6029 +# define YYSTACK_ALLOC YYMALLOC
6030 +# define YYSTACK_FREE YYFREE
6031 +# ifndef YYSTACK_ALLOC_MAXIMUM
6032 +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
6034 +# if (defined __cplusplus && ! defined _STDLIB_H \
6035 + && ! ((defined YYMALLOC || defined malloc) \
6036 + && (defined YYFREE || defined free)))
6037 +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
6039 +# define _STDLIB_H 1
6043 +# define YYMALLOC malloc
6044 +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
6045 + || defined __cplusplus || defined _MSC_VER)
6046 +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
6050 +# define YYFREE free
6051 +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
6052 + || defined __cplusplus || defined _MSC_VER)
6053 +void free (void *); /* INFRINGES ON USER NAME SPACE */
6057 +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
6060 +#if (! defined yyoverflow \
6061 + && (! defined __cplusplus \
6062 + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
6063 + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
6065 +/* A type that is properly aligned for any stack member. */
6068 + yytype_int16 yyss;
6073 +/* The size of the maximum gap between one aligned stack and the next. */
6074 +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
6076 +/* The size of an array large to enough to hold all stacks, each with
6078 +# define YYSTACK_BYTES(N) \
6079 + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
6080 + + 2 * YYSTACK_GAP_MAXIMUM)
6082 +/* Copy COUNT objects from FROM to TO. The source and destination do
6085 +# if defined __GNUC__ && 1 < __GNUC__
6086 +# define YYCOPY(To, From, Count) \
6087 + __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
6089 +# define YYCOPY(To, From, Count) \
6093 + for (yyi = 0; yyi < (Count); yyi++) \
6094 + (To)[yyi] = (From)[yyi]; \
6100 +/* Relocate STACK from its old location to the new one. The
6101 + local variables YYSIZE and YYSTACKSIZE give the old and new number of
6102 + elements in the stack, and YYPTR gives the new location of the
6103 + stack. Advance YYPTR to a properly aligned location for the next
6105 +# define YYSTACK_RELOCATE(Stack) \
6108 + YYSIZE_T yynewbytes; \
6109 + YYCOPY (&yyptr->Stack, Stack, yysize); \
6110 + Stack = &yyptr->Stack; \
6111 + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
6112 + yyptr += yynewbytes / sizeof (*yyptr); \
6118 +/* YYFINAL -- State number of the termination state. */
6120 +/* YYLAST -- Last index in YYTABLE. */
6123 +/* YYNTOKENS -- Number of terminals. */
6124 +#define YYNTOKENS 24
6125 +/* YYNNTS -- Number of nonterminals. */
6127 +/* YYNRULES -- Number of rules. */
6128 +#define YYNRULES 43
6129 +/* YYNRULES -- Number of states. */
6130 +#define YYNSTATES 67
6132 +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
6133 +#define YYUNDEFTOK 2
6134 +#define YYMAXUTOK 267
6136 +#define YYTRANSLATE(YYX) \
6137 + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
6139 +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
6140 +static const yytype_uint8 yytranslate[] =
6142 + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6143 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6144 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6145 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6146 + 2, 2, 2, 2, 23, 14, 2, 15, 2, 2,
6147 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 13,
6148 + 19, 18, 20, 2, 2, 2, 2, 2, 2, 2,
6149 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6150 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6151 + 2, 21, 2, 22, 2, 2, 2, 2, 2, 2,
6152 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6153 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6154 + 2, 2, 2, 16, 2, 17, 2, 2, 2, 2,
6155 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6156 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6157 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6158 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6159 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6160 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6161 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6162 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6163 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6164 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6165 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6166 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6167 + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
6168 + 5, 6, 7, 8, 9, 10, 11, 12
6172 +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
6174 +static const yytype_uint8 yyprhs[] =
6176 + 0, 0, 3, 8, 11, 12, 15, 21, 22, 25,
6177 + 27, 34, 36, 38, 41, 47, 48, 51, 57, 61,
6178 + 64, 69, 74, 77, 80, 81, 84, 87, 88, 91,
6179 + 94, 97, 98, 100, 102, 105, 106, 109, 112, 113,
6180 + 116, 119, 123, 124
6183 +/* YYRHS -- A `-1'-separated list of the rules' RHS. */
6184 +static const yytype_int8 yyrhs[] =
6186 + 25, 0, -1, 3, 13, 26, 31, -1, 28, 31,
6187 + -1, -1, 27, 26, -1, 43, 4, 30, 30, 13,
6188 + -1, -1, 29, 28, -1, 27, -1, 43, 4, 30,
6189 + 14, 30, 13, -1, 6, -1, 7, -1, 15, 32,
6190 + -1, 16, 33, 41, 17, 13, -1, -1, 33, 34,
6191 + -1, 43, 5, 18, 35, 13, -1, 43, 5, 13,
6192 + -1, 36, 10, -1, 36, 19, 37, 20, -1, 36,
6193 + 21, 40, 22, -1, 36, 12, -1, 35, 11, -1,
6194 + -1, 35, 23, -1, 36, 11, -1, -1, 37, 39,
6195 + -1, 37, 12, -1, 37, 11, -1, -1, 8, -1,
6196 + 6, -1, 38, 7, -1, -1, 40, 9, -1, 40,
6197 + 11, -1, -1, 42, 41, -1, 42, 34, -1, 43,
6198 + 5, 32, -1, -1, 11, -1
6201 +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
6202 +static const yytype_uint16 yyrline[] =
6204 + 0, 85, 85, 89, 97, 100, 107, 115, 118, 125,
6205 + 129, 136, 140, 147, 154, 162, 165, 172, 176, 183,
6206 + 187, 191, 195, 199, 207, 210, 214, 222, 225, 229,
6207 + 234, 242, 245, 249, 253, 261, 264, 268, 276, 279,
6208 + 283, 291, 299, 302
6212 +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
6213 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
6214 + First, the terminals, then, starting at YYNTOKENS, nonterminals. */
6215 +static const char *const yytname[] =
6217 + "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE",
6218 + "DT_PROPNODENAME", "DT_LITERAL", "DT_LEGACYLITERAL", "DT_BASE",
6219 + "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF", "';'", "'-'", "'/'", "'{'",
6220 + "'}'", "'='", "'<'", "'>'", "'['", "']'", "','", "$accept", "sourcefile",
6221 + "memreserves", "memreserve", "v0_memreserves", "v0_memreserve", "addr",
6222 + "devicetree", "nodedef", "proplist", "propdef", "propdata",
6223 + "propdataprefix", "celllist", "cellbase", "cellval", "bytestring",
6224 + "subnodes", "subnode", "label", 0
6229 +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
6230 + token YYLEX-NUM. */
6231 +static const yytype_uint16 yytoknum[] =
6233 + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
6234 + 265, 266, 267, 59, 45, 47, 123, 125, 61, 60,
6239 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
6240 +static const yytype_uint8 yyr1[] =
6242 + 0, 24, 25, 25, 26, 26, 27, 28, 28, 29,
6243 + 29, 30, 30, 31, 32, 33, 33, 34, 34, 35,
6244 + 35, 35, 35, 35, 36, 36, 36, 37, 37, 37,
6245 + 37, 38, 38, 39, 39, 40, 40, 40, 41, 41,
6249 +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
6250 +static const yytype_uint8 yyr2[] =
6252 + 0, 2, 4, 2, 0, 2, 5, 0, 2, 1,
6253 + 6, 1, 1, 2, 5, 0, 2, 5, 3, 2,
6254 + 4, 4, 2, 2, 0, 2, 2, 0, 2, 2,
6255 + 2, 0, 1, 1, 2, 0, 2, 2, 0, 2,
6259 +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
6260 + STATE-NUM when YYTABLE doesn't specify something else to do. Zero
6261 + means the default is an error. */
6262 +static const yytype_uint8 yydefact[] =
6264 + 7, 0, 43, 0, 9, 0, 7, 0, 4, 1,
6265 + 0, 3, 8, 0, 0, 4, 0, 15, 13, 11,
6266 + 12, 0, 2, 5, 0, 38, 0, 0, 0, 16,
6267 + 0, 38, 0, 0, 6, 0, 40, 39, 0, 10,
6268 + 14, 18, 24, 41, 0, 0, 23, 17, 25, 19,
6269 + 26, 22, 27, 35, 31, 0, 33, 32, 30, 29,
6270 + 20, 0, 28, 36, 37, 21, 34
6273 +/* YYDEFGOTO[NTERM-NUM]. */
6274 +static const yytype_int8 yydefgoto[] =
6276 + -1, 3, 14, 4, 5, 6, 27, 11, 18, 25,
6277 + 29, 44, 45, 54, 61, 62, 55, 30, 31, 7
6280 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
6282 +#define YYPACT_NINF -13
6283 +static const yytype_int8 yypact[] =
6285 + 23, 11, -13, 37, -13, -4, 18, 39, 18, -13,
6286 + 28, -13, -13, 34, -4, 18, 41, -13, -13, -13,
6287 + -13, 25, -13, -13, 34, -3, 34, 33, 34, -13,
6288 + 30, -3, 43, 36, -13, 38, -13, -13, 20, -13,
6289 + -13, -13, -13, -13, 2, 9, -13, -13, -13, -13,
6290 + -13, -13, -13, -13, -2, -6, -13, -13, -13, -13,
6291 + -13, 45, -13, -13, -13, -13, -13
6294 +/* YYPGOTO[NTERM-NUM]. */
6295 +static const yytype_int8 yypgoto[] =
6297 + -13, -13, 35, 27, 47, -13, -12, 40, 17, -13,
6298 + 26, -13, -13, -13, -13, -13, -13, 29, -13, -8
6301 +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
6302 + positive, shift that token. If negative, reduce the rule which
6303 + number is the opposite. If zero, do what YYDEFACT says.
6304 + If YYTABLE_NINF, syntax error. */
6305 +#define YYTABLE_NINF -43
6306 +static const yytype_int8 yytable[] =
6308 + 16, 21, -42, 63, 56, 64, 57, 16, 2, 58,
6309 + 59, 10, 28, 46, 33, 47, 65, 32, 60, 49,
6310 + 50, 51, -42, 32, 8, 48, 1, -42, 52, 2,
6311 + 53, 19, 20, 41, 2, 15, 17, 9, 42, 26,
6312 + 19, 20, 15, 13, 17, 24, 34, 35, 38, 39,
6313 + 23, 40, 66, 12, 22, 43, 0, 36, 0, 0,
6317 +static const yytype_int8 yycheck[] =
6319 + 8, 13, 5, 9, 6, 11, 8, 15, 11, 11,
6320 + 12, 15, 24, 11, 26, 13, 22, 25, 20, 10,
6321 + 11, 12, 4, 31, 13, 23, 3, 4, 19, 11,
6322 + 21, 6, 7, 13, 11, 8, 16, 0, 18, 14,
6323 + 6, 7, 15, 4, 16, 4, 13, 17, 5, 13,
6324 + 15, 13, 7, 6, 14, 38, -1, 31, -1, -1,
6328 +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
6329 + symbol of state STATE-NUM. */
6330 +static const yytype_uint8 yystos[] =
6332 + 0, 3, 11, 25, 27, 28, 29, 43, 13, 0,
6333 + 15, 31, 28, 4, 26, 27, 43, 16, 32, 6,
6334 + 7, 30, 31, 26, 4, 33, 14, 30, 30, 34,
6335 + 41, 42, 43, 30, 13, 17, 34, 41, 5, 13,
6336 + 13, 13, 18, 32, 35, 36, 11, 13, 23, 10,
6337 + 11, 12, 19, 21, 37, 40, 6, 8, 11, 12,
6338 + 20, 38, 39, 9, 11, 22, 7
6341 +#define yyerrok (yyerrstatus = 0)
6342 +#define yyclearin (yychar = YYEMPTY)
6343 +#define YYEMPTY (-2)
6346 +#define YYACCEPT goto yyacceptlab
6347 +#define YYABORT goto yyabortlab
6348 +#define YYERROR goto yyerrorlab
6351 +/* Like YYERROR except do call yyerror. This remains here temporarily
6352 + to ease the transition to the new meaning of YYERROR, for GCC.
6353 + Once GCC version 2 has supplanted version 1, this can go. */
6355 +#define YYFAIL goto yyerrlab
6357 +#define YYRECOVERING() (!!yyerrstatus)
6359 +#define YYBACKUP(Token, Value) \
6361 + if (yychar == YYEMPTY && yylen == 1) \
6363 + yychar = (Token); \
6364 + yylval = (Value); \
6365 + yytoken = YYTRANSLATE (yychar); \
6371 + yyerror (YY_("syntax error: cannot back up")); \
6378 +#define YYERRCODE 256
6381 +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
6382 + If N is 0, then set CURRENT to the empty location which ends
6383 + the previous symbol: RHS[0] (always defined). */
6385 +#define YYRHSLOC(Rhs, K) ((Rhs)[K])
6386 +#ifndef YYLLOC_DEFAULT
6387 +# define YYLLOC_DEFAULT(Current, Rhs, N) \
6391 + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
6392 + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
6393 + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
6394 + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
6398 + (Current).first_line = (Current).last_line = \
6399 + YYRHSLOC (Rhs, 0).last_line; \
6400 + (Current).first_column = (Current).last_column = \
6401 + YYRHSLOC (Rhs, 0).last_column; \
6407 +/* YY_LOCATION_PRINT -- Print the location on the stream.
6408 + This macro was not mandated originally: define only if we know
6409 + we won't break user code: when these are the locations we know. */
6411 +#ifndef YY_LOCATION_PRINT
6412 +# if YYLTYPE_IS_TRIVIAL
6413 +# define YY_LOCATION_PRINT(File, Loc) \
6414 + fprintf (File, "%d.%d-%d.%d", \
6415 + (Loc).first_line, (Loc).first_column, \
6416 + (Loc).last_line, (Loc).last_column)
6418 +# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
6423 +/* YYLEX -- calling `yylex' with the right arguments. */
6426 +# define YYLEX yylex (YYLEX_PARAM)
6428 +# define YYLEX yylex ()
6431 +/* Enable debugging if requested. */
6435 +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
6436 +# define YYFPRINTF fprintf
6439 +# define YYDPRINTF(Args) \
6445 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
6449 + YYFPRINTF (stderr, "%s ", Title); \
6450 + yy_symbol_print (stderr, \
6451 + Type, Value, Location); \
6452 + YYFPRINTF (stderr, "\n"); \
6457 +/*--------------------------------.
6458 +| Print this symbol on YYOUTPUT. |
6459 +`--------------------------------*/
6462 +#if (defined __STDC__ || defined __C99__FUNC__ \
6463 + || defined __cplusplus || defined _MSC_VER)
6465 +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
6468 +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
6471 + YYSTYPE const * const yyvaluep;
6472 + YYLTYPE const * const yylocationp;
6477 + YYUSE (yylocationp);
6479 + if (yytype < YYNTOKENS)
6480 + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
6492 +/*--------------------------------.
6493 +| Print this symbol on YYOUTPUT. |
6494 +`--------------------------------*/
6496 +#if (defined __STDC__ || defined __C99__FUNC__ \
6497 + || defined __cplusplus || defined _MSC_VER)
6499 +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
6502 +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
6505 + YYSTYPE const * const yyvaluep;
6506 + YYLTYPE const * const yylocationp;
6509 + if (yytype < YYNTOKENS)
6510 + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
6512 + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
6514 + YY_LOCATION_PRINT (yyoutput, *yylocationp);
6515 + YYFPRINTF (yyoutput, ": ");
6516 + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
6517 + YYFPRINTF (yyoutput, ")");
6520 +/*------------------------------------------------------------------.
6521 +| yy_stack_print -- Print the state stack from its BOTTOM up to its |
6522 +| TOP (included). |
6523 +`------------------------------------------------------------------*/
6525 +#if (defined __STDC__ || defined __C99__FUNC__ \
6526 + || defined __cplusplus || defined _MSC_VER)
6528 +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
6531 +yy_stack_print (bottom, top)
6532 + yytype_int16 *bottom;
6533 + yytype_int16 *top;
6536 + YYFPRINTF (stderr, "Stack now");
6537 + for (; bottom <= top; ++bottom)
6538 + YYFPRINTF (stderr, " %d", *bottom);
6539 + YYFPRINTF (stderr, "\n");
6542 +# define YY_STACK_PRINT(Bottom, Top) \
6545 + yy_stack_print ((Bottom), (Top)); \
6549 +/*------------------------------------------------.
6550 +| Report that the YYRULE is going to be reduced. |
6551 +`------------------------------------------------*/
6553 +#if (defined __STDC__ || defined __C99__FUNC__ \
6554 + || defined __cplusplus || defined _MSC_VER)
6556 +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
6559 +yy_reduce_print (yyvsp, yylsp, yyrule)
6565 + int yynrhs = yyr2[yyrule];
6567 + unsigned long int yylno = yyrline[yyrule];
6568 + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
6569 + yyrule - 1, yylno);
6570 + /* The symbols being reduced. */
6571 + for (yyi = 0; yyi < yynrhs; yyi++)
6573 + fprintf (stderr, " $%d = ", yyi + 1);
6574 + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
6575 + &(yyvsp[(yyi + 1) - (yynrhs)])
6576 + , &(yylsp[(yyi + 1) - (yynrhs)]) );
6577 + fprintf (stderr, "\n");
6581 +# define YY_REDUCE_PRINT(Rule) \
6584 + yy_reduce_print (yyvsp, yylsp, Rule); \
6587 +/* Nonzero means print parse trace. It is left uninitialized so that
6588 + multiple parsers can coexist. */
6590 +#else /* !YYDEBUG */
6591 +# define YYDPRINTF(Args)
6592 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
6593 +# define YY_STACK_PRINT(Bottom, Top)
6594 +# define YY_REDUCE_PRINT(Rule)
6595 +#endif /* !YYDEBUG */
6598 +/* YYINITDEPTH -- initial size of the parser's stacks. */
6599 +#ifndef YYINITDEPTH
6600 +# define YYINITDEPTH 200
6603 +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
6604 + if the built-in stack extension method is used).
6606 + Do not make this value too large; the results are undefined if
6607 + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
6608 + evaluated with infinite-precision integer arithmetic. */
6611 +# define YYMAXDEPTH 10000
6616 +#if YYERROR_VERBOSE
6619 +# if defined __GLIBC__ && defined _STRING_H
6620 +# define yystrlen strlen
6622 +/* Return the length of YYSTR. */
6623 +#if (defined __STDC__ || defined __C99__FUNC__ \
6624 + || defined __cplusplus || defined _MSC_VER)
6626 +yystrlen (const char *yystr)
6630 + const char *yystr;
6634 + for (yylen = 0; yystr[yylen]; yylen++)
6642 +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
6643 +# define yystpcpy stpcpy
6645 +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
6647 +#if (defined __STDC__ || defined __C99__FUNC__ \
6648 + || defined __cplusplus || defined _MSC_VER)
6650 +yystpcpy (char *yydest, const char *yysrc)
6653 +yystpcpy (yydest, yysrc)
6655 + const char *yysrc;
6658 + char *yyd = yydest;
6659 + const char *yys = yysrc;
6661 + while ((*yyd++ = *yys++) != '\0')
6670 +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
6671 + quotes and backslashes, so that it's suitable for yyerror. The
6672 + heuristic is that double-quoting is unnecessary unless the string
6673 + contains an apostrophe, a comma, or backslash (other than
6674 + backslash-backslash). YYSTR is taken from yytname. If YYRES is
6675 + null, do not copy; instead, return the length of what the result
6676 + would have been. */
6678 +yytnamerr (char *yyres, const char *yystr)
6680 + if (*yystr == '"')
6683 + char const *yyp = yystr;
6690 + goto do_not_strip_quotes;
6693 + if (*++yyp != '\\')
6694 + goto do_not_strip_quotes;
6695 + /* Fall through. */
6698 + yyres[yyn] = *yyp;
6704 + yyres[yyn] = '\0';
6707 + do_not_strip_quotes: ;
6711 + return yystrlen (yystr);
6713 + return yystpcpy (yyres, yystr) - yyres;
6717 +/* Copy into YYRESULT an error message about the unexpected token
6718 + YYCHAR while in state YYSTATE. Return the number of bytes copied,
6719 + including the terminating null byte. If YYRESULT is null, do not
6720 + copy anything; just return the number of bytes that would be
6721 + copied. As a special case, return 0 if an ordinary "syntax error"
6722 + message will do. Return YYSIZE_MAXIMUM if overflow occurs during
6723 + size calculation. */
6725 +yysyntax_error (char *yyresult, int yystate, int yychar)
6727 + int yyn = yypact[yystate];
6729 + if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
6733 + int yytype = YYTRANSLATE (yychar);
6734 + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
6735 + YYSIZE_T yysize = yysize0;
6737 + int yysize_overflow = 0;
6738 + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
6739 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
6743 + /* This is so xgettext sees the translatable formats that are
6744 + constructed on the fly. */
6745 + YY_("syntax error, unexpected %s");
6746 + YY_("syntax error, unexpected %s, expecting %s");
6747 + YY_("syntax error, unexpected %s, expecting %s or %s");
6748 + YY_("syntax error, unexpected %s, expecting %s or %s or %s");
6749 + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
6753 + static char const yyunexpected[] = "syntax error, unexpected %s";
6754 + static char const yyexpecting[] = ", expecting %s";
6755 + static char const yyor[] = " or %s";
6756 + char yyformat[sizeof yyunexpected
6757 + + sizeof yyexpecting - 1
6758 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
6759 + * (sizeof yyor - 1))];
6760 + char const *yyprefix = yyexpecting;
6762 + /* Start YYX at -YYN if negative to avoid negative indexes in
6764 + int yyxbegin = yyn < 0 ? -yyn : 0;
6766 + /* Stay within bounds of both yycheck and yytname. */
6767 + int yychecklim = YYLAST - yyn + 1;
6768 + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
6771 + yyarg[0] = yytname[yytype];
6772 + yyfmt = yystpcpy (yyformat, yyunexpected);
6774 + for (yyx = yyxbegin; yyx < yyxend; ++yyx)
6775 + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
6777 + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
6781 + yyformat[sizeof yyunexpected - 1] = '\0';
6784 + yyarg[yycount++] = yytname[yyx];
6785 + yysize1 = yysize + yytnamerr (0, yytname[yyx]);
6786 + yysize_overflow |= (yysize1 < yysize);
6788 + yyfmt = yystpcpy (yyfmt, yyprefix);
6792 + yyf = YY_(yyformat);
6793 + yysize1 = yysize + yystrlen (yyf);
6794 + yysize_overflow |= (yysize1 < yysize);
6797 + if (yysize_overflow)
6798 + return YYSIZE_MAXIMUM;
6802 + /* Avoid sprintf, as that infringes on the user's name space.
6803 + Don't have undefined behavior even if the translation
6804 + produced a string with the wrong number of "%s"s. */
6805 + char *yyp = yyresult;
6807 + while ((*yyp = *yyf) != '\0')
6809 + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
6811 + yyp += yytnamerr (yyp, yyarg[yyi++]);
6824 +#endif /* YYERROR_VERBOSE */
6827 +/*-----------------------------------------------.
6828 +| Release the memory associated to this symbol. |
6829 +`-----------------------------------------------*/
6832 +#if (defined __STDC__ || defined __C99__FUNC__ \
6833 + || defined __cplusplus || defined _MSC_VER)
6835 +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
6838 +yydestruct (yymsg, yytype, yyvaluep, yylocationp)
6839 + const char *yymsg;
6841 + YYSTYPE *yyvaluep;
6842 + YYLTYPE *yylocationp;
6846 + YYUSE (yylocationp);
6849 + yymsg = "Deleting";
6850 + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
6861 +/* Prevent warnings from -Wmissing-prototypes. */
6863 +#ifdef YYPARSE_PARAM
6864 +#if defined __STDC__ || defined __cplusplus
6865 +int yyparse (void *YYPARSE_PARAM);
6869 +#else /* ! YYPARSE_PARAM */
6870 +#if defined __STDC__ || defined __cplusplus
6871 +int yyparse (void);
6875 +#endif /* ! YYPARSE_PARAM */
6879 +/* The look-ahead symbol. */
6882 +/* The semantic value of the look-ahead symbol. */
6885 +/* Number of syntax errors so far. */
6887 +/* Location data for the look-ahead symbol. */
6896 +#ifdef YYPARSE_PARAM
6897 +#if (defined __STDC__ || defined __C99__FUNC__ \
6898 + || defined __cplusplus || defined _MSC_VER)
6900 +yyparse (void *YYPARSE_PARAM)
6903 +yyparse (YYPARSE_PARAM)
6904 + void *YYPARSE_PARAM;
6906 +#else /* ! YYPARSE_PARAM */
6907 +#if (defined __STDC__ || defined __C99__FUNC__ \
6908 + || defined __cplusplus || defined _MSC_VER)
6922 + /* Number of tokens to shift before error messages enabled. */
6924 + /* Look-ahead token as an internal (translated) token number. */
6926 +#if YYERROR_VERBOSE
6927 + /* Buffer for error messages, and its allocated size. */
6928 + char yymsgbuf[128];
6929 + char *yymsg = yymsgbuf;
6930 + YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
6933 + /* Three stacks and their tools:
6934 + `yyss': related to states,
6935 + `yyvs': related to semantic values,
6936 + `yyls': related to locations.
6938 + Refer to the stacks thru separate pointers, to allow yyoverflow
6939 + to reallocate them elsewhere. */
6941 + /* The state stack. */
6942 + yytype_int16 yyssa[YYINITDEPTH];
6943 + yytype_int16 *yyss = yyssa;
6944 + yytype_int16 *yyssp;
6946 + /* The semantic value stack. */
6947 + YYSTYPE yyvsa[YYINITDEPTH];
6948 + YYSTYPE *yyvs = yyvsa;
6951 + /* The location stack. */
6952 + YYLTYPE yylsa[YYINITDEPTH];
6953 + YYLTYPE *yyls = yylsa;
6955 + /* The locations where the error started and ended. */
6956 + YYLTYPE yyerror_range[2];
6958 +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
6960 + YYSIZE_T yystacksize = YYINITDEPTH;
6962 + /* The variables used to return semantic value and location from the
6963 + action routines. */
6967 + /* The number of symbols on the RHS of the reduced rule.
6968 + Keep to zero when no symbol should be popped. */
6971 + YYDPRINTF ((stderr, "Starting parse\n"));
6976 + yychar = YYEMPTY; /* Cause a token to be read. */
6978 + /* Initialize stack pointers.
6979 + Waste one element of value and location stack
6980 + so that they stay on the same level as the state stack.
6981 + The wasted elements are never initialized. */
6986 +#if YYLTYPE_IS_TRIVIAL
6987 + /* Initialize the default location before parsing starts. */
6988 + yylloc.first_line = yylloc.last_line = 1;
6989 + yylloc.first_column = yylloc.last_column = 0;
6994 +/*------------------------------------------------------------.
6995 +| yynewstate -- Push a new state, which is found in yystate. |
6996 +`------------------------------------------------------------*/
6998 + /* In all cases, when you get here, the value and location stacks
6999 + have just been pushed. So pushing a state here evens the stacks. */
7005 + if (yyss + yystacksize - 1 <= yyssp)
7007 + /* Get the current used size of the three stacks, in elements. */
7008 + YYSIZE_T yysize = yyssp - yyss + 1;
7012 + /* Give user a chance to reallocate the stack. Use copies of
7013 + these so that the &'s don't force the real ones into
7015 + YYSTYPE *yyvs1 = yyvs;
7016 + yytype_int16 *yyss1 = yyss;
7017 + YYLTYPE *yyls1 = yyls;
7019 + /* Each stack pointer address is followed by the size of the
7020 + data in use in that stack, in bytes. This used to be a
7021 + conditional around just the two extra args, but that might
7022 + be undefined if yyoverflow is a macro. */
7023 + yyoverflow (YY_("memory exhausted"),
7024 + &yyss1, yysize * sizeof (*yyssp),
7025 + &yyvs1, yysize * sizeof (*yyvsp),
7026 + &yyls1, yysize * sizeof (*yylsp),
7032 +#else /* no yyoverflow */
7033 +# ifndef YYSTACK_RELOCATE
7034 + goto yyexhaustedlab;
7036 + /* Extend the stack our own way. */
7037 + if (YYMAXDEPTH <= yystacksize)
7038 + goto yyexhaustedlab;
7040 + if (YYMAXDEPTH < yystacksize)
7041 + yystacksize = YYMAXDEPTH;
7044 + yytype_int16 *yyss1 = yyss;
7045 + union yyalloc *yyptr =
7046 + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
7048 + goto yyexhaustedlab;
7049 + YYSTACK_RELOCATE (yyss);
7050 + YYSTACK_RELOCATE (yyvs);
7051 + YYSTACK_RELOCATE (yyls);
7052 +# undef YYSTACK_RELOCATE
7053 + if (yyss1 != yyssa)
7054 + YYSTACK_FREE (yyss1);
7057 +#endif /* no yyoverflow */
7059 + yyssp = yyss + yysize - 1;
7060 + yyvsp = yyvs + yysize - 1;
7061 + yylsp = yyls + yysize - 1;
7063 + YYDPRINTF ((stderr, "Stack size increased to %lu\n",
7064 + (unsigned long int) yystacksize));
7066 + if (yyss + yystacksize - 1 <= yyssp)
7070 + YYDPRINTF ((stderr, "Entering state %d\n", yystate));
7079 + /* Do appropriate processing given the current state. Read a
7080 + look-ahead token if we need one and don't already have one. */
7082 + /* First try to decide what to do without reference to look-ahead token. */
7083 + yyn = yypact[yystate];
7084 + if (yyn == YYPACT_NINF)
7087 + /* Not known => get a look-ahead token if don't already have one. */
7089 + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
7090 + if (yychar == YYEMPTY)
7092 + YYDPRINTF ((stderr, "Reading a token: "));
7096 + if (yychar <= YYEOF)
7098 + yychar = yytoken = YYEOF;
7099 + YYDPRINTF ((stderr, "Now at end of input.\n"));
7103 + yytoken = YYTRANSLATE (yychar);
7104 + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
7107 + /* If the proper action on seeing token YYTOKEN is to reduce or to
7108 + detect an error, take that action. */
7110 + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
7112 + yyn = yytable[yyn];
7115 + if (yyn == 0 || yyn == YYTABLE_NINF)
7121 + if (yyn == YYFINAL)
7124 + /* Count tokens shifted since error; after three, turn off error
7129 + /* Shift the look-ahead token. */
7130 + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
7132 + /* Discard the shifted token unless it is eof. */
7133 + if (yychar != YYEOF)
7137 + *++yyvsp = yylval;
7138 + *++yylsp = yylloc;
7142 +/*-----------------------------------------------------------.
7143 +| yydefault -- do the default action for the current state. |
7144 +`-----------------------------------------------------------*/
7146 + yyn = yydefact[yystate];
7152 +/*-----------------------------.
7153 +| yyreduce -- Do a reduction. |
7154 +`-----------------------------*/
7156 + /* yyn is the number of a rule to reduce with. */
7157 + yylen = yyr2[yyn];
7159 + /* If YYLEN is nonzero, implement the default value of the action:
7162 + Otherwise, the following line sets YYVAL to garbage.
7163 + This behavior is undocumented and Bison
7164 + users should not rely upon it. Assigning to YYVAL
7165 + unconditionally makes the parser a bit smaller, and it avoids a
7166 + GCC warning that YYVAL may be used uninitialized. */
7167 + yyval = yyvsp[1-yylen];
7169 + /* Default location. */
7170 + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
7171 + YY_REDUCE_PRINT (yyn);
7175 +#line 86 "dtc-parser.y"
7177 + the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node));
7182 +#line 90 "dtc-parser.y"
7184 + the_boot_info = build_boot_info((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].node));
7189 +#line 97 "dtc-parser.y"
7191 + (yyval.re) = NULL;
7196 +#line 101 "dtc-parser.y"
7198 + (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
7203 +#line 108 "dtc-parser.y"
7205 + (yyval.re) = build_reserve_entry((yyvsp[(3) - (5)].addr), (yyvsp[(4) - (5)].addr), (yyvsp[(1) - (5)].labelref));
7210 +#line 115 "dtc-parser.y"
7212 + (yyval.re) = NULL;
7217 +#line 119 "dtc-parser.y"
7219 + (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
7224 +#line 126 "dtc-parser.y"
7226 + (yyval.re) = (yyvsp[(1) - (1)].re);
7231 +#line 130 "dtc-parser.y"
7233 + (yyval.re) = build_reserve_entry((yyvsp[(3) - (6)].addr), (yyvsp[(5) - (6)].addr) - (yyvsp[(3) - (6)].addr) + 1, (yyvsp[(1) - (6)].labelref));
7238 +#line 137 "dtc-parser.y"
7240 + (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
7245 +#line 141 "dtc-parser.y"
7247 + (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 16, 64);
7252 +#line 148 "dtc-parser.y"
7254 + (yyval.node) = name_node((yyvsp[(2) - (2)].node), "", NULL);
7259 +#line 155 "dtc-parser.y"
7261 + (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
7266 +#line 162 "dtc-parser.y"
7268 + (yyval.proplist) = NULL;
7273 +#line 166 "dtc-parser.y"
7275 + (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
7280 +#line 173 "dtc-parser.y"
7282 + (yyval.prop) = build_property((yyvsp[(2) - (5)].propnodename), (yyvsp[(4) - (5)].data), (yyvsp[(1) - (5)].labelref));
7287 +#line 177 "dtc-parser.y"
7289 + (yyval.prop) = build_property((yyvsp[(2) - (3)].propnodename), empty_data, (yyvsp[(1) - (3)].labelref));
7294 +#line 184 "dtc-parser.y"
7296 + (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
7301 +#line 188 "dtc-parser.y"
7303 + (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
7308 +#line 192 "dtc-parser.y"
7310 + (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
7315 +#line 196 "dtc-parser.y"
7317 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
7322 +#line 200 "dtc-parser.y"
7324 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7329 +#line 207 "dtc-parser.y"
7331 + (yyval.data) = empty_data;
7336 +#line 211 "dtc-parser.y"
7338 + (yyval.data) = (yyvsp[(1) - (2)].data);
7343 +#line 215 "dtc-parser.y"
7345 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7350 +#line 222 "dtc-parser.y"
7352 + (yyval.data) = empty_data;
7357 +#line 226 "dtc-parser.y"
7359 + (yyval.data) = data_append_cell((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].cell));
7364 +#line 230 "dtc-parser.y"
7366 + (yyval.data) = data_append_cell(data_add_marker((yyvsp[(1) - (2)].data), REF_PHANDLE,
7367 + (yyvsp[(2) - (2)].labelref)), -1);
7372 +#line 235 "dtc-parser.y"
7374 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7379 +#line 242 "dtc-parser.y"
7381 + (yyval.cbase) = 16;
7386 +#line 250 "dtc-parser.y"
7388 + (yyval.cell) = eval_literal((yyvsp[(1) - (1)].literal), 0, 32);
7393 +#line 254 "dtc-parser.y"
7395 + (yyval.cell) = eval_literal((yyvsp[(2) - (2)].literal), (yyvsp[(1) - (2)].cbase), 32);
7400 +#line 261 "dtc-parser.y"
7402 + (yyval.data) = empty_data;
7407 +#line 265 "dtc-parser.y"
7409 + (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
7414 +#line 269 "dtc-parser.y"
7416 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7421 +#line 276 "dtc-parser.y"
7423 + (yyval.nodelist) = NULL;
7428 +#line 280 "dtc-parser.y"
7430 + (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
7435 +#line 284 "dtc-parser.y"
7437 + yyerror("syntax error: properties must precede subnodes\n");
7443 +#line 292 "dtc-parser.y"
7445 + (yyval.node) = name_node((yyvsp[(3) - (3)].node), (yyvsp[(2) - (3)].propnodename), (yyvsp[(1) - (3)].labelref));
7450 +#line 299 "dtc-parser.y"
7452 + (yyval.labelref) = NULL;
7457 +#line 303 "dtc-parser.y"
7459 + (yyval.labelref) = (yyvsp[(1) - (1)].labelref);
7464 +/* Line 1267 of yacc.c. */
7465 +#line 1734 "dtc-parser.tab.c"
7468 + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7470 + YYPOPSTACK (yylen);
7472 + YY_STACK_PRINT (yyss, yyssp);
7477 + /* Now `shift' the result of the reduction. Determine what state
7478 + that goes to, based on the state we popped back to and the rule
7479 + number reduced by. */
7483 + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7484 + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7485 + yystate = yytable[yystate];
7487 + yystate = yydefgoto[yyn - YYNTOKENS];
7492 +/*------------------------------------.
7493 +| yyerrlab -- here on detecting error |
7494 +`------------------------------------*/
7496 + /* If not already recovering from an error, report this error. */
7500 +#if ! YYERROR_VERBOSE
7501 + yyerror (YY_("syntax error"));
7504 + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7505 + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7507 + YYSIZE_T yyalloc = 2 * yysize;
7508 + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7509 + yyalloc = YYSTACK_ALLOC_MAXIMUM;
7510 + if (yymsg != yymsgbuf)
7511 + YYSTACK_FREE (yymsg);
7512 + yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7514 + yymsg_alloc = yyalloc;
7518 + yymsg_alloc = sizeof yymsgbuf;
7522 + if (0 < yysize && yysize <= yymsg_alloc)
7524 + (void) yysyntax_error (yymsg, yystate, yychar);
7529 + yyerror (YY_("syntax error"));
7531 + goto yyexhaustedlab;
7537 + yyerror_range[0] = yylloc;
7539 + if (yyerrstatus == 3)
7541 + /* If just tried and failed to reuse look-ahead token after an
7542 + error, discard it. */
7544 + if (yychar <= YYEOF)
7546 + /* Return failure if at end of input. */
7547 + if (yychar == YYEOF)
7552 + yydestruct ("Error: discarding",
7553 + yytoken, &yylval, &yylloc);
7558 + /* Else will try to reuse look-ahead token after shifting the error
7563 +/*---------------------------------------------------.
7564 +| yyerrorlab -- error raised explicitly by YYERROR. |
7565 +`---------------------------------------------------*/
7568 + /* Pacify compilers like GCC when the user code never invokes
7569 + YYERROR and the label yyerrorlab therefore never appears in user
7571 + if (/*CONSTCOND*/ 0)
7574 + yyerror_range[0] = yylsp[1-yylen];
7575 + /* Do not reclaim the symbols of the rule which action triggered
7577 + YYPOPSTACK (yylen);
7579 + YY_STACK_PRINT (yyss, yyssp);
7584 +/*-------------------------------------------------------------.
7585 +| yyerrlab1 -- common code for both syntax error and YYERROR. |
7586 +`-------------------------------------------------------------*/
7588 + yyerrstatus = 3; /* Each real token shifted decrements this. */
7592 + yyn = yypact[yystate];
7593 + if (yyn != YYPACT_NINF)
7596 + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7598 + yyn = yytable[yyn];
7604 + /* Pop the current state because it cannot handle the error token. */
7605 + if (yyssp == yyss)
7608 + yyerror_range[0] = *yylsp;
7609 + yydestruct ("Error: popping",
7610 + yystos[yystate], yyvsp, yylsp);
7613 + YY_STACK_PRINT (yyss, yyssp);
7616 + if (yyn == YYFINAL)
7619 + *++yyvsp = yylval;
7621 + yyerror_range[1] = yylloc;
7622 + /* Using YYLLOC is tempting, but would change the location of
7623 + the look-ahead. YYLOC is available though. */
7624 + YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
7627 + /* Shift the error token. */
7628 + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7634 +/*-------------------------------------.
7635 +| yyacceptlab -- YYACCEPT comes here. |
7636 +`-------------------------------------*/
7641 +/*-----------------------------------.
7642 +| yyabortlab -- YYABORT comes here. |
7643 +`-----------------------------------*/
7649 +/*-------------------------------------------------.
7650 +| yyexhaustedlab -- memory exhaustion comes here. |
7651 +`-------------------------------------------------*/
7653 + yyerror (YY_("memory exhausted"));
7655 + /* Fall through. */
7659 + if (yychar != YYEOF && yychar != YYEMPTY)
7660 + yydestruct ("Cleanup: discarding lookahead",
7661 + yytoken, &yylval, &yylloc);
7662 + /* Do not reclaim the symbols of the rule which action triggered
7663 + this YYABORT or YYACCEPT. */
7664 + YYPOPSTACK (yylen);
7665 + YY_STACK_PRINT (yyss, yyssp);
7666 + while (yyssp != yyss)
7668 + yydestruct ("Cleanup: popping",
7669 + yystos[*yyssp], yyvsp, yylsp);
7673 + if (yyss != yyssa)
7674 + YYSTACK_FREE (yyss);
7676 +#if YYERROR_VERBOSE
7677 + if (yymsg != yymsgbuf)
7678 + YYSTACK_FREE (yymsg);
7680 + /* Make sure YYID is used. */
7681 + return YYID (yyresult);
7685 +#line 308 "dtc-parser.y"
7688 +void yyerror (char const *s)
7690 + const char *fname = srcpos_filename_for_num(yylloc.filenum);
7692 + if (strcmp(fname, "-") == 0)
7695 + fprintf(stderr, "%s:%d %s\n",
7696 + fname, yylloc.first_line, s);
7699 +unsigned long long eval_literal(const char *s, int base, int bits)
7701 + unsigned long long val;
7705 + val = strtoull(s, &e, base);
7707 + yyerror("bad characters in literal");
7708 + else if ((errno == ERANGE)
7709 + || ((bits < 64) && (val >= (1ULL << bits))))
7710 + yyerror("literal out of range");
7711 + else if (errno != 0)
7712 + yyerror("bad literal");
7717 +++ b/arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped
7719 +/* A Bison parser, made by GNU Bison 2.3. */
7721 +/* Skeleton interface for Bison's Yacc-like parsers in C
7723 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7724 + Free Software Foundation, Inc.
7726 + This program is free software; you can redistribute it and/or modify
7727 + it under the terms of the GNU General Public License as published by
7728 + the Free Software Foundation; either version 2, or (at your option)
7729 + any later version.
7731 + This program is distributed in the hope that it will be useful,
7732 + but WITHOUT ANY WARRANTY; without even the implied warranty of
7733 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7734 + GNU General Public License for more details.
7736 + You should have received a copy of the GNU General Public License
7737 + along with this program; if not, write to the Free Software
7738 + Foundation, Inc., 51 Franklin Street, Fifth Floor,
7739 + Boston, MA 02110-1301, USA. */
7741 +/* As a special exception, you may create a larger work that contains
7742 + part or all of the Bison parser skeleton and distribute that work
7743 + under terms of your choice, so long as that work isn't itself a
7744 + parser generator using the skeleton or a modified version thereof
7745 + as a parser skeleton. Alternatively, if you modify or redistribute
7746 + the parser skeleton itself, you may (at your option) remove this
7747 + special exception, which will cause the skeleton and the resulting
7748 + Bison output files to be licensed under the GNU General Public
7749 + License without this special exception.
7751 + This special exception was added by the Free Software Foundation in
7752 + version 2.2 of Bison. */
7755 +#ifndef YYTOKENTYPE
7756 +# define YYTOKENTYPE
7757 + /* Put the tokens into the symbol table, so that GDB and other debuggers
7758 + know about them. */
7759 + enum yytokentype {
7761 + DT_MEMRESERVE = 259,
7762 + DT_PROPNODENAME = 260,
7764 + DT_LEGACYLITERAL = 262,
7774 +#define DT_MEMRESERVE 259
7775 +#define DT_PROPNODENAME 260
7776 +#define DT_LITERAL 261
7777 +#define DT_LEGACYLITERAL 262
7778 +#define DT_BASE 263
7779 +#define DT_BYTE 264
7780 +#define DT_STRING 265
7781 +#define DT_LABEL 266
7787 +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
7788 +typedef union YYSTYPE
7789 +#line 34 "dtc-parser.y"
7791 + char *propnodename;
7794 + unsigned int cbase;
7800 + struct property *prop;
7801 + struct property *proplist;
7802 + struct node *node;
7803 + struct node *nodelist;
7804 + struct reserve_info *re;
7806 +/* Line 1489 of yacc.c. */
7807 +#line 90 "dtc-parser.tab.h"
7809 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
7810 +# define YYSTYPE_IS_DECLARED 1
7811 +# define YYSTYPE_IS_TRIVIAL 1
7814 +extern YYSTYPE yylval;
7816 +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
7817 +typedef struct YYLTYPE
7824 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
7825 +# define YYLTYPE_IS_DECLARED 1
7826 +# define YYLTYPE_IS_TRIVIAL 1
7829 +extern YYLTYPE yylloc;
7831 +++ b/arch/powerpc/boot/dtc-src/dtc-parser.y
7834 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
7837 + * This program is free software; you can redistribute it and/or
7838 + * modify it under the terms of the GNU General Public License as
7839 + * published by the Free Software Foundation; either version 2 of the
7840 + * License, or (at your option) any later version.
7842 + * This program is distributed in the hope that it will be useful,
7843 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7844 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7845 + * General Public License for more details.
7847 + * You should have received a copy of the GNU General Public License
7848 + * along with this program; if not, write to the Free Software
7849 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
7857 +#include "srcpos.h"
7860 +unsigned long long eval_literal(const char *s, int base, int bits);
7862 +extern struct boot_info *the_boot_info;
7867 + char *propnodename;
7870 + unsigned int cbase;
7876 + struct property *prop;
7877 + struct property *proplist;
7878 + struct node *node;
7879 + struct node *nodelist;
7880 + struct reserve_info *re;
7884 +%token DT_MEMRESERVE
7885 +%token <propnodename> DT_PROPNODENAME
7886 +%token <literal> DT_LITERAL
7887 +%token <literal> DT_LEGACYLITERAL
7888 +%token <cbase> DT_BASE
7889 +%token <byte> DT_BYTE
7890 +%token <data> DT_STRING
7891 +%token <labelref> DT_LABEL
7892 +%token <labelref> DT_REF
7894 +%type <data> propdata
7895 +%type <data> propdataprefix
7896 +%type <re> memreserve
7897 +%type <re> memreserves
7898 +%type <re> v0_memreserve
7899 +%type <re> v0_memreserves
7901 +%type <data> celllist
7902 +%type <cbase> cellbase
7903 +%type <cell> cellval
7904 +%type <data> bytestring
7905 +%type <prop> propdef
7906 +%type <proplist> proplist
7908 +%type <node> devicetree
7909 +%type <node> nodedef
7910 +%type <node> subnode
7911 +%type <nodelist> subnodes
7912 +%type <labelref> label
7917 + DT_V1 ';' memreserves devicetree
7919 + the_boot_info = build_boot_info($3, $4);
7921 + | v0_memreserves devicetree
7923 + the_boot_info = build_boot_info($1, $2);
7932 + | memreserve memreserves
7934 + $$ = chain_reserve_entry($1, $2);
7939 + label DT_MEMRESERVE addr addr ';'
7941 + $$ = build_reserve_entry($3, $4, $1);
7950 + | v0_memreserve v0_memreserves
7952 + $$ = chain_reserve_entry($1, $2);
7961 + | label DT_MEMRESERVE addr '-' addr ';'
7963 + $$ = build_reserve_entry($3, $5 - $3 + 1, $1);
7970 + $$ = eval_literal($1, 0, 64);
7972 + | DT_LEGACYLITERAL
7974 + $$ = eval_literal($1, 16, 64);
7981 + $$ = name_node($2, "", NULL);
7986 + '{' proplist subnodes '}' ';'
7988 + $$ = build_node($2, $3);
7997 + | proplist propdef
7999 + $$ = chain_property($2, $1);
8004 + label DT_PROPNODENAME '=' propdata ';'
8006 + $$ = build_property($2, $4, $1);
8008 + | label DT_PROPNODENAME ';'
8010 + $$ = build_property($2, empty_data, $1);
8015 + propdataprefix DT_STRING
8017 + $$ = data_merge($1, $2);
8019 + | propdataprefix '<' celllist '>'
8021 + $$ = data_merge($1, $3);
8023 + | propdataprefix '[' bytestring ']'
8025 + $$ = data_merge($1, $3);
8027 + | propdataprefix DT_REF
8029 + $$ = data_add_marker($1, REF_PATH, $2);
8031 + | propdata DT_LABEL
8033 + $$ = data_add_marker($1, LABEL, $2);
8046 + | propdataprefix DT_LABEL
8048 + $$ = data_add_marker($1, LABEL, $2);
8057 + | celllist cellval
8059 + $$ = data_append_cell($1, $2);
8063 + $$ = data_append_cell(data_add_marker($1, REF_PHANDLE,
8066 + | celllist DT_LABEL
8068 + $$ = data_add_marker($1, LABEL, $2);
8083 + $$ = eval_literal($1, 0, 32);
8085 + | cellbase DT_LEGACYLITERAL
8087 + $$ = eval_literal($2, $1, 32);
8096 + | bytestring DT_BYTE
8098 + $$ = data_append_byte($1, $2);
8100 + | bytestring DT_LABEL
8102 + $$ = data_add_marker($1, LABEL, $2);
8111 + | subnode subnodes
8113 + $$ = chain_node($1, $2);
8117 + yyerror("syntax error: properties must precede subnodes\n");
8123 + label DT_PROPNODENAME nodedef
8125 + $$ = name_node($3, $2, $1);
8142 +void yyerror (char const *s)
8144 + const char *fname = srcpos_filename_for_num(yylloc.filenum);
8146 + if (strcmp(fname, "-") == 0)
8149 + fprintf(stderr, "%s:%d %s\n",
8150 + fname, yylloc.first_line, s);
8153 +unsigned long long eval_literal(const char *s, int base, int bits)
8155 + unsigned long long val;
8159 + val = strtoull(s, &e, base);
8161 + yyerror("bad characters in literal");
8162 + else if ((errno == ERANGE)
8163 + || ((bits < 64) && (val >= (1ULL << bits))))
8164 + yyerror("literal out of range");
8165 + else if (errno != 0)
8166 + yyerror("bad literal");
8170 +++ b/arch/powerpc/boot/dtc-src/dtc.c
8173 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
8176 + * This program is free software; you can redistribute it and/or
8177 + * modify it under the terms of the GNU General Public License as
8178 + * published by the Free Software Foundation; either version 2 of the
8179 + * License, or (at your option) any later version.
8181 + * This program is distributed in the hope that it will be useful,
8182 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8183 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8184 + * General Public License for more details.
8186 + * You should have received a copy of the GNU General Public License
8187 + * along with this program; if not, write to the Free Software
8188 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
8193 +#include "srcpos.h"
8195 +#include "version_gen.h"
8198 + * Command line options
8200 +int quiet; /* Level of quietness */
8201 +int reservenum; /* Number of memory reservation slots */
8202 +int minsize; /* Minimum blob size */
8203 +int padsize; /* Additional padding to blob */
8205 +char *join_path(const char *path, const char *name)
8207 + int lenp = strlen(path);
8208 + int lenn = strlen(name);
8210 + int needslash = 1;
8213 + len = lenp + lenn + 2;
8214 + if ((lenp > 0) && (path[lenp-1] == '/')) {
8219 + str = xmalloc(len);
8220 + memcpy(str, path, lenp);
8225 + memcpy(str+lenp, name, lenn+1);
8229 +void fill_fullpaths(struct node *tree, const char *prefix)
8231 + struct node *child;
8234 + tree->fullpath = join_path(prefix, tree->name);
8236 + unit = strchr(tree->name, '@');
8238 + tree->basenamelen = unit - tree->name;
8240 + tree->basenamelen = strlen(tree->name);
8242 + for_each_child(tree, child)
8243 + fill_fullpaths(child, tree->fullpath);
8246 +static void __attribute__ ((noreturn)) usage(void)
8248 + fprintf(stderr, "Usage:\n");
8249 + fprintf(stderr, "\tdtc [options] <input file>\n");
8250 + fprintf(stderr, "\nOptions:\n");
8251 + fprintf(stderr, "\t-h\n");
8252 + fprintf(stderr, "\t\tThis help text\n");
8253 + fprintf(stderr, "\t-q\n");
8254 + fprintf(stderr, "\t\tQuiet: -q suppress warnings, -qq errors, -qqq all\n");
8255 + fprintf(stderr, "\t-I <input format>\n");
8256 + fprintf(stderr, "\t\tInput formats are:\n");
8257 + fprintf(stderr, "\t\t\tdts - device tree source text\n");
8258 + fprintf(stderr, "\t\t\tdtb - device tree blob\n");
8259 + fprintf(stderr, "\t\t\tfs - /proc/device-tree style directory\n");
8260 + fprintf(stderr, "\t-o <output file>\n");
8261 + fprintf(stderr, "\t-O <output format>\n");
8262 + fprintf(stderr, "\t\tOutput formats are:\n");
8263 + fprintf(stderr, "\t\t\tdts - device tree source text\n");
8264 + fprintf(stderr, "\t\t\tdtb - device tree blob\n");
8265 + fprintf(stderr, "\t\t\tasm - assembler source\n");
8266 + fprintf(stderr, "\t-V <output version>\n");
8267 + fprintf(stderr, "\t\tBlob version to produce, defaults to %d (relevant for dtb\n\t\tand asm output only)\n", DEFAULT_FDT_VERSION);
8268 + fprintf(stderr, "\t-R <number>\n");
8269 + fprintf(stderr, "\t\tMake space for <number> reserve map entries (relevant for \n\t\tdtb and asm output only)\n");
8270 + fprintf(stderr, "\t-S <bytes>\n");
8271 + fprintf(stderr, "\t\tMake the blob at least <bytes> long (extra space)\n");
8272 + fprintf(stderr, "\t-p <bytes>\n");
8273 + fprintf(stderr, "\t\tAdd padding to the blob of <bytes> long (extra space)\n");
8274 + fprintf(stderr, "\t-b <number>\n");
8275 + fprintf(stderr, "\t\tSet the physical boot cpu\n");
8276 + fprintf(stderr, "\t-f\n");
8277 + fprintf(stderr, "\t\tForce - try to produce output even if the input tree has errors\n");
8278 + fprintf(stderr, "\t-v\n");
8279 + fprintf(stderr, "\t\tPrint DTC version and exit\n");
8283 +int main(int argc, char *argv[])
8285 + struct boot_info *bi;
8286 + const char *inform = "dts";
8287 + const char *outform = "dts";
8288 + const char *outname = "-";
8289 + int force = 0, check = 0;
8293 + FILE *outf = NULL;
8294 + int outversion = DEFAULT_FDT_VERSION;
8295 + int boot_cpuid_phys = 0xfeedbeef;
8302 + while ((opt = getopt(argc, argv, "hI:O:o:V:R:S:p:fcqb:v")) != EOF) {
8314 + outversion = strtol(optarg, NULL, 0);
8317 + reservenum = strtol(optarg, NULL, 0);
8320 + minsize = strtol(optarg, NULL, 0);
8323 + padsize = strtol(optarg, NULL, 0);
8335 + boot_cpuid_phys = strtol(optarg, NULL, 0);
8338 + printf("Version: %s\n", DTC_VERSION);
8346 + if (argc > (optind+1))
8348 + else if (argc < (optind+1))
8351 + arg = argv[optind];
8353 + /* minsize and padsize are mutually exclusive */
8354 + if ((minsize) && (padsize)) {
8355 + die("Can't set both -p and -S\n");
8358 + fprintf(stderr, "DTC: %s->%s on file \"%s\"\n",
8359 + inform, outform, arg);
8361 + if (streq(inform, "dts")) {
8362 + bi = dt_from_source(arg);
8363 + } else if (streq(inform, "fs")) {
8364 + bi = dt_from_fs(arg);
8365 + } else if(streq(inform, "dtb")) {
8366 + inf = dtc_open_file(arg);
8367 + bi = dt_from_blob(inf);
8369 + die("Unknown input format \"%s\"\n", inform);
8372 + if (inf && (inf != stdin))
8375 + if (! bi || ! bi->dt)
8376 + die("Couldn't read input tree\n");
8378 + process_checks(force, bi, check, outversion, boot_cpuid_phys);
8380 + if (streq(outname, "-")) {
8383 + outf = fopen(outname, "w");
8385 + die("Couldn't open output file %s: %s\n",
8386 + outname, strerror(errno));
8389 + if (streq(outform, "dts")) {
8390 + dt_to_source(outf, bi);
8391 + } else if (streq(outform, "dtb")) {
8392 + dt_to_blob(outf, bi, outversion, boot_cpuid_phys);
8393 + } else if (streq(outform, "asm")) {
8394 + dt_to_asm(outf, bi, outversion, boot_cpuid_phys);
8395 + } else if (streq(outform, "null")) {
8398 + die("Unknown output format \"%s\"\n", outform);
8404 +++ b/arch/powerpc/boot/dtc-src/dtc.h
8410 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
8413 + * This program is free software; you can redistribute it and/or
8414 + * modify it under the terms of the GNU General Public License as
8415 + * published by the Free Software Foundation; either version 2 of the
8416 + * License, or (at your option) any later version.
8418 + * This program is distributed in the hope that it will be useful,
8419 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8420 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8421 + * General Public License for more details.
8423 + * You should have received a copy of the GNU General Public License
8424 + * along with this program; if not, write to the Free Software
8425 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
8430 +#include <string.h>
8431 +#include <stdlib.h>
8432 +#include <stdint.h>
8433 +#include <stdarg.h>
8434 +#include <assert.h>
8437 +#include <unistd.h>
8438 +#include <netinet/in.h>
8439 +#include <endian.h>
8440 +#include <byteswap.h>
8444 +#define DEFAULT_FDT_VERSION 17
8446 + * Command line options
8448 +extern int quiet; /* Level of quietness */
8449 +extern int reservenum; /* Number of memory reservation slots */
8450 +extern int minsize; /* Minimum blob size */
8451 +extern int padsize; /* Additional padding to blob */
8453 +static inline void __attribute__((noreturn)) die(char * str, ...)
8457 + va_start(ap, str);
8458 + fprintf(stderr, "FATAL ERROR: ");
8459 + vfprintf(stderr, str, ap);
8463 +static inline void *xmalloc(size_t len)
8465 + void *new = malloc(len);
8468 + die("malloc() failed\n");
8473 +static inline void *xrealloc(void *p, size_t len)
8475 + void *new = realloc(p, len);
8478 + die("realloc() failed (len=%d)\n", len);
8483 +typedef uint8_t u8;
8484 +typedef uint16_t u16;
8485 +typedef uint32_t u32;
8486 +typedef uint64_t u64;
8487 +typedef u32 cell_t;
8489 +#define cpu_to_be16(x) htons(x)
8490 +#define be16_to_cpu(x) ntohs(x)
8492 +#define cpu_to_be32(x) htonl(x)
8493 +#define be32_to_cpu(x) ntohl(x)
8495 +#if __BYTE_ORDER == __BIG_ENDIAN
8496 +#define cpu_to_be64(x) (x)
8497 +#define be64_to_cpu(x) (x)
8499 +#define cpu_to_be64(x) bswap_64(x)
8500 +#define be64_to_cpu(x) bswap_64(x)
8503 +#define streq(a, b) (strcmp((a), (b)) == 0)
8504 +#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
8506 +#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
8507 +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
8517 + enum markertype type;
8520 + struct marker *next;
8527 + struct marker *markers;
8531 +#define empty_data ((struct data){ /* all .members = 0 or NULL */ })
8533 +#define for_each_marker(m) \
8534 + for (; (m); (m) = (m)->next)
8535 +#define for_each_marker_of_type(m, t) \
8536 + for_each_marker(m) \
8537 + if ((m)->type == (t))
8539 +void data_free(struct data d);
8541 +struct data data_grow_for(struct data d, int xlen);
8543 +struct data data_copy_mem(const char *mem, int len);
8544 +struct data data_copy_escape_string(const char *s, int len);
8545 +struct data data_copy_file(FILE *f, size_t len);
8547 +struct data data_append_data(struct data d, const void *p, int len);
8548 +struct data data_insert_at_marker(struct data d, struct marker *m,
8549 + const void *p, int len);
8550 +struct data data_merge(struct data d1, struct data d2);
8551 +struct data data_append_cell(struct data d, cell_t word);
8552 +struct data data_append_re(struct data d, const struct fdt_reserve_entry *re);
8553 +struct data data_append_addr(struct data d, u64 addr);
8554 +struct data data_append_byte(struct data d, uint8_t byte);
8555 +struct data data_append_zeroes(struct data d, int len);
8556 +struct data data_append_align(struct data d, int align);
8558 +struct data data_add_marker(struct data d, enum markertype type, char *ref);
8560 +int data_is_one_string(struct data d);
8562 +/* DT constraints */
8564 +#define MAX_PROPNAME_LEN 31
8565 +#define MAX_NODENAME_LEN 31
8572 + struct property *next;
8579 + struct property *proplist;
8580 + struct node *children;
8582 + struct node *parent;
8583 + struct node *next_sibling;
8589 + int addr_cells, size_cells;
8594 +#define for_each_property(n, p) \
8595 + for ((p) = (n)->proplist; (p); (p) = (p)->next)
8597 +#define for_each_child(n, c) \
8598 + for ((c) = (n)->children; (c); (c) = (c)->next_sibling)
8600 +struct property *build_property(char *name, struct data val, char *label);
8601 +struct property *chain_property(struct property *first, struct property *list);
8602 +struct property *reverse_properties(struct property *first);
8604 +struct node *build_node(struct property *proplist, struct node *children);
8605 +struct node *name_node(struct node *node, char *name, char *label);
8606 +struct node *chain_node(struct node *first, struct node *list);
8608 +void add_property(struct node *node, struct property *prop);
8609 +void add_child(struct node *parent, struct node *child);
8611 +const char *get_unitname(struct node *node);
8612 +struct property *get_property(struct node *node, const char *propname);
8613 +cell_t propval_cell(struct property *prop);
8614 +struct node *get_subnode(struct node *node, const char *nodename);
8615 +struct node *get_node_by_path(struct node *tree, const char *path);
8616 +struct node *get_node_by_label(struct node *tree, const char *label);
8617 +struct node *get_node_by_phandle(struct node *tree, cell_t phandle);
8618 +struct node *get_node_by_ref(struct node *tree, const char *ref);
8619 +cell_t get_node_phandle(struct node *root, struct node *node);
8621 +/* Boot info (tree plus memreserve information */
8623 +struct reserve_info {
8624 + struct fdt_reserve_entry re;
8626 + struct reserve_info *next;
8631 +struct reserve_info *build_reserve_entry(u64 start, u64 len, char *label);
8632 +struct reserve_info *chain_reserve_entry(struct reserve_info *first,
8633 + struct reserve_info *list);
8634 +struct reserve_info *add_reserve_entry(struct reserve_info *list,
8635 + struct reserve_info *new);
8639 + struct reserve_info *reservelist;
8640 + struct node *dt; /* the device tree */
8643 +struct boot_info *build_boot_info(struct reserve_info *reservelist,
8644 + struct node *tree);
8648 +void process_checks(int force, struct boot_info *bi,
8649 + int checkflag, int outversion, int boot_cpuid_phys);
8651 +/* Flattened trees */
8653 +void dt_to_blob(FILE *f, struct boot_info *bi, int version,
8654 + int boot_cpuid_phys);
8655 +void dt_to_asm(FILE *f, struct boot_info *bi, int version,
8656 + int boot_cpuid_phys);
8658 +struct boot_info *dt_from_blob(FILE *f);
8662 +void dt_to_source(FILE *f, struct boot_info *bi);
8663 +struct boot_info *dt_from_source(const char *f);
8667 +struct boot_info *dt_from_fs(const char *dirname);
8671 +char *join_path(const char *path, const char *name);
8672 +void fill_fullpaths(struct node *tree, const char *prefix);
8674 +#endif /* _DTC_H */
8676 +++ b/arch/powerpc/boot/dtc-src/flattree.c
8679 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
8682 + * This program is free software; you can redistribute it and/or
8683 + * modify it under the terms of the GNU General Public License as
8684 + * published by the Free Software Foundation; either version 2 of the
8685 + * License, or (at your option) any later version.
8687 + * This program is distributed in the hope that it will be useful,
8688 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8689 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8690 + * General Public License for more details.
8692 + * You should have received a copy of the GNU General Public License
8693 + * along with this program; if not, write to the Free Software
8694 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
8700 +#define FTF_FULLPATH 0x1
8701 +#define FTF_VARALIGN 0x2
8702 +#define FTF_NAMEPROPS 0x4
8703 +#define FTF_BOOTCPUID 0x8
8704 +#define FTF_STRTABSIZE 0x10
8705 +#define FTF_STRUCTSIZE 0x20
8706 +#define FTF_NOPS 0x40
8708 +static struct version_info {
8710 + int last_comp_version;
8713 +} version_table[] = {
8714 + {1, 1, FDT_V1_SIZE,
8715 + FTF_FULLPATH|FTF_VARALIGN|FTF_NAMEPROPS},
8716 + {2, 1, FDT_V2_SIZE,
8717 + FTF_FULLPATH|FTF_VARALIGN|FTF_NAMEPROPS|FTF_BOOTCPUID},
8718 + {3, 1, FDT_V3_SIZE,
8719 + FTF_FULLPATH|FTF_VARALIGN|FTF_NAMEPROPS|FTF_BOOTCPUID|FTF_STRTABSIZE},
8720 + {16, 16, FDT_V3_SIZE,
8721 + FTF_BOOTCPUID|FTF_STRTABSIZE|FTF_NOPS},
8722 + {17, 16, FDT_V17_SIZE,
8723 + FTF_BOOTCPUID|FTF_STRTABSIZE|FTF_STRUCTSIZE|FTF_NOPS},
8727 + void (*cell)(void *, cell_t);
8728 + void (*string)(void *, char *, int);
8729 + void (*align)(void *, int);
8730 + void (*data)(void *, struct data);
8731 + void (*beginnode)(void *, const char *);
8732 + void (*endnode)(void *, const char *);
8733 + void (*property)(void *, const char *);
8736 +static void bin_emit_cell(void *e, cell_t val)
8738 + struct data *dtbuf = e;
8740 + *dtbuf = data_append_cell(*dtbuf, val);
8743 +static void bin_emit_string(void *e, char *str, int len)
8745 + struct data *dtbuf = e;
8748 + len = strlen(str);
8750 + *dtbuf = data_append_data(*dtbuf, str, len);
8751 + *dtbuf = data_append_byte(*dtbuf, '\0');
8754 +static void bin_emit_align(void *e, int a)
8756 + struct data *dtbuf = e;
8758 + *dtbuf = data_append_align(*dtbuf, a);
8761 +static void bin_emit_data(void *e, struct data d)
8763 + struct data *dtbuf = e;
8765 + *dtbuf = data_append_data(*dtbuf, d.val, d.len);
8768 +static void bin_emit_beginnode(void *e, const char *label)
8770 + bin_emit_cell(e, FDT_BEGIN_NODE);
8773 +static void bin_emit_endnode(void *e, const char *label)
8775 + bin_emit_cell(e, FDT_END_NODE);
8778 +static void bin_emit_property(void *e, const char *label)
8780 + bin_emit_cell(e, FDT_PROP);
8783 +static struct emitter bin_emitter = {
8784 + .cell = bin_emit_cell,
8785 + .string = bin_emit_string,
8786 + .align = bin_emit_align,
8787 + .data = bin_emit_data,
8788 + .beginnode = bin_emit_beginnode,
8789 + .endnode = bin_emit_endnode,
8790 + .property = bin_emit_property,
8793 +static void emit_label(FILE *f, const char *prefix, const char *label)
8795 + fprintf(f, "\t.globl\t%s_%s\n", prefix, label);
8796 + fprintf(f, "%s_%s:\n", prefix, label);
8797 + fprintf(f, "_%s_%s:\n", prefix, label);
8800 +static void emit_offset_label(FILE *f, const char *label, int offset)
8802 + fprintf(f, "\t.globl\t%s\n", label);
8803 + fprintf(f, "%s\t= . + %d\n", label, offset);
8806 +static void asm_emit_cell(void *e, cell_t val)
8810 + fprintf(f, "\t.long\t0x%x\n", val);
8813 +static void asm_emit_string(void *e, char *str, int len)
8824 + fprintf(f, "\t.string\t\"%s\"\n", str);
8831 +static void asm_emit_align(void *e, int a)
8835 + fprintf(f, "\t.balign\t%d\n", a);
8838 +static void asm_emit_data(void *e, struct data d)
8846 + if (m->type == LABEL)
8847 + emit_offset_label(f, m->ref, m->offset);
8851 + while ((d.len - off) >= sizeof(u32)) {
8852 + fprintf(f, "\t.long\t0x%x\n",
8853 + be32_to_cpu(*((u32 *)(d.val+off))));
8854 + off += sizeof(u32);
8857 + if ((d.len - off) >= sizeof(u16)) {
8858 + fprintf(f, "\t.short\t0x%hx\n",
8859 + be16_to_cpu(*((u16 *)(d.val+off))));
8860 + off += sizeof(u16);
8863 + if ((d.len - off) >= 1) {
8864 + fprintf(f, "\t.byte\t0x%hhx\n", d.val[off]);
8868 + assert(off == d.len);
8871 +static void asm_emit_beginnode(void *e, const char *label)
8876 + fprintf(f, "\t.globl\t%s\n", label);
8877 + fprintf(f, "%s:\n", label);
8879 + fprintf(f, "\t.long\tFDT_BEGIN_NODE\n");
8882 +static void asm_emit_endnode(void *e, const char *label)
8886 + fprintf(f, "\t.long\tFDT_END_NODE\n");
8888 + fprintf(f, "\t.globl\t%s_end\n", label);
8889 + fprintf(f, "%s_end:\n", label);
8893 +static void asm_emit_property(void *e, const char *label)
8898 + fprintf(f, "\t.globl\t%s\n", label);
8899 + fprintf(f, "%s:\n", label);
8901 + fprintf(f, "\t.long\tFDT_PROP\n");
8904 +static struct emitter asm_emitter = {
8905 + .cell = asm_emit_cell,
8906 + .string = asm_emit_string,
8907 + .align = asm_emit_align,
8908 + .data = asm_emit_data,
8909 + .beginnode = asm_emit_beginnode,
8910 + .endnode = asm_emit_endnode,
8911 + .property = asm_emit_property,
8914 +static int stringtable_insert(struct data *d, const char *str)
8918 + /* FIXME: do this more efficiently? */
8920 + for (i = 0; i < d->len; i++) {
8921 + if (streq(str, d->val + i))
8925 + *d = data_append_data(*d, str, strlen(str)+1);
8929 +static void flatten_tree(struct node *tree, struct emitter *emit,
8930 + void *etarget, struct data *strbuf,
8931 + struct version_info *vi)
8933 + struct property *prop;
8934 + struct node *child;
8935 + int seen_name_prop = 0;
8937 + emit->beginnode(etarget, tree->label);
8939 + if (vi->flags & FTF_FULLPATH)
8940 + emit->string(etarget, tree->fullpath, 0);
8942 + emit->string(etarget, tree->name, 0);
8944 + emit->align(etarget, sizeof(cell_t));
8946 + for_each_property(tree, prop) {
8949 + if (streq(prop->name, "name"))
8950 + seen_name_prop = 1;
8952 + nameoff = stringtable_insert(strbuf, prop->name);
8954 + emit->property(etarget, prop->label);
8955 + emit->cell(etarget, prop->val.len);
8956 + emit->cell(etarget, nameoff);
8958 + if ((vi->flags & FTF_VARALIGN) && (prop->val.len >= 8))
8959 + emit->align(etarget, 8);
8961 + emit->data(etarget, prop->val);
8962 + emit->align(etarget, sizeof(cell_t));
8965 + if ((vi->flags & FTF_NAMEPROPS) && !seen_name_prop) {
8966 + emit->property(etarget, NULL);
8967 + emit->cell(etarget, tree->basenamelen+1);
8968 + emit->cell(etarget, stringtable_insert(strbuf, "name"));
8970 + if ((vi->flags & FTF_VARALIGN) && ((tree->basenamelen+1) >= 8))
8971 + emit->align(etarget, 8);
8973 + emit->string(etarget, tree->name, tree->basenamelen);
8974 + emit->align(etarget, sizeof(cell_t));
8977 + for_each_child(tree, child) {
8978 + flatten_tree(child, emit, etarget, strbuf, vi);
8981 + emit->endnode(etarget, tree->label);
8984 +static struct data flatten_reserve_list(struct reserve_info *reservelist,
8985 + struct version_info *vi)
8987 + struct reserve_info *re;
8988 + struct data d = empty_data;
8989 + static struct fdt_reserve_entry null_re = {0,0};
8992 + for (re = reservelist; re; re = re->next) {
8993 + d = data_append_re(d, &re->re);
8996 + * Add additional reserved slots if the user asked for them.
8998 + for (j = 0; j < reservenum; j++) {
8999 + d = data_append_re(d, &null_re);
9005 +static void make_fdt_header(struct fdt_header *fdt,
9006 + struct version_info *vi,
9007 + int reservesize, int dtsize, int strsize,
9008 + int boot_cpuid_phys)
9012 + reservesize += sizeof(struct fdt_reserve_entry);
9014 + memset(fdt, 0xff, sizeof(*fdt));
9016 + fdt->magic = cpu_to_be32(FDT_MAGIC);
9017 + fdt->version = cpu_to_be32(vi->version);
9018 + fdt->last_comp_version = cpu_to_be32(vi->last_comp_version);
9020 + /* Reserve map should be doubleword aligned */
9021 + reserve_off = ALIGN(vi->hdr_size, 8);
9023 + fdt->off_mem_rsvmap = cpu_to_be32(reserve_off);
9024 + fdt->off_dt_struct = cpu_to_be32(reserve_off + reservesize);
9025 + fdt->off_dt_strings = cpu_to_be32(reserve_off + reservesize
9027 + fdt->totalsize = cpu_to_be32(reserve_off + reservesize + dtsize + strsize);
9029 + if (vi->flags & FTF_BOOTCPUID)
9030 + fdt->boot_cpuid_phys = cpu_to_be32(boot_cpuid_phys);
9031 + if (vi->flags & FTF_STRTABSIZE)
9032 + fdt->size_dt_strings = cpu_to_be32(strsize);
9033 + if (vi->flags & FTF_STRUCTSIZE)
9034 + fdt->size_dt_struct = cpu_to_be32(dtsize);
9037 +void dt_to_blob(FILE *f, struct boot_info *bi, int version,
9038 + int boot_cpuid_phys)
9040 + struct version_info *vi = NULL;
9042 + struct data blob = empty_data;
9043 + struct data reservebuf = empty_data;
9044 + struct data dtbuf = empty_data;
9045 + struct data strbuf = empty_data;
9046 + struct fdt_header fdt;
9049 + for (i = 0; i < ARRAY_SIZE(version_table); i++) {
9050 + if (version_table[i].version == version)
9051 + vi = &version_table[i];
9054 + die("Unknown device tree blob version %d\n", version);
9056 + flatten_tree(bi->dt, &bin_emitter, &dtbuf, &strbuf, vi);
9057 + bin_emit_cell(&dtbuf, FDT_END);
9059 + reservebuf = flatten_reserve_list(bi->reservelist, vi);
9062 + make_fdt_header(&fdt, vi, reservebuf.len, dtbuf.len, strbuf.len,
9066 + * If the user asked for more space than is used, adjust the totalsize.
9068 + if (minsize > 0) {
9069 + padlen = minsize - be32_to_cpu(fdt.totalsize);
9070 + if ((padlen < 0) && (quiet < 1))
9072 + "Warning: blob size %d >= minimum size %d\n",
9073 + be32_to_cpu(fdt.totalsize), minsize);
9080 + int tsize = be32_to_cpu(fdt.totalsize);
9082 + fdt.totalsize = cpu_to_be32(tsize);
9086 + * Assemble the blob: start with the header, add with alignment
9087 + * the reserve buffer, add the reserve map terminating zeroes,
9088 + * the device tree itself, and finally the strings.
9090 + blob = data_append_data(blob, &fdt, sizeof(fdt));
9091 + blob = data_append_align(blob, 8);
9092 + blob = data_merge(blob, reservebuf);
9093 + blob = data_append_zeroes(blob, sizeof(struct fdt_reserve_entry));
9094 + blob = data_merge(blob, dtbuf);
9095 + blob = data_merge(blob, strbuf);
9098 + * If the user asked for more space than is used, pad out the blob.
9101 + blob = data_append_zeroes(blob, padlen);
9103 + fwrite(blob.val, blob.len, 1, f);
9106 + die("Error writing device tree blob: %s\n", strerror(errno));
9109 + * data_merge() frees the right-hand element so only the blob
9110 + * remains to be freed.
9115 +static void dump_stringtable_asm(FILE *f, struct data strbuf)
9122 + while (p < (strbuf.val + strbuf.len)) {
9124 + fprintf(f, "\t.string \"%s\"\n", p);
9129 +void dt_to_asm(FILE *f, struct boot_info *bi, int version, int boot_cpuid_phys)
9131 + struct version_info *vi = NULL;
9133 + struct data strbuf = empty_data;
9134 + struct reserve_info *re;
9135 + const char *symprefix = "dt";
9137 + for (i = 0; i < ARRAY_SIZE(version_table); i++) {
9138 + if (version_table[i].version == version)
9139 + vi = &version_table[i];
9142 + die("Unknown device tree blob version %d\n", version);
9144 + fprintf(f, "/* autogenerated by dtc, do not edit */\n\n");
9145 + fprintf(f, "#define FDT_MAGIC 0x%x\n", FDT_MAGIC);
9146 + fprintf(f, "#define FDT_BEGIN_NODE 0x%x\n", FDT_BEGIN_NODE);
9147 + fprintf(f, "#define FDT_END_NODE 0x%x\n", FDT_END_NODE);
9148 + fprintf(f, "#define FDT_PROP 0x%x\n", FDT_PROP);
9149 + fprintf(f, "#define FDT_END 0x%x\n", FDT_END);
9152 + emit_label(f, symprefix, "blob_start");
9153 + emit_label(f, symprefix, "header");
9154 + fprintf(f, "\t.long\tFDT_MAGIC\t\t\t\t/* magic */\n");
9155 + fprintf(f, "\t.long\t_%s_blob_abs_end - _%s_blob_start\t/* totalsize */\n",
9156 + symprefix, symprefix);
9157 + fprintf(f, "\t.long\t_%s_struct_start - _%s_blob_start\t/* off_dt_struct */\n",
9158 + symprefix, symprefix);
9159 + fprintf(f, "\t.long\t_%s_strings_start - _%s_blob_start\t/* off_dt_strings */\n",
9160 + symprefix, symprefix);
9161 + fprintf(f, "\t.long\t_%s_reserve_map - _%s_blob_start\t/* off_dt_strings */\n",
9162 + symprefix, symprefix);
9163 + fprintf(f, "\t.long\t%d\t\t\t\t\t/* version */\n", vi->version);
9164 + fprintf(f, "\t.long\t%d\t\t\t\t\t/* last_comp_version */\n",
9165 + vi->last_comp_version);
9167 + if (vi->flags & FTF_BOOTCPUID)
9168 + fprintf(f, "\t.long\t%i\t\t\t\t\t/* boot_cpuid_phys */\n",
9171 + if (vi->flags & FTF_STRTABSIZE)
9172 + fprintf(f, "\t.long\t_%s_strings_end - _%s_strings_start\t/* size_dt_strings */\n",
9173 + symprefix, symprefix);
9175 + if (vi->flags & FTF_STRUCTSIZE)
9176 + fprintf(f, "\t.long\t_%s_struct_end - _%s_struct_start\t/* size_dt_struct */\n",
9177 + symprefix, symprefix);
9180 + * Reserve map entries.
9181 + * Align the reserve map to a doubleword boundary.
9182 + * Each entry is an (address, size) pair of u64 values.
9183 + * Always supply a zero-sized temination entry.
9185 + asm_emit_align(f, 8);
9186 + emit_label(f, symprefix, "reserve_map");
9188 + fprintf(f, "/* Memory reserve map from source file */\n");
9191 + * Use .long on high and low halfs of u64s to avoid .quad
9192 + * as it appears .quad isn't available in some assemblers.
9194 + for (re = bi->reservelist; re; re = re->next) {
9196 + fprintf(f, "\t.globl\t%s\n", re->label);
9197 + fprintf(f, "%s:\n", re->label);
9199 + fprintf(f, "\t.long\t0x%08x, 0x%08x\n",
9200 + (unsigned int)(re->re.address >> 32),
9201 + (unsigned int)(re->re.address & 0xffffffff));
9202 + fprintf(f, "\t.long\t0x%08x, 0x%08x\n",
9203 + (unsigned int)(re->re.size >> 32),
9204 + (unsigned int)(re->re.size & 0xffffffff));
9206 + for (i = 0; i < reservenum; i++) {
9207 + fprintf(f, "\t.long\t0, 0\n\t.long\t0, 0\n");
9210 + fprintf(f, "\t.long\t0, 0\n\t.long\t0, 0\n");
9212 + emit_label(f, symprefix, "struct_start");
9213 + flatten_tree(bi->dt, &asm_emitter, f, &strbuf, vi);
9214 + fprintf(f, "\t.long\tFDT_END\n");
9215 + emit_label(f, symprefix, "struct_end");
9217 + emit_label(f, symprefix, "strings_start");
9218 + dump_stringtable_asm(f, strbuf);
9219 + emit_label(f, symprefix, "strings_end");
9221 + emit_label(f, symprefix, "blob_end");
9224 + * If the user asked for more space than is used, pad it out.
9226 + if (minsize > 0) {
9227 + fprintf(f, "\t.space\t%d - (_%s_blob_end - _%s_blob_start), 0\n",
9228 + minsize, symprefix, symprefix);
9230 + if (padsize > 0) {
9231 + fprintf(f, "\t.space\t%d, 0\n", padsize);
9233 + emit_label(f, symprefix, "blob_abs_end");
9235 + data_free(strbuf);
9239 + char *base, *limit, *ptr;
9242 +static void inbuf_init(struct inbuf *inb, void *base, void *limit)
9245 + inb->limit = limit;
9246 + inb->ptr = inb->base;
9249 +static void flat_read_chunk(struct inbuf *inb, void *p, int len)
9251 + if ((inb->ptr + len) > inb->limit)
9252 + die("Premature end of data parsing flat device tree\n");
9254 + memcpy(p, inb->ptr, len);
9259 +static u32 flat_read_word(struct inbuf *inb)
9263 + assert(((inb->ptr - inb->base) % sizeof(val)) == 0);
9265 + flat_read_chunk(inb, &val, sizeof(val));
9267 + return be32_to_cpu(val);
9270 +static void flat_realign(struct inbuf *inb, int align)
9272 + int off = inb->ptr - inb->base;
9274 + inb->ptr = inb->base + ALIGN(off, align);
9275 + if (inb->ptr > inb->limit)
9276 + die("Premature end of data parsing flat device tree\n");
9279 +static char *flat_read_string(struct inbuf *inb)
9282 + const char *p = inb->ptr;
9286 + if (p >= inb->limit)
9287 + die("Premature end of data parsing flat device tree\n");
9289 + } while ((*p++) != '\0');
9291 + str = strdup(inb->ptr);
9295 + flat_realign(inb, sizeof(u32));
9300 +static struct data flat_read_data(struct inbuf *inb, int len)
9302 + struct data d = empty_data;
9305 + return empty_data;
9307 + d = data_grow_for(d, len);
9310 + flat_read_chunk(inb, d.val, len);
9312 + flat_realign(inb, sizeof(u32));
9317 +static char *flat_read_stringtable(struct inbuf *inb, int offset)
9321 + p = inb->base + offset;
9323 + if (p >= inb->limit || p < inb->base)
9324 + die("String offset %d overruns string table\n",
9333 + return strdup(inb->base + offset);
9336 +static struct property *flat_read_property(struct inbuf *dtbuf,
9337 + struct inbuf *strbuf, int flags)
9339 + u32 proplen, stroff;
9343 + proplen = flat_read_word(dtbuf);
9344 + stroff = flat_read_word(dtbuf);
9346 + name = flat_read_stringtable(strbuf, stroff);
9348 + if ((flags & FTF_VARALIGN) && (proplen >= 8))
9349 + flat_realign(dtbuf, 8);
9351 + val = flat_read_data(dtbuf, proplen);
9353 + return build_property(name, val, NULL);
9357 +static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
9359 + struct reserve_info *reservelist = NULL;
9360 + struct reserve_info *new;
9362 + struct fdt_reserve_entry re;
9365 + * Each entry is a pair of u64 (addr, size) values for 4 cell_t's.
9366 + * List terminates at an entry with size equal to zero.
9368 + * First pass, count entries.
9372 + flat_read_chunk(inb, &re, sizeof(re));
9373 + re.address = be64_to_cpu(re.address);
9374 + re.size = be64_to_cpu(re.size);
9378 + new = build_reserve_entry(re.address, re.size, NULL);
9379 + reservelist = add_reserve_entry(reservelist, new);
9382 + return reservelist;
9386 +static char *nodename_from_path(const char *ppath, const char *cpath)
9388 + const char *lslash;
9391 + lslash = strrchr(cpath, '/');
9395 + plen = lslash - cpath;
9397 + if (streq(cpath, "/") && streq(ppath, ""))
9400 + if ((plen == 0) && streq(ppath, "/"))
9401 + return strdup(lslash+1);
9403 + if (! strneq(ppath, cpath, plen))
9406 + return strdup(lslash+1);
9409 +static const char PROPCHAR[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,._+*#?-";
9410 +static const char UNITCHAR[] = "0123456789abcdef,";
9412 +static int check_node_name(const char *name)
9414 + const char *atpos;
9417 + atpos = strrchr(name, '@');
9420 + basenamelen = atpos - name;
9422 + basenamelen = strlen(name);
9424 + if (strspn(name, PROPCHAR) < basenamelen)
9428 + && ((basenamelen + 1 + strspn(atpos+1, UNITCHAR)) < strlen(name)))
9431 + return basenamelen;
9434 +static struct node *unflatten_tree(struct inbuf *dtbuf,
9435 + struct inbuf *strbuf,
9436 + const char *parent_path, int flags)
9438 + struct node *node;
9441 + node = build_node(NULL, NULL);
9443 + if (flags & FTF_FULLPATH) {
9444 + node->fullpath = flat_read_string(dtbuf);
9445 + node->name = nodename_from_path(parent_path, node->fullpath);
9448 + die("Path \"%s\" is not valid as a child of \"%s\"\n",
9449 + node->fullpath, parent_path);
9451 + node->name = flat_read_string(dtbuf);
9452 + node->fullpath = join_path(parent_path, node->name);
9455 + node->basenamelen = check_node_name(node->name);
9456 + if (node->basenamelen < 0) {
9457 + fprintf(stderr, "Warning \"%s\" has incorrect format\n", node->name);
9461 + struct property *prop;
9462 + struct node *child;
9464 + val = flat_read_word(dtbuf);
9467 + if (node->children)
9468 + fprintf(stderr, "Warning: Flat tree input has "
9469 + "subnodes preceding a property.\n");
9470 + prop = flat_read_property(dtbuf, strbuf, flags);
9471 + add_property(node, prop);
9474 + case FDT_BEGIN_NODE:
9475 + child = unflatten_tree(dtbuf,strbuf, node->fullpath,
9477 + add_child(node, child);
9480 + case FDT_END_NODE:
9484 + die("Premature FDT_END in device tree blob\n");
9488 + if (!(flags & FTF_NOPS))
9489 + fprintf(stderr, "Warning: NOP tag found in flat tree"
9490 + " version <16\n");
9496 + die("Invalid opcode word %08x in device tree blob\n",
9499 + } while (val != FDT_END_NODE);
9505 +struct boot_info *dt_from_blob(FILE *f)
9507 + u32 magic, totalsize, version, size_str, size_dt;
9508 + u32 off_dt, off_str, off_mem_rsvmap;
9511 + struct fdt_header *fdt;
9513 + struct inbuf dtbuf, strbuf;
9514 + struct inbuf memresvbuf;
9516 + struct reserve_info *reservelist;
9517 + struct node *tree;
9521 + rc = fread(&magic, sizeof(magic), 1, f);
9523 + die("Error reading DT blob magic number: %s\n",
9527 + die("EOF reading DT blob magic number\n");
9529 + die("Mysterious short read reading magic number\n");
9532 + magic = be32_to_cpu(magic);
9533 + if (magic != FDT_MAGIC)
9534 + die("Blob has incorrect magic number\n");
9536 + rc = fread(&totalsize, sizeof(totalsize), 1, f);
9538 + die("Error reading DT blob size: %s\n", strerror(errno));
9541 + die("EOF reading DT blob size\n");
9543 + die("Mysterious short read reading blob size\n");
9546 + totalsize = be32_to_cpu(totalsize);
9547 + if (totalsize < FDT_V1_SIZE)
9548 + die("DT blob size (%d) is too small\n", totalsize);
9550 + blob = xmalloc(totalsize);
9552 + fdt = (struct fdt_header *)blob;
9553 + fdt->magic = cpu_to_be32(magic);
9554 + fdt->totalsize = cpu_to_be32(totalsize);
9556 + sizeleft = totalsize - sizeof(magic) - sizeof(totalsize);
9557 + p = blob + sizeof(magic) + sizeof(totalsize);
9559 + while (sizeleft) {
9561 + die("EOF before reading %d bytes of DT blob\n",
9564 + rc = fread(p, 1, sizeleft, f);
9566 + die("Error reading DT blob: %s\n",
9573 + off_dt = be32_to_cpu(fdt->off_dt_struct);
9574 + off_str = be32_to_cpu(fdt->off_dt_strings);
9575 + off_mem_rsvmap = be32_to_cpu(fdt->off_mem_rsvmap);
9576 + version = be32_to_cpu(fdt->version);
9578 + fprintf(stderr, "\tmagic:\t\t\t0x%x\n", magic);
9579 + fprintf(stderr, "\ttotalsize:\t\t%d\n", totalsize);
9580 + fprintf(stderr, "\toff_dt_struct:\t\t0x%x\n", off_dt);
9581 + fprintf(stderr, "\toff_dt_strings:\t\t0x%x\n", off_str);
9582 + fprintf(stderr, "\toff_mem_rsvmap:\t\t0x%x\n", off_mem_rsvmap);
9583 + fprintf(stderr, "\tversion:\t\t0x%x\n", version );
9584 + fprintf(stderr, "\tlast_comp_version:\t0x%x\n",
9585 + be32_to_cpu(fdt->last_comp_version));
9587 + if (off_mem_rsvmap >= totalsize)
9588 + die("Mem Reserve structure offset exceeds total size\n");
9590 + if (off_dt >= totalsize)
9591 + die("DT structure offset exceeds total size\n");
9593 + if (off_str > totalsize)
9594 + die("String table offset exceeds total size\n");
9597 + fprintf(stderr, "\tboot_cpuid_phys:\t0x%x\n",
9598 + be32_to_cpu(fdt->boot_cpuid_phys));
9601 + if (version >= 3) {
9602 + size_str = be32_to_cpu(fdt->size_dt_strings);
9603 + fprintf(stderr, "\tsize_dt_strings:\t%d\n", size_str);
9604 + if (off_str+size_str > totalsize)
9605 + die("String table extends past total size\n");
9608 + if (version >= 17) {
9609 + size_dt = be32_to_cpu(fdt->size_dt_struct);
9610 + fprintf(stderr, "\tsize_dt_struct:\t\t%d\n", size_dt);
9611 + if (off_dt+size_dt > totalsize)
9612 + die("Structure block extends past total size\n");
9615 + if (version < 16) {
9616 + flags |= FTF_FULLPATH | FTF_NAMEPROPS | FTF_VARALIGN;
9618 + flags |= FTF_NOPS;
9621 + inbuf_init(&memresvbuf,
9622 + blob + off_mem_rsvmap, blob + totalsize);
9623 + inbuf_init(&dtbuf, blob + off_dt, blob + totalsize);
9624 + if (size_str >= 0)
9625 + inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str);
9627 + inbuf_init(&strbuf, blob + off_str, blob + totalsize);
9629 + reservelist = flat_read_mem_reserve(&memresvbuf);
9631 + val = flat_read_word(&dtbuf);
9633 + if (val != FDT_BEGIN_NODE)
9634 + die("Device tree blob doesn't begin with FDT_BEGIN_NODE (begins with 0x%08x)\n", val);
9636 + tree = unflatten_tree(&dtbuf, &strbuf, "", flags);
9638 + val = flat_read_word(&dtbuf);
9639 + if (val != FDT_END)
9640 + die("Device tree blob doesn't end with FDT_END\n");
9644 + return build_boot_info(reservelist, tree);
9647 +++ b/arch/powerpc/boot/dtc-src/fstree.c
9650 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
9653 + * This program is free software; you can redistribute it and/or
9654 + * modify it under the terms of the GNU General Public License as
9655 + * published by the Free Software Foundation; either version 2 of the
9656 + * License, or (at your option) any later version.
9658 + * This program is distributed in the hope that it will be useful,
9659 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
9660 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9661 + * General Public License for more details.
9663 + * You should have received a copy of the GNU General Public License
9664 + * along with this program; if not, write to the Free Software
9665 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
9671 +#include <dirent.h>
9672 +#include <sys/stat.h>
9674 +static struct node *read_fstree(const char *dirname)
9677 + struct dirent *de;
9679 + struct node *tree;
9681 + d = opendir(dirname);
9683 + die("opendir(): %s\n", strerror(errno));
9685 + tree = build_node(NULL, NULL);
9687 + while ((de = readdir(d)) != NULL) {
9690 + if (streq(de->d_name, ".")
9691 + || streq(de->d_name, ".."))
9694 + tmpnam = join_path(dirname, de->d_name);
9696 + if (lstat(tmpnam, &st) < 0)
9697 + die("stat(%s): %s\n", tmpnam, strerror(errno));
9699 + if (S_ISREG(st.st_mode)) {
9700 + struct property *prop;
9703 + pfile = fopen(tmpnam, "r");
9706 + "WARNING: Cannot open %s: %s\n",
9707 + tmpnam, strerror(errno));
9709 + prop = build_property(strdup(de->d_name),
9710 + data_copy_file(pfile,
9713 + add_property(tree, prop);
9716 + } else if (S_ISDIR(st.st_mode)) {
9717 + struct node *newchild;
9719 + newchild = read_fstree(tmpnam);
9720 + newchild = name_node(newchild, strdup(de->d_name),
9722 + add_child(tree, newchild);
9731 +struct boot_info *dt_from_fs(const char *dirname)
9733 + struct node *tree;
9735 + tree = read_fstree(dirname);
9736 + tree = name_node(tree, "", NULL);
9738 + fill_fullpaths(tree, "");
9740 + return build_boot_info(NULL, tree);
9744 +++ b/arch/powerpc/boot/dtc-src/livetree.c
9747 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
9750 + * This program is free software; you can redistribute it and/or
9751 + * modify it under the terms of the GNU General Public License as
9752 + * published by the Free Software Foundation; either version 2 of the
9753 + * License, or (at your option) any later version.
9755 + * This program is distributed in the hope that it will be useful,
9756 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
9757 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9758 + * General Public License for more details.
9760 + * You should have received a copy of the GNU General Public License
9761 + * along with this program; if not, write to the Free Software
9762 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
9769 + * Tree building functions
9772 +struct property *build_property(char *name, struct data val, char *label)
9774 + struct property *new = xmalloc(sizeof(*new));
9781 + new->label = label;
9786 +struct property *chain_property(struct property *first, struct property *list)
9788 + assert(first->next == NULL);
9790 + first->next = list;
9794 +struct property *reverse_properties(struct property *first)
9796 + struct property *p = first;
9797 + struct property *head = NULL;
9798 + struct property *next;
9809 +struct node *build_node(struct property *proplist, struct node *children)
9811 + struct node *new = xmalloc(sizeof(*new));
9812 + struct node *child;
9814 + memset(new, 0, sizeof(*new));
9816 + new->proplist = reverse_properties(proplist);
9817 + new->children = children;
9819 + for_each_child(new, child) {
9820 + child->parent = new;
9826 +struct node *name_node(struct node *node, char *name, char * label)
9828 + assert(node->name == NULL);
9830 + node->name = name;
9832 + node->label = label;
9837 +struct node *chain_node(struct node *first, struct node *list)
9839 + assert(first->next_sibling == NULL);
9841 + first->next_sibling = list;
9845 +void add_property(struct node *node, struct property *prop)
9847 + struct property **p;
9849 + prop->next = NULL;
9851 + p = &node->proplist;
9853 + p = &((*p)->next);
9858 +void add_child(struct node *parent, struct node *child)
9862 + child->next_sibling = NULL;
9864 + p = &parent->children;
9866 + p = &((*p)->next_sibling);
9871 +struct reserve_info *build_reserve_entry(u64 address, u64 size, char *label)
9873 + struct reserve_info *new = xmalloc(sizeof(*new));
9875 + new->re.address = address;
9876 + new->re.size = size;
9880 + new->label = label;
9885 +struct reserve_info *chain_reserve_entry(struct reserve_info *first,
9886 + struct reserve_info *list)
9888 + assert(first->next == NULL);
9890 + first->next = list;
9894 +struct reserve_info *add_reserve_entry(struct reserve_info *list,
9895 + struct reserve_info *new)
9897 + struct reserve_info *last;
9904 + for (last = list; last->next; last = last->next)
9912 +struct boot_info *build_boot_info(struct reserve_info *reservelist,
9913 + struct node *tree)
9915 + struct boot_info *bi;
9917 + bi = xmalloc(sizeof(*bi));
9918 + bi->reservelist = reservelist;
9925 + * Tree accessor functions
9928 +const char *get_unitname(struct node *node)
9930 + if (node->name[node->basenamelen] == '\0')
9933 + return node->name + node->basenamelen + 1;
9936 +struct property *get_property(struct node *node, const char *propname)
9938 + struct property *prop;
9940 + for_each_property(node, prop)
9941 + if (streq(prop->name, propname))
9947 +cell_t propval_cell(struct property *prop)
9949 + assert(prop->val.len == sizeof(cell_t));
9950 + return be32_to_cpu(*((cell_t *)prop->val.val));
9953 +struct node *get_subnode(struct node *node, const char *nodename)
9955 + struct node *child;
9957 + for_each_child(node, child)
9958 + if (streq(child->name, nodename))
9964 +struct node *get_node_by_path(struct node *tree, const char *path)
9967 + struct node *child;
9969 + if (!path || ! (*path))
9972 + while (path[0] == '/')
9975 + p = strchr(path, '/');
9977 + for_each_child(tree, child) {
9978 + if (p && strneq(path, child->name, p-path))
9979 + return get_node_by_path(child, p+1);
9980 + else if (!p && streq(path, child->name))
9987 +struct node *get_node_by_label(struct node *tree, const char *label)
9989 + struct node *child, *node;
9991 + assert(label && (strlen(label) > 0));
9993 + if (tree->label && streq(tree->label, label))
9996 + for_each_child(tree, child) {
9997 + node = get_node_by_label(child, label);
10005 +struct node *get_node_by_phandle(struct node *tree, cell_t phandle)
10007 + struct node *child, *node;
10009 + assert((phandle != 0) && (phandle != -1));
10011 + if (tree->phandle == phandle)
10014 + for_each_child(tree, child) {
10015 + node = get_node_by_phandle(child, phandle);
10023 +struct node *get_node_by_ref(struct node *tree, const char *ref)
10025 + if (ref[0] == '/')
10026 + return get_node_by_path(tree, ref);
10028 + return get_node_by_label(tree, ref);
10031 +cell_t get_node_phandle(struct node *root, struct node *node)
10033 + static cell_t phandle = 1; /* FIXME: ick, static local */
10035 + if ((node->phandle != 0) && (node->phandle != -1))
10036 + return node->phandle;
10038 + assert(! get_property(node, "linux,phandle"));
10040 + while (get_node_by_phandle(root, phandle))
10043 + node->phandle = phandle;
10044 + add_property(node,
10045 + build_property("linux,phandle",
10046 + data_append_cell(empty_data, phandle),
10049 + return node->phandle;
10052 +++ b/arch/powerpc/boot/dtc-src/srcpos.c
10055 + * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc.
10057 + * This program is free software; you can redistribute it and/or
10058 + * modify it under the terms of the GNU General Public License as
10059 + * published by the Free Software Foundation; either version 2 of the
10060 + * License, or (at your option) any later version.
10062 + * This program is distributed in the hope that it will be useful,
10063 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
10064 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10065 + * General Public License for more details.
10067 + * You should have received a copy of the GNU General Public License
10068 + * along with this program; if not, write to the Free Software
10069 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
10074 +#include "srcpos.h"
10078 + * Record the complete unique set of opened file names.
10079 + * Primarily used to cache source position file names.
10081 +#define MAX_N_FILE_NAMES (100)
10083 +const char *file_names[MAX_N_FILE_NAMES];
10084 +static int n_file_names = 0;
10087 + * Like yylineno, this is the current open file pos.
10090 +int srcpos_filenum = -1;
10094 +FILE *dtc_open_file(const char *fname)
10098 + if (lookup_file_name(fname, 1) < 0)
10099 + die("Too many files opened\n");
10101 + if (streq(fname, "-"))
10104 + f = fopen(fname, "r");
10107 + die("Couldn't open \"%s\": %s\n", fname, strerror(errno));
10115 + * Locate and optionally add filename fname in the file_names[] array.
10117 + * If the filename is currently not in the array and the boolean
10118 + * add_it is non-zero, an attempt to add the filename will be made.
10121 + * Index [0..MAX_N_FILE_NAMES) where the filename is kept
10122 + * -1 if the name can not be recorded
10125 +int lookup_file_name(const char *fname, int add_it)
10129 + for (i = 0; i < n_file_names; i++) {
10130 + if (strcmp(file_names[i], fname) == 0)
10135 + if (n_file_names < MAX_N_FILE_NAMES) {
10136 + file_names[n_file_names] = strdup(fname);
10137 + return n_file_names++;
10145 +const char *srcpos_filename_for_num(int filenum)
10147 + if (0 <= filenum && filenum < n_file_names) {
10148 + return file_names[filenum];
10155 +const char *srcpos_get_filename(void)
10157 + return srcpos_filename_for_num(srcpos_filenum);
10160 +++ b/arch/powerpc/boot/dtc-src/srcpos.h
10163 + * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc.
10165 + * This program is free software; you can redistribute it and/or
10166 + * modify it under the terms of the GNU General Public License as
10167 + * published by the Free Software Foundation; either version 2 of the
10168 + * License, or (at your option) any later version.
10170 + * This program is distributed in the hope that it will be useful,
10171 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
10172 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10173 + * General Public License for more details.
10175 + * You should have received a copy of the GNU General Public License
10176 + * along with this program; if not, write to the Free Software
10177 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
10182 + * Augment the standard YYLTYPE with a filenum index into an
10183 + * array of all opened filenames.
10186 +#if ! defined(YYLTYPE) && ! defined(YYLTYPE_IS_DECLARED)
10187 +typedef struct YYLTYPE {
10189 + int first_column;
10195 +#define YYLTYPE_IS_DECLARED 1
10196 +#define YYLTYPE_IS_TRIVIAL 1
10199 +/* Cater to old parser templates. */
10201 +#define YYID(n) (n)
10204 +#define YYLLOC_DEFAULT(Current, Rhs, N) \
10208 + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
10209 + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
10210 + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
10211 + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
10212 + (Current).filenum = YYRHSLOC (Rhs, N).filenum; \
10216 + (Current).first_line = (Current).last_line = \
10217 + YYRHSLOC (Rhs, 0).last_line; \
10218 + (Current).first_column = (Current).last_column = \
10219 + YYRHSLOC (Rhs, 0).last_column; \
10220 + (Current).filenum = YYRHSLOC (Rhs, 0).filenum; \
10226 +extern void yyerror(char const *);
10228 +extern int srcpos_filenum;
10230 +extern int push_input_file(const char *filename);
10231 +extern int pop_input_file(void);
10233 +extern FILE *dtc_open_file(const char *fname);
10234 +extern int lookup_file_name(const char *fname, int add_it);
10235 +extern const char *srcpos_filename_for_num(int filenum);
10236 +const char *srcpos_get_filename(void);
10238 +++ b/arch/powerpc/boot/dtc-src/treesource.c
10241 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
10244 + * This program is free software; you can redistribute it and/or
10245 + * modify it under the terms of the GNU General Public License as
10246 + * published by the Free Software Foundation; either version 2 of the
10247 + * License, or (at your option) any later version.
10249 + * This program is distributed in the hope that it will be useful,
10250 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
10251 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10252 + * General Public License for more details.
10254 + * You should have received a copy of the GNU General Public License
10255 + * along with this program; if not, write to the Free Software
10256 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
10261 +#include "srcpos.h"
10263 +extern FILE *yyin;
10264 +extern int yyparse(void);
10265 +extern void yyerror(char const *);
10267 +struct boot_info *the_boot_info;
10269 +struct boot_info *dt_from_source(const char *fname)
10271 + the_boot_info = NULL;
10273 + push_input_file(fname);
10275 + if (yyparse() != 0)
10278 + fill_fullpaths(the_boot_info->dt, "");
10280 + return the_boot_info;
10283 +static void write_prefix(FILE *f, int level)
10287 + for (i = 0; i < level; i++)
10291 +int isstring(char c)
10293 + return (isprint(c)
10295 + || strchr("\a\b\t\n\v\f\r", c));
10298 +static void write_propval_string(FILE *f, struct data val)
10300 + const char *str = val.val;
10302 + int newchunk = 1;
10303 + struct marker *m = val.markers;
10305 + assert(str[val.len-1] == '\0');
10307 + for (i = 0; i < (val.len-1); i++) {
10311 + while (m && (m->offset <= i)) {
10312 + if (m->type == LABEL) {
10313 + assert(m->offset == i);
10314 + fprintf(f, "%s: ", m->ref);
10318 + fprintf(f, "\"");
10324 + fprintf(f, "\\a");
10327 + fprintf(f, "\\b");
10330 + fprintf(f, "\\t");
10333 + fprintf(f, "\\n");
10336 + fprintf(f, "\\v");
10339 + fprintf(f, "\\f");
10342 + fprintf(f, "\\r");
10345 + fprintf(f, "\\\\");
10348 + fprintf(f, "\\\"");
10351 + fprintf(f, "\", ");
10356 + fprintf(f, "%c", c);
10358 + fprintf(f, "\\x%02hhx", c);
10361 + fprintf(f, "\"");
10363 + /* Wrap up any labels at the end of the value */
10364 + for_each_marker_of_type(m, LABEL) {
10365 + assert (m->offset == val.len);
10366 + fprintf(f, " %s:", m->ref);
10370 +static void write_propval_cells(FILE *f, struct data val)
10372 + void *propend = val.val + val.len;
10373 + cell_t *cp = (cell_t *)val.val;
10374 + struct marker *m = val.markers;
10378 + while (m && (m->offset <= ((char *)cp - val.val))) {
10379 + if (m->type == LABEL) {
10380 + assert(m->offset == ((char *)cp - val.val));
10381 + fprintf(f, "%s: ", m->ref);
10386 + fprintf(f, "0x%x", be32_to_cpu(*cp++));
10387 + if ((void *)cp >= propend)
10392 + /* Wrap up any labels at the end of the value */
10393 + for_each_marker_of_type(m, LABEL) {
10394 + assert (m->offset == val.len);
10395 + fprintf(f, " %s:", m->ref);
10400 +static void write_propval_bytes(FILE *f, struct data val)
10402 + void *propend = val.val + val.len;
10403 + const char *bp = val.val;
10404 + struct marker *m = val.markers;
10408 + while (m && (m->offset == (bp-val.val))) {
10409 + if (m->type == LABEL)
10410 + fprintf(f, "%s: ", m->ref);
10414 + fprintf(f, "%02hhx", *bp++);
10415 + if ((void *)bp >= propend)
10420 + /* Wrap up any labels at the end of the value */
10421 + for_each_marker_of_type(m, LABEL) {
10422 + assert (m->offset == val.len);
10423 + fprintf(f, " %s:", m->ref);
10428 +static void write_propval(FILE *f, struct property *prop)
10430 + int len = prop->val.len;
10431 + const char *p = prop->val.val;
10432 + struct marker *m = prop->val.markers;
10433 + int nnotstring = 0, nnul = 0;
10434 + int nnotstringlbl = 0, nnotcelllbl = 0;
10438 + fprintf(f, ";\n");
10442 + for (i = 0; i < len; i++) {
10443 + if (! isstring(p[i]))
10445 + if (p[i] == '\0')
10449 + for_each_marker_of_type(m, LABEL) {
10450 + if ((m->offset > 0) && (prop->val.val[m->offset - 1] != '\0'))
10452 + if ((m->offset % sizeof(cell_t)) != 0)
10456 + fprintf(f, " = ");
10457 + if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul < (len-nnul))
10458 + && (nnotstringlbl == 0)) {
10459 + write_propval_string(f, prop->val);
10460 + } else if (((len % sizeof(cell_t)) == 0) && (nnotcelllbl == 0)) {
10461 + write_propval_cells(f, prop->val);
10463 + write_propval_bytes(f, prop->val);
10466 + fprintf(f, ";\n");
10469 +static void write_tree_source_node(FILE *f, struct node *tree, int level)
10471 + struct property *prop;
10472 + struct node *child;
10474 + write_prefix(f, level);
10476 + fprintf(f, "%s: ", tree->label);
10477 + if (tree->name && (*tree->name))
10478 + fprintf(f, "%s {\n", tree->name);
10480 + fprintf(f, "/ {\n");
10482 + for_each_property(tree, prop) {
10483 + write_prefix(f, level+1);
10485 + fprintf(f, "%s: ", prop->label);
10486 + fprintf(f, "%s", prop->name);
10487 + write_propval(f, prop);
10489 + for_each_child(tree, child) {
10490 + fprintf(f, "\n");
10491 + write_tree_source_node(f, child, level+1);
10493 + write_prefix(f, level);
10494 + fprintf(f, "};\n");
10498 +void dt_to_source(FILE *f, struct boot_info *bi)
10500 + struct reserve_info *re;
10502 + fprintf(f, "/dts-v1/;\n\n");
10504 + for (re = bi->reservelist; re; re = re->next) {
10506 + fprintf(f, "%s: ", re->label);
10507 + fprintf(f, "/memreserve/\t0x%016llx 0x%016llx;\n",
10508 + (unsigned long long)re->re.address,
10509 + (unsigned long long)re->re.size);
10512 + write_tree_source_node(f, bi->dt, 0);
10516 +++ b/arch/powerpc/boot/dtc-src/version_gen.h
10518 +#define DTC_VERSION "DTC 1.0.0-gd6f9b62f"
10520 +++ b/arch/powerpc/boot/dts/adder875-redboot.dts
10523 + * Device Tree Source for MPC885 ADS running RedBoot
10525 + * Copyright 2006 MontaVista Software, Inc.
10526 + * Copyright 2007 Freescale Semiconductor, Inc.
10528 + * This program is free software; you can redistribute it and/or modify it
10529 + * under the terms of the GNU General Public License as published by the
10530 + * Free Software Foundation; either version 2 of the License, or (at your
10531 + * option) any later version.
10536 + model = "Analogue & Micro Adder MPC875";
10537 + compatible = "analogue-and-micro,adder875";
10538 + #address-cells = <1>;
10539 + #size-cells = <1>;
10542 + console = &console;
10543 + ethernet0 = ð0;
10544 + ethernet1 = ð1;
10548 + #address-cells = <1>;
10549 + #size-cells = <0>;
10552 + device_type = "cpu";
10554 + d-cache-line-size = <16>;
10555 + i-cache-line-size = <16>;
10556 + d-cache-size = <8192>;
10557 + i-cache-size = <8192>;
10558 + timebase-frequency = <0>;
10559 + bus-frequency = <0>;
10560 + clock-frequency = <0>;
10561 + interrupts = <15 2>; // decrementer interrupt
10562 + interrupt-parent = <&PIC>;
10567 + device_type = "memory";
10568 + reg = <0 0x01000000>;
10571 + localbus@fa200100 {
10572 + compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus",
10574 + #address-cells = <2>;
10575 + #size-cells = <1>;
10576 + reg = <0xfa200100 0x40>;
10579 + 0 0 0xfe000000 0x00800000
10580 + 2 0 0xfa100000 0x00008000
10584 + compatible = "cfi-flash";
10585 + reg = <0 0 0x800000>;
10586 + bank-width = <2>;
10587 + device-width = <2>;
10592 + compatible = "fsl,mpc875-immr", "fsl,pq1-soc", "simple-bus";
10593 + #address-cells = <1>;
10594 + #size-cells = <1>;
10595 + ranges = <0 0xfa200000 0x00004000>;
10597 + // Temporary until code stops depending on it.
10598 + device_type = "soc";
10600 + // Temporary until get_immrbase() is fixed.
10601 + reg = <0xfa200000 0x4000>;
10604 + compatible = "fsl,mpc875-fec-mdio", "fsl,pq1-fec-mdio";
10605 + reg = <0xe00 0x188>;
10606 + #address-cells = <1>;
10607 + #size-cells = <0>;
10609 + PHY0: ethernet-phy@0 {
10611 + device_type = "ethernet-phy";
10614 + PHY1: ethernet-phy@1 {
10616 + device_type = "ethernet-phy";
10620 + eth0: ethernet@e00 {
10621 + device_type = "network";
10622 + compatible = "fsl,mpc875-fec-enet",
10623 + "fsl,pq1-fec-enet";
10624 + reg = <0xe00 0x188>;
10625 + local-mac-address = [ 00 00 00 00 00 00 ];
10626 + interrupts = <3 1>;
10627 + interrupt-parent = <&PIC>;
10628 + phy-handle = <&PHY0>;
10629 + linux,network-index = <0>;
10632 + eth1: ethernet@1e00 {
10633 + device_type = "network";
10634 + compatible = "fsl,mpc875-fec-enet",
10635 + "fsl,pq1-fec-enet";
10636 + reg = <0x1e00 0x188>;
10637 + local-mac-address = [ 00 00 00 00 00 00 ];
10638 + interrupts = <7 1>;
10639 + interrupt-parent = <&PIC>;
10640 + phy-handle = <&PHY1>;
10641 + linux,network-index = <1>;
10644 + PIC: interrupt-controller@0 {
10645 + interrupt-controller;
10646 + #interrupt-cells = <2>;
10648 + compatible = "fsl,mpc875-pic", "fsl,pq1-pic";
10652 + #address-cells = <1>;
10653 + #size-cells = <1>;
10654 + compatible = "fsl,mpc875-cpm", "fsl,cpm1", "simple-bus";
10655 + interrupts = <0>; // cpm error interrupt
10656 + interrupt-parent = <&CPM_PIC>;
10657 + reg = <0x9c0 0x40>;
10661 + #address-cells = <1>;
10662 + #size-cells = <1>;
10663 + ranges = <0 0x2000 0x2000>;
10666 + compatible = "fsl,cpm-muram-data";
10667 + reg = <0 0x1c00>;
10672 + compatible = "fsl,mpc875-brg",
10675 + reg = <0x9f0 0x10>;
10678 + CPM_PIC: interrupt-controller@930 {
10679 + interrupt-controller;
10680 + #interrupt-cells = <1>;
10681 + interrupts = <5 2 0 2>;
10682 + interrupt-parent = <&PIC>;
10683 + reg = <0x930 0x20>;
10684 + compatible = "fsl,mpc875-cpm-pic",
10688 + console: serial@a80 {
10689 + device_type = "serial";
10690 + compatible = "fsl,mpc875-smc-uart",
10691 + "fsl,cpm1-smc-uart";
10692 + reg = <0xa80 0x10 0x3e80 0x40>;
10693 + interrupts = <4>;
10694 + interrupt-parent = <&CPM_PIC>;
10695 + fsl,cpm-brg = <1>;
10696 + fsl,cpm-command = <0x0090>;
10697 + current-speed = <115200>;
10703 + linux,stdout-path = &console;
10707 +++ b/arch/powerpc/boot/dts/adder875-uboot.dts
10710 + * Device Tree Source for MPC885 ADS running U-Boot
10712 + * Copyright 2006 MontaVista Software, Inc.
10713 + * Copyright 2007 Freescale Semiconductor, Inc.
10715 + * This program is free software; you can redistribute it and/or modify it
10716 + * under the terms of the GNU General Public License as published by the
10717 + * Free Software Foundation; either version 2 of the License, or (at your
10718 + * option) any later version.
10723 + model = "Analogue & Micro Adder MPC875";
10724 + compatible = "analogue-and-micro,adder875";
10725 + #address-cells = <1>;
10726 + #size-cells = <1>;
10729 + console = &console;
10730 + ethernet0 = ð0;
10731 + ethernet1 = ð1;
10735 + #address-cells = <1>;
10736 + #size-cells = <0>;
10739 + device_type = "cpu";
10741 + d-cache-line-size = <16>;
10742 + i-cache-line-size = <16>;
10743 + d-cache-size = <8192>;
10744 + i-cache-size = <8192>;
10745 + timebase-frequency = <0>;
10746 + bus-frequency = <0>;
10747 + clock-frequency = <0>;
10748 + interrupts = <15 2>; // decrementer interrupt
10749 + interrupt-parent = <&PIC>;
10754 + device_type = "memory";
10755 + reg = <0 0x01000000>;
10758 + localbus@ff000100 {
10759 + compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus",
10761 + #address-cells = <2>;
10762 + #size-cells = <1>;
10763 + reg = <0xff000100 0x40>;
10766 + 0 0 0xfe000000 0x01000000
10770 + compatible = "cfi-flash";
10771 + reg = <0 0 0x800000>;
10772 + bank-width = <2>;
10773 + device-width = <2>;
10778 + compatible = "fsl,mpc875-immr", "fsl,pq1-soc", "simple-bus";
10779 + #address-cells = <1>;
10780 + #size-cells = <1>;
10781 + ranges = <0 0xff000000 0x00004000>;
10783 + // Temporary until code stops depending on it.
10784 + device_type = "soc";
10786 + // Temporary until get_immrbase() is fixed.
10787 + reg = <0xff000000 0x4000>;
10790 + compatible = "fsl,mpc875-fec-mdio", "fsl,pq1-fec-mdio";
10791 + reg = <0xe00 0x188>;
10792 + #address-cells = <1>;
10793 + #size-cells = <0>;
10795 + PHY0: ethernet-phy@0 {
10797 + device_type = "ethernet-phy";
10800 + PHY1: ethernet-phy@1 {
10802 + device_type = "ethernet-phy";
10806 + eth0: ethernet@e00 {
10807 + device_type = "network";
10808 + compatible = "fsl,mpc875-fec-enet",
10809 + "fsl,pq1-fec-enet";
10810 + reg = <0xe00 0x188>;
10811 + local-mac-address = [ 00 00 00 00 00 00 ];
10812 + interrupts = <3 1>;
10813 + interrupt-parent = <&PIC>;
10814 + phy-handle = <&PHY0>;
10815 + linux,network-index = <0>;
10818 + eth1: ethernet@1e00 {
10819 + device_type = "network";
10820 + compatible = "fsl,mpc875-fec-enet",
10821 + "fsl,pq1-fec-enet";
10822 + reg = <0x1e00 0x188>;
10823 + local-mac-address = [ 00 00 00 00 00 00 ];
10824 + interrupts = <7 1>;
10825 + interrupt-parent = <&PIC>;
10826 + phy-handle = <&PHY1>;
10827 + linux,network-index = <1>;
10830 + PIC: interrupt-controller@0 {
10831 + interrupt-controller;
10832 + #interrupt-cells = <2>;
10834 + compatible = "fsl,mpc875-pic", "fsl,pq1-pic";
10838 + #address-cells = <1>;
10839 + #size-cells = <1>;
10840 + compatible = "fsl,mpc875-cpm", "fsl,cpm1", "simple-bus";
10841 + interrupts = <0>; // cpm error interrupt
10842 + interrupt-parent = <&CPM_PIC>;
10843 + reg = <0x9c0 0x40>;
10847 + #address-cells = <1>;
10848 + #size-cells = <1>;
10849 + ranges = <0 0x2000 0x2000>;
10852 + compatible = "fsl,cpm-muram-data";
10853 + reg = <0 0x1c00>;
10858 + compatible = "fsl,mpc875-brg",
10861 + reg = <0x9f0 0x10>;
10864 + CPM_PIC: interrupt-controller@930 {
10865 + interrupt-controller;
10866 + #interrupt-cells = <1>;
10867 + interrupts = <5 2 0 2>;
10868 + interrupt-parent = <&PIC>;
10869 + reg = <0x930 0x20>;
10870 + compatible = "fsl,mpc875-cpm-pic",
10874 + console: serial@a80 {
10875 + device_type = "serial";
10876 + compatible = "fsl,mpc875-smc-uart",
10877 + "fsl,cpm1-smc-uart";
10878 + reg = <0xa80 0x10 0x3e80 0x40>;
10879 + interrupts = <4>;
10880 + interrupt-parent = <&CPM_PIC>;
10881 + fsl,cpm-brg = <1>;
10882 + fsl,cpm-command = <0x0090>;
10883 + current-speed = <115200>;
10889 + linux,stdout-path = &console;
10892 --- a/arch/powerpc/boot/dts/bamboo.dts
10893 +++ b/arch/powerpc/boot/dts/bamboo.dts
10894 @@ -16,14 +16,24 @@
10896 model = "amcc,bamboo";
10897 compatible = "amcc,bamboo";
10898 - dcr-parent = <&/cpus/PowerPC,440EP@0>;
10899 + dcr-parent = <&/cpus/cpu@0>;
10902 + ethernet0 = &EMAC0;
10903 + ethernet1 = &EMAC1;
10904 + serial0 = &UART0;
10905 + serial1 = &UART1;
10906 + serial2 = &UART2;
10907 + serial3 = &UART3;
10911 #address-cells = <1>;
10914 - PowerPC,440EP@0 {
10916 device_type = "cpu";
10917 + model = "PowerPC,440EP";
10919 clock-frequency = <0>; /* Filled in by zImage */
10920 timebase-frequency = <0>; /* Filled in by zImage */
10921 @@ -126,7 +136,6 @@
10922 #address-cells = <2>;
10924 clock-frequency = <0>; /* Filled in by zImage */
10926 interrupts = <5 1>;
10927 interrupt-parent = <&UIC1>;
10929 @@ -238,11 +247,56 @@
10930 zmii-device = <&ZMII0>;
10931 zmii-channel = <1>;
10935 + compatible = "ohci-be";
10936 + reg = <ef601000 80>;
10937 + interrupts = <8 1 9 1>;
10938 + interrupt-parent = < &UIC1 >;
10942 + PCI0: pci@ec000000 {
10943 + device_type = "pci";
10944 + #interrupt-cells = <1>;
10945 + #size-cells = <2>;
10946 + #address-cells = <3>;
10947 + compatible = "ibm,plb440ep-pci", "ibm,plb-pci";
10949 + reg = <0 eec00000 8 /* Config space access */
10950 + 0 eed00000 4 /* IACK */
10951 + 0 eed00000 4 /* Special cycle */
10952 + 0 ef400000 40>; /* Internal registers */
10954 + /* Outbound ranges, one memory and one IO,
10955 + * later cannot be changed. Chip supports a second
10956 + * IO range but we don't use it for now
10958 + ranges = <02000000 0 a0000000 0 a0000000 0 20000000
10959 + 01000000 0 00000000 0 e8000000 0 00010000>;
10961 + /* Inbound 2GB range starting at 0 */
10962 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
10964 + /* Bamboo has all 4 IRQ pins tied together per slot */
10965 + interrupt-map-mask = <f800 0 0 0>;
10966 + interrupt-map = <
10968 + 0800 0 0 0 &UIC0 1c 8
10971 + 1000 0 0 0 &UIC0 1b 8
10974 + 1800 0 0 0 &UIC0 1a 8
10977 + 2000 0 0 0 &UIC0 19 8
10983 linux,stdout-path = "/plb/opb/serial@ef600300";
10984 - bootargs = "console=ttyS0,115200";
10988 +++ b/arch/powerpc/boot/dts/cm5200.dts
10991 + * CM5200 board Device Tree Source
10993 + * Copyright (C) 2007 Semihalf
10994 + * Marian Balakowicz <m8@semihalf.com>
10996 + * This program is free software; you can redistribute it and/or modify it
10997 + * under the terms of the GNU General Public License as published by the
10998 + * Free Software Foundation; either version 2 of the License, or (at your
10999 + * option) any later version.
11003 + * WARNING: Do not depend on this tree layout remaining static just yet.
11004 + * The MPC5200 device tree conventions are still in flux
11005 + * Keep an eye on the linuxppc-dev mailing list for more details
11009 + model = "schindler,cm5200";
11010 + compatible = "schindler,cm5200";
11011 + #address-cells = <1>;
11012 + #size-cells = <1>;
11015 + #address-cells = <1>;
11016 + #size-cells = <0>;
11019 + device_type = "cpu";
11021 + d-cache-line-size = <20>;
11022 + i-cache-line-size = <20>;
11023 + d-cache-size = <4000>; // L1, 16K
11024 + i-cache-size = <4000>; // L1, 16K
11025 + timebase-frequency = <0>; // from bootloader
11026 + bus-frequency = <0>; // from bootloader
11027 + clock-frequency = <0>; // from bootloader
11032 + device_type = "memory";
11033 + reg = <00000000 04000000>; // 64MB
11036 + soc5200@f0000000 {
11037 + model = "fsl,mpc5200b";
11038 + compatible = "fsl,mpc5200b";
11039 + revision = ""; // from bootloader
11040 + device_type = "soc";
11041 + ranges = <0 f0000000 0000c000>;
11042 + reg = <f0000000 00000100>;
11043 + bus-frequency = <0>; // from bootloader
11044 + system-frequency = <0>; // from bootloader
11047 + compatible = "mpc5200b-cdm","mpc5200-cdm";
11051 + mpc5200_pic: pic@500 {
11052 + // 5200 interrupts are encoded into two levels;
11053 + interrupt-controller;
11054 + #interrupt-cells = <3>;
11055 + compatible = "mpc5200b-pic","mpc5200-pic";
11059 + gpt@600 { // General Purpose Timer
11060 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11062 + interrupts = <1 9 0>;
11063 + interrupt-parent = <&mpc5200_pic>;
11067 + gpt@610 { // General Purpose Timer
11068 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11070 + interrupts = <1 a 0>;
11071 + interrupt-parent = <&mpc5200_pic>;
11074 + gpt@620 { // General Purpose Timer
11075 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11077 + interrupts = <1 b 0>;
11078 + interrupt-parent = <&mpc5200_pic>;
11081 + gpt@630 { // General Purpose Timer
11082 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11084 + interrupts = <1 c 0>;
11085 + interrupt-parent = <&mpc5200_pic>;
11088 + gpt@640 { // General Purpose Timer
11089 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11091 + interrupts = <1 d 0>;
11092 + interrupt-parent = <&mpc5200_pic>;
11095 + gpt@650 { // General Purpose Timer
11096 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11098 + interrupts = <1 e 0>;
11099 + interrupt-parent = <&mpc5200_pic>;
11102 + gpt@660 { // General Purpose Timer
11103 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11105 + interrupts = <1 f 0>;
11106 + interrupt-parent = <&mpc5200_pic>;
11109 + gpt@670 { // General Purpose Timer
11110 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11112 + interrupts = <1 10 0>;
11113 + interrupt-parent = <&mpc5200_pic>;
11116 + rtc@800 { // Real time clock
11117 + compatible = "mpc5200b-rtc","mpc5200-rtc";
11119 + interrupts = <1 5 0 1 6 0>;
11120 + interrupt-parent = <&mpc5200_pic>;
11124 + compatible = "mpc5200b-gpio","mpc5200-gpio";
11126 + interrupts = <1 7 0>;
11127 + interrupt-parent = <&mpc5200_pic>;
11131 + compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup";
11133 + interrupts = <1 8 0 0 3 0>;
11134 + interrupt-parent = <&mpc5200_pic>;
11138 + compatible = "mpc5200b-spi","mpc5200-spi";
11140 + interrupts = <2 d 0 2 e 0>;
11141 + interrupt-parent = <&mpc5200_pic>;
11145 + device_type = "usb-ohci-be";
11146 + compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
11148 + interrupts = <2 6 0>;
11149 + interrupt-parent = <&mpc5200_pic>;
11152 + dma-controller@1200 {
11153 + compatible = "mpc5200b-bestcomm","mpc5200-bestcomm";
11155 + interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
11156 + 3 4 0 3 5 0 3 6 0 3 7 0
11157 + 3 8 0 3 9 0 3 a 0 3 b 0
11158 + 3 c 0 3 d 0 3 e 0 3 f 0>;
11159 + interrupt-parent = <&mpc5200_pic>;
11163 + compatible = "mpc5200b-xlb","mpc5200-xlb";
11164 + reg = <1f00 100>;
11167 + serial@2000 { // PSC1
11168 + device_type = "serial";
11169 + compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
11170 + port-number = <0>; // Logical port assignment
11171 + reg = <2000 100>;
11172 + interrupts = <2 1 0>;
11173 + interrupt-parent = <&mpc5200_pic>;
11176 + serial@2200 { // PSC2
11177 + device_type = "serial";
11178 + compatible = "mpc5200-psc-uart";
11179 + port-number = <1>; // Logical port assignment
11180 + reg = <2200 100>;
11181 + interrupts = <2 2 0>;
11182 + interrupt-parent = <&mpc5200_pic>;
11185 + serial@2400 { // PSC3
11186 + device_type = "serial";
11187 + compatible = "mpc5200-psc-uart";
11188 + port-number = <2>; // Logical port assignment
11189 + reg = <2400 100>;
11190 + interrupts = <2 3 0>;
11191 + interrupt-parent = <&mpc5200_pic>;
11194 + serial@2c00 { // PSC6
11195 + device_type = "serial";
11196 + compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
11197 + port-number = <5>; // Logical port assignment
11198 + reg = <2c00 100>;
11199 + interrupts = <2 4 0>;
11200 + interrupt-parent = <&mpc5200_pic>;
11204 + device_type = "network";
11205 + compatible = "mpc5200b-fec","mpc5200-fec";
11206 + reg = <3000 800>;
11207 + local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */
11208 + interrupts = <2 5 0>;
11209 + interrupt-parent = <&mpc5200_pic>;
11213 + compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
11215 + interrupts = <2 10 0>;
11216 + interrupt-parent = <&mpc5200_pic>;
11217 + fsl5200-clocking;
11221 + compatible = "mpc5200b-sram","mpc5200-sram";
11222 + reg = <8000 4000>;
11226 --- a/arch/powerpc/boot/dts/ebony.dts
11227 +++ b/arch/powerpc/boot/dts/ebony.dts
11228 @@ -16,14 +16,22 @@
11230 model = "ibm,ebony";
11231 compatible = "ibm,ebony";
11232 - dcr-parent = <&/cpus/PowerPC,440GP@0>;
11233 + dcr-parent = <&/cpus/cpu@0>;
11236 + ethernet0 = &EMAC0;
11237 + ethernet1 = &EMAC1;
11238 + serial0 = &UART0;
11239 + serial1 = &UART1;
11243 #address-cells = <1>;
11246 - PowerPC,440GP@0 {
11248 device_type = "cpu";
11249 + model = "PowerPC,440GP";
11251 clock-frequency = <0>; // Filled in by zImage
11252 timebase-frequency = <0>; // Filled in by zImage
11253 @@ -150,9 +158,10 @@
11260 - compatible = "ds1743";
11261 + compatible = "ds1743-nvram";
11266 @@ -284,12 +293,43 @@
11270 - PCIX0: pci@1234 {
11271 + PCIX0: pci@20ec00000 {
11272 device_type = "pci";
11274 - reg = <2 0ec00000 8
11277 + #interrupt-cells = <1>;
11278 + #size-cells = <2>;
11279 + #address-cells = <3>;
11280 + compatible = "ibm,plb440gp-pcix", "ibm,plb-pcix";
11282 + reg = <2 0ec00000 8 /* Config space access */
11283 + 0 0 0 /* no IACK cycles */
11284 + 2 0ed00000 4 /* Special cycles */
11285 + 2 0ec80000 f0 /* Internal registers */
11286 + 2 0ec80100 fc>; /* Internal messaging registers */
11288 + /* Outbound ranges, one memory and one IO,
11289 + * later cannot be changed
11291 + ranges = <02000000 0 80000000 00000003 80000000 0 80000000
11292 + 01000000 0 00000000 00000002 08000000 0 00010000>;
11294 + /* Inbound 2GB range starting at 0 */
11295 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
11297 + /* Ebony has all 4 IRQ pins tied together per slot */
11298 + interrupt-map-mask = <f800 0 0 0>;
11299 + interrupt-map = <
11301 + 0800 0 0 0 &UIC0 17 8
11304 + 1000 0 0 0 &UIC0 18 8
11307 + 1800 0 0 0 &UIC0 19 8
11310 + 2000 0 0 0 &UIC0 1a 8
11316 +++ b/arch/powerpc/boot/dts/ep405.dts
11319 + * Device Tree Source for EP405
11321 + * Copyright 2007 IBM Corp.
11322 + * Benjamin Herrenschmidt <benh@kernel.crashing.org>
11324 + * This file is licensed under the terms of the GNU General Public
11325 + * License version 2. This program is licensed "as is" without
11326 + * any warranty of any kind, whether express or implied.
11330 + #address-cells = <1>;
11331 + #size-cells = <1>;
11333 + compatible = "ep405";
11334 + dcr-parent = <&/cpus/cpu@0>;
11337 + ethernet0 = &EMAC;
11338 + serial0 = &UART0;
11339 + serial1 = &UART1;
11343 + #address-cells = <1>;
11344 + #size-cells = <0>;
11347 + device_type = "cpu";
11348 + model = "PowerPC,405GP";
11350 + clock-frequency = <bebc200>; /* Filled in by zImage */
11351 + timebase-frequency = <0>; /* Filled in by zImage */
11352 + i-cache-line-size = <20>;
11353 + d-cache-line-size = <20>;
11354 + i-cache-size = <4000>;
11355 + d-cache-size = <4000>;
11357 + dcr-access-method = "native";
11362 + device_type = "memory";
11363 + reg = <0 0>; /* Filled in by zImage */
11366 + UIC0: interrupt-controller {
11367 + compatible = "ibm,uic";
11368 + interrupt-controller;
11369 + cell-index = <0>;
11370 + dcr-reg = <0c0 9>;
11371 + #address-cells = <0>;
11372 + #size-cells = <0>;
11373 + #interrupt-cells = <2>;
11377 + compatible = "ibm,plb3";
11378 + #address-cells = <1>;
11379 + #size-cells = <1>;
11381 + clock-frequency = <0>; /* Filled in by zImage */
11383 + SDRAM0: memory-controller {
11384 + compatible = "ibm,sdram-405gp";
11385 + dcr-reg = <010 2>;
11389 + compatible = "ibm,mcmal-405gp", "ibm,mcmal";
11390 + dcr-reg = <180 62>;
11391 + num-tx-chans = <1>;
11392 + num-rx-chans = <1>;
11393 + interrupt-parent = <&UIC0>;
11403 + compatible = "ibm,opb-405gp", "ibm,opb";
11404 + #address-cells = <1>;
11405 + #size-cells = <1>;
11406 + ranges = <ef600000 ef600000 a00000>;
11407 + dcr-reg = <0a0 5>;
11408 + clock-frequency = <0>; /* Filled in by zImage */
11410 + UART0: serial@ef600300 {
11411 + device_type = "serial";
11412 + compatible = "ns16550";
11413 + reg = <ef600300 8>;
11414 + virtual-reg = <ef600300>;
11415 + clock-frequency = <0>; /* Filled in by zImage */
11416 + current-speed = <2580>;
11417 + interrupt-parent = <&UIC0>;
11418 + interrupts = <0 4>;
11421 + UART1: serial@ef600400 {
11422 + device_type = "serial";
11423 + compatible = "ns16550";
11424 + reg = <ef600400 8>;
11425 + virtual-reg = <ef600400>;
11426 + clock-frequency = <0>; /* Filled in by zImage */
11427 + current-speed = <2580>;
11428 + interrupt-parent = <&UIC0>;
11429 + interrupts = <1 4>;
11432 + IIC: i2c@ef600500 {
11433 + compatible = "ibm,iic-405gp", "ibm,iic";
11434 + reg = <ef600500 11>;
11435 + interrupt-parent = <&UIC0>;
11436 + interrupts = <2 4>;
11439 + GPIO: gpio@ef600700 {
11440 + compatible = "ibm,gpio-405gp";
11441 + reg = <ef600700 20>;
11444 + EMAC: ethernet@ef600800 {
11445 + linux,network-index = <0>;
11446 + device_type = "network";
11447 + compatible = "ibm,emac-405gp", "ibm,emac";
11448 + interrupt-parent = <&UIC0>;
11450 + f 4 /* Ethernet */
11451 + 9 4 /* Ethernet Wake Up */>;
11452 + local-mac-address = [000000000000]; /* Filled in by zImage */
11453 + reg = <ef600800 70>;
11454 + mal-device = <&MAL>;
11455 + mal-tx-channel = <0>;
11456 + mal-rx-channel = <0>;
11457 + cell-index = <0>;
11458 + max-frame-size = <5dc>;
11459 + rx-fifo-size = <1000>;
11460 + tx-fifo-size = <800>;
11461 + phy-mode = "rmii";
11462 + phy-map = <00000000>;
11468 + compatible = "ibm,ebc-405gp", "ibm,ebc";
11469 + dcr-reg = <012 2>;
11470 + #address-cells = <2>;
11471 + #size-cells = <1>;
11474 + /* The ranges property is supplied by the bootwrapper
11475 + * and is based on the firmware's configuration of the
11478 + clock-frequency = <0>; /* Filled in by zImage */
11480 + /* NVRAM and RTC */
11482 + compatible = "ds1742";
11483 + reg = <4 200000 0>; /* size fixed up by zImage */
11486 + /* "BCSR" CPLD contains a PCI irq controller */
11488 + compatible = "ep405-bcsr";
11490 + interrupt-controller;
11491 + /* Routing table */
11492 + irq-routing = [ 00 /* SYSERR */
11496 + 02 /* NB PCIIRQ mux ? */
11497 + 03 /* SB Winbond 8259 ? */
11498 + 04 /* Serial Ring */
11499 + 05 /* USB (ep405pc) */
11507 + 07]; /* Reserved */
11511 + PCI0: pci@ec000000 {
11512 + device_type = "pci";
11513 + #interrupt-cells = <1>;
11514 + #size-cells = <2>;
11515 + #address-cells = <3>;
11516 + compatible = "ibm,plb405gp-pci", "ibm,plb-pci";
11518 + reg = <eec00000 8 /* Config space access */
11519 + eed80000 4 /* IACK */
11520 + eed80000 4 /* Special cycle */
11521 + ef480000 40>; /* Internal registers */
11523 + /* Outbound ranges, one memory and one IO,
11524 + * later cannot be changed. Chip supports a second
11525 + * IO range but we don't use it for now
11527 + ranges = <02000000 0 80000000 80000000 0 20000000
11528 + 01000000 0 00000000 e8000000 0 00010000>;
11530 + /* Inbound 2GB range starting at 0 */
11531 + dma-ranges = <42000000 0 0 0 0 80000000>;
11533 + /* That's all I know about IRQs on that thing ... */
11534 + interrupt-map-mask = <f800 0 0 0>;
11535 + interrupt-map = <
11537 + 7000 0 0 0 &UIC0 1e 8 /* IRQ5 */
11543 + linux,stdout-path = "/plb/opb/serial@ef600300";
11547 +++ b/arch/powerpc/boot/dts/ep8248e.dts
11550 + * Device Tree for the Embedded Planet EP8248E board running PlanetCore.
11552 + * Copyright 2007 Freescale Semiconductor Inc.
11554 + * This program is free software; you can redistribute it and/or modify it
11555 + * under the terms of the GNU General Public License as published by the
11556 + * Free Software Foundation; either version 2 of the License, or (at your
11557 + * option) any later version.
11562 + model = "EP8248E";
11563 + compatible = "fsl,ep8248e";
11564 + #address-cells = <1>;
11565 + #size-cells = <1>;
11568 + planetcore-SMC1 = &smc1;
11569 + planetcore-SCC1 = &scc1;
11570 + ethernet0 = ð0;
11571 + ethernet1 = ð1;
11577 + #address-cells = <1>;
11578 + #size-cells = <0>;
11581 + device_type = "cpu";
11583 + d-cache-line-size = <32>;
11584 + i-cache-line-size = <32>;
11585 + d-cache-size = <16384>;
11586 + i-cache-size = <16384>;
11587 + timebase-frequency = <0>;
11588 + clock-frequency = <0>;
11592 + localbus@f0010100 {
11593 + compatible = "fsl,mpc8248-localbus",
11594 + "fsl,pq2-localbus",
11596 + #address-cells = <2>;
11597 + #size-cells = <1>;
11598 + reg = <0xf0010100 0x40>;
11600 + ranges = <0 0 0xfc000000 0x04000000
11601 + 1 0 0xfa000000 0x00008000>;
11603 + flash@0,3800000 {
11604 + compatible = "cfi-flash";
11605 + reg = <0 0x3800000 0x800000>;
11606 + bank-width = <4>;
11607 + device-width = <2>;
11611 + #address-cells = <2>;
11612 + #size-cells = <1>;
11613 + reg = <1 0 0x10>;
11614 + compatible = "fsl,ep8248e-bcsr";
11618 + device_type = "mdio";
11619 + compatible = "fsl,ep8248e-mdio-bitbang";
11620 + #address-cells = <1>;
11621 + #size-cells = <0>;
11624 + PHY0: ethernet-phy@0 {
11625 + interrupt-parent = <&PIC>;
11627 + device_type = "ethernet-phy";
11630 + PHY1: ethernet-phy@1 {
11631 + interrupt-parent = <&PIC>;
11633 + device_type = "ethernet-phy";
11640 + device_type = "memory";
11645 + #address-cells = <1>;
11646 + #size-cells = <1>;
11647 + compatible = "fsl,mpc8248-immr", "fsl,pq2-soc", "simple-bus";
11648 + ranges = <0x00000000 0xf0000000 0x00053000>;
11650 + // Temporary until code stops depending on it.
11651 + device_type = "soc";
11653 + // Temporary -- will go away once kernel uses ranges for get_immrbase().
11654 + reg = <0xf0000000 0x00053000>;
11657 + #address-cells = <1>;
11658 + #size-cells = <1>;
11659 + #interrupt-cells = <2>;
11660 + compatible = "fsl,mpc8248-cpm", "fsl,cpm2",
11662 + reg = <0x119c0 0x30>;
11666 + #address-cells = <1>;
11667 + #size-cells = <1>;
11668 + ranges = <0 0 0x10000>;
11671 + compatible = "fsl,cpm-muram-data";
11672 + reg = <0 0x1100 0x1140
11673 + 0xec0 0x9800 0x800>;
11678 + compatible = "fsl,mpc8248-brg",
11681 + reg = <0x119f0 0x10 0x115f0 0x10>;
11684 + /* Monitor port/SMC1 */
11685 + smc1: serial@11a80 {
11686 + device_type = "serial";
11687 + compatible = "fsl,mpc8248-smc-uart",
11688 + "fsl,cpm2-smc-uart";
11689 + reg = <0x11a80 0x20 0x1100 0x40>;
11690 + interrupts = <4 8>;
11691 + interrupt-parent = <&PIC>;
11692 + fsl,cpm-brg = <7>;
11693 + fsl,cpm-command = <0x1d000000>;
11694 + linux,planetcore-label = "SMC1";
11697 + /* "Serial" port/SCC1 */
11698 + scc1: serial@11a00 {
11699 + device_type = "serial";
11700 + compatible = "fsl,mpc8248-scc-uart",
11701 + "fsl,cpm2-scc-uart";
11702 + reg = <0x11a00 0x20 0x8000 0x100>;
11703 + interrupts = <40 8>;
11704 + interrupt-parent = <&PIC>;
11705 + fsl,cpm-brg = <1>;
11706 + fsl,cpm-command = <0x00800000>;
11707 + linux,planetcore-label = "SCC1";
11710 + eth0: ethernet@11300 {
11711 + device_type = "network";
11712 + compatible = "fsl,mpc8248-fcc-enet",
11713 + "fsl,cpm2-fcc-enet";
11714 + reg = <0x11300 0x20 0x8400 0x100 0x11390 1>;
11715 + local-mac-address = [ 00 00 00 00 00 00 ];
11716 + interrupts = <32 8>;
11717 + interrupt-parent = <&PIC>;
11718 + phy-handle = <&PHY0>;
11719 + linux,network-index = <0>;
11720 + fsl,cpm-command = <0x12000300>;
11723 + eth1: ethernet@11320 {
11724 + device_type = "network";
11725 + compatible = "fsl,mpc8248-fcc-enet",
11726 + "fsl,cpm2-fcc-enet";
11727 + reg = <0x11320 0x20 0x8500 0x100 0x113b0 1>;
11728 + local-mac-address = [ 00 00 00 00 00 00 ];
11729 + interrupts = <33 8>;
11730 + interrupt-parent = <&PIC>;
11731 + phy-handle = <&PHY1>;
11732 + linux,network-index = <1>;
11733 + fsl,cpm-command = <0x16200300>;
11737 + #address-cells = <1>;
11738 + #size-cells = <0>;
11739 + compatible = "fsl,mpc8248-usb",
11741 + reg = <0x11b60 0x18 0x8b00 0x100>;
11742 + interrupt-parent = <&PIC>;
11743 + interrupts = <11 8>;
11744 + fsl,cpm-command = <0x2e600000>;
11748 + PIC: interrupt-controller@10c00 {
11749 + #interrupt-cells = <2>;
11750 + interrupt-controller;
11751 + reg = <0x10c00 0x80>;
11752 + compatible = "fsl,mpc8248-pic", "fsl,pq2-pic";
11757 +++ b/arch/powerpc/boot/dts/haleakala.dts
11760 + * Device Tree Source for AMCC Haleakala (405EXr)
11762 + * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
11764 + * This file is licensed under the terms of the GNU General Public
11765 + * License version 2. This program is licensed "as is" without
11766 + * any warranty of any kind, whether express or implied.
11770 + #address-cells = <1>;
11771 + #size-cells = <1>;
11772 + model = "amcc,haleakala";
11773 + compatible = "amcc,kilauea";
11774 + dcr-parent = <&/cpus/cpu@0>;
11777 + ethernet0 = &EMAC0;
11778 + serial0 = &UART0;
11779 + serial1 = &UART1;
11783 + #address-cells = <1>;
11784 + #size-cells = <0>;
11787 + device_type = "cpu";
11788 + model = "PowerPC,405EXr";
11790 + clock-frequency = <0>; /* Filled in by U-Boot */
11791 + timebase-frequency = <0>; /* Filled in by U-Boot */
11792 + i-cache-line-size = <20>;
11793 + d-cache-line-size = <20>;
11794 + i-cache-size = <4000>; /* 16 kB */
11795 + d-cache-size = <4000>; /* 16 kB */
11797 + dcr-access-method = "native";
11802 + device_type = "memory";
11803 + reg = <0 0>; /* Filled in by U-Boot */
11806 + UIC0: interrupt-controller {
11807 + compatible = "ibm,uic-405exr", "ibm,uic";
11808 + interrupt-controller;
11809 + cell-index = <0>;
11810 + dcr-reg = <0c0 009>;
11811 + #address-cells = <0>;
11812 + #size-cells = <0>;
11813 + #interrupt-cells = <2>;
11816 + UIC1: interrupt-controller1 {
11817 + compatible = "ibm,uic-405exr","ibm,uic";
11818 + interrupt-controller;
11819 + cell-index = <1>;
11820 + dcr-reg = <0d0 009>;
11821 + #address-cells = <0>;
11822 + #size-cells = <0>;
11823 + #interrupt-cells = <2>;
11824 + interrupts = <1e 4 1f 4>; /* cascade */
11825 + interrupt-parent = <&UIC0>;
11828 + UIC2: interrupt-controller2 {
11829 + compatible = "ibm,uic-405exr","ibm,uic";
11830 + interrupt-controller;
11831 + cell-index = <2>;
11832 + dcr-reg = <0e0 009>;
11833 + #address-cells = <0>;
11834 + #size-cells = <0>;
11835 + #interrupt-cells = <2>;
11836 + interrupts = <1c 4 1d 4>; /* cascade */
11837 + interrupt-parent = <&UIC0>;
11841 + compatible = "ibm,plb-405exr", "ibm,plb4";
11842 + #address-cells = <1>;
11843 + #size-cells = <1>;
11845 + clock-frequency = <0>; /* Filled in by U-Boot */
11847 + SDRAM0: memory-controller {
11848 + compatible = "ibm,sdram-405exr";
11849 + dcr-reg = <010 2>;
11853 + compatible = "ibm,mcmal-405exr", "ibm,mcmal2";
11854 + dcr-reg = <180 62>;
11855 + num-tx-chans = <2>;
11856 + num-rx-chans = <2>;
11857 + interrupt-parent = <&MAL0>;
11858 + interrupts = <0 1 2 3 4>;
11859 + #interrupt-cells = <1>;
11860 + #address-cells = <0>;
11861 + #size-cells = <0>;
11862 + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
11863 + /*RXEOB*/ 1 &UIC0 b 4
11864 + /*SERR*/ 2 &UIC1 0 4
11865 + /*TXDE*/ 3 &UIC1 1 4
11866 + /*RXDE*/ 4 &UIC1 2 4>;
11867 + interrupt-map-mask = <ffffffff>;
11871 + compatible = "ibm,opb-405exr", "ibm,opb";
11872 + #address-cells = <1>;
11873 + #size-cells = <1>;
11874 + ranges = <80000000 80000000 10000000
11875 + ef600000 ef600000 a00000
11876 + f0000000 f0000000 10000000>;
11877 + dcr-reg = <0a0 5>;
11878 + clock-frequency = <0>; /* Filled in by U-Boot */
11881 + compatible = "ibm,ebc-405exr", "ibm,ebc";
11882 + dcr-reg = <012 2>;
11883 + #address-cells = <2>;
11884 + #size-cells = <1>;
11885 + clock-frequency = <0>; /* Filled in by U-Boot */
11886 + /* ranges property is supplied by U-Boot */
11887 + interrupts = <5 1>;
11888 + interrupt-parent = <&UIC1>;
11891 + compatible = "amd,s29gl512n", "cfi-flash";
11892 + bank-width = <2>;
11893 + reg = <0 000000 4000000>;
11894 + #address-cells = <1>;
11895 + #size-cells = <1>;
11897 + label = "kernel";
11898 + reg = <0 200000>;
11900 + partition@200000 {
11902 + reg = <200000 200000>;
11904 + partition@400000 {
11906 + reg = <400000 3b60000>;
11908 + partition@3f60000 {
11910 + reg = <3f60000 40000>;
11912 + partition@3fa0000 {
11913 + label = "u-boot";
11914 + reg = <3fa0000 60000>;
11919 + UART0: serial@ef600200 {
11920 + device_type = "serial";
11921 + compatible = "ns16550";
11922 + reg = <ef600200 8>;
11923 + virtual-reg = <ef600200>;
11924 + clock-frequency = <0>; /* Filled in by U-Boot */
11925 + current-speed = <0>;
11926 + interrupt-parent = <&UIC0>;
11927 + interrupts = <1a 4>;
11930 + UART1: serial@ef600300 {
11931 + device_type = "serial";
11932 + compatible = "ns16550";
11933 + reg = <ef600300 8>;
11934 + virtual-reg = <ef600300>;
11935 + clock-frequency = <0>; /* Filled in by U-Boot */
11936 + current-speed = <0>;
11937 + interrupt-parent = <&UIC0>;
11938 + interrupts = <1 4>;
11941 + IIC0: i2c@ef600400 {
11942 + compatible = "ibm,iic-405exr", "ibm,iic";
11943 + reg = <ef600400 14>;
11944 + interrupt-parent = <&UIC0>;
11945 + interrupts = <2 4>;
11948 + IIC1: i2c@ef600500 {
11949 + compatible = "ibm,iic-405exr", "ibm,iic";
11950 + reg = <ef600500 14>;
11951 + interrupt-parent = <&UIC0>;
11952 + interrupts = <7 4>;
11956 + RGMII0: emac-rgmii@ef600b00 {
11957 + compatible = "ibm,rgmii-405exr", "ibm,rgmii";
11958 + reg = <ef600b00 104>;
11962 + EMAC0: ethernet@ef600900 {
11963 + linux,network-index = <0>;
11964 + device_type = "network";
11965 + compatible = "ibm,emac-405exr", "ibm,emac4";
11966 + interrupt-parent = <&EMAC0>;
11967 + interrupts = <0 1>;
11968 + #interrupt-cells = <1>;
11969 + #address-cells = <0>;
11970 + #size-cells = <0>;
11971 + interrupt-map = </*Status*/ 0 &UIC0 18 4
11972 + /*Wake*/ 1 &UIC1 1d 4>;
11973 + reg = <ef600900 70>;
11974 + local-mac-address = [000000000000]; /* Filled in by U-Boot */
11975 + mal-device = <&MAL0>;
11976 + mal-tx-channel = <0>;
11977 + mal-rx-channel = <0>;
11978 + cell-index = <0>;
11979 + max-frame-size = <5dc>;
11980 + rx-fifo-size = <1000>;
11981 + tx-fifo-size = <800>;
11982 + phy-mode = "rgmii";
11983 + phy-map = <00000000>;
11984 + rgmii-device = <&RGMII0>;
11985 + rgmii-channel = <0>;
11986 + has-inverted-stacr-oc;
11987 + has-new-stacr-staopc;
11991 + PCIE0: pciex@0a0000000 {
11992 + device_type = "pci";
11993 + #interrupt-cells = <1>;
11994 + #size-cells = <2>;
11995 + #address-cells = <3>;
11996 + compatible = "ibm,plb-pciex-405exr", "ibm,plb-pciex";
11998 + port = <0>; /* port number */
11999 + reg = <a0000000 20000000 /* Config space access */
12000 + ef000000 00001000>; /* Registers */
12001 + dcr-reg = <040 020>;
12002 + sdr-base = <400>;
12004 + /* Outbound ranges, one memory and one IO,
12005 + * later cannot be changed
12007 + ranges = <02000000 0 80000000 90000000 0 08000000
12008 + 01000000 0 00000000 e0000000 0 00010000>;
12010 + /* Inbound 2GB range starting at 0 */
12011 + dma-ranges = <42000000 0 0 0 0 80000000>;
12013 + /* This drives busses 0x00 to 0x3f */
12014 + bus-range = <00 3f>;
12016 + /* Legacy interrupts (note the weird polarity, the bridge seems
12017 + * to invert PCIe legacy interrupts).
12018 + * We are de-swizzling here because the numbers are actually for
12019 + * port of the root complex virtual P2P bridge. But I want
12020 + * to avoid putting a node for it in the tree, so the numbers
12021 + * below are basically de-swizzled numbers.
12022 + * The real slot is on idsel 0, so the swizzling is 1:1
12024 + interrupt-map-mask = <0000 0 0 7>;
12025 + interrupt-map = <
12026 + 0000 0 0 1 &UIC2 0 4 /* swizzled int A */
12027 + 0000 0 0 2 &UIC2 1 4 /* swizzled int B */
12028 + 0000 0 0 3 &UIC2 2 4 /* swizzled int C */
12029 + 0000 0 0 4 &UIC2 3 4 /* swizzled int D */>;
12034 +++ b/arch/powerpc/boot/dts/katmai.dts
12037 + * Device Tree Source for AMCC Katmai eval board
12039 + * Copyright (c) 2006, 2007 IBM Corp.
12040 + * Benjamin Herrenschmidt <benh@kernel.crashing.org>
12042 + * Copyright (c) 2006, 2007 IBM Corp.
12043 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
12045 + * This file is licensed under the terms of the GNU General Public
12046 + * License version 2. This program is licensed "as is" without
12047 + * any warranty of any kind, whether express or implied.
12051 + #address-cells = <2>;
12052 + #size-cells = <1>;
12053 + model = "amcc,katmai";
12054 + compatible = "amcc,katmai";
12055 + dcr-parent = <&/cpus/cpu@0>;
12058 + ethernet0 = &EMAC0;
12059 + serial0 = &UART0;
12060 + serial1 = &UART1;
12061 + serial2 = &UART2;
12065 + #address-cells = <1>;
12066 + #size-cells = <0>;
12069 + device_type = "cpu";
12070 + model = "PowerPC,440SPe";
12072 + clock-frequency = <0>; /* Filled in by zImage */
12073 + timebase-frequency = <0>; /* Filled in by zImage */
12074 + i-cache-line-size = <20>;
12075 + d-cache-line-size = <20>;
12076 + i-cache-size = <20000>;
12077 + d-cache-size = <20000>;
12079 + dcr-access-method = "native";
12084 + device_type = "memory";
12085 + reg = <0 0 0>; /* Filled in by zImage */
12088 + UIC0: interrupt-controller0 {
12089 + compatible = "ibm,uic-440spe","ibm,uic";
12090 + interrupt-controller;
12091 + cell-index = <0>;
12092 + dcr-reg = <0c0 009>;
12093 + #address-cells = <0>;
12094 + #size-cells = <0>;
12095 + #interrupt-cells = <2>;
12098 + UIC1: interrupt-controller1 {
12099 + compatible = "ibm,uic-440spe","ibm,uic";
12100 + interrupt-controller;
12101 + cell-index = <1>;
12102 + dcr-reg = <0d0 009>;
12103 + #address-cells = <0>;
12104 + #size-cells = <0>;
12105 + #interrupt-cells = <2>;
12106 + interrupts = <1e 4 1f 4>; /* cascade */
12107 + interrupt-parent = <&UIC0>;
12110 + UIC2: interrupt-controller2 {
12111 + compatible = "ibm,uic-440spe","ibm,uic";
12112 + interrupt-controller;
12113 + cell-index = <2>;
12114 + dcr-reg = <0e0 009>;
12115 + #address-cells = <0>;
12116 + #size-cells = <0>;
12117 + #interrupt-cells = <2>;
12118 + interrupts = <a 4 b 4>; /* cascade */
12119 + interrupt-parent = <&UIC0>;
12122 + UIC3: interrupt-controller3 {
12123 + compatible = "ibm,uic-440spe","ibm,uic";
12124 + interrupt-controller;
12125 + cell-index = <3>;
12126 + dcr-reg = <0f0 009>;
12127 + #address-cells = <0>;
12128 + #size-cells = <0>;
12129 + #interrupt-cells = <2>;
12130 + interrupts = <10 4 11 4>; /* cascade */
12131 + interrupt-parent = <&UIC0>;
12135 + compatible = "ibm,sdr-440spe";
12136 + dcr-reg = <00e 002>;
12140 + compatible = "ibm,cpr-440spe";
12141 + dcr-reg = <00c 002>;
12145 + compatible = "ibm,plb-440spe", "ibm,plb-440gp", "ibm,plb4";
12146 + #address-cells = <2>;
12147 + #size-cells = <1>;
12149 + clock-frequency = <0>; /* Filled in by zImage */
12152 + compatible = "ibm,sdram-440spe", "ibm,sdram-405gp";
12153 + dcr-reg = <010 2>;
12157 + compatible = "ibm,mcmal-440spe", "ibm,mcmal2";
12158 + dcr-reg = <180 62>;
12159 + num-tx-chans = <2>;
12160 + num-rx-chans = <1>;
12161 + interrupt-parent = <&MAL0>;
12162 + interrupts = <0 1 2 3 4>;
12163 + #interrupt-cells = <1>;
12164 + #address-cells = <0>;
12165 + #size-cells = <0>;
12166 + interrupt-map = </*TXEOB*/ 0 &UIC1 6 4
12167 + /*RXEOB*/ 1 &UIC1 7 4
12168 + /*SERR*/ 2 &UIC1 1 4
12169 + /*TXDE*/ 3 &UIC1 2 4
12170 + /*RXDE*/ 4 &UIC1 3 4>;
12174 + compatible = "ibm,opb-440spe", "ibm,opb-440gp", "ibm,opb";
12175 + #address-cells = <1>;
12176 + #size-cells = <1>;
12177 + ranges = <00000000 4 e0000000 20000000>;
12178 + clock-frequency = <0>; /* Filled in by zImage */
12181 + compatible = "ibm,ebc-440spe", "ibm,ebc-440gp", "ibm,ebc";
12182 + dcr-reg = <012 2>;
12183 + #address-cells = <2>;
12184 + #size-cells = <1>;
12185 + clock-frequency = <0>; /* Filled in by zImage */
12186 + interrupts = <5 1>;
12187 + interrupt-parent = <&UIC1>;
12190 + UART0: serial@10000200 {
12191 + device_type = "serial";
12192 + compatible = "ns16550";
12193 + reg = <10000200 8>;
12194 + virtual-reg = <a0000200>;
12195 + clock-frequency = <0>; /* Filled in by zImage */
12196 + current-speed = <1c200>;
12197 + interrupt-parent = <&UIC0>;
12198 + interrupts = <0 4>;
12201 + UART1: serial@10000300 {
12202 + device_type = "serial";
12203 + compatible = "ns16550";
12204 + reg = <10000300 8>;
12205 + virtual-reg = <a0000300>;
12206 + clock-frequency = <0>;
12207 + current-speed = <0>;
12208 + interrupt-parent = <&UIC0>;
12209 + interrupts = <1 4>;
12213 + UART2: serial@10000600 {
12214 + device_type = "serial";
12215 + compatible = "ns16550";
12216 + reg = <10000600 8>;
12217 + virtual-reg = <a0000600>;
12218 + clock-frequency = <0>;
12219 + current-speed = <0>;
12220 + interrupt-parent = <&UIC1>;
12221 + interrupts = <5 4>;
12224 + IIC0: i2c@10000400 {
12225 + device_type = "i2c";
12226 + compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
12227 + reg = <10000400 14>;
12228 + interrupt-parent = <&UIC0>;
12229 + interrupts = <2 4>;
12232 + IIC1: i2c@10000500 {
12233 + device_type = "i2c";
12234 + compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
12235 + reg = <10000500 14>;
12236 + interrupt-parent = <&UIC0>;
12237 + interrupts = <3 4>;
12240 + EMAC0: ethernet@10000800 {
12241 + linux,network-index = <0>;
12242 + device_type = "network";
12243 + compatible = "ibm,emac-440spe", "ibm,emac4";
12244 + interrupt-parent = <&UIC1>;
12245 + interrupts = <1c 4 1d 4>;
12246 + reg = <10000800 70>;
12247 + local-mac-address = [000000000000];
12248 + mal-device = <&MAL0>;
12249 + mal-tx-channel = <0>;
12250 + mal-rx-channel = <0>;
12251 + cell-index = <0>;
12252 + max-frame-size = <5dc>;
12253 + rx-fifo-size = <1000>;
12254 + tx-fifo-size = <800>;
12255 + phy-mode = "gmii";
12256 + phy-map = <00000000>;
12257 + has-inverted-stacr-oc;
12258 + has-new-stacr-staopc;
12262 + PCIX0: pci@c0ec00000 {
12263 + device_type = "pci";
12264 + #interrupt-cells = <1>;
12265 + #size-cells = <2>;
12266 + #address-cells = <3>;
12267 + compatible = "ibm,plb-pcix-440spe", "ibm,plb-pcix";
12269 + large-inbound-windows;
12271 + reg = <c 0ec00000 8 /* Config space access */
12272 + 0 0 0 /* no IACK cycles */
12273 + c 0ed00000 4 /* Special cycles */
12274 + c 0ec80000 100 /* Internal registers */
12275 + c 0ec80100 fc>; /* Internal messaging registers */
12277 + /* Outbound ranges, one memory and one IO,
12278 + * later cannot be changed
12280 + ranges = <02000000 0 80000000 0000000d 80000000 0 80000000
12281 + 01000000 0 00000000 0000000c 08000000 0 00010000>;
12283 + /* Inbound 2GB range starting at 0 */
12284 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12286 + /* This drives busses 0 to 0xf */
12287 + bus-range = <0 f>;
12290 + * On Katmai, the following PCI-X interrupts signals
12291 + * have to be enabled via jumpers (only INTA is
12292 + * enabled per default):
12298 + interrupt-map-mask = <f800 0 0 7>;
12299 + interrupt-map = <
12301 + 0800 0 0 1 &UIC1 14 8
12302 + 0800 0 0 2 &UIC1 13 8
12303 + 0800 0 0 3 &UIC1 12 8
12304 + 0800 0 0 4 &UIC1 11 8
12308 + PCIE0: pciex@d00000000 {
12309 + device_type = "pci";
12310 + #interrupt-cells = <1>;
12311 + #size-cells = <2>;
12312 + #address-cells = <3>;
12313 + compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
12315 + port = <0>; /* port number */
12316 + reg = <d 00000000 20000000 /* Config space access */
12317 + c 10000000 00001000>; /* Registers */
12318 + dcr-reg = <100 020>;
12319 + sdr-base = <300>;
12321 + /* Outbound ranges, one memory and one IO,
12322 + * later cannot be changed
12324 + ranges = <02000000 0 80000000 0000000e 00000000 0 80000000
12325 + 01000000 0 00000000 0000000f 80000000 0 00010000>;
12327 + /* Inbound 2GB range starting at 0 */
12328 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12330 + /* This drives busses 10 to 0x1f */
12331 + bus-range = <10 1f>;
12333 + /* Legacy interrupts (note the weird polarity, the bridge seems
12334 + * to invert PCIe legacy interrupts).
12335 + * We are de-swizzling here because the numbers are actually for
12336 + * port of the root complex virtual P2P bridge. But I want
12337 + * to avoid putting a node for it in the tree, so the numbers
12338 + * below are basically de-swizzled numbers.
12339 + * The real slot is on idsel 0, so the swizzling is 1:1
12341 + interrupt-map-mask = <0000 0 0 7>;
12342 + interrupt-map = <
12343 + 0000 0 0 1 &UIC3 0 4 /* swizzled int A */
12344 + 0000 0 0 2 &UIC3 1 4 /* swizzled int B */
12345 + 0000 0 0 3 &UIC3 2 4 /* swizzled int C */
12346 + 0000 0 0 4 &UIC3 3 4 /* swizzled int D */>;
12349 + PCIE1: pciex@d20000000 {
12350 + device_type = "pci";
12351 + #interrupt-cells = <1>;
12352 + #size-cells = <2>;
12353 + #address-cells = <3>;
12354 + compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
12356 + port = <1>; /* port number */
12357 + reg = <d 20000000 20000000 /* Config space access */
12358 + c 10001000 00001000>; /* Registers */
12359 + dcr-reg = <120 020>;
12360 + sdr-base = <340>;
12362 + /* Outbound ranges, one memory and one IO,
12363 + * later cannot be changed
12365 + ranges = <02000000 0 80000000 0000000e 80000000 0 80000000
12366 + 01000000 0 00000000 0000000f 80010000 0 00010000>;
12368 + /* Inbound 2GB range starting at 0 */
12369 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12371 + /* This drives busses 10 to 0x1f */
12372 + bus-range = <20 2f>;
12374 + /* Legacy interrupts (note the weird polarity, the bridge seems
12375 + * to invert PCIe legacy interrupts).
12376 + * We are de-swizzling here because the numbers are actually for
12377 + * port of the root complex virtual P2P bridge. But I want
12378 + * to avoid putting a node for it in the tree, so the numbers
12379 + * below are basically de-swizzled numbers.
12380 + * The real slot is on idsel 0, so the swizzling is 1:1
12382 + interrupt-map-mask = <0000 0 0 7>;
12383 + interrupt-map = <
12384 + 0000 0 0 1 &UIC3 4 4 /* swizzled int A */
12385 + 0000 0 0 2 &UIC3 5 4 /* swizzled int B */
12386 + 0000 0 0 3 &UIC3 6 4 /* swizzled int C */
12387 + 0000 0 0 4 &UIC3 7 4 /* swizzled int D */>;
12390 + PCIE2: pciex@d40000000 {
12391 + device_type = "pci";
12392 + #interrupt-cells = <1>;
12393 + #size-cells = <2>;
12394 + #address-cells = <3>;
12395 + compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
12397 + port = <2>; /* port number */
12398 + reg = <d 40000000 20000000 /* Config space access */
12399 + c 10002000 00001000>; /* Registers */
12400 + dcr-reg = <140 020>;
12401 + sdr-base = <370>;
12403 + /* Outbound ranges, one memory and one IO,
12404 + * later cannot be changed
12406 + ranges = <02000000 0 80000000 0000000f 00000000 0 80000000
12407 + 01000000 0 00000000 0000000f 80020000 0 00010000>;
12409 + /* Inbound 2GB range starting at 0 */
12410 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12412 + /* This drives busses 10 to 0x1f */
12413 + bus-range = <30 3f>;
12415 + /* Legacy interrupts (note the weird polarity, the bridge seems
12416 + * to invert PCIe legacy interrupts).
12417 + * We are de-swizzling here because the numbers are actually for
12418 + * port of the root complex virtual P2P bridge. But I want
12419 + * to avoid putting a node for it in the tree, so the numbers
12420 + * below are basically de-swizzled numbers.
12421 + * The real slot is on idsel 0, so the swizzling is 1:1
12423 + interrupt-map-mask = <0000 0 0 7>;
12424 + interrupt-map = <
12425 + 0000 0 0 1 &UIC3 8 4 /* swizzled int A */
12426 + 0000 0 0 2 &UIC3 9 4 /* swizzled int B */
12427 + 0000 0 0 3 &UIC3 a 4 /* swizzled int C */
12428 + 0000 0 0 4 &UIC3 b 4 /* swizzled int D */>;
12433 + linux,stdout-path = "/plb/opb/serial@10000200";
12436 --- a/arch/powerpc/boot/dts/kilauea.dts
12437 +++ b/arch/powerpc/boot/dts/kilauea.dts
12438 @@ -13,14 +13,22 @@
12440 model = "amcc,kilauea";
12441 compatible = "amcc,kilauea";
12442 - dcr-parent = <&/cpus/PowerPC,405EX@0>;
12443 + dcr-parent = <&/cpus/cpu@0>;
12446 + ethernet0 = &EMAC0;
12447 + ethernet1 = &EMAC1;
12448 + serial0 = &UART0;
12449 + serial1 = &UART1;
12453 #address-cells = <1>;
12456 - PowerPC,405EX@0 {
12458 device_type = "cpu";
12459 + model = "PowerPC,405EX";
12461 clock-frequency = <0>; /* Filled in by U-Boot */
12462 timebase-frequency = <0>; /* Filled in by U-Boot */
12463 @@ -194,6 +202,7 @@
12464 device_type = "rgmii-interface";
12465 compatible = "ibm,rgmii-405ex", "ibm,rgmii";
12466 reg = <ef600b00 104>;
12470 EMAC0: ethernet@ef600900 {
12471 @@ -220,6 +229,8 @@
12472 phy-map = <00000000>;
12473 rgmii-device = <&RGMII0>;
12474 rgmii-channel = <0>;
12475 + has-inverted-stacr-oc;
12476 + has-new-stacr-staopc;
12479 EMAC1: ethernet@ef600a00 {
12480 @@ -246,7 +257,91 @@
12481 phy-map = <00000000>;
12482 rgmii-device = <&RGMII0>;
12483 rgmii-channel = <1>;
12484 + has-inverted-stacr-oc;
12485 + has-new-stacr-staopc;
12489 + PCIE0: pciex@0a0000000 {
12490 + device_type = "pci";
12491 + #interrupt-cells = <1>;
12492 + #size-cells = <2>;
12493 + #address-cells = <3>;
12494 + compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
12496 + port = <0>; /* port number */
12497 + reg = <a0000000 20000000 /* Config space access */
12498 + ef000000 00001000>; /* Registers */
12499 + dcr-reg = <040 020>;
12500 + sdr-base = <400>;
12502 + /* Outbound ranges, one memory and one IO,
12503 + * later cannot be changed
12505 + ranges = <02000000 0 80000000 90000000 0 08000000
12506 + 01000000 0 00000000 e0000000 0 00010000>;
12508 + /* Inbound 2GB range starting at 0 */
12509 + dma-ranges = <42000000 0 0 0 0 80000000>;
12511 + /* This drives busses 0x00 to 0x3f */
12512 + bus-range = <00 3f>;
12514 + /* Legacy interrupts (note the weird polarity, the bridge seems
12515 + * to invert PCIe legacy interrupts).
12516 + * We are de-swizzling here because the numbers are actually for
12517 + * port of the root complex virtual P2P bridge. But I want
12518 + * to avoid putting a node for it in the tree, so the numbers
12519 + * below are basically de-swizzled numbers.
12520 + * The real slot is on idsel 0, so the swizzling is 1:1
12522 + interrupt-map-mask = <0000 0 0 7>;
12523 + interrupt-map = <
12524 + 0000 0 0 1 &UIC2 0 4 /* swizzled int A */
12525 + 0000 0 0 2 &UIC2 1 4 /* swizzled int B */
12526 + 0000 0 0 3 &UIC2 2 4 /* swizzled int C */
12527 + 0000 0 0 4 &UIC2 3 4 /* swizzled int D */>;
12530 + PCIE1: pciex@0c0000000 {
12531 + device_type = "pci";
12532 + #interrupt-cells = <1>;
12533 + #size-cells = <2>;
12534 + #address-cells = <3>;
12535 + compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
12537 + port = <1>; /* port number */
12538 + reg = <c0000000 20000000 /* Config space access */
12539 + ef001000 00001000>; /* Registers */
12540 + dcr-reg = <060 020>;
12541 + sdr-base = <440>;
12543 + /* Outbound ranges, one memory and one IO,
12544 + * later cannot be changed
12546 + ranges = <02000000 0 80000000 98000000 0 08000000
12547 + 01000000 0 00000000 e0010000 0 00010000>;
12549 + /* Inbound 2GB range starting at 0 */
12550 + dma-ranges = <42000000 0 0 0 0 80000000>;
12552 + /* This drives busses 0x40 to 0x7f */
12553 + bus-range = <40 7f>;
12555 + /* Legacy interrupts (note the weird polarity, the bridge seems
12556 + * to invert PCIe legacy interrupts).
12557 + * We are de-swizzling here because the numbers are actually for
12558 + * port of the root complex virtual P2P bridge. But I want
12559 + * to avoid putting a node for it in the tree, so the numbers
12560 + * below are basically de-swizzled numbers.
12561 + * The real slot is on idsel 0, so the swizzling is 1:1
12563 + interrupt-map-mask = <0000 0 0 7>;
12564 + interrupt-map = <
12565 + 0000 0 0 1 &UIC2 b 4 /* swizzled int A */
12566 + 0000 0 0 2 &UIC2 c 4 /* swizzled int B */
12567 + 0000 0 0 3 &UIC2 d 4 /* swizzled int C */
12568 + 0000 0 0 4 &UIC2 e 4 /* swizzled int D */>;
12572 --- a/arch/powerpc/boot/dts/kuroboxHD.dts
12573 +++ b/arch/powerpc/boot/dts/kuroboxHD.dts
12575 #address-cells = <1>;
12579 + serial0 = &serial0;
12580 + serial1 = &serial1;
12585 #address-cells = <1>;
12589 #address-cells = <1>;
12591 - device_type = "i2c";
12592 + cell-index = <0>;
12593 compatible = "fsl-i2c";
12594 reg = <80003000 1000>;
12595 interrupts = <5 2>;
12600 - serial@80004500 {
12601 + serial0: serial@80004500 {
12602 + cell-index = <0>;
12603 device_type = "serial";
12604 compatible = "ns16550";
12605 reg = <80004500 8>;
12607 interrupt-parent = <&mpic>;
12610 - serial@80004600 {
12611 + serial1: serial@80004600 {
12612 + cell-index = <1>;
12613 device_type = "serial";
12614 compatible = "ns16550";
12615 reg = <80004600 8>;
12616 @@ -102,7 +110,7 @@
12617 reg = <80040000 40000>;
12621 + pci0: pci@fec00000 {
12622 #address-cells = <3>;
12624 #interrupt-cells = <1>;
12625 --- a/arch/powerpc/boot/dts/kuroboxHG.dts
12626 +++ b/arch/powerpc/boot/dts/kuroboxHG.dts
12628 #address-cells = <1>;
12632 + serial0 = &serial0;
12633 + serial1 = &serial1;
12638 #address-cells = <1>;
12642 #address-cells = <1>;
12644 - device_type = "i2c";
12645 + cell-index = <0>;
12646 compatible = "fsl-i2c";
12647 reg = <80003000 1000>;
12648 interrupts = <5 2>;
12653 - serial@80004500 {
12654 + serial0: serial@80004500 {
12655 + cell-index = <0>;
12656 device_type = "serial";
12657 compatible = "ns16550";
12658 reg = <80004500 8>;
12660 interrupt-parent = <&mpic>;
12663 - serial@80004600 {
12664 + serial1: serial@80004600 {
12665 + cell-index = <1>;
12666 device_type = "serial";
12667 compatible = "ns16550";
12668 reg = <80004600 8>;
12669 @@ -102,7 +110,7 @@
12670 reg = <80040000 40000>;
12674 + pci0: pci@fec00000 {
12675 #address-cells = <3>;
12677 #interrupt-cells = <1>;
12678 --- a/arch/powerpc/boot/dts/lite5200.dts
12679 +++ b/arch/powerpc/boot/dts/lite5200.dts
12682 model = "fsl,lite5200";
12683 // revision = "1.0";
12684 - compatible = "fsl,lite5200","generic-mpc5200";
12685 + compatible = "fsl,lite5200";
12686 #address-cells = <1>;
12689 @@ -284,7 +284,8 @@
12693 - device_type = "i2c";
12694 + #address-cells = <1>;
12695 + #size-cells = <0>;
12696 compatible = "mpc5200-i2c","fsl-i2c";
12699 @@ -294,7 +295,8 @@
12703 - device_type = "i2c";
12704 + #address-cells = <1>;
12705 + #size-cells = <0>;
12706 compatible = "mpc5200-i2c","fsl-i2c";
12709 --- a/arch/powerpc/boot/dts/lite5200b.dts
12710 +++ b/arch/powerpc/boot/dts/lite5200b.dts
12713 model = "fsl,lite5200b";
12714 // revision = "1.0";
12715 - compatible = "fsl,lite5200b","generic-mpc5200";
12716 + compatible = "fsl,lite5200b";
12717 #address-cells = <1>;
12720 @@ -300,7 +300,8 @@
12724 - device_type = "i2c";
12725 + #address-cells = <1>;
12726 + #size-cells = <0>;
12727 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
12730 @@ -310,7 +311,8 @@
12734 - device_type = "i2c";
12735 + #address-cells = <1>;
12736 + #size-cells = <0>;
12737 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
12741 +++ b/arch/powerpc/boot/dts/makalu.dts
12744 + * Device Tree Source for AMCC Makalu (405EX)
12746 + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
12748 + * This file is licensed under the terms of the GNU General Public
12749 + * License version 2. This program is licensed "as is" without
12750 + * any warranty of any kind, whether express or implied.
12754 + #address-cells = <1>;
12755 + #size-cells = <1>;
12756 + model = "amcc,makalu";
12757 + compatible = "amcc,makalu";
12758 + dcr-parent = <&/cpus/cpu@0>;
12761 + ethernet0 = &EMAC0;
12762 + ethernet1 = &EMAC1;
12763 + serial0 = &UART0;
12764 + serial1 = &UART1;
12768 + #address-cells = <1>;
12769 + #size-cells = <0>;
12772 + device_type = "cpu";
12773 + model = "PowerPC,405EX";
12775 + clock-frequency = <0>; /* Filled in by U-Boot */
12776 + timebase-frequency = <0>; /* Filled in by U-Boot */
12777 + i-cache-line-size = <20>;
12778 + d-cache-line-size = <20>;
12779 + i-cache-size = <4000>; /* 16 kB */
12780 + d-cache-size = <4000>; /* 16 kB */
12782 + dcr-access-method = "native";
12787 + device_type = "memory";
12788 + reg = <0 0>; /* Filled in by U-Boot */
12791 + UIC0: interrupt-controller {
12792 + compatible = "ibm,uic-405ex", "ibm,uic";
12793 + interrupt-controller;
12794 + cell-index = <0>;
12795 + dcr-reg = <0c0 009>;
12796 + #address-cells = <0>;
12797 + #size-cells = <0>;
12798 + #interrupt-cells = <2>;
12801 + UIC1: interrupt-controller1 {
12802 + compatible = "ibm,uic-405ex","ibm,uic";
12803 + interrupt-controller;
12804 + cell-index = <1>;
12805 + dcr-reg = <0d0 009>;
12806 + #address-cells = <0>;
12807 + #size-cells = <0>;
12808 + #interrupt-cells = <2>;
12809 + interrupts = <1e 4 1f 4>; /* cascade */
12810 + interrupt-parent = <&UIC0>;
12813 + UIC2: interrupt-controller2 {
12814 + compatible = "ibm,uic-405ex","ibm,uic";
12815 + interrupt-controller;
12816 + cell-index = <2>;
12817 + dcr-reg = <0e0 009>;
12818 + #address-cells = <0>;
12819 + #size-cells = <0>;
12820 + #interrupt-cells = <2>;
12821 + interrupts = <1c 4 1d 4>; /* cascade */
12822 + interrupt-parent = <&UIC0>;
12826 + compatible = "ibm,plb-405ex", "ibm,plb4";
12827 + #address-cells = <1>;
12828 + #size-cells = <1>;
12830 + clock-frequency = <0>; /* Filled in by U-Boot */
12832 + SDRAM0: memory-controller {
12833 + compatible = "ibm,sdram-405ex";
12834 + dcr-reg = <010 2>;
12838 + compatible = "ibm,mcmal-405ex", "ibm,mcmal2";
12839 + dcr-reg = <180 62>;
12840 + num-tx-chans = <2>;
12841 + num-rx-chans = <2>;
12842 + interrupt-parent = <&MAL0>;
12843 + interrupts = <0 1 2 3 4>;
12844 + #interrupt-cells = <1>;
12845 + #address-cells = <0>;
12846 + #size-cells = <0>;
12847 + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
12848 + /*RXEOB*/ 1 &UIC0 b 4
12849 + /*SERR*/ 2 &UIC1 0 4
12850 + /*TXDE*/ 3 &UIC1 1 4
12851 + /*RXDE*/ 4 &UIC1 2 4>;
12852 + interrupt-map-mask = <ffffffff>;
12856 + compatible = "ibm,opb-405ex", "ibm,opb";
12857 + #address-cells = <1>;
12858 + #size-cells = <1>;
12859 + ranges = <80000000 80000000 10000000
12860 + ef600000 ef600000 a00000
12861 + f0000000 f0000000 10000000>;
12862 + dcr-reg = <0a0 5>;
12863 + clock-frequency = <0>; /* Filled in by U-Boot */
12866 + compatible = "ibm,ebc-405ex", "ibm,ebc";
12867 + dcr-reg = <012 2>;
12868 + #address-cells = <2>;
12869 + #size-cells = <1>;
12870 + clock-frequency = <0>; /* Filled in by U-Boot */
12871 + /* ranges property is supplied by U-Boot */
12872 + interrupts = <5 1>;
12873 + interrupt-parent = <&UIC1>;
12876 + compatible = "amd,s29gl512n", "cfi-flash";
12877 + bank-width = <2>;
12878 + reg = <0 000000 4000000>;
12879 + #address-cells = <1>;
12880 + #size-cells = <1>;
12882 + label = "kernel";
12883 + reg = <0 200000>;
12885 + partition@200000 {
12887 + reg = <200000 200000>;
12889 + partition@400000 {
12891 + reg = <400000 3b60000>;
12893 + partition@3f60000 {
12895 + reg = <3f60000 40000>;
12897 + partition@3fa0000 {
12898 + label = "u-boot";
12899 + reg = <3fa0000 60000>;
12904 + UART0: serial@ef600200 {
12905 + device_type = "serial";
12906 + compatible = "ns16550";
12907 + reg = <ef600200 8>;
12908 + virtual-reg = <ef600200>;
12909 + clock-frequency = <0>; /* Filled in by U-Boot */
12910 + current-speed = <0>;
12911 + interrupt-parent = <&UIC0>;
12912 + interrupts = <1a 4>;
12915 + UART1: serial@ef600300 {
12916 + device_type = "serial";
12917 + compatible = "ns16550";
12918 + reg = <ef600300 8>;
12919 + virtual-reg = <ef600300>;
12920 + clock-frequency = <0>; /* Filled in by U-Boot */
12921 + current-speed = <0>;
12922 + interrupt-parent = <&UIC0>;
12923 + interrupts = <1 4>;
12926 + IIC0: i2c@ef600400 {
12927 + device_type = "i2c";
12928 + compatible = "ibm,iic-405ex", "ibm,iic";
12929 + reg = <ef600400 14>;
12930 + interrupt-parent = <&UIC0>;
12931 + interrupts = <2 4>;
12934 + IIC1: i2c@ef600500 {
12935 + device_type = "i2c";
12936 + compatible = "ibm,iic-405ex", "ibm,iic";
12937 + reg = <ef600500 14>;
12938 + interrupt-parent = <&UIC0>;
12939 + interrupts = <7 4>;
12943 + RGMII0: emac-rgmii@ef600b00 {
12944 + device_type = "rgmii-interface";
12945 + compatible = "ibm,rgmii-405ex", "ibm,rgmii";
12946 + reg = <ef600b00 104>;
12950 + EMAC0: ethernet@ef600900 {
12951 + linux,network-index = <0>;
12952 + device_type = "network";
12953 + compatible = "ibm,emac-405ex", "ibm,emac4";
12954 + interrupt-parent = <&EMAC0>;
12955 + interrupts = <0 1>;
12956 + #interrupt-cells = <1>;
12957 + #address-cells = <0>;
12958 + #size-cells = <0>;
12959 + interrupt-map = </*Status*/ 0 &UIC0 18 4
12960 + /*Wake*/ 1 &UIC1 1d 4>;
12961 + reg = <ef600900 70>;
12962 + local-mac-address = [000000000000]; /* Filled in by U-Boot */
12963 + mal-device = <&MAL0>;
12964 + mal-tx-channel = <0>;
12965 + mal-rx-channel = <0>;
12966 + cell-index = <0>;
12967 + max-frame-size = <5dc>;
12968 + rx-fifo-size = <1000>;
12969 + tx-fifo-size = <800>;
12970 + phy-mode = "rgmii";
12971 + phy-map = <0000003f>; /* Start at 6 */
12972 + rgmii-device = <&RGMII0>;
12973 + rgmii-channel = <0>;
12974 + has-inverted-stacr-oc;
12975 + has-new-stacr-staopc;
12978 + EMAC1: ethernet@ef600a00 {
12979 + linux,network-index = <1>;
12980 + device_type = "network";
12981 + compatible = "ibm,emac-405ex", "ibm,emac4";
12982 + interrupt-parent = <&EMAC1>;
12983 + interrupts = <0 1>;
12984 + #interrupt-cells = <1>;
12985 + #address-cells = <0>;
12986 + #size-cells = <0>;
12987 + interrupt-map = </*Status*/ 0 &UIC0 19 4
12988 + /*Wake*/ 1 &UIC1 1f 4>;
12989 + reg = <ef600a00 70>;
12990 + local-mac-address = [000000000000]; /* Filled in by U-Boot */
12991 + mal-device = <&MAL0>;
12992 + mal-tx-channel = <1>;
12993 + mal-rx-channel = <1>;
12994 + cell-index = <1>;
12995 + max-frame-size = <5dc>;
12996 + rx-fifo-size = <1000>;
12997 + tx-fifo-size = <800>;
12998 + phy-mode = "rgmii";
12999 + phy-map = <00000000>;
13000 + rgmii-device = <&RGMII0>;
13001 + rgmii-channel = <1>;
13002 + has-inverted-stacr-oc;
13003 + has-new-stacr-staopc;
13007 + PCIE0: pciex@0a0000000 {
13008 + device_type = "pci";
13009 + #interrupt-cells = <1>;
13010 + #size-cells = <2>;
13011 + #address-cells = <3>;
13012 + compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
13014 + port = <0>; /* port number */
13015 + reg = <a0000000 20000000 /* Config space access */
13016 + ef000000 00001000>; /* Registers */
13017 + dcr-reg = <040 020>;
13018 + sdr-base = <400>;
13020 + /* Outbound ranges, one memory and one IO,
13021 + * later cannot be changed
13023 + ranges = <02000000 0 80000000 90000000 0 08000000
13024 + 01000000 0 00000000 e0000000 0 00010000>;
13026 + /* Inbound 2GB range starting at 0 */
13027 + dma-ranges = <42000000 0 0 0 0 80000000>;
13029 + /* This drives busses 0x00 to 0x3f */
13030 + bus-range = <00 3f>;
13032 + /* Legacy interrupts (note the weird polarity, the bridge seems
13033 + * to invert PCIe legacy interrupts).
13034 + * We are de-swizzling here because the numbers are actually for
13035 + * port of the root complex virtual P2P bridge. But I want
13036 + * to avoid putting a node for it in the tree, so the numbers
13037 + * below are basically de-swizzled numbers.
13038 + * The real slot is on idsel 0, so the swizzling is 1:1
13040 + interrupt-map-mask = <0000 0 0 7>;
13041 + interrupt-map = <
13042 + 0000 0 0 1 &UIC2 0 4 /* swizzled int A */
13043 + 0000 0 0 2 &UIC2 1 4 /* swizzled int B */
13044 + 0000 0 0 3 &UIC2 2 4 /* swizzled int C */
13045 + 0000 0 0 4 &UIC2 3 4 /* swizzled int D */>;
13048 + PCIE1: pciex@0c0000000 {
13049 + device_type = "pci";
13050 + #interrupt-cells = <1>;
13051 + #size-cells = <2>;
13052 + #address-cells = <3>;
13053 + compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
13055 + port = <1>; /* port number */
13056 + reg = <c0000000 20000000 /* Config space access */
13057 + ef001000 00001000>; /* Registers */
13058 + dcr-reg = <060 020>;
13059 + sdr-base = <440>;
13061 + /* Outbound ranges, one memory and one IO,
13062 + * later cannot be changed
13064 + ranges = <02000000 0 80000000 98000000 0 08000000
13065 + 01000000 0 00000000 e0010000 0 00010000>;
13067 + /* Inbound 2GB range starting at 0 */
13068 + dma-ranges = <42000000 0 0 0 0 80000000>;
13070 + /* This drives busses 0x40 to 0x7f */
13071 + bus-range = <40 7f>;
13073 + /* Legacy interrupts (note the weird polarity, the bridge seems
13074 + * to invert PCIe legacy interrupts).
13075 + * We are de-swizzling here because the numbers are actually for
13076 + * port of the root complex virtual P2P bridge. But I want
13077 + * to avoid putting a node for it in the tree, so the numbers
13078 + * below are basically de-swizzled numbers.
13079 + * The real slot is on idsel 0, so the swizzling is 1:1
13081 + interrupt-map-mask = <0000 0 0 7>;
13082 + interrupt-map = <
13083 + 0000 0 0 1 &UIC2 b 4 /* swizzled int A */
13084 + 0000 0 0 2 &UIC2 c 4 /* swizzled int B */
13085 + 0000 0 0 3 &UIC2 d 4 /* swizzled int C */
13086 + 0000 0 0 4 &UIC2 e 4 /* swizzled int D */>;
13091 +++ b/arch/powerpc/boot/dts/motionpro.dts
13094 + * Motion-PRO board Device Tree Source
13096 + * Copyright (C) 2007 Semihalf
13097 + * Marian Balakowicz <m8@semihalf.com>
13099 + * This program is free software; you can redistribute it and/or modify it
13100 + * under the terms of the GNU General Public License as published by the
13101 + * Free Software Foundation; either version 2 of the License, or (at your
13102 + * option) any later version.
13106 + * WARNING: Do not depend on this tree layout remaining static just yet.
13107 + * The MPC5200 device tree conventions are still in flux
13108 + * Keep an eye on the linuxppc-dev mailing list for more details
13112 + model = "promess,motionpro";
13113 + compatible = "promess,motionpro";
13114 + #address-cells = <1>;
13115 + #size-cells = <1>;
13118 + #address-cells = <1>;
13119 + #size-cells = <0>;
13122 + device_type = "cpu";
13124 + d-cache-line-size = <20>;
13125 + i-cache-line-size = <20>;
13126 + d-cache-size = <4000>; // L1, 16K
13127 + i-cache-size = <4000>; // L1, 16K
13128 + timebase-frequency = <0>; // from bootloader
13129 + bus-frequency = <0>; // from bootloader
13130 + clock-frequency = <0>; // from bootloader
13135 + device_type = "memory";
13136 + reg = <00000000 04000000>; // 64MB
13139 + soc5200@f0000000 {
13140 + model = "fsl,mpc5200b";
13141 + compatible = "fsl,mpc5200b";
13142 + revision = ""; // from bootloader
13143 + device_type = "soc";
13144 + ranges = <0 f0000000 0000c000>;
13145 + reg = <f0000000 00000100>;
13146 + bus-frequency = <0>; // from bootloader
13147 + system-frequency = <0>; // from bootloader
13150 + compatible = "mpc5200b-cdm","mpc5200-cdm";
13154 + mpc5200_pic: pic@500 {
13155 + // 5200 interrupts are encoded into two levels;
13156 + interrupt-controller;
13157 + #interrupt-cells = <3>;
13158 + compatible = "mpc5200b-pic","mpc5200-pic";
13162 + gpt@600 { // General Purpose Timer
13163 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13165 + interrupts = <1 9 0>;
13166 + interrupt-parent = <&mpc5200_pic>;
13170 + gpt@610 { // General Purpose Timer
13171 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13173 + interrupts = <1 a 0>;
13174 + interrupt-parent = <&mpc5200_pic>;
13177 + gpt@620 { // General Purpose Timer
13178 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13180 + interrupts = <1 b 0>;
13181 + interrupt-parent = <&mpc5200_pic>;
13184 + gpt@630 { // General Purpose Timer
13185 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13187 + interrupts = <1 c 0>;
13188 + interrupt-parent = <&mpc5200_pic>;
13191 + gpt@640 { // General Purpose Timer
13192 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13194 + interrupts = <1 d 0>;
13195 + interrupt-parent = <&mpc5200_pic>;
13198 + gpt@650 { // General Purpose Timer
13199 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13201 + interrupts = <1 e 0>;
13202 + interrupt-parent = <&mpc5200_pic>;
13205 + motionpro-led@660 { // Motion-PRO status LED
13206 + compatible = "promess,motionpro-led";
13207 + label = "motionpro-statusled";
13209 + interrupts = <1 f 0>;
13210 + interrupt-parent = <&mpc5200_pic>;
13211 + blink-delay = <64>; // 100 msec
13214 + motionpro-led@670 { // Motion-PRO ready LED
13215 + compatible = "promess,motionpro-led";
13216 + label = "motionpro-readyled";
13218 + interrupts = <1 10 0>;
13219 + interrupt-parent = <&mpc5200_pic>;
13222 + rtc@800 { // Real time clock
13223 + compatible = "mpc5200b-rtc","mpc5200-rtc";
13225 + interrupts = <1 5 0 1 6 0>;
13226 + interrupt-parent = <&mpc5200_pic>;
13230 + compatible = "mpc5200b-mscan","mpc5200-mscan";
13231 + interrupts = <2 12 0>;
13232 + interrupt-parent = <&mpc5200_pic>;
13237 + compatible = "mpc5200b-gpio","mpc5200-gpio";
13239 + interrupts = <1 7 0>;
13240 + interrupt-parent = <&mpc5200_pic>;
13244 + compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup";
13246 + interrupts = <1 8 0 0 3 0>;
13247 + interrupt-parent = <&mpc5200_pic>;
13252 + compatible = "mpc5200b-spi","mpc5200-spi";
13254 + interrupts = <2 d 0 2 e 0>;
13255 + interrupt-parent = <&mpc5200_pic>;
13259 + compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
13261 + interrupts = <2 6 0>;
13262 + interrupt-parent = <&mpc5200_pic>;
13265 + dma-controller@1200 {
13266 + compatible = "mpc5200b-bestcomm","mpc5200-bestcomm";
13268 + interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
13269 + 3 4 0 3 5 0 3 6 0 3 7 0
13270 + 3 8 0 3 9 0 3 a 0 3 b 0
13271 + 3 c 0 3 d 0 3 e 0 3 f 0>;
13272 + interrupt-parent = <&mpc5200_pic>;
13276 + compatible = "mpc5200b-xlb","mpc5200-xlb";
13277 + reg = <1f00 100>;
13280 + serial@2000 { // PSC1
13281 + device_type = "serial";
13282 + compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
13283 + port-number = <0>; // Logical port assignment
13284 + reg = <2000 100>;
13285 + interrupts = <2 1 0>;
13286 + interrupt-parent = <&mpc5200_pic>;
13289 + // PSC2 in spi master mode
13290 + spi@2200 { // PSC2
13291 + compatible = "mpc5200b-psc-spi","mpc5200-psc-spi";
13292 + cell-index = <1>;
13293 + reg = <2200 100>;
13294 + interrupts = <2 2 0>;
13295 + interrupt-parent = <&mpc5200_pic>;
13298 + // PSC5 in uart mode
13299 + serial@2800 { // PSC5
13300 + device_type = "serial";
13301 + compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
13302 + port-number = <4>; // Logical port assignment
13303 + reg = <2800 100>;
13304 + interrupts = <2 c 0>;
13305 + interrupt-parent = <&mpc5200_pic>;
13309 + device_type = "network";
13310 + compatible = "mpc5200b-fec","mpc5200-fec";
13311 + reg = <3000 800>;
13312 + local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */
13313 + interrupts = <2 5 0>;
13314 + interrupt-parent = <&mpc5200_pic>;
13318 + compatible = "mpc5200b-ata","mpc5200-ata";
13319 + reg = <3a00 100>;
13320 + interrupts = <2 7 0>;
13321 + interrupt-parent = <&mpc5200_pic>;
13325 + compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
13327 + interrupts = <2 10 0>;
13328 + interrupt-parent = <&mpc5200_pic>;
13329 + fsl5200-clocking;
13333 + compatible = "mpc5200b-sram","mpc5200-sram";
13334 + reg = <8000 4000>;
13339 + model = "fsl,lpb";
13340 + compatible = "fsl,lpb";
13341 + #address-cells = <2>;
13342 + #size-cells = <1>;
13343 + ranges = <1 0 50000000 00010000
13344 + 2 0 50010000 00010000
13345 + 3 0 50020000 00010000>;
13347 + // 8-bit DualPort SRAM on LocalPlus Bus CS1
13349 + compatible = "promess,motionpro-kollmorgen";
13350 + reg = <1 0 10000>;
13351 + interrupts = <1 1 0>;
13352 + interrupt-parent = <&mpc5200_pic>;
13355 + // 8-bit board CPLD on LocalPlus Bus CS2
13357 + compatible = "promess,motionpro-cpld";
13358 + reg = <2 0 10000>;
13361 + // 8-bit custom Anybus Module on LocalPlus Bus CS3
13363 + compatible = "promess,motionpro-anybus";
13364 + reg = <3 0 10000>;
13366 + pro_module_general@3,0 {
13367 + compatible = "promess,pro_module_general";
13370 + pro_module_dio@3,800 {
13371 + compatible = "promess,pro_module_dio";
13377 + #interrupt-cells = <1>;
13378 + #size-cells = <2>;
13379 + #address-cells = <3>;
13380 + device_type = "pci";
13381 + compatible = "mpc5200b-pci","mpc5200-pci";
13382 + reg = <f0000d00 100>;
13383 + interrupt-map-mask = <f800 0 0 7>;
13384 + interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
13385 + c000 0 0 2 &mpc5200_pic 1 1 3
13386 + c000 0 0 3 &mpc5200_pic 1 2 3
13387 + c000 0 0 4 &mpc5200_pic 1 3 3
13389 + c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
13390 + c800 0 0 2 &mpc5200_pic 1 2 3
13391 + c800 0 0 3 &mpc5200_pic 1 3 3
13392 + c800 0 0 4 &mpc5200_pic 0 0 3>;
13393 + clock-frequency = <0>; // From boot loader
13394 + interrupts = <2 8 0 2 9 0 2 a 0>;
13395 + interrupt-parent = <&mpc5200_pic>;
13396 + bus-range = <0 0>;
13397 + ranges = <42000000 0 80000000 80000000 0 20000000
13398 + 02000000 0 a0000000 a0000000 0 10000000
13399 + 01000000 0 00000000 b0000000 0 01000000>;
13402 --- a/arch/powerpc/boot/dts/mpc8313erdb.dts
13403 +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
13405 #address-cells = <1>;
13409 + ethernet0 = &enet0;
13410 + ethernet1 = &enet1;
13411 + serial0 = &serial0;
13412 + serial1 = &serial1;
13417 #address-cells = <1>;
13419 @@ -37,10 +45,58 @@
13420 reg = <00000000 08000000>; // 128MB at 0
13423 + localbus@e0005000 {
13424 + #address-cells = <2>;
13425 + #size-cells = <1>;
13426 + compatible = "fsl,mpc8313-elbc", "fsl,elbc", "simple-bus";
13427 + reg = <e0005000 1000>;
13428 + interrupts = <d#77 8>;
13429 + interrupt-parent = <&ipic>;
13431 + // CS0 and CS1 are swapped when
13432 + // booting from nand, but the
13433 + // addresses are the same.
13434 + ranges = <0 0 fe000000 00800000
13435 + 1 0 e2800000 00008000
13436 + 2 0 f0000000 00020000
13437 + 3 0 fa000000 00008000>;
13440 + #address-cells = <1>;
13441 + #size-cells = <1>;
13442 + compatible = "cfi-flash";
13443 + reg = <0 0 800000>;
13444 + bank-width = <2>;
13445 + device-width = <1>;
13449 + #address-cells = <1>;
13450 + #size-cells = <1>;
13451 + compatible = "fsl,mpc8313-fcm-nand",
13452 + "fsl,elbc-fcm-nand";
13453 + reg = <1 0 2000>;
13456 + reg = <0 100000>;
13461 + reg = <100000 300000>;
13465 + reg = <400000 1c00000>;
13471 #address-cells = <1>;
13473 device_type = "soc";
13474 + compatible = "simple-bus";
13475 ranges = <0 e0000000 00100000>;
13476 reg = <e0000000 00000200>;
13477 bus-frequency = <0>;
13482 - device_type = "i2c";
13483 + #address-cells = <1>;
13484 + #size-cells = <0>;
13485 + cell-index = <0>;
13486 compatible = "fsl-i2c";
13488 interrupts = <e 8>;
13493 - device_type = "i2c";
13494 + #address-cells = <1>;
13495 + #size-cells = <0>;
13496 + cell-index = <1>;
13497 compatible = "fsl-i2c";
13499 interrupts = <f 8>;
13502 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
13504 - device_type = "usb";
13505 compatible = "fsl-usb2-dr";
13506 reg = <23000 1000>;
13507 #address-cells = <1>;
13508 @@ -91,11 +150,10 @@
13512 - device_type = "mdio";
13513 - compatible = "gianfar";
13514 - reg = <24520 20>;
13515 #address-cells = <1>;
13517 + compatible = "fsl,gianfar-mdio";
13518 + reg = <24520 20>;
13519 phy1: ethernet-phy@1 {
13520 interrupt-parent = < &ipic >;
13521 interrupts = <13 8>;
13522 @@ -110,7 +168,8 @@
13527 + enet0: ethernet@24000 {
13528 + cell-index = <0>;
13529 device_type = "network";
13531 compatible = "gianfar";
13532 @@ -121,7 +180,8 @@
13533 phy-handle = < &phy1 >;
13537 + enet1: ethernet@25000 {
13538 + cell-index = <1>;
13539 device_type = "network";
13541 compatible = "gianfar";
13542 @@ -132,7 +192,8 @@
13543 phy-handle = < &phy4 >;
13547 + serial0: serial@4500 {
13548 + cell-index = <0>;
13549 device_type = "serial";
13550 compatible = "ns16550";
13552 @@ -141,7 +202,8 @@
13553 interrupt-parent = < &ipic >;
13557 + serial1: serial@4600 {
13558 + cell-index = <1>;
13559 device_type = "serial";
13560 compatible = "ns16550";
13562 @@ -179,7 +241,8 @@
13567 + pci0: pci@e0008500 {
13568 + cell-index = <1>;
13569 interrupt-map-mask = <f800 0 0 7>;
13572 --- a/arch/powerpc/boot/dts/mpc832x_mds.dts
13573 +++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
13575 * under the terms of the GNU General Public License as published by the
13576 * Free Software Foundation; either version 2 of the License, or (at your
13577 * option) any later version.
13579 + * To enable external serial I/O on a Freescale MPC 8323 SYS/MDS board, do
13582 + * 1) On chip U61, lift (disconnect) pins 21 (TXD) and 22 (RXD) from the board.
13583 + * 2) Solder a wire from U61-21 to P19A-23. P19 is a grid of pins on the board
13584 + * next to the serial ports.
13585 + * 3) Solder a wire from U61-22 to P19K-22.
13587 + * Note that there's a typo in the schematic. The board labels the last column
13588 + * of pins "P19K", but in the schematic, that column is called "P19J". So if
13589 + * you're going by the schematic, the pin is called "P19J-K22".
13594 #address-cells = <1>;
13598 + ethernet0 = &enet0;
13599 + ethernet1 = &enet1;
13600 + serial0 = &serial0;
13601 + serial1 = &serial1;
13606 #address-cells = <1>;
13610 #address-cells = <1>;
13612 - device_type = "i2c";
13613 + cell-index = <0>;
13614 compatible = "fsl-i2c";
13616 interrupts = <e 8>;
13622 + serial0: serial@4500 {
13623 + cell-index = <0>;
13624 device_type = "serial";
13625 compatible = "ns16550";
13628 interrupt-parent = < &ipic >;
13632 + serial1: serial@4600 {
13633 + cell-index = <1>;
13634 device_type = "serial";
13635 compatible = "ns16550";
13637 @@ -159,6 +181,23 @@
13638 1 1e 1 0 1 0 /* TX_EN */
13639 1 1f 2 0 1 0>;/* CRS */
13641 + pio5: ucc_pin@05 {
13645 + * port pin dir drain sel irq
13647 + 2 0 1 0 2 0 /* TxD5 */
13648 + 2 8 2 0 2 0 /* RxD5 */
13650 + 2 1d 2 0 0 0 /* CTS5 */
13651 + 2 1f 1 0 2 0 /* RTS5 */
13653 + 2 18 2 0 0 0 /* CD */
13661 @@ -166,6 +205,7 @@
13662 #address-cells = <1>;
13664 device_type = "qe";
13665 + compatible = "fsl,qe";
13667 ranges = <0 e0100000 00100000>;
13668 reg = <e0100000 480>;
13669 @@ -200,7 +240,6 @@
13673 - device_type = "usb";
13674 compatible = "qe_udc";
13675 reg = <6c0 40 8B00 100>;
13677 @@ -208,48 +247,58 @@
13682 + enet0: ucc@2200 {
13683 device_type = "network";
13684 compatible = "ucc_geth";
13686 + cell-index = <3>;
13690 interrupt-parent = < &qeic >;
13692 - * mac-address is deprecated and will be removed
13693 - * in 2.6.25. Only recent versions of
13694 - * U-Boot support local-mac-address, however.
13696 - mac-address = [ 00 00 00 00 00 00 ];
13697 local-mac-address = [ 00 00 00 00 00 00 ];
13700 + rx-clock-name = "clk9";
13701 + tx-clock-name = "clk10";
13702 phy-handle = < &phy3 >;
13703 pio-handle = < &pio3 >;
13707 + enet1: ucc@3200 {
13708 device_type = "network";
13709 compatible = "ucc_geth";
13711 + cell-index = <4>;
13715 interrupt-parent = < &qeic >;
13717 - * mac-address is deprecated and will be removed
13718 - * in 2.6.25. Only recent versions of
13719 - * U-Boot support local-mac-address, however.
13721 - mac-address = [ 00 00 00 00 00 00 ];
13722 local-mac-address = [ 00 00 00 00 00 00 ];
13725 + rx-clock-name = "clk7";
13726 + tx-clock-name = "clk8";
13727 phy-handle = < &phy4 >;
13728 pio-handle = < &pio4 >;
13732 + device_type = "serial";
13733 + compatible = "ucc_uart";
13735 + device-id = <5>; /* The UCC number, 1-7*/
13736 + port-number = <0>; /* Which ttyQEx device */
13737 + soft-uart; /* We need Soft-UART */
13738 + reg = <2400 200>;
13739 + interrupts = <28>; /* From Table 18-12 */
13740 + interrupt-parent = < &qeic >;
13742 + * For Soft-UART, we need to set TX to 1X, which
13743 + * means specifying separate clock sources.
13745 + rx-clock-name = "brg5";
13746 + tx-clock-name = "brg6";
13747 + pio-handle = < &pio5 >;
13752 #address-cells = <1>;
13754 @@ -283,7 +332,8 @@
13759 + pci0: pci@e0008500 {
13760 + cell-index = <1>;
13761 interrupt-map-mask = <f800 0 0 7>;
13763 /* IDSEL 0x11 AD17 */
13764 --- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
13765 +++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
13767 #address-cells = <1>;
13771 + ethernet0 = &enet0;
13772 + ethernet1 = &enet1;
13773 + serial0 = &serial0;
13774 + serial1 = &serial1;
13779 #address-cells = <1>;
13785 - device_type = "i2c";
13786 + #address-cells = <1>;
13787 + #size-cells = <0>;
13788 + cell-index = <0>;
13789 compatible = "fsl-i2c";
13791 interrupts = <e 8>;
13797 + serial0: serial@4500 {
13798 + cell-index = <0>;
13799 device_type = "serial";
13800 compatible = "ns16550";
13803 interrupt-parent = <&pic>;
13807 + serial1: serial@4600 {
13808 + cell-index = <1>;
13809 device_type = "serial";
13810 compatible = "ns16550";
13812 @@ -187,44 +199,34 @@
13817 + enet0: ucc@3000 {
13818 device_type = "network";
13819 compatible = "ucc_geth";
13821 + cell-index = <2>;
13825 interrupt-parent = <&qeic>;
13827 - * mac-address is deprecated and will be removed
13828 - * in 2.6.25. Only recent versions of
13829 - * U-Boot support local-mac-address, however.
13831 - mac-address = [ 00 00 00 00 00 00 ];
13832 local-mac-address = [ 00 00 00 00 00 00 ];
13835 + rx-clock-name = "clk16";
13836 + tx-clock-name = "clk3";
13837 phy-handle = <&phy00>;
13838 pio-handle = <&ucc2pio>;
13842 + enet1: ucc@2200 {
13843 device_type = "network";
13844 compatible = "ucc_geth";
13846 + cell-index = <3>;
13850 interrupt-parent = <&qeic>;
13852 - * mac-address is deprecated and will be removed
13853 - * in 2.6.25. Only recent versions of
13854 - * U-Boot support local-mac-address, however.
13856 - mac-address = [ 00 00 00 00 00 00 ];
13857 local-mac-address = [ 00 00 00 00 00 00 ];
13860 + rx-clock-name = "clk9";
13861 + tx-clock-name = "clk10";
13862 phy-handle = <&phy04>;
13863 pio-handle = <&ucc3pio>;
13865 @@ -262,7 +264,8 @@
13870 + pci0: pci@e0008500 {
13871 + cell-index = <1>;
13872 interrupt-map-mask = <f800 0 0 7>;
13874 /* IDSEL 0x10 AD16 (USB) */
13875 --- a/arch/powerpc/boot/dts/mpc8349emitx.dts
13876 +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
13878 #address-cells = <1>;
13882 + ethernet0 = &enet0;
13883 + ethernet1 = &enet1;
13884 + serial0 = &serial0;
13885 + serial1 = &serial1;
13891 #address-cells = <1>;
13897 - device_type = "i2c";
13898 + #address-cells = <1>;
13899 + #size-cells = <0>;
13900 + cell-index = <0>;
13901 compatible = "fsl-i2c";
13903 interrupts = <e 8>;
13908 - device_type = "i2c";
13909 + #address-cells = <1>;
13910 + #size-cells = <0>;
13911 + cell-index = <1>;
13912 compatible = "fsl-i2c";
13914 interrupts = <f 8>;
13919 - device_type = "usb";
13920 compatible = "fsl-usb2-mph";
13921 reg = <22000 1000>;
13922 #address-cells = <1>;
13927 - device_type = "usb";
13928 compatible = "fsl-usb2-dr";
13929 reg = <23000 1000>;
13930 #address-cells = <1>;
13931 @@ -102,11 +113,10 @@
13935 - device_type = "mdio";
13936 - compatible = "gianfar";
13937 - reg = <24520 20>;
13938 #address-cells = <1>;
13940 + compatible = "fsl,gianfar-mdio";
13941 + reg = <24520 20>;
13944 phy1c: ethernet-phy@1c {
13945 @@ -115,27 +125,14 @@
13947 device_type = "ethernet-phy";
13950 - /* Vitesse 7385 */
13951 - phy1f: ethernet-phy@1f {
13952 - interrupt-parent = < &ipic >;
13953 - interrupts = <12 8>;
13955 - device_type = "ethernet-phy";
13960 + enet0: ethernet@24000 {
13961 + cell-index = <0>;
13962 device_type = "network";
13964 compatible = "gianfar";
13965 reg = <24000 1000>;
13967 - * address is deprecated and will be removed
13968 - * in 2.6.25. Only recent versions of
13969 - * U-Boot support local-mac-address, however.
13971 - address = [ 00 00 00 00 00 00 ];
13972 local-mac-address = [ 00 00 00 00 00 00 ];
13973 interrupts = <20 8 21 8 22 8>;
13974 interrupt-parent = < &ipic >;
13975 @@ -143,27 +140,22 @@
13976 linux,network-index = <0>;
13980 - #address-cells = <1>;
13981 - #size-cells = <0>;
13982 + enet1: ethernet@25000 {
13983 + cell-index = <1>;
13984 device_type = "network";
13986 compatible = "gianfar";
13987 reg = <25000 1000>;
13989 - * address is deprecated and will be removed
13990 - * in 2.6.25. Only recent versions of
13991 - * U-Boot support local-mac-address, however.
13993 - address = [ 00 00 00 00 00 00 ];
13994 local-mac-address = [ 00 00 00 00 00 00 ];
13995 interrupts = <23 8 24 8 25 8>;
13996 interrupt-parent = < &ipic >;
13997 - phy-handle = < &phy1f >;
13998 + /* Vitesse 7385 isn't on the MDIO bus */
13999 + fixed-link = <1 1 d#1000 0 0>;
14000 linux,network-index = <1>;
14004 + serial0: serial@4500 {
14005 + cell-index = <0>;
14006 device_type = "serial";
14007 compatible = "ns16550";
14009 @@ -172,7 +164,8 @@
14010 interrupt-parent = < &ipic >;
14014 + serial1: serial@4600 {
14015 + cell-index = <1>;
14016 device_type = "serial";
14017 compatible = "ns16550";
14019 @@ -203,7 +196,8 @@
14024 + pci0: pci@e0008500 {
14025 + cell-index = <1>;
14026 interrupt-map-mask = <f800 0 0 7>;
14028 /* IDSEL 0x10 - SATA */
14029 @@ -224,7 +218,8 @@
14030 device_type = "pci";
14034 + pci1: pci@e0008600 {
14035 + cell-index = <2>;
14036 interrupt-map-mask = <f800 0 0 7>;
14038 /* IDSEL 0x0E - MiniPCI Slot */
14039 @@ -249,6 +244,21 @@
14040 device_type = "pci";
14045 + localbus@e0005000 {
14046 + #address-cells = <2>;
14047 + #size-cells = <1>;
14048 + compatible = "fsl,mpc8349e-localbus",
14049 + "fsl,pq2pro-localbus";
14050 + reg = <e0005000 d8>;
14051 + ranges = <3 0 f0000000 210>;
14054 + compatible = "fsl,mpc8349emitx-pata", "ata-generic";
14055 + reg = <3 0 10 3 20c 4>;
14058 + interrupts = <17 8>;
14059 + interrupt-parent = <&ipic>;
14063 --- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts
14064 +++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
14066 #address-cells = <1>;
14070 + ethernet0 = &enet0;
14071 + serial0 = &serial0;
14072 + serial1 = &serial1;
14077 #address-cells = <1>;
14083 - device_type = "i2c";
14084 + #address-cells = <1>;
14085 + #size-cells = <0>;
14086 + cell-index = <0>;
14087 compatible = "fsl-i2c";
14089 interrupts = <e 8>;
14094 - device_type = "i2c";
14095 + #address-cells = <1>;
14096 + #size-cells = <0>;
14097 + cell-index = <1>;
14098 compatible = "fsl-i2c";
14100 interrupts = <f 8>;
14105 - device_type = "usb";
14106 compatible = "fsl-usb2-dr";
14107 reg = <23000 1000>;
14108 #address-cells = <1>;
14109 @@ -90,11 +100,10 @@
14113 - device_type = "mdio";
14114 - compatible = "gianfar";
14115 - reg = <24520 20>;
14116 #address-cells = <1>;
14118 + compatible = "fsl,gianfar-mdio";
14119 + reg = <24520 20>;
14122 phy1c: ethernet-phy@1c {
14123 @@ -105,7 +114,8 @@
14128 + enet0: ethernet@24000 {
14129 + cell-index = <0>;
14130 device_type = "network";
14132 compatible = "gianfar";
14133 @@ -117,7 +127,8 @@
14134 linux,network-index = <0>;
14138 + serial0: serial@4500 {
14139 + cell-index = <0>;
14140 device_type = "serial";
14141 compatible = "ns16550";
14143 @@ -126,7 +137,8 @@
14144 interrupt-parent = < &ipic >;
14148 + serial1: serial@4600 {
14149 + cell-index = <1>;
14150 device_type = "serial";
14151 compatible = "ns16550";
14153 @@ -157,7 +169,8 @@
14158 + pci0: pci@e0008600 {
14159 + cell-index = <2>;
14160 interrupt-map-mask = <f800 0 0 7>;
14162 /* IDSEL 0x0F - PCI Slot */
14163 --- a/arch/powerpc/boot/dts/mpc834x_mds.dts
14164 +++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
14166 #address-cells = <1>;
14170 + ethernet0 = &enet0;
14171 + ethernet1 = &enet1;
14172 + serial0 = &serial0;
14173 + serial1 = &serial1;
14179 #address-cells = <1>;
14183 #address-cells = <1>;
14185 - device_type = "i2c";
14186 + cell-index = <0>;
14187 compatible = "fsl-i2c";
14189 interrupts = <e 8>;
14192 #address-cells = <1>;
14194 - device_type = "i2c";
14195 + cell-index = <1>;
14196 compatible = "fsl-i2c";
14198 interrupts = <f 8>;
14200 /* phy type (ULPI or SERIAL) are only types supportted for MPH */
14201 /* port = 0 or 1 */
14203 - device_type = "usb";
14204 compatible = "fsl-usb2-mph";
14205 reg = <22000 1000>;
14206 #address-cells = <1>;
14207 @@ -107,7 +115,6 @@
14209 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
14211 - device_type = "usb";
14212 compatible = "fsl-usb2-dr";
14213 reg = <23000 1000>;
14214 #address-cells = <1>;
14215 @@ -119,11 +126,11 @@
14219 - device_type = "mdio";
14220 - compatible = "gianfar";
14221 - reg = <24520 20>;
14222 #address-cells = <1>;
14224 + compatible = "fsl,gianfar-mdio";
14225 + reg = <24520 20>;
14227 phy0: ethernet-phy@0 {
14228 interrupt-parent = < &ipic >;
14229 interrupts = <11 8>;
14230 @@ -138,17 +145,12 @@
14235 + enet0: ethernet@24000 {
14236 + cell-index = <0>;
14237 device_type = "network";
14239 compatible = "gianfar";
14240 reg = <24000 1000>;
14242 - * address is deprecated and will be removed
14243 - * in 2.6.25. Only recent versions of
14244 - * U-Boot support local-mac-address, however.
14246 - address = [ 00 00 00 00 00 00 ];
14247 local-mac-address = [ 00 00 00 00 00 00 ];
14248 interrupts = <20 8 21 8 22 8>;
14249 interrupt-parent = < &ipic >;
14250 @@ -156,19 +158,12 @@
14251 linux,network-index = <0>;
14255 - #address-cells = <1>;
14256 - #size-cells = <0>;
14257 + enet1: ethernet@25000 {
14258 + cell-index = <1>;
14259 device_type = "network";
14261 compatible = "gianfar";
14262 reg = <25000 1000>;
14264 - * address is deprecated and will be removed
14265 - * in 2.6.25. Only recent versions of
14266 - * U-Boot support local-mac-address, however.
14268 - address = [ 00 00 00 00 00 00 ];
14269 local-mac-address = [ 00 00 00 00 00 00 ];
14270 interrupts = <23 8 24 8 25 8>;
14271 interrupt-parent = < &ipic >;
14272 @@ -176,7 +171,8 @@
14273 linux,network-index = <1>;
14277 + serial0: serial@4500 {
14278 + cell-index = <0>;
14279 device_type = "serial";
14280 compatible = "ns16550";
14282 @@ -185,7 +181,8 @@
14283 interrupt-parent = < &ipic >;
14287 + serial1: serial@4600 {
14288 + cell-index = <1>;
14289 device_type = "serial";
14290 compatible = "ns16550";
14292 @@ -225,7 +222,8 @@
14297 + pci0: pci@e0008500 {
14298 + cell-index = <1>;
14299 interrupt-map-mask = <f800 0 0 7>;
14302 @@ -285,7 +283,8 @@
14303 device_type = "pci";
14307 + pci1: pci@e0008600 {
14308 + cell-index = <2>;
14309 interrupt-map-mask = <f800 0 0 7>;
14312 --- a/arch/powerpc/boot/dts/mpc836x_mds.dts
14313 +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
14315 #address-cells = <1>;
14319 + ethernet0 = &enet0;
14320 + ethernet1 = &enet1;
14321 + serial0 = &serial0;
14322 + serial1 = &serial1;
14327 #address-cells = <1>;
14331 #address-cells = <1>;
14333 - device_type = "i2c";
14334 + cell-index = <0>;
14335 compatible = "fsl-i2c";
14337 interrupts = <e 8>;
14340 #address-cells = <1>;
14342 - device_type = "i2c";
14343 + cell-index = <1>;
14344 compatible = "fsl-i2c";
14346 interrupts = <f 8>;
14352 + serial0: serial@4500 {
14353 + cell-index = <0>;
14354 device_type = "serial";
14355 compatible = "ns16550";
14358 interrupt-parent = < &ipic >;
14362 + serial1: serial@4600 {
14363 + cell-index = <1>;
14364 device_type = "serial";
14365 compatible = "ns16550";
14367 @@ -231,7 +241,6 @@
14371 - device_type = "usb";
14372 compatible = "qe_udc";
14373 reg = <6c0 40 8B00 100>;
14375 @@ -239,45 +248,35 @@
14380 + enet0: ucc@2000 {
14381 device_type = "network";
14382 compatible = "ucc_geth";
14384 + cell-index = <1>;
14388 interrupt-parent = < &qeic >;
14390 - * mac-address is deprecated and will be removed
14391 - * in 2.6.25. Only recent versions of
14392 - * U-Boot support local-mac-address, however.
14394 - mac-address = [ 00 00 00 00 00 00 ];
14395 local-mac-address = [ 00 00 00 00 00 00 ];
14398 + rx-clock-name = "none";
14399 + tx-clock-name = "clk9";
14400 phy-handle = < &phy0 >;
14401 phy-connection-type = "rgmii-id";
14402 pio-handle = < &pio1 >;
14406 + enet1: ucc@3000 {
14407 device_type = "network";
14408 compatible = "ucc_geth";
14410 + cell-index = <2>;
14414 interrupt-parent = < &qeic >;
14416 - * mac-address is deprecated and will be removed
14417 - * in 2.6.25. Only recent versions of
14418 - * U-Boot support local-mac-address, however.
14420 - mac-address = [ 00 00 00 00 00 00 ];
14421 local-mac-address = [ 00 00 00 00 00 00 ];
14424 + rx-clock-name = "none";
14425 + tx-clock-name = "clk4";
14426 phy-handle = < &phy1 >;
14427 phy-connection-type = "rgmii-id";
14428 pio-handle = < &pio2 >;
14429 @@ -316,7 +315,8 @@
14434 + pci0: pci@e0008500 {
14435 + cell-index = <1>;
14436 interrupt-map-mask = <f800 0 0 7>;
14440 +++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
14443 + * MPC8377E MDS Device Tree Source
14445 + * Copyright 2007 Freescale Semiconductor Inc.
14447 + * This program is free software; you can redistribute it and/or modify it
14448 + * under the terms of the GNU General Public License as published by the
14449 + * Free Software Foundation; either version 2 of the License, or (at your
14450 + * option) any later version.
14456 + model = "fsl,mpc8377emds";
14457 + compatible = "fsl,mpc8377emds","fsl,mpc837xmds";
14458 + #address-cells = <1>;
14459 + #size-cells = <1>;
14462 + ethernet0 = &enet0;
14463 + ethernet1 = &enet1;
14464 + serial0 = &serial0;
14465 + serial1 = &serial1;
14470 + #address-cells = <1>;
14471 + #size-cells = <0>;
14474 + device_type = "cpu";
14476 + d-cache-line-size = <0x20>;
14477 + i-cache-line-size = <0x20>;
14478 + d-cache-size = <0x8000>; // L1, 32K
14479 + i-cache-size = <0x8000>; // L1, 32K
14480 + timebase-frequency = <0>;
14481 + bus-frequency = <0>;
14482 + clock-frequency = <0>;
14487 + device_type = "memory";
14488 + reg = <0x00000000 0x20000000>; // 512MB at 0
14492 + #address-cells = <1>;
14493 + #size-cells = <1>;
14494 + device_type = "soc";
14495 + ranges = <0x0 0xe0000000 0x00100000>;
14496 + reg = <0xe0000000 0x00000200>;
14497 + bus-frequency = <0>;
14500 + compatible = "mpc83xx_wdt";
14501 + reg = <0x200 0x100>;
14505 + #address-cells = <1>;
14506 + #size-cells = <0>;
14507 + cell-index = <0>;
14508 + compatible = "fsl-i2c";
14509 + reg = <0x3000 0x100>;
14510 + interrupts = <0xe 0x8>;
14511 + interrupt-parent = < &ipic >;
14516 + #address-cells = <1>;
14517 + #size-cells = <0>;
14518 + cell-index = <1>;
14519 + compatible = "fsl-i2c";
14520 + reg = <0x3100 0x100>;
14521 + interrupts = <0xf 0x8>;
14522 + interrupt-parent = < &ipic >;
14527 + compatible = "fsl_spi";
14528 + reg = <0x7000 0x1000>;
14529 + interrupts = <0x10 0x8>;
14530 + interrupt-parent = < &ipic >;
14534 + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
14536 + compatible = "fsl-usb2-dr";
14537 + reg = <0x23000 0x1000>;
14538 + #address-cells = <1>;
14539 + #size-cells = <0>;
14540 + interrupt-parent = < &ipic >;
14541 + interrupts = <0x26 0x8>;
14542 + phy_type = "utmi_wide";
14546 + #address-cells = <1>;
14547 + #size-cells = <0>;
14548 + compatible = "fsl,gianfar-mdio";
14549 + reg = <0x24520 0x20>;
14550 + phy2: ethernet-phy@2 {
14551 + interrupt-parent = < &ipic >;
14552 + interrupts = <0x11 0x8>;
14554 + device_type = "ethernet-phy";
14556 + phy3: ethernet-phy@3 {
14557 + interrupt-parent = < &ipic >;
14558 + interrupts = <0x12 0x8>;
14560 + device_type = "ethernet-phy";
14564 + enet0: ethernet@24000 {
14565 + cell-index = <0>;
14566 + device_type = "network";
14568 + compatible = "gianfar";
14569 + reg = <0x24000 0x1000>;
14570 + local-mac-address = [ 00 00 00 00 00 00 ];
14571 + interrupts = <0x20 0x8 0x21 0x8 0x22 0x8>;
14572 + phy-connection-type = "mii";
14573 + interrupt-parent = < &ipic >;
14574 + phy-handle = < &phy2 >;
14577 + enet1: ethernet@25000 {
14578 + cell-index = <1>;
14579 + device_type = "network";
14581 + compatible = "gianfar";
14582 + reg = <0x25000 0x1000>;
14583 + local-mac-address = [ 00 00 00 00 00 00 ];
14584 + interrupts = <0x23 0x8 0x24 0x8 0x25 0x8>;
14585 + phy-connection-type = "mii";
14586 + interrupt-parent = < &ipic >;
14587 + phy-handle = < &phy3 >;
14590 + serial0: serial@4500 {
14591 + cell-index = <0>;
14592 + device_type = "serial";
14593 + compatible = "ns16550";
14594 + reg = <0x4500 0x100>;
14595 + clock-frequency = <0>;
14596 + interrupts = <0x9 0x8>;
14597 + interrupt-parent = < &ipic >;
14600 + serial1: serial@4600 {
14601 + cell-index = <1>;
14602 + device_type = "serial";
14603 + compatible = "ns16550";
14604 + reg = <0x4600 0x100>;
14605 + clock-frequency = <0>;
14606 + interrupts = <0xa 0x8>;
14607 + interrupt-parent = < &ipic >;
14612 + compatible = "talitos";
14613 + reg = <0x30000 0x10000>;
14614 + interrupts = <0xb 0x8>;
14615 + interrupt-parent = < &ipic >;
14616 + /* Rev. 3.0 geometry */
14617 + num-channels = <4>;
14618 + channel-fifo-len = <0x18>;
14619 + exec-units-mask = <0x000001fe>;
14620 + descriptor-types-mask = <0x03ab0ebf>;
14625 + compatible = "fsl,esdhc";
14626 + reg = <0x2e000 0x1000>;
14627 + interrupts = <0x2a 0x8>;
14628 + interrupt-parent = < &ipic >;
14632 + compatible = "fsl,mpc8379-sata";
14633 + reg = <0x18000 0x1000>;
14634 + interrupts = <0x2c 0x8>;
14635 + interrupt-parent = < &ipic >;
14639 + compatible = "fsl,mpc8379-sata";
14640 + reg = <0x19000 0x1000>;
14641 + interrupts = <0x2d 0x8>;
14642 + interrupt-parent = < &ipic >;
14646 + * interrupts cell = <intr #, sense>
14647 + * sense values match linux IORESOURCE_IRQ_* defines:
14648 + * sense == 8: Level, low assertion
14649 + * sense == 2: Edge, high-to-low change
14652 + compatible = "fsl,ipic";
14653 + interrupt-controller;
14654 + #address-cells = <0>;
14655 + #interrupt-cells = <2>;
14656 + reg = <0x700 0x100>;
14660 + pci0: pci@e0008500 {
14661 + cell-index = <0>;
14662 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
14663 + interrupt-map = <
14666 + 0x8800 0x0 0x0 0x1 &ipic 0x14 0x8
14667 + 0x8800 0x0 0x0 0x2 &ipic 0x15 0x8
14668 + 0x8800 0x0 0x0 0x3 &ipic 0x16 0x8
14669 + 0x8800 0x0 0x0 0x4 &ipic 0x17 0x8
14672 + 0x9000 0x0 0x0 0x1 &ipic 0x16 0x8
14673 + 0x9000 0x0 0x0 0x2 &ipic 0x17 0x8
14674 + 0x9000 0x0 0x0 0x3 &ipic 0x14 0x8
14675 + 0x9000 0x0 0x0 0x4 &ipic 0x15 0x8
14678 + 0x9800 0x0 0x0 0x1 &ipic 0x17 0x8
14679 + 0x9800 0x0 0x0 0x2 &ipic 0x14 0x8
14680 + 0x9800 0x0 0x0 0x3 &ipic 0x15 0x8
14681 + 0x9800 0x0 0x0 0x4 &ipic 0x16 0x8
14684 + 0xa800 0x0 0x0 0x1 &ipic 0x14 0x8
14685 + 0xa800 0x0 0x0 0x2 &ipic 0x15 0x8
14686 + 0xa800 0x0 0x0 0x3 &ipic 0x16 0x8
14687 + 0xa800 0x0 0x0 0x4 &ipic 0x17 0x8
14690 + 0xb000 0x0 0x0 0x1 &ipic 0x17 0x8
14691 + 0xb000 0x0 0x0 0x2 &ipic 0x14 0x8
14692 + 0xb000 0x0 0x0 0x3 &ipic 0x15 0x8
14693 + 0xb000 0x0 0x0 0x4 &ipic 0x16 0x8
14696 + 0xb800 0x0 0x0 0x1 &ipic 0x16 0x8
14697 + 0xb800 0x0 0x0 0x2 &ipic 0x17 0x8
14698 + 0xb800 0x0 0x0 0x3 &ipic 0x14 0x8
14699 + 0xb800 0x0 0x0 0x4 &ipic 0x15 0x8
14702 + 0xc000 0x0 0x0 0x1 &ipic 0x15 0x8
14703 + 0xc000 0x0 0x0 0x2 &ipic 0x16 0x8
14704 + 0xc000 0x0 0x0 0x3 &ipic 0x17 0x8
14705 + 0xc000 0x0 0x0 0x4 &ipic 0x14 0x8>;
14706 + interrupt-parent = < &ipic >;
14707 + interrupts = <0x42 0x8>;
14708 + bus-range = <0 0>;
14709 + ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
14710 + 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
14711 + 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
14712 + clock-frequency = <0>;
14713 + #interrupt-cells = <1>;
14714 + #size-cells = <2>;
14715 + #address-cells = <3>;
14716 + reg = <0xe0008500 0x100>;
14717 + compatible = "fsl,mpc8349-pci";
14718 + device_type = "pci";
14722 +++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
14725 + * MPC8378E MDS Device Tree Source
14727 + * Copyright 2007 Freescale Semiconductor Inc.
14729 + * This program is free software; you can redistribute it and/or modify it
14730 + * under the terms of the GNU General Public License as published by the
14731 + * Free Software Foundation; either version 2 of the License, or (at your
14732 + * option) any later version.
14738 + model = "fsl,mpc8378emds";
14739 + compatible = "fsl,mpc8378emds","fsl,mpc837xmds";
14740 + #address-cells = <1>;
14741 + #size-cells = <1>;
14744 + ethernet0 = &enet0;
14745 + ethernet1 = &enet1;
14746 + serial0 = &serial0;
14747 + serial1 = &serial1;
14752 + #address-cells = <1>;
14753 + #size-cells = <0>;
14756 + device_type = "cpu";
14758 + d-cache-line-size = <0x20>;
14759 + i-cache-line-size = <0x20>;
14760 + d-cache-size = <0x8000>; // L1, 32K
14761 + i-cache-size = <0x8000>; // L1, 32K
14762 + timebase-frequency = <0>;
14763 + bus-frequency = <0>;
14764 + clock-frequency = <0>;
14769 + device_type = "memory";
14770 + reg = <0x00000000 0x20000000>; // 512MB at 0
14774 + #address-cells = <1>;
14775 + #size-cells = <1>;
14776 + device_type = "soc";
14777 + ranges = <0x0 0xe0000000 0x00100000>;
14778 + reg = <0xe0000000 0x00000200>;
14779 + bus-frequency = <0>;
14782 + compatible = "mpc83xx_wdt";
14783 + reg = <0x200 0x100>;
14787 + #address-cells = <1>;
14788 + #size-cells = <0>;
14789 + cell-index = <0>;
14790 + compatible = "fsl-i2c";
14791 + reg = <0x3000 0x100>;
14792 + interrupts = <0xe 0x8>;
14793 + interrupt-parent = < &ipic >;
14798 + #address-cells = <1>;
14799 + #size-cells = <0>;
14800 + cell-index = <1>;
14801 + compatible = "fsl-i2c";
14802 + reg = <0x3100 0x100>;
14803 + interrupts = <0xf 0x8>;
14804 + interrupt-parent = < &ipic >;
14809 + compatible = "fsl_spi";
14810 + reg = <0x7000 0x1000>;
14811 + interrupts = <0x10 0x8>;
14812 + interrupt-parent = < &ipic >;
14816 + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
14818 + compatible = "fsl-usb2-dr";
14819 + reg = <0x23000 0x1000>;
14820 + #address-cells = <1>;
14821 + #size-cells = <0>;
14822 + interrupt-parent = < &ipic >;
14823 + interrupts = <0x26 0x8>;
14824 + phy_type = "utmi_wide";
14828 + #address-cells = <1>;
14829 + #size-cells = <0>;
14830 + compatible = "fsl,gianfar-mdio";
14831 + reg = <0x24520 0x20>;
14832 + phy2: ethernet-phy@2 {
14833 + interrupt-parent = < &ipic >;
14834 + interrupts = <0x11 0x8>;
14836 + device_type = "ethernet-phy";
14838 + phy3: ethernet-phy@3 {
14839 + interrupt-parent = < &ipic >;
14840 + interrupts = <0x12 0x8>;
14842 + device_type = "ethernet-phy";
14846 + enet0: ethernet@24000 {
14847 + cell-index = <0>;
14848 + device_type = "network";
14850 + compatible = "gianfar";
14851 + reg = <0x24000 0x1000>;
14852 + local-mac-address = [ 00 00 00 00 00 00 ];
14853 + interrupts = <0x20 0x8 0x21 0x8 0x22 0x8>;
14854 + phy-connection-type = "mii";
14855 + interrupt-parent = < &ipic >;
14856 + phy-handle = < &phy2 >;
14859 + enet1: ethernet@25000 {
14860 + cell-index = <1>;
14861 + device_type = "network";
14863 + compatible = "gianfar";
14864 + reg = <0x25000 0x1000>;
14865 + local-mac-address = [ 00 00 00 00 00 00 ];
14866 + interrupts = <0x23 0x8 0x24 0x8 0x25 0x8>;
14867 + phy-connection-type = "mii";
14868 + interrupt-parent = < &ipic >;
14869 + phy-handle = < &phy3 >;
14872 + serial0: serial@4500 {
14873 + cell-index = <0>;
14874 + device_type = "serial";
14875 + compatible = "ns16550";
14876 + reg = <0x4500 0x100>;
14877 + clock-frequency = <0>;
14878 + interrupts = <0x9 0x8>;
14879 + interrupt-parent = < &ipic >;
14882 + serial1: serial@4600 {
14883 + cell-index = <1>;
14884 + device_type = "serial";
14885 + compatible = "ns16550";
14886 + reg = <0x4600 0x100>;
14887 + clock-frequency = <0>;
14888 + interrupts = <0xa 0x8>;
14889 + interrupt-parent = < &ipic >;
14894 + compatible = "talitos";
14895 + reg = <0x30000 0x10000>;
14896 + interrupts = <0xb 0x8>;
14897 + interrupt-parent = < &ipic >;
14898 + /* Rev. 3.0 geometry */
14899 + num-channels = <4>;
14900 + channel-fifo-len = <0x18>;
14901 + exec-units-mask = <0x000001fe>;
14902 + descriptor-types-mask = <0x03ab0ebf>;
14907 + compatible = "fsl,esdhc";
14908 + reg = <0x2e000 0x1000>;
14909 + interrupts = <0x2a 0x8>;
14910 + interrupt-parent = < &ipic >;
14914 + * interrupts cell = <intr #, sense>
14915 + * sense values match linux IORESOURCE_IRQ_* defines:
14916 + * sense == 8: Level, low assertion
14917 + * sense == 2: Edge, high-to-low change
14920 + compatible = "fsl,ipic";
14921 + interrupt-controller;
14922 + #address-cells = <0>;
14923 + #interrupt-cells = <2>;
14924 + reg = <0x700 0x100>;
14928 + pci0: pci@e0008500 {
14929 + cell-index = <0>;
14930 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
14931 + interrupt-map = <
14934 + 0x8800 0x0 0x0 0x1 &ipic 0x14 0x8
14935 + 0x8800 0x0 0x0 0x2 &ipic 0x15 0x8
14936 + 0x8800 0x0 0x0 0x3 &ipic 0x16 0x8
14937 + 0x8800 0x0 0x0 0x4 &ipic 0x17 0x8
14940 + 0x9000 0x0 0x0 0x1 &ipic 0x16 0x8
14941 + 0x9000 0x0 0x0 0x2 &ipic 0x17 0x8
14942 + 0x9000 0x0 0x0 0x3 &ipic 0x14 0x8
14943 + 0x9000 0x0 0x0 0x4 &ipic 0x15 0x8
14946 + 0x9800 0x0 0x0 0x1 &ipic 0x17 0x8
14947 + 0x9800 0x0 0x0 0x2 &ipic 0x14 0x8
14948 + 0x9800 0x0 0x0 0x3 &ipic 0x15 0x8
14949 + 0x9800 0x0 0x0 0x4 &ipic 0x16 0x8
14952 + 0xa800 0x0 0x0 0x1 &ipic 0x14 0x8
14953 + 0xa800 0x0 0x0 0x2 &ipic 0x15 0x8
14954 + 0xa800 0x0 0x0 0x3 &ipic 0x16 0x8
14955 + 0xa800 0x0 0x0 0x4 &ipic 0x17 0x8
14958 + 0xb000 0x0 0x0 0x1 &ipic 0x17 0x8
14959 + 0xb000 0x0 0x0 0x2 &ipic 0x14 0x8
14960 + 0xb000 0x0 0x0 0x3 &ipic 0x15 0x8
14961 + 0xb000 0x0 0x0 0x4 &ipic 0x16 0x8
14964 + 0xb800 0x0 0x0 0x1 &ipic 0x16 0x8
14965 + 0xb800 0x0 0x0 0x2 &ipic 0x17 0x8
14966 + 0xb800 0x0 0x0 0x3 &ipic 0x14 0x8
14967 + 0xb800 0x0 0x0 0x4 &ipic 0x15 0x8
14970 + 0xc000 0x0 0x0 0x1 &ipic 0x15 0x8
14971 + 0xc000 0x0 0x0 0x2 &ipic 0x16 0x8
14972 + 0xc000 0x0 0x0 0x3 &ipic 0x17 0x8
14973 + 0xc000 0x0 0x0 0x4 &ipic 0x14 0x8>;
14974 + interrupt-parent = < &ipic >;
14975 + interrupts = <0x42 0x8>;
14976 + bus-range = <0 0>;
14977 + ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
14978 + 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
14979 + 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
14980 + clock-frequency = <0>;
14981 + #interrupt-cells = <1>;
14982 + #size-cells = <2>;
14983 + #address-cells = <3>;
14984 + reg = <0xe0008500 0x100>;
14985 + compatible = "fsl,mpc8349-pci";
14986 + device_type = "pci";
14990 +++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
14993 + * MPC8379E MDS Device Tree Source
14995 + * Copyright 2007 Freescale Semiconductor Inc.
14997 + * This program is free software; you can redistribute it and/or modify it
14998 + * under the terms of the GNU General Public License as published by the
14999 + * Free Software Foundation; either version 2 of the License, or (at your
15000 + * option) any later version.
15006 + model = "fsl,mpc8379emds";
15007 + compatible = "fsl,mpc8379emds","fsl,mpc837xmds";
15008 + #address-cells = <1>;
15009 + #size-cells = <1>;
15012 + ethernet0 = &enet0;
15013 + ethernet1 = &enet1;
15014 + serial0 = &serial0;
15015 + serial1 = &serial1;
15020 + #address-cells = <1>;
15021 + #size-cells = <0>;
15024 + device_type = "cpu";
15026 + d-cache-line-size = <0x20>;
15027 + i-cache-line-size = <0x20>;
15028 + d-cache-size = <0x8000>; // L1, 32K
15029 + i-cache-size = <0x8000>; // L1, 32K
15030 + timebase-frequency = <0>;
15031 + bus-frequency = <0>;
15032 + clock-frequency = <0>;
15037 + device_type = "memory";
15038 + reg = <0x00000000 0x20000000>; // 512MB at 0
15042 + #address-cells = <1>;
15043 + #size-cells = <1>;
15044 + device_type = "soc";
15045 + ranges = <0x0 0xe0000000 0x00100000>;
15046 + reg = <0xe0000000 0x00000200>;
15047 + bus-frequency = <0>;
15050 + compatible = "mpc83xx_wdt";
15051 + reg = <0x200 0x100>;
15055 + #address-cells = <1>;
15056 + #size-cells = <0>;
15057 + cell-index = <0>;
15058 + compatible = "fsl-i2c";
15059 + reg = <0x3000 0x100>;
15060 + interrupts = <0xe 0x8>;
15061 + interrupt-parent = < &ipic >;
15066 + #address-cells = <1>;
15067 + #size-cells = <0>;
15068 + cell-index = <1>;
15069 + compatible = "fsl-i2c";
15070 + reg = <0x3100 0x100>;
15071 + interrupts = <0xf 0x8>;
15072 + interrupt-parent = < &ipic >;
15077 + compatible = "fsl_spi";
15078 + reg = <0x7000 0x1000>;
15079 + interrupts = <0x10 0x8>;
15080 + interrupt-parent = < &ipic >;
15084 + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
15086 + compatible = "fsl-usb2-dr";
15087 + reg = <0x23000 0x1000>;
15088 + #address-cells = <1>;
15089 + #size-cells = <0>;
15090 + interrupt-parent = < &ipic >;
15091 + interrupts = <0x26 0x8>;
15092 + phy_type = "utmi_wide";
15096 + #address-cells = <1>;
15097 + #size-cells = <0>;
15098 + compatible = "fsl,gianfar-mdio";
15099 + reg = <0x24520 0x20>;
15100 + phy2: ethernet-phy@2 {
15101 + interrupt-parent = < &ipic >;
15102 + interrupts = <0x11 0x8>;
15104 + device_type = "ethernet-phy";
15106 + phy3: ethernet-phy@3 {
15107 + interrupt-parent = < &ipic >;
15108 + interrupts = <0x12 0x8>;
15110 + device_type = "ethernet-phy";
15114 + enet0: ethernet@24000 {
15115 + cell-index = <0>;
15116 + device_type = "network";
15118 + compatible = "gianfar";
15119 + reg = <0x24000 0x1000>;
15120 + local-mac-address = [ 00 00 00 00 00 00 ];
15121 + interrupts = <0x20 0x8 0x21 0x8 0x22 0x8>;
15122 + phy-connection-type = "mii";
15123 + interrupt-parent = < &ipic >;
15124 + phy-handle = < &phy2 >;
15127 + enet1: ethernet@25000 {
15128 + cell-index = <1>;
15129 + device_type = "network";
15131 + compatible = "gianfar";
15132 + reg = <0x25000 0x1000>;
15133 + local-mac-address = [ 00 00 00 00 00 00 ];
15134 + interrupts = <0x23 0x8 0x24 0x8 0x25 0x8>;
15135 + phy-connection-type = "mii";
15136 + interrupt-parent = < &ipic >;
15137 + phy-handle = < &phy3 >;
15140 + serial0: serial@4500 {
15141 + cell-index = <0>;
15142 + device_type = "serial";
15143 + compatible = "ns16550";
15144 + reg = <0x4500 0x100>;
15145 + clock-frequency = <0>;
15146 + interrupts = <0x9 0x8>;
15147 + interrupt-parent = < &ipic >;
15150 + serial1: serial@4600 {
15151 + cell-index = <1>;
15152 + device_type = "serial";
15153 + compatible = "ns16550";
15154 + reg = <0x4600 0x100>;
15155 + clock-frequency = <0>;
15156 + interrupts = <0xa 0x8>;
15157 + interrupt-parent = < &ipic >;
15162 + compatible = "talitos";
15163 + reg = <0x30000 0x10000>;
15164 + interrupts = <0xb 0x8>;
15165 + interrupt-parent = < &ipic >;
15166 + /* Rev. 3.0 geometry */
15167 + num-channels = <4>;
15168 + channel-fifo-len = <0x18>;
15169 + exec-units-mask = <0x000001fe>;
15170 + descriptor-types-mask = <0x03ab0ebf>;
15175 + compatible = "fsl,esdhc";
15176 + reg = <0x2e000 0x1000>;
15177 + interrupts = <0x2a 0x8>;
15178 + interrupt-parent = < &ipic >;
15182 + compatible = "fsl,mpc8379-sata";
15183 + reg = <0x18000 0x1000>;
15184 + interrupts = <0x2c 0x8>;
15185 + interrupt-parent = < &ipic >;
15189 + compatible = "fsl,mpc8379-sata";
15190 + reg = <0x19000 0x1000>;
15191 + interrupts = <0x2d 0x8>;
15192 + interrupt-parent = < &ipic >;
15196 + compatible = "fsl,mpc8379-sata";
15197 + reg = <0x1a000 0x1000>;
15198 + interrupts = <0x2e 0x8>;
15199 + interrupt-parent = < &ipic >;
15203 + compatible = "fsl,mpc8379-sata";
15204 + reg = <0x1b000 0x1000>;
15205 + interrupts = <0x2f 0x8>;
15206 + interrupt-parent = < &ipic >;
15210 + * interrupts cell = <intr #, sense>
15211 + * sense values match linux IORESOURCE_IRQ_* defines:
15212 + * sense == 8: Level, low assertion
15213 + * sense == 2: Edge, high-to-low change
15216 + compatible = "fsl,ipic";
15217 + interrupt-controller;
15218 + #address-cells = <0>;
15219 + #interrupt-cells = <2>;
15220 + reg = <0x700 0x100>;
15224 + pci0: pci@e0008500 {
15225 + cell-index = <0>;
15226 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
15227 + interrupt-map = <
15230 + 0x8800 0x0 0x0 0x1 &ipic 0x14 0x8
15231 + 0x8800 0x0 0x0 0x2 &ipic 0x15 0x8
15232 + 0x8800 0x0 0x0 0x3 &ipic 0x16 0x8
15233 + 0x8800 0x0 0x0 0x4 &ipic 0x17 0x8
15236 + 0x9000 0x0 0x0 0x1 &ipic 0x16 0x8
15237 + 0x9000 0x0 0x0 0x2 &ipic 0x17 0x8
15238 + 0x9000 0x0 0x0 0x3 &ipic 0x14 0x8
15239 + 0x9000 0x0 0x0 0x4 &ipic 0x15 0x8
15242 + 0x9800 0x0 0x0 0x1 &ipic 0x17 0x8
15243 + 0x9800 0x0 0x0 0x2 &ipic 0x14 0x8
15244 + 0x9800 0x0 0x0 0x3 &ipic 0x15 0x8
15245 + 0x9800 0x0 0x0 0x4 &ipic 0x16 0x8
15248 + 0xa800 0x0 0x0 0x1 &ipic 0x14 0x8
15249 + 0xa800 0x0 0x0 0x2 &ipic 0x15 0x8
15250 + 0xa800 0x0 0x0 0x3 &ipic 0x16 0x8
15251 + 0xa800 0x0 0x0 0x4 &ipic 0x17 0x8
15254 + 0xb000 0x0 0x0 0x1 &ipic 0x17 0x8
15255 + 0xb000 0x0 0x0 0x2 &ipic 0x14 0x8
15256 + 0xb000 0x0 0x0 0x3 &ipic 0x15 0x8
15257 + 0xb000 0x0 0x0 0x4 &ipic 0x16 0x8
15260 + 0xb800 0x0 0x0 0x1 &ipic 0x16 0x8
15261 + 0xb800 0x0 0x0 0x2 &ipic 0x17 0x8
15262 + 0xb800 0x0 0x0 0x3 &ipic 0x14 0x8
15263 + 0xb800 0x0 0x0 0x4 &ipic 0x15 0x8
15266 + 0xc000 0x0 0x0 0x1 &ipic 0x15 0x8
15267 + 0xc000 0x0 0x0 0x2 &ipic 0x16 0x8
15268 + 0xc000 0x0 0x0 0x3 &ipic 0x17 0x8
15269 + 0xc000 0x0 0x0 0x4 &ipic 0x14 0x8>;
15270 + interrupt-parent = < &ipic >;
15271 + interrupts = <0x42 0x8>;
15272 + bus-range = <0 0>;
15273 + ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
15274 + 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
15275 + 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
15276 + clock-frequency = <0>;
15277 + #interrupt-cells = <1>;
15278 + #size-cells = <2>;
15279 + #address-cells = <3>;
15280 + reg = <0xe0008500 0x100>;
15281 + compatible = "fsl,mpc8349-pci";
15282 + device_type = "pci";
15285 --- a/arch/powerpc/boot/dts/mpc8540ads.dts
15286 +++ b/arch/powerpc/boot/dts/mpc8540ads.dts
15288 #address-cells = <1>;
15292 + ethernet0 = &enet0;
15293 + ethernet1 = &enet1;
15294 + ethernet2 = &enet2;
15295 + serial0 = &serial0;
15296 + serial1 = &serial1;
15301 #address-cells = <1>;
15307 - device_type = "i2c";
15308 + #address-cells = <1>;
15309 + #size-cells = <0>;
15310 + cell-index = <0>;
15311 compatible = "fsl-i2c";
15313 interrupts = <2b 2>;
15316 #address-cells = <1>;
15318 - device_type = "mdio";
15319 - compatible = "gianfar";
15320 + compatible = "fsl,gianfar-mdio";
15323 phy0: ethernet-phy@0 {
15324 interrupt-parent = <&mpic>;
15325 interrupts = <5 1>;
15326 @@ -97,64 +108,44 @@
15331 - #address-cells = <1>;
15332 - #size-cells = <0>;
15333 + enet0: ethernet@24000 {
15334 + cell-index = <0>;
15335 device_type = "network";
15337 compatible = "gianfar";
15338 reg = <24000 1000>;
15340 - * address is deprecated and will be removed
15341 - * in 2.6.25. Only recent versions of
15342 - * U-Boot support local-mac-address, however.
15344 - address = [ 00 00 00 00 00 00 ];
15345 local-mac-address = [ 00 00 00 00 00 00 ];
15346 interrupts = <1d 2 1e 2 22 2>;
15347 interrupt-parent = <&mpic>;
15348 phy-handle = <&phy0>;
15352 - #address-cells = <1>;
15353 - #size-cells = <0>;
15354 + enet1: ethernet@25000 {
15355 + cell-index = <1>;
15356 device_type = "network";
15358 compatible = "gianfar";
15359 reg = <25000 1000>;
15361 - * address is deprecated and will be removed
15362 - * in 2.6.25. Only recent versions of
15363 - * U-Boot support local-mac-address, however.
15365 - address = [ 00 00 00 00 00 00 ];
15366 local-mac-address = [ 00 00 00 00 00 00 ];
15367 interrupts = <23 2 24 2 28 2>;
15368 interrupt-parent = <&mpic>;
15369 phy-handle = <&phy1>;
15373 - #address-cells = <1>;
15374 - #size-cells = <0>;
15375 + enet2: ethernet@26000 {
15376 + cell-index = <2>;
15377 device_type = "network";
15379 compatible = "gianfar";
15380 reg = <26000 1000>;
15382 - * address is deprecated and will be removed
15383 - * in 2.6.25. Only recent versions of
15384 - * U-Boot support local-mac-address, however.
15386 - address = [ 00 00 00 00 00 00 ];
15387 local-mac-address = [ 00 00 00 00 00 00 ];
15388 interrupts = <29 2>;
15389 interrupt-parent = <&mpic>;
15390 phy-handle = <&phy3>;
15394 + serial0: serial@4500 {
15395 + cell-index = <0>;
15396 device_type = "serial";
15397 compatible = "ns16550";
15398 reg = <4500 100>; // reg base, size
15399 @@ -163,7 +154,8 @@
15400 interrupt-parent = <&mpic>;
15404 + serial1: serial@4600 {
15405 + cell-index = <1>;
15406 device_type = "serial";
15407 compatible = "ns16550";
15408 reg = <4600 100>; // reg base, size
15409 @@ -183,7 +175,8 @@
15414 + pci0: pci@e0008000 {
15415 + cell-index = <0>;
15416 interrupt-map-mask = <f800 0 0 7>;
15419 --- a/arch/powerpc/boot/dts/mpc8541cds.dts
15420 +++ b/arch/powerpc/boot/dts/mpc8541cds.dts
15422 #address-cells = <1>;
15426 + ethernet0 = &enet0;
15427 + ethernet1 = &enet1;
15428 + serial0 = &serial0;
15429 + serial1 = &serial1;
15435 #address-cells = <1>;
15441 - device_type = "i2c";
15442 + #address-cells = <1>;
15443 + #size-cells = <0>;
15444 + cell-index = <0>;
15445 compatible = "fsl-i2c";
15447 interrupts = <2b 2>;
15450 #address-cells = <1>;
15452 - device_type = "mdio";
15453 - compatible = "gianfar";
15454 + compatible = "fsl,gianfar-mdio";
15457 phy0: ethernet-phy@0 {
15458 interrupt-parent = <&mpic>;
15459 interrupts = <5 1>;
15465 - #address-cells = <1>;
15466 - #size-cells = <0>;
15467 + enet0: ethernet@24000 {
15468 + cell-index = <0>;
15469 device_type = "network";
15471 compatible = "gianfar";
15472 @@ -104,9 +114,8 @@
15473 phy-handle = <&phy0>;
15477 - #address-cells = <1>;
15478 - #size-cells = <0>;
15479 + enet1: ethernet@25000 {
15480 + cell-index = <1>;
15481 device_type = "network";
15483 compatible = "gianfar";
15484 @@ -117,7 +126,8 @@
15485 phy-handle = <&phy1>;
15489 + serial0: serial@4500 {
15490 + cell-index = <0>;
15491 device_type = "serial";
15492 compatible = "ns16550";
15493 reg = <4500 100>; // reg base, size
15494 @@ -126,7 +136,8 @@
15495 interrupt-parent = <&mpic>;
15499 + serial1: serial@4600 {
15500 + cell-index = <1>;
15501 device_type = "serial";
15502 compatible = "ns16550";
15503 reg = <4600 100>; // reg base, size
15504 @@ -183,7 +194,8 @@
15508 - pci1: pci@e0008000 {
15509 + pci0: pci@e0008000 {
15510 + cell-index = <0>;
15511 interrupt-map-mask = <1f800 0 0 7>;
15514 @@ -250,11 +262,12 @@
15515 #interrupt-cells = <2>;
15516 compatible = "chrp,iic";
15518 - interrupt-parent = <&pci1>;
15519 + interrupt-parent = <&pci0>;
15524 + pci1: pci@e0009000 {
15525 + cell-index = <1>;
15526 interrupt-map-mask = <f800 0 0 7>;
15529 --- a/arch/powerpc/boot/dts/mpc8544ds.dts
15530 +++ b/arch/powerpc/boot/dts/mpc8544ds.dts
15532 #address-cells = <1>;
15536 + ethernet0 = &enet0;
15537 + ethernet1 = &enet1;
15538 + serial0 = &serial0;
15539 + serial1 = &serial1;
15548 #address-cells = <1>;
15553 - device_type = "i2c";
15554 + #address-cells = <1>;
15555 + #size-cells = <0>;
15556 + cell-index = <0>;
15557 compatible = "fsl-i2c";
15559 interrupts = <2b 2>;
15560 @@ -72,12 +85,23 @@
15565 + #address-cells = <1>;
15566 + #size-cells = <0>;
15567 + cell-index = <1>;
15568 + compatible = "fsl-i2c";
15569 + reg = <3100 100>;
15570 + interrupts = <2b 2>;
15571 + interrupt-parent = <&mpic>;
15576 #address-cells = <1>;
15578 - device_type = "mdio";
15579 - compatible = "gianfar";
15580 + compatible = "fsl,gianfar-mdio";
15583 phy0: ethernet-phy@0 {
15584 interrupt-parent = <&mpic>;
15585 interrupts = <a 1>;
15591 - #address-cells = <1>;
15592 - #size-cells = <0>;
15593 + enet0: ethernet@24000 {
15594 + cell-index = <0>;
15595 device_type = "network";
15597 compatible = "gianfar";
15598 @@ -106,9 +129,8 @@
15599 phy-connection-type = "rgmii-id";
15603 - #address-cells = <1>;
15604 - #size-cells = <0>;
15605 + enet1: ethernet@26000 {
15606 + cell-index = <1>;
15607 device_type = "network";
15609 compatible = "gianfar";
15610 @@ -120,7 +142,8 @@
15611 phy-connection-type = "rgmii-id";
15615 + serial0: serial@4500 {
15616 + cell-index = <0>;
15617 device_type = "serial";
15618 compatible = "ns16550";
15620 @@ -129,7 +152,8 @@
15621 interrupt-parent = <&mpic>;
15625 + serial1: serial@4600 {
15626 + cell-index = <1>;
15627 device_type = "serial";
15628 compatible = "ns16550";
15630 @@ -156,7 +180,8 @@
15635 + pci0: pci@e0008000 {
15636 + cell-index = <0>;
15637 compatible = "fsl,mpc8540-pci";
15638 device_type = "pci";
15639 interrupt-map-mask = <f800 0 0 7>;
15640 @@ -187,7 +212,8 @@
15641 reg = <e0008000 1000>;
15645 + pci1: pcie@e0009000 {
15646 + cell-index = <1>;
15647 compatible = "fsl,mpc8548-pcie";
15648 device_type = "pci";
15649 #interrupt-cells = <1>;
15650 @@ -223,7 +249,8 @@
15655 + pci2: pcie@e000a000 {
15656 + cell-index = <2>;
15657 compatible = "fsl,mpc8548-pcie";
15658 device_type = "pci";
15659 #interrupt-cells = <1>;
15660 @@ -259,7 +286,8 @@
15665 + pci3: pcie@e000b000 {
15666 + cell-index = <3>;
15667 compatible = "fsl,mpc8548-pcie";
15668 device_type = "pci";
15669 #interrupt-cells = <1>;
15670 @@ -276,9 +304,9 @@
15673 e000 0 0 1 &i8259 c 2
15674 - e100 0 0 1 &i8259 9 2
15675 - e200 0 0 1 &i8259 a 2
15676 - e300 0 0 1 &i8259 b 2
15677 + e100 0 0 2 &i8259 9 2
15678 + e200 0 0 3 &i8259 a 2
15679 + e300 0 0 4 &i8259 b 2
15681 // IDSEL 0x1d Audio
15682 e800 0 0 1 &i8259 6 2
15683 @@ -369,6 +397,5 @@
15690 --- a/arch/powerpc/boot/dts/mpc8548cds.dts
15691 +++ b/arch/powerpc/boot/dts/mpc8548cds.dts
15693 #address-cells = <1>;
15697 + ethernet0 = &enet0;
15698 + ethernet1 = &enet1;
15700 + ethernet2 = &enet2;
15701 + ethernet3 = &enet3;
15703 + serial0 = &serial0;
15704 + serial1 = &serial1;
15711 #address-cells = <1>;
15717 - device_type = "i2c";
15718 + #address-cells = <1>;
15719 + #size-cells = <0>;
15720 + cell-index = <0>;
15721 compatible = "fsl-i2c";
15723 interrupts = <2b 2>;
15724 @@ -71,12 +87,23 @@
15729 + #address-cells = <1>;
15730 + #size-cells = <0>;
15731 + cell-index = <1>;
15732 + compatible = "fsl-i2c";
15733 + reg = <3100 100>;
15734 + interrupts = <2b 2>;
15735 + interrupt-parent = <&mpic>;
15740 #address-cells = <1>;
15742 - device_type = "mdio";
15743 - compatible = "gianfar";
15744 + compatible = "fsl,gianfar-mdio";
15747 phy0: ethernet-phy@0 {
15748 interrupt-parent = <&mpic>;
15749 interrupts = <5 1>;
15750 @@ -103,9 +130,8 @@
15755 - #address-cells = <1>;
15756 - #size-cells = <0>;
15757 + enet0: ethernet@24000 {
15758 + cell-index = <0>;
15759 device_type = "network";
15761 compatible = "gianfar";
15762 @@ -116,9 +142,8 @@
15763 phy-handle = <&phy0>;
15767 - #address-cells = <1>;
15768 - #size-cells = <0>;
15769 + enet1: ethernet@25000 {
15770 + cell-index = <1>;
15771 device_type = "network";
15773 compatible = "gianfar";
15774 @@ -130,9 +155,8 @@
15777 /* eTSEC 3/4 are currently broken
15779 - #address-cells = <1>;
15780 - #size-cells = <0>;
15781 + enet2: ethernet@26000 {
15782 + cell-index = <2>;
15783 device_type = "network";
15785 compatible = "gianfar";
15786 @@ -143,9 +167,8 @@
15787 phy-handle = <&phy2>;
15791 - #address-cells = <1>;
15792 - #size-cells = <0>;
15793 + enet3: ethernet@27000 {
15794 + cell-index = <3>;
15795 device_type = "network";
15797 compatible = "gianfar";
15798 @@ -157,7 +180,8 @@
15803 + serial0: serial@4500 {
15804 + cell-index = <0>;
15805 device_type = "serial";
15806 compatible = "ns16550";
15807 reg = <4500 100>; // reg base, size
15808 @@ -166,7 +190,8 @@
15809 interrupt-parent = <&mpic>;
15813 + serial1: serial@4600 {
15814 + cell-index = <1>;
15815 device_type = "serial";
15816 compatible = "ns16550";
15817 reg = <4600 100>; // reg base, size
15818 @@ -193,7 +218,8 @@
15823 + pci0: pci@e0008000 {
15824 + cell-index = <0>;
15825 interrupt-map-mask = <f800 0 0 7>;
15827 /* IDSEL 0x4 (PCIX Slot 2) */
15828 @@ -342,7 +368,8 @@
15833 + pci1: pci@e0009000 {
15834 + cell-index = <1>;
15835 interrupt-map-mask = <f800 0 0 7>;
15838 @@ -366,7 +393,8 @@
15839 device_type = "pci";
15843 + pci2: pcie@e000a000 {
15844 + cell-index = <2>;
15845 interrupt-map-mask = <f800 0 0 7>;
15848 --- a/arch/powerpc/boot/dts/mpc8555cds.dts
15849 +++ b/arch/powerpc/boot/dts/mpc8555cds.dts
15851 #address-cells = <1>;
15855 + ethernet0 = &enet0;
15856 + ethernet1 = &enet1;
15857 + serial0 = &serial0;
15858 + serial1 = &serial1;
15864 #address-cells = <1>;
15870 - device_type = "i2c";
15871 + #address-cells = <1>;
15872 + #size-cells = <0>;
15873 + cell-index = <0>;
15874 compatible = "fsl-i2c";
15876 interrupts = <2b 2>;
15879 #address-cells = <1>;
15881 - device_type = "mdio";
15882 - compatible = "gianfar";
15883 + compatible = "fsl,gianfar-mdio";
15886 phy0: ethernet-phy@0 {
15887 interrupt-parent = <&mpic>;
15888 interrupts = <5 1>;
15894 - #address-cells = <1>;
15895 - #size-cells = <0>;
15896 + enet0: ethernet@24000 {
15897 + cell-index = <0>;
15898 device_type = "network";
15900 compatible = "gianfar";
15901 @@ -104,9 +114,8 @@
15902 phy-handle = <&phy0>;
15906 - #address-cells = <1>;
15907 - #size-cells = <0>;
15908 + enet1: ethernet@25000 {
15909 + cell-index = <1>;
15910 device_type = "network";
15912 compatible = "gianfar";
15913 @@ -117,7 +126,8 @@
15914 phy-handle = <&phy1>;
15918 + serial0: serial@4500 {
15919 + cell-index = <0>;
15920 device_type = "serial";
15921 compatible = "ns16550";
15922 reg = <4500 100>; // reg base, size
15923 @@ -126,7 +136,8 @@
15924 interrupt-parent = <&mpic>;
15928 + serial1: serial@4600 {
15929 + cell-index = <1>;
15930 device_type = "serial";
15931 compatible = "ns16550";
15932 reg = <4600 100>; // reg base, size
15933 @@ -183,7 +194,8 @@
15937 - pci1: pci@e0008000 {
15938 + pci0: pci@e0008000 {
15939 + cell-index = <0>;
15940 interrupt-map-mask = <1f800 0 0 7>;
15943 @@ -250,11 +262,12 @@
15944 #interrupt-cells = <2>;
15945 compatible = "chrp,iic";
15947 - interrupt-parent = <&pci1>;
15948 + interrupt-parent = <&pci0>;
15953 + pci1: pci@e0009000 {
15954 + cell-index = <1>;
15955 interrupt-map-mask = <f800 0 0 7>;
15958 --- a/arch/powerpc/boot/dts/mpc8560ads.dts
15959 +++ b/arch/powerpc/boot/dts/mpc8560ads.dts
15961 #address-cells = <1>;
15965 + ethernet0 = &enet0;
15966 + ethernet1 = &enet1;
15967 + ethernet2 = &enet2;
15968 + ethernet3 = &enet3;
15969 + serial0 = &serial0;
15970 + serial1 = &serial1;
15975 #address-cells = <1>;
15977 @@ -63,11 +73,11 @@
15981 - device_type = "mdio";
15982 - compatible = "gianfar";
15983 - reg = <24520 20>;
15984 #address-cells = <1>;
15986 + compatible = "fsl,gianfar-mdio";
15987 + reg = <24520 20>;
15989 phy0: ethernet-phy@0 {
15990 interrupt-parent = <&mpic>;
15991 interrupts = <5 1>;
15992 @@ -94,36 +104,24 @@
15997 + enet0: ethernet@24000 {
15998 + cell-index = <0>;
15999 device_type = "network";
16001 compatible = "gianfar";
16002 reg = <24000 1000>;
16004 - * address is deprecated and will be removed
16005 - * in 2.6.25. Only recent versions of
16006 - * U-Boot support local-mac-address, however.
16008 - address = [ 00 00 00 00 00 00 ];
16009 local-mac-address = [ 00 00 00 00 00 00 ];
16010 interrupts = <1d 2 1e 2 22 2>;
16011 interrupt-parent = <&mpic>;
16012 phy-handle = <&phy0>;
16016 - #address-cells = <1>;
16017 - #size-cells = <0>;
16018 + enet1: ethernet@25000 {
16019 + cell-index = <1>;
16020 device_type = "network";
16022 compatible = "gianfar";
16023 reg = <25000 1000>;
16025 - * address is deprecated and will be removed
16026 - * in 2.6.25. Only recent versions of
16027 - * U-Boot support local-mac-address, however.
16029 - address = [ 00 00 00 00 00 00 ];
16030 local-mac-address = [ 00 00 00 00 00 00 ];
16031 interrupts = <23 2 24 2 28 2>;
16032 interrupt-parent = <&mpic>;
16033 @@ -174,7 +172,7 @@
16034 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
16038 + serial0: serial@91a00 {
16039 device_type = "serial";
16040 compatible = "fsl,mpc8560-scc-uart",
16041 "fsl,cpm2-scc-uart";
16042 @@ -186,7 +184,7 @@
16043 interrupt-parent = <&cpmpic>;
16047 + serial1: serial@91a20 {
16048 device_type = "serial";
16049 compatible = "fsl,mpc8560-scc-uart",
16050 "fsl,cpm2-scc-uart";
16051 @@ -198,17 +196,11 @@
16052 interrupt-parent = <&cpmpic>;
16056 + enet2: ethernet@91320 {
16057 device_type = "network";
16058 compatible = "fsl,mpc8560-fcc-enet",
16059 "fsl,cpm2-fcc-enet";
16060 reg = <91320 20 88500 100 913b0 1>;
16062 - * mac-address is deprecated and will be removed
16063 - * in 2.6.25. Only recent versions of
16064 - * U-Boot support local-mac-address, however.
16066 - mac-address = [ 00 00 00 00 00 00 ];
16067 local-mac-address = [ 00 00 00 00 00 00 ];
16068 fsl,cpm-command = <16200300>;
16069 interrupts = <21 8>;
16070 @@ -216,17 +208,11 @@
16071 phy-handle = <&phy2>;
16075 + enet3: ethernet@91340 {
16076 device_type = "network";
16077 compatible = "fsl,mpc8560-fcc-enet",
16078 "fsl,cpm2-fcc-enet";
16079 reg = <91340 20 88600 100 913d0 1>;
16081 - * mac-address is deprecated and will be removed
16082 - * in 2.6.25. Only recent versions of
16083 - * U-Boot support local-mac-address, however.
16085 - mac-address = [ 00 00 00 00 00 00 ];
16086 local-mac-address = [ 00 00 00 00 00 00 ];
16087 fsl,cpm-command = <1a400300>;
16088 interrupts = <22 8>;
16089 @@ -236,7 +222,8 @@
16094 + pci0: pci@e0008000 {
16095 + cell-index = <0>;
16096 #interrupt-cells = <1>;
16098 #address-cells = <3>;
16099 --- a/arch/powerpc/boot/dts/mpc8568mds.dts
16100 +++ b/arch/powerpc/boot/dts/mpc8568mds.dts
16102 #address-cells = <1>;
16106 + ethernet0 = &enet0;
16107 + ethernet1 = &enet1;
16108 + ethernet2 = &enet2;
16109 + ethernet3 = &enet3;
16110 + serial0 = &serial0;
16111 + serial1 = &serial1;
16117 #address-cells = <1>;
16121 #address-cells = <1>;
16123 - device_type = "i2c";
16124 + cell-index = <0>;
16125 compatible = "fsl-i2c";
16127 interrupts = <2b 2>;
16130 #address-cells = <1>;
16132 - device_type = "i2c";
16133 + cell-index = <1>;
16134 compatible = "fsl-i2c";
16136 interrupts = <2b 2>;
16137 @@ -101,9 +112,9 @@
16139 #address-cells = <1>;
16141 - device_type = "mdio";
16142 - compatible = "gianfar";
16143 + compatible = "fsl,gianfar-mdio";
16146 phy0: ethernet-phy@7 {
16147 interrupt-parent = <&mpic>;
16148 interrupts = <1 1>;
16149 @@ -130,45 +141,32 @@
16154 - #address-cells = <1>;
16155 - #size-cells = <0>;
16156 + enet0: ethernet@24000 {
16157 + cell-index = <0>;
16158 device_type = "network";
16160 compatible = "gianfar";
16161 reg = <24000 1000>;
16163 - * mac-address is deprecated and will be removed
16164 - * in 2.6.25. Only recent versions of
16165 - * U-Boot support local-mac-address, however.
16167 - mac-address = [ 00 00 00 00 00 00 ];
16168 local-mac-address = [ 00 00 00 00 00 00 ];
16169 interrupts = <1d 2 1e 2 22 2>;
16170 interrupt-parent = <&mpic>;
16171 phy-handle = <&phy2>;
16175 - #address-cells = <1>;
16176 - #size-cells = <0>;
16177 + enet1: ethernet@25000 {
16178 + cell-index = <1>;
16179 device_type = "network";
16181 compatible = "gianfar";
16182 reg = <25000 1000>;
16184 - * mac-address is deprecated and will be removed
16185 - * in 2.6.25. Only recent versions of
16186 - * U-Boot support local-mac-address, however.
16188 - mac-address = [ 00 00 00 00 00 00 ];
16189 local-mac-address = [ 00 00 00 00 00 00 ];
16190 interrupts = <23 2 24 2 28 2>;
16191 interrupt-parent = <&mpic>;
16192 phy-handle = <&phy3>;
16196 + serial0: serial@4500 {
16197 + cell-index = <0>;
16198 device_type = "serial";
16199 compatible = "ns16550";
16201 @@ -183,7 +181,8 @@
16206 + serial1: serial@4600 {
16207 + cell-index = <1>;
16208 device_type = "serial";
16209 compatible = "ns16550";
16211 @@ -318,45 +317,35 @@
16216 + enet2: ucc@2000 {
16217 device_type = "network";
16218 compatible = "ucc_geth";
16220 + cell-index = <1>;
16224 interrupt-parent = <&qeic>;
16226 - * mac-address is deprecated and will be removed
16227 - * in 2.6.25. Only recent versions of
16228 - * U-Boot support local-mac-address, however.
16230 - mac-address = [ 00 00 00 00 00 00 ];
16231 local-mac-address = [ 00 00 00 00 00 00 ];
16234 + rx-clock-name = "none";
16235 + tx-clock-name = "clk16";
16236 pio-handle = <&pio1>;
16237 phy-handle = <&phy0>;
16238 phy-connection-type = "rgmii-id";
16242 + enet3: ucc@3000 {
16243 device_type = "network";
16244 compatible = "ucc_geth";
16246 + cell-index = <2>;
16250 interrupt-parent = <&qeic>;
16252 - * mac-address is deprecated and will be removed
16253 - * in 2.6.25. Only recent versions of
16254 - * U-Boot support local-mac-address, however.
16256 - mac-address = [ 00 00 00 00 00 00 ];
16257 local-mac-address = [ 00 00 00 00 00 00 ];
16260 + rx-clock-name = "none";
16261 + tx-clock-name = "clk16";
16262 pio-handle = <&pio2>;
16263 phy-handle = <&phy1>;
16264 phy-connection-type = "rgmii-id";
16265 @@ -366,7 +355,6 @@
16266 #address-cells = <1>;
16269 - device_type = "mdio";
16270 compatible = "ucc_geth_phy";
16272 /* These are the same PHYs as on
16273 @@ -410,7 +398,8 @@
16278 + pci0: pci@e0008000 {
16279 + cell-index = <0>;
16280 interrupt-map-mask = <f800 0 0 7>;
16282 /* IDSEL 0x12 AD18 */
16283 @@ -440,7 +429,8 @@
16288 + pci1: pcie@e000a000 {
16289 + cell-index = <2>;
16290 interrupt-map-mask = <f800 0 0 7>;
16293 --- a/arch/powerpc/boot/dts/mpc8572ds.dts
16294 +++ b/arch/powerpc/boot/dts/mpc8572ds.dts
16296 #address-cells = <1>;
16300 + ethernet0 = &enet0;
16301 + ethernet1 = &enet1;
16302 + ethernet2 = &enet2;
16303 + ethernet3 = &enet3;
16304 + serial0 = &serial0;
16305 + serial1 = &serial1;
16312 #address-cells = <1>;
16318 - device_type = "i2c";
16319 + #address-cells = <1>;
16320 + #size-cells = <0>;
16321 + cell-index = <0>;
16322 compatible = "fsl-i2c";
16324 interrupts = <2b 2>;
16329 - device_type = "i2c";
16330 + #address-cells = <1>;
16331 + #size-cells = <0>;
16332 + cell-index = <1>;
16333 compatible = "fsl-i2c";
16335 interrupts = <2b 2>;
16338 #address-cells = <1>;
16340 - device_type = "mdio";
16341 - compatible = "gianfar";
16342 + compatible = "fsl,gianfar-mdio";
16345 phy0: ethernet-phy@0 {
16346 interrupt-parent = <&mpic>;
16347 interrupts = <a 1>;
16348 @@ -114,9 +130,8 @@
16353 - #address-cells = <1>;
16354 - #size-cells = <0>;
16355 + enet0: ethernet@24000 {
16356 + cell-index = <0>;
16357 device_type = "network";
16359 compatible = "gianfar";
16360 @@ -128,9 +143,8 @@
16361 phy-connection-type = "rgmii-id";
16365 - #address-cells = <1>;
16366 - #size-cells = <0>;
16367 + enet1: ethernet@25000 {
16368 + cell-index = <1>;
16369 device_type = "network";
16371 compatible = "gianfar";
16372 @@ -142,9 +156,8 @@
16373 phy-connection-type = "rgmii-id";
16377 - #address-cells = <1>;
16378 - #size-cells = <0>;
16379 + enet2: ethernet@26000 {
16380 + cell-index = <2>;
16381 device_type = "network";
16383 compatible = "gianfar";
16384 @@ -156,9 +169,8 @@
16385 phy-connection-type = "rgmii-id";
16389 - #address-cells = <1>;
16390 - #size-cells = <0>;
16391 + enet3: ethernet@27000 {
16392 + cell-index = <3>;
16393 device_type = "network";
16395 compatible = "gianfar";
16396 @@ -170,7 +182,8 @@
16397 phy-connection-type = "rgmii-id";
16401 + serial0: serial@4500 {
16402 + cell-index = <0>;
16403 device_type = "serial";
16404 compatible = "ns16550";
16406 @@ -179,7 +192,8 @@
16407 interrupt-parent = <&mpic>;
16411 + serial1: serial@4600 {
16412 + cell-index = <1>;
16413 device_type = "serial";
16414 compatible = "ns16550";
16416 @@ -206,7 +220,8 @@
16421 + pci0: pcie@ffe08000 {
16422 + cell-index = <0>;
16423 compatible = "fsl,mpc8548-pcie";
16424 device_type = "pci";
16425 #interrupt-cells = <1>;
16426 @@ -319,9 +334,9 @@
16429 e000 0 0 1 &i8259 c 2
16430 - e100 0 0 1 &i8259 9 2
16431 - e200 0 0 1 &i8259 a 2
16432 - e300 0 0 1 &i8259 b 2
16433 + e100 0 0 2 &i8259 9 2
16434 + e200 0 0 3 &i8259 a 2
16435 + e300 0 0 4 &i8259 b 2
16437 // IDSEL 0x1d Audio
16438 e800 0 0 1 &i8259 6 2
16439 @@ -415,7 +430,8 @@
16444 + pci1: pcie@ffe09000 {
16445 + cell-index = <1>;
16446 compatible = "fsl,mpc8548-pcie";
16447 device_type = "pci";
16448 #interrupt-cells = <1>;
16449 @@ -451,7 +467,8 @@
16454 + pci2: pcie@ffe0a000 {
16455 + cell-index = <2>;
16456 compatible = "fsl,mpc8548-pcie";
16457 device_type = "pci";
16458 #interrupt-cells = <1>;
16459 @@ -464,6 +481,7 @@
16460 clock-frequency = <1fca055>;
16461 interrupt-parent = <&mpic>;
16462 interrupts = <1b 2>;
16463 + interrupt-map-mask = <f800 0 0 7>;
16466 0000 0 0 1 &mpic 0 1
16467 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
16468 +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
16471 * MPC8610 HPCD Device Tree Source
16473 - * Copyright 2007 Freescale Semiconductor Inc.
16474 + * Copyright 2007-2008 Freescale Semiconductor Inc.
16476 * This program is free software; you can redistribute it and/or modify it
16477 * under the terms of the GNU General Public License Version 2 as published
16479 #address-cells = <1>;
16483 + serial0 = &serial0;
16484 + serial1 = &serial1;
16490 #address-cells = <1>;
16492 @@ -42,33 +49,42 @@
16494 #interrupt-cells = <2>;
16495 device_type = "soc";
16496 + compatible = "fsl,mpc8610-immr", "simple-bus";
16497 ranges = <0 e0000000 00100000>;
16498 reg = <e0000000 1000>;
16499 bus-frequency = <0>;
16502 - device_type = "i2c";
16503 - compatible = "fsl-i2c";
16504 #address-cells = <1>;
16506 + cell-index = <0>;
16507 + compatible = "fsl-i2c";
16509 interrupts = <2b 2>;
16510 interrupt-parent = <&mpic>;
16513 + cs4270:codec@4f {
16514 + compatible = "cirrus,cs4270";
16516 + /* MCLK source is a stand-alone oscillator */
16517 + clock-frequency = <bb8000>;
16522 - device_type = "i2c";
16523 - compatible = "fsl-i2c";
16524 #address-cells = <1>;
16526 + cell-index = <1>;
16527 + compatible = "fsl-i2c";
16529 interrupts = <2b 2>;
16530 interrupt-parent = <&mpic>;
16535 + serial0: serial@4500 {
16536 + cell-index = <0>;
16537 device_type = "serial";
16538 compatible = "ns16550";
16541 interrupt-parent = <&mpic>;
16545 + serial1: serial@4600 {
16546 + cell-index = <1>;
16547 device_type = "serial";
16548 compatible = "ns16550";
16551 interrupt-parent = <&mpic>;
16555 mpic: interrupt-controller@40000 {
16556 clock-frequency = <0>;
16557 interrupt-controller;
16558 @@ -103,9 +119,113 @@
16559 reg = <e0000 1000>;
16564 + compatible = "fsl,mpc8610-ssi";
16565 + cell-index = <0>;
16566 + reg = <16000 100>;
16567 + interrupt-parent = <&mpic>;
16568 + interrupts = <3e 2>;
16569 + fsl,mode = "i2s-slave";
16570 + codec-handle = <&cs4270>;
16574 + compatible = "fsl,mpc8610-ssi";
16575 + cell-index = <1>;
16576 + reg = <16100 100>;
16577 + interrupt-parent = <&mpic>;
16578 + interrupts = <3f 2>;
16582 + #address-cells = <1>;
16583 + #size-cells = <1>;
16584 + compatible = "fsl,mpc8610-dma", "fsl,eloplus-dma";
16585 + cell-index = <0>;
16586 + reg = <21300 4>; /* DMA general status register */
16587 + ranges = <0 21100 200>;
16590 + compatible = "fsl,mpc8610-dma-channel",
16591 + "fsl,eloplus-dma-channel";
16592 + cell-index = <0>;
16594 + interrupt-parent = <&mpic>;
16595 + interrupts = <14 2>;
16598 + compatible = "fsl,mpc8610-dma-channel",
16599 + "fsl,eloplus-dma-channel";
16600 + cell-index = <1>;
16602 + interrupt-parent = <&mpic>;
16603 + interrupts = <15 2>;
16606 + compatible = "fsl,mpc8610-dma-channel",
16607 + "fsl,eloplus-dma-channel";
16608 + cell-index = <2>;
16610 + interrupt-parent = <&mpic>;
16611 + interrupts = <16 2>;
16614 + compatible = "fsl,mpc8610-dma-channel",
16615 + "fsl,eloplus-dma-channel";
16616 + cell-index = <3>;
16618 + interrupt-parent = <&mpic>;
16619 + interrupts = <17 2>;
16624 + #address-cells = <1>;
16625 + #size-cells = <1>;
16626 + compatible = "fsl,mpc8610-dma", "fsl,mpc8540-dma";
16627 + cell-index = <1>;
16628 + reg = <c300 4>; /* DMA general status register */
16629 + ranges = <0 c100 200>;
16632 + compatible = "fsl,mpc8610-dma-channel",
16633 + "fsl,mpc8540-dma-channel";
16634 + cell-index = <0>;
16636 + interrupt-parent = <&mpic>;
16637 + interrupts = <3c 2>;
16640 + compatible = "fsl,mpc8610-dma-channel",
16641 + "fsl,mpc8540-dma-channel";
16642 + cell-index = <1>;
16644 + interrupt-parent = <&mpic>;
16645 + interrupts = <3d 2>;
16648 + compatible = "fsl,mpc8610-dma-channel",
16649 + "fsl,mpc8540-dma-channel";
16650 + cell-index = <2>;
16652 + interrupt-parent = <&mpic>;
16653 + interrupts = <3e 2>;
16656 + compatible = "fsl,mpc8610-dma-channel",
16657 + "fsl,mpc8540-dma-channel";
16658 + cell-index = <3>;
16660 + interrupt-parent = <&mpic>;
16661 + interrupts = <3f 2>;
16668 + pci0: pci@e0008000 {
16669 + cell-index = <0>;
16670 compatible = "fsl,mpc8610-pci";
16671 device_type = "pci";
16672 #interrupt-cells = <1>;
16673 @@ -134,7 +254,8 @@
16678 + pci1: pcie@e000a000 {
16679 + cell-index = <1>;
16680 compatible = "fsl,mpc8641-pcie";
16681 device_type = "pci";
16682 #interrupt-cells = <1>;
16683 --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
16684 +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
16686 #address-cells = <1>;
16690 + ethernet0 = &enet0;
16691 + ethernet1 = &enet1;
16692 + ethernet2 = &enet2;
16693 + ethernet3 = &enet3;
16694 + serial0 = &serial0;
16695 + serial1 = &serial1;
16701 #address-cells = <1>;
16703 @@ -49,16 +60,60 @@
16704 reg = <00000000 40000000>; // 1G at 0x0
16707 + localbus@f8005000 {
16708 + #address-cells = <2>;
16709 + #size-cells = <1>;
16710 + compatible = "fsl,mpc8641-localbus", "simple-bus";
16711 + reg = <f8005000 1000>;
16712 + interrupts = <13 2>;
16713 + interrupt-parent = <&mpic>;
16715 + ranges = <0 0 ff800000 00800000
16716 + 1 0 fe000000 01000000
16717 + 2 0 f8200000 00100000
16718 + 3 0 f8100000 00100000>;
16721 + compatible = "cfi-flash";
16722 + reg = <0 0 00800000>;
16723 + bank-width = <2>;
16724 + device-width = <2>;
16725 + #address-cells = <1>;
16726 + #size-cells = <1>;
16728 + label = "kernel";
16729 + reg = <00000000 00300000>;
16731 + partition@300000 {
16732 + label = "firmware b";
16733 + reg = <00300000 00100000>;
16736 + partition@400000 {
16738 + reg = <00400000 00300000>;
16740 + partition@700000 {
16741 + label = "firmware a";
16742 + reg = <00700000 00100000>;
16749 #address-cells = <1>;
16751 device_type = "soc";
16752 + compatible = "simple-bus";
16753 ranges = <00000000 f8000000 00100000>;
16754 reg = <f8000000 00001000>; // CCSRBAR
16755 bus-frequency = <0>;
16758 - device_type = "i2c";
16759 + #address-cells = <1>;
16760 + #size-cells = <0>;
16761 + cell-index = <0>;
16762 compatible = "fsl-i2c";
16764 interrupts = <2b 2>;
16769 - device_type = "i2c";
16770 + #address-cells = <1>;
16771 + #size-cells = <0>;
16772 + cell-index = <1>;
16773 compatible = "fsl-i2c";
16775 interrupts = <2b 2>;
16778 #address-cells = <1>;
16780 - device_type = "mdio";
16781 - compatible = "gianfar";
16782 + compatible = "fsl,gianfar-mdio";
16785 phy0: ethernet-phy@0 {
16786 interrupt-parent = <&mpic>;
16787 interrupts = <a 1>;
16788 @@ -107,19 +164,12 @@
16793 - #address-cells = <1>;
16794 - #size-cells = <0>;
16795 + enet0: ethernet@24000 {
16796 + cell-index = <0>;
16797 device_type = "network";
16799 compatible = "gianfar";
16800 reg = <24000 1000>;
16802 - * mac-address is deprecated and will be removed
16803 - * in 2.6.25. Only recent versions of
16804 - * U-Boot support local-mac-address, however.
16806 - mac-address = [ 00 00 00 00 00 00 ];
16807 local-mac-address = [ 00 00 00 00 00 00 ];
16808 interrupts = <1d 2 1e 2 22 2>;
16809 interrupt-parent = <&mpic>;
16810 @@ -127,19 +177,12 @@
16811 phy-connection-type = "rgmii-id";
16815 - #address-cells = <1>;
16816 - #size-cells = <0>;
16817 + enet1: ethernet@25000 {
16818 + cell-index = <1>;
16819 device_type = "network";
16821 compatible = "gianfar";
16822 reg = <25000 1000>;
16824 - * mac-address is deprecated and will be removed
16825 - * in 2.6.25. Only recent versions of
16826 - * U-Boot support local-mac-address, however.
16828 - mac-address = [ 00 00 00 00 00 00 ];
16829 local-mac-address = [ 00 00 00 00 00 00 ];
16830 interrupts = <23 2 24 2 28 2>;
16831 interrupt-parent = <&mpic>;
16832 @@ -147,19 +190,12 @@
16833 phy-connection-type = "rgmii-id";
16837 - #address-cells = <1>;
16838 - #size-cells = <0>;
16839 + enet2: ethernet@26000 {
16840 + cell-index = <2>;
16841 device_type = "network";
16843 compatible = "gianfar";
16844 reg = <26000 1000>;
16846 - * mac-address is deprecated and will be removed
16847 - * in 2.6.25. Only recent versions of
16848 - * U-Boot support local-mac-address, however.
16850 - mac-address = [ 00 00 00 00 00 00 ];
16851 local-mac-address = [ 00 00 00 00 00 00 ];
16852 interrupts = <1F 2 20 2 21 2>;
16853 interrupt-parent = <&mpic>;
16854 @@ -167,26 +203,21 @@
16855 phy-connection-type = "rgmii-id";
16859 - #address-cells = <1>;
16860 - #size-cells = <0>;
16861 + enet3: ethernet@27000 {
16862 + cell-index = <3>;
16863 device_type = "network";
16865 compatible = "gianfar";
16866 reg = <27000 1000>;
16868 - * mac-address is deprecated and will be removed
16869 - * in 2.6.25. Only recent versions of
16870 - * U-Boot support local-mac-address, however.
16872 - mac-address = [ 00 00 00 00 00 00 ];
16873 local-mac-address = [ 00 00 00 00 00 00 ];
16874 interrupts = <25 2 26 2 27 2>;
16875 interrupt-parent = <&mpic>;
16876 phy-handle = <&phy3>;
16877 phy-connection-type = "rgmii-id";
16881 + serial0: serial@4500 {
16882 + cell-index = <0>;
16883 device_type = "serial";
16884 compatible = "ns16550";
16886 @@ -195,7 +226,8 @@
16887 interrupt-parent = <&mpic>;
16891 + serial1: serial@4600 {
16892 + cell-index = <1>;
16893 device_type = "serial";
16894 compatible = "ns16550";
16896 @@ -222,7 +254,8 @@
16901 + pci0: pcie@f8008000 {
16902 + cell-index = <0>;
16903 compatible = "fsl,mpc8641-pcie";
16904 device_type = "pci";
16905 #interrupt-cells = <1>;
16906 @@ -335,9 +368,9 @@
16909 e000 0 0 1 &i8259 c 2
16910 - e100 0 0 1 &i8259 9 2
16911 - e200 0 0 1 &i8259 a 2
16912 - e300 0 0 1 &i8259 b 2
16913 + e100 0 0 2 &i8259 9 2
16914 + e200 0 0 3 &i8259 a 2
16915 + e300 0 0 4 &i8259 b 2
16917 // IDSEL 0x1d Audio
16918 e800 0 0 1 &i8259 6 2
16919 @@ -430,7 +463,8 @@
16924 + pci1: pcie@f8009000 {
16925 + cell-index = <1>;
16926 compatible = "fsl,mpc8641-pcie";
16927 device_type = "pci";
16928 #interrupt-cells = <1>;
16929 --- a/arch/powerpc/boot/dts/mpc866ads.dts
16930 +++ b/arch/powerpc/boot/dts/mpc866ads.dts
16934 model = "MPC866ADS";
16935 - compatible = "mpc8xx";
16936 + compatible = "fsl,mpc866ads";
16937 #address-cells = <1>;
16940 @@ -23,15 +23,15 @@
16942 device_type = "cpu";
16944 - d-cache-line-size = <20>; // 32 bytes
16945 - i-cache-line-size = <20>; // 32 bytes
16946 + d-cache-line-size = <10>; // 16 bytes
16947 + i-cache-line-size = <10>; // 16 bytes
16948 d-cache-size = <2000>; // L1, 8K
16949 i-cache-size = <4000>; // L1, 16K
16950 timebase-frequency = <0>;
16951 bus-frequency = <0>;
16952 clock-frequency = <0>;
16953 interrupts = <f 2>; // decrementer interrupt
16954 - interrupt-parent = <&Mpc8xx_pic>;
16955 + interrupt-parent = <&PIC>;
16959 @@ -40,107 +40,139 @@
16960 reg = <00000000 800000>;
16963 - soc866@ff000000 {
16964 + localbus@ff000100 {
16965 + compatible = "fsl,mpc866-localbus", "fsl,pq1-localbus";
16966 + #address-cells = <2>;
16967 + #size-cells = <1>;
16968 + reg = <ff000100 40>;
16971 + 1 0 ff080000 00008000
16972 + 5 0 ff0a0000 00008000
16975 + board-control@1,0 {
16976 + reg = <1 0 20 5 300 4>;
16977 + compatible = "fsl,mpc866ads-bcsr";
16982 #address-cells = <1>;
16984 device_type = "soc";
16985 ranges = <0 ff000000 00100000>;
16986 reg = <ff000000 00000200>;
16987 bus-frequency = <0>;
16989 - device_type = "mdio";
16990 - compatible = "fs_enet";
16994 + compatible = "fsl,mpc866-fec-mdio", "fsl,pq1-fec-mdio";
16996 #address-cells = <1>;
16998 - phy: ethernet-phy@f {
16999 + PHY: ethernet-phy@f {
17001 device_type = "ethernet-phy";
17007 device_type = "network";
17008 - compatible = "fs_enet";
17011 + compatible = "fsl,mpc866-fec-enet",
17012 + "fsl,pq1-fec-enet";
17014 - mac-address = [ 00 00 0C 00 01 FD ];
17015 + local-mac-address = [ 00 00 00 00 00 00 ];
17016 interrupts = <3 1>;
17017 - interrupt-parent = <&Mpc8xx_pic>;
17018 - phy-handle = <&Phy>;
17019 + interrupt-parent = <&PIC>;
17020 + phy-handle = <&PHY>;
17021 + linux,network-index = <0>;
17024 - mpc8xx_pic: pic@ff000000 {
17026 interrupt-controller;
17027 - #address-cells = <0>;
17028 #interrupt-cells = <2>;
17030 - device_type = "mpc8xx-pic";
17031 - compatible = "CPM";
17032 + compatible = "fsl,mpc866-pic", "fsl,pq1-pic";
17037 #address-cells = <1>;
17039 - device_type = "cpm";
17041 - ranges = <0 0 4000>;
17043 - command-proc = <9c0>;
17044 + compatible = "fsl,mpc866-cpm", "fsl,cpm1";
17047 brg-frequency = <0>;
17048 interrupts = <0 2>; // cpm error interrupt
17049 - interrupt-parent = <&Cpm_pic>;
17050 + interrupt-parent = <&CPM_PIC>;
17052 - cpm_pic: pic@930 {
17054 + #address-cells = <1>;
17055 + #size-cells = <1>;
17056 + ranges = <0 2000 2000>;
17059 + compatible = "fsl,cpm-muram-data";
17065 + compatible = "fsl,mpc866-brg",
17069 + clock-frequency = <0>;
17072 + CPM_PIC: pic@930 {
17073 interrupt-controller;
17074 #address-cells = <0>;
17075 - #interrupt-cells = <2>;
17076 + #interrupt-cells = <1>;
17077 interrupts = <5 2 0 2>;
17078 - interrupt-parent = <&Mpc8xx_pic>;
17079 + interrupt-parent = <&PIC>;
17081 - device_type = "cpm-pic";
17082 - compatible = "CPM";
17083 + compatible = "fsl,mpc866-cpm-pic",
17090 device_type = "serial";
17091 - compatible = "cpm_uart";
17094 + compatible = "fsl,mpc866-smc-uart",
17095 + "fsl,cpm1-smc-uart";
17096 reg = <a80 10 3e80 40>;
17097 - clock-setup = <00ffffff 0>;
17100 - current-speed = <0>;
17101 - interrupts = <4 3>;
17102 - interrupt-parent = <&Cpm_pic>;
17103 + interrupts = <4>;
17104 + interrupt-parent = <&CPM_PIC>;
17105 + fsl,cpm-brg = <1>;
17106 + fsl,cpm-command = <0090>;
17111 device_type = "serial";
17112 - compatible = "cpm_uart";
17115 - reg = <a90 20 3f80 40>;
17116 - clock-setup = <ff00ffff 90000>;
17119 - current-speed = <0>;
17120 - interrupts = <3 3>;
17121 - interrupt-parent = <&Cpm_pic>;
17122 + compatible = "fsl,mpc866-smc-uart",
17123 + "fsl,cpm1-smc-uart";
17124 + reg = <a90 10 3f80 40>;
17125 + interrupts = <3>;
17126 + interrupt-parent = <&CPM_PIC>;
17127 + fsl,cpm-brg = <2>;
17128 + fsl,cpm-command = <00d0>;
17133 device_type = "network";
17134 - compatible = "fs_enet";
17137 - reg = <a00 18 3c00 80>;
17138 - mac-address = [ 00 00 0C 00 03 FD ];
17139 - interrupts = <1e 3>;
17140 - interrupt-parent = <&Cpm_pic>;
17141 + compatible = "fsl,mpc866-scc-enet",
17142 + "fsl,cpm1-scc-enet";
17143 + reg = <a00 18 3c00 100>;
17144 + local-mac-address = [ 00 00 00 00 00 00 ];
17145 + interrupts = <1e>;
17146 + interrupt-parent = <&CPM_PIC>;
17147 + fsl,cpm-command = <0000>;
17148 + linux,network-index = <1>;
17154 + linux,stdout-path = "/soc/cpm/serial@a80";
17158 +++ b/arch/powerpc/boot/dts/rainier.dts
17161 + * Device Tree Source for AMCC Rainier
17163 + * Based on Sequoia code
17164 + * Copyright (c) 2007 MontaVista Software, Inc.
17166 + * FIXME: Draft only!
17168 + * This file is licensed under the terms of the GNU General Public
17169 + * License version 2. This program is licensed "as is" without
17170 + * any warranty of any kind, whether express or implied.
17175 + #address-cells = <2>;
17176 + #size-cells = <1>;
17177 + model = "amcc,rainier";
17178 + compatible = "amcc,rainier";
17179 + dcr-parent = <&/cpus/cpu@0>;
17182 + ethernet0 = &EMAC0;
17183 + ethernet1 = &EMAC1;
17184 + serial0 = &UART0;
17185 + serial1 = &UART1;
17186 + serial2 = &UART2;
17187 + serial3 = &UART3;
17191 + #address-cells = <1>;
17192 + #size-cells = <0>;
17195 + device_type = "cpu";
17196 + model = "PowerPC,440GRx";
17198 + clock-frequency = <0>; /* Filled in by zImage */
17199 + timebase-frequency = <0>; /* Filled in by zImage */
17200 + i-cache-line-size = <20>;
17201 + d-cache-line-size = <20>;
17202 + i-cache-size = <8000>;
17203 + d-cache-size = <8000>;
17205 + dcr-access-method = "native";
17210 + device_type = "memory";
17211 + reg = <0 0 0>; /* Filled in by zImage */
17214 + UIC0: interrupt-controller0 {
17215 + compatible = "ibm,uic-440grx","ibm,uic";
17216 + interrupt-controller;
17217 + cell-index = <0>;
17218 + dcr-reg = <0c0 009>;
17219 + #address-cells = <0>;
17220 + #size-cells = <0>;
17221 + #interrupt-cells = <2>;
17224 + UIC1: interrupt-controller1 {
17225 + compatible = "ibm,uic-440grx","ibm,uic";
17226 + interrupt-controller;
17227 + cell-index = <1>;
17228 + dcr-reg = <0d0 009>;
17229 + #address-cells = <0>;
17230 + #size-cells = <0>;
17231 + #interrupt-cells = <2>;
17232 + interrupts = <1e 4 1f 4>; /* cascade */
17233 + interrupt-parent = <&UIC0>;
17236 + UIC2: interrupt-controller2 {
17237 + compatible = "ibm,uic-440grx","ibm,uic";
17238 + interrupt-controller;
17239 + cell-index = <2>;
17240 + dcr-reg = <0e0 009>;
17241 + #address-cells = <0>;
17242 + #size-cells = <0>;
17243 + #interrupt-cells = <2>;
17244 + interrupts = <1c 4 1d 4>; /* cascade */
17245 + interrupt-parent = <&UIC0>;
17249 + compatible = "ibm,sdr-440grx", "ibm,sdr-440ep";
17250 + dcr-reg = <00e 002>;
17254 + compatible = "ibm,cpr-440grx", "ibm,cpr-440ep";
17255 + dcr-reg = <00c 002>;
17259 + compatible = "ibm,plb-440grx", "ibm,plb4";
17260 + #address-cells = <2>;
17261 + #size-cells = <1>;
17263 + clock-frequency = <0>; /* Filled in by zImage */
17266 + compatible = "ibm,sdram-440grx", "ibm,sdram-44x-ddr2denali";
17267 + dcr-reg = <010 2>;
17271 + compatible = "ibm,dma-440grx", "ibm,dma-4xx";
17272 + dcr-reg = <100 027>;
17276 + compatible = "ibm,mcmal-440grx", "ibm,mcmal2";
17277 + dcr-reg = <180 62>;
17278 + num-tx-chans = <2>;
17279 + num-rx-chans = <2>;
17280 + interrupt-parent = <&MAL0>;
17281 + interrupts = <0 1 2 3 4>;
17282 + #interrupt-cells = <1>;
17283 + #address-cells = <0>;
17284 + #size-cells = <0>;
17285 + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
17286 + /*RXEOB*/ 1 &UIC0 b 4
17287 + /*SERR*/ 2 &UIC1 0 4
17288 + /*TXDE*/ 3 &UIC1 1 4
17289 + /*RXDE*/ 4 &UIC1 2 4>;
17290 + interrupt-map-mask = <ffffffff>;
17294 + compatible = "ibm,opb-440grx", "ibm,opb";
17295 + #address-cells = <1>;
17296 + #size-cells = <1>;
17297 + ranges = <00000000 1 00000000 80000000
17298 + 80000000 1 80000000 80000000>;
17299 + interrupt-parent = <&UIC1>;
17300 + interrupts = <7 4>;
17301 + clock-frequency = <0>; /* Filled in by zImage */
17304 + compatible = "ibm,ebc-440grx", "ibm,ebc";
17305 + dcr-reg = <012 2>;
17306 + #address-cells = <2>;
17307 + #size-cells = <1>;
17308 + clock-frequency = <0>; /* Filled in by zImage */
17309 + interrupts = <5 1>;
17310 + interrupt-parent = <&UIC1>;
17313 + compatible = "amd,s29gl256n", "cfi-flash";
17314 + bank-width = <2>;
17315 + reg = <0 000000 4000000>;
17316 + #address-cells = <1>;
17317 + #size-cells = <1>;
17319 + label = "Kernel";
17320 + reg = <0 180000>;
17322 + partition@180000 {
17323 + label = "ramdisk";
17324 + reg = <180000 200000>;
17326 + partition@380000 {
17327 + label = "file system";
17328 + reg = <380000 3aa0000>;
17330 + partition@3e20000 {
17332 + reg = <3e20000 140000>;
17334 + partition@3f60000 {
17336 + reg = <3f60000 40000>;
17338 + partition@3fa0000 {
17339 + label = "u-boot";
17340 + reg = <3fa0000 60000>;
17346 + UART0: serial@ef600300 {
17347 + device_type = "serial";
17348 + compatible = "ns16550";
17349 + reg = <ef600300 8>;
17350 + virtual-reg = <ef600300>;
17351 + clock-frequency = <0>; /* Filled in by zImage */
17352 + current-speed = <1c200>;
17353 + interrupt-parent = <&UIC0>;
17354 + interrupts = <0 4>;
17357 + UART1: serial@ef600400 {
17358 + device_type = "serial";
17359 + compatible = "ns16550";
17360 + reg = <ef600400 8>;
17361 + virtual-reg = <ef600400>;
17362 + clock-frequency = <0>;
17363 + current-speed = <0>;
17364 + interrupt-parent = <&UIC0>;
17365 + interrupts = <1 4>;
17368 + UART2: serial@ef600500 {
17369 + device_type = "serial";
17370 + compatible = "ns16550";
17371 + reg = <ef600500 8>;
17372 + virtual-reg = <ef600500>;
17373 + clock-frequency = <0>;
17374 + current-speed = <0>;
17375 + interrupt-parent = <&UIC1>;
17376 + interrupts = <3 4>;
17379 + UART3: serial@ef600600 {
17380 + device_type = "serial";
17381 + compatible = "ns16550";
17382 + reg = <ef600600 8>;
17383 + virtual-reg = <ef600600>;
17384 + clock-frequency = <0>;
17385 + current-speed = <0>;
17386 + interrupt-parent = <&UIC1>;
17387 + interrupts = <4 4>;
17390 + IIC0: i2c@ef600700 {
17391 + device_type = "i2c";
17392 + compatible = "ibm,iic-440grx", "ibm,iic";
17393 + reg = <ef600700 14>;
17394 + interrupt-parent = <&UIC0>;
17395 + interrupts = <2 4>;
17398 + IIC1: i2c@ef600800 {
17399 + device_type = "i2c";
17400 + compatible = "ibm,iic-440grx", "ibm,iic";
17401 + reg = <ef600800 14>;
17402 + interrupt-parent = <&UIC0>;
17403 + interrupts = <7 4>;
17406 + ZMII0: emac-zmii@ef600d00 {
17407 + device_type = "zmii-interface";
17408 + compatible = "ibm,zmii-440grx", "ibm,zmii";
17409 + reg = <ef600d00 c>;
17412 + RGMII0: emac-rgmii@ef601000 {
17413 + device_type = "rgmii-interface";
17414 + compatible = "ibm,rgmii-440grx", "ibm,rgmii";
17415 + reg = <ef601000 8>;
17419 + EMAC0: ethernet@ef600e00 {
17420 + linux,network-index = <0>;
17421 + device_type = "network";
17422 + compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4";
17423 + interrupt-parent = <&EMAC0>;
17424 + interrupts = <0 1>;
17425 + #interrupt-cells = <1>;
17426 + #address-cells = <0>;
17427 + #size-cells = <0>;
17428 + interrupt-map = </*Status*/ 0 &UIC0 18 4
17429 + /*Wake*/ 1 &UIC1 1d 4>;
17430 + reg = <ef600e00 70>;
17431 + local-mac-address = [000000000000];
17432 + mal-device = <&MAL0>;
17433 + mal-tx-channel = <0>;
17434 + mal-rx-channel = <0>;
17435 + cell-index = <0>;
17436 + max-frame-size = <5dc>;
17437 + rx-fifo-size = <1000>;
17438 + tx-fifo-size = <800>;
17439 + phy-mode = "rgmii";
17440 + phy-map = <00000000>;
17441 + zmii-device = <&ZMII0>;
17442 + zmii-channel = <0>;
17443 + rgmii-device = <&RGMII0>;
17444 + rgmii-channel = <0>;
17445 + has-inverted-stacr-oc;
17446 + has-new-stacr-staopc;
17449 + EMAC1: ethernet@ef600f00 {
17450 + linux,network-index = <1>;
17451 + device_type = "network";
17452 + compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4";
17453 + interrupt-parent = <&EMAC1>;
17454 + interrupts = <0 1>;
17455 + #interrupt-cells = <1>;
17456 + #address-cells = <0>;
17457 + #size-cells = <0>;
17458 + interrupt-map = </*Status*/ 0 &UIC0 19 4
17459 + /*Wake*/ 1 &UIC1 1f 4>;
17460 + reg = <ef600f00 70>;
17461 + local-mac-address = [000000000000];
17462 + mal-device = <&MAL0>;
17463 + mal-tx-channel = <1>;
17464 + mal-rx-channel = <1>;
17465 + cell-index = <1>;
17466 + max-frame-size = <5dc>;
17467 + rx-fifo-size = <1000>;
17468 + tx-fifo-size = <800>;
17469 + phy-mode = "rgmii";
17470 + phy-map = <00000000>;
17471 + zmii-device = <&ZMII0>;
17472 + zmii-channel = <1>;
17473 + rgmii-device = <&RGMII0>;
17474 + rgmii-channel = <1>;
17475 + has-inverted-stacr-oc;
17476 + has-new-stacr-staopc;
17480 + PCI0: pci@1ec000000 {
17481 + device_type = "pci";
17482 + #interrupt-cells = <1>;
17483 + #size-cells = <2>;
17484 + #address-cells = <3>;
17485 + compatible = "ibm,plb440grx-pci", "ibm,plb-pci";
17487 + reg = <1 eec00000 8 /* Config space access */
17488 + 1 eed00000 4 /* IACK */
17489 + 1 eed00000 4 /* Special cycle */
17490 + 1 ef400000 40>; /* Internal registers */
17492 + /* Outbound ranges, one memory and one IO,
17493 + * later cannot be changed. Chip supports a second
17494 + * IO range but we don't use it for now
17496 + ranges = <02000000 0 80000000 1 80000000 0 10000000
17497 + 01000000 0 00000000 1 e8000000 0 00100000>;
17499 + /* Inbound 2GB range starting at 0 */
17500 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
17502 + /* All PCI interrupts are routed to IRQ 67 */
17503 + interrupt-map-mask = <0000 0 0 0>;
17504 + interrupt-map = < 0000 0 0 0 &UIC2 3 8 >;
17509 + linux,stdout-path = "/plb/opb/serial@ef600300";
17510 + bootargs = "console=ttyS0,115200";
17513 --- a/arch/powerpc/boot/dts/sequoia.dts
17514 +++ b/arch/powerpc/boot/dts/sequoia.dts
17515 @@ -17,14 +17,24 @@
17517 model = "amcc,sequoia";
17518 compatible = "amcc,sequoia";
17519 - dcr-parent = <&/cpus/PowerPC,440EPx@0>;
17520 + dcr-parent = <&/cpus/cpu@0>;
17523 + ethernet0 = &EMAC0;
17524 + ethernet1 = &EMAC1;
17525 + serial0 = &UART0;
17526 + serial1 = &UART1;
17527 + serial2 = &UART2;
17528 + serial3 = &UART3;
17532 #address-cells = <1>;
17535 - PowerPC,440EPx@0 {
17537 device_type = "cpu";
17538 + model = "PowerPC,440EPx";
17540 clock-frequency = <0>; /* Filled in by zImage */
17541 timebase-frequency = <0>; /* Filled in by zImage */
17543 clock-frequency = <0>; /* Filled in by zImage */
17546 - device_type = "memory-controller";
17547 compatible = "ibm,sdram-440epx", "ibm,sdram-44x-ddr2denali";
17550 @@ -122,6 +131,13 @@
17551 interrupt-map-mask = <ffffffff>;
17554 + USB1: usb@e0000400 {
17555 + compatible = "ohci-be";
17556 + reg = <0 e0000400 60>;
17557 + interrupt-parent = <&UIC0>;
17558 + interrupts = <15 8>;
17562 compatible = "ibm,opb-440epx", "ibm,opb";
17563 #address-cells = <1>;
17564 @@ -308,6 +324,33 @@
17565 has-new-stacr-staopc;
17569 + PCI0: pci@1ec000000 {
17570 + device_type = "pci";
17571 + #interrupt-cells = <1>;
17572 + #size-cells = <2>;
17573 + #address-cells = <3>;
17574 + compatible = "ibm,plb440epx-pci", "ibm,plb-pci";
17576 + reg = <1 eec00000 8 /* Config space access */
17577 + 1 eed00000 4 /* IACK */
17578 + 1 eed00000 4 /* Special cycle */
17579 + 1 ef400000 40>; /* Internal registers */
17581 + /* Outbound ranges, one memory and one IO,
17582 + * later cannot be changed. Chip supports a second
17583 + * IO range but we don't use it for now
17585 + ranges = <02000000 0 80000000 1 80000000 0 10000000
17586 + 01000000 0 00000000 1 e8000000 0 00100000>;
17588 + /* Inbound 2GB range starting at 0 */
17589 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
17591 + /* All PCI interrupts are routed to IRQ 67 */
17592 + interrupt-map-mask = <0000 0 0 0>;
17593 + interrupt-map = < 0000 0 0 0 &UIC2 3 8 >;
17599 +++ b/arch/powerpc/boot/dts/storcenter.dts
17602 + * Device Tree Source for IOMEGA StorCenter
17604 + * Copyright 2007 Oyvind Repvik
17605 + * Copyright 2007 Jon Loeliger
17607 + * Based on the Kurobox DTS by G. Liakhovetski <g.liakhovetski@gmx.de>
17609 + * This file is licensed under the terms of the GNU General Public
17610 + * License version 2. This program is licensed "as is" without any
17611 + * warranty of any kind, whether express or implied.
17615 + model = "StorCenter";
17616 + compatible = "storcenter";
17617 + #address-cells = <1>;
17618 + #size-cells = <1>;
17621 + serial0 = &serial0;
17622 + serial1 = &serial1;
17627 + #address-cells = <1>;
17628 + #size-cells = <0>;
17631 + device_type = "cpu";
17633 + clock-frequency = <d# 200000000>; /* Hz */
17634 + timebase-frequency = <d# 25000000>; /* Hz */
17635 + bus-frequency = <0>; /* from bootwrapper */
17636 + i-cache-line-size = <d# 32>; /* bytes */
17637 + d-cache-line-size = <d# 32>; /* bytes */
17638 + i-cache-size = <4000>;
17639 + d-cache-size = <4000>;
17644 + device_type = "memory";
17645 + reg = <00000000 04000000>; /* 64MB @ 0x0 */
17649 + #address-cells = <1>;
17650 + #size-cells = <1>;
17651 + device_type = "soc";
17652 + compatible = "fsl,mpc8241", "mpc10x";
17653 + store-gathering = <0>; /* 0 == off, !0 == on */
17654 + ranges = <0 fc000000 100000>;
17655 + reg = <fc000000 100000>; /* EUMB */
17656 + bus-frequency = <0>; /* fixed by loader */
17659 + #address-cells = <1>;
17660 + #size-cells = <0>;
17661 + compatible = "fsl-i2c";
17662 + reg = <3000 100>;
17663 + interrupts = <5 2>;
17664 + interrupt-parent = <&mpic>;
17667 + compatible = "dallas,ds1337";
17672 + serial0: serial@4500 {
17673 + cell-index = <0>;
17674 + device_type = "serial";
17675 + compatible = "ns16550";
17677 + clock-frequency = <d# 97553800>; /* Hz */
17678 + current-speed = <d# 115200>;
17679 + interrupts = <9 2>;
17680 + interrupt-parent = <&mpic>;
17683 + serial1: serial@4600 {
17684 + cell-index = <1>;
17685 + device_type = "serial";
17686 + compatible = "ns16550";
17688 + clock-frequency = <d# 97553800>; /* Hz */
17689 + current-speed = <d# 9600>;
17690 + interrupts = <a 2>;
17691 + interrupt-parent = <&mpic>;
17694 + mpic: interrupt-controller@40000 {
17695 + #interrupt-cells = <2>;
17696 + device_type = "open-pic";
17697 + compatible = "chrp,open-pic";
17698 + interrupt-controller;
17699 + reg = <40000 40000>;
17704 + pci0: pci@fe800000 {
17705 + #address-cells = <3>;
17706 + #size-cells = <2>;
17707 + #interrupt-cells = <1>;
17708 + device_type = "pci";
17709 + compatible = "mpc10x-pci";
17710 + reg = <fe800000 1000>;
17711 + ranges = <01000000 0 0 fe000000 0 00c00000
17712 + 02000000 0 80000000 80000000 0 70000000>;
17713 + bus-range = <0 ff>;
17714 + clock-frequency = <d# 97553800>; /* Hz */
17715 + interrupt-parent = <&mpic>;
17716 + interrupt-map-mask = <f800 0 0 7>;
17717 + interrupt-map = <
17718 + /* IDSEL 13 - IDE */
17719 + 6800 0 0 1 &mpic 0 1
17720 + 6800 0 0 2 &mpic 0 1
17721 + 6800 0 0 3 &mpic 0 1
17722 + /* IDSEL 14 - USB */
17723 + 7000 0 0 1 &mpic 0 1
17724 + 7000 0 0 2 &mpic 0 1
17725 + 7000 0 0 3 &mpic 0 1
17726 + 7000 0 0 4 &mpic 0 1
17727 + /* IDSEL 15 - ETH */
17728 + 7800 0 0 1 &mpic 0 1
17729 + 7800 0 0 2 &mpic 0 1
17730 + 7800 0 0 3 &mpic 0 1
17731 + 7800 0 0 4 &mpic 0 1
17736 + linux,stdout-path = "/soc/serial@4500";
17740 +++ b/arch/powerpc/boot/dts/taishan.dts
17743 + * Device Tree Source for IBM/AMCC Taishan
17745 + * Copyright 2007 IBM Corp.
17746 + * Hugh Blemings <hugh@au.ibm.com> based off code by
17747 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>, David Gibson <dwg@au1.ibm.com>
17749 + * This file is licensed under the terms of the GNU General Public
17750 + * License version 2. This program is licensed "as is" without
17751 + * any warranty of any kind, whether express or implied.
17755 + #address-cells = <2>;
17756 + #size-cells = <1>;
17757 + model = "amcc,taishan";
17758 + compatible = "amcc,taishan";
17759 + dcr-parent = <&/cpus/cpu@0>;
17762 + ethernet0 = &EMAC2;
17763 + ethernet1 = &EMAC3;
17764 + serial0 = &UART0;
17765 + serial1 = &UART1;
17769 + #address-cells = <1>;
17770 + #size-cells = <0>;
17773 + device_type = "cpu";
17774 + model = "PowerPC,440GX";
17776 + clock-frequency = <2FAF0800>; // 800MHz
17777 + timebase-frequency = <0>; // Filled in by zImage
17778 + i-cache-line-size = <32>;
17779 + d-cache-line-size = <32>;
17780 + i-cache-size = <8000>; /* 32 kB */
17781 + d-cache-size = <8000>; /* 32 kB */
17783 + dcr-access-method = "native";
17788 + device_type = "memory";
17789 + reg = <0 0 0>; // Filled in by zImage
17793 + UICB0: interrupt-controller-base {
17794 + compatible = "ibm,uic-440gx", "ibm,uic";
17795 + interrupt-controller;
17796 + cell-index = <3>;
17797 + dcr-reg = <200 009>;
17798 + #address-cells = <0>;
17799 + #size-cells = <0>;
17800 + #interrupt-cells = <2>;
17804 + UIC0: interrupt-controller0 {
17805 + compatible = "ibm,uic-440gx", "ibm,uic";
17806 + interrupt-controller;
17807 + cell-index = <0>;
17808 + dcr-reg = <0c0 009>;
17809 + #address-cells = <0>;
17810 + #size-cells = <0>;
17811 + #interrupt-cells = <2>;
17812 + interrupts = <01 4 00 4>; /* cascade - first non-critical */
17813 + interrupt-parent = <&UICB0>;
17817 + UIC1: interrupt-controller1 {
17818 + compatible = "ibm,uic-440gx", "ibm,uic";
17819 + interrupt-controller;
17820 + cell-index = <1>;
17821 + dcr-reg = <0d0 009>;
17822 + #address-cells = <0>;
17823 + #size-cells = <0>;
17824 + #interrupt-cells = <2>;
17825 + interrupts = <03 4 02 4>; /* cascade */
17826 + interrupt-parent = <&UICB0>;
17829 + UIC2: interrupt-controller2 {
17830 + compatible = "ibm,uic-440gx", "ibm,uic";
17831 + interrupt-controller;
17832 + cell-index = <2>; /* was 1 */
17833 + dcr-reg = <210 009>;
17834 + #address-cells = <0>;
17835 + #size-cells = <0>;
17836 + #interrupt-cells = <2>;
17837 + interrupts = <05 4 04 4>; /* cascade */
17838 + interrupt-parent = <&UICB0>;
17843 + compatible = "ibm,cpc-440gp";
17844 + dcr-reg = <0b0 003 0e0 010>;
17845 + // FIXME: anything else?
17849 + compatible = "ibm,plb-440gx", "ibm,plb4";
17850 + #address-cells = <2>;
17851 + #size-cells = <1>;
17853 + clock-frequency = <9896800>; // 160MHz
17855 + SDRAM0: memory-controller {
17856 + compatible = "ibm,sdram-440gp";
17857 + dcr-reg = <010 2>;
17858 + // FIXME: anything else?
17862 + compatible = "ibm,sram-440gp";
17863 + dcr-reg = <020 8 00a 1>;
17868 + compatible = "ibm,dma-440gp";
17869 + dcr-reg = <100 027>;
17873 + compatible = "ibm,mcmal-440gx", "ibm,mcmal2";
17874 + dcr-reg = <180 62>;
17875 + num-tx-chans = <4>;
17876 + num-rx-chans = <4>;
17877 + interrupt-parent = <&MAL0>;
17878 + interrupts = <0 1 2 3 4>;
17879 + #interrupt-cells = <1>;
17880 + #address-cells = <0>;
17881 + #size-cells = <0>;
17882 + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
17883 + /*RXEOB*/ 1 &UIC0 b 4
17884 + /*SERR*/ 2 &UIC1 0 4
17885 + /*TXDE*/ 3 &UIC1 1 4
17886 + /*RXDE*/ 4 &UIC1 2 4>;
17887 + interrupt-map-mask = <ffffffff>;
17891 + compatible = "ibm,opb-440gx", "ibm,opb";
17892 + #address-cells = <1>;
17893 + #size-cells = <1>;
17894 + /* Wish there was a nicer way of specifying a full 32-bit
17896 + ranges = <00000000 1 00000000 80000000
17897 + 80000000 1 80000000 80000000>;
17898 + dcr-reg = <090 00b>;
17899 + interrupt-parent = <&UIC1>;
17900 + interrupts = <7 4>;
17901 + clock-frequency = <4C4B400>; // 80MHz
17905 + compatible = "ibm,ebc-440gx", "ibm,ebc";
17906 + dcr-reg = <012 2>;
17907 + #address-cells = <2>;
17908 + #size-cells = <1>;
17909 + clock-frequency = <4C4B400>; // 80MHz
17911 + /* ranges property is supplied by zImage
17912 + * based on firmware's configuration of the
17915 + interrupts = <5 4>;
17916 + interrupt-parent = <&UIC1>;
17918 + /* TODO: Add other EBC devices */
17923 + UART0: serial@40000200 {
17924 + device_type = "serial";
17925 + compatible = "ns16550";
17926 + reg = <40000200 8>;
17927 + virtual-reg = <e0000200>;
17928 + clock-frequency = <A8C000>;
17929 + current-speed = <1C200>; /* 115200 */
17930 + interrupt-parent = <&UIC0>;
17931 + interrupts = <0 4>;
17934 + UART1: serial@40000300 {
17935 + device_type = "serial";
17936 + compatible = "ns16550";
17937 + reg = <40000300 8>;
17938 + virtual-reg = <e0000300>;
17939 + clock-frequency = <A8C000>;
17940 + current-speed = <1C200>; /* 115200 */
17941 + interrupt-parent = <&UIC0>;
17942 + interrupts = <1 4>;
17945 + IIC0: i2c@40000400 {
17947 + device_type = "i2c";
17948 + compatible = "ibm,iic-440gp", "ibm,iic";
17949 + reg = <40000400 14>;
17950 + interrupt-parent = <&UIC0>;
17951 + interrupts = <2 4>;
17953 + IIC1: i2c@40000500 {
17955 + device_type = "i2c";
17956 + compatible = "ibm,iic-440gp", "ibm,iic";
17957 + reg = <40000500 14>;
17958 + interrupt-parent = <&UIC0>;
17959 + interrupts = <3 4>;
17962 + GPIO0: gpio@40000700 {
17964 + compatible = "ibm,gpio-440gp";
17965 + reg = <40000700 20>;
17968 + ZMII0: emac-zmii@40000780 {
17969 + device_type = "zgmii-interface";
17970 + compatible = "ibm,zmii-440gx", "ibm,zmii";
17971 + reg = <40000780 c>;
17974 + RGMII0: emac-rgmii@40000790 {
17975 + device_type = "rgmii-interface";
17976 + compatible = "ibm,rgmii";
17977 + reg = <40000790 8>;
17981 + EMAC0: ethernet@40000800 {
17983 + linux,network-index = <2>;
17984 + device_type = "network";
17985 + compatible = "ibm,emac-440gx", "ibm,emac4";
17986 + interrupt-parent = <&UIC1>;
17987 + interrupts = <1c 4 1d 4>;
17988 + reg = <40000800 70>;
17989 + local-mac-address = [000000000000]; // Filled in by zImage
17990 + mal-device = <&MAL0>;
17991 + mal-tx-channel = <0>;
17992 + mal-rx-channel = <0>;
17993 + cell-index = <0>;
17994 + max-frame-size = <5dc>;
17995 + rx-fifo-size = <1000>;
17996 + tx-fifo-size = <800>;
17997 + phy-mode = "rmii";
17998 + phy-map = <00000001>;
17999 + zmii-device = <&ZMII0>;
18000 + zmii-channel = <0>;
18002 + EMAC1: ethernet@40000900 {
18004 + linux,network-index = <3>;
18005 + device_type = "network";
18006 + compatible = "ibm,emac-440gx", "ibm,emac4";
18007 + interrupt-parent = <&UIC1>;
18008 + interrupts = <1e 4 1f 4>;
18009 + reg = <40000900 70>;
18010 + local-mac-address = [000000000000]; // Filled in by zImage
18011 + mal-device = <&MAL0>;
18012 + mal-tx-channel = <1>;
18013 + mal-rx-channel = <1>;
18014 + cell-index = <1>;
18015 + max-frame-size = <5dc>;
18016 + rx-fifo-size = <1000>;
18017 + tx-fifo-size = <800>;
18018 + phy-mode = "rmii";
18019 + phy-map = <00000001>;
18020 + zmii-device = <&ZMII0>;
18021 + zmii-channel = <1>;
18024 + EMAC2: ethernet@40000c00 {
18025 + linux,network-index = <0>;
18026 + device_type = "network";
18027 + compatible = "ibm,emac-440gx", "ibm,emac4";
18028 + interrupt-parent = <&UIC2>;
18029 + interrupts = <0 4 1 4>;
18030 + reg = <40000c00 70>;
18031 + local-mac-address = [000000000000]; // Filled in by zImage
18032 + mal-device = <&MAL0>;
18033 + mal-tx-channel = <2>;
18034 + mal-rx-channel = <2>;
18035 + cell-index = <2>;
18036 + max-frame-size = <5dc>;
18037 + rx-fifo-size = <1000>;
18038 + tx-fifo-size = <800>;
18039 + phy-mode = "rgmii";
18040 + phy-map = <00000001>;
18041 + rgmii-device = <&RGMII0>;
18042 + rgmii-channel = <0>;
18043 + zmii-device = <&ZMII0>;
18044 + zmii-channel = <2>;
18047 + EMAC3: ethernet@40000e00 {
18048 + linux,network-index = <1>;
18049 + device_type = "network";
18050 + compatible = "ibm,emac-440gx", "ibm,emac4";
18051 + interrupt-parent = <&UIC2>;
18052 + interrupts = <2 4 3 4>;
18053 + reg = <40000e00 70>;
18054 + local-mac-address = [000000000000]; // Filled in by zImage
18055 + mal-device = <&MAL0>;
18056 + mal-tx-channel = <3>;
18057 + mal-rx-channel = <3>;
18058 + cell-index = <3>;
18059 + max-frame-size = <5dc>;
18060 + rx-fifo-size = <1000>;
18061 + tx-fifo-size = <800>;
18062 + phy-mode = "rgmii";
18063 + phy-map = <00000003>;
18064 + rgmii-device = <&RGMII0>;
18065 + rgmii-channel = <1>;
18066 + zmii-device = <&ZMII0>;
18067 + zmii-channel = <3>;
18071 + GPT0: gpt@40000a00 {
18073 + reg = <40000a00 d4>;
18074 + interrupt-parent = <&UIC0>;
18075 + interrupts = <12 4 13 4 14 4 15 4 16 4>;
18080 + PCIX0: pci@20ec00000 {
18081 + device_type = "pci";
18082 + #interrupt-cells = <1>;
18083 + #size-cells = <2>;
18084 + #address-cells = <3>;
18085 + compatible = "ibm,plb440gp-pcix", "ibm,plb-pcix";
18087 + large-inbound-windows;
18089 + reg = <2 0ec00000 8 /* Config space access */
18090 + 0 0 0 /* no IACK cycles */
18091 + 2 0ed00000 4 /* Special cycles */
18092 + 2 0ec80000 100 /* Internal registers */
18093 + 2 0ec80100 fc>; /* Internal messaging registers */
18095 + /* Outbound ranges, one memory and one IO,
18096 + * later cannot be changed
18098 + ranges = <02000000 0 80000000 00000003 80000000 0 80000000
18099 + 01000000 0 00000000 00000002 08000000 0 00010000>;
18101 + /* Inbound 2GB range starting at 0 */
18102 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
18104 + interrupt-map-mask = <f800 0 0 7>;
18105 + interrupt-map = <
18107 + 0800 0 0 1 &UIC0 17 8
18108 + 0800 0 0 2 &UIC0 18 8
18109 + 0800 0 0 3 &UIC0 19 8
18110 + 0800 0 0 4 &UIC0 1a 8
18113 + 1000 0 0 1 &UIC0 18 8
18114 + 1000 0 0 2 &UIC0 19 8
18115 + 1000 0 0 3 &UIC0 1a 8
18116 + 1000 0 0 4 &UIC0 17 8
18122 + linux,stdout-path = "/plb/opb/serial@40000300";
18126 +++ b/arch/powerpc/boot/dts/tqm5200.dts
18129 + * TQM5200 board Device Tree Source
18131 + * Copyright (C) 2007 Semihalf
18132 + * Marian Balakowicz <m8@semihalf.com>
18134 + * This program is free software; you can redistribute it and/or modify it
18135 + * under the terms of the GNU General Public License as published by the
18136 + * Free Software Foundation; either version 2 of the License, or (at your
18137 + * option) any later version.
18141 + * WARNING: Do not depend on this tree layout remaining static just yet.
18142 + * The MPC5200 device tree conventions are still in flux
18143 + * Keep an eye on the linuxppc-dev mailing list for more details
18147 + model = "tqc,tqm5200";
18148 + compatible = "tqc,tqm5200";
18149 + #address-cells = <1>;
18150 + #size-cells = <1>;
18153 + #address-cells = <1>;
18154 + #size-cells = <0>;
18157 + device_type = "cpu";
18159 + d-cache-line-size = <20>;
18160 + i-cache-line-size = <20>;
18161 + d-cache-size = <4000>; // L1, 16K
18162 + i-cache-size = <4000>; // L1, 16K
18163 + timebase-frequency = <0>; // from bootloader
18164 + bus-frequency = <0>; // from bootloader
18165 + clock-frequency = <0>; // from bootloader
18170 + device_type = "memory";
18171 + reg = <00000000 04000000>; // 64MB
18174 + soc5200@f0000000 {
18175 + model = "fsl,mpc5200";
18176 + compatible = "fsl,mpc5200";
18177 + revision = ""; // from bootloader
18178 + device_type = "soc";
18179 + ranges = <0 f0000000 0000c000>;
18180 + reg = <f0000000 00000100>;
18181 + bus-frequency = <0>; // from bootloader
18182 + system-frequency = <0>; // from bootloader
18185 + compatible = "mpc5200-cdm";
18189 + mpc5200_pic: pic@500 {
18190 + // 5200 interrupts are encoded into two levels;
18191 + interrupt-controller;
18192 + #interrupt-cells = <3>;
18193 + compatible = "mpc5200-pic";
18197 + gpt@600 { // General Purpose Timer
18198 + compatible = "fsl,mpc5200-gpt";
18200 + interrupts = <1 9 0>;
18201 + interrupt-parent = <&mpc5200_pic>;
18206 + compatible = "mpc5200-gpio";
18208 + interrupts = <1 7 0>;
18209 + interrupt-parent = <&mpc5200_pic>;
18213 + compatible = "mpc5200-ohci","ohci-be";
18215 + interrupts = <2 6 0>;
18216 + interrupt-parent = <&mpc5200_pic>;
18219 + dma-controller@1200 {
18220 + compatible = "mpc5200-bestcomm";
18222 + interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
18223 + 3 4 0 3 5 0 3 6 0 3 7 0
18224 + 3 8 0 3 9 0 3 a 0 3 b 0
18225 + 3 c 0 3 d 0 3 e 0 3 f 0>;
18226 + interrupt-parent = <&mpc5200_pic>;
18230 + compatible = "mpc5200-xlb";
18231 + reg = <1f00 100>;
18234 + serial@2000 { // PSC1
18235 + device_type = "serial";
18236 + compatible = "mpc5200-psc-uart";
18237 + port-number = <0>; // Logical port assignment
18238 + reg = <2000 100>;
18239 + interrupts = <2 1 0>;
18240 + interrupt-parent = <&mpc5200_pic>;
18243 + serial@2200 { // PSC2
18244 + device_type = "serial";
18245 + compatible = "mpc5200-psc-uart";
18246 + port-number = <1>; // Logical port assignment
18247 + reg = <2200 100>;
18248 + interrupts = <2 2 0>;
18249 + interrupt-parent = <&mpc5200_pic>;
18252 + serial@2400 { // PSC3
18253 + device_type = "serial";
18254 + compatible = "mpc5200-psc-uart";
18255 + port-number = <2>; // Logical port assignment
18256 + reg = <2400 100>;
18257 + interrupts = <2 3 0>;
18258 + interrupt-parent = <&mpc5200_pic>;
18262 + device_type = "network";
18263 + compatible = "mpc5200-fec";
18264 + reg = <3000 800>;
18265 + local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */
18266 + interrupts = <2 5 0>;
18267 + interrupt-parent = <&mpc5200_pic>;
18271 + compatible = "mpc5200-ata";
18272 + reg = <3a00 100>;
18273 + interrupts = <2 7 0>;
18274 + interrupt-parent = <&mpc5200_pic>;
18278 + compatible = "mpc5200-i2c","fsl-i2c";
18280 + interrupts = <2 10 0>;
18281 + interrupt-parent = <&mpc5200_pic>;
18282 + fsl5200-clocking;
18286 + compatible = "mpc5200-sram";
18287 + reg = <8000 4000>;
18292 + #interrupt-cells = <1>;
18293 + #size-cells = <2>;
18294 + #address-cells = <3>;
18295 + device_type = "pci";
18296 + compatible = "fsl,mpc5200-pci";
18297 + reg = <f0000d00 100>;
18298 + interrupt-map-mask = <f800 0 0 7>;
18299 + interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3
18300 + c000 0 0 2 &mpc5200_pic 0 0 3
18301 + c000 0 0 3 &mpc5200_pic 0 0 3
18302 + c000 0 0 4 &mpc5200_pic 0 0 3>;
18303 + clock-frequency = <0>; // From boot loader
18304 + interrupts = <2 8 0 2 9 0 2 a 0>;
18305 + interrupt-parent = <&mpc5200_pic>;
18306 + bus-range = <0 0>;
18307 + ranges = <42000000 0 80000000 80000000 0 10000000
18308 + 02000000 0 90000000 90000000 0 10000000
18309 + 01000000 0 00000000 a0000000 0 01000000>;
18312 --- a/arch/powerpc/boot/dts/walnut.dts
18313 +++ b/arch/powerpc/boot/dts/walnut.dts
18314 @@ -14,14 +14,21 @@
18316 model = "ibm,walnut";
18317 compatible = "ibm,walnut";
18318 - dcr-parent = <&/cpus/PowerPC,405GP@0>;
18319 + dcr-parent = <&/cpus/cpu@0>;
18322 + ethernet0 = &EMAC;
18323 + serial0 = &UART0;
18324 + serial1 = &UART1;
18328 #address-cells = <1>;
18331 - PowerPC,405GP@0 {
18333 device_type = "cpu";
18334 + model = "PowerPC,405GP";
18336 clock-frequency = <bebc200>; /* Filled in by zImage */
18337 timebase-frequency = <0>; /* Filled in by zImage */
18338 @@ -168,9 +175,10 @@
18344 /* NVRAM and RTC */
18345 - compatible = "ds1743";
18346 + compatible = "ds1743-nvram";
18351 @@ -190,6 +198,45 @@
18352 virtual-reg = <f0300005>;
18356 + PCI0: pci@ec000000 {
18357 + device_type = "pci";
18358 + #interrupt-cells = <1>;
18359 + #size-cells = <2>;
18360 + #address-cells = <3>;
18361 + compatible = "ibm,plb405gp-pci", "ibm,plb-pci";
18363 + reg = <eec00000 8 /* Config space access */
18364 + eed80000 4 /* IACK */
18365 + eed80000 4 /* Special cycle */
18366 + ef480000 40>; /* Internal registers */
18368 + /* Outbound ranges, one memory and one IO,
18369 + * later cannot be changed. Chip supports a second
18370 + * IO range but we don't use it for now
18372 + ranges = <02000000 0 80000000 80000000 0 20000000
18373 + 01000000 0 00000000 e8000000 0 00010000>;
18375 + /* Inbound 2GB range starting at 0 */
18376 + dma-ranges = <42000000 0 0 0 0 80000000>;
18378 + /* Walnut has all 4 IRQ pins tied together per slot */
18379 + interrupt-map-mask = <f800 0 0 0>;
18380 + interrupt-map = <
18382 + 0800 0 0 0 &UIC0 1c 8
18385 + 1000 0 0 0 &UIC0 1d 8
18388 + 1800 0 0 0 &UIC0 1e 8
18391 + 2000 0 0 0 &UIC0 1f 8
18398 +++ b/arch/powerpc/boot/dts/warp.dts
18401 + * Device Tree Source for PIKA Warp
18403 + * Copyright (c) 2008 PIKA Technologies
18404 + * Sean MacLennan <smaclennan@pikatech.com>
18406 + * This file is licensed under the terms of the GNU General Public
18407 + * License version 2. This program is licensed "as is" without
18408 + * any warranty of any kind, whether express or implied.
18412 + #address-cells = <2>;
18413 + #size-cells = <1>;
18414 + model = "pika,warp";
18415 + compatible = "pika,warp";
18416 + dcr-parent = <&/cpus/cpu@0>;
18419 + ethernet0 = &EMAC0;
18420 + serial0 = &UART0;
18424 + #address-cells = <1>;
18425 + #size-cells = <0>;
18428 + device_type = "cpu";
18429 + model = "PowerPC,440EP";
18431 + clock-frequency = <0>; /* Filled in by zImage */
18432 + timebase-frequency = <0>; /* Filled in by zImage */
18433 + i-cache-line-size = <20>;
18434 + d-cache-line-size = <20>;
18435 + i-cache-size = <8000>;
18436 + d-cache-size = <8000>;
18438 + dcr-access-method = "native";
18443 + device_type = "memory";
18444 + reg = <0 0 0>; /* Filled in by zImage */
18447 + UIC0: interrupt-controller0 {
18448 + compatible = "ibm,uic-440ep","ibm,uic";
18449 + interrupt-controller;
18450 + cell-index = <0>;
18451 + dcr-reg = <0c0 009>;
18452 + #address-cells = <0>;
18453 + #size-cells = <0>;
18454 + #interrupt-cells = <2>;
18457 + UIC1: interrupt-controller1 {
18458 + compatible = "ibm,uic-440ep","ibm,uic";
18459 + interrupt-controller;
18460 + cell-index = <1>;
18461 + dcr-reg = <0d0 009>;
18462 + #address-cells = <0>;
18463 + #size-cells = <0>;
18464 + #interrupt-cells = <2>;
18465 + interrupts = <1e 4 1f 4>; /* cascade */
18466 + interrupt-parent = <&UIC0>;
18470 + compatible = "ibm,sdr-440ep";
18471 + dcr-reg = <00e 002>;
18475 + compatible = "ibm,cpr-440ep";
18476 + dcr-reg = <00c 002>;
18480 + compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4";
18481 + #address-cells = <2>;
18482 + #size-cells = <1>;
18484 + clock-frequency = <0>; /* Filled in by zImage */
18487 + compatible = "ibm,sdram-440ep", "ibm,sdram-405gp";
18488 + dcr-reg = <010 2>;
18492 + compatible = "ibm,dma-440ep", "ibm,dma-440gp";
18493 + dcr-reg = <100 027>;
18497 + compatible = "ibm,mcmal-440ep", "ibm,mcmal-440gp", "ibm,mcmal";
18498 + dcr-reg = <180 62>;
18499 + num-tx-chans = <4>;
18500 + num-rx-chans = <2>;
18501 + interrupt-parent = <&MAL0>;
18502 + interrupts = <0 1 2 3 4>;
18503 + #interrupt-cells = <1>;
18504 + #address-cells = <0>;
18505 + #size-cells = <0>;
18506 + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
18507 + /*RXEOB*/ 1 &UIC0 b 4
18508 + /*SERR*/ 2 &UIC1 0 4
18509 + /*TXDE*/ 3 &UIC1 1 4
18510 + /*RXDE*/ 4 &UIC1 2 4>;
18514 + compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb";
18515 + #address-cells = <1>;
18516 + #size-cells = <1>;
18517 + ranges = <00000000 0 00000000 80000000
18518 + 80000000 0 80000000 80000000>;
18519 + interrupt-parent = <&UIC1>;
18520 + interrupts = <7 4>;
18521 + clock-frequency = <0>; /* Filled in by zImage */
18524 + compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc";
18525 + dcr-reg = <012 2>;
18526 + #address-cells = <2>;
18527 + #size-cells = <1>;
18528 + clock-frequency = <0>; /* Filled in by zImage */
18529 + interrupts = <5 1>;
18530 + interrupt-parent = <&UIC1>;
18533 + compatible = "pika,fpga";
18534 + reg = <2 0 2200>;
18535 + interrupts = <18 8>;
18536 + interrupt-parent = <&UIC0>;
18540 + compatible = "amd,s29gl512n", "cfi-flash";
18541 + bank-width = <2>;
18542 + reg = <0 0 4000000>;
18543 + #address-cells = <1>;
18544 + #size-cells = <1>;
18546 + label = "kernel";
18547 + reg = <0 180000>;
18549 + partition@180000 {
18551 + reg = <180000 3480000>;
18553 + partition@3600000 {
18555 + reg = <3600000 900000>;
18557 + partition@3f00000 {
18559 + reg = <3f00000 40000>;
18561 + partition@3f40000 {
18563 + reg = <3f40000 40000>;
18565 + partition@3f80000 {
18566 + label = "u-boot";
18567 + reg = <3f80000 80000>;
18572 + UART0: serial@ef600300 {
18573 + device_type = "serial";
18574 + compatible = "ns16550";
18575 + reg = <ef600300 8>;
18576 + virtual-reg = <ef600300>;
18577 + clock-frequency = <0>; /* Filled in by zImage */
18578 + current-speed = <1c200>;
18579 + interrupt-parent = <&UIC0>;
18580 + interrupts = <0 4>;
18583 + IIC0: i2c@ef600700 {
18584 + compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
18585 + reg = <ef600700 14>;
18586 + interrupt-parent = <&UIC0>;
18587 + interrupts = <2 4>;
18590 + GPIO0: gpio@ef600b00 {
18591 + compatible = "ibm,gpio-440ep";
18592 + reg = <ef600b00 48>;
18595 + GPIO1: gpio@ef600c00 {
18596 + compatible = "ibm,gpio-440ep";
18597 + reg = <ef600c00 48>;
18600 + ZMII0: emac-zmii@ef600d00 {
18601 + compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii";
18602 + reg = <ef600d00 c>;
18605 + EMAC0: ethernet@ef600e00 {
18606 + linux,network-index = <0>;
18607 + device_type = "network";
18608 + compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac";
18609 + interrupt-parent = <&UIC1>;
18610 + interrupts = <1c 4 1d 4>;
18611 + reg = <ef600e00 70>;
18612 + local-mac-address = [000000000000];
18613 + mal-device = <&MAL0>;
18614 + mal-tx-channel = <0 1>;
18615 + mal-rx-channel = <0>;
18616 + cell-index = <0>;
18617 + max-frame-size = <5dc>;
18618 + rx-fifo-size = <1000>;
18619 + tx-fifo-size = <800>;
18620 + phy-mode = "rmii";
18621 + phy-map = <00000000>;
18622 + zmii-device = <&ZMII0>;
18623 + zmii-channel = <0>;
18627 + compatible = "ohci-be";
18628 + reg = <ef601000 80>;
18629 + interrupts = <8 1 9 1>;
18630 + interrupt-parent = < &UIC1 >;
18636 + linux,stdout-path = "/plb/opb/serial@ef600300";
18639 --- a/arch/powerpc/boot/ebony.c
18640 +++ b/arch/powerpc/boot/ebony.c
18643 static u8 *ebony_mac0, *ebony_mac1;
18645 -/* Calculate 440GP clocks */
18646 -void ibm440gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
18648 - u32 sys0 = mfdcr(DCRN_CPC0_SYS0);
18649 - u32 cr0 = mfdcr(DCRN_CPC0_CR0);
18650 - u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
18651 - u32 opdv = CPC0_SYS0_OPDV(sys0);
18652 - u32 epdv = CPC0_SYS0_EPDV(sys0);
18654 - if (sys0 & CPC0_SYS0_BYPASS) {
18655 - /* Bypass system PLL */
18656 - cpu = plb = sysclk;
18658 - if (sys0 & CPC0_SYS0_EXTSL)
18660 - m = CPC0_SYS0_FWDVB(sys0) * opdv * epdv;
18663 - m = CPC0_SYS0_FBDV(sys0) * CPC0_SYS0_FWDVA(sys0);
18664 - cpu = sysclk * m / CPC0_SYS0_FWDVA(sys0);
18665 - plb = sysclk * m / CPC0_SYS0_FWDVB(sys0);
18668 - opb = plb / opdv;
18669 - ebc = opb / epdv;
18671 - /* FIXME: Check if this is for all 440GP, or just Ebony */
18672 - if ((mfpvr() & 0xf0000fff) == 0x40000440)
18673 - /* Rev. B 440GP, use external system clock */
18676 - /* Rev. C 440GP, errata force us to use internal clock */
18679 - if (cr0 & CPC0_CR0_U0EC)
18680 - /* External UART clock */
18683 - /* Internal UART clock */
18684 - uart0 = plb / CPC0_CR0_UDIV(cr0);
18686 - if (cr0 & CPC0_CR0_U1EC)
18687 - /* External UART clock */
18690 - /* Internal UART clock */
18691 - uart1 = plb / CPC0_CR0_UDIV(cr0);
18693 - printf("PPC440GP: SysClk = %dMHz (%x)\n\r",
18694 - (sysclk + 500000) / 1000000, sysclk);
18696 - dt_fixup_cpu_clocks(cpu, tb, 0);
18698 - dt_fixup_clock("/plb", plb);
18699 - dt_fixup_clock("/plb/opb", opb);
18700 - dt_fixup_clock("/plb/opb/ebc", ebc);
18701 - dt_fixup_clock("/plb/opb/serial@40000200", uart0);
18702 - dt_fixup_clock("/plb/opb/serial@40000300", uart1);
18705 #define EBONY_FPGA_PATH "/plb/opb/ebc/fpga"
18706 #define EBONY_FPGA_FLASH_SEL 0x01
18707 #define EBONY_SMALL_FLASH_PATH "/plb/opb/ebc/small-flash"
18709 unsigned long sysclk = 33000000;
18711 ibm440gp_fixup_clocks(sysclk, 6 * 1843200);
18712 - ibm4xx_fixup_memsize();
18713 + ibm4xx_sdram_fixup_memsize();
18714 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1);
18715 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
18716 ebony_flashsel_fixup();
18718 platform_ops.exit = ibm44x_dbcr_reset;
18721 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
18722 + fdt_init(_dtb_start);
18723 serial_console_init();
18726 +++ b/arch/powerpc/boot/ep405.c
18729 + * Embedded Planet EP405 with PlanetCore firmware
18731 + * (c) Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp,\
18733 + * Based on ep88xc.c by
18735 + * Scott Wood <scottwood@freescale.com>
18737 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
18739 + * This program is free software; you can redistribute it and/or modify it
18740 + * under the terms of the GNU General Public License version 2 as published
18741 + * by the Free Software Foundation.
18745 +#include "stdio.h"
18746 +#include "planetcore.h"
18751 +static char *table;
18752 +static u64 mem_size;
18754 +static void platform_fixups(void)
18759 + dt_fixup_memory(0, mem_size);
18760 + planetcore_set_mac_addrs(table);
18762 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) {
18763 + printf("No PlanetCore crystal frequency key.\r\n");
18766 + ibm405gp_fixup_clocks(val, 0xa8c000);
18767 + ibm4xx_quiesce_eth((u32 *)0xef600800, NULL);
18768 + ibm4xx_fixup_ebc_ranges("/plb/ebc");
18770 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_KB_NVRAM, &val)) {
18771 + printf("No PlanetCore NVRAM size key.\r\n");
18774 + nvrtc = finddevice("/plb/ebc/nvrtc@4,200000");
18775 + if (nvrtc != NULL) {
18776 + u32 reg[3] = { 4, 0x200000, 0};
18777 + getprop(nvrtc, "reg", reg, 3);
18778 + reg[2] = (val << 10) & 0xffffffff;
18779 + setprop(nvrtc, "reg", reg, 3);
18783 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
18784 + unsigned long r6, unsigned long r7)
18786 + table = (char *)r3;
18787 + planetcore_prepare_table(table);
18789 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size))
18792 + mem_size *= 1024 * 1024;
18793 + simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
18795 + fdt_init(_dtb_start);
18797 + planetcore_set_stdout_path(table);
18799 + serial_console_init();
18800 + platform_ops.fixups = platform_fixups;
18803 +++ b/arch/powerpc/boot/ep8248e.c
18806 + * Embedded Planet EP8248E with PlanetCore firmware
18808 + * Author: Scott Wood <scottwood@freescale.com>
18810 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
18812 + * This program is free software; you can redistribute it and/or modify it
18813 + * under the terms of the GNU General Public License version 2 as published
18814 + * by the Free Software Foundation.
18818 +#include "stdio.h"
18819 +#include "planetcore.h"
18822 +static char *table;
18823 +static u64 mem_size;
18827 +static void platform_fixups(void)
18831 + dt_fixup_memory(0, mem_size);
18832 + planetcore_set_mac_addrs(table);
18834 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) {
18835 + printf("No PlanetCore crystal frequency key.\r\n");
18839 + pq2_fixup_clocks(val);
18842 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
18843 + unsigned long r6, unsigned long r7)
18845 + table = (char *)r3;
18846 + planetcore_prepare_table(table);
18848 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size))
18851 + mem_size *= 1024 * 1024;
18852 + simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
18854 + fdt_init(_dtb_start);
18856 + planetcore_set_stdout_path(table);
18857 + serial_console_init();
18858 + platform_ops.fixups = platform_fixups;
18860 --- a/arch/powerpc/boot/ep88xc.c
18861 +++ b/arch/powerpc/boot/ep88xc.c
18863 mem_size *= 1024 * 1024;
18864 simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
18866 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
18867 + fdt_init(_dtb_start);
18869 planetcore_set_stdout_path(table);
18871 --- a/arch/powerpc/boot/flatdevtree.c
18875 - * This program is free software; you can redistribute it and/or modify
18876 - * it under the terms of the GNU General Public License as published by
18877 - * the Free Software Foundation; either version 2 of the License, or
18878 - * (at your option) any later version.
18880 - * This program is distributed in the hope that it will be useful,
18881 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
18882 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18883 - * GNU General Public License for more details.
18885 - * You should have received a copy of the GNU General Public License
18886 - * along with this program; if not, write to the Free Software
18887 - * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18889 - * Copyright Pantelis Antoniou 2006
18890 - * Copyright (C) IBM Corporation 2006
18892 - * Authors: Pantelis Antoniou <pantelis@embeddedalley.com>
18893 - * Hollis Blanchard <hollisb@us.ibm.com>
18894 - * Mark A. Greer <mgreer@mvista.com>
18895 - * Paul Mackerras <paulus@samba.org>
18898 -#include <string.h>
18899 -#include <stddef.h>
18900 -#include "flatdevtree.h"
18901 -#include "flatdevtree_env.h"
18903 -#define _ALIGN(x, al) (((x) + (al) - 1) & ~((al) - 1))
18905 -static char *ft_root_node(struct ft_cxt *cxt)
18907 - return cxt->rgn[FT_STRUCT].start;
18910 -/* Routines for keeping node ptrs returned by ft_find_device current */
18911 -/* First entry not used b/c it would return 0 and be taken as NULL/error */
18912 -static void *ft_get_phandle(struct ft_cxt *cxt, char *node)
18919 - for (i = 1; i < cxt->nodes_used; i++) /* already there? */
18920 - if (cxt->node_tbl[i] == node)
18921 - return (void *)i;
18923 - if (cxt->nodes_used < cxt->node_max) {
18924 - cxt->node_tbl[cxt->nodes_used] = node;
18925 - return (void *)cxt->nodes_used++;
18931 -static char *ft_node_ph2node(struct ft_cxt *cxt, const void *phandle)
18933 - unsigned int i = (unsigned int)phandle;
18935 - if (i < cxt->nodes_used)
18936 - return cxt->node_tbl[i];
18940 -static void ft_node_update_before(struct ft_cxt *cxt, char *addr, int shift)
18947 - for (i = 1; i < cxt->nodes_used; i++)
18948 - if (cxt->node_tbl[i] < addr)
18949 - cxt->node_tbl[i] += shift;
18952 -static void ft_node_update_after(struct ft_cxt *cxt, char *addr, int shift)
18959 - for (i = 1; i < cxt->nodes_used; i++)
18960 - if (cxt->node_tbl[i] >= addr)
18961 - cxt->node_tbl[i] += shift;
18964 -/* Struct used to return info from ft_next() */
18967 - const char *name;
18972 -/* Set ptrs to current one's info; return addr of next one */
18973 -static char *ft_next(struct ft_cxt *cxt, char *p, struct ft_atom *ret)
18977 - if (p >= cxt->rgn[FT_STRUCT].start + cxt->rgn[FT_STRUCT].size)
18980 - ret->tag = be32_to_cpu(*(u32 *) p);
18983 - switch (ret->tag) { /* Tag */
18984 - case OF_DT_BEGIN_NODE:
18986 - ret->data = (void *)(p - 4); /* start of node */
18987 - p += _ALIGN(strlen(p) + 1, 4);
18990 - ret->size = sz = be32_to_cpu(*(u32 *) p);
18991 - ret->name = cxt->str_anchor + be32_to_cpu(*(u32 *) (p + 4));
18992 - ret->data = (void *)(p + 8);
18993 - p += 8 + _ALIGN(sz, 4);
18995 - case OF_DT_END_NODE:
19007 -#define HDR_SIZE _ALIGN(sizeof(struct boot_param_header), 8)
19008 -#define EXPAND_INCR 1024 /* alloc this much extra when expanding */
19010 -/* Copy the tree to a newly-allocated region and put things in order */
19011 -static int ft_reorder(struct ft_cxt *cxt, int nextra)
19013 - unsigned long tot;
19014 - enum ft_rgn_id r;
19018 - tot = HDR_SIZE + EXPAND_INCR;
19019 - for (r = FT_RSVMAP; r <= FT_STRINGS; ++r)
19020 - tot += cxt->rgn[r].size;
19023 - tot = _ALIGN(tot, 8);
19025 - if (!cxt->realloc)
19027 - p = cxt->realloc(NULL, tot);
19031 - memcpy(p, cxt->bph, sizeof(struct boot_param_header));
19032 - /* offsets get fixed up later */
19034 - cxt->bph = (struct boot_param_header *)p;
19035 - cxt->max_size = tot;
19039 - memcpy(p, cxt->rgn[FT_RSVMAP].start, cxt->rgn[FT_RSVMAP].size);
19040 - cxt->rgn[FT_RSVMAP].start = p;
19041 - p += cxt->rgn[FT_RSVMAP].size;
19043 - memcpy(p, cxt->rgn[FT_STRUCT].start, cxt->rgn[FT_STRUCT].size);
19044 - ft_node_update_after(cxt, cxt->rgn[FT_STRUCT].start,
19045 - p - cxt->rgn[FT_STRUCT].start);
19046 - cxt->p += p - cxt->rgn[FT_STRUCT].start;
19047 - cxt->rgn[FT_STRUCT].start = p;
19049 - p = pend - cxt->rgn[FT_STRINGS].size;
19050 - memcpy(p, cxt->rgn[FT_STRINGS].start, cxt->rgn[FT_STRINGS].size);
19051 - stroff = cxt->str_anchor - cxt->rgn[FT_STRINGS].start;
19052 - cxt->rgn[FT_STRINGS].start = p;
19053 - cxt->str_anchor = p + stroff;
19055 - cxt->isordered = 1;
19059 -static inline char *prev_end(struct ft_cxt *cxt, enum ft_rgn_id r)
19061 - if (r > FT_RSVMAP)
19062 - return cxt->rgn[r - 1].start + cxt->rgn[r - 1].size;
19063 - return (char *)cxt->bph + HDR_SIZE;
19066 -static inline char *next_start(struct ft_cxt *cxt, enum ft_rgn_id r)
19068 - if (r < FT_STRINGS)
19069 - return cxt->rgn[r + 1].start;
19070 - return (char *)cxt->bph + cxt->max_size;
19074 - * See if we can expand region rgn by nextra bytes by using up
19075 - * free space after or before the region.
19077 -static int ft_shuffle(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn,
19081 - char *rgn_start, *rgn_end;
19083 - rgn_start = cxt->rgn[rgn].start;
19084 - rgn_end = rgn_start + cxt->rgn[rgn].size;
19085 - if (nextra <= 0 || rgn_end + nextra <= next_start(cxt, rgn)) {
19086 - /* move following stuff */
19087 - if (p < rgn_end) {
19089 - memmove(p, p - nextra, rgn_end - p + nextra);
19091 - memmove(p + nextra, p, rgn_end - p);
19092 - if (rgn == FT_STRUCT)
19093 - ft_node_update_after(cxt, p, nextra);
19095 - cxt->rgn[rgn].size += nextra;
19096 - if (rgn == FT_STRINGS)
19097 - /* assumes strings only added at beginning */
19098 - cxt->str_anchor += nextra;
19101 - if (prev_end(cxt, rgn) <= rgn_start - nextra) {
19102 - /* move preceding stuff */
19103 - if (p > rgn_start) {
19104 - memmove(rgn_start - nextra, rgn_start, p - rgn_start);
19105 - if (rgn == FT_STRUCT)
19106 - ft_node_update_before(cxt, p, -nextra);
19109 - cxt->rgn[rgn].start -= nextra;
19110 - cxt->rgn[rgn].size += nextra;
19116 -static int ft_make_space(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn,
19119 - unsigned long size, ssize, tot;
19120 - char *str, *next;
19121 - enum ft_rgn_id r;
19123 - if (!cxt->isordered) {
19124 - unsigned long rgn_off = *pp - cxt->rgn[rgn].start;
19126 - if (!ft_reorder(cxt, nextra))
19129 - *pp = cxt->rgn[rgn].start + rgn_off;
19131 - if (ft_shuffle(cxt, pp, rgn, nextra))
19134 - /* See if there is space after the strings section */
19135 - ssize = cxt->rgn[FT_STRINGS].size;
19136 - if (cxt->rgn[FT_STRINGS].start + ssize
19137 - < (char *)cxt->bph + cxt->max_size) {
19138 - /* move strings up as far as possible */
19139 - str = (char *)cxt->bph + cxt->max_size - ssize;
19140 - cxt->str_anchor += str - cxt->rgn[FT_STRINGS].start;
19141 - memmove(str, cxt->rgn[FT_STRINGS].start, ssize);
19142 - cxt->rgn[FT_STRINGS].start = str;
19143 - /* enough space now? */
19144 - if (rgn >= FT_STRUCT && ft_shuffle(cxt, pp, rgn, nextra))
19148 - /* how much total free space is there following this region? */
19150 - for (r = rgn; r < FT_STRINGS; ++r) {
19151 - char *r_end = cxt->rgn[r].start + cxt->rgn[r].size;
19152 - tot += next_start(cxt, rgn) - r_end;
19155 - /* cast is to shut gcc up; we know nextra >= 0 */
19156 - if (tot < (unsigned int)nextra) {
19157 - /* have to reallocate */
19158 - char *newp, *new_start;
19161 - if (!cxt->realloc)
19163 - size = _ALIGN(cxt->max_size + (nextra - tot) + EXPAND_INCR, 8);
19164 - newp = cxt->realloc(cxt->bph, size);
19167 - cxt->max_size = size;
19168 - shift = newp - (char *)cxt->bph;
19170 - if (shift) { /* realloc can return same addr */
19171 - cxt->bph = (struct boot_param_header *)newp;
19172 - ft_node_update_after(cxt, cxt->rgn[FT_STRUCT].start,
19174 - for (r = FT_RSVMAP; r <= FT_STRINGS; ++r) {
19175 - new_start = cxt->rgn[r].start + shift;
19176 - cxt->rgn[r].start = new_start;
19179 - cxt->str_anchor += shift;
19182 - /* move strings up to the end */
19183 - str = newp + size - ssize;
19184 - cxt->str_anchor += str - cxt->rgn[FT_STRINGS].start;
19185 - memmove(str, cxt->rgn[FT_STRINGS].start, ssize);
19186 - cxt->rgn[FT_STRINGS].start = str;
19188 - if (ft_shuffle(cxt, pp, rgn, nextra))
19192 - /* must be FT_RSVMAP and we need to move FT_STRUCT up */
19193 - if (rgn == FT_RSVMAP) {
19194 - next = cxt->rgn[FT_RSVMAP].start + cxt->rgn[FT_RSVMAP].size
19196 - ssize = cxt->rgn[FT_STRUCT].size;
19197 - if (next + ssize >= cxt->rgn[FT_STRINGS].start)
19198 - return 0; /* "can't happen" */
19199 - memmove(next, cxt->rgn[FT_STRUCT].start, ssize);
19200 - ft_node_update_after(cxt, cxt->rgn[FT_STRUCT].start, nextra);
19201 - cxt->rgn[FT_STRUCT].start = next;
19203 - if (ft_shuffle(cxt, pp, rgn, nextra))
19207 - return 0; /* "can't happen" */
19210 -static void ft_put_word(struct ft_cxt *cxt, u32 v)
19212 - *(u32 *) cxt->p = cpu_to_be32(v);
19216 -static void ft_put_bin(struct ft_cxt *cxt, const void *data, unsigned int sz)
19218 - unsigned long sza = _ALIGN(sz, 4);
19220 - /* zero out the alignment gap if necessary */
19222 - *(u32 *) (cxt->p + sza - 4) = 0;
19224 - /* copy in the data */
19225 - memcpy(cxt->p, data, sz);
19230 -char *ft_begin_node(struct ft_cxt *cxt, const char *name)
19232 - unsigned long nlen = strlen(name) + 1;
19233 - unsigned long len = 8 + _ALIGN(nlen, 4);
19236 - if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, len))
19241 - ft_put_word(cxt, OF_DT_BEGIN_NODE);
19242 - ft_put_bin(cxt, name, strlen(name) + 1);
19247 -void ft_end_node(struct ft_cxt *cxt)
19249 - ft_put_word(cxt, OF_DT_END_NODE);
19252 -void ft_nop(struct ft_cxt *cxt)
19254 - if (ft_make_space(cxt, &cxt->p, FT_STRUCT, 4))
19255 - ft_put_word(cxt, OF_DT_NOP);
19258 -#define NO_STRING 0x7fffffff
19260 -static int lookup_string(struct ft_cxt *cxt, const char *name)
19264 - p = cxt->rgn[FT_STRINGS].start;
19265 - end = p + cxt->rgn[FT_STRINGS].size;
19266 - while (p < end) {
19267 - if (strcmp(p, (char *)name) == 0)
19268 - return p - cxt->str_anchor;
19269 - p += strlen(p) + 1;
19272 - return NO_STRING;
19275 -/* lookup string and insert if not found */
19276 -static int map_string(struct ft_cxt *cxt, const char *name)
19281 - off = lookup_string(cxt, name);
19282 - if (off != NO_STRING)
19284 - p = cxt->rgn[FT_STRINGS].start;
19285 - if (!ft_make_space(cxt, &p, FT_STRINGS, strlen(name) + 1))
19286 - return NO_STRING;
19288 - return p - cxt->str_anchor;
19291 -int ft_prop(struct ft_cxt *cxt, const char *name, const void *data,
19296 - off = map_string(cxt, name);
19297 - if (off == NO_STRING)
19300 - len = 12 + _ALIGN(sz, 4);
19301 - if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, len))
19304 - ft_put_word(cxt, OF_DT_PROP);
19305 - ft_put_word(cxt, sz);
19306 - ft_put_word(cxt, off);
19307 - ft_put_bin(cxt, data, sz);
19311 -int ft_prop_str(struct ft_cxt *cxt, const char *name, const char *str)
19313 - return ft_prop(cxt, name, str, strlen(str) + 1);
19316 -int ft_prop_int(struct ft_cxt *cxt, const char *name, unsigned int val)
19318 - u32 v = cpu_to_be32((u32) val);
19320 - return ft_prop(cxt, name, &v, 4);
19323 -/* Calculate the size of the reserved map */
19324 -static unsigned long rsvmap_size(struct ft_cxt *cxt)
19326 - struct ft_reserve *res;
19328 - res = (struct ft_reserve *)cxt->rgn[FT_RSVMAP].start;
19329 - while (res->start || res->len)
19331 - return (char *)(res + 1) - cxt->rgn[FT_RSVMAP].start;
19334 -/* Calculate the size of the struct region by stepping through it */
19335 -static unsigned long struct_size(struct ft_cxt *cxt)
19337 - char *p = cxt->rgn[FT_STRUCT].start;
19339 - struct ft_atom atom;
19341 - /* make check in ft_next happy */
19342 - if (cxt->rgn[FT_STRUCT].size == 0)
19343 - cxt->rgn[FT_STRUCT].size = 0xfffffffful - (unsigned long)p;
19345 - while ((next = ft_next(cxt, p, &atom)) != NULL)
19347 - return p + 4 - cxt->rgn[FT_STRUCT].start;
19350 -/* add `adj' on to all string offset values in the struct area */
19351 -static void adjust_string_offsets(struct ft_cxt *cxt, int adj)
19353 - char *p = cxt->rgn[FT_STRUCT].start;
19355 - struct ft_atom atom;
19358 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19359 - if (atom.tag == OF_DT_PROP) {
19360 - off = be32_to_cpu(*(u32 *) (p + 8));
19361 - *(u32 *) (p + 8) = cpu_to_be32(off + adj);
19367 -/* start construction of the flat OF tree from scratch */
19368 -void ft_begin(struct ft_cxt *cxt, void *blob, unsigned int max_size,
19369 - void *(*realloc_fn) (void *, unsigned long))
19371 - struct boot_param_header *bph = blob;
19373 - struct ft_reserve *pres;
19375 - /* clear the cxt */
19376 - memset(cxt, 0, sizeof(*cxt));
19379 - cxt->max_size = max_size;
19380 - cxt->realloc = realloc_fn;
19381 - cxt->isordered = 1;
19383 - /* zero everything in the header area */
19384 - memset(bph, 0, sizeof(*bph));
19386 - bph->magic = cpu_to_be32(OF_DT_HEADER);
19387 - bph->version = cpu_to_be32(0x10);
19388 - bph->last_comp_version = cpu_to_be32(0x10);
19390 - /* start pointers */
19391 - cxt->rgn[FT_RSVMAP].start = p = blob + HDR_SIZE;
19392 - cxt->rgn[FT_RSVMAP].size = sizeof(struct ft_reserve);
19393 - pres = (struct ft_reserve *)p;
19394 - cxt->rgn[FT_STRUCT].start = p += sizeof(struct ft_reserve);
19395 - cxt->rgn[FT_STRUCT].size = 4;
19396 - cxt->rgn[FT_STRINGS].start = blob + max_size;
19397 - cxt->rgn[FT_STRINGS].size = 0;
19399 - /* init rsvmap and struct */
19402 - *(u32 *) p = cpu_to_be32(OF_DT_END);
19404 - cxt->str_anchor = blob;
19407 -/* open up an existing blob to be examined or modified */
19408 -int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size,
19409 - unsigned int max_find_device,
19410 - void *(*realloc_fn) (void *, unsigned long))
19412 - struct boot_param_header *bph = blob;
19414 - /* can't cope with version < 16 */
19415 - if (be32_to_cpu(bph->version) < 16)
19418 - /* clear the cxt */
19419 - memset(cxt, 0, sizeof(*cxt));
19421 - /* alloc node_tbl to track node ptrs returned by ft_find_device */
19422 - ++max_find_device;
19423 - cxt->node_tbl = realloc_fn(NULL, max_find_device * sizeof(char *));
19424 - if (!cxt->node_tbl)
19426 - memset(cxt->node_tbl, 0, max_find_device * sizeof(char *));
19427 - cxt->node_max = max_find_device;
19428 - cxt->nodes_used = 1; /* don't use idx 0 b/c looks like NULL */
19431 - cxt->max_size = max_size;
19432 - cxt->realloc = realloc_fn;
19434 - cxt->rgn[FT_RSVMAP].start = blob + be32_to_cpu(bph->off_mem_rsvmap);
19435 - cxt->rgn[FT_RSVMAP].size = rsvmap_size(cxt);
19436 - cxt->rgn[FT_STRUCT].start = blob + be32_to_cpu(bph->off_dt_struct);
19437 - cxt->rgn[FT_STRUCT].size = struct_size(cxt);
19438 - cxt->rgn[FT_STRINGS].start = blob + be32_to_cpu(bph->off_dt_strings);
19439 - cxt->rgn[FT_STRINGS].size = be32_to_cpu(bph->dt_strings_size);
19441 - cxt->p = cxt->rgn[FT_STRUCT].start;
19442 - cxt->str_anchor = cxt->rgn[FT_STRINGS].start;
19447 -/* add a reserver physical area to the rsvmap */
19448 -int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size)
19451 - struct ft_reserve *pres;
19453 - p = cxt->rgn[FT_RSVMAP].start + cxt->rgn[FT_RSVMAP].size
19454 - - sizeof(struct ft_reserve);
19455 - if (!ft_make_space(cxt, &p, FT_RSVMAP, sizeof(struct ft_reserve)))
19458 - pres = (struct ft_reserve *)p;
19459 - pres->start = cpu_to_be64(physaddr);
19460 - pres->len = cpu_to_be64(size);
19465 -void ft_begin_tree(struct ft_cxt *cxt)
19467 - cxt->p = ft_root_node(cxt);
19470 -void ft_end_tree(struct ft_cxt *cxt)
19472 - struct boot_param_header *bph = cxt->bph;
19473 - char *p, *oldstr, *str, *endp;
19474 - unsigned long ssize;
19477 - if (!cxt->isordered)
19478 - return; /* we haven't touched anything */
19480 - /* adjust string offsets */
19481 - oldstr = cxt->rgn[FT_STRINGS].start;
19482 - adj = cxt->str_anchor - oldstr;
19484 - adjust_string_offsets(cxt, adj);
19486 - /* make strings end on 8-byte boundary */
19487 - ssize = cxt->rgn[FT_STRINGS].size;
19488 - endp = (char *)_ALIGN((unsigned long)cxt->rgn[FT_STRUCT].start
19489 - + cxt->rgn[FT_STRUCT].size + ssize, 8);
19490 - str = endp - ssize;
19492 - /* move strings down to end of structs */
19493 - memmove(str, oldstr, ssize);
19494 - cxt->str_anchor = str;
19495 - cxt->rgn[FT_STRINGS].start = str;
19497 - /* fill in header fields */
19499 - bph->totalsize = cpu_to_be32(endp - p);
19500 - bph->off_mem_rsvmap = cpu_to_be32(cxt->rgn[FT_RSVMAP].start - p);
19501 - bph->off_dt_struct = cpu_to_be32(cxt->rgn[FT_STRUCT].start - p);
19502 - bph->off_dt_strings = cpu_to_be32(cxt->rgn[FT_STRINGS].start - p);
19503 - bph->dt_strings_size = cpu_to_be32(ssize);
19506 -void *ft_find_device(struct ft_cxt *cxt, const void *top, const char *srch_path)
19511 - node = ft_node_ph2node(cxt, top);
19512 - if (node == NULL)
19515 - node = ft_root_node(cxt);
19518 - node = ft_find_descendent(cxt, node, srch_path);
19519 - return ft_get_phandle(cxt, node);
19522 -void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path)
19524 - struct ft_atom atom;
19526 - const char *cp, *q;
19530 - const char *path_comp[FT_MAX_DEPTH];
19536 - while ((p = ft_next(cxt, p, &atom)) != NULL) {
19537 - switch (atom.tag) {
19538 - case OF_DT_BEGIN_NODE:
19540 - if (depth != dmatch)
19542 - cxt->genealogy[depth] = atom.data;
19543 - cxt->genealogy[depth + 1] = NULL;
19544 - if (depth && !(strncmp(atom.name, cp, cl) == 0
19545 - && (atom.name[cl] == '/'
19546 - || atom.name[cl] == '\0'
19547 - || atom.name[cl] == '@')))
19549 - path_comp[dmatch] = cp;
19550 - /* it matches so far, advance to next path component */
19552 - /* skip slashes */
19553 - while (*cp == '/')
19555 - /* we're done if this is the end of the string */
19557 - return atom.data;
19558 - /* look for end of this component */
19559 - q = strchr(cp, '/');
19566 - case OF_DT_END_NODE:
19569 - if (dmatch > depth) {
19571 - cl = cp - path_comp[dmatch] - 1;
19572 - cp = path_comp[dmatch];
19573 - while (cl > 0 && cp[cl - 1] == '/')
19583 -void *__ft_get_parent(struct ft_cxt *cxt, void *node)
19586 - struct ft_atom atom;
19589 - for (d = 0; cxt->genealogy[d] != NULL; ++d)
19590 - if (cxt->genealogy[d] == node)
19591 - return d > 0 ? cxt->genealogy[d - 1] : NULL;
19593 - /* have to do it the hard way... */
19594 - p = ft_root_node(cxt);
19596 - while ((p = ft_next(cxt, p, &atom)) != NULL) {
19597 - switch (atom.tag) {
19598 - case OF_DT_BEGIN_NODE:
19599 - cxt->genealogy[d] = atom.data;
19600 - if (node == atom.data) {
19602 - cxt->genealogy[d + 1] = NULL;
19603 - return d > 0 ? cxt->genealogy[d - 1] : NULL;
19607 - case OF_DT_END_NODE:
19615 -void *ft_get_parent(struct ft_cxt *cxt, const void *phandle)
19617 - void *node = ft_node_ph2node(cxt, phandle);
19618 - if (node == NULL)
19621 - node = __ft_get_parent(cxt, node);
19622 - return ft_get_phandle(cxt, node);
19625 -static const void *__ft_get_prop(struct ft_cxt *cxt, void *node,
19626 - const char *propname, unsigned int *len)
19628 - struct ft_atom atom;
19631 - while ((node = ft_next(cxt, node, &atom)) != NULL) {
19632 - switch (atom.tag) {
19633 - case OF_DT_BEGIN_NODE:
19638 - if (depth != 1 || strcmp(atom.name, propname))
19642 - *len = atom.size;
19644 - return atom.data;
19646 - case OF_DT_END_NODE:
19647 - if (--depth <= 0)
19655 -int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
19656 - void *buf, const unsigned int buflen)
19658 - const void *data;
19659 - unsigned int size;
19661 - void *node = ft_node_ph2node(cxt, phandle);
19665 - data = __ft_get_prop(cxt, node, propname, &size);
19667 - unsigned int clipped_size = min(size, buflen);
19668 - memcpy(buf, data, clipped_size);
19675 -void *__ft_find_node_by_prop_value(struct ft_cxt *cxt, void *prev,
19676 - const char *propname, const char *propval,
19677 - unsigned int proplen)
19679 - struct ft_atom atom;
19680 - char *p = ft_root_node(cxt);
19682 - int past_prev = prev ? 0 : 1;
19685 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19686 - const void *data;
19687 - unsigned int size;
19689 - switch (atom.tag) {
19690 - case OF_DT_BEGIN_NODE:
19698 - if (!past_prev || depth < 1)
19701 - data = __ft_get_prop(cxt, p, propname, &size);
19702 - if (!data || size != proplen)
19704 - if (memcmp(data, propval, size))
19709 - case OF_DT_END_NODE:
19710 - if (depth-- == 0)
19722 -void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev,
19723 - const char *propname, const char *propval,
19726 - void *node = NULL;
19729 - node = ft_node_ph2node(cxt, prev);
19735 - node = __ft_find_node_by_prop_value(cxt, node, propname,
19736 - propval, proplen);
19737 - return ft_get_phandle(cxt, node);
19740 -int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
19741 - const void *buf, const unsigned int buflen)
19743 - struct ft_atom atom;
19748 - node = ft_node_ph2node(cxt, phandle);
19749 - if (node == NULL)
19752 - next = ft_next(cxt, node, &atom);
19753 - if (atom.tag != OF_DT_BEGIN_NODE)
19754 - /* phandle didn't point to a node */
19758 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19759 - switch (atom.tag) {
19760 - case OF_DT_BEGIN_NODE: /* properties must go before subnodes */
19761 - case OF_DT_END_NODE:
19762 - /* haven't found the property, insert here */
19764 - return ft_prop(cxt, propname, buf, buflen);
19766 - if (strcmp(atom.name, propname))
19768 - /* found an existing property, overwrite it */
19769 - nextra = _ALIGN(buflen, 4) - _ALIGN(atom.size, 4);
19770 - cxt->p = atom.data;
19771 - if (nextra && !ft_make_space(cxt, &cxt->p, FT_STRUCT,
19774 - *(u32 *) (cxt->p - 8) = cpu_to_be32(buflen);
19775 - ft_put_bin(cxt, buf, buflen);
19783 -int ft_del_prop(struct ft_cxt *cxt, const void *phandle, const char *propname)
19785 - struct ft_atom atom;
19790 - node = ft_node_ph2node(cxt, phandle);
19791 - if (node == NULL)
19795 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19796 - switch (atom.tag) {
19797 - case OF_DT_BEGIN_NODE:
19798 - case OF_DT_END_NODE:
19801 - if (strcmp(atom.name, propname))
19803 - /* found the property, remove it */
19804 - size = 12 + -_ALIGN(atom.size, 4);
19806 - if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, -size))
19815 -void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name)
19817 - struct ft_atom atom;
19818 - char *p, *next, *ret;
19822 - p = ft_node_ph2node(cxt, parent);
19826 - p = ft_root_node(cxt);
19829 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19830 - switch (atom.tag) {
19831 - case OF_DT_BEGIN_NODE:
19833 - if (depth == 1 && strcmp(atom.name, name) == 0)
19834 - /* duplicate node name, return error */
19837 - case OF_DT_END_NODE:
19841 - /* end of node, insert here */
19843 - ret = ft_begin_node(cxt, name);
19844 - ft_end_node(cxt);
19845 - return ft_get_phandle(cxt, ret);
19852 -/* Returns the start of the path within the provided buffer, or NULL on
19855 -char *ft_get_path(struct ft_cxt *cxt, const void *phandle,
19856 - char *buf, int len)
19858 - const char *path_comp[FT_MAX_DEPTH];
19859 - struct ft_atom atom;
19860 - char *p, *next, *pos;
19861 - int depth = 0, i;
19864 - node = ft_node_ph2node(cxt, phandle);
19865 - if (node == NULL)
19868 - p = ft_root_node(cxt);
19870 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19871 - switch (atom.tag) {
19872 - case OF_DT_BEGIN_NODE:
19873 - path_comp[depth++] = atom.name;
19879 - case OF_DT_END_NODE:
19880 - if (--depth == 0)
19889 - for (i = 1; i < depth; i++) {
19898 - strncpy(pos, path_comp[i], len);
19900 - if (pos[len - 1] != 0)
19903 - this_len = strlen(pos);
19910 --- a/arch/powerpc/boot/flatdevtree.h
19914 - * This program is free software; you can redistribute it and/or modify
19915 - * it under the terms of the GNU General Public License as published by
19916 - * the Free Software Foundation; either version 2 of the License, or
19917 - * (at your option) any later version.
19919 - * This program is distributed in the hope that it will be useful,
19920 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19921 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19922 - * GNU General Public License for more details.
19924 - * You should have received a copy of the GNU General Public License
19925 - * along with this program; if not, write to the Free Software
19926 - * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19929 -#ifndef FLATDEVTREE_H
19930 -#define FLATDEVTREE_H
19932 -#include "flatdevtree_env.h"
19934 -/* Definitions used by the flattened device tree */
19935 -#define OF_DT_HEADER 0xd00dfeed /* marker */
19936 -#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
19937 -#define OF_DT_END_NODE 0x2 /* End node */
19938 -#define OF_DT_PROP 0x3 /* Property: name off, size, content */
19939 -#define OF_DT_NOP 0x4 /* nop */
19940 -#define OF_DT_END 0x9
19942 -#define OF_DT_VERSION 0x10
19944 -struct boot_param_header {
19945 - u32 magic; /* magic word OF_DT_HEADER */
19946 - u32 totalsize; /* total size of DT block */
19947 - u32 off_dt_struct; /* offset to structure */
19948 - u32 off_dt_strings; /* offset to strings */
19949 - u32 off_mem_rsvmap; /* offset to memory reserve map */
19950 - u32 version; /* format version */
19951 - u32 last_comp_version; /* last compatible version */
19952 - /* version 2 fields below */
19953 - u32 boot_cpuid_phys; /* Physical CPU id we're booting on */
19954 - /* version 3 fields below */
19955 - u32 dt_strings_size; /* size of the DT strings block */
19958 -struct ft_reserve {
19963 -struct ft_region {
19965 - unsigned long size;
19975 -#define FT_MAX_DEPTH 50
19978 - struct boot_param_header *bph;
19979 - int max_size; /* maximum size of tree */
19980 - int isordered; /* everything in standard order */
19981 - void *(*realloc)(void *, unsigned long);
19982 - char *str_anchor;
19983 - char *p; /* current insertion point in structs */
19984 - struct ft_region rgn[FT_N_REGION];
19985 - void *genealogy[FT_MAX_DEPTH+1];
19987 - unsigned int node_max;
19988 - unsigned int nodes_used;
19991 -char *ft_begin_node(struct ft_cxt *cxt, const char *name);
19992 -void ft_end_node(struct ft_cxt *cxt);
19994 -void ft_begin_tree(struct ft_cxt *cxt);
19995 -void ft_end_tree(struct ft_cxt *cxt);
19997 -void ft_nop(struct ft_cxt *cxt);
19998 -int ft_prop(struct ft_cxt *cxt, const char *name,
19999 - const void *data, unsigned int sz);
20000 -int ft_prop_str(struct ft_cxt *cxt, const char *name, const char *str);
20001 -int ft_prop_int(struct ft_cxt *cxt, const char *name, unsigned int val);
20002 -void ft_begin(struct ft_cxt *cxt, void *blob, unsigned int max_size,
20003 - void *(*realloc_fn)(void *, unsigned long));
20004 -int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size,
20005 - unsigned int max_find_device,
20006 - void *(*realloc_fn)(void *, unsigned long));
20007 -int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size);
20009 -void ft_dump_blob(const void *bphp);
20010 -void ft_merge_blob(struct ft_cxt *cxt, void *blob);
20011 -void *ft_find_device(struct ft_cxt *cxt, const void *top,
20012 - const char *srch_path);
20013 -void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path);
20014 -int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
20015 - void *buf, const unsigned int buflen);
20016 -int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
20017 - const void *buf, const unsigned int buflen);
20018 -void *ft_get_parent(struct ft_cxt *cxt, const void *phandle);
20019 -void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev,
20020 - const char *propname, const char *propval,
20022 -void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name);
20023 -char *ft_get_path(struct ft_cxt *cxt, const void *phandle, char *buf, int len);
20025 -#endif /* FLATDEVTREE_H */
20026 --- a/arch/powerpc/boot/flatdevtree_misc.c
20030 - * This file does the necessary interface mapping between the bootwrapper
20031 - * device tree operations and the interface provided by shared source
20032 - * files flatdevicetree.[ch].
20034 - * Author: Mark A. Greer <mgreer@mvista.com>
20036 - * 2006 (c) MontaVista Software, Inc. This file is licensed under
20037 - * the terms of the GNU General Public License version 2. This program
20038 - * is licensed "as is" without any warranty of any kind, whether express
20041 -#include <stddef.h>
20042 -#include "flatdevtree.h"
20045 -static struct ft_cxt cxt;
20047 -static void *fdtm_finddevice(const char *name)
20049 - return ft_find_device(&cxt, NULL, name);
20052 -static int fdtm_getprop(const void *phandle, const char *propname,
20053 - void *buf, const int buflen)
20055 - return ft_get_prop(&cxt, phandle, propname, buf, buflen);
20058 -static int fdtm_setprop(const void *phandle, const char *propname,
20059 - const void *buf, const int buflen)
20061 - return ft_set_prop(&cxt, phandle, propname, buf, buflen);
20064 -static void *fdtm_get_parent(const void *phandle)
20066 - return ft_get_parent(&cxt, phandle);
20069 -static void *fdtm_create_node(const void *phandle, const char *name)
20071 - return ft_create_node(&cxt, phandle, name);
20074 -static void *fdtm_find_node_by_prop_value(const void *prev,
20075 - const char *propname,
20076 - const char *propval,
20079 - return ft_find_node_by_prop_value(&cxt, prev, propname,
20080 - propval, proplen);
20083 -static unsigned long fdtm_finalize(void)
20085 - ft_end_tree(&cxt);
20086 - return (unsigned long)cxt.bph;
20089 -static char *fdtm_get_path(const void *phandle, char *buf, int len)
20091 - return ft_get_path(&cxt, phandle, buf, len);
20094 -int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device)
20096 - dt_ops.finddevice = fdtm_finddevice;
20097 - dt_ops.getprop = fdtm_getprop;
20098 - dt_ops.setprop = fdtm_setprop;
20099 - dt_ops.get_parent = fdtm_get_parent;
20100 - dt_ops.create_node = fdtm_create_node;
20101 - dt_ops.find_node_by_prop_value = fdtm_find_node_by_prop_value;
20102 - dt_ops.finalize = fdtm_finalize;
20103 - dt_ops.get_path = fdtm_get_path;
20105 - return ft_open(&cxt, dt_blob, max_size, max_find_device,
20106 - platform_ops.realloc);
20108 --- a/arch/powerpc/boot/holly.c
20109 +++ b/arch/powerpc/boot/holly.c
20111 u32 heapsize = 0x8000000 - (u32)_end; /* 128M */
20113 simple_alloc_init(_end, heapsize, 32, 64);
20114 - ft_init(_dtb_start, 0, 4);
20115 + fdt_init(_dtb_start);
20116 serial_console_init();
20119 +++ b/arch/powerpc/boot/libfdt/Makefile.libfdt
20123 +# This is not a complete Makefile of itself. Instead, it is designed to
20124 +# be easily embeddable into other systems of Makefiles.
20126 +LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
20127 +LIBFDT_INCLUDES = fdt.h libfdt.h
20128 +LIBFDT_EXTRA = libfdt_internal.h
20129 +LIBFDT_LIB = libfdt/libfdt.a
20131 +LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)
20133 +$(LIBFDT_objdir)/$(LIBFDT_LIB): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))
20136 +++ b/arch/powerpc/boot/libfdt/fdt.c
20139 + * libfdt - Flat Device Tree manipulation
20140 + * Copyright (C) 2006 David Gibson, IBM Corporation.
20142 + * libfdt is dual licensed: you can use it either under the terms of
20143 + * the GPL, or the BSD license, at your option.
20145 + * a) This library is free software; you can redistribute it and/or
20146 + * modify it under the terms of the GNU General Public License as
20147 + * published by the Free Software Foundation; either version 2 of the
20148 + * License, or (at your option) any later version.
20150 + * This library is distributed in the hope that it will be useful,
20151 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
20152 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20153 + * GNU General Public License for more details.
20155 + * You should have received a copy of the GNU General Public
20156 + * License along with this library; if not, write to the Free
20157 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20158 + * MA 02110-1301 USA
20162 + * b) Redistribution and use in source and binary forms, with or
20163 + * without modification, are permitted provided that the following
20164 + * conditions are met:
20166 + * 1. Redistributions of source code must retain the above
20167 + * copyright notice, this list of conditions and the following
20169 + * 2. Redistributions in binary form must reproduce the above
20170 + * copyright notice, this list of conditions and the following
20171 + * disclaimer in the documentation and/or other materials
20172 + * provided with the distribution.
20174 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
20175 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20176 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20177 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20178 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20179 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20180 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20181 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20182 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20183 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20184 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
20185 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
20186 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20188 +#include "libfdt_env.h"
20191 +#include <libfdt.h>
20193 +#include "libfdt_internal.h"
20195 +int fdt_check_header(const void *fdt)
20197 + if (fdt_magic(fdt) == FDT_MAGIC) {
20198 + /* Complete tree */
20199 + if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION)
20200 + return -FDT_ERR_BADVERSION;
20201 + if (fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION)
20202 + return -FDT_ERR_BADVERSION;
20203 + } else if (fdt_magic(fdt) == SW_MAGIC) {
20204 + /* Unfinished sequential-write blob */
20205 + if (fdt_size_dt_struct(fdt) == 0)
20206 + return -FDT_ERR_BADSTATE;
20208 + return -FDT_ERR_BADMAGIC;
20214 +const void *fdt_offset_ptr(const void *fdt, int offset, int len)
20218 + if (fdt_version(fdt) >= 0x11)
20219 + if (((offset + len) < offset)
20220 + || ((offset + len) > fdt_size_dt_struct(fdt)))
20223 + p = _fdt_offset_ptr(fdt, offset);
20230 +uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset)
20232 + const uint32_t *tagp, *lenp;
20236 + if (offset % FDT_TAGSIZE)
20239 + tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
20241 + return FDT_END; /* premature end */
20242 + tag = fdt32_to_cpu(*tagp);
20243 + offset += FDT_TAGSIZE;
20246 + case FDT_BEGIN_NODE:
20249 + p = fdt_offset_ptr(fdt, offset++, 1);
20250 + } while (p && (*p != '\0'));
20255 + lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
20258 + /* skip name offset, length and value */
20259 + offset += 2*FDT_TAGSIZE + fdt32_to_cpu(*lenp);
20264 + *nextoffset = ALIGN(offset, FDT_TAGSIZE);
20269 +const char *_fdt_find_string(const char *strtab, int tabsize, const char *s)
20271 + int len = strlen(s) + 1;
20272 + const char *last = strtab + tabsize - len;
20275 + for (p = strtab; p <= last; p++)
20276 + if (memeq(p, s, len))
20281 +int fdt_move(const void *fdt, void *buf, int bufsize)
20283 + int err = fdt_check_header(fdt);
20288 + if (fdt_totalsize(fdt) > bufsize)
20289 + return -FDT_ERR_NOSPACE;
20291 + memmove(buf, fdt, fdt_totalsize(fdt));
20295 +++ b/arch/powerpc/boot/libfdt/fdt.h
20300 +#ifndef __ASSEMBLY__
20302 +struct fdt_header {
20303 + uint32_t magic; /* magic word FDT_MAGIC */
20304 + uint32_t totalsize; /* total size of DT block */
20305 + uint32_t off_dt_struct; /* offset to structure */
20306 + uint32_t off_dt_strings; /* offset to strings */
20307 + uint32_t off_mem_rsvmap; /* offset to memory reserve map */
20308 + uint32_t version; /* format version */
20309 + uint32_t last_comp_version; /* last compatible version */
20311 + /* version 2 fields below */
20312 + uint32_t boot_cpuid_phys; /* Which physical CPU id we're
20314 + /* version 3 fields below */
20315 + uint32_t size_dt_strings; /* size of the strings block */
20317 + /* version 17 fields below */
20318 + uint32_t size_dt_struct; /* size of the structure block */
20321 +struct fdt_reserve_entry {
20322 + uint64_t address;
20326 +struct fdt_node_header {
20331 +struct fdt_property {
20334 + uint32_t nameoff;
20338 +#endif /* !__ASSEMBLY */
20340 +#define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
20341 +#define FDT_TAGSIZE sizeof(uint32_t)
20343 +#define FDT_BEGIN_NODE 0x1 /* Start node: full name */
20344 +#define FDT_END_NODE 0x2 /* End node */
20345 +#define FDT_PROP 0x3 /* Property: name off,
20347 +#define FDT_NOP 0x4 /* nop */
20348 +#define FDT_END 0x9
20350 +#define FDT_V1_SIZE (7*sizeof(uint32_t))
20351 +#define FDT_V2_SIZE (FDT_V1_SIZE + sizeof(uint32_t))
20352 +#define FDT_V3_SIZE (FDT_V2_SIZE + sizeof(uint32_t))
20353 +#define FDT_V16_SIZE FDT_V3_SIZE
20354 +#define FDT_V17_SIZE (FDT_V16_SIZE + sizeof(uint32_t))
20356 +#endif /* _FDT_H */
20358 +++ b/arch/powerpc/boot/libfdt/fdt_ro.c
20361 + * libfdt - Flat Device Tree manipulation
20362 + * Copyright (C) 2006 David Gibson, IBM Corporation.
20364 + * libfdt is dual licensed: you can use it either under the terms of
20365 + * the GPL, or the BSD license, at your option.
20367 + * a) This library is free software; you can redistribute it and/or
20368 + * modify it under the terms of the GNU General Public License as
20369 + * published by the Free Software Foundation; either version 2 of the
20370 + * License, or (at your option) any later version.
20372 + * This library is distributed in the hope that it will be useful,
20373 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
20374 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20375 + * GNU General Public License for more details.
20377 + * You should have received a copy of the GNU General Public
20378 + * License along with this library; if not, write to the Free
20379 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20380 + * MA 02110-1301 USA
20384 + * b) Redistribution and use in source and binary forms, with or
20385 + * without modification, are permitted provided that the following
20386 + * conditions are met:
20388 + * 1. Redistributions of source code must retain the above
20389 + * copyright notice, this list of conditions and the following
20391 + * 2. Redistributions in binary form must reproduce the above
20392 + * copyright notice, this list of conditions and the following
20393 + * disclaimer in the documentation and/or other materials
20394 + * provided with the distribution.
20396 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
20397 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20398 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20399 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20400 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20401 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20402 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20403 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20404 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20405 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20406 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
20407 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
20408 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20410 +#include "libfdt_env.h"
20413 +#include <libfdt.h>
20415 +#include "libfdt_internal.h"
20417 +#define CHECK_HEADER(fdt) \
20420 + if ((err = fdt_check_header(fdt)) != 0) \
20424 +static int nodename_eq(const void *fdt, int offset,
20425 + const char *s, int len)
20427 + const char *p = fdt_offset_ptr(fdt, offset, len+1);
20430 + /* short match */
20433 + if (memcmp(p, s, len) != 0)
20436 + if (p[len] == '\0')
20438 + else if (!memchr(s, '@', len) && (p[len] == '@'))
20444 +const char *fdt_string(const void *fdt, int stroffset)
20446 + return (char *)fdt + fdt_off_dt_strings(fdt) + stroffset;
20449 +int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size)
20451 + CHECK_HEADER(fdt);
20452 + *address = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->address);
20453 + *size = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->size);
20457 +int fdt_num_mem_rsv(const void *fdt)
20461 + while (fdt64_to_cpu(_fdt_mem_rsv(fdt, i)->size) != 0)
20466 +int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
20467 + const char *name, int namelen)
20471 + int offset, nextoffset;
20473 + CHECK_HEADER(fdt);
20475 + tag = fdt_next_tag(fdt, parentoffset, &nextoffset);
20476 + if (tag != FDT_BEGIN_NODE)
20477 + return -FDT_ERR_BADOFFSET;
20480 + offset = nextoffset;
20481 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20485 + return -FDT_ERR_TRUNCATED;
20487 + case FDT_BEGIN_NODE:
20491 + if (nodename_eq(fdt, offset+FDT_TAGSIZE, name, namelen))
20496 + case FDT_END_NODE:
20505 + return -FDT_ERR_BADSTRUCTURE;
20507 + } while (level >= 0);
20509 + return -FDT_ERR_NOTFOUND;
20512 +int fdt_subnode_offset(const void *fdt, int parentoffset,
20513 + const char *name)
20515 + return fdt_subnode_offset_namelen(fdt, parentoffset, name, strlen(name));
20518 +int fdt_path_offset(const void *fdt, const char *path)
20520 + const char *end = path + strlen(path);
20521 + const char *p = path;
20524 + CHECK_HEADER(fdt);
20526 + if (*path != '/')
20527 + return -FDT_ERR_BADPATH;
20532 + while (*p == '/')
20536 + q = strchr(p, '/');
20540 + offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p);
20550 +const char *fdt_get_name(const void *fdt, int nodeoffset, int *len)
20552 + const struct fdt_node_header *nh;
20555 + if ((err = fdt_check_header(fdt)) != 0)
20558 + err = -FDT_ERR_BADOFFSET;
20559 + nh = fdt_offset_ptr(fdt, nodeoffset, sizeof(*nh));
20560 + if (!nh || (fdt32_to_cpu(nh->tag) != FDT_BEGIN_NODE))
20564 + *len = strlen(nh->name);
20574 +const struct fdt_property *fdt_get_property(const void *fdt,
20576 + const char *name, int *lenp)
20579 + const struct fdt_property *prop;
20581 + int offset, nextoffset;
20584 + if ((err = fdt_check_header(fdt)) != 0)
20587 + err = -FDT_ERR_BADOFFSET;
20588 + if (nodeoffset % FDT_TAGSIZE)
20591 + tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
20592 + if (tag != FDT_BEGIN_NODE)
20596 + offset = nextoffset;
20598 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20601 + err = -FDT_ERR_TRUNCATED;
20604 + case FDT_BEGIN_NODE:
20605 + case FDT_END_NODE:
20610 + err = -FDT_ERR_BADSTRUCTURE;
20611 + prop = fdt_offset_ptr(fdt, offset, sizeof(*prop));
20614 + namestroff = fdt32_to_cpu(prop->nameoff);
20615 + if (streq(fdt_string(fdt, namestroff), name)) {
20617 + int len = fdt32_to_cpu(prop->len);
20618 + prop = fdt_offset_ptr(fdt, offset,
20619 + sizeof(*prop)+len);
20631 + err = -FDT_ERR_BADSTRUCTURE;
20634 + } while ((tag != FDT_BEGIN_NODE) && (tag != FDT_END_NODE));
20636 + err = -FDT_ERR_NOTFOUND;
20643 +const void *fdt_getprop(const void *fdt, int nodeoffset,
20644 + const char *name, int *lenp)
20646 + const struct fdt_property *prop;
20648 + prop = fdt_get_property(fdt, nodeoffset, name, lenp);
20652 + return prop->data;
20655 +uint32_t fdt_get_phandle(const void *fdt, int nodeoffset)
20657 + const uint32_t *php;
20660 + php = fdt_getprop(fdt, nodeoffset, "linux,phandle", &len);
20661 + if (!php || (len != sizeof(*php)))
20664 + return fdt32_to_cpu(*php);
20667 +int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen)
20670 + int p = 0, overflow = 0;
20671 + int offset, nextoffset, namelen;
20672 + const char *name;
20674 + CHECK_HEADER(fdt);
20676 + tag = fdt_next_tag(fdt, 0, &nextoffset);
20677 + if (tag != FDT_BEGIN_NODE)
20678 + return -FDT_ERR_BADSTRUCTURE;
20681 + return -FDT_ERR_NOSPACE;
20685 + while (nextoffset <= nodeoffset) {
20686 + offset = nextoffset;
20687 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20690 + return -FDT_ERR_BADOFFSET;
20692 + case FDT_BEGIN_NODE:
20693 + name = fdt_get_name(fdt, offset, &namelen);
20696 + if (overflow || ((p + namelen + 1) > buflen)) {
20700 + memcpy(buf + p, name, namelen);
20705 + case FDT_END_NODE:
20712 + } while (buf[p-1] != '/');
20720 + return -FDT_ERR_BADSTRUCTURE;
20725 + return -FDT_ERR_NOSPACE;
20727 + if (p > 1) /* special case so that root path is "/", not "" */
20733 +int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
20734 + int supernodedepth, int *nodedepth)
20738 + int offset, nextoffset = 0;
20739 + int supernodeoffset = -FDT_ERR_INTERNAL;
20741 + CHECK_HEADER(fdt);
20743 + if (supernodedepth < 0)
20744 + return -FDT_ERR_NOTFOUND;
20747 + offset = nextoffset;
20748 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20751 + return -FDT_ERR_BADOFFSET;
20753 + case FDT_BEGIN_NODE:
20755 + if (level == supernodedepth)
20756 + supernodeoffset = offset;
20759 + case FDT_END_NODE:
20768 + return -FDT_ERR_BADSTRUCTURE;
20770 + } while (offset < nodeoffset);
20773 + *nodedepth = level;
20775 + if (supernodedepth > level)
20776 + return -FDT_ERR_NOTFOUND;
20777 + return supernodeoffset;
20780 +int fdt_node_depth(const void *fdt, int nodeoffset)
20785 + err = fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, &nodedepth);
20787 + return (err < 0) ? err : -FDT_ERR_INTERNAL;
20788 + return nodedepth;
20791 +int fdt_parent_offset(const void *fdt, int nodeoffset)
20793 + int nodedepth = fdt_node_depth(fdt, nodeoffset);
20795 + if (nodedepth < 0)
20796 + return nodedepth;
20797 + return fdt_supernode_atdepth_offset(fdt, nodeoffset,
20798 + nodedepth - 1, NULL);
20801 +int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
20802 + const char *propname,
20803 + const void *propval, int proplen)
20806 + int offset, nextoffset;
20810 + CHECK_HEADER(fdt);
20812 + if (startoffset >= 0) {
20813 + tag = fdt_next_tag(fdt, startoffset, &nextoffset);
20814 + if (tag != FDT_BEGIN_NODE)
20815 + return -FDT_ERR_BADOFFSET;
20820 + /* FIXME: The algorithm here is pretty horrible: we scan each
20821 + * property of a node in fdt_getprop(), then if that didn't
20822 + * find what we want, we scan over them again making our way
20823 + * to the next node. Still it's the easiest to implement
20824 + * approach; performance can come later. */
20826 + offset = nextoffset;
20827 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20830 + case FDT_BEGIN_NODE:
20831 + val = fdt_getprop(fdt, offset, propname, &len);
20833 + && (len == proplen)
20834 + && (memcmp(val, propval, len) == 0))
20840 + case FDT_END_NODE:
20845 + return -FDT_ERR_BADSTRUCTURE;
20847 + } while (tag != FDT_END);
20849 + return -FDT_ERR_NOTFOUND;
20852 +int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle)
20854 + if ((phandle == 0) || (phandle == -1))
20855 + return -FDT_ERR_BADPHANDLE;
20856 + phandle = cpu_to_fdt32(phandle);
20857 + return fdt_node_offset_by_prop_value(fdt, -1, "linux,phandle",
20858 + &phandle, sizeof(phandle));
20861 +int _stringlist_contains(const void *strlist, int listlen, const char *str)
20863 + int len = strlen(str);
20866 + while (listlen >= len) {
20867 + if (memcmp(str, strlist, len+1) == 0)
20869 + p = memchr(strlist, '\0', listlen);
20871 + return 0; /* malformed strlist.. */
20872 + listlen -= (p-strlist) + 1;
20878 +int fdt_node_check_compatible(const void *fdt, int nodeoffset,
20879 + const char *compatible)
20881 + const void *prop;
20884 + prop = fdt_getprop(fdt, nodeoffset, "compatible", &len);
20887 + if (_stringlist_contains(prop, len, compatible))
20893 +int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
20894 + const char *compatible)
20897 + int offset, nextoffset;
20900 + CHECK_HEADER(fdt);
20902 + if (startoffset >= 0) {
20903 + tag = fdt_next_tag(fdt, startoffset, &nextoffset);
20904 + if (tag != FDT_BEGIN_NODE)
20905 + return -FDT_ERR_BADOFFSET;
20910 + /* FIXME: The algorithm here is pretty horrible: we scan each
20911 + * property of a node in fdt_node_check_compatible(), then if
20912 + * that didn't find what we want, we scan over them again
20913 + * making our way to the next node. Still it's the easiest to
20914 + * implement approach; performance can come later. */
20916 + offset = nextoffset;
20917 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20920 + case FDT_BEGIN_NODE:
20921 + err = fdt_node_check_compatible(fdt, offset,
20924 + && (err != -FDT_ERR_NOTFOUND))
20926 + else if (err == 0)
20932 + case FDT_END_NODE:
20937 + return -FDT_ERR_BADSTRUCTURE;
20939 + } while (tag != FDT_END);
20941 + return -FDT_ERR_NOTFOUND;
20944 +++ b/arch/powerpc/boot/libfdt/fdt_rw.c
20947 + * libfdt - Flat Device Tree manipulation
20948 + * Copyright (C) 2006 David Gibson, IBM Corporation.
20950 + * libfdt is dual licensed: you can use it either under the terms of
20951 + * the GPL, or the BSD license, at your option.
20953 + * a) This library is free software; you can redistribute it and/or
20954 + * modify it under the terms of the GNU General Public License as
20955 + * published by the Free Software Foundation; either version 2 of the
20956 + * License, or (at your option) any later version.
20958 + * This library is distributed in the hope that it will be useful,
20959 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
20960 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20961 + * GNU General Public License for more details.
20963 + * You should have received a copy of the GNU General Public
20964 + * License along with this library; if not, write to the Free
20965 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20966 + * MA 02110-1301 USA
20970 + * b) Redistribution and use in source and binary forms, with or
20971 + * without modification, are permitted provided that the following
20972 + * conditions are met:
20974 + * 1. Redistributions of source code must retain the above
20975 + * copyright notice, this list of conditions and the following
20977 + * 2. Redistributions in binary form must reproduce the above
20978 + * copyright notice, this list of conditions and the following
20979 + * disclaimer in the documentation and/or other materials
20980 + * provided with the distribution.
20982 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
20983 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20984 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20985 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20986 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20987 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20988 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20989 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20990 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20991 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20992 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
20993 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
20994 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20996 +#include "libfdt_env.h"
20999 +#include <libfdt.h>
21001 +#include "libfdt_internal.h"
21003 +static int _blocks_misordered(const void *fdt,
21004 + int mem_rsv_size, int struct_size)
21006 + return (fdt_off_mem_rsvmap(fdt) < ALIGN(sizeof(struct fdt_header), 8))
21007 + || (fdt_off_dt_struct(fdt) <
21008 + (fdt_off_mem_rsvmap(fdt) + mem_rsv_size))
21009 + || (fdt_off_dt_strings(fdt) <
21010 + (fdt_off_dt_struct(fdt) + struct_size))
21011 + || (fdt_totalsize(fdt) <
21012 + (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt)));
21015 +static int rw_check_header(void *fdt)
21019 + if ((err = fdt_check_header(fdt)))
21021 + if (fdt_version(fdt) < 17)
21022 + return -FDT_ERR_BADVERSION;
21023 + if (_blocks_misordered(fdt, sizeof(struct fdt_reserve_entry),
21024 + fdt_size_dt_struct(fdt)))
21025 + return -FDT_ERR_BADLAYOUT;
21026 + if (fdt_version(fdt) > 17)
21027 + fdt_set_version(fdt, 17);
21032 +#define RW_CHECK_HEADER(fdt) \
21035 + if ((err = rw_check_header(fdt)) != 0) \
21039 +static inline int _blob_data_size(void *fdt)
21041 + return fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
21044 +static int _blob_splice(void *fdt, void *p, int oldlen, int newlen)
21046 + void *end = fdt + _blob_data_size(fdt);
21048 + if (((p + oldlen) < p) || ((p + oldlen) > end))
21049 + return -FDT_ERR_BADOFFSET;
21050 + if ((end - oldlen + newlen) > (fdt + fdt_totalsize(fdt)))
21051 + return -FDT_ERR_NOSPACE;
21052 + memmove(p + newlen, p + oldlen, end - p - oldlen);
21056 +static int _blob_splice_mem_rsv(void *fdt, struct fdt_reserve_entry *p,
21057 + int oldn, int newn)
21059 + int delta = (newn - oldn) * sizeof(*p);
21061 + err = _blob_splice(fdt, p, oldn * sizeof(*p), newn * sizeof(*p));
21064 + fdt_set_off_dt_struct(fdt, fdt_off_dt_struct(fdt) + delta);
21065 + fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta);
21069 +static int _blob_splice_struct(void *fdt, void *p,
21070 + int oldlen, int newlen)
21072 + int delta = newlen - oldlen;
21075 + if ((err = _blob_splice(fdt, p, oldlen, newlen)))
21078 + fdt_set_size_dt_struct(fdt, fdt_size_dt_struct(fdt) + delta);
21079 + fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta);
21083 +static int _blob_splice_string(void *fdt, int newlen)
21085 + void *p = fdt + fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
21088 + if ((err = _blob_splice(fdt, p, 0, newlen)))
21091 + fdt_set_size_dt_strings(fdt, fdt_size_dt_strings(fdt) + newlen);
21095 +static int _find_add_string(void *fdt, const char *s)
21097 + char *strtab = (char *)fdt + fdt_off_dt_strings(fdt);
21100 + int len = strlen(s) + 1;
21103 + p = _fdt_find_string(strtab, fdt_size_dt_strings(fdt), s);
21106 + return (p - strtab);
21108 + new = strtab + fdt_size_dt_strings(fdt);
21109 + err = _blob_splice_string(fdt, len);
21113 + memcpy(new, s, len);
21114 + return (new - strtab);
21117 +int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size)
21119 + struct fdt_reserve_entry *re;
21122 + if ((err = rw_check_header(fdt)))
21125 + re = _fdt_mem_rsv_w(fdt, fdt_num_mem_rsv(fdt));
21126 + err = _blob_splice_mem_rsv(fdt, re, 0, 1);
21130 + re->address = cpu_to_fdt64(address);
21131 + re->size = cpu_to_fdt64(size);
21135 +int fdt_del_mem_rsv(void *fdt, int n)
21137 + struct fdt_reserve_entry *re = _fdt_mem_rsv_w(fdt, n);
21140 + if ((err = rw_check_header(fdt)))
21142 + if (n >= fdt_num_mem_rsv(fdt))
21143 + return -FDT_ERR_NOTFOUND;
21145 + err = _blob_splice_mem_rsv(fdt, re, 1, 0);
21151 +static int _resize_property(void *fdt, int nodeoffset, const char *name, int len,
21152 + struct fdt_property **prop)
21157 + *prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen);
21161 + if ((err = _blob_splice_struct(fdt, (*prop)->data,
21162 + ALIGN(oldlen, FDT_TAGSIZE),
21163 + ALIGN(len, FDT_TAGSIZE))))
21166 + (*prop)->len = cpu_to_fdt32(len);
21170 +static int _add_property(void *fdt, int nodeoffset, const char *name, int len,
21171 + struct fdt_property **prop)
21179 + tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
21180 + if (tag != FDT_BEGIN_NODE)
21181 + return -FDT_ERR_BADOFFSET;
21183 + namestroff = _find_add_string(fdt, name);
21184 + if (namestroff < 0)
21185 + return namestroff;
21187 + *prop = _fdt_offset_ptr_w(fdt, nextoffset);
21188 + proplen = sizeof(**prop) + ALIGN(len, FDT_TAGSIZE);
21190 + err = _blob_splice_struct(fdt, *prop, 0, proplen);
21194 + (*prop)->tag = cpu_to_fdt32(FDT_PROP);
21195 + (*prop)->nameoff = cpu_to_fdt32(namestroff);
21196 + (*prop)->len = cpu_to_fdt32(len);
21200 +int fdt_setprop(void *fdt, int nodeoffset, const char *name,
21201 + const void *val, int len)
21203 + struct fdt_property *prop;
21206 + if ((err = rw_check_header(fdt)))
21209 + err = _resize_property(fdt, nodeoffset, name, len, &prop);
21210 + if (err == -FDT_ERR_NOTFOUND)
21211 + err = _add_property(fdt, nodeoffset, name, len, &prop);
21215 + memcpy(prop->data, val, len);
21219 +int fdt_delprop(void *fdt, int nodeoffset, const char *name)
21221 + struct fdt_property *prop;
21222 + int len, proplen;
21224 + RW_CHECK_HEADER(fdt);
21226 + prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
21230 + proplen = sizeof(*prop) + ALIGN(len, FDT_TAGSIZE);
21231 + return _blob_splice_struct(fdt, prop, proplen, 0);
21234 +int fdt_add_subnode_namelen(void *fdt, int parentoffset,
21235 + const char *name, int namelen)
21237 + struct fdt_node_header *nh;
21238 + int offset, nextoffset;
21242 + uint32_t *endtag;
21244 + RW_CHECK_HEADER(fdt);
21246 + offset = fdt_subnode_offset_namelen(fdt, parentoffset, name, namelen);
21248 + return -FDT_ERR_EXISTS;
21249 + else if (offset != -FDT_ERR_NOTFOUND)
21252 + /* Try to place the new node after the parent's properties */
21253 + fdt_next_tag(fdt, parentoffset, &nextoffset); /* skip the BEGIN_NODE */
21255 + offset = nextoffset;
21256 + tag = fdt_next_tag(fdt, offset, &nextoffset);
21257 + } while (tag == FDT_PROP);
21259 + nh = _fdt_offset_ptr_w(fdt, offset);
21260 + nodelen = sizeof(*nh) + ALIGN(namelen+1, FDT_TAGSIZE) + FDT_TAGSIZE;
21262 + err = _blob_splice_struct(fdt, nh, 0, nodelen);
21266 + nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
21267 + memset(nh->name, 0, ALIGN(namelen+1, FDT_TAGSIZE));
21268 + memcpy(nh->name, name, namelen);
21269 + endtag = (uint32_t *)((void *)nh + nodelen - FDT_TAGSIZE);
21270 + *endtag = cpu_to_fdt32(FDT_END_NODE);
21275 +int fdt_add_subnode(void *fdt, int parentoffset, const char *name)
21277 + return fdt_add_subnode_namelen(fdt, parentoffset, name, strlen(name));
21280 +int fdt_del_node(void *fdt, int nodeoffset)
21284 + RW_CHECK_HEADER(fdt);
21286 + endoffset = _fdt_node_end_offset(fdt, nodeoffset);
21287 + if (endoffset < 0)
21288 + return endoffset;
21290 + return _blob_splice_struct(fdt, _fdt_offset_ptr_w(fdt, nodeoffset),
21291 + endoffset - nodeoffset, 0);
21294 +static void _packblocks(const void *fdt, void *buf,
21295 + int mem_rsv_size, int struct_size)
21297 + int mem_rsv_off, struct_off, strings_off;
21299 + mem_rsv_off = ALIGN(sizeof(struct fdt_header), 8);
21300 + struct_off = mem_rsv_off + mem_rsv_size;
21301 + strings_off = struct_off + struct_size;
21303 + memmove(buf + mem_rsv_off, fdt + fdt_off_mem_rsvmap(fdt), mem_rsv_size);
21304 + fdt_set_off_mem_rsvmap(buf, mem_rsv_off);
21306 + memmove(buf + struct_off, fdt + fdt_off_dt_struct(fdt), struct_size);
21307 + fdt_set_off_dt_struct(buf, struct_off);
21308 + fdt_set_size_dt_struct(buf, struct_size);
21310 + memmove(buf + strings_off, fdt + fdt_off_dt_strings(fdt),
21311 + fdt_size_dt_strings(fdt));
21312 + fdt_set_off_dt_strings(buf, strings_off);
21313 + fdt_set_size_dt_strings(buf, fdt_size_dt_strings(fdt));
21316 +int fdt_open_into(const void *fdt, void *buf, int bufsize)
21319 + int mem_rsv_size, struct_size;
21323 + err = fdt_check_header(fdt);
21327 + mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
21328 + * sizeof(struct fdt_reserve_entry);
21330 + if (fdt_version(fdt) >= 17) {
21331 + struct_size = fdt_size_dt_struct(fdt);
21334 + while (fdt_next_tag(fdt, struct_size, &struct_size) != FDT_END)
21338 + if (!_blocks_misordered(fdt, mem_rsv_size, struct_size)) {
21339 + /* no further work necessary */
21340 + err = fdt_move(fdt, buf, bufsize);
21343 + fdt_set_version(buf, 17);
21344 + fdt_set_size_dt_struct(buf, struct_size);
21345 + fdt_set_totalsize(buf, bufsize);
21349 + /* Need to reorder */
21350 + newsize = ALIGN(sizeof(struct fdt_header), 8) + mem_rsv_size
21351 + + struct_size + fdt_size_dt_strings(fdt);
21353 + if (bufsize < newsize)
21354 + return -FDT_ERR_NOSPACE;
21356 + if (((buf + newsize) <= fdt)
21357 + || (buf >= (fdt + fdt_totalsize(fdt)))) {
21360 + tmp = (void *)fdt + fdt_totalsize(fdt);
21361 + if ((tmp + newsize) > (buf + bufsize))
21362 + return -FDT_ERR_NOSPACE;
21365 + _packblocks(fdt, tmp, mem_rsv_size, struct_size);
21366 + memmove(buf, tmp, newsize);
21368 + fdt_set_magic(buf, FDT_MAGIC);
21369 + fdt_set_totalsize(buf, bufsize);
21370 + fdt_set_version(buf, 17);
21371 + fdt_set_last_comp_version(buf, 16);
21372 + fdt_set_boot_cpuid_phys(buf, fdt_boot_cpuid_phys(fdt));
21377 +int fdt_pack(void *fdt)
21379 + int mem_rsv_size;
21382 + err = rw_check_header(fdt);
21386 + mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
21387 + * sizeof(struct fdt_reserve_entry);
21388 + _packblocks(fdt, fdt, mem_rsv_size, fdt_size_dt_struct(fdt));
21389 + fdt_set_totalsize(fdt, _blob_data_size(fdt));
21394 +++ b/arch/powerpc/boot/libfdt/fdt_strerror.c
21397 + * libfdt - Flat Device Tree manipulation
21398 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21400 + * libfdt is dual licensed: you can use it either under the terms of
21401 + * the GPL, or the BSD license, at your option.
21403 + * a) This library is free software; you can redistribute it and/or
21404 + * modify it under the terms of the GNU General Public License as
21405 + * published by the Free Software Foundation; either version 2 of the
21406 + * License, or (at your option) any later version.
21408 + * This library is distributed in the hope that it will be useful,
21409 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21410 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21411 + * GNU General Public License for more details.
21413 + * You should have received a copy of the GNU General Public
21414 + * License along with this library; if not, write to the Free
21415 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21416 + * MA 02110-1301 USA
21420 + * b) Redistribution and use in source and binary forms, with or
21421 + * without modification, are permitted provided that the following
21422 + * conditions are met:
21424 + * 1. Redistributions of source code must retain the above
21425 + * copyright notice, this list of conditions and the following
21427 + * 2. Redistributions in binary form must reproduce the above
21428 + * copyright notice, this list of conditions and the following
21429 + * disclaimer in the documentation and/or other materials
21430 + * provided with the distribution.
21432 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21433 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21434 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21435 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21436 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21437 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21438 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21439 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21440 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21441 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21442 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
21443 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
21444 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21446 +#include "libfdt_env.h"
21449 +#include <libfdt.h>
21451 +#include "libfdt_internal.h"
21453 +struct errtabent {
21457 +#define ERRTABENT(val) \
21458 + [(val)] = { .str = #val, }
21460 +static struct errtabent errtable[] = {
21461 + ERRTABENT(FDT_ERR_NOTFOUND),
21462 + ERRTABENT(FDT_ERR_EXISTS),
21463 + ERRTABENT(FDT_ERR_NOSPACE),
21465 + ERRTABENT(FDT_ERR_BADOFFSET),
21466 + ERRTABENT(FDT_ERR_BADPATH),
21467 + ERRTABENT(FDT_ERR_BADSTATE),
21469 + ERRTABENT(FDT_ERR_TRUNCATED),
21470 + ERRTABENT(FDT_ERR_BADMAGIC),
21471 + ERRTABENT(FDT_ERR_BADVERSION),
21472 + ERRTABENT(FDT_ERR_BADSTRUCTURE),
21473 + ERRTABENT(FDT_ERR_BADLAYOUT),
21475 +#define ERRTABSIZE (sizeof(errtable) / sizeof(errtable[0]))
21477 +const char *fdt_strerror(int errval)
21480 + return "<valid offset/length>";
21481 + else if (errval == 0)
21482 + return "<no error>";
21483 + else if (errval > -ERRTABSIZE) {
21484 + const char *s = errtable[-errval].str;
21490 + return "<unknown error>";
21493 +++ b/arch/powerpc/boot/libfdt/fdt_sw.c
21496 + * libfdt - Flat Device Tree manipulation
21497 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21499 + * libfdt is dual licensed: you can use it either under the terms of
21500 + * the GPL, or the BSD license, at your option.
21502 + * a) This library is free software; you can redistribute it and/or
21503 + * modify it under the terms of the GNU General Public License as
21504 + * published by the Free Software Foundation; either version 2 of the
21505 + * License, or (at your option) any later version.
21507 + * This library is distributed in the hope that it will be useful,
21508 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21509 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21510 + * GNU General Public License for more details.
21512 + * You should have received a copy of the GNU General Public
21513 + * License along with this library; if not, write to the Free
21514 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21515 + * MA 02110-1301 USA
21519 + * b) Redistribution and use in source and binary forms, with or
21520 + * without modification, are permitted provided that the following
21521 + * conditions are met:
21523 + * 1. Redistributions of source code must retain the above
21524 + * copyright notice, this list of conditions and the following
21526 + * 2. Redistributions in binary form must reproduce the above
21527 + * copyright notice, this list of conditions and the following
21528 + * disclaimer in the documentation and/or other materials
21529 + * provided with the distribution.
21531 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21532 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21533 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21534 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21535 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21536 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21537 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21538 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21539 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21540 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21541 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
21542 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
21543 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21545 +#include "libfdt_env.h"
21548 +#include <libfdt.h>
21550 +#include "libfdt_internal.h"
21552 +static int check_header_sw(void *fdt)
21554 + if (fdt_magic(fdt) != SW_MAGIC)
21555 + return -FDT_ERR_BADMAGIC;
21559 +static void *grab_space(void *fdt, int len)
21561 + int offset = fdt_size_dt_struct(fdt);
21564 + spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt)
21565 + - fdt_size_dt_strings(fdt);
21567 + if ((offset + len < offset) || (offset + len > spaceleft))
21570 + fdt_set_size_dt_struct(fdt, offset + len);
21571 + return fdt_offset_ptr_w(fdt, offset, len);
21574 +int fdt_create(void *buf, int bufsize)
21578 + if (bufsize < sizeof(struct fdt_header))
21579 + return -FDT_ERR_NOSPACE;
21581 + memset(buf, 0, bufsize);
21583 + fdt_set_magic(fdt, SW_MAGIC);
21584 + fdt_set_version(fdt, FDT_LAST_SUPPORTED_VERSION);
21585 + fdt_set_last_comp_version(fdt, FDT_FIRST_SUPPORTED_VERSION);
21586 + fdt_set_totalsize(fdt, bufsize);
21588 + fdt_set_off_mem_rsvmap(fdt, ALIGN(sizeof(struct fdt_header),
21589 + sizeof(struct fdt_reserve_entry)));
21590 + fdt_set_off_dt_struct(fdt, fdt_off_mem_rsvmap(fdt));
21591 + fdt_set_off_dt_strings(fdt, bufsize);
21596 +int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size)
21598 + struct fdt_reserve_entry *re;
21599 + int err = check_header_sw(fdt);
21604 + if (fdt_size_dt_struct(fdt))
21605 + return -FDT_ERR_BADSTATE;
21607 + offset = fdt_off_dt_struct(fdt);
21608 + if ((offset + sizeof(*re)) > fdt_totalsize(fdt))
21609 + return -FDT_ERR_NOSPACE;
21611 + re = (struct fdt_reserve_entry *)(fdt + offset);
21612 + re->address = cpu_to_fdt64(addr);
21613 + re->size = cpu_to_fdt64(size);
21615 + fdt_set_off_dt_struct(fdt, offset + sizeof(*re));
21620 +int fdt_finish_reservemap(void *fdt)
21622 + return fdt_add_reservemap_entry(fdt, 0, 0);
21625 +int fdt_begin_node(void *fdt, const char *name)
21627 + struct fdt_node_header *nh;
21628 + int err = check_header_sw(fdt);
21629 + int namelen = strlen(name) + 1;
21634 + nh = grab_space(fdt, sizeof(*nh) + ALIGN(namelen, FDT_TAGSIZE));
21636 + return -FDT_ERR_NOSPACE;
21638 + nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
21639 + memcpy(nh->name, name, namelen);
21643 +int fdt_end_node(void *fdt)
21646 + int err = check_header_sw(fdt);
21651 + en = grab_space(fdt, FDT_TAGSIZE);
21653 + return -FDT_ERR_NOSPACE;
21655 + *en = cpu_to_fdt32(FDT_END_NODE);
21659 +static int find_add_string(void *fdt, const char *s)
21661 + char *strtab = (char *)fdt + fdt_totalsize(fdt);
21663 + int strtabsize = fdt_size_dt_strings(fdt);
21664 + int len = strlen(s) + 1;
21665 + int struct_top, offset;
21667 + p = _fdt_find_string(strtab - strtabsize, strtabsize, s);
21669 + return p - strtab;
21672 + offset = -strtabsize - len;
21673 + struct_top = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
21674 + if (fdt_totalsize(fdt) + offset < struct_top)
21675 + return 0; /* no more room :( */
21677 + memcpy(strtab + offset, s, len);
21678 + fdt_set_size_dt_strings(fdt, strtabsize + len);
21682 +int fdt_property(void *fdt, const char *name, const void *val, int len)
21684 + struct fdt_property *prop;
21685 + int err = check_header_sw(fdt);
21691 + nameoff = find_add_string(fdt, name);
21692 + if (nameoff == 0)
21693 + return -FDT_ERR_NOSPACE;
21695 + prop = grab_space(fdt, sizeof(*prop) + ALIGN(len, FDT_TAGSIZE));
21697 + return -FDT_ERR_NOSPACE;
21699 + prop->tag = cpu_to_fdt32(FDT_PROP);
21700 + prop->nameoff = cpu_to_fdt32(nameoff);
21701 + prop->len = cpu_to_fdt32(len);
21702 + memcpy(prop->data, val, len);
21706 +int fdt_finish(void *fdt)
21708 + int err = check_header_sw(fdt);
21709 + char *p = (char *)fdt;
21711 + int oldstroffset, newstroffset;
21713 + int offset, nextoffset;
21718 + /* Add terminator */
21719 + end = grab_space(fdt, sizeof(*end));
21721 + return -FDT_ERR_NOSPACE;
21722 + *end = cpu_to_fdt32(FDT_END);
21724 + /* Relocate the string table */
21725 + oldstroffset = fdt_totalsize(fdt) - fdt_size_dt_strings(fdt);
21726 + newstroffset = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
21727 + memmove(p + newstroffset, p + oldstroffset, fdt_size_dt_strings(fdt));
21728 + fdt_set_off_dt_strings(fdt, newstroffset);
21730 + /* Walk the structure, correcting string offsets */
21732 + while ((tag = fdt_next_tag(fdt, offset, &nextoffset)) != FDT_END) {
21733 + if (tag == FDT_PROP) {
21734 + struct fdt_property *prop =
21735 + fdt_offset_ptr_w(fdt, offset, sizeof(*prop));
21739 + return -FDT_ERR_BADSTRUCTURE;
21741 + nameoff = fdt32_to_cpu(prop->nameoff);
21742 + nameoff += fdt_size_dt_strings(fdt);
21743 + prop->nameoff = cpu_to_fdt32(nameoff);
21745 + offset = nextoffset;
21748 + /* Finally, adjust the header */
21749 + fdt_set_totalsize(fdt, newstroffset + fdt_size_dt_strings(fdt));
21750 + fdt_set_magic(fdt, FDT_MAGIC);
21754 +++ b/arch/powerpc/boot/libfdt/fdt_wip.c
21757 + * libfdt - Flat Device Tree manipulation
21758 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21760 + * libfdt is dual licensed: you can use it either under the terms of
21761 + * the GPL, or the BSD license, at your option.
21763 + * a) This library is free software; you can redistribute it and/or
21764 + * modify it under the terms of the GNU General Public License as
21765 + * published by the Free Software Foundation; either version 2 of the
21766 + * License, or (at your option) any later version.
21768 + * This library is distributed in the hope that it will be useful,
21769 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21770 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21771 + * GNU General Public License for more details.
21773 + * You should have received a copy of the GNU General Public
21774 + * License along with this library; if not, write to the Free
21775 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21776 + * MA 02110-1301 USA
21780 + * b) Redistribution and use in source and binary forms, with or
21781 + * without modification, are permitted provided that the following
21782 + * conditions are met:
21784 + * 1. Redistributions of source code must retain the above
21785 + * copyright notice, this list of conditions and the following
21787 + * 2. Redistributions in binary form must reproduce the above
21788 + * copyright notice, this list of conditions and the following
21789 + * disclaimer in the documentation and/or other materials
21790 + * provided with the distribution.
21792 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21793 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21794 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21795 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21796 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21797 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21798 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21799 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21800 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21801 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21802 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
21803 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
21804 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21806 +#include "libfdt_env.h"
21809 +#include <libfdt.h>
21811 +#include "libfdt_internal.h"
21813 +int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
21814 + const void *val, int len)
21819 + propval = fdt_getprop_w(fdt, nodeoffset, name, &proplen);
21823 + if (proplen != len)
21824 + return -FDT_ERR_NOSPACE;
21826 + memcpy(propval, val, len);
21830 +static void nop_region(void *start, int len)
21834 + for (p = start; (void *)p < (start + len); p++)
21835 + *p = cpu_to_fdt32(FDT_NOP);
21838 +int fdt_nop_property(void *fdt, int nodeoffset, const char *name)
21840 + struct fdt_property *prop;
21843 + prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
21847 + nop_region(prop, len + sizeof(*prop));
21852 +int _fdt_node_end_offset(void *fdt, int nodeoffset)
21856 + int offset, nextoffset;
21858 + tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
21859 + if (tag != FDT_BEGIN_NODE)
21860 + return -FDT_ERR_BADOFFSET;
21862 + offset = nextoffset;
21863 + tag = fdt_next_tag(fdt, offset, &nextoffset);
21869 + case FDT_BEGIN_NODE:
21873 + case FDT_END_NODE:
21882 + return -FDT_ERR_BADSTRUCTURE;
21884 + } while (level >= 0);
21886 + return nextoffset;
21889 +int fdt_nop_node(void *fdt, int nodeoffset)
21893 + endoffset = _fdt_node_end_offset(fdt, nodeoffset);
21894 + if (endoffset < 0)
21895 + return endoffset;
21897 + nop_region(fdt_offset_ptr_w(fdt, nodeoffset, 0), endoffset - nodeoffset);
21901 +++ b/arch/powerpc/boot/libfdt/libfdt.h
21906 + * libfdt - Flat Device Tree manipulation
21907 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21909 + * libfdt is dual licensed: you can use it either under the terms of
21910 + * the GPL, or the BSD license, at your option.
21912 + * a) This library is free software; you can redistribute it and/or
21913 + * modify it under the terms of the GNU General Public License as
21914 + * published by the Free Software Foundation; either version 2 of the
21915 + * License, or (at your option) any later version.
21917 + * This library is distributed in the hope that it will be useful,
21918 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21919 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21920 + * GNU General Public License for more details.
21922 + * You should have received a copy of the GNU General Public
21923 + * License along with this library; if not, write to the Free
21924 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21925 + * MA 02110-1301 USA
21929 + * b) Redistribution and use in source and binary forms, with or
21930 + * without modification, are permitted provided that the following
21931 + * conditions are met:
21933 + * 1. Redistributions of source code must retain the above
21934 + * copyright notice, this list of conditions and the following
21936 + * 2. Redistributions in binary form must reproduce the above
21937 + * copyright notice, this list of conditions and the following
21938 + * disclaimer in the documentation and/or other materials
21939 + * provided with the distribution.
21941 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21942 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21943 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21944 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21945 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21946 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21947 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21948 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21949 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21950 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21951 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
21952 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
21953 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21956 +#include <libfdt_env.h>
21959 +#define FDT_FIRST_SUPPORTED_VERSION 0x10
21960 +#define FDT_LAST_SUPPORTED_VERSION 0x11
21962 +/* Error codes: informative error codes */
21963 +#define FDT_ERR_NOTFOUND 1
21964 + /* FDT_ERR_NOTFOUND: The requested node or property does not exist */
21965 +#define FDT_ERR_EXISTS 2
21966 + /* FDT_ERR_EXISTS: Attemped to create a node or property which
21967 + * already exists */
21968 +#define FDT_ERR_NOSPACE 3
21969 + /* FDT_ERR_NOSPACE: Operation needed to expand the device
21970 + * tree, but its buffer did not have sufficient space to
21971 + * contain the expanded tree. Use fdt_open_into() to move the
21972 + * device tree to a buffer with more space. */
21974 +/* Error codes: codes for bad parameters */
21975 +#define FDT_ERR_BADOFFSET 4
21976 + /* FDT_ERR_BADOFFSET: Function was passed a structure block
21977 + * offset which is out-of-bounds, or which points to an
21978 + * unsuitable part of the structure for the operation. */
21979 +#define FDT_ERR_BADPATH 5
21980 + /* FDT_ERR_BADPATH: Function was passed a badly formatted path
21981 + * (e.g. missing a leading / for a function which requires an
21982 + * absolute path) */
21983 +#define FDT_ERR_BADPHANDLE 6
21984 + /* FDT_ERR_BADPHANDLE: Function was passed an invalid phandle
21985 + * value. phandle values of 0 and -1 are not permitted. */
21986 +#define FDT_ERR_BADSTATE 7
21987 + /* FDT_ERR_BADSTATE: Function was passed an incomplete device
21988 + * tree created by the sequential-write functions, which is
21989 + * not sufficiently complete for the requested operation. */
21991 +/* Error codes: codes for bad device tree blobs */
21992 +#define FDT_ERR_TRUNCATED 8
21993 + /* FDT_ERR_TRUNCATED: Structure block of the given device tree
21994 + * ends without an FDT_END tag. */
21995 +#define FDT_ERR_BADMAGIC 9
21996 + /* FDT_ERR_BADMAGIC: Given "device tree" appears not to be a
21997 + * device tree at all - it is missing the flattened device
21998 + * tree magic number. */
21999 +#define FDT_ERR_BADVERSION 10
22000 + /* FDT_ERR_BADVERSION: Given device tree has a version which
22001 + * can't be handled by the requested operation. For
22002 + * read-write functions, this may mean that fdt_open_into() is
22003 + * required to convert the tree to the expected version. */
22004 +#define FDT_ERR_BADSTRUCTURE 11
22005 + /* FDT_ERR_BADSTRUCTURE: Given device tree has a corrupt
22006 + * structure block or other serious error (e.g. misnested
22007 + * nodes, or subnodes preceding properties). */
22008 +#define FDT_ERR_BADLAYOUT 12
22009 + /* FDT_ERR_BADLAYOUT: For read-write functions, the given
22010 + * device tree has it's sub-blocks in an order that the
22011 + * function can't handle (memory reserve map, then structure,
22012 + * then strings). Use fdt_open_into() to reorganize the tree
22013 + * into a form suitable for the read-write operations. */
22015 +/* "Can't happen" error indicating a bug in libfdt */
22016 +#define FDT_ERR_INTERNAL 13
22017 + /* FDT_ERR_INTERNAL: libfdt has failed an internal assertion.
22018 + * Should never be returned, if it is, it indicates a bug in
22019 + * libfdt itself. */
22021 +#define FDT_ERR_MAX 13
22023 +/**********************************************************************/
22024 +/* Low-level functions (you probably don't need these) */
22025 +/**********************************************************************/
22027 +const void *fdt_offset_ptr(const void *fdt, int offset, int checklen);
22028 +static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
22030 + return (void *)fdt_offset_ptr(fdt, offset, checklen);
22033 +uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset);
22035 +/**********************************************************************/
22036 +/* General functions */
22037 +/**********************************************************************/
22039 +#define fdt_get_header(fdt, field) \
22040 + (fdt32_to_cpu(((const struct fdt_header *)(fdt))->field))
22041 +#define fdt_magic(fdt) (fdt_get_header(fdt, magic))
22042 +#define fdt_totalsize(fdt) (fdt_get_header(fdt, totalsize))
22043 +#define fdt_off_dt_struct(fdt) (fdt_get_header(fdt, off_dt_struct))
22044 +#define fdt_off_dt_strings(fdt) (fdt_get_header(fdt, off_dt_strings))
22045 +#define fdt_off_mem_rsvmap(fdt) (fdt_get_header(fdt, off_mem_rsvmap))
22046 +#define fdt_version(fdt) (fdt_get_header(fdt, version))
22047 +#define fdt_last_comp_version(fdt) (fdt_get_header(fdt, last_comp_version))
22048 +#define fdt_boot_cpuid_phys(fdt) (fdt_get_header(fdt, boot_cpuid_phys))
22049 +#define fdt_size_dt_strings(fdt) (fdt_get_header(fdt, size_dt_strings))
22050 +#define fdt_size_dt_struct(fdt) (fdt_get_header(fdt, size_dt_struct))
22052 +#define __fdt_set_hdr(name) \
22053 + static inline void fdt_set_##name(void *fdt, uint32_t val) \
22055 + struct fdt_header *fdth = fdt; \
22056 + fdth->name = cpu_to_fdt32(val); \
22058 +__fdt_set_hdr(magic);
22059 +__fdt_set_hdr(totalsize);
22060 +__fdt_set_hdr(off_dt_struct);
22061 +__fdt_set_hdr(off_dt_strings);
22062 +__fdt_set_hdr(off_mem_rsvmap);
22063 +__fdt_set_hdr(version);
22064 +__fdt_set_hdr(last_comp_version);
22065 +__fdt_set_hdr(boot_cpuid_phys);
22066 +__fdt_set_hdr(size_dt_strings);
22067 +__fdt_set_hdr(size_dt_struct);
22068 +#undef __fdt_set_hdr
22071 + * fdt_check_header - sanity check a device tree or possible device tree
22072 + * @fdt: pointer to data which might be a flattened device tree
22074 + * fdt_check_header() checks that the given buffer contains what
22075 + * appears to be a flattened device tree with sane information in its
22079 + * 0, if the buffer appears to contain a valid device tree
22080 + * -FDT_ERR_BADMAGIC,
22081 + * -FDT_ERR_BADVERSION,
22082 + * -FDT_ERR_BADSTATE, standard meanings, as above
22084 +int fdt_check_header(const void *fdt);
22087 + * fdt_move - move a device tree around in memory
22088 + * @fdt: pointer to the device tree to move
22089 + * @buf: pointer to memory where the device is to be moved
22090 + * @bufsize: size of the memory space at buf
22092 + * fdt_move() relocates, if possible, the device tree blob located at
22093 + * fdt to the buffer at buf of size bufsize. The buffer may overlap
22094 + * with the existing device tree blob at fdt. Therefore,
22095 + * fdt_move(fdt, fdt, fdt_totalsize(fdt))
22096 + * should always succeed.
22100 + * -FDT_ERR_NOSPACE, bufsize is insufficient to contain the device tree
22101 + * -FDT_ERR_BADMAGIC,
22102 + * -FDT_ERR_BADVERSION,
22103 + * -FDT_ERR_BADSTATE, standard meanings
22105 +int fdt_move(const void *fdt, void *buf, int bufsize);
22107 +/**********************************************************************/
22108 +/* Read-only functions */
22109 +/**********************************************************************/
22112 + * fdt_string - retreive a string from the strings block of a device tree
22113 + * @fdt: pointer to the device tree blob
22114 + * @stroffset: offset of the string within the strings block (native endian)
22116 + * fdt_string() retrieves a pointer to a single string from the
22117 + * strings block of the device tree blob at fdt.
22120 + * a pointer to the string, on success
22121 + * NULL, if stroffset is out of bounds
22123 +const char *fdt_string(const void *fdt, int stroffset);
22126 + * fdt_num_mem_rsv - retreive the number of memory reserve map entries
22127 + * @fdt: pointer to the device tree blob
22129 + * Returns the number of entries in the device tree blob's memory
22130 + * reservation map. This does not include the terminating 0,0 entry
22131 + * or any other (0,0) entries reserved for expansion.
22134 + * the number of entries
22136 +int fdt_num_mem_rsv(const void *fdt);
22139 + * fdt_get_mem_rsv - retreive one memory reserve map entry
22140 + * @fdt: pointer to the device tree blob
22141 + * @address, @size: pointers to 64-bit variables
22143 + * On success, *address and *size will contain the address and size of
22144 + * the n-th reserve map entry from the device tree blob, in
22145 + * native-endian format.
22149 + * -FDT_ERR_BADMAGIC,
22150 + * -FDT_ERR_BADVERSION,
22151 + * -FDT_ERR_BADSTATE, standard meanings
22153 +int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size);
22156 + * fdt_subnode_offset_namelen - find a subnode based on substring
22157 + * @fdt: pointer to the device tree blob
22158 + * @parentoffset: structure block offset of a node
22159 + * @name: name of the subnode to locate
22160 + * @namelen: number of characters of name to consider
22162 + * Identical to fdt_subnode_offset(), but only examine the first
22163 + * namelen characters of name for matching the subnode name. This is
22164 + * useful for finding subnodes based on a portion of a larger string,
22165 + * such as a full path.
22167 +int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
22168 + const char *name, int namelen);
22170 + * fdt_subnode_offset - find a subnode of a given node
22171 + * @fdt: pointer to the device tree blob
22172 + * @parentoffset: structure block offset of a node
22173 + * @name: name of the subnode to locate
22175 + * fdt_subnode_offset() finds a subnode of the node at structure block
22176 + * offset parentoffset with the given name. name may include a unit
22177 + * address, in which case fdt_subnode_offset() will find the subnode
22178 + * with that unit address, or the unit address may be omitted, in
22179 + * which case fdt_subnode_offset() will find an arbitrary subnode
22180 + * whose name excluding unit address matches the given name.
22183 + * structure block offset of the requested subnode (>=0), on success
22184 + * -FDT_ERR_NOTFOUND, if the requested subnode does not exist
22185 + * -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE tag
22186 + * -FDT_ERR_BADMAGIC,
22187 + * -FDT_ERR_BADVERSION,
22188 + * -FDT_ERR_BADSTATE,
22189 + * -FDT_ERR_BADSTRUCTURE,
22190 + * -FDT_ERR_TRUNCATED, standard meanings.
22192 +int fdt_subnode_offset(const void *fdt, int parentoffset, const char *name);
22195 + * fdt_path_offset - find a tree node by its full path
22196 + * @fdt: pointer to the device tree blob
22197 + * @path: full path of the node to locate
22199 + * fdt_path_offset() finds a node of a given path in the device tree.
22200 + * Each path component may omit the unit address portion, but the
22201 + * results of this are undefined if any such path component is
22202 + * ambiguous (that is if there are multiple nodes at the relevant
22203 + * level matching the given component, differentiated only by unit
22207 + * structure block offset of the node with the requested path (>=0), on success
22208 + * -FDT_ERR_BADPATH, given path does not begin with '/' or is invalid
22209 + * -FDT_ERR_NOTFOUND, if the requested node does not exist
22210 + * -FDT_ERR_BADMAGIC,
22211 + * -FDT_ERR_BADVERSION,
22212 + * -FDT_ERR_BADSTATE,
22213 + * -FDT_ERR_BADSTRUCTURE,
22214 + * -FDT_ERR_TRUNCATED, standard meanings.
22216 +int fdt_path_offset(const void *fdt, const char *path);
22219 + * fdt_get_name - retreive the name of a given node
22220 + * @fdt: pointer to the device tree blob
22221 + * @nodeoffset: structure block offset of the starting node
22222 + * @lenp: pointer to an integer variable (will be overwritten) or NULL
22224 + * fdt_get_name() retrieves the name (including unit address) of the
22225 + * device tree node at structure block offset nodeoffset. If lenp is
22226 + * non-NULL, the length of this name is also returned, in the integer
22227 + * pointed to by lenp.
22230 + * pointer to the node's name, on success
22231 + * If lenp is non-NULL, *lenp contains the length of that name (>=0)
22233 + * if lenp is non-NULL *lenp contains an error code (<0):
22234 + * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
22235 + * -FDT_ERR_BADMAGIC,
22236 + * -FDT_ERR_BADVERSION,
22237 + * -FDT_ERR_BADSTATE, standard meanings
22239 +const char *fdt_get_name(const void *fdt, int nodeoffset, int *lenp);
22242 + * fdt_get_property - find a given property in a given node
22243 + * @fdt: pointer to the device tree blob
22244 + * @nodeoffset: offset of the node whose property to find
22245 + * @name: name of the property to find
22246 + * @lenp: pointer to an integer variable (will be overwritten) or NULL
22248 + * fdt_get_property() retrieves a pointer to the fdt_property
22249 + * structure within the device tree blob corresponding to the property
22250 + * named 'name' of the node at offset nodeoffset. If lenp is
22251 + * non-NULL, the length of the property value also returned, in the
22252 + * integer pointed to by lenp.
22255 + * pointer to the structure representing the property
22256 + * if lenp is non-NULL, *lenp contains the length of the property
22259 + * if lenp is non-NULL, *lenp contains an error code (<0):
22260 + * -FDT_ERR_NOTFOUND, node does not have named property
22261 + * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
22262 + * -FDT_ERR_BADMAGIC,
22263 + * -FDT_ERR_BADVERSION,
22264 + * -FDT_ERR_BADSTATE,
22265 + * -FDT_ERR_BADSTRUCTURE,
22266 + * -FDT_ERR_TRUNCATED, standard meanings
22268 +const struct fdt_property *fdt_get_property(const void *fdt, int nodeoffset,
22269 + const char *name, int *lenp);
22270 +static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset,
22271 + const char *name,
22274 + return (struct fdt_property *)fdt_get_property(fdt, nodeoffset,
22279 + * fdt_getprop - retrieve the value of a given property
22280 + * @fdt: pointer to the device tree blob
22281 + * @nodeoffset: offset of the node whose property to find
22282 + * @name: name of the property to find
22283 + * @lenp: pointer to an integer variable (will be overwritten) or NULL
22285 + * fdt_getprop() retrieves a pointer to the value of the property
22286 + * named 'name' of the node at offset nodeoffset (this will be a
22287 + * pointer to within the device blob itself, not a copy of the value).
22288 + * If lenp is non-NULL, the length of the property value also
22289 + * returned, in the integer pointed to by lenp.
22292 + * pointer to the property's value
22293 + * if lenp is non-NULL, *lenp contains the length of the property
22296 + * if lenp is non-NULL, *lenp contains an error code (<0):
22297 + * -FDT_ERR_NOTFOUND, node does not have named property
22298 + * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
22299 + * -FDT_ERR_BADMAGIC,
22300 + * -FDT_ERR_BADVERSION,
22301 + * -FDT_ERR_BADSTATE,
22302 + * -FDT_ERR_BADSTRUCTURE,
22303 + * -FDT_ERR_TRUNCATED, standard meanings
22305 +const void *fdt_getprop(const void *fdt, int nodeoffset,
22306 + const char *name, int *lenp);
22307 +static inline void *fdt_getprop_w(void *fdt, int nodeoffset,
22308 + const char *name, int *lenp)
22310 + return (void *)fdt_getprop(fdt, nodeoffset, name, lenp);
22314 + * fdt_get_phandle - retreive the phandle of a given node
22315 + * @fdt: pointer to the device tree blob
22316 + * @nodeoffset: structure block offset of the node
22318 + * fdt_get_phandle() retrieves the phandle of the device tree node at
22319 + * structure block offset nodeoffset.
22322 + * the phandle of the node at nodeoffset, on succes (!= 0, != -1)
22323 + * 0, if the node has no phandle, or another error occurs
22325 +uint32_t fdt_get_phandle(const void *fdt, int nodeoffset);
22328 + * fdt_get_path - determine the full path of a node
22329 + * @fdt: pointer to the device tree blob
22330 + * @nodeoffset: offset of the node whose path to find
22331 + * @buf: character buffer to contain the returned path (will be overwritten)
22332 + * @buflen: size of the character buffer at buf
22334 + * fdt_get_path() computes the full path of the node at offset
22335 + * nodeoffset, and records that path in the buffer at buf.
22337 + * NOTE: This function is expensive, as it must scan the device tree
22338 + * structure from the start to nodeoffset.
22342 + * buf contains the absolute path of the node at
22343 + * nodeoffset, as a NUL-terminated string.
22344 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22345 + * -FDT_ERR_NOSPACE, the path of the given node is longer than (bufsize-1)
22346 + * characters and will not fit in the given buffer.
22347 + * -FDT_ERR_BADMAGIC,
22348 + * -FDT_ERR_BADVERSION,
22349 + * -FDT_ERR_BADSTATE,
22350 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22352 +int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen);
22355 + * fdt_supernode_atdepth_offset - find a specific ancestor of a node
22356 + * @fdt: pointer to the device tree blob
22357 + * @nodeoffset: offset of the node whose parent to find
22358 + * @supernodedepth: depth of the ancestor to find
22359 + * @nodedepth: pointer to an integer variable (will be overwritten) or NULL
22361 + * fdt_supernode_atdepth_offset() finds an ancestor of the given node
22362 + * at a specific depth from the root (where the root itself has depth
22363 + * 0, its immediate subnodes depth 1 and so forth). So
22364 + * fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, NULL);
22365 + * will always return 0, the offset of the root node. If the node at
22366 + * nodeoffset has depth D, then:
22367 + * fdt_supernode_atdepth_offset(fdt, nodeoffset, D, NULL);
22368 + * will return nodeoffset itself.
22370 + * NOTE: This function is expensive, as it must scan the device tree
22371 + * structure from the start to nodeoffset.
22375 + * structure block offset of the node at node offset's ancestor
22376 + * of depth supernodedepth (>=0), on success
22377 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22378 +* -FDT_ERR_NOTFOUND, supernodedepth was greater than the depth of nodeoffset
22379 + * -FDT_ERR_BADMAGIC,
22380 + * -FDT_ERR_BADVERSION,
22381 + * -FDT_ERR_BADSTATE,
22382 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22384 +int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
22385 + int supernodedepth, int *nodedepth);
22388 + * fdt_node_depth - find the depth of a given node
22389 + * @fdt: pointer to the device tree blob
22390 + * @nodeoffset: offset of the node whose parent to find
22392 + * fdt_node_depth() finds the depth of a given node. The root node
22393 + * has depth 0, its immediate subnodes depth 1 and so forth.
22395 + * NOTE: This function is expensive, as it must scan the device tree
22396 + * structure from the start to nodeoffset.
22399 + * depth of the node at nodeoffset (>=0), on success
22400 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22401 + * -FDT_ERR_BADMAGIC,
22402 + * -FDT_ERR_BADVERSION,
22403 + * -FDT_ERR_BADSTATE,
22404 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22406 +int fdt_node_depth(const void *fdt, int nodeoffset);
22409 + * fdt_parent_offset - find the parent of a given node
22410 + * @fdt: pointer to the device tree blob
22411 + * @nodeoffset: offset of the node whose parent to find
22413 + * fdt_parent_offset() locates the parent node of a given node (that
22414 + * is, it finds the offset of the node which contains the node at
22415 + * nodeoffset as a subnode).
22417 + * NOTE: This function is expensive, as it must scan the device tree
22418 + * structure from the start to nodeoffset, *twice*.
22421 + * stucture block offset of the parent of the node at nodeoffset
22422 + * (>=0), on success
22423 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22424 + * -FDT_ERR_BADMAGIC,
22425 + * -FDT_ERR_BADVERSION,
22426 + * -FDT_ERR_BADSTATE,
22427 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22429 +int fdt_parent_offset(const void *fdt, int nodeoffset);
22432 + * fdt_node_offset_by_prop_value - find nodes with a given property value
22433 + * @fdt: pointer to the device tree blob
22434 + * @startoffset: only find nodes after this offset
22435 + * @propname: property name to check
22436 + * @propval: property value to search for
22437 + * @proplen: length of the value in propval
22439 + * fdt_node_offset_by_prop_value() returns the offset of the first
22440 + * node after startoffset, which has a property named propname whose
22441 + * value is of length proplen and has value equal to propval; or if
22442 + * startoffset is -1, the very first such node in the tree.
22444 + * To iterate through all nodes matching the criterion, the following
22445 + * idiom can be used:
22446 + * offset = fdt_node_offset_by_prop_value(fdt, -1, propname,
22447 + * propval, proplen);
22448 + * while (offset != -FDT_ERR_NOTFOUND) {
22449 + * // other code here
22450 + * offset = fdt_node_offset_by_prop_value(fdt, offset, propname,
22451 + * propval, proplen);
22454 + * Note the -1 in the first call to the function, if 0 is used here
22455 + * instead, the function will never locate the root node, even if it
22456 + * matches the criterion.
22459 + * structure block offset of the located node (>= 0, >startoffset),
22461 + * -FDT_ERR_NOTFOUND, no node matching the criterion exists in the
22462 + * tree after startoffset
22463 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22464 + * -FDT_ERR_BADMAGIC,
22465 + * -FDT_ERR_BADVERSION,
22466 + * -FDT_ERR_BADSTATE,
22467 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22469 +int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
22470 + const char *propname,
22471 + const void *propval, int proplen);
22474 + * fdt_node_offset_by_phandle - find the node with a given phandle
22475 + * @fdt: pointer to the device tree blob
22476 + * @phandle: phandle value
22478 + * fdt_node_offset_by_prop_value() returns the offset of the node
22479 + * which has the given phandle value. If there is more than one node
22480 + * in the tree with the given phandle (an invalid tree), results are
22484 + * structure block offset of the located node (>= 0), on success
22485 + * -FDT_ERR_NOTFOUND, no node with that phandle exists
22486 + * -FDT_ERR_BADPHANDLE, given phandle value was invalid (0 or -1)
22487 + * -FDT_ERR_BADMAGIC,
22488 + * -FDT_ERR_BADVERSION,
22489 + * -FDT_ERR_BADSTATE,
22490 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22492 +int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle);
22495 + * fdt_node_check_compatible: check a node's compatible property
22496 + * @fdt: pointer to the device tree blob
22497 + * @nodeoffset: offset of a tree node
22498 + * @compatible: string to match against
22501 + * fdt_node_check_compatible() returns 0 if the given node contains a
22502 + * 'compatible' property with the given string as one of its elements,
22503 + * it returns non-zero otherwise, or on error.
22506 + * 0, if the node has a 'compatible' property listing the given string
22507 + * 1, if the node has a 'compatible' property, but it does not list
22508 + * the given string
22509 + * -FDT_ERR_NOTFOUND, if the given node has no 'compatible' property
22510 + * -FDT_ERR_BADOFFSET, if nodeoffset does not refer to a BEGIN_NODE tag
22511 + * -FDT_ERR_BADMAGIC,
22512 + * -FDT_ERR_BADVERSION,
22513 + * -FDT_ERR_BADSTATE,
22514 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22516 +int fdt_node_check_compatible(const void *fdt, int nodeoffset,
22517 + const char *compatible);
22520 + * fdt_node_offset_by_compatible - find nodes with a given 'compatible' value
22521 + * @fdt: pointer to the device tree blob
22522 + * @startoffset: only find nodes after this offset
22523 + * @compatible: 'compatible' string to match against
22525 + * fdt_node_offset_by_compatible() returns the offset of the first
22526 + * node after startoffset, which has a 'compatible' property which
22527 + * lists the given compatible string; or if startoffset is -1, the
22528 + * very first such node in the tree.
22530 + * To iterate through all nodes matching the criterion, the following
22531 + * idiom can be used:
22532 + * offset = fdt_node_offset_by_compatible(fdt, -1, compatible);
22533 + * while (offset != -FDT_ERR_NOTFOUND) {
22534 + * // other code here
22535 + * offset = fdt_node_offset_by_compatible(fdt, offset, compatible);
22538 + * Note the -1 in the first call to the function, if 0 is used here
22539 + * instead, the function will never locate the root node, even if it
22540 + * matches the criterion.
22543 + * structure block offset of the located node (>= 0, >startoffset),
22545 + * -FDT_ERR_NOTFOUND, no node matching the criterion exists in the
22546 + * tree after startoffset
22547 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22548 + * -FDT_ERR_BADMAGIC,
22549 + * -FDT_ERR_BADVERSION,
22550 + * -FDT_ERR_BADSTATE,
22551 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22553 +int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
22554 + const char *compatible);
22556 +/**********************************************************************/
22557 +/* Write-in-place functions */
22558 +/**********************************************************************/
22560 +int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
22561 + const void *val, int len);
22562 +static inline int fdt_setprop_inplace_cell(void *fdt, int nodeoffset,
22563 + const char *name, uint32_t val)
22565 + val = cpu_to_fdt32(val);
22566 + return fdt_setprop_inplace(fdt, nodeoffset, name, &val, sizeof(val));
22569 +int fdt_nop_property(void *fdt, int nodeoffset, const char *name);
22570 +int fdt_nop_node(void *fdt, int nodeoffset);
22572 +/**********************************************************************/
22573 +/* Sequential write functions */
22574 +/**********************************************************************/
22576 +int fdt_create(void *buf, int bufsize);
22577 +int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size);
22578 +int fdt_finish_reservemap(void *fdt);
22579 +int fdt_begin_node(void *fdt, const char *name);
22580 +int fdt_property(void *fdt, const char *name, const void *val, int len);
22581 +static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
22583 + val = cpu_to_fdt32(val);
22584 + return fdt_property(fdt, name, &val, sizeof(val));
22586 +#define fdt_property_string(fdt, name, str) \
22587 + fdt_property(fdt, name, str, strlen(str)+1)
22588 +int fdt_end_node(void *fdt);
22589 +int fdt_finish(void *fdt);
22591 +/**********************************************************************/
22592 +/* Read-write functions */
22593 +/**********************************************************************/
22595 +int fdt_open_into(const void *fdt, void *buf, int bufsize);
22596 +int fdt_pack(void *fdt);
22598 +int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size);
22599 +int fdt_del_mem_rsv(void *fdt, int n);
22601 +int fdt_setprop(void *fdt, int nodeoffset, const char *name,
22602 + const void *val, int len);
22603 +static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
22606 + val = cpu_to_fdt32(val);
22607 + return fdt_setprop(fdt, nodeoffset, name, &val, sizeof(val));
22609 +#define fdt_setprop_string(fdt, nodeoffset, name, str) \
22610 + fdt_setprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)
22611 +int fdt_delprop(void *fdt, int nodeoffset, const char *name);
22612 +int fdt_add_subnode_namelen(void *fdt, int parentoffset,
22613 + const char *name, int namelen);
22614 +int fdt_add_subnode(void *fdt, int parentoffset, const char *name);
22615 +int fdt_del_node(void *fdt, int nodeoffset);
22617 +/**********************************************************************/
22618 +/* Debugging / informational functions */
22619 +/**********************************************************************/
22621 +const char *fdt_strerror(int errval);
22623 +#endif /* _LIBFDT_H */
22625 +++ b/arch/powerpc/boot/libfdt/libfdt_internal.h
22627 +#ifndef _LIBFDT_INTERNAL_H
22628 +#define _LIBFDT_INTERNAL_H
22630 + * libfdt - Flat Device Tree manipulation
22631 + * Copyright (C) 2006 David Gibson, IBM Corporation.
22633 + * libfdt is dual licensed: you can use it either under the terms of
22634 + * the GPL, or the BSD license, at your option.
22636 + * a) This library is free software; you can redistribute it and/or
22637 + * modify it under the terms of the GNU General Public License as
22638 + * published by the Free Software Foundation; either version 2 of the
22639 + * License, or (at your option) any later version.
22641 + * This library is distributed in the hope that it will be useful,
22642 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22643 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22644 + * GNU General Public License for more details.
22646 + * You should have received a copy of the GNU General Public
22647 + * License along with this library; if not, write to the Free
22648 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22649 + * MA 02110-1301 USA
22653 + * b) Redistribution and use in source and binary forms, with or
22654 + * without modification, are permitted provided that the following
22655 + * conditions are met:
22657 + * 1. Redistributions of source code must retain the above
22658 + * copyright notice, this list of conditions and the following
22660 + * 2. Redistributions in binary form must reproduce the above
22661 + * copyright notice, this list of conditions and the following
22662 + * disclaimer in the documentation and/or other materials
22663 + * provided with the distribution.
22665 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
22666 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
22667 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22668 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22669 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22670 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22671 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22672 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22673 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22674 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22675 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22676 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
22677 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22681 +#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
22682 +#define PALIGN(p, a) ((void *)ALIGN((unsigned long)(p), (a)))
22684 +#define memeq(p, q, n) (memcmp((p), (q), (n)) == 0)
22685 +#define streq(p, q) (strcmp((p), (q)) == 0)
22687 +uint32_t _fdt_next_tag(const void *fdt, int startoffset, int *nextoffset);
22688 +const char *_fdt_find_string(const char *strtab, int tabsize, const char *s);
22689 +int _fdt_node_end_offset(void *fdt, int nodeoffset);
22691 +static inline const void *_fdt_offset_ptr(const void *fdt, int offset)
22693 + return fdt + fdt_off_dt_struct(fdt) + offset;
22696 +static inline void *_fdt_offset_ptr_w(void *fdt, int offset)
22698 + return (void *)_fdt_offset_ptr(fdt, offset);
22701 +static inline const struct fdt_reserve_entry *_fdt_mem_rsv(const void *fdt, int n)
22703 + const struct fdt_reserve_entry *rsv_table =
22704 + fdt + fdt_off_mem_rsvmap(fdt);
22706 + return rsv_table + n;
22708 +static inline struct fdt_reserve_entry *_fdt_mem_rsv_w(void *fdt, int n)
22710 + return (void *)_fdt_mem_rsv(fdt, n);
22713 +#define SW_MAGIC (~FDT_MAGIC)
22715 +#endif /* _LIBFDT_INTERNAL_H */
22717 +++ b/arch/powerpc/boot/libfdt-wrapper.c
22720 + * This file does the necessary interface mapping between the bootwrapper
22721 + * device tree operations and the interface provided by shared source
22722 + * files flatdevicetree.[ch].
22724 + * Copyright 2007 David Gibson, IBM Corporation.
22726 + * This library is free software; you can redistribute it and/or
22727 + * modify it under the terms of the GNU General Public License as
22728 + * published by the Free Software Foundation; either version 2 of the
22729 + * License, or (at your option) any later version.
22731 + * This library is distributed in the hope that it will be useful, but
22732 + * WITHOUT ANY WARRANTY; without even the implied warranty of
22733 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22734 + * General Public License for more details.
22736 + * You should have received a copy of the GNU General Public License
22737 + * along with this library; if not, write to the Free Software
22738 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22742 +#include <stddef.h>
22743 +#include <stdio.h>
22745 +#include <libfdt.h>
22749 +#define BAD_ERROR(err) (((err) < 0) \
22750 + && ((err) != -FDT_ERR_NOTFOUND) \
22751 + && ((err) != -FDT_ERR_EXISTS))
22753 +#define check_err(err) \
22755 + if (BAD_ERROR(err) || ((err < 0) && DEBUG)) \
22756 + printf("%s():%d %s\n\r", __FUNCTION__, __LINE__, \
22757 + fdt_strerror(err)); \
22758 + if (BAD_ERROR(err)) \
22760 + (err < 0) ? -1 : 0; \
22763 +#define offset_devp(off) \
22765 + int _offset = (off); \
22766 + check_err(_offset) ? NULL : (void *)(_offset+1); \
22769 +#define devp_offset_find(devp) (((int)(devp))-1)
22770 +#define devp_offset(devp) (devp ? ((int)(devp))-1 : 0)
22773 +static void *buf; /* = NULL */
22775 +#define EXPAND_GRANULARITY 1024
22777 +static void expand_buf(int minexpand)
22779 + int size = fdt_totalsize(fdt);
22782 + size = _ALIGN(size + minexpand, EXPAND_GRANULARITY);
22783 + buf = platform_ops.realloc(buf, size);
22785 + fatal("Couldn't find %d bytes to expand device tree\n\r", size);
22786 + rc = fdt_open_into(fdt, buf, size);
22788 + fatal("Couldn't expand fdt into new buffer: %s\n\r",
22789 + fdt_strerror(rc));
22794 +static void *fdt_wrapper_finddevice(const char *path)
22796 + return offset_devp(fdt_path_offset(fdt, path));
22799 +static int fdt_wrapper_getprop(const void *devp, const char *name,
22800 + void *buf, const int buflen)
22805 + p = fdt_getprop(fdt, devp_offset(devp), name, &len);
22807 + return check_err(len);
22808 + memcpy(buf, p, min(len, buflen));
22812 +static int fdt_wrapper_setprop(const void *devp, const char *name,
22813 + const void *buf, const int len)
22817 + rc = fdt_setprop(fdt, devp_offset(devp), name, buf, len);
22818 + if (rc == -FDT_ERR_NOSPACE) {
22819 + expand_buf(len + 16);
22820 + rc = fdt_setprop(fdt, devp_offset(devp), name, buf, len);
22823 + return check_err(rc);
22826 +static void *fdt_wrapper_get_parent(const void *devp)
22828 + return offset_devp(fdt_parent_offset(fdt, devp_offset(devp)));
22831 +static void *fdt_wrapper_create_node(const void *devp, const char *name)
22835 + offset = fdt_add_subnode(fdt, devp_offset(devp), name);
22836 + if (offset == -FDT_ERR_NOSPACE) {
22837 + expand_buf(strlen(name) + 16);
22838 + offset = fdt_add_subnode(fdt, devp_offset(devp), name);
22841 + return offset_devp(offset);
22844 +static void *fdt_wrapper_find_node_by_prop_value(const void *prev,
22845 + const char *name,
22849 + int offset = fdt_node_offset_by_prop_value(fdt, devp_offset_find(prev),
22851 + return offset_devp(offset);
22854 +static char *fdt_wrapper_get_path(const void *devp, char *buf, int len)
22858 + rc = fdt_get_path(fdt, devp_offset(devp), buf, len);
22859 + if (check_err(rc))
22864 +static unsigned long fdt_wrapper_finalize(void)
22868 + rc = fdt_pack(fdt);
22870 + fatal("Couldn't pack flat tree: %s\n\r",
22871 + fdt_strerror(rc));
22872 + return (unsigned long)fdt;
22875 +void fdt_init(void *blob)
22879 + dt_ops.finddevice = fdt_wrapper_finddevice;
22880 + dt_ops.getprop = fdt_wrapper_getprop;
22881 + dt_ops.setprop = fdt_wrapper_setprop;
22882 + dt_ops.get_parent = fdt_wrapper_get_parent;
22883 + dt_ops.create_node = fdt_wrapper_create_node;
22884 + dt_ops.find_node_by_prop_value = fdt_wrapper_find_node_by_prop_value;
22885 + dt_ops.get_path = fdt_wrapper_get_path;
22886 + dt_ops.finalize = fdt_wrapper_finalize;
22888 + /* Make sure the dt blob is the right version and so forth */
22890 + err = fdt_open_into(fdt, fdt, fdt_totalsize(blob));
22891 + if (err == -FDT_ERR_NOSPACE) {
22892 + int bufsize = fdt_totalsize(fdt) + 4;
22893 + buf = malloc(bufsize);
22894 + err = fdt_open_into(fdt, buf, bufsize);
22898 + fatal("fdt_init(): %s\n\r", fdt_strerror(err));
22904 +++ b/arch/powerpc/boot/libfdt_env.h
22906 +#ifndef _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
22907 +#define _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
22909 +#include <types.h>
22910 +#include <string.h>
22912 +typedef u32 uint32_t;
22913 +typedef u64 uint64_t;
22915 +#define fdt16_to_cpu(x) (x)
22916 +#define cpu_to_fdt16(x) (x)
22917 +#define fdt32_to_cpu(x) (x)
22918 +#define cpu_to_fdt32(x) (x)
22919 +#define fdt64_to_cpu(x) (x)
22920 +#define cpu_to_fdt64(x) (x)
22922 +#endif /* _ARCH_POWERPC_BOOT_LIBFDT_ENV_H */
22923 --- a/arch/powerpc/boot/main.c
22924 +++ b/arch/powerpc/boot/main.c
22928 #include "gunzip_util.h"
22929 -#include "flatdevtree.h"
22932 static struct gunzip_state gzstate;
22933 --- a/arch/powerpc/boot/ops.h
22934 +++ b/arch/powerpc/boot/ops.h
22936 extern struct loader_info loader_info;
22939 -int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device);
22940 +void fdt_init(void *blob);
22941 int serial_console_init(void);
22942 int ns16550_console_init(void *devp, struct serial_console_data *scdp);
22943 int mpsc_console_init(void *devp, struct serial_console_data *scdp);
22944 @@ -159,9 +159,23 @@
22945 return find_node_by_prop_value_str(prev, "device_type", type);
22948 +static inline void *find_node_by_alias(const char *alias)
22950 + void *devp = finddevice("/aliases");
22953 + char path[MAX_PATH_LEN];
22954 + if (getprop(devp, alias, path, MAX_PATH_LEN) > 0)
22955 + return finddevice(path);
22961 void dt_fixup_memory(u64 start, u64 size);
22962 void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq);
22963 void dt_fixup_clock(const char *path, u32 freq);
22964 +void dt_fixup_mac_address_by_alias(const char *alias, const u8 *addr);
22965 void dt_fixup_mac_address(u32 index, const u8 *addr);
22966 void __dt_fixup_mac_addresses(u32 startindex, ...);
22967 #define dt_fixup_mac_addresses(...) \
22968 --- a/arch/powerpc/boot/prpmc2800.c
22969 +++ b/arch/powerpc/boot/prpmc2800.c
22970 @@ -547,8 +547,7 @@
22973 memmove(dtb, _dtb_start, dt_size);
22974 - if (ft_init(dtb, dt_size, 16))
22978 bridge_base = mv64x60_get_bridge_base();
22980 --- a/arch/powerpc/boot/ps3.c
22981 +++ b/arch/powerpc/boot/ps3.c
22982 @@ -131,7 +131,7 @@
22983 printf("\n-- PS3 bootwrapper --\n");
22985 simple_alloc_init(_end, heapsize, 32, 64);
22986 - ft_init(_dtb_start, 0, 4);
22987 + fdt_init(_dtb_start);
22989 chosen = finddevice("/chosen");
22992 +++ b/arch/powerpc/boot/redboot-8xx.c
22995 + * RedBoot firmware support
22997 + * Author: Scott Wood <scottwood@freescale.com>
22999 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
23001 + * This program is free software; you can redistribute it and/or modify it
23002 + * under the terms of the GNU General Public License version 2 as published
23003 + * by the Free Software Foundation.
23007 +#include "stdio.h"
23008 +#include "redboot.h"
23009 +#include "fsl-soc.h"
23015 +#define MHZ(x) ((x + 500000) / 1000000)
23017 +static void platform_fixups(void)
23021 + dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
23022 + dt_fixup_mac_addresses(bd.bi_enetaddr);
23023 + dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 16, bd.bi_busfreq);
23025 + node = finddevice("/soc/cpm/brg");
23027 + printf("BRG clock-frequency <- 0x%x (%dMHz)\r\n",
23028 + bd.bi_busfreq, MHZ(bd.bi_busfreq));
23029 + setprop(node, "clock-frequency", &bd.bi_busfreq, 4);
23033 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
23034 + unsigned long r6, unsigned long r7)
23036 + memcpy(&bd, (char *)r3, sizeof(bd));
23038 + if (bd.bi_tag != 0x42444944)
23041 + simple_alloc_init(_end,
23042 + bd.bi_memstart + bd.bi_memsize - (unsigned long)_end,
23045 + fdt_init(_dtb_start);
23046 + serial_console_init();
23047 + platform_ops.fixups = platform_fixups;
23049 + loader_info.cmdline = (char *)bd.bi_cmdline;
23050 + loader_info.cmdline_len = strlen((char *)bd.bi_cmdline);
23053 +++ b/arch/powerpc/boot/redboot.h
23055 +#ifndef _PPC_REDBOOT_H
23056 +#define _PPC_REDBOOT_H
23058 +//=========================================================================
23059 +// include/asm-ppc/redboot.h
23060 +// Copyright (c) 2002, 2003 Gary Thomas (<gary@mlbassoc.com>
23061 +// Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
23064 +// Board specific details, as provided by RedBoot
23067 +/* A Board Information structure that is given to a program when
23068 + * RedBoot starts it up. Note: not all fields make sense for all
23069 + * architectures and it's up to the platform specific code to fill
23070 + * in the details.
23072 +typedef struct bd_info {
23073 + unsigned int bi_tag; /* Should be 0x42444944 "BDID" */
23074 + unsigned int bi_size; /* Size of this structure */
23075 + unsigned int bi_revision; /* revision of this structure */
23076 + unsigned int bi_bdate; /* bootstrap date, i.e. 0x19971106 */
23077 + unsigned int bi_memstart; /* Memory start address */
23078 + unsigned int bi_memsize; /* Memory (end) size in bytes */
23079 + unsigned int bi_intfreq; /* Internal Freq, in Hz */
23080 + unsigned int bi_busfreq; /* Bus Freq, in Hz */
23081 + unsigned int bi_cpmfreq; /* CPM Freq, in Hz */
23082 + unsigned int bi_brgfreq; /* BRG Freq, in Hz */
23083 + unsigned int bi_vco; /* VCO Out from PLL */
23084 + unsigned int bi_pci_freq; /* PCI Freq, in Hz */
23085 + unsigned int bi_baudrate; /* Default console baud rate */
23086 + unsigned int bi_immr; /* IMMR when called from boot rom */
23087 + unsigned char bi_enetaddr[6];
23088 + unsigned int bi_flashbase; /* Physical address of FLASH memory */
23089 + unsigned int bi_flashsize; /* Length of FLASH memory */
23090 + int bi_flashwidth; /* Width (8,16,32,64) */
23091 + unsigned char *bi_cmdline; /* Pointer to command line */
23092 + unsigned char bi_esa[3][6]; /* Ethernet station addresses */
23093 + unsigned int bi_ramdisk_begin, bi_ramdisk_end;
23094 + struct { /* Information about [main] video screen */
23095 + short x_res; /* Horizontal resolution in pixels */
23096 + short y_res; /* Vertical resolution in pixels */
23097 + short bpp; /* Bits/pixel */
23098 + short mode; /* Type of pixels (packed, indexed) */
23099 + unsigned long fb; /* Pointer to frame buffer (pixel) memory */
23101 + void (*bi_cputc)(char); /* Write a character to the RedBoot console */
23102 + char (*bi_cgetc)(void); /* Read a character from the RedBoot console */
23103 + int (*bi_ctstc)(void); /* Test for input on the RedBoot console */
23106 +#define BI_REV 0x0102 /* Version 1.02 */
23108 +#define bi_pci_busfreq bi_pci_freq
23109 +#define bi_immr_base bi_immr
23111 --- a/arch/powerpc/boot/reg.h
23112 +++ b/arch/powerpc/boot/reg.h
23117 +#define __stringify_1(x) #x
23118 +#define __stringify(x) __stringify_1(x)
23120 +#define mfspr(rn) ({unsigned long rval; \
23121 + asm volatile("mfspr %0," __stringify(rn) \
23122 + : "=r" (rval)); rval; })
23123 +#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
23125 register void *__stack_pointer asm("r1");
23126 #define get_sp() (__stack_pointer)
23128 --- a/arch/powerpc/boot/serial.c
23129 +++ b/arch/powerpc/boot/serial.c
23130 @@ -128,7 +128,8 @@
23131 rc = cpm_console_init(devp, &serial_cd);
23132 else if (dt_is_compatible(devp, "mpc5200-psc-uart"))
23133 rc = mpc5200_psc_console_init(devp, &serial_cd);
23134 - else if (dt_is_compatible(devp, "xilinx,uartlite"))
23135 + else if (dt_is_compatible(devp, "xlnx,opb-uartlite-1.00.b") ||
23136 + dt_is_compatible(devp, "xlnx,xps-uartlite-1.00.a"))
23137 rc = uartlite_console_init(devp, &serial_cd);
23139 /* Add other serial console driver calls here */
23140 --- a/arch/powerpc/boot/treeboot-walnut.c
23141 +++ b/arch/powerpc/boot/treeboot-walnut.c
23146 -void ibm405gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
23148 - u32 pllmr = mfdcr(DCRN_CPC0_PLLMR);
23149 - u32 cpc0_cr0 = mfdcr(DCRN_405_CPC0_CR0);
23150 - u32 cpc0_cr1 = mfdcr(DCRN_405_CPC0_CR1);
23151 - u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
23152 - u32 fwdv, fbdv, cbdv, opdv, epdv, udiv;
23154 - fwdv = (8 - ((pllmr & 0xe0000000) >> 29));
23155 - fbdv = (pllmr & 0x1e000000) >> 25;
23156 - cbdv = ((pllmr & 0x00060000) >> 17) + 1;
23157 - opdv = ((pllmr & 0x00018000) >> 15) + 1;
23158 - epdv = ((pllmr & 0x00001800) >> 13) + 2;
23159 - udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1;
23161 - m = fwdv * fbdv * cbdv;
23163 - cpu = sysclk * m / fwdv;
23164 - plb = cpu / cbdv;
23165 - opb = plb / opdv;
23166 - ebc = plb / epdv;
23168 - if (cpc0_cr0 & 0x80) {
23169 - /* uart0 uses the external clock */
23172 - uart0 = cpu / udiv;
23175 - if (cpc0_cr0 & 0x40) {
23176 - /* uart1 uses the external clock */
23179 - uart1 = cpu / udiv;
23182 - /* setup the timebase clock to tick at the cpu frequency */
23183 - cpc0_cr1 = cpc0_cr1 & ~0x00800000;
23184 - mtdcr(DCRN_405_CPC0_CR1, cpc0_cr1);
23187 - dt_fixup_cpu_clocks(cpu, tb, 0);
23188 - dt_fixup_clock("/plb", plb);
23189 - dt_fixup_clock("/plb/opb", opb);
23190 - dt_fixup_clock("/plb/ebc", ebc);
23191 - dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
23192 - dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
23195 static void walnut_flashsel_fixup(void)
23199 #define WALNUT_OPENBIOS_MAC_OFF 0xfffffe0b
23200 static void walnut_fixups(void)
23202 - ibm4xx_fixup_memsize();
23203 + ibm4xx_sdram_fixup_memsize();
23204 ibm405gp_fixup_clocks(33330000, 0xa8c000);
23205 ibm4xx_quiesce_eth((u32 *)0xef600800, NULL);
23206 ibm4xx_fixup_ebc_ranges("/plb/ebc");
23208 simple_alloc_init(_end, avail_ram, 32, 32);
23209 platform_ops.fixups = walnut_fixups;
23210 platform_ops.exit = ibm40x_dbcr_reset;
23211 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
23212 + fdt_init(_dtb_start);
23213 serial_console_init();
23215 --- a/arch/powerpc/boot/wrapper
23216 +++ b/arch/powerpc/boot/wrapper
23219 # directory for object and other files used by this script
23220 object=arch/powerpc/boot
23223 # directory for working files
23227 [ "$#" -gt 0 ] || usage
23233 @@ -116,10 +118,13 @@
23236 if [ -n "$dts" ]; then
23237 + if [ ! -r "$dts" -a -r "$object/dts/$dts" ]; then
23238 + dts="$object/dts/$dts"
23240 if [ -z "$dtb" ]; then
23241 dtb="$platform.dtb"
23243 - dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts"
23244 + $object/dtc -O dtb -o "$dtb" -b 0 "$dts"
23247 if [ -z "$kernel" ]; then
23248 @@ -163,7 +168,7 @@
23249 ksection=.kernel:vmlinux.bin
23250 isection=.kernel:initrd
23253 +ep88xc|ep405|redboot*|ep8248e)
23254 platformo="$object/fixed-head.o $object/$platform.o"
23257 @@ -246,11 +251,11 @@
23258 # post-processing needed for some platforms
23259 case "$platform" in
23261 - $object/addnote "$ofile"
23262 + $objbin/addnote "$ofile"
23265 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile"
23266 - $object/hack-coff "$ofile"
23267 + $objbin/hack-coff "$ofile"
23270 gzip -f -9 "$ofile"
23271 @@ -259,7 +264,7 @@
23274 mv "$ofile" "$ofile.elf"
23275 - $object/mktree "$ofile.elf" "$ofile" "$base" "$entry"
23276 + $objbin/mktree "$ofile.elf" "$ofile" "$base" "$entry"
23277 if [ -z "$cacheit" ]; then
23280 @@ -287,8 +292,6 @@
23284 - rm -f "$object/otheros.bld"
23286 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
23288 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
23289 @@ -299,6 +302,8 @@
23290 skip=$system_reset_overlay seek=$overlay_dest \
23291 count=$overlay_size bs=1
23293 - gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld"
23294 + odir="$(dirname "$ofile.bin")"
23295 + rm -f "$odir/otheros.bld"
23296 + gzip --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld"
23300 +++ b/arch/powerpc/configs/adder875-redboot_defconfig
23303 +# Automatically generated make config: don't edit
23304 +# Linux kernel version: 2.6.24-rc6
23305 +# Thu Jan 17 16:17:38 2008
23307 +# CONFIG_PPC64 is not set
23310 +# Processor support
23312 +# CONFIG_6xx is not set
23313 +# CONFIG_PPC_85xx is not set
23315 +# CONFIG_40x is not set
23316 +# CONFIG_44x is not set
23317 +# CONFIG_E200 is not set
23319 +# CONFIG_PPC_MM_SLICES is not set
23320 +CONFIG_NOT_COHERENT_CACHE=y
23322 +CONFIG_WORD_SIZE=32
23323 +CONFIG_PPC_MERGE=y
23325 +CONFIG_GENERIC_CMOS_UPDATE=y
23326 +CONFIG_GENERIC_TIME=y
23327 +CONFIG_GENERIC_TIME_VSYSCALL=y
23328 +CONFIG_GENERIC_CLOCKEVENTS=y
23329 +CONFIG_GENERIC_HARDIRQS=y
23330 +CONFIG_IRQ_PER_CPU=y
23331 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
23332 +CONFIG_ARCH_HAS_ILOG2_U32=y
23333 +CONFIG_GENERIC_HWEIGHT=y
23334 +CONFIG_GENERIC_CALIBRATE_DELAY=y
23335 +CONFIG_GENERIC_FIND_NEXT_BIT=y
23336 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
23338 +CONFIG_EARLY_PRINTK=y
23339 +CONFIG_GENERIC_NVRAM=y
23340 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23341 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
23344 +# CONFIG_PPC_UDBG_16550 is not set
23345 +# CONFIG_GENERIC_TBSYNC is not set
23346 +CONFIG_AUDIT_ARCH=y
23347 +CONFIG_GENERIC_BUG=y
23348 +# CONFIG_DEFAULT_UIMAGE is not set
23350 +# CONFIG_PPC_DCR_NATIVE is not set
23351 +# CONFIG_PPC_DCR_MMIO is not set
23352 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
23357 +CONFIG_EXPERIMENTAL=y
23358 +CONFIG_BROKEN_ON_SMP=y
23359 +CONFIG_INIT_ENV_ARG_LIMIT=32
23360 +CONFIG_LOCALVERSION=""
23361 +CONFIG_LOCALVERSION_AUTO=y
23362 +# CONFIG_SWAP is not set
23364 +CONFIG_SYSVIPC_SYSCTL=y
23365 +# CONFIG_POSIX_MQUEUE is not set
23366 +# CONFIG_BSD_PROCESS_ACCT is not set
23367 +# CONFIG_TASKSTATS is not set
23368 +# CONFIG_USER_NS is not set
23369 +# CONFIG_PID_NS is not set
23370 +# CONFIG_AUDIT is not set
23371 +# CONFIG_IKCONFIG is not set
23372 +CONFIG_LOG_BUF_SHIFT=14
23373 +# CONFIG_CGROUPS is not set
23374 +CONFIG_FAIR_GROUP_SCHED=y
23375 +CONFIG_FAIR_USER_SCHED=y
23376 +# CONFIG_FAIR_CGROUP_SCHED is not set
23377 +CONFIG_SYSFS_DEPRECATED=y
23378 +# CONFIG_RELAY is not set
23379 +# CONFIG_BLK_DEV_INITRD is not set
23380 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
23383 +# CONFIG_SYSCTL_SYSCALL is not set
23385 +# CONFIG_KALLSYMS_ALL is not set
23386 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
23390 +# CONFIG_ELF_CORE is not set
23391 +# CONFIG_BASE_FULL is not set
23392 +# CONFIG_FUTEX is not set
23393 +CONFIG_ANON_INODES=y
23398 +# CONFIG_VM_EVENT_COUNTERS is not set
23399 +CONFIG_SLUB_DEBUG=y
23400 +# CONFIG_SLAB is not set
23402 +# CONFIG_SLOB is not set
23403 +# CONFIG_TINY_SHMEM is not set
23404 +CONFIG_BASE_SMALL=1
23405 +# CONFIG_MODULES is not set
23407 +# CONFIG_LBD is not set
23408 +# CONFIG_BLK_DEV_IO_TRACE is not set
23409 +# CONFIG_LSF is not set
23410 +# CONFIG_BLK_DEV_BSG is not set
23415 +CONFIG_IOSCHED_NOOP=y
23416 +# CONFIG_IOSCHED_AS is not set
23417 +CONFIG_IOSCHED_DEADLINE=y
23418 +# CONFIG_IOSCHED_CFQ is not set
23419 +# CONFIG_DEFAULT_AS is not set
23420 +CONFIG_DEFAULT_DEADLINE=y
23421 +# CONFIG_DEFAULT_CFQ is not set
23422 +# CONFIG_DEFAULT_NOOP is not set
23423 +CONFIG_DEFAULT_IOSCHED="deadline"
23426 +# Platform support
23428 +# CONFIG_PPC_MPC52xx is not set
23429 +# CONFIG_PPC_MPC5200 is not set
23430 +# CONFIG_PPC_CELL is not set
23431 +# CONFIG_PPC_CELL_NATIVE is not set
23433 +# CONFIG_MPC8XXFADS is not set
23434 +# CONFIG_MPC86XADS is not set
23435 +# CONFIG_MPC885ADS is not set
23436 +# CONFIG_PPC_EP88XC is not set
23437 +CONFIG_PPC_ADDER875=y
23440 +# MPC8xx CPM Options
23444 +# Generic MPC8xx Options
23446 +CONFIG_8xx_COPYBACK=y
23447 +# CONFIG_8xx_CPU6 is not set
23448 +CONFIG_8xx_CPU15=y
23449 +CONFIG_NO_UCODE_PATCH=y
23450 +# CONFIG_USB_SOF_UCODE_PATCH is not set
23451 +# CONFIG_I2C_SPI_UCODE_PATCH is not set
23452 +# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
23453 +# CONFIG_PQ2ADS is not set
23454 +# CONFIG_MPIC is not set
23455 +# CONFIG_MPIC_WEIRD is not set
23456 +# CONFIG_PPC_I8259 is not set
23457 +# CONFIG_PPC_RTAS is not set
23458 +# CONFIG_MMIO_NVRAM is not set
23459 +# CONFIG_PPC_MPC106 is not set
23460 +# CONFIG_PPC_970_NAP is not set
23461 +# CONFIG_PPC_INDIRECT_IO is not set
23462 +# CONFIG_GENERIC_IOMAP is not set
23463 +# CONFIG_CPU_FREQ is not set
23464 +# CONFIG_CPM2 is not set
23465 +CONFIG_PPC_CPM_NEW_BINDING=y
23466 +# CONFIG_FSL_ULI1575 is not set
23472 +# CONFIG_HIGHMEM is not set
23473 +# CONFIG_TICK_ONESHOT is not set
23474 +# CONFIG_NO_HZ is not set
23475 +# CONFIG_HIGH_RES_TIMERS is not set
23476 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
23477 +# CONFIG_HZ_100 is not set
23478 +# CONFIG_HZ_250 is not set
23479 +# CONFIG_HZ_300 is not set
23482 +CONFIG_PREEMPT_NONE=y
23483 +# CONFIG_PREEMPT_VOLUNTARY is not set
23484 +# CONFIG_PREEMPT is not set
23485 +CONFIG_BINFMT_ELF=y
23486 +# CONFIG_BINFMT_MISC is not set
23487 +# CONFIG_MATH_EMULATION is not set
23488 +# CONFIG_8XX_MINIMAL_FPEMU is not set
23489 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
23490 +CONFIG_ARCH_FLATMEM_ENABLE=y
23491 +CONFIG_ARCH_POPULATES_NODE_MAP=y
23492 +CONFIG_SELECT_MEMORY_MODEL=y
23493 +CONFIG_FLATMEM_MANUAL=y
23494 +# CONFIG_DISCONTIGMEM_MANUAL is not set
23495 +# CONFIG_SPARSEMEM_MANUAL is not set
23497 +CONFIG_FLAT_NODE_MEM_MAP=y
23498 +# CONFIG_SPARSEMEM_STATIC is not set
23499 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
23500 +CONFIG_SPLIT_PTLOCK_CPUS=4
23501 +# CONFIG_RESOURCES_64BIT is not set
23502 +CONFIG_ZONE_DMA_FLAG=1
23504 +CONFIG_VIRT_TO_BUS=y
23505 +# CONFIG_PROC_DEVICETREE is not set
23506 +# CONFIG_CMDLINE_BOOL is not set
23507 +# CONFIG_PM is not set
23508 +CONFIG_SUSPEND_UP_POSSIBLE=y
23509 +CONFIG_HIBERNATION_UP_POSSIBLE=y
23510 +# CONFIG_SECCOMP is not set
23511 +CONFIG_WANT_DEVICE_TREE=y
23512 +CONFIG_DEVICE_TREE="adder875-redboot.dts"
23513 +CONFIG_ISA_DMA_API=y
23520 +# CONFIG_PCI is not set
23521 +# CONFIG_PCI_DOMAINS is not set
23522 +# CONFIG_PCI_SYSCALL is not set
23523 +# CONFIG_PCI_QSPAN is not set
23524 +# CONFIG_ARCH_SUPPORTS_MSI is not set
23525 +# CONFIG_PCCARD is not set
23530 +# CONFIG_ADVANCED_OPTIONS is not set
23533 +# Default settings for advanced configuration options are used
23535 +CONFIG_HIGHMEM_START=0xfe000000
23536 +CONFIG_LOWMEM_SIZE=0x30000000
23537 +CONFIG_KERNEL_START=0xc0000000
23538 +CONFIG_TASK_SIZE=0x80000000
23539 +CONFIG_CONSISTENT_START=0xfd000000
23540 +CONFIG_CONSISTENT_SIZE=0x00200000
23541 +CONFIG_BOOT_LOAD=0x00400000
23549 +# Networking options
23552 +# CONFIG_PACKET_MMAP is not set
23554 +# CONFIG_NET_KEY is not set
23556 +CONFIG_IP_MULTICAST=y
23557 +# CONFIG_IP_ADVANCED_ROUTER is not set
23558 +CONFIG_IP_FIB_HASH=y
23560 +# CONFIG_IP_PNP_DHCP is not set
23561 +# CONFIG_IP_PNP_BOOTP is not set
23562 +# CONFIG_IP_PNP_RARP is not set
23563 +# CONFIG_NET_IPIP is not set
23564 +# CONFIG_NET_IPGRE is not set
23565 +# CONFIG_IP_MROUTE is not set
23566 +# CONFIG_ARPD is not set
23567 +CONFIG_SYN_COOKIES=y
23568 +# CONFIG_INET_AH is not set
23569 +# CONFIG_INET_ESP is not set
23570 +# CONFIG_INET_IPCOMP is not set
23571 +# CONFIG_INET_XFRM_TUNNEL is not set
23572 +# CONFIG_INET_TUNNEL is not set
23573 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
23574 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
23575 +# CONFIG_INET_XFRM_MODE_BEET is not set
23576 +# CONFIG_INET_LRO is not set
23577 +CONFIG_INET_DIAG=y
23578 +CONFIG_INET_TCP_DIAG=y
23579 +# CONFIG_TCP_CONG_ADVANCED is not set
23580 +CONFIG_TCP_CONG_CUBIC=y
23581 +CONFIG_DEFAULT_TCP_CONG="cubic"
23582 +# CONFIG_TCP_MD5SIG is not set
23583 +# CONFIG_IPV6 is not set
23584 +# CONFIG_INET6_XFRM_TUNNEL is not set
23585 +# CONFIG_INET6_TUNNEL is not set
23586 +# CONFIG_NETWORK_SECMARK is not set
23587 +# CONFIG_NETFILTER is not set
23588 +# CONFIG_IP_DCCP is not set
23589 +# CONFIG_IP_SCTP is not set
23590 +# CONFIG_TIPC is not set
23591 +# CONFIG_ATM is not set
23592 +# CONFIG_BRIDGE is not set
23593 +# CONFIG_VLAN_8021Q is not set
23594 +# CONFIG_DECNET is not set
23595 +# CONFIG_LLC2 is not set
23596 +# CONFIG_IPX is not set
23597 +# CONFIG_ATALK is not set
23598 +# CONFIG_X25 is not set
23599 +# CONFIG_LAPB is not set
23600 +# CONFIG_ECONET is not set
23601 +# CONFIG_WAN_ROUTER is not set
23602 +# CONFIG_NET_SCHED is not set
23607 +# CONFIG_NET_PKTGEN is not set
23608 +# CONFIG_HAMRADIO is not set
23609 +# CONFIG_IRDA is not set
23610 +# CONFIG_BT is not set
23611 +# CONFIG_AF_RXRPC is not set
23616 +# CONFIG_CFG80211 is not set
23617 +# CONFIG_WIRELESS_EXT is not set
23618 +# CONFIG_MAC80211 is not set
23619 +# CONFIG_IEEE80211 is not set
23620 +# CONFIG_RFKILL is not set
23621 +# CONFIG_NET_9P is not set
23628 +# Generic Driver Options
23630 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
23631 +CONFIG_STANDALONE=y
23632 +CONFIG_PREVENT_FIRMWARE_BUILD=y
23633 +# CONFIG_FW_LOADER is not set
23634 +# CONFIG_DEBUG_DRIVER is not set
23635 +# CONFIG_DEBUG_DEVRES is not set
23636 +# CONFIG_SYS_HYPERVISOR is not set
23637 +# CONFIG_CONNECTOR is not set
23639 +# CONFIG_MTD_DEBUG is not set
23640 +# CONFIG_MTD_CONCAT is not set
23641 +# CONFIG_MTD_PARTITIONS is not set
23644 +# User Modules And Translation Layers
23647 +CONFIG_MTD_BLKDEVS=y
23648 +CONFIG_MTD_BLOCK=y
23649 +# CONFIG_FTL is not set
23650 +# CONFIG_NFTL is not set
23651 +# CONFIG_INFTL is not set
23652 +# CONFIG_RFD_FTL is not set
23653 +# CONFIG_SSFDC is not set
23654 +# CONFIG_MTD_OOPS is not set
23657 +# RAM/ROM/Flash chip drivers
23660 +# CONFIG_MTD_JEDECPROBE is not set
23661 +CONFIG_MTD_GEN_PROBE=y
23662 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
23663 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
23664 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
23665 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
23666 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
23667 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
23668 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
23669 +CONFIG_MTD_CFI_I1=y
23670 +CONFIG_MTD_CFI_I2=y
23671 +# CONFIG_MTD_CFI_I4 is not set
23672 +# CONFIG_MTD_CFI_I8 is not set
23673 +# CONFIG_MTD_CFI_INTELEXT is not set
23674 +CONFIG_MTD_CFI_AMDSTD=y
23675 +# CONFIG_MTD_CFI_STAA is not set
23676 +CONFIG_MTD_CFI_UTIL=y
23677 +# CONFIG_MTD_RAM is not set
23678 +# CONFIG_MTD_ROM is not set
23679 +# CONFIG_MTD_ABSENT is not set
23682 +# Mapping drivers for chip access
23684 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
23685 +# CONFIG_MTD_PHYSMAP is not set
23686 +CONFIG_MTD_PHYSMAP_OF=y
23687 +# CONFIG_MTD_CFI_FLAGADM is not set
23688 +# CONFIG_MTD_PLATRAM is not set
23691 +# Self-contained MTD device drivers
23693 +# CONFIG_MTD_SLRAM is not set
23694 +# CONFIG_MTD_PHRAM is not set
23695 +# CONFIG_MTD_MTDRAM is not set
23696 +# CONFIG_MTD_BLOCK2MTD is not set
23699 +# Disk-On-Chip Device Drivers
23701 +# CONFIG_MTD_DOC2000 is not set
23702 +# CONFIG_MTD_DOC2001 is not set
23703 +# CONFIG_MTD_DOC2001PLUS is not set
23704 +# CONFIG_MTD_NAND is not set
23705 +# CONFIG_MTD_ONENAND is not set
23708 +# UBI - Unsorted block images
23710 +# CONFIG_MTD_UBI is not set
23711 +CONFIG_OF_DEVICE=y
23712 +# CONFIG_PARPORT is not set
23713 +# CONFIG_BLK_DEV is not set
23714 +# CONFIG_MISC_DEVICES is not set
23715 +# CONFIG_IDE is not set
23718 +# SCSI device support
23720 +# CONFIG_RAID_ATTRS is not set
23721 +# CONFIG_SCSI is not set
23722 +# CONFIG_SCSI_DMA is not set
23723 +# CONFIG_SCSI_NETLINK is not set
23724 +# CONFIG_ATA is not set
23725 +# CONFIG_MD is not set
23726 +# CONFIG_MACINTOSH_DRIVERS is not set
23727 +CONFIG_NETDEVICES=y
23728 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
23729 +# CONFIG_DUMMY is not set
23730 +# CONFIG_BONDING is not set
23731 +# CONFIG_MACVLAN is not set
23732 +# CONFIG_EQUALIZER is not set
23733 +# CONFIG_TUN is not set
23734 +# CONFIG_VETH is not set
23738 +# MII PHY device drivers
23740 +# CONFIG_MARVELL_PHY is not set
23741 +CONFIG_DAVICOM_PHY=y
23742 +# CONFIG_QSEMI_PHY is not set
23743 +# CONFIG_LXT_PHY is not set
23744 +# CONFIG_CICADA_PHY is not set
23745 +# CONFIG_VITESSE_PHY is not set
23746 +# CONFIG_SMSC_PHY is not set
23747 +# CONFIG_BROADCOM_PHY is not set
23748 +# CONFIG_ICPLUS_PHY is not set
23749 +# CONFIG_FIXED_PHY is not set
23750 +# CONFIG_MDIO_BITBANG is not set
23751 +CONFIG_NET_ETHERNET=y
23753 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
23754 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
23755 +# CONFIG_IBM_NEW_EMAC_TAH is not set
23756 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
23757 +# CONFIG_B44 is not set
23759 +# CONFIG_FS_ENET_HAS_SCC is not set
23760 +CONFIG_FS_ENET_HAS_FEC=y
23761 +CONFIG_FS_ENET_MDIO_FEC=y
23762 +# CONFIG_NETDEV_1000 is not set
23763 +# CONFIG_NETDEV_10000 is not set
23768 +# CONFIG_WLAN_PRE80211 is not set
23769 +# CONFIG_WLAN_80211 is not set
23770 +# CONFIG_WAN is not set
23771 +# CONFIG_PPP is not set
23772 +# CONFIG_SLIP is not set
23773 +# CONFIG_SHAPER is not set
23774 +# CONFIG_NETCONSOLE is not set
23775 +# CONFIG_NETPOLL is not set
23776 +# CONFIG_NET_POLL_CONTROLLER is not set
23777 +# CONFIG_ISDN is not set
23778 +# CONFIG_PHONE is not set
23781 +# Input device support
23784 +# CONFIG_INPUT_FF_MEMLESS is not set
23785 +# CONFIG_INPUT_POLLDEV is not set
23788 +# Userland interfaces
23790 +CONFIG_INPUT_MOUSEDEV=y
23791 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
23792 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
23793 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
23794 +# CONFIG_INPUT_JOYDEV is not set
23795 +# CONFIG_INPUT_EVDEV is not set
23796 +# CONFIG_INPUT_EVBUG is not set
23799 +# Input Device Drivers
23801 +CONFIG_INPUT_KEYBOARD=y
23802 +CONFIG_KEYBOARD_ATKBD=y
23803 +# CONFIG_KEYBOARD_SUNKBD is not set
23804 +# CONFIG_KEYBOARD_LKKBD is not set
23805 +# CONFIG_KEYBOARD_XTKBD is not set
23806 +# CONFIG_KEYBOARD_NEWTON is not set
23807 +# CONFIG_KEYBOARD_STOWAWAY is not set
23808 +CONFIG_INPUT_MOUSE=y
23809 +CONFIG_MOUSE_PS2=y
23810 +CONFIG_MOUSE_PS2_ALPS=y
23811 +CONFIG_MOUSE_PS2_LOGIPS2PP=y
23812 +CONFIG_MOUSE_PS2_SYNAPTICS=y
23813 +CONFIG_MOUSE_PS2_LIFEBOOK=y
23814 +CONFIG_MOUSE_PS2_TRACKPOINT=y
23815 +# CONFIG_MOUSE_PS2_TOUCHKIT is not set
23816 +# CONFIG_MOUSE_SERIAL is not set
23817 +# CONFIG_MOUSE_VSXXXAA is not set
23818 +# CONFIG_INPUT_JOYSTICK is not set
23819 +# CONFIG_INPUT_TABLET is not set
23820 +# CONFIG_INPUT_TOUCHSCREEN is not set
23821 +# CONFIG_INPUT_MISC is not set
23824 +# Hardware I/O ports
23827 +CONFIG_SERIO_I8042=y
23828 +CONFIG_SERIO_SERPORT=y
23829 +CONFIG_SERIO_LIBPS2=y
23830 +# CONFIG_SERIO_RAW is not set
23831 +# CONFIG_GAMEPORT is not set
23834 +# Character devices
23836 +# CONFIG_VT is not set
23837 +# CONFIG_SERIAL_NONSTANDARD is not set
23842 +# CONFIG_SERIAL_8250 is not set
23845 +# Non-8250 serial port support
23847 +# CONFIG_SERIAL_UARTLITE is not set
23848 +CONFIG_SERIAL_CORE=y
23849 +CONFIG_SERIAL_CORE_CONSOLE=y
23850 +CONFIG_SERIAL_CPM=y
23851 +CONFIG_SERIAL_CPM_CONSOLE=y
23852 +# CONFIG_SERIAL_CPM_SCC1 is not set
23853 +# CONFIG_SERIAL_CPM_SCC2 is not set
23854 +# CONFIG_SERIAL_CPM_SCC3 is not set
23855 +# CONFIG_SERIAL_CPM_SCC4 is not set
23856 +CONFIG_SERIAL_CPM_SMC1=y
23857 +CONFIG_SERIAL_CPM_SMC2=y
23858 +CONFIG_UNIX98_PTYS=y
23859 +# CONFIG_LEGACY_PTYS is not set
23860 +# CONFIG_IPMI_HANDLER is not set
23861 +CONFIG_HW_RANDOM=y
23862 +# CONFIG_NVRAM is not set
23864 +# CONFIG_GEN_RTC_X is not set
23865 +# CONFIG_R3964 is not set
23866 +# CONFIG_RAW_DRIVER is not set
23867 +# CONFIG_TCG_TPM is not set
23868 +# CONFIG_I2C is not set
23873 +# CONFIG_SPI is not set
23874 +# CONFIG_SPI_MASTER is not set
23875 +# CONFIG_W1 is not set
23876 +# CONFIG_POWER_SUPPLY is not set
23877 +# CONFIG_HWMON is not set
23878 +# CONFIG_WATCHDOG is not set
23881 +# Sonics Silicon Backplane
23883 +CONFIG_SSB_POSSIBLE=y
23884 +# CONFIG_SSB is not set
23887 +# Multifunction device drivers
23889 +# CONFIG_MFD_SM501 is not set
23892 +# Multimedia devices
23894 +# CONFIG_VIDEO_DEV is not set
23895 +# CONFIG_DVB_CORE is not set
23899 +# Graphics support
23901 +# CONFIG_VGASTATE is not set
23902 +CONFIG_VIDEO_OUTPUT_CONTROL=y
23903 +# CONFIG_FB is not set
23904 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
23907 +# Display device support
23909 +# CONFIG_DISPLAY_SUPPORT is not set
23914 +# CONFIG_SOUND is not set
23915 +# CONFIG_HID_SUPPORT is not set
23916 +# CONFIG_USB_SUPPORT is not set
23917 +# CONFIG_MMC is not set
23918 +# CONFIG_NEW_LEDS is not set
23919 +# CONFIG_EDAC is not set
23920 +# CONFIG_RTC_CLASS is not set
23925 +# CONFIG_UIO is not set
23930 +# CONFIG_EXT2_FS is not set
23931 +# CONFIG_EXT3_FS is not set
23932 +# CONFIG_EXT4DEV_FS is not set
23933 +# CONFIG_REISERFS_FS is not set
23934 +# CONFIG_JFS_FS is not set
23935 +# CONFIG_FS_POSIX_ACL is not set
23936 +# CONFIG_XFS_FS is not set
23937 +# CONFIG_GFS2_FS is not set
23938 +# CONFIG_OCFS2_FS is not set
23939 +# CONFIG_MINIX_FS is not set
23940 +# CONFIG_ROMFS_FS is not set
23941 +# CONFIG_INOTIFY is not set
23942 +# CONFIG_QUOTA is not set
23943 +# CONFIG_DNOTIFY is not set
23944 +# CONFIG_AUTOFS_FS is not set
23945 +# CONFIG_AUTOFS4_FS is not set
23946 +# CONFIG_FUSE_FS is not set
23949 +# CD-ROM/DVD Filesystems
23951 +# CONFIG_ISO9660_FS is not set
23952 +# CONFIG_UDF_FS is not set
23955 +# DOS/FAT/NT Filesystems
23957 +# CONFIG_MSDOS_FS is not set
23958 +# CONFIG_VFAT_FS is not set
23959 +# CONFIG_NTFS_FS is not set
23962 +# Pseudo filesystems
23965 +# CONFIG_PROC_KCORE is not set
23966 +CONFIG_PROC_SYSCTL=y
23969 +# CONFIG_TMPFS_POSIX_ACL is not set
23970 +# CONFIG_HUGETLB_PAGE is not set
23971 +# CONFIG_CONFIGFS_FS is not set
23974 +# Miscellaneous filesystems
23976 +# CONFIG_ADFS_FS is not set
23977 +# CONFIG_AFFS_FS is not set
23978 +# CONFIG_HFS_FS is not set
23979 +# CONFIG_HFSPLUS_FS is not set
23980 +# CONFIG_BEFS_FS is not set
23981 +# CONFIG_BFS_FS is not set
23982 +# CONFIG_EFS_FS is not set
23983 +# CONFIG_JFFS2_FS is not set
23985 +# CONFIG_VXFS_FS is not set
23986 +# CONFIG_HPFS_FS is not set
23987 +# CONFIG_QNX4FS_FS is not set
23988 +# CONFIG_SYSV_FS is not set
23989 +# CONFIG_UFS_FS is not set
23990 +CONFIG_NETWORK_FILESYSTEMS=y
23993 +# CONFIG_NFS_V3_ACL is not set
23994 +# CONFIG_NFS_V4 is not set
23995 +# CONFIG_NFS_DIRECTIO is not set
23996 +# CONFIG_NFSD is not set
24000 +CONFIG_NFS_COMMON=y
24002 +# CONFIG_SUNRPC_BIND34 is not set
24003 +# CONFIG_RPCSEC_GSS_KRB5 is not set
24004 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
24005 +# CONFIG_SMB_FS is not set
24006 +# CONFIG_CIFS is not set
24007 +# CONFIG_NCP_FS is not set
24008 +# CONFIG_CODA_FS is not set
24009 +# CONFIG_AFS_FS is not set
24014 +CONFIG_PARTITION_ADVANCED=y
24015 +# CONFIG_ACORN_PARTITION is not set
24016 +# CONFIG_OSF_PARTITION is not set
24017 +# CONFIG_AMIGA_PARTITION is not set
24018 +# CONFIG_ATARI_PARTITION is not set
24019 +# CONFIG_MAC_PARTITION is not set
24020 +CONFIG_MSDOS_PARTITION=y
24021 +# CONFIG_BSD_DISKLABEL is not set
24022 +# CONFIG_MINIX_SUBPARTITION is not set
24023 +# CONFIG_SOLARIS_X86_PARTITION is not set
24024 +# CONFIG_UNIXWARE_DISKLABEL is not set
24025 +# CONFIG_LDM_PARTITION is not set
24026 +# CONFIG_SGI_PARTITION is not set
24027 +# CONFIG_ULTRIX_PARTITION is not set
24028 +# CONFIG_SUN_PARTITION is not set
24029 +# CONFIG_KARMA_PARTITION is not set
24030 +# CONFIG_EFI_PARTITION is not set
24031 +# CONFIG_SYSV68_PARTITION is not set
24032 +# CONFIG_NLS is not set
24033 +# CONFIG_DLM is not set
24034 +# CONFIG_UCC_SLOW is not set
24037 +# Library routines
24039 +# CONFIG_CRC_CCITT is not set
24040 +# CONFIG_CRC16 is not set
24041 +# CONFIG_CRC_ITU_T is not set
24042 +# CONFIG_CRC32 is not set
24043 +# CONFIG_CRC7 is not set
24044 +# CONFIG_LIBCRC32C is not set
24045 +CONFIG_ZLIB_INFLATE=y
24046 +CONFIG_HAS_IOMEM=y
24047 +CONFIG_HAS_IOPORT=y
24049 +CONFIG_INSTRUMENTATION=y
24050 +# CONFIG_PROFILING is not set
24051 +# CONFIG_MARKERS is not set
24056 +# CONFIG_PRINTK_TIME is not set
24057 +CONFIG_ENABLE_WARN_DEPRECATED=y
24058 +CONFIG_ENABLE_MUST_CHECK=y
24059 +CONFIG_MAGIC_SYSRQ=y
24060 +# CONFIG_UNUSED_SYMBOLS is not set
24061 +# CONFIG_DEBUG_FS is not set
24062 +# CONFIG_HEADERS_CHECK is not set
24063 +CONFIG_DEBUG_KERNEL=y
24064 +# CONFIG_DEBUG_SHIRQ is not set
24065 +CONFIG_DETECT_SOFTLOCKUP=y
24066 +CONFIG_SCHED_DEBUG=y
24067 +# CONFIG_SCHEDSTATS is not set
24068 +# CONFIG_TIMER_STATS is not set
24069 +# CONFIG_SLUB_DEBUG_ON is not set
24070 +# CONFIG_DEBUG_SPINLOCK is not set
24071 +# CONFIG_DEBUG_MUTEXES is not set
24072 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
24073 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
24074 +# CONFIG_DEBUG_KOBJECT is not set
24075 +CONFIG_DEBUG_BUGVERBOSE=y
24076 +CONFIG_DEBUG_INFO=y
24077 +# CONFIG_DEBUG_VM is not set
24078 +# CONFIG_DEBUG_LIST is not set
24079 +# CONFIG_DEBUG_SG is not set
24080 +CONFIG_FORCED_INLINING=y
24081 +# CONFIG_BOOT_PRINTK_DELAY is not set
24082 +# CONFIG_FAULT_INJECTION is not set
24083 +# CONFIG_SAMPLES is not set
24084 +# CONFIG_DEBUG_STACKOVERFLOW is not set
24085 +# CONFIG_DEBUG_STACK_USAGE is not set
24086 +# CONFIG_DEBUG_PAGEALLOC is not set
24087 +# CONFIG_DEBUGGER is not set
24088 +# CONFIG_BDI_SWITCH is not set
24089 +# CONFIG_PPC_EARLY_DEBUG is not set
24092 +# Security options
24094 +# CONFIG_KEYS is not set
24095 +# CONFIG_SECURITY is not set
24096 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
24097 +# CONFIG_CRYPTO is not set
24098 +# CONFIG_PPC_CLOCK is not set
24099 +CONFIG_PPC_LIB_RHEAP=y
24101 +++ b/arch/powerpc/configs/adder875-uboot_defconfig
24104 +# Automatically generated make config: don't edit
24105 +# Linux kernel version: 2.6.24-rc6
24106 +# Thu Jan 17 16:17:18 2008
24108 +# CONFIG_PPC64 is not set
24111 +# Processor support
24113 +# CONFIG_6xx is not set
24114 +# CONFIG_PPC_85xx is not set
24116 +# CONFIG_40x is not set
24117 +# CONFIG_44x is not set
24118 +# CONFIG_E200 is not set
24120 +# CONFIG_PPC_MM_SLICES is not set
24121 +CONFIG_NOT_COHERENT_CACHE=y
24123 +CONFIG_WORD_SIZE=32
24124 +CONFIG_PPC_MERGE=y
24126 +CONFIG_GENERIC_CMOS_UPDATE=y
24127 +CONFIG_GENERIC_TIME=y
24128 +CONFIG_GENERIC_TIME_VSYSCALL=y
24129 +CONFIG_GENERIC_CLOCKEVENTS=y
24130 +CONFIG_GENERIC_HARDIRQS=y
24131 +CONFIG_IRQ_PER_CPU=y
24132 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
24133 +CONFIG_ARCH_HAS_ILOG2_U32=y
24134 +CONFIG_GENERIC_HWEIGHT=y
24135 +CONFIG_GENERIC_CALIBRATE_DELAY=y
24136 +CONFIG_GENERIC_FIND_NEXT_BIT=y
24137 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
24139 +CONFIG_EARLY_PRINTK=y
24140 +CONFIG_GENERIC_NVRAM=y
24141 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
24142 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24145 +# CONFIG_PPC_UDBG_16550 is not set
24146 +# CONFIG_GENERIC_TBSYNC is not set
24147 +CONFIG_AUDIT_ARCH=y
24148 +CONFIG_GENERIC_BUG=y
24149 +# CONFIG_DEFAULT_UIMAGE is not set
24151 +# CONFIG_PPC_DCR_NATIVE is not set
24152 +# CONFIG_PPC_DCR_MMIO is not set
24153 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24158 +CONFIG_EXPERIMENTAL=y
24159 +CONFIG_BROKEN_ON_SMP=y
24160 +CONFIG_INIT_ENV_ARG_LIMIT=32
24161 +CONFIG_LOCALVERSION=""
24162 +CONFIG_LOCALVERSION_AUTO=y
24163 +# CONFIG_SWAP is not set
24165 +CONFIG_SYSVIPC_SYSCTL=y
24166 +# CONFIG_POSIX_MQUEUE is not set
24167 +# CONFIG_BSD_PROCESS_ACCT is not set
24168 +# CONFIG_TASKSTATS is not set
24169 +# CONFIG_USER_NS is not set
24170 +# CONFIG_PID_NS is not set
24171 +# CONFIG_AUDIT is not set
24172 +# CONFIG_IKCONFIG is not set
24173 +CONFIG_LOG_BUF_SHIFT=14
24174 +# CONFIG_CGROUPS is not set
24175 +CONFIG_FAIR_GROUP_SCHED=y
24176 +CONFIG_FAIR_USER_SCHED=y
24177 +# CONFIG_FAIR_CGROUP_SCHED is not set
24178 +CONFIG_SYSFS_DEPRECATED=y
24179 +# CONFIG_RELAY is not set
24180 +# CONFIG_BLK_DEV_INITRD is not set
24181 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
24184 +# CONFIG_SYSCTL_SYSCALL is not set
24186 +# CONFIG_KALLSYMS_ALL is not set
24187 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
24191 +# CONFIG_ELF_CORE is not set
24192 +# CONFIG_BASE_FULL is not set
24193 +# CONFIG_FUTEX is not set
24194 +CONFIG_ANON_INODES=y
24199 +# CONFIG_VM_EVENT_COUNTERS is not set
24200 +CONFIG_SLUB_DEBUG=y
24201 +# CONFIG_SLAB is not set
24203 +# CONFIG_SLOB is not set
24204 +# CONFIG_TINY_SHMEM is not set
24205 +CONFIG_BASE_SMALL=1
24206 +# CONFIG_MODULES is not set
24208 +# CONFIG_LBD is not set
24209 +# CONFIG_BLK_DEV_IO_TRACE is not set
24210 +# CONFIG_LSF is not set
24211 +# CONFIG_BLK_DEV_BSG is not set
24216 +CONFIG_IOSCHED_NOOP=y
24217 +# CONFIG_IOSCHED_AS is not set
24218 +CONFIG_IOSCHED_DEADLINE=y
24219 +# CONFIG_IOSCHED_CFQ is not set
24220 +# CONFIG_DEFAULT_AS is not set
24221 +CONFIG_DEFAULT_DEADLINE=y
24222 +# CONFIG_DEFAULT_CFQ is not set
24223 +# CONFIG_DEFAULT_NOOP is not set
24224 +CONFIG_DEFAULT_IOSCHED="deadline"
24227 +# Platform support
24229 +# CONFIG_PPC_MPC52xx is not set
24230 +# CONFIG_PPC_MPC5200 is not set
24231 +# CONFIG_PPC_CELL is not set
24232 +# CONFIG_PPC_CELL_NATIVE is not set
24234 +# CONFIG_MPC8XXFADS is not set
24235 +# CONFIG_MPC86XADS is not set
24236 +# CONFIG_MPC885ADS is not set
24237 +# CONFIG_PPC_EP88XC is not set
24238 +CONFIG_PPC_ADDER875=y
24241 +# MPC8xx CPM Options
24245 +# Generic MPC8xx Options
24247 +CONFIG_8xx_COPYBACK=y
24248 +# CONFIG_8xx_CPU6 is not set
24249 +CONFIG_8xx_CPU15=y
24250 +CONFIG_NO_UCODE_PATCH=y
24251 +# CONFIG_USB_SOF_UCODE_PATCH is not set
24252 +# CONFIG_I2C_SPI_UCODE_PATCH is not set
24253 +# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
24254 +# CONFIG_PQ2ADS is not set
24255 +# CONFIG_MPIC is not set
24256 +# CONFIG_MPIC_WEIRD is not set
24257 +# CONFIG_PPC_I8259 is not set
24258 +# CONFIG_PPC_RTAS is not set
24259 +# CONFIG_MMIO_NVRAM is not set
24260 +# CONFIG_PPC_MPC106 is not set
24261 +# CONFIG_PPC_970_NAP is not set
24262 +# CONFIG_PPC_INDIRECT_IO is not set
24263 +# CONFIG_GENERIC_IOMAP is not set
24264 +# CONFIG_CPU_FREQ is not set
24265 +# CONFIG_CPM2 is not set
24266 +CONFIG_PPC_CPM_NEW_BINDING=y
24267 +# CONFIG_FSL_ULI1575 is not set
24273 +# CONFIG_HIGHMEM is not set
24274 +# CONFIG_TICK_ONESHOT is not set
24275 +# CONFIG_NO_HZ is not set
24276 +# CONFIG_HIGH_RES_TIMERS is not set
24277 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
24278 +# CONFIG_HZ_100 is not set
24279 +# CONFIG_HZ_250 is not set
24280 +# CONFIG_HZ_300 is not set
24283 +CONFIG_PREEMPT_NONE=y
24284 +# CONFIG_PREEMPT_VOLUNTARY is not set
24285 +# CONFIG_PREEMPT is not set
24286 +CONFIG_BINFMT_ELF=y
24287 +# CONFIG_BINFMT_MISC is not set
24288 +# CONFIG_MATH_EMULATION is not set
24289 +# CONFIG_8XX_MINIMAL_FPEMU is not set
24290 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
24291 +CONFIG_ARCH_FLATMEM_ENABLE=y
24292 +CONFIG_ARCH_POPULATES_NODE_MAP=y
24293 +CONFIG_SELECT_MEMORY_MODEL=y
24294 +CONFIG_FLATMEM_MANUAL=y
24295 +# CONFIG_DISCONTIGMEM_MANUAL is not set
24296 +# CONFIG_SPARSEMEM_MANUAL is not set
24298 +CONFIG_FLAT_NODE_MEM_MAP=y
24299 +# CONFIG_SPARSEMEM_STATIC is not set
24300 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
24301 +CONFIG_SPLIT_PTLOCK_CPUS=4
24302 +# CONFIG_RESOURCES_64BIT is not set
24303 +CONFIG_ZONE_DMA_FLAG=1
24305 +CONFIG_VIRT_TO_BUS=y
24306 +# CONFIG_PROC_DEVICETREE is not set
24307 +# CONFIG_CMDLINE_BOOL is not set
24308 +# CONFIG_PM is not set
24309 +CONFIG_SUSPEND_UP_POSSIBLE=y
24310 +CONFIG_HIBERNATION_UP_POSSIBLE=y
24311 +# CONFIG_SECCOMP is not set
24312 +CONFIG_WANT_DEVICE_TREE=y
24313 +CONFIG_DEVICE_TREE="adder875-uboot.dts"
24314 +CONFIG_ISA_DMA_API=y
24321 +# CONFIG_PCI is not set
24322 +# CONFIG_PCI_DOMAINS is not set
24323 +# CONFIG_PCI_SYSCALL is not set
24324 +# CONFIG_PCI_QSPAN is not set
24325 +# CONFIG_ARCH_SUPPORTS_MSI is not set
24326 +# CONFIG_PCCARD is not set
24331 +# CONFIG_ADVANCED_OPTIONS is not set
24334 +# Default settings for advanced configuration options are used
24336 +CONFIG_HIGHMEM_START=0xfe000000
24337 +CONFIG_LOWMEM_SIZE=0x30000000
24338 +CONFIG_KERNEL_START=0xc0000000
24339 +CONFIG_TASK_SIZE=0x80000000
24340 +CONFIG_CONSISTENT_START=0xfd000000
24341 +CONFIG_CONSISTENT_SIZE=0x00200000
24342 +CONFIG_BOOT_LOAD=0x00400000
24350 +# Networking options
24353 +# CONFIG_PACKET_MMAP is not set
24355 +# CONFIG_NET_KEY is not set
24357 +CONFIG_IP_MULTICAST=y
24358 +# CONFIG_IP_ADVANCED_ROUTER is not set
24359 +CONFIG_IP_FIB_HASH=y
24361 +# CONFIG_IP_PNP_DHCP is not set
24362 +# CONFIG_IP_PNP_BOOTP is not set
24363 +# CONFIG_IP_PNP_RARP is not set
24364 +# CONFIG_NET_IPIP is not set
24365 +# CONFIG_NET_IPGRE is not set
24366 +# CONFIG_IP_MROUTE is not set
24367 +# CONFIG_ARPD is not set
24368 +CONFIG_SYN_COOKIES=y
24369 +# CONFIG_INET_AH is not set
24370 +# CONFIG_INET_ESP is not set
24371 +# CONFIG_INET_IPCOMP is not set
24372 +# CONFIG_INET_XFRM_TUNNEL is not set
24373 +# CONFIG_INET_TUNNEL is not set
24374 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
24375 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
24376 +# CONFIG_INET_XFRM_MODE_BEET is not set
24377 +# CONFIG_INET_LRO is not set
24378 +CONFIG_INET_DIAG=y
24379 +CONFIG_INET_TCP_DIAG=y
24380 +# CONFIG_TCP_CONG_ADVANCED is not set
24381 +CONFIG_TCP_CONG_CUBIC=y
24382 +CONFIG_DEFAULT_TCP_CONG="cubic"
24383 +# CONFIG_TCP_MD5SIG is not set
24384 +# CONFIG_IPV6 is not set
24385 +# CONFIG_INET6_XFRM_TUNNEL is not set
24386 +# CONFIG_INET6_TUNNEL is not set
24387 +# CONFIG_NETWORK_SECMARK is not set
24388 +# CONFIG_NETFILTER is not set
24389 +# CONFIG_IP_DCCP is not set
24390 +# CONFIG_IP_SCTP is not set
24391 +# CONFIG_TIPC is not set
24392 +# CONFIG_ATM is not set
24393 +# CONFIG_BRIDGE is not set
24394 +# CONFIG_VLAN_8021Q is not set
24395 +# CONFIG_DECNET is not set
24396 +# CONFIG_LLC2 is not set
24397 +# CONFIG_IPX is not set
24398 +# CONFIG_ATALK is not set
24399 +# CONFIG_X25 is not set
24400 +# CONFIG_LAPB is not set
24401 +# CONFIG_ECONET is not set
24402 +# CONFIG_WAN_ROUTER is not set
24403 +# CONFIG_NET_SCHED is not set
24408 +# CONFIG_NET_PKTGEN is not set
24409 +# CONFIG_HAMRADIO is not set
24410 +# CONFIG_IRDA is not set
24411 +# CONFIG_BT is not set
24412 +# CONFIG_AF_RXRPC is not set
24417 +# CONFIG_CFG80211 is not set
24418 +# CONFIG_WIRELESS_EXT is not set
24419 +# CONFIG_MAC80211 is not set
24420 +# CONFIG_IEEE80211 is not set
24421 +# CONFIG_RFKILL is not set
24422 +# CONFIG_NET_9P is not set
24429 +# Generic Driver Options
24431 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
24432 +CONFIG_STANDALONE=y
24433 +CONFIG_PREVENT_FIRMWARE_BUILD=y
24434 +# CONFIG_FW_LOADER is not set
24435 +# CONFIG_DEBUG_DRIVER is not set
24436 +# CONFIG_DEBUG_DEVRES is not set
24437 +# CONFIG_SYS_HYPERVISOR is not set
24438 +# CONFIG_CONNECTOR is not set
24440 +# CONFIG_MTD_DEBUG is not set
24441 +# CONFIG_MTD_CONCAT is not set
24442 +# CONFIG_MTD_PARTITIONS is not set
24445 +# User Modules And Translation Layers
24448 +CONFIG_MTD_BLKDEVS=y
24449 +CONFIG_MTD_BLOCK=y
24450 +# CONFIG_FTL is not set
24451 +# CONFIG_NFTL is not set
24452 +# CONFIG_INFTL is not set
24453 +# CONFIG_RFD_FTL is not set
24454 +# CONFIG_SSFDC is not set
24455 +# CONFIG_MTD_OOPS is not set
24458 +# RAM/ROM/Flash chip drivers
24461 +# CONFIG_MTD_JEDECPROBE is not set
24462 +CONFIG_MTD_GEN_PROBE=y
24463 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
24464 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
24465 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
24466 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
24467 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
24468 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
24469 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
24470 +CONFIG_MTD_CFI_I1=y
24471 +CONFIG_MTD_CFI_I2=y
24472 +# CONFIG_MTD_CFI_I4 is not set
24473 +# CONFIG_MTD_CFI_I8 is not set
24474 +# CONFIG_MTD_CFI_INTELEXT is not set
24475 +CONFIG_MTD_CFI_AMDSTD=y
24476 +# CONFIG_MTD_CFI_STAA is not set
24477 +CONFIG_MTD_CFI_UTIL=y
24478 +# CONFIG_MTD_RAM is not set
24479 +# CONFIG_MTD_ROM is not set
24480 +# CONFIG_MTD_ABSENT is not set
24483 +# Mapping drivers for chip access
24485 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
24486 +# CONFIG_MTD_PHYSMAP is not set
24487 +CONFIG_MTD_PHYSMAP_OF=y
24488 +# CONFIG_MTD_CFI_FLAGADM is not set
24489 +# CONFIG_MTD_PLATRAM is not set
24492 +# Self-contained MTD device drivers
24494 +# CONFIG_MTD_SLRAM is not set
24495 +# CONFIG_MTD_PHRAM is not set
24496 +# CONFIG_MTD_MTDRAM is not set
24497 +# CONFIG_MTD_BLOCK2MTD is not set
24500 +# Disk-On-Chip Device Drivers
24502 +# CONFIG_MTD_DOC2000 is not set
24503 +# CONFIG_MTD_DOC2001 is not set
24504 +# CONFIG_MTD_DOC2001PLUS is not set
24505 +# CONFIG_MTD_NAND is not set
24506 +# CONFIG_MTD_ONENAND is not set
24509 +# UBI - Unsorted block images
24511 +# CONFIG_MTD_UBI is not set
24512 +CONFIG_OF_DEVICE=y
24513 +# CONFIG_PARPORT is not set
24514 +# CONFIG_BLK_DEV is not set
24515 +# CONFIG_MISC_DEVICES is not set
24516 +# CONFIG_IDE is not set
24519 +# SCSI device support
24521 +# CONFIG_RAID_ATTRS is not set
24522 +# CONFIG_SCSI is not set
24523 +# CONFIG_SCSI_DMA is not set
24524 +# CONFIG_SCSI_NETLINK is not set
24525 +# CONFIG_ATA is not set
24526 +# CONFIG_MD is not set
24527 +# CONFIG_MACINTOSH_DRIVERS is not set
24528 +CONFIG_NETDEVICES=y
24529 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
24530 +# CONFIG_DUMMY is not set
24531 +# CONFIG_BONDING is not set
24532 +# CONFIG_MACVLAN is not set
24533 +# CONFIG_EQUALIZER is not set
24534 +# CONFIG_TUN is not set
24535 +# CONFIG_VETH is not set
24539 +# MII PHY device drivers
24541 +# CONFIG_MARVELL_PHY is not set
24542 +CONFIG_DAVICOM_PHY=y
24543 +# CONFIG_QSEMI_PHY is not set
24544 +# CONFIG_LXT_PHY is not set
24545 +# CONFIG_CICADA_PHY is not set
24546 +# CONFIG_VITESSE_PHY is not set
24547 +# CONFIG_SMSC_PHY is not set
24548 +# CONFIG_BROADCOM_PHY is not set
24549 +# CONFIG_ICPLUS_PHY is not set
24550 +# CONFIG_FIXED_PHY is not set
24551 +# CONFIG_MDIO_BITBANG is not set
24552 +CONFIG_NET_ETHERNET=y
24554 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
24555 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
24556 +# CONFIG_IBM_NEW_EMAC_TAH is not set
24557 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
24558 +# CONFIG_B44 is not set
24560 +# CONFIG_FS_ENET_HAS_SCC is not set
24561 +CONFIG_FS_ENET_HAS_FEC=y
24562 +CONFIG_FS_ENET_MDIO_FEC=y
24563 +# CONFIG_NETDEV_1000 is not set
24564 +# CONFIG_NETDEV_10000 is not set
24569 +# CONFIG_WLAN_PRE80211 is not set
24570 +# CONFIG_WLAN_80211 is not set
24571 +# CONFIG_WAN is not set
24572 +# CONFIG_PPP is not set
24573 +# CONFIG_SLIP is not set
24574 +# CONFIG_SHAPER is not set
24575 +# CONFIG_NETCONSOLE is not set
24576 +# CONFIG_NETPOLL is not set
24577 +# CONFIG_NET_POLL_CONTROLLER is not set
24578 +# CONFIG_ISDN is not set
24579 +# CONFIG_PHONE is not set
24582 +# Input device support
24585 +# CONFIG_INPUT_FF_MEMLESS is not set
24586 +# CONFIG_INPUT_POLLDEV is not set
24589 +# Userland interfaces
24591 +CONFIG_INPUT_MOUSEDEV=y
24592 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
24593 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
24594 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
24595 +# CONFIG_INPUT_JOYDEV is not set
24596 +# CONFIG_INPUT_EVDEV is not set
24597 +# CONFIG_INPUT_EVBUG is not set
24600 +# Input Device Drivers
24602 +CONFIG_INPUT_KEYBOARD=y
24603 +CONFIG_KEYBOARD_ATKBD=y
24604 +# CONFIG_KEYBOARD_SUNKBD is not set
24605 +# CONFIG_KEYBOARD_LKKBD is not set
24606 +# CONFIG_KEYBOARD_XTKBD is not set
24607 +# CONFIG_KEYBOARD_NEWTON is not set
24608 +# CONFIG_KEYBOARD_STOWAWAY is not set
24609 +CONFIG_INPUT_MOUSE=y
24610 +CONFIG_MOUSE_PS2=y
24611 +CONFIG_MOUSE_PS2_ALPS=y
24612 +CONFIG_MOUSE_PS2_LOGIPS2PP=y
24613 +CONFIG_MOUSE_PS2_SYNAPTICS=y
24614 +CONFIG_MOUSE_PS2_LIFEBOOK=y
24615 +CONFIG_MOUSE_PS2_TRACKPOINT=y
24616 +# CONFIG_MOUSE_PS2_TOUCHKIT is not set
24617 +# CONFIG_MOUSE_SERIAL is not set
24618 +# CONFIG_MOUSE_VSXXXAA is not set
24619 +# CONFIG_INPUT_JOYSTICK is not set
24620 +# CONFIG_INPUT_TABLET is not set
24621 +# CONFIG_INPUT_TOUCHSCREEN is not set
24622 +# CONFIG_INPUT_MISC is not set
24625 +# Hardware I/O ports
24628 +CONFIG_SERIO_I8042=y
24629 +CONFIG_SERIO_SERPORT=y
24630 +CONFIG_SERIO_LIBPS2=y
24631 +# CONFIG_SERIO_RAW is not set
24632 +# CONFIG_GAMEPORT is not set
24635 +# Character devices
24637 +# CONFIG_VT is not set
24638 +# CONFIG_SERIAL_NONSTANDARD is not set
24643 +# CONFIG_SERIAL_8250 is not set
24646 +# Non-8250 serial port support
24648 +# CONFIG_SERIAL_UARTLITE is not set
24649 +CONFIG_SERIAL_CORE=y
24650 +CONFIG_SERIAL_CORE_CONSOLE=y
24651 +CONFIG_SERIAL_CPM=y
24652 +CONFIG_SERIAL_CPM_CONSOLE=y
24653 +# CONFIG_SERIAL_CPM_SCC1 is not set
24654 +# CONFIG_SERIAL_CPM_SCC2 is not set
24655 +# CONFIG_SERIAL_CPM_SCC3 is not set
24656 +# CONFIG_SERIAL_CPM_SCC4 is not set
24657 +CONFIG_SERIAL_CPM_SMC1=y
24658 +CONFIG_SERIAL_CPM_SMC2=y
24659 +CONFIG_UNIX98_PTYS=y
24660 +# CONFIG_LEGACY_PTYS is not set
24661 +# CONFIG_IPMI_HANDLER is not set
24662 +CONFIG_HW_RANDOM=y
24663 +# CONFIG_NVRAM is not set
24665 +# CONFIG_GEN_RTC_X is not set
24666 +# CONFIG_R3964 is not set
24667 +# CONFIG_RAW_DRIVER is not set
24668 +# CONFIG_TCG_TPM is not set
24669 +# CONFIG_I2C is not set
24674 +# CONFIG_SPI is not set
24675 +# CONFIG_SPI_MASTER is not set
24676 +# CONFIG_W1 is not set
24677 +# CONFIG_POWER_SUPPLY is not set
24678 +# CONFIG_HWMON is not set
24679 +# CONFIG_WATCHDOG is not set
24682 +# Sonics Silicon Backplane
24684 +CONFIG_SSB_POSSIBLE=y
24685 +# CONFIG_SSB is not set
24688 +# Multifunction device drivers
24690 +# CONFIG_MFD_SM501 is not set
24693 +# Multimedia devices
24695 +# CONFIG_VIDEO_DEV is not set
24696 +# CONFIG_DVB_CORE is not set
24700 +# Graphics support
24702 +# CONFIG_VGASTATE is not set
24703 +CONFIG_VIDEO_OUTPUT_CONTROL=y
24704 +# CONFIG_FB is not set
24705 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
24708 +# Display device support
24710 +# CONFIG_DISPLAY_SUPPORT is not set
24715 +# CONFIG_SOUND is not set
24716 +# CONFIG_HID_SUPPORT is not set
24717 +# CONFIG_USB_SUPPORT is not set
24718 +# CONFIG_MMC is not set
24719 +# CONFIG_NEW_LEDS is not set
24720 +# CONFIG_EDAC is not set
24721 +# CONFIG_RTC_CLASS is not set
24726 +# CONFIG_UIO is not set
24731 +# CONFIG_EXT2_FS is not set
24732 +# CONFIG_EXT3_FS is not set
24733 +# CONFIG_EXT4DEV_FS is not set
24734 +# CONFIG_REISERFS_FS is not set
24735 +# CONFIG_JFS_FS is not set
24736 +# CONFIG_FS_POSIX_ACL is not set
24737 +# CONFIG_XFS_FS is not set
24738 +# CONFIG_GFS2_FS is not set
24739 +# CONFIG_OCFS2_FS is not set
24740 +# CONFIG_MINIX_FS is not set
24741 +# CONFIG_ROMFS_FS is not set
24742 +# CONFIG_INOTIFY is not set
24743 +# CONFIG_QUOTA is not set
24744 +# CONFIG_DNOTIFY is not set
24745 +# CONFIG_AUTOFS_FS is not set
24746 +# CONFIG_AUTOFS4_FS is not set
24747 +# CONFIG_FUSE_FS is not set
24750 +# CD-ROM/DVD Filesystems
24752 +# CONFIG_ISO9660_FS is not set
24753 +# CONFIG_UDF_FS is not set
24756 +# DOS/FAT/NT Filesystems
24758 +# CONFIG_MSDOS_FS is not set
24759 +# CONFIG_VFAT_FS is not set
24760 +# CONFIG_NTFS_FS is not set
24763 +# Pseudo filesystems
24766 +# CONFIG_PROC_KCORE is not set
24767 +CONFIG_PROC_SYSCTL=y
24770 +# CONFIG_TMPFS_POSIX_ACL is not set
24771 +# CONFIG_HUGETLB_PAGE is not set
24772 +# CONFIG_CONFIGFS_FS is not set
24775 +# Miscellaneous filesystems
24777 +# CONFIG_ADFS_FS is not set
24778 +# CONFIG_AFFS_FS is not set
24779 +# CONFIG_HFS_FS is not set
24780 +# CONFIG_HFSPLUS_FS is not set
24781 +# CONFIG_BEFS_FS is not set
24782 +# CONFIG_BFS_FS is not set
24783 +# CONFIG_EFS_FS is not set
24784 +# CONFIG_JFFS2_FS is not set
24786 +# CONFIG_VXFS_FS is not set
24787 +# CONFIG_HPFS_FS is not set
24788 +# CONFIG_QNX4FS_FS is not set
24789 +# CONFIG_SYSV_FS is not set
24790 +# CONFIG_UFS_FS is not set
24791 +CONFIG_NETWORK_FILESYSTEMS=y
24794 +# CONFIG_NFS_V3_ACL is not set
24795 +# CONFIG_NFS_V4 is not set
24796 +# CONFIG_NFS_DIRECTIO is not set
24797 +# CONFIG_NFSD is not set
24801 +CONFIG_NFS_COMMON=y
24803 +# CONFIG_SUNRPC_BIND34 is not set
24804 +# CONFIG_RPCSEC_GSS_KRB5 is not set
24805 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
24806 +# CONFIG_SMB_FS is not set
24807 +# CONFIG_CIFS is not set
24808 +# CONFIG_NCP_FS is not set
24809 +# CONFIG_CODA_FS is not set
24810 +# CONFIG_AFS_FS is not set
24815 +CONFIG_PARTITION_ADVANCED=y
24816 +# CONFIG_ACORN_PARTITION is not set
24817 +# CONFIG_OSF_PARTITION is not set
24818 +# CONFIG_AMIGA_PARTITION is not set
24819 +# CONFIG_ATARI_PARTITION is not set
24820 +# CONFIG_MAC_PARTITION is not set
24821 +CONFIG_MSDOS_PARTITION=y
24822 +# CONFIG_BSD_DISKLABEL is not set
24823 +# CONFIG_MINIX_SUBPARTITION is not set
24824 +# CONFIG_SOLARIS_X86_PARTITION is not set
24825 +# CONFIG_UNIXWARE_DISKLABEL is not set
24826 +# CONFIG_LDM_PARTITION is not set
24827 +# CONFIG_SGI_PARTITION is not set
24828 +# CONFIG_ULTRIX_PARTITION is not set
24829 +# CONFIG_SUN_PARTITION is not set
24830 +# CONFIG_KARMA_PARTITION is not set
24831 +# CONFIG_EFI_PARTITION is not set
24832 +# CONFIG_SYSV68_PARTITION is not set
24833 +# CONFIG_NLS is not set
24834 +# CONFIG_DLM is not set
24835 +# CONFIG_UCC_SLOW is not set
24838 +# Library routines
24840 +# CONFIG_CRC_CCITT is not set
24841 +# CONFIG_CRC16 is not set
24842 +# CONFIG_CRC_ITU_T is not set
24843 +# CONFIG_CRC32 is not set
24844 +# CONFIG_CRC7 is not set
24845 +# CONFIG_LIBCRC32C is not set
24846 +CONFIG_ZLIB_INFLATE=y
24847 +CONFIG_HAS_IOMEM=y
24848 +CONFIG_HAS_IOPORT=y
24850 +CONFIG_INSTRUMENTATION=y
24851 +# CONFIG_PROFILING is not set
24852 +# CONFIG_MARKERS is not set
24857 +# CONFIG_PRINTK_TIME is not set
24858 +CONFIG_ENABLE_WARN_DEPRECATED=y
24859 +CONFIG_ENABLE_MUST_CHECK=y
24860 +CONFIG_MAGIC_SYSRQ=y
24861 +# CONFIG_UNUSED_SYMBOLS is not set
24862 +# CONFIG_DEBUG_FS is not set
24863 +# CONFIG_HEADERS_CHECK is not set
24864 +CONFIG_DEBUG_KERNEL=y
24865 +# CONFIG_DEBUG_SHIRQ is not set
24866 +CONFIG_DETECT_SOFTLOCKUP=y
24867 +CONFIG_SCHED_DEBUG=y
24868 +# CONFIG_SCHEDSTATS is not set
24869 +# CONFIG_TIMER_STATS is not set
24870 +# CONFIG_SLUB_DEBUG_ON is not set
24871 +# CONFIG_DEBUG_SPINLOCK is not set
24872 +# CONFIG_DEBUG_MUTEXES is not set
24873 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
24874 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
24875 +# CONFIG_DEBUG_KOBJECT is not set
24876 +CONFIG_DEBUG_BUGVERBOSE=y
24877 +CONFIG_DEBUG_INFO=y
24878 +# CONFIG_DEBUG_VM is not set
24879 +# CONFIG_DEBUG_LIST is not set
24880 +# CONFIG_DEBUG_SG is not set
24881 +CONFIG_FORCED_INLINING=y
24882 +# CONFIG_BOOT_PRINTK_DELAY is not set
24883 +# CONFIG_FAULT_INJECTION is not set
24884 +# CONFIG_SAMPLES is not set
24885 +# CONFIG_DEBUG_STACKOVERFLOW is not set
24886 +# CONFIG_DEBUG_STACK_USAGE is not set
24887 +# CONFIG_DEBUG_PAGEALLOC is not set
24888 +# CONFIG_DEBUGGER is not set
24889 +# CONFIG_BDI_SWITCH is not set
24890 +# CONFIG_PPC_EARLY_DEBUG is not set
24893 +# Security options
24895 +# CONFIG_KEYS is not set
24896 +# CONFIG_SECURITY is not set
24897 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
24898 +# CONFIG_CRYPTO is not set
24899 +# CONFIG_PPC_CLOCK is not set
24900 +CONFIG_PPC_LIB_RHEAP=y
24901 --- a/arch/powerpc/configs/bamboo_defconfig
24902 +++ b/arch/powerpc/configs/bamboo_defconfig
24905 # Automatically generated make config: don't edit
24906 -# Linux kernel version: 2.6.24-rc4
24907 -# Thu Dec 6 16:48:04 2007
24908 +# Linux kernel version: 2.6.24-rc6
24909 +# Mon Dec 24 10:49:50 2007
24911 # CONFIG_PPC64 is not set
24913 @@ -131,6 +131,7 @@
24914 # CONFIG_DEFAULT_CFQ is not set
24915 # CONFIG_DEFAULT_NOOP is not set
24916 CONFIG_DEFAULT_IOSCHED="anticipatory"
24917 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
24921 @@ -143,6 +144,9 @@
24923 # CONFIG_EBONY is not set
24924 # CONFIG_SEQUOIA is not set
24925 +# CONFIG_TAISHAN is not set
24926 +# CONFIG_KATMAI is not set
24927 +# CONFIG_RAINIER is not set
24929 CONFIG_IBM440EP_ERR42=y
24930 # CONFIG_MPIC is not set
24931 @@ -372,9 +376,7 @@
24932 # CONFIG_FIREWIRE is not set
24933 # CONFIG_IEEE1394 is not set
24934 # CONFIG_I2O is not set
24935 -CONFIG_MACINTOSH_DRIVERS=y
24936 -# CONFIG_MAC_EMUMOUSEBTN is not set
24937 -# CONFIG_WINDFARM is not set
24938 +# CONFIG_MACINTOSH_DRIVERS is not set
24939 CONFIG_NETDEVICES=y
24940 # CONFIG_NETDEVICES_MULTIQUEUE is not set
24941 # CONFIG_DUMMY is not set
24942 @@ -736,19 +738,7 @@
24943 # CONFIG_KGDB is not set
24944 # CONFIG_XMON is not set
24945 # CONFIG_BDI_SWITCH is not set
24946 -CONFIG_PPC_EARLY_DEBUG=y
24947 -# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
24948 -# CONFIG_PPC_EARLY_DEBUG_G5 is not set
24949 -# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
24950 -# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
24951 -# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
24952 -# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
24953 -# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
24954 -# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
24955 -CONFIG_PPC_EARLY_DEBUG_44x=y
24956 -# CONFIG_PPC_EARLY_DEBUG_CPM is not set
24957 -CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
24958 -CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x0
24959 +# CONFIG_PPC_EARLY_DEBUG is not set
24963 --- a/arch/powerpc/configs/celleb_defconfig
24964 +++ b/arch/powerpc/configs/celleb_defconfig
24966 CONFIG_GENERIC_BUG=y
24967 # CONFIG_DEFAULT_UIMAGE is not set
24968 # CONFIG_PPC_DCR_NATIVE is not set
24969 -# CONFIG_PPC_DCR_MMIO is not set
24970 +CONFIG_PPC_DCR_MMIO=y
24972 CONFIG_PPC_OF_PLATFORM_PCI=y
24973 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24975 @@ -148,7 +149,7 @@
24976 CONFIG_PPC_CELLEB=y
24977 # CONFIG_PPC_PS3 is not set
24979 -# CONFIG_PPC_CELL_NATIVE is not set
24980 +CONFIG_PPC_CELL_NATIVE=y
24981 # CONFIG_PPC_IBM_CELL_BLADE is not set
24984 @@ -157,13 +158,19 @@
24986 CONFIG_SPU_FS_64K_LS=y
24989 +# CONFIG_CBE_THERM is not set
24990 # CONFIG_PQ2ADS is not set
24991 +CONFIG_PPC_NATIVE=y
24992 +CONFIG_UDBG_RTAS_CONSOLE=y
24993 CONFIG_PPC_UDBG_BEAT=y
24994 -# CONFIG_MPIC is not set
24996 # CONFIG_MPIC_WEIRD is not set
24997 # CONFIG_PPC_I8259 is not set
24998 # CONFIG_U3_DART is not set
24999 -# CONFIG_PPC_RTAS is not set
25001 +# CONFIG_RTAS_ERROR_LOGGING is not set
25002 +# CONFIG_RTAS_PROC is not set
25003 # CONFIG_MMIO_NVRAM is not set
25004 # CONFIG_PPC_MPC106 is not set
25005 # CONFIG_PPC_970_NAP is not set
25006 @@ -593,10 +600,11 @@
25007 # CONFIG_NET_VENDOR_3COM is not set
25008 # CONFIG_NET_TULIP is not set
25009 # CONFIG_HP100 is not set
25010 -# CONFIG_IBM_NEW_EMAC_ZMII is not set
25011 -# CONFIG_IBM_NEW_EMAC_RGMII is not set
25012 -# CONFIG_IBM_NEW_EMAC_TAH is not set
25013 -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
25014 +# CONFIG_IBM_NEW_EMAC is not set
25015 +CONFIG_IBM_NEW_EMAC_ZMII=y
25016 +CONFIG_IBM_NEW_EMAC_RGMII=y
25017 +CONFIG_IBM_NEW_EMAC_TAH=y
25018 +CONFIG_IBM_NEW_EMAC_EMAC4=y
25019 # CONFIG_NET_PCI is not set
25020 # CONFIG_B44 is not set
25021 CONFIG_NETDEV_1000=y
25022 @@ -741,6 +749,7 @@
25023 CONFIG_UNIX98_PTYS=y
25024 # CONFIG_LEGACY_PTYS is not set
25025 CONFIG_HVC_DRIVER=y
25028 # CONFIG_IPMI_HANDLER is not set
25029 # CONFIG_HW_RANDOM is not set
25030 @@ -822,6 +831,7 @@
25031 # Watchdog Device Drivers
25033 # CONFIG_SOFT_WATCHDOG is not set
25034 +# CONFIG_WATCHDOG_RTAS is not set
25037 # PCI-based Watchdog Cards
25038 @@ -1245,17 +1255,7 @@
25040 # CONFIG_VIRQ_DEBUG is not set
25041 # CONFIG_BOOTX_TEXT is not set
25042 -CONFIG_PPC_EARLY_DEBUG=y
25043 -# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
25044 -# CONFIG_PPC_EARLY_DEBUG_G5 is not set
25045 -# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
25046 -# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
25047 -# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
25048 -# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
25049 -# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
25050 -CONFIG_PPC_EARLY_DEBUG_BEAT=y
25051 -# CONFIG_PPC_EARLY_DEBUG_44x is not set
25052 -# CONFIG_PPC_EARLY_DEBUG_CPM is not set
25053 +# CONFIG_PPC_EARLY_DEBUG is not set
25057 --- a/arch/powerpc/configs/ebony_defconfig
25058 +++ b/arch/powerpc/configs/ebony_defconfig
25061 # Automatically generated make config: don't edit
25062 -# Linux kernel version: 2.6.24-rc4
25063 -# Thu Dec 6 16:48:11 2007
25064 +# Linux kernel version: 2.6.24-rc6
25065 +# Mon Dec 24 11:16:26 2007
25067 # CONFIG_PPC64 is not set
25069 @@ -130,6 +130,7 @@
25070 # CONFIG_DEFAULT_CFQ is not set
25071 # CONFIG_DEFAULT_NOOP is not set
25072 CONFIG_DEFAULT_IOSCHED="anticipatory"
25073 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
25077 @@ -142,6 +143,9 @@
25078 # CONFIG_BAMBOO is not set
25080 # CONFIG_SEQUOIA is not set
25081 +# CONFIG_TAISHAN is not set
25082 +# CONFIG_KATMAI is not set
25083 +# CONFIG_RAINIER is not set
25085 # CONFIG_MPIC is not set
25086 # CONFIG_MPIC_WEIRD is not set
25088 +++ b/arch/powerpc/configs/ep405_defconfig
25091 +# Automatically generated make config: don't edit
25092 +# Linux kernel version: 2.6.24-rc6
25093 +# Mon Dec 24 11:17:13 2007
25095 +# CONFIG_PPC64 is not set
25098 +# Processor support
25100 +# CONFIG_6xx is not set
25101 +# CONFIG_PPC_85xx is not set
25102 +# CONFIG_PPC_8xx is not set
25104 +# CONFIG_44x is not set
25105 +# CONFIG_E200 is not set
25107 +# CONFIG_PPC_MM_SLICES is not set
25108 +CONFIG_NOT_COHERENT_CACHE=y
25110 +CONFIG_WORD_SIZE=32
25111 +CONFIG_PPC_MERGE=y
25113 +CONFIG_GENERIC_CMOS_UPDATE=y
25114 +CONFIG_GENERIC_TIME=y
25115 +CONFIG_GENERIC_TIME_VSYSCALL=y
25116 +CONFIG_GENERIC_CLOCKEVENTS=y
25117 +CONFIG_GENERIC_HARDIRQS=y
25118 +CONFIG_IRQ_PER_CPU=y
25119 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
25120 +CONFIG_ARCH_HAS_ILOG2_U32=y
25121 +CONFIG_GENERIC_HWEIGHT=y
25122 +CONFIG_GENERIC_CALIBRATE_DELAY=y
25123 +CONFIG_GENERIC_FIND_NEXT_BIT=y
25124 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
25126 +CONFIG_EARLY_PRINTK=y
25127 +CONFIG_GENERIC_NVRAM=y
25128 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
25129 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
25132 +CONFIG_PPC_UDBG_16550=y
25133 +# CONFIG_GENERIC_TBSYNC is not set
25134 +CONFIG_AUDIT_ARCH=y
25135 +CONFIG_GENERIC_BUG=y
25136 +# CONFIG_DEFAULT_UIMAGE is not set
25137 +CONFIG_PPC_DCR_NATIVE=y
25138 +# CONFIG_PPC_DCR_MMIO is not set
25140 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
25145 +CONFIG_EXPERIMENTAL=y
25146 +CONFIG_BROKEN_ON_SMP=y
25147 +CONFIG_INIT_ENV_ARG_LIMIT=32
25148 +CONFIG_LOCALVERSION=""
25149 +CONFIG_LOCALVERSION_AUTO=y
25152 +CONFIG_SYSVIPC_SYSCTL=y
25153 +CONFIG_POSIX_MQUEUE=y
25154 +# CONFIG_BSD_PROCESS_ACCT is not set
25155 +# CONFIG_TASKSTATS is not set
25156 +# CONFIG_USER_NS is not set
25157 +# CONFIG_PID_NS is not set
25158 +# CONFIG_AUDIT is not set
25159 +# CONFIG_IKCONFIG is not set
25160 +CONFIG_LOG_BUF_SHIFT=14
25161 +# CONFIG_CGROUPS is not set
25162 +CONFIG_FAIR_GROUP_SCHED=y
25163 +CONFIG_FAIR_USER_SCHED=y
25164 +# CONFIG_FAIR_CGROUP_SCHED is not set
25165 +CONFIG_SYSFS_DEPRECATED=y
25166 +# CONFIG_RELAY is not set
25167 +CONFIG_BLK_DEV_INITRD=y
25168 +CONFIG_INITRAMFS_SOURCE=""
25169 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
25172 +CONFIG_SYSCTL_SYSCALL=y
25174 +CONFIG_KALLSYMS_ALL=y
25175 +CONFIG_KALLSYMS_EXTRA_PASS=y
25180 +CONFIG_BASE_FULL=y
25182 +CONFIG_ANON_INODES=y
25187 +CONFIG_VM_EVENT_COUNTERS=y
25188 +CONFIG_SLUB_DEBUG=y
25189 +# CONFIG_SLAB is not set
25191 +# CONFIG_SLOB is not set
25192 +CONFIG_RT_MUTEXES=y
25193 +# CONFIG_TINY_SHMEM is not set
25194 +CONFIG_BASE_SMALL=0
25196 +CONFIG_MODULE_UNLOAD=y
25197 +# CONFIG_MODULE_FORCE_UNLOAD is not set
25198 +# CONFIG_MODVERSIONS is not set
25199 +# CONFIG_MODULE_SRCVERSION_ALL is not set
25203 +# CONFIG_BLK_DEV_IO_TRACE is not set
25204 +# CONFIG_LSF is not set
25205 +# CONFIG_BLK_DEV_BSG is not set
25210 +CONFIG_IOSCHED_NOOP=y
25211 +CONFIG_IOSCHED_AS=y
25212 +CONFIG_IOSCHED_DEADLINE=y
25213 +CONFIG_IOSCHED_CFQ=y
25214 +CONFIG_DEFAULT_AS=y
25215 +# CONFIG_DEFAULT_DEADLINE is not set
25216 +# CONFIG_DEFAULT_CFQ is not set
25217 +# CONFIG_DEFAULT_NOOP is not set
25218 +CONFIG_DEFAULT_IOSCHED="anticipatory"
25219 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
25222 +# Platform support
25224 +# CONFIG_PPC_MPC52xx is not set
25225 +# CONFIG_PPC_MPC5200 is not set
25226 +# CONFIG_PPC_CELL is not set
25227 +# CONFIG_PPC_CELL_NATIVE is not set
25228 +# CONFIG_PQ2ADS is not set
25230 +# CONFIG_KILAUEA is not set
25231 +# CONFIG_MAKALU is not set
25232 +# CONFIG_WALNUT is not set
25233 +# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
25235 +CONFIG_IBM405_ERR77=y
25236 +CONFIG_IBM405_ERR51=y
25237 +# CONFIG_MPIC is not set
25238 +# CONFIG_MPIC_WEIRD is not set
25239 +# CONFIG_PPC_I8259 is not set
25240 +# CONFIG_PPC_RTAS is not set
25241 +# CONFIG_MMIO_NVRAM is not set
25242 +# CONFIG_PPC_MPC106 is not set
25243 +# CONFIG_PPC_970_NAP is not set
25244 +# CONFIG_PPC_INDIRECT_IO is not set
25245 +# CONFIG_GENERIC_IOMAP is not set
25246 +# CONFIG_CPU_FREQ is not set
25247 +# CONFIG_CPM2 is not set
25248 +# CONFIG_FSL_ULI1575 is not set
25253 +# CONFIG_HIGHMEM is not set
25254 +# CONFIG_TICK_ONESHOT is not set
25255 +# CONFIG_NO_HZ is not set
25256 +# CONFIG_HIGH_RES_TIMERS is not set
25257 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
25258 +# CONFIG_HZ_100 is not set
25260 +# CONFIG_HZ_300 is not set
25261 +# CONFIG_HZ_1000 is not set
25263 +CONFIG_PREEMPT_NONE=y
25264 +# CONFIG_PREEMPT_VOLUNTARY is not set
25265 +# CONFIG_PREEMPT is not set
25266 +CONFIG_BINFMT_ELF=y
25267 +# CONFIG_BINFMT_MISC is not set
25268 +# CONFIG_MATH_EMULATION is not set
25269 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
25270 +CONFIG_ARCH_FLATMEM_ENABLE=y
25271 +CONFIG_ARCH_POPULATES_NODE_MAP=y
25272 +CONFIG_SELECT_MEMORY_MODEL=y
25273 +CONFIG_FLATMEM_MANUAL=y
25274 +# CONFIG_DISCONTIGMEM_MANUAL is not set
25275 +# CONFIG_SPARSEMEM_MANUAL is not set
25277 +CONFIG_FLAT_NODE_MEM_MAP=y
25278 +# CONFIG_SPARSEMEM_STATIC is not set
25279 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
25280 +CONFIG_SPLIT_PTLOCK_CPUS=4
25281 +# CONFIG_RESOURCES_64BIT is not set
25282 +CONFIG_ZONE_DMA_FLAG=1
25284 +CONFIG_VIRT_TO_BUS=y
25285 +CONFIG_PROC_DEVICETREE=y
25286 +# CONFIG_CMDLINE_BOOL is not set
25287 +# CONFIG_PM is not set
25288 +CONFIG_SUSPEND_UP_POSSIBLE=y
25289 +CONFIG_HIBERNATION_UP_POSSIBLE=y
25291 +CONFIG_WANT_DEVICE_TREE=y
25292 +CONFIG_DEVICE_TREE="ep405.dts"
25293 +CONFIG_ISA_DMA_API=y
25299 +CONFIG_PPC_INDIRECT_PCI=y
25301 +CONFIG_PCI_DOMAINS=y
25302 +CONFIG_PCI_SYSCALL=y
25303 +# CONFIG_PCIEPORTBUS is not set
25304 +CONFIG_ARCH_SUPPORTS_MSI=y
25305 +# CONFIG_PCI_MSI is not set
25306 +CONFIG_PCI_LEGACY=y
25307 +# CONFIG_PCI_DEBUG is not set
25308 +# CONFIG_PCCARD is not set
25309 +# CONFIG_HOTPLUG_PCI is not set
25314 +# CONFIG_ADVANCED_OPTIONS is not set
25317 +# Default settings for advanced configuration options are used
25319 +CONFIG_HIGHMEM_START=0xfe000000
25320 +CONFIG_LOWMEM_SIZE=0x30000000
25321 +CONFIG_KERNEL_START=0xc0000000
25322 +CONFIG_TASK_SIZE=0xc0000000
25323 +CONFIG_CONSISTENT_START=0xff100000
25324 +CONFIG_CONSISTENT_SIZE=0x00200000
25325 +CONFIG_BOOT_LOAD=0x00400000
25333 +# Networking options
25336 +# CONFIG_PACKET_MMAP is not set
25338 +# CONFIG_NET_KEY is not set
25340 +# CONFIG_IP_MULTICAST is not set
25341 +# CONFIG_IP_ADVANCED_ROUTER is not set
25342 +CONFIG_IP_FIB_HASH=y
25344 +CONFIG_IP_PNP_DHCP=y
25345 +CONFIG_IP_PNP_BOOTP=y
25346 +# CONFIG_IP_PNP_RARP is not set
25347 +# CONFIG_NET_IPIP is not set
25348 +# CONFIG_NET_IPGRE is not set
25349 +# CONFIG_ARPD is not set
25350 +# CONFIG_SYN_COOKIES is not set
25351 +# CONFIG_INET_AH is not set
25352 +# CONFIG_INET_ESP is not set
25353 +# CONFIG_INET_IPCOMP is not set
25354 +# CONFIG_INET_XFRM_TUNNEL is not set
25355 +# CONFIG_INET_TUNNEL is not set
25356 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
25357 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
25358 +# CONFIG_INET_XFRM_MODE_BEET is not set
25359 +# CONFIG_INET_LRO is not set
25360 +CONFIG_INET_DIAG=y
25361 +CONFIG_INET_TCP_DIAG=y
25362 +# CONFIG_TCP_CONG_ADVANCED is not set
25363 +CONFIG_TCP_CONG_CUBIC=y
25364 +CONFIG_DEFAULT_TCP_CONG="cubic"
25365 +# CONFIG_TCP_MD5SIG is not set
25366 +# CONFIG_IPV6 is not set
25367 +# CONFIG_INET6_XFRM_TUNNEL is not set
25368 +# CONFIG_INET6_TUNNEL is not set
25369 +# CONFIG_NETWORK_SECMARK is not set
25370 +# CONFIG_NETFILTER is not set
25371 +# CONFIG_IP_DCCP is not set
25372 +# CONFIG_IP_SCTP is not set
25373 +# CONFIG_TIPC is not set
25374 +# CONFIG_ATM is not set
25375 +# CONFIG_BRIDGE is not set
25376 +# CONFIG_VLAN_8021Q is not set
25377 +# CONFIG_DECNET is not set
25378 +# CONFIG_LLC2 is not set
25379 +# CONFIG_IPX is not set
25380 +# CONFIG_ATALK is not set
25381 +# CONFIG_X25 is not set
25382 +# CONFIG_LAPB is not set
25383 +# CONFIG_ECONET is not set
25384 +# CONFIG_WAN_ROUTER is not set
25385 +# CONFIG_NET_SCHED is not set
25390 +# CONFIG_NET_PKTGEN is not set
25391 +# CONFIG_HAMRADIO is not set
25392 +# CONFIG_IRDA is not set
25393 +# CONFIG_BT is not set
25394 +# CONFIG_AF_RXRPC is not set
25399 +# CONFIG_CFG80211 is not set
25400 +# CONFIG_WIRELESS_EXT is not set
25401 +# CONFIG_MAC80211 is not set
25402 +# CONFIG_IEEE80211 is not set
25403 +# CONFIG_RFKILL is not set
25404 +# CONFIG_NET_9P is not set
25411 +# Generic Driver Options
25413 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
25414 +CONFIG_STANDALONE=y
25415 +CONFIG_PREVENT_FIRMWARE_BUILD=y
25416 +CONFIG_FW_LOADER=y
25417 +# CONFIG_DEBUG_DRIVER is not set
25418 +# CONFIG_DEBUG_DEVRES is not set
25419 +# CONFIG_SYS_HYPERVISOR is not set
25420 +CONFIG_CONNECTOR=y
25421 +CONFIG_PROC_EVENTS=y
25423 +# CONFIG_MTD_DEBUG is not set
25424 +# CONFIG_MTD_CONCAT is not set
25425 +CONFIG_MTD_PARTITIONS=y
25426 +# CONFIG_MTD_REDBOOT_PARTS is not set
25427 +CONFIG_MTD_CMDLINE_PARTS=y
25430 +# User Modules And Translation Layers
25433 +CONFIG_MTD_BLKDEVS=m
25434 +CONFIG_MTD_BLOCK=m
25435 +# CONFIG_MTD_BLOCK_RO is not set
25436 +# CONFIG_FTL is not set
25437 +# CONFIG_NFTL is not set
25438 +# CONFIG_INFTL is not set
25439 +# CONFIG_RFD_FTL is not set
25440 +# CONFIG_SSFDC is not set
25441 +# CONFIG_MTD_OOPS is not set
25444 +# RAM/ROM/Flash chip drivers
25447 +CONFIG_MTD_JEDECPROBE=y
25448 +CONFIG_MTD_GEN_PROBE=y
25449 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
25450 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
25451 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
25452 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
25453 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
25454 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
25455 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
25456 +CONFIG_MTD_CFI_I1=y
25457 +CONFIG_MTD_CFI_I2=y
25458 +# CONFIG_MTD_CFI_I4 is not set
25459 +# CONFIG_MTD_CFI_I8 is not set
25460 +# CONFIG_MTD_CFI_INTELEXT is not set
25461 +CONFIG_MTD_CFI_AMDSTD=y
25462 +# CONFIG_MTD_CFI_STAA is not set
25463 +CONFIG_MTD_CFI_UTIL=y
25464 +# CONFIG_MTD_RAM is not set
25465 +# CONFIG_MTD_ROM is not set
25466 +# CONFIG_MTD_ABSENT is not set
25469 +# Mapping drivers for chip access
25471 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
25472 +# CONFIG_MTD_PHYSMAP is not set
25473 +CONFIG_MTD_PHYSMAP_OF=y
25474 +# CONFIG_MTD_INTEL_VR_NOR is not set
25475 +# CONFIG_MTD_PLATRAM is not set
25478 +# Self-contained MTD device drivers
25480 +# CONFIG_MTD_PMC551 is not set
25481 +# CONFIG_MTD_SLRAM is not set
25482 +# CONFIG_MTD_PHRAM is not set
25483 +# CONFIG_MTD_MTDRAM is not set
25484 +# CONFIG_MTD_BLOCK2MTD is not set
25487 +# Disk-On-Chip Device Drivers
25489 +# CONFIG_MTD_DOC2000 is not set
25490 +# CONFIG_MTD_DOC2001 is not set
25491 +# CONFIG_MTD_DOC2001PLUS is not set
25492 +# CONFIG_MTD_NAND is not set
25493 +# CONFIG_MTD_ONENAND is not set
25496 +# UBI - Unsorted block images
25498 +# CONFIG_MTD_UBI is not set
25499 +CONFIG_OF_DEVICE=y
25500 +# CONFIG_PARPORT is not set
25502 +# CONFIG_BLK_DEV_FD is not set
25503 +# CONFIG_BLK_CPQ_DA is not set
25504 +# CONFIG_BLK_CPQ_CISS_DA is not set
25505 +# CONFIG_BLK_DEV_DAC960 is not set
25506 +# CONFIG_BLK_DEV_UMEM is not set
25507 +# CONFIG_BLK_DEV_COW_COMMON is not set
25508 +# CONFIG_BLK_DEV_LOOP is not set
25509 +# CONFIG_BLK_DEV_NBD is not set
25510 +# CONFIG_BLK_DEV_SX8 is not set
25511 +# CONFIG_BLK_DEV_UB is not set
25512 +CONFIG_BLK_DEV_RAM=y
25513 +CONFIG_BLK_DEV_RAM_COUNT=16
25514 +CONFIG_BLK_DEV_RAM_SIZE=35000
25515 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
25516 +# CONFIG_CDROM_PKTCDVD is not set
25517 +# CONFIG_ATA_OVER_ETH is not set
25518 +# CONFIG_XILINX_SYSACE is not set
25519 +CONFIG_MISC_DEVICES=y
25520 +# CONFIG_PHANTOM is not set
25521 +# CONFIG_EEPROM_93CX6 is not set
25522 +# CONFIG_SGI_IOC4 is not set
25523 +# CONFIG_TIFM_CORE is not set
25524 +# CONFIG_IDE is not set
25527 +# SCSI device support
25529 +# CONFIG_RAID_ATTRS is not set
25530 +# CONFIG_SCSI is not set
25531 +# CONFIG_SCSI_DMA is not set
25532 +# CONFIG_SCSI_NETLINK is not set
25533 +# CONFIG_ATA is not set
25534 +# CONFIG_MD is not set
25535 +# CONFIG_FUSION is not set
25538 +# IEEE 1394 (FireWire) support
25540 +# CONFIG_FIREWIRE is not set
25541 +# CONFIG_IEEE1394 is not set
25542 +# CONFIG_I2O is not set
25543 +# CONFIG_MACINTOSH_DRIVERS is not set
25544 +CONFIG_NETDEVICES=y
25545 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
25546 +# CONFIG_DUMMY is not set
25547 +# CONFIG_BONDING is not set
25548 +# CONFIG_MACVLAN is not set
25549 +# CONFIG_EQUALIZER is not set
25550 +# CONFIG_TUN is not set
25551 +# CONFIG_VETH is not set
25552 +# CONFIG_IP1000 is not set
25553 +# CONFIG_ARCNET is not set
25554 +# CONFIG_PHYLIB is not set
25555 +CONFIG_NET_ETHERNET=y
25556 +# CONFIG_MII is not set
25557 +# CONFIG_HAPPYMEAL is not set
25558 +# CONFIG_SUNGEM is not set
25559 +# CONFIG_CASSINI is not set
25560 +# CONFIG_NET_VENDOR_3COM is not set
25561 +# CONFIG_NET_TULIP is not set
25562 +# CONFIG_HP100 is not set
25563 +CONFIG_IBM_NEW_EMAC=y
25564 +CONFIG_IBM_NEW_EMAC_RXB=128
25565 +CONFIG_IBM_NEW_EMAC_TXB=64
25566 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
25567 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
25568 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
25569 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
25570 +CONFIG_IBM_NEW_EMAC_ZMII=y
25571 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
25572 +# CONFIG_IBM_NEW_EMAC_TAH is not set
25573 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
25574 +# CONFIG_NET_PCI is not set
25575 +# CONFIG_B44 is not set
25576 +CONFIG_NETDEV_1000=y
25577 +# CONFIG_ACENIC is not set
25578 +# CONFIG_DL2K is not set
25579 +# CONFIG_E1000 is not set
25580 +# CONFIG_E1000E is not set
25581 +# CONFIG_NS83820 is not set
25582 +# CONFIG_HAMACHI is not set
25583 +# CONFIG_YELLOWFIN is not set
25584 +# CONFIG_R8169 is not set
25585 +# CONFIG_SIS190 is not set
25586 +# CONFIG_SKGE is not set
25587 +# CONFIG_SKY2 is not set
25588 +# CONFIG_SK98LIN is not set
25589 +# CONFIG_VIA_VELOCITY is not set
25590 +# CONFIG_TIGON3 is not set
25591 +# CONFIG_BNX2 is not set
25592 +# CONFIG_QLA3XXX is not set
25593 +# CONFIG_ATL1 is not set
25594 +CONFIG_NETDEV_10000=y
25595 +# CONFIG_CHELSIO_T1 is not set
25596 +# CONFIG_CHELSIO_T3 is not set
25597 +# CONFIG_IXGBE is not set
25598 +# CONFIG_IXGB is not set
25599 +# CONFIG_S2IO is not set
25600 +# CONFIG_MYRI10GE is not set
25601 +# CONFIG_NETXEN_NIC is not set
25602 +# CONFIG_NIU is not set
25603 +# CONFIG_MLX4_CORE is not set
25604 +# CONFIG_TEHUTI is not set
25605 +# CONFIG_TR is not set
25610 +# CONFIG_WLAN_PRE80211 is not set
25611 +# CONFIG_WLAN_80211 is not set
25614 +# USB Network Adapters
25616 +# CONFIG_USB_CATC is not set
25617 +# CONFIG_USB_KAWETH is not set
25618 +# CONFIG_USB_PEGASUS is not set
25619 +# CONFIG_USB_RTL8150 is not set
25620 +# CONFIG_USB_USBNET is not set
25621 +# CONFIG_WAN is not set
25622 +# CONFIG_FDDI is not set
25623 +# CONFIG_HIPPI is not set
25624 +# CONFIG_PPP is not set
25625 +# CONFIG_SLIP is not set
25626 +# CONFIG_SHAPER is not set
25627 +# CONFIG_NETCONSOLE is not set
25628 +# CONFIG_NETPOLL is not set
25629 +# CONFIG_NET_POLL_CONTROLLER is not set
25630 +# CONFIG_ISDN is not set
25631 +# CONFIG_PHONE is not set
25634 +# Input device support
25636 +# CONFIG_INPUT is not set
25639 +# Hardware I/O ports
25641 +# CONFIG_SERIO is not set
25642 +# CONFIG_GAMEPORT is not set
25645 +# Character devices
25647 +# CONFIG_VT is not set
25648 +# CONFIG_SERIAL_NONSTANDARD is not set
25653 +CONFIG_SERIAL_8250=y
25654 +CONFIG_SERIAL_8250_CONSOLE=y
25655 +CONFIG_SERIAL_8250_PCI=y
25656 +CONFIG_SERIAL_8250_NR_UARTS=4
25657 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
25658 +CONFIG_SERIAL_8250_EXTENDED=y
25659 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
25660 +CONFIG_SERIAL_8250_SHARE_IRQ=y
25661 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
25662 +# CONFIG_SERIAL_8250_RSA is not set
25665 +# Non-8250 serial port support
25667 +# CONFIG_SERIAL_UARTLITE is not set
25668 +CONFIG_SERIAL_CORE=y
25669 +CONFIG_SERIAL_CORE_CONSOLE=y
25670 +# CONFIG_SERIAL_JSM is not set
25671 +CONFIG_SERIAL_OF_PLATFORM=y
25672 +CONFIG_UNIX98_PTYS=y
25673 +CONFIG_LEGACY_PTYS=y
25674 +CONFIG_LEGACY_PTY_COUNT=256
25675 +# CONFIG_IPMI_HANDLER is not set
25676 +# CONFIG_HW_RANDOM is not set
25677 +# CONFIG_NVRAM is not set
25678 +# CONFIG_GEN_RTC is not set
25679 +# CONFIG_R3964 is not set
25680 +# CONFIG_APPLICOM is not set
25681 +# CONFIG_RAW_DRIVER is not set
25682 +# CONFIG_TCG_TPM is not set
25684 +# CONFIG_I2C is not set
25689 +# CONFIG_SPI is not set
25690 +# CONFIG_SPI_MASTER is not set
25691 +# CONFIG_W1 is not set
25692 +# CONFIG_POWER_SUPPLY is not set
25693 +# CONFIG_HWMON is not set
25694 +# CONFIG_WATCHDOG is not set
25697 +# Sonics Silicon Backplane
25699 +CONFIG_SSB_POSSIBLE=y
25700 +# CONFIG_SSB is not set
25703 +# Multifunction device drivers
25705 +# CONFIG_MFD_SM501 is not set
25708 +# Multimedia devices
25710 +# CONFIG_VIDEO_DEV is not set
25711 +# CONFIG_DVB_CORE is not set
25712 +# CONFIG_DAB is not set
25715 +# Graphics support
25717 +# CONFIG_AGP is not set
25718 +# CONFIG_DRM is not set
25719 +# CONFIG_VGASTATE is not set
25720 +CONFIG_VIDEO_OUTPUT_CONTROL=m
25721 +# CONFIG_FB is not set
25722 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
25725 +# Display device support
25727 +# CONFIG_DISPLAY_SUPPORT is not set
25732 +# CONFIG_SOUND is not set
25733 +CONFIG_USB_SUPPORT=y
25734 +CONFIG_USB_ARCH_HAS_HCD=y
25735 +CONFIG_USB_ARCH_HAS_OHCI=y
25736 +CONFIG_USB_ARCH_HAS_EHCI=y
25738 +# CONFIG_USB_DEBUG is not set
25741 +# Miscellaneous USB options
25743 +CONFIG_USB_DEVICEFS=y
25744 +CONFIG_USB_DEVICE_CLASS=y
25745 +# CONFIG_USB_DYNAMIC_MINORS is not set
25746 +# CONFIG_USB_OTG is not set
25749 +# USB Host Controller Drivers
25751 +# CONFIG_USB_EHCI_HCD is not set
25752 +# CONFIG_USB_ISP116X_HCD is not set
25753 +CONFIG_USB_OHCI_HCD=y
25754 +CONFIG_USB_OHCI_HCD_PPC_OF=y
25755 +CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
25756 +CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
25757 +CONFIG_USB_OHCI_HCD_PCI=y
25758 +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
25759 +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
25760 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
25761 +# CONFIG_USB_UHCI_HCD is not set
25762 +# CONFIG_USB_SL811_HCD is not set
25763 +# CONFIG_USB_R8A66597_HCD is not set
25766 +# USB Device Class drivers
25768 +# CONFIG_USB_ACM is not set
25769 +# CONFIG_USB_PRINTER is not set
25772 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
25776 +# may also be needed; see USB_STORAGE Help for more information
25778 +# CONFIG_USB_LIBUSUAL is not set
25781 +# USB Imaging devices
25783 +# CONFIG_USB_MDC800 is not set
25787 +# USB port drivers
25791 +# USB Serial Converter support
25793 +# CONFIG_USB_SERIAL is not set
25796 +# USB Miscellaneous drivers
25798 +# CONFIG_USB_EMI62 is not set
25799 +# CONFIG_USB_EMI26 is not set
25800 +# CONFIG_USB_ADUTUX is not set
25801 +# CONFIG_USB_AUERSWALD is not set
25802 +# CONFIG_USB_RIO500 is not set
25803 +# CONFIG_USB_LEGOTOWER is not set
25804 +# CONFIG_USB_LCD is not set
25805 +# CONFIG_USB_BERRY_CHARGE is not set
25806 +# CONFIG_USB_LED is not set
25807 +# CONFIG_USB_CYPRESS_CY7C63 is not set
25808 +# CONFIG_USB_CYTHERM is not set
25809 +# CONFIG_USB_PHIDGET is not set
25810 +# CONFIG_USB_IDMOUSE is not set
25811 +# CONFIG_USB_FTDI_ELAN is not set
25812 +# CONFIG_USB_APPLEDISPLAY is not set
25813 +# CONFIG_USB_LD is not set
25814 +# CONFIG_USB_TRANCEVIBRATOR is not set
25815 +# CONFIG_USB_IOWARRIOR is not set
25816 +# CONFIG_USB_TEST is not set
25819 +# USB DSL modem support
25823 +# USB Gadget Support
25825 +# CONFIG_USB_GADGET is not set
25826 +# CONFIG_MMC is not set
25827 +# CONFIG_NEW_LEDS is not set
25828 +# CONFIG_INFINIBAND is not set
25829 +# CONFIG_EDAC is not set
25830 +# CONFIG_RTC_CLASS is not set
25835 +# CONFIG_UIO is not set
25841 +# CONFIG_EXT2_FS_XATTR is not set
25842 +# CONFIG_EXT2_FS_XIP is not set
25843 +# CONFIG_EXT3_FS is not set
25844 +# CONFIG_EXT4DEV_FS is not set
25845 +# CONFIG_REISERFS_FS is not set
25846 +# CONFIG_JFS_FS is not set
25847 +# CONFIG_FS_POSIX_ACL is not set
25848 +# CONFIG_XFS_FS is not set
25849 +# CONFIG_GFS2_FS is not set
25850 +# CONFIG_OCFS2_FS is not set
25851 +# CONFIG_MINIX_FS is not set
25852 +# CONFIG_ROMFS_FS is not set
25854 +CONFIG_INOTIFY_USER=y
25855 +# CONFIG_QUOTA is not set
25857 +# CONFIG_AUTOFS_FS is not set
25858 +# CONFIG_AUTOFS4_FS is not set
25859 +# CONFIG_FUSE_FS is not set
25862 +# CD-ROM/DVD Filesystems
25864 +# CONFIG_ISO9660_FS is not set
25865 +# CONFIG_UDF_FS is not set
25868 +# DOS/FAT/NT Filesystems
25870 +# CONFIG_MSDOS_FS is not set
25871 +# CONFIG_VFAT_FS is not set
25872 +# CONFIG_NTFS_FS is not set
25875 +# Pseudo filesystems
25878 +CONFIG_PROC_KCORE=y
25879 +CONFIG_PROC_SYSCTL=y
25882 +# CONFIG_TMPFS_POSIX_ACL is not set
25883 +# CONFIG_HUGETLB_PAGE is not set
25884 +# CONFIG_CONFIGFS_FS is not set
25887 +# Miscellaneous filesystems
25889 +# CONFIG_ADFS_FS is not set
25890 +# CONFIG_AFFS_FS is not set
25891 +# CONFIG_HFS_FS is not set
25892 +# CONFIG_HFSPLUS_FS is not set
25893 +# CONFIG_BEFS_FS is not set
25894 +# CONFIG_BFS_FS is not set
25895 +# CONFIG_EFS_FS is not set
25896 +# CONFIG_JFFS2_FS is not set
25898 +# CONFIG_VXFS_FS is not set
25899 +# CONFIG_HPFS_FS is not set
25900 +# CONFIG_QNX4FS_FS is not set
25901 +# CONFIG_SYSV_FS is not set
25902 +# CONFIG_UFS_FS is not set
25903 +CONFIG_NETWORK_FILESYSTEMS=y
25906 +# CONFIG_NFS_V3_ACL is not set
25907 +# CONFIG_NFS_V4 is not set
25908 +# CONFIG_NFS_DIRECTIO is not set
25909 +# CONFIG_NFSD is not set
25913 +CONFIG_NFS_COMMON=y
25915 +# CONFIG_SUNRPC_BIND34 is not set
25916 +# CONFIG_RPCSEC_GSS_KRB5 is not set
25917 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
25918 +# CONFIG_SMB_FS is not set
25919 +# CONFIG_CIFS is not set
25920 +# CONFIG_NCP_FS is not set
25921 +# CONFIG_CODA_FS is not set
25922 +# CONFIG_AFS_FS is not set
25927 +# CONFIG_PARTITION_ADVANCED is not set
25928 +CONFIG_MSDOS_PARTITION=y
25929 +# CONFIG_NLS is not set
25930 +# CONFIG_DLM is not set
25931 +# CONFIG_UCC_SLOW is not set
25934 +# Library routines
25936 +CONFIG_BITREVERSE=y
25937 +# CONFIG_CRC_CCITT is not set
25938 +# CONFIG_CRC16 is not set
25939 +# CONFIG_CRC_ITU_T is not set
25941 +# CONFIG_CRC7 is not set
25942 +# CONFIG_LIBCRC32C is not set
25943 +CONFIG_ZLIB_INFLATE=y
25945 +CONFIG_HAS_IOMEM=y
25946 +CONFIG_HAS_IOPORT=y
25948 +CONFIG_INSTRUMENTATION=y
25949 +# CONFIG_PROFILING is not set
25950 +# CONFIG_KPROBES is not set
25951 +# CONFIG_MARKERS is not set
25956 +# CONFIG_PRINTK_TIME is not set
25957 +CONFIG_ENABLE_WARN_DEPRECATED=y
25958 +CONFIG_ENABLE_MUST_CHECK=y
25959 +CONFIG_MAGIC_SYSRQ=y
25960 +# CONFIG_UNUSED_SYMBOLS is not set
25961 +# CONFIG_DEBUG_FS is not set
25962 +# CONFIG_HEADERS_CHECK is not set
25963 +CONFIG_DEBUG_KERNEL=y
25964 +# CONFIG_DEBUG_SHIRQ is not set
25965 +CONFIG_DETECT_SOFTLOCKUP=y
25966 +CONFIG_SCHED_DEBUG=y
25967 +# CONFIG_SCHEDSTATS is not set
25968 +# CONFIG_TIMER_STATS is not set
25969 +# CONFIG_SLUB_DEBUG_ON is not set
25970 +# CONFIG_DEBUG_RT_MUTEXES is not set
25971 +# CONFIG_RT_MUTEX_TESTER is not set
25972 +# CONFIG_DEBUG_SPINLOCK is not set
25973 +# CONFIG_DEBUG_MUTEXES is not set
25974 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
25975 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
25976 +# CONFIG_DEBUG_KOBJECT is not set
25977 +CONFIG_DEBUG_BUGVERBOSE=y
25978 +# CONFIG_DEBUG_INFO is not set
25979 +# CONFIG_DEBUG_VM is not set
25980 +# CONFIG_DEBUG_LIST is not set
25981 +# CONFIG_DEBUG_SG is not set
25982 +CONFIG_FORCED_INLINING=y
25983 +# CONFIG_BOOT_PRINTK_DELAY is not set
25984 +# CONFIG_RCU_TORTURE_TEST is not set
25985 +# CONFIG_FAULT_INJECTION is not set
25986 +# CONFIG_SAMPLES is not set
25987 +# CONFIG_DEBUG_STACKOVERFLOW is not set
25988 +# CONFIG_DEBUG_STACK_USAGE is not set
25989 +# CONFIG_DEBUG_PAGEALLOC is not set
25990 +# CONFIG_DEBUGGER is not set
25991 +# CONFIG_BDI_SWITCH is not set
25992 +# CONFIG_PPC_EARLY_DEBUG is not set
25995 +# Security options
25997 +# CONFIG_KEYS is not set
25998 +# CONFIG_SECURITY is not set
25999 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
26001 +CONFIG_CRYPTO_ALGAPI=y
26002 +CONFIG_CRYPTO_BLKCIPHER=y
26003 +CONFIG_CRYPTO_MANAGER=y
26004 +# CONFIG_CRYPTO_HMAC is not set
26005 +# CONFIG_CRYPTO_XCBC is not set
26006 +# CONFIG_CRYPTO_NULL is not set
26007 +# CONFIG_CRYPTO_MD4 is not set
26008 +CONFIG_CRYPTO_MD5=y
26009 +# CONFIG_CRYPTO_SHA1 is not set
26010 +# CONFIG_CRYPTO_SHA256 is not set
26011 +# CONFIG_CRYPTO_SHA512 is not set
26012 +# CONFIG_CRYPTO_WP512 is not set
26013 +# CONFIG_CRYPTO_TGR192 is not set
26014 +# CONFIG_CRYPTO_GF128MUL is not set
26015 +CONFIG_CRYPTO_ECB=y
26016 +CONFIG_CRYPTO_CBC=y
26017 +CONFIG_CRYPTO_PCBC=y
26018 +# CONFIG_CRYPTO_LRW is not set
26019 +# CONFIG_CRYPTO_XTS is not set
26020 +# CONFIG_CRYPTO_CRYPTD is not set
26021 +CONFIG_CRYPTO_DES=y
26022 +# CONFIG_CRYPTO_FCRYPT is not set
26023 +# CONFIG_CRYPTO_BLOWFISH is not set
26024 +# CONFIG_CRYPTO_TWOFISH is not set
26025 +# CONFIG_CRYPTO_SERPENT is not set
26026 +# CONFIG_CRYPTO_AES is not set
26027 +# CONFIG_CRYPTO_CAST5 is not set
26028 +# CONFIG_CRYPTO_CAST6 is not set
26029 +# CONFIG_CRYPTO_TEA is not set
26030 +# CONFIG_CRYPTO_ARC4 is not set
26031 +# CONFIG_CRYPTO_KHAZAD is not set
26032 +# CONFIG_CRYPTO_ANUBIS is not set
26033 +# CONFIG_CRYPTO_SEED is not set
26034 +# CONFIG_CRYPTO_DEFLATE is not set
26035 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
26036 +# CONFIG_CRYPTO_CRC32C is not set
26037 +# CONFIG_CRYPTO_CAMELLIA is not set
26038 +# CONFIG_CRYPTO_TEST is not set
26039 +# CONFIG_CRYPTO_AUTHENC is not set
26040 +CONFIG_CRYPTO_HW=y
26041 +# CONFIG_PPC_CLOCK is not set
26043 +++ b/arch/powerpc/configs/ep8248e_defconfig
26046 +# Automatically generated make config: don't edit
26047 +# Linux kernel version: 2.6.24-rc6
26048 +# Fri Jan 11 14:02:06 2008
26050 +# CONFIG_PPC64 is not set
26053 +# Processor support
26056 +# CONFIG_PPC_85xx is not set
26057 +# CONFIG_PPC_8xx is not set
26058 +# CONFIG_40x is not set
26059 +# CONFIG_44x is not set
26060 +# CONFIG_E200 is not set
26062 +CONFIG_PPC_STD_MMU=y
26063 +CONFIG_PPC_STD_MMU_32=y
26064 +# CONFIG_PPC_MM_SLICES is not set
26065 +# CONFIG_SMP is not set
26067 +CONFIG_WORD_SIZE=32
26068 +CONFIG_PPC_MERGE=y
26070 +CONFIG_GENERIC_CMOS_UPDATE=y
26071 +CONFIG_GENERIC_TIME=y
26072 +CONFIG_GENERIC_TIME_VSYSCALL=y
26073 +CONFIG_GENERIC_CLOCKEVENTS=y
26074 +CONFIG_GENERIC_HARDIRQS=y
26075 +CONFIG_IRQ_PER_CPU=y
26076 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
26077 +CONFIG_ARCH_HAS_ILOG2_U32=y
26078 +CONFIG_GENERIC_HWEIGHT=y
26079 +CONFIG_GENERIC_CALIBRATE_DELAY=y
26080 +CONFIG_GENERIC_FIND_NEXT_BIT=y
26081 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
26083 +CONFIG_EARLY_PRINTK=y
26084 +CONFIG_GENERIC_NVRAM=y
26085 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
26086 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
26089 +# CONFIG_PPC_UDBG_16550 is not set
26090 +# CONFIG_GENERIC_TBSYNC is not set
26091 +CONFIG_AUDIT_ARCH=y
26092 +CONFIG_GENERIC_BUG=y
26093 +# CONFIG_DEFAULT_UIMAGE is not set
26094 +# CONFIG_PPC_DCR_NATIVE is not set
26095 +# CONFIG_PPC_DCR_MMIO is not set
26096 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26101 +# CONFIG_EXPERIMENTAL is not set
26102 +CONFIG_BROKEN_ON_SMP=y
26103 +CONFIG_INIT_ENV_ARG_LIMIT=32
26104 +CONFIG_LOCALVERSION=""
26105 +CONFIG_LOCALVERSION_AUTO=y
26108 +CONFIG_SYSVIPC_SYSCTL=y
26109 +# CONFIG_BSD_PROCESS_ACCT is not set
26110 +# CONFIG_TASKSTATS is not set
26111 +# CONFIG_AUDIT is not set
26113 +CONFIG_IKCONFIG_PROC=y
26114 +CONFIG_LOG_BUF_SHIFT=14
26115 +# CONFIG_CGROUPS is not set
26116 +CONFIG_FAIR_GROUP_SCHED=y
26117 +CONFIG_FAIR_USER_SCHED=y
26118 +# CONFIG_FAIR_CGROUP_SCHED is not set
26119 +CONFIG_SYSFS_DEPRECATED=y
26120 +# CONFIG_RELAY is not set
26121 +# CONFIG_BLK_DEV_INITRD is not set
26124 +CONFIG_SYSCTL_SYSCALL=y
26126 +CONFIG_KALLSYMS_ALL=y
26127 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
26132 +CONFIG_BASE_FULL=y
26134 +CONFIG_ANON_INODES=y
26139 +CONFIG_VM_EVENT_COUNTERS=y
26141 +# CONFIG_SLUB is not set
26142 +# CONFIG_SLOB is not set
26143 +CONFIG_RT_MUTEXES=y
26144 +# CONFIG_TINY_SHMEM is not set
26145 +CONFIG_BASE_SMALL=0
26146 +# CONFIG_MODULES is not set
26148 +# CONFIG_LBD is not set
26149 +# CONFIG_BLK_DEV_IO_TRACE is not set
26150 +# CONFIG_LSF is not set
26155 +CONFIG_IOSCHED_NOOP=y
26156 +# CONFIG_IOSCHED_AS is not set
26157 +CONFIG_IOSCHED_DEADLINE=y
26158 +# CONFIG_IOSCHED_CFQ is not set
26159 +# CONFIG_DEFAULT_AS is not set
26160 +CONFIG_DEFAULT_DEADLINE=y
26161 +# CONFIG_DEFAULT_CFQ is not set
26162 +# CONFIG_DEFAULT_NOOP is not set
26163 +CONFIG_DEFAULT_IOSCHED="deadline"
26166 +# Platform support
26168 +# CONFIG_PPC_MULTIPLATFORM is not set
26170 +# CONFIG_PPC_83xx is not set
26171 +# CONFIG_PPC_86xx is not set
26172 +# CONFIG_PPC_MPC52xx is not set
26173 +# CONFIG_PPC_MPC5200 is not set
26174 +# CONFIG_PPC_CELL is not set
26175 +# CONFIG_PPC_CELL_NATIVE is not set
26176 +# CONFIG_MPC8272_ADS is not set
26177 +# CONFIG_PQ2FADS is not set
26179 +# CONFIG_PQ2ADS is not set
26182 +# CONFIG_MPIC is not set
26183 +# CONFIG_MPIC_WEIRD is not set
26184 +# CONFIG_PPC_I8259 is not set
26185 +# CONFIG_PPC_RTAS is not set
26186 +# CONFIG_MMIO_NVRAM is not set
26187 +# CONFIG_PPC_MPC106 is not set
26188 +# CONFIG_PPC_970_NAP is not set
26189 +# CONFIG_PPC_INDIRECT_IO is not set
26190 +# CONFIG_GENERIC_IOMAP is not set
26191 +# CONFIG_CPU_FREQ is not set
26193 +CONFIG_PPC_CPM_NEW_BINDING=y
26194 +# CONFIG_FSL_ULI1575 is not set
26200 +# CONFIG_HIGHMEM is not set
26201 +# CONFIG_TICK_ONESHOT is not set
26202 +# CONFIG_NO_HZ is not set
26203 +# CONFIG_HIGH_RES_TIMERS is not set
26204 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
26205 +# CONFIG_HZ_100 is not set
26207 +# CONFIG_HZ_300 is not set
26208 +# CONFIG_HZ_1000 is not set
26210 +CONFIG_PREEMPT_NONE=y
26211 +# CONFIG_PREEMPT_VOLUNTARY is not set
26212 +# CONFIG_PREEMPT is not set
26213 +CONFIG_BINFMT_ELF=y
26214 +CONFIG_BINFMT_MISC=y
26215 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
26216 +CONFIG_ARCH_FLATMEM_ENABLE=y
26217 +CONFIG_ARCH_POPULATES_NODE_MAP=y
26219 +CONFIG_FLAT_NODE_MEM_MAP=y
26220 +# CONFIG_SPARSEMEM_STATIC is not set
26221 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
26222 +CONFIG_SPLIT_PTLOCK_CPUS=4
26223 +# CONFIG_RESOURCES_64BIT is not set
26224 +CONFIG_ZONE_DMA_FLAG=1
26226 +CONFIG_VIRT_TO_BUS=y
26227 +CONFIG_PROC_DEVICETREE=y
26228 +# CONFIG_CMDLINE_BOOL is not set
26229 +# CONFIG_PM is not set
26230 +CONFIG_SUSPEND_UP_POSSIBLE=y
26231 +CONFIG_HIBERNATION_UP_POSSIBLE=y
26232 +# CONFIG_SECCOMP is not set
26233 +CONFIG_WANT_DEVICE_TREE=y
26234 +CONFIG_DEVICE_TREE="ep8248e.dts"
26235 +CONFIG_ISA_DMA_API=y
26242 +# CONFIG_PCI is not set
26243 +# CONFIG_PCI_DOMAINS is not set
26244 +# CONFIG_PCI_SYSCALL is not set
26245 +# CONFIG_ARCH_SUPPORTS_MSI is not set
26246 +# CONFIG_PCCARD is not set
26251 +# CONFIG_ADVANCED_OPTIONS is not set
26254 +# Default settings for advanced configuration options are used
26256 +CONFIG_HIGHMEM_START=0xfe000000
26257 +CONFIG_LOWMEM_SIZE=0x30000000
26258 +CONFIG_KERNEL_START=0xc0000000
26259 +CONFIG_TASK_SIZE=0xc0000000
26260 +CONFIG_BOOT_LOAD=0x00400000
26268 +# Networking options
26271 +# CONFIG_PACKET_MMAP is not set
26274 +# CONFIG_XFRM_USER is not set
26275 +# CONFIG_NET_KEY is not set
26277 +CONFIG_IP_MULTICAST=y
26278 +# CONFIG_IP_ADVANCED_ROUTER is not set
26279 +CONFIG_IP_FIB_HASH=y
26281 +CONFIG_IP_PNP_DHCP=y
26282 +CONFIG_IP_PNP_BOOTP=y
26283 +# CONFIG_IP_PNP_RARP is not set
26284 +# CONFIG_NET_IPIP is not set
26285 +# CONFIG_NET_IPGRE is not set
26286 +# CONFIG_IP_MROUTE is not set
26287 +CONFIG_SYN_COOKIES=y
26288 +# CONFIG_INET_AH is not set
26289 +# CONFIG_INET_ESP is not set
26290 +# CONFIG_INET_IPCOMP is not set
26291 +# CONFIG_INET_XFRM_TUNNEL is not set
26292 +CONFIG_INET_TUNNEL=y
26293 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
26294 +CONFIG_INET_XFRM_MODE_TUNNEL=y
26295 +CONFIG_INET_XFRM_MODE_BEET=y
26296 +# CONFIG_INET_LRO is not set
26297 +CONFIG_INET_DIAG=y
26298 +CONFIG_INET_TCP_DIAG=y
26299 +# CONFIG_TCP_CONG_ADVANCED is not set
26300 +CONFIG_TCP_CONG_CUBIC=y
26301 +CONFIG_DEFAULT_TCP_CONG="cubic"
26302 +# CONFIG_IP_VS is not set
26304 +# CONFIG_IPV6_PRIVACY is not set
26305 +# CONFIG_IPV6_ROUTER_PREF is not set
26306 +# CONFIG_INET6_AH is not set
26307 +# CONFIG_INET6_ESP is not set
26308 +# CONFIG_INET6_IPCOMP is not set
26309 +# CONFIG_INET6_XFRM_TUNNEL is not set
26310 +# CONFIG_INET6_TUNNEL is not set
26311 +CONFIG_INET6_XFRM_MODE_TRANSPORT=y
26312 +CONFIG_INET6_XFRM_MODE_TUNNEL=y
26313 +CONFIG_INET6_XFRM_MODE_BEET=y
26315 +# CONFIG_IPV6_TUNNEL is not set
26316 +# CONFIG_NETWORK_SECMARK is not set
26317 +CONFIG_NETFILTER=y
26318 +# CONFIG_NETFILTER_DEBUG is not set
26321 +# Core Netfilter Configuration
26323 +# CONFIG_NETFILTER_NETLINK is not set
26324 +# CONFIG_NF_CONNTRACK_ENABLED is not set
26325 +# CONFIG_NF_CONNTRACK is not set
26326 +# CONFIG_NETFILTER_XTABLES is not set
26329 +# IP: Netfilter Configuration
26331 +# CONFIG_IP_NF_QUEUE is not set
26332 +# CONFIG_IP_NF_IPTABLES is not set
26333 +# CONFIG_IP_NF_ARPTABLES is not set
26334 +# CONFIG_BRIDGE is not set
26335 +# CONFIG_VLAN_8021Q is not set
26336 +# CONFIG_DECNET is not set
26337 +# CONFIG_LLC2 is not set
26338 +# CONFIG_IPX is not set
26339 +# CONFIG_ATALK is not set
26340 +# CONFIG_NET_SCHED is not set
26345 +# CONFIG_NET_PKTGEN is not set
26346 +# CONFIG_HAMRADIO is not set
26347 +# CONFIG_IRDA is not set
26348 +# CONFIG_BT is not set
26353 +# CONFIG_CFG80211 is not set
26354 +# CONFIG_WIRELESS_EXT is not set
26355 +# CONFIG_IEEE80211 is not set
26356 +# CONFIG_RFKILL is not set
26363 +# Generic Driver Options
26365 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
26366 +CONFIG_STANDALONE=y
26367 +CONFIG_PREVENT_FIRMWARE_BUILD=y
26368 +# CONFIG_FW_LOADER is not set
26369 +# CONFIG_DEBUG_DRIVER is not set
26370 +# CONFIG_DEBUG_DEVRES is not set
26371 +# CONFIG_SYS_HYPERVISOR is not set
26372 +# CONFIG_CONNECTOR is not set
26374 +# CONFIG_MTD_DEBUG is not set
26375 +# CONFIG_MTD_CONCAT is not set
26376 +# CONFIG_MTD_PARTITIONS is not set
26379 +# User Modules And Translation Layers
26382 +CONFIG_MTD_BLKDEVS=y
26383 +CONFIG_MTD_BLOCK=y
26384 +# CONFIG_FTL is not set
26385 +# CONFIG_NFTL is not set
26386 +# CONFIG_INFTL is not set
26387 +# CONFIG_RFD_FTL is not set
26388 +# CONFIG_SSFDC is not set
26389 +# CONFIG_MTD_OOPS is not set
26392 +# RAM/ROM/Flash chip drivers
26395 +# CONFIG_MTD_JEDECPROBE is not set
26396 +CONFIG_MTD_GEN_PROBE=y
26397 +CONFIG_MTD_CFI_ADV_OPTIONS=y
26398 +CONFIG_MTD_CFI_NOSWAP=y
26399 +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
26400 +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
26401 +CONFIG_MTD_CFI_GEOMETRY=y
26402 +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
26403 +# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set
26404 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
26405 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
26406 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
26407 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
26408 +# CONFIG_MTD_CFI_I1 is not set
26409 +CONFIG_MTD_CFI_I2=y
26410 +# CONFIG_MTD_CFI_I4 is not set
26411 +# CONFIG_MTD_CFI_I8 is not set
26412 +# CONFIG_MTD_OTP is not set
26413 +# CONFIG_MTD_CFI_INTELEXT is not set
26414 +CONFIG_MTD_CFI_AMDSTD=y
26415 +# CONFIG_MTD_CFI_STAA is not set
26416 +CONFIG_MTD_CFI_UTIL=y
26417 +# CONFIG_MTD_RAM is not set
26418 +# CONFIG_MTD_ROM is not set
26419 +# CONFIG_MTD_ABSENT is not set
26422 +# Mapping drivers for chip access
26424 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
26425 +# CONFIG_MTD_PHYSMAP is not set
26426 +CONFIG_MTD_PHYSMAP_OF=y
26427 +# CONFIG_MTD_PLATRAM is not set
26430 +# Self-contained MTD device drivers
26432 +# CONFIG_MTD_SLRAM is not set
26433 +# CONFIG_MTD_PHRAM is not set
26434 +# CONFIG_MTD_MTDRAM is not set
26435 +# CONFIG_MTD_BLOCK2MTD is not set
26438 +# Disk-On-Chip Device Drivers
26440 +# CONFIG_MTD_DOC2000 is not set
26441 +# CONFIG_MTD_DOC2001 is not set
26442 +# CONFIG_MTD_DOC2001PLUS is not set
26443 +# CONFIG_MTD_NAND is not set
26444 +# CONFIG_MTD_ONENAND is not set
26447 +# UBI - Unsorted block images
26449 +# CONFIG_MTD_UBI is not set
26450 +CONFIG_OF_DEVICE=y
26451 +# CONFIG_PARPORT is not set
26453 +# CONFIG_BLK_DEV_FD is not set
26454 +# CONFIG_BLK_DEV_COW_COMMON is not set
26455 +CONFIG_BLK_DEV_LOOP=y
26456 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
26457 +# CONFIG_BLK_DEV_NBD is not set
26458 +# CONFIG_BLK_DEV_RAM is not set
26459 +# CONFIG_CDROM_PKTCDVD is not set
26460 +# CONFIG_ATA_OVER_ETH is not set
26461 +# CONFIG_MISC_DEVICES is not set
26462 +# CONFIG_IDE is not set
26465 +# SCSI device support
26467 +# CONFIG_RAID_ATTRS is not set
26468 +# CONFIG_SCSI is not set
26469 +# CONFIG_SCSI_DMA is not set
26470 +# CONFIG_SCSI_NETLINK is not set
26471 +# CONFIG_ATA is not set
26472 +# CONFIG_MD is not set
26473 +# CONFIG_MACINTOSH_DRIVERS is not set
26474 +CONFIG_NETDEVICES=y
26475 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
26476 +# CONFIG_DUMMY is not set
26477 +# CONFIG_BONDING is not set
26478 +# CONFIG_EQUALIZER is not set
26479 +# CONFIG_TUN is not set
26480 +# CONFIG_VETH is not set
26484 +# MII PHY device drivers
26486 +# CONFIG_MARVELL_PHY is not set
26487 +CONFIG_DAVICOM_PHY=y
26488 +# CONFIG_QSEMI_PHY is not set
26489 +# CONFIG_LXT_PHY is not set
26490 +# CONFIG_CICADA_PHY is not set
26491 +# CONFIG_VITESSE_PHY is not set
26492 +# CONFIG_SMSC_PHY is not set
26493 +# CONFIG_BROADCOM_PHY is not set
26494 +# CONFIG_ICPLUS_PHY is not set
26495 +# CONFIG_FIXED_PHY is not set
26496 +CONFIG_MDIO_BITBANG=y
26497 +CONFIG_NET_ETHERNET=y
26499 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
26500 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
26501 +# CONFIG_IBM_NEW_EMAC_TAH is not set
26502 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
26503 +# CONFIG_B44 is not set
26505 +# CONFIG_FS_ENET_HAS_SCC is not set
26506 +CONFIG_FS_ENET_HAS_FCC=y
26507 +# CONFIG_FS_ENET_MDIO_FCC is not set
26508 +CONFIG_NETDEV_1000=y
26509 +CONFIG_NETDEV_10000=y
26514 +# CONFIG_WLAN_PRE80211 is not set
26515 +# CONFIG_WLAN_80211 is not set
26516 +# CONFIG_WAN is not set
26517 +# CONFIG_PPP is not set
26518 +# CONFIG_SLIP is not set
26519 +# CONFIG_NETPOLL is not set
26520 +# CONFIG_NET_POLL_CONTROLLER is not set
26521 +# CONFIG_ISDN is not set
26522 +# CONFIG_PHONE is not set
26525 +# Input device support
26527 +# CONFIG_INPUT is not set
26530 +# Hardware I/O ports
26532 +# CONFIG_SERIO is not set
26533 +# CONFIG_GAMEPORT is not set
26536 +# Character devices
26538 +# CONFIG_VT is not set
26539 +# CONFIG_SERIAL_NONSTANDARD is not set
26544 +# CONFIG_SERIAL_8250 is not set
26547 +# Non-8250 serial port support
26549 +# CONFIG_SERIAL_UARTLITE is not set
26550 +CONFIG_SERIAL_CORE=y
26551 +CONFIG_SERIAL_CORE_CONSOLE=y
26552 +CONFIG_SERIAL_CPM=y
26553 +CONFIG_SERIAL_CPM_CONSOLE=y
26554 +CONFIG_SERIAL_CPM_SCC1=y
26555 +# CONFIG_SERIAL_CPM_SCC2 is not set
26556 +# CONFIG_SERIAL_CPM_SCC3 is not set
26557 +CONFIG_SERIAL_CPM_SCC4=y
26558 +# CONFIG_SERIAL_CPM_SMC1 is not set
26559 +# CONFIG_SERIAL_CPM_SMC2 is not set
26560 +CONFIG_UNIX98_PTYS=y
26561 +CONFIG_LEGACY_PTYS=y
26562 +CONFIG_LEGACY_PTY_COUNT=256
26563 +# CONFIG_IPMI_HANDLER is not set
26564 +CONFIG_HW_RANDOM=y
26565 +# CONFIG_NVRAM is not set
26566 +# CONFIG_GEN_RTC is not set
26567 +# CONFIG_R3964 is not set
26568 +# CONFIG_RAW_DRIVER is not set
26569 +# CONFIG_I2C is not set
26574 +# CONFIG_SPI is not set
26575 +# CONFIG_SPI_MASTER is not set
26576 +# CONFIG_W1 is not set
26577 +# CONFIG_POWER_SUPPLY is not set
26578 +# CONFIG_HWMON is not set
26579 +# CONFIG_WATCHDOG is not set
26582 +# Sonics Silicon Backplane
26584 +CONFIG_SSB_POSSIBLE=y
26585 +# CONFIG_SSB is not set
26588 +# Multifunction device drivers
26590 +# CONFIG_MFD_SM501 is not set
26593 +# Multimedia devices
26595 +# CONFIG_VIDEO_DEV is not set
26596 +# CONFIG_DVB_CORE is not set
26600 +# Graphics support
26602 +# CONFIG_VGASTATE is not set
26603 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
26604 +# CONFIG_FB is not set
26605 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
26608 +# Display device support
26610 +# CONFIG_DISPLAY_SUPPORT is not set
26615 +# CONFIG_SOUND is not set
26616 +# CONFIG_USB_SUPPORT is not set
26617 +# CONFIG_MMC is not set
26618 +# CONFIG_NEW_LEDS is not set
26619 +# CONFIG_RTC_CLASS is not set
26624 +# CONFIG_UIO is not set
26630 +# CONFIG_EXT2_FS_XATTR is not set
26631 +# CONFIG_EXT2_FS_XIP is not set
26633 +# CONFIG_EXT3_FS_XATTR is not set
26635 +# CONFIG_REISERFS_FS is not set
26636 +# CONFIG_JFS_FS is not set
26637 +# CONFIG_FS_POSIX_ACL is not set
26638 +# CONFIG_XFS_FS is not set
26639 +# CONFIG_OCFS2_FS is not set
26640 +# CONFIG_MINIX_FS is not set
26641 +# CONFIG_ROMFS_FS is not set
26643 +CONFIG_INOTIFY_USER=y
26644 +# CONFIG_QUOTA is not set
26646 +# CONFIG_AUTOFS_FS is not set
26647 +CONFIG_AUTOFS4_FS=y
26648 +# CONFIG_FUSE_FS is not set
26651 +# CD-ROM/DVD Filesystems
26653 +# CONFIG_ISO9660_FS is not set
26654 +# CONFIG_UDF_FS is not set
26657 +# DOS/FAT/NT Filesystems
26659 +# CONFIG_MSDOS_FS is not set
26660 +# CONFIG_VFAT_FS is not set
26661 +# CONFIG_NTFS_FS is not set
26664 +# Pseudo filesystems
26667 +CONFIG_PROC_KCORE=y
26668 +CONFIG_PROC_SYSCTL=y
26671 +# CONFIG_TMPFS_POSIX_ACL is not set
26672 +# CONFIG_HUGETLB_PAGE is not set
26675 +# Miscellaneous filesystems
26677 +# CONFIG_HFSPLUS_FS is not set
26678 +# CONFIG_JFFS2_FS is not set
26680 +# CONFIG_VXFS_FS is not set
26681 +# CONFIG_HPFS_FS is not set
26682 +# CONFIG_QNX4FS_FS is not set
26683 +# CONFIG_SYSV_FS is not set
26684 +# CONFIG_UFS_FS is not set
26685 +CONFIG_NETWORK_FILESYSTEMS=y
26688 +# CONFIG_NFS_V3_ACL is not set
26689 +# CONFIG_NFS_DIRECTIO is not set
26690 +# CONFIG_NFSD is not set
26694 +CONFIG_NFS_COMMON=y
26696 +# CONFIG_SMB_FS is not set
26697 +# CONFIG_CIFS is not set
26698 +# CONFIG_NCP_FS is not set
26699 +# CONFIG_CODA_FS is not set
26704 +CONFIG_PARTITION_ADVANCED=y
26705 +# CONFIG_ACORN_PARTITION is not set
26706 +# CONFIG_OSF_PARTITION is not set
26707 +# CONFIG_AMIGA_PARTITION is not set
26708 +# CONFIG_ATARI_PARTITION is not set
26709 +# CONFIG_MAC_PARTITION is not set
26710 +CONFIG_MSDOS_PARTITION=y
26711 +# CONFIG_BSD_DISKLABEL is not set
26712 +# CONFIG_MINIX_SUBPARTITION is not set
26713 +# CONFIG_SOLARIS_X86_PARTITION is not set
26714 +# CONFIG_UNIXWARE_DISKLABEL is not set
26715 +# CONFIG_LDM_PARTITION is not set
26716 +# CONFIG_SGI_PARTITION is not set
26717 +# CONFIG_ULTRIX_PARTITION is not set
26718 +# CONFIG_SUN_PARTITION is not set
26719 +# CONFIG_KARMA_PARTITION is not set
26720 +# CONFIG_EFI_PARTITION is not set
26721 +# CONFIG_SYSV68_PARTITION is not set
26723 +CONFIG_NLS_DEFAULT="iso8859-1"
26724 +CONFIG_NLS_CODEPAGE_437=y
26725 +# CONFIG_NLS_CODEPAGE_737 is not set
26726 +# CONFIG_NLS_CODEPAGE_775 is not set
26727 +# CONFIG_NLS_CODEPAGE_850 is not set
26728 +# CONFIG_NLS_CODEPAGE_852 is not set
26729 +# CONFIG_NLS_CODEPAGE_855 is not set
26730 +# CONFIG_NLS_CODEPAGE_857 is not set
26731 +# CONFIG_NLS_CODEPAGE_860 is not set
26732 +# CONFIG_NLS_CODEPAGE_861 is not set
26733 +# CONFIG_NLS_CODEPAGE_862 is not set
26734 +# CONFIG_NLS_CODEPAGE_863 is not set
26735 +# CONFIG_NLS_CODEPAGE_864 is not set
26736 +# CONFIG_NLS_CODEPAGE_865 is not set
26737 +# CONFIG_NLS_CODEPAGE_866 is not set
26738 +# CONFIG_NLS_CODEPAGE_869 is not set
26739 +# CONFIG_NLS_CODEPAGE_936 is not set
26740 +# CONFIG_NLS_CODEPAGE_950 is not set
26741 +# CONFIG_NLS_CODEPAGE_932 is not set
26742 +# CONFIG_NLS_CODEPAGE_949 is not set
26743 +# CONFIG_NLS_CODEPAGE_874 is not set
26744 +# CONFIG_NLS_ISO8859_8 is not set
26745 +# CONFIG_NLS_CODEPAGE_1250 is not set
26746 +# CONFIG_NLS_CODEPAGE_1251 is not set
26747 +CONFIG_NLS_ASCII=y
26748 +CONFIG_NLS_ISO8859_1=y
26749 +# CONFIG_NLS_ISO8859_2 is not set
26750 +# CONFIG_NLS_ISO8859_3 is not set
26751 +# CONFIG_NLS_ISO8859_4 is not set
26752 +# CONFIG_NLS_ISO8859_5 is not set
26753 +# CONFIG_NLS_ISO8859_6 is not set
26754 +# CONFIG_NLS_ISO8859_7 is not set
26755 +# CONFIG_NLS_ISO8859_9 is not set
26756 +# CONFIG_NLS_ISO8859_13 is not set
26757 +# CONFIG_NLS_ISO8859_14 is not set
26758 +# CONFIG_NLS_ISO8859_15 is not set
26759 +# CONFIG_NLS_KOI8_R is not set
26760 +# CONFIG_NLS_KOI8_U is not set
26762 +# CONFIG_UCC_SLOW is not set
26765 +# Library routines
26767 +# CONFIG_CRC_CCITT is not set
26768 +# CONFIG_CRC16 is not set
26769 +# CONFIG_CRC_ITU_T is not set
26770 +# CONFIG_CRC32 is not set
26771 +# CONFIG_CRC7 is not set
26772 +# CONFIG_LIBCRC32C is not set
26773 +CONFIG_ZLIB_INFLATE=y
26775 +CONFIG_HAS_IOMEM=y
26776 +CONFIG_HAS_IOPORT=y
26778 +CONFIG_INSTRUMENTATION=y
26779 +# CONFIG_PROFILING is not set
26780 +# CONFIG_MARKERS is not set
26785 +# CONFIG_PRINTK_TIME is not set
26786 +CONFIG_ENABLE_WARN_DEPRECATED=y
26787 +CONFIG_ENABLE_MUST_CHECK=y
26788 +CONFIG_MAGIC_SYSRQ=y
26789 +# CONFIG_UNUSED_SYMBOLS is not set
26790 +# CONFIG_DEBUG_FS is not set
26791 +# CONFIG_HEADERS_CHECK is not set
26792 +CONFIG_DEBUG_KERNEL=y
26793 +# CONFIG_DEBUG_SHIRQ is not set
26794 +# CONFIG_DETECT_SOFTLOCKUP is not set
26795 +# CONFIG_SCHED_DEBUG is not set
26796 +# CONFIG_SCHEDSTATS is not set
26797 +# CONFIG_TIMER_STATS is not set
26798 +# CONFIG_DEBUG_SLAB is not set
26799 +# CONFIG_DEBUG_RT_MUTEXES is not set
26800 +# CONFIG_RT_MUTEX_TESTER is not set
26801 +# CONFIG_DEBUG_SPINLOCK is not set
26802 +# CONFIG_DEBUG_MUTEXES is not set
26803 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
26804 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
26805 +# CONFIG_DEBUG_KOBJECT is not set
26806 +CONFIG_DEBUG_BUGVERBOSE=y
26807 +CONFIG_DEBUG_INFO=y
26808 +# CONFIG_DEBUG_VM is not set
26809 +# CONFIG_DEBUG_LIST is not set
26810 +# CONFIG_DEBUG_SG is not set
26811 +CONFIG_FORCED_INLINING=y
26812 +# CONFIG_BOOT_PRINTK_DELAY is not set
26813 +# CONFIG_FAULT_INJECTION is not set
26814 +# CONFIG_SAMPLES is not set
26815 +# CONFIG_DEBUG_STACKOVERFLOW is not set
26816 +# CONFIG_DEBUG_STACK_USAGE is not set
26817 +# CONFIG_DEBUG_PAGEALLOC is not set
26818 +# CONFIG_DEBUGGER is not set
26819 +# CONFIG_KGDB_CONSOLE is not set
26820 +CONFIG_BDI_SWITCH=y
26821 +# CONFIG_PPC_EARLY_DEBUG is not set
26824 +# Security options
26826 +# CONFIG_KEYS is not set
26827 +# CONFIG_SECURITY is not set
26829 +CONFIG_CRYPTO_ALGAPI=y
26830 +CONFIG_CRYPTO_BLKCIPHER=y
26831 +CONFIG_CRYPTO_MANAGER=y
26832 +# CONFIG_CRYPTO_HMAC is not set
26833 +# CONFIG_CRYPTO_NULL is not set
26834 +# CONFIG_CRYPTO_MD4 is not set
26835 +CONFIG_CRYPTO_MD5=y
26836 +# CONFIG_CRYPTO_SHA1 is not set
26837 +# CONFIG_CRYPTO_SHA256 is not set
26838 +# CONFIG_CRYPTO_SHA512 is not set
26839 +# CONFIG_CRYPTO_WP512 is not set
26840 +# CONFIG_CRYPTO_TGR192 is not set
26841 +CONFIG_CRYPTO_ECB=y
26842 +CONFIG_CRYPTO_CBC=y
26843 +CONFIG_CRYPTO_PCBC=y
26844 +# CONFIG_CRYPTO_CRYPTD is not set
26845 +CONFIG_CRYPTO_DES=y
26846 +# CONFIG_CRYPTO_FCRYPT is not set
26847 +# CONFIG_CRYPTO_BLOWFISH is not set
26848 +# CONFIG_CRYPTO_TWOFISH is not set
26849 +# CONFIG_CRYPTO_SERPENT is not set
26850 +# CONFIG_CRYPTO_AES is not set
26851 +# CONFIG_CRYPTO_CAST5 is not set
26852 +# CONFIG_CRYPTO_CAST6 is not set
26853 +# CONFIG_CRYPTO_TEA is not set
26854 +# CONFIG_CRYPTO_ARC4 is not set
26855 +# CONFIG_CRYPTO_KHAZAD is not set
26856 +# CONFIG_CRYPTO_ANUBIS is not set
26857 +# CONFIG_CRYPTO_SEED is not set
26858 +# CONFIG_CRYPTO_DEFLATE is not set
26859 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
26860 +# CONFIG_CRYPTO_CRC32C is not set
26861 +# CONFIG_CRYPTO_CAMELLIA is not set
26862 +# CONFIG_CRYPTO_AUTHENC is not set
26863 +# CONFIG_CRYPTO_HW is not set
26864 +# CONFIG_PPC_CLOCK is not set
26865 +CONFIG_PPC_LIB_RHEAP=y
26867 +++ b/arch/powerpc/configs/katmai_defconfig
26870 +# Automatically generated make config: don't edit
26871 +# Linux kernel version: 2.6.24-rc6
26872 +# Mon Dec 24 11:17:43 2007
26874 +# CONFIG_PPC64 is not set
26877 +# Processor support
26879 +# CONFIG_6xx is not set
26880 +# CONFIG_PPC_85xx is not set
26881 +# CONFIG_PPC_8xx is not set
26882 +# CONFIG_40x is not set
26884 +# CONFIG_E200 is not set
26887 +CONFIG_PTE_64BIT=y
26888 +CONFIG_PHYS_64BIT=y
26889 +# CONFIG_PPC_MM_SLICES is not set
26890 +CONFIG_NOT_COHERENT_CACHE=y
26892 +CONFIG_WORD_SIZE=32
26893 +CONFIG_PPC_MERGE=y
26895 +CONFIG_GENERIC_CMOS_UPDATE=y
26896 +CONFIG_GENERIC_TIME=y
26897 +CONFIG_GENERIC_TIME_VSYSCALL=y
26898 +CONFIG_GENERIC_CLOCKEVENTS=y
26899 +CONFIG_GENERIC_HARDIRQS=y
26900 +CONFIG_IRQ_PER_CPU=y
26901 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
26902 +CONFIG_ARCH_HAS_ILOG2_U32=y
26903 +CONFIG_GENERIC_HWEIGHT=y
26904 +CONFIG_GENERIC_CALIBRATE_DELAY=y
26905 +CONFIG_GENERIC_FIND_NEXT_BIT=y
26906 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
26908 +CONFIG_EARLY_PRINTK=y
26909 +CONFIG_GENERIC_NVRAM=y
26910 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
26911 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
26914 +CONFIG_PPC_UDBG_16550=y
26915 +# CONFIG_GENERIC_TBSYNC is not set
26916 +CONFIG_AUDIT_ARCH=y
26917 +CONFIG_GENERIC_BUG=y
26918 +# CONFIG_DEFAULT_UIMAGE is not set
26919 +CONFIG_PPC_DCR_NATIVE=y
26920 +# CONFIG_PPC_DCR_MMIO is not set
26922 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26927 +CONFIG_EXPERIMENTAL=y
26928 +CONFIG_BROKEN_ON_SMP=y
26929 +CONFIG_INIT_ENV_ARG_LIMIT=32
26930 +CONFIG_LOCALVERSION=""
26931 +CONFIG_LOCALVERSION_AUTO=y
26934 +CONFIG_SYSVIPC_SYSCTL=y
26935 +CONFIG_POSIX_MQUEUE=y
26936 +# CONFIG_BSD_PROCESS_ACCT is not set
26937 +# CONFIG_TASKSTATS is not set
26938 +# CONFIG_USER_NS is not set
26939 +# CONFIG_PID_NS is not set
26940 +# CONFIG_AUDIT is not set
26941 +# CONFIG_IKCONFIG is not set
26942 +CONFIG_LOG_BUF_SHIFT=14
26943 +# CONFIG_CGROUPS is not set
26944 +CONFIG_FAIR_GROUP_SCHED=y
26945 +CONFIG_FAIR_USER_SCHED=y
26946 +# CONFIG_FAIR_CGROUP_SCHED is not set
26947 +CONFIG_SYSFS_DEPRECATED=y
26948 +# CONFIG_RELAY is not set
26949 +CONFIG_BLK_DEV_INITRD=y
26950 +CONFIG_INITRAMFS_SOURCE=""
26951 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
26954 +CONFIG_SYSCTL_SYSCALL=y
26956 +# CONFIG_KALLSYMS_ALL is not set
26957 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
26962 +CONFIG_BASE_FULL=y
26964 +CONFIG_ANON_INODES=y
26969 +CONFIG_VM_EVENT_COUNTERS=y
26970 +CONFIG_SLUB_DEBUG=y
26971 +# CONFIG_SLAB is not set
26973 +# CONFIG_SLOB is not set
26974 +CONFIG_RT_MUTEXES=y
26975 +# CONFIG_TINY_SHMEM is not set
26976 +CONFIG_BASE_SMALL=0
26978 +CONFIG_MODULE_UNLOAD=y
26979 +# CONFIG_MODULE_FORCE_UNLOAD is not set
26980 +# CONFIG_MODVERSIONS is not set
26981 +# CONFIG_MODULE_SRCVERSION_ALL is not set
26985 +# CONFIG_BLK_DEV_IO_TRACE is not set
26986 +# CONFIG_LSF is not set
26987 +# CONFIG_BLK_DEV_BSG is not set
26992 +CONFIG_IOSCHED_NOOP=y
26993 +CONFIG_IOSCHED_AS=y
26994 +CONFIG_IOSCHED_DEADLINE=y
26995 +CONFIG_IOSCHED_CFQ=y
26996 +CONFIG_DEFAULT_AS=y
26997 +# CONFIG_DEFAULT_DEADLINE is not set
26998 +# CONFIG_DEFAULT_CFQ is not set
26999 +# CONFIG_DEFAULT_NOOP is not set
27000 +CONFIG_DEFAULT_IOSCHED="anticipatory"
27001 +CONFIG_PPC4xx_PCI_EXPRESS=y
27004 +# Platform support
27006 +# CONFIG_PPC_MPC52xx is not set
27007 +# CONFIG_PPC_MPC5200 is not set
27008 +# CONFIG_PPC_CELL is not set
27009 +# CONFIG_PPC_CELL_NATIVE is not set
27010 +# CONFIG_PQ2ADS is not set
27011 +# CONFIG_BAMBOO is not set
27012 +# CONFIG_EBONY is not set
27013 +# CONFIG_SEQUOIA is not set
27014 +# CONFIG_TAISHAN is not set
27016 +# CONFIG_RAINIER is not set
27018 +# CONFIG_MPIC is not set
27019 +# CONFIG_MPIC_WEIRD is not set
27020 +# CONFIG_PPC_I8259 is not set
27021 +# CONFIG_PPC_RTAS is not set
27022 +# CONFIG_MMIO_NVRAM is not set
27023 +# CONFIG_PPC_MPC106 is not set
27024 +# CONFIG_PPC_970_NAP is not set
27025 +# CONFIG_PPC_INDIRECT_IO is not set
27026 +# CONFIG_GENERIC_IOMAP is not set
27027 +# CONFIG_CPU_FREQ is not set
27028 +# CONFIG_CPM2 is not set
27029 +# CONFIG_FSL_ULI1575 is not set
27034 +# CONFIG_HIGHMEM is not set
27035 +# CONFIG_TICK_ONESHOT is not set
27036 +# CONFIG_NO_HZ is not set
27037 +# CONFIG_HIGH_RES_TIMERS is not set
27038 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
27039 +# CONFIG_HZ_100 is not set
27041 +# CONFIG_HZ_300 is not set
27042 +# CONFIG_HZ_1000 is not set
27044 +CONFIG_PREEMPT_NONE=y
27045 +# CONFIG_PREEMPT_VOLUNTARY is not set
27046 +# CONFIG_PREEMPT is not set
27047 +CONFIG_BINFMT_ELF=y
27048 +# CONFIG_BINFMT_MISC is not set
27049 +# CONFIG_MATH_EMULATION is not set
27050 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
27051 +CONFIG_ARCH_FLATMEM_ENABLE=y
27052 +CONFIG_ARCH_POPULATES_NODE_MAP=y
27053 +CONFIG_SELECT_MEMORY_MODEL=y
27054 +CONFIG_FLATMEM_MANUAL=y
27055 +# CONFIG_DISCONTIGMEM_MANUAL is not set
27056 +# CONFIG_SPARSEMEM_MANUAL is not set
27058 +CONFIG_FLAT_NODE_MEM_MAP=y
27059 +# CONFIG_SPARSEMEM_STATIC is not set
27060 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
27061 +CONFIG_SPLIT_PTLOCK_CPUS=4
27062 +CONFIG_RESOURCES_64BIT=y
27063 +CONFIG_ZONE_DMA_FLAG=1
27065 +CONFIG_VIRT_TO_BUS=y
27066 +CONFIG_PROC_DEVICETREE=y
27067 +CONFIG_CMDLINE_BOOL=y
27070 +CONFIG_WANT_DEVICE_TREE=y
27071 +CONFIG_DEVICE_TREE="katmai.dts"
27072 +CONFIG_ISA_DMA_API=y
27078 +CONFIG_PPC_INDIRECT_PCI=y
27080 +CONFIG_PCI_DOMAINS=y
27081 +CONFIG_PCI_SYSCALL=y
27082 +# CONFIG_PCIEPORTBUS is not set
27083 +CONFIG_ARCH_SUPPORTS_MSI=y
27084 +# CONFIG_PCI_MSI is not set
27085 +CONFIG_PCI_LEGACY=y
27086 +# CONFIG_PCI_DEBUG is not set
27087 +# CONFIG_PCCARD is not set
27088 +# CONFIG_HOTPLUG_PCI is not set
27093 +# CONFIG_ADVANCED_OPTIONS is not set
27096 +# Default settings for advanced configuration options are used
27098 +CONFIG_HIGHMEM_START=0xfe000000
27099 +CONFIG_LOWMEM_SIZE=0x30000000
27100 +CONFIG_KERNEL_START=0xc0000000
27101 +CONFIG_TASK_SIZE=0xc0000000
27102 +CONFIG_CONSISTENT_START=0xff100000
27103 +CONFIG_CONSISTENT_SIZE=0x00200000
27104 +CONFIG_BOOT_LOAD=0x01000000
27112 +# Networking options
27115 +# CONFIG_PACKET_MMAP is not set
27117 +# CONFIG_NET_KEY is not set
27119 +# CONFIG_IP_MULTICAST is not set
27120 +# CONFIG_IP_ADVANCED_ROUTER is not set
27121 +CONFIG_IP_FIB_HASH=y
27123 +CONFIG_IP_PNP_DHCP=y
27124 +CONFIG_IP_PNP_BOOTP=y
27125 +# CONFIG_IP_PNP_RARP is not set
27126 +# CONFIG_NET_IPIP is not set
27127 +# CONFIG_NET_IPGRE is not set
27128 +# CONFIG_ARPD is not set
27129 +# CONFIG_SYN_COOKIES is not set
27130 +# CONFIG_INET_AH is not set
27131 +# CONFIG_INET_ESP is not set
27132 +# CONFIG_INET_IPCOMP is not set
27133 +# CONFIG_INET_XFRM_TUNNEL is not set
27134 +# CONFIG_INET_TUNNEL is not set
27135 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
27136 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
27137 +# CONFIG_INET_XFRM_MODE_BEET is not set
27138 +# CONFIG_INET_LRO is not set
27139 +CONFIG_INET_DIAG=y
27140 +CONFIG_INET_TCP_DIAG=y
27141 +# CONFIG_TCP_CONG_ADVANCED is not set
27142 +CONFIG_TCP_CONG_CUBIC=y
27143 +CONFIG_DEFAULT_TCP_CONG="cubic"
27144 +# CONFIG_TCP_MD5SIG is not set
27145 +# CONFIG_IPV6 is not set
27146 +# CONFIG_INET6_XFRM_TUNNEL is not set
27147 +# CONFIG_INET6_TUNNEL is not set
27148 +# CONFIG_NETWORK_SECMARK is not set
27149 +# CONFIG_NETFILTER is not set
27150 +# CONFIG_IP_DCCP is not set
27151 +# CONFIG_IP_SCTP is not set
27152 +# CONFIG_TIPC is not set
27153 +# CONFIG_ATM is not set
27154 +# CONFIG_BRIDGE is not set
27155 +# CONFIG_VLAN_8021Q is not set
27156 +# CONFIG_DECNET is not set
27157 +# CONFIG_LLC2 is not set
27158 +# CONFIG_IPX is not set
27159 +# CONFIG_ATALK is not set
27160 +# CONFIG_X25 is not set
27161 +# CONFIG_LAPB is not set
27162 +# CONFIG_ECONET is not set
27163 +# CONFIG_WAN_ROUTER is not set
27164 +# CONFIG_NET_SCHED is not set
27169 +# CONFIG_NET_PKTGEN is not set
27170 +# CONFIG_HAMRADIO is not set
27171 +# CONFIG_IRDA is not set
27172 +# CONFIG_BT is not set
27173 +# CONFIG_AF_RXRPC is not set
27178 +# CONFIG_CFG80211 is not set
27179 +# CONFIG_WIRELESS_EXT is not set
27180 +# CONFIG_MAC80211 is not set
27181 +# CONFIG_IEEE80211 is not set
27182 +# CONFIG_RFKILL is not set
27183 +# CONFIG_NET_9P is not set
27190 +# Generic Driver Options
27192 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
27193 +CONFIG_STANDALONE=y
27194 +CONFIG_PREVENT_FIRMWARE_BUILD=y
27195 +CONFIG_FW_LOADER=y
27196 +# CONFIG_DEBUG_DRIVER is not set
27197 +# CONFIG_DEBUG_DEVRES is not set
27198 +# CONFIG_SYS_HYPERVISOR is not set
27199 +CONFIG_CONNECTOR=y
27200 +CONFIG_PROC_EVENTS=y
27201 +# CONFIG_MTD is not set
27202 +CONFIG_OF_DEVICE=y
27203 +# CONFIG_PARPORT is not set
27205 +# CONFIG_BLK_DEV_FD is not set
27206 +# CONFIG_BLK_CPQ_DA is not set
27207 +# CONFIG_BLK_CPQ_CISS_DA is not set
27208 +# CONFIG_BLK_DEV_DAC960 is not set
27209 +# CONFIG_BLK_DEV_UMEM is not set
27210 +# CONFIG_BLK_DEV_COW_COMMON is not set
27211 +# CONFIG_BLK_DEV_LOOP is not set
27212 +# CONFIG_BLK_DEV_NBD is not set
27213 +# CONFIG_BLK_DEV_SX8 is not set
27214 +CONFIG_BLK_DEV_RAM=y
27215 +CONFIG_BLK_DEV_RAM_COUNT=16
27216 +CONFIG_BLK_DEV_RAM_SIZE=35000
27217 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
27218 +# CONFIG_CDROM_PKTCDVD is not set
27219 +# CONFIG_ATA_OVER_ETH is not set
27220 +# CONFIG_XILINX_SYSACE is not set
27221 +CONFIG_MISC_DEVICES=y
27222 +# CONFIG_PHANTOM is not set
27223 +# CONFIG_EEPROM_93CX6 is not set
27224 +# CONFIG_SGI_IOC4 is not set
27225 +# CONFIG_TIFM_CORE is not set
27226 +# CONFIG_IDE is not set
27229 +# SCSI device support
27231 +# CONFIG_RAID_ATTRS is not set
27232 +# CONFIG_SCSI is not set
27233 +# CONFIG_SCSI_DMA is not set
27234 +# CONFIG_SCSI_NETLINK is not set
27235 +# CONFIG_ATA is not set
27236 +# CONFIG_MD is not set
27237 +# CONFIG_FUSION is not set
27240 +# IEEE 1394 (FireWire) support
27242 +# CONFIG_FIREWIRE is not set
27243 +# CONFIG_IEEE1394 is not set
27244 +# CONFIG_I2O is not set
27245 +CONFIG_MACINTOSH_DRIVERS=y
27246 +# CONFIG_MAC_EMUMOUSEBTN is not set
27247 +# CONFIG_WINDFARM is not set
27248 +CONFIG_NETDEVICES=y
27249 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
27250 +# CONFIG_DUMMY is not set
27251 +# CONFIG_BONDING is not set
27252 +# CONFIG_MACVLAN is not set
27253 +# CONFIG_EQUALIZER is not set
27254 +# CONFIG_TUN is not set
27255 +# CONFIG_VETH is not set
27256 +# CONFIG_IP1000 is not set
27257 +# CONFIG_ARCNET is not set
27258 +# CONFIG_PHYLIB is not set
27259 +CONFIG_NET_ETHERNET=y
27260 +# CONFIG_MII is not set
27261 +# CONFIG_HAPPYMEAL is not set
27262 +# CONFIG_SUNGEM is not set
27263 +# CONFIG_CASSINI is not set
27264 +# CONFIG_NET_VENDOR_3COM is not set
27265 +# CONFIG_NET_TULIP is not set
27266 +# CONFIG_HP100 is not set
27267 +CONFIG_IBM_NEW_EMAC=y
27268 +CONFIG_IBM_NEW_EMAC_RXB=128
27269 +CONFIG_IBM_NEW_EMAC_TXB=64
27270 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
27271 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
27272 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
27273 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
27274 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
27275 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
27276 +# CONFIG_IBM_NEW_EMAC_TAH is not set
27277 +CONFIG_IBM_NEW_EMAC_EMAC4=y
27278 +# CONFIG_NET_PCI is not set
27279 +# CONFIG_B44 is not set
27280 +CONFIG_NETDEV_1000=y
27281 +# CONFIG_ACENIC is not set
27282 +# CONFIG_DL2K is not set
27283 +# CONFIG_E1000 is not set
27284 +# CONFIG_E1000E is not set
27285 +# CONFIG_NS83820 is not set
27286 +# CONFIG_HAMACHI is not set
27287 +# CONFIG_YELLOWFIN is not set
27288 +# CONFIG_R8169 is not set
27289 +# CONFIG_SIS190 is not set
27290 +# CONFIG_SKGE is not set
27291 +# CONFIG_SKY2 is not set
27292 +# CONFIG_SK98LIN is not set
27293 +# CONFIG_VIA_VELOCITY is not set
27294 +# CONFIG_TIGON3 is not set
27295 +# CONFIG_BNX2 is not set
27296 +# CONFIG_QLA3XXX is not set
27297 +# CONFIG_ATL1 is not set
27298 +CONFIG_NETDEV_10000=y
27299 +# CONFIG_CHELSIO_T1 is not set
27300 +# CONFIG_CHELSIO_T3 is not set
27301 +# CONFIG_IXGBE is not set
27302 +# CONFIG_IXGB is not set
27303 +# CONFIG_S2IO is not set
27304 +# CONFIG_MYRI10GE is not set
27305 +# CONFIG_NETXEN_NIC is not set
27306 +# CONFIG_NIU is not set
27307 +# CONFIG_MLX4_CORE is not set
27308 +# CONFIG_TEHUTI is not set
27309 +# CONFIG_TR is not set
27314 +# CONFIG_WLAN_PRE80211 is not set
27315 +# CONFIG_WLAN_80211 is not set
27316 +# CONFIG_WAN is not set
27317 +# CONFIG_FDDI is not set
27318 +# CONFIG_HIPPI is not set
27319 +# CONFIG_PPP is not set
27320 +# CONFIG_SLIP is not set
27321 +# CONFIG_SHAPER is not set
27322 +# CONFIG_NETCONSOLE is not set
27323 +# CONFIG_NETPOLL is not set
27324 +# CONFIG_NET_POLL_CONTROLLER is not set
27325 +# CONFIG_ISDN is not set
27326 +# CONFIG_PHONE is not set
27329 +# Input device support
27331 +# CONFIG_INPUT is not set
27334 +# Hardware I/O ports
27336 +# CONFIG_SERIO is not set
27337 +# CONFIG_GAMEPORT is not set
27340 +# Character devices
27342 +# CONFIG_VT is not set
27343 +# CONFIG_SERIAL_NONSTANDARD is not set
27348 +CONFIG_SERIAL_8250=y
27349 +CONFIG_SERIAL_8250_CONSOLE=y
27350 +# CONFIG_SERIAL_8250_PCI is not set
27351 +CONFIG_SERIAL_8250_NR_UARTS=4
27352 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
27353 +CONFIG_SERIAL_8250_EXTENDED=y
27354 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
27355 +CONFIG_SERIAL_8250_SHARE_IRQ=y
27356 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
27357 +# CONFIG_SERIAL_8250_RSA is not set
27360 +# Non-8250 serial port support
27362 +# CONFIG_SERIAL_UARTLITE is not set
27363 +CONFIG_SERIAL_CORE=y
27364 +CONFIG_SERIAL_CORE_CONSOLE=y
27365 +# CONFIG_SERIAL_JSM is not set
27366 +CONFIG_SERIAL_OF_PLATFORM=y
27367 +CONFIG_UNIX98_PTYS=y
27368 +CONFIG_LEGACY_PTYS=y
27369 +CONFIG_LEGACY_PTY_COUNT=256
27370 +# CONFIG_IPMI_HANDLER is not set
27371 +# CONFIG_HW_RANDOM is not set
27372 +# CONFIG_NVRAM is not set
27373 +# CONFIG_GEN_RTC is not set
27374 +# CONFIG_R3964 is not set
27375 +# CONFIG_APPLICOM is not set
27376 +# CONFIG_RAW_DRIVER is not set
27377 +# CONFIG_TCG_TPM is not set
27379 +# CONFIG_I2C is not set
27384 +# CONFIG_SPI is not set
27385 +# CONFIG_SPI_MASTER is not set
27386 +# CONFIG_W1 is not set
27387 +# CONFIG_POWER_SUPPLY is not set
27388 +# CONFIG_HWMON is not set
27389 +# CONFIG_WATCHDOG is not set
27392 +# Sonics Silicon Backplane
27394 +CONFIG_SSB_POSSIBLE=y
27395 +# CONFIG_SSB is not set
27398 +# Multifunction device drivers
27400 +# CONFIG_MFD_SM501 is not set
27403 +# Multimedia devices
27405 +# CONFIG_VIDEO_DEV is not set
27406 +# CONFIG_DVB_CORE is not set
27410 +# Graphics support
27412 +# CONFIG_AGP is not set
27413 +# CONFIG_DRM is not set
27414 +# CONFIG_VGASTATE is not set
27415 +CONFIG_VIDEO_OUTPUT_CONTROL=m
27416 +# CONFIG_FB is not set
27417 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
27420 +# Display device support
27422 +# CONFIG_DISPLAY_SUPPORT is not set
27427 +# CONFIG_SOUND is not set
27428 +CONFIG_USB_SUPPORT=y
27429 +CONFIG_USB_ARCH_HAS_HCD=y
27430 +CONFIG_USB_ARCH_HAS_OHCI=y
27431 +CONFIG_USB_ARCH_HAS_EHCI=y
27432 +# CONFIG_USB is not set
27435 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
27439 +# USB Gadget Support
27441 +# CONFIG_USB_GADGET is not set
27442 +# CONFIG_MMC is not set
27443 +# CONFIG_NEW_LEDS is not set
27444 +# CONFIG_INFINIBAND is not set
27445 +# CONFIG_EDAC is not set
27446 +# CONFIG_RTC_CLASS is not set
27451 +# CONFIG_UIO is not set
27457 +# CONFIG_EXT2_FS_XATTR is not set
27458 +# CONFIG_EXT2_FS_XIP is not set
27459 +# CONFIG_EXT3_FS is not set
27460 +# CONFIG_EXT4DEV_FS is not set
27461 +# CONFIG_REISERFS_FS is not set
27462 +# CONFIG_JFS_FS is not set
27463 +# CONFIG_FS_POSIX_ACL is not set
27464 +# CONFIG_XFS_FS is not set
27465 +# CONFIG_GFS2_FS is not set
27466 +# CONFIG_OCFS2_FS is not set
27467 +# CONFIG_MINIX_FS is not set
27468 +# CONFIG_ROMFS_FS is not set
27470 +CONFIG_INOTIFY_USER=y
27471 +# CONFIG_QUOTA is not set
27473 +# CONFIG_AUTOFS_FS is not set
27474 +# CONFIG_AUTOFS4_FS is not set
27475 +# CONFIG_FUSE_FS is not set
27478 +# CD-ROM/DVD Filesystems
27480 +# CONFIG_ISO9660_FS is not set
27481 +# CONFIG_UDF_FS is not set
27484 +# DOS/FAT/NT Filesystems
27486 +# CONFIG_MSDOS_FS is not set
27487 +# CONFIG_VFAT_FS is not set
27488 +# CONFIG_NTFS_FS is not set
27491 +# Pseudo filesystems
27494 +CONFIG_PROC_KCORE=y
27495 +CONFIG_PROC_SYSCTL=y
27498 +# CONFIG_TMPFS_POSIX_ACL is not set
27499 +# CONFIG_HUGETLB_PAGE is not set
27500 +# CONFIG_CONFIGFS_FS is not set
27503 +# Miscellaneous filesystems
27505 +# CONFIG_ADFS_FS is not set
27506 +# CONFIG_AFFS_FS is not set
27507 +# CONFIG_HFS_FS is not set
27508 +# CONFIG_HFSPLUS_FS is not set
27509 +# CONFIG_BEFS_FS is not set
27510 +# CONFIG_BFS_FS is not set
27511 +# CONFIG_EFS_FS is not set
27513 +# CONFIG_VXFS_FS is not set
27514 +# CONFIG_HPFS_FS is not set
27515 +# CONFIG_QNX4FS_FS is not set
27516 +# CONFIG_SYSV_FS is not set
27517 +# CONFIG_UFS_FS is not set
27518 +CONFIG_NETWORK_FILESYSTEMS=y
27521 +# CONFIG_NFS_V3_ACL is not set
27522 +# CONFIG_NFS_V4 is not set
27523 +# CONFIG_NFS_DIRECTIO is not set
27524 +# CONFIG_NFSD is not set
27528 +CONFIG_NFS_COMMON=y
27530 +# CONFIG_SUNRPC_BIND34 is not set
27531 +# CONFIG_RPCSEC_GSS_KRB5 is not set
27532 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
27533 +# CONFIG_SMB_FS is not set
27534 +# CONFIG_CIFS is not set
27535 +# CONFIG_NCP_FS is not set
27536 +# CONFIG_CODA_FS is not set
27537 +# CONFIG_AFS_FS is not set
27542 +# CONFIG_PARTITION_ADVANCED is not set
27543 +CONFIG_MSDOS_PARTITION=y
27544 +# CONFIG_NLS is not set
27545 +# CONFIG_DLM is not set
27546 +# CONFIG_UCC_SLOW is not set
27549 +# Library routines
27551 +CONFIG_BITREVERSE=y
27552 +# CONFIG_CRC_CCITT is not set
27553 +# CONFIG_CRC16 is not set
27554 +# CONFIG_CRC_ITU_T is not set
27556 +# CONFIG_CRC7 is not set
27557 +# CONFIG_LIBCRC32C is not set
27558 +CONFIG_ZLIB_INFLATE=y
27560 +CONFIG_HAS_IOMEM=y
27561 +CONFIG_HAS_IOPORT=y
27563 +CONFIG_INSTRUMENTATION=y
27564 +# CONFIG_PROFILING is not set
27565 +# CONFIG_KPROBES is not set
27566 +# CONFIG_MARKERS is not set
27571 +# CONFIG_PRINTK_TIME is not set
27572 +CONFIG_ENABLE_WARN_DEPRECATED=y
27573 +CONFIG_ENABLE_MUST_CHECK=y
27574 +CONFIG_MAGIC_SYSRQ=y
27575 +# CONFIG_UNUSED_SYMBOLS is not set
27576 +# CONFIG_DEBUG_FS is not set
27577 +# CONFIG_HEADERS_CHECK is not set
27578 +CONFIG_DEBUG_KERNEL=y
27579 +# CONFIG_DEBUG_SHIRQ is not set
27580 +CONFIG_DETECT_SOFTLOCKUP=y
27581 +CONFIG_SCHED_DEBUG=y
27582 +# CONFIG_SCHEDSTATS is not set
27583 +# CONFIG_TIMER_STATS is not set
27584 +# CONFIG_SLUB_DEBUG_ON is not set
27585 +# CONFIG_DEBUG_RT_MUTEXES is not set
27586 +# CONFIG_RT_MUTEX_TESTER is not set
27587 +# CONFIG_DEBUG_SPINLOCK is not set
27588 +# CONFIG_DEBUG_MUTEXES is not set
27589 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
27590 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
27591 +# CONFIG_DEBUG_KOBJECT is not set
27592 +# CONFIG_DEBUG_BUGVERBOSE is not set
27593 +# CONFIG_DEBUG_INFO is not set
27594 +# CONFIG_DEBUG_VM is not set
27595 +# CONFIG_DEBUG_LIST is not set
27596 +# CONFIG_DEBUG_SG is not set
27597 +CONFIG_FORCED_INLINING=y
27598 +# CONFIG_BOOT_PRINTK_DELAY is not set
27599 +# CONFIG_RCU_TORTURE_TEST is not set
27600 +# CONFIG_FAULT_INJECTION is not set
27601 +# CONFIG_SAMPLES is not set
27602 +# CONFIG_DEBUG_STACKOVERFLOW is not set
27603 +# CONFIG_DEBUG_STACK_USAGE is not set
27604 +# CONFIG_DEBUG_PAGEALLOC is not set
27606 +# CONFIG_KGDB is not set
27607 +# CONFIG_XMON is not set
27608 +# CONFIG_BDI_SWITCH is not set
27609 +# CONFIG_PPC_EARLY_DEBUG is not set
27612 +# Security options
27614 +# CONFIG_KEYS is not set
27615 +# CONFIG_SECURITY is not set
27616 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
27618 +CONFIG_CRYPTO_ALGAPI=y
27619 +CONFIG_CRYPTO_BLKCIPHER=y
27620 +CONFIG_CRYPTO_MANAGER=y
27621 +# CONFIG_CRYPTO_HMAC is not set
27622 +# CONFIG_CRYPTO_XCBC is not set
27623 +# CONFIG_CRYPTO_NULL is not set
27624 +# CONFIG_CRYPTO_MD4 is not set
27625 +CONFIG_CRYPTO_MD5=y
27626 +# CONFIG_CRYPTO_SHA1 is not set
27627 +# CONFIG_CRYPTO_SHA256 is not set
27628 +# CONFIG_CRYPTO_SHA512 is not set
27629 +# CONFIG_CRYPTO_WP512 is not set
27630 +# CONFIG_CRYPTO_TGR192 is not set
27631 +# CONFIG_CRYPTO_GF128MUL is not set
27632 +CONFIG_CRYPTO_ECB=y
27633 +CONFIG_CRYPTO_CBC=y
27634 +CONFIG_CRYPTO_PCBC=y
27635 +# CONFIG_CRYPTO_LRW is not set
27636 +# CONFIG_CRYPTO_XTS is not set
27637 +# CONFIG_CRYPTO_CRYPTD is not set
27638 +CONFIG_CRYPTO_DES=y
27639 +# CONFIG_CRYPTO_FCRYPT is not set
27640 +# CONFIG_CRYPTO_BLOWFISH is not set
27641 +# CONFIG_CRYPTO_TWOFISH is not set
27642 +# CONFIG_CRYPTO_SERPENT is not set
27643 +# CONFIG_CRYPTO_AES is not set
27644 +# CONFIG_CRYPTO_CAST5 is not set
27645 +# CONFIG_CRYPTO_CAST6 is not set
27646 +# CONFIG_CRYPTO_TEA is not set
27647 +# CONFIG_CRYPTO_ARC4 is not set
27648 +# CONFIG_CRYPTO_KHAZAD is not set
27649 +# CONFIG_CRYPTO_ANUBIS is not set
27650 +# CONFIG_CRYPTO_SEED is not set
27651 +# CONFIG_CRYPTO_DEFLATE is not set
27652 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
27653 +# CONFIG_CRYPTO_CRC32C is not set
27654 +# CONFIG_CRYPTO_CAMELLIA is not set
27655 +# CONFIG_CRYPTO_TEST is not set
27656 +# CONFIG_CRYPTO_AUTHENC is not set
27657 +CONFIG_CRYPTO_HW=y
27658 +# CONFIG_PPC_CLOCK is not set
27659 --- a/arch/powerpc/configs/kilauea_defconfig
27660 +++ b/arch/powerpc/configs/kilauea_defconfig
27663 # Automatically generated make config: don't edit
27664 -# Linux kernel version: 2.6.24-rc4
27665 -# Thu Dec 6 16:48:20 2007
27666 +# Linux kernel version: 2.6.24-rc6
27667 +# Thu Jan 3 14:21:31 2008
27669 # CONFIG_PPC64 is not set
27672 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
27675 -# CONFIG_PPC_UDBG_16550 is not set
27676 +CONFIG_PPC_UDBG_16550=y
27677 # CONFIG_GENERIC_TBSYNC is not set
27678 CONFIG_AUDIT_ARCH=y
27679 CONFIG_GENERIC_BUG=y
27680 @@ -125,6 +125,7 @@
27681 # CONFIG_DEFAULT_CFQ is not set
27682 # CONFIG_DEFAULT_NOOP is not set
27683 CONFIG_DEFAULT_IOSCHED="anticipatory"
27684 +CONFIG_PPC4xx_PCI_EXPRESS=y
27688 @@ -134,9 +135,12 @@
27689 # CONFIG_PPC_CELL is not set
27690 # CONFIG_PPC_CELL_NATIVE is not set
27691 # CONFIG_PQ2ADS is not set
27692 +# CONFIG_EP405 is not set
27694 +# CONFIG_MAKALU is not set
27695 # CONFIG_WALNUT is not set
27696 # CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
27698 # CONFIG_MPIC is not set
27699 # CONFIG_MPIC_WEIRD is not set
27700 # CONFIG_PPC_I8259 is not set
27701 @@ -199,11 +203,17 @@
27705 -# CONFIG_PCI is not set
27706 -# CONFIG_PCI_DOMAINS is not set
27707 -# CONFIG_PCI_SYSCALL is not set
27708 -# CONFIG_ARCH_SUPPORTS_MSI is not set
27709 +CONFIG_PPC_INDIRECT_PCI=y
27711 +CONFIG_PCI_DOMAINS=y
27712 +CONFIG_PCI_SYSCALL=y
27713 +# CONFIG_PCIEPORTBUS is not set
27714 +CONFIG_ARCH_SUPPORTS_MSI=y
27715 +# CONFIG_PCI_MSI is not set
27716 +CONFIG_PCI_LEGACY=y
27717 +# CONFIG_PCI_DEBUG is not set
27718 # CONFIG_PCCARD is not set
27719 +# CONFIG_HOTPLUG_PCI is not set
27723 @@ -368,11 +378,13 @@
27724 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
27725 # CONFIG_MTD_PHYSMAP is not set
27726 CONFIG_MTD_PHYSMAP_OF=y
27727 +# CONFIG_MTD_INTEL_VR_NOR is not set
27728 # CONFIG_MTD_PLATRAM is not set
27731 # Self-contained MTD device drivers
27733 +# CONFIG_MTD_PMC551 is not set
27734 # CONFIG_MTD_SLRAM is not set
27735 # CONFIG_MTD_PHRAM is not set
27736 # CONFIG_MTD_MTDRAM is not set
27737 @@ -395,9 +407,14 @@
27738 # CONFIG_PARPORT is not set
27740 # CONFIG_BLK_DEV_FD is not set
27741 +# CONFIG_BLK_CPQ_DA is not set
27742 +# CONFIG_BLK_CPQ_CISS_DA is not set
27743 +# CONFIG_BLK_DEV_DAC960 is not set
27744 +# CONFIG_BLK_DEV_UMEM is not set
27745 # CONFIG_BLK_DEV_COW_COMMON is not set
27746 # CONFIG_BLK_DEV_LOOP is not set
27747 # CONFIG_BLK_DEV_NBD is not set
27748 +# CONFIG_BLK_DEV_SX8 is not set
27749 CONFIG_BLK_DEV_RAM=y
27750 CONFIG_BLK_DEV_RAM_COUNT=16
27751 CONFIG_BLK_DEV_RAM_SIZE=35000
27752 @@ -417,6 +434,14 @@
27753 # CONFIG_SCSI_NETLINK is not set
27754 # CONFIG_ATA is not set
27755 # CONFIG_MD is not set
27756 +# CONFIG_FUSION is not set
27759 +# IEEE 1394 (FireWire) support
27761 +# CONFIG_FIREWIRE is not set
27762 +# CONFIG_IEEE1394 is not set
27763 +# CONFIG_I2O is not set
27764 # CONFIG_MACINTOSH_DRIVERS is not set
27765 CONFIG_NETDEVICES=y
27766 # CONFIG_NETDEVICES_MULTIQUEUE is not set
27767 @@ -426,9 +451,33 @@
27768 # CONFIG_EQUALIZER is not set
27769 # CONFIG_TUN is not set
27770 # CONFIG_VETH is not set
27771 -# CONFIG_NET_ETHERNET is not set
27772 +# CONFIG_IP1000 is not set
27773 +# CONFIG_ARCNET is not set
27774 +# CONFIG_PHYLIB is not set
27775 +CONFIG_NET_ETHERNET=y
27776 +# CONFIG_MII is not set
27777 +# CONFIG_HAPPYMEAL is not set
27778 +# CONFIG_SUNGEM is not set
27779 +# CONFIG_CASSINI is not set
27780 +# CONFIG_NET_VENDOR_3COM is not set
27781 +# CONFIG_NET_TULIP is not set
27782 +# CONFIG_HP100 is not set
27783 +CONFIG_IBM_NEW_EMAC=y
27784 +CONFIG_IBM_NEW_EMAC_RXB=256
27785 +CONFIG_IBM_NEW_EMAC_TXB=256
27786 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
27787 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
27788 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
27789 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
27790 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
27791 +CONFIG_IBM_NEW_EMAC_RGMII=y
27792 +# CONFIG_IBM_NEW_EMAC_TAH is not set
27793 +CONFIG_IBM_NEW_EMAC_EMAC4=y
27794 +# CONFIG_NET_PCI is not set
27795 +# CONFIG_B44 is not set
27796 # CONFIG_NETDEV_1000 is not set
27797 # CONFIG_NETDEV_10000 is not set
27798 +# CONFIG_TR is not set
27802 @@ -436,6 +485,8 @@
27803 # CONFIG_WLAN_PRE80211 is not set
27804 # CONFIG_WLAN_80211 is not set
27805 # CONFIG_WAN is not set
27806 +# CONFIG_FDDI is not set
27807 +# CONFIG_HIPPI is not set
27808 # CONFIG_PPP is not set
27809 # CONFIG_SLIP is not set
27810 # CONFIG_SHAPER is not set
27811 @@ -467,6 +518,7 @@
27813 CONFIG_SERIAL_8250=y
27814 CONFIG_SERIAL_8250_CONSOLE=y
27815 +CONFIG_SERIAL_8250_PCI=y
27816 CONFIG_SERIAL_8250_NR_UARTS=4
27817 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
27818 CONFIG_SERIAL_8250_EXTENDED=y
27819 @@ -481,6 +533,7 @@
27820 # CONFIG_SERIAL_UARTLITE is not set
27821 CONFIG_SERIAL_CORE=y
27822 CONFIG_SERIAL_CORE_CONSOLE=y
27823 +# CONFIG_SERIAL_JSM is not set
27824 CONFIG_SERIAL_OF_PLATFORM=y
27825 CONFIG_UNIX98_PTYS=y
27826 CONFIG_LEGACY_PTYS=y
27827 @@ -490,8 +543,10 @@
27828 # CONFIG_NVRAM is not set
27829 # CONFIG_GEN_RTC is not set
27830 # CONFIG_R3964 is not set
27831 +# CONFIG_APPLICOM is not set
27832 # CONFIG_RAW_DRIVER is not set
27833 # CONFIG_TCG_TPM is not set
27835 # CONFIG_I2C is not set
27838 @@ -525,6 +580,8 @@
27842 +# CONFIG_AGP is not set
27843 +# CONFIG_DRM is not set
27844 # CONFIG_VGASTATE is not set
27845 # CONFIG_VIDEO_OUTPUT_CONTROL is not set
27846 # CONFIG_FB is not set
27847 @@ -542,6 +599,7 @@
27848 # CONFIG_USB_SUPPORT is not set
27849 # CONFIG_MMC is not set
27850 # CONFIG_NEW_LEDS is not set
27851 +# CONFIG_INFINIBAND is not set
27852 # CONFIG_EDAC is not set
27853 # CONFIG_RTC_CLASS is not set
27855 --- a/arch/powerpc/configs/lite5200_defconfig
27859 -# Automatically generated make config: don't edit
27860 -# Linux kernel version: 2.6.24-rc4
27861 -# Thu Dec 6 16:48:24 2007
27863 -# CONFIG_PPC64 is not set
27866 -# Processor support
27869 -# CONFIG_PPC_85xx is not set
27870 -# CONFIG_PPC_8xx is not set
27871 -# CONFIG_40x is not set
27872 -# CONFIG_44x is not set
27873 -# CONFIG_E200 is not set
27875 -# CONFIG_ALTIVEC is not set
27876 -CONFIG_PPC_STD_MMU=y
27877 -CONFIG_PPC_STD_MMU_32=y
27878 -# CONFIG_PPC_MM_SLICES is not set
27879 -# CONFIG_SMP is not set
27881 -CONFIG_WORD_SIZE=32
27882 -CONFIG_PPC_MERGE=y
27884 -CONFIG_GENERIC_CMOS_UPDATE=y
27885 -CONFIG_GENERIC_TIME=y
27886 -CONFIG_GENERIC_TIME_VSYSCALL=y
27887 -CONFIG_GENERIC_CLOCKEVENTS=y
27888 -CONFIG_GENERIC_HARDIRQS=y
27889 -CONFIG_IRQ_PER_CPU=y
27890 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
27891 -CONFIG_ARCH_HAS_ILOG2_U32=y
27892 -CONFIG_GENERIC_HWEIGHT=y
27893 -CONFIG_GENERIC_CALIBRATE_DELAY=y
27894 -CONFIG_GENERIC_FIND_NEXT_BIT=y
27895 -# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
27897 -CONFIG_EARLY_PRINTK=y
27898 -CONFIG_GENERIC_NVRAM=y
27899 -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
27900 -CONFIG_ARCH_MAY_HAVE_PC_FDC=y
27903 -# CONFIG_PPC_UDBG_16550 is not set
27904 -# CONFIG_GENERIC_TBSYNC is not set
27905 -CONFIG_AUDIT_ARCH=y
27906 -CONFIG_GENERIC_BUG=y
27907 -# CONFIG_DEFAULT_UIMAGE is not set
27908 -# CONFIG_PPC_DCR_NATIVE is not set
27909 -# CONFIG_PPC_DCR_MMIO is not set
27910 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27915 -CONFIG_EXPERIMENTAL=y
27916 -CONFIG_BROKEN_ON_SMP=y
27917 -CONFIG_INIT_ENV_ARG_LIMIT=32
27918 -CONFIG_LOCALVERSION=""
27919 -CONFIG_LOCALVERSION_AUTO=y
27922 -CONFIG_SYSVIPC_SYSCTL=y
27923 -# CONFIG_POSIX_MQUEUE is not set
27924 -# CONFIG_BSD_PROCESS_ACCT is not set
27925 -# CONFIG_TASKSTATS is not set
27926 -# CONFIG_USER_NS is not set
27927 -# CONFIG_PID_NS is not set
27928 -# CONFIG_AUDIT is not set
27929 -# CONFIG_IKCONFIG is not set
27930 -CONFIG_LOG_BUF_SHIFT=14
27931 -# CONFIG_CGROUPS is not set
27932 -# CONFIG_FAIR_GROUP_SCHED is not set
27933 -CONFIG_SYSFS_DEPRECATED=y
27934 -# CONFIG_RELAY is not set
27935 -CONFIG_BLK_DEV_INITRD=y
27936 -CONFIG_INITRAMFS_SOURCE=""
27937 -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
27940 -# CONFIG_SYSCTL_SYSCALL is not set
27941 -# CONFIG_KALLSYMS is not set
27946 -CONFIG_BASE_FULL=y
27948 -CONFIG_ANON_INODES=y
27949 -# CONFIG_EPOLL is not set
27953 -CONFIG_VM_EVENT_COUNTERS=y
27954 -CONFIG_SLUB_DEBUG=y
27955 -# CONFIG_SLAB is not set
27957 -# CONFIG_SLOB is not set
27958 -CONFIG_RT_MUTEXES=y
27959 -# CONFIG_TINY_SHMEM is not set
27960 -CONFIG_BASE_SMALL=0
27962 -CONFIG_MODULE_UNLOAD=y
27963 -# CONFIG_MODULE_FORCE_UNLOAD is not set
27964 -# CONFIG_MODVERSIONS is not set
27965 -# CONFIG_MODULE_SRCVERSION_ALL is not set
27966 -# CONFIG_KMOD is not set
27968 -# CONFIG_LBD is not set
27969 -# CONFIG_BLK_DEV_IO_TRACE is not set
27970 -# CONFIG_LSF is not set
27971 -# CONFIG_BLK_DEV_BSG is not set
27976 -CONFIG_IOSCHED_NOOP=y
27977 -CONFIG_IOSCHED_AS=y
27978 -CONFIG_IOSCHED_DEADLINE=y
27979 -CONFIG_IOSCHED_CFQ=y
27980 -CONFIG_DEFAULT_AS=y
27981 -# CONFIG_DEFAULT_DEADLINE is not set
27982 -# CONFIG_DEFAULT_CFQ is not set
27983 -# CONFIG_DEFAULT_NOOP is not set
27984 -CONFIG_DEFAULT_IOSCHED="anticipatory"
27987 -# Platform support
27989 -CONFIG_PPC_MULTIPLATFORM=y
27990 -# CONFIG_PPC_82xx is not set
27991 -# CONFIG_PPC_83xx is not set
27992 -# CONFIG_PPC_86xx is not set
27993 -CONFIG_CLASSIC32=y
27994 -# CONFIG_PPC_CHRP is not set
27995 -CONFIG_PPC_MPC52xx=y
27996 -CONFIG_PPC_MPC5200=y
27997 -CONFIG_PPC_MPC5200_BUGFIX=y
27998 -# CONFIG_PPC_EFIKA is not set
27999 -CONFIG_PPC_LITE5200=y
28000 -# CONFIG_PPC_PMAC is not set
28001 -# CONFIG_PPC_CELL is not set
28002 -# CONFIG_PPC_CELL_NATIVE is not set
28003 -# CONFIG_PQ2ADS is not set
28004 -# CONFIG_EMBEDDED6xx is not set
28005 -# CONFIG_MPIC is not set
28006 -# CONFIG_MPIC_WEIRD is not set
28007 -# CONFIG_PPC_I8259 is not set
28008 -# CONFIG_PPC_RTAS is not set
28009 -# CONFIG_MMIO_NVRAM is not set
28010 -# CONFIG_PPC_MPC106 is not set
28011 -# CONFIG_PPC_970_NAP is not set
28012 -# CONFIG_PPC_INDIRECT_IO is not set
28013 -# CONFIG_GENERIC_IOMAP is not set
28014 -# CONFIG_CPU_FREQ is not set
28015 -# CONFIG_TAU is not set
28016 -# CONFIG_CPM2 is not set
28017 -# CONFIG_FSL_ULI1575 is not set
28018 -CONFIG_PPC_BESTCOMM=y
28019 -CONFIG_PPC_BESTCOMM_ATA=y
28020 -CONFIG_PPC_BESTCOMM_FEC=y
28021 -CONFIG_PPC_BESTCOMM_GEN_BD=y
28026 -# CONFIG_HIGHMEM is not set
28027 -CONFIG_TICK_ONESHOT=y
28029 -CONFIG_HIGH_RES_TIMERS=y
28030 -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
28031 -# CONFIG_HZ_100 is not set
28033 -# CONFIG_HZ_300 is not set
28034 -# CONFIG_HZ_1000 is not set
28036 -CONFIG_PREEMPT_NONE=y
28037 -# CONFIG_PREEMPT_VOLUNTARY is not set
28038 -# CONFIG_PREEMPT is not set
28039 -CONFIG_BINFMT_ELF=y
28040 -# CONFIG_BINFMT_MISC is not set
28041 -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
28042 -# CONFIG_KEXEC is not set
28043 -CONFIG_ARCH_FLATMEM_ENABLE=y
28044 -CONFIG_ARCH_POPULATES_NODE_MAP=y
28045 -CONFIG_SELECT_MEMORY_MODEL=y
28046 -CONFIG_FLATMEM_MANUAL=y
28047 -# CONFIG_DISCONTIGMEM_MANUAL is not set
28048 -# CONFIG_SPARSEMEM_MANUAL is not set
28050 -CONFIG_FLAT_NODE_MEM_MAP=y
28051 -# CONFIG_SPARSEMEM_STATIC is not set
28052 -# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
28053 -CONFIG_SPLIT_PTLOCK_CPUS=4
28054 -# CONFIG_RESOURCES_64BIT is not set
28055 -CONFIG_ZONE_DMA_FLAG=1
28057 -CONFIG_VIRT_TO_BUS=y
28058 -CONFIG_PROC_DEVICETREE=y
28059 -# CONFIG_CMDLINE_BOOL is not set
28061 -# CONFIG_PM_LEGACY is not set
28062 -# CONFIG_PM_DEBUG is not set
28064 -CONFIG_SUSPEND_UP_POSSIBLE=y
28066 -CONFIG_HIBERNATION_UP_POSSIBLE=y
28067 -# CONFIG_HIBERNATION is not set
28069 -CONFIG_WANT_DEVICE_TREE=y
28070 -CONFIG_DEVICE_TREE=""
28071 -CONFIG_ISA_DMA_API=y
28077 -CONFIG_GENERIC_ISA_DMA=y
28078 -# CONFIG_PPC_INDIRECT_PCI is not set
28081 -CONFIG_PCI_DOMAINS=y
28082 -CONFIG_PCI_SYSCALL=y
28083 -# CONFIG_PCIEPORTBUS is not set
28084 -CONFIG_ARCH_SUPPORTS_MSI=y
28085 -# CONFIG_PCI_MSI is not set
28086 -CONFIG_PCI_LEGACY=y
28087 -# CONFIG_PCI_DEBUG is not set
28088 -# CONFIG_PCCARD is not set
28089 -# CONFIG_HOTPLUG_PCI is not set
28094 -# CONFIG_ADVANCED_OPTIONS is not set
28097 -# Default settings for advanced configuration options are used
28099 -CONFIG_HIGHMEM_START=0xfe000000
28100 -CONFIG_LOWMEM_SIZE=0x30000000
28101 -CONFIG_KERNEL_START=0xc0000000
28102 -CONFIG_TASK_SIZE=0xc0000000
28103 -CONFIG_BOOT_LOAD=0x00800000
28111 -# Networking options
28114 -# CONFIG_PACKET_MMAP is not set
28117 -CONFIG_XFRM_USER=m
28118 -# CONFIG_XFRM_SUB_POLICY is not set
28119 -# CONFIG_XFRM_MIGRATE is not set
28120 -# CONFIG_NET_KEY is not set
28122 -CONFIG_IP_MULTICAST=y
28123 -# CONFIG_IP_ADVANCED_ROUTER is not set
28124 -CONFIG_IP_FIB_HASH=y
28126 -CONFIG_IP_PNP_DHCP=y
28127 -CONFIG_IP_PNP_BOOTP=y
28128 -# CONFIG_IP_PNP_RARP is not set
28129 -# CONFIG_NET_IPIP is not set
28130 -# CONFIG_NET_IPGRE is not set
28131 -# CONFIG_IP_MROUTE is not set
28132 -# CONFIG_ARPD is not set
28133 -CONFIG_SYN_COOKIES=y
28134 -# CONFIG_INET_AH is not set
28135 -# CONFIG_INET_ESP is not set
28136 -# CONFIG_INET_IPCOMP is not set
28137 -# CONFIG_INET_XFRM_TUNNEL is not set
28138 -# CONFIG_INET_TUNNEL is not set
28139 -CONFIG_INET_XFRM_MODE_TRANSPORT=y
28140 -CONFIG_INET_XFRM_MODE_TUNNEL=y
28141 -CONFIG_INET_XFRM_MODE_BEET=y
28142 -# CONFIG_INET_LRO is not set
28143 -CONFIG_INET_DIAG=y
28144 -CONFIG_INET_TCP_DIAG=y
28145 -# CONFIG_TCP_CONG_ADVANCED is not set
28146 -CONFIG_TCP_CONG_CUBIC=y
28147 -CONFIG_DEFAULT_TCP_CONG="cubic"
28148 -# CONFIG_TCP_MD5SIG is not set
28149 -# CONFIG_IPV6 is not set
28150 -# CONFIG_INET6_XFRM_TUNNEL is not set
28151 -# CONFIG_INET6_TUNNEL is not set
28152 -# CONFIG_NETWORK_SECMARK is not set
28153 -# CONFIG_NETFILTER is not set
28154 -# CONFIG_IP_DCCP is not set
28155 -# CONFIG_IP_SCTP is not set
28156 -# CONFIG_TIPC is not set
28157 -# CONFIG_ATM is not set
28158 -# CONFIG_BRIDGE is not set
28159 -# CONFIG_VLAN_8021Q is not set
28160 -# CONFIG_DECNET is not set
28161 -# CONFIG_LLC2 is not set
28162 -# CONFIG_IPX is not set
28163 -# CONFIG_ATALK is not set
28164 -# CONFIG_X25 is not set
28165 -# CONFIG_LAPB is not set
28166 -# CONFIG_ECONET is not set
28167 -# CONFIG_WAN_ROUTER is not set
28168 -# CONFIG_NET_SCHED is not set
28173 -# CONFIG_NET_PKTGEN is not set
28174 -# CONFIG_HAMRADIO is not set
28175 -# CONFIG_IRDA is not set
28176 -# CONFIG_BT is not set
28177 -# CONFIG_AF_RXRPC is not set
28182 -# CONFIG_CFG80211 is not set
28183 -# CONFIG_WIRELESS_EXT is not set
28184 -# CONFIG_MAC80211 is not set
28185 -# CONFIG_IEEE80211 is not set
28186 -# CONFIG_RFKILL is not set
28187 -# CONFIG_NET_9P is not set
28194 -# Generic Driver Options
28196 -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
28197 -CONFIG_STANDALONE=y
28198 -CONFIG_PREVENT_FIRMWARE_BUILD=y
28199 -# CONFIG_FW_LOADER is not set
28200 -# CONFIG_DEBUG_DRIVER is not set
28201 -# CONFIG_DEBUG_DEVRES is not set
28202 -# CONFIG_SYS_HYPERVISOR is not set
28203 -# CONFIG_CONNECTOR is not set
28204 -# CONFIG_MTD is not set
28205 -CONFIG_OF_DEVICE=y
28206 -# CONFIG_PARPORT is not set
28208 -# CONFIG_BLK_DEV_FD is not set
28209 -# CONFIG_BLK_CPQ_DA is not set
28210 -# CONFIG_BLK_CPQ_CISS_DA is not set
28211 -# CONFIG_BLK_DEV_DAC960 is not set
28212 -# CONFIG_BLK_DEV_UMEM is not set
28213 -# CONFIG_BLK_DEV_COW_COMMON is not set
28214 -CONFIG_BLK_DEV_LOOP=y
28215 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set
28216 -# CONFIG_BLK_DEV_NBD is not set
28217 -# CONFIG_BLK_DEV_SX8 is not set
28218 -CONFIG_BLK_DEV_RAM=y
28219 -CONFIG_BLK_DEV_RAM_COUNT=16
28220 -CONFIG_BLK_DEV_RAM_SIZE=32768
28221 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
28222 -# CONFIG_CDROM_PKTCDVD is not set
28223 -# CONFIG_ATA_OVER_ETH is not set
28224 -CONFIG_MISC_DEVICES=y
28225 -# CONFIG_PHANTOM is not set
28226 -# CONFIG_EEPROM_93CX6 is not set
28227 -# CONFIG_SGI_IOC4 is not set
28228 -# CONFIG_TIFM_CORE is not set
28229 -# CONFIG_IDE is not set
28232 -# SCSI device support
28234 -# CONFIG_RAID_ATTRS is not set
28237 -# CONFIG_SCSI_TGT is not set
28238 -# CONFIG_SCSI_NETLINK is not set
28239 -# CONFIG_SCSI_PROC_FS is not set
28242 -# SCSI support type (disk, tape, CD-ROM)
28244 -# CONFIG_BLK_DEV_SD is not set
28245 -# CONFIG_CHR_DEV_ST is not set
28246 -# CONFIG_CHR_DEV_OSST is not set
28247 -# CONFIG_BLK_DEV_SR is not set
28248 -# CONFIG_CHR_DEV_SG is not set
28249 -# CONFIG_CHR_DEV_SCH is not set
28252 -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
28254 -# CONFIG_SCSI_MULTI_LUN is not set
28255 -# CONFIG_SCSI_CONSTANTS is not set
28256 -# CONFIG_SCSI_LOGGING is not set
28257 -# CONFIG_SCSI_SCAN_ASYNC is not set
28258 -CONFIG_SCSI_WAIT_SCAN=m
28263 -# CONFIG_SCSI_SPI_ATTRS is not set
28264 -# CONFIG_SCSI_FC_ATTRS is not set
28265 -# CONFIG_SCSI_ISCSI_ATTRS is not set
28266 -# CONFIG_SCSI_SAS_LIBSAS is not set
28267 -# CONFIG_SCSI_SRP_ATTRS is not set
28268 -CONFIG_SCSI_LOWLEVEL=y
28269 -# CONFIG_ISCSI_TCP is not set
28270 -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
28271 -# CONFIG_SCSI_3W_9XXX is not set
28272 -# CONFIG_SCSI_ACARD is not set
28273 -# CONFIG_SCSI_AACRAID is not set
28274 -# CONFIG_SCSI_AIC7XXX is not set
28275 -# CONFIG_SCSI_AIC7XXX_OLD is not set
28276 -# CONFIG_SCSI_AIC79XX is not set
28277 -# CONFIG_SCSI_AIC94XX is not set
28278 -# CONFIG_SCSI_DPT_I2O is not set
28279 -# CONFIG_SCSI_ADVANSYS is not set
28280 -# CONFIG_SCSI_ARCMSR is not set
28281 -# CONFIG_MEGARAID_NEWGEN is not set
28282 -# CONFIG_MEGARAID_LEGACY is not set
28283 -# CONFIG_MEGARAID_SAS is not set
28284 -# CONFIG_SCSI_HPTIOP is not set
28285 -# CONFIG_SCSI_BUSLOGIC is not set
28286 -# CONFIG_SCSI_DMX3191D is not set
28287 -# CONFIG_SCSI_EATA is not set
28288 -# CONFIG_SCSI_FUTURE_DOMAIN is not set
28289 -# CONFIG_SCSI_GDTH is not set
28290 -# CONFIG_SCSI_IPS is not set
28291 -# CONFIG_SCSI_INITIO is not set
28292 -# CONFIG_SCSI_INIA100 is not set
28293 -# CONFIG_SCSI_STEX is not set
28294 -# CONFIG_SCSI_SYM53C8XX_2 is not set
28295 -# CONFIG_SCSI_IPR is not set
28296 -# CONFIG_SCSI_QLOGIC_1280 is not set
28297 -# CONFIG_SCSI_QLA_FC is not set
28298 -# CONFIG_SCSI_QLA_ISCSI is not set
28299 -# CONFIG_SCSI_LPFC is not set
28300 -# CONFIG_SCSI_DC395x is not set
28301 -# CONFIG_SCSI_DC390T is not set
28302 -# CONFIG_SCSI_NSP32 is not set
28303 -# CONFIG_SCSI_DEBUG is not set
28304 -# CONFIG_SCSI_SRP is not set
28306 -# CONFIG_ATA_NONSTANDARD is not set
28307 -# CONFIG_SATA_AHCI is not set
28308 -# CONFIG_SATA_SVW is not set
28309 -# CONFIG_ATA_PIIX is not set
28310 -# CONFIG_SATA_MV is not set
28311 -# CONFIG_SATA_NV is not set
28312 -# CONFIG_PDC_ADMA is not set
28313 -# CONFIG_SATA_QSTOR is not set
28314 -# CONFIG_SATA_PROMISE is not set
28315 -# CONFIG_SATA_SX4 is not set
28316 -# CONFIG_SATA_SIL is not set
28317 -# CONFIG_SATA_SIL24 is not set
28318 -# CONFIG_SATA_SIS is not set
28319 -# CONFIG_SATA_ULI is not set
28320 -# CONFIG_SATA_VIA is not set
28321 -# CONFIG_SATA_VITESSE is not set
28322 -# CONFIG_SATA_INIC162X is not set
28323 -# CONFIG_PATA_ALI is not set
28324 -# CONFIG_PATA_AMD is not set
28325 -# CONFIG_PATA_ARTOP is not set
28326 -# CONFIG_PATA_ATIIXP is not set
28327 -# CONFIG_PATA_CMD640_PCI is not set
28328 -# CONFIG_PATA_CMD64X is not set
28329 -# CONFIG_PATA_CS5520 is not set
28330 -# CONFIG_PATA_CS5530 is not set
28331 -# CONFIG_PATA_CYPRESS is not set
28332 -# CONFIG_PATA_EFAR is not set
28333 -# CONFIG_ATA_GENERIC is not set
28334 -# CONFIG_PATA_HPT366 is not set
28335 -# CONFIG_PATA_HPT37X is not set
28336 -# CONFIG_PATA_HPT3X2N is not set
28337 -# CONFIG_PATA_HPT3X3 is not set
28338 -# CONFIG_PATA_IT821X is not set
28339 -# CONFIG_PATA_IT8213 is not set
28340 -# CONFIG_PATA_JMICRON is not set
28341 -# CONFIG_PATA_TRIFLEX is not set
28342 -# CONFIG_PATA_MARVELL is not set
28343 -CONFIG_PATA_MPC52xx=y
28344 -# CONFIG_PATA_MPIIX is not set
28345 -# CONFIG_PATA_OLDPIIX is not set
28346 -# CONFIG_PATA_NETCELL is not set
28347 -# CONFIG_PATA_NS87410 is not set
28348 -# CONFIG_PATA_NS87415 is not set
28349 -# CONFIG_PATA_OPTI is not set
28350 -# CONFIG_PATA_OPTIDMA is not set
28351 -# CONFIG_PATA_PDC_OLD is not set
28352 -# CONFIG_PATA_RADISYS is not set
28353 -# CONFIG_PATA_RZ1000 is not set
28354 -# CONFIG_PATA_SC1200 is not set
28355 -# CONFIG_PATA_SERVERWORKS is not set
28356 -# CONFIG_PATA_PDC2027X is not set
28357 -# CONFIG_PATA_SIL680 is not set
28358 -# CONFIG_PATA_SIS is not set
28359 -# CONFIG_PATA_VIA is not set
28360 -# CONFIG_PATA_WINBOND is not set
28361 -# CONFIG_PATA_PLATFORM is not set
28362 -# CONFIG_MD is not set
28363 -# CONFIG_FUSION is not set
28366 -# IEEE 1394 (FireWire) support
28368 -# CONFIG_FIREWIRE is not set
28369 -# CONFIG_IEEE1394 is not set
28370 -# CONFIG_I2O is not set
28371 -# CONFIG_MACINTOSH_DRIVERS is not set
28372 -CONFIG_NETDEVICES=y
28373 -# CONFIG_NETDEVICES_MULTIQUEUE is not set
28374 -# CONFIG_DUMMY is not set
28375 -# CONFIG_BONDING is not set
28376 -# CONFIG_MACVLAN is not set
28377 -# CONFIG_EQUALIZER is not set
28378 -# CONFIG_TUN is not set
28379 -# CONFIG_VETH is not set
28380 -# CONFIG_IP1000 is not set
28381 -# CONFIG_ARCNET is not set
28382 -# CONFIG_NET_ETHERNET is not set
28383 -CONFIG_NETDEV_1000=y
28384 -# CONFIG_ACENIC is not set
28385 -# CONFIG_DL2K is not set
28386 -# CONFIG_E1000 is not set
28387 -# CONFIG_E1000E is not set
28388 -# CONFIG_NS83820 is not set
28389 -# CONFIG_HAMACHI is not set
28390 -# CONFIG_YELLOWFIN is not set
28391 -# CONFIG_R8169 is not set
28392 -# CONFIG_SIS190 is not set
28393 -# CONFIG_SKGE is not set
28394 -# CONFIG_SKY2 is not set
28395 -# CONFIG_SK98LIN is not set
28396 -# CONFIG_VIA_VELOCITY is not set
28397 -# CONFIG_TIGON3 is not set
28398 -# CONFIG_BNX2 is not set
28399 -# CONFIG_MV643XX_ETH is not set
28400 -# CONFIG_QLA3XXX is not set
28401 -# CONFIG_ATL1 is not set
28402 -CONFIG_NETDEV_10000=y
28403 -# CONFIG_CHELSIO_T1 is not set
28404 -# CONFIG_CHELSIO_T3 is not set
28405 -# CONFIG_IXGBE is not set
28406 -# CONFIG_IXGB is not set
28407 -# CONFIG_S2IO is not set
28408 -# CONFIG_MYRI10GE is not set
28409 -# CONFIG_NETXEN_NIC is not set
28410 -# CONFIG_NIU is not set
28411 -# CONFIG_MLX4_CORE is not set
28412 -# CONFIG_TEHUTI is not set
28413 -# CONFIG_TR is not set
28418 -# CONFIG_WLAN_PRE80211 is not set
28419 -# CONFIG_WLAN_80211 is not set
28420 -# CONFIG_WAN is not set
28421 -# CONFIG_FDDI is not set
28422 -# CONFIG_HIPPI is not set
28423 -# CONFIG_PPP is not set
28424 -# CONFIG_SLIP is not set
28425 -# CONFIG_NET_FC is not set
28426 -# CONFIG_SHAPER is not set
28427 -# CONFIG_NETCONSOLE is not set
28428 -# CONFIG_NETPOLL is not set
28429 -# CONFIG_NET_POLL_CONTROLLER is not set
28430 -# CONFIG_ISDN is not set
28431 -# CONFIG_PHONE is not set
28434 -# Input device support
28436 -# CONFIG_INPUT is not set
28439 -# Hardware I/O ports
28441 -# CONFIG_SERIO is not set
28442 -# CONFIG_GAMEPORT is not set
28445 -# Character devices
28447 -# CONFIG_VT is not set
28448 -# CONFIG_SERIAL_NONSTANDARD is not set
28453 -# CONFIG_SERIAL_8250 is not set
28456 -# Non-8250 serial port support
28458 -# CONFIG_SERIAL_UARTLITE is not set
28459 -CONFIG_SERIAL_CORE=y
28460 -CONFIG_SERIAL_CORE_CONSOLE=y
28461 -CONFIG_SERIAL_MPC52xx=y
28462 -CONFIG_SERIAL_MPC52xx_CONSOLE=y
28463 -CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=9600
28464 -# CONFIG_SERIAL_JSM is not set
28465 -CONFIG_UNIX98_PTYS=y
28466 -CONFIG_LEGACY_PTYS=y
28467 -CONFIG_LEGACY_PTY_COUNT=256
28468 -# CONFIG_IPMI_HANDLER is not set
28469 -# CONFIG_HW_RANDOM is not set
28470 -# CONFIG_NVRAM is not set
28471 -# CONFIG_GEN_RTC is not set
28472 -# CONFIG_R3964 is not set
28473 -# CONFIG_APPLICOM is not set
28474 -# CONFIG_RAW_DRIVER is not set
28475 -# CONFIG_TCG_TPM is not set
28477 -# CONFIG_I2C is not set
28482 -# CONFIG_SPI is not set
28483 -# CONFIG_SPI_MASTER is not set
28484 -# CONFIG_W1 is not set
28485 -# CONFIG_POWER_SUPPLY is not set
28486 -# CONFIG_HWMON is not set
28487 -# CONFIG_WATCHDOG is not set
28490 -# Sonics Silicon Backplane
28492 -CONFIG_SSB_POSSIBLE=y
28493 -# CONFIG_SSB is not set
28496 -# Multifunction device drivers
28498 -# CONFIG_MFD_SM501 is not set
28501 -# Multimedia devices
28503 -# CONFIG_VIDEO_DEV is not set
28504 -# CONFIG_DVB_CORE is not set
28505 -# CONFIG_DAB is not set
28508 -# Graphics support
28510 -# CONFIG_AGP is not set
28511 -# CONFIG_DRM is not set
28512 -# CONFIG_VGASTATE is not set
28513 -CONFIG_VIDEO_OUTPUT_CONTROL=m
28514 -# CONFIG_FB is not set
28515 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
28518 -# Display device support
28520 -# CONFIG_DISPLAY_SUPPORT is not set
28525 -# CONFIG_SOUND is not set
28526 -CONFIG_USB_SUPPORT=y
28527 -CONFIG_USB_ARCH_HAS_HCD=y
28528 -CONFIG_USB_ARCH_HAS_OHCI=y
28529 -CONFIG_USB_ARCH_HAS_EHCI=y
28530 -# CONFIG_USB is not set
28533 -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
28537 -# USB Gadget Support
28539 -# CONFIG_USB_GADGET is not set
28540 -# CONFIG_MMC is not set
28541 -# CONFIG_NEW_LEDS is not set
28542 -# CONFIG_INFINIBAND is not set
28543 -# CONFIG_EDAC is not set
28544 -# CONFIG_RTC_CLASS is not set
28549 -# CONFIG_UIO is not set
28555 -# CONFIG_EXT2_FS_XATTR is not set
28556 -# CONFIG_EXT2_FS_XIP is not set
28558 -CONFIG_EXT3_FS_XATTR=y
28559 -# CONFIG_EXT3_FS_POSIX_ACL is not set
28560 -# CONFIG_EXT3_FS_SECURITY is not set
28561 -# CONFIG_EXT4DEV_FS is not set
28563 -CONFIG_FS_MBCACHE=y
28564 -# CONFIG_REISERFS_FS is not set
28565 -# CONFIG_JFS_FS is not set
28566 -# CONFIG_FS_POSIX_ACL is not set
28567 -# CONFIG_XFS_FS is not set
28568 -# CONFIG_GFS2_FS is not set
28569 -# CONFIG_OCFS2_FS is not set
28570 -# CONFIG_MINIX_FS is not set
28571 -# CONFIG_ROMFS_FS is not set
28573 -CONFIG_INOTIFY_USER=y
28574 -# CONFIG_QUOTA is not set
28576 -# CONFIG_AUTOFS_FS is not set
28577 -# CONFIG_AUTOFS4_FS is not set
28578 -# CONFIG_FUSE_FS is not set
28581 -# CD-ROM/DVD Filesystems
28583 -# CONFIG_ISO9660_FS is not set
28584 -# CONFIG_UDF_FS is not set
28587 -# DOS/FAT/NT Filesystems
28589 -# CONFIG_MSDOS_FS is not set
28590 -# CONFIG_VFAT_FS is not set
28591 -# CONFIG_NTFS_FS is not set
28594 -# Pseudo filesystems
28597 -CONFIG_PROC_KCORE=y
28598 -CONFIG_PROC_SYSCTL=y
28601 -# CONFIG_TMPFS_POSIX_ACL is not set
28602 -# CONFIG_HUGETLB_PAGE is not set
28603 -# CONFIG_CONFIGFS_FS is not set
28606 -# Miscellaneous filesystems
28608 -# CONFIG_ADFS_FS is not set
28609 -# CONFIG_AFFS_FS is not set
28610 -# CONFIG_HFS_FS is not set
28611 -# CONFIG_HFSPLUS_FS is not set
28612 -# CONFIG_BEFS_FS is not set
28613 -# CONFIG_BFS_FS is not set
28614 -# CONFIG_EFS_FS is not set
28615 -# CONFIG_CRAMFS is not set
28616 -# CONFIG_VXFS_FS is not set
28617 -# CONFIG_HPFS_FS is not set
28618 -# CONFIG_QNX4FS_FS is not set
28619 -# CONFIG_SYSV_FS is not set
28620 -# CONFIG_UFS_FS is not set
28621 -CONFIG_NETWORK_FILESYSTEMS=y
28622 -# CONFIG_NFS_FS is not set
28623 -# CONFIG_NFSD is not set
28624 -# CONFIG_SMB_FS is not set
28625 -# CONFIG_CIFS is not set
28626 -# CONFIG_NCP_FS is not set
28627 -# CONFIG_CODA_FS is not set
28628 -# CONFIG_AFS_FS is not set
28633 -# CONFIG_PARTITION_ADVANCED is not set
28634 -CONFIG_MSDOS_PARTITION=y
28635 -# CONFIG_NLS is not set
28636 -# CONFIG_DLM is not set
28637 -# CONFIG_UCC_SLOW is not set
28640 -# Library routines
28642 -# CONFIG_CRC_CCITT is not set
28643 -# CONFIG_CRC16 is not set
28644 -# CONFIG_CRC_ITU_T is not set
28645 -# CONFIG_CRC32 is not set
28646 -# CONFIG_CRC7 is not set
28647 -# CONFIG_LIBCRC32C is not set
28649 -CONFIG_HAS_IOMEM=y
28650 -CONFIG_HAS_IOPORT=y
28652 -# CONFIG_INSTRUMENTATION is not set
28657 -CONFIG_PRINTK_TIME=y
28658 -CONFIG_ENABLE_WARN_DEPRECATED=y
28659 -CONFIG_ENABLE_MUST_CHECK=y
28660 -# CONFIG_MAGIC_SYSRQ is not set
28661 -# CONFIG_UNUSED_SYMBOLS is not set
28662 -# CONFIG_DEBUG_FS is not set
28663 -# CONFIG_HEADERS_CHECK is not set
28664 -CONFIG_DEBUG_KERNEL=y
28665 -# CONFIG_DEBUG_SHIRQ is not set
28666 -CONFIG_DETECT_SOFTLOCKUP=y
28667 -CONFIG_SCHED_DEBUG=y
28668 -# CONFIG_SCHEDSTATS is not set
28669 -# CONFIG_TIMER_STATS is not set
28670 -# CONFIG_SLUB_DEBUG_ON is not set
28671 -# CONFIG_DEBUG_RT_MUTEXES is not set
28672 -# CONFIG_RT_MUTEX_TESTER is not set
28673 -# CONFIG_DEBUG_SPINLOCK is not set
28674 -# CONFIG_DEBUG_MUTEXES is not set
28675 -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
28676 -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
28677 -# CONFIG_DEBUG_KOBJECT is not set
28678 -# CONFIG_DEBUG_BUGVERBOSE is not set
28679 -CONFIG_DEBUG_INFO=y
28680 -# CONFIG_DEBUG_VM is not set
28681 -# CONFIG_DEBUG_LIST is not set
28682 -# CONFIG_DEBUG_SG is not set
28683 -CONFIG_FORCED_INLINING=y
28684 -# CONFIG_BOOT_PRINTK_DELAY is not set
28685 -# CONFIG_RCU_TORTURE_TEST is not set
28686 -# CONFIG_FAULT_INJECTION is not set
28687 -# CONFIG_SAMPLES is not set
28688 -# CONFIG_DEBUG_STACKOVERFLOW is not set
28689 -# CONFIG_DEBUG_STACK_USAGE is not set
28690 -# CONFIG_DEBUG_PAGEALLOC is not set
28691 -# CONFIG_DEBUGGER is not set
28692 -# CONFIG_BDI_SWITCH is not set
28693 -# CONFIG_BOOTX_TEXT is not set
28694 -# CONFIG_PPC_EARLY_DEBUG is not set
28697 -# Security options
28699 -# CONFIG_KEYS is not set
28700 -# CONFIG_SECURITY is not set
28701 -# CONFIG_SECURITY_FILE_CAPABILITIES is not set
28702 -# CONFIG_CRYPTO is not set
28703 -CONFIG_PPC_CLOCK=y
28704 -CONFIG_PPC_LIB_RHEAP=y
28706 +++ b/arch/powerpc/configs/makalu_defconfig
28709 +# Automatically generated make config: don't edit
28710 +# Linux kernel version: 2.6.24-rc6
28711 +# Mon Dec 24 11:18:32 2007
28713 +# CONFIG_PPC64 is not set
28716 +# Processor support
28718 +# CONFIG_6xx is not set
28719 +# CONFIG_PPC_85xx is not set
28720 +# CONFIG_PPC_8xx is not set
28722 +# CONFIG_44x is not set
28723 +# CONFIG_E200 is not set
28725 +# CONFIG_PPC_MM_SLICES is not set
28726 +CONFIG_NOT_COHERENT_CACHE=y
28728 +CONFIG_WORD_SIZE=32
28729 +CONFIG_PPC_MERGE=y
28731 +CONFIG_GENERIC_CMOS_UPDATE=y
28732 +CONFIG_GENERIC_TIME=y
28733 +CONFIG_GENERIC_TIME_VSYSCALL=y
28734 +CONFIG_GENERIC_CLOCKEVENTS=y
28735 +CONFIG_GENERIC_HARDIRQS=y
28736 +CONFIG_IRQ_PER_CPU=y
28737 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
28738 +CONFIG_ARCH_HAS_ILOG2_U32=y
28739 +CONFIG_GENERIC_HWEIGHT=y
28740 +CONFIG_GENERIC_CALIBRATE_DELAY=y
28741 +CONFIG_GENERIC_FIND_NEXT_BIT=y
28742 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
28744 +CONFIG_EARLY_PRINTK=y
28745 +CONFIG_GENERIC_NVRAM=y
28746 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
28747 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
28750 +CONFIG_PPC_UDBG_16550=y
28751 +# CONFIG_GENERIC_TBSYNC is not set
28752 +CONFIG_AUDIT_ARCH=y
28753 +CONFIG_GENERIC_BUG=y
28754 +# CONFIG_DEFAULT_UIMAGE is not set
28755 +CONFIG_PPC_DCR_NATIVE=y
28756 +# CONFIG_PPC_DCR_MMIO is not set
28758 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28763 +CONFIG_EXPERIMENTAL=y
28764 +CONFIG_BROKEN_ON_SMP=y
28765 +CONFIG_INIT_ENV_ARG_LIMIT=32
28766 +CONFIG_LOCALVERSION=""
28767 +CONFIG_LOCALVERSION_AUTO=y
28770 +CONFIG_SYSVIPC_SYSCTL=y
28771 +CONFIG_POSIX_MQUEUE=y
28772 +# CONFIG_BSD_PROCESS_ACCT is not set
28773 +# CONFIG_TASKSTATS is not set
28774 +# CONFIG_USER_NS is not set
28775 +# CONFIG_PID_NS is not set
28776 +# CONFIG_AUDIT is not set
28777 +# CONFIG_IKCONFIG is not set
28778 +CONFIG_LOG_BUF_SHIFT=14
28779 +# CONFIG_CGROUPS is not set
28780 +# CONFIG_FAIR_GROUP_SCHED is not set
28781 +CONFIG_SYSFS_DEPRECATED=y
28782 +# CONFIG_RELAY is not set
28783 +CONFIG_BLK_DEV_INITRD=y
28784 +CONFIG_INITRAMFS_SOURCE=""
28785 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
28788 +CONFIG_SYSCTL_SYSCALL=y
28790 +CONFIG_KALLSYMS_ALL=y
28791 +CONFIG_KALLSYMS_EXTRA_PASS=y
28796 +CONFIG_BASE_FULL=y
28798 +CONFIG_ANON_INODES=y
28803 +CONFIG_VM_EVENT_COUNTERS=y
28804 +CONFIG_SLUB_DEBUG=y
28805 +# CONFIG_SLAB is not set
28807 +# CONFIG_SLOB is not set
28808 +CONFIG_RT_MUTEXES=y
28809 +# CONFIG_TINY_SHMEM is not set
28810 +CONFIG_BASE_SMALL=0
28812 +CONFIG_MODULE_UNLOAD=y
28813 +# CONFIG_MODULE_FORCE_UNLOAD is not set
28814 +# CONFIG_MODVERSIONS is not set
28815 +# CONFIG_MODULE_SRCVERSION_ALL is not set
28819 +# CONFIG_BLK_DEV_IO_TRACE is not set
28820 +# CONFIG_LSF is not set
28821 +# CONFIG_BLK_DEV_BSG is not set
28826 +CONFIG_IOSCHED_NOOP=y
28827 +CONFIG_IOSCHED_AS=y
28828 +CONFIG_IOSCHED_DEADLINE=y
28829 +CONFIG_IOSCHED_CFQ=y
28830 +CONFIG_DEFAULT_AS=y
28831 +# CONFIG_DEFAULT_DEADLINE is not set
28832 +# CONFIG_DEFAULT_CFQ is not set
28833 +# CONFIG_DEFAULT_NOOP is not set
28834 +CONFIG_DEFAULT_IOSCHED="anticipatory"
28835 +CONFIG_PPC4xx_PCI_EXPRESS=y
28838 +# Platform support
28840 +# CONFIG_PPC_MPC52xx is not set
28841 +# CONFIG_PPC_MPC5200 is not set
28842 +# CONFIG_PPC_CELL is not set
28843 +# CONFIG_PPC_CELL_NATIVE is not set
28844 +# CONFIG_PQ2ADS is not set
28845 +# CONFIG_EP405 is not set
28846 +# CONFIG_KILAUEA is not set
28848 +# CONFIG_WALNUT is not set
28849 +# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
28851 +# CONFIG_MPIC is not set
28852 +# CONFIG_MPIC_WEIRD is not set
28853 +# CONFIG_PPC_I8259 is not set
28854 +# CONFIG_PPC_RTAS is not set
28855 +# CONFIG_MMIO_NVRAM is not set
28856 +# CONFIG_PPC_MPC106 is not set
28857 +# CONFIG_PPC_970_NAP is not set
28858 +# CONFIG_PPC_INDIRECT_IO is not set
28859 +# CONFIG_GENERIC_IOMAP is not set
28860 +# CONFIG_CPU_FREQ is not set
28861 +# CONFIG_CPM2 is not set
28862 +# CONFIG_FSL_ULI1575 is not set
28867 +# CONFIG_HIGHMEM is not set
28868 +# CONFIG_TICK_ONESHOT is not set
28869 +# CONFIG_NO_HZ is not set
28870 +# CONFIG_HIGH_RES_TIMERS is not set
28871 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
28872 +# CONFIG_HZ_100 is not set
28874 +# CONFIG_HZ_300 is not set
28875 +# CONFIG_HZ_1000 is not set
28877 +CONFIG_PREEMPT_NONE=y
28878 +# CONFIG_PREEMPT_VOLUNTARY is not set
28879 +# CONFIG_PREEMPT is not set
28880 +CONFIG_BINFMT_ELF=y
28881 +# CONFIG_BINFMT_MISC is not set
28882 +# CONFIG_MATH_EMULATION is not set
28883 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
28884 +CONFIG_ARCH_FLATMEM_ENABLE=y
28885 +CONFIG_ARCH_POPULATES_NODE_MAP=y
28886 +CONFIG_SELECT_MEMORY_MODEL=y
28887 +CONFIG_FLATMEM_MANUAL=y
28888 +# CONFIG_DISCONTIGMEM_MANUAL is not set
28889 +# CONFIG_SPARSEMEM_MANUAL is not set
28891 +CONFIG_FLAT_NODE_MEM_MAP=y
28892 +# CONFIG_SPARSEMEM_STATIC is not set
28893 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
28894 +CONFIG_SPLIT_PTLOCK_CPUS=4
28895 +# CONFIG_RESOURCES_64BIT is not set
28896 +CONFIG_ZONE_DMA_FLAG=1
28898 +CONFIG_VIRT_TO_BUS=y
28899 +CONFIG_PROC_DEVICETREE=y
28900 +# CONFIG_CMDLINE_BOOL is not set
28901 +# CONFIG_PM is not set
28902 +CONFIG_SUSPEND_UP_POSSIBLE=y
28903 +CONFIG_HIBERNATION_UP_POSSIBLE=y
28905 +CONFIG_WANT_DEVICE_TREE=y
28906 +CONFIG_DEVICE_TREE="kilauea.dts"
28907 +CONFIG_ISA_DMA_API=y
28913 +CONFIG_PPC_INDIRECT_PCI=y
28915 +CONFIG_PCI_DOMAINS=y
28916 +CONFIG_PCI_SYSCALL=y
28917 +# CONFIG_PCIEPORTBUS is not set
28918 +CONFIG_ARCH_SUPPORTS_MSI=y
28919 +# CONFIG_PCI_MSI is not set
28920 +CONFIG_PCI_LEGACY=y
28921 +# CONFIG_PCI_DEBUG is not set
28922 +# CONFIG_PCCARD is not set
28923 +# CONFIG_HOTPLUG_PCI is not set
28928 +# CONFIG_ADVANCED_OPTIONS is not set
28931 +# Default settings for advanced configuration options are used
28933 +CONFIG_HIGHMEM_START=0xfe000000
28934 +CONFIG_LOWMEM_SIZE=0x30000000
28935 +CONFIG_KERNEL_START=0xc0000000
28936 +CONFIG_TASK_SIZE=0xc0000000
28937 +CONFIG_CONSISTENT_START=0xff100000
28938 +CONFIG_CONSISTENT_SIZE=0x00200000
28939 +CONFIG_BOOT_LOAD=0x00400000
28947 +# Networking options
28950 +# CONFIG_PACKET_MMAP is not set
28952 +# CONFIG_NET_KEY is not set
28954 +# CONFIG_IP_MULTICAST is not set
28955 +# CONFIG_IP_ADVANCED_ROUTER is not set
28956 +CONFIG_IP_FIB_HASH=y
28958 +CONFIG_IP_PNP_DHCP=y
28959 +CONFIG_IP_PNP_BOOTP=y
28960 +# CONFIG_IP_PNP_RARP is not set
28961 +# CONFIG_NET_IPIP is not set
28962 +# CONFIG_NET_IPGRE is not set
28963 +# CONFIG_ARPD is not set
28964 +# CONFIG_SYN_COOKIES is not set
28965 +# CONFIG_INET_AH is not set
28966 +# CONFIG_INET_ESP is not set
28967 +# CONFIG_INET_IPCOMP is not set
28968 +# CONFIG_INET_XFRM_TUNNEL is not set
28969 +# CONFIG_INET_TUNNEL is not set
28970 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
28971 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
28972 +# CONFIG_INET_XFRM_MODE_BEET is not set
28973 +# CONFIG_INET_LRO is not set
28974 +CONFIG_INET_DIAG=y
28975 +CONFIG_INET_TCP_DIAG=y
28976 +# CONFIG_TCP_CONG_ADVANCED is not set
28977 +CONFIG_TCP_CONG_CUBIC=y
28978 +CONFIG_DEFAULT_TCP_CONG="cubic"
28979 +# CONFIG_TCP_MD5SIG is not set
28980 +# CONFIG_IPV6 is not set
28981 +# CONFIG_INET6_XFRM_TUNNEL is not set
28982 +# CONFIG_INET6_TUNNEL is not set
28983 +# CONFIG_NETWORK_SECMARK is not set
28984 +# CONFIG_NETFILTER is not set
28985 +# CONFIG_IP_DCCP is not set
28986 +# CONFIG_IP_SCTP is not set
28987 +# CONFIG_TIPC is not set
28988 +# CONFIG_ATM is not set
28989 +# CONFIG_BRIDGE is not set
28990 +# CONFIG_VLAN_8021Q is not set
28991 +# CONFIG_DECNET is not set
28992 +# CONFIG_LLC2 is not set
28993 +# CONFIG_IPX is not set
28994 +# CONFIG_ATALK is not set
28995 +# CONFIG_X25 is not set
28996 +# CONFIG_LAPB is not set
28997 +# CONFIG_ECONET is not set
28998 +# CONFIG_WAN_ROUTER is not set
28999 +# CONFIG_NET_SCHED is not set
29004 +# CONFIG_NET_PKTGEN is not set
29005 +# CONFIG_HAMRADIO is not set
29006 +# CONFIG_IRDA is not set
29007 +# CONFIG_BT is not set
29008 +# CONFIG_AF_RXRPC is not set
29013 +# CONFIG_CFG80211 is not set
29014 +# CONFIG_WIRELESS_EXT is not set
29015 +# CONFIG_MAC80211 is not set
29016 +# CONFIG_IEEE80211 is not set
29017 +# CONFIG_RFKILL is not set
29018 +# CONFIG_NET_9P is not set
29025 +# Generic Driver Options
29027 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
29028 +CONFIG_STANDALONE=y
29029 +CONFIG_PREVENT_FIRMWARE_BUILD=y
29030 +CONFIG_FW_LOADER=y
29031 +# CONFIG_DEBUG_DRIVER is not set
29032 +# CONFIG_DEBUG_DEVRES is not set
29033 +# CONFIG_SYS_HYPERVISOR is not set
29034 +CONFIG_CONNECTOR=y
29035 +CONFIG_PROC_EVENTS=y
29037 +# CONFIG_MTD_DEBUG is not set
29038 +# CONFIG_MTD_CONCAT is not set
29039 +CONFIG_MTD_PARTITIONS=y
29040 +# CONFIG_MTD_REDBOOT_PARTS is not set
29041 +CONFIG_MTD_CMDLINE_PARTS=y
29044 +# User Modules And Translation Layers
29047 +CONFIG_MTD_BLKDEVS=m
29048 +CONFIG_MTD_BLOCK=m
29049 +# CONFIG_MTD_BLOCK_RO is not set
29050 +# CONFIG_FTL is not set
29051 +# CONFIG_NFTL is not set
29052 +# CONFIG_INFTL is not set
29053 +# CONFIG_RFD_FTL is not set
29054 +# CONFIG_SSFDC is not set
29055 +# CONFIG_MTD_OOPS is not set
29058 +# RAM/ROM/Flash chip drivers
29061 +CONFIG_MTD_JEDECPROBE=y
29062 +CONFIG_MTD_GEN_PROBE=y
29063 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
29064 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
29065 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
29066 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
29067 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
29068 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
29069 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
29070 +CONFIG_MTD_CFI_I1=y
29071 +CONFIG_MTD_CFI_I2=y
29072 +# CONFIG_MTD_CFI_I4 is not set
29073 +# CONFIG_MTD_CFI_I8 is not set
29074 +# CONFIG_MTD_CFI_INTELEXT is not set
29075 +CONFIG_MTD_CFI_AMDSTD=y
29076 +# CONFIG_MTD_CFI_STAA is not set
29077 +CONFIG_MTD_CFI_UTIL=y
29078 +# CONFIG_MTD_RAM is not set
29079 +# CONFIG_MTD_ROM is not set
29080 +# CONFIG_MTD_ABSENT is not set
29083 +# Mapping drivers for chip access
29085 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
29086 +# CONFIG_MTD_PHYSMAP is not set
29087 +CONFIG_MTD_PHYSMAP_OF=y
29088 +# CONFIG_MTD_INTEL_VR_NOR is not set
29089 +# CONFIG_MTD_PLATRAM is not set
29092 +# Self-contained MTD device drivers
29094 +# CONFIG_MTD_PMC551 is not set
29095 +# CONFIG_MTD_SLRAM is not set
29096 +# CONFIG_MTD_PHRAM is not set
29097 +# CONFIG_MTD_MTDRAM is not set
29098 +# CONFIG_MTD_BLOCK2MTD is not set
29101 +# Disk-On-Chip Device Drivers
29103 +# CONFIG_MTD_DOC2000 is not set
29104 +# CONFIG_MTD_DOC2001 is not set
29105 +# CONFIG_MTD_DOC2001PLUS is not set
29106 +# CONFIG_MTD_NAND is not set
29107 +# CONFIG_MTD_ONENAND is not set
29110 +# UBI - Unsorted block images
29112 +# CONFIG_MTD_UBI is not set
29113 +CONFIG_OF_DEVICE=y
29114 +# CONFIG_PARPORT is not set
29116 +# CONFIG_BLK_DEV_FD is not set
29117 +# CONFIG_BLK_CPQ_DA is not set
29118 +# CONFIG_BLK_CPQ_CISS_DA is not set
29119 +# CONFIG_BLK_DEV_DAC960 is not set
29120 +# CONFIG_BLK_DEV_UMEM is not set
29121 +# CONFIG_BLK_DEV_COW_COMMON is not set
29122 +# CONFIG_BLK_DEV_LOOP is not set
29123 +# CONFIG_BLK_DEV_NBD is not set
29124 +# CONFIG_BLK_DEV_SX8 is not set
29125 +CONFIG_BLK_DEV_RAM=y
29126 +CONFIG_BLK_DEV_RAM_COUNT=16
29127 +CONFIG_BLK_DEV_RAM_SIZE=35000
29128 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
29129 +# CONFIG_CDROM_PKTCDVD is not set
29130 +# CONFIG_ATA_OVER_ETH is not set
29131 +# CONFIG_XILINX_SYSACE is not set
29132 +# CONFIG_MISC_DEVICES is not set
29133 +# CONFIG_IDE is not set
29136 +# SCSI device support
29138 +# CONFIG_RAID_ATTRS is not set
29139 +# CONFIG_SCSI is not set
29140 +# CONFIG_SCSI_DMA is not set
29141 +# CONFIG_SCSI_NETLINK is not set
29142 +# CONFIG_ATA is not set
29143 +# CONFIG_MD is not set
29144 +# CONFIG_FUSION is not set
29147 +# IEEE 1394 (FireWire) support
29149 +# CONFIG_FIREWIRE is not set
29150 +# CONFIG_IEEE1394 is not set
29151 +# CONFIG_I2O is not set
29152 +# CONFIG_MACINTOSH_DRIVERS is not set
29153 +CONFIG_NETDEVICES=y
29154 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
29155 +# CONFIG_DUMMY is not set
29156 +# CONFIG_BONDING is not set
29157 +# CONFIG_MACVLAN is not set
29158 +# CONFIG_EQUALIZER is not set
29159 +# CONFIG_TUN is not set
29160 +# CONFIG_VETH is not set
29161 +# CONFIG_IP1000 is not set
29162 +# CONFIG_ARCNET is not set
29163 +# CONFIG_PHYLIB is not set
29164 +CONFIG_NET_ETHERNET=y
29165 +# CONFIG_MII is not set
29166 +# CONFIG_HAPPYMEAL is not set
29167 +# CONFIG_SUNGEM is not set
29168 +# CONFIG_CASSINI is not set
29169 +# CONFIG_NET_VENDOR_3COM is not set
29170 +# CONFIG_NET_TULIP is not set
29171 +# CONFIG_HP100 is not set
29172 +CONFIG_IBM_NEW_EMAC=y
29173 +CONFIG_IBM_NEW_EMAC_RXB=256
29174 +CONFIG_IBM_NEW_EMAC_TXB=256
29175 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
29176 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
29177 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
29178 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
29179 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
29180 +CONFIG_IBM_NEW_EMAC_RGMII=y
29181 +# CONFIG_IBM_NEW_EMAC_TAH is not set
29182 +CONFIG_IBM_NEW_EMAC_EMAC4=y
29183 +# CONFIG_NET_PCI is not set
29184 +# CONFIG_B44 is not set
29185 +# CONFIG_NETDEV_1000 is not set
29186 +# CONFIG_NETDEV_10000 is not set
29187 +# CONFIG_TR is not set
29192 +# CONFIG_WLAN_PRE80211 is not set
29193 +# CONFIG_WLAN_80211 is not set
29194 +# CONFIG_WAN is not set
29195 +# CONFIG_FDDI is not set
29196 +# CONFIG_HIPPI is not set
29197 +# CONFIG_PPP is not set
29198 +# CONFIG_SLIP is not set
29199 +# CONFIG_SHAPER is not set
29200 +# CONFIG_NETCONSOLE is not set
29201 +# CONFIG_NETPOLL is not set
29202 +# CONFIG_NET_POLL_CONTROLLER is not set
29203 +# CONFIG_ISDN is not set
29204 +# CONFIG_PHONE is not set
29207 +# Input device support
29209 +# CONFIG_INPUT is not set
29212 +# Hardware I/O ports
29214 +# CONFIG_SERIO is not set
29215 +# CONFIG_GAMEPORT is not set
29218 +# Character devices
29220 +# CONFIG_VT is not set
29221 +# CONFIG_SERIAL_NONSTANDARD is not set
29226 +CONFIG_SERIAL_8250=y
29227 +CONFIG_SERIAL_8250_CONSOLE=y
29228 +CONFIG_SERIAL_8250_PCI=y
29229 +CONFIG_SERIAL_8250_NR_UARTS=4
29230 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
29231 +CONFIG_SERIAL_8250_EXTENDED=y
29232 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
29233 +CONFIG_SERIAL_8250_SHARE_IRQ=y
29234 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
29235 +# CONFIG_SERIAL_8250_RSA is not set
29238 +# Non-8250 serial port support
29240 +# CONFIG_SERIAL_UARTLITE is not set
29241 +CONFIG_SERIAL_CORE=y
29242 +CONFIG_SERIAL_CORE_CONSOLE=y
29243 +# CONFIG_SERIAL_JSM is not set
29244 +CONFIG_SERIAL_OF_PLATFORM=y
29245 +CONFIG_UNIX98_PTYS=y
29246 +CONFIG_LEGACY_PTYS=y
29247 +CONFIG_LEGACY_PTY_COUNT=256
29248 +# CONFIG_IPMI_HANDLER is not set
29249 +# CONFIG_HW_RANDOM is not set
29250 +# CONFIG_NVRAM is not set
29251 +# CONFIG_GEN_RTC is not set
29252 +# CONFIG_R3964 is not set
29253 +# CONFIG_APPLICOM is not set
29254 +# CONFIG_RAW_DRIVER is not set
29255 +# CONFIG_TCG_TPM is not set
29257 +# CONFIG_I2C is not set
29262 +# CONFIG_SPI is not set
29263 +# CONFIG_SPI_MASTER is not set
29264 +# CONFIG_W1 is not set
29265 +# CONFIG_POWER_SUPPLY is not set
29266 +# CONFIG_HWMON is not set
29267 +# CONFIG_WATCHDOG is not set
29270 +# Sonics Silicon Backplane
29272 +CONFIG_SSB_POSSIBLE=y
29273 +# CONFIG_SSB is not set
29276 +# Multifunction device drivers
29278 +# CONFIG_MFD_SM501 is not set
29281 +# Multimedia devices
29283 +# CONFIG_VIDEO_DEV is not set
29284 +# CONFIG_DVB_CORE is not set
29285 +# CONFIG_DAB is not set
29288 +# Graphics support
29290 +# CONFIG_AGP is not set
29291 +# CONFIG_DRM is not set
29292 +# CONFIG_VGASTATE is not set
29293 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
29294 +# CONFIG_FB is not set
29295 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
29298 +# Display device support
29300 +# CONFIG_DISPLAY_SUPPORT is not set
29305 +# CONFIG_SOUND is not set
29306 +# CONFIG_USB_SUPPORT is not set
29307 +# CONFIG_MMC is not set
29308 +# CONFIG_NEW_LEDS is not set
29309 +# CONFIG_INFINIBAND is not set
29310 +# CONFIG_EDAC is not set
29311 +# CONFIG_RTC_CLASS is not set
29316 +# CONFIG_UIO is not set
29322 +# CONFIG_EXT2_FS_XATTR is not set
29323 +# CONFIG_EXT2_FS_XIP is not set
29324 +# CONFIG_EXT3_FS is not set
29325 +# CONFIG_EXT4DEV_FS is not set
29326 +# CONFIG_REISERFS_FS is not set
29327 +# CONFIG_JFS_FS is not set
29328 +# CONFIG_FS_POSIX_ACL is not set
29329 +# CONFIG_XFS_FS is not set
29330 +# CONFIG_GFS2_FS is not set
29331 +# CONFIG_OCFS2_FS is not set
29332 +# CONFIG_MINIX_FS is not set
29333 +# CONFIG_ROMFS_FS is not set
29335 +CONFIG_INOTIFY_USER=y
29336 +# CONFIG_QUOTA is not set
29338 +# CONFIG_AUTOFS_FS is not set
29339 +# CONFIG_AUTOFS4_FS is not set
29340 +# CONFIG_FUSE_FS is not set
29343 +# CD-ROM/DVD Filesystems
29345 +# CONFIG_ISO9660_FS is not set
29346 +# CONFIG_UDF_FS is not set
29349 +# DOS/FAT/NT Filesystems
29351 +# CONFIG_MSDOS_FS is not set
29352 +# CONFIG_VFAT_FS is not set
29353 +# CONFIG_NTFS_FS is not set
29356 +# Pseudo filesystems
29359 +CONFIG_PROC_KCORE=y
29360 +CONFIG_PROC_SYSCTL=y
29363 +# CONFIG_TMPFS_POSIX_ACL is not set
29364 +# CONFIG_HUGETLB_PAGE is not set
29365 +# CONFIG_CONFIGFS_FS is not set
29368 +# Miscellaneous filesystems
29370 +# CONFIG_ADFS_FS is not set
29371 +# CONFIG_AFFS_FS is not set
29372 +# CONFIG_HFS_FS is not set
29373 +# CONFIG_HFSPLUS_FS is not set
29374 +# CONFIG_BEFS_FS is not set
29375 +# CONFIG_BFS_FS is not set
29376 +# CONFIG_EFS_FS is not set
29377 +# CONFIG_JFFS2_FS is not set
29379 +# CONFIG_VXFS_FS is not set
29380 +# CONFIG_HPFS_FS is not set
29381 +# CONFIG_QNX4FS_FS is not set
29382 +# CONFIG_SYSV_FS is not set
29383 +# CONFIG_UFS_FS is not set
29384 +CONFIG_NETWORK_FILESYSTEMS=y
29387 +# CONFIG_NFS_V3_ACL is not set
29388 +# CONFIG_NFS_V4 is not set
29389 +# CONFIG_NFS_DIRECTIO is not set
29390 +# CONFIG_NFSD is not set
29394 +CONFIG_NFS_COMMON=y
29396 +# CONFIG_SUNRPC_BIND34 is not set
29397 +# CONFIG_RPCSEC_GSS_KRB5 is not set
29398 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
29399 +# CONFIG_SMB_FS is not set
29400 +# CONFIG_CIFS is not set
29401 +# CONFIG_NCP_FS is not set
29402 +# CONFIG_CODA_FS is not set
29403 +# CONFIG_AFS_FS is not set
29408 +# CONFIG_PARTITION_ADVANCED is not set
29409 +CONFIG_MSDOS_PARTITION=y
29410 +# CONFIG_NLS is not set
29411 +# CONFIG_DLM is not set
29412 +# CONFIG_UCC_SLOW is not set
29415 +# Library routines
29417 +CONFIG_BITREVERSE=y
29418 +# CONFIG_CRC_CCITT is not set
29419 +# CONFIG_CRC16 is not set
29420 +# CONFIG_CRC_ITU_T is not set
29422 +# CONFIG_CRC7 is not set
29423 +# CONFIG_LIBCRC32C is not set
29424 +CONFIG_ZLIB_INFLATE=y
29426 +CONFIG_HAS_IOMEM=y
29427 +CONFIG_HAS_IOPORT=y
29429 +# CONFIG_INSTRUMENTATION is not set
29434 +# CONFIG_PRINTK_TIME is not set
29435 +CONFIG_ENABLE_WARN_DEPRECATED=y
29436 +CONFIG_ENABLE_MUST_CHECK=y
29437 +CONFIG_MAGIC_SYSRQ=y
29438 +# CONFIG_UNUSED_SYMBOLS is not set
29439 +# CONFIG_DEBUG_FS is not set
29440 +# CONFIG_HEADERS_CHECK is not set
29441 +CONFIG_DEBUG_KERNEL=y
29442 +# CONFIG_DEBUG_SHIRQ is not set
29443 +CONFIG_DETECT_SOFTLOCKUP=y
29444 +CONFIG_SCHED_DEBUG=y
29445 +# CONFIG_SCHEDSTATS is not set
29446 +# CONFIG_TIMER_STATS is not set
29447 +# CONFIG_SLUB_DEBUG_ON is not set
29448 +# CONFIG_DEBUG_RT_MUTEXES is not set
29449 +# CONFIG_RT_MUTEX_TESTER is not set
29450 +# CONFIG_DEBUG_SPINLOCK is not set
29451 +# CONFIG_DEBUG_MUTEXES is not set
29452 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
29453 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
29454 +# CONFIG_DEBUG_KOBJECT is not set
29455 +CONFIG_DEBUG_BUGVERBOSE=y
29456 +# CONFIG_DEBUG_INFO is not set
29457 +# CONFIG_DEBUG_VM is not set
29458 +# CONFIG_DEBUG_LIST is not set
29459 +# CONFIG_DEBUG_SG is not set
29460 +CONFIG_FORCED_INLINING=y
29461 +# CONFIG_BOOT_PRINTK_DELAY is not set
29462 +# CONFIG_RCU_TORTURE_TEST is not set
29463 +# CONFIG_FAULT_INJECTION is not set
29464 +# CONFIG_SAMPLES is not set
29465 +# CONFIG_DEBUG_STACKOVERFLOW is not set
29466 +# CONFIG_DEBUG_STACK_USAGE is not set
29467 +# CONFIG_DEBUG_PAGEALLOC is not set
29468 +# CONFIG_DEBUGGER is not set
29469 +# CONFIG_BDI_SWITCH is not set
29470 +# CONFIG_PPC_EARLY_DEBUG is not set
29473 +# Security options
29475 +# CONFIG_KEYS is not set
29476 +# CONFIG_SECURITY is not set
29477 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
29479 +CONFIG_CRYPTO_ALGAPI=y
29480 +CONFIG_CRYPTO_BLKCIPHER=y
29481 +CONFIG_CRYPTO_MANAGER=y
29482 +# CONFIG_CRYPTO_HMAC is not set
29483 +# CONFIG_CRYPTO_XCBC is not set
29484 +# CONFIG_CRYPTO_NULL is not set
29485 +# CONFIG_CRYPTO_MD4 is not set
29486 +CONFIG_CRYPTO_MD5=y
29487 +# CONFIG_CRYPTO_SHA1 is not set
29488 +# CONFIG_CRYPTO_SHA256 is not set
29489 +# CONFIG_CRYPTO_SHA512 is not set
29490 +# CONFIG_CRYPTO_WP512 is not set
29491 +# CONFIG_CRYPTO_TGR192 is not set
29492 +# CONFIG_CRYPTO_GF128MUL is not set
29493 +CONFIG_CRYPTO_ECB=y
29494 +CONFIG_CRYPTO_CBC=y
29495 +CONFIG_CRYPTO_PCBC=y
29496 +# CONFIG_CRYPTO_LRW is not set
29497 +# CONFIG_CRYPTO_XTS is not set
29498 +# CONFIG_CRYPTO_CRYPTD is not set
29499 +CONFIG_CRYPTO_DES=y
29500 +# CONFIG_CRYPTO_FCRYPT is not set
29501 +# CONFIG_CRYPTO_BLOWFISH is not set
29502 +# CONFIG_CRYPTO_TWOFISH is not set
29503 +# CONFIG_CRYPTO_SERPENT is not set
29504 +# CONFIG_CRYPTO_AES is not set
29505 +# CONFIG_CRYPTO_CAST5 is not set
29506 +# CONFIG_CRYPTO_CAST6 is not set
29507 +# CONFIG_CRYPTO_TEA is not set
29508 +# CONFIG_CRYPTO_ARC4 is not set
29509 +# CONFIG_CRYPTO_KHAZAD is not set
29510 +# CONFIG_CRYPTO_ANUBIS is not set
29511 +# CONFIG_CRYPTO_SEED is not set
29512 +# CONFIG_CRYPTO_DEFLATE is not set
29513 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
29514 +# CONFIG_CRYPTO_CRC32C is not set
29515 +# CONFIG_CRYPTO_CAMELLIA is not set
29516 +# CONFIG_CRYPTO_TEST is not set
29517 +# CONFIG_CRYPTO_AUTHENC is not set
29518 +CONFIG_CRYPTO_HW=y
29519 +# CONFIG_PPC_CLOCK is not set
29521 +++ b/arch/powerpc/configs/mpc5200_defconfig
29524 +# Automatically generated make config: don't edit
29525 +# Linux kernel version: 2.6.24-rc6
29526 +# Fri Jan 18 14:19:54 2008
29528 +# CONFIG_PPC64 is not set
29531 +# Processor support
29534 +# CONFIG_PPC_85xx is not set
29535 +# CONFIG_PPC_8xx is not set
29536 +# CONFIG_40x is not set
29537 +# CONFIG_44x is not set
29538 +# CONFIG_E200 is not set
29540 +# CONFIG_ALTIVEC is not set
29541 +CONFIG_PPC_STD_MMU=y
29542 +CONFIG_PPC_STD_MMU_32=y
29543 +# CONFIG_PPC_MM_SLICES is not set
29544 +# CONFIG_SMP is not set
29546 +CONFIG_WORD_SIZE=32
29547 +CONFIG_PPC_MERGE=y
29549 +CONFIG_GENERIC_CMOS_UPDATE=y
29550 +CONFIG_GENERIC_TIME=y
29551 +CONFIG_GENERIC_TIME_VSYSCALL=y
29552 +CONFIG_GENERIC_CLOCKEVENTS=y
29553 +CONFIG_GENERIC_HARDIRQS=y
29554 +CONFIG_IRQ_PER_CPU=y
29555 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
29556 +CONFIG_ARCH_HAS_ILOG2_U32=y
29557 +CONFIG_GENERIC_HWEIGHT=y
29558 +CONFIG_GENERIC_CALIBRATE_DELAY=y
29559 +CONFIG_GENERIC_FIND_NEXT_BIT=y
29560 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
29562 +CONFIG_EARLY_PRINTK=y
29563 +CONFIG_GENERIC_NVRAM=y
29564 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
29565 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
29568 +# CONFIG_PPC_UDBG_16550 is not set
29569 +# CONFIG_GENERIC_TBSYNC is not set
29570 +CONFIG_AUDIT_ARCH=y
29571 +CONFIG_GENERIC_BUG=y
29572 +# CONFIG_DEFAULT_UIMAGE is not set
29573 +# CONFIG_PPC_DCR_NATIVE is not set
29574 +# CONFIG_PPC_DCR_MMIO is not set
29575 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29580 +CONFIG_EXPERIMENTAL=y
29581 +CONFIG_BROKEN_ON_SMP=y
29582 +CONFIG_INIT_ENV_ARG_LIMIT=32
29583 +CONFIG_LOCALVERSION=""
29584 +CONFIG_LOCALVERSION_AUTO=y
29587 +CONFIG_SYSVIPC_SYSCTL=y
29588 +# CONFIG_POSIX_MQUEUE is not set
29589 +# CONFIG_BSD_PROCESS_ACCT is not set
29590 +# CONFIG_TASKSTATS is not set
29591 +# CONFIG_USER_NS is not set
29592 +# CONFIG_PID_NS is not set
29593 +# CONFIG_AUDIT is not set
29594 +# CONFIG_IKCONFIG is not set
29595 +CONFIG_LOG_BUF_SHIFT=14
29596 +# CONFIG_CGROUPS is not set
29597 +CONFIG_FAIR_GROUP_SCHED=y
29598 +CONFIG_FAIR_USER_SCHED=y
29599 +# CONFIG_FAIR_CGROUP_SCHED is not set
29600 +CONFIG_SYSFS_DEPRECATED=y
29601 +# CONFIG_RELAY is not set
29602 +CONFIG_BLK_DEV_INITRD=y
29603 +CONFIG_INITRAMFS_SOURCE=""
29604 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
29607 +# CONFIG_SYSCTL_SYSCALL is not set
29608 +# CONFIG_KALLSYMS is not set
29613 +CONFIG_BASE_FULL=y
29615 +CONFIG_ANON_INODES=y
29616 +# CONFIG_EPOLL is not set
29620 +CONFIG_VM_EVENT_COUNTERS=y
29621 +CONFIG_SLUB_DEBUG=y
29622 +# CONFIG_SLAB is not set
29624 +# CONFIG_SLOB is not set
29625 +CONFIG_RT_MUTEXES=y
29626 +# CONFIG_TINY_SHMEM is not set
29627 +CONFIG_BASE_SMALL=0
29629 +CONFIG_MODULE_UNLOAD=y
29630 +# CONFIG_MODULE_FORCE_UNLOAD is not set
29631 +# CONFIG_MODVERSIONS is not set
29632 +# CONFIG_MODULE_SRCVERSION_ALL is not set
29633 +# CONFIG_KMOD is not set
29635 +# CONFIG_LBD is not set
29636 +# CONFIG_BLK_DEV_IO_TRACE is not set
29637 +# CONFIG_LSF is not set
29638 +# CONFIG_BLK_DEV_BSG is not set
29643 +CONFIG_IOSCHED_NOOP=y
29644 +CONFIG_IOSCHED_AS=y
29645 +CONFIG_IOSCHED_DEADLINE=y
29646 +CONFIG_IOSCHED_CFQ=y
29647 +CONFIG_DEFAULT_AS=y
29648 +# CONFIG_DEFAULT_DEADLINE is not set
29649 +# CONFIG_DEFAULT_CFQ is not set
29650 +# CONFIG_DEFAULT_NOOP is not set
29651 +CONFIG_DEFAULT_IOSCHED="anticipatory"
29654 +# Platform support
29656 +CONFIG_PPC_MULTIPLATFORM=y
29657 +# CONFIG_PPC_82xx is not set
29658 +# CONFIG_PPC_83xx is not set
29659 +# CONFIG_PPC_86xx is not set
29660 +CONFIG_CLASSIC32=y
29661 +# CONFIG_PPC_CHRP is not set
29662 +CONFIG_PPC_MPC52xx=y
29663 +CONFIG_PPC_MPC5200=y
29664 +CONFIG_PPC_MPC5200_BUGFIX=y
29665 +CONFIG_PPC_MPC5200_SIMPLE=y
29666 +CONFIG_PPC_EFIKA=y
29667 +CONFIG_PPC_LITE5200=y
29668 +# CONFIG_PPC_PMAC is not set
29669 +# CONFIG_PPC_CELL is not set
29670 +# CONFIG_PPC_CELL_NATIVE is not set
29671 +# CONFIG_PQ2ADS is not set
29672 +# CONFIG_EMBEDDED6xx is not set
29673 +CONFIG_PPC_NATIVE=y
29674 +# CONFIG_UDBG_RTAS_CONSOLE is not set
29675 +# CONFIG_MPIC is not set
29676 +# CONFIG_MPIC_WEIRD is not set
29677 +# CONFIG_PPC_I8259 is not set
29679 +# CONFIG_RTAS_ERROR_LOGGING is not set
29680 +CONFIG_RTAS_PROC=y
29681 +# CONFIG_MMIO_NVRAM is not set
29682 +# CONFIG_PPC_MPC106 is not set
29683 +# CONFIG_PPC_970_NAP is not set
29684 +# CONFIG_PPC_INDIRECT_IO is not set
29685 +# CONFIG_GENERIC_IOMAP is not set
29686 +# CONFIG_CPU_FREQ is not set
29687 +# CONFIG_TAU is not set
29688 +# CONFIG_CPM2 is not set
29689 +# CONFIG_FSL_ULI1575 is not set
29690 +CONFIG_PPC_BESTCOMM=y
29691 +CONFIG_PPC_BESTCOMM_ATA=y
29692 +CONFIG_PPC_BESTCOMM_FEC=y
29693 +CONFIG_PPC_BESTCOMM_GEN_BD=y
29698 +# CONFIG_HIGHMEM is not set
29699 +CONFIG_TICK_ONESHOT=y
29701 +CONFIG_HIGH_RES_TIMERS=y
29702 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
29703 +# CONFIG_HZ_100 is not set
29705 +# CONFIG_HZ_300 is not set
29706 +# CONFIG_HZ_1000 is not set
29708 +CONFIG_PREEMPT_NONE=y
29709 +# CONFIG_PREEMPT_VOLUNTARY is not set
29710 +# CONFIG_PREEMPT is not set
29711 +CONFIG_BINFMT_ELF=y
29712 +# CONFIG_BINFMT_MISC is not set
29713 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
29714 +# CONFIG_KEXEC is not set
29715 +CONFIG_ARCH_FLATMEM_ENABLE=y
29716 +CONFIG_ARCH_POPULATES_NODE_MAP=y
29717 +CONFIG_SELECT_MEMORY_MODEL=y
29718 +CONFIG_FLATMEM_MANUAL=y
29719 +# CONFIG_DISCONTIGMEM_MANUAL is not set
29720 +# CONFIG_SPARSEMEM_MANUAL is not set
29722 +CONFIG_FLAT_NODE_MEM_MAP=y
29723 +# CONFIG_SPARSEMEM_STATIC is not set
29724 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
29725 +CONFIG_SPLIT_PTLOCK_CPUS=4
29726 +# CONFIG_RESOURCES_64BIT is not set
29727 +CONFIG_ZONE_DMA_FLAG=1
29729 +CONFIG_VIRT_TO_BUS=y
29730 +CONFIG_PROC_DEVICETREE=y
29731 +# CONFIG_CMDLINE_BOOL is not set
29733 +# CONFIG_PM_LEGACY is not set
29734 +# CONFIG_PM_DEBUG is not set
29736 +CONFIG_SUSPEND_UP_POSSIBLE=y
29738 +CONFIG_HIBERNATION_UP_POSSIBLE=y
29739 +# CONFIG_HIBERNATION is not set
29741 +CONFIG_WANT_DEVICE_TREE=y
29742 +CONFIG_DEVICE_TREE=""
29743 +CONFIG_ISA_DMA_API=y
29749 +CONFIG_GENERIC_ISA_DMA=y
29750 +# CONFIG_PPC_INDIRECT_PCI is not set
29753 +CONFIG_PCI_DOMAINS=y
29754 +CONFIG_PCI_SYSCALL=y
29755 +# CONFIG_PCIEPORTBUS is not set
29756 +CONFIG_ARCH_SUPPORTS_MSI=y
29757 +# CONFIG_PCI_MSI is not set
29758 +CONFIG_PCI_LEGACY=y
29759 +# CONFIG_PCI_DEBUG is not set
29760 +# CONFIG_PCCARD is not set
29761 +# CONFIG_HOTPLUG_PCI is not set
29766 +# CONFIG_ADVANCED_OPTIONS is not set
29769 +# Default settings for advanced configuration options are used
29771 +CONFIG_HIGHMEM_START=0xfe000000
29772 +CONFIG_LOWMEM_SIZE=0x30000000
29773 +CONFIG_KERNEL_START=0xc0000000
29774 +CONFIG_TASK_SIZE=0xc0000000
29775 +CONFIG_BOOT_LOAD=0x00800000
29783 +# Networking options
29786 +# CONFIG_PACKET_MMAP is not set
29789 +CONFIG_XFRM_USER=m
29790 +# CONFIG_XFRM_SUB_POLICY is not set
29791 +# CONFIG_XFRM_MIGRATE is not set
29792 +# CONFIG_NET_KEY is not set
29794 +CONFIG_IP_MULTICAST=y
29795 +# CONFIG_IP_ADVANCED_ROUTER is not set
29796 +CONFIG_IP_FIB_HASH=y
29798 +CONFIG_IP_PNP_DHCP=y
29799 +CONFIG_IP_PNP_BOOTP=y
29800 +# CONFIG_IP_PNP_RARP is not set
29801 +# CONFIG_NET_IPIP is not set
29802 +# CONFIG_NET_IPGRE is not set
29803 +# CONFIG_IP_MROUTE is not set
29804 +# CONFIG_ARPD is not set
29805 +CONFIG_SYN_COOKIES=y
29806 +# CONFIG_INET_AH is not set
29807 +# CONFIG_INET_ESP is not set
29808 +# CONFIG_INET_IPCOMP is not set
29809 +# CONFIG_INET_XFRM_TUNNEL is not set
29810 +# CONFIG_INET_TUNNEL is not set
29811 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
29812 +CONFIG_INET_XFRM_MODE_TUNNEL=y
29813 +CONFIG_INET_XFRM_MODE_BEET=y
29814 +# CONFIG_INET_LRO is not set
29815 +CONFIG_INET_DIAG=y
29816 +CONFIG_INET_TCP_DIAG=y
29817 +# CONFIG_TCP_CONG_ADVANCED is not set
29818 +CONFIG_TCP_CONG_CUBIC=y
29819 +CONFIG_DEFAULT_TCP_CONG="cubic"
29820 +# CONFIG_TCP_MD5SIG is not set
29821 +# CONFIG_IPV6 is not set
29822 +# CONFIG_INET6_XFRM_TUNNEL is not set
29823 +# CONFIG_INET6_TUNNEL is not set
29824 +# CONFIG_NETWORK_SECMARK is not set
29825 +# CONFIG_NETFILTER is not set
29826 +# CONFIG_IP_DCCP is not set
29827 +# CONFIG_IP_SCTP is not set
29828 +# CONFIG_TIPC is not set
29829 +# CONFIG_ATM is not set
29830 +# CONFIG_BRIDGE is not set
29831 +# CONFIG_VLAN_8021Q is not set
29832 +# CONFIG_DECNET is not set
29833 +# CONFIG_LLC2 is not set
29834 +# CONFIG_IPX is not set
29835 +# CONFIG_ATALK is not set
29836 +# CONFIG_X25 is not set
29837 +# CONFIG_LAPB is not set
29838 +# CONFIG_ECONET is not set
29839 +# CONFIG_WAN_ROUTER is not set
29840 +# CONFIG_NET_SCHED is not set
29845 +# CONFIG_NET_PKTGEN is not set
29846 +# CONFIG_HAMRADIO is not set
29847 +# CONFIG_IRDA is not set
29848 +# CONFIG_BT is not set
29849 +# CONFIG_AF_RXRPC is not set
29854 +# CONFIG_CFG80211 is not set
29855 +# CONFIG_WIRELESS_EXT is not set
29856 +# CONFIG_MAC80211 is not set
29857 +# CONFIG_IEEE80211 is not set
29858 +# CONFIG_RFKILL is not set
29859 +# CONFIG_NET_9P is not set
29866 +# Generic Driver Options
29868 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
29869 +CONFIG_STANDALONE=y
29870 +CONFIG_PREVENT_FIRMWARE_BUILD=y
29871 +# CONFIG_FW_LOADER is not set
29872 +# CONFIG_DEBUG_DRIVER is not set
29873 +# CONFIG_DEBUG_DEVRES is not set
29874 +# CONFIG_SYS_HYPERVISOR is not set
29875 +# CONFIG_CONNECTOR is not set
29877 +# CONFIG_MTD_DEBUG is not set
29878 +CONFIG_MTD_CONCAT=y
29879 +CONFIG_MTD_PARTITIONS=y
29880 +# CONFIG_MTD_REDBOOT_PARTS is not set
29881 +CONFIG_MTD_CMDLINE_PARTS=y
29884 +# User Modules And Translation Layers
29887 +CONFIG_MTD_BLKDEVS=y
29888 +CONFIG_MTD_BLOCK=y
29889 +# CONFIG_FTL is not set
29890 +# CONFIG_NFTL is not set
29891 +# CONFIG_INFTL is not set
29892 +# CONFIG_RFD_FTL is not set
29893 +# CONFIG_SSFDC is not set
29894 +# CONFIG_MTD_OOPS is not set
29897 +# RAM/ROM/Flash chip drivers
29900 +# CONFIG_MTD_JEDECPROBE is not set
29901 +CONFIG_MTD_GEN_PROBE=y
29902 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
29903 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
29904 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
29905 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
29906 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
29907 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
29908 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
29909 +CONFIG_MTD_CFI_I1=y
29910 +CONFIG_MTD_CFI_I2=y
29911 +# CONFIG_MTD_CFI_I4 is not set
29912 +# CONFIG_MTD_CFI_I8 is not set
29913 +# CONFIG_MTD_CFI_INTELEXT is not set
29914 +CONFIG_MTD_CFI_AMDSTD=y
29915 +# CONFIG_MTD_CFI_STAA is not set
29916 +CONFIG_MTD_CFI_UTIL=y
29919 +# CONFIG_MTD_ABSENT is not set
29922 +# Mapping drivers for chip access
29924 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
29925 +# CONFIG_MTD_PHYSMAP is not set
29926 +CONFIG_MTD_PHYSMAP_OF=y
29927 +# CONFIG_MTD_INTEL_VR_NOR is not set
29928 +# CONFIG_MTD_PLATRAM is not set
29931 +# Self-contained MTD device drivers
29933 +# CONFIG_MTD_PMC551 is not set
29934 +# CONFIG_MTD_SLRAM is not set
29935 +# CONFIG_MTD_PHRAM is not set
29936 +# CONFIG_MTD_MTDRAM is not set
29937 +# CONFIG_MTD_BLOCK2MTD is not set
29940 +# Disk-On-Chip Device Drivers
29942 +# CONFIG_MTD_DOC2000 is not set
29943 +# CONFIG_MTD_DOC2001 is not set
29944 +# CONFIG_MTD_DOC2001PLUS is not set
29945 +# CONFIG_MTD_NAND is not set
29946 +# CONFIG_MTD_ONENAND is not set
29949 +# UBI - Unsorted block images
29951 +# CONFIG_MTD_UBI is not set
29952 +CONFIG_OF_DEVICE=y
29953 +# CONFIG_PARPORT is not set
29955 +# CONFIG_BLK_DEV_FD is not set
29956 +# CONFIG_BLK_CPQ_DA is not set
29957 +# CONFIG_BLK_CPQ_CISS_DA is not set
29958 +# CONFIG_BLK_DEV_DAC960 is not set
29959 +# CONFIG_BLK_DEV_UMEM is not set
29960 +# CONFIG_BLK_DEV_COW_COMMON is not set
29961 +CONFIG_BLK_DEV_LOOP=y
29962 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
29963 +# CONFIG_BLK_DEV_NBD is not set
29964 +# CONFIG_BLK_DEV_SX8 is not set
29965 +# CONFIG_BLK_DEV_UB is not set
29966 +CONFIG_BLK_DEV_RAM=y
29967 +CONFIG_BLK_DEV_RAM_COUNT=16
29968 +CONFIG_BLK_DEV_RAM_SIZE=32768
29969 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
29970 +# CONFIG_CDROM_PKTCDVD is not set
29971 +# CONFIG_ATA_OVER_ETH is not set
29972 +CONFIG_MISC_DEVICES=y
29973 +# CONFIG_PHANTOM is not set
29974 +# CONFIG_EEPROM_93CX6 is not set
29975 +# CONFIG_SGI_IOC4 is not set
29976 +# CONFIG_TIFM_CORE is not set
29977 +# CONFIG_IDE is not set
29980 +# SCSI device support
29982 +# CONFIG_RAID_ATTRS is not set
29986 +# CONFIG_SCSI_NETLINK is not set
29987 +CONFIG_SCSI_PROC_FS=y
29990 +# SCSI support type (disk, tape, CD-ROM)
29992 +CONFIG_BLK_DEV_SD=y
29993 +# CONFIG_CHR_DEV_ST is not set
29994 +# CONFIG_CHR_DEV_OSST is not set
29995 +# CONFIG_BLK_DEV_SR is not set
29996 +CONFIG_CHR_DEV_SG=y
29997 +# CONFIG_CHR_DEV_SCH is not set
30000 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
30002 +# CONFIG_SCSI_MULTI_LUN is not set
30003 +# CONFIG_SCSI_CONSTANTS is not set
30004 +# CONFIG_SCSI_LOGGING is not set
30005 +# CONFIG_SCSI_SCAN_ASYNC is not set
30006 +CONFIG_SCSI_WAIT_SCAN=m
30011 +# CONFIG_SCSI_SPI_ATTRS is not set
30012 +# CONFIG_SCSI_FC_ATTRS is not set
30013 +# CONFIG_SCSI_ISCSI_ATTRS is not set
30014 +# CONFIG_SCSI_SAS_LIBSAS is not set
30015 +# CONFIG_SCSI_SRP_ATTRS is not set
30016 +CONFIG_SCSI_LOWLEVEL=y
30017 +# CONFIG_ISCSI_TCP is not set
30018 +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
30019 +# CONFIG_SCSI_3W_9XXX is not set
30020 +# CONFIG_SCSI_ACARD is not set
30021 +# CONFIG_SCSI_AACRAID is not set
30022 +# CONFIG_SCSI_AIC7XXX is not set
30023 +# CONFIG_SCSI_AIC7XXX_OLD is not set
30024 +# CONFIG_SCSI_AIC79XX is not set
30025 +# CONFIG_SCSI_AIC94XX is not set
30026 +# CONFIG_SCSI_DPT_I2O is not set
30027 +# CONFIG_SCSI_ADVANSYS is not set
30028 +# CONFIG_SCSI_ARCMSR is not set
30029 +# CONFIG_MEGARAID_NEWGEN is not set
30030 +# CONFIG_MEGARAID_LEGACY is not set
30031 +# CONFIG_MEGARAID_SAS is not set
30032 +# CONFIG_SCSI_HPTIOP is not set
30033 +# CONFIG_SCSI_BUSLOGIC is not set
30034 +# CONFIG_SCSI_DMX3191D is not set
30035 +# CONFIG_SCSI_EATA is not set
30036 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
30037 +# CONFIG_SCSI_GDTH is not set
30038 +# CONFIG_SCSI_IPS is not set
30039 +# CONFIG_SCSI_INITIO is not set
30040 +# CONFIG_SCSI_INIA100 is not set
30041 +# CONFIG_SCSI_STEX is not set
30042 +# CONFIG_SCSI_SYM53C8XX_2 is not set
30043 +# CONFIG_SCSI_IPR is not set
30044 +# CONFIG_SCSI_QLOGIC_1280 is not set
30045 +# CONFIG_SCSI_QLA_FC is not set
30046 +# CONFIG_SCSI_QLA_ISCSI is not set
30047 +# CONFIG_SCSI_LPFC is not set
30048 +# CONFIG_SCSI_DC395x is not set
30049 +# CONFIG_SCSI_DC390T is not set
30050 +# CONFIG_SCSI_NSP32 is not set
30051 +# CONFIG_SCSI_DEBUG is not set
30052 +# CONFIG_SCSI_SRP is not set
30054 +# CONFIG_ATA_NONSTANDARD is not set
30055 +# CONFIG_SATA_AHCI is not set
30056 +# CONFIG_SATA_SVW is not set
30057 +# CONFIG_ATA_PIIX is not set
30058 +# CONFIG_SATA_MV is not set
30059 +# CONFIG_SATA_NV is not set
30060 +# CONFIG_PDC_ADMA is not set
30061 +# CONFIG_SATA_QSTOR is not set
30062 +# CONFIG_SATA_PROMISE is not set
30063 +# CONFIG_SATA_SX4 is not set
30064 +# CONFIG_SATA_SIL is not set
30065 +# CONFIG_SATA_SIL24 is not set
30066 +# CONFIG_SATA_SIS is not set
30067 +# CONFIG_SATA_ULI is not set
30068 +# CONFIG_SATA_VIA is not set
30069 +# CONFIG_SATA_VITESSE is not set
30070 +# CONFIG_SATA_INIC162X is not set
30071 +# CONFIG_PATA_ALI is not set
30072 +# CONFIG_PATA_AMD is not set
30073 +# CONFIG_PATA_ARTOP is not set
30074 +# CONFIG_PATA_ATIIXP is not set
30075 +# CONFIG_PATA_CMD640_PCI is not set
30076 +# CONFIG_PATA_CMD64X is not set
30077 +# CONFIG_PATA_CS5520 is not set
30078 +# CONFIG_PATA_CS5530 is not set
30079 +# CONFIG_PATA_CYPRESS is not set
30080 +# CONFIG_PATA_EFAR is not set
30081 +# CONFIG_ATA_GENERIC is not set
30082 +# CONFIG_PATA_HPT366 is not set
30083 +# CONFIG_PATA_HPT37X is not set
30084 +# CONFIG_PATA_HPT3X2N is not set
30085 +# CONFIG_PATA_HPT3X3 is not set
30086 +# CONFIG_PATA_IT821X is not set
30087 +# CONFIG_PATA_IT8213 is not set
30088 +# CONFIG_PATA_JMICRON is not set
30089 +# CONFIG_PATA_TRIFLEX is not set
30090 +# CONFIG_PATA_MARVELL is not set
30091 +CONFIG_PATA_MPC52xx=y
30092 +# CONFIG_PATA_MPIIX is not set
30093 +# CONFIG_PATA_OLDPIIX is not set
30094 +# CONFIG_PATA_NETCELL is not set
30095 +# CONFIG_PATA_NS87410 is not set
30096 +# CONFIG_PATA_NS87415 is not set
30097 +# CONFIG_PATA_OPTI is not set
30098 +# CONFIG_PATA_OPTIDMA is not set
30099 +# CONFIG_PATA_PDC_OLD is not set
30100 +# CONFIG_PATA_RADISYS is not set
30101 +# CONFIG_PATA_RZ1000 is not set
30102 +# CONFIG_PATA_SC1200 is not set
30103 +# CONFIG_PATA_SERVERWORKS is not set
30104 +# CONFIG_PATA_PDC2027X is not set
30105 +# CONFIG_PATA_SIL680 is not set
30106 +# CONFIG_PATA_SIS is not set
30107 +# CONFIG_PATA_VIA is not set
30108 +# CONFIG_PATA_WINBOND is not set
30109 +CONFIG_PATA_PLATFORM=y
30110 +# CONFIG_PATA_OF_PLATFORM is not set
30111 +# CONFIG_MD is not set
30112 +# CONFIG_FUSION is not set
30115 +# IEEE 1394 (FireWire) support
30117 +# CONFIG_FIREWIRE is not set
30118 +# CONFIG_IEEE1394 is not set
30119 +# CONFIG_I2O is not set
30120 +# CONFIG_MACINTOSH_DRIVERS is not set
30121 +CONFIG_NETDEVICES=y
30122 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
30123 +# CONFIG_DUMMY is not set
30124 +# CONFIG_BONDING is not set
30125 +# CONFIG_MACVLAN is not set
30126 +# CONFIG_EQUALIZER is not set
30127 +# CONFIG_TUN is not set
30128 +# CONFIG_VETH is not set
30129 +# CONFIG_IP1000 is not set
30130 +# CONFIG_ARCNET is not set
30134 +# MII PHY device drivers
30136 +# CONFIG_MARVELL_PHY is not set
30137 +# CONFIG_DAVICOM_PHY is not set
30138 +# CONFIG_QSEMI_PHY is not set
30139 +# CONFIG_LXT_PHY is not set
30140 +# CONFIG_CICADA_PHY is not set
30141 +# CONFIG_VITESSE_PHY is not set
30142 +# CONFIG_SMSC_PHY is not set
30143 +# CONFIG_BROADCOM_PHY is not set
30144 +# CONFIG_ICPLUS_PHY is not set
30145 +# CONFIG_FIXED_PHY is not set
30146 +# CONFIG_MDIO_BITBANG is not set
30147 +CONFIG_NET_ETHERNET=y
30148 +# CONFIG_MII is not set
30149 +# CONFIG_HAPPYMEAL is not set
30150 +# CONFIG_SUNGEM is not set
30151 +# CONFIG_CASSINI is not set
30152 +# CONFIG_NET_VENDOR_3COM is not set
30153 +# CONFIG_NET_TULIP is not set
30154 +# CONFIG_HP100 is not set
30155 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
30156 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
30157 +# CONFIG_IBM_NEW_EMAC_TAH is not set
30158 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
30159 +# CONFIG_NET_PCI is not set
30160 +# CONFIG_B44 is not set
30161 +CONFIG_FEC_MPC52xx=y
30162 +CONFIG_FEC_MPC52xx_MDIO=y
30163 +# CONFIG_NETDEV_1000 is not set
30164 +# CONFIG_NETDEV_10000 is not set
30165 +# CONFIG_TR is not set
30170 +# CONFIG_WLAN_PRE80211 is not set
30171 +# CONFIG_WLAN_80211 is not set
30174 +# USB Network Adapters
30176 +# CONFIG_USB_CATC is not set
30177 +# CONFIG_USB_KAWETH is not set
30178 +# CONFIG_USB_PEGASUS is not set
30179 +# CONFIG_USB_RTL8150 is not set
30180 +# CONFIG_USB_USBNET is not set
30181 +# CONFIG_WAN is not set
30182 +# CONFIG_FDDI is not set
30183 +# CONFIG_HIPPI is not set
30184 +# CONFIG_PPP is not set
30185 +# CONFIG_SLIP is not set
30186 +# CONFIG_NET_FC is not set
30187 +# CONFIG_SHAPER is not set
30188 +# CONFIG_NETCONSOLE is not set
30189 +# CONFIG_NETPOLL is not set
30190 +# CONFIG_NET_POLL_CONTROLLER is not set
30191 +# CONFIG_ISDN is not set
30192 +# CONFIG_PHONE is not set
30195 +# Input device support
30197 +# CONFIG_INPUT is not set
30200 +# Hardware I/O ports
30202 +# CONFIG_SERIO is not set
30203 +# CONFIG_GAMEPORT is not set
30206 +# Character devices
30208 +# CONFIG_VT is not set
30209 +# CONFIG_SERIAL_NONSTANDARD is not set
30214 +# CONFIG_SERIAL_8250 is not set
30217 +# Non-8250 serial port support
30219 +# CONFIG_SERIAL_UARTLITE is not set
30220 +CONFIG_SERIAL_CORE=y
30221 +CONFIG_SERIAL_CORE_CONSOLE=y
30222 +CONFIG_SERIAL_MPC52xx=y
30223 +CONFIG_SERIAL_MPC52xx_CONSOLE=y
30224 +CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
30225 +# CONFIG_SERIAL_JSM is not set
30226 +CONFIG_UNIX98_PTYS=y
30227 +CONFIG_LEGACY_PTYS=y
30228 +CONFIG_LEGACY_PTY_COUNT=256
30229 +# CONFIG_HVC_RTAS is not set
30230 +# CONFIG_IPMI_HANDLER is not set
30231 +# CONFIG_HW_RANDOM is not set
30232 +# CONFIG_NVRAM is not set
30234 +# CONFIG_GEN_RTC_X is not set
30235 +# CONFIG_R3964 is not set
30236 +# CONFIG_APPLICOM is not set
30237 +# CONFIG_RAW_DRIVER is not set
30238 +# CONFIG_TCG_TPM is not set
30241 +CONFIG_I2C_BOARDINFO=y
30242 +CONFIG_I2C_CHARDEV=y
30247 +# CONFIG_I2C_ALGOBIT is not set
30248 +# CONFIG_I2C_ALGOPCF is not set
30249 +# CONFIG_I2C_ALGOPCA is not set
30252 +# I2C Hardware Bus support
30254 +# CONFIG_I2C_ALI1535 is not set
30255 +# CONFIG_I2C_ALI1563 is not set
30256 +# CONFIG_I2C_ALI15X3 is not set
30257 +# CONFIG_I2C_AMD756 is not set
30258 +# CONFIG_I2C_AMD8111 is not set
30259 +# CONFIG_I2C_I801 is not set
30260 +# CONFIG_I2C_I810 is not set
30261 +# CONFIG_I2C_PIIX4 is not set
30263 +# CONFIG_I2C_NFORCE2 is not set
30264 +# CONFIG_I2C_OCORES is not set
30265 +# CONFIG_I2C_PARPORT_LIGHT is not set
30266 +# CONFIG_I2C_PROSAVAGE is not set
30267 +# CONFIG_I2C_SAVAGE4 is not set
30268 +# CONFIG_I2C_SIMTEC is not set
30269 +# CONFIG_I2C_SIS5595 is not set
30270 +# CONFIG_I2C_SIS630 is not set
30271 +# CONFIG_I2C_SIS96X is not set
30272 +# CONFIG_I2C_TAOS_EVM is not set
30273 +# CONFIG_I2C_STUB is not set
30274 +# CONFIG_I2C_TINY_USB is not set
30275 +# CONFIG_I2C_VIA is not set
30276 +# CONFIG_I2C_VIAPRO is not set
30277 +# CONFIG_I2C_VOODOO3 is not set
30280 +# Miscellaneous I2C Chip support
30282 +# CONFIG_SENSORS_DS1337 is not set
30283 +# CONFIG_SENSORS_DS1374 is not set
30284 +# CONFIG_DS1682 is not set
30285 +# CONFIG_SENSORS_EEPROM is not set
30286 +# CONFIG_SENSORS_PCF8574 is not set
30287 +# CONFIG_SENSORS_PCA9539 is not set
30288 +# CONFIG_SENSORS_PCF8591 is not set
30289 +# CONFIG_SENSORS_M41T00 is not set
30290 +# CONFIG_SENSORS_MAX6875 is not set
30291 +# CONFIG_SENSORS_TSL2550 is not set
30292 +# CONFIG_I2C_DEBUG_CORE is not set
30293 +# CONFIG_I2C_DEBUG_ALGO is not set
30294 +# CONFIG_I2C_DEBUG_BUS is not set
30295 +# CONFIG_I2C_DEBUG_CHIP is not set
30300 +# CONFIG_SPI is not set
30301 +# CONFIG_SPI_MASTER is not set
30302 +# CONFIG_W1 is not set
30303 +# CONFIG_POWER_SUPPLY is not set
30305 +# CONFIG_HWMON_VID is not set
30306 +# CONFIG_SENSORS_AD7418 is not set
30307 +# CONFIG_SENSORS_ADM1021 is not set
30308 +# CONFIG_SENSORS_ADM1025 is not set
30309 +# CONFIG_SENSORS_ADM1026 is not set
30310 +# CONFIG_SENSORS_ADM1029 is not set
30311 +# CONFIG_SENSORS_ADM1031 is not set
30312 +# CONFIG_SENSORS_ADM9240 is not set
30313 +# CONFIG_SENSORS_ADT7470 is not set
30314 +# CONFIG_SENSORS_ATXP1 is not set
30315 +# CONFIG_SENSORS_DS1621 is not set
30316 +# CONFIG_SENSORS_I5K_AMB is not set
30317 +# CONFIG_SENSORS_F71805F is not set
30318 +# CONFIG_SENSORS_F71882FG is not set
30319 +# CONFIG_SENSORS_F75375S is not set
30320 +# CONFIG_SENSORS_GL518SM is not set
30321 +# CONFIG_SENSORS_GL520SM is not set
30322 +# CONFIG_SENSORS_IT87 is not set
30323 +# CONFIG_SENSORS_LM63 is not set
30324 +# CONFIG_SENSORS_LM75 is not set
30325 +# CONFIG_SENSORS_LM77 is not set
30326 +# CONFIG_SENSORS_LM78 is not set
30327 +# CONFIG_SENSORS_LM80 is not set
30328 +# CONFIG_SENSORS_LM83 is not set
30329 +# CONFIG_SENSORS_LM85 is not set
30330 +# CONFIG_SENSORS_LM87 is not set
30331 +# CONFIG_SENSORS_LM90 is not set
30332 +# CONFIG_SENSORS_LM92 is not set
30333 +# CONFIG_SENSORS_LM93 is not set
30334 +# CONFIG_SENSORS_MAX1619 is not set
30335 +# CONFIG_SENSORS_MAX6650 is not set
30336 +# CONFIG_SENSORS_PC87360 is not set
30337 +# CONFIG_SENSORS_PC87427 is not set
30338 +# CONFIG_SENSORS_SIS5595 is not set
30339 +# CONFIG_SENSORS_DME1737 is not set
30340 +# CONFIG_SENSORS_SMSC47M1 is not set
30341 +# CONFIG_SENSORS_SMSC47M192 is not set
30342 +# CONFIG_SENSORS_SMSC47B397 is not set
30343 +# CONFIG_SENSORS_THMC50 is not set
30344 +# CONFIG_SENSORS_VIA686A is not set
30345 +# CONFIG_SENSORS_VT1211 is not set
30346 +# CONFIG_SENSORS_VT8231 is not set
30347 +# CONFIG_SENSORS_W83781D is not set
30348 +# CONFIG_SENSORS_W83791D is not set
30349 +# CONFIG_SENSORS_W83792D is not set
30350 +# CONFIG_SENSORS_W83793 is not set
30351 +# CONFIG_SENSORS_W83L785TS is not set
30352 +# CONFIG_SENSORS_W83627HF is not set
30353 +# CONFIG_SENSORS_W83627EHF is not set
30354 +# CONFIG_HWMON_DEBUG_CHIP is not set
30356 +# CONFIG_WATCHDOG_NOWAYOUT is not set
30359 +# Watchdog Device Drivers
30361 +# CONFIG_SOFT_WATCHDOG is not set
30362 +# CONFIG_MPC5200_WDT is not set
30363 +# CONFIG_WATCHDOG_RTAS is not set
30366 +# PCI-based Watchdog Cards
30368 +# CONFIG_PCIPCWATCHDOG is not set
30369 +# CONFIG_WDTPCI is not set
30372 +# USB-based Watchdog Cards
30374 +# CONFIG_USBPCWATCHDOG is not set
30377 +# Sonics Silicon Backplane
30379 +CONFIG_SSB_POSSIBLE=y
30380 +# CONFIG_SSB is not set
30383 +# Multifunction device drivers
30385 +# CONFIG_MFD_SM501 is not set
30388 +# Multimedia devices
30390 +# CONFIG_VIDEO_DEV is not set
30391 +# CONFIG_DVB_CORE is not set
30393 +# CONFIG_USB_DABUSB is not set
30396 +# Graphics support
30398 +# CONFIG_AGP is not set
30399 +# CONFIG_DRM is not set
30400 +# CONFIG_VGASTATE is not set
30401 +CONFIG_VIDEO_OUTPUT_CONTROL=m
30402 +# CONFIG_FB is not set
30403 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
30406 +# Display device support
30408 +# CONFIG_DISPLAY_SUPPORT is not set
30413 +# CONFIG_SOUND is not set
30414 +CONFIG_USB_SUPPORT=y
30415 +CONFIG_USB_ARCH_HAS_HCD=y
30416 +CONFIG_USB_ARCH_HAS_OHCI=y
30417 +CONFIG_USB_ARCH_HAS_EHCI=y
30419 +# CONFIG_USB_DEBUG is not set
30422 +# Miscellaneous USB options
30424 +CONFIG_USB_DEVICEFS=y
30425 +# CONFIG_USB_DEVICE_CLASS is not set
30426 +# CONFIG_USB_DYNAMIC_MINORS is not set
30427 +# CONFIG_USB_SUSPEND is not set
30428 +# CONFIG_USB_PERSIST is not set
30429 +# CONFIG_USB_OTG is not set
30432 +# USB Host Controller Drivers
30434 +# CONFIG_USB_EHCI_HCD is not set
30435 +# CONFIG_USB_ISP116X_HCD is not set
30436 +CONFIG_USB_OHCI_HCD=y
30437 +CONFIG_USB_OHCI_HCD_PPC_SOC=y
30438 +CONFIG_USB_OHCI_HCD_PPC_OF=y
30439 +CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
30440 +# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
30441 +CONFIG_USB_OHCI_HCD_PCI=y
30442 +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
30443 +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
30444 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
30445 +# CONFIG_USB_UHCI_HCD is not set
30446 +# CONFIG_USB_SL811_HCD is not set
30447 +# CONFIG_USB_R8A66597_HCD is not set
30450 +# USB Device Class drivers
30452 +# CONFIG_USB_ACM is not set
30453 +# CONFIG_USB_PRINTER is not set
30456 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
30460 +# may also be needed; see USB_STORAGE Help for more information
30462 +CONFIG_USB_STORAGE=y
30463 +# CONFIG_USB_STORAGE_DEBUG is not set
30464 +# CONFIG_USB_STORAGE_DATAFAB is not set
30465 +# CONFIG_USB_STORAGE_FREECOM is not set
30466 +# CONFIG_USB_STORAGE_ISD200 is not set
30467 +# CONFIG_USB_STORAGE_DPCM is not set
30468 +# CONFIG_USB_STORAGE_USBAT is not set
30469 +# CONFIG_USB_STORAGE_SDDR09 is not set
30470 +# CONFIG_USB_STORAGE_SDDR55 is not set
30471 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
30472 +# CONFIG_USB_STORAGE_ALAUDA is not set
30473 +# CONFIG_USB_STORAGE_KARMA is not set
30474 +# CONFIG_USB_LIBUSUAL is not set
30477 +# USB Imaging devices
30479 +# CONFIG_USB_MDC800 is not set
30480 +# CONFIG_USB_MICROTEK is not set
30484 +# USB port drivers
30488 +# USB Serial Converter support
30490 +# CONFIG_USB_SERIAL is not set
30493 +# USB Miscellaneous drivers
30495 +# CONFIG_USB_EMI62 is not set
30496 +# CONFIG_USB_EMI26 is not set
30497 +# CONFIG_USB_ADUTUX is not set
30498 +# CONFIG_USB_AUERSWALD is not set
30499 +# CONFIG_USB_RIO500 is not set
30500 +# CONFIG_USB_LEGOTOWER is not set
30501 +# CONFIG_USB_LCD is not set
30502 +# CONFIG_USB_BERRY_CHARGE is not set
30503 +# CONFIG_USB_LED is not set
30504 +# CONFIG_USB_CYPRESS_CY7C63 is not set
30505 +# CONFIG_USB_CYTHERM is not set
30506 +# CONFIG_USB_PHIDGET is not set
30507 +# CONFIG_USB_IDMOUSE is not set
30508 +# CONFIG_USB_FTDI_ELAN is not set
30509 +# CONFIG_USB_APPLEDISPLAY is not set
30510 +# CONFIG_USB_LD is not set
30511 +# CONFIG_USB_TRANCEVIBRATOR is not set
30512 +# CONFIG_USB_IOWARRIOR is not set
30513 +# CONFIG_USB_TEST is not set
30516 +# USB DSL modem support
30520 +# USB Gadget Support
30522 +# CONFIG_USB_GADGET is not set
30523 +# CONFIG_MMC is not set
30525 +CONFIG_LEDS_CLASS=y
30534 +CONFIG_LEDS_TRIGGERS=y
30535 +CONFIG_LEDS_TRIGGER_TIMER=y
30536 +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
30537 +# CONFIG_INFINIBAND is not set
30538 +# CONFIG_EDAC is not set
30539 +# CONFIG_RTC_CLASS is not set
30544 +# CONFIG_UIO is not set
30550 +# CONFIG_EXT2_FS_XATTR is not set
30551 +# CONFIG_EXT2_FS_XIP is not set
30553 +CONFIG_EXT3_FS_XATTR=y
30554 +# CONFIG_EXT3_FS_POSIX_ACL is not set
30555 +# CONFIG_EXT3_FS_SECURITY is not set
30556 +# CONFIG_EXT4DEV_FS is not set
30558 +CONFIG_FS_MBCACHE=y
30559 +# CONFIG_REISERFS_FS is not set
30560 +# CONFIG_JFS_FS is not set
30561 +# CONFIG_FS_POSIX_ACL is not set
30562 +# CONFIG_XFS_FS is not set
30563 +# CONFIG_GFS2_FS is not set
30564 +# CONFIG_OCFS2_FS is not set
30565 +# CONFIG_MINIX_FS is not set
30566 +# CONFIG_ROMFS_FS is not set
30568 +CONFIG_INOTIFY_USER=y
30569 +# CONFIG_QUOTA is not set
30571 +# CONFIG_AUTOFS_FS is not set
30572 +# CONFIG_AUTOFS4_FS is not set
30573 +# CONFIG_FUSE_FS is not set
30576 +# CD-ROM/DVD Filesystems
30578 +# CONFIG_ISO9660_FS is not set
30579 +# CONFIG_UDF_FS is not set
30582 +# DOS/FAT/NT Filesystems
30587 +CONFIG_FAT_DEFAULT_CODEPAGE=437
30588 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
30589 +# CONFIG_NTFS_FS is not set
30592 +# Pseudo filesystems
30595 +CONFIG_PROC_KCORE=y
30596 +CONFIG_PROC_SYSCTL=y
30599 +# CONFIG_TMPFS_POSIX_ACL is not set
30600 +# CONFIG_HUGETLB_PAGE is not set
30601 +# CONFIG_CONFIGFS_FS is not set
30604 +# Miscellaneous filesystems
30606 +# CONFIG_ADFS_FS is not set
30607 +# CONFIG_AFFS_FS is not set
30608 +# CONFIG_HFS_FS is not set
30609 +# CONFIG_HFSPLUS_FS is not set
30610 +# CONFIG_BEFS_FS is not set
30611 +# CONFIG_BFS_FS is not set
30612 +# CONFIG_EFS_FS is not set
30614 +CONFIG_JFFS2_FS_DEBUG=0
30615 +CONFIG_JFFS2_FS_WRITEBUFFER=y
30616 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
30617 +# CONFIG_JFFS2_SUMMARY is not set
30618 +# CONFIG_JFFS2_FS_XATTR is not set
30619 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
30620 +CONFIG_JFFS2_ZLIB=y
30621 +# CONFIG_JFFS2_LZO is not set
30622 +CONFIG_JFFS2_RTIME=y
30623 +# CONFIG_JFFS2_RUBIN is not set
30625 +# CONFIG_VXFS_FS is not set
30626 +# CONFIG_HPFS_FS is not set
30627 +# CONFIG_QNX4FS_FS is not set
30628 +# CONFIG_SYSV_FS is not set
30629 +# CONFIG_UFS_FS is not set
30630 +CONFIG_NETWORK_FILESYSTEMS=y
30633 +# CONFIG_NFS_V3_ACL is not set
30635 +# CONFIG_NFS_DIRECTIO is not set
30636 +# CONFIG_NFSD is not set
30640 +CONFIG_NFS_COMMON=y
30642 +CONFIG_SUNRPC_GSS=y
30643 +# CONFIG_SUNRPC_BIND34 is not set
30644 +CONFIG_RPCSEC_GSS_KRB5=y
30645 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
30646 +# CONFIG_SMB_FS is not set
30647 +# CONFIG_CIFS is not set
30648 +# CONFIG_NCP_FS is not set
30649 +# CONFIG_CODA_FS is not set
30650 +# CONFIG_AFS_FS is not set
30655 +# CONFIG_PARTITION_ADVANCED is not set
30656 +CONFIG_MSDOS_PARTITION=y
30658 +CONFIG_NLS_DEFAULT="iso8859-1"
30659 +CONFIG_NLS_CODEPAGE_437=y
30660 +# CONFIG_NLS_CODEPAGE_737 is not set
30661 +# CONFIG_NLS_CODEPAGE_775 is not set
30662 +# CONFIG_NLS_CODEPAGE_850 is not set
30663 +# CONFIG_NLS_CODEPAGE_852 is not set
30664 +# CONFIG_NLS_CODEPAGE_855 is not set
30665 +# CONFIG_NLS_CODEPAGE_857 is not set
30666 +# CONFIG_NLS_CODEPAGE_860 is not set
30667 +# CONFIG_NLS_CODEPAGE_861 is not set
30668 +# CONFIG_NLS_CODEPAGE_862 is not set
30669 +# CONFIG_NLS_CODEPAGE_863 is not set
30670 +# CONFIG_NLS_CODEPAGE_864 is not set
30671 +# CONFIG_NLS_CODEPAGE_865 is not set
30672 +# CONFIG_NLS_CODEPAGE_866 is not set
30673 +# CONFIG_NLS_CODEPAGE_869 is not set
30674 +# CONFIG_NLS_CODEPAGE_936 is not set
30675 +# CONFIG_NLS_CODEPAGE_950 is not set
30676 +# CONFIG_NLS_CODEPAGE_932 is not set
30677 +# CONFIG_NLS_CODEPAGE_949 is not set
30678 +# CONFIG_NLS_CODEPAGE_874 is not set
30679 +# CONFIG_NLS_ISO8859_8 is not set
30680 +# CONFIG_NLS_CODEPAGE_1250 is not set
30681 +# CONFIG_NLS_CODEPAGE_1251 is not set
30682 +# CONFIG_NLS_ASCII is not set
30683 +CONFIG_NLS_ISO8859_1=y
30684 +# CONFIG_NLS_ISO8859_2 is not set
30685 +# CONFIG_NLS_ISO8859_3 is not set
30686 +# CONFIG_NLS_ISO8859_4 is not set
30687 +# CONFIG_NLS_ISO8859_5 is not set
30688 +# CONFIG_NLS_ISO8859_6 is not set
30689 +# CONFIG_NLS_ISO8859_7 is not set
30690 +# CONFIG_NLS_ISO8859_9 is not set
30691 +# CONFIG_NLS_ISO8859_13 is not set
30692 +# CONFIG_NLS_ISO8859_14 is not set
30693 +# CONFIG_NLS_ISO8859_15 is not set
30694 +# CONFIG_NLS_KOI8_R is not set
30695 +# CONFIG_NLS_KOI8_U is not set
30696 +# CONFIG_NLS_UTF8 is not set
30697 +# CONFIG_DLM is not set
30698 +# CONFIG_UCC_SLOW is not set
30701 +# Library routines
30703 +CONFIG_BITREVERSE=y
30704 +# CONFIG_CRC_CCITT is not set
30705 +# CONFIG_CRC16 is not set
30706 +# CONFIG_CRC_ITU_T is not set
30708 +# CONFIG_CRC7 is not set
30709 +# CONFIG_LIBCRC32C is not set
30710 +CONFIG_ZLIB_INFLATE=y
30711 +CONFIG_ZLIB_DEFLATE=y
30713 +CONFIG_HAS_IOMEM=y
30714 +CONFIG_HAS_IOPORT=y
30716 +# CONFIG_INSTRUMENTATION is not set
30721 +CONFIG_PRINTK_TIME=y
30722 +CONFIG_ENABLE_WARN_DEPRECATED=y
30723 +CONFIG_ENABLE_MUST_CHECK=y
30724 +# CONFIG_MAGIC_SYSRQ is not set
30725 +# CONFIG_UNUSED_SYMBOLS is not set
30726 +# CONFIG_DEBUG_FS is not set
30727 +# CONFIG_HEADERS_CHECK is not set
30728 +CONFIG_DEBUG_KERNEL=y
30729 +# CONFIG_DEBUG_SHIRQ is not set
30730 +CONFIG_DETECT_SOFTLOCKUP=y
30731 +CONFIG_SCHED_DEBUG=y
30732 +# CONFIG_SCHEDSTATS is not set
30733 +# CONFIG_TIMER_STATS is not set
30734 +# CONFIG_SLUB_DEBUG_ON is not set
30735 +# CONFIG_DEBUG_RT_MUTEXES is not set
30736 +# CONFIG_RT_MUTEX_TESTER is not set
30737 +# CONFIG_DEBUG_SPINLOCK is not set
30738 +# CONFIG_DEBUG_MUTEXES is not set
30739 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
30740 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
30741 +# CONFIG_DEBUG_KOBJECT is not set
30742 +# CONFIG_DEBUG_BUGVERBOSE is not set
30743 +CONFIG_DEBUG_INFO=y
30744 +# CONFIG_DEBUG_VM is not set
30745 +# CONFIG_DEBUG_LIST is not set
30746 +# CONFIG_DEBUG_SG is not set
30747 +CONFIG_FORCED_INLINING=y
30748 +# CONFIG_BOOT_PRINTK_DELAY is not set
30749 +# CONFIG_RCU_TORTURE_TEST is not set
30750 +# CONFIG_FAULT_INJECTION is not set
30751 +# CONFIG_SAMPLES is not set
30752 +# CONFIG_DEBUG_STACKOVERFLOW is not set
30753 +# CONFIG_DEBUG_STACK_USAGE is not set
30754 +# CONFIG_DEBUG_PAGEALLOC is not set
30755 +# CONFIG_DEBUGGER is not set
30756 +# CONFIG_BDI_SWITCH is not set
30757 +# CONFIG_BOOTX_TEXT is not set
30758 +# CONFIG_PPC_EARLY_DEBUG is not set
30761 +# Security options
30763 +# CONFIG_KEYS is not set
30764 +# CONFIG_SECURITY is not set
30765 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
30767 +CONFIG_CRYPTO_ALGAPI=y
30768 +CONFIG_CRYPTO_BLKCIPHER=y
30769 +CONFIG_CRYPTO_MANAGER=y
30770 +# CONFIG_CRYPTO_HMAC is not set
30771 +# CONFIG_CRYPTO_XCBC is not set
30772 +# CONFIG_CRYPTO_NULL is not set
30773 +# CONFIG_CRYPTO_MD4 is not set
30774 +CONFIG_CRYPTO_MD5=y
30775 +# CONFIG_CRYPTO_SHA1 is not set
30776 +# CONFIG_CRYPTO_SHA256 is not set
30777 +# CONFIG_CRYPTO_SHA512 is not set
30778 +# CONFIG_CRYPTO_WP512 is not set
30779 +# CONFIG_CRYPTO_TGR192 is not set
30780 +# CONFIG_CRYPTO_GF128MUL is not set
30781 +# CONFIG_CRYPTO_ECB is not set
30782 +CONFIG_CRYPTO_CBC=y
30783 +# CONFIG_CRYPTO_PCBC is not set
30784 +# CONFIG_CRYPTO_LRW is not set
30785 +# CONFIG_CRYPTO_XTS is not set
30786 +# CONFIG_CRYPTO_CRYPTD is not set
30787 +CONFIG_CRYPTO_DES=y
30788 +# CONFIG_CRYPTO_FCRYPT is not set
30789 +# CONFIG_CRYPTO_BLOWFISH is not set
30790 +# CONFIG_CRYPTO_TWOFISH is not set
30791 +# CONFIG_CRYPTO_SERPENT is not set
30792 +# CONFIG_CRYPTO_AES is not set
30793 +# CONFIG_CRYPTO_CAST5 is not set
30794 +# CONFIG_CRYPTO_CAST6 is not set
30795 +# CONFIG_CRYPTO_TEA is not set
30796 +# CONFIG_CRYPTO_ARC4 is not set
30797 +# CONFIG_CRYPTO_KHAZAD is not set
30798 +# CONFIG_CRYPTO_ANUBIS is not set
30799 +# CONFIG_CRYPTO_SEED is not set
30800 +# CONFIG_CRYPTO_DEFLATE is not set
30801 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
30802 +# CONFIG_CRYPTO_CRC32C is not set
30803 +# CONFIG_CRYPTO_CAMELLIA is not set
30804 +# CONFIG_CRYPTO_TEST is not set
30805 +# CONFIG_CRYPTO_AUTHENC is not set
30806 +CONFIG_CRYPTO_HW=y
30807 +CONFIG_PPC_CLOCK=y
30808 +CONFIG_PPC_LIB_RHEAP=y
30809 --- a/arch/powerpc/configs/mpc8313_rdb_defconfig
30810 +++ b/arch/powerpc/configs/mpc8313_rdb_defconfig
30813 # Automatically generated make config: don't edit
30814 -# Linux kernel version: 2.6.24-rc4
30815 -# Thu Dec 6 16:48:31 2007
30816 +# Linux kernel version: 2.6.24-rc6
30817 +# Thu Jan 17 16:35:55 2008
30819 # CONFIG_PPC64 is not set
30821 @@ -144,6 +144,7 @@
30822 # CONFIG_MPC834x_MDS is not set
30823 # CONFIG_MPC834x_ITX is not set
30824 # CONFIG_MPC836x_MDS is not set
30825 +# CONFIG_MPC837x_MDS is not set
30826 CONFIG_PPC_MPC831x=y
30827 # CONFIG_MPIC is not set
30828 # CONFIG_MPIC_WEIRD is not set
30829 @@ -336,15 +337,16 @@
30831 # CONFIG_MTD_DEBUG is not set
30832 # CONFIG_MTD_CONCAT is not set
30833 -# CONFIG_MTD_PARTITIONS is not set
30834 +CONFIG_MTD_PARTITIONS=y
30835 +# CONFIG_MTD_REDBOOT_PARTS is not set
30836 +# CONFIG_MTD_CMDLINE_PARTS is not set
30839 # User Modules And Translation Layers
30842 -# CONFIG_MTD_BLKDEVS is not set
30843 -# CONFIG_MTD_BLOCK is not set
30844 -# CONFIG_MTD_BLOCK_RO is not set
30845 +CONFIG_MTD_BLKDEVS=y
30846 +CONFIG_MTD_BLOCK=y
30847 # CONFIG_FTL is not set
30848 # CONFIG_NFTL is not set
30849 # CONFIG_INFTL is not set
30850 @@ -381,11 +383,8 @@
30851 # Mapping drivers for chip access
30853 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
30854 -CONFIG_MTD_PHYSMAP=y
30855 -CONFIG_MTD_PHYSMAP_START=0xfe000000
30856 -CONFIG_MTD_PHYSMAP_LEN=0x1000000
30857 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2
30858 -# CONFIG_MTD_PHYSMAP_OF is not set
30859 +# CONFIG_MTD_PHYSMAP is not set
30860 +CONFIG_MTD_PHYSMAP_OF=y
30861 # CONFIG_MTD_INTEL_VR_NOR is not set
30862 # CONFIG_MTD_PLATRAM is not set
30864 @@ -406,7 +405,16 @@
30865 # CONFIG_MTD_DOC2000 is not set
30866 # CONFIG_MTD_DOC2001 is not set
30867 # CONFIG_MTD_DOC2001PLUS is not set
30868 -# CONFIG_MTD_NAND is not set
30870 +CONFIG_MTD_NAND_VERIFY_WRITE=y
30871 +# CONFIG_MTD_NAND_ECC_SMC is not set
30872 +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
30873 +CONFIG_MTD_NAND_IDS=y
30874 +# CONFIG_MTD_NAND_DISKONCHIP is not set
30875 +# CONFIG_MTD_NAND_CAFE is not set
30876 +# CONFIG_MTD_NAND_NANDSIM is not set
30877 +# CONFIG_MTD_NAND_PLATFORM is not set
30878 +# CONFIG_MTD_ALAUDA is not set
30879 # CONFIG_MTD_ONENAND is not set
30882 @@ -1178,7 +1186,17 @@
30883 # CONFIG_BEFS_FS is not set
30884 # CONFIG_BFS_FS is not set
30885 # CONFIG_EFS_FS is not set
30886 -# CONFIG_JFFS2_FS is not set
30888 +CONFIG_JFFS2_FS_DEBUG=0
30889 +CONFIG_JFFS2_FS_WRITEBUFFER=y
30890 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
30891 +# CONFIG_JFFS2_SUMMARY is not set
30892 +# CONFIG_JFFS2_FS_XATTR is not set
30893 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
30894 +CONFIG_JFFS2_ZLIB=y
30895 +# CONFIG_JFFS2_LZO is not set
30896 +CONFIG_JFFS2_RTIME=y
30897 +# CONFIG_JFFS2_RUBIN is not set
30898 # CONFIG_CRAMFS is not set
30899 # CONFIG_VXFS_FS is not set
30900 # CONFIG_HPFS_FS is not set
30901 @@ -1242,6 +1260,8 @@
30903 # CONFIG_CRC7 is not set
30904 # CONFIG_LIBCRC32C is not set
30905 +CONFIG_ZLIB_INFLATE=y
30906 +CONFIG_ZLIB_DEFLATE=y
30909 CONFIG_HAS_IOPORT=y
30910 --- a/arch/powerpc/configs/mpc834x_itx_defconfig
30911 +++ b/arch/powerpc/configs/mpc834x_itx_defconfig
30912 @@ -570,7 +570,8 @@
30913 # CONFIG_PATA_SIS is not set
30914 # CONFIG_PATA_VIA is not set
30915 # CONFIG_PATA_WINBOND is not set
30916 -# CONFIG_PATA_PLATFORM is not set
30917 +CONFIG_PATA_PLATFORM=y
30918 +CONFIG_PATA_OF_PLATFORM=y
30920 CONFIG_BLK_DEV_MD=y
30923 +++ b/arch/powerpc/configs/mpc837x_mds_defconfig
30926 +# Automatically generated make config: don't edit
30927 +# Linux kernel version: 2.6.23
30928 +# Wed Oct 10 16:31:39 2007
30930 +# CONFIG_PPC64 is not set
30933 +# Processor support
30936 +# CONFIG_PPC_85xx is not set
30937 +# CONFIG_PPC_8xx is not set
30938 +# CONFIG_40x is not set
30939 +# CONFIG_44x is not set
30940 +# CONFIG_E200 is not set
30943 +CONFIG_PPC_STD_MMU=y
30944 +CONFIG_PPC_STD_MMU_32=y
30945 +# CONFIG_PPC_MM_SLICES is not set
30946 +# CONFIG_SMP is not set
30948 +CONFIG_PPC_MERGE=y
30950 +CONFIG_GENERIC_HARDIRQS=y
30951 +CONFIG_IRQ_PER_CPU=y
30952 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
30953 +CONFIG_ARCH_HAS_ILOG2_U32=y
30954 +CONFIG_GENERIC_HWEIGHT=y
30955 +CONFIG_GENERIC_CALIBRATE_DELAY=y
30956 +CONFIG_GENERIC_FIND_NEXT_BIT=y
30957 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
30959 +CONFIG_EARLY_PRINTK=y
30960 +CONFIG_GENERIC_NVRAM=y
30961 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
30962 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
30965 +CONFIG_PPC_UDBG_16550=y
30966 +# CONFIG_GENERIC_TBSYNC is not set
30967 +CONFIG_AUDIT_ARCH=y
30968 +CONFIG_GENERIC_BUG=y
30969 +CONFIG_DEFAULT_UIMAGE=y
30970 +# CONFIG_PPC_DCR_NATIVE is not set
30971 +# CONFIG_PPC_DCR_MMIO is not set
30972 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
30977 +CONFIG_EXPERIMENTAL=y
30978 +CONFIG_BROKEN_ON_SMP=y
30979 +CONFIG_INIT_ENV_ARG_LIMIT=32
30980 +CONFIG_LOCALVERSION=""
30981 +CONFIG_LOCALVERSION_AUTO=y
30984 +CONFIG_SYSVIPC_SYSCTL=y
30985 +# CONFIG_POSIX_MQUEUE is not set
30986 +# CONFIG_BSD_PROCESS_ACCT is not set
30987 +# CONFIG_TASKSTATS is not set
30988 +# CONFIG_USER_NS is not set
30989 +# CONFIG_AUDIT is not set
30990 +# CONFIG_IKCONFIG is not set
30991 +CONFIG_LOG_BUF_SHIFT=14
30992 +CONFIG_SYSFS_DEPRECATED=y
30993 +# CONFIG_RELAY is not set
30994 +CONFIG_BLK_DEV_INITRD=y
30995 +CONFIG_INITRAMFS_SOURCE=""
30996 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
30999 +CONFIG_SYSCTL_SYSCALL=y
31001 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
31006 +CONFIG_BASE_FULL=y
31008 +CONFIG_ANON_INODES=y
31009 +# CONFIG_EPOLL is not set
31013 +CONFIG_VM_EVENT_COUNTERS=y
31015 +# CONFIG_SLUB is not set
31016 +# CONFIG_SLOB is not set
31017 +CONFIG_RT_MUTEXES=y
31018 +# CONFIG_TINY_SHMEM is not set
31019 +CONFIG_BASE_SMALL=0
31021 +CONFIG_MODULE_UNLOAD=y
31022 +# CONFIG_MODULE_FORCE_UNLOAD is not set
31023 +# CONFIG_MODVERSIONS is not set
31024 +# CONFIG_MODULE_SRCVERSION_ALL is not set
31025 +# CONFIG_KMOD is not set
31027 +# CONFIG_LBD is not set
31028 +# CONFIG_BLK_DEV_IO_TRACE is not set
31029 +# CONFIG_LSF is not set
31030 +# CONFIG_BLK_DEV_BSG is not set
31035 +CONFIG_IOSCHED_NOOP=y
31036 +CONFIG_IOSCHED_AS=y
31037 +CONFIG_IOSCHED_DEADLINE=y
31038 +CONFIG_IOSCHED_CFQ=y
31039 +CONFIG_DEFAULT_AS=y
31040 +# CONFIG_DEFAULT_DEADLINE is not set
31041 +# CONFIG_DEFAULT_CFQ is not set
31042 +# CONFIG_DEFAULT_NOOP is not set
31043 +CONFIG_DEFAULT_IOSCHED="anticipatory"
31046 +# Platform support
31048 +# CONFIG_PPC_MULTIPLATFORM is not set
31049 +# CONFIG_EMBEDDED6xx is not set
31050 +# CONFIG_PPC_82xx is not set
31052 +# CONFIG_PPC_86xx is not set
31053 +# CONFIG_PPC_MPC52xx is not set
31054 +# CONFIG_PPC_MPC5200 is not set
31055 +# CONFIG_PPC_CELL is not set
31056 +# CONFIG_PPC_CELL_NATIVE is not set
31057 +# CONFIG_PQ2ADS is not set
31058 +# CONFIG_MPC8313_RDB is not set
31059 +# CONFIG_MPC832x_MDS is not set
31060 +# CONFIG_MPC832x_RDB is not set
31061 +# CONFIG_MPC834x_MDS is not set
31062 +# CONFIG_MPC834x_ITX is not set
31063 +# CONFIG_MPC836x_MDS is not set
31064 +CONFIG_MPC837x_MDS=y
31065 +CONFIG_PPC_MPC837x=y
31066 +# CONFIG_MPIC is not set
31067 +# CONFIG_MPIC_WEIRD is not set
31068 +# CONFIG_PPC_I8259 is not set
31069 +# CONFIG_PPC_RTAS is not set
31070 +# CONFIG_MMIO_NVRAM is not set
31071 +# CONFIG_PPC_MPC106 is not set
31072 +# CONFIG_PPC_970_NAP is not set
31073 +# CONFIG_PPC_INDIRECT_IO is not set
31074 +# CONFIG_GENERIC_IOMAP is not set
31075 +# CONFIG_CPU_FREQ is not set
31076 +# CONFIG_CPM2 is not set
31077 +# CONFIG_FSL_ULI1575 is not set
31078 +CONFIG_FSL_SERDES=y
31083 +# CONFIG_HIGHMEM is not set
31084 +# CONFIG_HZ_100 is not set
31086 +# CONFIG_HZ_300 is not set
31087 +# CONFIG_HZ_1000 is not set
31089 +CONFIG_PREEMPT_NONE=y
31090 +# CONFIG_PREEMPT_VOLUNTARY is not set
31091 +# CONFIG_PREEMPT is not set
31092 +CONFIG_BINFMT_ELF=y
31093 +# CONFIG_BINFMT_MISC is not set
31094 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
31095 +CONFIG_ARCH_FLATMEM_ENABLE=y
31096 +CONFIG_ARCH_POPULATES_NODE_MAP=y
31097 +CONFIG_SELECT_MEMORY_MODEL=y
31098 +CONFIG_FLATMEM_MANUAL=y
31099 +# CONFIG_DISCONTIGMEM_MANUAL is not set
31100 +# CONFIG_SPARSEMEM_MANUAL is not set
31102 +CONFIG_FLAT_NODE_MEM_MAP=y
31103 +# CONFIG_SPARSEMEM_STATIC is not set
31104 +CONFIG_SPLIT_PTLOCK_CPUS=4
31105 +# CONFIG_RESOURCES_64BIT is not set
31106 +CONFIG_ZONE_DMA_FLAG=1
31108 +CONFIG_VIRT_TO_BUS=y
31109 +CONFIG_PROC_DEVICETREE=y
31110 +# CONFIG_CMDLINE_BOOL is not set
31111 +# CONFIG_PM is not set
31112 +CONFIG_SUSPEND_UP_POSSIBLE=y
31113 +CONFIG_HIBERNATION_UP_POSSIBLE=y
31115 +CONFIG_WANT_DEVICE_TREE=y
31116 +CONFIG_DEVICE_TREE=""
31117 +CONFIG_ISA_DMA_API=y
31123 +CONFIG_GENERIC_ISA_DMA=y
31124 +CONFIG_PPC_INDIRECT_PCI=y
31126 +# CONFIG_PCI is not set
31127 +# CONFIG_PCI_DOMAINS is not set
31128 +# CONFIG_PCI_SYSCALL is not set
31129 +# CONFIG_ARCH_SUPPORTS_MSI is not set
31132 +# PCCARD (PCMCIA/CardBus) support
31134 +# CONFIG_PCCARD is not set
31139 +# CONFIG_ADVANCED_OPTIONS is not set
31142 +# Default settings for advanced configuration options are used
31144 +CONFIG_HIGHMEM_START=0xfe000000
31145 +CONFIG_LOWMEM_SIZE=0x30000000
31146 +CONFIG_KERNEL_START=0xc0000000
31147 +CONFIG_TASK_SIZE=0x80000000
31148 +CONFIG_BOOT_LOAD=0x00800000
31156 +# Networking options
31159 +# CONFIG_PACKET_MMAP is not set
31162 +CONFIG_XFRM_USER=m
31163 +# CONFIG_XFRM_SUB_POLICY is not set
31164 +# CONFIG_XFRM_MIGRATE is not set
31165 +# CONFIG_NET_KEY is not set
31167 +CONFIG_IP_MULTICAST=y
31168 +# CONFIG_IP_ADVANCED_ROUTER is not set
31169 +CONFIG_IP_FIB_HASH=y
31171 +CONFIG_IP_PNP_DHCP=y
31172 +CONFIG_IP_PNP_BOOTP=y
31173 +# CONFIG_IP_PNP_RARP is not set
31174 +# CONFIG_NET_IPIP is not set
31175 +# CONFIG_NET_IPGRE is not set
31176 +# CONFIG_IP_MROUTE is not set
31177 +# CONFIG_ARPD is not set
31178 +CONFIG_SYN_COOKIES=y
31179 +# CONFIG_INET_AH is not set
31180 +# CONFIG_INET_ESP is not set
31181 +# CONFIG_INET_IPCOMP is not set
31182 +# CONFIG_INET_XFRM_TUNNEL is not set
31183 +# CONFIG_INET_TUNNEL is not set
31184 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
31185 +CONFIG_INET_XFRM_MODE_TUNNEL=y
31186 +CONFIG_INET_XFRM_MODE_BEET=y
31187 +CONFIG_INET_DIAG=y
31188 +CONFIG_INET_TCP_DIAG=y
31189 +# CONFIG_TCP_CONG_ADVANCED is not set
31190 +CONFIG_TCP_CONG_CUBIC=y
31191 +CONFIG_DEFAULT_TCP_CONG="cubic"
31192 +# CONFIG_TCP_MD5SIG is not set
31193 +# CONFIG_IPV6 is not set
31194 +# CONFIG_INET6_XFRM_TUNNEL is not set
31195 +# CONFIG_INET6_TUNNEL is not set
31196 +# CONFIG_NETWORK_SECMARK is not set
31197 +# CONFIG_NETFILTER is not set
31198 +# CONFIG_IP_DCCP is not set
31199 +# CONFIG_IP_SCTP is not set
31200 +# CONFIG_TIPC is not set
31201 +# CONFIG_ATM is not set
31202 +# CONFIG_BRIDGE is not set
31203 +# CONFIG_VLAN_8021Q is not set
31204 +# CONFIG_DECNET is not set
31205 +# CONFIG_LLC2 is not set
31206 +# CONFIG_IPX is not set
31207 +# CONFIG_ATALK is not set
31208 +# CONFIG_X25 is not set
31209 +# CONFIG_LAPB is not set
31210 +# CONFIG_ECONET is not set
31211 +# CONFIG_WAN_ROUTER is not set
31214 +# QoS and/or fair queueing
31216 +# CONFIG_NET_SCHED is not set
31221 +# CONFIG_NET_PKTGEN is not set
31222 +# CONFIG_HAMRADIO is not set
31223 +# CONFIG_IRDA is not set
31224 +# CONFIG_BT is not set
31225 +# CONFIG_AF_RXRPC is not set
31230 +# CONFIG_CFG80211 is not set
31231 +# CONFIG_WIRELESS_EXT is not set
31232 +# CONFIG_MAC80211 is not set
31233 +# CONFIG_IEEE80211 is not set
31234 +# CONFIG_RFKILL is not set
31235 +# CONFIG_NET_9P is not set
31242 +# Generic Driver Options
31244 +CONFIG_STANDALONE=y
31245 +CONFIG_PREVENT_FIRMWARE_BUILD=y
31246 +# CONFIG_FW_LOADER is not set
31247 +# CONFIG_SYS_HYPERVISOR is not set
31248 +# CONFIG_CONNECTOR is not set
31249 +# CONFIG_MTD is not set
31250 +CONFIG_OF_DEVICE=y
31251 +# CONFIG_PARPORT is not set
31253 +# CONFIG_BLK_DEV_FD is not set
31254 +# CONFIG_BLK_DEV_COW_COMMON is not set
31255 +CONFIG_BLK_DEV_LOOP=y
31256 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
31257 +# CONFIG_BLK_DEV_NBD is not set
31258 +CONFIG_BLK_DEV_RAM=y
31259 +CONFIG_BLK_DEV_RAM_COUNT=16
31260 +CONFIG_BLK_DEV_RAM_SIZE=32768
31261 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
31262 +# CONFIG_CDROM_PKTCDVD is not set
31263 +# CONFIG_ATA_OVER_ETH is not set
31264 +CONFIG_MISC_DEVICES=y
31265 +# CONFIG_EEPROM_93CX6 is not set
31266 +# CONFIG_IDE is not set
31269 +# SCSI device support
31271 +# CONFIG_RAID_ATTRS is not set
31274 +# CONFIG_SCSI_TGT is not set
31275 +# CONFIG_SCSI_NETLINK is not set
31276 +CONFIG_SCSI_PROC_FS=y
31279 +# SCSI support type (disk, tape, CD-ROM)
31281 +CONFIG_BLK_DEV_SD=y
31282 +# CONFIG_CHR_DEV_ST is not set
31283 +# CONFIG_CHR_DEV_OSST is not set
31284 +# CONFIG_BLK_DEV_SR is not set
31285 +CONFIG_CHR_DEV_SG=y
31286 +# CONFIG_CHR_DEV_SCH is not set
31289 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
31291 +# CONFIG_SCSI_MULTI_LUN is not set
31292 +# CONFIG_SCSI_CONSTANTS is not set
31293 +# CONFIG_SCSI_LOGGING is not set
31294 +# CONFIG_SCSI_SCAN_ASYNC is not set
31295 +CONFIG_SCSI_WAIT_SCAN=m
31300 +# CONFIG_SCSI_SPI_ATTRS is not set
31301 +# CONFIG_SCSI_FC_ATTRS is not set
31302 +# CONFIG_SCSI_ISCSI_ATTRS is not set
31303 +# CONFIG_SCSI_SAS_LIBSAS is not set
31304 +CONFIG_SCSI_LOWLEVEL=y
31305 +# CONFIG_ISCSI_TCP is not set
31306 +# CONFIG_SCSI_DEBUG is not set
31308 +# CONFIG_ATA_NONSTANDARD is not set
31310 +# CONFIG_PATA_PLATFORM is not set
31311 +# CONFIG_MD is not set
31312 +# CONFIG_MACINTOSH_DRIVERS is not set
31313 +CONFIG_NETDEVICES=y
31314 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
31315 +# CONFIG_DUMMY is not set
31316 +# CONFIG_BONDING is not set
31317 +# CONFIG_MACVLAN is not set
31318 +# CONFIG_EQUALIZER is not set
31319 +# CONFIG_TUN is not set
31323 +# MII PHY device drivers
31325 +CONFIG_MARVELL_PHY=y
31326 +# CONFIG_DAVICOM_PHY is not set
31327 +# CONFIG_QSEMI_PHY is not set
31328 +# CONFIG_LXT_PHY is not set
31329 +# CONFIG_CICADA_PHY is not set
31330 +# CONFIG_VITESSE_PHY is not set
31331 +# CONFIG_SMSC_PHY is not set
31332 +# CONFIG_BROADCOM_PHY is not set
31333 +# CONFIG_ICPLUS_PHY is not set
31334 +# CONFIG_FIXED_PHY is not set
31335 +CONFIG_NET_ETHERNET=y
31337 +CONFIG_NETDEV_1000=y
31339 +# CONFIG_GFAR_NAPI is not set
31340 +CONFIG_NETDEV_10000=y
31345 +# CONFIG_WLAN_PRE80211 is not set
31346 +# CONFIG_WLAN_80211 is not set
31347 +# CONFIG_WAN is not set
31348 +# CONFIG_PPP is not set
31349 +# CONFIG_SLIP is not set
31350 +# CONFIG_SHAPER is not set
31351 +# CONFIG_NETCONSOLE is not set
31352 +# CONFIG_NETPOLL is not set
31353 +# CONFIG_NET_POLL_CONTROLLER is not set
31354 +# CONFIG_ISDN is not set
31355 +# CONFIG_PHONE is not set
31358 +# Input device support
31361 +# CONFIG_INPUT_FF_MEMLESS is not set
31362 +# CONFIG_INPUT_POLLDEV is not set
31365 +# Userland interfaces
31367 +# CONFIG_INPUT_MOUSEDEV is not set
31368 +# CONFIG_INPUT_JOYDEV is not set
31369 +# CONFIG_INPUT_TSDEV is not set
31370 +# CONFIG_INPUT_EVDEV is not set
31371 +# CONFIG_INPUT_EVBUG is not set
31374 +# Input Device Drivers
31376 +# CONFIG_INPUT_KEYBOARD is not set
31377 +# CONFIG_INPUT_MOUSE is not set
31378 +# CONFIG_INPUT_JOYSTICK is not set
31379 +# CONFIG_INPUT_TABLET is not set
31380 +# CONFIG_INPUT_TOUCHSCREEN is not set
31381 +# CONFIG_INPUT_MISC is not set
31384 +# Hardware I/O ports
31386 +# CONFIG_SERIO is not set
31387 +# CONFIG_GAMEPORT is not set
31390 +# Character devices
31392 +# CONFIG_VT is not set
31393 +# CONFIG_SERIAL_NONSTANDARD is not set
31398 +CONFIG_SERIAL_8250=y
31399 +CONFIG_SERIAL_8250_CONSOLE=y
31400 +CONFIG_SERIAL_8250_NR_UARTS=4
31401 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
31402 +# CONFIG_SERIAL_8250_EXTENDED is not set
31405 +# Non-8250 serial port support
31407 +# CONFIG_SERIAL_UARTLITE is not set
31408 +CONFIG_SERIAL_CORE=y
31409 +CONFIG_SERIAL_CORE_CONSOLE=y
31410 +# CONFIG_SERIAL_OF_PLATFORM is not set
31411 +CONFIG_UNIX98_PTYS=y
31412 +CONFIG_LEGACY_PTYS=y
31413 +CONFIG_LEGACY_PTY_COUNT=256
31414 +# CONFIG_IPMI_HANDLER is not set
31416 +# CONFIG_WATCHDOG_NOWAYOUT is not set
31419 +# Watchdog Device Drivers
31421 +# CONFIG_SOFT_WATCHDOG is not set
31423 +# CONFIG_HW_RANDOM is not set
31424 +# CONFIG_NVRAM is not set
31426 +# CONFIG_GEN_RTC_X is not set
31427 +# CONFIG_R3964 is not set
31428 +# CONFIG_RAW_DRIVER is not set
31429 +# CONFIG_TCG_TPM is not set
31431 +CONFIG_I2C_BOARDINFO=y
31432 +CONFIG_I2C_CHARDEV=y
31437 +# CONFIG_I2C_ALGOBIT is not set
31438 +# CONFIG_I2C_ALGOPCF is not set
31439 +# CONFIG_I2C_ALGOPCA is not set
31442 +# I2C Hardware Bus support
31445 +# CONFIG_I2C_OCORES is not set
31446 +# CONFIG_I2C_PARPORT_LIGHT is not set
31447 +# CONFIG_I2C_SIMTEC is not set
31448 +# CONFIG_I2C_TAOS_EVM is not set
31449 +# CONFIG_I2C_STUB is not set
31452 +# Miscellaneous I2C Chip support
31454 +# CONFIG_SENSORS_DS1337 is not set
31455 +# CONFIG_SENSORS_DS1374 is not set
31456 +# CONFIG_DS1682 is not set
31457 +# CONFIG_SENSORS_EEPROM is not set
31458 +# CONFIG_SENSORS_PCF8574 is not set
31459 +# CONFIG_SENSORS_PCA9539 is not set
31460 +# CONFIG_SENSORS_PCF8591 is not set
31461 +# CONFIG_SENSORS_M41T00 is not set
31462 +# CONFIG_SENSORS_MAX6875 is not set
31463 +# CONFIG_SENSORS_TSL2550 is not set
31464 +# CONFIG_I2C_DEBUG_CORE is not set
31465 +# CONFIG_I2C_DEBUG_ALGO is not set
31466 +# CONFIG_I2C_DEBUG_BUS is not set
31467 +# CONFIG_I2C_DEBUG_CHIP is not set
31472 +# CONFIG_SPI is not set
31473 +# CONFIG_SPI_MASTER is not set
31474 +# CONFIG_W1 is not set
31475 +# CONFIG_POWER_SUPPLY is not set
31477 +# CONFIG_HWMON_VID is not set
31478 +# CONFIG_SENSORS_ABITUGURU is not set
31479 +# CONFIG_SENSORS_ABITUGURU3 is not set
31480 +# CONFIG_SENSORS_AD7418 is not set
31481 +# CONFIG_SENSORS_ADM1021 is not set
31482 +# CONFIG_SENSORS_ADM1025 is not set
31483 +# CONFIG_SENSORS_ADM1026 is not set
31484 +# CONFIG_SENSORS_ADM1029 is not set
31485 +# CONFIG_SENSORS_ADM1031 is not set
31486 +# CONFIG_SENSORS_ADM9240 is not set
31487 +# CONFIG_SENSORS_ASB100 is not set
31488 +# CONFIG_SENSORS_ATXP1 is not set
31489 +# CONFIG_SENSORS_DS1621 is not set
31490 +# CONFIG_SENSORS_F71805F is not set
31491 +# CONFIG_SENSORS_FSCHER is not set
31492 +# CONFIG_SENSORS_FSCPOS is not set
31493 +# CONFIG_SENSORS_GL518SM is not set
31494 +# CONFIG_SENSORS_GL520SM is not set
31495 +# CONFIG_SENSORS_IT87 is not set
31496 +# CONFIG_SENSORS_LM63 is not set
31497 +# CONFIG_SENSORS_LM75 is not set
31498 +# CONFIG_SENSORS_LM77 is not set
31499 +# CONFIG_SENSORS_LM78 is not set
31500 +# CONFIG_SENSORS_LM80 is not set
31501 +# CONFIG_SENSORS_LM83 is not set
31502 +# CONFIG_SENSORS_LM85 is not set
31503 +# CONFIG_SENSORS_LM87 is not set
31504 +# CONFIG_SENSORS_LM90 is not set
31505 +# CONFIG_SENSORS_LM92 is not set
31506 +# CONFIG_SENSORS_LM93 is not set
31507 +# CONFIG_SENSORS_MAX1619 is not set
31508 +# CONFIG_SENSORS_MAX6650 is not set
31509 +# CONFIG_SENSORS_PC87360 is not set
31510 +# CONFIG_SENSORS_PC87427 is not set
31511 +# CONFIG_SENSORS_DME1737 is not set
31512 +# CONFIG_SENSORS_SMSC47M1 is not set
31513 +# CONFIG_SENSORS_SMSC47M192 is not set
31514 +# CONFIG_SENSORS_SMSC47B397 is not set
31515 +# CONFIG_SENSORS_THMC50 is not set
31516 +# CONFIG_SENSORS_VT1211 is not set
31517 +# CONFIG_SENSORS_W83781D is not set
31518 +# CONFIG_SENSORS_W83791D is not set
31519 +# CONFIG_SENSORS_W83792D is not set
31520 +# CONFIG_SENSORS_W83793 is not set
31521 +# CONFIG_SENSORS_W83L785TS is not set
31522 +# CONFIG_SENSORS_W83627HF is not set
31523 +# CONFIG_SENSORS_W83627EHF is not set
31524 +# CONFIG_HWMON_DEBUG_CHIP is not set
31527 +# Multifunction device drivers
31529 +# CONFIG_MFD_SM501 is not set
31532 +# Multimedia devices
31534 +# CONFIG_VIDEO_DEV is not set
31535 +# CONFIG_DVB_CORE is not set
31539 +# Graphics support
31541 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
31544 +# Display device support
31546 +# CONFIG_DISPLAY_SUPPORT is not set
31547 +# CONFIG_VGASTATE is not set
31548 +CONFIG_VIDEO_OUTPUT_CONTROL=m
31549 +# CONFIG_FB is not set
31550 +# CONFIG_FB_IBM_GXT4500 is not set
31555 +# CONFIG_SOUND is not set
31556 +CONFIG_HID_SUPPORT=y
31558 +# CONFIG_HID_DEBUG is not set
31559 +CONFIG_USB_SUPPORT=y
31560 +CONFIG_USB_ARCH_HAS_HCD=y
31561 +# CONFIG_USB_ARCH_HAS_OHCI is not set
31562 +CONFIG_USB_ARCH_HAS_EHCI=y
31563 +# CONFIG_USB is not set
31566 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
31570 +# USB Gadget Support
31572 +# CONFIG_USB_GADGET is not set
31573 +# CONFIG_MMC is not set
31574 +# CONFIG_NEW_LEDS is not set
31575 +# CONFIG_EDAC is not set
31576 +# CONFIG_RTC_CLASS is not set
31579 +# DMA Engine support
31581 +# CONFIG_DMA_ENGINE is not set
31594 +# CONFIG_UIO is not set
31600 +# CONFIG_EXT2_FS_XATTR is not set
31601 +# CONFIG_EXT2_FS_XIP is not set
31603 +CONFIG_EXT3_FS_XATTR=y
31604 +# CONFIG_EXT3_FS_POSIX_ACL is not set
31605 +# CONFIG_EXT3_FS_SECURITY is not set
31606 +# CONFIG_EXT4DEV_FS is not set
31608 +# CONFIG_JBD_DEBUG is not set
31609 +CONFIG_FS_MBCACHE=y
31610 +# CONFIG_REISERFS_FS is not set
31611 +# CONFIG_JFS_FS is not set
31612 +# CONFIG_FS_POSIX_ACL is not set
31613 +# CONFIG_XFS_FS is not set
31614 +# CONFIG_GFS2_FS is not set
31615 +# CONFIG_OCFS2_FS is not set
31616 +# CONFIG_MINIX_FS is not set
31617 +# CONFIG_ROMFS_FS is not set
31619 +CONFIG_INOTIFY_USER=y
31620 +# CONFIG_QUOTA is not set
31622 +# CONFIG_AUTOFS_FS is not set
31623 +# CONFIG_AUTOFS4_FS is not set
31624 +# CONFIG_FUSE_FS is not set
31627 +# CD-ROM/DVD Filesystems
31629 +# CONFIG_ISO9660_FS is not set
31630 +# CONFIG_UDF_FS is not set
31633 +# DOS/FAT/NT Filesystems
31635 +# CONFIG_MSDOS_FS is not set
31636 +# CONFIG_VFAT_FS is not set
31637 +# CONFIG_NTFS_FS is not set
31640 +# Pseudo filesystems
31643 +CONFIG_PROC_KCORE=y
31644 +CONFIG_PROC_SYSCTL=y
31647 +# CONFIG_TMPFS_POSIX_ACL is not set
31648 +# CONFIG_HUGETLB_PAGE is not set
31650 +# CONFIG_CONFIGFS_FS is not set
31653 +# Miscellaneous filesystems
31655 +# CONFIG_ADFS_FS is not set
31656 +# CONFIG_AFFS_FS is not set
31657 +# CONFIG_HFS_FS is not set
31658 +# CONFIG_HFSPLUS_FS is not set
31659 +# CONFIG_BEFS_FS is not set
31660 +# CONFIG_BFS_FS is not set
31661 +# CONFIG_EFS_FS is not set
31662 +# CONFIG_CRAMFS is not set
31663 +# CONFIG_VXFS_FS is not set
31664 +# CONFIG_HPFS_FS is not set
31665 +# CONFIG_QNX4FS_FS is not set
31666 +# CONFIG_SYSV_FS is not set
31667 +# CONFIG_UFS_FS is not set
31670 +# Network File Systems
31674 +# CONFIG_NFS_V3_ACL is not set
31676 +# CONFIG_NFS_DIRECTIO is not set
31677 +# CONFIG_NFSD is not set
31681 +CONFIG_NFS_COMMON=y
31683 +CONFIG_SUNRPC_GSS=y
31684 +# CONFIG_SUNRPC_BIND34 is not set
31685 +CONFIG_RPCSEC_GSS_KRB5=y
31686 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
31687 +# CONFIG_SMB_FS is not set
31688 +# CONFIG_CIFS is not set
31689 +# CONFIG_NCP_FS is not set
31690 +# CONFIG_CODA_FS is not set
31691 +# CONFIG_AFS_FS is not set
31696 +CONFIG_PARTITION_ADVANCED=y
31697 +# CONFIG_ACORN_PARTITION is not set
31698 +# CONFIG_OSF_PARTITION is not set
31699 +# CONFIG_AMIGA_PARTITION is not set
31700 +# CONFIG_ATARI_PARTITION is not set
31701 +# CONFIG_MAC_PARTITION is not set
31702 +CONFIG_MSDOS_PARTITION=y
31703 +# CONFIG_BSD_DISKLABEL is not set
31704 +# CONFIG_MINIX_SUBPARTITION is not set
31705 +# CONFIG_SOLARIS_X86_PARTITION is not set
31706 +# CONFIG_UNIXWARE_DISKLABEL is not set
31707 +# CONFIG_LDM_PARTITION is not set
31708 +# CONFIG_SGI_PARTITION is not set
31709 +# CONFIG_ULTRIX_PARTITION is not set
31710 +# CONFIG_SUN_PARTITION is not set
31711 +# CONFIG_KARMA_PARTITION is not set
31712 +# CONFIG_EFI_PARTITION is not set
31713 +# CONFIG_SYSV68_PARTITION is not set
31716 +# Native Language Support
31718 +# CONFIG_NLS is not set
31721 +# Distributed Lock Manager
31723 +# CONFIG_DLM is not set
31724 +# CONFIG_UCC_SLOW is not set
31727 +# Library routines
31729 +CONFIG_BITREVERSE=y
31730 +# CONFIG_CRC_CCITT is not set
31731 +# CONFIG_CRC16 is not set
31732 +# CONFIG_CRC_ITU_T is not set
31734 +# CONFIG_CRC7 is not set
31735 +# CONFIG_LIBCRC32C is not set
31737 +CONFIG_HAS_IOMEM=y
31738 +CONFIG_HAS_IOPORT=y
31742 +# Instrumentation Support
31744 +# CONFIG_PROFILING is not set
31745 +# CONFIG_KPROBES is not set
31750 +# CONFIG_PRINTK_TIME is not set
31751 +CONFIG_ENABLE_MUST_CHECK=y
31752 +# CONFIG_MAGIC_SYSRQ is not set
31753 +# CONFIG_UNUSED_SYMBOLS is not set
31754 +# CONFIG_DEBUG_FS is not set
31755 +# CONFIG_HEADERS_CHECK is not set
31756 +# CONFIG_DEBUG_KERNEL is not set
31757 +# CONFIG_DEBUG_BUGVERBOSE is not set
31758 +# CONFIG_PPC_EARLY_DEBUG is not set
31761 +# Security options
31763 +# CONFIG_KEYS is not set
31764 +# CONFIG_SECURITY is not set
31766 +CONFIG_CRYPTO_ALGAPI=y
31767 +CONFIG_CRYPTO_BLKCIPHER=y
31768 +CONFIG_CRYPTO_MANAGER=y
31769 +# CONFIG_CRYPTO_HMAC is not set
31770 +# CONFIG_CRYPTO_XCBC is not set
31771 +# CONFIG_CRYPTO_NULL is not set
31772 +# CONFIG_CRYPTO_MD4 is not set
31773 +CONFIG_CRYPTO_MD5=y
31774 +# CONFIG_CRYPTO_SHA1 is not set
31775 +# CONFIG_CRYPTO_SHA256 is not set
31776 +# CONFIG_CRYPTO_SHA512 is not set
31777 +# CONFIG_CRYPTO_WP512 is not set
31778 +# CONFIG_CRYPTO_TGR192 is not set
31779 +# CONFIG_CRYPTO_GF128MUL is not set
31780 +CONFIG_CRYPTO_ECB=m
31781 +CONFIG_CRYPTO_CBC=y
31782 +CONFIG_CRYPTO_PCBC=m
31783 +# CONFIG_CRYPTO_LRW is not set
31784 +# CONFIG_CRYPTO_CRYPTD is not set
31785 +CONFIG_CRYPTO_DES=y
31786 +# CONFIG_CRYPTO_FCRYPT is not set
31787 +# CONFIG_CRYPTO_BLOWFISH is not set
31788 +# CONFIG_CRYPTO_TWOFISH is not set
31789 +# CONFIG_CRYPTO_SERPENT is not set
31790 +# CONFIG_CRYPTO_AES is not set
31791 +# CONFIG_CRYPTO_CAST5 is not set
31792 +# CONFIG_CRYPTO_CAST6 is not set
31793 +# CONFIG_CRYPTO_TEA is not set
31794 +# CONFIG_CRYPTO_ARC4 is not set
31795 +# CONFIG_CRYPTO_KHAZAD is not set
31796 +# CONFIG_CRYPTO_ANUBIS is not set
31797 +# CONFIG_CRYPTO_DEFLATE is not set
31798 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
31799 +# CONFIG_CRYPTO_CRC32C is not set
31800 +# CONFIG_CRYPTO_CAMELLIA is not set
31801 +# CONFIG_CRYPTO_TEST is not set
31802 +CONFIG_CRYPTO_HW=y
31803 --- a/arch/powerpc/configs/mpc8610_hpcd_defconfig
31804 +++ b/arch/powerpc/configs/mpc8610_hpcd_defconfig
31805 @@ -696,7 +696,7 @@
31806 CONFIG_SERIAL_CORE=y
31807 CONFIG_SERIAL_CORE_CONSOLE=y
31808 # CONFIG_SERIAL_JSM is not set
31809 -CONFIG_SERIAL_OF_PLATFORM=y
31810 +# CONFIG_SERIAL_OF_PLATFORM is not set
31811 CONFIG_UNIX98_PTYS=y
31812 # CONFIG_LEGACY_PTYS is not set
31813 # CONFIG_IPMI_HANDLER is not set
31814 @@ -708,7 +708,60 @@
31815 # CONFIG_RAW_DRIVER is not set
31816 # CONFIG_TCG_TPM is not set
31818 -# CONFIG_I2C is not set
31820 +CONFIG_I2C_BOARDINFO=y
31821 +# CONFIG_I2C_CHARDEV is not set
31826 +# CONFIG_I2C_ALGOBIT is not set
31827 +# CONFIG_I2C_ALGOPCF is not set
31828 +# CONFIG_I2C_ALGOPCA is not set
31831 +# I2C Hardware Bus support
31833 +# CONFIG_I2C_ALI1535 is not set
31834 +# CONFIG_I2C_ALI1563 is not set
31835 +# CONFIG_I2C_ALI15X3 is not set
31836 +# CONFIG_I2C_AMD756 is not set
31837 +# CONFIG_I2C_AMD8111 is not set
31838 +# CONFIG_I2C_I801 is not set
31839 +# CONFIG_I2C_I810 is not set
31840 +# CONFIG_I2C_PIIX4 is not set
31842 +# CONFIG_I2C_NFORCE2 is not set
31843 +# CONFIG_I2C_OCORES is not set
31844 +# CONFIG_I2C_PARPORT_LIGHT is not set
31845 +# CONFIG_I2C_PROSAVAGE is not set
31846 +# CONFIG_I2C_SAVAGE4 is not set
31847 +# CONFIG_I2C_SIMTEC is not set
31848 +# CONFIG_I2C_SIS5595 is not set
31849 +# CONFIG_I2C_SIS630 is not set
31850 +# CONFIG_I2C_SIS96X is not set
31851 +# CONFIG_I2C_TAOS_EVM is not set
31852 +# CONFIG_I2C_VIA is not set
31853 +# CONFIG_I2C_VIAPRO is not set
31854 +# CONFIG_I2C_VOODOO3 is not set
31857 +# Miscellaneous I2C Chip support
31859 +# CONFIG_SENSORS_DS1337 is not set
31860 +# CONFIG_SENSORS_DS1374 is not set
31861 +# CONFIG_DS1682 is not set
31862 +# CONFIG_SENSORS_EEPROM is not set
31863 +# CONFIG_SENSORS_PCF8574 is not set
31864 +# CONFIG_SENSORS_PCA9539 is not set
31865 +# CONFIG_SENSORS_PCF8591 is not set
31866 +# CONFIG_SENSORS_M41T00 is not set
31867 +# CONFIG_SENSORS_MAX6875 is not set
31868 +# CONFIG_SENSORS_TSL2550 is not set
31869 +# CONFIG_I2C_DEBUG_CORE is not set
31870 +# CONFIG_I2C_DEBUG_ALGO is not set
31871 +# CONFIG_I2C_DEBUG_BUS is not set
31872 +# CONFIG_I2C_DEBUG_CHIP is not set
31876 @@ -763,7 +816,119 @@
31880 -# CONFIG_SOUND is not set
31884 +# Advanced Linux Sound Architecture
31887 +CONFIG_SND_TIMER=y
31889 +# CONFIG_SND_SEQUENCER is not set
31890 +CONFIG_SND_OSSEMUL=y
31891 +CONFIG_SND_MIXER_OSS=y
31892 +CONFIG_SND_PCM_OSS=y
31893 +# CONFIG_SND_PCM_OSS_PLUGINS is not set
31894 +# CONFIG_SND_DYNAMIC_MINORS is not set
31895 +# CONFIG_SND_SUPPORT_OLD_API is not set
31896 +CONFIG_SND_VERBOSE_PROCFS=y
31897 +# CONFIG_SND_VERBOSE_PRINTK is not set
31898 +# CONFIG_SND_DEBUG is not set
31903 +# CONFIG_SND_DUMMY is not set
31904 +# CONFIG_SND_MTPAV is not set
31905 +# CONFIG_SND_SERIAL_U16550 is not set
31906 +# CONFIG_SND_MPU401 is not set
31911 +# CONFIG_SND_AD1889 is not set
31912 +# CONFIG_SND_ALS300 is not set
31913 +# CONFIG_SND_ALS4000 is not set
31914 +# CONFIG_SND_ALI5451 is not set
31915 +# CONFIG_SND_ATIIXP is not set
31916 +# CONFIG_SND_ATIIXP_MODEM is not set
31917 +# CONFIG_SND_AU8810 is not set
31918 +# CONFIG_SND_AU8820 is not set
31919 +# CONFIG_SND_AU8830 is not set
31920 +# CONFIG_SND_AZT3328 is not set
31921 +# CONFIG_SND_BT87X is not set
31922 +# CONFIG_SND_CA0106 is not set
31923 +# CONFIG_SND_CMIPCI is not set
31924 +# CONFIG_SND_CS4281 is not set
31925 +# CONFIG_SND_CS46XX is not set
31926 +# CONFIG_SND_CS5530 is not set
31927 +# CONFIG_SND_DARLA20 is not set
31928 +# CONFIG_SND_GINA20 is not set
31929 +# CONFIG_SND_LAYLA20 is not set
31930 +# CONFIG_SND_DARLA24 is not set
31931 +# CONFIG_SND_GINA24 is not set
31932 +# CONFIG_SND_LAYLA24 is not set
31933 +# CONFIG_SND_MONA is not set
31934 +# CONFIG_SND_MIA is not set
31935 +# CONFIG_SND_ECHO3G is not set
31936 +# CONFIG_SND_INDIGO is not set
31937 +# CONFIG_SND_INDIGOIO is not set
31938 +# CONFIG_SND_INDIGODJ is not set
31939 +# CONFIG_SND_EMU10K1 is not set
31940 +# CONFIG_SND_EMU10K1X is not set
31941 +# CONFIG_SND_ENS1370 is not set
31942 +# CONFIG_SND_ENS1371 is not set
31943 +# CONFIG_SND_ES1938 is not set
31944 +# CONFIG_SND_ES1968 is not set
31945 +# CONFIG_SND_FM801 is not set
31946 +# CONFIG_SND_HDA_INTEL is not set
31947 +# CONFIG_SND_HDSP is not set
31948 +# CONFIG_SND_HDSPM is not set
31949 +# CONFIG_SND_ICE1712 is not set
31950 +# CONFIG_SND_ICE1724 is not set
31951 +# CONFIG_SND_INTEL8X0 is not set
31952 +# CONFIG_SND_INTEL8X0M is not set
31953 +# CONFIG_SND_KORG1212 is not set
31954 +# CONFIG_SND_MAESTRO3 is not set
31955 +# CONFIG_SND_MIXART is not set
31956 +# CONFIG_SND_NM256 is not set
31957 +# CONFIG_SND_PCXHR is not set
31958 +# CONFIG_SND_RIPTIDE is not set
31959 +# CONFIG_SND_RME32 is not set
31960 +# CONFIG_SND_RME96 is not set
31961 +# CONFIG_SND_RME9652 is not set
31962 +# CONFIG_SND_SONICVIBES is not set
31963 +# CONFIG_SND_TRIDENT is not set
31964 +# CONFIG_SND_VIA82XX is not set
31965 +# CONFIG_SND_VIA82XX_MODEM is not set
31966 +# CONFIG_SND_VX222 is not set
31967 +# CONFIG_SND_YMFPCI is not set
31970 +# ALSA PowerMac devices
31974 +# ALSA PowerPC devices
31978 +# System on Chip audio support
31983 +# SoC Audio support for SuperH
31987 +# ALSA SoC audio for Freescale SOCs
31989 +CONFIG_SND_SOC_MPC8610=y
31990 +CONFIG_SND_SOC_MPC8610_HPCD=y
31991 +CONFIG_SND_SOC_CS4270=y
31992 +CONFIG_SND_SOC_CS4270_VD33_ERRATA=y
31994 CONFIG_HID_SUPPORT=y
31996 # CONFIG_HID_DEBUG is not set
31997 --- a/arch/powerpc/configs/pasemi_defconfig
31998 +++ b/arch/powerpc/configs/pasemi_defconfig
32001 # Automatically generated make config: don't edit
32002 -# Linux kernel version: 2.6.24-rc4
32003 -# Thu Dec 6 16:49:03 2007
32004 +# Linux kernel version: 2.6.24-rc6
32005 +# Tue Jan 15 10:26:10 2008
32009 @@ -152,7 +152,6 @@
32010 CONFIG_PPC_PASEMI_IOMMU=y
32011 # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set
32012 CONFIG_PPC_PASEMI_MDIO=y
32013 -CONFIG_ELECTRA_IDE=y
32014 # CONFIG_PPC_CELLEB is not set
32015 # CONFIG_PPC_PS3 is not set
32016 # CONFIG_PPC_CELL is not set
32017 @@ -256,7 +255,7 @@
32018 CONFIG_PCI_SYSCALL=y
32019 # CONFIG_PCIEPORTBUS is not set
32020 CONFIG_ARCH_SUPPORTS_MSI=y
32021 -# CONFIG_PCI_MSI is not set
32023 CONFIG_PCI_LEGACY=y
32024 # CONFIG_PCI_DEBUG is not set
32026 @@ -663,7 +662,26 @@
32027 # CONFIG_PATA_VIA is not set
32028 # CONFIG_PATA_WINBOND is not set
32029 CONFIG_PATA_PLATFORM=y
32030 -# CONFIG_MD is not set
32031 +CONFIG_PATA_OF_PLATFORM=y
32033 +CONFIG_BLK_DEV_MD=y
32034 +CONFIG_MD_LINEAR=y
32037 +CONFIG_MD_RAID10=y
32038 +CONFIG_MD_RAID456=y
32039 +CONFIG_MD_RAID5_RESHAPE=y
32040 +# CONFIG_MD_MULTIPATH is not set
32041 +# CONFIG_MD_FAULTY is not set
32042 +CONFIG_BLK_DEV_DM=y
32043 +# CONFIG_DM_DEBUG is not set
32045 +# CONFIG_DM_SNAPSHOT is not set
32046 +# CONFIG_DM_MIRROR is not set
32047 +# CONFIG_DM_ZERO is not set
32048 +# CONFIG_DM_MULTIPATH is not set
32049 +# CONFIG_DM_DELAY is not set
32050 +# CONFIG_DM_UEVENT is not set
32051 # CONFIG_FUSION is not set
32054 @@ -1686,6 +1704,10 @@
32055 # CONFIG_KEYS is not set
32056 # CONFIG_SECURITY is not set
32057 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
32058 +CONFIG_XOR_BLOCKS=y
32059 +CONFIG_ASYNC_CORE=y
32060 +CONFIG_ASYNC_MEMCPY=y
32061 +CONFIG_ASYNC_XOR=y
32063 CONFIG_CRYPTO_ALGAPI=y
32064 CONFIG_CRYPTO_BLKCIPHER=y
32065 --- a/arch/powerpc/configs/ppc64_defconfig
32066 +++ b/arch/powerpc/configs/ppc64_defconfig
32069 # Automatically generated make config: don't edit
32070 # Linux kernel version: 2.6.24-rc4
32071 -# Thu Dec 6 16:49:07 2007
32072 +# Fri Dec 21 14:47:29 2007
32076 @@ -211,7 +211,7 @@
32077 CONFIG_MPIC_U3_HT_IRQS=y
32078 CONFIG_MPIC_BROKEN_REGREAD=y
32080 -# CONFIG_IBMEBUS is not set
32082 # CONFIG_PPC_MPC106 is not set
32083 CONFIG_PPC_970_NAP=y
32084 CONFIG_PPC_INDIRECT_IO=y
32085 @@ -375,7 +375,7 @@
32086 CONFIG_INET_XFRM_MODE_TRANSPORT=y
32087 CONFIG_INET_XFRM_MODE_TUNNEL=y
32088 CONFIG_INET_XFRM_MODE_BEET=y
32089 -# CONFIG_INET_LRO is not set
32092 CONFIG_INET_TCP_DIAG=y
32093 # CONFIG_TCP_CONG_ADVANCED is not set
32094 @@ -929,6 +929,7 @@
32095 CONFIG_NETDEV_10000=y
32096 # CONFIG_CHELSIO_T1 is not set
32097 # CONFIG_CHELSIO_T3 is not set
32099 # CONFIG_IXGBE is not set
32101 # CONFIG_IXGB_NAPI is not set
32102 @@ -1558,6 +1559,7 @@
32103 CONFIG_INFINIBAND_MTHCA=m
32104 CONFIG_INFINIBAND_MTHCA_DEBUG=y
32105 # CONFIG_INFINIBAND_IPATH is not set
32106 +CONFIG_INFINIBAND_EHCA=m
32107 # CONFIG_INFINIBAND_AMSO1100 is not set
32108 # CONFIG_MLX4_INFINIBAND is not set
32109 CONFIG_INFINIBAND_IPOIB=m
32110 --- a/arch/powerpc/configs/ps3_defconfig
32111 +++ b/arch/powerpc/configs/ps3_defconfig
32114 # Automatically generated make config: don't edit
32115 -# Linux kernel version: 2.6.24-rc4
32116 -# Tue Dec 4 22:49:57 2007
32117 +# Linux kernel version: 2.6.24-rc8
32118 +# Wed Jan 16 14:31:21 2008
32122 @@ -103,6 +103,7 @@
32124 # CONFIG_SLUB is not set
32125 # CONFIG_SLOB is not set
32127 CONFIG_RT_MUTEXES=y
32128 # CONFIG_TINY_SHMEM is not set
32129 CONFIG_BASE_SMALL=0
32130 @@ -154,7 +155,6 @@
32131 # CONFIG_PS3_ADVANCED is not set
32132 CONFIG_PS3_HTAB_SIZE=20
32133 # CONFIG_PS3_DYNAMIC_DMA is not set
32134 -CONFIG_PS3_USE_LPAR_ADDR=y
32137 CONFIG_PS3_SYS_MANAGER=y
32138 @@ -162,6 +162,7 @@
32144 # CONFIG_PPC_CELL_NATIVE is not set
32145 # CONFIG_PPC_IBM_CELL_BLADE is not set
32146 @@ -225,7 +226,7 @@
32147 # CONFIG_SPARSEMEM_STATIC is not set
32148 CONFIG_SPARSEMEM_EXTREME=y
32149 CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
32150 -CONFIG_SPARSEMEM_VMEMMAP=y
32151 +# CONFIG_SPARSEMEM_VMEMMAP is not set
32152 CONFIG_MEMORY_HOTPLUG=y
32153 CONFIG_MEMORY_HOTPLUG_SPARSE=y
32154 CONFIG_SPLIT_PTLOCK_CPUS=4
32155 @@ -338,7 +339,26 @@
32156 # CONFIG_NET_PKTGEN is not set
32157 # CONFIG_HAMRADIO is not set
32158 # CONFIG_IRDA is not set
32159 -# CONFIG_BT is not set
32163 +CONFIG_BT_RFCOMM=m
32164 +CONFIG_BT_RFCOMM_TTY=y
32166 +CONFIG_BT_BNEP_MC_FILTER=y
32167 +CONFIG_BT_BNEP_PROTO_FILTER=y
32171 +# Bluetooth device drivers
32173 +CONFIG_BT_HCIUSB=m
32174 +CONFIG_BT_HCIUSB_SCO=y
32175 +# CONFIG_BT_HCIUART is not set
32176 +# CONFIG_BT_HCIBCM203X is not set
32177 +# CONFIG_BT_HCIBPA10X is not set
32178 +# CONFIG_BT_HCIBFUSB is not set
32179 +# CONFIG_BT_HCIVHCI is not set
32180 # CONFIG_AF_RXRPC is not set
32183 @@ -666,14 +686,14 @@
32191 # Advanced Linux Sound Architecture
32194 -CONFIG_SND_TIMER=y
32197 +CONFIG_SND_TIMER=m
32199 # CONFIG_SND_SEQUENCER is not set
32200 # CONFIG_SND_MIXER_OSS is not set
32201 # CONFIG_SND_PCM_OSS is not set
32202 @@ -702,7 +722,7 @@
32204 # ALSA PowerPC devices
32208 CONFIG_SND_PS3_DEFAULT_START_DELAY=2000
32211 @@ -747,7 +767,7 @@
32212 CONFIG_USB_ARCH_HAS_HCD=y
32213 CONFIG_USB_ARCH_HAS_OHCI=y
32214 CONFIG_USB_ARCH_HAS_EHCI=y
32217 # CONFIG_USB_DEBUG is not set
32220 @@ -761,13 +781,13 @@
32222 # USB Host Controller Drivers
32224 -CONFIG_USB_EHCI_HCD=y
32225 +CONFIG_USB_EHCI_HCD=m
32226 # CONFIG_USB_EHCI_SPLIT_ISO is not set
32227 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
32228 # CONFIG_USB_EHCI_TT_NEWSCHED is not set
32229 CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
32230 # CONFIG_USB_ISP116X_HCD is not set
32231 -CONFIG_USB_OHCI_HCD=y
32232 +CONFIG_USB_OHCI_HCD=m
32233 # CONFIG_USB_OHCI_HCD_PPC_OF is not set
32234 # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
32235 CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
32236 @@ -1033,7 +1053,8 @@
32237 CONFIG_HAS_IOPORT=y
32239 CONFIG_INSTRUMENTATION=y
32240 -# CONFIG_PROFILING is not set
32241 +CONFIG_PROFILING=y
32243 # CONFIG_KPROBES is not set
32244 # CONFIG_MARKERS is not set
32247 +++ b/arch/powerpc/configs/rainier_defconfig
32250 +# Automatically generated make config: don't edit
32251 +# Linux kernel version: 2.6.24-rc6
32252 +# Mon Dec 24 11:22:40 2007
32254 +# CONFIG_PPC64 is not set
32257 +# Processor support
32259 +# CONFIG_6xx is not set
32260 +# CONFIG_PPC_85xx is not set
32261 +# CONFIG_PPC_8xx is not set
32262 +# CONFIG_40x is not set
32264 +# CONFIG_E200 is not set
32267 +CONFIG_PTE_64BIT=y
32268 +CONFIG_PHYS_64BIT=y
32269 +# CONFIG_PPC_MM_SLICES is not set
32270 +CONFIG_NOT_COHERENT_CACHE=y
32272 +CONFIG_WORD_SIZE=32
32273 +CONFIG_PPC_MERGE=y
32275 +CONFIG_GENERIC_CMOS_UPDATE=y
32276 +CONFIG_GENERIC_TIME=y
32277 +CONFIG_GENERIC_TIME_VSYSCALL=y
32278 +CONFIG_GENERIC_CLOCKEVENTS=y
32279 +CONFIG_GENERIC_HARDIRQS=y
32280 +CONFIG_IRQ_PER_CPU=y
32281 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32282 +CONFIG_ARCH_HAS_ILOG2_U32=y
32283 +CONFIG_GENERIC_HWEIGHT=y
32284 +CONFIG_GENERIC_CALIBRATE_DELAY=y
32285 +CONFIG_GENERIC_FIND_NEXT_BIT=y
32286 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
32288 +CONFIG_EARLY_PRINTK=y
32289 +CONFIG_GENERIC_NVRAM=y
32290 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
32291 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
32294 +CONFIG_PPC_UDBG_16550=y
32295 +# CONFIG_GENERIC_TBSYNC is not set
32296 +CONFIG_AUDIT_ARCH=y
32297 +CONFIG_GENERIC_BUG=y
32298 +# CONFIG_DEFAULT_UIMAGE is not set
32299 +CONFIG_PPC_DCR_NATIVE=y
32300 +# CONFIG_PPC_DCR_MMIO is not set
32302 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
32307 +CONFIG_EXPERIMENTAL=y
32308 +CONFIG_BROKEN_ON_SMP=y
32309 +CONFIG_INIT_ENV_ARG_LIMIT=32
32310 +CONFIG_LOCALVERSION=""
32311 +CONFIG_LOCALVERSION_AUTO=y
32314 +CONFIG_SYSVIPC_SYSCTL=y
32315 +CONFIG_POSIX_MQUEUE=y
32316 +# CONFIG_BSD_PROCESS_ACCT is not set
32317 +# CONFIG_TASKSTATS is not set
32318 +# CONFIG_USER_NS is not set
32319 +# CONFIG_PID_NS is not set
32320 +# CONFIG_AUDIT is not set
32321 +# CONFIG_IKCONFIG is not set
32322 +CONFIG_LOG_BUF_SHIFT=14
32323 +# CONFIG_CGROUPS is not set
32324 +CONFIG_FAIR_GROUP_SCHED=y
32325 +CONFIG_FAIR_USER_SCHED=y
32326 +# CONFIG_FAIR_CGROUP_SCHED is not set
32327 +CONFIG_SYSFS_DEPRECATED=y
32328 +# CONFIG_RELAY is not set
32329 +CONFIG_BLK_DEV_INITRD=y
32330 +CONFIG_INITRAMFS_SOURCE=""
32331 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
32334 +CONFIG_SYSCTL_SYSCALL=y
32336 +# CONFIG_KALLSYMS_ALL is not set
32337 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
32342 +CONFIG_BASE_FULL=y
32344 +CONFIG_ANON_INODES=y
32349 +CONFIG_VM_EVENT_COUNTERS=y
32350 +CONFIG_SLUB_DEBUG=y
32351 +# CONFIG_SLAB is not set
32353 +# CONFIG_SLOB is not set
32354 +CONFIG_RT_MUTEXES=y
32355 +# CONFIG_TINY_SHMEM is not set
32356 +CONFIG_BASE_SMALL=0
32358 +CONFIG_MODULE_UNLOAD=y
32359 +# CONFIG_MODULE_FORCE_UNLOAD is not set
32360 +# CONFIG_MODVERSIONS is not set
32361 +# CONFIG_MODULE_SRCVERSION_ALL is not set
32365 +# CONFIG_BLK_DEV_IO_TRACE is not set
32366 +# CONFIG_LSF is not set
32367 +# CONFIG_BLK_DEV_BSG is not set
32372 +CONFIG_IOSCHED_NOOP=y
32373 +CONFIG_IOSCHED_AS=y
32374 +CONFIG_IOSCHED_DEADLINE=y
32375 +CONFIG_IOSCHED_CFQ=y
32376 +CONFIG_DEFAULT_AS=y
32377 +# CONFIG_DEFAULT_DEADLINE is not set
32378 +# CONFIG_DEFAULT_CFQ is not set
32379 +# CONFIG_DEFAULT_NOOP is not set
32380 +CONFIG_DEFAULT_IOSCHED="anticipatory"
32381 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
32384 +# Platform support
32386 +# CONFIG_PPC_MPC52xx is not set
32387 +# CONFIG_PPC_MPC5200 is not set
32388 +# CONFIG_PPC_CELL is not set
32389 +# CONFIG_PPC_CELL_NATIVE is not set
32390 +# CONFIG_PQ2ADS is not set
32391 +# CONFIG_BAMBOO is not set
32392 +# CONFIG_EBONY is not set
32393 +# CONFIG_SEQUOIA is not set
32394 +# CONFIG_TAISHAN is not set
32395 +# CONFIG_KATMAI is not set
32398 +# CONFIG_MPIC is not set
32399 +# CONFIG_MPIC_WEIRD is not set
32400 +# CONFIG_PPC_I8259 is not set
32401 +# CONFIG_PPC_RTAS is not set
32402 +# CONFIG_MMIO_NVRAM is not set
32403 +# CONFIG_PPC_MPC106 is not set
32404 +# CONFIG_PPC_970_NAP is not set
32405 +# CONFIG_PPC_INDIRECT_IO is not set
32406 +# CONFIG_GENERIC_IOMAP is not set
32407 +# CONFIG_CPU_FREQ is not set
32408 +# CONFIG_CPM2 is not set
32409 +# CONFIG_FSL_ULI1575 is not set
32414 +# CONFIG_HIGHMEM is not set
32415 +# CONFIG_TICK_ONESHOT is not set
32416 +# CONFIG_NO_HZ is not set
32417 +# CONFIG_HIGH_RES_TIMERS is not set
32418 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
32419 +# CONFIG_HZ_100 is not set
32421 +# CONFIG_HZ_300 is not set
32422 +# CONFIG_HZ_1000 is not set
32424 +CONFIG_PREEMPT_NONE=y
32425 +# CONFIG_PREEMPT_VOLUNTARY is not set
32426 +# CONFIG_PREEMPT is not set
32427 +CONFIG_BINFMT_ELF=y
32428 +# CONFIG_BINFMT_MISC is not set
32429 +CONFIG_MATH_EMULATION=y
32430 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
32431 +CONFIG_ARCH_FLATMEM_ENABLE=y
32432 +CONFIG_ARCH_POPULATES_NODE_MAP=y
32433 +CONFIG_SELECT_MEMORY_MODEL=y
32434 +CONFIG_FLATMEM_MANUAL=y
32435 +# CONFIG_DISCONTIGMEM_MANUAL is not set
32436 +# CONFIG_SPARSEMEM_MANUAL is not set
32438 +CONFIG_FLAT_NODE_MEM_MAP=y
32439 +# CONFIG_SPARSEMEM_STATIC is not set
32440 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
32441 +CONFIG_SPLIT_PTLOCK_CPUS=4
32442 +CONFIG_RESOURCES_64BIT=y
32443 +CONFIG_ZONE_DMA_FLAG=1
32445 +CONFIG_VIRT_TO_BUS=y
32446 +CONFIG_PROC_DEVICETREE=y
32447 +CONFIG_CMDLINE_BOOL=y
32450 +CONFIG_WANT_DEVICE_TREE=y
32451 +CONFIG_DEVICE_TREE="rainier.dts"
32452 +CONFIG_ISA_DMA_API=y
32458 +CONFIG_PPC_INDIRECT_PCI=y
32460 +CONFIG_PCI_DOMAINS=y
32461 +CONFIG_PCI_SYSCALL=y
32462 +# CONFIG_PCIEPORTBUS is not set
32463 +CONFIG_ARCH_SUPPORTS_MSI=y
32464 +# CONFIG_PCI_MSI is not set
32465 +CONFIG_PCI_LEGACY=y
32466 +# CONFIG_PCI_DEBUG is not set
32467 +# CONFIG_PCCARD is not set
32468 +# CONFIG_HOTPLUG_PCI is not set
32473 +# CONFIG_ADVANCED_OPTIONS is not set
32476 +# Default settings for advanced configuration options are used
32478 +CONFIG_HIGHMEM_START=0xfe000000
32479 +CONFIG_LOWMEM_SIZE=0x30000000
32480 +CONFIG_KERNEL_START=0xc0000000
32481 +CONFIG_TASK_SIZE=0xc0000000
32482 +CONFIG_CONSISTENT_START=0xff100000
32483 +CONFIG_CONSISTENT_SIZE=0x00200000
32484 +CONFIG_BOOT_LOAD=0x01000000
32492 +# Networking options
32495 +# CONFIG_PACKET_MMAP is not set
32497 +# CONFIG_NET_KEY is not set
32499 +# CONFIG_IP_MULTICAST is not set
32500 +# CONFIG_IP_ADVANCED_ROUTER is not set
32501 +CONFIG_IP_FIB_HASH=y
32503 +CONFIG_IP_PNP_DHCP=y
32504 +CONFIG_IP_PNP_BOOTP=y
32505 +# CONFIG_IP_PNP_RARP is not set
32506 +# CONFIG_NET_IPIP is not set
32507 +# CONFIG_NET_IPGRE is not set
32508 +# CONFIG_ARPD is not set
32509 +# CONFIG_SYN_COOKIES is not set
32510 +# CONFIG_INET_AH is not set
32511 +# CONFIG_INET_ESP is not set
32512 +# CONFIG_INET_IPCOMP is not set
32513 +# CONFIG_INET_XFRM_TUNNEL is not set
32514 +# CONFIG_INET_TUNNEL is not set
32515 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
32516 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
32517 +# CONFIG_INET_XFRM_MODE_BEET is not set
32518 +# CONFIG_INET_LRO is not set
32519 +CONFIG_INET_DIAG=y
32520 +CONFIG_INET_TCP_DIAG=y
32521 +# CONFIG_TCP_CONG_ADVANCED is not set
32522 +CONFIG_TCP_CONG_CUBIC=y
32523 +CONFIG_DEFAULT_TCP_CONG="cubic"
32524 +# CONFIG_TCP_MD5SIG is not set
32525 +# CONFIG_IPV6 is not set
32526 +# CONFIG_INET6_XFRM_TUNNEL is not set
32527 +# CONFIG_INET6_TUNNEL is not set
32528 +# CONFIG_NETWORK_SECMARK is not set
32529 +# CONFIG_NETFILTER is not set
32530 +# CONFIG_IP_DCCP is not set
32531 +# CONFIG_IP_SCTP is not set
32532 +# CONFIG_TIPC is not set
32533 +# CONFIG_ATM is not set
32534 +# CONFIG_BRIDGE is not set
32535 +# CONFIG_VLAN_8021Q is not set
32536 +# CONFIG_DECNET is not set
32537 +# CONFIG_LLC2 is not set
32538 +# CONFIG_IPX is not set
32539 +# CONFIG_ATALK is not set
32540 +# CONFIG_X25 is not set
32541 +# CONFIG_LAPB is not set
32542 +# CONFIG_ECONET is not set
32543 +# CONFIG_WAN_ROUTER is not set
32544 +# CONFIG_NET_SCHED is not set
32549 +# CONFIG_NET_PKTGEN is not set
32550 +# CONFIG_HAMRADIO is not set
32551 +# CONFIG_IRDA is not set
32552 +# CONFIG_BT is not set
32553 +# CONFIG_AF_RXRPC is not set
32558 +# CONFIG_CFG80211 is not set
32559 +# CONFIG_WIRELESS_EXT is not set
32560 +# CONFIG_MAC80211 is not set
32561 +# CONFIG_IEEE80211 is not set
32562 +# CONFIG_RFKILL is not set
32563 +# CONFIG_NET_9P is not set
32570 +# Generic Driver Options
32572 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
32573 +CONFIG_STANDALONE=y
32574 +CONFIG_PREVENT_FIRMWARE_BUILD=y
32575 +CONFIG_FW_LOADER=y
32576 +# CONFIG_DEBUG_DRIVER is not set
32577 +# CONFIG_DEBUG_DEVRES is not set
32578 +# CONFIG_SYS_HYPERVISOR is not set
32579 +CONFIG_CONNECTOR=y
32580 +CONFIG_PROC_EVENTS=y
32582 +# CONFIG_MTD_DEBUG is not set
32583 +# CONFIG_MTD_CONCAT is not set
32584 +CONFIG_MTD_PARTITIONS=y
32585 +# CONFIG_MTD_REDBOOT_PARTS is not set
32586 +CONFIG_MTD_CMDLINE_PARTS=y
32589 +# User Modules And Translation Layers
32592 +# CONFIG_MTD_BLKDEVS is not set
32593 +# CONFIG_MTD_BLOCK is not set
32594 +# CONFIG_MTD_BLOCK_RO is not set
32595 +# CONFIG_FTL is not set
32596 +# CONFIG_NFTL is not set
32597 +# CONFIG_INFTL is not set
32598 +# CONFIG_RFD_FTL is not set
32599 +# CONFIG_SSFDC is not set
32600 +# CONFIG_MTD_OOPS is not set
32603 +# RAM/ROM/Flash chip drivers
32606 +CONFIG_MTD_JEDECPROBE=y
32607 +CONFIG_MTD_GEN_PROBE=y
32608 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
32609 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
32610 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
32611 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
32612 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
32613 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
32614 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
32615 +CONFIG_MTD_CFI_I1=y
32616 +CONFIG_MTD_CFI_I2=y
32617 +# CONFIG_MTD_CFI_I4 is not set
32618 +# CONFIG_MTD_CFI_I8 is not set
32619 +CONFIG_MTD_CFI_INTELEXT=y
32620 +CONFIG_MTD_CFI_AMDSTD=y
32621 +# CONFIG_MTD_CFI_STAA is not set
32622 +CONFIG_MTD_CFI_UTIL=y
32623 +# CONFIG_MTD_RAM is not set
32624 +# CONFIG_MTD_ROM is not set
32625 +# CONFIG_MTD_ABSENT is not set
32628 +# Mapping drivers for chip access
32630 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
32631 +# CONFIG_MTD_PHYSMAP is not set
32632 +CONFIG_MTD_PHYSMAP_OF=y
32633 +# CONFIG_MTD_INTEL_VR_NOR is not set
32634 +# CONFIG_MTD_PLATRAM is not set
32637 +# Self-contained MTD device drivers
32639 +# CONFIG_MTD_PMC551 is not set
32640 +# CONFIG_MTD_SLRAM is not set
32641 +# CONFIG_MTD_PHRAM is not set
32642 +# CONFIG_MTD_MTDRAM is not set
32643 +# CONFIG_MTD_BLOCK2MTD is not set
32646 +# Disk-On-Chip Device Drivers
32648 +# CONFIG_MTD_DOC2000 is not set
32649 +# CONFIG_MTD_DOC2001 is not set
32650 +# CONFIG_MTD_DOC2001PLUS is not set
32651 +# CONFIG_MTD_NAND is not set
32652 +# CONFIG_MTD_ONENAND is not set
32655 +# UBI - Unsorted block images
32657 +# CONFIG_MTD_UBI is not set
32658 +CONFIG_OF_DEVICE=y
32659 +# CONFIG_PARPORT is not set
32661 +# CONFIG_BLK_DEV_FD is not set
32662 +# CONFIG_BLK_CPQ_DA is not set
32663 +# CONFIG_BLK_CPQ_CISS_DA is not set
32664 +# CONFIG_BLK_DEV_DAC960 is not set
32665 +# CONFIG_BLK_DEV_UMEM is not set
32666 +# CONFIG_BLK_DEV_COW_COMMON is not set
32667 +# CONFIG_BLK_DEV_LOOP is not set
32668 +# CONFIG_BLK_DEV_NBD is not set
32669 +# CONFIG_BLK_DEV_SX8 is not set
32670 +CONFIG_BLK_DEV_RAM=y
32671 +CONFIG_BLK_DEV_RAM_COUNT=16
32672 +CONFIG_BLK_DEV_RAM_SIZE=35000
32673 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
32674 +# CONFIG_CDROM_PKTCDVD is not set
32675 +# CONFIG_ATA_OVER_ETH is not set
32676 +# CONFIG_XILINX_SYSACE is not set
32677 +CONFIG_MISC_DEVICES=y
32678 +# CONFIG_PHANTOM is not set
32679 +# CONFIG_EEPROM_93CX6 is not set
32680 +# CONFIG_SGI_IOC4 is not set
32681 +# CONFIG_TIFM_CORE is not set
32682 +# CONFIG_IDE is not set
32685 +# SCSI device support
32687 +# CONFIG_RAID_ATTRS is not set
32688 +# CONFIG_SCSI is not set
32689 +# CONFIG_SCSI_DMA is not set
32690 +# CONFIG_SCSI_NETLINK is not set
32691 +# CONFIG_ATA is not set
32692 +# CONFIG_MD is not set
32693 +# CONFIG_FUSION is not set
32696 +# IEEE 1394 (FireWire) support
32698 +# CONFIG_FIREWIRE is not set
32699 +# CONFIG_IEEE1394 is not set
32700 +# CONFIG_I2O is not set
32701 +CONFIG_MACINTOSH_DRIVERS=y
32702 +# CONFIG_MAC_EMUMOUSEBTN is not set
32703 +# CONFIG_WINDFARM is not set
32704 +CONFIG_NETDEVICES=y
32705 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
32706 +# CONFIG_DUMMY is not set
32707 +# CONFIG_BONDING is not set
32708 +# CONFIG_MACVLAN is not set
32709 +# CONFIG_EQUALIZER is not set
32710 +# CONFIG_TUN is not set
32711 +# CONFIG_VETH is not set
32712 +# CONFIG_IP1000 is not set
32713 +# CONFIG_ARCNET is not set
32714 +# CONFIG_NET_ETHERNET is not set
32715 +CONFIG_IBM_NEW_EMAC_ZMII=y
32716 +CONFIG_IBM_NEW_EMAC_RGMII=y
32717 +CONFIG_IBM_NEW_EMAC_EMAC4=y
32718 +CONFIG_NETDEV_1000=y
32719 +# CONFIG_ACENIC is not set
32720 +# CONFIG_DL2K is not set
32721 +# CONFIG_E1000 is not set
32722 +# CONFIG_E1000E is not set
32723 +# CONFIG_NS83820 is not set
32724 +# CONFIG_HAMACHI is not set
32725 +# CONFIG_YELLOWFIN is not set
32726 +# CONFIG_R8169 is not set
32727 +# CONFIG_SIS190 is not set
32728 +# CONFIG_SKGE is not set
32729 +# CONFIG_SKY2 is not set
32730 +# CONFIG_SK98LIN is not set
32731 +# CONFIG_VIA_VELOCITY is not set
32732 +# CONFIG_TIGON3 is not set
32733 +# CONFIG_BNX2 is not set
32734 +# CONFIG_QLA3XXX is not set
32735 +# CONFIG_ATL1 is not set
32736 +CONFIG_NETDEV_10000=y
32737 +# CONFIG_CHELSIO_T1 is not set
32738 +# CONFIG_CHELSIO_T3 is not set
32739 +# CONFIG_IXGBE is not set
32740 +# CONFIG_IXGB is not set
32741 +# CONFIG_S2IO is not set
32742 +# CONFIG_MYRI10GE is not set
32743 +# CONFIG_NETXEN_NIC is not set
32744 +# CONFIG_NIU is not set
32745 +# CONFIG_MLX4_CORE is not set
32746 +# CONFIG_TEHUTI is not set
32747 +# CONFIG_TR is not set
32752 +# CONFIG_WLAN_PRE80211 is not set
32753 +# CONFIG_WLAN_80211 is not set
32754 +# CONFIG_WAN is not set
32755 +# CONFIG_FDDI is not set
32756 +# CONFIG_HIPPI is not set
32757 +# CONFIG_PPP is not set
32758 +# CONFIG_SLIP is not set
32759 +# CONFIG_SHAPER is not set
32760 +# CONFIG_NETCONSOLE is not set
32761 +# CONFIG_NETPOLL is not set
32762 +# CONFIG_NET_POLL_CONTROLLER is not set
32763 +# CONFIG_ISDN is not set
32764 +# CONFIG_PHONE is not set
32767 +# Input device support
32769 +# CONFIG_INPUT is not set
32772 +# Hardware I/O ports
32774 +# CONFIG_SERIO is not set
32775 +# CONFIG_GAMEPORT is not set
32778 +# Character devices
32780 +# CONFIG_VT is not set
32781 +# CONFIG_SERIAL_NONSTANDARD is not set
32786 +CONFIG_SERIAL_8250=y
32787 +CONFIG_SERIAL_8250_CONSOLE=y
32788 +# CONFIG_SERIAL_8250_PCI is not set
32789 +CONFIG_SERIAL_8250_NR_UARTS=4
32790 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
32791 +CONFIG_SERIAL_8250_EXTENDED=y
32792 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
32793 +CONFIG_SERIAL_8250_SHARE_IRQ=y
32794 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
32795 +# CONFIG_SERIAL_8250_RSA is not set
32798 +# Non-8250 serial port support
32800 +# CONFIG_SERIAL_UARTLITE is not set
32801 +CONFIG_SERIAL_CORE=y
32802 +CONFIG_SERIAL_CORE_CONSOLE=y
32803 +# CONFIG_SERIAL_JSM is not set
32804 +CONFIG_SERIAL_OF_PLATFORM=y
32805 +CONFIG_UNIX98_PTYS=y
32806 +CONFIG_LEGACY_PTYS=y
32807 +CONFIG_LEGACY_PTY_COUNT=256
32808 +# CONFIG_IPMI_HANDLER is not set
32809 +# CONFIG_HW_RANDOM is not set
32810 +# CONFIG_NVRAM is not set
32811 +# CONFIG_GEN_RTC is not set
32812 +# CONFIG_R3964 is not set
32813 +# CONFIG_APPLICOM is not set
32814 +# CONFIG_RAW_DRIVER is not set
32815 +# CONFIG_TCG_TPM is not set
32817 +# CONFIG_I2C is not set
32822 +# CONFIG_SPI is not set
32823 +# CONFIG_SPI_MASTER is not set
32824 +# CONFIG_W1 is not set
32825 +# CONFIG_POWER_SUPPLY is not set
32826 +# CONFIG_HWMON is not set
32827 +# CONFIG_WATCHDOG is not set
32830 +# Sonics Silicon Backplane
32832 +CONFIG_SSB_POSSIBLE=y
32833 +# CONFIG_SSB is not set
32836 +# Multifunction device drivers
32838 +# CONFIG_MFD_SM501 is not set
32841 +# Multimedia devices
32843 +# CONFIG_VIDEO_DEV is not set
32844 +# CONFIG_DVB_CORE is not set
32848 +# Graphics support
32850 +# CONFIG_AGP is not set
32851 +# CONFIG_DRM is not set
32852 +# CONFIG_VGASTATE is not set
32853 +CONFIG_VIDEO_OUTPUT_CONTROL=m
32854 +# CONFIG_FB is not set
32855 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
32858 +# Display device support
32860 +# CONFIG_DISPLAY_SUPPORT is not set
32865 +# CONFIG_SOUND is not set
32866 +CONFIG_USB_SUPPORT=y
32867 +CONFIG_USB_ARCH_HAS_HCD=y
32868 +CONFIG_USB_ARCH_HAS_OHCI=y
32869 +CONFIG_USB_ARCH_HAS_EHCI=y
32870 +# CONFIG_USB is not set
32873 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
32877 +# USB Gadget Support
32879 +# CONFIG_USB_GADGET is not set
32880 +# CONFIG_MMC is not set
32881 +# CONFIG_NEW_LEDS is not set
32882 +# CONFIG_INFINIBAND is not set
32883 +# CONFIG_EDAC is not set
32884 +# CONFIG_RTC_CLASS is not set
32889 +# CONFIG_UIO is not set
32895 +# CONFIG_EXT2_FS_XATTR is not set
32896 +# CONFIG_EXT2_FS_XIP is not set
32897 +# CONFIG_EXT3_FS is not set
32898 +# CONFIG_EXT4DEV_FS is not set
32899 +# CONFIG_REISERFS_FS is not set
32900 +# CONFIG_JFS_FS is not set
32901 +# CONFIG_FS_POSIX_ACL is not set
32902 +# CONFIG_XFS_FS is not set
32903 +# CONFIG_GFS2_FS is not set
32904 +# CONFIG_OCFS2_FS is not set
32905 +# CONFIG_MINIX_FS is not set
32906 +# CONFIG_ROMFS_FS is not set
32908 +CONFIG_INOTIFY_USER=y
32909 +# CONFIG_QUOTA is not set
32911 +# CONFIG_AUTOFS_FS is not set
32912 +# CONFIG_AUTOFS4_FS is not set
32913 +# CONFIG_FUSE_FS is not set
32916 +# CD-ROM/DVD Filesystems
32918 +# CONFIG_ISO9660_FS is not set
32919 +# CONFIG_UDF_FS is not set
32922 +# DOS/FAT/NT Filesystems
32924 +# CONFIG_MSDOS_FS is not set
32925 +# CONFIG_VFAT_FS is not set
32926 +# CONFIG_NTFS_FS is not set
32929 +# Pseudo filesystems
32932 +CONFIG_PROC_KCORE=y
32933 +CONFIG_PROC_SYSCTL=y
32936 +# CONFIG_TMPFS_POSIX_ACL is not set
32937 +# CONFIG_HUGETLB_PAGE is not set
32938 +# CONFIG_CONFIGFS_FS is not set
32941 +# Miscellaneous filesystems
32943 +# CONFIG_ADFS_FS is not set
32944 +# CONFIG_AFFS_FS is not set
32945 +# CONFIG_HFS_FS is not set
32946 +# CONFIG_HFSPLUS_FS is not set
32947 +# CONFIG_BEFS_FS is not set
32948 +# CONFIG_BFS_FS is not set
32949 +# CONFIG_EFS_FS is not set
32951 +CONFIG_JFFS2_FS_DEBUG=0
32952 +CONFIG_JFFS2_FS_WRITEBUFFER=y
32953 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
32954 +# CONFIG_JFFS2_SUMMARY is not set
32955 +# CONFIG_JFFS2_FS_XATTR is not set
32956 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
32957 +CONFIG_JFFS2_ZLIB=y
32958 +# CONFIG_JFFS2_LZO is not set
32959 +CONFIG_JFFS2_RTIME=y
32960 +# CONFIG_JFFS2_RUBIN is not set
32962 +# CONFIG_VXFS_FS is not set
32963 +# CONFIG_HPFS_FS is not set
32964 +# CONFIG_QNX4FS_FS is not set
32965 +# CONFIG_SYSV_FS is not set
32966 +# CONFIG_UFS_FS is not set
32967 +CONFIG_NETWORK_FILESYSTEMS=y
32970 +# CONFIG_NFS_V3_ACL is not set
32971 +# CONFIG_NFS_V4 is not set
32972 +# CONFIG_NFS_DIRECTIO is not set
32973 +# CONFIG_NFSD is not set
32977 +CONFIG_NFS_COMMON=y
32979 +# CONFIG_SUNRPC_BIND34 is not set
32980 +# CONFIG_RPCSEC_GSS_KRB5 is not set
32981 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
32982 +# CONFIG_SMB_FS is not set
32983 +# CONFIG_CIFS is not set
32984 +# CONFIG_NCP_FS is not set
32985 +# CONFIG_CODA_FS is not set
32986 +# CONFIG_AFS_FS is not set
32991 +# CONFIG_PARTITION_ADVANCED is not set
32992 +CONFIG_MSDOS_PARTITION=y
32993 +# CONFIG_NLS is not set
32994 +# CONFIG_DLM is not set
32995 +# CONFIG_UCC_SLOW is not set
32998 +# Library routines
33000 +CONFIG_BITREVERSE=y
33001 +# CONFIG_CRC_CCITT is not set
33002 +# CONFIG_CRC16 is not set
33003 +# CONFIG_CRC_ITU_T is not set
33005 +# CONFIG_CRC7 is not set
33006 +# CONFIG_LIBCRC32C is not set
33007 +CONFIG_ZLIB_INFLATE=y
33008 +CONFIG_ZLIB_DEFLATE=y
33010 +CONFIG_HAS_IOMEM=y
33011 +CONFIG_HAS_IOPORT=y
33013 +CONFIG_INSTRUMENTATION=y
33014 +# CONFIG_PROFILING is not set
33015 +# CONFIG_KPROBES is not set
33016 +# CONFIG_MARKERS is not set
33021 +# CONFIG_PRINTK_TIME is not set
33022 +CONFIG_ENABLE_WARN_DEPRECATED=y
33023 +CONFIG_ENABLE_MUST_CHECK=y
33024 +CONFIG_MAGIC_SYSRQ=y
33025 +# CONFIG_UNUSED_SYMBOLS is not set
33026 +# CONFIG_DEBUG_FS is not set
33027 +# CONFIG_HEADERS_CHECK is not set
33028 +CONFIG_DEBUG_KERNEL=y
33029 +# CONFIG_DEBUG_SHIRQ is not set
33030 +CONFIG_DETECT_SOFTLOCKUP=y
33031 +CONFIG_SCHED_DEBUG=y
33032 +# CONFIG_SCHEDSTATS is not set
33033 +# CONFIG_TIMER_STATS is not set
33034 +# CONFIG_SLUB_DEBUG_ON is not set
33035 +# CONFIG_DEBUG_RT_MUTEXES is not set
33036 +# CONFIG_RT_MUTEX_TESTER is not set
33037 +# CONFIG_DEBUG_SPINLOCK is not set
33038 +# CONFIG_DEBUG_MUTEXES is not set
33039 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
33040 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
33041 +# CONFIG_DEBUG_KOBJECT is not set
33042 +# CONFIG_DEBUG_BUGVERBOSE is not set
33043 +# CONFIG_DEBUG_INFO is not set
33044 +# CONFIG_DEBUG_VM is not set
33045 +# CONFIG_DEBUG_LIST is not set
33046 +# CONFIG_DEBUG_SG is not set
33047 +CONFIG_FORCED_INLINING=y
33048 +# CONFIG_BOOT_PRINTK_DELAY is not set
33049 +# CONFIG_RCU_TORTURE_TEST is not set
33050 +# CONFIG_FAULT_INJECTION is not set
33051 +# CONFIG_SAMPLES is not set
33052 +# CONFIG_DEBUG_STACKOVERFLOW is not set
33053 +# CONFIG_DEBUG_STACK_USAGE is not set
33054 +# CONFIG_DEBUG_PAGEALLOC is not set
33056 +# CONFIG_KGDB is not set
33057 +# CONFIG_XMON is not set
33058 +# CONFIG_BDI_SWITCH is not set
33059 +CONFIG_PPC_EARLY_DEBUG=y
33060 +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
33061 +# CONFIG_PPC_EARLY_DEBUG_G5 is not set
33062 +# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
33063 +# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
33064 +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
33065 +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
33066 +# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
33067 +# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
33068 +CONFIG_PPC_EARLY_DEBUG_44x=y
33069 +# CONFIG_PPC_EARLY_DEBUG_40x is not set
33070 +# CONFIG_PPC_EARLY_DEBUG_CPM is not set
33071 +CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
33072 +CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x1
33075 +# Security options
33077 +# CONFIG_KEYS is not set
33078 +# CONFIG_SECURITY is not set
33079 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
33081 +CONFIG_CRYPTO_ALGAPI=y
33082 +CONFIG_CRYPTO_BLKCIPHER=y
33083 +CONFIG_CRYPTO_MANAGER=y
33084 +# CONFIG_CRYPTO_HMAC is not set
33085 +# CONFIG_CRYPTO_XCBC is not set
33086 +# CONFIG_CRYPTO_NULL is not set
33087 +# CONFIG_CRYPTO_MD4 is not set
33088 +CONFIG_CRYPTO_MD5=y
33089 +# CONFIG_CRYPTO_SHA1 is not set
33090 +# CONFIG_CRYPTO_SHA256 is not set
33091 +# CONFIG_CRYPTO_SHA512 is not set
33092 +# CONFIG_CRYPTO_WP512 is not set
33093 +# CONFIG_CRYPTO_TGR192 is not set
33094 +# CONFIG_CRYPTO_GF128MUL is not set
33095 +CONFIG_CRYPTO_ECB=y
33096 +CONFIG_CRYPTO_CBC=y
33097 +CONFIG_CRYPTO_PCBC=y
33098 +# CONFIG_CRYPTO_LRW is not set
33099 +# CONFIG_CRYPTO_XTS is not set
33100 +# CONFIG_CRYPTO_CRYPTD is not set
33101 +CONFIG_CRYPTO_DES=y
33102 +# CONFIG_CRYPTO_FCRYPT is not set
33103 +# CONFIG_CRYPTO_BLOWFISH is not set
33104 +# CONFIG_CRYPTO_TWOFISH is not set
33105 +# CONFIG_CRYPTO_SERPENT is not set
33106 +# CONFIG_CRYPTO_AES is not set
33107 +# CONFIG_CRYPTO_CAST5 is not set
33108 +# CONFIG_CRYPTO_CAST6 is not set
33109 +# CONFIG_CRYPTO_TEA is not set
33110 +# CONFIG_CRYPTO_ARC4 is not set
33111 +# CONFIG_CRYPTO_KHAZAD is not set
33112 +# CONFIG_CRYPTO_ANUBIS is not set
33113 +# CONFIG_CRYPTO_SEED is not set
33114 +# CONFIG_CRYPTO_DEFLATE is not set
33115 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
33116 +# CONFIG_CRYPTO_CRC32C is not set
33117 +# CONFIG_CRYPTO_CAMELLIA is not set
33118 +# CONFIG_CRYPTO_TEST is not set
33119 +# CONFIG_CRYPTO_AUTHENC is not set
33120 +CONFIG_CRYPTO_HW=y
33121 +# CONFIG_PPC_CLOCK is not set
33122 --- a/arch/powerpc/configs/sequoia_defconfig
33123 +++ b/arch/powerpc/configs/sequoia_defconfig
33126 # Automatically generated make config: don't edit
33127 -# Linux kernel version: 2.6.24-rc4
33128 -# Thu Dec 6 16:49:17 2007
33129 +# Linux kernel version: 2.6.24-rc6
33130 +# Mon Dec 24 11:23:22 2007
33132 # CONFIG_PPC64 is not set
33134 @@ -129,6 +129,7 @@
33135 # CONFIG_DEFAULT_CFQ is not set
33136 # CONFIG_DEFAULT_NOOP is not set
33137 CONFIG_DEFAULT_IOSCHED="anticipatory"
33138 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
33142 @@ -141,8 +142,10 @@
33143 # CONFIG_BAMBOO is not set
33144 # CONFIG_EBONY is not set
33146 +# CONFIG_TAISHAN is not set
33147 +# CONFIG_KATMAI is not set
33148 +# CONFIG_RAINIER is not set
33151 # CONFIG_MPIC is not set
33152 # CONFIG_MPIC_WEIRD is not set
33153 # CONFIG_PPC_I8259 is not set
33154 @@ -446,9 +449,7 @@
33155 # CONFIG_FIREWIRE is not set
33156 # CONFIG_IEEE1394 is not set
33157 # CONFIG_I2O is not set
33158 -CONFIG_MACINTOSH_DRIVERS=y
33159 -# CONFIG_MAC_EMUMOUSEBTN is not set
33160 -# CONFIG_WINDFARM is not set
33161 +# CONFIG_MACINTOSH_DRIVERS is not set
33162 CONFIG_NETDEVICES=y
33163 # CONFIG_NETDEVICES_MULTIQUEUE is not set
33164 # CONFIG_DUMMY is not set
33165 @@ -459,10 +460,28 @@
33166 # CONFIG_VETH is not set
33167 # CONFIG_IP1000 is not set
33168 # CONFIG_ARCNET is not set
33169 -# CONFIG_NET_ETHERNET is not set
33170 +# CONFIG_PHYLIB is not set
33171 +CONFIG_NET_ETHERNET=y
33172 +# CONFIG_MII is not set
33173 +# CONFIG_HAPPYMEAL is not set
33174 +# CONFIG_SUNGEM is not set
33175 +# CONFIG_CASSINI is not set
33176 +# CONFIG_NET_VENDOR_3COM is not set
33177 +# CONFIG_NET_TULIP is not set
33178 +# CONFIG_HP100 is not set
33179 +CONFIG_IBM_NEW_EMAC=y
33180 +CONFIG_IBM_NEW_EMAC_RXB=128
33181 +CONFIG_IBM_NEW_EMAC_TXB=64
33182 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
33183 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
33184 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
33185 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
33186 CONFIG_IBM_NEW_EMAC_ZMII=y
33187 CONFIG_IBM_NEW_EMAC_RGMII=y
33188 +# CONFIG_IBM_NEW_EMAC_TAH is not set
33189 CONFIG_IBM_NEW_EMAC_EMAC4=y
33190 +# CONFIG_NET_PCI is not set
33191 +# CONFIG_B44 is not set
33192 CONFIG_NETDEV_1000=y
33193 # CONFIG_ACENIC is not set
33194 # CONFIG_DL2K is not set
33195 @@ -811,6 +830,7 @@
33196 # CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
33197 # CONFIG_PPC_EARLY_DEBUG_BEAT is not set
33198 CONFIG_PPC_EARLY_DEBUG_44x=y
33199 +# CONFIG_PPC_EARLY_DEBUG_40x is not set
33200 # CONFIG_PPC_EARLY_DEBUG_CPM is not set
33201 CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
33202 CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x1
33204 +++ b/arch/powerpc/configs/storcenter_defconfig
33207 +# Automatically generated make config: don't edit
33208 +# Linux kernel version: 2.6.24-rc6
33209 +# Tue Jan 8 09:33:54 2008
33211 +# CONFIG_PPC64 is not set
33214 +# Processor support
33217 +# CONFIG_PPC_85xx is not set
33218 +# CONFIG_PPC_8xx is not set
33219 +# CONFIG_40x is not set
33220 +# CONFIG_44x is not set
33221 +# CONFIG_E200 is not set
33223 +# CONFIG_ALTIVEC is not set
33224 +CONFIG_PPC_STD_MMU=y
33225 +CONFIG_PPC_STD_MMU_32=y
33226 +# CONFIG_PPC_MM_SLICES is not set
33227 +# CONFIG_SMP is not set
33229 +CONFIG_WORD_SIZE=32
33230 +CONFIG_PPC_MERGE=y
33232 +CONFIG_GENERIC_CMOS_UPDATE=y
33233 +CONFIG_GENERIC_TIME=y
33234 +CONFIG_GENERIC_TIME_VSYSCALL=y
33235 +CONFIG_GENERIC_CLOCKEVENTS=y
33236 +CONFIG_GENERIC_HARDIRQS=y
33237 +CONFIG_IRQ_PER_CPU=y
33238 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
33239 +CONFIG_ARCH_HAS_ILOG2_U32=y
33240 +CONFIG_GENERIC_HWEIGHT=y
33241 +CONFIG_GENERIC_CALIBRATE_DELAY=y
33242 +CONFIG_GENERIC_FIND_NEXT_BIT=y
33243 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
33245 +CONFIG_EARLY_PRINTK=y
33246 +CONFIG_GENERIC_NVRAM=y
33247 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
33248 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
33251 +CONFIG_PPC_UDBG_16550=y
33252 +# CONFIG_GENERIC_TBSYNC is not set
33253 +CONFIG_AUDIT_ARCH=y
33254 +CONFIG_GENERIC_BUG=y
33255 +# CONFIG_DEFAULT_UIMAGE is not set
33256 +# CONFIG_PPC_DCR_NATIVE is not set
33257 +# CONFIG_PPC_DCR_MMIO is not set
33258 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33263 +CONFIG_EXPERIMENTAL=y
33264 +CONFIG_BROKEN_ON_SMP=y
33265 +CONFIG_INIT_ENV_ARG_LIMIT=32
33266 +CONFIG_LOCALVERSION=""
33267 +CONFIG_LOCALVERSION_AUTO=y
33270 +CONFIG_SYSVIPC_SYSCTL=y
33271 +# CONFIG_POSIX_MQUEUE is not set
33272 +# CONFIG_BSD_PROCESS_ACCT is not set
33273 +# CONFIG_TASKSTATS is not set
33274 +# CONFIG_USER_NS is not set
33275 +# CONFIG_PID_NS is not set
33276 +# CONFIG_AUDIT is not set
33277 +# CONFIG_IKCONFIG is not set
33278 +CONFIG_LOG_BUF_SHIFT=14
33279 +# CONFIG_CGROUPS is not set
33280 +CONFIG_FAIR_GROUP_SCHED=y
33281 +CONFIG_FAIR_USER_SCHED=y
33282 +# CONFIG_FAIR_CGROUP_SCHED is not set
33283 +CONFIG_SYSFS_DEPRECATED=y
33284 +# CONFIG_RELAY is not set
33285 +# CONFIG_BLK_DEV_INITRD is not set
33286 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
33289 +CONFIG_SYSCTL_SYSCALL=y
33290 +# CONFIG_KALLSYMS is not set
33295 +CONFIG_BASE_FULL=y
33297 +CONFIG_ANON_INODES=y
33302 +CONFIG_VM_EVENT_COUNTERS=y
33303 +CONFIG_SLUB_DEBUG=y
33304 +# CONFIG_SLAB is not set
33306 +# CONFIG_SLOB is not set
33307 +CONFIG_RT_MUTEXES=y
33308 +# CONFIG_TINY_SHMEM is not set
33309 +CONFIG_BASE_SMALL=0
33311 +CONFIG_MODULE_UNLOAD=y
33312 +# CONFIG_MODULE_FORCE_UNLOAD is not set
33313 +# CONFIG_MODVERSIONS is not set
33314 +# CONFIG_MODULE_SRCVERSION_ALL is not set
33318 +# CONFIG_BLK_DEV_IO_TRACE is not set
33319 +# CONFIG_LSF is not set
33320 +# CONFIG_BLK_DEV_BSG is not set
33325 +CONFIG_IOSCHED_NOOP=y
33326 +CONFIG_IOSCHED_AS=y
33327 +CONFIG_IOSCHED_DEADLINE=y
33328 +CONFIG_IOSCHED_CFQ=y
33329 +# CONFIG_DEFAULT_AS is not set
33330 +# CONFIG_DEFAULT_DEADLINE is not set
33331 +CONFIG_DEFAULT_CFQ=y
33332 +# CONFIG_DEFAULT_NOOP is not set
33333 +CONFIG_DEFAULT_IOSCHED="cfq"
33336 +# Platform support
33338 +CONFIG_PPC_MULTIPLATFORM=y
33339 +# CONFIG_PPC_82xx is not set
33340 +# CONFIG_PPC_83xx is not set
33341 +# CONFIG_PPC_86xx is not set
33342 +CONFIG_CLASSIC32=y
33343 +# CONFIG_PPC_CHRP is not set
33344 +# CONFIG_PPC_MPC52xx is not set
33345 +# CONFIG_PPC_MPC5200 is not set
33346 +# CONFIG_PPC_EFIKA is not set
33347 +# CONFIG_PPC_LITE5200 is not set
33348 +# CONFIG_PPC_PMAC is not set
33349 +# CONFIG_PPC_CELL is not set
33350 +# CONFIG_PPC_CELL_NATIVE is not set
33351 +# CONFIG_PQ2ADS is not set
33352 +CONFIG_EMBEDDED6xx=y
33353 +# CONFIG_LINKSTATION is not set
33354 +CONFIG_STORCENTER=y
33355 +# CONFIG_MPC7448HPC2 is not set
33356 +# CONFIG_PPC_HOLLY is not set
33357 +# CONFIG_PPC_PRPMC2800 is not set
33358 +CONFIG_MPC10X_BRIDGE=y
33359 +CONFIG_MPC10X_OPENPIC=y
33360 +# CONFIG_MPC10X_STORE_GATHERING is not set
33362 +# CONFIG_MPIC_WEIRD is not set
33363 +# CONFIG_PPC_I8259 is not set
33364 +# CONFIG_PPC_RTAS is not set
33365 +# CONFIG_MMIO_NVRAM is not set
33366 +# CONFIG_PPC_MPC106 is not set
33367 +# CONFIG_PPC_970_NAP is not set
33368 +# CONFIG_PPC_INDIRECT_IO is not set
33369 +# CONFIG_GENERIC_IOMAP is not set
33370 +# CONFIG_CPU_FREQ is not set
33371 +# CONFIG_TAU is not set
33372 +# CONFIG_CPM2 is not set
33373 +# CONFIG_FSL_ULI1575 is not set
33378 +# CONFIG_HIGHMEM is not set
33379 +# CONFIG_TICK_ONESHOT is not set
33380 +# CONFIG_NO_HZ is not set
33381 +# CONFIG_HIGH_RES_TIMERS is not set
33382 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
33384 +# CONFIG_HZ_250 is not set
33385 +# CONFIG_HZ_300 is not set
33386 +# CONFIG_HZ_1000 is not set
33388 +CONFIG_PREEMPT_NONE=y
33389 +# CONFIG_PREEMPT_VOLUNTARY is not set
33390 +# CONFIG_PREEMPT is not set
33391 +CONFIG_BINFMT_ELF=y
33392 +CONFIG_BINFMT_MISC=y
33393 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
33394 +# CONFIG_KEXEC is not set
33395 +CONFIG_ARCH_FLATMEM_ENABLE=y
33396 +CONFIG_ARCH_POPULATES_NODE_MAP=y
33397 +CONFIG_SELECT_MEMORY_MODEL=y
33398 +CONFIG_FLATMEM_MANUAL=y
33399 +# CONFIG_DISCONTIGMEM_MANUAL is not set
33400 +# CONFIG_SPARSEMEM_MANUAL is not set
33402 +CONFIG_FLAT_NODE_MEM_MAP=y
33403 +# CONFIG_SPARSEMEM_STATIC is not set
33404 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
33405 +CONFIG_SPLIT_PTLOCK_CPUS=4
33406 +# CONFIG_RESOURCES_64BIT is not set
33407 +CONFIG_ZONE_DMA_FLAG=1
33409 +CONFIG_VIRT_TO_BUS=y
33410 +CONFIG_PROC_DEVICETREE=y
33411 +CONFIG_CMDLINE_BOOL=y
33412 +CONFIG_CMDLINE="console=ttyS0,115200"
33413 +# CONFIG_PM is not set
33414 +CONFIG_SUSPEND_UP_POSSIBLE=y
33415 +CONFIG_HIBERNATION_UP_POSSIBLE=y
33416 +# CONFIG_SECCOMP is not set
33417 +CONFIG_WANT_DEVICE_TREE=y
33418 +CONFIG_DEVICE_TREE="storcenter.dts"
33419 +CONFIG_ISA_DMA_API=y
33425 +CONFIG_GENERIC_ISA_DMA=y
33426 +CONFIG_PPC_INDIRECT_PCI=y
33429 +CONFIG_PCI_DOMAINS=y
33430 +CONFIG_PCI_SYSCALL=y
33431 +# CONFIG_PCIEPORTBUS is not set
33432 +CONFIG_ARCH_SUPPORTS_MSI=y
33433 +# CONFIG_PCI_MSI is not set
33434 +CONFIG_PCI_LEGACY=y
33435 +# CONFIG_PCCARD is not set
33436 +# CONFIG_HOTPLUG_PCI is not set
33441 +# CONFIG_ADVANCED_OPTIONS is not set
33444 +# Default settings for advanced configuration options are used
33446 +CONFIG_HIGHMEM_START=0xfe000000
33447 +CONFIG_LOWMEM_SIZE=0x30000000
33448 +CONFIG_KERNEL_START=0xc0000000
33449 +CONFIG_TASK_SIZE=0xc0000000
33450 +CONFIG_BOOT_LOAD=0x00800000
33458 +# Networking options
33461 +# CONFIG_PACKET_MMAP is not set
33463 +# CONFIG_NET_KEY is not set
33465 +CONFIG_IP_MULTICAST=y
33466 +# CONFIG_IP_ADVANCED_ROUTER is not set
33467 +CONFIG_IP_FIB_HASH=y
33469 +CONFIG_IP_PNP_DHCP=y
33470 +# CONFIG_IP_PNP_BOOTP is not set
33471 +# CONFIG_IP_PNP_RARP is not set
33472 +# CONFIG_NET_IPIP is not set
33473 +# CONFIG_NET_IPGRE is not set
33474 +# CONFIG_IP_MROUTE is not set
33475 +# CONFIG_ARPD is not set
33476 +# CONFIG_SYN_COOKIES is not set
33477 +# CONFIG_INET_AH is not set
33478 +# CONFIG_INET_ESP is not set
33479 +# CONFIG_INET_IPCOMP is not set
33480 +# CONFIG_INET_XFRM_TUNNEL is not set
33481 +# CONFIG_INET_TUNNEL is not set
33482 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
33483 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
33484 +# CONFIG_INET_XFRM_MODE_BEET is not set
33485 +# CONFIG_INET_LRO is not set
33486 +CONFIG_INET_DIAG=y
33487 +CONFIG_INET_TCP_DIAG=y
33488 +# CONFIG_TCP_CONG_ADVANCED is not set
33489 +CONFIG_TCP_CONG_CUBIC=y
33490 +CONFIG_DEFAULT_TCP_CONG="cubic"
33491 +# CONFIG_TCP_MD5SIG is not set
33492 +# CONFIG_IPV6 is not set
33493 +# CONFIG_INET6_XFRM_TUNNEL is not set
33494 +# CONFIG_INET6_TUNNEL is not set
33495 +# CONFIG_NETWORK_SECMARK is not set
33496 +# CONFIG_NETFILTER is not set
33497 +# CONFIG_IP_DCCP is not set
33498 +# CONFIG_IP_SCTP is not set
33499 +# CONFIG_TIPC is not set
33500 +# CONFIG_ATM is not set
33501 +# CONFIG_BRIDGE is not set
33502 +# CONFIG_VLAN_8021Q is not set
33503 +# CONFIG_DECNET is not set
33504 +# CONFIG_LLC2 is not set
33505 +# CONFIG_IPX is not set
33506 +# CONFIG_ATALK is not set
33507 +# CONFIG_X25 is not set
33508 +# CONFIG_LAPB is not set
33509 +# CONFIG_ECONET is not set
33510 +# CONFIG_WAN_ROUTER is not set
33511 +# CONFIG_NET_SCHED is not set
33516 +# CONFIG_NET_PKTGEN is not set
33517 +# CONFIG_HAMRADIO is not set
33518 +# CONFIG_IRDA is not set
33519 +# CONFIG_BT is not set
33520 +# CONFIG_AF_RXRPC is not set
33525 +# CONFIG_CFG80211 is not set
33526 +# CONFIG_WIRELESS_EXT is not set
33527 +# CONFIG_MAC80211 is not set
33528 +# CONFIG_IEEE80211 is not set
33529 +# CONFIG_RFKILL is not set
33530 +# CONFIG_NET_9P is not set
33537 +# Generic Driver Options
33539 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
33540 +CONFIG_STANDALONE=y
33541 +CONFIG_PREVENT_FIRMWARE_BUILD=y
33542 +# CONFIG_FW_LOADER is not set
33543 +# CONFIG_SYS_HYPERVISOR is not set
33544 +# CONFIG_CONNECTOR is not set
33546 +# CONFIG_MTD_DEBUG is not set
33547 +# CONFIG_MTD_CONCAT is not set
33548 +CONFIG_MTD_PARTITIONS=y
33549 +# CONFIG_MTD_REDBOOT_PARTS is not set
33550 +# CONFIG_MTD_CMDLINE_PARTS is not set
33553 +# User Modules And Translation Layers
33556 +CONFIG_MTD_BLKDEVS=y
33557 +CONFIG_MTD_BLOCK=y
33561 +# CONFIG_INFTL is not set
33562 +# CONFIG_RFD_FTL is not set
33563 +# CONFIG_SSFDC is not set
33564 +# CONFIG_MTD_OOPS is not set
33567 +# RAM/ROM/Flash chip drivers
33570 +# CONFIG_MTD_JEDECPROBE is not set
33571 +CONFIG_MTD_GEN_PROBE=y
33572 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
33573 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
33574 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
33575 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
33576 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
33577 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
33578 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
33579 +CONFIG_MTD_CFI_I1=y
33580 +CONFIG_MTD_CFI_I2=y
33581 +# CONFIG_MTD_CFI_I4 is not set
33582 +# CONFIG_MTD_CFI_I8 is not set
33583 +# CONFIG_MTD_CFI_INTELEXT is not set
33584 +CONFIG_MTD_CFI_AMDSTD=y
33585 +# CONFIG_MTD_CFI_STAA is not set
33586 +CONFIG_MTD_CFI_UTIL=y
33587 +# CONFIG_MTD_RAM is not set
33588 +# CONFIG_MTD_ROM is not set
33589 +# CONFIG_MTD_ABSENT is not set
33592 +# Mapping drivers for chip access
33594 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
33595 +CONFIG_MTD_PHYSMAP=y
33596 +CONFIG_MTD_PHYSMAP_START=0xFF800000
33597 +CONFIG_MTD_PHYSMAP_LEN=0x00800000
33598 +CONFIG_MTD_PHYSMAP_BANKWIDTH=1
33599 +# CONFIG_MTD_PHYSMAP_OF is not set
33600 +# CONFIG_MTD_INTEL_VR_NOR is not set
33601 +# CONFIG_MTD_PLATRAM is not set
33604 +# Self-contained MTD device drivers
33606 +# CONFIG_MTD_PMC551 is not set
33607 +# CONFIG_MTD_SLRAM is not set
33608 +# CONFIG_MTD_PHRAM is not set
33609 +# CONFIG_MTD_MTDRAM is not set
33610 +# CONFIG_MTD_BLOCK2MTD is not set
33613 +# Disk-On-Chip Device Drivers
33615 +# CONFIG_MTD_DOC2000 is not set
33616 +# CONFIG_MTD_DOC2001 is not set
33617 +# CONFIG_MTD_DOC2001PLUS is not set
33618 +# CONFIG_MTD_NAND is not set
33619 +# CONFIG_MTD_ONENAND is not set
33622 +# UBI - Unsorted block images
33624 +# CONFIG_MTD_UBI is not set
33625 +CONFIG_OF_DEVICE=y
33626 +# CONFIG_PARPORT is not set
33628 +# CONFIG_BLK_DEV_FD is not set
33629 +# CONFIG_BLK_CPQ_DA is not set
33630 +# CONFIG_BLK_CPQ_CISS_DA is not set
33631 +# CONFIG_BLK_DEV_DAC960 is not set
33632 +# CONFIG_BLK_DEV_UMEM is not set
33633 +# CONFIG_BLK_DEV_COW_COMMON is not set
33634 +# CONFIG_BLK_DEV_LOOP is not set
33635 +# CONFIG_BLK_DEV_NBD is not set
33636 +# CONFIG_BLK_DEV_SX8 is not set
33637 +# CONFIG_BLK_DEV_UB is not set
33638 +# CONFIG_BLK_DEV_RAM is not set
33639 +# CONFIG_CDROM_PKTCDVD is not set
33640 +# CONFIG_ATA_OVER_ETH is not set
33641 +CONFIG_MISC_DEVICES=y
33642 +# CONFIG_PHANTOM is not set
33643 +# CONFIG_EEPROM_93CX6 is not set
33644 +# CONFIG_SGI_IOC4 is not set
33645 +# CONFIG_TIFM_CORE is not set
33647 +CONFIG_IDE_MAX_HWIFS=4
33648 +CONFIG_BLK_DEV_IDE=y
33651 +# Please see Documentation/ide.txt for help/info on IDE drives
33653 +# CONFIG_BLK_DEV_IDE_SATA is not set
33654 +CONFIG_BLK_DEV_IDEDISK=y
33655 +CONFIG_IDEDISK_MULTI_MODE=y
33656 +# CONFIG_BLK_DEV_IDECD is not set
33657 +# CONFIG_BLK_DEV_IDETAPE is not set
33658 +# CONFIG_BLK_DEV_IDEFLOPPY is not set
33659 +# CONFIG_BLK_DEV_IDESCSI is not set
33660 +# CONFIG_IDE_TASK_IOCTL is not set
33661 +CONFIG_IDE_PROC_FS=y
33664 +# IDE chipset support/bugfixes
33666 +CONFIG_IDE_GENERIC=y
33667 +# CONFIG_BLK_DEV_PLATFORM is not set
33670 +# PCI IDE chipsets support
33672 +CONFIG_BLK_DEV_IDEPCI=y
33673 +# CONFIG_IDEPCI_SHARE_IRQ is not set
33674 +CONFIG_IDEPCI_PCIBUS_ORDER=y
33675 +# CONFIG_BLK_DEV_GENERIC is not set
33676 +# CONFIG_BLK_DEV_OPTI621 is not set
33677 +CONFIG_BLK_DEV_IDEDMA_PCI=y
33678 +# CONFIG_BLK_DEV_AEC62XX is not set
33679 +# CONFIG_BLK_DEV_ALI15X3 is not set
33680 +# CONFIG_BLK_DEV_AMD74XX is not set
33681 +# CONFIG_BLK_DEV_CMD64X is not set
33682 +# CONFIG_BLK_DEV_TRIFLEX is not set
33683 +# CONFIG_BLK_DEV_CY82C693 is not set
33684 +# CONFIG_BLK_DEV_CS5520 is not set
33685 +# CONFIG_BLK_DEV_CS5530 is not set
33686 +# CONFIG_BLK_DEV_HPT34X is not set
33687 +# CONFIG_BLK_DEV_HPT366 is not set
33688 +# CONFIG_BLK_DEV_JMICRON is not set
33689 +# CONFIG_BLK_DEV_SC1200 is not set
33690 +# CONFIG_BLK_DEV_PIIX is not set
33691 +# CONFIG_BLK_DEV_IT8213 is not set
33692 +# CONFIG_BLK_DEV_IT821X is not set
33693 +# CONFIG_BLK_DEV_NS87415 is not set
33694 +# CONFIG_BLK_DEV_PDC202XX_OLD is not set
33695 +# CONFIG_BLK_DEV_PDC202XX_NEW is not set
33696 +# CONFIG_BLK_DEV_SVWKS is not set
33697 +# CONFIG_BLK_DEV_SIIMAGE is not set
33698 +# CONFIG_BLK_DEV_SL82C105 is not set
33699 +# CONFIG_BLK_DEV_SLC90E66 is not set
33700 +# CONFIG_BLK_DEV_TRM290 is not set
33701 +CONFIG_BLK_DEV_VIA82CXXX=y
33702 +# CONFIG_BLK_DEV_TC86C001 is not set
33703 +# CONFIG_IDE_ARM is not set
33704 +CONFIG_BLK_DEV_IDEDMA=y
33705 +CONFIG_IDE_ARCH_OBSOLETE_INIT=y
33706 +# CONFIG_BLK_DEV_HD is not set
33709 +# SCSI device support
33711 +# CONFIG_RAID_ATTRS is not set
33714 +# CONFIG_SCSI_TGT is not set
33715 +# CONFIG_SCSI_NETLINK is not set
33716 +CONFIG_SCSI_PROC_FS=y
33719 +# SCSI support type (disk, tape, CD-ROM)
33721 +CONFIG_BLK_DEV_SD=y
33722 +# CONFIG_CHR_DEV_ST is not set
33723 +# CONFIG_CHR_DEV_OSST is not set
33724 +CONFIG_BLK_DEV_SR=y
33725 +# CONFIG_BLK_DEV_SR_VENDOR is not set
33726 +# CONFIG_CHR_DEV_SG is not set
33727 +# CONFIG_CHR_DEV_SCH is not set
33730 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
33732 +# CONFIG_SCSI_MULTI_LUN is not set
33733 +# CONFIG_SCSI_CONSTANTS is not set
33734 +# CONFIG_SCSI_LOGGING is not set
33735 +# CONFIG_SCSI_SCAN_ASYNC is not set
33736 +CONFIG_SCSI_WAIT_SCAN=m
33741 +CONFIG_SCSI_SPI_ATTRS=y
33742 +# CONFIG_SCSI_FC_ATTRS is not set
33743 +# CONFIG_SCSI_ISCSI_ATTRS is not set
33744 +# CONFIG_SCSI_SAS_LIBSAS is not set
33745 +# CONFIG_SCSI_SRP_ATTRS is not set
33746 +CONFIG_SCSI_LOWLEVEL=y
33747 +# CONFIG_ISCSI_TCP is not set
33748 +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
33749 +# CONFIG_SCSI_3W_9XXX is not set
33750 +# CONFIG_SCSI_ACARD is not set
33751 +# CONFIG_SCSI_AACRAID is not set
33752 +# CONFIG_SCSI_AIC7XXX is not set
33753 +# CONFIG_SCSI_AIC7XXX_OLD is not set
33754 +# CONFIG_SCSI_AIC79XX is not set
33755 +# CONFIG_SCSI_AIC94XX is not set
33756 +# CONFIG_SCSI_DPT_I2O is not set
33757 +# CONFIG_SCSI_ADVANSYS is not set
33758 +# CONFIG_SCSI_ARCMSR is not set
33759 +# CONFIG_MEGARAID_NEWGEN is not set
33760 +# CONFIG_MEGARAID_LEGACY is not set
33761 +# CONFIG_MEGARAID_SAS is not set
33762 +# CONFIG_SCSI_HPTIOP is not set
33763 +# CONFIG_SCSI_BUSLOGIC is not set
33764 +# CONFIG_SCSI_DMX3191D is not set
33765 +# CONFIG_SCSI_EATA is not set
33766 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
33767 +# CONFIG_SCSI_GDTH is not set
33768 +# CONFIG_SCSI_IPS is not set
33769 +# CONFIG_SCSI_INITIO is not set
33770 +# CONFIG_SCSI_INIA100 is not set
33771 +# CONFIG_SCSI_STEX is not set
33772 +# CONFIG_SCSI_SYM53C8XX_2 is not set
33773 +# CONFIG_SCSI_QLOGIC_1280 is not set
33774 +# CONFIG_SCSI_QLA_FC is not set
33775 +# CONFIG_SCSI_QLA_ISCSI is not set
33776 +# CONFIG_SCSI_LPFC is not set
33777 +# CONFIG_SCSI_DC395x is not set
33778 +# CONFIG_SCSI_DC390T is not set
33779 +# CONFIG_SCSI_NSP32 is not set
33780 +# CONFIG_SCSI_DEBUG is not set
33781 +# CONFIG_SCSI_SRP is not set
33782 +# CONFIG_ATA is not set
33784 +CONFIG_BLK_DEV_MD=y
33785 +CONFIG_MD_LINEAR=y
33788 +# CONFIG_MD_RAID10 is not set
33789 +CONFIG_MD_RAID456=y
33790 +CONFIG_MD_RAID5_RESHAPE=y
33791 +# CONFIG_MD_MULTIPATH is not set
33792 +# CONFIG_MD_FAULTY is not set
33793 +# CONFIG_BLK_DEV_DM is not set
33794 +# CONFIG_FUSION is not set
33797 +# IEEE 1394 (FireWire) support
33799 +# CONFIG_FIREWIRE is not set
33800 +# CONFIG_IEEE1394 is not set
33801 +# CONFIG_I2O is not set
33802 +# CONFIG_MACINTOSH_DRIVERS is not set
33803 +CONFIG_NETDEVICES=y
33804 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
33806 +# CONFIG_BONDING is not set
33807 +# CONFIG_MACVLAN is not set
33808 +# CONFIG_EQUALIZER is not set
33809 +# CONFIG_TUN is not set
33810 +# CONFIG_VETH is not set
33811 +# CONFIG_IP1000 is not set
33812 +# CONFIG_ARCNET is not set
33813 +# CONFIG_NET_ETHERNET is not set
33814 +CONFIG_NETDEV_1000=y
33815 +# CONFIG_ACENIC is not set
33816 +# CONFIG_DL2K is not set
33817 +# CONFIG_E1000 is not set
33818 +# CONFIG_E1000E is not set
33819 +# CONFIG_NS83820 is not set
33820 +# CONFIG_HAMACHI is not set
33821 +# CONFIG_YELLOWFIN is not set
33823 +# CONFIG_R8169_NAPI is not set
33824 +# CONFIG_SIS190 is not set
33825 +# CONFIG_SKGE is not set
33826 +# CONFIG_SKY2 is not set
33827 +# CONFIG_SK98LIN is not set
33828 +# CONFIG_VIA_VELOCITY is not set
33829 +# CONFIG_TIGON3 is not set
33830 +# CONFIG_BNX2 is not set
33831 +# CONFIG_MV643XX_ETH is not set
33832 +# CONFIG_QLA3XXX is not set
33833 +# CONFIG_ATL1 is not set
33834 +# CONFIG_NETDEV_10000 is not set
33835 +# CONFIG_TR is not set
33840 +# CONFIG_WLAN_PRE80211 is not set
33841 +# CONFIG_WLAN_80211 is not set
33844 +# USB Network Adapters
33846 +# CONFIG_USB_CATC is not set
33847 +# CONFIG_USB_KAWETH is not set
33848 +# CONFIG_USB_PEGASUS is not set
33849 +# CONFIG_USB_RTL8150 is not set
33850 +# CONFIG_USB_USBNET is not set
33851 +# CONFIG_WAN is not set
33852 +# CONFIG_FDDI is not set
33853 +# CONFIG_HIPPI is not set
33854 +# CONFIG_PPP is not set
33855 +# CONFIG_SLIP is not set
33856 +# CONFIG_NET_FC is not set
33857 +# CONFIG_SHAPER is not set
33858 +# CONFIG_NETCONSOLE is not set
33859 +# CONFIG_NETPOLL is not set
33860 +# CONFIG_NET_POLL_CONTROLLER is not set
33861 +# CONFIG_ISDN is not set
33862 +# CONFIG_PHONE is not set
33865 +# Input device support
33867 +# CONFIG_INPUT is not set
33870 +# Hardware I/O ports
33872 +# CONFIG_SERIO is not set
33873 +# CONFIG_GAMEPORT is not set
33876 +# Character devices
33878 +# CONFIG_VT is not set
33879 +# CONFIG_SERIAL_NONSTANDARD is not set
33884 +CONFIG_SERIAL_8250=y
33885 +CONFIG_SERIAL_8250_CONSOLE=y
33886 +# CONFIG_SERIAL_8250_PCI is not set
33887 +CONFIG_SERIAL_8250_NR_UARTS=2
33888 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
33889 +# CONFIG_SERIAL_8250_EXTENDED is not set
33892 +# Non-8250 serial port support
33894 +# CONFIG_SERIAL_UARTLITE is not set
33895 +CONFIG_SERIAL_CORE=y
33896 +CONFIG_SERIAL_CORE_CONSOLE=y
33897 +# CONFIG_SERIAL_JSM is not set
33898 +# CONFIG_SERIAL_OF_PLATFORM is not set
33899 +CONFIG_UNIX98_PTYS=y
33900 +CONFIG_LEGACY_PTYS=y
33901 +CONFIG_LEGACY_PTY_COUNT=256
33902 +# CONFIG_IPMI_HANDLER is not set
33903 +CONFIG_HW_RANDOM=m
33906 +# CONFIG_GEN_RTC_X is not set
33907 +# CONFIG_R3964 is not set
33908 +# CONFIG_APPLICOM is not set
33909 +# CONFIG_RAW_DRIVER is not set
33910 +# CONFIG_TCG_TPM is not set
33913 +CONFIG_I2C_BOARDINFO=y
33914 +CONFIG_I2C_CHARDEV=y
33919 +# CONFIG_I2C_ALGOBIT is not set
33920 +# CONFIG_I2C_ALGOPCF is not set
33921 +# CONFIG_I2C_ALGOPCA is not set
33924 +# I2C Hardware Bus support
33926 +# CONFIG_I2C_ALI1535 is not set
33927 +# CONFIG_I2C_ALI1563 is not set
33928 +# CONFIG_I2C_ALI15X3 is not set
33929 +# CONFIG_I2C_AMD756 is not set
33930 +# CONFIG_I2C_AMD8111 is not set
33931 +# CONFIG_I2C_I801 is not set
33932 +# CONFIG_I2C_I810 is not set
33933 +# CONFIG_I2C_PIIX4 is not set
33935 +# CONFIG_I2C_NFORCE2 is not set
33936 +# CONFIG_I2C_OCORES is not set
33937 +# CONFIG_I2C_PARPORT_LIGHT is not set
33938 +# CONFIG_I2C_PROSAVAGE is not set
33939 +# CONFIG_I2C_SAVAGE4 is not set
33940 +# CONFIG_I2C_SIMTEC is not set
33941 +# CONFIG_I2C_SIS5595 is not set
33942 +# CONFIG_I2C_SIS630 is not set
33943 +# CONFIG_I2C_SIS96X is not set
33944 +# CONFIG_I2C_TAOS_EVM is not set
33945 +# CONFIG_I2C_STUB is not set
33946 +# CONFIG_I2C_TINY_USB is not set
33947 +# CONFIG_I2C_VIA is not set
33948 +# CONFIG_I2C_VIAPRO is not set
33949 +# CONFIG_I2C_VOODOO3 is not set
33952 +# Miscellaneous I2C Chip support
33954 +# CONFIG_SENSORS_DS1337 is not set
33955 +# CONFIG_SENSORS_DS1374 is not set
33956 +# CONFIG_DS1682 is not set
33957 +# CONFIG_SENSORS_EEPROM is not set
33958 +# CONFIG_SENSORS_PCF8574 is not set
33959 +# CONFIG_SENSORS_PCA9539 is not set
33960 +# CONFIG_SENSORS_PCF8591 is not set
33961 +# CONFIG_SENSORS_M41T00 is not set
33962 +# CONFIG_SENSORS_MAX6875 is not set
33963 +# CONFIG_SENSORS_TSL2550 is not set
33964 +# CONFIG_I2C_DEBUG_CORE is not set
33965 +# CONFIG_I2C_DEBUG_ALGO is not set
33966 +# CONFIG_I2C_DEBUG_BUS is not set
33967 +# CONFIG_I2C_DEBUG_CHIP is not set
33972 +# CONFIG_SPI is not set
33973 +# CONFIG_SPI_MASTER is not set
33974 +# CONFIG_W1 is not set
33975 +# CONFIG_POWER_SUPPLY is not set
33976 +# CONFIG_HWMON is not set
33977 +# CONFIG_WATCHDOG is not set
33980 +# Sonics Silicon Backplane
33982 +CONFIG_SSB_POSSIBLE=y
33983 +# CONFIG_SSB is not set
33986 +# Multifunction device drivers
33988 +# CONFIG_MFD_SM501 is not set
33991 +# Multimedia devices
33993 +# CONFIG_VIDEO_DEV is not set
33994 +# CONFIG_DVB_CORE is not set
33995 +# CONFIG_DAB is not set
33998 +# Graphics support
34000 +# CONFIG_AGP is not set
34001 +# CONFIG_DRM is not set
34002 +# CONFIG_VGASTATE is not set
34003 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
34004 +# CONFIG_FB is not set
34005 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
34008 +# Display device support
34010 +# CONFIG_DISPLAY_SUPPORT is not set
34015 +# CONFIG_SOUND is not set
34016 +CONFIG_USB_SUPPORT=y
34017 +CONFIG_USB_ARCH_HAS_HCD=y
34018 +CONFIG_USB_ARCH_HAS_OHCI=y
34019 +CONFIG_USB_ARCH_HAS_EHCI=y
34021 +# CONFIG_USB_DEBUG is not set
34024 +# Miscellaneous USB options
34026 +CONFIG_USB_DEVICEFS=y
34027 +CONFIG_USB_DEVICE_CLASS=y
34028 +# CONFIG_USB_DYNAMIC_MINORS is not set
34029 +# CONFIG_USB_OTG is not set
34032 +# USB Host Controller Drivers
34034 +CONFIG_USB_EHCI_HCD=y
34035 +# CONFIG_USB_EHCI_SPLIT_ISO is not set
34036 +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
34037 +# CONFIG_USB_EHCI_TT_NEWSCHED is not set
34038 +# CONFIG_USB_ISP116X_HCD is not set
34039 +CONFIG_USB_OHCI_HCD=y
34040 +# CONFIG_USB_OHCI_HCD_PPC_OF is not set
34041 +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
34042 +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
34043 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
34044 +# CONFIG_USB_UHCI_HCD is not set
34045 +# CONFIG_USB_SL811_HCD is not set
34046 +# CONFIG_USB_R8A66597_HCD is not set
34049 +# USB Device Class drivers
34051 +# CONFIG_USB_ACM is not set
34052 +# CONFIG_USB_PRINTER is not set
34055 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
34059 +# may also be needed; see USB_STORAGE Help for more information
34061 +CONFIG_USB_STORAGE=y
34062 +# CONFIG_USB_STORAGE_DEBUG is not set
34063 +# CONFIG_USB_STORAGE_DATAFAB is not set
34064 +# CONFIG_USB_STORAGE_FREECOM is not set
34065 +# CONFIG_USB_STORAGE_ISD200 is not set
34066 +# CONFIG_USB_STORAGE_DPCM is not set
34067 +# CONFIG_USB_STORAGE_USBAT is not set
34068 +# CONFIG_USB_STORAGE_SDDR09 is not set
34069 +# CONFIG_USB_STORAGE_SDDR55 is not set
34070 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
34071 +# CONFIG_USB_STORAGE_ALAUDA is not set
34072 +# CONFIG_USB_STORAGE_KARMA is not set
34073 +# CONFIG_USB_LIBUSUAL is not set
34076 +# USB Imaging devices
34078 +# CONFIG_USB_MDC800 is not set
34079 +# CONFIG_USB_MICROTEK is not set
34080 +# CONFIG_USB_MON is not set
34083 +# USB port drivers
34087 +# USB Serial Converter support
34089 +# CONFIG_USB_SERIAL is not set
34092 +# USB Miscellaneous drivers
34094 +# CONFIG_USB_EMI62 is not set
34095 +# CONFIG_USB_EMI26 is not set
34096 +# CONFIG_USB_ADUTUX is not set
34097 +# CONFIG_USB_AUERSWALD is not set
34098 +# CONFIG_USB_RIO500 is not set
34099 +# CONFIG_USB_LEGOTOWER is not set
34100 +# CONFIG_USB_LCD is not set
34101 +# CONFIG_USB_BERRY_CHARGE is not set
34102 +# CONFIG_USB_LED is not set
34103 +# CONFIG_USB_CYPRESS_CY7C63 is not set
34104 +# CONFIG_USB_CYTHERM is not set
34105 +# CONFIG_USB_PHIDGET is not set
34106 +# CONFIG_USB_IDMOUSE is not set
34107 +# CONFIG_USB_FTDI_ELAN is not set
34108 +# CONFIG_USB_APPLEDISPLAY is not set
34109 +# CONFIG_USB_SISUSBVGA is not set
34110 +# CONFIG_USB_LD is not set
34111 +# CONFIG_USB_TRANCEVIBRATOR is not set
34112 +# CONFIG_USB_IOWARRIOR is not set
34113 +# CONFIG_USB_TEST is not set
34116 +# USB DSL modem support
34120 +# USB Gadget Support
34122 +# CONFIG_USB_GADGET is not set
34123 +# CONFIG_MMC is not set
34124 +# CONFIG_NEW_LEDS is not set
34125 +# CONFIG_INFINIBAND is not set
34126 +# CONFIG_EDAC is not set
34128 +CONFIG_RTC_CLASS=y
34129 +CONFIG_RTC_HCTOSYS=y
34130 +CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
34131 +# CONFIG_RTC_DEBUG is not set
34136 +CONFIG_RTC_INTF_SYSFS=y
34137 +CONFIG_RTC_INTF_PROC=y
34138 +CONFIG_RTC_INTF_DEV=y
34139 +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
34140 +# CONFIG_RTC_DRV_TEST is not set
34145 +CONFIG_RTC_DRV_DS1307=y
34146 +# CONFIG_RTC_DRV_DS1374 is not set
34147 +# CONFIG_RTC_DRV_DS1672 is not set
34148 +# CONFIG_RTC_DRV_MAX6900 is not set
34149 +# CONFIG_RTC_DRV_RS5C372 is not set
34150 +# CONFIG_RTC_DRV_ISL1208 is not set
34151 +# CONFIG_RTC_DRV_X1205 is not set
34152 +# CONFIG_RTC_DRV_PCF8563 is not set
34153 +# CONFIG_RTC_DRV_PCF8583 is not set
34154 +# CONFIG_RTC_DRV_M41T80 is not set
34161 +# Platform RTC drivers
34163 +# CONFIG_RTC_DRV_CMOS is not set
34164 +# CONFIG_RTC_DRV_DS1553 is not set
34165 +# CONFIG_RTC_DRV_STK17TA8 is not set
34166 +# CONFIG_RTC_DRV_DS1742 is not set
34167 +# CONFIG_RTC_DRV_M48T86 is not set
34168 +# CONFIG_RTC_DRV_M48T59 is not set
34169 +# CONFIG_RTC_DRV_V3020 is not set
34172 +# on-CPU RTC drivers
34178 +# CONFIG_UIO is not set
34184 +# CONFIG_EXT2_FS_XATTR is not set
34185 +# CONFIG_EXT2_FS_XIP is not set
34187 +CONFIG_EXT3_FS_XATTR=y
34188 +# CONFIG_EXT3_FS_POSIX_ACL is not set
34189 +# CONFIG_EXT3_FS_SECURITY is not set
34190 +# CONFIG_EXT4DEV_FS is not set
34192 +CONFIG_FS_MBCACHE=y
34193 +# CONFIG_REISERFS_FS is not set
34194 +# CONFIG_JFS_FS is not set
34195 +# CONFIG_FS_POSIX_ACL is not set
34197 +# CONFIG_XFS_QUOTA is not set
34198 +# CONFIG_XFS_SECURITY is not set
34199 +# CONFIG_XFS_POSIX_ACL is not set
34200 +# CONFIG_XFS_RT is not set
34201 +# CONFIG_GFS2_FS is not set
34202 +# CONFIG_OCFS2_FS is not set
34203 +# CONFIG_MINIX_FS is not set
34204 +# CONFIG_ROMFS_FS is not set
34206 +CONFIG_INOTIFY_USER=y
34207 +# CONFIG_QUOTA is not set
34209 +# CONFIG_AUTOFS_FS is not set
34210 +# CONFIG_AUTOFS4_FS is not set
34211 +# CONFIG_FUSE_FS is not set
34214 +# CD-ROM/DVD Filesystems
34216 +# CONFIG_ISO9660_FS is not set
34217 +# CONFIG_UDF_FS is not set
34220 +# DOS/FAT/NT Filesystems
34222 +# CONFIG_MSDOS_FS is not set
34223 +# CONFIG_VFAT_FS is not set
34224 +# CONFIG_NTFS_FS is not set
34227 +# Pseudo filesystems
34230 +CONFIG_PROC_KCORE=y
34231 +CONFIG_PROC_SYSCTL=y
34234 +# CONFIG_TMPFS_POSIX_ACL is not set
34235 +# CONFIG_HUGETLB_PAGE is not set
34236 +# CONFIG_CONFIGFS_FS is not set
34239 +# Miscellaneous filesystems
34241 +# CONFIG_ADFS_FS is not set
34242 +# CONFIG_AFFS_FS is not set
34243 +# CONFIG_HFS_FS is not set
34244 +# CONFIG_HFSPLUS_FS is not set
34245 +# CONFIG_BEFS_FS is not set
34246 +# CONFIG_BFS_FS is not set
34247 +# CONFIG_EFS_FS is not set
34249 +CONFIG_JFFS2_FS_DEBUG=0
34250 +CONFIG_JFFS2_FS_WRITEBUFFER=y
34251 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
34252 +# CONFIG_JFFS2_SUMMARY is not set
34253 +# CONFIG_JFFS2_FS_XATTR is not set
34254 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
34255 +CONFIG_JFFS2_ZLIB=y
34256 +# CONFIG_JFFS2_LZO is not set
34257 +CONFIG_JFFS2_RTIME=y
34258 +# CONFIG_JFFS2_RUBIN is not set
34259 +# CONFIG_CRAMFS is not set
34260 +# CONFIG_VXFS_FS is not set
34261 +# CONFIG_HPFS_FS is not set
34262 +# CONFIG_QNX4FS_FS is not set
34263 +# CONFIG_SYSV_FS is not set
34264 +# CONFIG_UFS_FS is not set
34265 +# CONFIG_NETWORK_FILESYSTEMS is not set
34270 +CONFIG_PARTITION_ADVANCED=y
34271 +# CONFIG_ACORN_PARTITION is not set
34272 +# CONFIG_OSF_PARTITION is not set
34273 +# CONFIG_AMIGA_PARTITION is not set
34274 +# CONFIG_ATARI_PARTITION is not set
34275 +# CONFIG_MAC_PARTITION is not set
34276 +CONFIG_MSDOS_PARTITION=y
34277 +# CONFIG_BSD_DISKLABEL is not set
34278 +# CONFIG_MINIX_SUBPARTITION is not set
34279 +# CONFIG_SOLARIS_X86_PARTITION is not set
34280 +# CONFIG_UNIXWARE_DISKLABEL is not set
34281 +# CONFIG_LDM_PARTITION is not set
34282 +# CONFIG_SGI_PARTITION is not set
34283 +# CONFIG_ULTRIX_PARTITION is not set
34284 +# CONFIG_SUN_PARTITION is not set
34285 +# CONFIG_KARMA_PARTITION is not set
34286 +# CONFIG_EFI_PARTITION is not set
34287 +# CONFIG_SYSV68_PARTITION is not set
34289 +CONFIG_NLS_DEFAULT="utf8"
34290 +CONFIG_NLS_CODEPAGE_437=y
34291 +# CONFIG_NLS_CODEPAGE_737 is not set
34292 +# CONFIG_NLS_CODEPAGE_775 is not set
34293 +# CONFIG_NLS_CODEPAGE_850 is not set
34294 +# CONFIG_NLS_CODEPAGE_852 is not set
34295 +# CONFIG_NLS_CODEPAGE_855 is not set
34296 +# CONFIG_NLS_CODEPAGE_857 is not set
34297 +# CONFIG_NLS_CODEPAGE_860 is not set
34298 +# CONFIG_NLS_CODEPAGE_861 is not set
34299 +# CONFIG_NLS_CODEPAGE_862 is not set
34300 +# CONFIG_NLS_CODEPAGE_863 is not set
34301 +# CONFIG_NLS_CODEPAGE_864 is not set
34302 +# CONFIG_NLS_CODEPAGE_865 is not set
34303 +# CONFIG_NLS_CODEPAGE_866 is not set
34304 +# CONFIG_NLS_CODEPAGE_869 is not set
34305 +# CONFIG_NLS_CODEPAGE_936 is not set
34306 +# CONFIG_NLS_CODEPAGE_950 is not set
34307 +# CONFIG_NLS_CODEPAGE_932 is not set
34308 +# CONFIG_NLS_CODEPAGE_949 is not set
34309 +# CONFIG_NLS_CODEPAGE_874 is not set
34310 +# CONFIG_NLS_ISO8859_8 is not set
34311 +# CONFIG_NLS_CODEPAGE_1250 is not set
34312 +# CONFIG_NLS_CODEPAGE_1251 is not set
34313 +# CONFIG_NLS_ASCII is not set
34314 +CONFIG_NLS_ISO8859_1=y
34315 +# CONFIG_NLS_ISO8859_2 is not set
34316 +# CONFIG_NLS_ISO8859_3 is not set
34317 +# CONFIG_NLS_ISO8859_4 is not set
34318 +# CONFIG_NLS_ISO8859_5 is not set
34319 +# CONFIG_NLS_ISO8859_6 is not set
34320 +# CONFIG_NLS_ISO8859_7 is not set
34321 +# CONFIG_NLS_ISO8859_9 is not set
34322 +# CONFIG_NLS_ISO8859_13 is not set
34323 +# CONFIG_NLS_ISO8859_14 is not set
34324 +# CONFIG_NLS_ISO8859_15 is not set
34325 +# CONFIG_NLS_KOI8_R is not set
34326 +# CONFIG_NLS_KOI8_U is not set
34328 +# CONFIG_DLM is not set
34329 +# CONFIG_UCC_SLOW is not set
34332 +# Library routines
34334 +CONFIG_BITREVERSE=y
34335 +# CONFIG_CRC_CCITT is not set
34336 +# CONFIG_CRC16 is not set
34337 +# CONFIG_CRC_ITU_T is not set
34339 +# CONFIG_CRC7 is not set
34340 +# CONFIG_LIBCRC32C is not set
34341 +CONFIG_ZLIB_INFLATE=y
34342 +CONFIG_ZLIB_DEFLATE=y
34344 +CONFIG_HAS_IOMEM=y
34345 +CONFIG_HAS_IOPORT=y
34347 +CONFIG_INSTRUMENTATION=y
34348 +# CONFIG_PROFILING is not set
34349 +# CONFIG_MARKERS is not set
34354 +# CONFIG_PRINTK_TIME is not set
34355 +# CONFIG_ENABLE_WARN_DEPRECATED is not set
34356 +# CONFIG_ENABLE_MUST_CHECK is not set
34357 +# CONFIG_MAGIC_SYSRQ is not set
34358 +# CONFIG_UNUSED_SYMBOLS is not set
34359 +# CONFIG_DEBUG_FS is not set
34360 +# CONFIG_HEADERS_CHECK is not set
34361 +# CONFIG_DEBUG_KERNEL is not set
34362 +# CONFIG_SLUB_DEBUG_ON is not set
34363 +# CONFIG_DEBUG_BUGVERBOSE is not set
34364 +# CONFIG_SAMPLES is not set
34365 +# CONFIG_BOOTX_TEXT is not set
34366 +# CONFIG_PPC_EARLY_DEBUG is not set
34369 +# Security options
34371 +# CONFIG_KEYS is not set
34372 +# CONFIG_SECURITY is not set
34373 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
34374 +CONFIG_XOR_BLOCKS=y
34375 +CONFIG_ASYNC_CORE=y
34376 +CONFIG_ASYNC_MEMCPY=y
34377 +CONFIG_ASYNC_XOR=y
34378 +# CONFIG_CRYPTO is not set
34379 +# CONFIG_PPC_CLOCK is not set
34381 +++ b/arch/powerpc/configs/taishan_defconfig
34384 +# Automatically generated make config: don't edit
34385 +# Linux kernel version: 2.6.24-rc6
34386 +# Mon Dec 24 11:23:39 2007
34388 +# CONFIG_PPC64 is not set
34391 +# Processor support
34393 +# CONFIG_6xx is not set
34394 +# CONFIG_PPC_85xx is not set
34395 +# CONFIG_PPC_8xx is not set
34396 +# CONFIG_40x is not set
34398 +# CONFIG_E200 is not set
34401 +CONFIG_PTE_64BIT=y
34402 +CONFIG_PHYS_64BIT=y
34403 +# CONFIG_PPC_MM_SLICES is not set
34404 +CONFIG_NOT_COHERENT_CACHE=y
34406 +CONFIG_WORD_SIZE=32
34407 +CONFIG_PPC_MERGE=y
34409 +CONFIG_GENERIC_CMOS_UPDATE=y
34410 +CONFIG_GENERIC_TIME=y
34411 +CONFIG_GENERIC_TIME_VSYSCALL=y
34412 +CONFIG_GENERIC_CLOCKEVENTS=y
34413 +CONFIG_GENERIC_HARDIRQS=y
34414 +CONFIG_IRQ_PER_CPU=y
34415 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34416 +CONFIG_ARCH_HAS_ILOG2_U32=y
34417 +CONFIG_GENERIC_HWEIGHT=y
34418 +CONFIG_GENERIC_CALIBRATE_DELAY=y
34419 +CONFIG_GENERIC_FIND_NEXT_BIT=y
34420 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
34422 +CONFIG_EARLY_PRINTK=y
34423 +CONFIG_GENERIC_NVRAM=y
34424 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
34425 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
34428 +CONFIG_PPC_UDBG_16550=y
34429 +# CONFIG_GENERIC_TBSYNC is not set
34430 +CONFIG_AUDIT_ARCH=y
34431 +CONFIG_GENERIC_BUG=y
34432 +# CONFIG_DEFAULT_UIMAGE is not set
34433 +CONFIG_PPC_DCR_NATIVE=y
34434 +# CONFIG_PPC_DCR_MMIO is not set
34436 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34441 +CONFIG_EXPERIMENTAL=y
34442 +CONFIG_BROKEN_ON_SMP=y
34443 +CONFIG_INIT_ENV_ARG_LIMIT=32
34444 +CONFIG_LOCALVERSION=""
34445 +CONFIG_LOCALVERSION_AUTO=y
34448 +CONFIG_SYSVIPC_SYSCTL=y
34449 +CONFIG_POSIX_MQUEUE=y
34450 +# CONFIG_BSD_PROCESS_ACCT is not set
34451 +# CONFIG_TASKSTATS is not set
34452 +# CONFIG_USER_NS is not set
34453 +# CONFIG_PID_NS is not set
34454 +# CONFIG_AUDIT is not set
34455 +# CONFIG_IKCONFIG is not set
34456 +CONFIG_LOG_BUF_SHIFT=14
34457 +# CONFIG_CGROUPS is not set
34458 +CONFIG_FAIR_GROUP_SCHED=y
34459 +CONFIG_FAIR_USER_SCHED=y
34460 +# CONFIG_FAIR_CGROUP_SCHED is not set
34461 +CONFIG_SYSFS_DEPRECATED=y
34462 +# CONFIG_RELAY is not set
34463 +CONFIG_BLK_DEV_INITRD=y
34464 +CONFIG_INITRAMFS_SOURCE=""
34465 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
34468 +CONFIG_SYSCTL_SYSCALL=y
34470 +# CONFIG_KALLSYMS_ALL is not set
34471 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
34476 +CONFIG_BASE_FULL=y
34478 +CONFIG_ANON_INODES=y
34483 +CONFIG_VM_EVENT_COUNTERS=y
34484 +CONFIG_SLUB_DEBUG=y
34485 +# CONFIG_SLAB is not set
34487 +# CONFIG_SLOB is not set
34488 +CONFIG_RT_MUTEXES=y
34489 +# CONFIG_TINY_SHMEM is not set
34490 +CONFIG_BASE_SMALL=0
34492 +CONFIG_MODULE_UNLOAD=y
34493 +# CONFIG_MODULE_FORCE_UNLOAD is not set
34494 +# CONFIG_MODVERSIONS is not set
34495 +# CONFIG_MODULE_SRCVERSION_ALL is not set
34499 +# CONFIG_BLK_DEV_IO_TRACE is not set
34500 +# CONFIG_LSF is not set
34501 +# CONFIG_BLK_DEV_BSG is not set
34506 +CONFIG_IOSCHED_NOOP=y
34507 +CONFIG_IOSCHED_AS=y
34508 +CONFIG_IOSCHED_DEADLINE=y
34509 +CONFIG_IOSCHED_CFQ=y
34510 +CONFIG_DEFAULT_AS=y
34511 +# CONFIG_DEFAULT_DEADLINE is not set
34512 +# CONFIG_DEFAULT_CFQ is not set
34513 +# CONFIG_DEFAULT_NOOP is not set
34514 +CONFIG_DEFAULT_IOSCHED="anticipatory"
34515 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
34518 +# Platform support
34520 +# CONFIG_PPC_MPC52xx is not set
34521 +# CONFIG_PPC_MPC5200 is not set
34522 +# CONFIG_PPC_CELL is not set
34523 +# CONFIG_PPC_CELL_NATIVE is not set
34524 +# CONFIG_PQ2ADS is not set
34525 +# CONFIG_BAMBOO is not set
34526 +# CONFIG_EBONY is not set
34527 +# CONFIG_SEQUOIA is not set
34529 +# CONFIG_KATMAI is not set
34530 +# CONFIG_RAINIER is not set
34532 +# CONFIG_MPIC is not set
34533 +# CONFIG_MPIC_WEIRD is not set
34534 +# CONFIG_PPC_I8259 is not set
34535 +# CONFIG_PPC_RTAS is not set
34536 +# CONFIG_MMIO_NVRAM is not set
34537 +# CONFIG_PPC_MPC106 is not set
34538 +# CONFIG_PPC_970_NAP is not set
34539 +# CONFIG_PPC_INDIRECT_IO is not set
34540 +# CONFIG_GENERIC_IOMAP is not set
34541 +# CONFIG_CPU_FREQ is not set
34542 +# CONFIG_CPM2 is not set
34543 +# CONFIG_FSL_ULI1575 is not set
34548 +# CONFIG_HIGHMEM is not set
34549 +# CONFIG_TICK_ONESHOT is not set
34550 +# CONFIG_NO_HZ is not set
34551 +# CONFIG_HIGH_RES_TIMERS is not set
34552 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
34553 +# CONFIG_HZ_100 is not set
34555 +# CONFIG_HZ_300 is not set
34556 +# CONFIG_HZ_1000 is not set
34558 +CONFIG_PREEMPT_NONE=y
34559 +# CONFIG_PREEMPT_VOLUNTARY is not set
34560 +# CONFIG_PREEMPT is not set
34561 +CONFIG_BINFMT_ELF=y
34562 +# CONFIG_BINFMT_MISC is not set
34563 +# CONFIG_MATH_EMULATION is not set
34564 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
34565 +CONFIG_ARCH_FLATMEM_ENABLE=y
34566 +CONFIG_ARCH_POPULATES_NODE_MAP=y
34567 +CONFIG_SELECT_MEMORY_MODEL=y
34568 +CONFIG_FLATMEM_MANUAL=y
34569 +# CONFIG_DISCONTIGMEM_MANUAL is not set
34570 +# CONFIG_SPARSEMEM_MANUAL is not set
34572 +CONFIG_FLAT_NODE_MEM_MAP=y
34573 +# CONFIG_SPARSEMEM_STATIC is not set
34574 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
34575 +CONFIG_SPLIT_PTLOCK_CPUS=4
34576 +CONFIG_RESOURCES_64BIT=y
34577 +CONFIG_ZONE_DMA_FLAG=1
34579 +CONFIG_VIRT_TO_BUS=y
34580 +CONFIG_PROC_DEVICETREE=y
34581 +CONFIG_CMDLINE_BOOL=y
34584 +CONFIG_WANT_DEVICE_TREE=y
34585 +CONFIG_DEVICE_TREE="taishan.dts"
34586 +CONFIG_ISA_DMA_API=y
34592 +CONFIG_PPC_INDIRECT_PCI=y
34594 +CONFIG_PCI_DOMAINS=y
34595 +CONFIG_PCI_SYSCALL=y
34596 +# CONFIG_PCIEPORTBUS is not set
34597 +CONFIG_ARCH_SUPPORTS_MSI=y
34598 +# CONFIG_PCI_MSI is not set
34599 +CONFIG_PCI_LEGACY=y
34600 +# CONFIG_PCI_DEBUG is not set
34601 +# CONFIG_PCCARD is not set
34602 +# CONFIG_HOTPLUG_PCI is not set
34607 +# CONFIG_ADVANCED_OPTIONS is not set
34610 +# Default settings for advanced configuration options are used
34612 +CONFIG_HIGHMEM_START=0xfe000000
34613 +CONFIG_LOWMEM_SIZE=0x30000000
34614 +CONFIG_KERNEL_START=0xc0000000
34615 +CONFIG_TASK_SIZE=0xc0000000
34616 +CONFIG_CONSISTENT_START=0xff100000
34617 +CONFIG_CONSISTENT_SIZE=0x00200000
34618 +CONFIG_BOOT_LOAD=0x01000000
34626 +# Networking options
34629 +# CONFIG_PACKET_MMAP is not set
34631 +# CONFIG_NET_KEY is not set
34633 +# CONFIG_IP_MULTICAST is not set
34634 +# CONFIG_IP_ADVANCED_ROUTER is not set
34635 +CONFIG_IP_FIB_HASH=y
34637 +CONFIG_IP_PNP_DHCP=y
34638 +CONFIG_IP_PNP_BOOTP=y
34639 +# CONFIG_IP_PNP_RARP is not set
34640 +# CONFIG_NET_IPIP is not set
34641 +# CONFIG_NET_IPGRE is not set
34642 +# CONFIG_ARPD is not set
34643 +# CONFIG_SYN_COOKIES is not set
34644 +# CONFIG_INET_AH is not set
34645 +# CONFIG_INET_ESP is not set
34646 +# CONFIG_INET_IPCOMP is not set
34647 +# CONFIG_INET_XFRM_TUNNEL is not set
34648 +# CONFIG_INET_TUNNEL is not set
34649 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
34650 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
34651 +# CONFIG_INET_XFRM_MODE_BEET is not set
34652 +# CONFIG_INET_LRO is not set
34653 +CONFIG_INET_DIAG=y
34654 +CONFIG_INET_TCP_DIAG=y
34655 +# CONFIG_TCP_CONG_ADVANCED is not set
34656 +CONFIG_TCP_CONG_CUBIC=y
34657 +CONFIG_DEFAULT_TCP_CONG="cubic"
34658 +# CONFIG_TCP_MD5SIG is not set
34659 +# CONFIG_IPV6 is not set
34660 +# CONFIG_INET6_XFRM_TUNNEL is not set
34661 +# CONFIG_INET6_TUNNEL is not set
34662 +# CONFIG_NETWORK_SECMARK is not set
34663 +# CONFIG_NETFILTER is not set
34664 +# CONFIG_IP_DCCP is not set
34665 +# CONFIG_IP_SCTP is not set
34666 +# CONFIG_TIPC is not set
34667 +# CONFIG_ATM is not set
34668 +# CONFIG_BRIDGE is not set
34669 +# CONFIG_VLAN_8021Q is not set
34670 +# CONFIG_DECNET is not set
34671 +# CONFIG_LLC2 is not set
34672 +# CONFIG_IPX is not set
34673 +# CONFIG_ATALK is not set
34674 +# CONFIG_X25 is not set
34675 +# CONFIG_LAPB is not set
34676 +# CONFIG_ECONET is not set
34677 +# CONFIG_WAN_ROUTER is not set
34678 +# CONFIG_NET_SCHED is not set
34683 +# CONFIG_NET_PKTGEN is not set
34684 +# CONFIG_HAMRADIO is not set
34685 +# CONFIG_IRDA is not set
34686 +# CONFIG_BT is not set
34687 +# CONFIG_AF_RXRPC is not set
34692 +# CONFIG_CFG80211 is not set
34693 +# CONFIG_WIRELESS_EXT is not set
34694 +# CONFIG_MAC80211 is not set
34695 +# CONFIG_IEEE80211 is not set
34696 +# CONFIG_RFKILL is not set
34697 +# CONFIG_NET_9P is not set
34704 +# Generic Driver Options
34706 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
34707 +CONFIG_STANDALONE=y
34708 +CONFIG_PREVENT_FIRMWARE_BUILD=y
34709 +CONFIG_FW_LOADER=y
34710 +# CONFIG_DEBUG_DRIVER is not set
34711 +# CONFIG_DEBUG_DEVRES is not set
34712 +# CONFIG_SYS_HYPERVISOR is not set
34713 +CONFIG_CONNECTOR=y
34714 +CONFIG_PROC_EVENTS=y
34715 +# CONFIG_MTD is not set
34716 +CONFIG_OF_DEVICE=y
34717 +# CONFIG_PARPORT is not set
34719 +# CONFIG_BLK_DEV_FD is not set
34720 +# CONFIG_BLK_CPQ_DA is not set
34721 +# CONFIG_BLK_CPQ_CISS_DA is not set
34722 +# CONFIG_BLK_DEV_DAC960 is not set
34723 +# CONFIG_BLK_DEV_UMEM is not set
34724 +# CONFIG_BLK_DEV_COW_COMMON is not set
34725 +# CONFIG_BLK_DEV_LOOP is not set
34726 +# CONFIG_BLK_DEV_NBD is not set
34727 +# CONFIG_BLK_DEV_SX8 is not set
34728 +CONFIG_BLK_DEV_RAM=y
34729 +CONFIG_BLK_DEV_RAM_COUNT=16
34730 +CONFIG_BLK_DEV_RAM_SIZE=35000
34731 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
34732 +# CONFIG_CDROM_PKTCDVD is not set
34733 +# CONFIG_ATA_OVER_ETH is not set
34734 +# CONFIG_XILINX_SYSACE is not set
34735 +CONFIG_MISC_DEVICES=y
34736 +# CONFIG_PHANTOM is not set
34737 +# CONFIG_EEPROM_93CX6 is not set
34738 +# CONFIG_SGI_IOC4 is not set
34739 +# CONFIG_TIFM_CORE is not set
34740 +# CONFIG_IDE is not set
34743 +# SCSI device support
34745 +# CONFIG_RAID_ATTRS is not set
34746 +# CONFIG_SCSI is not set
34747 +# CONFIG_SCSI_DMA is not set
34748 +# CONFIG_SCSI_NETLINK is not set
34749 +# CONFIG_ATA is not set
34750 +# CONFIG_MD is not set
34751 +# CONFIG_FUSION is not set
34754 +# IEEE 1394 (FireWire) support
34756 +# CONFIG_FIREWIRE is not set
34757 +# CONFIG_IEEE1394 is not set
34758 +# CONFIG_I2O is not set
34759 +CONFIG_MACINTOSH_DRIVERS=y
34760 +# CONFIG_MAC_EMUMOUSEBTN is not set
34761 +# CONFIG_WINDFARM is not set
34762 +CONFIG_NETDEVICES=y
34763 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
34764 +# CONFIG_DUMMY is not set
34765 +# CONFIG_BONDING is not set
34766 +# CONFIG_MACVLAN is not set
34767 +# CONFIG_EQUALIZER is not set
34768 +# CONFIG_TUN is not set
34769 +# CONFIG_VETH is not set
34770 +# CONFIG_IP1000 is not set
34771 +# CONFIG_ARCNET is not set
34772 +# CONFIG_PHYLIB is not set
34773 +CONFIG_NET_ETHERNET=y
34774 +# CONFIG_MII is not set
34775 +# CONFIG_HAPPYMEAL is not set
34776 +# CONFIG_SUNGEM is not set
34777 +# CONFIG_CASSINI is not set
34778 +# CONFIG_NET_VENDOR_3COM is not set
34779 +# CONFIG_NET_TULIP is not set
34780 +# CONFIG_HP100 is not set
34781 +CONFIG_IBM_NEW_EMAC=y
34782 +CONFIG_IBM_NEW_EMAC_RXB=128
34783 +CONFIG_IBM_NEW_EMAC_TXB=64
34784 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
34785 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
34786 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
34787 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
34788 +CONFIG_IBM_NEW_EMAC_ZMII=y
34789 +CONFIG_IBM_NEW_EMAC_RGMII=y
34790 +CONFIG_IBM_NEW_EMAC_TAH=y
34791 +CONFIG_IBM_NEW_EMAC_EMAC4=y
34792 +# CONFIG_NET_PCI is not set
34793 +# CONFIG_B44 is not set
34794 +CONFIG_NETDEV_1000=y
34795 +# CONFIG_ACENIC is not set
34796 +# CONFIG_DL2K is not set
34797 +# CONFIG_E1000 is not set
34798 +# CONFIG_E1000E is not set
34799 +# CONFIG_NS83820 is not set
34800 +# CONFIG_HAMACHI is not set
34801 +# CONFIG_YELLOWFIN is not set
34802 +# CONFIG_R8169 is not set
34803 +# CONFIG_SIS190 is not set
34804 +# CONFIG_SKGE is not set
34805 +# CONFIG_SKY2 is not set
34806 +# CONFIG_SK98LIN is not set
34807 +# CONFIG_VIA_VELOCITY is not set
34808 +# CONFIG_TIGON3 is not set
34809 +# CONFIG_BNX2 is not set
34810 +# CONFIG_QLA3XXX is not set
34811 +# CONFIG_ATL1 is not set
34812 +CONFIG_NETDEV_10000=y
34813 +# CONFIG_CHELSIO_T1 is not set
34814 +# CONFIG_CHELSIO_T3 is not set
34815 +# CONFIG_IXGBE is not set
34816 +# CONFIG_IXGB is not set
34817 +# CONFIG_S2IO is not set
34818 +# CONFIG_MYRI10GE is not set
34819 +# CONFIG_NETXEN_NIC is not set
34820 +# CONFIG_NIU is not set
34821 +# CONFIG_MLX4_CORE is not set
34822 +# CONFIG_TEHUTI is not set
34823 +# CONFIG_TR is not set
34828 +# CONFIG_WLAN_PRE80211 is not set
34829 +# CONFIG_WLAN_80211 is not set
34830 +# CONFIG_WAN is not set
34831 +# CONFIG_FDDI is not set
34832 +# CONFIG_HIPPI is not set
34833 +# CONFIG_PPP is not set
34834 +# CONFIG_SLIP is not set
34835 +# CONFIG_SHAPER is not set
34836 +# CONFIG_NETCONSOLE is not set
34837 +# CONFIG_NETPOLL is not set
34838 +# CONFIG_NET_POLL_CONTROLLER is not set
34839 +# CONFIG_ISDN is not set
34840 +# CONFIG_PHONE is not set
34843 +# Input device support
34845 +# CONFIG_INPUT is not set
34848 +# Hardware I/O ports
34850 +# CONFIG_SERIO is not set
34851 +# CONFIG_GAMEPORT is not set
34854 +# Character devices
34856 +# CONFIG_VT is not set
34857 +# CONFIG_SERIAL_NONSTANDARD is not set
34862 +CONFIG_SERIAL_8250=y
34863 +CONFIG_SERIAL_8250_CONSOLE=y
34864 +# CONFIG_SERIAL_8250_PCI is not set
34865 +CONFIG_SERIAL_8250_NR_UARTS=4
34866 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
34867 +CONFIG_SERIAL_8250_EXTENDED=y
34868 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
34869 +CONFIG_SERIAL_8250_SHARE_IRQ=y
34870 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
34871 +# CONFIG_SERIAL_8250_RSA is not set
34874 +# Non-8250 serial port support
34876 +# CONFIG_SERIAL_UARTLITE is not set
34877 +CONFIG_SERIAL_CORE=y
34878 +CONFIG_SERIAL_CORE_CONSOLE=y
34879 +# CONFIG_SERIAL_JSM is not set
34880 +CONFIG_SERIAL_OF_PLATFORM=y
34881 +CONFIG_UNIX98_PTYS=y
34882 +CONFIG_LEGACY_PTYS=y
34883 +CONFIG_LEGACY_PTY_COUNT=256
34884 +# CONFIG_IPMI_HANDLER is not set
34885 +# CONFIG_HW_RANDOM is not set
34886 +# CONFIG_NVRAM is not set
34887 +# CONFIG_GEN_RTC is not set
34888 +# CONFIG_R3964 is not set
34889 +# CONFIG_APPLICOM is not set
34890 +# CONFIG_RAW_DRIVER is not set
34891 +# CONFIG_TCG_TPM is not set
34893 +# CONFIG_I2C is not set
34898 +# CONFIG_SPI is not set
34899 +# CONFIG_SPI_MASTER is not set
34900 +# CONFIG_W1 is not set
34901 +# CONFIG_POWER_SUPPLY is not set
34902 +# CONFIG_HWMON is not set
34903 +# CONFIG_WATCHDOG is not set
34906 +# Sonics Silicon Backplane
34908 +CONFIG_SSB_POSSIBLE=y
34909 +# CONFIG_SSB is not set
34912 +# Multifunction device drivers
34914 +# CONFIG_MFD_SM501 is not set
34917 +# Multimedia devices
34919 +# CONFIG_VIDEO_DEV is not set
34920 +# CONFIG_DVB_CORE is not set
34924 +# Graphics support
34926 +# CONFIG_AGP is not set
34927 +# CONFIG_DRM is not set
34928 +# CONFIG_VGASTATE is not set
34929 +CONFIG_VIDEO_OUTPUT_CONTROL=m
34930 +# CONFIG_FB is not set
34931 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
34934 +# Display device support
34936 +# CONFIG_DISPLAY_SUPPORT is not set
34941 +# CONFIG_SOUND is not set
34942 +CONFIG_USB_SUPPORT=y
34943 +CONFIG_USB_ARCH_HAS_HCD=y
34944 +CONFIG_USB_ARCH_HAS_OHCI=y
34945 +CONFIG_USB_ARCH_HAS_EHCI=y
34946 +# CONFIG_USB is not set
34949 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
34953 +# USB Gadget Support
34955 +# CONFIG_USB_GADGET is not set
34956 +# CONFIG_MMC is not set
34957 +# CONFIG_NEW_LEDS is not set
34958 +# CONFIG_INFINIBAND is not set
34959 +# CONFIG_EDAC is not set
34960 +# CONFIG_RTC_CLASS is not set
34965 +# CONFIG_UIO is not set
34971 +# CONFIG_EXT2_FS_XATTR is not set
34972 +# CONFIG_EXT2_FS_XIP is not set
34973 +# CONFIG_EXT3_FS is not set
34974 +# CONFIG_EXT4DEV_FS is not set
34975 +# CONFIG_REISERFS_FS is not set
34976 +# CONFIG_JFS_FS is not set
34977 +# CONFIG_FS_POSIX_ACL is not set
34978 +# CONFIG_XFS_FS is not set
34979 +# CONFIG_GFS2_FS is not set
34980 +# CONFIG_OCFS2_FS is not set
34981 +# CONFIG_MINIX_FS is not set
34982 +# CONFIG_ROMFS_FS is not set
34984 +CONFIG_INOTIFY_USER=y
34985 +# CONFIG_QUOTA is not set
34987 +# CONFIG_AUTOFS_FS is not set
34988 +# CONFIG_AUTOFS4_FS is not set
34989 +# CONFIG_FUSE_FS is not set
34992 +# CD-ROM/DVD Filesystems
34994 +# CONFIG_ISO9660_FS is not set
34995 +# CONFIG_UDF_FS is not set
34998 +# DOS/FAT/NT Filesystems
35000 +# CONFIG_MSDOS_FS is not set
35001 +# CONFIG_VFAT_FS is not set
35002 +# CONFIG_NTFS_FS is not set
35005 +# Pseudo filesystems
35008 +CONFIG_PROC_KCORE=y
35009 +CONFIG_PROC_SYSCTL=y
35012 +# CONFIG_TMPFS_POSIX_ACL is not set
35013 +# CONFIG_HUGETLB_PAGE is not set
35014 +# CONFIG_CONFIGFS_FS is not set
35017 +# Miscellaneous filesystems
35019 +# CONFIG_ADFS_FS is not set
35020 +# CONFIG_AFFS_FS is not set
35021 +# CONFIG_HFS_FS is not set
35022 +# CONFIG_HFSPLUS_FS is not set
35023 +# CONFIG_BEFS_FS is not set
35024 +# CONFIG_BFS_FS is not set
35025 +# CONFIG_EFS_FS is not set
35027 +# CONFIG_VXFS_FS is not set
35028 +# CONFIG_HPFS_FS is not set
35029 +# CONFIG_QNX4FS_FS is not set
35030 +# CONFIG_SYSV_FS is not set
35031 +# CONFIG_UFS_FS is not set
35032 +CONFIG_NETWORK_FILESYSTEMS=y
35035 +# CONFIG_NFS_V3_ACL is not set
35036 +# CONFIG_NFS_V4 is not set
35037 +# CONFIG_NFS_DIRECTIO is not set
35038 +# CONFIG_NFSD is not set
35042 +CONFIG_NFS_COMMON=y
35044 +# CONFIG_SUNRPC_BIND34 is not set
35045 +# CONFIG_RPCSEC_GSS_KRB5 is not set
35046 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
35047 +# CONFIG_SMB_FS is not set
35048 +# CONFIG_CIFS is not set
35049 +# CONFIG_NCP_FS is not set
35050 +# CONFIG_CODA_FS is not set
35051 +# CONFIG_AFS_FS is not set
35056 +# CONFIG_PARTITION_ADVANCED is not set
35057 +CONFIG_MSDOS_PARTITION=y
35058 +# CONFIG_NLS is not set
35059 +# CONFIG_DLM is not set
35060 +# CONFIG_UCC_SLOW is not set
35063 +# Library routines
35065 +CONFIG_BITREVERSE=y
35066 +# CONFIG_CRC_CCITT is not set
35067 +# CONFIG_CRC16 is not set
35068 +# CONFIG_CRC_ITU_T is not set
35070 +# CONFIG_CRC7 is not set
35071 +# CONFIG_LIBCRC32C is not set
35072 +CONFIG_ZLIB_INFLATE=y
35074 +CONFIG_HAS_IOMEM=y
35075 +CONFIG_HAS_IOPORT=y
35077 +CONFIG_INSTRUMENTATION=y
35078 +# CONFIG_PROFILING is not set
35079 +# CONFIG_KPROBES is not set
35080 +# CONFIG_MARKERS is not set
35085 +# CONFIG_PRINTK_TIME is not set
35086 +CONFIG_ENABLE_WARN_DEPRECATED=y
35087 +CONFIG_ENABLE_MUST_CHECK=y
35088 +CONFIG_MAGIC_SYSRQ=y
35089 +# CONFIG_UNUSED_SYMBOLS is not set
35090 +# CONFIG_DEBUG_FS is not set
35091 +# CONFIG_HEADERS_CHECK is not set
35092 +CONFIG_DEBUG_KERNEL=y
35093 +# CONFIG_DEBUG_SHIRQ is not set
35094 +CONFIG_DETECT_SOFTLOCKUP=y
35095 +CONFIG_SCHED_DEBUG=y
35096 +# CONFIG_SCHEDSTATS is not set
35097 +# CONFIG_TIMER_STATS is not set
35098 +# CONFIG_SLUB_DEBUG_ON is not set
35099 +# CONFIG_DEBUG_RT_MUTEXES is not set
35100 +# CONFIG_RT_MUTEX_TESTER is not set
35101 +# CONFIG_DEBUG_SPINLOCK is not set
35102 +# CONFIG_DEBUG_MUTEXES is not set
35103 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
35104 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
35105 +# CONFIG_DEBUG_KOBJECT is not set
35106 +# CONFIG_DEBUG_BUGVERBOSE is not set
35107 +# CONFIG_DEBUG_INFO is not set
35108 +# CONFIG_DEBUG_VM is not set
35109 +# CONFIG_DEBUG_LIST is not set
35110 +# CONFIG_DEBUG_SG is not set
35111 +CONFIG_FORCED_INLINING=y
35112 +# CONFIG_BOOT_PRINTK_DELAY is not set
35113 +# CONFIG_RCU_TORTURE_TEST is not set
35114 +# CONFIG_FAULT_INJECTION is not set
35115 +# CONFIG_SAMPLES is not set
35116 +# CONFIG_DEBUG_STACKOVERFLOW is not set
35117 +# CONFIG_DEBUG_STACK_USAGE is not set
35118 +# CONFIG_DEBUG_PAGEALLOC is not set
35120 +# CONFIG_KGDB is not set
35121 +# CONFIG_XMON is not set
35122 +# CONFIG_BDI_SWITCH is not set
35123 +# CONFIG_PPC_EARLY_DEBUG is not set
35126 +# Security options
35128 +# CONFIG_KEYS is not set
35129 +# CONFIG_SECURITY is not set
35130 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
35132 +CONFIG_CRYPTO_ALGAPI=y
35133 +CONFIG_CRYPTO_BLKCIPHER=y
35134 +CONFIG_CRYPTO_MANAGER=y
35135 +# CONFIG_CRYPTO_HMAC is not set
35136 +# CONFIG_CRYPTO_XCBC is not set
35137 +# CONFIG_CRYPTO_NULL is not set
35138 +# CONFIG_CRYPTO_MD4 is not set
35139 +CONFIG_CRYPTO_MD5=y
35140 +# CONFIG_CRYPTO_SHA1 is not set
35141 +# CONFIG_CRYPTO_SHA256 is not set
35142 +# CONFIG_CRYPTO_SHA512 is not set
35143 +# CONFIG_CRYPTO_WP512 is not set
35144 +# CONFIG_CRYPTO_TGR192 is not set
35145 +# CONFIG_CRYPTO_GF128MUL is not set
35146 +CONFIG_CRYPTO_ECB=y
35147 +CONFIG_CRYPTO_CBC=y
35148 +CONFIG_CRYPTO_PCBC=y
35149 +# CONFIG_CRYPTO_LRW is not set
35150 +# CONFIG_CRYPTO_XTS is not set
35151 +# CONFIG_CRYPTO_CRYPTD is not set
35152 +CONFIG_CRYPTO_DES=y
35153 +# CONFIG_CRYPTO_FCRYPT is not set
35154 +# CONFIG_CRYPTO_BLOWFISH is not set
35155 +# CONFIG_CRYPTO_TWOFISH is not set
35156 +# CONFIG_CRYPTO_SERPENT is not set
35157 +# CONFIG_CRYPTO_AES is not set
35158 +# CONFIG_CRYPTO_CAST5 is not set
35159 +# CONFIG_CRYPTO_CAST6 is not set
35160 +# CONFIG_CRYPTO_TEA is not set
35161 +# CONFIG_CRYPTO_ARC4 is not set
35162 +# CONFIG_CRYPTO_KHAZAD is not set
35163 +# CONFIG_CRYPTO_ANUBIS is not set
35164 +# CONFIG_CRYPTO_SEED is not set
35165 +# CONFIG_CRYPTO_DEFLATE is not set
35166 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
35167 +# CONFIG_CRYPTO_CRC32C is not set
35168 +# CONFIG_CRYPTO_CAMELLIA is not set
35169 +# CONFIG_CRYPTO_TEST is not set
35170 +# CONFIG_CRYPTO_AUTHENC is not set
35171 +CONFIG_CRYPTO_HW=y
35172 +# CONFIG_PPC_CLOCK is not set
35173 --- a/arch/powerpc/configs/walnut_defconfig
35174 +++ b/arch/powerpc/configs/walnut_defconfig
35177 # Automatically generated make config: don't edit
35178 -# Linux kernel version: 2.6.24-rc4
35179 -# Thu Dec 6 16:49:33 2007
35180 +# Linux kernel version: 2.6.24-rc6
35181 +# Mon Dec 24 11:23:58 2007
35183 # CONFIG_PPC64 is not set
35186 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
35189 -# CONFIG_PPC_UDBG_16550 is not set
35190 +CONFIG_PPC_UDBG_16550=y
35191 # CONFIG_GENERIC_TBSYNC is not set
35192 CONFIG_AUDIT_ARCH=y
35193 CONFIG_GENERIC_BUG=y
35194 @@ -127,6 +127,7 @@
35195 # CONFIG_DEFAULT_CFQ is not set
35196 # CONFIG_DEFAULT_NOOP is not set
35197 CONFIG_DEFAULT_IOSCHED="anticipatory"
35198 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
35202 @@ -136,7 +137,9 @@
35203 # CONFIG_PPC_CELL is not set
35204 # CONFIG_PPC_CELL_NATIVE is not set
35205 # CONFIG_PQ2ADS is not set
35206 +# CONFIG_EP405 is not set
35207 # CONFIG_KILAUEA is not set
35208 +# CONFIG_MAKALU is not set
35210 # CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
35212 @@ -204,11 +207,17 @@
35216 -# CONFIG_PCI is not set
35217 -# CONFIG_PCI_DOMAINS is not set
35218 -# CONFIG_PCI_SYSCALL is not set
35219 -# CONFIG_ARCH_SUPPORTS_MSI is not set
35220 +CONFIG_PPC_INDIRECT_PCI=y
35222 +CONFIG_PCI_DOMAINS=y
35223 +CONFIG_PCI_SYSCALL=y
35224 +# CONFIG_PCIEPORTBUS is not set
35225 +CONFIG_ARCH_SUPPORTS_MSI=y
35226 +# CONFIG_PCI_MSI is not set
35227 +# CONFIG_PCI_LEGACY is not set
35228 +# CONFIG_PCI_DEBUG is not set
35229 # CONFIG_PCCARD is not set
35230 +# CONFIG_HOTPLUG_PCI is not set
35234 @@ -373,11 +382,13 @@
35235 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
35236 # CONFIG_MTD_PHYSMAP is not set
35237 CONFIG_MTD_PHYSMAP_OF=y
35238 +# CONFIG_MTD_INTEL_VR_NOR is not set
35239 # CONFIG_MTD_PLATRAM is not set
35242 # Self-contained MTD device drivers
35244 +# CONFIG_MTD_PMC551 is not set
35245 # CONFIG_MTD_SLRAM is not set
35246 # CONFIG_MTD_PHRAM is not set
35247 # CONFIG_MTD_MTDRAM is not set
35248 @@ -400,9 +411,14 @@
35249 # CONFIG_PARPORT is not set
35251 # CONFIG_BLK_DEV_FD is not set
35252 +# CONFIG_BLK_CPQ_DA is not set
35253 +# CONFIG_BLK_CPQ_CISS_DA is not set
35254 +# CONFIG_BLK_DEV_DAC960 is not set
35255 +# CONFIG_BLK_DEV_UMEM is not set
35256 # CONFIG_BLK_DEV_COW_COMMON is not set
35257 # CONFIG_BLK_DEV_LOOP is not set
35258 # CONFIG_BLK_DEV_NBD is not set
35259 +# CONFIG_BLK_DEV_SX8 is not set
35260 CONFIG_BLK_DEV_RAM=y
35261 CONFIG_BLK_DEV_RAM_COUNT=16
35262 CONFIG_BLK_DEV_RAM_SIZE=35000
35263 @@ -411,7 +427,10 @@
35264 # CONFIG_ATA_OVER_ETH is not set
35265 # CONFIG_XILINX_SYSACE is not set
35266 CONFIG_MISC_DEVICES=y
35267 +# CONFIG_PHANTOM is not set
35268 # CONFIG_EEPROM_93CX6 is not set
35269 +# CONFIG_SGI_IOC4 is not set
35270 +# CONFIG_TIFM_CORE is not set
35271 # CONFIG_IDE is not set
35274 @@ -423,6 +442,14 @@
35275 # CONFIG_SCSI_NETLINK is not set
35276 # CONFIG_ATA is not set
35277 # CONFIG_MD is not set
35278 +# CONFIG_FUSION is not set
35281 +# IEEE 1394 (FireWire) support
35283 +# CONFIG_FIREWIRE is not set
35284 +# CONFIG_IEEE1394 is not set
35285 +# CONFIG_I2O is not set
35286 # CONFIG_MACINTOSH_DRIVERS is not set
35287 CONFIG_NETDEVICES=y
35288 # CONFIG_NETDEVICES_MULTIQUEUE is not set
35289 @@ -432,9 +459,17 @@
35290 # CONFIG_EQUALIZER is not set
35291 # CONFIG_TUN is not set
35292 # CONFIG_VETH is not set
35293 +# CONFIG_IP1000 is not set
35294 +# CONFIG_ARCNET is not set
35295 # CONFIG_PHYLIB is not set
35296 CONFIG_NET_ETHERNET=y
35297 # CONFIG_MII is not set
35298 +# CONFIG_HAPPYMEAL is not set
35299 +# CONFIG_SUNGEM is not set
35300 +# CONFIG_CASSINI is not set
35301 +# CONFIG_NET_VENDOR_3COM is not set
35302 +# CONFIG_NET_TULIP is not set
35303 +# CONFIG_HP100 is not set
35304 CONFIG_IBM_NEW_EMAC=y
35305 CONFIG_IBM_NEW_EMAC_RXB=128
35306 CONFIG_IBM_NEW_EMAC_TXB=64
35307 @@ -446,9 +481,38 @@
35308 # CONFIG_IBM_NEW_EMAC_RGMII is not set
35309 # CONFIG_IBM_NEW_EMAC_TAH is not set
35310 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
35311 +# CONFIG_NET_PCI is not set
35312 # CONFIG_B44 is not set
35313 CONFIG_NETDEV_1000=y
35314 +# CONFIG_ACENIC is not set
35315 +# CONFIG_DL2K is not set
35316 +# CONFIG_E1000 is not set
35317 +# CONFIG_E1000E is not set
35318 +# CONFIG_NS83820 is not set
35319 +# CONFIG_HAMACHI is not set
35320 +# CONFIG_YELLOWFIN is not set
35321 +# CONFIG_R8169 is not set
35322 +# CONFIG_SIS190 is not set
35323 +# CONFIG_SKGE is not set
35324 +# CONFIG_SKY2 is not set
35325 +# CONFIG_SK98LIN is not set
35326 +# CONFIG_VIA_VELOCITY is not set
35327 +# CONFIG_TIGON3 is not set
35328 +# CONFIG_BNX2 is not set
35329 +# CONFIG_QLA3XXX is not set
35330 +# CONFIG_ATL1 is not set
35331 CONFIG_NETDEV_10000=y
35332 +# CONFIG_CHELSIO_T1 is not set
35333 +# CONFIG_CHELSIO_T3 is not set
35334 +# CONFIG_IXGBE is not set
35335 +# CONFIG_IXGB is not set
35336 +# CONFIG_S2IO is not set
35337 +# CONFIG_MYRI10GE is not set
35338 +# CONFIG_NETXEN_NIC is not set
35339 +# CONFIG_NIU is not set
35340 +# CONFIG_MLX4_CORE is not set
35341 +# CONFIG_TEHUTI is not set
35342 +# CONFIG_TR is not set
35346 @@ -456,6 +520,8 @@
35347 # CONFIG_WLAN_PRE80211 is not set
35348 # CONFIG_WLAN_80211 is not set
35349 # CONFIG_WAN is not set
35350 +# CONFIG_FDDI is not set
35351 +# CONFIG_HIPPI is not set
35352 # CONFIG_PPP is not set
35353 # CONFIG_SLIP is not set
35354 # CONFIG_SHAPER is not set
35355 @@ -487,6 +553,7 @@
35357 CONFIG_SERIAL_8250=y
35358 CONFIG_SERIAL_8250_CONSOLE=y
35359 +CONFIG_SERIAL_8250_PCI=y
35360 CONFIG_SERIAL_8250_NR_UARTS=4
35361 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
35362 CONFIG_SERIAL_8250_EXTENDED=y
35363 @@ -501,6 +568,7 @@
35364 # CONFIG_SERIAL_UARTLITE is not set
35365 CONFIG_SERIAL_CORE=y
35366 CONFIG_SERIAL_CORE_CONSOLE=y
35367 +# CONFIG_SERIAL_JSM is not set
35368 CONFIG_SERIAL_OF_PLATFORM=y
35369 CONFIG_UNIX98_PTYS=y
35370 CONFIG_LEGACY_PTYS=y
35371 @@ -510,8 +578,10 @@
35372 # CONFIG_NVRAM is not set
35373 # CONFIG_GEN_RTC is not set
35374 # CONFIG_R3964 is not set
35375 +# CONFIG_APPLICOM is not set
35376 # CONFIG_RAW_DRIVER is not set
35377 # CONFIG_TCG_TPM is not set
35379 # CONFIG_I2C is not set
35382 @@ -545,6 +615,8 @@
35386 +# CONFIG_AGP is not set
35387 +# CONFIG_DRM is not set
35388 # CONFIG_VGASTATE is not set
35389 CONFIG_VIDEO_OUTPUT_CONTROL=m
35390 # CONFIG_FB is not set
35391 @@ -560,9 +632,10 @@
35393 # CONFIG_SOUND is not set
35394 CONFIG_USB_SUPPORT=y
35395 -# CONFIG_USB_ARCH_HAS_HCD is not set
35396 -# CONFIG_USB_ARCH_HAS_OHCI is not set
35397 -# CONFIG_USB_ARCH_HAS_EHCI is not set
35398 +CONFIG_USB_ARCH_HAS_HCD=y
35399 +CONFIG_USB_ARCH_HAS_OHCI=y
35400 +CONFIG_USB_ARCH_HAS_EHCI=y
35401 +# CONFIG_USB is not set
35404 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
35405 @@ -574,6 +647,7 @@
35406 # CONFIG_USB_GADGET is not set
35407 # CONFIG_MMC is not set
35408 # CONFIG_NEW_LEDS is not set
35409 +# CONFIG_INFINIBAND is not set
35410 # CONFIG_EDAC is not set
35411 # CONFIG_RTC_CLASS is not set
35414 +++ b/arch/powerpc/configs/warp_defconfig
35417 +# Automatically generated make config: don't edit
35418 +# Linux kernel version: 2.6.24-rc6
35419 +# Tue Jan 8 12:23:23 2008
35421 +# CONFIG_PPC64 is not set
35424 +# Processor support
35426 +# CONFIG_6xx is not set
35427 +# CONFIG_PPC_85xx is not set
35428 +# CONFIG_PPC_8xx is not set
35429 +# CONFIG_40x is not set
35431 +# CONFIG_E200 is not set
35435 +CONFIG_PTE_64BIT=y
35436 +CONFIG_PHYS_64BIT=y
35437 +# CONFIG_PPC_MM_SLICES is not set
35438 +CONFIG_NOT_COHERENT_CACHE=y
35440 +CONFIG_WORD_SIZE=32
35441 +CONFIG_PPC_MERGE=y
35443 +CONFIG_GENERIC_CMOS_UPDATE=y
35444 +CONFIG_GENERIC_TIME=y
35445 +CONFIG_GENERIC_TIME_VSYSCALL=y
35446 +CONFIG_GENERIC_CLOCKEVENTS=y
35447 +CONFIG_GENERIC_HARDIRQS=y
35448 +CONFIG_IRQ_PER_CPU=y
35449 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35450 +CONFIG_ARCH_HAS_ILOG2_U32=y
35451 +CONFIG_GENERIC_HWEIGHT=y
35452 +CONFIG_GENERIC_CALIBRATE_DELAY=y
35453 +CONFIG_GENERIC_FIND_NEXT_BIT=y
35454 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
35456 +CONFIG_EARLY_PRINTK=y
35457 +CONFIG_GENERIC_NVRAM=y
35458 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
35459 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
35462 +CONFIG_PPC_UDBG_16550=y
35463 +# CONFIG_GENERIC_TBSYNC is not set
35464 +CONFIG_AUDIT_ARCH=y
35465 +CONFIG_GENERIC_BUG=y
35466 +# CONFIG_DEFAULT_UIMAGE is not set
35467 +CONFIG_PPC_DCR_NATIVE=y
35468 +# CONFIG_PPC_DCR_MMIO is not set
35470 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35475 +CONFIG_EXPERIMENTAL=y
35476 +CONFIG_BROKEN_ON_SMP=y
35477 +CONFIG_INIT_ENV_ARG_LIMIT=32
35478 +CONFIG_LOCALVERSION="-pika"
35479 +# CONFIG_LOCALVERSION_AUTO is not set
35482 +CONFIG_SYSVIPC_SYSCTL=y
35483 +# CONFIG_POSIX_MQUEUE is not set
35484 +# CONFIG_BSD_PROCESS_ACCT is not set
35485 +# CONFIG_TASKSTATS is not set
35486 +# CONFIG_USER_NS is not set
35487 +# CONFIG_PID_NS is not set
35488 +# CONFIG_AUDIT is not set
35489 +# CONFIG_IKCONFIG is not set
35490 +CONFIG_LOG_BUF_SHIFT=14
35491 +# CONFIG_CGROUPS is not set
35492 +CONFIG_FAIR_GROUP_SCHED=y
35493 +CONFIG_FAIR_USER_SCHED=y
35494 +# CONFIG_FAIR_CGROUP_SCHED is not set
35495 +CONFIG_SYSFS_DEPRECATED=y
35496 +# CONFIG_RELAY is not set
35497 +CONFIG_BLK_DEV_INITRD=y
35498 +CONFIG_INITRAMFS_SOURCE=""
35499 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
35502 +CONFIG_SYSCTL_SYSCALL=y
35504 +# CONFIG_KALLSYMS_ALL is not set
35505 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
35506 +# CONFIG_HOTPLUG is not set
35510 +CONFIG_BASE_FULL=y
35512 +CONFIG_ANON_INODES=y
35517 +CONFIG_VM_EVENT_COUNTERS=y
35519 +# CONFIG_SLUB is not set
35520 +# CONFIG_SLOB is not set
35521 +CONFIG_RT_MUTEXES=y
35522 +# CONFIG_TINY_SHMEM is not set
35523 +CONFIG_BASE_SMALL=0
35525 +CONFIG_MODULE_UNLOAD=y
35526 +# CONFIG_MODULE_FORCE_UNLOAD is not set
35527 +# CONFIG_MODVERSIONS is not set
35528 +# CONFIG_MODULE_SRCVERSION_ALL is not set
35531 +# CONFIG_LBD is not set
35532 +# CONFIG_BLK_DEV_IO_TRACE is not set
35533 +# CONFIG_LSF is not set
35534 +# CONFIG_BLK_DEV_BSG is not set
35539 +CONFIG_IOSCHED_NOOP=y
35540 +CONFIG_IOSCHED_AS=y
35541 +CONFIG_IOSCHED_DEADLINE=y
35542 +CONFIG_IOSCHED_CFQ=y
35543 +CONFIG_DEFAULT_AS=y
35544 +# CONFIG_DEFAULT_DEADLINE is not set
35545 +# CONFIG_DEFAULT_CFQ is not set
35546 +# CONFIG_DEFAULT_NOOP is not set
35547 +CONFIG_DEFAULT_IOSCHED="anticipatory"
35550 +# Platform support
35552 +# CONFIG_PPC_MPC52xx is not set
35553 +# CONFIG_PPC_MPC5200 is not set
35554 +# CONFIG_PPC_CELL is not set
35555 +# CONFIG_PPC_CELL_NATIVE is not set
35556 +# CONFIG_PQ2ADS is not set
35557 +# CONFIG_BAMBOO is not set
35558 +# CONFIG_EBONY is not set
35559 +# CONFIG_SEQUOIA is not set
35560 +# CONFIG_TAISHAN is not set
35561 +# CONFIG_KATMAI is not set
35562 +# CONFIG_RAINIER is not set
35565 +CONFIG_IBM440EP_ERR42=y
35566 +# CONFIG_MPIC is not set
35567 +# CONFIG_MPIC_WEIRD is not set
35568 +# CONFIG_PPC_I8259 is not set
35569 +# CONFIG_PPC_RTAS is not set
35570 +# CONFIG_MMIO_NVRAM is not set
35571 +# CONFIG_PPC_MPC106 is not set
35572 +# CONFIG_PPC_970_NAP is not set
35573 +# CONFIG_PPC_INDIRECT_IO is not set
35574 +# CONFIG_GENERIC_IOMAP is not set
35575 +# CONFIG_CPU_FREQ is not set
35576 +# CONFIG_CPM2 is not set
35577 +# CONFIG_FSL_ULI1575 is not set
35582 +# CONFIG_HIGHMEM is not set
35583 +# CONFIG_TICK_ONESHOT is not set
35584 +# CONFIG_NO_HZ is not set
35585 +# CONFIG_HIGH_RES_TIMERS is not set
35586 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
35587 +# CONFIG_HZ_100 is not set
35588 +# CONFIG_HZ_250 is not set
35589 +# CONFIG_HZ_300 is not set
35592 +CONFIG_PREEMPT_NONE=y
35593 +# CONFIG_PREEMPT_VOLUNTARY is not set
35594 +# CONFIG_PREEMPT is not set
35595 +CONFIG_BINFMT_ELF=y
35596 +# CONFIG_BINFMT_MISC is not set
35597 +# CONFIG_MATH_EMULATION is not set
35598 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
35599 +CONFIG_ARCH_FLATMEM_ENABLE=y
35600 +CONFIG_ARCH_POPULATES_NODE_MAP=y
35601 +CONFIG_SELECT_MEMORY_MODEL=y
35602 +CONFIG_FLATMEM_MANUAL=y
35603 +# CONFIG_DISCONTIGMEM_MANUAL is not set
35604 +# CONFIG_SPARSEMEM_MANUAL is not set
35606 +CONFIG_FLAT_NODE_MEM_MAP=y
35607 +# CONFIG_SPARSEMEM_STATIC is not set
35608 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
35609 +CONFIG_SPLIT_PTLOCK_CPUS=4
35610 +CONFIG_RESOURCES_64BIT=y
35611 +CONFIG_ZONE_DMA_FLAG=1
35613 +CONFIG_VIRT_TO_BUS=y
35614 +CONFIG_PROC_DEVICETREE=y
35615 +CONFIG_CMDLINE_BOOL=y
35616 +CONFIG_CMDLINE="ip=on"
35618 +CONFIG_WANT_DEVICE_TREE=y
35619 +CONFIG_DEVICE_TREE="warp.dts"
35620 +CONFIG_ISA_DMA_API=y
35626 +# CONFIG_PCI is not set
35627 +# CONFIG_PCI_DOMAINS is not set
35628 +# CONFIG_PCI_SYSCALL is not set
35629 +# CONFIG_ARCH_SUPPORTS_MSI is not set
35634 +# CONFIG_ADVANCED_OPTIONS is not set
35637 +# Default settings for advanced configuration options are used
35639 +CONFIG_HIGHMEM_START=0xfe000000
35640 +CONFIG_LOWMEM_SIZE=0x30000000
35641 +CONFIG_KERNEL_START=0xc0000000
35642 +CONFIG_TASK_SIZE=0xc0000000
35643 +CONFIG_CONSISTENT_START=0xff100000
35644 +CONFIG_CONSISTENT_SIZE=0x00200000
35645 +CONFIG_BOOT_LOAD=0x01000000
35653 +# Networking options
35656 +# CONFIG_PACKET_MMAP is not set
35659 +# CONFIG_XFRM_USER is not set
35660 +# CONFIG_XFRM_SUB_POLICY is not set
35661 +# CONFIG_XFRM_MIGRATE is not set
35662 +# CONFIG_NET_KEY is not set
35664 +# CONFIG_IP_MULTICAST is not set
35665 +# CONFIG_IP_ADVANCED_ROUTER is not set
35666 +CONFIG_IP_FIB_HASH=y
35668 +CONFIG_IP_PNP_DHCP=y
35669 +# CONFIG_IP_PNP_BOOTP is not set
35670 +# CONFIG_IP_PNP_RARP is not set
35671 +# CONFIG_NET_IPIP is not set
35672 +# CONFIG_NET_IPGRE is not set
35673 +# CONFIG_ARPD is not set
35674 +# CONFIG_SYN_COOKIES is not set
35675 +# CONFIG_INET_AH is not set
35676 +# CONFIG_INET_ESP is not set
35677 +# CONFIG_INET_IPCOMP is not set
35678 +# CONFIG_INET_XFRM_TUNNEL is not set
35679 +# CONFIG_INET_TUNNEL is not set
35680 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
35681 +CONFIG_INET_XFRM_MODE_TUNNEL=y
35682 +CONFIG_INET_XFRM_MODE_BEET=y
35683 +# CONFIG_INET_LRO is not set
35684 +CONFIG_INET_DIAG=y
35685 +CONFIG_INET_TCP_DIAG=y
35686 +# CONFIG_TCP_CONG_ADVANCED is not set
35687 +CONFIG_TCP_CONG_CUBIC=y
35688 +CONFIG_DEFAULT_TCP_CONG="cubic"
35689 +# CONFIG_TCP_MD5SIG is not set
35690 +# CONFIG_IP_VS is not set
35691 +# CONFIG_IPV6 is not set
35692 +# CONFIG_INET6_XFRM_TUNNEL is not set
35693 +# CONFIG_INET6_TUNNEL is not set
35694 +# CONFIG_NETWORK_SECMARK is not set
35695 +CONFIG_NETFILTER=y
35696 +# CONFIG_NETFILTER_DEBUG is not set
35699 +# Core Netfilter Configuration
35701 +# CONFIG_NETFILTER_NETLINK is not set
35702 +# CONFIG_NF_CONNTRACK_ENABLED is not set
35703 +# CONFIG_NF_CONNTRACK is not set
35704 +# CONFIG_NETFILTER_XTABLES is not set
35707 +# IP: Netfilter Configuration
35709 +# CONFIG_IP_NF_QUEUE is not set
35710 +# CONFIG_IP_NF_IPTABLES is not set
35711 +# CONFIG_IP_NF_ARPTABLES is not set
35712 +# CONFIG_IP_DCCP is not set
35713 +# CONFIG_IP_SCTP is not set
35714 +# CONFIG_TIPC is not set
35715 +# CONFIG_ATM is not set
35716 +# CONFIG_BRIDGE is not set
35717 +CONFIG_VLAN_8021Q=y
35718 +# CONFIG_DECNET is not set
35719 +# CONFIG_LLC2 is not set
35720 +# CONFIG_IPX is not set
35721 +# CONFIG_ATALK is not set
35722 +# CONFIG_X25 is not set
35723 +# CONFIG_LAPB is not set
35724 +# CONFIG_ECONET is not set
35725 +# CONFIG_WAN_ROUTER is not set
35726 +# CONFIG_NET_SCHED is not set
35731 +# CONFIG_NET_PKTGEN is not set
35732 +# CONFIG_HAMRADIO is not set
35733 +# CONFIG_IRDA is not set
35734 +# CONFIG_BT is not set
35735 +# CONFIG_AF_RXRPC is not set
35740 +# CONFIG_CFG80211 is not set
35741 +# CONFIG_WIRELESS_EXT is not set
35742 +# CONFIG_MAC80211 is not set
35743 +# CONFIG_IEEE80211 is not set
35744 +# CONFIG_RFKILL is not set
35745 +# CONFIG_NET_9P is not set
35752 +# Generic Driver Options
35754 +# CONFIG_STANDALONE is not set
35755 +CONFIG_PREVENT_FIRMWARE_BUILD=y
35756 +# CONFIG_DEBUG_DRIVER is not set
35757 +# CONFIG_DEBUG_DEVRES is not set
35758 +# CONFIG_SYS_HYPERVISOR is not set
35759 +# CONFIG_CONNECTOR is not set
35761 +# CONFIG_MTD_DEBUG is not set
35762 +# CONFIG_MTD_CONCAT is not set
35763 +CONFIG_MTD_PARTITIONS=y
35764 +# CONFIG_MTD_REDBOOT_PARTS is not set
35765 +# CONFIG_MTD_CMDLINE_PARTS is not set
35768 +# User Modules And Translation Layers
35771 +CONFIG_MTD_BLKDEVS=y
35772 +CONFIG_MTD_BLOCK=y
35773 +# CONFIG_FTL is not set
35774 +# CONFIG_NFTL is not set
35775 +# CONFIG_INFTL is not set
35776 +# CONFIG_RFD_FTL is not set
35777 +# CONFIG_SSFDC is not set
35781 +# RAM/ROM/Flash chip drivers
35784 +# CONFIG_MTD_JEDECPROBE is not set
35785 +CONFIG_MTD_GEN_PROBE=y
35786 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
35787 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
35788 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
35789 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
35790 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
35791 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
35792 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
35793 +CONFIG_MTD_CFI_I1=y
35794 +CONFIG_MTD_CFI_I2=y
35795 +# CONFIG_MTD_CFI_I4 is not set
35796 +# CONFIG_MTD_CFI_I8 is not set
35797 +# CONFIG_MTD_CFI_INTELEXT is not set
35798 +CONFIG_MTD_CFI_AMDSTD=y
35799 +# CONFIG_MTD_CFI_STAA is not set
35800 +CONFIG_MTD_CFI_UTIL=y
35801 +# CONFIG_MTD_RAM is not set
35802 +# CONFIG_MTD_ROM is not set
35803 +# CONFIG_MTD_ABSENT is not set
35806 +# Mapping drivers for chip access
35808 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
35809 +# CONFIG_MTD_PHYSMAP is not set
35810 +CONFIG_MTD_PHYSMAP_OF=y
35811 +# CONFIG_MTD_PLATRAM is not set
35814 +# Self-contained MTD device drivers
35816 +# CONFIG_MTD_SLRAM is not set
35817 +# CONFIG_MTD_PHRAM is not set
35818 +# CONFIG_MTD_MTDRAM is not set
35819 +# CONFIG_MTD_BLOCK2MTD is not set
35822 +# Disk-On-Chip Device Drivers
35824 +# CONFIG_MTD_DOC2000 is not set
35825 +# CONFIG_MTD_DOC2001 is not set
35826 +# CONFIG_MTD_DOC2001PLUS is not set
35828 +# CONFIG_MTD_NAND_VERIFY_WRITE is not set
35829 +CONFIG_MTD_NAND_ECC_SMC=y
35830 +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
35831 +CONFIG_MTD_NAND_IDS=y
35832 +CONFIG_MTD_NAND_NDFC=y
35833 +# CONFIG_MTD_NAND_DISKONCHIP is not set
35834 +# CONFIG_MTD_NAND_NANDSIM is not set
35835 +# CONFIG_MTD_NAND_PLATFORM is not set
35836 +# CONFIG_MTD_ALAUDA is not set
35837 +# CONFIG_MTD_ONENAND is not set
35840 +# UBI - Unsorted block images
35842 +# CONFIG_MTD_UBI is not set
35843 +CONFIG_OF_DEVICE=y
35844 +# CONFIG_PARPORT is not set
35846 +# CONFIG_BLK_DEV_FD is not set
35847 +# CONFIG_BLK_DEV_COW_COMMON is not set
35848 +# CONFIG_BLK_DEV_LOOP is not set
35849 +# CONFIG_BLK_DEV_NBD is not set
35850 +# CONFIG_BLK_DEV_UB is not set
35851 +CONFIG_BLK_DEV_RAM=y
35852 +CONFIG_BLK_DEV_RAM_COUNT=16
35853 +CONFIG_BLK_DEV_RAM_SIZE=4096
35854 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
35855 +# CONFIG_CDROM_PKTCDVD is not set
35856 +# CONFIG_ATA_OVER_ETH is not set
35857 +# CONFIG_XILINX_SYSACE is not set
35858 +CONFIG_MISC_DEVICES=y
35859 +# CONFIG_EEPROM_93CX6 is not set
35860 +# CONFIG_IDE is not set
35863 +# SCSI device support
35865 +# CONFIG_RAID_ATTRS is not set
35868 +# CONFIG_SCSI_TGT is not set
35869 +# CONFIG_SCSI_NETLINK is not set
35870 +CONFIG_SCSI_PROC_FS=y
35873 +# SCSI support type (disk, tape, CD-ROM)
35875 +CONFIG_BLK_DEV_SD=y
35876 +# CONFIG_CHR_DEV_ST is not set
35877 +# CONFIG_CHR_DEV_OSST is not set
35878 +# CONFIG_BLK_DEV_SR is not set
35879 +# CONFIG_CHR_DEV_SG is not set
35880 +# CONFIG_CHR_DEV_SCH is not set
35883 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
35885 +# CONFIG_SCSI_MULTI_LUN is not set
35886 +# CONFIG_SCSI_CONSTANTS is not set
35887 +# CONFIG_SCSI_LOGGING is not set
35888 +# CONFIG_SCSI_SCAN_ASYNC is not set
35889 +# CONFIG_SCSI_WAIT_SCAN is not set
35894 +CONFIG_SCSI_SPI_ATTRS=y
35895 +# CONFIG_SCSI_FC_ATTRS is not set
35896 +# CONFIG_SCSI_ISCSI_ATTRS is not set
35897 +# CONFIG_SCSI_SAS_LIBSAS is not set
35898 +# CONFIG_SCSI_SRP_ATTRS is not set
35899 +# CONFIG_SCSI_LOWLEVEL is not set
35900 +# CONFIG_ATA is not set
35901 +# CONFIG_MD is not set
35902 +# CONFIG_MACINTOSH_DRIVERS is not set
35903 +CONFIG_NETDEVICES=y
35904 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
35905 +# CONFIG_DUMMY is not set
35906 +# CONFIG_BONDING is not set
35907 +# CONFIG_MACVLAN is not set
35908 +# CONFIG_EQUALIZER is not set
35909 +# CONFIG_TUN is not set
35910 +# CONFIG_VETH is not set
35911 +# CONFIG_PHYLIB is not set
35912 +CONFIG_NET_ETHERNET=y
35914 +CONFIG_IBM_NEW_EMAC=y
35915 +CONFIG_IBM_NEW_EMAC_RXB=128
35916 +CONFIG_IBM_NEW_EMAC_TXB=64
35917 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
35918 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
35919 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
35920 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
35921 +CONFIG_IBM_NEW_EMAC_ZMII=y
35922 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
35923 +# CONFIG_IBM_NEW_EMAC_TAH is not set
35924 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
35925 +# CONFIG_B44 is not set
35926 +# CONFIG_NETDEV_1000 is not set
35927 +# CONFIG_NETDEV_10000 is not set
35932 +# CONFIG_WLAN_PRE80211 is not set
35933 +# CONFIG_WLAN_80211 is not set
35936 +# USB Network Adapters
35938 +# CONFIG_USB_CATC is not set
35939 +# CONFIG_USB_KAWETH is not set
35940 +# CONFIG_USB_PEGASUS is not set
35941 +# CONFIG_USB_RTL8150 is not set
35942 +# CONFIG_USB_USBNET is not set
35943 +# CONFIG_WAN is not set
35944 +# CONFIG_PPP is not set
35945 +# CONFIG_SLIP is not set
35946 +# CONFIG_SHAPER is not set
35947 +# CONFIG_NETCONSOLE is not set
35948 +# CONFIG_NETPOLL is not set
35949 +# CONFIG_NET_POLL_CONTROLLER is not set
35950 +# CONFIG_ISDN is not set
35951 +# CONFIG_PHONE is not set
35954 +# Input device support
35956 +# CONFIG_INPUT is not set
35959 +# Hardware I/O ports
35961 +# CONFIG_SERIO is not set
35962 +# CONFIG_GAMEPORT is not set
35965 +# Character devices
35967 +# CONFIG_VT is not set
35968 +# CONFIG_SERIAL_NONSTANDARD is not set
35973 +CONFIG_SERIAL_8250=y
35974 +CONFIG_SERIAL_8250_CONSOLE=y
35975 +CONFIG_SERIAL_8250_NR_UARTS=4
35976 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
35977 +CONFIG_SERIAL_8250_EXTENDED=y
35978 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
35979 +CONFIG_SERIAL_8250_SHARE_IRQ=y
35980 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
35981 +# CONFIG_SERIAL_8250_RSA is not set
35984 +# Non-8250 serial port support
35986 +# CONFIG_SERIAL_UARTLITE is not set
35987 +CONFIG_SERIAL_CORE=y
35988 +CONFIG_SERIAL_CORE_CONSOLE=y
35989 +# CONFIG_SERIAL_OF_PLATFORM is not set
35990 +CONFIG_UNIX98_PTYS=y
35991 +CONFIG_LEGACY_PTYS=y
35992 +CONFIG_LEGACY_PTY_COUNT=256
35993 +# CONFIG_IPMI_HANDLER is not set
35994 +CONFIG_HW_RANDOM=y
35995 +# CONFIG_NVRAM is not set
35996 +# CONFIG_GEN_RTC is not set
35997 +# CONFIG_R3964 is not set
35998 +# CONFIG_RAW_DRIVER is not set
35999 +# CONFIG_TCG_TPM is not set
36001 +CONFIG_I2C_BOARDINFO=y
36002 +# CONFIG_I2C_CHARDEV is not set
36007 +# CONFIG_I2C_ALGOBIT is not set
36008 +# CONFIG_I2C_ALGOPCF is not set
36009 +# CONFIG_I2C_ALGOPCA is not set
36012 +# I2C Hardware Bus support
36014 +CONFIG_I2C_IBM_IIC=y
36015 +# CONFIG_I2C_MPC is not set
36016 +# CONFIG_I2C_OCORES is not set
36017 +# CONFIG_I2C_PARPORT_LIGHT is not set
36018 +# CONFIG_I2C_SIMTEC is not set
36019 +# CONFIG_I2C_TAOS_EVM is not set
36020 +# CONFIG_I2C_STUB is not set
36021 +# CONFIG_I2C_TINY_USB is not set
36024 +# Miscellaneous I2C Chip support
36026 +# CONFIG_SENSORS_DS1337 is not set
36027 +# CONFIG_SENSORS_DS1374 is not set
36028 +# CONFIG_DS1682 is not set
36029 +CONFIG_SENSORS_EEPROM=y
36030 +# CONFIG_SENSORS_PCF8574 is not set
36031 +# CONFIG_SENSORS_PCA9539 is not set
36032 +# CONFIG_SENSORS_PCF8591 is not set
36033 +# CONFIG_SENSORS_M41T00 is not set
36034 +# CONFIG_SENSORS_MAX6875 is not set
36035 +# CONFIG_SENSORS_TSL2550 is not set
36036 +# CONFIG_I2C_DEBUG_CORE is not set
36037 +# CONFIG_I2C_DEBUG_ALGO is not set
36038 +# CONFIG_I2C_DEBUG_BUS is not set
36039 +# CONFIG_I2C_DEBUG_CHIP is not set
36044 +# CONFIG_SPI is not set
36045 +# CONFIG_SPI_MASTER is not set
36046 +# CONFIG_W1 is not set
36047 +# CONFIG_POWER_SUPPLY is not set
36049 +# CONFIG_HWMON_VID is not set
36050 +CONFIG_SENSORS_AD7414=y
36051 +# CONFIG_SENSORS_AD7418 is not set
36052 +# CONFIG_SENSORS_ADM1021 is not set
36053 +# CONFIG_SENSORS_ADM1025 is not set
36054 +# CONFIG_SENSORS_ADM1026 is not set
36055 +# CONFIG_SENSORS_ADM1029 is not set
36056 +# CONFIG_SENSORS_ADM1031 is not set
36057 +# CONFIG_SENSORS_ADM9240 is not set
36058 +# CONFIG_SENSORS_ADT7470 is not set
36059 +# CONFIG_SENSORS_ATXP1 is not set
36060 +# CONFIG_SENSORS_DS1621 is not set
36061 +# CONFIG_SENSORS_F71805F is not set
36062 +# CONFIG_SENSORS_F71882FG is not set
36063 +# CONFIG_SENSORS_F75375S is not set
36064 +# CONFIG_SENSORS_GL518SM is not set
36065 +# CONFIG_SENSORS_GL520SM is not set
36066 +# CONFIG_SENSORS_IT87 is not set
36067 +# CONFIG_SENSORS_LM63 is not set
36068 +# CONFIG_SENSORS_LM75 is not set
36069 +# CONFIG_SENSORS_LM77 is not set
36070 +# CONFIG_SENSORS_LM78 is not set
36071 +# CONFIG_SENSORS_LM80 is not set
36072 +# CONFIG_SENSORS_LM83 is not set
36073 +# CONFIG_SENSORS_LM85 is not set
36074 +# CONFIG_SENSORS_LM87 is not set
36075 +# CONFIG_SENSORS_LM90 is not set
36076 +# CONFIG_SENSORS_LM92 is not set
36077 +# CONFIG_SENSORS_LM93 is not set
36078 +# CONFIG_SENSORS_MAX1619 is not set
36079 +# CONFIG_SENSORS_MAX6650 is not set
36080 +# CONFIG_SENSORS_PC87360 is not set
36081 +# CONFIG_SENSORS_PC87427 is not set
36082 +# CONFIG_SENSORS_DME1737 is not set
36083 +# CONFIG_SENSORS_SMSC47M1 is not set
36084 +# CONFIG_SENSORS_SMSC47M192 is not set
36085 +# CONFIG_SENSORS_SMSC47B397 is not set
36086 +# CONFIG_SENSORS_THMC50 is not set
36087 +# CONFIG_SENSORS_VT1211 is not set
36088 +# CONFIG_SENSORS_W83781D is not set
36089 +# CONFIG_SENSORS_W83791D is not set
36090 +# CONFIG_SENSORS_W83792D is not set
36091 +# CONFIG_SENSORS_W83793 is not set
36092 +# CONFIG_SENSORS_W83L785TS is not set
36093 +# CONFIG_SENSORS_W83627HF is not set
36094 +# CONFIG_SENSORS_W83627EHF is not set
36095 +# CONFIG_HWMON_DEBUG_CHIP is not set
36096 +# CONFIG_WATCHDOG is not set
36099 +# Sonics Silicon Backplane
36101 +CONFIG_SSB_POSSIBLE=y
36102 +# CONFIG_SSB is not set
36105 +# Multifunction device drivers
36107 +# CONFIG_MFD_SM501 is not set
36110 +# Multimedia devices
36112 +# CONFIG_VIDEO_DEV is not set
36113 +# CONFIG_DVB_CORE is not set
36114 +# CONFIG_DAB is not set
36117 +# Graphics support
36119 +# CONFIG_VGASTATE is not set
36120 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
36121 +# CONFIG_FB is not set
36122 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
36125 +# Display device support
36127 +# CONFIG_DISPLAY_SUPPORT is not set
36132 +# CONFIG_SOUND is not set
36133 +CONFIG_USB_SUPPORT=y
36134 +CONFIG_USB_ARCH_HAS_HCD=y
36135 +CONFIG_USB_ARCH_HAS_OHCI=y
36136 +# CONFIG_USB_ARCH_HAS_EHCI is not set
36138 +# CONFIG_USB_DEBUG is not set
36141 +# Miscellaneous USB options
36143 +# CONFIG_USB_DEVICEFS is not set
36144 +CONFIG_USB_DEVICE_CLASS=y
36145 +# CONFIG_USB_DYNAMIC_MINORS is not set
36146 +# CONFIG_USB_OTG is not set
36149 +# USB Host Controller Drivers
36151 +# CONFIG_USB_ISP116X_HCD is not set
36152 +CONFIG_USB_OHCI_HCD=y
36153 +CONFIG_USB_OHCI_HCD_PPC_OF=y
36154 +CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
36155 +# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
36156 +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
36157 +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
36158 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
36159 +# CONFIG_USB_SL811_HCD is not set
36160 +# CONFIG_USB_R8A66597_HCD is not set
36163 +# USB Device Class drivers
36165 +# CONFIG_USB_ACM is not set
36166 +# CONFIG_USB_PRINTER is not set
36169 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
36173 +# may also be needed; see USB_STORAGE Help for more information
36175 +CONFIG_USB_STORAGE=y
36176 +# CONFIG_USB_STORAGE_DEBUG is not set
36177 +# CONFIG_USB_STORAGE_DATAFAB is not set
36178 +# CONFIG_USB_STORAGE_FREECOM is not set
36179 +# CONFIG_USB_STORAGE_ISD200 is not set
36180 +# CONFIG_USB_STORAGE_DPCM is not set
36181 +# CONFIG_USB_STORAGE_USBAT is not set
36182 +# CONFIG_USB_STORAGE_SDDR09 is not set
36183 +# CONFIG_USB_STORAGE_SDDR55 is not set
36184 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
36185 +# CONFIG_USB_STORAGE_ALAUDA is not set
36186 +# CONFIG_USB_STORAGE_KARMA is not set
36187 +# CONFIG_USB_LIBUSUAL is not set
36190 +# USB Imaging devices
36192 +# CONFIG_USB_MDC800 is not set
36193 +# CONFIG_USB_MICROTEK is not set
36197 +# USB port drivers
36201 +# USB Serial Converter support
36203 +# CONFIG_USB_SERIAL is not set
36206 +# USB Miscellaneous drivers
36208 +# CONFIG_USB_EMI62 is not set
36209 +# CONFIG_USB_EMI26 is not set
36210 +# CONFIG_USB_ADUTUX is not set
36211 +# CONFIG_USB_AUERSWALD is not set
36212 +# CONFIG_USB_RIO500 is not set
36213 +# CONFIG_USB_LEGOTOWER is not set
36214 +# CONFIG_USB_LCD is not set
36215 +# CONFIG_USB_BERRY_CHARGE is not set
36216 +# CONFIG_USB_LED is not set
36217 +# CONFIG_USB_CYPRESS_CY7C63 is not set
36218 +# CONFIG_USB_CYTHERM is not set
36219 +# CONFIG_USB_PHIDGET is not set
36220 +# CONFIG_USB_IDMOUSE is not set
36221 +# CONFIG_USB_FTDI_ELAN is not set
36222 +# CONFIG_USB_APPLEDISPLAY is not set
36223 +# CONFIG_USB_LD is not set
36224 +# CONFIG_USB_TRANCEVIBRATOR is not set
36225 +# CONFIG_USB_IOWARRIOR is not set
36228 +# USB DSL modem support
36232 +# USB Gadget Support
36234 +# CONFIG_USB_GADGET is not set
36236 +# CONFIG_MMC_DEBUG is not set
36237 +# CONFIG_MMC_UNSAFE_RESUME is not set
36240 +# MMC/SD Card Drivers
36242 +CONFIG_MMC_BLOCK=m
36243 +CONFIG_MMC_BLOCK_BOUNCE=y
36244 +# CONFIG_SDIO_UART is not set
36247 +# MMC/SD Host Controller Drivers
36249 +# CONFIG_MMC_WBSD is not set
36250 +# CONFIG_NEW_LEDS is not set
36251 +# CONFIG_EDAC is not set
36252 +# CONFIG_RTC_CLASS is not set
36257 +# CONFIG_UIO is not set
36263 +# CONFIG_EXT2_FS_XATTR is not set
36264 +# CONFIG_EXT2_FS_XIP is not set
36265 +# CONFIG_EXT3_FS is not set
36266 +# CONFIG_EXT4DEV_FS is not set
36267 +# CONFIG_REISERFS_FS is not set
36268 +# CONFIG_JFS_FS is not set
36269 +# CONFIG_FS_POSIX_ACL is not set
36270 +# CONFIG_XFS_FS is not set
36271 +# CONFIG_GFS2_FS is not set
36272 +# CONFIG_OCFS2_FS is not set
36273 +# CONFIG_MINIX_FS is not set
36274 +# CONFIG_ROMFS_FS is not set
36276 +CONFIG_INOTIFY_USER=y
36277 +# CONFIG_QUOTA is not set
36279 +# CONFIG_AUTOFS_FS is not set
36280 +# CONFIG_AUTOFS4_FS is not set
36281 +# CONFIG_FUSE_FS is not set
36284 +# CD-ROM/DVD Filesystems
36286 +# CONFIG_ISO9660_FS is not set
36287 +# CONFIG_UDF_FS is not set
36290 +# DOS/FAT/NT Filesystems
36295 +CONFIG_FAT_DEFAULT_CODEPAGE=437
36296 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
36297 +# CONFIG_NTFS_FS is not set
36300 +# Pseudo filesystems
36303 +CONFIG_PROC_KCORE=y
36304 +CONFIG_PROC_SYSCTL=y
36306 +# CONFIG_TMPFS is not set
36307 +# CONFIG_HUGETLB_PAGE is not set
36308 +# CONFIG_CONFIGFS_FS is not set
36311 +# Miscellaneous filesystems
36313 +# CONFIG_ADFS_FS is not set
36314 +# CONFIG_AFFS_FS is not set
36315 +# CONFIG_HFS_FS is not set
36316 +# CONFIG_HFSPLUS_FS is not set
36317 +# CONFIG_BEFS_FS is not set
36318 +# CONFIG_BFS_FS is not set
36319 +# CONFIG_EFS_FS is not set
36321 +CONFIG_JFFS2_FS_DEBUG=0
36322 +CONFIG_JFFS2_FS_WRITEBUFFER=y
36323 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
36324 +# CONFIG_JFFS2_SUMMARY is not set
36325 +# CONFIG_JFFS2_FS_XATTR is not set
36326 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
36327 +CONFIG_JFFS2_ZLIB=y
36328 +# CONFIG_JFFS2_LZO is not set
36329 +CONFIG_JFFS2_RTIME=y
36330 +# CONFIG_JFFS2_RUBIN is not set
36332 +# CONFIG_VXFS_FS is not set
36333 +# CONFIG_HPFS_FS is not set
36334 +# CONFIG_QNX4FS_FS is not set
36335 +# CONFIG_SYSV_FS is not set
36336 +# CONFIG_UFS_FS is not set
36337 +CONFIG_NETWORK_FILESYSTEMS=y
36340 +# CONFIG_NFS_V3_ACL is not set
36341 +# CONFIG_NFS_V4 is not set
36342 +# CONFIG_NFS_DIRECTIO is not set
36343 +# CONFIG_NFSD is not set
36347 +CONFIG_NFS_COMMON=y
36349 +# CONFIG_SUNRPC_BIND34 is not set
36350 +# CONFIG_RPCSEC_GSS_KRB5 is not set
36351 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
36352 +# CONFIG_SMB_FS is not set
36353 +# CONFIG_CIFS is not set
36354 +# CONFIG_NCP_FS is not set
36355 +# CONFIG_CODA_FS is not set
36356 +# CONFIG_AFS_FS is not set
36361 +# CONFIG_PARTITION_ADVANCED is not set
36362 +CONFIG_MSDOS_PARTITION=y
36364 +CONFIG_NLS_DEFAULT="iso8859-1"
36365 +CONFIG_NLS_CODEPAGE_437=y
36366 +# CONFIG_NLS_CODEPAGE_737 is not set
36367 +# CONFIG_NLS_CODEPAGE_775 is not set
36368 +CONFIG_NLS_CODEPAGE_850=y
36369 +# CONFIG_NLS_CODEPAGE_852 is not set
36370 +# CONFIG_NLS_CODEPAGE_855 is not set
36371 +# CONFIG_NLS_CODEPAGE_857 is not set
36372 +# CONFIG_NLS_CODEPAGE_860 is not set
36373 +# CONFIG_NLS_CODEPAGE_861 is not set
36374 +# CONFIG_NLS_CODEPAGE_862 is not set
36375 +# CONFIG_NLS_CODEPAGE_863 is not set
36376 +# CONFIG_NLS_CODEPAGE_864 is not set
36377 +# CONFIG_NLS_CODEPAGE_865 is not set
36378 +# CONFIG_NLS_CODEPAGE_866 is not set
36379 +# CONFIG_NLS_CODEPAGE_869 is not set
36380 +# CONFIG_NLS_CODEPAGE_936 is not set
36381 +# CONFIG_NLS_CODEPAGE_950 is not set
36382 +# CONFIG_NLS_CODEPAGE_932 is not set
36383 +# CONFIG_NLS_CODEPAGE_949 is not set
36384 +# CONFIG_NLS_CODEPAGE_874 is not set
36385 +# CONFIG_NLS_ISO8859_8 is not set
36386 +# CONFIG_NLS_CODEPAGE_1250 is not set
36387 +# CONFIG_NLS_CODEPAGE_1251 is not set
36388 +CONFIG_NLS_ASCII=y
36389 +CONFIG_NLS_ISO8859_1=y
36390 +# CONFIG_NLS_ISO8859_2 is not set
36391 +# CONFIG_NLS_ISO8859_3 is not set
36392 +# CONFIG_NLS_ISO8859_4 is not set
36393 +# CONFIG_NLS_ISO8859_5 is not set
36394 +# CONFIG_NLS_ISO8859_6 is not set
36395 +# CONFIG_NLS_ISO8859_7 is not set
36396 +# CONFIG_NLS_ISO8859_9 is not set
36397 +# CONFIG_NLS_ISO8859_13 is not set
36398 +# CONFIG_NLS_ISO8859_14 is not set
36399 +CONFIG_NLS_ISO8859_15=y
36400 +# CONFIG_NLS_KOI8_R is not set
36401 +# CONFIG_NLS_KOI8_U is not set
36403 +# CONFIG_DLM is not set
36404 +# CONFIG_UCC_SLOW is not set
36407 +# Library routines
36409 +CONFIG_BITREVERSE=y
36410 +CONFIG_CRC_CCITT=y
36411 +# CONFIG_CRC16 is not set
36412 +# CONFIG_CRC_ITU_T is not set
36414 +# CONFIG_CRC7 is not set
36415 +# CONFIG_LIBCRC32C is not set
36416 +CONFIG_ZLIB_INFLATE=y
36417 +CONFIG_ZLIB_DEFLATE=y
36419 +CONFIG_HAS_IOMEM=y
36420 +CONFIG_HAS_IOPORT=y
36422 +# CONFIG_INSTRUMENTATION is not set
36427 +# CONFIG_PRINTK_TIME is not set
36428 +CONFIG_ENABLE_WARN_DEPRECATED=y
36429 +CONFIG_ENABLE_MUST_CHECK=y
36430 +CONFIG_MAGIC_SYSRQ=y
36431 +# CONFIG_UNUSED_SYMBOLS is not set
36432 +# CONFIG_DEBUG_FS is not set
36433 +# CONFIG_HEADERS_CHECK is not set
36434 +CONFIG_DEBUG_KERNEL=y
36435 +# CONFIG_DEBUG_SHIRQ is not set
36436 +CONFIG_DETECT_SOFTLOCKUP=y
36437 +# CONFIG_SCHED_DEBUG is not set
36438 +# CONFIG_SCHEDSTATS is not set
36439 +# CONFIG_TIMER_STATS is not set
36440 +# CONFIG_DEBUG_SLAB is not set
36441 +# CONFIG_DEBUG_RT_MUTEXES is not set
36442 +# CONFIG_RT_MUTEX_TESTER is not set
36443 +# CONFIG_DEBUG_SPINLOCK is not set
36444 +# CONFIG_DEBUG_MUTEXES is not set
36445 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
36446 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
36447 +# CONFIG_DEBUG_KOBJECT is not set
36448 +# CONFIG_DEBUG_BUGVERBOSE is not set
36449 +CONFIG_DEBUG_INFO=y
36450 +# CONFIG_DEBUG_VM is not set
36451 +# CONFIG_DEBUG_LIST is not set
36452 +# CONFIG_DEBUG_SG is not set
36453 +CONFIG_FORCED_INLINING=y
36454 +# CONFIG_BOOT_PRINTK_DELAY is not set
36455 +# CONFIG_RCU_TORTURE_TEST is not set
36456 +# CONFIG_FAULT_INJECTION is not set
36457 +# CONFIG_SAMPLES is not set
36458 +# CONFIG_DEBUG_STACKOVERFLOW is not set
36459 +# CONFIG_DEBUG_STACK_USAGE is not set
36460 +# CONFIG_DEBUG_PAGEALLOC is not set
36461 +# CONFIG_DEBUGGER is not set
36462 +CONFIG_BDI_SWITCH=y
36463 +# CONFIG_PPC_EARLY_DEBUG is not set
36466 +# Security options
36468 +# CONFIG_KEYS is not set
36469 +# CONFIG_SECURITY is not set
36470 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
36471 +# CONFIG_CRYPTO is not set
36472 +# CONFIG_PPC_CLOCK is not set
36473 --- a/arch/powerpc/kernel/Makefile
36474 +++ b/arch/powerpc/kernel/Makefile
36478 ifeq ($(CONFIG_PPC64),y)
36479 -EXTRA_CFLAGS += -mno-minimal-toc
36480 +CFLAGS_prom_init.o += -mno-minimal-toc
36482 ifeq ($(CONFIG_PPC32),y)
36483 CFLAGS_prom_init.o += -fPIC
36485 obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \
36487 obj-$(CONFIG_PCI_MSI) += msi.o
36488 +obj-$(CONFIG_RAPIDIO) += rio.o
36489 obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \
36490 machine_kexec_$(CONFIG_WORD_SIZE).o
36491 obj-$(CONFIG_AUDIT) += audit.o
36494 extra-$(CONFIG_PPC_FPU) += fpu.o
36495 extra-$(CONFIG_PPC64) += entry_64.o
36497 +extra-y += systbl_chk.i
36498 +$(obj)/systbl.o: systbl_chk
36500 +quiet_cmd_systbl_chk = CALL $<
36501 + cmd_systbl_chk = $(CONFIG_SHELL) $< $(obj)/systbl_chk.i
36503 +PHONY += systbl_chk
36504 +systbl_chk: $(src)/systbl_chk.sh $(obj)/systbl_chk.i
36505 + $(call cmd,systbl_chk)
36506 --- a/arch/powerpc/kernel/btext.c
36507 +++ b/arch/powerpc/kernel/btext.c
36508 @@ -236,7 +236,7 @@
36509 if (rc == 0 || !allow_nonstdout)
36512 - for (np = NULL; (np = of_find_node_by_type(np, "display"));) {
36513 + for_each_node_by_type(np, "display") {
36514 if (of_get_property(np, "linux,opened", NULL)) {
36515 printk("trying %s ...\n", np->full_name);
36516 rc = btext_initialize(np);
36517 --- a/arch/powerpc/kernel/cpu_setup_44x.S
36518 +++ b/arch/powerpc/kernel/cpu_setup_44x.S
36519 @@ -23,11 +23,24 @@
36522 bl __plb_disable_wrp
36523 + bl __fixup_440A_mcheck
36526 _GLOBAL(__setup_cpu_440grx)
36527 - b __plb_disable_wrp
36529 + bl __plb_disable_wrp
36530 + bl __fixup_440A_mcheck
36533 +_GLOBAL(__setup_cpu_440gx)
36534 +_GLOBAL(__setup_cpu_440spe)
36535 + b __fixup_440A_mcheck
36537 + /* Temporary fixup for arch/ppc until we kill the whole thing */
36538 +#ifndef CONFIG_PPC_MERGE
36539 +_GLOBAL(__fixup_440A_mcheck)
36543 /* enable APU between CPU and FPU */
36544 _GLOBAL(__init_fpu_44x)
36545 --- a/arch/powerpc/kernel/cputable.c
36546 +++ b/arch/powerpc/kernel/cputable.c
36548 #ifdef CONFIG_PPC32
36549 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
36550 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
36551 +extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
36552 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
36553 +extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
36554 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
36555 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
36556 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
36558 .pmc_type = PPC_PMC_IBM,
36559 .oprofile_cpu_type = "ppc64/power3",
36560 .oprofile_type = PPC_OPROFILE_RS64,
36561 + .machine_check = machine_check_generic,
36562 .platform = "power3",
36566 .pmc_type = PPC_PMC_IBM,
36567 .oprofile_cpu_type = "ppc64/power3",
36568 .oprofile_type = PPC_OPROFILE_RS64,
36569 + .machine_check = machine_check_generic,
36570 .platform = "power3",
36573 @@ -113,6 +117,7 @@
36574 .pmc_type = PPC_PMC_IBM,
36575 .oprofile_cpu_type = "ppc64/rs64",
36576 .oprofile_type = PPC_OPROFILE_RS64,
36577 + .machine_check = machine_check_generic,
36578 .platform = "rs64",
36581 @@ -127,6 +132,7 @@
36582 .pmc_type = PPC_PMC_IBM,
36583 .oprofile_cpu_type = "ppc64/rs64",
36584 .oprofile_type = PPC_OPROFILE_RS64,
36585 + .machine_check = machine_check_generic,
36586 .platform = "rs64",
36589 @@ -141,6 +147,7 @@
36590 .pmc_type = PPC_PMC_IBM,
36591 .oprofile_cpu_type = "ppc64/rs64",
36592 .oprofile_type = PPC_OPROFILE_RS64,
36593 + .machine_check = machine_check_generic,
36594 .platform = "rs64",
36597 @@ -155,6 +162,7 @@
36598 .pmc_type = PPC_PMC_IBM,
36599 .oprofile_cpu_type = "ppc64/rs64",
36600 .oprofile_type = PPC_OPROFILE_RS64,
36601 + .machine_check = machine_check_generic,
36602 .platform = "rs64",
36605 @@ -169,6 +177,7 @@
36606 .pmc_type = PPC_PMC_IBM,
36607 .oprofile_cpu_type = "ppc64/power4",
36608 .oprofile_type = PPC_OPROFILE_POWER4,
36609 + .machine_check = machine_check_generic,
36610 .platform = "power4",
36613 @@ -183,6 +192,7 @@
36614 .pmc_type = PPC_PMC_IBM,
36615 .oprofile_cpu_type = "ppc64/power4",
36616 .oprofile_type = PPC_OPROFILE_POWER4,
36617 + .machine_check = machine_check_generic,
36618 .platform = "power4",
36621 @@ -200,6 +210,7 @@
36622 .cpu_restore = __restore_cpu_ppc970,
36623 .oprofile_cpu_type = "ppc64/970",
36624 .oprofile_type = PPC_OPROFILE_POWER4,
36625 + .machine_check = machine_check_generic,
36626 .platform = "ppc970",
36629 @@ -217,6 +228,7 @@
36630 .cpu_restore = __restore_cpu_ppc970,
36631 .oprofile_cpu_type = "ppc64/970",
36632 .oprofile_type = PPC_OPROFILE_POWER4,
36633 + .machine_check = machine_check_generic,
36634 .platform = "ppc970",
36636 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
36637 @@ -234,6 +246,7 @@
36638 .cpu_restore = __restore_cpu_ppc970,
36639 .oprofile_cpu_type = "ppc64/970MP",
36640 .oprofile_type = PPC_OPROFILE_POWER4,
36641 + .machine_check = machine_check_generic,
36642 .platform = "ppc970",
36645 @@ -251,6 +264,7 @@
36646 .cpu_restore = __restore_cpu_ppc970,
36647 .oprofile_cpu_type = "ppc64/970MP",
36648 .oprofile_type = PPC_OPROFILE_POWER4,
36649 + .machine_check = machine_check_generic,
36650 .platform = "ppc970",
36653 @@ -267,6 +281,7 @@
36654 .cpu_setup = __setup_cpu_ppc970,
36655 .oprofile_cpu_type = "ppc64/970",
36656 .oprofile_type = PPC_OPROFILE_POWER4,
36657 + .machine_check = machine_check_generic,
36658 .platform = "ppc970",
36661 @@ -286,6 +301,7 @@
36663 .oprofile_mmcra_sihv = MMCRA_SIHV,
36664 .oprofile_mmcra_sipr = MMCRA_SIPR,
36665 + .machine_check = machine_check_generic,
36666 .platform = "power5",
36669 @@ -301,6 +317,7 @@
36670 .oprofile_type = PPC_OPROFILE_POWER4,
36671 .oprofile_mmcra_sihv = MMCRA_SIHV,
36672 .oprofile_mmcra_sipr = MMCRA_SIPR,
36673 + .machine_check = machine_check_generic,
36674 .platform = "power5+",
36677 @@ -317,6 +334,7 @@
36678 .oprofile_type = PPC_OPROFILE_POWER4,
36679 .oprofile_mmcra_sihv = MMCRA_SIHV,
36680 .oprofile_mmcra_sipr = MMCRA_SIPR,
36681 + .machine_check = machine_check_generic,
36682 .platform = "power5+",
36684 { /* POWER6 in P5+ mode; 2.04-compliant processor */
36685 @@ -327,6 +345,7 @@
36686 .cpu_user_features = COMMON_USER_POWER5_PLUS,
36687 .icache_bsize = 128,
36688 .dcache_bsize = 128,
36689 + .machine_check = machine_check_generic,
36690 .platform = "power5+",
36693 @@ -346,6 +365,7 @@
36694 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
36695 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
36696 POWER6_MMCRA_OTHER,
36697 + .machine_check = machine_check_generic,
36698 .platform = "power6x",
36700 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
36701 @@ -356,6 +376,7 @@
36702 .cpu_user_features = COMMON_USER_POWER6,
36703 .icache_bsize = 128,
36704 .dcache_bsize = 128,
36705 + .machine_check = machine_check_generic,
36706 .platform = "power6",
36708 { /* Cell Broadband Engine */
36709 @@ -372,6 +393,7 @@
36710 .pmc_type = PPC_PMC_IBM,
36711 .oprofile_cpu_type = "ppc64/cell-be",
36712 .oprofile_type = PPC_OPROFILE_CELL,
36713 + .machine_check = machine_check_generic,
36714 .platform = "ppc-cell-be",
36716 { /* PA Semi PA6T */
36717 @@ -388,6 +410,7 @@
36718 .cpu_restore = __restore_cpu_pa6t,
36719 .oprofile_cpu_type = "ppc64/pa6t",
36720 .oprofile_type = PPC_OPROFILE_PA6T,
36721 + .machine_check = machine_check_generic,
36722 .platform = "pa6t",
36724 { /* default match */
36725 @@ -400,6 +423,7 @@
36726 .dcache_bsize = 128,
36728 .pmc_type = PPC_PMC_IBM,
36729 + .machine_check = machine_check_generic,
36730 .platform = "power4",
36732 #endif /* CONFIG_PPC64 */
36733 @@ -414,6 +438,7 @@
36734 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
36735 .icache_bsize = 32,
36736 .dcache_bsize = 32,
36737 + .machine_check = machine_check_generic,
36738 .platform = "ppc601",
36741 @@ -425,6 +450,7 @@
36742 .icache_bsize = 32,
36743 .dcache_bsize = 32,
36744 .cpu_setup = __setup_cpu_603,
36745 + .machine_check = machine_check_generic,
36746 .platform = "ppc603",
36749 @@ -436,6 +462,7 @@
36750 .icache_bsize = 32,
36751 .dcache_bsize = 32,
36752 .cpu_setup = __setup_cpu_603,
36753 + .machine_check = machine_check_generic,
36754 .platform = "ppc603",
36757 @@ -447,6 +474,7 @@
36758 .icache_bsize = 32,
36759 .dcache_bsize = 32,
36760 .cpu_setup = __setup_cpu_603,
36761 + .machine_check = machine_check_generic,
36762 .platform = "ppc603",
36765 @@ -459,6 +487,7 @@
36766 .dcache_bsize = 32,
36768 .cpu_setup = __setup_cpu_604,
36769 + .machine_check = machine_check_generic,
36770 .platform = "ppc604",
36773 @@ -471,6 +500,7 @@
36774 .dcache_bsize = 32,
36776 .cpu_setup = __setup_cpu_604,
36777 + .machine_check = machine_check_generic,
36778 .platform = "ppc604",
36781 @@ -483,6 +513,7 @@
36782 .dcache_bsize = 32,
36784 .cpu_setup = __setup_cpu_604,
36785 + .machine_check = machine_check_generic,
36786 .platform = "ppc604",
36789 @@ -495,6 +526,7 @@
36790 .dcache_bsize = 32,
36792 .cpu_setup = __setup_cpu_604,
36793 + .machine_check = machine_check_generic,
36794 .platform = "ppc604",
36796 { /* 740/750 (0x4202, don't support TAU ?) */
36797 @@ -507,6 +539,7 @@
36798 .dcache_bsize = 32,
36800 .cpu_setup = __setup_cpu_750,
36801 + .machine_check = machine_check_generic,
36802 .platform = "ppc750",
36804 { /* 750CX (80100 and 8010x?) */
36805 @@ -519,6 +552,7 @@
36806 .dcache_bsize = 32,
36808 .cpu_setup = __setup_cpu_750cx,
36809 + .machine_check = machine_check_generic,
36810 .platform = "ppc750",
36812 { /* 750CX (82201 and 82202) */
36813 @@ -531,6 +565,7 @@
36814 .dcache_bsize = 32,
36816 .cpu_setup = __setup_cpu_750cx,
36817 + .machine_check = machine_check_generic,
36818 .platform = "ppc750",
36820 { /* 750CXe (82214) */
36821 @@ -543,6 +578,7 @@
36822 .dcache_bsize = 32,
36824 .cpu_setup = __setup_cpu_750cx,
36825 + .machine_check = machine_check_generic,
36826 .platform = "ppc750",
36828 { /* 750CXe "Gekko" (83214) */
36829 @@ -555,6 +591,7 @@
36830 .dcache_bsize = 32,
36832 .cpu_setup = __setup_cpu_750cx,
36833 + .machine_check = machine_check_generic,
36834 .platform = "ppc750",
36837 @@ -567,6 +604,7 @@
36838 .dcache_bsize = 32,
36840 .cpu_setup = __setup_cpu_750,
36841 + .machine_check = machine_check_generic,
36842 .platform = "ppc750",
36845 @@ -579,6 +617,7 @@
36846 .dcache_bsize = 32,
36848 .cpu_setup = __setup_cpu_750,
36849 + .machine_check = machine_check_generic,
36850 .platform = "ppc750",
36852 { /* 750FX rev 1.x */
36853 @@ -591,6 +630,7 @@
36854 .dcache_bsize = 32,
36856 .cpu_setup = __setup_cpu_750,
36857 + .machine_check = machine_check_generic,
36858 .platform = "ppc750",
36860 { /* 750FX rev 2.0 must disable HID0[DPM] */
36861 @@ -603,6 +643,7 @@
36862 .dcache_bsize = 32,
36864 .cpu_setup = __setup_cpu_750,
36865 + .machine_check = machine_check_generic,
36866 .platform = "ppc750",
36868 { /* 750FX (All revs except 2.0) */
36869 @@ -615,6 +656,7 @@
36870 .dcache_bsize = 32,
36872 .cpu_setup = __setup_cpu_750fx,
36873 + .machine_check = machine_check_generic,
36874 .platform = "ppc750",
36877 @@ -627,6 +669,7 @@
36878 .dcache_bsize = 32,
36880 .cpu_setup = __setup_cpu_750fx,
36881 + .machine_check = machine_check_generic,
36882 .platform = "ppc750",
36884 { /* 740/750 (L2CR bit need fixup for 740) */
36885 @@ -639,6 +682,7 @@
36886 .dcache_bsize = 32,
36888 .cpu_setup = __setup_cpu_750,
36889 + .machine_check = machine_check_generic,
36890 .platform = "ppc750",
36892 { /* 7400 rev 1.1 ? (no TAU) */
36893 @@ -652,6 +696,7 @@
36894 .dcache_bsize = 32,
36896 .cpu_setup = __setup_cpu_7400,
36897 + .machine_check = machine_check_generic,
36898 .platform = "ppc7400",
36901 @@ -665,6 +710,7 @@
36902 .dcache_bsize = 32,
36904 .cpu_setup = __setup_cpu_7400,
36905 + .machine_check = machine_check_generic,
36906 .platform = "ppc7400",
36909 @@ -678,6 +724,7 @@
36910 .dcache_bsize = 32,
36912 .cpu_setup = __setup_cpu_7410,
36913 + .machine_check = machine_check_generic,
36914 .platform = "ppc7400",
36916 { /* 7450 2.0 - no doze/nap */
36917 @@ -693,6 +740,7 @@
36918 .cpu_setup = __setup_cpu_745x,
36919 .oprofile_cpu_type = "ppc/7450",
36920 .oprofile_type = PPC_OPROFILE_G4,
36921 + .machine_check = machine_check_generic,
36922 .platform = "ppc7450",
36925 @@ -708,6 +756,7 @@
36926 .cpu_setup = __setup_cpu_745x,
36927 .oprofile_cpu_type = "ppc/7450",
36928 .oprofile_type = PPC_OPROFILE_G4,
36929 + .machine_check = machine_check_generic,
36930 .platform = "ppc7450",
36932 { /* 7450 2.3 and newer */
36933 @@ -723,6 +772,7 @@
36934 .cpu_setup = __setup_cpu_745x,
36935 .oprofile_cpu_type = "ppc/7450",
36936 .oprofile_type = PPC_OPROFILE_G4,
36937 + .machine_check = machine_check_generic,
36938 .platform = "ppc7450",
36940 { /* 7455 rev 1.x */
36941 @@ -738,6 +788,7 @@
36942 .cpu_setup = __setup_cpu_745x,
36943 .oprofile_cpu_type = "ppc/7450",
36944 .oprofile_type = PPC_OPROFILE_G4,
36945 + .machine_check = machine_check_generic,
36946 .platform = "ppc7450",
36948 { /* 7455 rev 2.0 */
36949 @@ -753,6 +804,7 @@
36950 .cpu_setup = __setup_cpu_745x,
36951 .oprofile_cpu_type = "ppc/7450",
36952 .oprofile_type = PPC_OPROFILE_G4,
36953 + .machine_check = machine_check_generic,
36954 .platform = "ppc7450",
36956 { /* 7455 others */
36957 @@ -768,6 +820,7 @@
36958 .cpu_setup = __setup_cpu_745x,
36959 .oprofile_cpu_type = "ppc/7450",
36960 .oprofile_type = PPC_OPROFILE_G4,
36961 + .machine_check = machine_check_generic,
36962 .platform = "ppc7450",
36964 { /* 7447/7457 Rev 1.0 */
36965 @@ -783,6 +836,7 @@
36966 .cpu_setup = __setup_cpu_745x,
36967 .oprofile_cpu_type = "ppc/7450",
36968 .oprofile_type = PPC_OPROFILE_G4,
36969 + .machine_check = machine_check_generic,
36970 .platform = "ppc7450",
36972 { /* 7447/7457 Rev 1.1 */
36973 @@ -798,6 +852,7 @@
36974 .cpu_setup = __setup_cpu_745x,
36975 .oprofile_cpu_type = "ppc/7450",
36976 .oprofile_type = PPC_OPROFILE_G4,
36977 + .machine_check = machine_check_generic,
36978 .platform = "ppc7450",
36980 { /* 7447/7457 Rev 1.2 and later */
36981 @@ -812,6 +867,7 @@
36982 .cpu_setup = __setup_cpu_745x,
36983 .oprofile_cpu_type = "ppc/7450",
36984 .oprofile_type = PPC_OPROFILE_G4,
36985 + .machine_check = machine_check_generic,
36986 .platform = "ppc7450",
36989 @@ -827,6 +883,7 @@
36990 .cpu_setup = __setup_cpu_745x,
36991 .oprofile_cpu_type = "ppc/7450",
36992 .oprofile_type = PPC_OPROFILE_G4,
36993 + .machine_check = machine_check_generic,
36994 .platform = "ppc7450",
36997 @@ -842,6 +899,7 @@
36998 .cpu_setup = __setup_cpu_745x,
36999 .oprofile_cpu_type = "ppc/7450",
37000 .oprofile_type = PPC_OPROFILE_G4,
37001 + .machine_check = machine_check_generic,
37002 .platform = "ppc7450",
37004 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
37005 @@ -853,6 +911,7 @@
37006 .icache_bsize = 32,
37007 .dcache_bsize = 32,
37008 .cpu_setup = __setup_cpu_603,
37009 + .machine_check = machine_check_generic,
37010 .platform = "ppc603",
37012 { /* All G2_LE (603e core, plus some) have the same pvr */
37013 @@ -864,6 +923,7 @@
37014 .icache_bsize = 32,
37015 .dcache_bsize = 32,
37016 .cpu_setup = __setup_cpu_603,
37017 + .machine_check = machine_check_generic,
37018 .platform = "ppc603",
37020 { /* e300c1 (a 603e core, plus some) on 83xx */
37021 @@ -875,6 +935,7 @@
37022 .icache_bsize = 32,
37023 .dcache_bsize = 32,
37024 .cpu_setup = __setup_cpu_603,
37025 + .machine_check = machine_check_generic,
37026 .platform = "ppc603",
37028 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
37029 @@ -886,9 +947,10 @@
37030 .icache_bsize = 32,
37031 .dcache_bsize = 32,
37032 .cpu_setup = __setup_cpu_603,
37033 + .machine_check = machine_check_generic,
37034 .platform = "ppc603",
37036 - { /* e300c3 on 83xx */
37037 + { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
37038 .pvr_mask = 0x7fff0000,
37039 .pvr_value = 0x00850000,
37040 .cpu_name = "e300c3",
37041 @@ -899,6 +961,18 @@
37042 .cpu_setup = __setup_cpu_603,
37043 .platform = "ppc603",
37045 + { /* e300c4 (e300c1, plus one IU) */
37046 + .pvr_mask = 0x7fff0000,
37047 + .pvr_value = 0x00860000,
37048 + .cpu_name = "e300c4",
37049 + .cpu_features = CPU_FTRS_E300,
37050 + .cpu_user_features = COMMON_USER,
37051 + .icache_bsize = 32,
37052 + .dcache_bsize = 32,
37053 + .cpu_setup = __setup_cpu_603,
37054 + .machine_check = machine_check_generic,
37055 + .platform = "ppc603",
37057 { /* default match, we assume split I/D cache & TB (non-601)... */
37058 .pvr_mask = 0x00000000,
37059 .pvr_value = 0x00000000,
37060 @@ -907,6 +981,7 @@
37061 .cpu_user_features = COMMON_USER,
37062 .icache_bsize = 32,
37063 .dcache_bsize = 32,
37064 + .machine_check = machine_check_generic,
37065 .platform = "ppc603",
37067 #endif /* CLASSIC_PPC */
37068 @@ -933,6 +1008,7 @@
37069 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
37070 .icache_bsize = 16,
37071 .dcache_bsize = 16,
37072 + .machine_check = machine_check_4xx,
37073 .platform = "ppc403",
37076 @@ -944,6 +1020,7 @@
37077 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
37078 .icache_bsize = 16,
37079 .dcache_bsize = 16,
37080 + .machine_check = machine_check_4xx,
37081 .platform = "ppc403",
37084 @@ -954,6 +1031,7 @@
37085 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
37086 .icache_bsize = 16,
37087 .dcache_bsize = 16,
37088 + .machine_check = machine_check_4xx,
37089 .platform = "ppc403",
37092 @@ -965,6 +1043,7 @@
37093 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37094 .icache_bsize = 32,
37095 .dcache_bsize = 32,
37096 + .machine_check = machine_check_4xx,
37097 .platform = "ppc405",
37100 @@ -976,6 +1055,7 @@
37101 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37102 .icache_bsize = 32,
37103 .dcache_bsize = 32,
37104 + .machine_check = machine_check_4xx,
37105 .platform = "ppc405",
37108 @@ -987,6 +1067,7 @@
37109 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37110 .icache_bsize = 32,
37111 .dcache_bsize = 32,
37112 + .machine_check = machine_check_4xx,
37113 .platform = "ppc405",
37116 @@ -998,6 +1079,7 @@
37117 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37118 .icache_bsize = 32,
37119 .dcache_bsize = 32,
37120 + .machine_check = machine_check_4xx,
37121 .platform = "ppc405",
37124 @@ -1009,6 +1091,7 @@
37125 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37126 .icache_bsize = 32,
37127 .dcache_bsize = 32,
37128 + .machine_check = machine_check_4xx,
37129 .platform = "ppc405",
37132 @@ -1020,6 +1103,7 @@
37133 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37134 .icache_bsize = 32,
37135 .dcache_bsize = 32,
37136 + .machine_check = machine_check_4xx,
37137 .platform = "ppc405",
37140 @@ -1031,6 +1115,7 @@
37141 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37142 .icache_bsize = 32,
37143 .dcache_bsize = 32,
37144 + .machine_check = machine_check_4xx,
37145 .platform = "ppc405",
37148 @@ -1042,6 +1127,7 @@
37149 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37150 .icache_bsize = 32,
37151 .dcache_bsize = 32,
37152 + .machine_check = machine_check_4xx,
37153 .platform = "ppc405",
37156 @@ -1052,6 +1138,7 @@
37157 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
37158 .icache_bsize = 32,
37159 .dcache_bsize = 32,
37160 + .machine_check = machine_check_4xx,
37161 .platform = "ppc405",
37163 { /* Xilinx Virtex-II Pro */
37164 @@ -1063,6 +1150,7 @@
37165 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37166 .icache_bsize = 32,
37167 .dcache_bsize = 32,
37168 + .machine_check = machine_check_4xx,
37169 .platform = "ppc405",
37171 { /* Xilinx Virtex-4 FX */
37172 @@ -1074,6 +1162,7 @@
37173 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37174 .icache_bsize = 32,
37175 .dcache_bsize = 32,
37176 + .machine_check = machine_check_4xx,
37177 .platform = "ppc405",
37180 @@ -1085,17 +1174,31 @@
37181 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37182 .icache_bsize = 32,
37183 .dcache_bsize = 32,
37184 + .machine_check = machine_check_4xx,
37185 .platform = "ppc405",
37188 - .pvr_mask = 0xffff0000,
37189 - .pvr_value = 0x12910000,
37190 + .pvr_mask = 0xffff0004,
37191 + .pvr_value = 0x12910004,
37192 .cpu_name = "405EX",
37193 .cpu_features = CPU_FTRS_40X,
37194 .cpu_user_features = PPC_FEATURE_32 |
37195 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37196 .icache_bsize = 32,
37197 .dcache_bsize = 32,
37198 + .machine_check = machine_check_4xx,
37199 + .platform = "ppc405",
37202 + .pvr_mask = 0xffff0004,
37203 + .pvr_value = 0x12910000,
37204 + .cpu_name = "405EXr",
37205 + .cpu_features = CPU_FTRS_40X,
37206 + .cpu_user_features = PPC_FEATURE_32 |
37207 + PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37208 + .icache_bsize = 32,
37209 + .dcache_bsize = 32,
37210 + .machine_check = machine_check_4xx,
37211 .platform = "ppc405",
37214 @@ -1109,6 +1212,7 @@
37215 .cpu_user_features = COMMON_USER_BOOKE,
37216 .icache_bsize = 32,
37217 .dcache_bsize = 32,
37218 + .machine_check = machine_check_4xx,
37219 .platform = "ppc440",
37221 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
37222 @@ -1120,6 +1224,7 @@
37223 .icache_bsize = 32,
37224 .dcache_bsize = 32,
37225 .cpu_setup = __setup_cpu_440ep,
37226 + .machine_check = machine_check_4xx,
37227 .platform = "ppc440",
37230 @@ -1130,6 +1235,19 @@
37231 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
37232 .icache_bsize = 32,
37233 .dcache_bsize = 32,
37234 + .machine_check = machine_check_4xx,
37235 + .platform = "ppc440",
37237 + { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
37238 + .pvr_mask = 0xf0000ff7,
37239 + .pvr_value = 0x400008d4,
37240 + .cpu_name = "440EP Rev. C",
37241 + .cpu_features = CPU_FTRS_44X,
37242 + .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
37243 + .icache_bsize = 32,
37244 + .dcache_bsize = 32,
37245 + .cpu_setup = __setup_cpu_440ep,
37246 + .machine_check = machine_check_4xx,
37247 .platform = "ppc440",
37249 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
37250 @@ -1141,6 +1259,7 @@
37251 .icache_bsize = 32,
37252 .dcache_bsize = 32,
37253 .cpu_setup = __setup_cpu_440ep,
37254 + .machine_check = machine_check_4xx,
37255 .platform = "ppc440",
37258 @@ -1152,6 +1271,7 @@
37259 .icache_bsize = 32,
37260 .dcache_bsize = 32,
37261 .cpu_setup = __setup_cpu_440grx,
37262 + .machine_check = machine_check_440A,
37263 .platform = "ppc440",
37265 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
37266 @@ -1163,6 +1283,7 @@
37267 .icache_bsize = 32,
37268 .dcache_bsize = 32,
37269 .cpu_setup = __setup_cpu_440epx,
37270 + .machine_check = machine_check_440A,
37271 .platform = "ppc440",
37273 { /* 440GP Rev. B */
37274 @@ -1173,6 +1294,7 @@
37275 .cpu_user_features = COMMON_USER_BOOKE,
37276 .icache_bsize = 32,
37277 .dcache_bsize = 32,
37278 + .machine_check = machine_check_4xx,
37279 .platform = "ppc440gp",
37281 { /* 440GP Rev. C */
37282 @@ -1183,6 +1305,7 @@
37283 .cpu_user_features = COMMON_USER_BOOKE,
37284 .icache_bsize = 32,
37285 .dcache_bsize = 32,
37286 + .machine_check = machine_check_4xx,
37287 .platform = "ppc440gp",
37289 { /* 440GX Rev. A */
37290 @@ -1193,6 +1316,8 @@
37291 .cpu_user_features = COMMON_USER_BOOKE,
37292 .icache_bsize = 32,
37293 .dcache_bsize = 32,
37294 + .cpu_setup = __setup_cpu_440gx,
37295 + .machine_check = machine_check_440A,
37296 .platform = "ppc440",
37298 { /* 440GX Rev. B */
37299 @@ -1203,6 +1328,8 @@
37300 .cpu_user_features = COMMON_USER_BOOKE,
37301 .icache_bsize = 32,
37302 .dcache_bsize = 32,
37303 + .cpu_setup = __setup_cpu_440gx,
37304 + .machine_check = machine_check_440A,
37305 .platform = "ppc440",
37307 { /* 440GX Rev. C */
37308 @@ -1213,6 +1340,8 @@
37309 .cpu_user_features = COMMON_USER_BOOKE,
37310 .icache_bsize = 32,
37311 .dcache_bsize = 32,
37312 + .cpu_setup = __setup_cpu_440gx,
37313 + .machine_check = machine_check_440A,
37314 .platform = "ppc440",
37316 { /* 440GX Rev. F */
37317 @@ -1223,6 +1352,8 @@
37318 .cpu_user_features = COMMON_USER_BOOKE,
37319 .icache_bsize = 32,
37320 .dcache_bsize = 32,
37321 + .cpu_setup = __setup_cpu_440gx,
37322 + .machine_check = machine_check_440A,
37323 .platform = "ppc440",
37325 { /* 440SP Rev. A */
37326 @@ -1233,6 +1364,7 @@
37327 .cpu_user_features = COMMON_USER_BOOKE,
37328 .icache_bsize = 32,
37329 .dcache_bsize = 32,
37330 + .machine_check = machine_check_4xx,
37331 .platform = "ppc440",
37333 { /* 440SPe Rev. A */
37334 @@ -1243,6 +1375,8 @@
37335 .cpu_user_features = COMMON_USER_BOOKE,
37336 .icache_bsize = 32,
37337 .dcache_bsize = 32,
37338 + .cpu_setup = __setup_cpu_440spe,
37339 + .machine_check = machine_check_440A,
37340 .platform = "ppc440",
37342 { /* 440SPe Rev. B */
37343 @@ -1253,10 +1387,13 @@
37344 .cpu_user_features = COMMON_USER_BOOKE,
37345 .icache_bsize = 32,
37346 .dcache_bsize = 32,
37347 + .cpu_setup = __setup_cpu_440spe,
37348 + .machine_check = machine_check_440A,
37349 .platform = "ppc440",
37351 #endif /* CONFIG_44x */
37352 #ifdef CONFIG_FSL_BOOKE
37353 +#ifdef CONFIG_E200
37355 .pvr_mask = 0xfff00000,
37356 .pvr_value = 0x81000000,
37357 @@ -1267,6 +1404,7 @@
37358 PPC_FEATURE_HAS_EFP_SINGLE |
37359 PPC_FEATURE_UNIFIED_CACHE,
37360 .dcache_bsize = 32,
37361 + .machine_check = machine_check_e200,
37362 .platform = "ppc5554",
37365 @@ -1280,8 +1418,10 @@
37366 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
37367 PPC_FEATURE_UNIFIED_CACHE,
37368 .dcache_bsize = 32,
37369 + .machine_check = machine_check_e200,
37370 .platform = "ppc5554",
37372 +#elif defined(CONFIG_E500)
37374 .pvr_mask = 0xffff0000,
37375 .pvr_value = 0x80200000,
37376 @@ -1296,6 +1436,7 @@
37378 .oprofile_cpu_type = "ppc/e500",
37379 .oprofile_type = PPC_OPROFILE_BOOKE,
37380 + .machine_check = machine_check_e500,
37381 .platform = "ppc8540",
37384 @@ -1313,9 +1454,11 @@
37386 .oprofile_cpu_type = "ppc/e500",
37387 .oprofile_type = PPC_OPROFILE_BOOKE,
37388 + .machine_check = machine_check_e500,
37389 .platform = "ppc8548",
37394 { /* default match */
37395 .pvr_mask = 0x00000000,
37396 --- a/arch/powerpc/kernel/crash.c
37397 +++ b/arch/powerpc/kernel/crash.c
37399 #include <asm/lmb.h>
37400 #include <asm/firmware.h>
37401 #include <asm/smp.h>
37402 +#include <asm/system.h>
37403 +#include <asm/setjmp.h>
37406 #include <asm/udbg.h>
37408 static cpumask_t cpus_in_crash = CPU_MASK_NONE;
37409 cpumask_t cpus_in_sr = CPU_MASK_NONE;
37411 +#define CRASH_HANDLER_MAX 1
37412 +/* NULL terminated list of shutdown handles */
37413 +static crash_shutdown_t crash_shutdown_handles[CRASH_HANDLER_MAX+1];
37414 +static DEFINE_SPINLOCK(crash_handlers_lock);
37417 static atomic_t enter_on_soft_reset = ATOMIC_INIT(0);
37419 @@ -285,9 +292,72 @@
37421 #endif /* CONFIG_SPU_BASE */
37424 + * Register a function to be called on shutdown. Only use this if you
37425 + * can't reset your device in the second kernel.
37427 +int crash_shutdown_register(crash_shutdown_t handler)
37429 + unsigned int i, rc;
37431 + spin_lock(&crash_handlers_lock);
37432 + for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
37433 + if (!crash_shutdown_handles[i]) {
37434 + /* Insert handle at first empty entry */
37435 + crash_shutdown_handles[i] = handler;
37440 + if (i == CRASH_HANDLER_MAX) {
37441 + printk(KERN_ERR "Crash shutdown handles full, "
37442 + "not registered.\n");
37446 + spin_unlock(&crash_handlers_lock);
37449 +EXPORT_SYMBOL(crash_shutdown_register);
37451 +int crash_shutdown_unregister(crash_shutdown_t handler)
37453 + unsigned int i, rc;
37455 + spin_lock(&crash_handlers_lock);
37456 + for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
37457 + if (crash_shutdown_handles[i] == handler)
37460 + if (i == CRASH_HANDLER_MAX) {
37461 + printk(KERN_ERR "Crash shutdown handle not found\n");
37464 + /* Shift handles down */
37465 + for (; crash_shutdown_handles[i]; i++)
37466 + crash_shutdown_handles[i] =
37467 + crash_shutdown_handles[i+1];
37471 + spin_unlock(&crash_handlers_lock);
37474 +EXPORT_SYMBOL(crash_shutdown_unregister);
37476 +static unsigned long crash_shutdown_buf[JMP_BUF_LEN];
37478 +static int handle_fault(struct pt_regs *regs)
37480 + longjmp(crash_shutdown_buf, 1);
37484 void default_machine_crash_shutdown(struct pt_regs *regs)
37486 - unsigned int irq;
37488 + int (*old_handler)(struct pt_regs *regs);
37492 * This function is only called after the system
37493 @@ -301,15 +371,36 @@
37495 hard_irq_disable();
37497 - for_each_irq(irq) {
37498 - struct irq_desc *desc = irq_desc + irq;
37499 + for_each_irq(i) {
37500 + struct irq_desc *desc = irq_desc + i;
37502 if (desc->status & IRQ_INPROGRESS)
37503 - desc->chip->eoi(irq);
37504 + desc->chip->eoi(i);
37506 if (!(desc->status & IRQ_DISABLED))
37507 - desc->chip->disable(irq);
37508 + desc->chip->disable(i);
37512 + * Call registered shutdown routines savely. Swap out
37513 + * __debugger_fault_handler, and replace on exit.
37515 + old_handler = __debugger_fault_handler;
37516 + __debugger_fault_handler = handle_fault;
37517 + for (i = 0; crash_shutdown_handles[i]; i++) {
37518 + if (setjmp(crash_shutdown_buf) == 0) {
37520 + * Insert syncs and delay to ensure
37521 + * instructions in the dangerous region don't
37522 + * leak away from this protected region.
37524 + asm volatile("sync; isync");
37525 + /* dangerous region */
37526 + crash_shutdown_handles[i]();
37527 + asm volatile("sync; isync");
37530 + __debugger_fault_handler = old_handler;
37533 * Make a note of crashing cpu. Will be used in machine_kexec
37534 --- a/arch/powerpc/kernel/dma_64.c
37535 +++ b/arch/powerpc/kernel/dma_64.c
37536 @@ -112,10 +112,16 @@
37538 * Generic direct DMA implementation
37540 - * This implementation supports a global offset that can be applied if
37541 - * the address at which memory is visible to devices is not 0.
37542 + * This implementation supports a per-device offset that can be applied if
37543 + * the address at which memory is visible to devices is not 0. Platform code
37544 + * can set archdata.dma_data to an unsigned long holding the offset. By
37545 + * default the offset is zero.
37547 -unsigned long dma_direct_offset;
37549 +static unsigned long get_dma_direct_offset(struct device *dev)
37551 + return (unsigned long)dev->archdata.dma_data;
37554 static void *dma_direct_alloc_coherent(struct device *dev, size_t size,
37555 dma_addr_t *dma_handle, gfp_t flag)
37556 @@ -124,13 +130,12 @@
37558 int node = dev->archdata.numa_node;
37560 - /* TODO: Maybe use the numa node here too ? */
37561 page = alloc_pages_node(node, flag, get_order(size));
37564 ret = page_address(page);
37565 memset(ret, 0, size);
37566 - *dma_handle = virt_to_abs(ret) | dma_direct_offset;
37567 + *dma_handle = virt_to_abs(ret) + get_dma_direct_offset(dev);
37571 @@ -145,7 +150,7 @@
37573 enum dma_data_direction direction)
37575 - return virt_to_abs(ptr) | dma_direct_offset;
37576 + return virt_to_abs(ptr) + get_dma_direct_offset(dev);
37579 static void dma_direct_unmap_single(struct device *dev, dma_addr_t dma_addr,
37580 @@ -161,7 +166,7 @@
37583 for_each_sg(sgl, sg, nents, i) {
37584 - sg->dma_address = sg_phys(sg) | dma_direct_offset;
37585 + sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev);
37586 sg->dma_length = sg->length;
37589 --- a/arch/powerpc/kernel/head_44x.S
37590 +++ b/arch/powerpc/kernel/head_44x.S
37591 @@ -289,11 +289,8 @@
37592 CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception)
37594 /* Machine Check Interrupt */
37595 -#ifdef CONFIG_440A
37596 - MCHECK_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
37598 CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
37600 + MCHECK_EXCEPTION(0x0210, MachineCheckA, machine_check_exception)
37602 /* Data Storage Interrupt */
37603 START_EXCEPTION(DataStorage)
37604 @@ -674,6 +671,15 @@
37608 + * Adjust the machine check IVOR on 440A cores
37610 +_GLOBAL(__fixup_440A_mcheck)
37611 + li r3,MachineCheckA@l
37612 + mtspr SPRN_IVOR1,r3
37617 * extern void giveup_altivec(struct task_struct *prev)
37619 * The 44x core does not have an AltiVec unit.
37620 --- a/arch/powerpc/kernel/head_booke.h
37621 +++ b/arch/powerpc/kernel/head_booke.h
37622 @@ -166,7 +166,7 @@
37623 mfspr r5,SPRN_ESR; \
37624 stw r5,_ESR(r11); \
37625 addi r3,r1,STACK_FRAME_OVERHEAD; \
37626 - EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
37627 + EXC_XFER_TEMPLATE(hdlr, n+4, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
37628 NOCOPY, mcheck_transfer_to_handler, \
37629 ret_from_mcheck_exc)
37631 --- a/arch/powerpc/kernel/head_fsl_booke.S
37632 +++ b/arch/powerpc/kernel/head_fsl_booke.S
37634 /* We try to not make any assumptions about how the boot loader
37635 * setup or used the TLBs. We invalidate all mappings from the
37636 * boot loader and load a single entry in TLB1[0] to map the
37637 - * first 16M of kernel memory. Any boot info passed from the
37638 - * bootloader needs to live in this first 16M.
37639 + * first 64M of kernel memory. Any boot info passed from the
37640 + * bootloader needs to live in this first 64M.
37642 * Requirement on bootloader:
37643 * - The page we're executing in needs to reside in TLB1 and
37644 @@ -167,7 +167,7 @@
37648 - /* Just modify the entry ID and EPN for the temp mapping */
37649 + /* Just modify the entry ID, EPN and RPN for the temp mapping */
37650 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
37651 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
37653 @@ -177,9 +177,12 @@
37654 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_4K))@l
37657 - li r7,0 /* temp EPN = 0 */
37658 + lis r7,PHYSICAL_START@h
37659 rlwimi r7,r6,0,20,31
37661 + mfspr r6,SPRN_MAS3
37662 + rlwimi r7,r6,0,20,31
37663 + mtspr SPRN_MAS3,r7
37667 @@ -222,11 +225,11 @@
37668 lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */
37670 lis r6,(MAS1_VALID|MAS1_IPROT)@h
37671 - ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_16M))@l
37672 + ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_64M))@l
37675 - lis r6,KERNELBASE@h
37676 - ori r6,r6,KERNELBASE@l
37677 + lis r6,PAGE_OFFSET@h
37678 + ori r6,r6,PAGE_OFFSET@l
37679 rlwimi r6,r7,0,20,31
37681 li r7,(MAS3_SX|MAS3_SW|MAS3_SR)
37682 @@ -234,6 +237,9 @@
37685 /* 7. Jump to KERNELBASE mapping */
37686 + lis r6,KERNELBASE@h
37687 + ori r6,r6,KERNELBASE@l
37688 + rlwimi r6,r7,0,20,31
37689 lis r7,MSR_KERNEL@h
37690 ori r7,r7,MSR_KERNEL@l
37691 bl 1f /* Find our address */
37692 --- a/arch/powerpc/kernel/ibmebus.c
37693 +++ b/arch/powerpc/kernel/ibmebus.c
37695 #include <linux/kobject.h>
37696 #include <linux/dma-mapping.h>
37697 #include <linux/interrupt.h>
37698 +#include <linux/of.h>
37699 #include <linux/of_platform.h>
37700 #include <asm/ibmebus.h>
37701 #include <asm/abs_addr.h>
37703 struct bus_type ibmebus_bus_type;
37705 /* These devices will automatically be added to the bus during init */
37706 -static struct of_device_id builtin_matches[] = {
37707 +static struct of_device_id __initdata builtin_matches[] = {
37708 { .compatible = "IBM,lhca" },
37709 { .compatible = "IBM,lhea" },
37711 @@ -171,7 +172,7 @@
37713 root = of_find_node_by_path("/");
37715 - for (child = NULL; (child = of_get_next_child(root, child)); ) {
37716 + for_each_child_of_node(root, child) {
37717 if (!of_match_node(matches, child))
37720 @@ -197,16 +198,13 @@
37721 /* If the driver uses devices that ibmebus doesn't know, add them */
37722 ibmebus_create_devices(drv->match_table);
37724 - drv->driver.name = drv->name;
37725 - drv->driver.bus = &ibmebus_bus_type;
37727 - return driver_register(&drv->driver);
37728 + return of_register_driver(drv, &ibmebus_bus_type);
37730 EXPORT_SYMBOL(ibmebus_register_driver);
37732 void ibmebus_unregister_driver(struct of_platform_driver *drv)
37734 - driver_unregister(&drv->driver);
37735 + of_unregister_driver(drv);
37737 EXPORT_SYMBOL(ibmebus_unregister_driver);
37739 --- a/arch/powerpc/kernel/iommu.c
37740 +++ b/arch/powerpc/kernel/iommu.c
37741 @@ -532,16 +532,14 @@
37745 -void iommu_free_table(struct device_node *dn)
37746 +void iommu_free_table(struct iommu_table *tbl, const char *node_name)
37748 - struct pci_dn *pdn = dn->data;
37749 - struct iommu_table *tbl = pdn->iommu_table;
37750 unsigned long bitmap_sz, i;
37751 unsigned int order;
37753 if (!tbl || !tbl->it_map) {
37754 printk(KERN_ERR "%s: expected TCE map for %s\n", __FUNCTION__,
37760 @@ -550,7 +548,7 @@
37761 for (i = 0; i < (tbl->it_size/64); i++) {
37762 if (tbl->it_map[i] != 0) {
37763 printk(KERN_WARNING "%s: Unexpected TCEs for %s\n",
37764 - __FUNCTION__, dn->full_name);
37765 + __FUNCTION__, node_name);
37769 --- a/arch/powerpc/kernel/isa-bridge.c
37770 +++ b/arch/powerpc/kernel/isa-bridge.c
37771 @@ -108,7 +108,7 @@
37772 if (size > 0x10000)
37775 - printk(KERN_ERR "no ISA IO ranges or unexpected isa range,"
37776 + printk(KERN_ERR "no ISA IO ranges or unexpected isa range, "
37779 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
37780 @@ -116,7 +116,7 @@
37784 - printk(KERN_ERR "no ISA IO ranges or unexpected isa range,"
37785 + printk(KERN_ERR "no ISA IO ranges or unexpected isa range, "
37787 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
37788 0x10000, _PAGE_NO_CACHE|_PAGE_GUARDED);
37789 @@ -145,7 +145,7 @@
37790 for_each_node_by_type(np, "isa") {
37791 /* Look for our hose being a parent */
37792 for (parent = of_get_parent(np); parent;) {
37793 - if (parent == hose->arch_data) {
37794 + if (parent == hose->dn) {
37795 of_node_put(parent);
37798 --- a/arch/powerpc/kernel/legacy_serial.c
37799 +++ b/arch/powerpc/kernel/legacy_serial.c
37800 @@ -307,7 +307,7 @@
37803 /* First fill our array with SOC ports */
37804 - for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) {
37805 + for_each_compatible_node(np, "serial", "ns16550") {
37806 struct device_node *soc = of_get_parent(np);
37807 if (soc && !strcmp(soc->type, "soc")) {
37808 index = add_legacy_soc_port(np, np);
37809 @@ -318,7 +318,7 @@
37812 /* First fill our array with ISA ports */
37813 - for (np = NULL; (np = of_find_node_by_type(np, "serial"));) {
37814 + for_each_node_by_type(np, "serial") {
37815 struct device_node *isa = of_get_parent(np);
37816 if (isa && !strcmp(isa->name, "isa")) {
37817 index = add_legacy_isa_port(np, isa);
37818 @@ -329,7 +329,7 @@
37821 /* First fill our array with tsi-bridge ports */
37822 - for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) {
37823 + for_each_compatible_node(np, "serial", "ns16550") {
37824 struct device_node *tsi = of_get_parent(np);
37825 if (tsi && !strcmp(tsi->type, "tsi-bridge")) {
37826 index = add_legacy_soc_port(np, np);
37827 @@ -340,7 +340,7 @@
37830 /* First fill our array with opb bus ports */
37831 - for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) {
37832 + for_each_compatible_node(np, "serial", "ns16550") {
37833 struct device_node *opb = of_get_parent(np);
37834 if (opb && (!strcmp(opb->type, "opb") ||
37835 of_device_is_compatible(opb, "ibm,opb"))) {
37836 @@ -474,7 +474,7 @@
37839 * Before we register the platfrom serial devices, we need
37840 - * to fixup their interrutps and their IO ports.
37841 + * to fixup their interrupts and their IO ports.
37843 DBG("Fixing serial ports interrupts and IO ports ...\n");
37845 --- a/arch/powerpc/kernel/lparcfg.c
37846 +++ b/arch/powerpc/kernel/lparcfg.c
37848 /* #define LPARCFG_DEBUG */
37850 static struct proc_dir_entry *proc_ppc64_lparcfg;
37851 -#define LPARCFG_BUFF_SIZE 4096
37854 * Track sum of all purrs across all processors. This is used to further
37855 @@ -595,13 +594,6 @@
37856 ent = create_proc_entry("ppc64/lparcfg", mode, NULL);
37858 ent->proc_fops = &lparcfg_fops;
37859 - ent->data = kmalloc(LPARCFG_BUFF_SIZE, GFP_KERNEL);
37860 - if (!ent->data) {
37862 - "Failed to allocate buffer for lparcfg\n");
37863 - remove_proc_entry("lparcfg", ent->parent);
37867 printk(KERN_ERR "Failed to create ppc64/lparcfg\n");
37869 @@ -613,10 +605,8 @@
37871 void __exit lparcfg_cleanup(void)
37873 - if (proc_ppc64_lparcfg) {
37874 - kfree(proc_ppc64_lparcfg->data);
37875 + if (proc_ppc64_lparcfg)
37876 remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent);
37880 module_init(lparcfg_init);
37881 --- a/arch/powerpc/kernel/misc.S
37882 +++ b/arch/powerpc/kernel/misc.S
37884 * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
37885 * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
37887 + * setjmp/longjmp code by Paul Mackerras.
37889 * This program is free software; you can redistribute it and/or
37890 * modify it under the terms of the GNU General Public License
37891 * as published by the Free Software Foundation; either version
37892 * 2 of the License, or (at your option) any later version.
37894 #include <asm/ppc_asm.h>
37895 +#include <asm/unistd.h>
37896 +#include <asm/asm-compat.h>
37897 +#include <asm/asm-offsets.h>
37906 +_GLOBAL(kernel_execve)
37907 + li r0,__NR_execve
37916 + PPC_STL r1,SZL(r3)
37917 + PPC_STL r2,2*SZL(r3)
37919 + PPC_STL r0,3*SZL(r3)
37920 + PPC_STL r13,4*SZL(r3)
37921 + PPC_STL r14,5*SZL(r3)
37922 + PPC_STL r15,6*SZL(r3)
37923 + PPC_STL r16,7*SZL(r3)
37924 + PPC_STL r17,8*SZL(r3)
37925 + PPC_STL r18,9*SZL(r3)
37926 + PPC_STL r19,10*SZL(r3)
37927 + PPC_STL r20,11*SZL(r3)
37928 + PPC_STL r21,12*SZL(r3)
37929 + PPC_STL r22,13*SZL(r3)
37930 + PPC_STL r23,14*SZL(r3)
37931 + PPC_STL r24,15*SZL(r3)
37932 + PPC_STL r25,16*SZL(r3)
37933 + PPC_STL r26,17*SZL(r3)
37934 + PPC_STL r27,18*SZL(r3)
37935 + PPC_STL r28,19*SZL(r3)
37936 + PPC_STL r29,20*SZL(r3)
37937 + PPC_STL r30,21*SZL(r3)
37938 + PPC_STL r31,22*SZL(r3)
37946 +1: PPC_LL r13,4*SZL(r3)
37947 + PPC_LL r14,5*SZL(r3)
37948 + PPC_LL r15,6*SZL(r3)
37949 + PPC_LL r16,7*SZL(r3)
37950 + PPC_LL r17,8*SZL(r3)
37951 + PPC_LL r18,9*SZL(r3)
37952 + PPC_LL r19,10*SZL(r3)
37953 + PPC_LL r20,11*SZL(r3)
37954 + PPC_LL r21,12*SZL(r3)
37955 + PPC_LL r22,13*SZL(r3)
37956 + PPC_LL r23,14*SZL(r3)
37957 + PPC_LL r24,15*SZL(r3)
37958 + PPC_LL r25,16*SZL(r3)
37959 + PPC_LL r26,17*SZL(r3)
37960 + PPC_LL r27,18*SZL(r3)
37961 + PPC_LL r28,19*SZL(r3)
37962 + PPC_LL r29,20*SZL(r3)
37963 + PPC_LL r30,21*SZL(r3)
37964 + PPC_LL r31,22*SZL(r3)
37965 + PPC_LL r0,3*SZL(r3)
37968 + PPC_LL r1,SZL(r3)
37969 + PPC_LL r2,2*SZL(r3)
37973 --- a/arch/powerpc/kernel/misc_32.S
37974 +++ b/arch/powerpc/kernel/misc_32.S
37975 @@ -206,6 +206,45 @@
37982 + * Do an IO access in real mode
37984 +_GLOBAL(real_readb)
37987 + xori r0,r0,MSR_DR
38000 + * Do an IO access in real mode
38002 +_GLOBAL(real_writeb)
38005 + xori r0,r0,MSR_DR
38017 +#endif /* CONFIG_40x */
38021 @@ -793,13 +832,6 @@
38025 -_GLOBAL(kernel_execve)
38026 - li r0,__NR_execve
38033 * This routine is just here to keep GCC happy - sigh...
38035 --- a/arch/powerpc/kernel/misc_64.S
38036 +++ b/arch/powerpc/kernel/misc_64.S
38037 @@ -518,13 +518,6 @@
38039 #endif /* CONFIG_ALTIVEC */
38041 -_GLOBAL(kernel_execve)
38042 - li r0,__NR_execve
38048 /* kexec_wait(phys_cpu)
38050 * wait for the flag to change, indicating this kernel is going away but
38051 --- a/arch/powerpc/kernel/module_32.c
38052 +++ b/arch/powerpc/kernel/module_32.c
38054 #include <linux/kernel.h>
38055 #include <linux/cache.h>
38056 #include <linux/bug.h>
38057 +#include <linux/sort.h>
38061 @@ -54,22 +55,60 @@
38063 static unsigned int count_relocs(const Elf32_Rela *rela, unsigned int num)
38065 - unsigned int i, j, ret = 0;
38066 + unsigned int i, r_info, r_addend, _count_relocs;
38068 - /* Sure, this is order(n^2), but it's usually short, and not
38070 - for (i = 0; i < num; i++) {
38071 - for (j = 0; j < i; j++) {
38072 - /* If this addend appeared before, it's
38073 - already been counted */
38074 - if (ELF32_R_SYM(rela[i].r_info)
38075 - == ELF32_R_SYM(rela[j].r_info)
38076 - && rela[i].r_addend == rela[j].r_addend)
38078 + _count_relocs = 0;
38081 + for (i = 0; i < num; i++)
38082 + /* Only count 24-bit relocs, others don't need stubs */
38083 + if (ELF32_R_TYPE(rela[i].r_info) == R_PPC_REL24 &&
38084 + (r_info != ELF32_R_SYM(rela[i].r_info) ||
38085 + r_addend != rela[i].r_addend)) {
38087 + r_info = ELF32_R_SYM(rela[i].r_info);
38088 + r_addend = rela[i].r_addend;
38090 - if (j == i) ret++;
38092 + return _count_relocs;
38095 +static int relacmp(const void *_x, const void *_y)
38097 + const Elf32_Rela *x, *y;
38099 + y = (Elf32_Rela *)_x;
38100 + x = (Elf32_Rela *)_y;
38102 + /* Compare the entire r_info (as opposed to ELF32_R_SYM(r_info) only) to
38103 + * make the comparison cheaper/faster. It won't affect the sorting or
38104 + * the counting algorithms' performance
38106 + if (x->r_info < y->r_info)
38108 + else if (x->r_info > y->r_info)
38110 + else if (x->r_addend < y->r_addend)
38112 + else if (x->r_addend > y->r_addend)
38118 +static void relaswap(void *_x, void *_y, int size)
38120 + uint32_t *x, *y, tmp;
38123 + y = (uint32_t *)_x;
38124 + x = (uint32_t *)_y;
38126 + for (i = 0; i < sizeof(Elf32_Rela) / sizeof(uint32_t); i++) {
38134 /* Get the potential trampolines size required of the init and
38135 @@ -100,6 +139,16 @@
38136 DEBUGP("Ptr: %p. Number: %u\n",
38137 (void *)hdr + sechdrs[i].sh_offset,
38138 sechdrs[i].sh_size / sizeof(Elf32_Rela));
38140 + /* Sort the relocation information based on a symbol and
38141 + * addend key. This is a stable O(n*log n) complexity
38142 + * alogrithm but it will reduce the complexity of
38143 + * count_relocs() to linear complexity O(n)
38145 + sort((void *)hdr + sechdrs[i].sh_offset,
38146 + sechdrs[i].sh_size / sizeof(Elf32_Rela),
38147 + sizeof(Elf32_Rela), relacmp, relaswap);
38149 ret += count_relocs((void *)hdr
38150 + sechdrs[i].sh_offset,
38152 --- a/arch/powerpc/kernel/module_64.c
38153 +++ b/arch/powerpc/kernel/module_64.c
38155 #include <asm/module.h>
38156 #include <asm/uaccess.h>
38157 #include <asm/firmware.h>
38158 +#include <linux/sort.h>
38162 @@ -81,25 +82,23 @@
38163 different addend) */
38164 static unsigned int count_relocs(const Elf64_Rela *rela, unsigned int num)
38166 - unsigned int i, j, ret = 0;
38167 + unsigned int i, r_info, r_addend, _count_relocs;
38169 /* FIXME: Only count external ones --RR */
38170 - /* Sure, this is order(n^2), but it's usually short, and not
38172 - for (i = 0; i < num; i++) {
38173 + _count_relocs = 0;
38176 + for (i = 0; i < num; i++)
38177 /* Only count 24-bit relocs, others don't need stubs */
38178 - if (ELF64_R_TYPE(rela[i].r_info) != R_PPC_REL24)
38180 - for (j = 0; j < i; j++) {
38181 - /* If this addend appeared before, it's
38182 - already been counted */
38183 - if (rela[i].r_info == rela[j].r_info
38184 - && rela[i].r_addend == rela[j].r_addend)
38186 + if (ELF64_R_TYPE(rela[i].r_info) == R_PPC_REL24 &&
38187 + (r_info != ELF64_R_SYM(rela[i].r_info) ||
38188 + r_addend != rela[i].r_addend)) {
38190 + r_info = ELF64_R_SYM(rela[i].r_info);
38191 + r_addend = rela[i].r_addend;
38193 - if (j == i) ret++;
38197 + return _count_relocs;
38200 void *module_alloc(unsigned long size)
38201 @@ -118,6 +117,44 @@
38205 +static int relacmp(const void *_x, const void *_y)
38207 + const Elf64_Rela *x, *y;
38209 + y = (Elf64_Rela *)_x;
38210 + x = (Elf64_Rela *)_y;
38212 + /* Compare the entire r_info (as opposed to ELF64_R_SYM(r_info) only) to
38213 + * make the comparison cheaper/faster. It won't affect the sorting or
38214 + * the counting algorithms' performance
38216 + if (x->r_info < y->r_info)
38218 + else if (x->r_info > y->r_info)
38220 + else if (x->r_addend < y->r_addend)
38222 + else if (x->r_addend > y->r_addend)
38228 +static void relaswap(void *_x, void *_y, int size)
38230 + uint64_t *x, *y, tmp;
38233 + y = (uint64_t *)_x;
38234 + x = (uint64_t *)_y;
38236 + for (i = 0; i < sizeof(Elf64_Rela) / sizeof(uint64_t); i++) {
38243 /* Get size of potential trampolines required. */
38244 static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
38245 const Elf64_Shdr *sechdrs)
38246 @@ -133,6 +170,16 @@
38247 DEBUGP("Ptr: %p. Number: %lu\n",
38248 (void *)sechdrs[i].sh_addr,
38249 sechdrs[i].sh_size / sizeof(Elf64_Rela));
38251 + /* Sort the relocation information based on a symbol and
38252 + * addend key. This is a stable O(n*log n) complexity
38253 + * alogrithm but it will reduce the complexity of
38254 + * count_relocs() to linear complexity O(n)
38256 + sort((void *)sechdrs[i].sh_addr,
38257 + sechdrs[i].sh_size / sizeof(Elf64_Rela),
38258 + sizeof(Elf64_Rela), relacmp, relaswap);
38260 relocs += count_relocs((void *)sechdrs[i].sh_addr,
38262 / sizeof(Elf64_Rela));
38263 @@ -343,7 +390,7 @@
38264 /* Simply set it */
38265 *(u32 *)location = value;
38269 case R_PPC64_ADDR64:
38270 /* Simply set it */
38271 *(unsigned long *)location = value;
38272 @@ -399,7 +446,7 @@
38275 /* Only replace bits 2 through 26 */
38276 - *(uint32_t *)location
38277 + *(uint32_t *)location
38278 = (*(uint32_t *)location & ~0x03fffffc)
38279 | (value & 0x03fffffc);
38281 --- a/arch/powerpc/kernel/of_device.c
38282 +++ b/arch/powerpc/kernel/of_device.c
38284 #include <linux/module.h>
38285 #include <linux/mod_devicetable.h>
38286 #include <linux/slab.h>
38287 +#include <linux/of_device.h>
38289 #include <asm/errno.h>
38290 #include <asm/dcr.h>
38291 -#include <asm/of_device.h>
38293 static void of_device_make_bus_id(struct of_device *dev)
38295 --- a/arch/powerpc/kernel/of_platform.c
38296 +++ b/arch/powerpc/kernel/of_platform.c
38298 #include <linux/mod_devicetable.h>
38299 #include <linux/slab.h>
38300 #include <linux/pci.h>
38301 +#include <linux/of.h>
38302 #include <linux/of_device.h>
38303 #include <linux/of_platform.h>
38306 * a bus type in the list
38309 -static struct of_device_id of_default_bus_ids[] = {
38310 +static const struct of_device_id of_default_bus_ids[] = {
38311 { .type = "soc", },
38312 { .compatible = "soc", },
38313 { .type = "spider", },
38316 postcore_initcall(of_bus_driver_init);
38318 -int of_register_platform_driver(struct of_platform_driver *drv)
38320 - /* initialize common driver fields */
38321 - if (!drv->driver.name)
38322 - drv->driver.name = drv->name;
38323 - if (!drv->driver.owner)
38324 - drv->driver.owner = drv->owner;
38325 - drv->driver.bus = &of_platform_bus_type;
38327 - /* register with core */
38328 - return driver_register(&drv->driver);
38330 -EXPORT_SYMBOL(of_register_platform_driver);
38332 -void of_unregister_platform_driver(struct of_platform_driver *drv)
38334 - driver_unregister(&drv->driver);
38336 -EXPORT_SYMBOL(of_unregister_platform_driver);
38338 struct of_device* of_platform_device_create(struct device_node *np,
38339 const char *bus_id,
38340 struct device *parent)
38341 @@ -120,15 +101,15 @@
38342 * @matches: match table, NULL to use the default, OF_NO_DEEP_PROBE to
38343 * disallow recursive creation of child busses
38345 -static int of_platform_bus_create(struct device_node *bus,
38346 - struct of_device_id *matches,
38347 +static int of_platform_bus_create(const struct device_node *bus,
38348 + const struct of_device_id *matches,
38349 struct device *parent)
38351 struct device_node *child;
38352 struct of_device *dev;
38355 - for (child = NULL; (child = of_get_next_child(bus, child)); ) {
38356 + for_each_child_of_node(bus, child) {
38357 pr_debug(" create child: %s\n", child->full_name);
38358 dev = of_platform_device_create(child, NULL, parent);
38360 @@ -157,7 +138,7 @@
38363 int of_platform_bus_probe(struct device_node *root,
38364 - struct of_device_id *matches,
38365 + const struct of_device_id *matches,
38366 struct device *parent)
38368 struct device_node *child;
38369 @@ -190,7 +171,7 @@
38370 rc = of_platform_bus_create(root, matches, &dev->dev);
38373 - for (child = NULL; (child = of_get_next_child(root, child)); ) {
38374 + for_each_child_of_node(root, child) {
38375 if (!of_match_node(matches, child))
38378 --- a/arch/powerpc/kernel/pci-common.c
38379 +++ b/arch/powerpc/kernel/pci-common.c
38380 @@ -48,32 +48,26 @@
38381 static DEFINE_SPINLOCK(hose_spinlock);
38383 /* XXX kill that some day ... */
38384 -int global_phb_number; /* Global phb counter */
38385 +static int global_phb_number; /* Global phb counter */
38387 -extern struct list_head hose_list;
38388 +/* ISA Memory physical address */
38389 +resource_size_t isa_mem_base;
38392 - * pci_controller(phb) initialized common variables.
38394 -static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
38396 - memset(hose, 0, sizeof(struct pci_controller));
38398 - spin_lock(&hose_spinlock);
38399 - hose->global_number = global_phb_number++;
38400 - list_add_tail(&hose->list_node, &hose_list);
38401 - spin_unlock(&hose_spinlock);
38403 +/* Default PCI flags is 0 */
38404 +unsigned int ppc_pci_flags;
38406 -struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
38407 +struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
38409 struct pci_controller *phb;
38411 - phb = alloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
38412 + phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
38415 - pci_setup_pci_controller(phb);
38416 - phb->arch_data = dev;
38417 + spin_lock(&hose_spinlock);
38418 + phb->global_number = global_phb_number++;
38419 + list_add_tail(&phb->list_node, &hose_list);
38420 + spin_unlock(&hose_spinlock);
38422 phb->is_dynamic = mem_init_done;
38423 #ifdef CONFIG_PPC64
38425 @@ -126,15 +120,10 @@
38427 int pci_domain_nr(struct pci_bus *bus)
38429 - if (firmware_has_feature(FW_FEATURE_ISERIES))
38432 - struct pci_controller *hose = pci_bus_to_host(bus);
38433 + struct pci_controller *hose = pci_bus_to_host(bus);
38435 - return hose->global_number;
38437 + return hose->global_number;
38440 EXPORT_SYMBOL(pci_domain_nr);
38442 #ifdef CONFIG_PPC_OF
38443 @@ -153,7 +142,7 @@
38445 struct pci_controller *hose, *tmp;
38446 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
38447 - if (hose->arch_data == node)
38448 + if (hose->dn == node)
38450 node = node->parent;
38452 @@ -201,6 +190,20 @@
38453 struct of_irq oirq;
38456 + /* The current device-tree that iSeries generates from the HV
38457 + * PCI informations doesn't contain proper interrupt routing,
38458 + * and all the fallback would do is print out crap, so we
38459 + * don't attempt to resolve the interrupts here at all, some
38460 + * iSeries specific fixup does it.
38462 + * In the long run, we will hopefully fix the generated device-tree
38465 +#ifdef CONFIG_PPC_ISERIES
38466 + if (firmware_has_feature(FW_FEATURE_ISERIES))
38470 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
38473 @@ -222,10 +225,11 @@
38476 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
38478 + line == 0xff || line == 0) {
38481 - DBG(" -> no map ! Using irq line %d from PCI config\n", line);
38482 + DBG(" -> no map ! Using line %d (pin %d) from PCI config\n",
38485 virq = irq_create_mapping(NULL, line);
38486 if (virq != NO_IRQ)
38487 @@ -475,3 +479,717 @@
38488 *start = rsrc->start - offset;
38489 *end = rsrc->end - offset;
38493 + * pci_process_bridge_OF_ranges - Parse PCI bridge resources from device tree
38494 + * @hose: newly allocated pci_controller to be setup
38495 + * @dev: device node of the host bridge
38496 + * @primary: set if primary bus (32 bits only, soon to be deprecated)
38498 + * This function will parse the "ranges" property of a PCI host bridge device
38499 + * node and setup the resource mapping of a pci controller based on its
38502 + * Life would be boring if it wasn't for a few issues that we have to deal
38505 + * - We can only cope with one IO space range and up to 3 Memory space
38506 + * ranges. However, some machines (thanks Apple !) tend to split their
38507 + * space into lots of small contiguous ranges. So we have to coalesce.
38509 + * - We can only cope with all memory ranges having the same offset
38510 + * between CPU addresses and PCI addresses. Unfortunately, some bridges
38511 + * are setup for a large 1:1 mapping along with a small "window" which
38512 + * maps PCI address 0 to some arbitrary high address of the CPU space in
38513 + * order to give access to the ISA memory hole.
38514 + * The way out of here that I've chosen for now is to always set the
38515 + * offset based on the first resource found, then override it if we
38516 + * have a different offset and the previous was set by an ISA hole.
38518 + * - Some busses have IO space not starting at 0, which causes trouble with
38519 + * the way we do our IO resource renumbering. The code somewhat deals with
38520 + * it for 64 bits but I would expect problems on 32 bits.
38522 + * - Some 32 bits platforms such as 4xx can have physical space larger than
38523 + * 32 bits so we need to use 64 bits values for the parsing
38525 +void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
38526 + struct device_node *dev,
38529 + const u32 *ranges;
38531 + int pna = of_n_addr_cells(dev);
38532 + int np = pna + 5;
38533 + int memno = 0, isa_hole = -1;
38535 + unsigned long long pci_addr, cpu_addr, pci_next, cpu_next, size;
38536 + unsigned long long isa_mb = 0;
38537 + struct resource *res;
38539 + printk(KERN_INFO "PCI host bridge %s %s ranges:\n",
38540 + dev->full_name, primary ? "(primary)" : "");
38542 + /* Get ranges property */
38543 + ranges = of_get_property(dev, "ranges", &rlen);
38544 + if (ranges == NULL)
38548 + while ((rlen -= np * 4) >= 0) {
38549 + /* Read next ranges element */
38550 + pci_space = ranges[0];
38551 + pci_addr = of_read_number(ranges + 1, 2);
38552 + cpu_addr = of_translate_address(dev, ranges + 3);
38553 + size = of_read_number(ranges + pna + 3, 2);
38555 + if (cpu_addr == OF_BAD_ADDR || size == 0)
38558 + /* Now consume following elements while they are contiguous */
38559 + for (; rlen >= np * sizeof(u32);
38560 + ranges += np, rlen -= np * 4) {
38561 + if (ranges[0] != pci_space)
38563 + pci_next = of_read_number(ranges + 1, 2);
38564 + cpu_next = of_translate_address(dev, ranges + 3);
38565 + if (pci_next != pci_addr + size ||
38566 + cpu_next != cpu_addr + size)
38568 + size += of_read_number(ranges + pna + 3, 2);
38571 + /* Act based on address space type */
38573 + switch ((pci_space >> 24) & 0x3) {
38574 + case 1: /* PCI IO space */
38576 + " IO 0x%016llx..0x%016llx -> 0x%016llx\n",
38577 + cpu_addr, cpu_addr + size - 1, pci_addr);
38579 + /* We support only one IO range */
38580 + if (hose->pci_io_size) {
38582 + " \\--> Skipped (too many) !\n");
38585 +#ifdef CONFIG_PPC32
38586 + /* On 32 bits, limit I/O space to 16MB */
38587 + if (size > 0x01000000)
38588 + size = 0x01000000;
38590 + /* 32 bits needs to map IOs here */
38591 + hose->io_base_virt = ioremap(cpu_addr, size);
38593 + /* Expect trouble if pci_addr is not 0 */
38596 + (unsigned long)hose->io_base_virt;
38597 +#endif /* CONFIG_PPC32 */
38598 + /* pci_io_size and io_base_phys always represent IO
38599 + * space starting at 0 so we factor in pci_addr
38601 + hose->pci_io_size = pci_addr + size;
38602 + hose->io_base_phys = cpu_addr - pci_addr;
38604 + /* Build resource */
38605 + res = &hose->io_resource;
38606 + res->flags = IORESOURCE_IO;
38607 + res->start = pci_addr;
38609 + case 2: /* PCI Memory space */
38611 + " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n",
38612 + cpu_addr, cpu_addr + size - 1, pci_addr,
38613 + (pci_space & 0x40000000) ? "Prefetch" : "");
38615 + /* We support only 3 memory ranges */
38616 + if (memno >= 3) {
38618 + " \\--> Skipped (too many) !\n");
38621 + /* Handles ISA memory hole space here */
38622 + if (pci_addr == 0) {
38623 + isa_mb = cpu_addr;
38624 + isa_hole = memno;
38625 + if (primary || isa_mem_base == 0)
38626 + isa_mem_base = cpu_addr;
38629 + /* We get the PCI/Mem offset from the first range or
38630 + * the, current one if the offset came from an ISA
38631 + * hole. If they don't match, bugger.
38633 + if (memno == 0 ||
38634 + (isa_hole >= 0 && pci_addr != 0 &&
38635 + hose->pci_mem_offset == isa_mb))
38636 + hose->pci_mem_offset = cpu_addr - pci_addr;
38637 + else if (pci_addr != 0 &&
38638 + hose->pci_mem_offset != cpu_addr - pci_addr) {
38640 + " \\--> Skipped (offset mismatch) !\n");
38644 + /* Build resource */
38645 + res = &hose->mem_resources[memno++];
38646 + res->flags = IORESOURCE_MEM;
38647 + if (pci_space & 0x40000000)
38648 + res->flags |= IORESOURCE_PREFETCH;
38649 + res->start = cpu_addr;
38652 + if (res != NULL) {
38653 + res->name = dev->full_name;
38654 + res->end = res->start + size - 1;
38655 + res->parent = NULL;
38656 + res->sibling = NULL;
38657 + res->child = NULL;
38661 + /* Out of paranoia, let's put the ISA hole last if any */
38662 + if (isa_hole >= 0 && memno > 0 && isa_hole != (memno-1)) {
38663 + struct resource tmp = hose->mem_resources[isa_hole];
38664 + hose->mem_resources[isa_hole] = hose->mem_resources[memno-1];
38665 + hose->mem_resources[memno-1] = tmp;
38669 +/* Decide whether to display the domain number in /proc */
38670 +int pci_proc_domain(struct pci_bus *bus)
38672 + struct pci_controller *hose = pci_bus_to_host(bus);
38673 +#ifdef CONFIG_PPC64
38674 + return hose->buid != 0;
38676 + if (!(ppc_pci_flags & PPC_PCI_ENABLE_PROC_DOMAINS))
38678 + if (ppc_pci_flags & PPC_PCI_COMPAT_DOMAIN_0)
38679 + return hose->global_number != 0;
38684 +void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
38685 + struct resource *res)
38687 + resource_size_t offset = 0, mask = (resource_size_t)-1;
38688 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38692 + if (res->flags & IORESOURCE_IO) {
38693 + offset = (unsigned long)hose->io_base_virt - _IO_BASE;
38694 + mask = 0xffffffffu;
38695 + } else if (res->flags & IORESOURCE_MEM)
38696 + offset = hose->pci_mem_offset;
38698 + region->start = (res->start - offset) & mask;
38699 + region->end = (res->end - offset) & mask;
38701 +EXPORT_SYMBOL(pcibios_resource_to_bus);
38703 +void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
38704 + struct pci_bus_region *region)
38706 + resource_size_t offset = 0, mask = (resource_size_t)-1;
38707 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38711 + if (res->flags & IORESOURCE_IO) {
38712 + offset = (unsigned long)hose->io_base_virt - _IO_BASE;
38713 + mask = 0xffffffffu;
38714 + } else if (res->flags & IORESOURCE_MEM)
38715 + offset = hose->pci_mem_offset;
38716 + res->start = (region->start + offset) & mask;
38717 + res->end = (region->end + offset) & mask;
38719 +EXPORT_SYMBOL(pcibios_bus_to_resource);
38721 +/* Fixup a bus resource into a linux resource */
38722 +static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
38724 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38725 + resource_size_t offset = 0, mask = (resource_size_t)-1;
38727 + if (res->flags & IORESOURCE_IO) {
38728 + offset = (unsigned long)hose->io_base_virt - _IO_BASE;
38729 + mask = 0xffffffffu;
38730 + } else if (res->flags & IORESOURCE_MEM)
38731 + offset = hose->pci_mem_offset;
38733 + res->start = (res->start + offset) & mask;
38734 + res->end = (res->end + offset) & mask;
38736 + pr_debug("PCI:%s %016llx-%016llx\n",
38738 + (unsigned long long)res->start,
38739 + (unsigned long long)res->end);
38743 +/* This header fixup will do the resource fixup for all devices as they are
38744 + * probed, but not for bridge ranges
38746 +static void __devinit pcibios_fixup_resources(struct pci_dev *dev)
38748 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38752 + printk(KERN_ERR "No host bridge for PCI dev %s !\n",
38756 + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
38757 + struct resource *res = dev->resource + i;
38760 + if (res->end == 0xffffffff) {
38761 + pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] is unassigned\n",
38762 + pci_name(dev), i,
38763 + (unsigned long long)res->start,
38764 + (unsigned long long)res->end,
38765 + (unsigned int)res->flags);
38766 + res->end -= res->start;
38768 + res->flags |= IORESOURCE_UNSET;
38772 + pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] fixup...\n",
38773 + pci_name(dev), i,
38774 + (unsigned long long)res->start,\
38775 + (unsigned long long)res->end,
38776 + (unsigned int)res->flags);
38778 + fixup_resource(res, dev);
38781 + /* Call machine specific resource fixup */
38782 + if (ppc_md.pcibios_fixup_resources)
38783 + ppc_md.pcibios_fixup_resources(dev);
38785 +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
38787 +static void __devinit __pcibios_fixup_bus(struct pci_bus *bus)
38789 + struct pci_controller *hose = pci_bus_to_host(bus);
38790 + struct pci_dev *dev = bus->self;
38792 + pr_debug("PCI: Fixup bus %d (%s)\n", bus->number, dev ? pci_name(dev) : "PHB");
38794 + /* Fixup PCI<->PCI bridges. Host bridges are handled separately, for
38795 + * now differently between 32 and 64 bits.
38797 + if (dev != NULL) {
38798 + struct resource *res;
38801 + for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
38802 + if ((res = bus->resource[i]) == NULL)
38806 + if (i >= 3 && bus->self->transparent)
38808 + /* On PowerMac, Apple leaves bridge windows open over
38809 + * an inaccessible region of memory space (0...fffff)
38810 + * which is somewhat bogus, but that's what they think
38811 + * means disabled...
38813 + * We clear those to force them to be reallocated later
38815 + * We detect such regions by the fact that the base is
38816 + * equal to the pci_mem_offset of the host bridge and
38817 + * their size is smaller than 1M.
38819 + if (res->flags & IORESOURCE_MEM &&
38820 + res->start == hose->pci_mem_offset &&
38821 + res->end < 0x100000) {
38823 + "PCI: Closing bogus Apple Firmware"
38824 + " region %d on bus 0x%02x\n",
38830 + pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
38831 + pci_name(dev), i,
38832 + (unsigned long long)res->start,\
38833 + (unsigned long long)res->end,
38834 + (unsigned int)res->flags);
38836 + fixup_resource(res, dev);
38840 + /* Additional setup that is different between 32 and 64 bits for now */
38841 + pcibios_do_bus_setup(bus);
38843 + /* Platform specific bus fixups */
38844 + if (ppc_md.pcibios_fixup_bus)
38845 + ppc_md.pcibios_fixup_bus(bus);
38847 + /* Read default IRQs and fixup if necessary */
38848 + list_for_each_entry(dev, &bus->devices, bus_list) {
38849 + pci_read_irq_line(dev);
38850 + if (ppc_md.pci_irq_fixup)
38851 + ppc_md.pci_irq_fixup(dev);
38855 +void __devinit pcibios_fixup_bus(struct pci_bus *bus)
38857 + /* When called from the generic PCI probe, read PCI<->PCI bridge
38858 + * bases before proceeding
38860 + if (bus->self != NULL)
38861 + pci_read_bridge_bases(bus);
38862 + __pcibios_fixup_bus(bus);
38864 +EXPORT_SYMBOL(pcibios_fixup_bus);
38866 +/* When building a bus from the OF tree rather than probing, we need a
38867 + * slightly different version of the fixup which doesn't read the
38868 + * bridge bases using config space accesses
38870 +void __devinit pcibios_fixup_of_probed_bus(struct pci_bus *bus)
38872 + __pcibios_fixup_bus(bus);
38875 +static int skip_isa_ioresource_align(struct pci_dev *dev)
38877 + if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) &&
38878 + !(dev->bus->bridge_ctl & PCI_BRIDGE_CTL_ISA))
38884 + * We need to avoid collisions with `mirrored' VGA ports
38885 + * and other strange ISA hardware, so we always want the
38886 + * addresses to be allocated in the 0x000-0x0ff region
38889 + * Why? Because some silly external IO cards only decode
38890 + * the low 10 bits of the IO address. The 0x00-0xff region
38891 + * is reserved for motherboard devices that decode all 16
38892 + * bits, so it's ok to allocate at, say, 0x2800-0x28ff,
38893 + * but we want to try to avoid allocating at 0x2900-0x2bff
38894 + * which might have be mirrored at 0x0100-0x03ff..
38896 +void pcibios_align_resource(void *data, struct resource *res,
38897 + resource_size_t size, resource_size_t align)
38899 + struct pci_dev *dev = data;
38901 + if (res->flags & IORESOURCE_IO) {
38902 + resource_size_t start = res->start;
38904 + if (skip_isa_ioresource_align(dev))
38906 + if (start & 0x300) {
38907 + start = (start + 0x3ff) & ~0x3ff;
38908 + res->start = start;
38912 +EXPORT_SYMBOL(pcibios_align_resource);
38915 + * Reparent resource children of pr that conflict with res
38916 + * under res, and make res replace those children.
38918 +static int __init reparent_resources(struct resource *parent,
38919 + struct resource *res)
38921 + struct resource *p, **pp;
38922 + struct resource **firstpp = NULL;
38924 + for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
38925 + if (p->end < res->start)
38927 + if (res->end < p->start)
38929 + if (p->start < res->start || p->end > res->end)
38930 + return -1; /* not completely contained */
38931 + if (firstpp == NULL)
38934 + if (firstpp == NULL)
38935 + return -1; /* didn't find any conflicting entries? */
38936 + res->parent = parent;
38937 + res->child = *firstpp;
38938 + res->sibling = *pp;
38941 + for (p = res->child; p != NULL; p = p->sibling) {
38943 + DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
38945 + (unsigned long long)p->start,
38946 + (unsigned long long)p->end, res->name);
38952 + * Handle resources of PCI devices. If the world were perfect, we could
38953 + * just allocate all the resource regions and do nothing more. It isn't.
38954 + * On the other hand, we cannot just re-allocate all devices, as it would
38955 + * require us to know lots of host bridge internals. So we attempt to
38956 + * keep as much of the original configuration as possible, but tweak it
38957 + * when it's found to be wrong.
38959 + * Known BIOS problems we have to work around:
38960 + * - I/O or memory regions not configured
38961 + * - regions configured, but not enabled in the command register
38962 + * - bogus I/O addresses above 64K used
38963 + * - expansion ROMs left enabled (this may sound harmless, but given
38964 + * the fact the PCI specs explicitly allow address decoders to be
38965 + * shared between expansion ROMs and other resource regions, it's
38966 + * at least dangerous)
38969 + * (1) Allocate resources for all buses behind PCI-to-PCI bridges.
38970 + * This gives us fixed barriers on where we can allocate.
38971 + * (2) Allocate resources for all enabled devices. If there is
38972 + * a collision, just mark the resource as unallocated. Also
38973 + * disable expansion ROMs during this step.
38974 + * (3) Try to allocate resources for disabled devices. If the
38975 + * resources were assigned correctly, everything goes well,
38976 + * if they weren't, they won't disturb allocation of other
38978 + * (4) Assign new addresses to resources which were either
38979 + * not configured at all or misconfigured. If explicitly
38980 + * requested by the user, configure expansion ROM address
38984 +static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
38986 + struct pci_bus *bus;
38988 + struct resource *res, *pr;
38990 + /* Depth-First Search on bus tree */
38991 + list_for_each_entry(bus, bus_list, node) {
38992 + for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
38993 + if ((res = bus->resource[i]) == NULL || !res->flags
38994 + || res->start > res->end)
38996 + if (bus->parent == NULL)
38997 + pr = (res->flags & IORESOURCE_IO) ?
38998 + &ioport_resource : &iomem_resource;
39000 + /* Don't bother with non-root busses when
39001 + * re-assigning all resources. We clear the
39002 + * resource flags as if they were colliding
39003 + * and as such ensure proper re-allocation
39006 + if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)
39007 + goto clear_resource;
39008 + pr = pci_find_parent_resource(bus->self, res);
39010 + /* this happens when the generic PCI
39011 + * code (wrongly) decides that this
39012 + * bridge is transparent -- paulus
39018 + DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
39019 + "[0x%x], parent %p (%s)\n",
39020 + bus->self ? pci_name(bus->self) : "PHB",
39022 + (unsigned long long)res->start,
39023 + (unsigned long long)res->end,
39024 + (unsigned int)res->flags,
39025 + pr, (pr && pr->name) ? pr->name : "nil");
39027 + if (pr && !(pr->flags & IORESOURCE_UNSET)) {
39028 + if (request_resource(pr, res) == 0)
39031 + * Must be a conflict with an existing entry.
39032 + * Move that entry (or entries) under the
39033 + * bridge resource and try again.
39035 + if (reparent_resources(pr, res) == 0)
39038 + printk(KERN_WARNING
39039 + "PCI: Cannot allocate resource region "
39040 + "%d of PCI bridge %d, will remap\n",
39045 + pcibios_allocate_bus_resources(&bus->children);
39049 +static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
39051 + struct resource *pr, *r = &dev->resource[idx];
39053 + DBG("PCI: Allocating %s: Resource %d: %016llx..%016llx [%x]\n",
39054 + pci_name(dev), idx,
39055 + (unsigned long long)r->start,
39056 + (unsigned long long)r->end,
39057 + (unsigned int)r->flags);
39059 + pr = pci_find_parent_resource(dev, r);
39060 + if (!pr || (pr->flags & IORESOURCE_UNSET) ||
39061 + request_resource(pr, r) < 0) {
39062 + printk(KERN_WARNING "PCI: Cannot allocate resource region %d"
39063 + " of device %s, will remap\n", idx, pci_name(dev));
39065 + DBG("PCI: parent is %p: %016llx-%016llx [%x]\n", pr,
39066 + (unsigned long long)pr->start,
39067 + (unsigned long long)pr->end,
39068 + (unsigned int)pr->flags);
39069 + /* We'll assign a new address later */
39070 + r->flags |= IORESOURCE_UNSET;
39071 + r->end -= r->start;
39076 +static void __init pcibios_allocate_resources(int pass)
39078 + struct pci_dev *dev = NULL;
39079 + int idx, disabled;
39081 + struct resource *r;
39083 + for_each_pci_dev(dev) {
39084 + pci_read_config_word(dev, PCI_COMMAND, &command);
39085 + for (idx = 0; idx < 6; idx++) {
39086 + r = &dev->resource[idx];
39087 + if (r->parent) /* Already allocated */
39089 + if (!r->flags || (r->flags & IORESOURCE_UNSET))
39090 + continue; /* Not assigned at all */
39091 + if (r->flags & IORESOURCE_IO)
39092 + disabled = !(command & PCI_COMMAND_IO);
39094 + disabled = !(command & PCI_COMMAND_MEMORY);
39095 + if (pass == disabled)
39096 + alloc_resource(dev, idx);
39100 + r = &dev->resource[PCI_ROM_RESOURCE];
39101 + if (r->flags & IORESOURCE_ROM_ENABLE) {
39102 + /* Turn the ROM off, leave the resource region,
39103 + * but keep it unregistered.
39106 + DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
39107 + r->flags &= ~IORESOURCE_ROM_ENABLE;
39108 + pci_read_config_dword(dev, dev->rom_base_reg, ®);
39109 + pci_write_config_dword(dev, dev->rom_base_reg,
39110 + reg & ~PCI_ROM_ADDRESS_ENABLE);
39115 +void __init pcibios_resource_survey(void)
39117 + /* Allocate and assign resources. If we re-assign everything, then
39118 + * we skip the allocate phase
39120 + pcibios_allocate_bus_resources(&pci_root_buses);
39122 + if (!(ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)) {
39123 + pcibios_allocate_resources(0);
39124 + pcibios_allocate_resources(1);
39127 + if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) {
39128 + DBG("PCI: Assigning unassigned resouces...\n");
39129 + pci_assign_unassigned_resources();
39132 + /* Call machine dependent fixup */
39133 + if (ppc_md.pcibios_fixup)
39134 + ppc_md.pcibios_fixup();
39137 +#ifdef CONFIG_HOTPLUG
39138 +/* This is used by the pSeries hotplug driver to allocate resource
39139 + * of newly plugged busses. We can try to consolidate with the
39140 + * rest of the code later, for now, keep it as-is
39142 +void __devinit pcibios_claim_one_bus(struct pci_bus *bus)
39144 + struct pci_dev *dev;
39145 + struct pci_bus *child_bus;
39147 + list_for_each_entry(dev, &bus->devices, bus_list) {
39150 + for (i = 0; i < PCI_NUM_RESOURCES; i++) {
39151 + struct resource *r = &dev->resource[i];
39153 + if (r->parent || !r->start || !r->flags)
39155 + pci_claim_resource(dev, i);
39159 + list_for_each_entry(child_bus, &bus->children, node)
39160 + pcibios_claim_one_bus(child_bus);
39162 +EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
39163 +#endif /* CONFIG_HOTPLUG */
39165 +int pcibios_enable_device(struct pci_dev *dev, int mask)
39167 + u16 cmd, old_cmd;
39169 + struct resource *r;
39171 + if (ppc_md.pcibios_enable_device_hook)
39172 + if (ppc_md.pcibios_enable_device_hook(dev))
39175 + pci_read_config_word(dev, PCI_COMMAND, &cmd);
39177 + for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
39178 + /* Only set up the requested stuff */
39179 + if (!(mask & (1 << idx)))
39181 + r = &dev->resource[idx];
39182 + if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
39184 + if ((idx == PCI_ROM_RESOURCE) &&
39185 + (!(r->flags & IORESOURCE_ROM_ENABLE)))
39187 + if (r->parent == NULL) {
39188 + printk(KERN_ERR "PCI: Device %s not available because"
39189 + " of resource collisions\n", pci_name(dev));
39192 + if (r->flags & IORESOURCE_IO)
39193 + cmd |= PCI_COMMAND_IO;
39194 + if (r->flags & IORESOURCE_MEM)
39195 + cmd |= PCI_COMMAND_MEMORY;
39197 + if (cmd != old_cmd) {
39198 + printk("PCI: Enabling device %s (%04x -> %04x)\n",
39199 + pci_name(dev), old_cmd, cmd);
39200 + pci_write_config_word(dev, PCI_COMMAND, cmd);
39205 --- a/arch/powerpc/kernel/pci_32.c
39206 +++ b/arch/powerpc/kernel/pci_32.c
39208 #include <linux/bootmem.h>
39209 #include <linux/irq.h>
39210 #include <linux/list.h>
39211 +#include <linux/of.h>
39213 #include <asm/processor.h>
39214 #include <asm/io.h>
39215 @@ -32,19 +33,12 @@
39218 unsigned long isa_io_base = 0;
39219 -unsigned long isa_mem_base = 0;
39220 unsigned long pci_dram_offset = 0;
39221 int pcibios_assign_bus_offset = 1;
39223 void pcibios_make_OF_bus_map(void);
39225 -static int pci_relocate_bridge_resource(struct pci_bus *bus, int i);
39226 -static int probe_resource(struct pci_bus *parent, struct resource *pr,
39227 - struct resource *res, struct resource **conflict);
39228 -static void update_bridge_base(struct pci_bus *bus, int i);
39229 -static void pcibios_fixup_resources(struct pci_dev* dev);
39230 static void fixup_broken_pcnet32(struct pci_dev* dev);
39231 -static int reparent_resources(struct resource *parent, struct resource *res);
39232 static void fixup_cpc710_pci64(struct pci_dev* dev);
39233 #ifdef CONFIG_PPC_OF
39234 static u8* pci_to_OF_bus_map;
39236 /* By default, we don't re-assign bus numbers. We do this only on
39239 -int pci_assign_all_buses;
39240 +static int pci_assign_all_buses;
39242 LIST_HEAD(hose_list);
39244 @@ -100,505 +94,6 @@
39246 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64);
39249 -pcibios_fixup_resources(struct pci_dev *dev)
39251 - struct pci_controller* hose = (struct pci_controller *)dev->sysdata;
39253 - unsigned long offset;
39256 - printk(KERN_ERR "No hose for PCI dev %s!\n", pci_name(dev));
39259 - for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
39260 - struct resource *res = dev->resource + i;
39263 - if (res->end == 0xffffffff) {
39264 - DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n",
39265 - pci_name(dev), i, (u64)res->start, (u64)res->end);
39266 - res->end -= res->start;
39268 - res->flags |= IORESOURCE_UNSET;
39272 - if (res->flags & IORESOURCE_MEM) {
39273 - offset = hose->pci_mem_offset;
39274 - } else if (res->flags & IORESOURCE_IO) {
39275 - offset = (unsigned long) hose->io_base_virt
39278 - if (offset != 0) {
39279 - res->start += offset;
39280 - res->end += offset;
39281 - DBG("Fixup res %d (%lx) of dev %s: %llx -> %llx\n",
39282 - i, res->flags, pci_name(dev),
39283 - (u64)res->start - offset, (u64)res->start);
39287 - /* Call machine specific resource fixup */
39288 - if (ppc_md.pcibios_fixup_resources)
39289 - ppc_md.pcibios_fixup_resources(dev);
39291 -DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
39293 -void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
39294 - struct resource *res)
39296 - unsigned long offset = 0;
39297 - struct pci_controller *hose = dev->sysdata;
39299 - if (hose && res->flags & IORESOURCE_IO)
39300 - offset = (unsigned long)hose->io_base_virt - isa_io_base;
39301 - else if (hose && res->flags & IORESOURCE_MEM)
39302 - offset = hose->pci_mem_offset;
39303 - region->start = res->start - offset;
39304 - region->end = res->end - offset;
39306 -EXPORT_SYMBOL(pcibios_resource_to_bus);
39308 -void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
39309 - struct pci_bus_region *region)
39311 - unsigned long offset = 0;
39312 - struct pci_controller *hose = dev->sysdata;
39314 - if (hose && res->flags & IORESOURCE_IO)
39315 - offset = (unsigned long)hose->io_base_virt - isa_io_base;
39316 - else if (hose && res->flags & IORESOURCE_MEM)
39317 - offset = hose->pci_mem_offset;
39318 - res->start = region->start + offset;
39319 - res->end = region->end + offset;
39321 -EXPORT_SYMBOL(pcibios_bus_to_resource);
39324 - * We need to avoid collisions with `mirrored' VGA ports
39325 - * and other strange ISA hardware, so we always want the
39326 - * addresses to be allocated in the 0x000-0x0ff region
39329 - * Why? Because some silly external IO cards only decode
39330 - * the low 10 bits of the IO address. The 0x00-0xff region
39331 - * is reserved for motherboard devices that decode all 16
39332 - * bits, so it's ok to allocate at, say, 0x2800-0x28ff,
39333 - * but we want to try to avoid allocating at 0x2900-0x2bff
39334 - * which might have be mirrored at 0x0100-0x03ff..
39336 -void pcibios_align_resource(void *data, struct resource *res,
39337 - resource_size_t size, resource_size_t align)
39339 - struct pci_dev *dev = data;
39341 - if (res->flags & IORESOURCE_IO) {
39342 - resource_size_t start = res->start;
39344 - if (size > 0x100) {
39345 - printk(KERN_ERR "PCI: I/O Region %s/%d too large"
39346 - " (%lld bytes)\n", pci_name(dev),
39347 - dev->resource - res, (unsigned long long)size);
39350 - if (start & 0x300) {
39351 - start = (start + 0x3ff) & ~0x3ff;
39352 - res->start = start;
39356 -EXPORT_SYMBOL(pcibios_align_resource);
39359 - * Handle resources of PCI devices. If the world were perfect, we could
39360 - * just allocate all the resource regions and do nothing more. It isn't.
39361 - * On the other hand, we cannot just re-allocate all devices, as it would
39362 - * require us to know lots of host bridge internals. So we attempt to
39363 - * keep as much of the original configuration as possible, but tweak it
39364 - * when it's found to be wrong.
39366 - * Known BIOS problems we have to work around:
39367 - * - I/O or memory regions not configured
39368 - * - regions configured, but not enabled in the command register
39369 - * - bogus I/O addresses above 64K used
39370 - * - expansion ROMs left enabled (this may sound harmless, but given
39371 - * the fact the PCI specs explicitly allow address decoders to be
39372 - * shared between expansion ROMs and other resource regions, it's
39373 - * at least dangerous)
39376 - * (1) Allocate resources for all buses behind PCI-to-PCI bridges.
39377 - * This gives us fixed barriers on where we can allocate.
39378 - * (2) Allocate resources for all enabled devices. If there is
39379 - * a collision, just mark the resource as unallocated. Also
39380 - * disable expansion ROMs during this step.
39381 - * (3) Try to allocate resources for disabled devices. If the
39382 - * resources were assigned correctly, everything goes well,
39383 - * if they weren't, they won't disturb allocation of other
39385 - * (4) Assign new addresses to resources which were either
39386 - * not configured at all or misconfigured. If explicitly
39387 - * requested by the user, configure expansion ROM address
39391 -static void __init
39392 -pcibios_allocate_bus_resources(struct list_head *bus_list)
39394 - struct pci_bus *bus;
39396 - struct resource *res, *pr;
39398 - /* Depth-First Search on bus tree */
39399 - list_for_each_entry(bus, bus_list, node) {
39400 - for (i = 0; i < 4; ++i) {
39401 - if ((res = bus->resource[i]) == NULL || !res->flags
39402 - || res->start > res->end)
39404 - if (bus->parent == NULL)
39405 - pr = (res->flags & IORESOURCE_IO)?
39406 - &ioport_resource: &iomem_resource;
39408 - pr = pci_find_parent_resource(bus->self, res);
39410 - /* this happens when the generic PCI
39411 - * code (wrongly) decides that this
39412 - * bridge is transparent -- paulus
39418 - DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
39419 - (u64)res->start, (u64)res->end, res->flags, pr);
39421 - if (request_resource(pr, res) == 0)
39424 - * Must be a conflict with an existing entry.
39425 - * Move that entry (or entries) under the
39426 - * bridge resource and try again.
39428 - if (reparent_resources(pr, res) == 0)
39431 - printk(KERN_ERR "PCI: Cannot allocate resource region "
39432 - "%d of PCI bridge %d\n", i, bus->number);
39433 - if (pci_relocate_bridge_resource(bus, i))
39434 - bus->resource[i] = NULL;
39436 - pcibios_allocate_bus_resources(&bus->children);
39441 - * Reparent resource children of pr that conflict with res
39442 - * under res, and make res replace those children.
39445 -reparent_resources(struct resource *parent, struct resource *res)
39447 - struct resource *p, **pp;
39448 - struct resource **firstpp = NULL;
39450 - for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
39451 - if (p->end < res->start)
39453 - if (res->end < p->start)
39455 - if (p->start < res->start || p->end > res->end)
39456 - return -1; /* not completely contained */
39457 - if (firstpp == NULL)
39460 - if (firstpp == NULL)
39461 - return -1; /* didn't find any conflicting entries? */
39462 - res->parent = parent;
39463 - res->child = *firstpp;
39464 - res->sibling = *pp;
39467 - for (p = res->child; p != NULL; p = p->sibling) {
39469 - DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
39470 - p->name, (u64)p->start, (u64)p->end, res->name);
39476 - * A bridge has been allocated a range which is outside the range
39477 - * of its parent bridge, so it needs to be moved.
39480 -pci_relocate_bridge_resource(struct pci_bus *bus, int i)
39482 - struct resource *res, *pr, *conflict;
39483 - unsigned long try, size;
39485 - struct pci_bus *parent = bus->parent;
39487 - if (parent == NULL) {
39488 - /* shouldn't ever happen */
39489 - printk(KERN_ERR "PCI: can't move host bridge resource\n");
39492 - res = bus->resource[i];
39496 - for (j = 0; j < 4; j++) {
39497 - struct resource *r = parent->resource[j];
39500 - if ((res->flags ^ r->flags) & (IORESOURCE_IO | IORESOURCE_MEM))
39502 - if (!((res->flags ^ r->flags) & IORESOURCE_PREFETCH)) {
39506 - if (res->flags & IORESOURCE_PREFETCH)
39511 - size = res->end - res->start;
39512 - if (pr->start > pr->end || size > pr->end - pr->start)
39516 - res->start = try - size;
39518 - if (probe_resource(bus->parent, pr, res, &conflict) == 0)
39520 - if (conflict->start <= pr->start + size)
39522 - try = conflict->start - 1;
39524 - if (request_resource(pr, res)) {
39525 - DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
39526 - (u64)res->start, (u64)res->end);
39527 - return -1; /* "can't happen" */
39529 - update_bridge_base(bus, i);
39530 - printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n",
39531 - bus->number, i, (unsigned long long)res->start,
39532 - (unsigned long long)res->end);
39537 -probe_resource(struct pci_bus *parent, struct resource *pr,
39538 - struct resource *res, struct resource **conflict)
39540 - struct pci_bus *bus;
39541 - struct pci_dev *dev;
39542 - struct resource *r;
39545 - for (r = pr->child; r != NULL; r = r->sibling) {
39546 - if (r->end >= res->start && res->end >= r->start) {
39551 - list_for_each_entry(bus, &parent->children, node) {
39552 - for (i = 0; i < 4; ++i) {
39553 - if ((r = bus->resource[i]) == NULL)
39555 - if (!r->flags || r->start > r->end || r == res)
39557 - if (pci_find_parent_resource(bus->self, r) != pr)
39559 - if (r->end >= res->start && res->end >= r->start) {
39565 - list_for_each_entry(dev, &parent->devices, bus_list) {
39566 - for (i = 0; i < 6; ++i) {
39567 - r = &dev->resource[i];
39568 - if (!r->flags || (r->flags & IORESOURCE_UNSET))
39570 - if (pci_find_parent_resource(dev, r) != pr)
39572 - if (r->end >= res->start && res->end >= r->start) {
39582 -update_bridge_resource(struct pci_dev *dev, struct resource *res)
39584 - u8 io_base_lo, io_limit_lo;
39585 - u16 mem_base, mem_limit;
39587 - unsigned long start, end, off;
39588 - struct pci_controller *hose = dev->sysdata;
39591 - printk("update_bridge_base: no hose?\n");
39594 - pci_read_config_word(dev, PCI_COMMAND, &cmd);
39595 - pci_write_config_word(dev, PCI_COMMAND,
39596 - cmd & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY));
39597 - if (res->flags & IORESOURCE_IO) {
39598 - off = (unsigned long) hose->io_base_virt - isa_io_base;
39599 - start = res->start - off;
39600 - end = res->end - off;
39601 - io_base_lo = (start >> 8) & PCI_IO_RANGE_MASK;
39602 - io_limit_lo = (end >> 8) & PCI_IO_RANGE_MASK;
39603 - if (end > 0xffff)
39604 - io_base_lo |= PCI_IO_RANGE_TYPE_32;
39606 - io_base_lo |= PCI_IO_RANGE_TYPE_16;
39607 - pci_write_config_word(dev, PCI_IO_BASE_UPPER16,
39609 - pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16,
39611 - pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo);
39612 - pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo);
39614 - } else if ((res->flags & (IORESOURCE_MEM | IORESOURCE_PREFETCH))
39615 - == IORESOURCE_MEM) {
39616 - off = hose->pci_mem_offset;
39617 - mem_base = ((res->start - off) >> 16) & PCI_MEMORY_RANGE_MASK;
39618 - mem_limit = ((res->end - off) >> 16) & PCI_MEMORY_RANGE_MASK;
39619 - pci_write_config_word(dev, PCI_MEMORY_BASE, mem_base);
39620 - pci_write_config_word(dev, PCI_MEMORY_LIMIT, mem_limit);
39622 - } else if ((res->flags & (IORESOURCE_MEM | IORESOURCE_PREFETCH))
39623 - == (IORESOURCE_MEM | IORESOURCE_PREFETCH)) {
39624 - off = hose->pci_mem_offset;
39625 - mem_base = ((res->start - off) >> 16) & PCI_PREF_RANGE_MASK;
39626 - mem_limit = ((res->end - off) >> 16) & PCI_PREF_RANGE_MASK;
39627 - pci_write_config_word(dev, PCI_PREF_MEMORY_BASE, mem_base);
39628 - pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, mem_limit);
39631 - DBG(KERN_ERR "PCI: ugh, bridge %s res has flags=%lx\n",
39632 - pci_name(dev), res->flags);
39634 - pci_write_config_word(dev, PCI_COMMAND, cmd);
39637 -static void __init
39638 -update_bridge_base(struct pci_bus *bus, int i)
39640 - struct resource *res = bus->resource[i];
39641 - struct pci_dev *dev = bus->self;
39642 - update_bridge_resource(dev, res);
39645 -static inline void alloc_resource(struct pci_dev *dev, int idx)
39647 - struct resource *pr, *r = &dev->resource[idx];
39649 - DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
39650 - pci_name(dev), idx, (u64)r->start, (u64)r->end, r->flags);
39651 - pr = pci_find_parent_resource(dev, r);
39652 - if (!pr || request_resource(pr, r) < 0) {
39653 - printk(KERN_ERR "PCI: Cannot allocate resource region %d"
39654 - " of device %s\n", idx, pci_name(dev));
39656 - DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
39657 - pr, (u64)pr->start, (u64)pr->end, pr->flags);
39658 - /* We'll assign a new address later */
39659 - r->flags |= IORESOURCE_UNSET;
39660 - r->end -= r->start;
39665 -static void __init
39666 -pcibios_allocate_resources(int pass)
39668 - struct pci_dev *dev = NULL;
39669 - int idx, disabled;
39671 - struct resource *r;
39673 - for_each_pci_dev(dev) {
39674 - pci_read_config_word(dev, PCI_COMMAND, &command);
39675 - for (idx = 0; idx < 6; idx++) {
39676 - r = &dev->resource[idx];
39677 - if (r->parent) /* Already allocated */
39679 - if (!r->flags || (r->flags & IORESOURCE_UNSET))
39680 - continue; /* Not assigned at all */
39681 - if (r->flags & IORESOURCE_IO)
39682 - disabled = !(command & PCI_COMMAND_IO);
39684 - disabled = !(command & PCI_COMMAND_MEMORY);
39685 - if (pass == disabled)
39686 - alloc_resource(dev, idx);
39690 - r = &dev->resource[PCI_ROM_RESOURCE];
39691 - if (r->flags & IORESOURCE_ROM_ENABLE) {
39692 - /* Turn the ROM off, leave the resource region, but keep it unregistered. */
39694 - DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
39695 - r->flags &= ~IORESOURCE_ROM_ENABLE;
39696 - pci_read_config_dword(dev, dev->rom_base_reg, ®);
39697 - pci_write_config_dword(dev, dev->rom_base_reg,
39698 - reg & ~PCI_ROM_ADDRESS_ENABLE);
39703 -static void __init
39704 -pcibios_assign_resources(void)
39706 - struct pci_dev *dev = NULL;
39708 - struct resource *r;
39710 - for_each_pci_dev(dev) {
39711 - int class = dev->class >> 8;
39713 - /* Don't touch classless devices and host bridges */
39714 - if (!class || class == PCI_CLASS_BRIDGE_HOST)
39717 - for (idx = 0; idx < 6; idx++) {
39718 - r = &dev->resource[idx];
39721 - * We shall assign a new address to this resource,
39722 - * either because the BIOS (sic) forgot to do so
39723 - * or because we have decided the old address was
39724 - * unusable for some reason.
39726 - if ((r->flags & IORESOURCE_UNSET) && r->end &&
39727 - (!ppc_md.pcibios_enable_device_hook ||
39728 - !ppc_md.pcibios_enable_device_hook(dev, 1))) {
39731 - r->flags &= ~IORESOURCE_UNSET;
39732 - rc = pci_assign_resource(dev, idx);
39737 -#if 0 /* don't assign ROMs */
39738 - r = &dev->resource[PCI_ROM_RESOURCE];
39739 - r->end -= r->start;
39742 - pci_assign_resource(dev, PCI_ROM_RESOURCE);
39747 #ifdef CONFIG_PPC_OF
39749 * Functions below are used on OpenFirmware machines.
39750 @@ -619,7 +114,7 @@
39752 pci_to_OF_bus_map[pci_bus] = bus_range[0];
39754 - for (node=node->child; node != 0;node = node->sibling) {
39755 + for_each_child_of_node(node, node) {
39756 struct pci_dev* dev;
39757 const unsigned int *class_code, *reg;
39759 @@ -662,8 +157,8 @@
39761 /* For each hose, we begin searching bridges */
39762 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
39763 - struct device_node* node;
39764 - node = (struct device_node *)hose->arch_data;
39765 + struct device_node* node = hose->dn;
39769 make_one_node_map(node, hose->first_busno);
39770 @@ -688,15 +183,18 @@
39771 typedef int (*pci_OF_scan_iterator)(struct device_node* node, void* data);
39773 static struct device_node*
39774 -scan_OF_pci_childs(struct device_node* node, pci_OF_scan_iterator filter, void* data)
39775 +scan_OF_pci_childs(struct device_node *parent, pci_OF_scan_iterator filter, void* data)
39777 + struct device_node *node;
39778 struct device_node* sub_node;
39780 - for (; node != 0;node = node->sibling) {
39781 + for_each_child_of_node(parent, node) {
39782 const unsigned int *class_code;
39784 - if (filter(node, data))
39785 + if (filter(node, data)) {
39786 + of_node_put(node);
39790 /* For PCI<->PCI bridges or CardBus bridges, we go down
39791 * Note: some OFs create a parent node "multifunc-device" as
39792 @@ -708,9 +206,11 @@
39793 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) &&
39794 strcmp(node->name, "multifunc-device"))
39796 - sub_node = scan_OF_pci_childs(node->child, filter, data);
39798 + sub_node = scan_OF_pci_childs(node, filter, data);
39800 + of_node_put(node);
39806 @@ -718,11 +218,11 @@
39807 static struct device_node *scan_OF_for_pci_dev(struct device_node *parent,
39808 unsigned int devfn)
39810 - struct device_node *np = NULL;
39811 + struct device_node *np;
39813 unsigned int psize;
39815 - while ((np = of_get_next_child(parent, np)) != NULL) {
39816 + for_each_child_of_node(parent, np) {
39817 reg = of_get_property(np, "reg", &psize);
39818 if (reg == NULL || psize < 4)
39820 @@ -742,7 +242,7 @@
39821 struct pci_controller *hose = pci_bus_to_host(bus);
39824 - return of_node_get(hose->arch_data);
39825 + return of_node_get(hose->dn);
39828 /* not a root bus, we need to get our parent */
39829 @@ -812,9 +312,9 @@
39831 /* Make sure it's really a PCI device */
39832 hose = pci_find_hose_for_OF_device(node);
39833 - if (!hose || !hose->arch_data)
39834 + if (!hose || !hose->dn)
39836 - if (!scan_OF_pci_childs(((struct device_node*)hose->arch_data)->child,
39837 + if (!scan_OF_pci_childs(hose->dn,
39838 find_OF_pci_device_filter, (void *)node))
39840 reg = of_get_property(node, "reg", NULL);
39841 @@ -843,120 +343,6 @@
39843 EXPORT_SYMBOL(pci_device_from_OF_node);
39846 -pci_process_bridge_OF_ranges(struct pci_controller *hose,
39847 - struct device_node *dev, int primary)
39849 - static unsigned int static_lc_ranges[256] __initdata;
39850 - const unsigned int *dt_ranges;
39851 - unsigned int *lc_ranges, *ranges, *prev, size;
39852 - int rlen = 0, orig_rlen;
39854 - struct resource *res;
39855 - int np, na = of_n_addr_cells(dev);
39858 - /* First we try to merge ranges to fix a problem with some pmacs
39859 - * that can have more than 3 ranges, fortunately using contiguous
39860 - * addresses -- BenH
39862 - dt_ranges = of_get_property(dev, "ranges", &rlen);
39865 - /* Sanity check, though hopefully that never happens */
39866 - if (rlen > sizeof(static_lc_ranges)) {
39867 - printk(KERN_WARNING "OF ranges property too large !\n");
39868 - rlen = sizeof(static_lc_ranges);
39870 - lc_ranges = static_lc_ranges;
39871 - memcpy(lc_ranges, dt_ranges, rlen);
39872 - orig_rlen = rlen;
39874 - /* Let's work on a copy of the "ranges" property instead of damaging
39875 - * the device-tree image in memory
39877 - ranges = lc_ranges;
39879 - while ((rlen -= np * sizeof(unsigned int)) >= 0) {
39881 - if (prev[0] == ranges[0] && prev[1] == ranges[1] &&
39882 - (prev[2] + prev[na+4]) == ranges[2] &&
39883 - (prev[na+2] + prev[na+4]) == ranges[na+2]) {
39884 - prev[na+4] += ranges[na+4];
39895 - * The ranges property is laid out as an array of elements,
39896 - * each of which comprises:
39897 - * cells 0 - 2: a PCI address
39898 - * cells 3 or 3+4: a CPU physical address
39899 - * (size depending on dev->n_addr_cells)
39900 - * cells 4+5 or 5+6: the size of the range
39902 - ranges = lc_ranges;
39903 - rlen = orig_rlen;
39904 - while (ranges && (rlen -= np * sizeof(unsigned int)) >= 0) {
39906 - size = ranges[na+4];
39907 - switch ((ranges[0] >> 24) & 0x3) {
39908 - case 1: /* I/O space */
39909 - if (ranges[2] != 0)
39911 - hose->io_base_phys = ranges[na+2];
39912 - /* limit I/O space to 16MB */
39913 - if (size > 0x01000000)
39914 - size = 0x01000000;
39915 - hose->io_base_virt = ioremap(ranges[na+2], size);
39917 - isa_io_base = (unsigned long) hose->io_base_virt;
39918 - res = &hose->io_resource;
39919 - res->flags = IORESOURCE_IO;
39920 - res->start = ranges[2];
39921 - DBG("PCI: IO 0x%llx -> 0x%llx\n",
39922 - (u64)res->start, (u64)res->start + size - 1);
39924 - case 2: /* memory space */
39926 - if (ranges[1] == 0 && ranges[2] == 0
39927 - && ranges[na+4] <= (16 << 20)) {
39928 - /* 1st 16MB, i.e. ISA memory area */
39930 - isa_mem_base = ranges[na+2];
39933 - while (memno < 3 && hose->mem_resources[memno].flags)
39936 - hose->pci_mem_offset = ranges[na+2] - ranges[2];
39938 - res = &hose->mem_resources[memno];
39939 - res->flags = IORESOURCE_MEM;
39940 - if(ranges[0] & 0x40000000)
39941 - res->flags |= IORESOURCE_PREFETCH;
39942 - res->start = ranges[na+2];
39943 - DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno,
39944 - (u64)res->start, (u64)res->start + size - 1);
39948 - if (res != NULL) {
39949 - res->name = dev->full_name;
39950 - res->end = res->start + size - 1;
39951 - res->parent = NULL;
39952 - res->sibling = NULL;
39953 - res->child = NULL;
39959 /* We create the "pci-OF-bus-map" property now so it appears in the
39960 * /proc device tree
39962 @@ -986,219 +372,7 @@
39964 #endif /* CONFIG_PPC_OF */
39966 -#ifdef CONFIG_PPC_PMAC
39968 - * This set of routines checks for PCI<->PCI bridges that have closed
39969 - * IO resources and have child devices. It tries to re-open an IO
39970 - * window on them.
39972 - * This is a _temporary_ fix to workaround a problem with Apple's OF
39973 - * closing IO windows on P2P bridges when the OF drivers of cards
39974 - * below this bridge don't claim any IO range (typically ATI or
39977 - * A more complete fix would be to use drivers/pci/setup-bus.c, which
39978 - * involves a working pcibios_fixup_pbus_ranges(), some more care about
39979 - * ordering when creating the host bus resources, and maybe a few more
39983 -/* Initialize bridges with base/limit values we have collected */
39984 -static void __init
39985 -do_update_p2p_io_resource(struct pci_bus *bus, int enable_vga)
39987 - struct pci_dev *bridge = bus->self;
39988 - struct pci_controller* hose = (struct pci_controller *)bridge->sysdata;
39991 - struct resource res;
39993 - if (bus->resource[0] == NULL)
39995 - res = *(bus->resource[0]);
39997 - DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge));
39998 - res.start -= ((unsigned long) hose->io_base_virt - isa_io_base);
39999 - res.end -= ((unsigned long) hose->io_base_virt - isa_io_base);
40000 - DBG(" IO window: %016llx-%016llx\n", res.start, res.end);
40002 - /* Set up the top and bottom of the PCI I/O segment for this bus. */
40003 - pci_read_config_dword(bridge, PCI_IO_BASE, &l);
40005 - l |= (res.start >> 8) & 0x00f0;
40006 - l |= res.end & 0xf000;
40007 - pci_write_config_dword(bridge, PCI_IO_BASE, l);
40009 - if ((l & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32) {
40010 - l = (res.start >> 16) | (res.end & 0xffff0000);
40011 - pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, l);
40014 - pci_read_config_word(bridge, PCI_COMMAND, &w);
40015 - w |= PCI_COMMAND_IO;
40016 - pci_write_config_word(bridge, PCI_COMMAND, w);
40018 -#if 0 /* Enabling this causes XFree 4.2.0 to hang during PCI probe */
40019 - if (enable_vga) {
40020 - pci_read_config_word(bridge, PCI_BRIDGE_CONTROL, &w);
40021 - w |= PCI_BRIDGE_CTL_VGA;
40022 - pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, w);
40027 -/* This function is pretty basic and actually quite broken for the
40028 - * general case, it's enough for us right now though. It's supposed
40029 - * to tell us if we need to open an IO range at all or not and what
40033 -check_for_io_childs(struct pci_bus *bus, struct resource* res, int *found_vga)
40035 - struct pci_dev *dev;
40039 -#define push_end(res, mask) do { \
40040 - BUG_ON((mask+1) & mask); \
40041 - res->end = (res->end + mask) | mask; \
40044 - list_for_each_entry(dev, &bus->devices, bus_list) {
40045 - u16 class = dev->class >> 8;
40047 - if (class == PCI_CLASS_DISPLAY_VGA ||
40048 - class == PCI_CLASS_NOT_DEFINED_VGA)
40050 - if (class >> 8 == PCI_BASE_CLASS_BRIDGE && dev->subordinate)
40051 - rc |= check_for_io_childs(dev->subordinate, res, found_vga);
40052 - if (class == PCI_CLASS_BRIDGE_CARDBUS)
40053 - push_end(res, 0xfff);
40055 - for (i=0; i<PCI_NUM_RESOURCES; i++) {
40056 - struct resource *r;
40057 - unsigned long r_size;
40059 - if (dev->class >> 8 == PCI_CLASS_BRIDGE_PCI
40060 - && i >= PCI_BRIDGE_RESOURCES)
40062 - r = &dev->resource[i];
40063 - r_size = r->end - r->start;
40064 - if (r_size < 0xfff)
40066 - if (r->flags & IORESOURCE_IO && (r_size) != 0) {
40068 - push_end(res, r_size);
40076 -/* Here we scan all P2P bridges of a given level that have a closed
40077 - * IO window. Note that the test for the presence of a VGA card should
40078 - * be improved to take into account already configured P2P bridges,
40079 - * currently, we don't see them and might end up configuring 2 bridges
40080 - * with VGA pass through enabled
40082 -static void __init
40083 -do_fixup_p2p_level(struct pci_bus *bus)
40085 - struct pci_bus *b;
40086 - int i, parent_io;
40089 - for (parent_io=0; parent_io<4; parent_io++)
40090 - if (bus->resource[parent_io]
40091 - && bus->resource[parent_io]->flags & IORESOURCE_IO)
40093 - if (parent_io >= 4)
40096 - list_for_each_entry(b, &bus->children, node) {
40097 - struct pci_dev *d = b->self;
40098 - struct pci_controller* hose = (struct pci_controller *)d->sysdata;
40099 - struct resource *res = b->resource[0];
40100 - struct resource tmp_res;
40101 - unsigned long max;
40102 - int found_vga = 0;
40104 - memset(&tmp_res, 0, sizeof(tmp_res));
40105 - tmp_res.start = bus->resource[parent_io]->start;
40107 - /* We don't let low addresses go through that closed P2P bridge, well,
40108 - * that may not be necessary but I feel safer that way
40110 - if (tmp_res.start == 0)
40111 - tmp_res.start = 0x1000;
40113 - if (!list_empty(&b->devices) && res && res->flags == 0 &&
40114 - res != bus->resource[parent_io] &&
40115 - (d->class >> 8) == PCI_CLASS_BRIDGE_PCI &&
40116 - check_for_io_childs(b, &tmp_res, &found_vga)) {
40119 - printk(KERN_INFO "Fixing up IO bus %s\n", b->name);
40123 - printk(KERN_WARNING "Skipping VGA, already active"
40124 - " on bus segment\n");
40129 - pci_read_config_byte(d, PCI_IO_BASE, &io_base_lo);
40131 - if ((io_base_lo & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32)
40132 - max = ((unsigned long) hose->io_base_virt
40133 - - isa_io_base) + 0xffffffff;
40135 - max = ((unsigned long) hose->io_base_virt
40136 - - isa_io_base) + 0xffff;
40139 - res->flags = IORESOURCE_IO;
40140 - res->name = b->name;
40142 - /* Find a resource in the parent where we can allocate */
40143 - for (i = 0 ; i < 4; i++) {
40144 - struct resource *r = bus->resource[i];
40147 - if ((r->flags & IORESOURCE_IO) == 0)
40149 - DBG("Trying to allocate from %016llx, size %016llx from parent"
40150 - " res %d: %016llx -> %016llx\n",
40151 - res->start, res->end, i, r->start, r->end);
40153 - if (allocate_resource(r, res, res->end + 1, res->start, max,
40154 - res->end + 1, NULL, NULL) < 0) {
40155 - DBG("Failed !\n");
40158 - do_update_p2p_io_resource(b, found_vga);
40162 - do_fixup_p2p_level(b);
40167 -pcibios_fixup_p2p_bridges(void)
40169 - struct pci_bus *b;
40171 - list_for_each_entry(b, &pci_root_buses, node)
40172 - do_fixup_p2p_level(b);
40175 -#endif /* CONFIG_PPC_PMAC */
40178 -pcibios_init(void)
40179 +static int __init pcibios_init(void)
40181 struct pci_controller *hose, *tmp;
40182 struct pci_bus *bus;
40183 @@ -1206,6 +380,9 @@
40185 printk(KERN_INFO "PCI: Probing PCI hardware\n");
40187 + if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS)
40188 + pci_assign_all_buses = 1;
40190 /* Scan all of the recorded PCI controllers. */
40191 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
40192 if (pci_assign_all_buses)
40193 @@ -1213,9 +390,10 @@
40194 hose->last_busno = 0xff;
40195 bus = pci_scan_bus_parented(hose->parent, hose->first_busno,
40199 pci_bus_add_devices(bus);
40200 - hose->last_busno = bus->subordinate;
40201 + hose->last_busno = bus->subordinate;
40203 if (pci_assign_all_buses || next_busno <= hose->last_busno)
40204 next_busno = hose->last_busno + pcibios_assign_bus_offset;
40206 @@ -1228,18 +406,8 @@
40207 if (pci_assign_all_buses && have_of)
40208 pcibios_make_OF_bus_map();
40210 - /* Call machine dependent fixup */
40211 - if (ppc_md.pcibios_fixup)
40212 - ppc_md.pcibios_fixup();
40214 - /* Allocate and assign resources */
40215 - pcibios_allocate_bus_resources(&pci_root_buses);
40216 - pcibios_allocate_resources(0);
40217 - pcibios_allocate_resources(1);
40218 -#ifdef CONFIG_PPC_PMAC
40219 - pcibios_fixup_p2p_bridges();
40220 -#endif /* CONFIG_PPC_PMAC */
40221 - pcibios_assign_resources();
40222 + /* Call common code to handle resource allocation */
40223 + pcibios_resource_survey();
40225 /* Call machine dependent post-init code */
40226 if (ppc_md.pcibios_after_init)
40227 @@ -1250,14 +418,14 @@
40229 subsys_initcall(pcibios_init);
40231 -void pcibios_fixup_bus(struct pci_bus *bus)
40232 +void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
40234 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
40235 unsigned long io_offset;
40236 struct resource *res;
40237 - struct pci_dev *dev;
40240 + /* Hookup PHB resources */
40241 io_offset = (unsigned long)hose->io_base_virt - isa_io_base;
40242 if (bus->parent == NULL) {
40243 /* This is a host bridge - fill in its resources */
40244 @@ -1272,8 +440,8 @@
40245 res->end = IO_SPACE_LIMIT;
40246 res->flags = IORESOURCE_IO;
40248 - res->start += io_offset;
40249 - res->end += io_offset;
40250 + res->start = (res->start + io_offset) & 0xffffffffu;
40251 + res->end = (res->end + io_offset) & 0xffffffffu;
40253 for (i = 0; i < 3; ++i) {
40254 res = &hose->mem_resources[i];
40255 @@ -1288,35 +456,6 @@
40257 bus->resource[i+1] = res;
40260 - /* This is a subordinate bridge */
40261 - pci_read_bridge_bases(bus);
40263 - for (i = 0; i < 4; ++i) {
40264 - if ((res = bus->resource[i]) == NULL)
40266 - if (!res->flags || bus->self->transparent)
40268 - if (io_offset && (res->flags & IORESOURCE_IO)) {
40269 - res->start += io_offset;
40270 - res->end += io_offset;
40271 - } else if (hose->pci_mem_offset
40272 - && (res->flags & IORESOURCE_MEM)) {
40273 - res->start += hose->pci_mem_offset;
40274 - res->end += hose->pci_mem_offset;
40279 - /* Platform specific bus fixups */
40280 - if (ppc_md.pcibios_fixup_bus)
40281 - ppc_md.pcibios_fixup_bus(bus);
40283 - /* Read default IRQs and fixup if necessary */
40284 - list_for_each_entry(dev, &bus->devices, bus_list) {
40285 - pci_read_irq_line(dev);
40286 - if (ppc_md.pci_irq_fixup)
40287 - ppc_md.pci_irq_fixup(dev);
40291 @@ -1328,37 +467,6 @@
40292 /* XXX FIXME - update OF device tree node interrupt property */
40295 -int pcibios_enable_device(struct pci_dev *dev, int mask)
40297 - u16 cmd, old_cmd;
40299 - struct resource *r;
40301 - if (ppc_md.pcibios_enable_device_hook)
40302 - if (ppc_md.pcibios_enable_device_hook(dev, 0))
40305 - pci_read_config_word(dev, PCI_COMMAND, &cmd);
40307 - for (idx=0; idx<6; idx++) {
40308 - r = &dev->resource[idx];
40309 - if (r->flags & IORESOURCE_UNSET) {
40310 - printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
40313 - if (r->flags & IORESOURCE_IO)
40314 - cmd |= PCI_COMMAND_IO;
40315 - if (r->flags & IORESOURCE_MEM)
40316 - cmd |= PCI_COMMAND_MEMORY;
40318 - if (cmd != old_cmd) {
40319 - printk("PCI: Enabling device %s (%04x -> %04x)\n",
40320 - pci_name(dev), old_cmd, cmd);
40321 - pci_write_config_word(dev, PCI_COMMAND, cmd);
40326 static struct pci_controller*
40327 pci_bus_to_hose(int bus)
40329 @@ -1381,17 +489,6 @@
40330 struct pci_controller* hose;
40331 long result = -EOPNOTSUPP;
40333 - /* Argh ! Please forgive me for that hack, but that's the
40334 - * simplest way to get existing XFree to not lockup on some
40335 - * G5 machines... So when something asks for bus 0 io base
40336 - * (bus 0 is HT root), we return the AGP one instead.
40338 -#ifdef CONFIG_PPC_PMAC
40339 - if (machine_is(powermac) && machine_is_compatible("MacRISC4"))
40342 -#endif /* CONFIG_PPC_PMAC */
40344 hose = pci_bus_to_hose(bus);
40347 --- a/arch/powerpc/kernel/pci_64.c
40348 +++ b/arch/powerpc/kernel/pci_64.c
40350 #include <asm/byteorder.h>
40351 #include <asm/machdep.h>
40352 #include <asm/ppc-pci.h>
40353 -#include <asm/firmware.h>
40356 #include <asm/udbg.h>
40360 unsigned long pci_probe_only = 1;
40361 -int pci_assign_all_buses = 0;
40363 -static void fixup_resource(struct resource *res, struct pci_dev *dev);
40364 -static void do_bus_setup(struct pci_bus *bus);
40366 /* pci_io_base -- the base address from which io bars are offsets.
40367 * This is the lowest I/O base address (so bar values are always positive),
40368 @@ -70,139 +65,31 @@
40370 EXPORT_SYMBOL(get_pci_dma_ops);
40372 -static void fixup_broken_pcnet32(struct pci_dev* dev)
40374 - if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
40375 - dev->vendor = PCI_VENDOR_ID_AMD;
40376 - pci_write_config_word(dev, PCI_VENDOR_ID, PCI_VENDOR_ID_AMD);
40379 -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32);
40381 -void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
40382 - struct resource *res)
40384 - unsigned long offset = 0;
40385 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
40390 - if (res->flags & IORESOURCE_IO)
40391 - offset = (unsigned long)hose->io_base_virt - _IO_BASE;
40393 - if (res->flags & IORESOURCE_MEM)
40394 - offset = hose->pci_mem_offset;
40396 - region->start = res->start - offset;
40397 - region->end = res->end - offset;
40400 -void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
40401 - struct pci_bus_region *region)
40402 +int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
40404 - unsigned long offset = 0;
40405 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
40410 - if (res->flags & IORESOURCE_IO)
40411 - offset = (unsigned long)hose->io_base_virt - _IO_BASE;
40413 - if (res->flags & IORESOURCE_MEM)
40414 - offset = hose->pci_mem_offset;
40416 - res->start = region->start + offset;
40417 - res->end = region->end + offset;
40418 + return dma_set_mask(&dev->dev, mask);
40421 -#ifdef CONFIG_HOTPLUG
40422 -EXPORT_SYMBOL(pcibios_resource_to_bus);
40423 -EXPORT_SYMBOL(pcibios_bus_to_resource);
40427 - * We need to avoid collisions with `mirrored' VGA ports
40428 - * and other strange ISA hardware, so we always want the
40429 - * addresses to be allocated in the 0x000-0x0ff region
40432 - * Why? Because some silly external IO cards only decode
40433 - * the low 10 bits of the IO address. The 0x00-0xff region
40434 - * is reserved for motherboard devices that decode all 16
40435 - * bits, so it's ok to allocate at, say, 0x2800-0x28ff,
40436 - * but we want to try to avoid allocating at 0x2900-0x2bff
40437 - * which might have be mirrored at 0x0100-0x03ff..
40439 -void pcibios_align_resource(void *data, struct resource *res,
40440 - resource_size_t size, resource_size_t align)
40441 +int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
40443 - struct pci_dev *dev = data;
40444 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
40445 - resource_size_t start = res->start;
40446 - unsigned long alignto;
40448 - if (res->flags & IORESOURCE_IO) {
40449 - unsigned long offset = (unsigned long)hose->io_base_virt -
40451 - /* Make sure we start at our min on all hoses */
40452 - if (start - offset < PCIBIOS_MIN_IO)
40453 - start = PCIBIOS_MIN_IO + offset;
40456 - * Put everything into 0x00-0xff region modulo 0x400
40458 - if (start & 0x300)
40459 - start = (start + 0x3ff) & ~0x3ff;
40462 - } else if (res->flags & IORESOURCE_MEM) {
40463 - /* Make sure we start at our min on all hoses */
40464 - if (start - hose->pci_mem_offset < PCIBIOS_MIN_MEM)
40465 - start = PCIBIOS_MIN_MEM + hose->pci_mem_offset;
40466 + rc = dma_set_mask(&dev->dev, mask);
40467 + dev->dev.coherent_dma_mask = dev->dma_mask;
40469 - /* Align to multiple of size of minimum base. */
40470 - alignto = max(0x1000UL, align);
40471 - start = ALIGN(start, alignto);
40474 - res->start = start;
40478 -void __devinit pcibios_claim_one_bus(struct pci_bus *b)
40479 +static void fixup_broken_pcnet32(struct pci_dev* dev)
40481 - struct pci_dev *dev;
40482 - struct pci_bus *child_bus;
40484 - list_for_each_entry(dev, &b->devices, bus_list) {
40487 - for (i = 0; i < PCI_NUM_RESOURCES; i++) {
40488 - struct resource *r = &dev->resource[i];
40490 - if (r->parent || !r->start || !r->flags)
40492 - pci_claim_resource(dev, i);
40494 + if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
40495 + dev->vendor = PCI_VENDOR_ID_AMD;
40496 + pci_write_config_word(dev, PCI_VENDOR_ID, PCI_VENDOR_ID_AMD);
40499 - list_for_each_entry(child_bus, &b->children, node)
40500 - pcibios_claim_one_bus(child_bus);
40502 -#ifdef CONFIG_HOTPLUG
40503 -EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
40506 -static void __init pcibios_claim_of_setup(void)
40508 - struct pci_bus *b;
40510 - if (firmware_has_feature(FW_FEATURE_ISERIES))
40512 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32);
40514 - list_for_each_entry(b, &pci_root_buses, node)
40515 - pcibios_claim_one_bus(b);
40518 static u32 get_int_prop(struct device_node *np, const char *name, u32 def)
40520 @@ -270,7 +157,6 @@
40521 res->end = base + size - 1;
40522 res->flags = flags;
40523 res->name = pci_name(dev);
40524 - fixup_resource(res, dev);
40528 @@ -339,16 +225,17 @@
40529 EXPORT_SYMBOL(of_create_pci_dev);
40531 void __devinit of_scan_bus(struct device_node *node,
40532 - struct pci_bus *bus)
40533 + struct pci_bus *bus)
40535 - struct device_node *child = NULL;
40536 + struct device_node *child;
40539 struct pci_dev *dev;
40541 DBG("of_scan_bus(%s) bus no %d... \n", node->full_name, bus->number);
40543 - while ((child = of_get_next_child(node, child)) != NULL) {
40544 + /* Scan direct children */
40545 + for_each_child_of_node(node, child) {
40546 DBG(" * %s\n", child->full_name);
40547 reg = of_get_property(child, "reg", ®len);
40548 if (reg == NULL || reglen < 20)
40549 @@ -359,19 +246,26 @@
40550 dev = of_create_pci_dev(child, bus, devfn);
40553 - DBG("dev header type: %x\n", dev->hdr_type);
40554 + DBG(" dev header type: %x\n", dev->hdr_type);
40557 + /* Ally all fixups */
40558 + pcibios_fixup_of_probed_bus(bus);
40560 + /* Now scan child busses */
40561 + list_for_each_entry(dev, &bus->devices, bus_list) {
40562 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
40563 - dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
40564 - of_scan_pci_bridge(child, dev);
40565 + dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
40566 + struct device_node *child = pci_device_to_OF_node(dev);
40568 + of_scan_pci_bridge(child, dev);
40572 - do_bus_setup(bus);
40574 EXPORT_SYMBOL(of_scan_bus);
40576 void __devinit of_scan_pci_bridge(struct device_node *node,
40577 - struct pci_dev *dev)
40578 + struct pci_dev *dev)
40580 struct pci_bus *bus;
40581 const u32 *busrange, *ranges;
40582 @@ -441,7 +335,6 @@
40583 res->start = of_read_number(&ranges[1], 2);
40584 res->end = res->start + size - 1;
40585 res->flags = flags;
40586 - fixup_resource(res, dev);
40588 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
40590 @@ -462,12 +355,12 @@
40591 void __devinit scan_phb(struct pci_controller *hose)
40593 struct pci_bus *bus;
40594 - struct device_node *node = hose->arch_data;
40595 + struct device_node *node = hose->dn;
40597 - struct resource *res;
40599 - DBG("Scanning PHB %s\n", node ? node->full_name : "<NO NAME>");
40600 + DBG("PCI: Scanning PHB %s\n", node ? node->full_name : "<NO NAME>");
40602 + /* Create an empty bus for the toplevel */
40603 bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node);
40605 printk(KERN_ERR "Failed to create bus for PCI domain %04x\n",
40606 @@ -477,27 +370,27 @@
40607 bus->secondary = hose->first_busno;
40610 - if (!firmware_has_feature(FW_FEATURE_ISERIES))
40611 - pcibios_map_io_space(bus);
40613 - bus->resource[0] = res = &hose->io_resource;
40614 - if (res->flags && request_resource(&ioport_resource, res)) {
40615 - printk(KERN_ERR "Failed to request PCI IO region "
40616 - "on PCI domain %04x\n", hose->global_number);
40617 - DBG("res->start = 0x%016lx, res->end = 0x%016lx\n",
40618 - res->start, res->end);
40620 + /* Get some IO space for the new PHB */
40621 + pcibios_map_io_space(bus);
40623 + /* Wire up PHB bus resources */
40624 + DBG("PCI: PHB IO resource = %016lx-%016lx [%lx]\n",
40625 + hose->io_resource.start, hose->io_resource.end,
40626 + hose->io_resource.flags);
40627 + bus->resource[0] = &hose->io_resource;
40628 for (i = 0; i < 3; ++i) {
40629 - res = &hose->mem_resources[i];
40630 - bus->resource[i+1] = res;
40631 - if (res->flags && request_resource(&iomem_resource, res))
40632 - printk(KERN_ERR "Failed to request PCI memory region "
40633 - "on PCI domain %04x\n", hose->global_number);
40635 + DBG("PCI: PHB MEM resource %d = %016lx-%016lx [%lx]\n", i,
40636 + hose->mem_resources[i].start,
40637 + hose->mem_resources[i].end,
40638 + hose->mem_resources[i].flags);
40639 + bus->resource[i+1] = &hose->mem_resources[i];
40641 + DBG("PCI: PHB MEM offset = %016lx\n", hose->pci_mem_offset);
40642 + DBG("PCI: PHB IO offset = %08lx\n",
40643 + (unsigned long)hose->io_base_virt - _IO_BASE);
40645 + /* Get probe mode and perform scan */
40646 mode = PCI_PROBE_NORMAL;
40648 if (node && ppc_md.pci_probe_mode)
40649 mode = ppc_md.pci_probe_mode(bus);
40650 DBG(" probe mode: %d\n", mode);
40651 @@ -514,15 +407,15 @@
40653 struct pci_controller *hose, *tmp;
40655 + printk(KERN_INFO "PCI: Probing PCI hardware\n");
40657 /* For now, override phys_mem_access_prot. If we need it,
40658 * later, we may move that initialization to each ppc_md
40660 ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot;
40662 - if (firmware_has_feature(FW_FEATURE_ISERIES))
40663 - iSeries_pcibios_init();
40665 - printk(KERN_DEBUG "PCI: Probing PCI hardware\n");
40666 + if (pci_probe_only)
40667 + ppc_pci_flags |= PPC_PCI_PROBE_ONLY;
40669 /* Scan all of the recorded PCI controllers. */
40670 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
40671 @@ -530,19 +423,8 @@
40672 pci_bus_add_devices(hose->bus);
40675 - if (!firmware_has_feature(FW_FEATURE_ISERIES)) {
40676 - if (pci_probe_only)
40677 - pcibios_claim_of_setup();
40679 - /* FIXME: `else' will be removed when
40680 - pci_assign_unassigned_resources() is able to work
40681 - correctly with [partially] allocated PCI tree. */
40682 - pci_assign_unassigned_resources();
40685 - /* Call machine dependent final fixup */
40686 - if (ppc_md.pcibios_fixup)
40687 - ppc_md.pcibios_fixup();
40688 + /* Call common code to handle resource allocation */
40689 + pcibios_resource_survey();
40691 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n");
40693 @@ -551,141 +433,6 @@
40695 subsys_initcall(pcibios_init);
40697 -int pcibios_enable_device(struct pci_dev *dev, int mask)
40702 - pci_read_config_word(dev, PCI_COMMAND, &cmd);
40705 - for (i = 0; i < PCI_NUM_RESOURCES; i++) {
40706 - struct resource *res = &dev->resource[i];
40708 - /* Only set up the requested stuff */
40709 - if (!(mask & (1<<i)))
40712 - if (res->flags & IORESOURCE_IO)
40713 - cmd |= PCI_COMMAND_IO;
40714 - if (res->flags & IORESOURCE_MEM)
40715 - cmd |= PCI_COMMAND_MEMORY;
40718 - if (cmd != oldcmd) {
40719 - printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n",
40720 - pci_name(dev), cmd);
40721 - /* Enable the appropriate bits in the PCI command register. */
40722 - pci_write_config_word(dev, PCI_COMMAND, cmd);
40727 -/* Decide whether to display the domain number in /proc */
40728 -int pci_proc_domain(struct pci_bus *bus)
40730 - if (firmware_has_feature(FW_FEATURE_ISERIES))
40733 - struct pci_controller *hose = pci_bus_to_host(bus);
40734 - return hose->buid != 0;
40738 -void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
40739 - struct device_node *dev, int prim)
40741 - const unsigned int *ranges;
40742 - unsigned int pci_space;
40743 - unsigned long size;
40746 - struct resource *res;
40747 - int np, na = of_n_addr_cells(dev);
40748 - unsigned long pci_addr, cpu_phys_addr;
40752 - /* From "PCI Binding to 1275"
40753 - * The ranges property is laid out as an array of elements,
40754 - * each of which comprises:
40755 - * cells 0 - 2: a PCI address
40756 - * cells 3 or 3+4: a CPU physical address
40757 - * (size depending on dev->n_addr_cells)
40758 - * cells 4+5 or 5+6: the size of the range
40760 - ranges = of_get_property(dev, "ranges", &rlen);
40761 - if (ranges == NULL)
40763 - hose->io_base_phys = 0;
40764 - while ((rlen -= np * sizeof(unsigned int)) >= 0) {
40766 - pci_space = ranges[0];
40767 - pci_addr = ((unsigned long)ranges[1] << 32) | ranges[2];
40768 - cpu_phys_addr = of_translate_address(dev, &ranges[3]);
40769 - size = ((unsigned long)ranges[na+3] << 32) | ranges[na+4];
40774 - /* Now consume following elements while they are contiguous */
40775 - while (rlen >= np * sizeof(unsigned int)) {
40776 - unsigned long addr, phys;
40778 - if (ranges[0] != pci_space)
40780 - addr = ((unsigned long)ranges[1] << 32) | ranges[2];
40781 - phys = ranges[3];
40783 - phys = (phys << 32) | ranges[4];
40784 - if (addr != pci_addr + size ||
40785 - phys != cpu_phys_addr + size)
40788 - size += ((unsigned long)ranges[na+3] << 32)
40791 - rlen -= np * sizeof(unsigned int);
40794 - switch ((pci_space >> 24) & 0x3) {
40795 - case 1: /* I/O space */
40796 - hose->io_base_phys = cpu_phys_addr - pci_addr;
40797 - /* handle from 0 to top of I/O window */
40798 - hose->pci_io_size = pci_addr + size;
40800 - res = &hose->io_resource;
40801 - res->flags = IORESOURCE_IO;
40802 - res->start = pci_addr;
40803 - DBG("phb%d: IO 0x%lx -> 0x%lx\n", hose->global_number,
40804 - res->start, res->start + size - 1);
40806 - case 2: /* memory space */
40808 - while (memno < 3 && hose->mem_resources[memno].flags)
40812 - hose->pci_mem_offset = cpu_phys_addr - pci_addr;
40814 - res = &hose->mem_resources[memno];
40815 - res->flags = IORESOURCE_MEM;
40816 - res->start = cpu_phys_addr;
40817 - DBG("phb%d: MEM 0x%lx -> 0x%lx\n", hose->global_number,
40818 - res->start, res->start + size - 1);
40822 - if (res != NULL) {
40823 - res->name = dev->full_name;
40824 - res->end = res->start + size - 1;
40825 - res->parent = NULL;
40826 - res->sibling = NULL;
40827 - res->child = NULL;
40832 #ifdef CONFIG_HOTPLUG
40834 int pcibios_unmap_io_space(struct pci_bus *bus)
40835 @@ -719,8 +466,7 @@
40836 if (hose->io_base_alloc == 0)
40839 - DBG("IO unmapping for PHB %s\n",
40840 - ((struct device_node *)hose->arch_data)->full_name);
40841 + DBG("IO unmapping for PHB %s\n", hose->dn->full_name);
40842 DBG(" alloc=0x%p\n", hose->io_base_alloc);
40844 /* This is a PHB, we fully unmap the IO area */
40845 @@ -779,8 +525,7 @@
40846 hose->io_base_virt = (void __iomem *)(area->addr +
40847 hose->io_base_phys - phys_page);
40849 - DBG("IO mapping for PHB %s\n",
40850 - ((struct device_node *)hose->arch_data)->full_name);
40851 + DBG("IO mapping for PHB %s\n", hose->dn->full_name);
40852 DBG(" phys=0x%016lx, virt=0x%p (alloc=0x%p)\n",
40853 hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc);
40854 DBG(" size=0x%016lx (alloc=0x%016lx)\n",
40855 @@ -803,51 +548,13 @@
40857 EXPORT_SYMBOL_GPL(pcibios_map_io_space);
40859 -static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
40861 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
40862 - unsigned long offset;
40864 - if (res->flags & IORESOURCE_IO) {
40865 - offset = (unsigned long)hose->io_base_virt - _IO_BASE;
40866 - res->start += offset;
40867 - res->end += offset;
40868 - } else if (res->flags & IORESOURCE_MEM) {
40869 - res->start += hose->pci_mem_offset;
40870 - res->end += hose->pci_mem_offset;
40874 -void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
40875 - struct pci_bus *bus)
40877 - /* Update device resources. */
40880 - DBG("%s: Fixup resources:\n", pci_name(dev));
40881 - for (i = 0; i < PCI_NUM_RESOURCES; i++) {
40882 - struct resource *res = &dev->resource[i];
40886 - DBG(" 0x%02x < %08lx:0x%016lx...0x%016lx\n",
40887 - i, res->flags, res->start, res->end);
40889 - fixup_resource(res, dev);
40891 - DBG(" > %08lx:0x%016lx...0x%016lx\n",
40892 - res->flags, res->start, res->end);
40895 -EXPORT_SYMBOL(pcibios_fixup_device_resources);
40897 void __devinit pcibios_setup_new_device(struct pci_dev *dev)
40899 struct dev_archdata *sd = &dev->dev.archdata;
40901 sd->of_node = pci_device_to_OF_node(dev);
40903 - DBG("PCI device %s OF node: %s\n", pci_name(dev),
40904 + DBG("PCI: device %s OF node: %s\n", pci_name(dev),
40905 sd->of_node ? sd->of_node->full_name : "<none>");
40907 sd->dma_ops = pci_dma_ops;
40908 @@ -861,7 +568,7 @@
40910 EXPORT_SYMBOL(pcibios_setup_new_device);
40912 -static void __devinit do_bus_setup(struct pci_bus *bus)
40913 +void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
40915 struct pci_dev *dev;
40917 @@ -870,42 +577,7 @@
40919 list_for_each_entry(dev, &bus->devices, bus_list)
40920 pcibios_setup_new_device(dev);
40922 - /* Read default IRQs and fixup if necessary */
40923 - list_for_each_entry(dev, &bus->devices, bus_list) {
40924 - pci_read_irq_line(dev);
40925 - if (ppc_md.pci_irq_fixup)
40926 - ppc_md.pci_irq_fixup(dev);
40930 -void __devinit pcibios_fixup_bus(struct pci_bus *bus)
40932 - struct pci_dev *dev = bus->self;
40933 - struct device_node *np;
40935 - np = pci_bus_to_OF_node(bus);
40937 - DBG("pcibios_fixup_bus(%s)\n", np ? np->full_name : "<???>");
40939 - if (dev && pci_probe_only &&
40940 - (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
40941 - /* This is a subordinate bridge */
40943 - pci_read_bridge_bases(bus);
40944 - pcibios_fixup_device_resources(dev, bus);
40947 - do_bus_setup(bus);
40949 - if (!pci_probe_only)
40952 - list_for_each_entry(dev, &bus->devices, bus_list)
40953 - if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
40954 - pcibios_fixup_device_resources(dev, bus);
40956 -EXPORT_SYMBOL(pcibios_fixup_bus);
40958 unsigned long pci_address_to_pio(phys_addr_t address)
40960 --- a/arch/powerpc/kernel/pci_dn.c
40961 +++ b/arch/powerpc/kernel/pci_dn.c
40963 pdn->busno = (regs[0] >> 16) & 0xff;
40964 pdn->devfn = (regs[0] >> 8) & 0xff;
40966 - if (firmware_has_feature(FW_FEATURE_ISERIES)) {
40967 - const u32 *busp = of_get_property(dn, "linux,subbus", NULL);
40969 - pdn->bussubno = *busp;
40972 pdn->pci_ext_config_space = (type && *type == 1);
40974 @@ -133,7 +128,7 @@
40976 void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb)
40978 - struct device_node * dn = (struct device_node *) phb->arch_data;
40979 + struct device_node *dn = phb->dn;
40980 struct pci_dn *pdn;
40982 /* PHB nodes themselves must not match */
40983 --- a/arch/powerpc/kernel/ppc_ksyms.c
40984 +++ b/arch/powerpc/kernel/ppc_ksyms.c
40986 extern int sys_sigreturn(struct pt_regs *regs);
40988 EXPORT_SYMBOL(clear_pages);
40989 +EXPORT_SYMBOL(copy_page);
40990 EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
40991 EXPORT_SYMBOL(DMA_MODE_READ);
40992 EXPORT_SYMBOL(DMA_MODE_WRITE);
40993 --- a/arch/powerpc/kernel/prom.c
40994 +++ b/arch/powerpc/kernel/prom.c
40995 @@ -583,6 +583,20 @@
40996 ibm_pa_features, ARRAY_SIZE(ibm_pa_features));
40999 +#ifdef CONFIG_PPC64
41000 +static void __init check_cpu_slb_size(unsigned long node)
41002 + u32 *slb_size_ptr;
41004 + slb_size_ptr = of_get_flat_dt_prop(node, "ibm,slb-size", NULL);
41005 + if (slb_size_ptr != NULL) {
41006 + mmu_slb_size = *slb_size_ptr;
41010 +#define check_cpu_slb_size(node) do { } while(0)
41013 static struct feature_property {
41016 @@ -600,6 +614,29 @@
41017 #endif /* CONFIG_PPC64 */
41020 +#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU)
41021 +static inline void identical_pvr_fixup(unsigned long node)
41023 + unsigned int pvr;
41024 + char *model = of_get_flat_dt_prop(node, "model", NULL);
41027 + * Since 440GR(x)/440EP(x) processors have the same pvr,
41028 + * we check the node path and set bit 28 in the cur_cpu_spec
41029 + * pvr for EP(x) processor version. This bit is always 0 in
41030 + * the "real" pvr. Then we call identify_cpu again with
41031 + * the new logical pvr to enable FPU support.
41033 + if (model && strstr(model, "440EP")) {
41034 + pvr = cur_cpu_spec->pvr_value | 0x8;
41035 + identify_cpu(0, pvr);
41036 + DBG("Using logical pvr %x for %s\n", pvr, model);
41040 +#define identical_pvr_fixup(node) do { } while(0)
41043 static void __init check_cpu_feature_properties(unsigned long node)
41046 @@ -697,22 +734,13 @@
41047 prop = of_get_flat_dt_prop(node, "cpu-version", NULL);
41048 if (prop && (*prop & 0xff000000) == 0x0f000000)
41049 identify_cpu(0, *prop);
41050 -#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU)
41052 - * Since 440GR(x)/440EP(x) processors have the same pvr,
41053 - * we check the node path and set bit 28 in the cur_cpu_spec
41054 - * pvr for EP(x) processor version. This bit is always 0 in
41055 - * the "real" pvr. Then we call identify_cpu again with
41056 - * the new logical pvr to enable FPU support.
41058 - if (strstr(uname, "440EP")) {
41059 - identify_cpu(0, cur_cpu_spec->pvr_value | 0x8);
41063 + identical_pvr_fixup(node);
41066 check_cpu_feature_properties(node);
41067 check_cpu_pa_features(node);
41068 + check_cpu_slb_size(node);
41070 #ifdef CONFIG_PPC_PSERIES
41072 --- a/arch/powerpc/kernel/prom_parse.c
41073 +++ b/arch/powerpc/kernel/prom_parse.c
41074 @@ -273,7 +273,7 @@
41076 struct pci_controller *host;
41077 host = pci_bus_to_host(pdev->bus);
41078 - ppnode = host ? host->arch_data : NULL;
41079 + ppnode = host ? host->dn : NULL;
41081 /* No node for host bridge ? give up */
41082 if (ppnode == NULL)
41083 @@ -419,7 +419,7 @@
41085 static int of_translate_one(struct device_node *parent, struct of_bus *bus,
41086 struct of_bus *pbus, u32 *addr,
41087 - int na, int ns, int pna)
41088 + int na, int ns, int pna, const char *rprop)
41092 @@ -438,7 +438,7 @@
41093 * to translate addresses that aren't supposed to be translated in
41094 * the first place. --BenH.
41096 - ranges = of_get_property(parent, "ranges", &rlen);
41097 + ranges = of_get_property(parent, rprop, &rlen);
41098 if (ranges == NULL || rlen == 0) {
41099 offset = of_read_number(addr, na);
41100 memset(addr, 0, pna * 4);
41101 @@ -481,7 +481,8 @@
41102 * that can be mapped to a cpu physical address). This is not really specified
41103 * that way, but this is traditionally the way IBM at least do things
41105 -u64 of_translate_address(struct device_node *dev, const u32 *in_addr)
41106 +u64 __of_translate_address(struct device_node *dev, const u32 *in_addr,
41107 + const char *rprop)
41109 struct device_node *parent = NULL;
41110 struct of_bus *bus, *pbus;
41111 @@ -540,7 +541,7 @@
41112 pbus->name, pna, pns, parent->full_name);
41114 /* Apply bus translation */
41115 - if (of_translate_one(dev, bus, pbus, addr, na, ns, pna))
41116 + if (of_translate_one(dev, bus, pbus, addr, na, ns, pna, rprop))
41119 /* Complete the move up one level */
41120 @@ -556,8 +557,19 @@
41125 +u64 of_translate_address(struct device_node *dev, const u32 *in_addr)
41127 + return __of_translate_address(dev, in_addr, "ranges");
41129 EXPORT_SYMBOL(of_translate_address);
41131 +u64 of_translate_dma_address(struct device_node *dev, const u32 *in_addr)
41133 + return __of_translate_address(dev, in_addr, "dma-ranges");
41135 +EXPORT_SYMBOL(of_translate_dma_address);
41137 const u32 *of_get_address(struct device_node *dev, int index, u64 *size,
41138 unsigned int *flags)
41141 +++ b/arch/powerpc/kernel/rio.c
41144 + * RapidIO PPC32 support
41146 + * Copyright 2005 MontaVista Software, Inc.
41147 + * Matt Porter <mporter@kernel.crashing.org>
41149 + * This program is free software; you can redistribute it and/or modify it
41150 + * under the terms of the GNU General Public License as published by the
41151 + * Free Software Foundation; either version 2 of the License, or (at your
41152 + * option) any later version.
41155 +#include <linux/init.h>
41156 +#include <linux/kernel.h>
41157 +#include <linux/rio.h>
41159 +#include <asm/rio.h>
41162 + * platform_rio_init - Do platform specific RIO init
41164 + * Any platform specific initialization of RapdIO
41165 + * hardware is done here as well as registration
41166 + * of any active master ports in the system.
41168 +void __attribute__ ((weak))
41169 + platform_rio_init(void)
41171 + printk(KERN_WARNING "RIO: No platform_rio_init() present\n");
41175 + * ppc_rio_init - Do PPC32 RIO init
41177 + * Calls platform-specific RIO init code and then calls
41178 + * rio_init_mports() to initialize any master ports that
41179 + * have been registered with the RIO subsystem.
41181 +static int __init ppc_rio_init(void)
41183 + printk(KERN_INFO "RIO: RapidIO init\n");
41185 + /* Platform specific initialization */
41186 + platform_rio_init();
41188 + /* Enumerate all registered ports */
41189 + rio_init_mports();
41194 +subsys_initcall(ppc_rio_init);
41195 --- a/arch/powerpc/kernel/rtas_pci.c
41196 +++ b/arch/powerpc/kernel/rtas_pci.c
41197 @@ -260,7 +260,7 @@
41199 int __devinit rtas_setup_phb(struct pci_controller *phb)
41201 - struct device_node *dev = phb->arch_data;
41202 + struct device_node *dev = phb->dn;
41204 if (is_python(dev))
41205 python_countermeasures(dev);
41206 @@ -280,10 +280,7 @@
41207 struct pci_controller *phb;
41208 struct device_node *root = of_find_node_by_path("/");
41210 - for (node = of_get_next_child(root, NULL);
41212 - node = of_get_next_child(root, node)) {
41214 + for_each_child_of_node(root, node) {
41215 if (node->type == NULL || (strcmp(node->type, "pci") != 0 &&
41216 strcmp(node->type, "pciex") != 0))
41218 @@ -311,10 +308,12 @@
41220 pci_probe_only = *prop;
41222 +#ifdef CONFIG_PPC32 /* Will be made generic soon */
41223 prop = of_get_property(of_chosen,
41224 "linux,pci-assign-all-buses", NULL);
41226 - pci_assign_all_buses = *prop;
41227 + if (prop && *prop)
41228 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
41229 +#endif /* CONFIG_PPC32 */
41233 --- a/arch/powerpc/kernel/setup-common.c
41234 +++ b/arch/powerpc/kernel/setup-common.c
41236 #include <linux/serial.h>
41237 #include <linux/serial_8250.h>
41238 #include <linux/debugfs.h>
41239 +#include <linux/percpu.h>
41240 #include <asm/io.h>
41241 #include <asm/prom.h>
41242 #include <asm/processor.h>
41244 #include <asm/mmu.h>
41245 #include <asm/lmb.h>
41246 #include <asm/xmon.h>
41247 +#include <asm/cputhreads.h>
41251 @@ -327,6 +329,31 @@
41255 +int threads_per_core, threads_shift;
41256 +cpumask_t threads_core_mask;
41258 +static void __init cpu_init_thread_core_maps(int tpc)
41262 + threads_per_core = tpc;
41263 + threads_core_mask = CPU_MASK_NONE;
41265 + /* This implementation only supports power of 2 number of threads
41266 + * for simplicity and performance
41268 + threads_shift = ilog2(tpc);
41269 + BUG_ON(tpc != (1 << threads_shift));
41271 + for (i = 0; i < tpc; i++)
41272 + cpu_set(i, threads_core_mask);
41274 + printk(KERN_INFO "CPU maps initialized for %d thread%s per core\n",
41275 + tpc, tpc > 1 ? "s" : "");
41276 + printk(KERN_DEBUG " (thread shift is %d)\n", threads_shift);
41281 * setup_cpu_maps - initialize the following cpu maps:
41283 @@ -350,22 +377,32 @@
41285 struct device_node *dn = NULL;
41287 + int nthreads = 1;
41289 + DBG("smp_setup_cpu_maps()\n");
41291 while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) {
41292 const int *intserv;
41293 - int j, len = sizeof(u32), nthreads = 1;
41296 + DBG(" * %s...\n", dn->full_name);
41298 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
41302 nthreads = len / sizeof(int);
41304 + DBG(" ibm,ppc-interrupt-server#s -> %d threads\n",
41307 + DBG(" no ibm,ppc-interrupt-server#s -> 1 thread\n");
41308 intserv = of_get_property(dn, "reg", NULL);
41310 intserv = &cpu; /* assume logical == phys */
41313 for (j = 0; j < nthreads && cpu < NR_CPUS; j++) {
41314 + DBG(" thread %d -> cpu %d (hard id %d)\n",
41315 + j, cpu, intserv[j]);
41316 cpu_set(cpu, cpu_present_map);
41317 set_hard_smp_processor_id(cpu, intserv[j]);
41318 cpu_set(cpu, cpu_possible_map);
41319 @@ -373,6 +410,12 @@
41323 + /* If no SMT supported, nthreads is forced to 1 */
41324 + if (!cpu_has_feature(CPU_FTR_SMT)) {
41325 + DBG(" SMT disabled ! nthreads forced to 1\n");
41329 #ifdef CONFIG_PPC64
41331 * On pSeries LPAR, we need to know how many cpus
41332 @@ -395,7 +438,7 @@
41334 /* Double maxcpus for processors which have SMT capability */
41335 if (cpu_has_feature(CPU_FTR_SMT))
41337 + maxcpus *= nthreads;
41339 if (maxcpus > NR_CPUS) {
41340 printk(KERN_WARNING
41341 @@ -412,9 +455,16 @@
41346 vdso_data->processorCount = num_present_cpus();
41347 #endif /* CONFIG_PPC64 */
41349 + /* Initialize CPU <=> thread mapping/
41351 + * WARNING: We assume that the number of threads is the same for
41352 + * every CPU in the system. If that is not the case, then some code
41353 + * here will have to be reworked
41355 + cpu_init_thread_core_maps(nthreads);
41359 @@ -424,17 +474,19 @@
41361 void __init smp_setup_cpu_sibling_map(void)
41363 -#if defined(CONFIG_PPC64)
41365 +#ifdef CONFIG_PPC64
41366 + int i, cpu, base;
41369 - * Do the sibling map; assume only two threads per processor.
41371 for_each_possible_cpu(cpu) {
41372 - cpu_set(cpu, per_cpu(cpu_sibling_map, cpu));
41373 - if (cpu_has_feature(CPU_FTR_SMT))
41374 - cpu_set(cpu ^ 0x1, per_cpu(cpu_sibling_map, cpu));
41375 + DBG("Sibling map for CPU %d:", cpu);
41376 + base = cpu_first_thread_in_core(cpu);
41377 + for (i = 0; i < threads_per_core; i++) {
41378 + cpu_set(base + i, per_cpu(cpu_sibling_map, cpu));
41379 + DBG(" %d", base + i);
41384 #endif /* CONFIG_PPC64 */
41386 #endif /* CONFIG_SMP */
41387 --- a/arch/powerpc/kernel/signal_32.c
41388 +++ b/arch/powerpc/kernel/signal_32.c
41389 @@ -24,13 +24,12 @@
41390 #include <linux/signal.h>
41391 #include <linux/errno.h>
41392 #include <linux/elf.h>
41393 +#include <linux/ptrace.h>
41394 #ifdef CONFIG_PPC64
41395 #include <linux/syscalls.h>
41396 #include <linux/compat.h>
41397 -#include <linux/ptrace.h>
41399 #include <linux/wait.h>
41400 -#include <linux/ptrace.h>
41401 #include <linux/unistd.h>
41402 #include <linux/stddef.h>
41403 #include <linux/tty.h>
41404 --- a/arch/powerpc/kernel/smp.c
41405 +++ b/arch/powerpc/kernel/smp.c
41408 int smt_enabled_at_boot = 1;
41410 +static int ipi_fail_ok;
41412 static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
41414 #ifdef CONFIG_PPC64
41415 @@ -181,12 +183,13 @@
41416 * <wait> If true, wait (atomically) until function has completed on other CPUs.
41417 * [RETURNS] 0 on success, else a negative status code. Does not return until
41418 * remote CPUs are nearly ready to execute <<func>> or are or have executed.
41419 + * <map> is a cpu map of the cpus to send IPI to.
41421 * You must not call this function with disabled interrupts or from a
41422 * hardware interrupt handler or from a bottom half handler.
41424 -int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
41425 - int wait, cpumask_t map)
41426 +static int __smp_call_function_map(void (*func) (void *info), void *info,
41427 + int nonatomic, int wait, cpumask_t map)
41429 struct call_data_struct data;
41430 int ret = -1, num_cpus;
41431 @@ -203,8 +206,6 @@
41433 atomic_set(&data.finished, 0);
41435 - spin_lock(&call_lock);
41437 /* remove 'self' from the map */
41438 if (cpu_isset(smp_processor_id(), map))
41439 cpu_clear(smp_processor_id(), map);
41440 @@ -231,7 +232,8 @@
41441 printk("smp_call_function on cpu %d: other cpus not "
41442 "responding (%d)\n", smp_processor_id(),
41443 atomic_read(&data.started));
41445 + if (!ipi_fail_ok)
41450 @@ -258,14 +260,18 @@
41454 - spin_unlock(&call_lock);
41458 static int __smp_call_function(void (*func)(void *info), void *info,
41459 int nonatomic, int wait)
41461 - return smp_call_function_map(func,info,nonatomic,wait,cpu_online_map);
41463 + spin_lock(&call_lock);
41464 + ret =__smp_call_function_map(func, info, nonatomic, wait,
41466 + spin_unlock(&call_lock);
41470 int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
41471 @@ -278,8 +284,8 @@
41473 EXPORT_SYMBOL(smp_call_function);
41475 -int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int nonatomic,
41477 +int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
41478 + int nonatomic, int wait)
41480 cpumask_t map = CPU_MASK_NONE;
41482 @@ -291,9 +297,11 @@
41486 - if (cpu != get_cpu())
41487 - ret = smp_call_function_map(func,info,nonatomic,wait,map);
41489 + if (cpu != get_cpu()) {
41490 + spin_lock(&call_lock);
41491 + ret = __smp_call_function_map(func, info, nonatomic, wait, map);
41492 + spin_unlock(&call_lock);
41494 local_irq_disable();
41496 local_irq_enable();
41497 @@ -305,7 +313,22 @@
41499 void smp_send_stop(void)
41501 - __smp_call_function(stop_this_cpu, NULL, 1, 0);
41504 + /* It's OK to fail sending the IPI, since the alternative is to
41505 + * be stuck forever waiting on the other CPU to take the interrupt.
41507 + * It's better to at least continue and go through reboot, since this
41508 + * function is usually called at panic or reboot time in the first
41513 + /* Don't deadlock in case we got called through panic */
41514 + nolock = !spin_trylock(&call_lock);
41515 + __smp_call_function_map(stop_this_cpu, NULL, 1, 0, cpu_online_map);
41517 + spin_unlock(&call_lock);
41520 void smp_call_function_interrupt(void)
41522 +++ b/arch/powerpc/kernel/systbl_chk.c
41525 + * This file, when run through CPP produces a list of syscall numbers
41526 + * in the order of systbl.h. That way we can check for gaps and syscalls
41527 + * that are out of order.
41529 + * Unfortunately, we cannot check for the correct ordering of entries
41532 + * Copyright © IBM Corporation
41534 + * This program is free software; you can redistribute it and/or
41535 + * modify it under the terms of the GNU General Public License
41536 + * as published by the Free Software Foundation; either version
41537 + * 2 of the License, or (at your option) any later version.
41539 +#include <asm/unistd.h>
41541 +#define SYSCALL(func) __NR_##func
41542 +#define COMPAT_SYS(func) __NR_##func
41543 +#define PPC_SYS(func) __NR_##func
41544 +#ifdef CONFIG_PPC64
41545 +#define OLDSYS(func) -1
41546 +#define SYS32ONLY(func) -1
41548 +#define OLDSYS(func) __NR_old##func
41549 +#define SYS32ONLY(func) __NR_##func
41551 +#define SYSX(f, f3264, f32) -1
41553 +#define SYSCALL_SPU(func) SYSCALL(func)
41554 +#define COMPAT_SYS_SPU(func) COMPAT_SYS(func)
41555 +#define PPC_SYS_SPU(func) PPC_SYS(func)
41556 +#define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32)
41558 +/* Just insert a marker for ni_syscalls */
41559 +#define __NR_ni_syscall -1
41562 + * These are the known exceptions.
41563 + * Hopefully, there will be no more.
41565 +#define __NR_llseek __NR__llseek
41566 +#undef __NR_umount
41567 +#define __NR_umount __NR_umount2
41568 +#define __NR_old_getrlimit __NR_getrlimit
41569 +#define __NR_newstat __NR_stat
41570 +#define __NR_newlstat __NR_lstat
41571 +#define __NR_newfstat __NR_fstat
41572 +#define __NR_newuname __NR_uname
41573 +#define __NR_sysctl __NR__sysctl
41574 +#define __NR_olddebug_setcontext __NR_sys_debug_setcontext
41576 +/* We call sys_ugetrlimit for syscall number __NR_getrlimit */
41577 +#define getrlimit ugetrlimit
41580 +#include <asm/systbl.h>
41581 +END_TABLE __NR_syscalls
41583 +++ b/arch/powerpc/kernel/systbl_chk.sh
41587 +# Just process the CPP output from systbl_chk.c and complain
41588 +# if anything is out of order.
41590 +# Copyright © 2008 IBM Corporation
41592 +# This program is free software; you can redistribute it and/or
41593 +# modify it under the terms of the GNU General Public License
41594 +# as published by the Free Software Foundation; either version
41595 +# 2 of the License, or (at your option) any later version.
41597 +awk 'BEGIN { num = -1; } # Ignore the beginning of the file
41599 + /^[ \t]*$/ { next; }
41600 + /^START_TABLE/ { num = 0; next; }
41603 + printf "__NR_syscalls (%s) is not one more than the last syscall (%s)\n",
41607 + num = -1; # Ignore the rest of the file
41610 + if (num == -1) next;
41611 + if (($1 != -1) && ($1 != num)) {
41612 + printf "Syscall %s out of order (expected %s)\n",
41618 --- a/arch/powerpc/kernel/time.c
41619 +++ b/arch/powerpc/kernel/time.c
41620 @@ -116,9 +116,12 @@
41621 .features = CLOCK_EVT_FEAT_ONESHOT,
41624 -static DEFINE_PER_CPU(struct clock_event_device, decrementers);
41625 -void init_decrementer_clockevent(void);
41626 -static DEFINE_PER_CPU(u64, decrementer_next_tb);
41627 +struct decrementer_clock {
41628 + struct clock_event_device event;
41632 +static DEFINE_PER_CPU(struct decrementer_clock, decrementers);
41634 #ifdef CONFIG_PPC_ISERIES
41635 static unsigned long __initdata iSeries_recal_titan;
41636 @@ -216,7 +219,11 @@
41638 static u64 read_spurr(u64 purr)
41640 - if (cpu_has_feature(CPU_FTR_SPURR))
41642 + * cpus without PURR won't have a SPURR
41643 + * We already know the former when we use this, so tell gcc
41645 + if (cpu_has_feature(CPU_FTR_PURR) && cpu_has_feature(CPU_FTR_SPURR))
41646 return mfspr(SPRN_SPURR);
41649 @@ -227,29 +234,30 @@
41651 void account_system_vtime(struct task_struct *tsk)
41653 - u64 now, nowscaled, delta, deltascaled;
41654 + u64 now, nowscaled, delta, deltascaled, sys_time;
41655 unsigned long flags;
41657 local_irq_save(flags);
41659 - delta = now - get_paca()->startpurr;
41660 - get_paca()->startpurr = now;
41661 nowscaled = read_spurr(now);
41662 + delta = now - get_paca()->startpurr;
41663 deltascaled = nowscaled - get_paca()->startspurr;
41664 + get_paca()->startpurr = now;
41665 get_paca()->startspurr = nowscaled;
41666 if (!in_interrupt()) {
41667 /* deltascaled includes both user and system time.
41668 * Hence scale it based on the purr ratio to estimate
41669 * the system time */
41670 + sys_time = get_paca()->system_time;
41671 if (get_paca()->user_time)
41672 - deltascaled = deltascaled * get_paca()->system_time /
41673 - (get_paca()->system_time + get_paca()->user_time);
41674 - delta += get_paca()->system_time;
41675 + deltascaled = deltascaled * sys_time /
41676 + (sys_time + get_paca()->user_time);
41677 + delta += sys_time;
41678 get_paca()->system_time = 0;
41680 account_system_time(tsk, 0, delta);
41681 - get_paca()->purrdelta = delta;
41682 account_system_time_scaled(tsk, deltascaled);
41683 + get_paca()->purrdelta = delta;
41684 get_paca()->spurrdelta = deltascaled;
41685 local_irq_restore(flags);
41687 @@ -326,11 +334,9 @@
41689 struct cpu_purr_data *pme;
41691 - if (!cpu_has_feature(CPU_FTR_PURR))
41693 - pme = &per_cpu(cpu_purr_data, smp_processor_id());
41694 + pme = &__get_cpu_var(cpu_purr_data);
41695 if (!pme->initialized)
41696 - return; /* this can happen in early boot */
41697 + return; /* !CPU_FTR_PURR or early in early boot */
41699 purr = mfspr(SPRN_PURR);
41700 stolen = (tb - pme->tb) - (purr - pme->purr);
41701 @@ -353,7 +359,7 @@
41702 if (!cpu_has_feature(CPU_FTR_PURR))
41704 local_irq_save(flags);
41705 - pme = &per_cpu(cpu_purr_data, smp_processor_id());
41706 + pme = &__get_cpu_var(cpu_purr_data);
41708 pme->purr = mfspr(SPRN_PURR);
41709 pme->initialized = 1;
41710 @@ -556,8 +562,8 @@
41711 void timer_interrupt(struct pt_regs * regs)
41713 struct pt_regs *old_regs;
41714 - int cpu = smp_processor_id();
41715 - struct clock_event_device *evt = &per_cpu(decrementers, cpu);
41716 + struct decrementer_clock *decrementer = &__get_cpu_var(decrementers);
41717 + struct clock_event_device *evt = &decrementer->event;
41720 /* Ensure a positive value is written to the decrementer, or else
41721 @@ -570,9 +576,9 @@
41724 now = get_tb_or_rtc();
41725 - if (now < per_cpu(decrementer_next_tb, cpu)) {
41726 + if (now < decrementer->next_tb) {
41727 /* not time for this event yet */
41728 - now = per_cpu(decrementer_next_tb, cpu) - now;
41729 + now = decrementer->next_tb - now;
41730 if (now <= DECREMENTER_MAX)
41733 @@ -623,6 +629,45 @@
41737 +#ifdef CONFIG_SUSPEND
41738 +void generic_suspend_disable_irqs(void)
41740 + preempt_disable();
41742 + /* Disable the decrementer, so that it doesn't interfere
41743 + * with suspending.
41746 + set_dec(0x7fffffff);
41747 + local_irq_disable();
41748 + set_dec(0x7fffffff);
41751 +void generic_suspend_enable_irqs(void)
41753 + wakeup_decrementer();
41755 + local_irq_enable();
41756 + preempt_enable();
41759 +/* Overrides the weak version in kernel/power/main.c */
41760 +void arch_suspend_disable_irqs(void)
41762 + if (ppc_md.suspend_disable_irqs)
41763 + ppc_md.suspend_disable_irqs();
41764 + generic_suspend_disable_irqs();
41767 +/* Overrides the weak version in kernel/power/main.c */
41768 +void arch_suspend_enable_irqs(void)
41770 + generic_suspend_enable_irqs();
41771 + if (ppc_md.suspend_enable_irqs)
41772 + ppc_md.suspend_enable_irqs();
41777 void __init smp_space_timers(unsigned int max_cpus)
41779 @@ -811,7 +856,7 @@
41780 static int decrementer_set_next_event(unsigned long evt,
41781 struct clock_event_device *dev)
41783 - __get_cpu_var(decrementer_next_tb) = get_tb_or_rtc() + evt;
41784 + __get_cpu_var(decrementers).next_tb = get_tb_or_rtc() + evt;
41788 @@ -825,7 +870,7 @@
41790 static void register_decrementer_clockevent(int cpu)
41792 - struct clock_event_device *dec = &per_cpu(decrementers, cpu);
41793 + struct clock_event_device *dec = &per_cpu(decrementers, cpu).event;
41795 *dec = decrementer_clockevent;
41796 dec->cpumask = cpumask_of_cpu(cpu);
41797 @@ -836,7 +881,7 @@
41798 clockevents_register_device(dec);
41801 -void init_decrementer_clockevent(void)
41802 +static void __init init_decrementer_clockevent(void)
41804 int cpu = smp_processor_id();
41806 --- a/arch/powerpc/kernel/traps.c
41807 +++ b/arch/powerpc/kernel/traps.c
41808 @@ -334,18 +334,25 @@
41809 #define clear_single_step(regs) ((regs)->msr &= ~MSR_SE)
41812 -static int generic_machine_check_exception(struct pt_regs *regs)
41813 +#if defined(CONFIG_4xx)
41814 +int machine_check_4xx(struct pt_regs *regs)
41816 unsigned long reason = get_mc_reason(regs);
41818 -#if defined(CONFIG_4xx) && !defined(CONFIG_440A)
41819 if (reason & ESR_IMCP) {
41820 printk("Instruction");
41821 mtspr(SPRN_ESR, reason & ~ESR_IMCP);
41824 printk(" machine check in kernel mode.\n");
41825 -#elif defined(CONFIG_440A)
41830 +int machine_check_440A(struct pt_regs *regs)
41832 + unsigned long reason = get_mc_reason(regs);
41834 printk("Machine check in kernel mode.\n");
41835 if (reason & ESR_IMCP){
41836 printk("Instruction Synchronous Machine Check exception\n");
41837 @@ -375,7 +382,13 @@
41839 mtspr(SPRN_MCSR, mcsr);
41841 -#elif defined (CONFIG_E500)
41844 +#elif defined(CONFIG_E500)
41845 +int machine_check_e500(struct pt_regs *regs)
41847 + unsigned long reason = get_mc_reason(regs);
41849 printk("Machine check in kernel mode.\n");
41850 printk("Caused by (from MCSR=%lx): ", reason);
41852 @@ -403,7 +416,14 @@
41853 printk("Bus - Instruction Parity Error\n");
41854 if (reason & MCSR_BUS_RPERR)
41855 printk("Bus - Read Parity Error\n");
41856 -#elif defined (CONFIG_E200)
41860 +#elif defined(CONFIG_E200)
41861 +int machine_check_e200(struct pt_regs *regs)
41863 + unsigned long reason = get_mc_reason(regs);
41865 printk("Machine check in kernel mode.\n");
41866 printk("Caused by (from MCSR=%lx): ", reason);
41868 @@ -421,7 +441,14 @@
41869 printk("Bus - Read Bus Error on data load\n");
41870 if (reason & MCSR_BUS_WRERR)
41871 printk("Bus - Write Bus Error on buffered store or cache line push\n");
41872 -#else /* !CONFIG_4xx && !CONFIG_E500 && !CONFIG_E200 */
41877 +int machine_check_generic(struct pt_regs *regs)
41879 + unsigned long reason = get_mc_reason(regs);
41881 printk("Machine check in kernel mode.\n");
41882 printk("Caused by (from SRR1=%lx): ", reason);
41883 switch (reason & 0x601F0000) {
41884 @@ -451,22 +478,26 @@
41886 printk("Unknown values in msr\n");
41888 -#endif /* CONFIG_4xx */
41892 +#endif /* everything else */
41894 void machine_check_exception(struct pt_regs *regs)
41898 - /* See if any machine dependent calls */
41899 + /* See if any machine dependent calls. In theory, we would want
41900 + * to call the CPU first, and call the ppc_md. one if the CPU
41901 + * one returns a positive number. However there is existing code
41902 + * that assumes the board gets a first chance, so let's keep it
41903 + * that way for now and fix things later. --BenH.
41905 if (ppc_md.machine_check_exception)
41906 recover = ppc_md.machine_check_exception(regs);
41908 - recover = generic_machine_check_exception(regs);
41909 + else if (cur_cpu_spec->machine_check)
41910 + recover = cur_cpu_spec->machine_check(regs);
41916 if (user_mode(regs)) {
41917 @@ -476,7 +507,12 @@
41920 #if defined(CONFIG_8xx) && defined(CONFIG_PCI)
41921 - /* the qspan pci read routines can cause machine checks -- Cort */
41922 + /* the qspan pci read routines can cause machine checks -- Cort
41924 + * yuck !!! that totally needs to go away ! There are better ways
41925 + * to deal with that than having a wart in the mcheck handler.
41928 bad_page_fault(regs, regs->dar, SIGBUS);
41931 @@ -622,6 +658,9 @@
41932 #define INST_POPCNTB 0x7c0000f4
41933 #define INST_POPCNTB_MASK 0xfc0007fe
41935 +#define INST_ISEL 0x7c00001e
41936 +#define INST_ISEL_MASK 0xfc00003e
41938 static int emulate_string_inst(struct pt_regs *regs, u32 instword)
41940 u8 rT = (instword >> 21) & 0x1f;
41941 @@ -707,6 +746,23 @@
41945 +static int emulate_isel(struct pt_regs *regs, u32 instword)
41947 + u8 rT = (instword >> 21) & 0x1f;
41948 + u8 rA = (instword >> 16) & 0x1f;
41949 + u8 rB = (instword >> 11) & 0x1f;
41950 + u8 BC = (instword >> 6) & 0x1f;
41952 + unsigned long tmp;
41954 + tmp = (rA == 0) ? 0 : regs->gpr[rA];
41955 + bit = (regs->ccr >> (31 - BC)) & 0x1;
41957 + regs->gpr[rT] = bit ? tmp : regs->gpr[rB];
41962 static int emulate_instruction(struct pt_regs *regs)
41965 @@ -749,6 +805,11 @@
41966 return emulate_popcntb_inst(regs, instword);
41969 + /* Emulate isel (Integer Select) instruction */
41970 + if ((instword & INST_ISEL_MASK) == INST_ISEL) {
41971 + return emulate_isel(regs, instword);
41977 --- a/arch/powerpc/kernel/udbg.c
41978 +++ b/arch/powerpc/kernel/udbg.c
41980 #elif defined(CONFIG_PPC_EARLY_DEBUG_44x)
41982 udbg_init_44x_as1();
41983 +#elif defined(CONFIG_PPC_EARLY_DEBUG_40x)
41984 + /* PPC40x debug */
41985 + udbg_init_40x_realmode();
41986 #elif defined(CONFIG_PPC_EARLY_DEBUG_CPM)
41990 +#ifdef CONFIG_PPC_EARLY_DEBUG
41991 + console_loglevel = 10;
41995 /* udbg library, used by xmon et al */
41996 --- a/arch/powerpc/kernel/udbg_16550.c
41997 +++ b/arch/powerpc/kernel/udbg_16550.c
42000 #define LCR_DLAB 0x80
42002 -static volatile struct NS16550 __iomem *udbg_comport;
42003 +static struct NS16550 __iomem *udbg_comport;
42005 static void udbg_550_putc(char c)
42007 @@ -117,7 +117,7 @@
42009 unsigned int dll, dlm, divisor, prescaler, speed;
42011 - volatile struct NS16550 __iomem *port = comport;
42012 + struct NS16550 __iomem *port = comport;
42014 old_lcr = in_8(&port->lcr);
42016 @@ -162,7 +162,7 @@
42018 void __init udbg_init_maple_realmode(void)
42020 - udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8;
42021 + udbg_comport = (struct NS16550 __iomem *)0xf40003f8;
42023 udbg_putc = udbg_maple_real_putc;
42025 @@ -184,7 +184,7 @@
42027 void udbg_init_pas_realmode(void)
42029 - udbg_comport = (volatile struct NS16550 __iomem *)0xfcff03f8UL;
42030 + udbg_comport = (struct NS16550 __iomem *)0xfcff03f8UL;
42032 udbg_putc = udbg_pas_real_putc;
42034 @@ -219,9 +219,42 @@
42035 void __init udbg_init_44x_as1(void)
42038 - (volatile struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
42039 + (struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
42041 udbg_putc = udbg_44x_as1_putc;
42042 udbg_getc = udbg_44x_as1_getc;
42044 #endif /* CONFIG_PPC_EARLY_DEBUG_44x */
42046 +#ifdef CONFIG_PPC_EARLY_DEBUG_40x
42047 +static void udbg_40x_real_putc(char c)
42049 + if (udbg_comport) {
42050 + while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
42051 + /* wait for idle */;
42052 + real_writeb(c, &udbg_comport->thr); eieio();
42054 + udbg_40x_real_putc('\r');
42058 +static int udbg_40x_real_getc(void)
42060 + if (udbg_comport) {
42061 + while ((real_readb(&udbg_comport->lsr) & LSR_DR) == 0)
42062 + ; /* wait for char */
42063 + return real_readb(&udbg_comport->rbr);
42068 +void __init udbg_init_40x_realmode(void)
42070 + udbg_comport = (struct NS16550 __iomem *)
42071 + CONFIG_PPC_EARLY_DEBUG_40x_PHYSADDR;
42073 + udbg_putc = udbg_40x_real_putc;
42074 + udbg_getc = udbg_40x_real_getc;
42075 + udbg_getc_poll = NULL;
42077 +#endif /* CONFIG_PPC_EARLY_DEBUG_40x */
42078 --- a/arch/powerpc/math-emu/op-4.h
42079 +++ b/arch/powerpc/math-emu/op-4.h
42080 @@ -194,19 +194,39 @@
42081 (X##_f[3] = I3, X##_f[2] = I2, X##_f[1] = I1, X##_f[0] = I0)
42083 #ifndef __FP_FRAC_ADD_4
42084 -#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
42086 - r1 = x1 + y1 + (r0 < x0), \
42087 - r2 = x2 + y2 + (r1 < x1), \
42088 - r3 = x3 + y3 + (r2 < x2))
42089 +#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
42091 + int _c1, _c2, _c3; \
42097 + _c2 |= r1 < _c1; \
42101 + _c3 |= r2 < _c2; \
42102 + r3 = x3 + y3 + _c3; \
42106 #ifndef __FP_FRAC_SUB_4
42107 -#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
42109 - r1 = x1 - y1 - (r0 > x0), \
42110 - r2 = x2 - y2 - (r1 > x1), \
42111 - r3 = x3 - y3 - (r2 > x2))
42112 +#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
42114 + int _c1, _c2, _c3; \
42120 + _c2 |= r1 > _c1; \
42124 + _c3 |= r2 > _c2; \
42125 + r3 = x3 - y3 - _c3; \
42129 #ifndef __FP_FRAC_ADDI_4
42130 --- a/arch/powerpc/mm/fault.c
42131 +++ b/arch/powerpc/mm/fault.c
42132 @@ -167,10 +167,8 @@
42133 if (notify_page_fault(regs))
42136 - if (trap == 0x300) {
42137 - if (debugger_fault_handler(regs))
42140 + if (unlikely(debugger_fault_handler(regs)))
42143 /* On a kernel SLB miss we can only check for a valid exception entry */
42144 if (!user_mode(regs) && (address >= TASK_SIZE))
42145 @@ -189,7 +187,7 @@
42147 /* in_atomic() in user mode is really bad,
42148 as is current->mm == NULL. */
42149 - printk(KERN_EMERG "Page fault in user mode with"
42150 + printk(KERN_EMERG "Page fault in user mode with "
42151 "in_atomic() = %d mm = %p\n", in_atomic(), mm);
42152 printk(KERN_EMERG "NIP = %lx MSR = %lx\n",
42153 regs->nip, regs->msr);
42154 --- a/arch/powerpc/mm/fsl_booke_mmu.c
42155 +++ b/arch/powerpc/mm/fsl_booke_mmu.c
42156 @@ -165,15 +165,15 @@
42157 void __init cam_mapin_ram(unsigned long cam0, unsigned long cam1,
42158 unsigned long cam2)
42160 - settlbcam(0, KERNELBASE, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0);
42161 + settlbcam(0, PAGE_OFFSET, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0);
42165 - settlbcam(1, KERNELBASE+cam0, PPC_MEMSTART+cam0, cam1, _PAGE_KERNEL, 0);
42166 + settlbcam(1, PAGE_OFFSET+cam0, PPC_MEMSTART+cam0, cam1, _PAGE_KERNEL, 0);
42170 - settlbcam(2, KERNELBASE+cam0+cam1, PPC_MEMSTART+cam0+cam1, cam2, _PAGE_KERNEL, 0);
42171 + settlbcam(2, PAGE_OFFSET+cam0+cam1, PPC_MEMSTART+cam0+cam1, cam2, _PAGE_KERNEL, 0);
42175 --- a/arch/powerpc/mm/hash_utils_64.c
42176 +++ b/arch/powerpc/mm/hash_utils_64.c
42178 int mmu_io_psize = MMU_PAGE_4K;
42179 int mmu_kernel_ssize = MMU_SEGSIZE_256M;
42180 int mmu_highuser_ssize = MMU_SEGSIZE_256M;
42181 +u16 mmu_slb_size = 64;
42182 #ifdef CONFIG_HUGETLB_PAGE
42183 int mmu_huge_psize = MMU_PAGE_16M;
42184 unsigned int HPAGE_SHIFT;
42185 @@ -368,18 +369,11 @@
42186 * on what is available
42188 if (mmu_psize_defs[MMU_PAGE_16M].shift)
42189 - mmu_huge_psize = MMU_PAGE_16M;
42190 + set_huge_psize(MMU_PAGE_16M);
42191 /* With 4k/4level pagetables, we can't (for now) cope with a
42192 * huge page size < PMD_SIZE */
42193 else if (mmu_psize_defs[MMU_PAGE_1M].shift)
42194 - mmu_huge_psize = MMU_PAGE_1M;
42196 - /* Calculate HPAGE_SHIFT and sanity check it */
42197 - if (mmu_psize_defs[mmu_huge_psize].shift > MIN_HUGEPTE_SHIFT &&
42198 - mmu_psize_defs[mmu_huge_psize].shift < SID_SHIFT)
42199 - HPAGE_SHIFT = mmu_psize_defs[mmu_huge_psize].shift;
42201 - HPAGE_SHIFT = 0; /* No huge pages dude ! */
42202 + set_huge_psize(MMU_PAGE_1M);
42203 #endif /* CONFIG_HUGETLB_PAGE */
42206 --- a/arch/powerpc/mm/hugetlbpage.c
42207 +++ b/arch/powerpc/mm/hugetlbpage.c
42208 @@ -24,18 +24,17 @@
42209 #include <asm/cputable.h>
42210 #include <asm/spu.h>
42212 +#define HPAGE_SHIFT_64K 16
42213 +#define HPAGE_SHIFT_16M 24
42215 #define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT)
42216 #define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT)
42218 -#ifdef CONFIG_PPC_64K_PAGES
42219 -#define HUGEPTE_INDEX_SIZE (PMD_SHIFT-HPAGE_SHIFT)
42221 -#define HUGEPTE_INDEX_SIZE (PUD_SHIFT-HPAGE_SHIFT)
42223 -#define PTRS_PER_HUGEPTE (1 << HUGEPTE_INDEX_SIZE)
42224 -#define HUGEPTE_TABLE_SIZE (sizeof(pte_t) << HUGEPTE_INDEX_SIZE)
42225 +unsigned int hugepte_shift;
42226 +#define PTRS_PER_HUGEPTE (1 << hugepte_shift)
42227 +#define HUGEPTE_TABLE_SIZE (sizeof(pte_t) << hugepte_shift)
42229 -#define HUGEPD_SHIFT (HPAGE_SHIFT + HUGEPTE_INDEX_SIZE)
42230 +#define HUGEPD_SHIFT (HPAGE_SHIFT + hugepte_shift)
42231 #define HUGEPD_SIZE (1UL << HUGEPD_SHIFT)
42232 #define HUGEPD_MASK (~(HUGEPD_SIZE-1))
42234 @@ -82,11 +81,35 @@
42238 +/* Base page size affects how we walk hugetlb page tables */
42239 +#ifdef CONFIG_PPC_64K_PAGES
42240 +#define hpmd_offset(pud, addr) pmd_offset(pud, addr)
42241 +#define hpmd_alloc(mm, pud, addr) pmd_alloc(mm, pud, addr)
42244 +pmd_t *hpmd_offset(pud_t *pud, unsigned long addr)
42246 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
42247 + return pmd_offset(pud, addr);
42249 + return (pmd_t *) pud;
42252 +pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr)
42254 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
42255 + return pmd_alloc(mm, pud, addr);
42257 + return (pmd_t *) pud;
42261 /* Modelled after find_linux_pte() */
42262 pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
42268 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
42270 @@ -96,14 +119,9 @@
42271 if (!pgd_none(*pg)) {
42272 pu = pud_offset(pg, addr);
42273 if (!pud_none(*pu)) {
42274 -#ifdef CONFIG_PPC_64K_PAGES
42276 - pm = pmd_offset(pu, addr);
42277 + pm = hpmd_offset(pu, addr);
42278 if (!pmd_none(*pm))
42279 return hugepte_offset((hugepd_t *)pm, addr);
42281 - return hugepte_offset((hugepd_t *)pu, addr);
42286 @@ -114,6 +132,7 @@
42291 hugepd_t *hpdp = NULL;
42293 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
42294 @@ -124,14 +143,9 @@
42295 pu = pud_alloc(mm, pg, addr);
42298 -#ifdef CONFIG_PPC_64K_PAGES
42300 - pm = pmd_alloc(mm, pu, addr);
42301 + pm = hpmd_alloc(mm, pu, addr);
42303 hpdp = (hugepd_t *)pm;
42305 - hpdp = (hugepd_t *)pu;
42310 @@ -158,7 +172,6 @@
42311 PGF_CACHENUM_MASK));
42314 -#ifdef CONFIG_PPC_64K_PAGES
42315 static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
42316 unsigned long addr, unsigned long end,
42317 unsigned long floor, unsigned long ceiling)
42318 @@ -191,7 +204,6 @@
42320 pmd_free_tlb(tlb, pmd);
42324 static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
42325 unsigned long addr, unsigned long end,
42326 @@ -210,9 +222,15 @@
42328 hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
42330 - if (pud_none(*pud))
42332 - free_hugepte_range(tlb, (hugepd_t *)pud);
42333 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K) {
42334 + if (pud_none_or_clear_bad(pud))
42336 + hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
42338 + if (pud_none(*pud))
42340 + free_hugepte_range(tlb, (hugepd_t *)pud);
42343 } while (pud++, addr = next, addr != end);
42345 @@ -526,6 +544,57 @@
42349 +void set_huge_psize(int psize)
42351 + /* Check that it is a page size supported by the hardware and
42352 + * that it fits within pagetable limits. */
42353 + if (mmu_psize_defs[psize].shift && mmu_psize_defs[psize].shift < SID_SHIFT &&
42354 + (mmu_psize_defs[psize].shift > MIN_HUGEPTE_SHIFT ||
42355 + mmu_psize_defs[psize].shift == HPAGE_SHIFT_64K)) {
42356 + HPAGE_SHIFT = mmu_psize_defs[psize].shift;
42357 + mmu_huge_psize = psize;
42358 +#ifdef CONFIG_PPC_64K_PAGES
42359 + hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
42361 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
42362 + hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
42364 + hugepte_shift = (PUD_SHIFT-HPAGE_SHIFT);
42371 +static int __init hugepage_setup_sz(char *str)
42373 + unsigned long long size;
42374 + int mmu_psize = -1;
42377 + size = memparse(str, &str);
42379 + shift = __ffs(size);
42381 +#ifndef CONFIG_PPC_64K_PAGES
42382 + case HPAGE_SHIFT_64K:
42383 + mmu_psize = MMU_PAGE_64K;
42386 + case HPAGE_SHIFT_16M:
42387 + mmu_psize = MMU_PAGE_16M;
42391 + if (mmu_psize >=0 && mmu_psize_defs[mmu_psize].shift)
42392 + set_huge_psize(mmu_psize);
42394 + printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size);
42398 +__setup("hugepagesz=", hugepage_setup_sz);
42400 static void zero_ctor(struct kmem_cache *cache, void *addr)
42402 memset(addr, 0, kmem_cache_size(cache));
42403 --- a/arch/powerpc/mm/lmb.c
42404 +++ b/arch/powerpc/mm/lmb.c
42405 @@ -342,3 +342,16 @@
42410 +int __init lmb_is_reserved(unsigned long addr)
42414 + for (i = 0; i < lmb.reserved.cnt; i++) {
42415 + unsigned long upper = lmb.reserved.region[i].base +
42416 + lmb.reserved.region[i].size - 1;
42417 + if ((addr >= lmb.reserved.region[i].base) && (addr <= upper))
42422 --- a/arch/powerpc/mm/mem.c
42423 +++ b/arch/powerpc/mm/mem.c
42424 @@ -213,15 +213,30 @@
42426 #ifdef CONFIG_HIGHMEM
42427 free_bootmem_with_active_regions(0, total_lowmem >> PAGE_SHIFT);
42429 + /* reserve the sections we're already using */
42430 + for (i = 0; i < lmb.reserved.cnt; i++) {
42431 + unsigned long addr = lmb.reserved.region[i].base +
42432 + lmb_size_bytes(&lmb.reserved, i) - 1;
42433 + if (addr < total_lowmem)
42434 + reserve_bootmem(lmb.reserved.region[i].base,
42435 + lmb_size_bytes(&lmb.reserved, i));
42436 + else if (lmb.reserved.region[i].base < total_lowmem) {
42437 + unsigned long adjusted_size = total_lowmem -
42438 + lmb.reserved.region[i].base;
42439 + reserve_bootmem(lmb.reserved.region[i].base,
42444 free_bootmem_with_active_regions(0, max_pfn);
42447 /* reserve the sections we're already using */
42448 for (i = 0; i < lmb.reserved.cnt; i++)
42449 reserve_bootmem(lmb.reserved.region[i].base,
42450 lmb_size_bytes(&lmb.reserved, i));
42453 /* XXX need to clip this if using highmem? */
42454 sparse_memory_present_with_active_regions(0);
42456 @@ -334,11 +349,13 @@
42457 highmem_mapnr = total_lowmem >> PAGE_SHIFT;
42458 for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) {
42459 struct page *page = pfn_to_page(pfn);
42461 + if (lmb_is_reserved(pfn << PAGE_SHIFT))
42463 ClearPageReserved(page);
42464 init_page_count(page);
42469 totalram_pages += totalhigh_pages;
42470 printk(KERN_DEBUG "High memory: %luk\n",
42471 --- a/arch/powerpc/mm/slb.c
42472 +++ b/arch/powerpc/mm/slb.c
42473 @@ -256,6 +256,7 @@
42474 static int slb_encoding_inited;
42475 extern unsigned int *slb_miss_kernel_load_linear;
42476 extern unsigned int *slb_miss_kernel_load_io;
42477 + extern unsigned int *slb_compare_rr_to_size;
42479 /* Prepare our SLB miss handler based on our page size */
42480 linear_llp = mmu_psize_defs[mmu_linear_psize].sllp;
42481 @@ -269,6 +270,8 @@
42482 SLB_VSID_KERNEL | linear_llp);
42483 patch_slb_encoding(slb_miss_kernel_load_io,
42484 SLB_VSID_KERNEL | io_llp);
42485 + patch_slb_encoding(slb_compare_rr_to_size,
42488 DBG("SLB: linear LLP = %04x\n", linear_llp);
42489 DBG("SLB: io LLP = %04x\n", io_llp);
42490 --- a/arch/powerpc/mm/slb_low.S
42491 +++ b/arch/powerpc/mm/slb_low.S
42492 @@ -227,8 +227,9 @@
42494 7: ld r10,PACASTABRR(r13)
42496 - /* use a cpu feature mask if we ever change our slb size */
42497 - cmpldi r10,SLB_NUM_ENTRIES
42498 + /* This gets soft patched on boot. */
42499 +_GLOBAL(slb_compare_rr_to_size)
42503 li r10,SLB_NUM_BOLTED
42504 --- a/arch/powerpc/oprofile/op_model_cell.c
42505 +++ b/arch/powerpc/oprofile/op_model_cell.c
42507 #define NUM_THREADS 2 /* number of physical threads in
42508 * physical processor
42510 -#define NUM_TRACE_BUS_WORDS 4
42511 +#define NUM_DEBUG_BUS_WORDS 4
42512 #define NUM_INPUT_BUS_WORDS 2
42514 #define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */
42515 @@ -169,7 +169,6 @@
42517 static u32 ctr_enabled;
42519 -static unsigned char trace_bus[NUM_TRACE_BUS_WORDS];
42520 static unsigned char input_bus[NUM_INPUT_BUS_WORDS];
42523 @@ -298,7 +297,7 @@
42525 p->signal_group = event / 100;
42526 p->bus_word = bus_word;
42527 - p->sub_unit = (unit_mask & 0x0000f000) >> 12;
42528 + p->sub_unit = GET_SUB_UNIT(unit_mask);
42530 pm_regs.pm07_cntrl[ctr] = 0;
42531 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_COUNT_CYCLES(count_cycles);
42532 @@ -334,16 +333,16 @@
42533 p->bit = signal_bit;
42536 - for (i = 0; i < NUM_TRACE_BUS_WORDS; i++) {
42537 + for (i = 0; i < NUM_DEBUG_BUS_WORDS; i++) {
42538 if (bus_word & (1 << i)) {
42539 pm_regs.debug_bus_control |=
42540 - (bus_type << (31 - (2 * i) + 1));
42541 + (bus_type << (30 - (2 * i)));
42543 for (j = 0; j < NUM_INPUT_BUS_WORDS; j++) {
42544 if (input_bus[j] == 0xff) {
42546 pm_regs.group_control |=
42548 + (i << (30 - (2 * j)));
42552 @@ -450,6 +449,12 @@
42553 hdw_thread = 1 ^ hdw_thread;
42554 next_hdw_thread = hdw_thread;
42556 + pm_regs.group_control = 0;
42557 + pm_regs.debug_bus_control = 0;
42559 + for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
42560 + input_bus[i] = 0xff;
42563 * There are some per thread events. Must do the
42564 * set event, for the thread that is being started
42565 @@ -619,9 +624,6 @@
42566 pmc_cntrl[1][i].vcntr = i;
42569 - for (i = 0; i < NUM_TRACE_BUS_WORDS; i++)
42570 - trace_bus[i] = 0xff;
42572 for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
42573 input_bus[i] = 0xff;
42575 --- a/arch/powerpc/platforms/40x/Kconfig
42576 +++ b/arch/powerpc/platforms/40x/Kconfig
42577 @@ -14,28 +14,34 @@
42579 # This option enables support for the CPCI405 board.
42582 -# bool "EP405/EP405PC"
42587 -# This option enables support for the EP405/EP405PC boards.
42590 -# bool "EP405PC Support"
42591 -# depends on EP405
42594 -# This option enables support for the extra features of the EP405PC board.
42596 + bool "EP405/EP405PC"
42602 + This option enables support for the EP405/EP405PC boards.
42609 + select PPC4xx_PCI_EXPRESS
42611 This option enables support for the AMCC PPC405EX evaluation board.
42619 + select PPC4xx_PCI_EXPRESS
42621 + This option enables support for the AMCC PPC405EX board.
42632 This option enables support for the IBM PPC405GP evaluation board.
42634 @@ -105,6 +112,11 @@
42640 + select IBM_NEW_EMAC_EMAC4
42641 + select IBM_NEW_EMAC_RGMII
42646 --- a/arch/powerpc/platforms/40x/Makefile
42647 +++ b/arch/powerpc/platforms/40x/Makefile
42649 obj-$(CONFIG_KILAUEA) += kilauea.o
42650 +obj-$(CONFIG_MAKALU) += makalu.o
42651 obj-$(CONFIG_WALNUT) += walnut.o
42652 obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o
42653 +obj-$(CONFIG_EP405) += ep405.o
42655 +++ b/arch/powerpc/platforms/40x/ep405.c
42658 + * Architecture- / platform-specific boot-time initialization code for
42659 + * IBM PowerPC 4xx based boards. Adapted from original
42660 + * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
42661 + * <dan@net4x.com>.
42663 + * Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
42665 + * Rewritten and ported to the merged powerpc tree:
42666 + * Copyright 2007 IBM Corporation
42667 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
42669 + * Adapted to EP405 by Ben. Herrenschmidt <benh@kernel.crashing.org>
42671 + * TODO: Wire up the PCI IRQ mux and the southbridge interrupts
42673 + * 2002 (c) MontaVista, Software, Inc. This file is licensed under
42674 + * the terms of the GNU General Public License version 2. This program
42675 + * is licensed "as is" without any warranty of any kind, whether express
42679 +#include <linux/init.h>
42680 +#include <linux/of_platform.h>
42682 +#include <asm/machdep.h>
42683 +#include <asm/prom.h>
42684 +#include <asm/udbg.h>
42685 +#include <asm/time.h>
42686 +#include <asm/uic.h>
42687 +#include <asm/pci-bridge.h>
42689 +static struct device_node *bcsr_node;
42690 +static void __iomem *bcsr_regs;
42692 +/* BCSR registers */
42694 +#define BCSR_PCI_CTRL 1
42695 +#define BCSR_FLASH_NV_POR_CTRL 2
42696 +#define BCSR_FENET_UART_CTRL 3
42697 +#define BCSR_PCI_IRQ 4
42698 +#define BCSR_XIRQ_SELECT 5
42699 +#define BCSR_XIRQ_ROUTING 6
42700 +#define BCSR_XIRQ_STATUS 7
42701 +#define BCSR_XIRQ_STATUS2 8
42702 +#define BCSR_SW_STAT_LED_CTRL 9
42703 +#define BCSR_GPIO_IRQ_PAR_CTRL 10
42704 +/* there's more, can't be bothered typing them tho */
42707 +static __initdata struct of_device_id ep405_of_bus[] = {
42708 + { .compatible = "ibm,plb3", },
42709 + { .compatible = "ibm,opb", },
42710 + { .compatible = "ibm,ebc", },
42714 +static int __init ep405_device_probe(void)
42716 + of_platform_bus_probe(NULL, ep405_of_bus, NULL);
42720 +machine_device_initcall(ep405, ep405_device_probe);
42722 +static void __init ep405_init_bcsr(void)
42724 + const u8 *irq_routing;
42727 + /* Find the bloody thing & map it */
42728 + bcsr_node = of_find_compatible_node(NULL, NULL, "ep405-bcsr");
42729 + if (bcsr_node == NULL) {
42730 + printk(KERN_ERR "EP405 BCSR not found !\n");
42733 + bcsr_regs = of_iomap(bcsr_node, 0);
42734 + if (bcsr_regs == NULL) {
42735 + printk(KERN_ERR "EP405 BCSR failed to map !\n");
42739 + /* Get the irq-routing property and apply the routing to the CPLD */
42740 + irq_routing = of_get_property(bcsr_node, "irq-routing", NULL);
42741 + if (irq_routing == NULL)
42743 + for (i = 0; i < 16; i++) {
42744 + u8 irq = irq_routing[i];
42745 + out_8(bcsr_regs + BCSR_XIRQ_SELECT, i);
42746 + out_8(bcsr_regs + BCSR_XIRQ_ROUTING, irq);
42748 + in_8(bcsr_regs + BCSR_XIRQ_SELECT);
42750 + out_8(bcsr_regs + BCSR_GPIO_IRQ_PAR_CTRL, 0xfe);
42753 +static void __init ep405_setup_arch(void)
42755 + /* Find & init the BCSR CPLD */
42756 + ep405_init_bcsr();
42758 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
42761 +static int __init ep405_probe(void)
42763 + unsigned long root = of_get_flat_dt_root();
42765 + if (!of_flat_dt_is_compatible(root, "ep405"))
42771 +define_machine(ep405) {
42773 + .probe = ep405_probe,
42774 + .setup_arch = ep405_setup_arch,
42775 + .progress = udbg_progress,
42776 + .init_IRQ = uic_init_tree,
42777 + .get_irq = uic_get_irq,
42778 + .calibrate_decr = generic_calibrate_decr,
42780 --- a/arch/powerpc/platforms/40x/kilauea.c
42781 +++ b/arch/powerpc/platforms/40x/kilauea.c
42783 #include <asm/udbg.h>
42784 #include <asm/time.h>
42785 #include <asm/uic.h>
42786 +#include <asm/pci-bridge.h>
42788 -static struct of_device_id kilauea_of_bus[] = {
42789 +static __initdata struct of_device_id kilauea_of_bus[] = {
42790 { .compatible = "ibm,plb4", },
42791 { .compatible = "ibm,opb", },
42792 { .compatible = "ibm,ebc", },
42793 @@ -29,14 +30,11 @@
42795 static int __init kilauea_device_probe(void)
42797 - if (!machine_is(kilauea))
42800 of_platform_bus_probe(NULL, kilauea_of_bus, NULL);
42804 -device_initcall(kilauea_device_probe);
42805 +machine_device_initcall(kilauea, kilauea_device_probe);
42807 static int __init kilauea_probe(void)
42810 if (!of_flat_dt_is_compatible(root, "amcc,kilauea"))
42813 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
42819 +++ b/arch/powerpc/platforms/40x/makalu.c
42822 + * Makalu board specific routines
42824 + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
42826 + * Based on the Walnut code by
42827 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
42828 + * Copyright 2007 IBM Corporation
42830 + * This program is free software; you can redistribute it and/or modify it
42831 + * under the terms of the GNU General Public License as published by the
42832 + * Free Software Foundation; either version 2 of the License, or (at your
42833 + * option) any later version.
42835 +#include <linux/init.h>
42836 +#include <linux/of_platform.h>
42837 +#include <asm/machdep.h>
42838 +#include <asm/prom.h>
42839 +#include <asm/udbg.h>
42840 +#include <asm/time.h>
42841 +#include <asm/uic.h>
42842 +#include <asm/pci-bridge.h>
42844 +static __initdata struct of_device_id makalu_of_bus[] = {
42845 + { .compatible = "ibm,plb4", },
42846 + { .compatible = "ibm,opb", },
42847 + { .compatible = "ibm,ebc", },
42851 +static int __init makalu_device_probe(void)
42853 + of_platform_bus_probe(NULL, makalu_of_bus, NULL);
42857 +machine_device_initcall(makalu, makalu_device_probe);
42859 +static int __init makalu_probe(void)
42861 + unsigned long root = of_get_flat_dt_root();
42863 + if (!of_flat_dt_is_compatible(root, "amcc,makalu"))
42866 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
42871 +define_machine(makalu) {
42872 + .name = "Makalu",
42873 + .probe = makalu_probe,
42874 + .progress = udbg_progress,
42875 + .init_IRQ = uic_init_tree,
42876 + .get_irq = uic_get_irq,
42877 + .calibrate_decr = generic_calibrate_decr,
42879 --- a/arch/powerpc/platforms/40x/virtex.c
42880 +++ b/arch/powerpc/platforms/40x/virtex.c
42881 @@ -15,16 +15,23 @@
42882 #include <asm/time.h>
42883 #include <asm/xilinx_intc.h>
42885 +static struct of_device_id xilinx_of_bus_ids[] __initdata = {
42886 + { .compatible = "xlnx,plb-v46-1.00.a", },
42887 + { .compatible = "xlnx,plb-v34-1.01.a", },
42888 + { .compatible = "xlnx,plb-v34-1.02.a", },
42889 + { .compatible = "xlnx,opb-v20-1.10.c", },
42890 + { .compatible = "xlnx,dcr-v29-1.00.a", },
42891 + { .compatible = "xlnx,compound", },
42895 static int __init virtex_device_probe(void)
42897 - if (!machine_is(virtex))
42900 - of_platform_bus_probe(NULL, NULL, NULL);
42901 + of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL);
42905 -device_initcall(virtex_device_probe);
42906 +machine_device_initcall(virtex, virtex_device_probe);
42908 static int __init virtex_probe(void)
42910 --- a/arch/powerpc/platforms/40x/walnut.c
42911 +++ b/arch/powerpc/platforms/40x/walnut.c
42913 #include <asm/udbg.h>
42914 #include <asm/time.h>
42915 #include <asm/uic.h>
42916 +#include <asm/pci-bridge.h>
42918 -static struct of_device_id walnut_of_bus[] = {
42919 +static __initdata struct of_device_id walnut_of_bus[] = {
42920 { .compatible = "ibm,plb3", },
42921 { .compatible = "ibm,opb", },
42922 { .compatible = "ibm,ebc", },
42923 @@ -34,15 +35,12 @@
42925 static int __init walnut_device_probe(void)
42927 - if (!machine_is(walnut))
42930 - /* FIXME: do bus probe here */
42931 of_platform_bus_probe(NULL, walnut_of_bus, NULL);
42932 + of_instantiate_rtc();
42936 -device_initcall(walnut_device_probe);
42937 +machine_device_initcall(walnut, walnut_device_probe);
42939 static int __init walnut_probe(void)
42942 if (!of_flat_dt_is_compatible(root, "ibm,walnut"))
42945 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
42950 --- a/arch/powerpc/platforms/44x/Kconfig
42951 +++ b/arch/powerpc/platforms/44x/Kconfig
42958 This option enables support for the IBM PPC440EP evaluation board.
42967 This option enables support for the IBM PPC440GP evaluation board.
42971 This option enables support for the AMCC PPC440EPX evaluation board.
42980 + This option enables support for the AMCC PPC440GX "Taishan"
42981 + evaluation board.
42989 + select PPC4xx_PCI_EXPRESS
42991 + This option enables support for the AMCC PPC440SPe evaluation board.
43000 + This option enables support for the AMCC PPC440GRX evaluation board.
43008 + This option enables support for the PIKA Warp(tm) Appliance. The Warp
43009 + is a small computer replacement with up to 9 ports of FXO/FXS plus VOIP
43010 + stations and trunks.
43012 + See http://www.pikatechnologies.com/ and follow the "PIKA for Computer
43013 + Telephony Developers" link for more information.
43020 select IBM440EP_ERR42
43021 select IBM_NEW_EMAC_ZMII
43022 + select USB_ARCH_HAS_OHCI
43026 @@ -52,20 +98,29 @@
43027 select IBM_NEW_EMAC_RGMII
43028 select IBM_NEW_EMAC_ZMII
43032 + select IBM_NEW_EMAC_EMAC4
43033 + select IBM_NEW_EMAC_RGMII
43034 + select IBM_NEW_EMAC_ZMII
43038 select IBM_NEW_EMAC_ZMII
43042 + select IBM_NEW_EMAC_EMAC4
43043 + select IBM_NEW_EMAC_RGMII
43044 + select IBM_NEW_EMAC_ZMII #test only
43045 + select IBM_NEW_EMAC_TAH #test only
43052 + select IBM_NEW_EMAC_EMAC4
43054 - depends on 440GX || 440EPX
43057 # 44x errata/workaround config symbols, selected by the CPU models above
43058 config IBM440EP_ERR42
43059 --- a/arch/powerpc/platforms/44x/Makefile
43060 +++ b/arch/powerpc/platforms/44x/Makefile
43062 obj-$(CONFIG_44x) := misc_44x.o
43063 obj-$(CONFIG_EBONY) += ebony.o
43064 -obj-$(CONFIG_BAMBOO) += bamboo.o
43065 +obj-$(CONFIG_TAISHAN) += taishan.o
43066 +obj-$(CONFIG_BAMBOO) += bamboo.o
43067 obj-$(CONFIG_SEQUOIA) += sequoia.o
43068 +obj-$(CONFIG_KATMAI) += katmai.o
43069 +obj-$(CONFIG_RAINIER) += rainier.o
43070 +obj-$(CONFIG_WARP) += warp.o
43071 +obj-$(CONFIG_WARP) += warp-nand.o
43072 --- a/arch/powerpc/platforms/44x/bamboo.c
43073 +++ b/arch/powerpc/platforms/44x/bamboo.c
43075 #include <asm/udbg.h>
43076 #include <asm/time.h>
43077 #include <asm/uic.h>
43078 +#include <asm/pci-bridge.h>
43082 -static struct of_device_id bamboo_of_bus[] = {
43083 +static __initdata struct of_device_id bamboo_of_bus[] = {
43084 { .compatible = "ibm,plb4", },
43085 { .compatible = "ibm,opb", },
43086 { .compatible = "ibm,ebc", },
43087 @@ -32,14 +34,11 @@
43089 static int __init bamboo_device_probe(void)
43091 - if (!machine_is(bamboo))
43094 of_platform_bus_probe(NULL, bamboo_of_bus, NULL);
43098 -device_initcall(bamboo_device_probe);
43099 +machine_device_initcall(bamboo, bamboo_device_probe);
43101 static int __init bamboo_probe(void)
43104 if (!of_flat_dt_is_compatible(root, "amcc,bamboo"))
43107 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43112 --- a/arch/powerpc/platforms/44x/ebony.c
43113 +++ b/arch/powerpc/platforms/44x/ebony.c
43114 @@ -18,16 +18,18 @@
43116 #include <linux/init.h>
43117 #include <linux/of_platform.h>
43118 +#include <linux/rtc.h>
43120 #include <asm/machdep.h>
43121 #include <asm/prom.h>
43122 #include <asm/udbg.h>
43123 #include <asm/time.h>
43124 #include <asm/uic.h>
43125 +#include <asm/pci-bridge.h>
43129 -static struct of_device_id ebony_of_bus[] = {
43130 +static __initdata struct of_device_id ebony_of_bus[] = {
43131 { .compatible = "ibm,plb4", },
43132 { .compatible = "ibm,opb", },
43133 { .compatible = "ibm,ebc", },
43134 @@ -36,14 +38,12 @@
43136 static int __init ebony_device_probe(void)
43138 - if (!machine_is(ebony))
43141 of_platform_bus_probe(NULL, ebony_of_bus, NULL);
43142 + of_instantiate_rtc();
43146 -device_initcall(ebony_device_probe);
43147 +machine_device_initcall(ebony, ebony_device_probe);
43150 * Called very early, MMU is off, device-tree isn't unflattened
43152 if (!of_flat_dt_is_compatible(root, "ibm,ebony"))
43155 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43161 +++ b/arch/powerpc/platforms/44x/katmai.c
43164 + * Katmai board specific routines
43166 + * Benjamin Herrenschmidt <benh@kernel.crashing.org>
43167 + * Copyright 2007 IBM Corp.
43169 + * Based on the Bamboo code by
43170 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
43171 + * Copyright 2007 IBM Corporation
43173 + * This program is free software; you can redistribute it and/or modify it
43174 + * under the terms of the GNU General Public License as published by the
43175 + * Free Software Foundation; either version 2 of the License, or (at your
43176 + * option) any later version.
43178 +#include <linux/init.h>
43179 +#include <linux/of_platform.h>
43181 +#include <asm/machdep.h>
43182 +#include <asm/prom.h>
43183 +#include <asm/udbg.h>
43184 +#include <asm/time.h>
43185 +#include <asm/uic.h>
43186 +#include <asm/pci-bridge.h>
43190 +static __initdata struct of_device_id katmai_of_bus[] = {
43191 + { .compatible = "ibm,plb4", },
43192 + { .compatible = "ibm,opb", },
43193 + { .compatible = "ibm,ebc", },
43197 +static int __init katmai_device_probe(void)
43199 + of_platform_bus_probe(NULL, katmai_of_bus, NULL);
43203 +machine_device_initcall(katmai, katmai_device_probe);
43205 +static int __init katmai_probe(void)
43207 + unsigned long root = of_get_flat_dt_root();
43209 + if (!of_flat_dt_is_compatible(root, "amcc,katmai"))
43212 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43217 +define_machine(katmai) {
43218 + .name = "Katmai",
43219 + .probe = katmai_probe,
43220 + .progress = udbg_progress,
43221 + .init_IRQ = uic_init_tree,
43222 + .get_irq = uic_get_irq,
43223 + .restart = ppc44x_reset_system,
43224 + .calibrate_decr = generic_calibrate_decr,
43227 +++ b/arch/powerpc/platforms/44x/rainier.c
43230 + * Rainier board specific routines
43232 + * Valentine Barshak <vbarshak@ru.mvista.com>
43233 + * Copyright 2007 MontaVista Software Inc.
43235 + * Based on the Bamboo code by
43236 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
43237 + * Copyright 2007 IBM Corporation
43239 + * This program is free software; you can redistribute it and/or modify it
43240 + * under the terms of the GNU General Public License as published by the
43241 + * Free Software Foundation; either version 2 of the License, or (at your
43242 + * option) any later version.
43244 +#include <linux/init.h>
43245 +#include <linux/of_platform.h>
43247 +#include <asm/machdep.h>
43248 +#include <asm/prom.h>
43249 +#include <asm/udbg.h>
43250 +#include <asm/time.h>
43251 +#include <asm/uic.h>
43252 +#include <asm/pci-bridge.h>
43255 +static __initdata struct of_device_id rainier_of_bus[] = {
43256 + { .compatible = "ibm,plb4", },
43257 + { .compatible = "ibm,opb", },
43258 + { .compatible = "ibm,ebc", },
43262 +static int __init rainier_device_probe(void)
43264 + of_platform_bus_probe(NULL, rainier_of_bus, NULL);
43268 +machine_device_initcall(rainier, rainier_device_probe);
43270 +static int __init rainier_probe(void)
43272 + unsigned long root = of_get_flat_dt_root();
43274 + if (!of_flat_dt_is_compatible(root, "amcc,rainier"))
43277 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43282 +define_machine(rainier) {
43283 + .name = "Rainier",
43284 + .probe = rainier_probe,
43285 + .progress = udbg_progress,
43286 + .init_IRQ = uic_init_tree,
43287 + .get_irq = uic_get_irq,
43288 + .restart = ppc44x_reset_system,
43289 + .calibrate_decr = generic_calibrate_decr,
43291 --- a/arch/powerpc/platforms/44x/sequoia.c
43292 +++ b/arch/powerpc/platforms/44x/sequoia.c
43294 #include <asm/udbg.h>
43295 #include <asm/time.h>
43296 #include <asm/uic.h>
43297 +#include <asm/pci-bridge.h>
43301 -static struct of_device_id sequoia_of_bus[] = {
43302 +static __initdata struct of_device_id sequoia_of_bus[] = {
43303 { .compatible = "ibm,plb4", },
43304 { .compatible = "ibm,opb", },
43305 { .compatible = "ibm,ebc", },
43306 @@ -32,14 +34,11 @@
43308 static int __init sequoia_device_probe(void)
43310 - if (!machine_is(sequoia))
43313 of_platform_bus_probe(NULL, sequoia_of_bus, NULL);
43317 -device_initcall(sequoia_device_probe);
43318 +machine_device_initcall(sequoia, sequoia_device_probe);
43320 static int __init sequoia_probe(void)
43323 if (!of_flat_dt_is_compatible(root, "amcc,sequoia"))
43326 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43332 +++ b/arch/powerpc/platforms/44x/taishan.c
43335 + * Taishan board specific routines based off ebony.c code
43336 + * original copyrights below
43338 + * Matt Porter <mporter@kernel.crashing.org>
43339 + * Copyright 2002-2005 MontaVista Software Inc.
43341 + * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
43342 + * Copyright (c) 2003-2005 Zultys Technologies
43344 + * Rewritten and ported to the merged powerpc tree:
43345 + * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
43347 + * Modified from ebony.c for taishan:
43348 + * Copyright 2007 Hugh Blemings <hugh@au.ibm.com>, IBM Corporation.
43350 + * This program is free software; you can redistribute it and/or modify it
43351 + * under the terms of the GNU General Public License as published by the
43352 + * Free Software Foundation; either version 2 of the License, or (at your
43353 + * option) any later version.
43356 +#include <linux/init.h>
43357 +#include <linux/of_platform.h>
43359 +#include <asm/machdep.h>
43360 +#include <asm/prom.h>
43361 +#include <asm/udbg.h>
43362 +#include <asm/time.h>
43363 +#include <asm/uic.h>
43364 +#include <asm/pci-bridge.h>
43368 +static __initdata struct of_device_id taishan_of_bus[] = {
43369 + { .compatible = "ibm,plb4", },
43370 + { .compatible = "ibm,opb", },
43371 + { .compatible = "ibm,ebc", },
43375 +static int __init taishan_device_probe(void)
43377 + of_platform_bus_probe(NULL, taishan_of_bus, NULL);
43381 +machine_device_initcall(taishan, taishan_device_probe);
43384 + * Called very early, MMU is off, device-tree isn't unflattened
43386 +static int __init taishan_probe(void)
43388 + unsigned long root = of_get_flat_dt_root();
43390 + if (!of_flat_dt_is_compatible(root, "amcc,taishan"))
43393 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43398 +define_machine(taishan) {
43399 + .name = "Taishan",
43400 + .probe = taishan_probe,
43401 + .progress = udbg_progress,
43402 + .init_IRQ = uic_init_tree,
43403 + .get_irq = uic_get_irq,
43404 + .restart = ppc44x_reset_system,
43405 + .calibrate_decr = generic_calibrate_decr,
43408 +++ b/arch/powerpc/platforms/44x/warp-nand.c
43411 + * PIKA Warp(tm) NAND flash specific routines
43413 + * Copyright (c) 2008 PIKA Technologies
43414 + * Sean MacLennan <smaclennan@pikatech.com>
43417 +#include <linux/platform_device.h>
43418 +#include <linux/mtd/mtd.h>
43419 +#include <linux/mtd/map.h>
43420 +#include <linux/mtd/partitions.h>
43421 +#include <linux/mtd/nand.h>
43422 +#include <linux/mtd/ndfc.h>
43424 +#ifdef CONFIG_MTD_NAND_NDFC
43426 +#define CS_NAND_0 1 /* use chip select 1 for NAND device 0 */
43428 +#define WARP_NAND_FLASH_REG_ADDR 0xD0000000UL
43429 +#define WARP_NAND_FLASH_REG_SIZE 0x2000
43431 +static struct resource warp_ndfc = {
43432 + .start = WARP_NAND_FLASH_REG_ADDR,
43433 + .end = WARP_NAND_FLASH_REG_ADDR + WARP_NAND_FLASH_REG_SIZE,
43434 + .flags = IORESOURCE_MEM,
43437 +static struct mtd_partition nand_parts[] = {
43439 + .name = "kernel",
43441 + .size = 0x0200000
43445 + .offset = 0x0200000,
43446 + .size = 0x3400000
43450 + .offset = 0x3600000,
43451 + .size = 0x0A00000
43455 +struct ndfc_controller_settings warp_ndfc_settings = {
43456 + .ccr_settings = (NDFC_CCR_BS(CS_NAND_0) | NDFC_CCR_ARAC1),
43460 +static struct ndfc_chip_settings warp_chip0_settings = {
43461 + .bank_settings = 0x80002222,
43464 +struct platform_nand_ctrl warp_nand_ctrl = {
43465 + .priv = &warp_ndfc_settings,
43468 +static struct platform_device warp_ndfc_device = {
43469 + .name = "ndfc-nand",
43472 + .platform_data = &warp_nand_ctrl,
43474 + .num_resources = 1,
43475 + .resource = &warp_ndfc,
43478 +static struct nand_ecclayout nand_oob_16 = {
43480 + .eccpos = { 0, 1, 2, 3, 6, 7 },
43481 + .oobfree = { {.offset = 8, .length = 16} }
43484 +static struct platform_nand_chip warp_nand_chip0 = {
43486 + .chip_offset = CS_NAND_0,
43487 + .nr_partitions = ARRAY_SIZE(nand_parts),
43488 + .partitions = nand_parts,
43489 + .chip_delay = 50,
43490 + .ecclayout = &nand_oob_16,
43491 + .priv = &warp_chip0_settings,
43494 +static struct platform_device warp_nand_device = {
43495 + .name = "ndfc-chip",
43497 + .num_resources = 1,
43498 + .resource = &warp_ndfc,
43500 + .platform_data = &warp_nand_chip0,
43501 + .parent = &warp_ndfc_device.dev,
43505 +static int warp_setup_nand_flash(void)
43507 + platform_device_register(&warp_ndfc_device);
43508 + platform_device_register(&warp_nand_device);
43512 +device_initcall(warp_setup_nand_flash);
43516 +++ b/arch/powerpc/platforms/44x/warp.c
43519 + * PIKA Warp(tm) board specific routines
43521 + * Copyright (c) 2008 PIKA Technologies
43522 + * Sean MacLennan <smaclennan@pikatech.com>
43524 + * This program is free software; you can redistribute it and/or modify it
43525 + * under the terms of the GNU General Public License as published by the
43526 + * Free Software Foundation; either version 2 of the License, or (at your
43527 + * option) any later version.
43529 +#include <linux/init.h>
43530 +#include <linux/of_platform.h>
43531 +#include <linux/kthread.h>
43533 +#include <asm/machdep.h>
43534 +#include <asm/prom.h>
43535 +#include <asm/udbg.h>
43536 +#include <asm/time.h>
43537 +#include <asm/uic.h>
43542 +static __initdata struct of_device_id warp_of_bus[] = {
43543 + { .compatible = "ibm,plb4", },
43544 + { .compatible = "ibm,opb", },
43545 + { .compatible = "ibm,ebc", },
43549 +static int __init warp_device_probe(void)
43551 + of_platform_bus_probe(NULL, warp_of_bus, NULL);
43554 +machine_device_initcall(warp, warp_device_probe);
43556 +static int __init warp_probe(void)
43558 + unsigned long root = of_get_flat_dt_root();
43560 + return of_flat_dt_is_compatible(root, "pika,warp");
43563 +define_machine(warp) {
43565 + .probe = warp_probe,
43566 + .progress = udbg_progress,
43567 + .init_IRQ = uic_init_tree,
43568 + .get_irq = uic_get_irq,
43569 + .restart = ppc44x_reset_system,
43570 + .calibrate_decr = generic_calibrate_decr,
43574 +#define LED_GREEN (0x80000000 >> 0)
43575 +#define LED_RED (0x80000000 >> 1)
43578 +/* This is for the power LEDs 1 = on, 0 = off, -1 = leave alone */
43579 +void warp_set_power_leds(int green, int red)
43581 + static void __iomem *gpio_base = NULL;
43584 + if (gpio_base == NULL) {
43585 + struct device_node *np;
43587 + /* Power LEDS are on the second GPIO controller */
43588 + np = of_find_compatible_node(NULL, NULL, "ibm,gpio-440EP");
43590 + np = of_find_compatible_node(np, NULL, "ibm,gpio-440EP");
43591 + if (np == NULL) {
43592 + printk(KERN_ERR __FILE__ ": Unable to find gpio\n");
43596 + gpio_base = of_iomap(np, 0);
43598 + if (gpio_base == NULL) {
43599 + printk(KERN_ERR __FILE__ ": Unable to map gpio");
43604 + leds = in_be32(gpio_base);
43607 + case 0: leds &= ~LED_GREEN; break;
43608 + case 1: leds |= LED_GREEN; break;
43611 + case 0: leds &= ~LED_RED; break;
43612 + case 1: leds |= LED_RED; break;
43615 + out_be32(gpio_base, leds);
43617 +EXPORT_SYMBOL(warp_set_power_leds);
43620 +#ifdef CONFIG_SENSORS_AD7414
43621 +static int pika_dtm_thread(void __iomem *fpga)
43623 + extern int ad7414_get_temp(int index);
43625 + while (!kthread_should_stop()) {
43626 + int temp = ad7414_get_temp(0);
43628 + out_be32(fpga, temp);
43630 + set_current_state(TASK_INTERRUPTIBLE);
43631 + schedule_timeout(HZ);
43637 +static int __init pika_dtm_start(void)
43639 + struct task_struct *dtm_thread;
43640 + struct device_node *np;
43641 + struct resource res;
43642 + void __iomem *fpga;
43644 + np = of_find_compatible_node(NULL, NULL, "pika,fpga");
43648 + /* We do not call of_iomap here since it would map in the entire
43649 + * fpga space, which is over 8k.
43651 + if (of_address_to_resource(np, 0, &res)) {
43657 + fpga = ioremap(res.start + 0x20, 4);
43658 + if (fpga == NULL)
43661 + dtm_thread = kthread_run(pika_dtm_thread, fpga + 0x20, "pika-dtm");
43662 + if (IS_ERR(dtm_thread)) {
43664 + return PTR_ERR(dtm_thread);
43669 +device_initcall(pika_dtm_start);
43671 --- a/arch/powerpc/platforms/52xx/Kconfig
43672 +++ b/arch/powerpc/platforms/52xx/Kconfig
43675 It is safe to say 'Y' here
43677 +config PPC_MPC5200_SIMPLE
43678 + bool "Generic support for simple MPC5200 based boards"
43679 + depends on PPC_MULTIPLATFORM && PPC32
43680 + select PPC_MPC5200
43681 + select DEFAULT_UIMAGE
43682 + select WANT_DEVICE_TREE
43685 + This option enables support for a simple MPC52xx based boards which
43686 + do not need a custom platform specific setup. Such boards are
43687 + supported assuming the following:
43689 + - GPIO pins are configured by the firmware,
43690 + - CDM configuration (clocking) is setup correctly by firmware,
43691 + - if the 'fsl,has-wdt' property is present in one of the
43692 + gpt nodes, then it is safe to use such gpt to reset the board,
43693 + - PCI is supported if enabled in the kernel configuration
43694 + and if there is a PCI bus node defined in the device tree.
43696 + Boards that are compatible with this generic platform support
43697 + are: 'tqc,tqm5200', 'promess,motionpro', 'schindler,cm5200'.
43700 bool "bPlan Efika 5k2. MPC5200B based computer"
43701 depends on PPC_MULTIPLATFORM && PPC32
43703 config PPC_LITE5200
43704 bool "Freescale Lite5200 Eval Board"
43705 depends on PPC_MULTIPLATFORM && PPC32
43706 - select WANT_DEVICE_TREE
43708 + select DEFAULT_UIMAGE
43709 + select WANT_DEVICE_TREE
43713 --- a/arch/powerpc/platforms/52xx/Makefile
43714 +++ b/arch/powerpc/platforms/52xx/Makefile
43716 obj-$(CONFIG_PCI) += mpc52xx_pci.o
43719 +obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o
43720 obj-$(CONFIG_PPC_EFIKA) += efika.o
43721 obj-$(CONFIG_PPC_LITE5200) += lite5200.o
43723 --- a/arch/powerpc/platforms/52xx/lite5200.c
43724 +++ b/arch/powerpc/platforms/52xx/lite5200.c
43725 @@ -42,10 +42,13 @@
43727 lite5200_fix_clock_config(void)
43729 + struct device_node *np;
43730 struct mpc52xx_cdm __iomem *cdm;
43733 - cdm = mpc52xx_find_and_map("mpc5200-cdm");
43734 + np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm");
43735 + cdm = of_iomap(np, 0);
43738 printk(KERN_ERR "%s() failed; expect abnormal behaviour\n",
43740 @@ -74,10 +77,13 @@
43742 lite5200_fix_port_config(void)
43744 + struct device_node *np;
43745 struct mpc52xx_gpio __iomem *gpio;
43748 - gpio = mpc52xx_find_and_map("mpc5200-gpio");
43749 + np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio");
43750 + gpio = of_iomap(np, 0);
43753 printk(KERN_ERR "%s() failed. expect abnormal behavior\n",
43755 @@ -131,10 +137,6 @@
43757 static void __init lite5200_setup_arch(void)
43760 - struct device_node *np;
43763 if (ppc_md.progress)
43764 ppc_md.progress("lite5200_setup_arch()", 0);
43766 @@ -154,13 +156,7 @@
43767 lite5200_pm_init();
43771 - np = of_find_node_by_type(NULL, "pci");
43773 - mpc52xx_add_bridge(np);
43777 + mpc52xx_setup_pci();
43781 --- a/arch/powerpc/platforms/52xx/lite5200_pm.c
43782 +++ b/arch/powerpc/platforms/52xx/lite5200_pm.c
43785 static int lite5200_pm_prepare(void)
43787 + struct device_node *np;
43789 /* deep sleep? let mpc52xx code handle that */
43790 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY)
43791 return mpc52xx_pm_prepare();
43795 /* map registers */
43796 - mbar = mpc52xx_find_and_map("mpc5200");
43797 + np = of_find_compatible_node(NULL, NULL, "mpc5200");
43798 + mbar = of_iomap(np, 0);
43801 printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
43804 +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
43807 + * Support for 'mpc5200-simple-platform' compatible boards.
43809 + * Written by Marian Balakowicz <m8@semihalf.com>
43810 + * Copyright (C) 2007 Semihalf
43812 + * This program is free software; you can redistribute it and/or modify it
43813 + * under the terms of the GNU General Public License as published by the
43814 + * Free Software Foundation; either version 2 of the License, or (at your
43815 + * option) any later version.
43818 + * This code implements support for a simple MPC52xx based boards which
43819 + * do not need a custom platform specific setup. Such boards are
43820 + * supported assuming the following:
43822 + * - GPIO pins are configured by the firmware,
43823 + * - CDM configuration (clocking) is setup correctly by firmware,
43824 + * - if the 'fsl,has-wdt' property is present in one of the
43825 + * gpt nodes, then it is safe to use such gpt to reset the board,
43826 + * - PCI is supported if enabled in the kernel configuration
43827 + * and if there is a PCI bus node defined in the device tree.
43829 + * Boards that are compatible with this generic platform support
43830 + * are listed in a 'board' table.
43834 +#include <asm/time.h>
43835 +#include <asm/prom.h>
43836 +#include <asm/machdep.h>
43837 +#include <asm/mpc52xx.h>
43840 + * Setup the architecture
43842 +static void __init mpc5200_simple_setup_arch(void)
43844 + if (ppc_md.progress)
43845 + ppc_md.progress("mpc5200_simple_setup_arch()", 0);
43847 + /* Some mpc5200 & mpc5200b related configuration */
43848 + mpc5200_setup_xlb_arbiter();
43850 + /* Map wdt for mpc52xx_restart() */
43851 + mpc52xx_map_wdt();
43853 + mpc52xx_setup_pci();
43856 +/* list of the supported boards */
43857 +static char *board[] __initdata = {
43858 + "promess,motionpro",
43859 + "schindler,cm5200",
43865 + * Called very early, MMU is off, device-tree isn't unflattened
43867 +static int __init mpc5200_simple_probe(void)
43869 + unsigned long node = of_get_flat_dt_root();
43872 + while (board[i]) {
43873 + if (of_flat_dt_is_compatible(node, board[i]))
43878 + return (board[i] != NULL);
43881 +define_machine(mpc5200_simple_platform) {
43882 + .name = "mpc5200-simple-platform",
43883 + .probe = mpc5200_simple_probe,
43884 + .setup_arch = mpc5200_simple_setup_arch,
43885 + .init = mpc52xx_declare_of_platform_devices,
43886 + .init_IRQ = mpc52xx_init_irq,
43887 + .get_irq = mpc52xx_get_irq,
43888 + .restart = mpc52xx_restart,
43889 + .calibrate_decr = generic_calibrate_decr,
43891 --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
43892 +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
43895 static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL;
43897 -static void __iomem *
43898 -mpc52xx_map_node(struct device_node *ofn)
43900 - const u32 *regaddr_p;
43901 - u64 regaddr64, size64;
43906 - regaddr_p = of_get_address(ofn, 0, &size64, NULL);
43907 - if (!regaddr_p) {
43908 - of_node_put(ofn);
43912 - regaddr64 = of_translate_address(ofn, regaddr_p);
43914 - of_node_put(ofn);
43916 - return ioremap((u32)regaddr64, (u32)size64);
43920 -mpc52xx_find_and_map(const char *compatible)
43922 - return mpc52xx_map_node(
43923 - of_find_compatible_node(NULL, NULL, compatible));
43926 -EXPORT_SYMBOL(mpc52xx_find_and_map);
43929 -mpc52xx_find_and_map_path(const char *path)
43931 - return mpc52xx_map_node(of_find_node_by_path(path));
43934 -EXPORT_SYMBOL(mpc52xx_find_and_map_path);
43937 * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
43938 * @node: device node
43939 @@ -101,9 +62,12 @@
43941 mpc5200_setup_xlb_arbiter(void)
43943 + struct device_node *np;
43944 struct mpc52xx_xlb __iomem *xlb;
43946 - xlb = mpc52xx_find_and_map("mpc5200-xlb");
43947 + np = of_find_compatible_node(NULL, NULL, "mpc5200-xlb");
43948 + xlb = of_iomap(np, 0);
43951 printk(KERN_ERR __FILE__ ": "
43952 "Error mapping XLB in mpc52xx_setup_cpu(). "
43953 @@ -124,11 +88,21 @@
43957 +static struct of_device_id mpc52xx_bus_ids[] __initdata= {
43958 + { .compatible = "fsl,mpc5200-immr", },
43959 + { .compatible = "fsl,lpb", },
43961 + /* depreciated matches; shouldn't be used in new device trees */
43962 + { .type = "builtin", .compatible = "mpc5200", }, /* efika */
43963 + { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
43968 mpc52xx_declare_of_platform_devices(void)
43970 /* Find every child of the SOC node and add it to of_platform */
43971 - if (of_platform_bus_probe(NULL, NULL, NULL))
43972 + if (of_platform_bus_probe(NULL, mpc52xx_bus_ids, NULL))
43973 printk(KERN_ERR __FILE__ ": "
43974 "Error while probing of_platform bus\n");
43976 @@ -146,16 +120,19 @@
43977 for_each_compatible_node(np, NULL, "fsl,mpc5200-gpt") {
43978 has_wdt = of_get_property(np, "fsl,has-wdt", NULL);
43980 - mpc52xx_wdt = mpc52xx_map_node(np);
43981 + mpc52xx_wdt = of_iomap(np, 0);
43986 for_each_compatible_node(np, NULL, "mpc5200-gpt") {
43987 has_wdt = of_get_property(np, "has-wdt", NULL);
43989 - mpc52xx_wdt = mpc52xx_map_node(np);
43990 + mpc52xx_wdt = of_iomap(np, 0);
43998 --- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
43999 +++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
44000 @@ -363,7 +363,7 @@
44002 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name);
44004 - pci_assign_all_buses = 1;
44005 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
44007 if (of_address_to_resource(node, 0, &rsrc) != 0) {
44008 printk(KERN_ERR "Can't get %s resources\n", node->full_name);
44009 @@ -406,3 +406,17 @@
44014 +void __init mpc52xx_setup_pci(void)
44016 + struct device_node *pci;
44018 + pci = of_find_compatible_node(NULL, NULL, "fsl,mpc5200-pci");
44020 + pci = of_find_compatible_node(NULL, NULL, "mpc5200-pci");
44024 + mpc52xx_add_bridge(pci);
44025 + of_node_put(pci);
44027 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
44028 +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
44029 @@ -364,16 +364,18 @@
44032 struct device_node *picnode;
44033 + struct device_node *np;
44035 /* Remap the necessary zones */
44036 picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic");
44038 - intr = mpc52xx_find_and_map("mpc5200-pic");
44039 + intr = of_iomap(picnode, 0);
44041 panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. "
44044 - sdma = mpc52xx_find_and_map("mpc5200-bestcomm");
44045 + np = of_find_compatible_node(NULL, NULL, "mpc5200-bestcomm");
44046 + sdma = of_iomap(np, 0);
44049 panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. "
44051 --- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c
44052 +++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
44053 @@ -59,10 +59,14 @@
44055 int mpc52xx_pm_prepare(void)
44057 + struct device_node *np;
44059 /* map the whole register space */
44060 - mbar = mpc52xx_find_and_map("mpc5200");
44061 + np = of_find_compatible_node(NULL, NULL, "mpc5200");
44062 + mbar = of_iomap(np, 0);
44065 - printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
44066 + pr_err("mpc52xx_pm_prepare(): could not map registers\n");
44069 /* these offsets are from mpc5200 users manual */
44070 --- a/arch/powerpc/platforms/82xx/Kconfig
44071 +++ b/arch/powerpc/platforms/82xx/Kconfig
44074 This option enables support for the PQ2FADS board
44077 + bool "Embedded Planet EP8248E (a.k.a. CWH-PPC-8248N-VE)"
44081 + select PPC_CPM_NEW_BINDING
44082 + select MDIO_BITBANG
44084 + This enables support for the Embedded Planet EP8248E board.
44086 + This board is also resold by Freescale as the QUICCStart
44087 + MPC8248 Evaluation System and/or the CWH-PPC-8248N-VE.
44092 --- a/arch/powerpc/platforms/82xx/Makefile
44093 +++ b/arch/powerpc/platforms/82xx/Makefile
44095 obj-$(CONFIG_CPM2) += pq2.o
44096 obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o
44097 obj-$(CONFIG_PQ2FADS) += pq2fads.o
44098 +obj-$(CONFIG_EP8248E) += ep8248e.o
44100 +++ b/arch/powerpc/platforms/82xx/ep8248e.c
44103 + * Embedded Planet EP8248E support
44105 + * Copyright 2007 Freescale Semiconductor, Inc.
44106 + * Author: Scott Wood <scottwood@freescale.com>
44108 + * This program is free software; you can redistribute it and/or modify it
44109 + * under the terms of the GNU General Public License as published by the
44110 + * Free Software Foundation; either version 2 of the License, or (at your
44111 + * option) any later version.
44114 +#include <linux/init.h>
44115 +#include <linux/interrupt.h>
44116 +#include <linux/fsl_devices.h>
44117 +#include <linux/mdio-bitbang.h>
44118 +#include <linux/of_platform.h>
44120 +#include <asm/io.h>
44121 +#include <asm/cpm2.h>
44122 +#include <asm/udbg.h>
44123 +#include <asm/machdep.h>
44124 +#include <asm/time.h>
44125 +#include <asm/mpc8260.h>
44126 +#include <asm/prom.h>
44128 +#include <sysdev/fsl_soc.h>
44129 +#include <sysdev/cpm2_pic.h>
44133 +static u8 __iomem *ep8248e_bcsr;
44134 +static struct device_node *ep8248e_bcsr_node;
44136 +#define BCSR7_SCC2_ENABLE 0x10
44138 +#define BCSR8_PHY1_ENABLE 0x80
44139 +#define BCSR8_PHY1_POWER 0x40
44140 +#define BCSR8_PHY2_ENABLE 0x20
44141 +#define BCSR8_PHY2_POWER 0x10
44142 +#define BCSR8_MDIO_READ 0x04
44143 +#define BCSR8_MDIO_CLOCK 0x02
44144 +#define BCSR8_MDIO_DATA 0x01
44146 +#define BCSR9_USB_ENABLE 0x80
44147 +#define BCSR9_USB_POWER 0x40
44148 +#define BCSR9_USB_HOST 0x20
44149 +#define BCSR9_USB_FULL_SPEED_TARGET 0x10
44151 +static void __init ep8248e_pic_init(void)
44153 + struct device_node *np = of_find_compatible_node(NULL, NULL, "fsl,pq2-pic");
44155 + printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
44159 + cpm2_pic_init(np);
44163 +static void ep8248e_set_mdc(struct mdiobb_ctrl *ctrl, int level)
44166 + setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_CLOCK);
44168 + clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_CLOCK);
44170 + /* Read back to flush the write. */
44171 + in_8(&ep8248e_bcsr[8]);
44174 +static void ep8248e_set_mdio_dir(struct mdiobb_ctrl *ctrl, int output)
44177 + clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_READ);
44179 + setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_READ);
44181 + /* Read back to flush the write. */
44182 + in_8(&ep8248e_bcsr[8]);
44185 +static void ep8248e_set_mdio_data(struct mdiobb_ctrl *ctrl, int data)
44188 + setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_DATA);
44190 + clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_DATA);
44192 + /* Read back to flush the write. */
44193 + in_8(&ep8248e_bcsr[8]);
44196 +static int ep8248e_get_mdio_data(struct mdiobb_ctrl *ctrl)
44198 + return in_8(&ep8248e_bcsr[8]) & BCSR8_MDIO_DATA;
44201 +static const struct mdiobb_ops ep8248e_mdio_ops = {
44202 + .set_mdc = ep8248e_set_mdc,
44203 + .set_mdio_dir = ep8248e_set_mdio_dir,
44204 + .set_mdio_data = ep8248e_set_mdio_data,
44205 + .get_mdio_data = ep8248e_get_mdio_data,
44206 + .owner = THIS_MODULE,
44209 +static struct mdiobb_ctrl ep8248e_mdio_ctrl = {
44210 + .ops = &ep8248e_mdio_ops,
44213 +static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
44214 + const struct of_device_id *match)
44216 + struct mii_bus *bus;
44217 + struct resource res;
44218 + struct device_node *node;
44221 + node = of_get_parent(ofdev->node);
44222 + of_node_put(node);
44223 + if (node != ep8248e_bcsr_node)
44226 + ret = of_address_to_resource(ofdev->node, 0, &res);
44230 + bus = alloc_mdio_bitbang(&ep8248e_mdio_ctrl);
44234 + bus->phy_mask = 0;
44235 + bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
44237 + for (i = 0; i < PHY_MAX_ADDR; i++)
44238 + bus->irq[i] = -1;
44240 + bus->name = "ep8248e-mdio-bitbang";
44241 + bus->dev = &ofdev->dev;
44242 + bus->id = res.start;
44244 + return mdiobus_register(bus);
44247 +static int ep8248e_mdio_remove(struct of_device *ofdev)
44253 +static const struct of_device_id ep8248e_mdio_match[] = {
44255 + .compatible = "fsl,ep8248e-mdio-bitbang",
44260 +static struct of_platform_driver ep8248e_mdio_driver = {
44262 + .name = "ep8248e-mdio-bitbang",
44264 + .match_table = ep8248e_mdio_match,
44265 + .probe = ep8248e_mdio_probe,
44266 + .remove = ep8248e_mdio_remove,
44270 + int port, pin, flags;
44273 +static __initdata struct cpm_pin ep8248e_pins[] = {
44275 + {2, 4, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44276 + {2, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44279 + {2, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44280 + {2, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44281 + {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44282 + {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
44283 + {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44286 + {0, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44287 + {0, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44288 + {0, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44289 + {0, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44290 + {0, 18, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44291 + {0, 19, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44292 + {0, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44293 + {0, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44294 + {0, 26, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44295 + {0, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44296 + {0, 28, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
44297 + {0, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
44298 + {0, 30, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44299 + {0, 31, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44300 + {2, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44301 + {2, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44304 + {1, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44305 + {1, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44306 + {1, 20, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44307 + {1, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44308 + {1, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44309 + {1, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44310 + {1, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44311 + {1, 25, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44312 + {1, 26, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44313 + {1, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44314 + {1, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44315 + {1, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
44316 + {1, 30, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44317 + {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44318 + {2, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44319 + {2, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44322 + {4, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44323 + {4, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44326 + {2, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44327 + {2, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44328 + {2, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44329 + {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44330 + {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44331 + {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44332 + {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44335 +static void __init init_ioports(void)
44339 + for (i = 0; i < ARRAY_SIZE(ep8248e_pins); i++) {
44340 + const struct cpm_pin *pin = &ep8248e_pins[i];
44341 + cpm2_set_pin(pin->port, pin->pin, pin->flags);
44344 + cpm2_smc_clk_setup(CPM_CLK_SMC1, CPM_BRG7);
44345 + cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX);
44346 + cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX);
44347 + cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_TX); /* USB */
44348 + cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK11, CPM_CLK_RX);
44349 + cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_TX);
44350 + cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX);
44351 + cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX);
44354 +static void __init ep8248e_setup_arch(void)
44356 + if (ppc_md.progress)
44357 + ppc_md.progress("ep8248e_setup_arch()", 0);
44361 + /* When this is set, snooping CPM DMA from RAM causes
44362 + * machine checks. See erratum SIU18.
44364 + clrbits32(&cpm2_immr->im_siu_conf.siu_82xx.sc_bcr, MPC82XX_BCR_PLDP);
44366 + ep8248e_bcsr_node =
44367 + of_find_compatible_node(NULL, NULL, "fsl,ep8248e-bcsr");
44368 + if (!ep8248e_bcsr_node) {
44369 + printk(KERN_ERR "No bcsr in device tree\n");
44373 + ep8248e_bcsr = of_iomap(ep8248e_bcsr_node, 0);
44374 + if (!ep8248e_bcsr) {
44375 + printk(KERN_ERR "Cannot map BCSR registers\n");
44376 + of_node_put(ep8248e_bcsr_node);
44377 + ep8248e_bcsr_node = NULL;
44381 + setbits8(&ep8248e_bcsr[7], BCSR7_SCC2_ENABLE);
44382 + setbits8(&ep8248e_bcsr[8], BCSR8_PHY1_ENABLE | BCSR8_PHY1_POWER |
44383 + BCSR8_PHY2_ENABLE | BCSR8_PHY2_POWER);
44387 + if (ppc_md.progress)
44388 + ppc_md.progress("ep8248e_setup_arch(), finish", 0);
44391 +static __initdata struct of_device_id of_bus_ids[] = {
44392 + { .compatible = "simple-bus", },
44393 + { .compatible = "fsl,ep8248e-bcsr", },
44397 +static int __init declare_of_platform_devices(void)
44399 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
44400 + of_register_platform_driver(&ep8248e_mdio_driver);
44404 +machine_device_initcall(ep8248e, declare_of_platform_devices);
44407 + * Called very early, device-tree isn't unflattened
44409 +static int __init ep8248e_probe(void)
44411 + unsigned long root = of_get_flat_dt_root();
44412 + return of_flat_dt_is_compatible(root, "fsl,ep8248e");
44415 +define_machine(ep8248e)
44417 + .name = "Embedded Planet EP8248E",
44418 + .probe = ep8248e_probe,
44419 + .setup_arch = ep8248e_setup_arch,
44420 + .init_IRQ = ep8248e_pic_init,
44421 + .get_irq = cpm2_get_irq,
44422 + .calibrate_decr = generic_calibrate_decr,
44423 + .restart = pq2_restart,
44424 + .progress = udbg_progress,
44426 --- a/arch/powerpc/platforms/82xx/pq2.c
44427 +++ b/arch/powerpc/platforms/82xx/pq2.c
44428 @@ -53,13 +53,13 @@
44429 if (of_address_to_resource(np, 0, &r) || r.end - r.start < 0x10b)
44432 - pci_assign_all_buses = 1;
44433 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
44435 hose = pcibios_alloc_controller(np);
44439 - hose->arch_data = np;
44442 setup_indirect_pci(hose, r.start + 0x100, r.start + 0x104, 0);
44443 pci_process_bridge_OF_ranges(hose, np, 1);
44444 --- a/arch/powerpc/platforms/82xx/pq2fads.c
44445 +++ b/arch/powerpc/platforms/82xx/pq2fads.c
44446 @@ -15,12 +15,12 @@
44447 #include <linux/init.h>
44448 #include <linux/interrupt.h>
44449 #include <linux/fsl_devices.h>
44450 +#include <linux/of_platform.h>
44452 #include <asm/io.h>
44453 #include <asm/cpm2.h>
44454 #include <asm/udbg.h>
44455 #include <asm/machdep.h>
44456 -#include <asm/of_platform.h>
44457 #include <asm/time.h>
44459 #include <sysdev/fsl_soc.h>
44460 --- a/arch/powerpc/platforms/83xx/Kconfig
44461 +++ b/arch/powerpc/platforms/83xx/Kconfig
44464 This option enables support for the MPC836x MDS Processor Board.
44466 +config MPC837x_MDS
44467 + bool "Freescale MPC837x MDS"
44468 + select DEFAULT_UIMAGE
44470 + This option enables support for the MPC837x MDS Processor Board.
44475 select PPC_UDBG_16550
44476 select PPC_INDIRECT_PCI
44477 default y if MPC836x_MDS
44479 +config PPC_MPC837x
44481 + select PPC_UDBG_16550
44482 + select PPC_INDIRECT_PCI
44483 + default y if MPC837x_MDS
44484 --- a/arch/powerpc/platforms/83xx/Makefile
44485 +++ b/arch/powerpc/platforms/83xx/Makefile
44487 obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o
44488 obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o
44489 obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o
44490 +obj-$(CONFIG_MPC837x_MDS) += mpc837x_mds.o
44491 --- a/arch/powerpc/platforms/83xx/mpc8313_rdb.c
44492 +++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
44496 #include <linux/pci.h>
44497 +#include <linux/of_platform.h>
44499 #include <asm/time.h>
44500 #include <asm/ipic.h>
44501 @@ -70,11 +71,23 @@
44503 static int __init mpc8313_rdb_probe(void)
44505 - unsigned long root = of_get_flat_dt_root();
44506 + unsigned long root = of_get_flat_dt_root();
44508 - return of_flat_dt_is_compatible(root, "MPC8313ERDB");
44509 + return of_flat_dt_is_compatible(root, "MPC8313ERDB");
44512 +static struct of_device_id __initdata of_bus_ids[] = {
44513 + { .compatible = "simple-bus" },
44517 +static int __init declare_of_platform_devices(void)
44519 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
44522 +machine_device_initcall(mpc8313_rdb, declare_of_platform_devices);
44524 define_machine(mpc8313_rdb) {
44525 .name = "MPC8313 RDB",
44526 .probe = mpc8313_rdb_probe,
44527 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
44528 +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
44530 #include <linux/seq_file.h>
44531 #include <linux/root_dev.h>
44532 #include <linux/initrd.h>
44533 +#include <linux/of_platform.h>
44534 +#include <linux/of_device.h>
44536 -#include <asm/of_device.h>
44537 -#include <asm/of_platform.h>
44538 #include <asm/system.h>
44539 #include <asm/atomic.h>
44540 #include <asm/time.h>
44541 @@ -110,15 +110,12 @@
44543 static int __init mpc832x_declare_of_platform_devices(void)
44545 - if (!machine_is(mpc832x_mds))
44548 /* Publish the QE devices */
44549 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
44553 -device_initcall(mpc832x_declare_of_platform_devices);
44554 +machine_device_initcall(mpc832x_mds, mpc832x_declare_of_platform_devices);
44556 static void __init mpc832x_sys_init_IRQ(void)
44558 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
44559 +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
44561 #include <linux/spi/spi.h>
44562 #include <linux/spi/mmc_spi.h>
44563 #include <linux/mmc/host.h>
44564 +#include <linux/of_platform.h>
44566 -#include <asm/of_platform.h>
44567 #include <asm/time.h>
44568 #include <asm/ipic.h>
44569 #include <asm/udbg.h>
44572 static int __init mpc832x_spi_init(void)
44574 - if (!machine_is(mpc832x_rdb))
44577 par_io_config_pin(3, 0, 3, 0, 1, 0); /* SPI1 MOSI, I/O */
44578 par_io_config_pin(3, 1, 3, 0, 1, 0); /* SPI1 MISO, I/O */
44579 par_io_config_pin(3, 2, 3, 0, 1, 0); /* SPI1 CLK, I/O */
44581 mpc83xx_spi_deactivate_cs);
44584 -device_initcall(mpc832x_spi_init);
44585 +machine_device_initcall(mpc832x_rdb, mpc832x_spi_init);
44587 /* ************************************************************************
44589 @@ -123,15 +120,12 @@
44591 static int __init mpc832x_declare_of_platform_devices(void)
44593 - if (!machine_is(mpc832x_rdb))
44596 /* Publish the QE devices */
44597 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
44601 -device_initcall(mpc832x_declare_of_platform_devices);
44602 +machine_device_initcall(mpc832x_rdb, mpc832x_declare_of_platform_devices);
44604 void __init mpc832x_rdb_init_IRQ(void)
44606 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
44607 +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
44609 #include <linux/delay.h>
44610 #include <linux/seq_file.h>
44611 #include <linux/root_dev.h>
44612 +#include <linux/of_platform.h>
44614 #include <asm/system.h>
44615 #include <asm/atomic.h>
44618 #include "mpc83xx.h"
44620 +static struct of_device_id __initdata mpc834x_itx_ids[] = {
44621 + { .compatible = "fsl,pq2pro-localbus", },
44625 +static int __init mpc834x_itx_declare_of_platform_devices(void)
44627 + return of_platform_bus_probe(NULL, mpc834x_itx_ids, NULL);
44629 +machine_device_initcall(mpc834x_itx, mpc834x_itx_declare_of_platform_devices);
44631 /* ************************************************************************
44633 * Setup the architecture
44634 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
44635 +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
44637 #include <linux/delay.h>
44638 #include <linux/seq_file.h>
44639 #include <linux/root_dev.h>
44640 +#include <linux/of_platform.h>
44642 #include <asm/system.h>
44643 #include <asm/atomic.h>
44644 @@ -106,14 +107,27 @@
44645 ipic_set_default_priority();
44648 +static struct of_device_id mpc834x_ids[] = {
44649 + { .type = "soc", },
44650 + { .compatible = "soc", },
44654 +static int __init mpc834x_declare_of_platform_devices(void)
44656 + of_platform_bus_probe(NULL, mpc834x_ids, NULL);
44659 +machine_device_initcall(mpc834x_mds, mpc834x_declare_of_platform_devices);
44662 * Called very early, MMU is off, device-tree isn't unflattened
44664 static int __init mpc834x_mds_probe(void)
44666 - unsigned long root = of_get_flat_dt_root();
44667 + unsigned long root = of_get_flat_dt_root();
44669 - return of_flat_dt_is_compatible(root, "MPC834xMDS");
44670 + return of_flat_dt_is_compatible(root, "MPC834xMDS");
44673 define_machine(mpc834x_mds) {
44674 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
44675 +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
44677 #include <linux/seq_file.h>
44678 #include <linux/root_dev.h>
44679 #include <linux/initrd.h>
44680 +#include <linux/of_platform.h>
44681 +#include <linux/of_device.h>
44683 -#include <asm/of_device.h>
44684 -#include <asm/of_platform.h>
44685 #include <asm/system.h>
44686 #include <asm/atomic.h>
44687 #include <asm/time.h>
44688 @@ -141,15 +141,12 @@
44690 static int __init mpc836x_declare_of_platform_devices(void)
44692 - if (!machine_is(mpc836x_mds))
44695 /* Publish the QE devices */
44696 of_platform_bus_probe(NULL, mpc836x_ids, NULL);
44700 -device_initcall(mpc836x_declare_of_platform_devices);
44701 +machine_device_initcall(mpc836x_mds, mpc836x_declare_of_platform_devices);
44703 static void __init mpc836x_mds_init_IRQ(void)
44706 +++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
44709 + * arch/powerpc/platforms/83xx/mpc837x_mds.c
44711 + * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
44713 + * MPC837x MDS board specific routines
44715 + * This program is free software; you can redistribute it and/or modify it
44716 + * under the terms of the GNU General Public License as published by the
44717 + * Free Software Foundation; either version 2 of the License, or (at your
44718 + * option) any later version.
44721 +#include <linux/pci.h>
44722 +#include <linux/of.h>
44723 +#include <linux/of_platform.h>
44725 +#include <asm/time.h>
44726 +#include <asm/ipic.h>
44727 +#include <asm/udbg.h>
44728 +#include <asm/prom.h>
44730 +#include "mpc83xx.h"
44732 +#define BCSR12_USB_SER_MASK 0x8a
44733 +#define BCSR12_USB_SER_PIN 0x80
44734 +#define BCSR12_USB_SER_DEVICE 0x02
44735 +extern int mpc837x_usb_cfg(void);
44737 +static int mpc837xmds_usb_cfg(void)
44739 + struct device_node *np;
44740 + const void *phy_type, *mode;
44741 + void __iomem *bcsr_regs = NULL;
44745 + ret = mpc837x_usb_cfg();
44748 + /* Map BCSR area */
44749 + np = of_find_node_by_name(NULL, "bcsr");
44751 + struct resource res;
44753 + of_address_to_resource(np, 0, &res);
44754 + bcsr_regs = ioremap(res.start, res.end - res.start + 1);
44760 + np = of_find_node_by_name(NULL, "usb");
44763 + phy_type = of_get_property(np, "phy_type", NULL);
44764 + if (phy_type && !strcmp(phy_type, "ulpi")) {
44765 + clrbits8(bcsr_regs + 12, BCSR12_USB_SER_PIN);
44766 + } else if (phy_type && !strcmp(phy_type, "serial")) {
44767 + mode = of_get_property(np, "dr_mode", NULL);
44768 + bcsr12 = in_8(bcsr_regs + 12) & ~BCSR12_USB_SER_MASK;
44769 + bcsr12 |= BCSR12_USB_SER_PIN;
44770 + if (mode && !strcmp(mode, "peripheral"))
44771 + bcsr12 |= BCSR12_USB_SER_DEVICE;
44772 + out_8(bcsr_regs + 12, bcsr12);
44774 + printk(KERN_ERR "USB DR: unsupported PHY\n");
44778 + iounmap(bcsr_regs);
44782 +/* ************************************************************************
44784 + * Setup the architecture
44787 +static void __init mpc837x_mds_setup_arch(void)
44790 + struct device_node *np;
44793 + if (ppc_md.progress)
44794 + ppc_md.progress("mpc837x_mds_setup_arch()", 0);
44797 + for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
44798 + mpc83xx_add_bridge(np);
44800 + mpc837xmds_usb_cfg();
44803 +static struct of_device_id mpc837x_ids[] = {
44804 + { .type = "soc", },
44805 + { .compatible = "soc", },
44809 +static int __init mpc837x_declare_of_platform_devices(void)
44811 + /* Publish of_device */
44812 + of_platform_bus_probe(NULL, mpc837x_ids, NULL);
44816 +machine_device_initcall(mpc837x_mds, mpc837x_declare_of_platform_devices);
44818 +static void __init mpc837x_mds_init_IRQ(void)
44820 + struct device_node *np;
44822 + np = of_find_compatible_node(NULL, NULL, "fsl,ipic");
44826 + ipic_init(np, 0);
44828 + /* Initialize the default interrupt mapping priorities,
44829 + * in case the boot rom changed something on us.
44831 + ipic_set_default_priority();
44835 + * Called very early, MMU is off, device-tree isn't unflattened
44837 +static int __init mpc837x_mds_probe(void)
44839 + unsigned long root = of_get_flat_dt_root();
44841 + return of_flat_dt_is_compatible(root, "fsl,mpc837xmds");
44844 +define_machine(mpc837x_mds) {
44845 + .name = "MPC837x MDS",
44846 + .probe = mpc837x_mds_probe,
44847 + .setup_arch = mpc837x_mds_setup_arch,
44848 + .init_IRQ = mpc837x_mds_init_IRQ,
44849 + .get_irq = ipic_get_irq,
44850 + .restart = mpc83xx_restart,
44851 + .time_init = mpc83xx_time_init,
44852 + .calibrate_decr = generic_calibrate_decr,
44853 + .progress = udbg_progress,
44855 --- a/arch/powerpc/platforms/83xx/mpc83xx.h
44856 +++ b/arch/powerpc/platforms/83xx/mpc83xx.h
44858 #define MPC83XX_SCCR_USB_DRCM_11 0x00300000
44859 #define MPC83XX_SCCR_USB_DRCM_01 0x00100000
44860 #define MPC83XX_SCCR_USB_DRCM_10 0x00200000
44861 +#define MPC837X_SCCR_USB_DRCM_11 0x00c00000
44863 /* system i/o configuration register low */
44864 #define MPC83XX_SICRL_OFFS 0x114
44866 #define MPC834X_SICRL_USB1 0x20000000
44867 #define MPC831X_SICRL_USB_MASK 0x00000c00
44868 #define MPC831X_SICRL_USB_ULPI 0x00000800
44869 +#define MPC837X_SICRL_USB_MASK 0xf0000000
44870 +#define MPC837X_SICRL_USB_ULPI 0x50000000
44872 /* system i/o configuration register high */
44873 #define MPC83XX_SICRH_OFFS 0x118
44874 --- a/arch/powerpc/platforms/83xx/pci.c
44875 +++ b/arch/powerpc/platforms/83xx/pci.c
44877 " bus 0\n", dev->full_name);
44880 - pci_assign_all_buses = 1;
44881 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
44882 hose = pcibios_alloc_controller(dev);
44885 --- a/arch/powerpc/platforms/83xx/usb.c
44886 +++ b/arch/powerpc/platforms/83xx/usb.c
44888 sicrl = in_be32(immap + MPC83XX_SICRL_OFFS) & ~MPC834X_SICRL_USB_MASK;
44889 sicrh = in_be32(immap + MPC83XX_SICRH_OFFS) & ~MPC834X_SICRH_USB_UTMI;
44891 - np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
44892 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
44894 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
44900 - np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph");
44901 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-mph");
44903 sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
44905 @@ -111,7 +111,7 @@
44906 const void *dr_mode;
44909 - np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
44910 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
44913 prop = of_get_property(np, "phy_type", NULL);
44914 @@ -179,3 +179,43 @@
44917 #endif /* CONFIG_PPC_MPC831x */
44919 +#ifdef CONFIG_PPC_MPC837x
44920 +int mpc837x_usb_cfg(void)
44922 + void __iomem *immap;
44923 + struct device_node *np = NULL;
44924 + const void *prop;
44927 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
44930 + prop = of_get_property(np, "phy_type", NULL);
44932 + if (!prop || (strcmp(prop, "ulpi") && strcmp(prop, "serial"))) {
44933 + printk(KERN_WARNING "837x USB PHY type not supported\n");
44938 + /* Map IMMR space for pin and clock settings */
44939 + immap = ioremap(get_immrbase(), 0x1000);
44945 + /* Configure clock */
44946 + clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, MPC837X_SCCR_USB_DRCM_11,
44947 + MPC837X_SCCR_USB_DRCM_11);
44949 + /* Configure pin mux for ULPI/serial */
44950 + clrsetbits_be32(immap + MPC83XX_SICRL_OFFS, MPC837X_SICRL_USB_MASK,
44951 + MPC837X_SICRL_USB_ULPI);
44957 +#endif /* CONFIG_PPC_MPC837x */
44958 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
44959 +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
44964 - while ((cascade_irq = cpm2_get_irq()) >= 0) {
44965 + while ((cascade_irq = cpm2_get_irq()) >= 0)
44966 generic_handle_irq(cascade_irq);
44969 desc->chip->eoi(irq);
44972 @@ -70,13 +70,12 @@
44975 np = of_find_node_by_type(np, "open-pic");
44977 - if (np == NULL) {
44979 printk(KERN_ERR "Could not find open-pic node\n");
44983 - if(of_address_to_resource(np, 0, &r)) {
44984 + if (of_address_to_resource(np, 0, &r)) {
44985 printk(KERN_ERR "Could not map mpic register space\n");
44989 irq = irq_of_parse_and_map(np, 0);
44993 set_irq_chained_handler(irq, cpm2_cascade);
44996 @@ -112,7 +112,7 @@
44997 int port, pin, flags;
45000 -static struct cpm_pin mpc8560_ads_pins[] = {
45001 +static const struct cpm_pin mpc8560_ads_pins[] = {
45003 {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
45004 {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45005 @@ -233,13 +233,11 @@
45007 static int __init declare_of_platform_devices(void)
45009 - if (!machine_is(mpc85xx_ads))
45012 of_platform_bus_probe(NULL, of_bus_ids, NULL);
45016 -device_initcall(declare_of_platform_devices);
45017 +machine_device_initcall(mpc85xx_ads, declare_of_platform_devices);
45020 * Called very early, device-tree isn't unflattened
45021 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
45022 +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
45023 @@ -222,9 +222,6 @@
45024 struct device_node *cascade_node = NULL;
45027 - if (!machine_is(mpc85xx_cds))
45030 /* Initialize the i8259 controller */
45031 for_each_node_by_type(np, "interrupt-controller")
45032 if (of_device_is_compatible(np, "chrp,iic")) {
45033 @@ -262,8 +259,7 @@
45038 -device_initcall(mpc85xx_cds_8259_attach);
45039 +machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
45041 #endif /* CONFIG_PPC_I8259 */
45043 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
45044 +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
45045 @@ -123,7 +123,7 @@
45046 struct device_node* node;
45047 struct resource rsrc;
45049 - node = (struct device_node *)hose->arch_data;
45051 of_address_to_resource(node, 0, &rsrc);
45053 if ((rsrc.start & 0xfffff) == primary_phb_addr) {
45054 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
45055 +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
45057 #include <linux/initrd.h>
45058 #include <linux/module.h>
45059 #include <linux/fsl_devices.h>
45060 +#include <linux/of_platform.h>
45061 +#include <linux/of_device.h>
45063 -#include <asm/of_device.h>
45064 -#include <asm/of_platform.h>
45065 #include <asm/system.h>
45066 #include <asm/atomic.h>
45067 #include <asm/time.h>
45068 @@ -144,15 +144,12 @@
45070 static int __init mpc85xx_publish_devices(void)
45072 - if (!machine_is(mpc85xx_mds))
45075 /* Publish the QE devices */
45076 - of_platform_bus_probe(NULL,mpc85xx_ids,NULL);
45077 + of_platform_bus_probe(NULL, mpc85xx_ids, NULL);
45081 -device_initcall(mpc85xx_publish_devices);
45082 +machine_device_initcall(mpc85xx_mds, mpc85xx_publish_devices);
45084 static void __init mpc85xx_mds_pic_init(void)
45086 --- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
45087 +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
45090 #include <asm/mpic.h>
45092 +#include <linux/of_platform.h>
45093 #include <sysdev/fsl_pci.h>
45094 #include <sysdev/fsl_soc.h>
45096 +static struct of_device_id __initdata mpc8610_ids[] = {
45097 + { .compatible = "fsl,mpc8610-immr", },
45101 +static int __init mpc8610_declare_of_platform_devices(void)
45103 + /* Without this call, the SSI device driver won't get probed. */
45104 + of_platform_bus_probe(NULL, mpc8610_ids, NULL);
45108 +machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices);
45111 mpc86xx_hpcd_init_irq(void)
45113 @@ -124,7 +139,7 @@
45114 static void __devinit final_uli5288(struct pci_dev *dev)
45116 struct pci_controller *hose = pci_bus_to_host(dev->bus);
45117 - struct device_node *hosenode = hose ? hose->arch_data : NULL;
45118 + struct device_node *hosenode = hose ? hose->dn : NULL;
45119 struct of_irq oirq;
45122 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
45123 +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
45125 #include <linux/kdev_t.h>
45126 #include <linux/delay.h>
45127 #include <linux/seq_file.h>
45128 +#include <linux/of_platform.h>
45130 #include <asm/system.h>
45131 #include <asm/time.h>
45132 @@ -116,7 +117,7 @@
45133 struct device_node* node;
45134 struct resource rsrc;
45136 - node = (struct device_node *)hose->arch_data;
45138 of_address_to_resource(node, 0, &rsrc);
45140 if ((rsrc.start & 0xfffff) == 0x8000) {
45141 @@ -212,6 +213,19 @@
45145 +static __initdata struct of_device_id of_bus_ids[] = {
45146 + { .compatible = "simple-bus", },
45150 +static int __init declare_of_platform_devices(void)
45152 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45156 +machine_device_initcall(mpc86xx_hpcn, declare_of_platform_devices);
45158 define_machine(mpc86xx_hpcn) {
45159 .name = "MPC86xx HPCN",
45160 .probe = mpc86xx_hpcn_probe,
45161 --- a/arch/powerpc/platforms/8xx/Kconfig
45162 +++ b/arch/powerpc/platforms/8xx/Kconfig
45167 + select PPC_CPM_NEW_BINDING
45169 MPC86x Application Development System by Freescale Semiconductor.
45170 The MPC86xADS is meant to serve as a platform for s/w and h/w
45172 This board is also resold by Freescale as the QUICCStart
45173 MPC885 Evaluation System and/or the CWH-PPC-885XN-VE.
45175 +config PPC_ADDER875
45176 + bool "Analogue & Micro Adder 875"
45178 + select PPC_CPM_NEW_BINDING
45181 + This enables support for the Analogue & Micro Adder 875
45186 menu "Freescale Ethernet driver platform-specific options"
45187 --- a/arch/powerpc/platforms/8xx/Makefile
45188 +++ b/arch/powerpc/platforms/8xx/Makefile
45190 obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o
45191 obj-$(CONFIG_MPC86XADS) += mpc86xads_setup.o
45192 obj-$(CONFIG_PPC_EP88XC) += ep88xc.o
45193 +obj-$(CONFIG_PPC_ADDER875) += adder875.o
45195 +++ b/arch/powerpc/platforms/8xx/adder875.c
45197 +/* Analogue & Micro Adder MPC875 board support
45199 + * Author: Scott Wood <scottwood@freescale.com>
45201 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
45203 + * This program is free software; you can redistribute it and/or modify
45204 + * it under the terms of the GNU General Public License, version 2, as
45205 + * published by the Free Software Foundation.
45208 +#include <linux/init.h>
45209 +#include <linux/fs_enet_pd.h>
45210 +#include <linux/of_platform.h>
45212 +#include <asm/time.h>
45213 +#include <asm/machdep.h>
45214 +#include <asm/commproc.h>
45215 +#include <asm/fs_pd.h>
45216 +#include <asm/udbg.h>
45217 +#include <asm/prom.h>
45219 +#include <sysdev/commproc.h>
45222 + int port, pin, flags;
45225 +static __initdata struct cpm_pin adder875_pins[] = {
45227 + {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */
45228 + {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
45231 + {CPM_PORTA, 0, CPM_PIN_INPUT},
45232 + {CPM_PORTA, 1, CPM_PIN_INPUT},
45233 + {CPM_PORTA, 2, CPM_PIN_INPUT},
45234 + {CPM_PORTA, 3, CPM_PIN_INPUT},
45235 + {CPM_PORTA, 4, CPM_PIN_OUTPUT},
45236 + {CPM_PORTA, 10, CPM_PIN_OUTPUT},
45237 + {CPM_PORTA, 11, CPM_PIN_OUTPUT},
45238 + {CPM_PORTB, 19, CPM_PIN_INPUT},
45239 + {CPM_PORTB, 31, CPM_PIN_INPUT},
45240 + {CPM_PORTC, 12, CPM_PIN_INPUT},
45241 + {CPM_PORTC, 13, CPM_PIN_INPUT},
45242 + {CPM_PORTE, 30, CPM_PIN_OUTPUT},
45243 + {CPM_PORTE, 31, CPM_PIN_OUTPUT},
45246 + {CPM_PORTE, 14, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45247 + {CPM_PORTE, 15, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45248 + {CPM_PORTE, 16, CPM_PIN_OUTPUT},
45249 + {CPM_PORTE, 17, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45250 + {CPM_PORTE, 18, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45251 + {CPM_PORTE, 19, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45252 + {CPM_PORTE, 20, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45253 + {CPM_PORTE, 21, CPM_PIN_OUTPUT},
45254 + {CPM_PORTE, 22, CPM_PIN_OUTPUT},
45255 + {CPM_PORTE, 23, CPM_PIN_OUTPUT},
45256 + {CPM_PORTE, 24, CPM_PIN_OUTPUT},
45257 + {CPM_PORTE, 25, CPM_PIN_OUTPUT},
45258 + {CPM_PORTE, 26, CPM_PIN_OUTPUT},
45259 + {CPM_PORTE, 27, CPM_PIN_OUTPUT},
45260 + {CPM_PORTE, 28, CPM_PIN_OUTPUT},
45261 + {CPM_PORTE, 29, CPM_PIN_OUTPUT},
45264 +static void __init init_ioports(void)
45268 + for (i = 0; i < ARRAY_SIZE(adder875_pins); i++) {
45269 + const struct cpm_pin *pin = &adder875_pins[i];
45270 + cpm1_set_pin(pin->port, pin->pin, pin->flags);
45273 + cpm1_clk_setup(CPM_CLK_SMC1, CPM_BRG1, CPM_CLK_RTX);
45275 + /* Set FEC1 and FEC2 to MII mode */
45276 + clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180);
45279 +static void __init adder875_setup(void)
45285 +static int __init adder875_probe(void)
45287 + unsigned long root = of_get_flat_dt_root();
45288 + return of_flat_dt_is_compatible(root, "analogue-and-micro,adder875");
45291 +static __initdata struct of_device_id of_bus_ids[] = {
45292 + { .compatible = "simple-bus", },
45296 +static int __init declare_of_platform_devices(void)
45298 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45301 +machine_device_initcall(adder875, declare_of_platform_devices);
45303 +define_machine(adder875) {
45304 + .name = "Adder MPC875",
45305 + .probe = adder875_probe,
45306 + .setup_arch = adder875_setup,
45307 + .init_IRQ = m8xx_pic_init,
45308 + .get_irq = mpc8xx_get_irq,
45309 + .restart = mpc8xx_restart,
45310 + .calibrate_decr = generic_calibrate_decr,
45311 + .set_rtc_time = mpc8xx_set_rtc_time,
45312 + .get_rtc_time = mpc8xx_get_rtc_time,
45313 + .progress = udbg_progress,
45315 --- a/arch/powerpc/platforms/8xx/ep88xc.c
45316 +++ b/arch/powerpc/platforms/8xx/ep88xc.c
45317 @@ -155,12 +155,11 @@
45318 static int __init declare_of_platform_devices(void)
45320 /* Publish the QE devices */
45321 - if (machine_is(ep88xc))
45322 - of_platform_bus_probe(NULL, of_bus_ids, NULL);
45323 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45327 -device_initcall(declare_of_platform_devices);
45328 +machine_device_initcall(ep88xc, declare_of_platform_devices);
45330 define_machine(ep88xc) {
45331 .name = "Embedded Planet EP88xC",
45332 --- a/arch/powerpc/platforms/8xx/m8xx_setup.c
45333 +++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
45334 @@ -120,7 +120,7 @@
45336 ppc_proc_freq = 50000000;
45337 if (!get_freq("clock-frequency", &ppc_proc_freq))
45338 - printk(KERN_ERR "WARNING: Estimating processor frequency"
45339 + printk(KERN_ERR "WARNING: Estimating processor frequency "
45342 printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq);
45343 --- a/arch/powerpc/platforms/8xx/mpc86xads.h
45344 +++ b/arch/powerpc/platforms/8xx/mpc86xads.h
45346 #ifndef __ASM_MPC86XADS_H__
45347 #define __ASM_MPC86XADS_H__
45349 -#include <sysdev/fsl_soc.h>
45351 -/* U-Boot maps BCSR to 0xff080000 */
45352 -#define BCSR_ADDR ((uint)0xff080000)
45353 -#define BCSR_SIZE ((uint)32)
45354 -#define BCSR0 ((uint)(BCSR_ADDR + 0x00))
45355 -#define BCSR1 ((uint)(BCSR_ADDR + 0x04))
45356 -#define BCSR2 ((uint)(BCSR_ADDR + 0x08))
45357 -#define BCSR3 ((uint)(BCSR_ADDR + 0x0c))
45358 -#define BCSR4 ((uint)(BCSR_ADDR + 0x10))
45360 -#define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
45361 -#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
45363 -#define MPC8xx_CPM_OFFSET (0x9c0)
45364 -#define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET)
45365 -#define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver
45367 -#define PCMCIA_MEM_ADDR ((uint)0xff020000)
45368 -#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
45370 /* Bits of interest in the BCSRs.
45372 #define BCSR1_ETHEN ((uint)0x20000000)
45374 #define BCSR5_MII1_EN 0x02
45375 #define BCSR5_MII1_RST 0x01
45377 -/* Interrupt level assignments */
45378 -#define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */
45379 -#define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */
45380 -#define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */
45382 -/* We don't use the 8259 */
45383 -#define NR_8259_INTS 0
45385 -/* CPM Ethernet through SCC1 */
45386 -#define PA_ENET_RXD ((ushort)0x0001)
45387 -#define PA_ENET_TXD ((ushort)0x0002)
45388 -#define PA_ENET_TCLK ((ushort)0x0100)
45389 -#define PA_ENET_RCLK ((ushort)0x0200)
45390 -#define PB_ENET_TENA ((uint)0x00001000)
45391 -#define PC_ENET_CLSN ((ushort)0x0010)
45392 -#define PC_ENET_RENA ((ushort)0x0020)
45394 -/* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to
45395 - * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
45397 -#define SICR_ENET_MASK ((uint)0x000000ff)
45398 -#define SICR_ENET_CLKRT ((uint)0x0000002c)
45400 #endif /* __ASM_MPC86XADS_H__ */
45401 #endif /* __KERNEL__ */
45402 --- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c
45403 +++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
45404 @@ -6,264 +6,133 @@
45406 * Copyright 2005 MontaVista Software Inc.
45408 + * Heavily modified by Scott Wood <scottwood@freescale.com>
45409 + * Copyright 2007 Freescale Semiconductor, Inc.
45411 * This file is licensed under the terms of the GNU General Public License
45412 * version 2. This program is licensed "as is" without any warranty of any
45413 * kind, whether express or implied.
45416 #include <linux/init.h>
45417 -#include <linux/module.h>
45418 -#include <linux/param.h>
45419 -#include <linux/string.h>
45420 -#include <linux/ioport.h>
45421 -#include <linux/device.h>
45422 -#include <linux/delay.h>
45423 -#include <linux/root_dev.h>
45425 -#include <linux/fs_enet_pd.h>
45426 -#include <linux/fs_uart_pd.h>
45427 -#include <linux/mii.h>
45428 +#include <linux/of_platform.h>
45430 -#include <asm/delay.h>
45431 #include <asm/io.h>
45432 #include <asm/machdep.h>
45433 -#include <asm/page.h>
45434 -#include <asm/processor.h>
45435 #include <asm/system.h>
45436 #include <asm/time.h>
45437 #include <asm/mpc8xx.h>
45438 #include <asm/8xx_immap.h>
45439 #include <asm/commproc.h>
45440 #include <asm/fs_pd.h>
45441 -#include <asm/prom.h>
45442 +#include <asm/udbg.h>
45444 #include <sysdev/commproc.h>
45446 -static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi);
45447 -static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi);
45448 -static void init_scc1_ioports(struct fs_platform_info* ptr);
45450 -void __init mpc86xads_board_setup(void)
45453 - unsigned int *bcsr_io;
45456 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
45457 - cp = (cpm8xx_t *)immr_map(im_cpm);
45458 +#include "mpc86xads.h"
45460 - if (bcsr_io == NULL) {
45461 - printk(KERN_CRIT "Could not remap BCSR\n");
45464 -#ifdef CONFIG_SERIAL_CPM_SMC1
45465 - clrbits32(bcsr_io, BCSR1_RS232EN_1);
45466 - clrbits32(&cp->cp_simode, 0xe0000000 >> 17); /* brg1 */
45467 - tmpval8 = in_8(&(cp->cp_smc[0].smc_smcm)) | (SMCM_RX | SMCM_TX);
45468 - out_8(&(cp->cp_smc[0].smc_smcm), tmpval8);
45469 - clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN);
45471 - setbits32(bcsr_io,BCSR1_RS232EN_1);
45472 - out_be16(&cp->cp_smc[0].smc_smcmr, 0);
45473 - out_8(&cp->cp_smc[0].smc_smce, 0);
45476 -#ifdef CONFIG_SERIAL_CPM_SMC2
45477 - clrbits32(bcsr_io,BCSR1_RS232EN_2);
45478 - clrbits32(&cp->cp_simode, 0xe0000000 >> 1);
45479 - setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */
45480 - tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX);
45481 - out_8(&(cp->cp_smc[1].smc_smcm), tmpval8);
45482 - clrbits16(&cp->cp_smc[1].smc_smcmr, SMCMR_REN | SMCMR_TEN);
45484 - init_smc2_uart_ioports(0);
45486 - setbits32(bcsr_io,BCSR1_RS232EN_2);
45487 - out_be16(&cp->cp_smc[1].smc_smcmr, 0);
45488 - out_8(&cp->cp_smc[1].smc_smce, 0);
45491 - iounmap(bcsr_io);
45494 + int port, pin, flags;
45497 +static struct cpm_pin mpc866ads_pins[] = {
45499 + {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */
45500 + {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
45503 + {CPM_PORTB, 21, CPM_PIN_INPUT}, /* RX */
45504 + {CPM_PORTB, 20, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
45507 + {CPM_PORTA, 6, CPM_PIN_INPUT}, /* CLK1 */
45508 + {CPM_PORTA, 7, CPM_PIN_INPUT}, /* CLK2 */
45509 + {CPM_PORTA, 14, CPM_PIN_INPUT}, /* TX */
45510 + {CPM_PORTA, 15, CPM_PIN_INPUT}, /* RX */
45511 + {CPM_PORTB, 19, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TENA */
45512 + {CPM_PORTC, 10, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* RENA */
45513 + {CPM_PORTC, 11, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* CLSN */
45516 + {CPM_PORTD, 3, CPM_PIN_OUTPUT},
45517 + {CPM_PORTD, 4, CPM_PIN_OUTPUT},
45518 + {CPM_PORTD, 5, CPM_PIN_OUTPUT},
45519 + {CPM_PORTD, 6, CPM_PIN_OUTPUT},
45520 + {CPM_PORTD, 7, CPM_PIN_OUTPUT},
45521 + {CPM_PORTD, 8, CPM_PIN_OUTPUT},
45522 + {CPM_PORTD, 9, CPM_PIN_OUTPUT},
45523 + {CPM_PORTD, 10, CPM_PIN_OUTPUT},
45524 + {CPM_PORTD, 11, CPM_PIN_OUTPUT},
45525 + {CPM_PORTD, 12, CPM_PIN_OUTPUT},
45526 + {CPM_PORTD, 13, CPM_PIN_OUTPUT},
45527 + {CPM_PORTD, 14, CPM_PIN_OUTPUT},
45528 + {CPM_PORTD, 15, CPM_PIN_OUTPUT},
45531 -static void init_fec1_ioports(struct fs_platform_info* ptr)
45532 +static void __init init_ioports(void)
45534 - iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport);
45537 - /* configure FEC1 pins */
45538 + for (i = 0; i < ARRAY_SIZE(mpc866ads_pins); i++) {
45539 + struct cpm_pin *pin = &mpc866ads_pins[i];
45540 + cpm1_set_pin(pin->port, pin->pin, pin->flags);
45543 - setbits16(&io_port->iop_pdpar, 0x1fff);
45544 - setbits16(&io_port->iop_pddir, 0x1fff);
45545 + cpm1_clk_setup(CPM_CLK_SMC1, CPM_BRG1, CPM_CLK_RTX);
45546 + cpm1_clk_setup(CPM_CLK_SMC2, CPM_BRG2, CPM_CLK_RTX);
45547 + cpm1_clk_setup(CPM_CLK_SCC1, CPM_CLK1, CPM_CLK_TX);
45548 + cpm1_clk_setup(CPM_CLK_SCC1, CPM_CLK2, CPM_CLK_RX);
45550 - immr_unmap(io_port);
45551 + /* Set FEC1 and FEC2 to MII mode */
45552 + clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180);
45555 -void init_fec_ioports(struct fs_platform_info *fpi)
45556 +static void __init mpc86xads_setup_arch(void)
45558 - int fec_no = fs_get_fec_index(fpi->fs_no);
45559 + struct device_node *np;
45560 + u32 __iomem *bcsr_io;
45565 - switch (fec_no) {
45567 - init_fec1_ioports(fpi);
45570 - printk(KERN_ERR "init_fec_ioports: invalid FEC number\n");
45571 + np = of_find_compatible_node(NULL, NULL, "fsl,mpc866ads-bcsr");
45573 + printk(KERN_CRIT "Could not find fsl,mpc866ads-bcsr node\n");
45578 -static void init_scc1_ioports(struct fs_platform_info* fpi)
45580 - unsigned *bcsr_io;
45581 - iop8xx_t *io_port;
45584 - bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE);
45585 - io_port = (iop8xx_t *)immr_map(im_ioport);
45586 - cp = (cpm8xx_t *)immr_map(im_cpm);
45587 + bcsr_io = of_iomap(np, 0);
45590 if (bcsr_io == NULL) {
45591 printk(KERN_CRIT "Could not remap BCSR\n");
45595 - /* Configure port A pins for Txd and Rxd.
45597 - setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD);
45598 - clrbits16(&io_port->iop_padir, PA_ENET_RXD | PA_ENET_TXD);
45599 - clrbits16(&io_port->iop_paodr, PA_ENET_TXD);
45601 - /* Configure port C pins to enable CLSN and RENA.
45603 - clrbits16(&io_port->iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA);
45604 - clrbits16(&io_port->iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA);
45605 - setbits16(&io_port->iop_pcso, PC_ENET_CLSN | PC_ENET_RENA);
45607 - /* Configure port A for TCLK and RCLK.
45609 - setbits16(&io_port->iop_papar, PA_ENET_TCLK | PA_ENET_RCLK);
45610 - clrbits16(&io_port->iop_padir, PA_ENET_TCLK | PA_ENET_RCLK);
45611 - clrbits32(&cp->cp_pbpar, PB_ENET_TENA);
45612 - clrbits32(&cp->cp_pbdir, PB_ENET_TENA);
45614 - /* Configure Serial Interface clock routing.
45615 - * First, clear all SCC bits to zero, then set the ones we want.
45617 - clrbits32(&cp->cp_sicr, SICR_ENET_MASK);
45618 - setbits32(&cp->cp_sicr, SICR_ENET_CLKRT);
45620 - /* In the original SCC enet driver the following code is placed at
45621 - the end of the initialization */
45622 - setbits32(&cp->cp_pbpar, PB_ENET_TENA);
45623 - setbits32(&cp->cp_pbdir, PB_ENET_TENA);
45625 - clrbits32(bcsr_io+1, BCSR1_ETHEN);
45626 + clrbits32(bcsr_io, BCSR1_RS232EN_1 | BCSR1_RS232EN_2 | BCSR1_ETHEN);
45629 - immr_unmap(io_port);
45632 -void init_scc_ioports(struct fs_platform_info *fpi)
45634 - int scc_no = fs_get_scc_index(fpi->fs_no);
45636 - switch (scc_no) {
45638 - init_scc1_ioports(fpi);
45641 - printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
45648 -static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr)
45649 +static int __init mpc86xads_probe(void)
45651 - unsigned *bcsr_io;
45652 - cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
45654 - setbits32(&cp->cp_pbpar, 0x000000c0);
45655 - clrbits32(&cp->cp_pbdir, 0x000000c0);
45656 - clrbits16(&cp->cp_pbodr, 0x00c0);
45659 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
45661 - if (bcsr_io == NULL) {
45662 - printk(KERN_CRIT "Could not remap BCSR1\n");
45665 - clrbits32(bcsr_io,BCSR1_RS232EN_1);
45666 - iounmap(bcsr_io);
45667 + unsigned long root = of_get_flat_dt_root();
45668 + return of_flat_dt_is_compatible(root, "fsl,mpc866ads");
45671 -static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi)
45673 - unsigned *bcsr_io;
45674 - cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
45676 - setbits32(&cp->cp_pbpar, 0x00000c00);
45677 - clrbits32(&cp->cp_pbdir, 0x00000c00);
45678 - clrbits16(&cp->cp_pbodr, 0x0c00);
45681 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
45683 - if (bcsr_io == NULL) {
45684 - printk(KERN_CRIT "Could not remap BCSR1\n");
45687 - clrbits32(bcsr_io,BCSR1_RS232EN_2);
45688 - iounmap(bcsr_io);
45690 +static struct of_device_id __initdata of_bus_ids[] = {
45691 + { .name = "soc", },
45692 + { .name = "cpm", },
45693 + { .name = "localbus", },
45697 -void init_smc_ioports(struct fs_uart_platform_info *data)
45698 +static int __init declare_of_platform_devices(void)
45700 - int smc_no = fs_uart_id_fsid2smc(data->fs_no);
45702 - switch (smc_no) {
45704 - init_smc1_uart_ioports(data);
45705 - data->brg = data->clk_rx;
45708 - init_smc2_uart_ioports(data);
45709 - data->brg = data->clk_rx;
45712 - printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
45716 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45718 -int platform_device_skip(const char *model, int id)
45723 -static void __init mpc86xads_setup_arch(void)
45727 - mpc86xads_board_setup();
45729 - ROOT_DEV = Root_NFS;
45732 -static int __init mpc86xads_probe(void)
45734 - char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
45736 - if (model == NULL)
45738 - if (strcmp(model, "MPC866ADS"))
45743 +machine_device_initcall(mpc86x_ads, declare_of_platform_devices);
45745 define_machine(mpc86x_ads) {
45746 .name = "MPC86x ADS",
45747 @@ -275,4 +144,5 @@
45748 .calibrate_decr = mpc8xx_calibrate_decr,
45749 .set_rtc_time = mpc8xx_set_rtc_time,
45750 .get_rtc_time = mpc8xx_get_rtc_time,
45751 + .progress = udbg_progress,
45753 --- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
45754 +++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
45755 @@ -264,12 +264,11 @@
45756 static int __init declare_of_platform_devices(void)
45758 /* Publish the QE devices */
45759 - if (machine_is(mpc885_ads))
45760 - of_platform_bus_probe(NULL, of_bus_ids, NULL);
45761 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45765 -device_initcall(declare_of_platform_devices);
45766 +machine_device_initcall(mpc885_ads, declare_of_platform_devices);
45768 define_machine(mpc885_ads) {
45769 .name = "Freescale MPC885 ADS",
45770 --- a/arch/powerpc/platforms/Kconfig
45771 +++ b/arch/powerpc/platforms/Kconfig
45777 select WANT_DEVICE_TREE
45791 @@ -265,6 +270,7 @@
45792 config QUICC_ENGINE
45794 select PPC_LIB_RHEAP
45797 The QUICC Engine (QE) is a new generation of communications
45798 coprocessors on Freescale embedded CPUs (akin to CPM in older chips).
45799 @@ -315,6 +321,12 @@
45806 + Uses information from the OF or flattened device tree to instatiate
45807 + platform devices for direct mapped RTC chips like the DS1742 or DS1743.
45809 source "arch/powerpc/sysdev/bestcomm/Kconfig"
45812 --- a/arch/powerpc/platforms/Kconfig.cputype
45813 +++ b/arch/powerpc/platforms/Kconfig.cputype
45816 select PPC_DCR_NATIVE
45817 select WANT_DEVICE_TREE
45818 + select PPC_UDBG_16550
45822 --- a/arch/powerpc/platforms/cell/Makefile
45823 +++ b/arch/powerpc/platforms/cell/Makefile
45826 obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
45829 + spu_syscalls.o spu_fault.o \
45833 --- a/arch/powerpc/platforms/cell/cbe_cpufreq.c
45834 +++ b/arch/powerpc/platforms/cell/cbe_cpufreq.c
45838 #include <linux/cpufreq.h>
45839 +#include <linux/of_platform.h>
45841 #include <asm/machdep.h>
45842 -#include <asm/of_platform.h>
45843 #include <asm/prom.h>
45844 #include <asm/cell-regs.h>
45845 #include "cbe_cpufreq.h"
45846 --- a/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
45847 +++ b/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
45849 #include <linux/kernel.h>
45850 #include <linux/types.h>
45851 #include <linux/timer.h>
45852 -#include <asm/of_platform.h>
45853 +#include <linux/of_platform.h>
45855 #include <asm/processor.h>
45856 #include <asm/prom.h>
45857 #include <asm/pmi.h>
45858 --- a/arch/powerpc/platforms/cell/cbe_regs.c
45859 +++ b/arch/powerpc/platforms/cell/cbe_regs.c
45861 #include <linux/percpu.h>
45862 #include <linux/types.h>
45863 #include <linux/module.h>
45864 +#include <linux/of_device.h>
45865 +#include <linux/of_platform.h>
45867 #include <asm/io.h>
45868 #include <asm/pgtable.h>
45869 #include <asm/prom.h>
45870 #include <asm/ptrace.h>
45871 -#include <asm/of_device.h>
45872 -#include <asm/of_platform.h>
45873 #include <asm/cell-regs.h>
45876 @@ -256,6 +256,7 @@
45877 printk(KERN_ERR "cbe_regs: More BE chips than supported"
45879 cbe_regs_map_count--;
45880 + of_node_put(cpu);
45883 map->cpu_node = cpu;
45884 --- a/arch/powerpc/platforms/cell/io-workarounds.c
45885 +++ b/arch/powerpc/platforms/cell/io-workarounds.c
45886 @@ -238,7 +238,7 @@
45887 static void __init spider_pci_add_one(struct pci_controller *phb)
45889 struct spider_pci_bus *bus = &spider_pci_busses[spider_pci_count];
45890 - struct device_node *np = phb->arch_data;
45891 + struct device_node *np = phb->dn;
45892 struct resource rsrc;
45893 void __iomem *regs;
45895 @@ -309,15 +309,12 @@
45897 struct pci_controller *phb;
45899 - if (!machine_is(cell))
45902 /* Find spider bridges. We assume they have been all probed
45903 * in setup_arch(). If that was to change, we would need to
45904 * update this code to cope with dynamically added busses
45906 list_for_each_entry(phb, &hose_list, list_node) {
45907 - struct device_node *np = phb->arch_data;
45908 + struct device_node *np = phb->dn;
45909 const char *model = of_get_property(np, "model", NULL);
45911 /* If no model property or name isn't exactly "pci", skip */
45912 @@ -343,4 +340,4 @@
45916 -arch_initcall(spider_pci_workaround_init);
45917 +machine_arch_initcall(cell, spider_pci_workaround_init);
45918 --- a/arch/powerpc/platforms/cell/iommu.c
45919 +++ b/arch/powerpc/platforms/cell/iommu.c
45920 @@ -26,14 +26,15 @@
45921 #include <linux/init.h>
45922 #include <linux/interrupt.h>
45923 #include <linux/notifier.h>
45924 +#include <linux/of_platform.h>
45926 #include <asm/prom.h>
45927 #include <asm/iommu.h>
45928 #include <asm/machdep.h>
45929 #include <asm/pci-bridge.h>
45930 #include <asm/udbg.h>
45931 -#include <asm/of_platform.h>
45932 #include <asm/lmb.h>
45933 +#include <asm/firmware.h>
45934 #include <asm/cell-regs.h>
45936 #include "interrupt.h"
45937 @@ -309,8 +310,8 @@
45941 - unsigned long reg, segments, pages_per_segment, ptab_size, n_pte_pages;
45942 - unsigned long xlate_base;
45943 + unsigned long reg, segments, pages_per_segment, ptab_size, stab_size,
45944 + n_pte_pages, xlate_base;
45947 if (cell_iommu_find_ioc(iommu->nid, &xlate_base))
45948 @@ -327,7 +328,8 @@
45949 __FUNCTION__, iommu->nid, segments, pages_per_segment);
45951 /* set up the segment table */
45952 - page = alloc_pages_node(iommu->nid, GFP_KERNEL, 0);
45953 + stab_size = segments * sizeof(unsigned long);
45954 + page = alloc_pages_node(iommu->nid, GFP_KERNEL, get_order(stab_size));
45956 iommu->stab = page_address(page);
45957 clear_page(iommu->stab);
45958 @@ -489,15 +491,18 @@
45962 +static unsigned long cell_dma_direct_offset;
45964 static void cell_dma_dev_setup(struct device *dev)
45966 struct iommu_window *window;
45967 struct cbe_iommu *iommu;
45968 struct dev_archdata *archdata = &dev->archdata;
45970 - /* If we run without iommu, no need to do anything */
45971 - if (get_pci_dma_ops() == &dma_direct_ops)
45972 + if (get_pci_dma_ops() == &dma_direct_ops) {
45973 + archdata->dma_data = (void *)cell_dma_direct_offset;
45977 /* Current implementation uses the first window available in that
45978 * node's iommu. We -might- do something smarter later though it may
45979 @@ -653,7 +658,7 @@
45981 /* If we have no Axon, we set up the spider DMA magic offset */
45982 if (of_find_node_by_name(NULL, "axon") == NULL)
45983 - dma_direct_offset = SPIDER_DMA_OFFSET;
45984 + cell_dma_direct_offset = SPIDER_DMA_OFFSET;
45986 /* Now we need to check to see where the memory is mapped
45987 * in PCI space. We assume that all busses use the same dma
45988 @@ -687,10 +692,13 @@
45992 - dma_direct_offset += base;
45993 + cell_dma_direct_offset += base;
45995 + if (cell_dma_direct_offset != 0)
45996 + ppc_md.pci_dma_dev_setup = cell_pci_dma_dev_setup;
45998 printk("iommu: disabled, direct DMA offset is 0x%lx\n",
45999 - dma_direct_offset);
46000 + cell_dma_direct_offset);
46004 @@ -699,9 +707,6 @@
46006 struct device_node *np;
46008 - if (!machine_is(cell))
46011 /* If IOMMU is disabled or we have little enough RAM to not need
46012 * to enable it, we setup a direct mapping.
46014 @@ -744,5 +749,6 @@
46018 -arch_initcall(cell_iommu_init);
46019 +machine_arch_initcall(cell, cell_iommu_init);
46020 +machine_arch_initcall(celleb_native, cell_iommu_init);
46022 --- a/arch/powerpc/platforms/cell/pmu.c
46023 +++ b/arch/powerpc/platforms/cell/pmu.c
46024 @@ -213,7 +213,7 @@
46028 - READ_SHADOW_REG(val, pm_interval);
46029 + READ_MMIO_UPPER32(val, pm_interval);
46032 case pm_start_stop:
46033 @@ -381,9 +381,6 @@
46037 - if (!machine_is(cell))
46040 for_each_node(node) {
46041 irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI |
46042 (node << IIC_IRQ_NODE_SHIFT));
46043 @@ -404,7 +401,7 @@
46047 -arch_initcall(cbe_init_pm_irq);
46048 +machine_arch_initcall(cell, cbe_init_pm_irq);
46050 void cbe_sync_irq(int node)
46052 --- a/arch/powerpc/platforms/cell/setup.c
46053 +++ b/arch/powerpc/platforms/cell/setup.c
46055 #include <linux/console.h>
46056 #include <linux/mutex.h>
46057 #include <linux/memory_hotplug.h>
46058 +#include <linux/of_platform.h>
46060 #include <asm/mmu.h>
46061 #include <asm/processor.h>
46063 #include <asm/spu_priv1.h>
46064 #include <asm/udbg.h>
46065 #include <asm/mpic.h>
46066 -#include <asm/of_platform.h>
46067 #include <asm/cell-regs.h>
46069 #include "interrupt.h"
46074 - if (!machine_is(cell))
46077 /* Publish OF platform devices for southbridge IOs */
46078 of_platform_bus_probe(NULL, NULL, NULL);
46084 -device_initcall(cell_publish_devices);
46085 +machine_device_initcall(cell, cell_publish_devices);
46087 static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc)
46089 --- a/arch/powerpc/platforms/cell/smp.c
46090 +++ b/arch/powerpc/platforms/cell/smp.c
46092 #include <asm/firmware.h>
46093 #include <asm/system.h>
46094 #include <asm/rtas.h>
46095 +#include <asm/cputhreads.h>
46097 #include "interrupt.h"
46098 #include <asm/udbg.h>
46099 @@ -182,7 +183,7 @@
46101 if (system_state < SYSTEM_RUNNING &&
46102 cpu_has_feature(CPU_FTR_SMT) &&
46103 - !smt_enabled_at_boot && nr % 2 != 0)
46104 + !smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
46108 --- a/arch/powerpc/platforms/cell/spu_base.c
46109 +++ b/arch/powerpc/platforms/cell/spu_base.c
46111 #include <linux/linux_logo.h>
46112 #include <asm/spu.h>
46113 #include <asm/spu_priv1.h>
46114 +#include <asm/spu_csa.h>
46115 #include <asm/xmon.h>
46116 #include <asm/prom.h>
46119 EXPORT_SYMBOL_GPL(cbe_spu_info);
46122 + * The spufs fault-handling code needs to call force_sig_info to raise signals
46123 + * on DMA errors. Export it here to avoid general kernel-wide access to this
46126 +EXPORT_SYMBOL_GPL(force_sig_info);
46129 * Protects cbe_spu_info and spu->number.
46131 static DEFINE_SPINLOCK(spu_lock);
46133 static DEFINE_SPINLOCK(spu_full_list_lock);
46134 static DEFINE_MUTEX(spu_full_list_mutex);
46140 void spu_invalidate_slbs(struct spu *spu)
46142 struct spu_priv2 __iomem *priv2 = spu->priv2;
46143 @@ -114,40 +126,36 @@
46145 EXPORT_SYMBOL_GPL(spu_associate_mm);
46147 -static int __spu_trap_invalid_dma(struct spu *spu)
46148 +int spu_64k_pages_available(void)
46150 - pr_debug("%s\n", __FUNCTION__);
46151 - spu->dma_callback(spu, SPE_EVENT_INVALID_DMA);
46153 + return mmu_psize_defs[MMU_PAGE_64K].shift != 0;
46155 +EXPORT_SYMBOL_GPL(spu_64k_pages_available);
46157 -static int __spu_trap_dma_align(struct spu *spu)
46158 +static void spu_restart_dma(struct spu *spu)
46160 - pr_debug("%s\n", __FUNCTION__);
46161 - spu->dma_callback(spu, SPE_EVENT_DMA_ALIGNMENT);
46164 + struct spu_priv2 __iomem *priv2 = spu->priv2;
46166 -static int __spu_trap_error(struct spu *spu)
46168 - pr_debug("%s\n", __FUNCTION__);
46169 - spu->dma_callback(spu, SPE_EVENT_SPE_ERROR);
46171 + if (!test_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags))
46172 + out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESTART_DMA_COMMAND);
46175 -static void spu_restart_dma(struct spu *spu)
46176 +static inline void spu_load_slb(struct spu *spu, int slbe, struct spu_slb *slb)
46178 struct spu_priv2 __iomem *priv2 = spu->priv2;
46180 - if (!test_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags))
46181 - out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESTART_DMA_COMMAND);
46182 + pr_debug("%s: adding SLB[%d] 0x%016lx 0x%016lx\n",
46183 + __func__, slbe, slb->vsid, slb->esid);
46185 + out_be64(&priv2->slb_index_W, slbe);
46186 + out_be64(&priv2->slb_vsid_RW, slb->vsid);
46187 + out_be64(&priv2->slb_esid_RW, slb->esid);
46190 static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
46192 - struct spu_priv2 __iomem *priv2 = spu->priv2;
46193 struct mm_struct *mm = spu->mm;
46194 - u64 esid, vsid, llp;
46195 + struct spu_slb slb;
46198 pr_debug("%s\n", __FUNCTION__);
46199 @@ -159,7 +167,7 @@
46200 printk("%s: invalid access during switch!\n", __func__);
46203 - esid = (ea & ESID_MASK) | SLB_ESID_V;
46204 + slb.esid = (ea & ESID_MASK) | SLB_ESID_V;
46206 switch(REGION_ID(ea)) {
46207 case USER_REGION_ID:
46208 @@ -168,21 +176,21 @@
46210 psize = mm->context.user_psize;
46212 - vsid = (get_vsid(mm->context.id, ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46214 + slb.vsid = (get_vsid(mm->context.id, ea, MMU_SEGSIZE_256M)
46215 + << SLB_VSID_SHIFT) | SLB_VSID_USER;
46217 case VMALLOC_REGION_ID:
46218 if (ea < VMALLOC_END)
46219 psize = mmu_vmalloc_psize;
46221 psize = mmu_io_psize;
46222 - vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46224 + slb.vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M)
46225 + << SLB_VSID_SHIFT) | SLB_VSID_KERNEL;
46227 case KERNEL_REGION_ID:
46228 psize = mmu_linear_psize;
46229 - vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46231 + slb.vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M)
46232 + << SLB_VSID_SHIFT) | SLB_VSID_KERNEL;
46235 /* Future: support kernel segments so that drivers
46236 @@ -191,11 +199,9 @@
46237 pr_debug("invalid region access at %016lx\n", ea);
46240 - llp = mmu_psize_defs[psize].sllp;
46241 + slb.vsid |= mmu_psize_defs[psize].sllp;
46243 - out_be64(&priv2->slb_index_W, spu->slb_replace);
46244 - out_be64(&priv2->slb_vsid_RW, vsid | llp);
46245 - out_be64(&priv2->slb_esid_RW, esid);
46246 + spu_load_slb(spu, spu->slb_replace, &slb);
46248 spu->slb_replace++;
46249 if (spu->slb_replace >= 8)
46250 @@ -225,13 +231,83 @@
46254 + spu->class_0_pending = 0;
46256 spu->dsisr = dsisr;
46259 spu->stop_callback(spu);
46264 +static void __spu_kernel_slb(void *addr, struct spu_slb *slb)
46266 + unsigned long ea = (unsigned long)addr;
46269 + if (REGION_ID(ea) == KERNEL_REGION_ID)
46270 + llp = mmu_psize_defs[mmu_linear_psize].sllp;
46272 + llp = mmu_psize_defs[mmu_virtual_psize].sllp;
46274 + slb->vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46275 + SLB_VSID_KERNEL | llp;
46276 + slb->esid = (ea & ESID_MASK) | SLB_ESID_V;
46280 + * Given an array of @nr_slbs SLB entries, @slbs, return non-zero if the
46281 + * address @new_addr is present.
46283 +static inline int __slb_present(struct spu_slb *slbs, int nr_slbs,
46286 + unsigned long ea = (unsigned long)new_addr;
46289 + for (i = 0; i < nr_slbs; i++)
46290 + if (!((slbs[i].esid ^ ea) & ESID_MASK))
46297 + * Setup the SPU kernel SLBs, in preparation for a context save/restore. We
46298 + * need to map both the context save area, and the save/restore code.
46300 + * Because the lscsa and code may cross segment boundaires, we check to see
46301 + * if mappings are required for the start and end of each range. We currently
46302 + * assume that the mappings are smaller that one segment - if not, something
46303 + * is seriously wrong.
46305 +void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
46306 + void *code, int code_size)
46308 + struct spu_slb slbs[4];
46309 + int i, nr_slbs = 0;
46310 + /* start and end addresses of both mappings */
46311 + void *addrs[] = {
46312 + lscsa, (void *)lscsa + sizeof(*lscsa) - 1,
46313 + code, code + code_size - 1
46316 + /* check the set of addresses, and create a new entry in the slbs array
46317 + * if there isn't already a SLB for that address */
46318 + for (i = 0; i < ARRAY_SIZE(addrs); i++) {
46319 + if (__slb_present(slbs, nr_slbs, addrs[i]))
46322 + __spu_kernel_slb(addrs[i], &slbs[nr_slbs]);
46326 + /* Add the set of SLBs */
46327 + for (i = 0; i < nr_slbs; i++)
46328 + spu_load_slb(spu, i, &slbs[i]);
46330 +EXPORT_SYMBOL_GPL(spu_setup_kernel_slbs);
46333 spu_irq_class_0(int irq, void *data)
46335 @@ -240,12 +316,13 @@
46339 + spin_lock(&spu->register_lock);
46340 mask = spu_int_mask_get(spu, 0);
46341 - stat = spu_int_stat_get(spu, 0);
46343 + stat = spu_int_stat_get(spu, 0) & mask;
46345 - spin_lock(&spu->register_lock);
46346 spu->class_0_pending |= stat;
46347 + spu->dsisr = spu_mfc_dsisr_get(spu);
46348 + spu->dar = spu_mfc_dar_get(spu);
46349 spin_unlock(&spu->register_lock);
46351 spu->stop_callback(spu);
46352 @@ -255,31 +332,6 @@
46353 return IRQ_HANDLED;
46357 -spu_irq_class_0_bottom(struct spu *spu)
46359 - unsigned long flags;
46360 - unsigned long stat;
46362 - spin_lock_irqsave(&spu->register_lock, flags);
46363 - stat = spu->class_0_pending;
46364 - spu->class_0_pending = 0;
46366 - if (stat & 1) /* invalid DMA alignment */
46367 - __spu_trap_dma_align(spu);
46369 - if (stat & 2) /* invalid MFC DMA */
46370 - __spu_trap_invalid_dma(spu);
46372 - if (stat & 4) /* error on SPU */
46373 - __spu_trap_error(spu);
46375 - spin_unlock_irqrestore(&spu->register_lock, flags);
46377 - return (stat & 0x7) ? -EIO : 0;
46379 -EXPORT_SYMBOL_GPL(spu_irq_class_0_bottom);
46382 spu_irq_class_1(int irq, void *data)
46384 @@ -294,24 +346,23 @@
46385 stat = spu_int_stat_get(spu, 1) & mask;
46386 dar = spu_mfc_dar_get(spu);
46387 dsisr = spu_mfc_dsisr_get(spu);
46388 - if (stat & 2) /* mapping fault */
46389 + if (stat & CLASS1_STORAGE_FAULT_INTR)
46390 spu_mfc_dsisr_set(spu, 0ul);
46391 spu_int_stat_clear(spu, 1, stat);
46392 spin_unlock(&spu->register_lock);
46393 pr_debug("%s: %lx %lx %lx %lx\n", __FUNCTION__, mask, stat,
46396 - if (stat & 1) /* segment fault */
46397 + if (stat & CLASS1_SEGMENT_FAULT_INTR)
46398 __spu_trap_data_seg(spu, dar);
46400 - if (stat & 2) { /* mapping fault */
46401 + if (stat & CLASS1_STORAGE_FAULT_INTR)
46402 __spu_trap_data_map(spu, dar, dsisr);
46405 - if (stat & 4) /* ls compare & suspend on get */
46406 + if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_GET_INTR)
46409 - if (stat & 8) /* ls compare & suspend on put */
46410 + if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_PUT_INTR)
46413 return stat ? IRQ_HANDLED : IRQ_NONE;
46414 @@ -323,6 +374,8 @@
46416 unsigned long stat;
46417 unsigned long mask;
46418 + const int mailbox_intrs =
46419 + CLASS2_MAILBOX_THRESHOLD_INTR | CLASS2_MAILBOX_INTR;
46422 spin_lock(&spu->register_lock);
46423 @@ -330,31 +383,30 @@
46424 mask = spu_int_mask_get(spu, 2);
46425 /* ignore interrupts we're not waiting for */
46428 - * mailbox interrupts (0x1 and 0x10) are level triggered.
46429 - * mask them now before acknowledging.
46432 - spu_int_mask_and(spu, 2, ~(stat & 0x11));
46434 + /* mailbox interrupts are level triggered. mask them now before
46435 + * acknowledging */
46436 + if (stat & mailbox_intrs)
46437 + spu_int_mask_and(spu, 2, ~(stat & mailbox_intrs));
46438 /* acknowledge all interrupts before the callbacks */
46439 spu_int_stat_clear(spu, 2, stat);
46440 spin_unlock(&spu->register_lock);
46442 pr_debug("class 2 interrupt %d, %lx, %lx\n", irq, stat, mask);
46444 - if (stat & 1) /* PPC core mailbox */
46445 + if (stat & CLASS2_MAILBOX_INTR)
46446 spu->ibox_callback(spu);
46448 - if (stat & 2) /* SPU stop-and-signal */
46449 + if (stat & CLASS2_SPU_STOP_INTR)
46450 spu->stop_callback(spu);
46452 - if (stat & 4) /* SPU halted */
46453 + if (stat & CLASS2_SPU_HALT_INTR)
46454 spu->stop_callback(spu);
46456 - if (stat & 8) /* DMA tag group complete */
46457 + if (stat & CLASS2_SPU_DMA_TAG_GROUP_COMPLETE_INTR)
46458 spu->mfc_callback(spu);
46460 - if (stat & 0x10) /* SPU mailbox threshold */
46461 + if (stat & CLASS2_MAILBOX_THRESHOLD_INTR)
46462 spu->wbox_callback(spu);
46464 spu->stats.class2_intr++;
46465 @@ -479,13 +531,27 @@
46466 int spu_add_sysdev_attr_group(struct attribute_group *attrs)
46471 mutex_lock(&spu_full_list_mutex);
46472 - list_for_each_entry(spu, &spu_full_list, full_list)
46473 - sysfs_create_group(&spu->sysdev.kobj, attrs);
46474 + list_for_each_entry(spu, &spu_full_list, full_list) {
46475 + rc = sysfs_create_group(&spu->sysdev.kobj, attrs);
46477 + /* we're in trouble here, but try unwinding anyway */
46479 + printk(KERN_ERR "%s: can't create sysfs group '%s'\n",
46480 + __func__, attrs->name);
46482 + list_for_each_entry_continue_reverse(spu,
46483 + &spu_full_list, full_list)
46484 + sysfs_remove_group(&spu->sysdev.kobj, attrs);
46489 mutex_unlock(&spu_full_list_mutex);
46494 EXPORT_SYMBOL_GPL(spu_add_sysdev_attr_group);
46497 +++ b/arch/powerpc/platforms/cell/spu_fault.c
46500 + * SPU mm fault handler
46502 + * (C) Copyright IBM Deutschland Entwicklung GmbH 2007
46504 + * Author: Arnd Bergmann <arndb@de.ibm.com>
46505 + * Author: Jeremy Kerr <jk@ozlabs.org>
46507 + * This program is free software; you can redistribute it and/or modify
46508 + * it under the terms of the GNU General Public License as published by
46509 + * the Free Software Foundation; either version 2, or (at your option)
46510 + * any later version.
46512 + * This program is distributed in the hope that it will be useful,
46513 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46514 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46515 + * GNU General Public License for more details.
46517 + * You should have received a copy of the GNU General Public License
46518 + * along with this program; if not, write to the Free Software
46519 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
46521 +#include <linux/sched.h>
46522 +#include <linux/mm.h>
46523 +#include <linux/module.h>
46525 +#include <asm/spu.h>
46526 +#include <asm/spu_csa.h>
46529 + * This ought to be kept in sync with the powerpc specific do_page_fault
46530 + * function. Currently, there are a few corner cases that we haven't had
46531 + * to handle fortunately.
46533 +int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
46534 + unsigned long dsisr, unsigned *flt)
46536 + struct vm_area_struct *vma;
46537 + unsigned long is_write;
46541 + if (!IS_VALID_EA(ea)) {
46545 + if (mm == NULL) {
46548 + if (mm->pgd == NULL) {
46552 + down_read(&mm->mmap_sem);
46553 + vma = find_vma(mm, ea);
46556 + if (vma->vm_start <= ea)
46558 + if (!(vma->vm_flags & VM_GROWSDOWN))
46560 + if (expand_stack(vma, ea))
46563 + is_write = dsisr & MFC_DSISR_ACCESS_PUT;
46565 + if (!(vma->vm_flags & VM_WRITE))
46568 + if (dsisr & MFC_DSISR_ACCESS_DENIED)
46570 + if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
46574 + *flt = handle_mm_fault(mm, vma, ea, is_write);
46575 + if (unlikely(*flt & VM_FAULT_ERROR)) {
46576 + if (*flt & VM_FAULT_OOM) {
46579 + } else if (*flt & VM_FAULT_SIGBUS) {
46585 + if (*flt & VM_FAULT_MAJOR)
46586 + current->maj_flt++;
46588 + current->min_flt++;
46589 + up_read(&mm->mmap_sem);
46593 + up_read(&mm->mmap_sem);
46596 +EXPORT_SYMBOL_GPL(spu_handle_mm_fault);
46597 --- a/arch/powerpc/platforms/cell/spu_manage.c
46598 +++ b/arch/powerpc/platforms/cell/spu_manage.c
46600 #include <asm/firmware.h>
46601 #include <asm/prom.h>
46603 +#include "spufs/spufs.h"
46604 #include "interrupt.h"
46606 struct device_node *spu_devnode(struct spu *spu)
46607 @@ -345,7 +346,7 @@
46609 ret = spu_map_interrupts_old(spu, spe);
46611 - printk(KERN_ERR "%s: could not map interrupts",
46612 + printk(KERN_ERR "%s: could not map interrupts\n",
46616 @@ -369,6 +370,16 @@
46620 +static void enable_spu_by_master_run(struct spu_context *ctx)
46622 + ctx->ops->master_start(ctx);
46625 +static void disable_spu_by_master_run(struct spu_context *ctx)
46627 + ctx->ops->master_stop(ctx);
46630 /* Hardcoded affinity idxs for qs20 */
46631 #define QS20_SPES_PER_BE 8
46632 static int qs20_reg_idxs[QS20_SPES_PER_BE] = { 0, 2, 4, 6, 7, 5, 3, 1 };
46633 @@ -411,10 +422,15 @@
46635 static int of_has_vicinity(void)
46638 + struct device_node *dn;
46640 - spu = list_first_entry(&cbe_spu_info[0].spus, struct spu, cbe_list);
46641 - return of_find_property(spu_devnode(spu), "vicinity", NULL) != NULL;
46642 + for_each_node_by_type(dn, "spe") {
46643 + if (of_find_property(dn, "vicinity", NULL)) {
46651 static struct spu *devnode_spu(int cbe, struct device_node *dn)
46652 @@ -525,7 +541,7 @@
46653 if (of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))
46654 init_affinity_qs20_harcoded();
46656 - printk("No affinity configuration found");
46657 + printk("No affinity configuration found\n");
46661 @@ -535,5 +551,7 @@
46662 .enumerate_spus = of_enumerate_spus,
46663 .create_spu = of_create_spu,
46664 .destroy_spu = of_destroy_spu,
46665 + .enable_spu = enable_spu_by_master_run,
46666 + .disable_spu = disable_spu_by_master_run,
46667 .init_affinity = init_affinity,
46669 --- a/arch/powerpc/platforms/cell/spufs/Makefile
46670 +++ b/arch/powerpc/platforms/cell/spufs/Makefile
46672 -obj-y += switch.o fault.o lscsa_alloc.o
46674 obj-$(CONFIG_SPU_FS) += spufs.o
46675 spufs-y += inode.o file.o context.o syscalls.o coredump.o
46676 spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o
46677 +spufs-y += switch.o fault.o lscsa_alloc.o
46679 # Rules to build switch.o with the help of SPU tool chain
46681 --- a/arch/powerpc/platforms/cell/spufs/backing_ops.c
46682 +++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c
46683 @@ -106,16 +106,20 @@
46684 if (stat & 0xff0000)
46685 ret |= POLLIN | POLLRDNORM;
46687 - ctx->csa.priv1.int_stat_class0_RW &= ~0x1;
46688 - ctx->csa.priv1.int_mask_class2_RW |= 0x1;
46689 + ctx->csa.priv1.int_stat_class2_RW &=
46690 + ~CLASS2_MAILBOX_INTR;
46691 + ctx->csa.priv1.int_mask_class2_RW |=
46692 + CLASS2_ENABLE_MAILBOX_INTR;
46695 if (events & (POLLOUT | POLLWRNORM)) {
46696 if (stat & 0x00ff00)
46697 ret = POLLOUT | POLLWRNORM;
46699 - ctx->csa.priv1.int_stat_class0_RW &= ~0x10;
46700 - ctx->csa.priv1.int_mask_class2_RW |= 0x10;
46701 + ctx->csa.priv1.int_stat_class2_RW &=
46702 + ~CLASS2_MAILBOX_THRESHOLD_INTR;
46703 + ctx->csa.priv1.int_mask_class2_RW |=
46704 + CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR;
46707 spin_unlock_irq(&ctx->csa.register_lock);
46708 @@ -139,7 +143,7 @@
46711 /* make sure we get woken up by the interrupt */
46712 - ctx->csa.priv1.int_mask_class2_RW |= 0x1UL;
46713 + ctx->csa.priv1.int_mask_class2_RW |= CLASS2_ENABLE_MAILBOX_INTR;
46716 spin_unlock(&ctx->csa.register_lock);
46717 @@ -169,7 +173,8 @@
46719 /* make sure we get woken up by the interrupt when space
46720 becomes available */
46721 - ctx->csa.priv1.int_mask_class2_RW |= 0x10;
46722 + ctx->csa.priv1.int_mask_class2_RW |=
46723 + CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR;
46726 spin_unlock(&ctx->csa.register_lock);
46727 @@ -268,6 +273,11 @@
46728 return ctx->csa.lscsa->ls;
46731 +static void spu_backing_privcntl_write(struct spu_context *ctx, u64 val)
46733 + ctx->csa.priv2.spu_privcntl_RW = val;
46736 static u32 spu_backing_runcntl_read(struct spu_context *ctx)
46738 return ctx->csa.prob.spu_runcntl_RW;
46739 @@ -285,6 +295,11 @@
46740 spin_unlock(&ctx->csa.register_lock);
46743 +static void spu_backing_runcntl_stop(struct spu_context *ctx)
46745 + spu_backing_runcntl_write(ctx, SPU_RUNCNTL_STOP);
46748 static void spu_backing_master_start(struct spu_context *ctx)
46750 struct spu_state *csa = &ctx->csa;
46751 @@ -358,7 +373,7 @@
46753 static void spu_backing_restart_dma(struct spu_context *ctx)
46755 - /* nothing to do here */
46756 + ctx->csa.priv2.mfc_control_RW |= MFC_CNTL_RESTART_DMA_COMMAND;
46759 struct spu_context_ops spu_backing_ops = {
46760 @@ -379,8 +394,10 @@
46761 .npc_write = spu_backing_npc_write,
46762 .status_read = spu_backing_status_read,
46763 .get_ls = spu_backing_get_ls,
46764 + .privcntl_write = spu_backing_privcntl_write,
46765 .runcntl_read = spu_backing_runcntl_read,
46766 .runcntl_write = spu_backing_runcntl_write,
46767 + .runcntl_stop = spu_backing_runcntl_stop,
46768 .master_start = spu_backing_master_start,
46769 .master_stop = spu_backing_master_stop,
46770 .set_mfc_query = spu_backing_set_mfc_query,
46771 --- a/arch/powerpc/platforms/cell/spufs/context.c
46772 +++ b/arch/powerpc/platforms/cell/spufs/context.c
46774 init_waitqueue_head(&ctx->wbox_wq);
46775 init_waitqueue_head(&ctx->stop_wq);
46776 init_waitqueue_head(&ctx->mfc_wq);
46777 + init_waitqueue_head(&ctx->run_wq);
46778 ctx->state = SPU_STATE_SAVED;
46779 ctx->ops = &spu_backing_ops;
46780 ctx->owner = get_task_mm(current);
46781 @@ -105,7 +106,17 @@
46782 void spu_forget(struct spu_context *ctx)
46784 struct mm_struct *mm;
46785 - spu_acquire_saved(ctx);
46788 + * This is basically an open-coded spu_acquire_saved, except that
46789 + * we don't acquire the state mutex interruptible.
46791 + mutex_lock(&ctx->state_mutex);
46792 + if (ctx->state != SPU_STATE_SAVED) {
46793 + set_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags);
46794 + spu_deactivate(ctx);
46800 @@ -133,47 +144,23 @@
46804 - * spu_acquire_runnable - lock spu contex and make sure it is in runnable state
46805 + * spu_acquire_saved - lock spu contex and make sure it is in saved state
46806 * @ctx: spu contex to lock
46809 - * Returns 0 and with the context locked on success
46810 - * Returns negative error and with the context _unlocked_ on failure.
46812 -int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags)
46813 +int spu_acquire_saved(struct spu_context *ctx)
46815 - int ret = -EINVAL;
46818 - spu_acquire(ctx);
46819 - if (ctx->state == SPU_STATE_SAVED) {
46821 - * Context is about to be freed, so we can't acquire it anymore.
46825 - ret = spu_activate(ctx, flags);
46831 + ret = spu_acquire(ctx);
46836 - spu_release(ctx);
46841 - * spu_acquire_saved - lock spu contex and make sure it is in saved state
46842 - * @ctx: spu contex to lock
46844 -void spu_acquire_saved(struct spu_context *ctx)
46846 - spu_acquire(ctx);
46847 if (ctx->state != SPU_STATE_SAVED) {
46848 set_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags);
46849 spu_deactivate(ctx);
46856 --- a/arch/powerpc/platforms/cell/spufs/coredump.c
46857 +++ b/arch/powerpc/platforms/cell/spufs/coredump.c
46858 @@ -148,7 +148,9 @@
46861 while ((ctx = coredump_next_context(&fd)) != NULL) {
46862 - spu_acquire_saved(ctx);
46863 + rc = spu_acquire_saved(ctx);
46866 rc = spufs_ctx_note_size(ctx, fd);
46867 spu_release_saved(ctx);
46869 @@ -224,7 +226,9 @@
46872 while ((ctx = coredump_next_context(&fd)) != NULL) {
46873 - spu_acquire_saved(ctx);
46874 + rc = spu_acquire_saved(ctx);
46878 for (j = 0; spufs_coredump_read[j].name != NULL; j++) {
46879 rc = spufs_arch_write_note(ctx, j, file, fd, foffset);
46880 --- a/arch/powerpc/platforms/cell/spufs/fault.c
46881 +++ b/arch/powerpc/platforms/cell/spufs/fault.c
46882 @@ -28,117 +28,71 @@
46887 - * This ought to be kept in sync with the powerpc specific do_page_fault
46888 - * function. Currently, there are a few corner cases that we haven't had
46889 - * to handle fortunately.
46891 + * Handle an SPE event, depending on context SPU_CREATE_EVENTS_ENABLED flag.
46893 + * If the context was created with events, we just set the return event.
46894 + * Otherwise, send an appropriate signal to the process.
46896 -static int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
46897 - unsigned long dsisr, unsigned *flt)
46899 - struct vm_area_struct *vma;
46900 - unsigned long is_write;
46904 - if (!IS_VALID_EA(ea)) {
46908 - if (mm == NULL) {
46911 - if (mm->pgd == NULL) {
46915 - down_read(&mm->mmap_sem);
46916 - vma = find_vma(mm, ea);
46919 - if (vma->vm_start <= ea)
46921 - if (!(vma->vm_flags & VM_GROWSDOWN))
46923 - if (expand_stack(vma, ea))
46926 - is_write = dsisr & MFC_DSISR_ACCESS_PUT;
46928 - if (!(vma->vm_flags & VM_WRITE))
46931 - if (dsisr & MFC_DSISR_ACCESS_DENIED)
46933 - if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
46937 - *flt = handle_mm_fault(mm, vma, ea, is_write);
46938 - if (unlikely(*flt & VM_FAULT_ERROR)) {
46939 - if (*flt & VM_FAULT_OOM) {
46942 - } else if (*flt & VM_FAULT_SIGBUS) {
46948 - if (*flt & VM_FAULT_MAJOR)
46949 - current->maj_flt++;
46951 - current->min_flt++;
46952 - up_read(&mm->mmap_sem);
46956 - up_read(&mm->mmap_sem);
46960 -static void spufs_handle_dma_error(struct spu_context *ctx,
46961 +static void spufs_handle_event(struct spu_context *ctx,
46962 unsigned long ea, int type)
46966 if (ctx->flags & SPU_CREATE_EVENTS_ENABLED) {
46967 ctx->event_return |= type;
46968 wake_up_all(&ctx->stop_wq);
46971 - memset(&info, 0, sizeof(info));
46974 - case SPE_EVENT_INVALID_DMA:
46975 - info.si_signo = SIGBUS;
46976 - info.si_code = BUS_OBJERR;
46978 - case SPE_EVENT_SPE_DATA_STORAGE:
46979 - info.si_signo = SIGBUS;
46980 - info.si_addr = (void __user *)ea;
46981 - info.si_code = BUS_ADRERR;
46983 - case SPE_EVENT_DMA_ALIGNMENT:
46984 - info.si_signo = SIGBUS;
46985 - /* DAR isn't set for an alignment fault :( */
46986 - info.si_code = BUS_ADRALN;
46988 - case SPE_EVENT_SPE_ERROR:
46989 - info.si_signo = SIGILL;
46990 - info.si_addr = (void __user *)(unsigned long)
46991 - ctx->ops->npc_read(ctx) - 4;
46992 - info.si_code = ILL_ILLOPC;
46995 - if (info.si_signo)
46996 - force_sig_info(info.si_signo, &info, current);
47000 + memset(&info, 0, sizeof(info));
47003 + case SPE_EVENT_INVALID_DMA:
47004 + info.si_signo = SIGBUS;
47005 + info.si_code = BUS_OBJERR;
47007 + case SPE_EVENT_SPE_DATA_STORAGE:
47008 + info.si_signo = SIGSEGV;
47009 + info.si_addr = (void __user *)ea;
47010 + info.si_code = SEGV_ACCERR;
47011 + ctx->ops->restart_dma(ctx);
47013 + case SPE_EVENT_DMA_ALIGNMENT:
47014 + info.si_signo = SIGBUS;
47015 + /* DAR isn't set for an alignment fault :( */
47016 + info.si_code = BUS_ADRALN;
47018 + case SPE_EVENT_SPE_ERROR:
47019 + info.si_signo = SIGILL;
47020 + info.si_addr = (void __user *)(unsigned long)
47021 + ctx->ops->npc_read(ctx) - 4;
47022 + info.si_code = ILL_ILLOPC;
47026 + if (info.si_signo)
47027 + force_sig_info(info.si_signo, &info, current);
47030 -void spufs_dma_callback(struct spu *spu, int type)
47031 +int spufs_handle_class0(struct spu_context *ctx)
47033 - spufs_handle_dma_error(spu->ctx, spu->dar, type);
47034 + unsigned long stat = ctx->csa.class_0_pending & CLASS0_INTR_MASK;
47036 + if (likely(!stat))
47039 + if (stat & CLASS0_DMA_ALIGNMENT_INTR)
47040 + spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_DMA_ALIGNMENT);
47042 + if (stat & CLASS0_INVALID_DMA_COMMAND_INTR)
47043 + spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_INVALID_DMA);
47045 + if (stat & CLASS0_SPU_ERROR_INTR)
47046 + spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_SPE_ERROR);
47050 -EXPORT_SYMBOL_GPL(spufs_dma_callback);
47053 * bottom half handler for page faults, we can't do this from
47054 @@ -154,7 +108,7 @@
47055 u64 ea, dsisr, access;
47056 unsigned long flags;
47062 * dar and dsisr get passed from the registers
47063 @@ -165,16 +119,8 @@
47064 * in time, we can still expect to get the same fault
47065 * the immediately after the context restore.
47067 - if (ctx->state == SPU_STATE_RUNNABLE) {
47068 - ea = ctx->spu->dar;
47069 - dsisr = ctx->spu->dsisr;
47070 - ctx->spu->dar= ctx->spu->dsisr = 0;
47072 - ea = ctx->csa.priv1.mfc_dar_RW;
47073 - dsisr = ctx->csa.priv1.mfc_dsisr_RW;
47074 - ctx->csa.priv1.mfc_dar_RW = 0;
47075 - ctx->csa.priv1.mfc_dsisr_RW = 0;
47077 + ea = ctx->csa.dar;
47078 + dsisr = ctx->csa.dsisr;
47080 if (!(dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED)))
47082 @@ -201,7 +147,22 @@
47084 ret = spu_handle_mm_fault(current->mm, ea, dsisr, &flt);
47086 - spu_acquire(ctx);
47088 + * If spu_acquire fails due to a pending signal we just want to return
47089 + * EINTR to userspace even if that means missing the dma restart or
47090 + * updating the page fault statistics.
47092 + ret2 = spu_acquire(ctx);
47097 + * Clear dsisr under ctxt lock after handling the fault, so that
47098 + * time slicing will not preempt the context while the page fault
47099 + * handler is running. Context switch code removes mappings.
47101 + ctx->csa.dar = ctx->csa.dsisr = 0;
47104 * If we handled the fault successfully and are in runnable
47105 * state, restart the DMA.
47106 @@ -222,9 +183,9 @@
47108 ctx->ops->restart_dma(ctx);
47110 - spufs_handle_dma_error(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE);
47111 + spufs_handle_event(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE);
47114 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
47117 -EXPORT_SYMBOL_GPL(spufs_handle_class1);
47118 --- a/arch/powerpc/platforms/cell/spufs/file.c
47119 +++ b/arch/powerpc/platforms/cell/spufs/file.c
47120 @@ -40,6 +40,120 @@
47122 #define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000)
47124 +/* Simple attribute files */
47125 +struct spufs_attr {
47126 + int (*get)(void *, u64 *);
47127 + int (*set)(void *, u64);
47128 + char get_buf[24]; /* enough to store a u64 and "\n\0" */
47129 + char set_buf[24];
47131 + const char *fmt; /* format for read operation */
47132 + struct mutex mutex; /* protects access to these buffers */
47135 +static int spufs_attr_open(struct inode *inode, struct file *file,
47136 + int (*get)(void *, u64 *), int (*set)(void *, u64),
47139 + struct spufs_attr *attr;
47141 + attr = kmalloc(sizeof(*attr), GFP_KERNEL);
47147 + attr->data = inode->i_private;
47149 + mutex_init(&attr->mutex);
47150 + file->private_data = attr;
47152 + return nonseekable_open(inode, file);
47155 +static int spufs_attr_release(struct inode *inode, struct file *file)
47157 + kfree(file->private_data);
47161 +static ssize_t spufs_attr_read(struct file *file, char __user *buf,
47162 + size_t len, loff_t *ppos)
47164 + struct spufs_attr *attr;
47168 + attr = file->private_data;
47172 + ret = mutex_lock_interruptible(&attr->mutex);
47176 + if (*ppos) { /* continued read */
47177 + size = strlen(attr->get_buf);
47178 + } else { /* first read */
47180 + ret = attr->get(attr->data, &val);
47184 + size = scnprintf(attr->get_buf, sizeof(attr->get_buf),
47185 + attr->fmt, (unsigned long long)val);
47188 + ret = simple_read_from_buffer(buf, len, ppos, attr->get_buf, size);
47190 + mutex_unlock(&attr->mutex);
47194 +static ssize_t spufs_attr_write(struct file *file, const char __user *buf,
47195 + size_t len, loff_t *ppos)
47197 + struct spufs_attr *attr;
47202 + attr = file->private_data;
47206 + ret = mutex_lock_interruptible(&attr->mutex);
47211 + size = min(sizeof(attr->set_buf) - 1, len);
47212 + if (copy_from_user(attr->set_buf, buf, size))
47215 + ret = len; /* claim we got the whole input */
47216 + attr->set_buf[size] = '\0';
47217 + val = simple_strtol(attr->set_buf, NULL, 0);
47218 + attr->set(attr->data, val);
47220 + mutex_unlock(&attr->mutex);
47224 +#define DEFINE_SPUFS_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \
47225 +static int __fops ## _open(struct inode *inode, struct file *file) \
47227 + __simple_attr_check_format(__fmt, 0ull); \
47228 + return spufs_attr_open(inode, file, __get, __set, __fmt); \
47230 +static struct file_operations __fops = { \
47231 + .owner = THIS_MODULE, \
47232 + .open = __fops ## _open, \
47233 + .release = spufs_attr_release, \
47234 + .read = spufs_attr_read, \
47235 + .write = spufs_attr_write, \
47240 spufs_mem_open(struct inode *inode, struct file *file)
47241 @@ -84,9 +198,12 @@
47242 struct spu_context *ctx = file->private_data;
47245 - spu_acquire(ctx);
47246 + ret = spu_acquire(ctx);
47249 ret = __spufs_mem_read(ctx, buffer, size, pos);
47255 @@ -106,7 +223,10 @@
47256 if (size > LS_SIZE - pos)
47257 size = LS_SIZE - pos;
47259 - spu_acquire(ctx);
47260 + ret = spu_acquire(ctx);
47264 local_store = ctx->ops->get_ls(ctx);
47265 ret = copy_from_user(local_store + pos, buffer, size);
47267 @@ -146,7 +266,8 @@
47268 pr_debug("spufs_mem_mmap_nopfn address=0x%lx -> 0x%lx, offset=0x%lx\n",
47269 addr0, address, offset);
47271 - spu_acquire(ctx);
47272 + if (spu_acquire(ctx))
47273 + return NOPFN_REFAULT;
47275 if (ctx->state == SPU_STATE_SAVED) {
47276 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
47277 @@ -236,23 +357,32 @@
47279 struct spu_context *ctx = vma->vm_file->private_data;
47280 unsigned long area, offset = address - vma->vm_start;
47283 offset += vma->vm_pgoff << PAGE_SHIFT;
47284 if (offset >= ps_size)
47285 return NOPFN_SIGBUS;
47287 - /* error here usually means a signal.. we might want to test
47288 - * the error code more precisely though
47290 + * We have to wait for context to be loaded before we have
47291 + * pages to hand out to the user, but we don't want to wait
47292 + * with the mmap_sem held.
47293 + * It is possible to drop the mmap_sem here, but then we need
47294 + * to return NOPFN_REFAULT because the mappings may have
47297 - ret = spu_acquire_runnable(ctx, 0);
47299 + if (spu_acquire(ctx))
47300 return NOPFN_REFAULT;
47302 - area = ctx->spu->problem_phys + ps_offs;
47303 - vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT);
47304 - spu_release(ctx);
47305 + if (ctx->state == SPU_STATE_SAVED) {
47306 + up_read(¤t->mm->mmap_sem);
47307 + spufs_wait(ctx->run_wq, ctx->state == SPU_STATE_RUNNABLE);
47308 + down_read(¤t->mm->mmap_sem);
47310 + area = ctx->spu->problem_phys + ps_offs;
47311 + vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT);
47314 + spu_release(ctx);
47315 return NOPFN_REFAULT;
47318 @@ -286,25 +416,32 @@
47319 #define spufs_cntl_mmap NULL
47320 #endif /* !SPUFS_MMAP_4K */
47322 -static u64 spufs_cntl_get(void *data)
47323 +static int spufs_cntl_get(void *data, u64 *val)
47325 struct spu_context *ctx = data;
47329 - spu_acquire(ctx);
47330 - val = ctx->ops->status_read(ctx);
47331 + ret = spu_acquire(ctx);
47334 + *val = ctx->ops->status_read(ctx);
47341 -static void spufs_cntl_set(void *data, u64 val)
47342 +static int spufs_cntl_set(void *data, u64 val)
47344 struct spu_context *ctx = data;
47347 - spu_acquire(ctx);
47348 + ret = spu_acquire(ctx);
47351 ctx->ops->runcntl_write(ctx, val);
47357 static int spufs_cntl_open(struct inode *inode, struct file *file)
47358 @@ -317,7 +454,7 @@
47359 if (!i->i_openers++)
47360 ctx->cntl = inode->i_mapping;
47361 mutex_unlock(&ctx->mapping_lock);
47362 - return simple_attr_open(inode, file, spufs_cntl_get,
47363 + return spufs_attr_open(inode, file, spufs_cntl_get,
47364 spufs_cntl_set, "0x%08lx");
47367 @@ -327,7 +464,7 @@
47368 struct spufs_inode_info *i = SPUFS_I(inode);
47369 struct spu_context *ctx = i->i_ctx;
47371 - simple_attr_close(inode, file);
47372 + spufs_attr_release(inode, file);
47374 mutex_lock(&ctx->mapping_lock);
47375 if (!--i->i_openers)
47376 @@ -339,8 +476,8 @@
47377 static const struct file_operations spufs_cntl_fops = {
47378 .open = spufs_cntl_open,
47379 .release = spufs_cntl_release,
47380 - .read = simple_attr_read,
47381 - .write = simple_attr_write,
47382 + .read = spufs_attr_read,
47383 + .write = spufs_attr_write,
47384 .mmap = spufs_cntl_mmap,
47387 @@ -368,7 +505,9 @@
47389 struct spu_context *ctx = file->private_data;
47391 - spu_acquire_saved(ctx);
47392 + ret = spu_acquire_saved(ctx);
47395 ret = __spufs_regs_read(ctx, buffer, size, pos);
47396 spu_release_saved(ctx);
47398 @@ -387,7 +526,9 @@
47402 - spu_acquire_saved(ctx);
47403 + ret = spu_acquire_saved(ctx);
47407 ret = copy_from_user(lscsa->gprs + *pos - size,
47408 buffer, size) ? -EFAULT : size;
47409 @@ -419,7 +560,9 @@
47411 struct spu_context *ctx = file->private_data;
47413 - spu_acquire_saved(ctx);
47414 + ret = spu_acquire_saved(ctx);
47417 ret = __spufs_fpcr_read(ctx, buffer, size, pos);
47418 spu_release_saved(ctx);
47420 @@ -436,10 +579,12 @@
47421 size = min_t(ssize_t, sizeof(lscsa->fpcr) - *pos, size);
47426 - spu_acquire_saved(ctx);
47427 + ret = spu_acquire_saved(ctx);
47432 ret = copy_from_user((char *)&lscsa->fpcr + *pos - size,
47433 buffer, size) ? -EFAULT : size;
47435 @@ -486,7 +631,10 @@
47437 udata = (void __user *)buf;
47439 - spu_acquire(ctx);
47440 + count = spu_acquire(ctx);
47444 for (count = 0; (count + 4) <= len; count += 4, udata++) {
47446 ret = ctx->ops->mbox_read(ctx, &mbox_data);
47447 @@ -522,12 +670,15 @@
47448 size_t len, loff_t *pos)
47450 struct spu_context *ctx = file->private_data;
47457 - spu_acquire(ctx);
47458 + ret = spu_acquire(ctx);
47462 mbox_stat = ctx->ops->mbox_stat_read(ctx) & 0xff;
47464 @@ -562,6 +713,9 @@
47466 struct spu_context *ctx = spu->ctx;
47471 wake_up_all(&ctx->ibox_wq);
47472 kill_fasync(&ctx->ibox_fasync, SIGIO, POLLIN);
47474 @@ -593,7 +747,9 @@
47476 udata = (void __user *)buf;
47478 - spu_acquire(ctx);
47479 + count = spu_acquire(ctx);
47483 /* wait only for the first element */
47485 @@ -639,7 +795,11 @@
47487 poll_wait(file, &ctx->ibox_wq, wait);
47489 - spu_acquire(ctx);
47491 + * For now keep this uninterruptible and also ignore the rule
47492 + * that poll should not sleep. Will be fixed later.
47494 + mutex_lock(&ctx->state_mutex);
47495 mask = ctx->ops->mbox_stat_poll(ctx, POLLIN | POLLRDNORM);
47498 @@ -657,12 +817,15 @@
47499 size_t len, loff_t *pos)
47501 struct spu_context *ctx = file->private_data;
47508 - spu_acquire(ctx);
47509 + ret = spu_acquire(ctx);
47512 ibox_stat = (ctx->ops->mbox_stat_read(ctx) >> 16) & 0xff;
47515 @@ -698,6 +861,9 @@
47517 struct spu_context *ctx = spu->ctx;
47522 wake_up_all(&ctx->wbox_wq);
47523 kill_fasync(&ctx->wbox_fasync, SIGIO, POLLOUT);
47525 @@ -731,7 +897,9 @@
47526 if (__get_user(wbox_data, udata))
47529 - spu_acquire(ctx);
47530 + count = spu_acquire(ctx);
47535 * make sure we can at least write one element, by waiting
47536 @@ -772,7 +940,11 @@
47538 poll_wait(file, &ctx->wbox_wq, wait);
47540 - spu_acquire(ctx);
47542 + * For now keep this uninterruptible and also ignore the rule
47543 + * that poll should not sleep. Will be fixed later.
47545 + mutex_lock(&ctx->state_mutex);
47546 mask = ctx->ops->mbox_stat_poll(ctx, POLLOUT | POLLWRNORM);
47549 @@ -790,12 +962,15 @@
47550 size_t len, loff_t *pos)
47552 struct spu_context *ctx = file->private_data;
47559 - spu_acquire(ctx);
47560 + ret = spu_acquire(ctx);
47563 wbox_stat = (ctx->ops->mbox_stat_read(ctx) >> 8) & 0xff;
47566 @@ -866,7 +1041,9 @@
47568 struct spu_context *ctx = file->private_data;
47570 - spu_acquire_saved(ctx);
47571 + ret = spu_acquire_saved(ctx);
47574 ret = __spufs_signal1_read(ctx, buf, len, pos);
47575 spu_release_saved(ctx);
47577 @@ -877,6 +1054,7 @@
47578 size_t len, loff_t *pos)
47580 struct spu_context *ctx;
47584 ctx = file->private_data;
47585 @@ -887,7 +1065,9 @@
47586 if (copy_from_user(&data, buf, 4))
47589 - spu_acquire(ctx);
47590 + ret = spu_acquire(ctx);
47593 ctx->ops->signal1_write(ctx, data);
47596 @@ -997,7 +1177,9 @@
47597 struct spu_context *ctx = file->private_data;
47600 - spu_acquire_saved(ctx);
47601 + ret = spu_acquire_saved(ctx);
47604 ret = __spufs_signal2_read(ctx, buf, len, pos);
47605 spu_release_saved(ctx);
47607 @@ -1008,6 +1190,7 @@
47608 size_t len, loff_t *pos)
47610 struct spu_context *ctx;
47614 ctx = file->private_data;
47615 @@ -1018,7 +1201,9 @@
47616 if (copy_from_user(&data, buf, 4))
47619 - spu_acquire(ctx);
47620 + ret = spu_acquire(ctx);
47623 ctx->ops->signal2_write(ctx, data);
47626 @@ -1086,33 +1271,42 @@
47627 #define SPU_ATTR_ACQUIRE_SAVED 2
47629 #define DEFINE_SPUFS_ATTRIBUTE(__name, __get, __set, __fmt, __acquire) \
47630 -static u64 __##__get(void *data) \
47631 +static int __##__get(void *data, u64 *val) \
47633 struct spu_context *ctx = data; \
47637 if (__acquire == SPU_ATTR_ACQUIRE) { \
47638 - spu_acquire(ctx); \
47639 - ret = __get(ctx); \
47640 + ret = spu_acquire(ctx); \
47643 + *val = __get(ctx); \
47644 spu_release(ctx); \
47645 } else if (__acquire == SPU_ATTR_ACQUIRE_SAVED) { \
47646 - spu_acquire_saved(ctx); \
47647 - ret = __get(ctx); \
47648 + ret = spu_acquire_saved(ctx); \
47651 + *val = __get(ctx); \
47652 spu_release_saved(ctx); \
47654 - ret = __get(ctx); \
47655 + *val = __get(ctx); \
47660 -DEFINE_SIMPLE_ATTRIBUTE(__name, __##__get, __set, __fmt);
47661 +DEFINE_SPUFS_SIMPLE_ATTRIBUTE(__name, __##__get, __set, __fmt);
47663 -static void spufs_signal1_type_set(void *data, u64 val)
47664 +static int spufs_signal1_type_set(void *data, u64 val)
47666 struct spu_context *ctx = data;
47669 - spu_acquire(ctx);
47670 + ret = spu_acquire(ctx);
47673 ctx->ops->signal1_type_set(ctx, val);
47679 static u64 spufs_signal1_type_get(struct spu_context *ctx)
47680 @@ -1123,13 +1317,18 @@
47681 spufs_signal1_type_set, "%llu", SPU_ATTR_ACQUIRE);
47684 -static void spufs_signal2_type_set(void *data, u64 val)
47685 +static int spufs_signal2_type_set(void *data, u64 val)
47687 struct spu_context *ctx = data;
47690 - spu_acquire(ctx);
47691 + ret = spu_acquire(ctx);
47694 ctx->ops->signal2_type_set(ctx, val);
47700 static u64 spufs_signal2_type_get(struct spu_context *ctx)
47701 @@ -1329,6 +1528,9 @@
47703 struct spu_context *ctx = spu->ctx;
47708 wake_up_all(&ctx->mfc_wq);
47710 pr_debug("%s %s\n", __FUNCTION__, spu->name);
47711 @@ -1375,12 +1577,17 @@
47715 - spu_acquire(ctx);
47716 + ret = spu_acquire(ctx);
47721 if (file->f_flags & O_NONBLOCK) {
47722 status = ctx->ops->read_mfc_tagstatus(ctx);
47723 if (!(status & ctx->tagwait))
47726 + /* XXX(hch): shouldn't we clear ret here? */
47727 ctx->tagwait &= ~status;
47729 ret = spufs_wait(ctx->mfc_wq,
47730 @@ -1505,7 +1712,11 @@
47734 - ret = spu_acquire_runnable(ctx, 0);
47735 + ret = spu_acquire(ctx);
47739 + ret = spufs_wait(ctx->run_wq, ctx->state == SPU_STATE_RUNNABLE);
47743 @@ -1539,7 +1750,11 @@
47745 poll_wait(file, &ctx->mfc_wq, wait);
47747 - spu_acquire(ctx);
47749 + * For now keep this uninterruptible and also ignore the rule
47750 + * that poll should not sleep. Will be fixed later.
47752 + mutex_lock(&ctx->state_mutex);
47753 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2);
47754 free_elements = ctx->ops->get_mfc_free_elements(ctx);
47755 tagstatus = ctx->ops->read_mfc_tagstatus(ctx);
47756 @@ -1562,7 +1777,9 @@
47757 struct spu_context *ctx = file->private_data;
47760 - spu_acquire(ctx);
47761 + ret = spu_acquire(ctx);
47765 /* this currently hangs */
47766 ret = spufs_wait(ctx->mfc_wq,
47767 @@ -1605,12 +1822,18 @@
47768 .mmap = spufs_mfc_mmap,
47771 -static void spufs_npc_set(void *data, u64 val)
47772 +static int spufs_npc_set(void *data, u64 val)
47774 struct spu_context *ctx = data;
47775 - spu_acquire(ctx);
47778 + ret = spu_acquire(ctx);
47781 ctx->ops->npc_write(ctx, val);
47787 static u64 spufs_npc_get(struct spu_context *ctx)
47788 @@ -1620,13 +1843,19 @@
47789 DEFINE_SPUFS_ATTRIBUTE(spufs_npc_ops, spufs_npc_get, spufs_npc_set,
47790 "0x%llx\n", SPU_ATTR_ACQUIRE);
47792 -static void spufs_decr_set(void *data, u64 val)
47793 +static int spufs_decr_set(void *data, u64 val)
47795 struct spu_context *ctx = data;
47796 struct spu_lscsa *lscsa = ctx->csa.lscsa;
47797 - spu_acquire_saved(ctx);
47800 + ret = spu_acquire_saved(ctx);
47803 lscsa->decr.slot[0] = (u32) val;
47804 spu_release_saved(ctx);
47809 static u64 spufs_decr_get(struct spu_context *ctx)
47810 @@ -1637,15 +1866,21 @@
47811 DEFINE_SPUFS_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set,
47812 "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED);
47814 -static void spufs_decr_status_set(void *data, u64 val)
47815 +static int spufs_decr_status_set(void *data, u64 val)
47817 struct spu_context *ctx = data;
47818 - spu_acquire_saved(ctx);
47821 + ret = spu_acquire_saved(ctx);
47825 ctx->csa.priv2.mfc_control_RW |= MFC_CNTL_DECREMENTER_RUNNING;
47827 ctx->csa.priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING;
47828 spu_release_saved(ctx);
47833 static u64 spufs_decr_status_get(struct spu_context *ctx)
47834 @@ -1659,13 +1894,19 @@
47835 spufs_decr_status_set, "0x%llx\n",
47836 SPU_ATTR_ACQUIRE_SAVED);
47838 -static void spufs_event_mask_set(void *data, u64 val)
47839 +static int spufs_event_mask_set(void *data, u64 val)
47841 struct spu_context *ctx = data;
47842 struct spu_lscsa *lscsa = ctx->csa.lscsa;
47843 - spu_acquire_saved(ctx);
47846 + ret = spu_acquire_saved(ctx);
47849 lscsa->event_mask.slot[0] = (u32) val;
47850 spu_release_saved(ctx);
47855 static u64 spufs_event_mask_get(struct spu_context *ctx)
47856 @@ -1690,13 +1931,19 @@
47857 DEFINE_SPUFS_ATTRIBUTE(spufs_event_status_ops, spufs_event_status_get,
47858 NULL, "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED)
47860 -static void spufs_srr0_set(void *data, u64 val)
47861 +static int spufs_srr0_set(void *data, u64 val)
47863 struct spu_context *ctx = data;
47864 struct spu_lscsa *lscsa = ctx->csa.lscsa;
47865 - spu_acquire_saved(ctx);
47868 + ret = spu_acquire_saved(ctx);
47871 lscsa->srr0.slot[0] = (u32) val;
47872 spu_release_saved(ctx);
47877 static u64 spufs_srr0_get(struct spu_context *ctx)
47878 @@ -1727,10 +1974,12 @@
47879 return ctx->object_id;
47882 -static void spufs_object_id_set(void *data, u64 id)
47883 +static int spufs_object_id_set(void *data, u64 id)
47885 struct spu_context *ctx = data;
47886 ctx->object_id = id;
47891 DEFINE_SPUFS_ATTRIBUTE(spufs_object_id_ops, spufs_object_id_get,
47892 @@ -1777,13 +2026,13 @@
47893 static ssize_t __spufs_mbox_info_read(struct spu_context *ctx,
47894 char __user *buf, size_t len, loff_t *pos)
47899 - mbox_stat = ctx->csa.prob.mb_stat_R;
47900 - if (mbox_stat & 0x0000ff) {
47901 - data = ctx->csa.prob.pu_mb_R;
47903 + /* EOF if there's no entry in the mbox */
47904 + if (!(ctx->csa.prob.mb_stat_R & 0x0000ff))
47907 + data = ctx->csa.prob.pu_mb_R;
47909 return simple_read_from_buffer(buf, len, pos, &data, sizeof data);
47911 @@ -1797,7 +2046,9 @@
47912 if (!access_ok(VERIFY_WRITE, buf, len))
47915 - spu_acquire_saved(ctx);
47916 + ret = spu_acquire_saved(ctx);
47919 spin_lock(&ctx->csa.register_lock);
47920 ret = __spufs_mbox_info_read(ctx, buf, len, pos);
47921 spin_unlock(&ctx->csa.register_lock);
47922 @@ -1815,13 +2066,13 @@
47923 static ssize_t __spufs_ibox_info_read(struct spu_context *ctx,
47924 char __user *buf, size_t len, loff_t *pos)
47929 - ibox_stat = ctx->csa.prob.mb_stat_R;
47930 - if (ibox_stat & 0xff0000) {
47931 - data = ctx->csa.priv2.puint_mb_R;
47933 + /* EOF if there's no entry in the ibox */
47934 + if (!(ctx->csa.prob.mb_stat_R & 0xff0000))
47937 + data = ctx->csa.priv2.puint_mb_R;
47939 return simple_read_from_buffer(buf, len, pos, &data, sizeof data);
47941 @@ -1835,7 +2086,9 @@
47942 if (!access_ok(VERIFY_WRITE, buf, len))
47945 - spu_acquire_saved(ctx);
47946 + ret = spu_acquire_saved(ctx);
47949 spin_lock(&ctx->csa.register_lock);
47950 ret = __spufs_ibox_info_read(ctx, buf, len, pos);
47951 spin_unlock(&ctx->csa.register_lock);
47952 @@ -1876,7 +2129,9 @@
47953 if (!access_ok(VERIFY_WRITE, buf, len))
47956 - spu_acquire_saved(ctx);
47957 + ret = spu_acquire_saved(ctx);
47960 spin_lock(&ctx->csa.register_lock);
47961 ret = __spufs_wbox_info_read(ctx, buf, len, pos);
47962 spin_unlock(&ctx->csa.register_lock);
47963 @@ -1926,7 +2181,9 @@
47964 if (!access_ok(VERIFY_WRITE, buf, len))
47967 - spu_acquire_saved(ctx);
47968 + ret = spu_acquire_saved(ctx);
47971 spin_lock(&ctx->csa.register_lock);
47972 ret = __spufs_dma_info_read(ctx, buf, len, pos);
47973 spin_unlock(&ctx->csa.register_lock);
47974 @@ -1977,7 +2234,9 @@
47975 struct spu_context *ctx = file->private_data;
47978 - spu_acquire_saved(ctx);
47979 + ret = spu_acquire_saved(ctx);
47982 spin_lock(&ctx->csa.register_lock);
47983 ret = __spufs_proxydma_info_read(ctx, buf, len, pos);
47984 spin_unlock(&ctx->csa.register_lock);
47985 @@ -2066,8 +2325,12 @@
47986 static int spufs_show_stat(struct seq_file *s, void *private)
47988 struct spu_context *ctx = s->private;
47991 + ret = spu_acquire(ctx);
47995 - spu_acquire(ctx);
47996 seq_printf(s, "%s %llu %llu %llu %llu "
47997 "%llu %llu %llu %llu %llu %llu %llu %llu\n",
47998 ctx_state_names[ctx->stats.util_state],
47999 --- a/arch/powerpc/platforms/cell/spufs/hw_ops.c
48000 +++ b/arch/powerpc/platforms/cell/spufs/hw_ops.c
48001 @@ -76,16 +76,18 @@
48002 if (stat & 0xff0000)
48003 ret |= POLLIN | POLLRDNORM;
48005 - spu_int_stat_clear(spu, 2, 0x1);
48006 - spu_int_mask_or(spu, 2, 0x1);
48007 + spu_int_stat_clear(spu, 2, CLASS2_MAILBOX_INTR);
48008 + spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_INTR);
48011 if (events & (POLLOUT | POLLWRNORM)) {
48012 if (stat & 0x00ff00)
48013 ret = POLLOUT | POLLWRNORM;
48015 - spu_int_stat_clear(spu, 2, 0x10);
48016 - spu_int_mask_or(spu, 2, 0x10);
48017 + spu_int_stat_clear(spu, 2,
48018 + CLASS2_MAILBOX_THRESHOLD_INTR);
48019 + spu_int_mask_or(spu, 2,
48020 + CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR);
48023 spin_unlock_irq(&spu->register_lock);
48024 @@ -106,7 +108,7 @@
48027 /* make sure we get woken up by the interrupt */
48028 - spu_int_mask_or(spu, 2, 0x1);
48029 + spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_INTR);
48032 spin_unlock_irq(&spu->register_lock);
48033 @@ -127,7 +129,7 @@
48035 /* make sure we get woken up by the interrupt when space
48036 becomes available */
48037 - spu_int_mask_or(spu, 2, 0x10);
48038 + spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR);
48041 spin_unlock_irq(&spu->register_lock);
48042 @@ -206,6 +208,11 @@
48043 return ctx->spu->local_store;
48046 +static void spu_hw_privcntl_write(struct spu_context *ctx, u64 val)
48048 + out_be64(&ctx->spu->priv2->spu_privcntl_RW, val);
48051 static u32 spu_hw_runcntl_read(struct spu_context *ctx)
48053 return in_be32(&ctx->spu->problem->spu_runcntl_RW);
48054 @@ -215,11 +222,21 @@
48056 spin_lock_irq(&ctx->spu->register_lock);
48057 if (val & SPU_RUNCNTL_ISOLATE)
48058 - out_be64(&ctx->spu->priv2->spu_privcntl_RW, 4LL);
48059 + spu_hw_privcntl_write(ctx,
48060 + SPU_PRIVCNT_LOAD_REQUEST_ENABLE_MASK);
48061 out_be32(&ctx->spu->problem->spu_runcntl_RW, val);
48062 spin_unlock_irq(&ctx->spu->register_lock);
48065 +static void spu_hw_runcntl_stop(struct spu_context *ctx)
48067 + spin_lock_irq(&ctx->spu->register_lock);
48068 + out_be32(&ctx->spu->problem->spu_runcntl_RW, SPU_RUNCNTL_STOP);
48069 + while (in_be32(&ctx->spu->problem->spu_status_R) & SPU_STATUS_RUNNING)
48071 + spin_unlock_irq(&ctx->spu->register_lock);
48074 static void spu_hw_master_start(struct spu_context *ctx)
48076 struct spu *spu = ctx->spu;
48077 @@ -319,8 +336,10 @@
48078 .npc_write = spu_hw_npc_write,
48079 .status_read = spu_hw_status_read,
48080 .get_ls = spu_hw_get_ls,
48081 + .privcntl_write = spu_hw_privcntl_write,
48082 .runcntl_read = spu_hw_runcntl_read,
48083 .runcntl_write = spu_hw_runcntl_write,
48084 + .runcntl_stop = spu_hw_runcntl_stop,
48085 .master_start = spu_hw_master_start,
48086 .master_stop = spu_hw_master_stop,
48087 .set_mfc_query = spu_hw_set_mfc_query,
48088 --- a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
48089 +++ b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
48091 #include <asm/spu_csa.h>
48092 #include <asm/mmu.h>
48094 +#include "spufs.h"
48096 static int spu_alloc_lscsa_std(struct spu_state *csa)
48098 struct spu_lscsa *lscsa;
48102 /* Check availability of 64K pages */
48103 - if (mmu_psize_defs[MMU_PAGE_64K].shift == 0)
48104 + if (!spu_64k_pages_available())
48107 csa->use_big_pages = 1;
48108 --- a/arch/powerpc/platforms/cell/spufs/run.c
48109 +++ b/arch/powerpc/platforms/cell/spufs/run.c
48110 @@ -15,24 +15,55 @@
48112 struct spu_context *ctx = spu->ctx;
48114 - wake_up_all(&ctx->stop_wq);
48116 + * It should be impossible to preempt a context while an exception
48117 + * is being processed, since the context switch code is specially
48118 + * coded to deal with interrupts ... But, just in case, sanity check
48119 + * the context pointer. It is OK to return doing nothing since
48120 + * the exception will be regenerated when the context is resumed.
48123 + /* Copy exception arguments into module specific structure */
48124 + ctx->csa.class_0_pending = spu->class_0_pending;
48125 + ctx->csa.dsisr = spu->dsisr;
48126 + ctx->csa.dar = spu->dar;
48128 + /* ensure that the exception status has hit memory before a
48129 + * thread waiting on the context's stop queue is woken */
48132 + wake_up_all(&ctx->stop_wq);
48135 + /* Clear callback arguments from spu structure */
48136 + spu->class_0_pending = 0;
48141 -static inline int spu_stopped(struct spu_context *ctx, u32 *stat)
48142 +int spu_stopped(struct spu_context *ctx, u32 *stat)
48149 *stat = ctx->ops->status_read(ctx);
48152 - if (ctx->state != SPU_STATE_RUNNABLE ||
48153 - test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
48154 + if (test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
48157 + stopped = SPU_STATUS_INVALID_INSTR | SPU_STATUS_SINGLE_STEP |
48158 + SPU_STATUS_STOPPED_BY_HALT | SPU_STATUS_STOPPED_BY_STOP;
48159 + if (*stat & stopped)
48162 + dsisr = ctx->csa.dsisr;
48163 + if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))
48165 - pte_fault = spu->dsisr &
48166 - (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED);
48167 - return (!(*stat & SPU_STATUS_RUNNING) || pte_fault || spu->class_0_pending) ?
48170 + if (ctx->csa.class_0_pending)
48176 static int spu_setup_isolated(struct spu_context *ctx)
48177 @@ -128,34 +159,66 @@
48179 static int spu_run_init(struct spu_context *ctx, u32 *npc)
48181 + unsigned long runcntl = SPU_RUNCNTL_RUNNABLE;
48184 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
48186 - if (ctx->flags & SPU_CREATE_ISOLATE) {
48187 - unsigned long runcntl;
48189 + * NOSCHED is synchronous scheduling with respect to the caller.
48190 + * The caller waits for the context to be loaded.
48192 + if (ctx->flags & SPU_CREATE_NOSCHED) {
48193 + if (ctx->state == SPU_STATE_SAVED) {
48194 + ret = spu_activate(ctx, 0);
48201 + * Apply special setup as required.
48203 + if (ctx->flags & SPU_CREATE_ISOLATE) {
48204 if (!(ctx->ops->status_read(ctx) & SPU_STATUS_ISOLATED_STATE)) {
48205 - int ret = spu_setup_isolated(ctx);
48206 + ret = spu_setup_isolated(ctx);
48211 - /* if userspace has set the runcntrl register (eg, to issue an
48212 - * isolated exit), we need to re-set it here */
48214 + * If userspace has set the runcntrl register (eg, to
48215 + * issue an isolated exit), we need to re-set it here
48217 runcntl = ctx->ops->runcntl_read(ctx) &
48218 (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE);
48220 runcntl = SPU_RUNCNTL_RUNNABLE;
48223 + if (ctx->flags & SPU_CREATE_NOSCHED) {
48224 + spuctx_switch_state(ctx, SPU_UTIL_USER);
48225 ctx->ops->runcntl_write(ctx, runcntl);
48227 - unsigned long mode = SPU_PRIVCNTL_MODE_NORMAL;
48228 - ctx->ops->npc_write(ctx, *npc);
48229 + unsigned long privcntl;
48231 if (test_thread_flag(TIF_SINGLESTEP))
48232 - mode = SPU_PRIVCNTL_MODE_SINGLE_STEP;
48233 - out_be64(&ctx->spu->priv2->spu_privcntl_RW, mode);
48234 - ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE);
48236 + privcntl = SPU_PRIVCNTL_MODE_SINGLE_STEP;
48238 + privcntl = SPU_PRIVCNTL_MODE_NORMAL;
48240 - spuctx_switch_state(ctx, SPU_UTIL_USER);
48241 + ctx->ops->npc_write(ctx, *npc);
48242 + ctx->ops->privcntl_write(ctx, privcntl);
48243 + ctx->ops->runcntl_write(ctx, runcntl);
48245 + if (ctx->state == SPU_STATE_SAVED) {
48246 + ret = spu_activate(ctx, 0);
48250 + spuctx_switch_state(ctx, SPU_UTIL_USER);
48256 @@ -165,6 +228,8 @@
48260 + spu_del_from_rq(ctx);
48262 *status = ctx->ops->status_read(ctx);
48263 *npc = ctx->ops->npc_read(ctx);
48265 @@ -177,26 +242,6 @@
48269 -static int spu_reacquire_runnable(struct spu_context *ctx, u32 *npc,
48274 - ret = spu_run_fini(ctx, npc, status);
48278 - if (*status & (SPU_STATUS_STOPPED_BY_STOP | SPU_STATUS_STOPPED_BY_HALT))
48281 - ret = spu_acquire_runnable(ctx, 0);
48285 - spuctx_switch_state(ctx, SPU_UTIL_USER);
48290 * SPU syscall restarting is tricky because we violate the basic
48291 * assumption that the signal handler is running on the interrupted
48292 @@ -247,7 +292,7 @@
48293 u32 ls_pointer, npc;
48299 /* get syscall block from local store */
48300 npc = ctx->ops->npc_read(ctx) & ~3;
48301 @@ -269,9 +314,11 @@
48302 if (spu_ret <= -ERESTARTSYS) {
48303 ret = spu_handle_restartsys(ctx, &spu_ret, &npc);
48305 - spu_acquire(ctx);
48306 + ret2 = spu_acquire(ctx);
48307 if (ret == -ERESTARTSYS)
48313 /* write result, jump over indirect pointer */
48314 @@ -281,18 +328,6 @@
48318 -static inline int spu_process_events(struct spu_context *ctx)
48320 - struct spu *spu = ctx->spu;
48323 - if (spu->class_0_pending)
48324 - ret = spu_irq_class_0_bottom(spu);
48325 - if (!ret && signal_pending(current))
48326 - ret = -ERESTARTSYS;
48330 long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
48333 @@ -302,29 +337,14 @@
48334 if (mutex_lock_interruptible(&ctx->run_mutex))
48335 return -ERESTARTSYS;
48337 - ctx->ops->master_start(ctx);
48338 + spu_enable_spu(ctx);
48339 ctx->event_return = 0;
48341 - spu_acquire(ctx);
48342 - if (ctx->state == SPU_STATE_SAVED) {
48343 - __spu_update_sched_info(ctx);
48344 - spu_set_timeslice(ctx);
48346 - ret = spu_activate(ctx, 0);
48348 - spu_release(ctx);
48353 - * We have to update the scheduling priority under active_mutex
48354 - * to protect against find_victim().
48356 - * No need to update the timeslice ASAP, it will get updated
48357 - * once the current one has expired.
48359 - spu_update_sched_info(ctx);
48361 + ret = spu_acquire(ctx);
48365 + spu_update_sched_info(ctx);
48367 ret = spu_run_init(ctx, npc);
48369 @@ -358,14 +378,12 @@
48373 - if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) {
48374 - ret = spu_reacquire_runnable(ctx, npc, &status);
48379 - ret = spu_process_events(ctx);
48380 + ret = spufs_handle_class0(ctx);
48384 + if (signal_pending(current))
48385 + ret = -ERESTARTSYS;
48386 } while (!ret && !(status & (SPU_STATUS_STOPPED_BY_STOP |
48387 SPU_STATUS_STOPPED_BY_HALT |
48388 SPU_STATUS_SINGLE_STEP)));
48389 @@ -376,11 +394,10 @@
48390 ctx->stats.libassist++;
48393 - ctx->ops->master_stop(ctx);
48394 + spu_disable_spu(ctx);
48395 ret = spu_run_fini(ctx, npc, &status);
48400 ((ret == -ERESTARTSYS) &&
48401 ((status & SPU_STATUS_STOPPED_BY_HALT) ||
48402 @@ -401,6 +418,7 @@
48405 *event = ctx->event_return;
48407 mutex_unlock(&ctx->run_mutex);
48410 --- a/arch/powerpc/platforms/cell/spufs/sched.c
48411 +++ b/arch/powerpc/platforms/cell/spufs/sched.c
48413 static struct spu_prio_array *spu_prio;
48414 static struct task_struct *spusched_task;
48415 static struct timer_list spusched_timer;
48416 +static struct timer_list spuloadavg_timer;
48419 * Priority of a normal, non-rt, non-niced'd process (aka nice level 0).
48420 @@ -105,15 +106,21 @@
48421 void __spu_update_sched_info(struct spu_context *ctx)
48424 - * 32-Bit assignment are atomic on powerpc, and we don't care about
48425 - * memory ordering here because retriving the controlling thread is
48426 - * per defintion racy.
48427 + * assert that the context is not on the runqueue, so it is safe
48428 + * to change its scheduling parameters.
48430 + BUG_ON(!list_empty(&ctx->rq));
48433 + * 32-Bit assignments are atomic on powerpc, and we don't care about
48434 + * memory ordering here because retrieving the controlling thread is
48435 + * per definition racy.
48437 ctx->tid = current->pid;
48440 * We do our own priority calculations, so we normally want
48441 - * ->static_prio to start with. Unfortunately thies field
48442 + * ->static_prio to start with. Unfortunately this field
48443 * contains junk for threads with a realtime scheduling
48444 * policy so we have to look at ->prio in this case.
48446 @@ -124,23 +131,32 @@
48447 ctx->policy = current->policy;
48450 - * A lot of places that don't hold list_mutex poke into
48451 - * cpus_allowed, including grab_runnable_context which
48452 - * already holds the runq_lock. So abuse runq_lock
48453 - * to protect this field aswell.
48454 + * TO DO: the context may be loaded, so we may need to activate
48455 + * it again on a different node. But it shouldn't hurt anything
48456 + * to update its parameters, because we know that the scheduler
48457 + * is not actively looking at this field, since it is not on the
48458 + * runqueue. The context will be rescheduled on the proper node
48459 + * if it is timesliced or preempted.
48461 - spin_lock(&spu_prio->runq_lock);
48462 ctx->cpus_allowed = current->cpus_allowed;
48463 - spin_unlock(&spu_prio->runq_lock);
48466 void spu_update_sched_info(struct spu_context *ctx)
48468 - int node = ctx->spu->node;
48471 - mutex_lock(&cbe_spu_info[node].list_mutex);
48472 - __spu_update_sched_info(ctx);
48473 - mutex_unlock(&cbe_spu_info[node].list_mutex);
48474 + if (ctx->state == SPU_STATE_RUNNABLE) {
48475 + node = ctx->spu->node;
48478 + * Take list_mutex to sync with find_victim().
48480 + mutex_lock(&cbe_spu_info[node].list_mutex);
48481 + __spu_update_sched_info(ctx);
48482 + mutex_unlock(&cbe_spu_info[node].list_mutex);
48484 + __spu_update_sched_info(ctx);
48488 static int __node_allowed(struct spu_context *ctx, int node)
48489 @@ -174,7 +190,7 @@
48490 * Wake up the active spu_contexts.
48492 * When the awakened processes see their "notify_active" flag is set,
48493 - * they will call spu_switch_notify();
48494 + * they will call spu_switch_notify().
48496 for_each_online_node(node) {
48498 @@ -221,7 +237,6 @@
48499 spu->wbox_callback = spufs_wbox_callback;
48500 spu->stop_callback = spufs_stop_callback;
48501 spu->mfc_callback = spufs_mfc_callback;
48502 - spu->dma_callback = spufs_dma_callback;
48504 spu_unmap_mappings(ctx);
48505 spu_restore(&ctx->csa, spu);
48506 @@ -409,7 +424,6 @@
48507 spu->wbox_callback = NULL;
48508 spu->stop_callback = NULL;
48509 spu->mfc_callback = NULL;
48510 - spu->dma_callback = NULL;
48511 spu_associate_mm(spu, NULL);
48514 @@ -454,6 +468,13 @@
48518 +static void spu_add_to_rq(struct spu_context *ctx)
48520 + spin_lock(&spu_prio->runq_lock);
48521 + __spu_add_to_rq(ctx);
48522 + spin_unlock(&spu_prio->runq_lock);
48525 static void __spu_del_from_rq(struct spu_context *ctx)
48527 int prio = ctx->prio;
48528 @@ -468,10 +489,24 @@
48532 +void spu_del_from_rq(struct spu_context *ctx)
48534 + spin_lock(&spu_prio->runq_lock);
48535 + __spu_del_from_rq(ctx);
48536 + spin_unlock(&spu_prio->runq_lock);
48539 static void spu_prio_wait(struct spu_context *ctx)
48544 + * The caller must explicitly wait for a context to be loaded
48545 + * if the nosched flag is set. If NOSCHED is not set, the caller
48546 + * queues the context and waits for an spu event or error.
48548 + BUG_ON(!(ctx->flags & SPU_CREATE_NOSCHED));
48550 spin_lock(&spu_prio->runq_lock);
48551 prepare_to_wait_exclusive(&ctx->stop_wq, &wait, TASK_INTERRUPTIBLE);
48552 if (!signal_pending(current)) {
48553 @@ -555,7 +590,7 @@
48555 * Look for a possible preemption candidate on the local node first.
48556 * If there is no candidate look at the other nodes. This isn't
48557 - * exactly fair, but so far the whole spu schedule tries to keep
48558 + * exactly fair, but so far the whole spu scheduler tries to keep
48559 * a strong node affinity. We might want to fine-tune this in
48562 @@ -571,6 +606,7 @@
48563 struct spu_context *tmp = spu->ctx;
48565 if (tmp && tmp->prio > ctx->prio &&
48566 + !(tmp->flags & SPU_CREATE_NOSCHED) &&
48567 (!victim || tmp->prio > victim->prio))
48570 @@ -582,6 +618,10 @@
48571 * higher priority contexts before lower priority
48572 * ones, so this is safe until we introduce
48573 * priority inheritance schemes.
48575 + * XXX if the highest priority context is locked,
48576 + * this can loop a long time. Might be better to
48577 + * look at another context or give up after X retries.
48579 if (!mutex_trylock(&victim->state_mutex)) {
48581 @@ -589,10 +629,10 @@
48586 + if (!spu || victim->prio <= ctx->prio) {
48588 * This race can happen because we've dropped
48589 - * the active list mutex. No a problem, just
48590 + * the active list mutex. Not a problem, just
48591 * restart the search.
48593 mutex_unlock(&victim->state_mutex);
48594 @@ -607,13 +647,10 @@
48596 victim->stats.invol_ctx_switch++;
48597 spu->stats.invol_ctx_switch++;
48598 + spu_add_to_rq(victim);
48600 mutex_unlock(&victim->state_mutex);
48602 - * We need to break out of the wait loop in spu_run
48603 - * manually to ensure this context gets put on the
48604 - * runqueue again ASAP.
48606 - wake_up(&victim->stop_wq);
48611 @@ -621,6 +658,50 @@
48615 +static void __spu_schedule(struct spu *spu, struct spu_context *ctx)
48617 + int node = spu->node;
48620 + spu_set_timeslice(ctx);
48622 + mutex_lock(&cbe_spu_info[node].list_mutex);
48623 + if (spu->ctx == NULL) {
48624 + spu_bind_context(spu, ctx);
48625 + cbe_spu_info[node].nr_active++;
48626 + spu->alloc_state = SPU_USED;
48629 + mutex_unlock(&cbe_spu_info[node].list_mutex);
48632 + wake_up_all(&ctx->run_wq);
48634 + spu_add_to_rq(ctx);
48637 +static void spu_schedule(struct spu *spu, struct spu_context *ctx)
48639 + /* not a candidate for interruptible because it's called either
48640 + from the scheduler thread or from spu_deactivate */
48641 + mutex_lock(&ctx->state_mutex);
48642 + __spu_schedule(spu, ctx);
48643 + spu_release(ctx);
48646 +static void spu_unschedule(struct spu *spu, struct spu_context *ctx)
48648 + int node = spu->node;
48650 + mutex_lock(&cbe_spu_info[node].list_mutex);
48651 + cbe_spu_info[node].nr_active--;
48652 + spu->alloc_state = SPU_FREE;
48653 + spu_unbind_context(spu, ctx);
48654 + ctx->stats.invol_ctx_switch++;
48655 + spu->stats.invol_ctx_switch++;
48656 + mutex_unlock(&cbe_spu_info[node].list_mutex);
48660 * spu_activate - find a free spu for a context and execute it
48661 * @ctx: spu context to schedule
48662 @@ -632,39 +713,47 @@
48664 int spu_activate(struct spu_context *ctx, unsigned long flags)
48671 - * If there are multiple threads waiting for a single context
48672 - * only one actually binds the context while the others will
48673 - * only be able to acquire the state_mutex once the context
48674 - * already is in runnable state.
48679 + * If there are multiple threads waiting for a single context
48680 + * only one actually binds the context while the others will
48681 + * only be able to acquire the state_mutex once the context
48682 + * already is in runnable state.
48687 - spu = spu_get_idle(ctx);
48689 - * If this is a realtime thread we try to get it running by
48690 - * preempting a lower priority thread.
48692 - if (!spu && rt_prio(ctx->prio))
48693 - spu = find_victim(ctx);
48695 - int node = spu->node;
48697 + if (signal_pending(current))
48698 + return -ERESTARTSYS;
48700 - mutex_lock(&cbe_spu_info[node].list_mutex);
48701 - spu_bind_context(spu, ctx);
48702 - cbe_spu_info[node].nr_active++;
48703 - mutex_unlock(&cbe_spu_info[node].list_mutex);
48706 + spu = spu_get_idle(ctx);
48708 + * If this is a realtime thread we try to get it running by
48709 + * preempting a lower priority thread.
48711 + if (!spu && rt_prio(ctx->prio))
48712 + spu = find_victim(ctx);
48714 + unsigned long runcntl;
48716 + runcntl = ctx->ops->runcntl_read(ctx);
48717 + __spu_schedule(spu, ctx);
48718 + if (runcntl & SPU_RUNCNTL_RUNNABLE)
48719 + spuctx_switch_state(ctx, SPU_UTIL_USER);
48724 + if (ctx->flags & SPU_CREATE_NOSCHED) {
48725 spu_prio_wait(ctx);
48726 - } while (!signal_pending(current));
48727 + goto spu_activate_top;
48730 + spu_add_to_rq(ctx);
48732 - return -ERESTARTSYS;
48737 @@ -706,21 +795,19 @@
48739 new = grab_runnable_context(max_prio, spu->node);
48740 if (new || force) {
48741 - int node = spu->node;
48743 - mutex_lock(&cbe_spu_info[node].list_mutex);
48744 - spu_unbind_context(spu, ctx);
48745 - spu->alloc_state = SPU_FREE;
48746 - cbe_spu_info[node].nr_active--;
48747 - mutex_unlock(&cbe_spu_info[node].list_mutex);
48749 - ctx->stats.vol_ctx_switch++;
48750 - spu->stats.vol_ctx_switch++;
48753 - wake_up(&new->stop_wq);
48754 + spu_unschedule(spu, ctx);
48756 + if (new->flags & SPU_CREATE_NOSCHED)
48757 + wake_up(&new->stop_wq);
48759 + spu_release(ctx);
48760 + spu_schedule(spu, new);
48761 + /* this one can't easily be made
48763 + mutex_lock(&ctx->state_mutex);
48770 return new != NULL;
48771 @@ -757,43 +844,38 @@
48773 static noinline void spusched_tick(struct spu_context *ctx)
48775 + struct spu_context *new = NULL;
48776 + struct spu *spu = NULL;
48779 + if (spu_acquire(ctx))
48780 + BUG(); /* a kernel thread never has signals pending */
48782 + if (ctx->state != SPU_STATE_RUNNABLE)
48784 + if (spu_stopped(ctx, &status))
48786 if (ctx->flags & SPU_CREATE_NOSCHED)
48789 if (ctx->policy == SCHED_FIFO)
48793 if (--ctx->time_slice)
48797 - * Unfortunately list_mutex ranks outside of state_mutex, so
48798 - * we have to trylock here. If we fail give the context another
48799 - * tick and try again.
48801 - if (mutex_trylock(&ctx->state_mutex)) {
48802 - struct spu *spu = ctx->spu;
48803 - struct spu_context *new;
48806 - new = grab_runnable_context(ctx->prio + 1, spu->node);
48808 - spu_unbind_context(spu, ctx);
48809 - ctx->stats.invol_ctx_switch++;
48810 - spu->stats.invol_ctx_switch++;
48811 - spu->alloc_state = SPU_FREE;
48812 - cbe_spu_info[spu->node].nr_active--;
48813 - wake_up(&new->stop_wq);
48815 - * We need to break out of the wait loop in
48816 - * spu_run manually to ensure this context
48817 - * gets put on the runqueue again ASAP.
48819 - wake_up(&ctx->stop_wq);
48821 - spu_set_timeslice(ctx);
48822 - mutex_unlock(&ctx->state_mutex);
48824 + new = grab_runnable_context(ctx->prio + 1, spu->node);
48826 + spu_unschedule(spu, ctx);
48827 + spu_add_to_rq(ctx);
48832 + spu_release(ctx);
48835 + spu_schedule(spu, new);
48839 @@ -817,35 +899,31 @@
48843 - * spu_calc_load - given tick count, update the avenrun load estimates.
48844 - * @tick: tick count
48845 + * spu_calc_load - update the avenrun load estimates.
48847 * No locking against reading these values from userspace, as for
48848 * the CPU loadavg code.
48850 -static void spu_calc_load(unsigned long ticks)
48851 +static void spu_calc_load(void)
48853 unsigned long active_tasks; /* fixed-point */
48854 - static int count = LOAD_FREQ;
48858 - if (unlikely(count < 0)) {
48859 - active_tasks = count_active_contexts() * FIXED_1;
48861 - CALC_LOAD(spu_avenrun[0], EXP_1, active_tasks);
48862 - CALC_LOAD(spu_avenrun[1], EXP_5, active_tasks);
48863 - CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks);
48864 - count += LOAD_FREQ;
48865 - } while (count < 0);
48867 + active_tasks = count_active_contexts() * FIXED_1;
48868 + CALC_LOAD(spu_avenrun[0], EXP_1, active_tasks);
48869 + CALC_LOAD(spu_avenrun[1], EXP_5, active_tasks);
48870 + CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks);
48873 static void spusched_wake(unsigned long data)
48875 mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
48876 wake_up_process(spusched_task);
48877 - spu_calc_load(SPUSCHED_TICK);
48880 +static void spuloadavg_wake(unsigned long data)
48882 + mod_timer(&spuloadavg_timer, jiffies + LOAD_FREQ);
48886 static int spusched_thread(void *unused)
48887 @@ -857,17 +935,58 @@
48888 set_current_state(TASK_INTERRUPTIBLE);
48890 for (node = 0; node < MAX_NUMNODES; node++) {
48891 - mutex_lock(&cbe_spu_info[node].list_mutex);
48892 - list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list)
48894 - spusched_tick(spu->ctx);
48895 - mutex_unlock(&cbe_spu_info[node].list_mutex);
48896 + struct mutex *mtx = &cbe_spu_info[node].list_mutex;
48899 + list_for_each_entry(spu, &cbe_spu_info[node].spus,
48901 + struct spu_context *ctx = spu->ctx;
48904 + mutex_unlock(mtx);
48905 + spusched_tick(ctx);
48909 + mutex_unlock(mtx);
48916 +void spuctx_switch_state(struct spu_context *ctx,
48917 + enum spu_utilization_state new_state)
48919 + unsigned long long curtime;
48920 + signed long long delta;
48921 + struct timespec ts;
48923 + enum spu_utilization_state old_state;
48925 + ktime_get_ts(&ts);
48926 + curtime = timespec_to_ns(&ts);
48927 + delta = curtime - ctx->stats.tstamp;
48929 + WARN_ON(!mutex_is_locked(&ctx->state_mutex));
48930 + WARN_ON(delta < 0);
48933 + old_state = ctx->stats.util_state;
48934 + ctx->stats.util_state = new_state;
48935 + ctx->stats.tstamp = curtime;
48938 + * Update the physical SPU utilization statistics.
48941 + ctx->stats.times[old_state] += delta;
48942 + spu->stats.times[old_state] += delta;
48943 + spu->stats.util_state = new_state;
48944 + spu->stats.tstamp = curtime;
48948 #define LOAD_INT(x) ((x) >> FSHIFT)
48949 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
48951 @@ -881,7 +1000,7 @@
48954 * Note that last_pid doesn't really make much sense for the
48955 - * SPU loadavg (it even seems very odd on the CPU side..),
48956 + * SPU loadavg (it even seems very odd on the CPU side...),
48957 * but we include it here to have a 100% compatible interface.
48959 seq_printf(s, "%d.%02d %d.%02d %d.%02d %ld/%d %d\n",
48960 @@ -922,6 +1041,7 @@
48961 spin_lock_init(&spu_prio->runq_lock);
48963 setup_timer(&spusched_timer, spusched_wake, 0);
48964 + setup_timer(&spuloadavg_timer, spuloadavg_wake, 0);
48966 spusched_task = kthread_run(spusched_thread, NULL, "spusched");
48967 if (IS_ERR(spusched_task)) {
48968 @@ -929,6 +1049,8 @@
48969 goto out_free_spu_prio;
48972 + mod_timer(&spuloadavg_timer, 0);
48974 entry = create_proc_entry("spu_loadavg", 0, NULL);
48976 goto out_stop_kthread;
48977 @@ -954,6 +1076,7 @@
48978 remove_proc_entry("spu_loadavg", NULL);
48980 del_timer_sync(&spusched_timer);
48981 + del_timer_sync(&spuloadavg_timer);
48982 kthread_stop(spusched_task);
48984 for (node = 0; node < MAX_NUMNODES; node++) {
48985 --- a/arch/powerpc/platforms/cell/spufs/spufs.h
48986 +++ b/arch/powerpc/platforms/cell/spufs/spufs.h
48988 wait_queue_head_t wbox_wq;
48989 wait_queue_head_t stop_wq;
48990 wait_queue_head_t mfc_wq;
48991 + wait_queue_head_t run_wq;
48992 struct fasync_struct *ibox_fasync;
48993 struct fasync_struct *wbox_fasync;
48994 struct fasync_struct *mfc_fasync;
48995 @@ -168,8 +169,10 @@
48996 void (*npc_write) (struct spu_context * ctx, u32 data);
48997 u32(*status_read) (struct spu_context * ctx);
48998 char*(*get_ls) (struct spu_context * ctx);
48999 + void (*privcntl_write) (struct spu_context *ctx, u64 data);
49000 u32 (*runcntl_read) (struct spu_context * ctx);
49001 void (*runcntl_write) (struct spu_context * ctx, u32 data);
49002 + void (*runcntl_stop) (struct spu_context * ctx);
49003 void (*master_start) (struct spu_context * ctx);
49004 void (*master_stop) (struct spu_context * ctx);
49005 int (*set_mfc_query)(struct spu_context * ctx, u32 mask, u32 mode);
49006 @@ -219,15 +222,16 @@
49008 /* fault handling */
49009 int spufs_handle_class1(struct spu_context *ctx);
49010 +int spufs_handle_class0(struct spu_context *ctx);
49013 struct spu *affinity_check(struct spu_context *ctx);
49015 /* context management */
49016 extern atomic_t nr_spu_contexts;
49017 -static inline void spu_acquire(struct spu_context *ctx)
49018 +static inline int __must_check spu_acquire(struct spu_context *ctx)
49020 - mutex_lock(&ctx->state_mutex);
49021 + return mutex_lock_interruptible(&ctx->state_mutex);
49024 static inline void spu_release(struct spu_context *ctx)
49025 @@ -242,10 +246,11 @@
49026 void spu_unmap_mappings(struct spu_context *ctx);
49028 void spu_forget(struct spu_context *ctx);
49029 -int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags);
49030 -void spu_acquire_saved(struct spu_context *ctx);
49031 +int __must_check spu_acquire_saved(struct spu_context *ctx);
49032 void spu_release_saved(struct spu_context *ctx);
49034 +int spu_stopped(struct spu_context *ctx, u32 * stat);
49035 +void spu_del_from_rq(struct spu_context *ctx);
49036 int spu_activate(struct spu_context *ctx, unsigned long flags);
49037 void spu_deactivate(struct spu_context *ctx);
49038 void spu_yield(struct spu_context *ctx);
49039 @@ -279,7 +284,9 @@
49041 spu_release(ctx); \
49043 - spu_acquire(ctx); \
49044 + __ret = spu_acquire(ctx); \
49048 finish_wait(&(wq), &__wait); \
49050 @@ -306,41 +313,16 @@
49051 extern struct spufs_coredump_reader spufs_coredump_read[];
49052 extern int spufs_coredump_num_notes;
49055 - * This function is a little bit too large for an inline, but
49056 - * as fault.c is built into the kernel we can't move it out of
49059 -static inline void spuctx_switch_state(struct spu_context *ctx,
49060 - enum spu_utilization_state new_state)
49062 - unsigned long long curtime;
49063 - signed long long delta;
49064 - struct timespec ts;
49066 - enum spu_utilization_state old_state;
49068 - ktime_get_ts(&ts);
49069 - curtime = timespec_to_ns(&ts);
49070 - delta = curtime - ctx->stats.tstamp;
49072 - WARN_ON(!mutex_is_locked(&ctx->state_mutex));
49073 - WARN_ON(delta < 0);
49076 - old_state = ctx->stats.util_state;
49077 - ctx->stats.util_state = new_state;
49078 - ctx->stats.tstamp = curtime;
49081 - * Update the physical SPU utilization statistics.
49084 - ctx->stats.times[old_state] += delta;
49085 - spu->stats.times[old_state] += delta;
49086 - spu->stats.util_state = new_state;
49087 - spu->stats.tstamp = curtime;
49090 +extern int spu_init_csa(struct spu_state *csa);
49091 +extern void spu_fini_csa(struct spu_state *csa);
49092 +extern int spu_save(struct spu_state *prev, struct spu *spu);
49093 +extern int spu_restore(struct spu_state *new, struct spu *spu);
49094 +extern int spu_switch(struct spu_state *prev, struct spu_state *new,
49095 + struct spu *spu);
49096 +extern int spu_alloc_lscsa(struct spu_state *csa);
49097 +extern void spu_free_lscsa(struct spu_state *csa);
49099 +extern void spuctx_switch_state(struct spu_context *ctx,
49100 + enum spu_utilization_state new_state);
49103 --- a/arch/powerpc/platforms/cell/spufs/switch.c
49104 +++ b/arch/powerpc/platforms/cell/spufs/switch.c
49106 #include <asm/spu_csa.h>
49107 #include <asm/mmu_context.h>
49109 +#include "spufs.h"
49111 #include "spu_save_dump.h"
49112 #include "spu_restore_dump.h"
49114 @@ -691,35 +693,9 @@
49115 out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESUME_DMA_QUEUE);
49118 -static inline void get_kernel_slb(u64 ea, u64 slb[2])
49119 +static inline void setup_mfc_slbs(struct spu_state *csa, struct spu *spu,
49120 + unsigned int *code, int code_size)
49124 - if (REGION_ID(ea) == KERNEL_REGION_ID)
49125 - llp = mmu_psize_defs[mmu_linear_psize].sllp;
49127 - llp = mmu_psize_defs[mmu_virtual_psize].sllp;
49128 - slb[0] = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
49129 - SLB_VSID_KERNEL | llp;
49130 - slb[1] = (ea & ESID_MASK) | SLB_ESID_V;
49133 -static inline void load_mfc_slb(struct spu *spu, u64 slb[2], int slbe)
49135 - struct spu_priv2 __iomem *priv2 = spu->priv2;
49137 - out_be64(&priv2->slb_index_W, slbe);
49139 - out_be64(&priv2->slb_vsid_RW, slb[0]);
49140 - out_be64(&priv2->slb_esid_RW, slb[1]);
49144 -static inline void setup_mfc_slbs(struct spu_state *csa, struct spu *spu)
49147 - u64 lscsa_slb[2];
49150 * Restore, Step 30.
49151 * If MFC_SR1[R]=1, write 0 to SLB_Invalidate_All
49152 @@ -735,11 +711,7 @@
49153 * translation is desired by OS environment).
49155 spu_invalidate_slbs(spu);
49156 - get_kernel_slb((unsigned long)&spu_save_code[0], code_slb);
49157 - get_kernel_slb((unsigned long)csa->lscsa, lscsa_slb);
49158 - load_mfc_slb(spu, code_slb, 0);
49159 - if ((lscsa_slb[0] != code_slb[0]) || (lscsa_slb[1] != code_slb[1]))
49160 - load_mfc_slb(spu, lscsa_slb, 1);
49161 + spu_setup_kernel_slbs(spu, csa->lscsa, code, code_size);
49164 static inline void set_switch_active(struct spu_state *csa, struct spu *spu)
49165 @@ -768,9 +740,9 @@
49166 * (translation) interrupts.
49168 spin_lock_irq(&spu->register_lock);
49169 - spu_int_stat_clear(spu, 0, ~0ul);
49170 - spu_int_stat_clear(spu, 1, ~0ul);
49171 - spu_int_stat_clear(spu, 2, ~0ul);
49172 + spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
49173 + spu_int_stat_clear(spu, 1, CLASS1_INTR_MASK);
49174 + spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
49175 spu_int_mask_set(spu, 0, 0ul);
49176 spu_int_mask_set(spu, 1, class1_mask);
49177 spu_int_mask_set(spu, 2, 0ul);
49178 @@ -927,8 +899,8 @@
49179 POLL_WHILE_FALSE(in_be32(&prob->dma_tagstatus_R) & mask);
49181 local_irq_save(flags);
49182 - spu_int_stat_clear(spu, 0, ~(0ul));
49183 - spu_int_stat_clear(spu, 2, ~(0ul));
49184 + spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
49185 + spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
49186 local_irq_restore(flags);
49189 @@ -946,8 +918,8 @@
49190 POLL_WHILE_TRUE(in_be32(&prob->spu_status_R) & SPU_STATUS_RUNNING);
49192 local_irq_save(flags);
49193 - spu_int_stat_clear(spu, 0, ~(0ul));
49194 - spu_int_stat_clear(spu, 2, ~(0ul));
49195 + spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
49196 + spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
49197 local_irq_restore(flags);
49200 @@ -1423,9 +1395,9 @@
49201 spu_int_mask_set(spu, 0, 0ul);
49202 spu_int_mask_set(spu, 1, 0ul);
49203 spu_int_mask_set(spu, 2, 0ul);
49204 - spu_int_stat_clear(spu, 0, ~0ul);
49205 - spu_int_stat_clear(spu, 1, ~0ul);
49206 - spu_int_stat_clear(spu, 2, ~0ul);
49207 + spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
49208 + spu_int_stat_clear(spu, 1, CLASS1_INTR_MASK);
49209 + spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
49210 spin_unlock_irq(&spu->register_lock);
49213 @@ -1866,7 +1838,8 @@
49216 resume_mfc_queue(prev, spu); /* Step 46. */
49217 - setup_mfc_slbs(prev, spu); /* Step 47. */
49219 + setup_mfc_slbs(prev, spu, spu_save_code, sizeof(spu_save_code));
49220 set_switch_active(prev, spu); /* Step 48. */
49221 enable_interrupts(prev, spu); /* Step 49. */
49222 save_ls_16kb(prev, spu); /* Step 50. */
49223 @@ -1971,7 +1944,8 @@
49224 setup_spu_status_part1(next, spu); /* Step 27. */
49225 setup_spu_status_part2(next, spu); /* Step 28. */
49226 restore_mfc_rag(next, spu); /* Step 29. */
49227 - setup_mfc_slbs(next, spu); /* Step 30. */
49229 + setup_mfc_slbs(next, spu, spu_restore_code, sizeof(spu_restore_code));
49230 set_spu_npc(next, spu); /* Step 31. */
49231 set_signot1(next, spu); /* Step 32. */
49232 set_signot2(next, spu); /* Step 33. */
49233 @@ -2103,10 +2077,6 @@
49236 acquire_spu_lock(spu); /* Step 1. */
49237 - prev->dar = spu->dar;
49238 - prev->dsisr = spu->dsisr;
49241 rc = __do_spu_save(prev, spu); /* Steps 2-53. */
49242 release_spu_lock(spu);
49243 if (rc != 0 && rc != 2 && rc != 6) {
49244 @@ -2133,9 +2103,6 @@
49245 acquire_spu_lock(spu);
49246 harvest(NULL, spu);
49247 spu->slb_replace = 0;
49250 - spu->class_0_pending = 0;
49251 rc = __do_spu_restore(new, spu);
49252 release_spu_lock(spu);
49254 @@ -2215,10 +2182,8 @@
49258 -EXPORT_SYMBOL_GPL(spu_init_csa);
49260 void spu_fini_csa(struct spu_state *csa)
49262 spu_free_lscsa(csa);
49264 -EXPORT_SYMBOL_GPL(spu_fini_csa);
49265 --- a/arch/powerpc/platforms/celleb/Kconfig
49266 +++ b/arch/powerpc/platforms/celleb/Kconfig
49268 bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
49269 depends on PPC_MULTIPLATFORM && PPC64
49271 + select PPC_CELL_NATIVE
49273 select PPC_INDIRECT_IO
49274 select PPC_OF_PLATFORM_PCI
49275 select HAS_TXX9_SERIAL
49276 --- a/arch/powerpc/platforms/celleb/io-workarounds.c
49277 +++ b/arch/powerpc/platforms/celleb/io-workarounds.c
49282 +#include <linux/of.h>
49283 #include <linux/of_device.h>
49284 #include <linux/irq.h>
49286 @@ -222,7 +223,7 @@
49287 void (*dummy_read)(struct pci_controller *))
49289 struct celleb_pci_bus *bus = &celleb_pci_busses[celleb_pci_count];
49290 - struct device_node *np = phb->arch_data;
49291 + struct device_node *np = phb->dn;
49293 if (celleb_pci_count >= MAX_CELLEB_PCI_BUS) {
49294 printk(KERN_ERR "Too many pci bridges, workarounds"
49295 @@ -256,13 +257,13 @@
49297 celleb_dummy_page_va = kmalloc(PAGE_SIZE, GFP_KERNEL);
49298 if (!celleb_dummy_page_va) {
49299 - printk(KERN_ERR "Celleb: dummy read disabled."
49300 + printk(KERN_ERR "Celleb: dummy read disabled. "
49301 "Alloc celleb_dummy_page_va failed\n");
49305 list_for_each_entry(phb, &hose_list, list_node) {
49306 - node = phb->arch_data;
49308 match = of_match_node(celleb_pci_workaround_match, node);
49311 --- a/arch/powerpc/platforms/celleb/iommu.c
49312 +++ b/arch/powerpc/platforms/celleb/iommu.c
49314 #include <linux/init.h>
49315 #include <linux/dma-mapping.h>
49316 #include <linux/pci.h>
49317 +#include <linux/of_platform.h>
49319 -#include <asm/of_platform.h>
49320 +#include <asm/machdep.h>
49322 #include "beat_wrapper.h"
49328 +static unsigned long celleb_dma_direct_offset;
49330 static void __init celleb_init_direct_mapping(void)
49332 u64 lpar_addr, io_addr;
49337 - dma_direct_offset = dma_base;
49338 + celleb_dma_direct_offset = dma_base;
49341 +static void celleb_dma_dev_setup(struct device *dev)
49343 + dev->archdata.dma_ops = get_pci_dma_ops();
49344 + dev->archdata.dma_data = (void *)celleb_dma_direct_offset;
49347 +static void celleb_pci_dma_dev_setup(struct pci_dev *pdev)
49349 + celleb_dma_dev_setup(&pdev->dev);
49352 static int celleb_of_bus_notify(struct notifier_block *nb,
49354 if (action != BUS_NOTIFY_ADD_DEVICE)
49357 - dev->archdata.dma_ops = get_pci_dma_ops();
49358 + celleb_dma_dev_setup(dev);
49362 @@ -91,14 +105,12 @@
49364 static int __init celleb_init_iommu(void)
49366 - if (!machine_is(celleb))
49369 celleb_init_direct_mapping();
49370 set_pci_dma_ops(&dma_direct_ops);
49371 + ppc_md.pci_dma_dev_setup = celleb_pci_dma_dev_setup;
49372 bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);
49377 -arch_initcall(celleb_init_iommu);
49378 +machine_arch_initcall(celleb_beat, celleb_init_iommu);
49379 --- a/arch/powerpc/platforms/celleb/pci.c
49380 +++ b/arch/powerpc/platforms/celleb/pci.c
49382 #include <linux/init.h>
49383 #include <linux/bootmem.h>
49384 #include <linux/pci_regs.h>
49385 +#include <linux/of.h>
49386 #include <linux/of_device.h>
49388 #include <asm/io.h>
49389 @@ -138,8 +139,6 @@
49390 *val = celleb_fake_config_readl(p);
49397 static void celleb_config_write_fake(unsigned char *config, int where,
49398 @@ -158,7 +157,6 @@
49399 celleb_fake_config_writel(val, p);
49405 static int celleb_fake_pci_read_config(struct pci_bus *bus,
49406 @@ -351,6 +349,10 @@
49407 wi1 = of_get_property(node, "vendor-id", NULL);
49408 wi2 = of_get_property(node, "class-code", NULL);
49409 wi3 = of_get_property(node, "revision-id", NULL);
49410 + if (!wi0 || !wi1 || !wi2 || !wi3) {
49411 + printk(KERN_ERR "PCI: Missing device tree properties.\n");
49415 celleb_config_write_fake(*config, PCI_DEVICE_ID, 2, wi0[0] & 0xffff);
49416 celleb_config_write_fake(*config, PCI_VENDOR_ID, 2, wi1[0] & 0xffff);
49417 @@ -372,6 +374,10 @@
49418 celleb_setup_pci_base_addrs(hose, devno, fn, num_base_addr);
49420 li = of_get_property(node, "interrupts", &rlen);
49422 + printk(KERN_ERR "PCI: interrupts not found.\n");
49426 celleb_config_write_fake(*config, PCI_INTERRUPT_PIN, 1, 1);
49427 celleb_config_write_fake(*config, PCI_INTERRUPT_LINE, 1, val);
49428 @@ -475,7 +481,7 @@
49430 int __init celleb_setup_phb(struct pci_controller *phb)
49432 - struct device_node *dev = phb->arch_data;
49433 + struct device_node *dev = phb->dn;
49434 const struct of_device_id *match;
49435 int (*setup_func)(struct device_node *, struct pci_controller *);
49437 --- a/arch/powerpc/platforms/celleb/scc_epci.c
49438 +++ b/arch/powerpc/platforms/celleb/scc_epci.c
49440 private->dummy_page_da = dma_map_single(hose->parent,
49441 celleb_dummy_page_va, PAGE_SIZE, DMA_FROM_DEVICE);
49442 if (private->dummy_page_da == DMA_ERROR_CODE) {
49443 - printk(KERN_ERR "EPCI: dummy read disabled."
49444 + printk(KERN_ERR "EPCI: dummy read disabled. "
49445 "Map dummy page failed.\n");
49448 --- a/arch/powerpc/platforms/celleb/scc_uhc.c
49449 +++ b/arch/powerpc/platforms/celleb/scc_uhc.c
49454 - if (!machine_is(celleb))
49455 + if (!machine_is(celleb_beat) &&
49456 + !machine_is(celleb_native))
49459 uhc_base = ioremap(pci_resource_start(dev, 0),
49460 --- a/arch/powerpc/platforms/celleb/setup.c
49461 +++ b/arch/powerpc/platforms/celleb/setup.c
49463 #include <linux/seq_file.h>
49464 #include <linux/root_dev.h>
49465 #include <linux/console.h>
49466 +#include <linux/of_platform.h>
49468 #include <asm/mmu.h>
49469 #include <asm/processor.h>
49470 @@ -52,12 +53,16 @@
49471 #include <asm/time.h>
49472 #include <asm/spu_priv1.h>
49473 #include <asm/firmware.h>
49474 -#include <asm/of_platform.h>
49475 +#include <asm/rtas.h>
49476 +#include <asm/cell-regs.h>
49478 #include "interrupt.h"
49479 #include "beat_wrapper.h"
49482 +#include "../cell/interrupt.h"
49483 +#include "../cell/pervasive.h"
49484 +#include "../cell/ras.h"
49486 static char celleb_machine_type[128] = "Celleb";
49488 @@ -88,61 +93,122 @@
49489 printk("*** %04x : %s\n", hex, s ? s : "");
49492 -static void __init celleb_setup_arch(void)
49493 +static void __init celleb_setup_arch_common(void)
49495 + /* init to some ~sane value until calibrate_delay() runs */
49496 + loops_per_jiffy = 50000000;
49498 +#ifdef CONFIG_DUMMY_CONSOLE
49499 + conswitchp = &dummy_con;
49503 +static struct of_device_id celleb_bus_ids[] __initdata = {
49504 + { .type = "scc", },
49505 + { .type = "ioif", }, /* old style */
49509 +static int __init celleb_publish_devices(void)
49511 + /* Publish OF platform devices for southbridge IOs */
49512 + of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
49514 + celleb_pci_workaround_init();
49518 +machine_device_initcall(celleb_beat, celleb_publish_devices);
49519 +machine_device_initcall(celleb_native, celleb_publish_devices);
49523 + * functions for Celleb-Beat
49525 +static void __init celleb_setup_arch_beat(void)
49527 #ifdef CONFIG_SPU_BASE
49528 - spu_priv1_ops = &spu_priv1_beat_ops;
49529 - spu_management_ops = &spu_management_of_ops;
49530 + spu_priv1_ops = &spu_priv1_beat_ops;
49531 + spu_management_ops = &spu_management_of_ops;
49538 - /* init to some ~sane value until calibrate_delay() runs */
49539 - loops_per_jiffy = 50000000;
49541 -#ifdef CONFIG_DUMMY_CONSOLE
49542 - conswitchp = &dummy_con;
49544 + celleb_setup_arch_common();
49547 -static int __init celleb_probe(void)
49548 +static int __init celleb_probe_beat(void)
49550 unsigned long root = of_get_flat_dt_root();
49552 if (!of_flat_dt_is_compatible(root, "Beat"))
49555 - powerpc_firmware_features |= FW_FEATURE_CELLEB_POSSIBLE;
49556 + powerpc_firmware_features |= FW_FEATURE_CELLEB_ALWAYS
49557 + | FW_FEATURE_BEAT | FW_FEATURE_LPAR;
49558 hpte_init_beat_v3();
49563 -static struct of_device_id celleb_bus_ids[] __initdata = {
49564 - { .type = "scc", },
49565 - { .type = "ioif", }, /* old style */
49569 -static int __init celleb_publish_devices(void)
49571 + * functions for Celleb-native
49573 +static void __init celleb_init_IRQ_native(void)
49575 - if (!machine_is(celleb))
49578 + spider_init_IRQ();
49581 - /* Publish OF platform devices for southbridge IOs */
49582 - of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
49583 +static void __init celleb_setup_arch_native(void)
49585 +#ifdef CONFIG_SPU_BASE
49586 + spu_priv1_ops = &spu_priv1_mmio_ops;
49587 + spu_management_ops = &spu_management_of_ops;
49590 - celleb_pci_workaround_init();
49594 +#ifdef CONFIG_CBE_RAS
49602 + cbe_pervasive_init();
49604 + /* XXX: nvram initialization should be added */
49606 + celleb_setup_arch_common();
49609 +static int __init celleb_probe_native(void)
49611 + unsigned long root = of_get_flat_dt_root();
49613 + if (of_flat_dt_is_compatible(root, "Beat") ||
49614 + !of_flat_dt_is_compatible(root, "TOSHIBA,Celleb"))
49617 + powerpc_firmware_features |= FW_FEATURE_CELLEB_ALWAYS;
49618 + hpte_init_native();
49622 -device_initcall(celleb_publish_devices);
49624 -define_machine(celleb) {
49625 - .name = "Cell Reference Set",
49626 - .probe = celleb_probe,
49627 - .setup_arch = celleb_setup_arch,
49630 + * machine definitions
49632 +define_machine(celleb_beat) {
49633 + .name = "Cell Reference Set (Beat)",
49634 + .probe = celleb_probe_beat,
49635 + .setup_arch = celleb_setup_arch_beat,
49636 .show_cpuinfo = celleb_show_cpuinfo,
49637 .restart = beat_restart,
49638 .power_off = beat_power_off,
49639 @@ -167,3 +233,26 @@
49640 .machine_crash_shutdown = default_machine_crash_shutdown,
49644 +define_machine(celleb_native) {
49645 + .name = "Cell Reference Set (native)",
49646 + .probe = celleb_probe_native,
49647 + .setup_arch = celleb_setup_arch_native,
49648 + .show_cpuinfo = celleb_show_cpuinfo,
49649 + .restart = rtas_restart,
49650 + .power_off = rtas_power_off,
49651 + .halt = rtas_halt,
49652 + .get_boot_time = rtas_get_boot_time,
49653 + .get_rtc_time = rtas_get_rtc_time,
49654 + .set_rtc_time = rtas_set_rtc_time,
49655 + .calibrate_decr = generic_calibrate_decr,
49656 + .progress = celleb_progress,
49657 + .pci_probe_mode = celleb_pci_probe_mode,
49658 + .pci_setup_phb = celleb_setup_phb,
49659 + .init_IRQ = celleb_init_IRQ_native,
49660 +#ifdef CONFIG_KEXEC
49661 + .machine_kexec = default_machine_kexec,
49662 + .machine_kexec_prepare = default_machine_kexec_prepare,
49663 + .machine_crash_shutdown = default_machine_crash_shutdown,
49666 --- a/arch/powerpc/platforms/chrp/pci.c
49667 +++ b/arch/powerpc/platforms/chrp/pci.c
49668 @@ -198,7 +198,7 @@
49669 printk ("RTAS supporting Pegasos OF not found, please upgrade"
49670 " your firmware\n");
49672 - pci_assign_all_buses = 1;
49673 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
49674 /* keep the reference to the root node */
49677 --- a/arch/powerpc/platforms/chrp/setup.c
49678 +++ b/arch/powerpc/platforms/chrp/setup.c
49679 @@ -115,7 +115,7 @@
49680 seq_printf(m, "machine\t\t: CHRP %s\n", model);
49682 /* longtrail (goldengate) stuff */
49683 - if (!strncmp(model, "IBM,LongTrail", 13)) {
49684 + if (model && !strncmp(model, "IBM,LongTrail", 13)) {
49685 /* VLSI VAS96011/12 `Golden Gate 2' */
49687 sdramen = (in_le32(gg2_pci_config_base + GG2_PCI_DRAM_CTRL)
49688 @@ -203,15 +203,20 @@
49689 static void __init sio_init(void)
49691 struct device_node *root;
49692 + const char *model;
49694 - if ((root = of_find_node_by_path("/")) &&
49695 - !strncmp(of_get_property(root, "model", NULL),
49696 - "IBM,LongTrail", 13)) {
49697 + root = of_find_node_by_path("/");
49701 + model = of_get_property(root, "model", NULL);
49702 + if (model && !strncmp(model, "IBM,LongTrail", 13)) {
49703 /* logical device 0 (KBC/Keyboard) */
49704 sio_fixup_irq("keyboard", 0, 1, 2);
49705 /* select logical device 1 (KBC/Mouse) */
49706 sio_fixup_irq("mouse", 1, 12, 2);
49712 @@ -251,6 +256,57 @@
49717 + * Per default, input/output-device points to the keyboard/screen
49718 + * If no card is installed, the built-in serial port is used as a fallback.
49719 + * But unfortunately, the firmware does not connect /chosen/{stdin,stdout}
49720 + * the the built-in serial node. Instead, a /failsafe node is created.
49722 +static void chrp_init_early(void)
49724 + struct device_node *node;
49725 + const char *property;
49727 + if (strstr(cmd_line, "console="))
49729 + /* find the boot console from /chosen/stdout */
49732 + node = of_find_node_by_path("/");
49735 + property = of_get_property(node, "model", NULL);
49738 + if (strcmp(property, "Pegasos2"))
49740 + /* this is a Pegasos2 */
49741 + property = of_get_property(of_chosen, "linux,stdout-path", NULL);
49744 + of_node_put(node);
49745 + node = of_find_node_by_path(property);
49748 + property = of_get_property(node, "device_type", NULL);
49751 + if (strcmp(property, "serial"))
49754 + * The 9pin connector is either /failsafe
49755 + * or /pci@80000000/isa@C/serial@i2F8
49756 + * The optional graphics card has also type 'serial' in VGA mode.
49758 + property = of_get_property(node, "name", NULL);
49761 + if (!strcmp(property, "failsafe") || !strcmp(property, "serial"))
49762 + add_preferred_console("ttyS", 0, NULL);
49764 + of_node_put(node);
49767 void __init chrp_setup_arch(void)
49769 struct device_node *root = of_find_node_by_path("/");
49770 @@ -594,6 +650,7 @@
49771 .probe = chrp_probe,
49772 .setup_arch = chrp_setup_arch,
49773 .init = chrp_init2,
49774 + .init_early = chrp_init_early,
49775 .show_cpuinfo = chrp_show_cpuinfo,
49776 .init_IRQ = chrp_init_IRQ,
49777 .restart = rtas_restart,
49778 --- a/arch/powerpc/platforms/embedded6xx/Kconfig
49779 +++ b/arch/powerpc/platforms/embedded6xx/Kconfig
49782 select PPC_UDBG_16550 if SERIAL_8250
49783 select DEFAULT_UIMAGE
49784 + select MPC10X_OPENPIC
49785 + select MPC10X_BRIDGE
49787 Select LINKSTATION if configuring for one of PPC- (MPC8241)
49788 based NAS systems from Buffalo Technology. So far only
49790 Linkstation-I HD-HLAN and HD-HGLAN versions, and PPC-based
49791 Terastation systems should be supported too.
49794 + bool "IOMEGA StorCenter"
49795 + depends on EMBEDDED6xx
49798 + select PPC_UDBG_16550 if SERIAL_8250
49799 + select WANT_DEVICE_TREE
49800 + select MPC10X_OPENPIC
49801 + select MPC10X_BRIDGE
49803 + Select STORCENTER if configuring for the iomega StorCenter
49804 + with an 8241 CPU in it.
49807 bool "Freescale MPC7448HPC2(Taiga)"
49808 depends on EMBEDDED6xx
49810 select DEFAULT_UIMAGE
49811 select PPC_UDBG_16550
49812 select WANT_DEVICE_TREE
49813 + select TSI108_BRIDGE
49815 Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga)
49818 select TSI108_BRIDGE
49819 select PPC_UDBG_16550
49820 select WANT_DEVICE_TREE
49821 + select TSI108_BRIDGE
49823 Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval
49824 Board with TSI108/9 bridge (Hickory/Holly)
49825 @@ -48,17 +65,13 @@
49827 config TSI108_BRIDGE
49829 - depends on MPC7448HPC2 || PPC_HOLLY
49835 config MPC10X_BRIDGE
49837 - depends on LINKSTATION
49838 select PPC_INDIRECT_PCI
49845 config MPC10X_OPENPIC
49847 - depends on LINKSTATION
49850 config MPC10X_STORE_GATHERING
49851 bool "Enable MPC10x store gathering"
49852 --- a/arch/powerpc/platforms/embedded6xx/Makefile
49853 +++ b/arch/powerpc/platforms/embedded6xx/Makefile
49856 obj-$(CONFIG_MPC7448HPC2) += mpc7448_hpc2.o
49857 obj-$(CONFIG_LINKSTATION) += linkstation.o ls_uart.o
49858 +obj-$(CONFIG_STORCENTER) += storcenter.o
49859 obj-$(CONFIG_PPC_HOLLY) += holly.o
49860 obj-$(CONFIG_PPC_PRPMC2800) += prpmc2800.o
49861 --- a/arch/powerpc/platforms/embedded6xx/holly.c
49862 +++ b/arch/powerpc/platforms/embedded6xx/holly.c
49863 @@ -20,12 +20,12 @@
49864 #include <linux/console.h>
49865 #include <linux/delay.h>
49866 #include <linux/irq.h>
49867 -#include <linux/ide.h>
49868 #include <linux/seq_file.h>
49869 #include <linux/root_dev.h>
49870 #include <linux/serial.h>
49871 #include <linux/tty.h>
49872 #include <linux/serial_core.h>
49873 +#include <linux/of_platform.h>
49875 #include <asm/system.h>
49876 #include <asm/time.h>
49878 #include <asm/tsi108_irq.h>
49879 #include <asm/tsi108_pci.h>
49880 #include <asm/mpic.h>
49881 -#include <asm/of_platform.h>
49885 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
49886 +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
49889 #define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000
49891 -extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
49893 int mpc7448_hpc2_exclude_device(struct pci_controller *hose,
49894 u_char bus, u_char devfn)
49897 +++ b/arch/powerpc/platforms/embedded6xx/storcenter.c
49900 + * Board setup routines for the storcenter
49902 + * Copyright 2007 (C) Oyvind Repvik (nail@nslu2-linux.org)
49903 + * Copyright 2007 Andy Wilcox, Jon Loeliger
49905 + * Based on linkstation.c by G. Liakhovetski
49907 + * This file is licensed under the terms of the GNU General Public License
49908 + * version 2. This program is licensed "as is" without any warranty of
49909 + * any kind, whether express or implied.
49912 +#include <linux/kernel.h>
49913 +#include <linux/pci.h>
49914 +#include <linux/initrd.h>
49915 +#include <linux/mtd/physmap.h>
49916 +#include <linux/of_platform.h>
49918 +#include <asm/system.h>
49919 +#include <asm/time.h>
49920 +#include <asm/prom.h>
49921 +#include <asm/mpic.h>
49922 +#include <asm/pci-bridge.h>
49924 +#include "mpc10x.h"
49927 +#ifdef CONFIG_MTD_PHYSMAP
49928 +static struct mtd_partition storcenter_physmap_partitions[] = {
49930 + .name = "kernel",
49931 + .offset = 0x000000,
49932 + .size = 0x170000,
49935 + .name = "rootfs",
49936 + .offset = 0x170000,
49937 + .size = 0x590000,
49941 + .offset = 0x700000,
49942 + .size = 0x040000,
49945 + .name = "config",
49946 + .offset = 0x740000,
49947 + .size = 0x0c0000,
49953 +static __initdata struct of_device_id storcenter_of_bus[] = {
49954 + { .name = "soc", },
49958 +static int __init storcenter_device_probe(void)
49960 + of_platform_bus_probe(NULL, storcenter_of_bus, NULL);
49963 +machine_device_initcall(storcenter, storcenter_device_probe);
49966 +static int __init storcenter_add_bridge(struct device_node *dev)
49970 + struct pci_controller *hose;
49971 + const int *bus_range;
49973 + printk("Adding PCI host bridge %s\n", dev->full_name);
49975 + hose = pcibios_alloc_controller(dev);
49976 + if (hose == NULL)
49979 + bus_range = of_get_property(dev, "bus-range", &len);
49980 + hose->first_busno = bus_range ? bus_range[0] : 0;
49981 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
49983 + setup_indirect_pci(hose, MPC10X_MAPB_CNFG_ADDR, MPC10X_MAPB_CNFG_DATA, 0);
49985 + /* Interpret the "ranges" property */
49986 + /* This also maps the I/O region and sets isa_io/mem_base */
49987 + pci_process_bridge_OF_ranges(hose, dev, 1);
49993 +static void __init storcenter_setup_arch(void)
49995 + struct device_node *np;
49997 +#ifdef CONFIG_MTD_PHYSMAP
49998 + physmap_set_partitions(storcenter_physmap_partitions,
49999 + ARRAY_SIZE(storcenter_physmap_partitions));
50002 + /* Lookup PCI host bridges */
50003 + for_each_compatible_node(np, "pci", "mpc10x-pci")
50004 + storcenter_add_bridge(np);
50006 + printk(KERN_INFO "IOMEGA StorCenter\n");
50010 + * Interrupt setup and service. Interrrupts on the turbostation come
50011 + * from the four PCI slots plus onboard 8241 devices: I2C, DUART.
50013 +static void __init storcenter_init_IRQ(void)
50015 + struct mpic *mpic;
50016 + struct device_node *dnp;
50017 + const void *prop;
50019 + phys_addr_t paddr;
50021 + dnp = of_find_node_by_type(NULL, "open-pic");
50025 + prop = of_get_property(dnp, "reg", &size);
50026 + if (prop == NULL) {
50027 + of_node_put(dnp);
50031 + paddr = (phys_addr_t)of_translate_address(dnp, prop);
50032 + mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET,
50033 + 4, 32, " EPIC ");
50035 + of_node_put(dnp);
50037 + BUG_ON(mpic == NULL);
50042 + * openpic_set_sources(0, 5, OpenPIC_Addr + 0x10200);
50043 + * openpic_set_sources(5, 2, OpenPIC_Addr + 0x11120);
50044 + * first_irq, num_irqs, __iomem first_ISR
50045 + * o_ss: i, src: 0, fdf50200
50046 + * o_ss: i, src: 1, fdf50220
50047 + * o_ss: i, src: 2, fdf50240
50048 + * o_ss: i, src: 3, fdf50260
50049 + * o_ss: i, src: 4, fdf50280
50050 + * o_ss: i, src: 5, fdf51120
50051 + * o_ss: i, src: 6, fdf51140
50053 + mpic_assign_isu(mpic, 0, paddr + 0x10200);
50054 + mpic_assign_isu(mpic, 1, paddr + 0x10220);
50055 + mpic_assign_isu(mpic, 2, paddr + 0x10240);
50056 + mpic_assign_isu(mpic, 3, paddr + 0x10260);
50057 + mpic_assign_isu(mpic, 4, paddr + 0x10280);
50058 + mpic_assign_isu(mpic, 5, paddr + 0x11120);
50059 + mpic_assign_isu(mpic, 6, paddr + 0x11140);
50064 +static void storcenter_restart(char *cmd)
50066 + local_irq_disable();
50068 + /* Set exception prefix high - to the firmware */
50069 + _nmask_and_or_msr(0, MSR_IP);
50071 + /* Wait for reset to happen */
50075 +static int __init storcenter_probe(void)
50077 + unsigned long root = of_get_flat_dt_root();
50079 + return of_flat_dt_is_compatible(root, "storcenter");
50082 +define_machine(storcenter){
50083 + .name = "IOMEGA StorCenter",
50084 + .probe = storcenter_probe,
50085 + .setup_arch = storcenter_setup_arch,
50086 + .init_IRQ = storcenter_init_IRQ,
50087 + .get_irq = mpic_get_irq,
50088 + .restart = storcenter_restart,
50089 + .calibrate_decr = generic_calibrate_decr,
50091 --- a/arch/powerpc/platforms/iseries/Makefile
50092 +++ b/arch/powerpc/platforms/iseries/Makefile
50094 obj-y += exception.o
50095 obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt_mod.o mf.o lpevents.o \
50096 hvcall.o proc.o htab.o iommu.o misc.o irq.o
50097 -obj-$(CONFIG_PCI) += pci.o vpdinfo.o
50098 +obj-$(CONFIG_PCI) += pci.o
50099 obj-$(CONFIG_SMP) += smp.o
50100 obj-$(CONFIG_VIOPATH) += viopath.o vio.o
50101 obj-$(CONFIG_MODULES) += ksyms.o
50102 --- a/arch/powerpc/platforms/iseries/iommu.c
50103 +++ b/arch/powerpc/platforms/iseries/iommu.c
50104 @@ -163,8 +163,10 @@
50105 (it->it_type == TCE_PCI) &&
50106 (it->it_offset == tbl->it_offset) &&
50107 (it->it_index == tbl->it_index) &&
50108 - (it->it_size == tbl->it_size))
50109 + (it->it_size == tbl->it_size)) {
50110 + of_node_put(node);
50116 --- a/arch/powerpc/platforms/iseries/lpevents.c
50117 +++ b/arch/powerpc/platforms/iseries/lpevents.c
50118 @@ -239,7 +239,7 @@
50119 * other CPUs, and that the deleted handler isn't
50120 * still running on another CPU when we return.
50122 - synchronize_rcu();
50123 + synchronize_sched();
50127 --- a/arch/powerpc/platforms/iseries/pci.c
50128 +++ b/arch/powerpc/platforms/iseries/pci.c
50131 * Copyright (C) 2001 Allan Trautman, IBM Corporation
50132 + * Copyright (C) 2005,2007 Stephen Rothwell, IBM Corp
50134 * iSeries specific routines for PCI.
50136 @@ -19,13 +20,18 @@
50137 * along with this program; if not, write to the Free Software
50138 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
50143 #include <linux/kernel.h>
50144 #include <linux/list.h>
50145 #include <linux/string.h>
50146 #include <linux/init.h>
50147 #include <linux/module.h>
50148 #include <linux/pci.h>
50149 +#include <linux/of.h>
50151 +#include <asm/types.h>
50152 #include <asm/io.h>
50153 #include <asm/irq.h>
50154 #include <asm/prom.h>
50156 #include <asm/abs_addr.h>
50157 #include <asm/firmware.h>
50159 +#include <asm/iseries/hv_types.h>
50160 #include <asm/iseries/hv_call_xm.h>
50161 #include <asm/iseries/mf.h>
50162 #include <asm/iseries/iommu.h>
50165 #include "call_pci.h"
50168 - * Forward declares of prototypes.
50170 -static struct device_node *find_Device_Node(int bus, int devfn);
50172 -static int Pci_Retry_Max = 3; /* Only retry 3 times */
50173 -static int Pci_Error_Flag = 1; /* Set Retry Error on. */
50175 -static struct pci_ops iSeries_pci_ops;
50176 +#define PCI_RETRY_MAX 3
50177 +static int limit_pci_retries = 1; /* Set Retry Error on. */
50182 #define IOMM_TABLE_MAX_ENTRIES 1024
50183 #define IOMM_TABLE_ENTRY_SIZE 0x0000000000400000UL
50184 #define BASE_IO_MEMORY 0xE000000000000000UL
50185 +#define END_IO_MEMORY 0xEFFFFFFFFFFFFFFFUL
50187 static unsigned long max_io_memory = BASE_IO_MEMORY;
50188 static long current_iomm_table_entry;
50189 @@ -70,12 +71,237 @@
50192 static struct device_node *iomm_table[IOMM_TABLE_MAX_ENTRIES];
50193 -static u8 iobar_table[IOMM_TABLE_MAX_ENTRIES];
50194 +static u64 ds_addr_table[IOMM_TABLE_MAX_ENTRIES];
50196 -static const char pci_io_text[] = "iSeries PCI I/O";
50197 static DEFINE_SPINLOCK(iomm_table_lock);
50200 + * Generate a Direct Select Address for the Hypervisor
50202 +static inline u64 iseries_ds_addr(struct device_node *node)
50204 + struct pci_dn *pdn = PCI_DN(node);
50205 + const u32 *sbp = of_get_property(node, "linux,subbus", NULL);
50207 + return ((u64)pdn->busno << 48) + ((u64)(sbp ? *sbp : 0) << 40)
50208 + + ((u64)0x10 << 32);
50212 + * Size of Bus VPD data
50214 +#define BUS_VPDSIZE 1024
50219 +#define VPD_END_OF_AREA 0x79
50220 +#define VPD_ID_STRING 0x82
50221 +#define VPD_VENDOR_AREA 0x84
50226 +#define VPD_FRU_FRAME_ID 0x4649 /* "FI" */
50227 +#define VPD_SLOT_MAP_FORMAT 0x4D46 /* "MF" */
50228 +#define VPD_SLOT_MAP 0x534D /* "SM" */
50231 + * Structures of the areas
50233 +struct mfg_vpd_area {
50239 +#define MFG_ENTRY_SIZE 3
50243 + u8 secondary_agent;
50245 + char card_location[3];
50247 + char reserved[2];
50249 +#define SLOT_ENTRY_SIZE 16
50252 + * Parse the Slot Area
50254 +static void __init iseries_parse_slot_area(struct slot_map *map, int len,
50255 + HvAgentId agent, u8 *phb, char card[4])
50258 + * Parse Slot label until we find the one requested
50260 + while (len > 0) {
50261 + if (map->agent == agent) {
50263 + * If Phb wasn't found, grab the entry first one found.
50265 + if (*phb == 0xff)
50267 + /* Found it, extract the data. */
50268 + if (map->phb == *phb) {
50269 + memcpy(card, &map->card_location, 3);
50274 + /* Point to the next Slot */
50275 + map = (struct slot_map *)((char *)map + SLOT_ENTRY_SIZE);
50276 + len -= SLOT_ENTRY_SIZE;
50281 + * Parse the Mfg Area
50283 +static void __init iseries_parse_mfg_area(struct mfg_vpd_area *area, int len,
50284 + HvAgentId agent, u8 *phb, u8 *frame, char card[4])
50286 + u16 slot_map_fmt = 0;
50288 + /* Parse Mfg Data */
50289 + while (len > 0) {
50290 + int mfg_tag_len = area->length;
50291 + /* Frame ID (FI 4649020310 ) */
50292 + if (area->tag == VPD_FRU_FRAME_ID)
50293 + *frame = area->data1;
50294 + /* Slot Map Format (MF 4D46020004 ) */
50295 + else if (area->tag == VPD_SLOT_MAP_FORMAT)
50296 + slot_map_fmt = (area->data1 * 256)
50298 + /* Slot Map (SM 534D90 */
50299 + else if (area->tag == VPD_SLOT_MAP) {
50300 + struct slot_map *slot_map;
50302 + if (slot_map_fmt == 0x1004)
50303 + slot_map = (struct slot_map *)((char *)area
50304 + + MFG_ENTRY_SIZE + 1);
50306 + slot_map = (struct slot_map *)((char *)area
50307 + + MFG_ENTRY_SIZE);
50308 + iseries_parse_slot_area(slot_map, mfg_tag_len,
50309 + agent, phb, card);
50312 + * Point to the next Mfg Area
50313 + * Use defined size, sizeof give wrong answer
50315 + area = (struct mfg_vpd_area *)((char *)area + mfg_tag_len
50316 + + MFG_ENTRY_SIZE);
50317 + len -= (mfg_tag_len + MFG_ENTRY_SIZE);
50322 + * Look for "BUS".. Data is not Null terminated.
50323 + * PHBID of 0xFF indicates PHB was not found in VPD Data.
50325 +static u8 __init iseries_parse_phbid(u8 *area, int len)
50327 + while (len > 0) {
50328 + if ((*area == 'B') && (*(area + 1) == 'U')
50329 + && (*(area + 2) == 'S')) {
50331 + while (*area == ' ')
50333 + return *area & 0x0F;
50342 + * Parse out the VPD Areas
50344 +static void __init iseries_parse_vpd(u8 *data, int data_len,
50345 + HvAgentId agent, u8 *frame, char card[4])
50349 + while (data_len > 0) {
50353 + if (tag == VPD_END_OF_AREA)
50355 + len = *(data + 1) + (*(data + 2) * 256);
50358 + if (tag == VPD_ID_STRING)
50359 + phb = iseries_parse_phbid(data, len);
50360 + else if (tag == VPD_VENDOR_AREA)
50361 + iseries_parse_mfg_area((struct mfg_vpd_area *)data, len,
50362 + agent, &phb, frame, card);
50363 + /* Point to next Area. */
50369 +static int __init iseries_get_location_code(u16 bus, HvAgentId agent,
50370 + u8 *frame, char card[4])
50373 + int bus_vpd_len = 0;
50374 + u8 *bus_vpd = kmalloc(BUS_VPDSIZE, GFP_KERNEL);
50376 + if (bus_vpd == NULL) {
50377 + printk("PCI: Bus VPD Buffer allocation failure.\n");
50380 + bus_vpd_len = HvCallPci_getBusVpd(bus, iseries_hv_addr(bus_vpd),
50382 + if (bus_vpd_len == 0) {
50383 + printk("PCI: Bus VPD Buffer zero length.\n");
50386 + /* printk("PCI: bus_vpd: %p, %d\n",bus_vpd, bus_vpd_len); */
50387 + /* Make sure this is what I think it is */
50388 + if (*bus_vpd != VPD_ID_STRING) {
50389 + printk("PCI: Bus VPD Buffer missing starting tag.\n");
50392 + iseries_parse_vpd(bus_vpd, bus_vpd_len, agent, frame, card);
50400 + * Prints the device information.
50401 + * - Pass in pci_dev* pointer to the device.
50402 + * - Pass in the device count
50405 + * PCI: Bus 0, Device 26, Vendor 0x12AE Frame 1, Card C10 Ethernet
50408 +static void __init iseries_device_information(struct pci_dev *pdev,
50409 + u16 bus, HvSubBusNumber subbus)
50415 + agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus),
50416 + ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus));
50418 + if (iseries_get_location_code(bus, agent, &frame, card)) {
50419 + printk(KERN_INFO "PCI: %s, Vendor %04X Frame%3d, "
50420 + "Card %4s 0x%04X\n", pci_name(pdev), pdev->vendor,
50421 + frame, card, (int)(pdev->class >> 8));
50426 * iomm_table_allocate_entry
50428 * Adds pci_dev entry in address translation table
50430 * - CurrentIndex is incremented to keep track of the last entry.
50431 * - Builds the resource entry for allocated BARs.
50433 -static void iomm_table_allocate_entry(struct pci_dev *dev, int bar_num)
50434 +static void __init iomm_table_allocate_entry(struct pci_dev *dev, int bar_num)
50436 struct resource *bar_res = &dev->resource[bar_num];
50437 long bar_size = pci_resource_len(dev, bar_num);
50438 @@ -101,7 +327,6 @@
50439 * Set Resource values.
50441 spin_lock(&iomm_table_lock);
50442 - bar_res->name = pci_io_text;
50443 bar_res->start = BASE_IO_MEMORY +
50444 IOMM_TABLE_ENTRY_SIZE * current_iomm_table_entry;
50445 bar_res->end = bar_res->start + bar_size - 1;
50446 @@ -110,7 +335,8 @@
50448 while (bar_size > 0 ) {
50449 iomm_table[current_iomm_table_entry] = dev->sysdata;
50450 - iobar_table[current_iomm_table_entry] = bar_num;
50451 + ds_addr_table[current_iomm_table_entry] =
50452 + iseries_ds_addr(dev->sysdata) | (bar_num << 24);
50453 bar_size -= IOMM_TABLE_ENTRY_SIZE;
50454 ++current_iomm_table_entry;
50456 @@ -130,7 +356,7 @@
50457 * - Loops through The Bar resources(0 - 5) including the ROM
50460 -static void allocate_device_bars(struct pci_dev *dev)
50461 +static void __init allocate_device_bars(struct pci_dev *dev)
50465 @@ -145,79 +371,19 @@
50466 * PCI: Read Vendor Failed 0x18.58.10 Rc: 0x00xx
50467 * PCI: Connect Bus Unit Failed 0x18.58.10 Rc: 0x00xx
50469 -static void pci_Log_Error(char *Error_Text, int Bus, int SubBus,
50470 - int AgentId, int HvRc)
50471 +static void pci_log_error(char *error, int bus, int subbus,
50472 + int agent, int hv_res)
50474 - if (HvRc == 0x0302)
50475 + if (hv_res == 0x0302)
50477 printk(KERN_ERR "PCI: %s Failed: 0x%02X.%02X.%02X Rc: 0x%04X",
50478 - Error_Text, Bus, SubBus, AgentId, HvRc);
50482 - * iSeries_pci_final_fixup(void)
50484 -void __init iSeries_pci_final_fixup(void)
50486 - struct pci_dev *pdev = NULL;
50487 - struct device_node *node;
50488 - int DeviceCount = 0;
50490 - /* Fix up at the device node and pci_dev relationship */
50491 - mf_display_src(0xC9000100);
50493 - printk("pcibios_final_fixup\n");
50494 - for_each_pci_dev(pdev) {
50495 - node = find_Device_Node(pdev->bus->number, pdev->devfn);
50496 - printk("pci dev %p (%x.%x), node %p\n", pdev,
50497 - pdev->bus->number, pdev->devfn, node);
50499 - if (node != NULL) {
50500 - struct pci_dn *pdn = PCI_DN(node);
50501 - const u32 *agent;
50503 - agent = of_get_property(node, "linux,agent-id", NULL);
50504 - if ((pdn != NULL) && (agent != NULL)) {
50505 - u8 irq = iSeries_allocate_IRQ(pdn->busno, 0,
50509 - err = HvCallXm_connectBusUnit(pdn->busno, pdn->bussubno,
50512 - pci_Log_Error("Connect Bus Unit",
50513 - pdn->busno, pdn->bussubno, *agent, err);
50515 - err = HvCallPci_configStore8(pdn->busno, pdn->bussubno,
50517 - PCI_INTERRUPT_LINE,
50520 - pci_Log_Error("PciCfgStore Irq Failed!",
50521 - pdn->busno, pdn->bussubno, *agent, err);
50528 - pdev->sysdata = (void *)node;
50529 - PCI_DN(node)->pcidev = pdev;
50530 - allocate_device_bars(pdev);
50531 - iSeries_Device_Information(pdev, DeviceCount);
50532 - iommu_devnode_init_iSeries(pdev, node);
50534 - printk("PCI: Device Tree not found for 0x%016lX\n",
50535 - (unsigned long)pdev);
50537 - iSeries_activate_IRQs();
50538 - mf_display_src(0xC9000200);
50539 + error, bus, subbus, agent, hv_res);
50543 * Look down the chain to find the matching Device Device
50545 -static struct device_node *find_Device_Node(int bus, int devfn)
50546 +static struct device_node *find_device_node(int bus, int devfn)
50548 struct device_node *node;
50550 @@ -230,22 +396,66 @@
50556 - * Returns the device node for the passed pci_dev
50557 - * Sanity Check Node PciDev to passed pci_dev
50558 - * If none is found, returns a NULL which the client must handle.
50559 + * iSeries_pcibios_fixup_resources
50561 + * Fixes up all resources for devices
50563 -static struct device_node *get_Device_Node(struct pci_dev *pdev)
50564 +void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev)
50566 + const u32 *agent;
50567 + const u32 *sub_bus;
50568 + unsigned char bus = pdev->bus->number;
50569 struct device_node *node;
50572 + node = find_device_node(bus, pdev->devfn);
50573 + pr_debug("PCI: iSeries %s, pdev %p, node %p\n",
50574 + pci_name(pdev), pdev, node);
50576 + printk("PCI: %s disabled, device tree entry not found !\n",
50578 + for (i = 0; i <= PCI_ROM_RESOURCE; i++)
50579 + pdev->resource[i].flags = 0;
50582 + sub_bus = of_get_property(node, "linux,subbus", NULL);
50583 + agent = of_get_property(node, "linux,agent-id", NULL);
50584 + if (agent && sub_bus) {
50585 + u8 irq = iSeries_allocate_IRQ(bus, 0, *sub_bus);
50588 + err = HvCallXm_connectBusUnit(bus, *sub_bus, *agent, irq);
50590 + pci_log_error("Connect Bus Unit",
50591 + bus, *sub_bus, *agent, err);
50593 + err = HvCallPci_configStore8(bus, *sub_bus,
50594 + *agent, PCI_INTERRUPT_LINE, irq);
50596 + pci_log_error("PciCfgStore Irq Failed!",
50597 + bus, *sub_bus, *agent, err);
50603 - node = pdev->sysdata;
50604 - if (node == NULL || PCI_DN(node)->pcidev != pdev)
50605 - node = find_Device_Node(pdev->bus->number, pdev->devfn);
50607 + pdev->sysdata = node;
50608 + allocate_device_bars(pdev);
50609 + iseries_device_information(pdev, bus, *sub_bus);
50610 + iommu_devnode_init_iSeries(pdev, node);
50614 + * iSeries_pci_final_fixup(void)
50616 +void __init iSeries_pci_final_fixup(void)
50618 + /* Fix up at the device node and pci_dev relationship */
50619 + mf_display_src(0xC9000100);
50620 + iSeries_activate_IRQs();
50621 + mf_display_src(0xC9000200);
50626 * Config space read and write functions.
50627 @@ -269,7 +479,7 @@
50628 static int iSeries_pci_read_config(struct pci_bus *bus, unsigned int devfn,
50629 int offset, int size, u32 *val)
50631 - struct device_node *node = find_Device_Node(bus->number, devfn);
50632 + struct device_node *node = find_device_node(bus->number, devfn);
50634 struct HvCallPci_LoadReturn ret;
50636 @@ -299,7 +509,7 @@
50637 static int iSeries_pci_write_config(struct pci_bus *bus, unsigned int devfn,
50638 int offset, int size, u32 val)
50640 - struct device_node *node = find_Device_Node(bus->number, devfn);
50641 + struct device_node *node = find_device_node(bus->number, devfn);
50645 @@ -331,22 +541,22 @@
50646 * PCI: Device 23.90 ReadL Retry( 1)
50647 * PCI: Device 23.90 ReadL Retry Successful(1)
50649 -static int CheckReturnCode(char *TextHdr, struct device_node *DevNode,
50650 +static int check_return_code(char *type, struct device_node *dn,
50651 int *retry, u64 ret)
50654 - struct pci_dn *pdn = PCI_DN(DevNode);
50655 + struct pci_dn *pdn = PCI_DN(dn);
50658 printk("PCI: %s: Device 0x%04X:%02X I/O Error(%2d): 0x%04X\n",
50659 - TextHdr, pdn->busno, pdn->devfn,
50660 + type, pdn->busno, pdn->devfn,
50663 * Bump the retry and check for retry count exceeded.
50664 * If, Exceeded, panic the system.
50666 - if (((*retry) > Pci_Retry_Max) &&
50667 - (Pci_Error_Flag > 0)) {
50668 + if (((*retry) > PCI_RETRY_MAX) &&
50669 + (limit_pci_retries > 0)) {
50670 mf_display_src(0xB6000103);
50672 panic("PCI: Hardware I/O Error, SRC B6000103, "
50673 @@ -363,28 +573,39 @@
50674 * the exposure of being device global.
50676 static inline struct device_node *xlate_iomm_address(
50677 - const volatile void __iomem *IoAddress,
50678 - u64 *dsaptr, u64 *BarOffsetPtr)
50679 + const volatile void __iomem *addr,
50680 + u64 *dsaptr, u64 *bar_offset, const char *func)
50682 - unsigned long OrigIoAddr;
50683 - unsigned long BaseIoAddr;
50684 - unsigned long TableIndex;
50685 - struct device_node *DevNode;
50686 + unsigned long orig_addr;
50687 + unsigned long base_addr;
50688 + unsigned long ind;
50689 + struct device_node *dn;
50691 - OrigIoAddr = (unsigned long __force)IoAddress;
50692 - if ((OrigIoAddr < BASE_IO_MEMORY) || (OrigIoAddr >= max_io_memory))
50693 + orig_addr = (unsigned long __force)addr;
50694 + if ((orig_addr < BASE_IO_MEMORY) || (orig_addr >= max_io_memory)) {
50695 + static unsigned long last_jiffies;
50696 + static int num_printed;
50698 + if ((jiffies - last_jiffies) > 60 * HZ) {
50699 + last_jiffies = jiffies;
50702 + if (num_printed++ < 10)
50704 + "iSeries_%s: invalid access at IO address %p\n",
50707 - BaseIoAddr = OrigIoAddr - BASE_IO_MEMORY;
50708 - TableIndex = BaseIoAddr / IOMM_TABLE_ENTRY_SIZE;
50709 - DevNode = iomm_table[TableIndex];
50711 - if (DevNode != NULL) {
50712 - int barnum = iobar_table[TableIndex];
50713 - *dsaptr = iseries_ds_addr(DevNode) | (barnum << 24);
50714 - *BarOffsetPtr = BaseIoAddr % IOMM_TABLE_ENTRY_SIZE;
50716 + base_addr = orig_addr - BASE_IO_MEMORY;
50717 + ind = base_addr / IOMM_TABLE_ENTRY_SIZE;
50718 + dn = iomm_table[ind];
50720 + if (dn != NULL) {
50721 + *dsaptr = ds_addr_table[ind];
50722 + *bar_offset = base_addr % IOMM_TABLE_ENTRY_SIZE;
50724 - panic("PCI: Invalid PCI IoAddress detected!\n");
50726 + panic("PCI: Invalid PCI IO address detected!\n");
50731 @@ -392,91 +613,58 @@
50732 * On MM I/O error, all ones are returned and iSeries_pci_IoError is cal
50733 * else, data is returned in Big Endian format.
50735 -static u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress)
50736 +static u8 iseries_readb(const volatile void __iomem *addr)
50742 struct HvCallPci_LoadReturn ret;
50743 - struct device_node *DevNode =
50744 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
50746 - if (DevNode == NULL) {
50747 - static unsigned long last_jiffies;
50748 - static int num_printed;
50749 + struct device_node *dn =
50750 + xlate_iomm_address(addr, &dsa, &bar_offset, "read_byte");
50752 - if ((jiffies - last_jiffies) > 60 * HZ) {
50753 - last_jiffies = jiffies;
50756 - if (num_printed++ < 10)
50757 - printk(KERN_ERR "iSeries_Read_Byte: invalid access at IO address %p\n",
50763 - HvCall3Ret16(HvCallPciBarLoad8, &ret, dsa, BarOffset, 0);
50764 - } while (CheckReturnCode("RDB", DevNode, &retry, ret.rc) != 0);
50765 + HvCall3Ret16(HvCallPciBarLoad8, &ret, dsa, bar_offset, 0);
50766 + } while (check_return_code("RDB", dn, &retry, ret.rc) != 0);
50771 -static u16 iSeries_Read_Word(const volatile void __iomem *IoAddress)
50772 +static u16 iseries_readw_be(const volatile void __iomem *addr)
50778 struct HvCallPci_LoadReturn ret;
50779 - struct device_node *DevNode =
50780 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
50782 - if (DevNode == NULL) {
50783 - static unsigned long last_jiffies;
50784 - static int num_printed;
50785 + struct device_node *dn =
50786 + xlate_iomm_address(addr, &dsa, &bar_offset, "read_word");
50788 - if ((jiffies - last_jiffies) > 60 * HZ) {
50789 - last_jiffies = jiffies;
50792 - if (num_printed++ < 10)
50793 - printk(KERN_ERR "iSeries_Read_Word: invalid access at IO address %p\n",
50799 HvCall3Ret16(HvCallPciBarLoad16, &ret, dsa,
50801 - } while (CheckReturnCode("RDW", DevNode, &retry, ret.rc) != 0);
50803 + } while (check_return_code("RDW", dn, &retry, ret.rc) != 0);
50808 -static u32 iSeries_Read_Long(const volatile void __iomem *IoAddress)
50809 +static u32 iseries_readl_be(const volatile void __iomem *addr)
50815 struct HvCallPci_LoadReturn ret;
50816 - struct device_node *DevNode =
50817 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
50818 + struct device_node *dn =
50819 + xlate_iomm_address(addr, &dsa, &bar_offset, "read_long");
50821 - if (DevNode == NULL) {
50822 - static unsigned long last_jiffies;
50823 - static int num_printed;
50825 - if ((jiffies - last_jiffies) > 60 * HZ) {
50826 - last_jiffies = jiffies;
50829 - if (num_printed++ < 10)
50830 - printk(KERN_ERR "iSeries_Read_Long: invalid access at IO address %p\n",
50836 HvCall3Ret16(HvCallPciBarLoad32, &ret, dsa,
50838 - } while (CheckReturnCode("RDL", DevNode, &retry, ret.rc) != 0);
50840 + } while (check_return_code("RDL", dn, &retry, ret.rc) != 0);
50844 @@ -485,134 +673,72 @@
50845 * Write MM I/O Instructions for the iSeries
50848 -static void iSeries_Write_Byte(u8 data, volatile void __iomem *IoAddress)
50849 +static void iseries_writeb(u8 data, volatile void __iomem *addr)
50856 - struct device_node *DevNode =
50857 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
50859 - if (DevNode == NULL) {
50860 - static unsigned long last_jiffies;
50861 - static int num_printed;
50862 + struct device_node *dn =
50863 + xlate_iomm_address(addr, &dsa, &bar_offset, "write_byte");
50865 - if ((jiffies - last_jiffies) > 60 * HZ) {
50866 - last_jiffies = jiffies;
50869 - if (num_printed++ < 10)
50870 - printk(KERN_ERR "iSeries_Write_Byte: invalid access at IO address %p\n", IoAddress);
50875 - rc = HvCall4(HvCallPciBarStore8, dsa, BarOffset, data, 0);
50876 - } while (CheckReturnCode("WWB", DevNode, &retry, rc) != 0);
50877 + rc = HvCall4(HvCallPciBarStore8, dsa, bar_offset, data, 0);
50878 + } while (check_return_code("WWB", dn, &retry, rc) != 0);
50881 -static void iSeries_Write_Word(u16 data, volatile void __iomem *IoAddress)
50882 +static void iseries_writew_be(u16 data, volatile void __iomem *addr)
50889 - struct device_node *DevNode =
50890 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
50891 + struct device_node *dn =
50892 + xlate_iomm_address(addr, &dsa, &bar_offset, "write_word");
50894 - if (DevNode == NULL) {
50895 - static unsigned long last_jiffies;
50896 - static int num_printed;
50898 - if ((jiffies - last_jiffies) > 60 * HZ) {
50899 - last_jiffies = jiffies;
50902 - if (num_printed++ < 10)
50903 - printk(KERN_ERR "iSeries_Write_Word: invalid access at IO address %p\n",
50909 - rc = HvCall4(HvCallPciBarStore16, dsa, BarOffset, data, 0);
50910 - } while (CheckReturnCode("WWW", DevNode, &retry, rc) != 0);
50911 + rc = HvCall4(HvCallPciBarStore16, dsa, bar_offset, data, 0);
50912 + } while (check_return_code("WWW", dn, &retry, rc) != 0);
50915 -static void iSeries_Write_Long(u32 data, volatile void __iomem *IoAddress)
50916 +static void iseries_writel_be(u32 data, volatile void __iomem *addr)
50923 - struct device_node *DevNode =
50924 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
50926 - if (DevNode == NULL) {
50927 - static unsigned long last_jiffies;
50928 - static int num_printed;
50929 + struct device_node *dn =
50930 + xlate_iomm_address(addr, &dsa, &bar_offset, "write_long");
50932 - if ((jiffies - last_jiffies) > 60 * HZ) {
50933 - last_jiffies = jiffies;
50936 - if (num_printed++ < 10)
50937 - printk(KERN_ERR "iSeries_Write_Long: invalid access at IO address %p\n",
50943 - rc = HvCall4(HvCallPciBarStore32, dsa, BarOffset, data, 0);
50944 - } while (CheckReturnCode("WWL", DevNode, &retry, rc) != 0);
50947 -static u8 iseries_readb(const volatile void __iomem *addr)
50949 - return iSeries_Read_Byte(addr);
50950 + rc = HvCall4(HvCallPciBarStore32, dsa, bar_offset, data, 0);
50951 + } while (check_return_code("WWL", dn, &retry, rc) != 0);
50954 static u16 iseries_readw(const volatile void __iomem *addr)
50956 - return le16_to_cpu(iSeries_Read_Word(addr));
50957 + return le16_to_cpu(iseries_readw_be(addr));
50960 static u32 iseries_readl(const volatile void __iomem *addr)
50962 - return le32_to_cpu(iSeries_Read_Long(addr));
50965 -static u16 iseries_readw_be(const volatile void __iomem *addr)
50967 - return iSeries_Read_Word(addr);
50970 -static u32 iseries_readl_be(const volatile void __iomem *addr)
50972 - return iSeries_Read_Long(addr);
50975 -static void iseries_writeb(u8 data, volatile void __iomem *addr)
50977 - iSeries_Write_Byte(data, addr);
50978 + return le32_to_cpu(iseries_readl_be(addr));
50981 static void iseries_writew(u16 data, volatile void __iomem *addr)
50983 - iSeries_Write_Word(cpu_to_le16(data), addr);
50984 + iseries_writew_be(cpu_to_le16(data), addr);
50987 static void iseries_writel(u32 data, volatile void __iomem *addr)
50989 - iSeries_Write_Long(cpu_to_le32(data), addr);
50992 -static void iseries_writew_be(u16 data, volatile void __iomem *addr)
50994 - iSeries_Write_Word(data, addr);
50997 -static void iseries_writel_be(u32 data, volatile void __iomem *addr)
50999 - iSeries_Write_Long(data, addr);
51000 + iseries_writel(cpu_to_le32(data), addr);
51003 static void iseries_readsb(const volatile void __iomem *addr, void *buf,
51004 @@ -620,7 +746,7 @@
51008 - *(dst++) = iSeries_Read_Byte(addr);
51009 + *(dst++) = iseries_readb(addr);
51012 static void iseries_readsw(const volatile void __iomem *addr, void *buf,
51013 @@ -628,7 +754,7 @@
51017 - *(dst++) = iSeries_Read_Word(addr);
51018 + *(dst++) = iseries_readw_be(addr);
51021 static void iseries_readsl(const volatile void __iomem *addr, void *buf,
51022 @@ -636,7 +762,7 @@
51026 - *(dst++) = iSeries_Read_Long(addr);
51027 + *(dst++) = iseries_readl_be(addr);
51030 static void iseries_writesb(volatile void __iomem *addr, const void *buf,
51031 @@ -644,7 +770,7 @@
51033 const u8 *src = buf;
51035 - iSeries_Write_Byte(*(src++), addr);
51036 + iseries_writeb(*(src++), addr);
51039 static void iseries_writesw(volatile void __iomem *addr, const void *buf,
51040 @@ -652,7 +778,7 @@
51042 const u16 *src = buf;
51044 - iSeries_Write_Word(*(src++), addr);
51045 + iseries_writew_be(*(src++), addr);
51048 static void iseries_writesl(volatile void __iomem *addr, const void *buf,
51049 @@ -660,7 +786,7 @@
51051 const u32 *src = buf;
51053 - iSeries_Write_Long(*(src++), addr);
51054 + iseries_writel_be(*(src++), addr);
51057 static void iseries_memset_io(volatile void __iomem *addr, int c,
51058 @@ -669,7 +795,7 @@
51059 volatile char __iomem *d = addr;
51062 - iSeries_Write_Byte(c, d++);
51063 + iseries_writeb(c, d++);
51066 static void iseries_memcpy_fromio(void *dest, const volatile void __iomem *src,
51067 @@ -679,7 +805,7 @@
51068 const volatile char __iomem *s = src;
51071 - *d++ = iSeries_Read_Byte(s++);
51072 + *d++ = iseries_readb(s++);
51075 static void iseries_memcpy_toio(volatile void __iomem *dest, const void *src,
51076 @@ -689,7 +815,7 @@
51077 volatile char __iomem *d = dest;
51080 - iSeries_Write_Byte(*s++, d++);
51081 + iseries_writeb(*s++, d++);
51084 /* We only set MMIO ops. The default PIO ops will be default
51085 @@ -742,6 +868,8 @@
51086 /* Install IO hooks */
51087 ppc_pci_io = iseries_pci_io;
51089 + pci_probe_only = 1;
51091 /* iSeries has no IO space in the common sense, it needs to set
51094 @@ -767,11 +895,21 @@
51095 phb = pcibios_alloc_controller(node);
51098 + /* All legacy iSeries PHBs are in domain zero */
51099 + phb->global_number = 0;
51101 - phb->pci_mem_offset = bus;
51102 phb->first_busno = bus;
51103 phb->last_busno = bus;
51104 phb->ops = &iSeries_pci_ops;
51105 + phb->io_base_virt = (void __iomem *)_IO_BASE;
51106 + phb->io_resource.flags = IORESOURCE_IO;
51107 + phb->io_resource.start = BASE_IO_MEMORY;
51108 + phb->io_resource.end = END_IO_MEMORY;
51109 + phb->io_resource.name = "iSeries PCI IO";
51110 + phb->mem_resources[0].flags = IORESOURCE_MEM;
51111 + phb->mem_resources[0].start = BASE_IO_MEMORY;
51112 + phb->mem_resources[0].end = END_IO_MEMORY;
51113 + phb->mem_resources[0].name = "Series PCI MEM";
51117 --- a/arch/powerpc/platforms/iseries/pci.h
51118 +++ b/arch/powerpc/platforms/iseries/pci.h
51120 * End Change Activity
51123 -#include <asm/pci-bridge.h>
51125 -struct pci_dev; /* For Forward Reference */
51128 * Decodes Linux DevFn to iSeries DevFn, bridge device, or function.
51129 * For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h
51130 @@ -47,17 +43,16 @@
51131 #define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus) ((subbus >> 5) & 0x7)
51132 #define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7)
51135 - * Generate a Direct Select Address for the Hypervisor
51137 -static inline u64 iseries_ds_addr(struct device_node *node)
51139 - struct pci_dn *pdn = PCI_DN(node);
51141 - return ((u64)pdn->busno << 48) + ((u64)pdn->bussubno << 40)
51142 - + ((u64)0x10 << 32);
51146 -extern void iSeries_Device_Information(struct pci_dev*, int);
51148 +extern void iSeries_pcibios_init(void);
51149 +extern void iSeries_pci_final_fixup(void);
51150 +extern void iSeries_pcibios_fixup_resources(struct pci_dev *dev);
51152 +static inline void iSeries_pcibios_init(void) { }
51153 +static inline void iSeries_pci_final_fixup(void) { }
51154 +static inline void iSeries_pcibios_fixup_resources(struct pci_dev *dev) {}
51157 #endif /* _PLATFORMS_ISERIES_PCI_H */
51158 --- a/arch/powerpc/platforms/iseries/setup.c
51159 +++ b/arch/powerpc/platforms/iseries/setup.c
51161 #include "main_store.h"
51162 #include "call_sm.h"
51163 #include "call_hpt.h"
51167 #define DBG(fmt...) udbg_printf(fmt)
51169 static unsigned long build_iSeries_Memory_Map(void);
51170 static void iseries_shared_idle(void);
51171 static void iseries_dedicated_idle(void);
51173 -extern void iSeries_pci_final_fixup(void);
51175 -static void iSeries_pci_final_fixup(void) { }
51179 struct MemoryBlock {
51180 @@ -112,13 +108,13 @@
51183 mb_array[0].logicalStart = 0;
51184 - mb_array[0].logicalEnd = 0x100000000;
51185 + mb_array[0].logicalEnd = 0x100000000UL;
51186 mb_array[0].absStart = 0;
51187 - mb_array[0].absEnd = 0x100000000;
51188 + mb_array[0].absEnd = 0x100000000UL;
51191 numMemoryBlocks = 2;
51192 - holeStart = holeStart & 0x000fffffffffffff;
51193 + holeStart = holeStart & 0x000fffffffffffffUL;
51194 holeStart = addr_to_chunk(holeStart);
51195 holeFirstChunk = holeStart;
51196 holeSize = addr_to_chunk(holeSize);
51197 @@ -128,9 +124,9 @@
51198 mb_array[0].logicalEnd = holeFirstChunk;
51199 mb_array[0].absEnd = holeFirstChunk;
51200 mb_array[1].logicalStart = holeFirstChunk;
51201 - mb_array[1].logicalEnd = 0x100000000 - holeSizeChunks;
51202 + mb_array[1].logicalEnd = 0x100000000UL - holeSizeChunks;
51203 mb_array[1].absStart = holeFirstChunk + holeSizeChunks;
51204 - mb_array[1].absEnd = 0x100000000;
51205 + mb_array[1].absEnd = 0x100000000UL;
51207 return numMemoryBlocks;
51209 @@ -234,9 +230,9 @@
51210 mb_array[i].logicalEnd,
51211 mb_array[i].absStart, mb_array[i].absEnd);
51212 mb_array[i].absStart = addr_to_chunk(mb_array[i].absStart &
51213 - 0x000fffffffffffff);
51214 + 0x000fffffffffffffUL);
51215 mb_array[i].absEnd = addr_to_chunk(mb_array[i].absEnd &
51216 - 0x000fffffffffffff);
51217 + 0x000fffffffffffffUL);
51218 mb_array[i].logicalStart =
51219 addr_to_chunk(mb_array[i].logicalStart);
51220 mb_array[i].logicalEnd = addr_to_chunk(mb_array[i].logicalEnd);
51221 @@ -320,7 +316,7 @@
51223 EXPORT_SYMBOL(mschunks_map);
51225 -void mschunks_alloc(unsigned long num_chunks)
51226 +static void mschunks_alloc(unsigned long num_chunks)
51228 klimit = _ALIGN(klimit, sizeof(u32));
51229 mschunks_map.mapping = (u32 *)klimit;
51230 @@ -499,6 +495,8 @@
51231 itVpdAreas.xSlicMaxLogicalProcs);
51232 printk("Max physical processors = %d\n",
51233 itVpdAreas.xSlicMaxPhysicalProcs);
51235 + iSeries_pcibios_init();
51238 static void iSeries_show_cpuinfo(struct seq_file *m)
51239 @@ -641,24 +639,25 @@
51242 define_machine(iseries) {
51243 - .name = "iSeries",
51244 - .setup_arch = iSeries_setup_arch,
51245 - .show_cpuinfo = iSeries_show_cpuinfo,
51246 - .init_IRQ = iSeries_init_IRQ,
51247 - .get_irq = iSeries_get_irq,
51248 - .init_early = iSeries_init_early,
51249 - .pcibios_fixup = iSeries_pci_final_fixup,
51250 - .restart = mf_reboot,
51251 - .power_off = mf_power_off,
51252 - .halt = mf_power_off,
51253 - .get_boot_time = iSeries_get_boot_time,
51254 - .set_rtc_time = iSeries_set_rtc_time,
51255 - .get_rtc_time = iSeries_get_rtc_time,
51256 - .calibrate_decr = generic_calibrate_decr,
51257 - .progress = iSeries_progress,
51258 - .probe = iseries_probe,
51259 - .ioremap = iseries_ioremap,
51260 - .iounmap = iseries_iounmap,
51261 + .name = "iSeries",
51262 + .setup_arch = iSeries_setup_arch,
51263 + .show_cpuinfo = iSeries_show_cpuinfo,
51264 + .init_IRQ = iSeries_init_IRQ,
51265 + .get_irq = iSeries_get_irq,
51266 + .init_early = iSeries_init_early,
51267 + .pcibios_fixup = iSeries_pci_final_fixup,
51268 + .pcibios_fixup_resources= iSeries_pcibios_fixup_resources,
51269 + .restart = mf_reboot,
51270 + .power_off = mf_power_off,
51271 + .halt = mf_power_off,
51272 + .get_boot_time = iSeries_get_boot_time,
51273 + .set_rtc_time = iSeries_set_rtc_time,
51274 + .get_rtc_time = iSeries_get_rtc_time,
51275 + .calibrate_decr = generic_calibrate_decr,
51276 + .progress = iSeries_progress,
51277 + .probe = iseries_probe,
51278 + .ioremap = iseries_ioremap,
51279 + .iounmap = iseries_iounmap,
51280 /* XXX Implement enable_pmcs for iSeries */
51283 --- a/arch/powerpc/platforms/iseries/setup.h
51284 +++ b/arch/powerpc/platforms/iseries/setup.h
51286 #ifndef __ISERIES_SETUP_H__
51287 #define __ISERIES_SETUP_H__
51289 +extern void *iSeries_early_setup(void);
51290 extern unsigned long iSeries_get_boot_time(void);
51291 extern int iSeries_set_rtc_time(struct rtc_time *tm);
51292 extern void iSeries_get_rtc_time(struct rtc_time *tm);
51293 --- a/arch/powerpc/platforms/iseries/vpdinfo.c
51297 - * This code gets the card location of the hardware
51298 - * Copyright (C) 2001 <Allan H Trautman> <IBM Corp>
51299 - * Copyright (C) 2005 Stephen Rothwel, IBM Corp
51301 - * This program is free software; you can redistribute it and/or modify
51302 - * it under the terms of the GNU General Public License as published by
51303 - * the Free Software Foundation; either version 2 of the License, or
51304 - * (at your option) any later version.
51306 - * This program is distributed in the hope that it will be useful,
51307 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
51308 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51309 - * GNU General Public License for more details.
51311 - * You should have received a copy of the GNU General Public License
51312 - * along with this program; if not, write to the:
51313 - * Free Software Foundation, Inc.,
51314 - * 59 Temple Place, Suite 330,
51315 - * Boston, MA 02111-1307 USA
51317 - * Change Activity:
51318 - * Created, Feb 2, 2001
51319 - * Ported to ppc64, August 20, 2001
51320 - * End Change Activity
51322 -#include <linux/init.h>
51323 -#include <linux/module.h>
51324 -#include <linux/pci.h>
51326 -#include <asm/types.h>
51327 -#include <asm/resource.h>
51328 -#include <asm/abs_addr.h>
51329 -#include <asm/pci-bridge.h>
51330 -#include <asm/iseries/hv_types.h>
51333 -#include "call_pci.h"
51336 - * Size of Bus VPD data
51338 -#define BUS_VPDSIZE 1024
51343 -#define VpdEndOfAreaTag 0x79
51344 -#define VpdIdStringTag 0x82
51345 -#define VpdVendorAreaTag 0x84
51350 -#define VpdFruFrameId 0x4649 // "FI"
51351 -#define VpdSlotMapFormat 0x4D46 // "MF"
51352 -#define VpdSlotMap 0x534D // "SM"
51355 - * Structures of the areas
51357 -struct MfgVpdAreaStruct {
51363 -typedef struct MfgVpdAreaStruct MfgArea;
51364 -#define MFG_ENTRY_SIZE 3
51366 -struct SlotMapStruct {
51368 - u8 SecondaryAgentId;
51370 - char CardLocation[3];
51372 - char Reserved[2];
51374 -typedef struct SlotMapStruct SlotMap;
51375 -#define SLOT_ENTRY_SIZE 16
51378 - * Parse the Slot Area
51380 -static void __init iSeries_Parse_SlotArea(SlotMap *MapPtr, int MapLen,
51381 - HvAgentId agent, u8 *PhbId, char card[4])
51383 - int SlotMapLen = MapLen;
51384 - SlotMap *SlotMapPtr = MapPtr;
51387 - * Parse Slot label until we find the one requested
51389 - while (SlotMapLen > 0) {
51390 - if (SlotMapPtr->AgentId == agent) {
51392 - * If Phb wasn't found, grab the entry first one found.
51394 - if (*PhbId == 0xff)
51395 - *PhbId = SlotMapPtr->PhbId;
51396 - /* Found it, extract the data. */
51397 - if (SlotMapPtr->PhbId == *PhbId) {
51398 - memcpy(card, &SlotMapPtr->CardLocation, 3);
51403 - /* Point to the next Slot */
51404 - SlotMapPtr = (SlotMap *)((char *)SlotMapPtr + SLOT_ENTRY_SIZE);
51405 - SlotMapLen -= SLOT_ENTRY_SIZE;
51410 - * Parse the Mfg Area
51412 -static void __init iSeries_Parse_MfgArea(u8 *AreaData, int AreaLen,
51413 - HvAgentId agent, u8 *PhbId,
51414 - u8 *frame, char card[4])
51416 - MfgArea *MfgAreaPtr = (MfgArea *)AreaData;
51417 - int MfgAreaLen = AreaLen;
51418 - u16 SlotMapFmt = 0;
51420 - /* Parse Mfg Data */
51421 - while (MfgAreaLen > 0) {
51422 - int MfgTagLen = MfgAreaPtr->TagLength;
51423 - /* Frame ID (FI 4649020310 ) */
51424 - if (MfgAreaPtr->Tag == VpdFruFrameId) /* FI */
51425 - *frame = MfgAreaPtr->AreaData1;
51426 - /* Slot Map Format (MF 4D46020004 ) */
51427 - else if (MfgAreaPtr->Tag == VpdSlotMapFormat) /* MF */
51428 - SlotMapFmt = (MfgAreaPtr->AreaData1 * 256)
51429 - + MfgAreaPtr->AreaData2;
51430 - /* Slot Map (SM 534D90 */
51431 - else if (MfgAreaPtr->Tag == VpdSlotMap) { /* SM */
51432 - SlotMap *SlotMapPtr;
51434 - if (SlotMapFmt == 0x1004)
51435 - SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr
51436 - + MFG_ENTRY_SIZE + 1);
51438 - SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr
51439 - + MFG_ENTRY_SIZE);
51440 - iSeries_Parse_SlotArea(SlotMapPtr, MfgTagLen,
51441 - agent, PhbId, card);
51444 - * Point to the next Mfg Area
51445 - * Use defined size, sizeof give wrong answer
51447 - MfgAreaPtr = (MfgArea *)((char *)MfgAreaPtr + MfgTagLen
51448 - + MFG_ENTRY_SIZE);
51449 - MfgAreaLen -= (MfgTagLen + MFG_ENTRY_SIZE);
51454 - * Look for "BUS".. Data is not Null terminated.
51455 - * PHBID of 0xFF indicates PHB was not found in VPD Data.
51457 -static int __init iSeries_Parse_PhbId(u8 *AreaPtr, int AreaLength)
51459 - u8 *PhbPtr = AreaPtr;
51460 - int DataLen = AreaLength;
51461 - char PhbId = 0xFF;
51463 - while (DataLen > 0) {
51464 - if ((*PhbPtr == 'B') && (*(PhbPtr + 1) == 'U')
51465 - && (*(PhbPtr + 2) == 'S')) {
51467 - while (*PhbPtr == ' ')
51469 - PhbId = (*PhbPtr & 0x0F);
51479 - * Parse out the VPD Areas
51481 -static void __init iSeries_Parse_Vpd(u8 *VpdData, int VpdDataLen,
51482 - HvAgentId agent, u8 *frame, char card[4])
51484 - u8 *TagPtr = VpdData;
51485 - int DataLen = VpdDataLen - 3;
51488 - while ((*TagPtr != VpdEndOfAreaTag) && (DataLen > 0)) {
51489 - int AreaLen = *(TagPtr + 1) + (*(TagPtr + 2) * 256);
51490 - u8 *AreaData = TagPtr + 3;
51492 - if (*TagPtr == VpdIdStringTag)
51493 - PhbId = iSeries_Parse_PhbId(AreaData, AreaLen);
51494 - else if (*TagPtr == VpdVendorAreaTag)
51495 - iSeries_Parse_MfgArea(AreaData, AreaLen,
51496 - agent, &PhbId, frame, card);
51497 - /* Point to next Area. */
51498 - TagPtr = AreaData + AreaLen;
51499 - DataLen -= AreaLen;
51503 -static int __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent,
51504 - u8 *frame, char card[4])
51507 - int BusVpdLen = 0;
51508 - u8 *BusVpdPtr = kmalloc(BUS_VPDSIZE, GFP_KERNEL);
51510 - if (BusVpdPtr == NULL) {
51511 - printk("PCI: Bus VPD Buffer allocation failure.\n");
51514 - BusVpdLen = HvCallPci_getBusVpd(bus, iseries_hv_addr(BusVpdPtr),
51516 - if (BusVpdLen == 0) {
51517 - printk("PCI: Bus VPD Buffer zero length.\n");
51520 - /* printk("PCI: BusVpdPtr: %p, %d\n",BusVpdPtr, BusVpdLen); */
51521 - /* Make sure this is what I think it is */
51522 - if (*BusVpdPtr != VpdIdStringTag) { /* 0x82 */
51523 - printk("PCI: Bus VPD Buffer missing starting tag.\n");
51526 - iSeries_Parse_Vpd(BusVpdPtr, BusVpdLen, agent, frame, card);
51529 - kfree(BusVpdPtr);
51534 - * Prints the device information.
51535 - * - Pass in pci_dev* pointer to the device.
51536 - * - Pass in the device count
51539 - * PCI: Bus 0, Device 26, Vendor 0x12AE Frame 1, Card C10 Ethernet
51542 -void __init iSeries_Device_Information(struct pci_dev *PciDev, int count)
51544 - struct device_node *DevNode = PciDev->sysdata;
51545 - struct pci_dn *pdn;
51549 - HvSubBusNumber subbus;
51552 - if (DevNode == NULL) {
51553 - printk("%d. PCI: iSeries_Device_Information DevNode is NULL\n",
51558 - pdn = PCI_DN(DevNode);
51559 - bus = pdn->busno;
51560 - subbus = pdn->bussubno;
51561 - agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus),
51562 - ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus));
51564 - if (iSeries_Get_Location_Code(bus, agent, &frame, card)) {
51565 - printk("%d. PCI: Bus%3d, Device%3d, Vendor %04X Frame%3d, "
51566 - "Card %4s 0x%04X\n", count, bus,
51567 - PCI_SLOT(PciDev->devfn), PciDev->vendor, frame,
51568 - card, (int)(PciDev->class >> 8));
51571 --- a/arch/powerpc/platforms/maple/Kconfig
51572 +++ b/arch/powerpc/platforms/maple/Kconfig
51575 depends on PPC_MULTIPLATFORM && PPC64
51576 bool "Maple 970FX Evaluation Board"
51580 select MPIC_U3_HT_IRQS
51581 --- a/arch/powerpc/platforms/maple/pci.c
51582 +++ b/arch/powerpc/platforms/maple/pci.c
51583 @@ -558,7 +558,7 @@
51584 * safe assumptions hopefully.
51587 - struct device_node *np = u3_agp->arch_data;
51588 + struct device_node *np = u3_agp->dn;
51589 PCI_DN(np)->busno = 0xf0;
51590 for (np = np->child; np; np = np->sibling)
51591 PCI_DN(np)->busno = 0xf0;
51592 --- a/arch/powerpc/platforms/maple/setup.c
51593 +++ b/arch/powerpc/platforms/maple/setup.c
51595 #include <linux/serial.h>
51596 #include <linux/smp.h>
51597 #include <linux/bitops.h>
51598 +#include <linux/of_device.h>
51600 #include <asm/processor.h>
51601 #include <asm/sections.h>
51603 #include <asm/dma.h>
51604 #include <asm/cputable.h>
51605 #include <asm/time.h>
51606 -#include <asm/of_device.h>
51607 #include <asm/lmb.h>
51608 #include <asm/mpic.h>
51609 #include <asm/rtas.h>
51610 --- a/arch/powerpc/platforms/pasemi/Kconfig
51611 +++ b/arch/powerpc/platforms/pasemi/Kconfig
51613 bool "PA Semi SoC-based platforms"
51617 select PPC_UDBG_16550
51619 select MPIC_BROKEN_REGREAD
51621 bool "PA Semi IOMMU support"
51622 depends on PPC_PASEMI
51624 - IOMMU support for PA6T-1682M
51625 + IOMMU support for PA Semi PWRficient
51627 config PPC_PASEMI_IOMMU_DMA_FORCE
51628 bool "Force DMA engine to use IOMMU"
51631 Driver for MDIO via GPIO on PWRficient platforms
51633 -config ELECTRA_IDE
51634 - tristate "Electra IDE driver"
51636 - depends on PPC_PASEMI && ATA
51637 - select PATA_PLATFORM
51639 - This includes driver support for the Electra on-board IDE
51643 --- a/arch/powerpc/platforms/pasemi/Makefile
51644 +++ b/arch/powerpc/platforms/pasemi/Makefile
51646 obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o
51647 obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o
51648 -obj-$(CONFIG_ELECTRA_IDE) += electra_ide.o
51649 obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o
51650 --- a/arch/powerpc/platforms/pasemi/cpufreq.c
51651 +++ b/arch/powerpc/platforms/pasemi/cpufreq.c
51653 #include <asm/io.h>
51654 #include <asm/prom.h>
51655 #include <asm/time.h>
51656 +#include <asm/smp.h>
51658 #define SDCASR_REG 0x0100
51659 #define SDCASR_REG_STRIDE 0x1000
51660 @@ -124,6 +125,11 @@
51661 local_irq_restore(flags);
51664 +int check_astate(void)
51666 + return get_cur_astate(hard_smp_processor_id());
51669 void restore_astate(int cpu)
51671 set_astate(cpu, current_astate);
51672 @@ -147,7 +153,10 @@
51676 - dn = of_find_compatible_node(NULL, "sdc", "1682m-sdc");
51677 + dn = of_find_compatible_node(NULL, NULL, "1682m-sdc");
51679 + dn = of_find_compatible_node(NULL, NULL,
51680 + "pasemi,pwrficient-sdc");
51683 err = of_address_to_resource(dn, 0, &res);
51684 @@ -160,7 +169,10 @@
51688 - dn = of_find_compatible_node(NULL, "gizmo", "1682m-gizmo");
51689 + dn = of_find_compatible_node(NULL, NULL, "1682m-gizmo");
51691 + dn = of_find_compatible_node(NULL, NULL,
51692 + "pasemi,pwrficient-gizmo");
51695 goto out_unmap_sdcasr;
51696 @@ -292,7 +304,8 @@
51698 static int __init pas_cpufreq_init(void)
51700 - if (!machine_is_compatible("PA6T-1682M"))
51701 + if (!machine_is_compatible("PA6T-1682M") &&
51702 + !machine_is_compatible("pasemi,pwrficient"))
51705 return cpufreq_register_driver(&pas_cpufreq_driver);
51706 --- a/arch/powerpc/platforms/pasemi/electra_ide.c
51710 - * Copyright (C) 2007 PA Semi, Inc
51712 - * Maintained by: Olof Johansson <olof@lixom.net>
51714 - * This program is free software; you can redistribute it and/or modify
51715 - * it under the terms of the GNU General Public License version 2 as
51716 - * published by the Free Software Foundation.
51718 - * This program is distributed in the hope that it will be useful,
51719 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
51720 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51721 - * GNU General Public License for more details.
51723 - * You should have received a copy of the GNU General Public License
51724 - * along with this program; if not, write to the Free Software
51725 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51728 -#include <linux/platform_device.h>
51730 -#include <asm/prom.h>
51731 -#include <asm/system.h>
51733 -/* The electra IDE interface is incredibly simple: Just a device on the localbus
51734 - * with interrupts hooked up to one of the GPIOs. The device tree contains the
51735 - * address window and interrupt mappings already, and the pata_platform driver handles
51736 - * the rest. We just need to hook the two up.
51739 -#define MAX_IFS 4 /* really, we have only one */
51741 -static struct platform_device *pdevs[MAX_IFS];
51743 -static int __devinit electra_ide_init(void)
51745 - struct device_node *np;
51746 - struct resource r[3];
51750 - np = of_find_compatible_node(NULL, "ide", "electra-ide");
51753 - while (np && i < MAX_IFS) {
51754 - memset(r, 0, sizeof(r));
51756 - /* pata_platform wants two address ranges: one for the base registers,
51757 - * another for the control (altstatus). It's located at offset 0x3f6 in
51758 - * the window, but the device tree only has one large register window
51759 - * that covers both ranges. So we need to split it up by hand here:
51762 - ret = of_address_to_resource(np, 0, &r[0]);
51765 - ret = of_address_to_resource(np, 0, &r[1]);
51769 - r[1].start += 0x3f6;
51770 - r[0].end = r[1].start-1;
51772 - r[2].start = irq_of_parse_and_map(np, 0);
51773 - r[2].end = irq_of_parse_and_map(np, 0);
51774 - r[2].flags = IORESOURCE_IRQ;
51776 - pr_debug("registering platform device at 0x%lx/0x%lx, irq is %ld\n",
51777 - r[0].start, r[1].start, r[2].start);
51778 - pdevs[i] = platform_device_register_simple("pata_platform", i, r, 3);
51779 - if (IS_ERR(pdevs[i])) {
51780 - ret = PTR_ERR(pdevs[i]);
51784 - np = of_find_compatible_node(np, "ide", "electra-ide");
51789 -module_init(electra_ide_init);
51791 -static void __devexit electra_ide_exit(void)
51795 - for (i = 0; i < MAX_IFS; i++)
51797 - platform_device_unregister(pdevs[i]);
51799 -module_exit(electra_ide_exit);
51802 -MODULE_LICENSE("GPL");
51803 -MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>");
51804 -MODULE_DESCRIPTION("PA Semi Electra IDE driver");
51805 --- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
51806 +++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
51808 #include <linux/interrupt.h>
51809 #include <linux/phy.h>
51810 #include <linux/platform_device.h>
51811 -#include <asm/of_platform.h>
51812 +#include <linux/of_platform.h>
51816 @@ -218,45 +218,27 @@
51817 const struct of_device_id *match)
51819 struct device *dev = &ofdev->dev;
51820 - struct device_node *np = ofdev->node;
51821 - struct device_node *gpio_np;
51822 + struct device_node *phy_dn, *np = ofdev->node;
51823 struct mii_bus *new_bus;
51824 - struct resource res;
51825 struct gpio_priv *priv;
51826 const unsigned int *prop;
51831 - gpio_np = of_find_compatible_node(NULL, "gpio", "1682m-gpio");
51836 - err = of_address_to_resource(gpio_np, 0, &res);
51837 - of_node_put(gpio_np);
51843 - gpio_regs = ioremap(res.start, 0x100);
51849 priv = kzalloc(sizeof(struct gpio_priv), GFP_KERNEL);
51850 - if (priv == NULL)
51855 new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
51857 - if (new_bus == NULL)
51860 + goto out_free_priv;
51862 - new_bus->name = "pasemi gpio mdio bus",
51863 - new_bus->read = &gpio_mdio_read,
51864 - new_bus->write = &gpio_mdio_write,
51865 - new_bus->reset = &gpio_mdio_reset,
51866 + new_bus->name = "pasemi gpio mdio bus";
51867 + new_bus->read = &gpio_mdio_read;
51868 + new_bus->write = &gpio_mdio_write;
51869 + new_bus->reset = &gpio_mdio_reset;
51871 prop = of_get_property(np, "reg", NULL);
51872 new_bus->id = *prop;
51873 @@ -265,9 +247,24 @@
51874 new_bus->phy_mask = 0;
51876 new_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
51877 - for(i = 0; i < PHY_MAX_ADDR; ++i)
51878 - new_bus->irq[i] = irq_create_mapping(NULL, 10);
51880 + if (!new_bus->irq)
51881 + goto out_free_bus;
51883 + for (i = 0; i < PHY_MAX_ADDR; i++)
51884 + new_bus->irq[i] = NO_IRQ;
51886 + for (phy_dn = of_get_next_child(np, NULL);
51888 + phy_dn = of_get_next_child(np, phy_dn)) {
51889 + const unsigned int *ip, *regp;
51891 + ip = of_get_property(phy_dn, "interrupts", NULL);
51892 + regp = of_get_property(phy_dn, "reg", NULL);
51893 + if (!ip || !regp || *regp >= PHY_MAX_ADDR)
51895 + new_bus->irq[*regp] = irq_create_mapping(NULL, *ip);
51898 prop = of_get_property(np, "mdc-pin", NULL);
51899 priv->mdc_pin = *prop;
51900 @@ -280,17 +277,21 @@
51902 err = mdiobus_register(new_bus);
51906 printk(KERN_ERR "%s: Cannot register as MDIO bus, err %d\n",
51907 new_bus->name, err);
51908 - goto bus_register_fail;
51909 + goto out_free_irq;
51914 -bus_register_fail:
51916 + kfree(new_bus->irq);
51926 @@ -317,6 +318,7 @@
51930 +MODULE_DEVICE_TABLE(of, gpio_mdio_match);
51932 static struct of_platform_driver gpio_mdio_driver =
51934 @@ -330,12 +332,32 @@
51936 int gpio_mdio_init(void)
51938 + struct device_node *np;
51940 + np = of_find_compatible_node(NULL, NULL, "1682m-gpio");
51942 + np = of_find_compatible_node(NULL, NULL,
51943 + "pasemi,pwrficient-gpio");
51946 + gpio_regs = of_iomap(np, 0);
51952 return of_register_platform_driver(&gpio_mdio_driver);
51954 +module_init(gpio_mdio_init);
51956 void gpio_mdio_exit(void)
51958 of_unregister_platform_driver(&gpio_mdio_driver);
51960 + iounmap(gpio_regs);
51962 -device_initcall(gpio_mdio_init);
51963 +module_exit(gpio_mdio_exit);
51965 +MODULE_LICENSE("GPL");
51966 +MODULE_AUTHOR("Olof Johansson <olof@lixom.net>");
51967 +MODULE_DESCRIPTION("Driver for MDIO over GPIO on PA Semi PWRficient-based boards");
51968 --- a/arch/powerpc/platforms/pasemi/idle.c
51969 +++ b/arch/powerpc/platforms/pasemi/idle.c
51972 static int __init pasemi_idle_init(void)
51974 - if (!machine_is(pasemi))
51977 #ifndef CONFIG_PPC_PASEMI_CPUFREQ
51978 printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n");
51984 -late_initcall(pasemi_idle_init);
51985 +machine_late_initcall(pasemi, pasemi_idle_init);
51987 static int __init idle_param(char *p)
51989 --- a/arch/powerpc/platforms/pasemi/pasemi.h
51990 +++ b/arch/powerpc/platforms/pasemi/pasemi.h
51993 /* Restore astate to last set */
51994 #ifdef CONFIG_PPC_PASEMI_CPUFREQ
51995 +extern int check_astate(void);
51996 extern void restore_astate(int cpu);
51998 +static inline int check_astate(void)
52000 + /* Always return >0 so we never power save */
52003 static inline void restore_astate(int cpu)
52006 --- a/arch/powerpc/platforms/pasemi/powersave.S
52007 +++ b/arch/powerpc/platforms/pasemi/powersave.S
52012 +#ifdef CONFIG_PPC_PASEMI_CPUFREQ
52015 + /* Only do power savings when in astate 0 */
52022 LOAD_REG_IMMEDIATE(r6,MSR_DR|MSR_IR|MSR_ME|MSR_EE)
52034 --- a/arch/powerpc/platforms/pasemi/setup.c
52035 +++ b/arch/powerpc/platforms/pasemi/setup.c
52037 #include <linux/delay.h>
52038 #include <linux/console.h>
52039 #include <linux/pci.h>
52040 +#include <linux/of_platform.h>
52042 #include <asm/prom.h>
52043 #include <asm/system.h>
52045 #include <asm/mpic.h>
52046 #include <asm/smp.h>
52047 #include <asm/time.h>
52048 -#include <asm/of_platform.h>
52049 +#include <asm/mmu.h>
52051 #include <pcmcia/ss.h>
52052 #include <pcmcia/cistpl.h>
52055 #include "pasemi.h"
52057 +#if !defined(CONFIG_SMP)
52058 +static void smp_send_stop(void) {}
52061 /* SDC reset register, must be pre-mapped at reset time */
52062 static void __iomem *reset_reg;
52064 @@ -56,10 +61,14 @@
52066 static struct mce_regs mce_regs[MAX_MCE_REGS];
52067 static int num_mce_regs;
52068 +static int nmi_virq = NO_IRQ;
52071 static void pas_restart(char *cmd)
52073 + /* Need to put others cpu in hold loop so they're not sleeping */
52076 printk("Restarting...\n");
52078 out_le32(reset_reg, 0x6000000);
52079 @@ -126,9 +135,6 @@
52080 struct pci_dev *dev;
52083 - if (!machine_is(pasemi))
52086 /* Remap various SoC status registers for use by the MCE handler */
52089 @@ -172,7 +178,7 @@
52093 -device_initcall(pas_setup_mce_regs);
52094 +machine_device_initcall(pasemi, pas_setup_mce_regs);
52096 static __init void pas_init_IRQ(void)
52098 @@ -181,6 +187,8 @@
52099 unsigned long openpic_addr;
52100 const unsigned int *opprop;
52103 + const unsigned int *nmiprop;
52107 @@ -213,13 +221,26 @@
52108 openpic_addr = of_read_number(opprop, naddr);
52109 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
52111 + mpic_flags = MPIC_PRIMARY | MPIC_LARGE_VECTORS | MPIC_NO_BIAS;
52113 + nmiprop = of_get_property(mpic_node, "nmi-source", NULL);
52115 + mpic_flags |= MPIC_ENABLE_MCK;
52117 mpic = mpic_alloc(mpic_node, openpic_addr,
52118 - MPIC_PRIMARY|MPIC_LARGE_VECTORS,
52119 - 0, 0, " PAS-OPIC ");
52120 + mpic_flags, 0, 0, "PASEMI-OPIC");
52123 mpic_assign_isu(mpic, 0, openpic_addr + 0x10000);
52125 + /* The NMI/MCK source needs to be prio 15 */
52127 + nmi_virq = irq_create_mapping(NULL, *nmiprop);
52128 + mpic_irq_set_priority(nmi_virq, 15);
52129 + set_irq_type(nmi_virq, IRQ_TYPE_EDGE_RISING);
52130 + mpic_unmask_irq(nmi_virq);
52133 of_node_put(mpic_node);
52136 @@ -239,6 +260,14 @@
52141 + if (nmi_virq != NO_IRQ && mpic_get_mcirq() == nmi_virq) {
52142 + printk(KERN_ERR "NMI delivered\n");
52144 + mpic_end_irq(nmi_virq);
52148 dsisr = mfspr(SPRN_DSISR);
52149 printk(KERN_ERR "Machine Check on CPU %d\n", cpu);
52150 printk(KERN_ERR "SRR0 0x%016lx SRR1 0x%016lx\n", srr0, srr1);
52151 @@ -295,14 +324,14 @@
52154 printk(KERN_ERR "slb contents:\n");
52155 - for (i = 0; i < SLB_NUM_ENTRIES; i++) {
52156 + for (i = 0; i < mmu_slb_size; i++) {
52157 asm volatile("slbmfee %0,%1" : "=r" (e) : "r" (i));
52158 asm volatile("slbmfev %0,%1" : "=r" (v) : "r" (i));
52159 printk(KERN_ERR "%02d %016lx %016lx\n", i, e, v);
52165 /* SRR1[62] is from MSR[62] if recoverable, so pass that back */
52166 return !!(srr1 & 0x2);
52168 @@ -362,16 +391,17 @@
52171 static struct of_device_id pasemi_bus_ids[] = {
52172 + /* Unfortunately needed for legacy firmwares */
52173 { .type = "localbus", },
52174 { .type = "sdc", },
52175 + /* These are the proper entries, which newer firmware uses */
52176 + { .compatible = "pasemi,localbus", },
52177 + { .compatible = "pasemi,sdc", },
52181 static int __init pasemi_publish_devices(void)
52183 - if (!machine_is(pasemi))
52186 pasemi_pcmcia_init();
52188 /* Publish OF platform devices for SDC and other non-PCI devices */
52189 @@ -379,7 +409,7 @@
52193 -device_initcall(pasemi_publish_devices);
52194 +machine_device_initcall(pasemi, pasemi_publish_devices);
52198 @@ -389,7 +419,8 @@
52200 unsigned long root = of_get_flat_dt_root();
52202 - if (!of_flat_dt_is_compatible(root, "PA6T-1682M"))
52203 + if (!of_flat_dt_is_compatible(root, "PA6T-1682M") &&
52204 + !of_flat_dt_is_compatible(root, "pasemi,pwrficient"))
52207 hpte_init_native();
52208 @@ -400,7 +431,7 @@
52211 define_machine(pasemi) {
52212 - .name = "PA Semi PA6T-1682M",
52213 + .name = "PA Semi PWRficient",
52214 .probe = pas_probe,
52215 .setup_arch = pas_setup_arch,
52216 .init_early = pas_init_early,
52217 --- a/arch/powerpc/platforms/powermac/low_i2c.c
52218 +++ b/arch/powerpc/platforms/powermac/low_i2c.c
52219 @@ -585,8 +585,7 @@
52220 struct device_node *np, *child, *parent;
52222 /* Probe keywest-i2c busses */
52224 - (np = of_find_compatible_node(np, "i2c","keywest-i2c")) != NULL;){
52225 + for_each_compatible_node(np, "i2c","keywest-i2c") {
52226 struct pmac_i2c_host_kw *host;
52227 int multibus, chans, i;
52229 @@ -1462,9 +1461,6 @@
52233 - if (!machine_is(powermac))
52236 /* Probe keywest-i2c busses */
52239 @@ -1483,7 +1479,7 @@
52243 -arch_initcall(pmac_i2c_init);
52244 +machine_arch_initcall(powermac, pmac_i2c_init);
52246 /* Since pmac_i2c_init can be called too early for the platform device
52247 * registration, we need to do it at a later time. In our case, subsys
52248 @@ -1515,4 +1511,4 @@
52252 -subsys_initcall(pmac_i2c_create_platform_devices);
52253 +machine_subsys_initcall(powermac, pmac_i2c_create_platform_devices);
52254 --- a/arch/powerpc/platforms/powermac/pci.c
52255 +++ b/arch/powerpc/platforms/powermac/pci.c
52257 static int has_uninorth;
52258 #ifdef CONFIG_PPC64
52259 static struct pci_controller *u3_agp;
52260 -static struct pci_controller *u4_pcie;
52261 -static struct pci_controller *u3_ht;
52263 static int has_second_ohare;
52264 #endif /* CONFIG_PPC64 */
52265 @@ -314,12 +312,15 @@
52267 /* We only allow config cycles to devices that are in OF device-tree
52268 * as we are apparently having some weird things going on with some
52269 - * revs of K2 on recent G5s
52270 + * revs of K2 on recent G5s, except for the host bridge itself, which
52271 + * is missing from the tree but we know we can probe.
52274 busdn = pci_device_to_OF_node(bus->self);
52275 + else if (devfn == 0)
52278 - busdn = hose->arch_data;
52279 + busdn = hose->dn;
52280 for (dn = busdn->child; dn; dn = dn->sibling)
52281 if (PCI_DN(dn) && PCI_DN(dn)->devfn == devfn)
52283 @@ -344,14 +345,15 @@
52284 + (((unsigned int)bus) << 16) \
52287 -static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose,
52288 - u8 bus, u8 devfn, u8 offset)
52289 +static void __iomem *u3_ht_cfg_access(struct pci_controller *hose, u8 bus,
52290 + u8 devfn, u8 offset, int *swap)
52293 if (bus == hose->first_busno) {
52294 - /* For now, we don't self probe U3 HT bridge */
52295 - if (PCI_SLOT(devfn) == 0)
52297 - return hose->cfg_data + U3_HT_CFA0(devfn, offset);
52299 + return hose->cfg_data + U3_HT_CFA0(devfn, offset);
52301 + return ((void __iomem *)hose->cfg_addr) + (offset << 2);
52303 return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset);
52305 @@ -360,14 +362,15 @@
52306 int offset, int len, u32 *val)
52308 struct pci_controller *hose;
52309 - volatile void __iomem *addr;
52310 + void __iomem *addr;
52313 hose = pci_bus_to_host(bus);
52315 return PCIBIOS_DEVICE_NOT_FOUND;
52316 if (offset >= 0x100)
52317 return PCIBIOS_BAD_REGISTER_NUMBER;
52318 - addr = u3_ht_cfg_access(hose, bus->number, devfn, offset);
52319 + addr = u3_ht_cfg_access(hose, bus->number, devfn, offset, &swap);
52321 return PCIBIOS_DEVICE_NOT_FOUND;
52323 @@ -397,10 +400,10 @@
52327 - *val = in_le16(addr);
52328 + *val = swap ? in_le16(addr) : in_be16(addr);
52331 - *val = in_le32(addr);
52332 + *val = swap ? in_le32(addr) : in_be32(addr);
52335 return PCIBIOS_SUCCESSFUL;
52336 @@ -410,14 +413,15 @@
52337 int offset, int len, u32 val)
52339 struct pci_controller *hose;
52340 - volatile void __iomem *addr;
52341 + void __iomem *addr;
52344 hose = pci_bus_to_host(bus);
52346 return PCIBIOS_DEVICE_NOT_FOUND;
52347 if (offset >= 0x100)
52348 return PCIBIOS_BAD_REGISTER_NUMBER;
52349 - addr = u3_ht_cfg_access(hose, bus->number, devfn, offset);
52350 + addr = u3_ht_cfg_access(hose, bus->number, devfn, offset, &swap);
52352 return PCIBIOS_DEVICE_NOT_FOUND;
52354 @@ -439,10 +443,10 @@
52358 - out_le16(addr, val);
52359 + swap ? out_le16(addr, val) : out_be16(addr, val);
52362 - out_le32((u32 __iomem *)addr, val);
52363 + swap ? out_le32(addr, val) : out_be32(addr, val);
52366 return PCIBIOS_SUCCESSFUL;
52367 @@ -725,7 +729,7 @@
52368 static int __init setup_uninorth(struct pci_controller *hose,
52369 struct resource *addr)
52371 - pci_assign_all_buses = 1;
52372 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
52374 hose->ops = ¯isc_pci_ops;
52375 hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000);
52376 @@ -773,31 +777,72 @@
52378 hose->first_busno = 0x00;
52379 hose->last_busno = 0xff;
52383 -static void __init setup_u3_ht(struct pci_controller* hose)
52384 +static void __init parse_region_decode(struct pci_controller *hose,
52387 - struct device_node *np = (struct device_node *)hose->arch_data;
52388 - struct pci_controller *other = NULL;
52390 + unsigned long base, end, next = -1;
52393 + /* Iterate through all bits. We ignore the last bit as this region is
52394 + * reserved for the ROM among other niceties
52396 + for (i = 0; i < 31; i++) {
52397 + if ((decode & (0x80000000 >> i)) == 0)
52400 + base = 0xf0000000 | (((u32)i) << 24);
52401 + end = base + 0x00ffffff;
52403 + base = ((u32)i-16) << 28;
52404 + end = base + 0x0fffffff;
52406 + if (base != next) {
52407 + if (++cur >= 3) {
52408 + printk(KERN_WARNING "PCI: Too many ranges !\n");
52411 + hose->mem_resources[cur].flags = IORESOURCE_MEM;
52412 + hose->mem_resources[cur].name = hose->dn->full_name;
52413 + hose->mem_resources[cur].start = base;
52414 + hose->mem_resources[cur].end = end;
52415 + DBG(" %d: 0x%08lx-0x%08lx\n", cur, base, end);
52417 + DBG(" : -0x%08lx\n", end);
52418 + hose->mem_resources[cur].end = end;
52424 +static void __init setup_u3_ht(struct pci_controller* hose)
52426 + struct device_node *np = hose->dn;
52427 + struct resource cfg_res, self_res;
52430 hose->ops = &u3_ht_pci_ops;
52432 - /* We hard code the address because of the different size of
52433 - * the reg address cell, we shall fix that by killing struct
52434 - * reg_property and using some accessor functions instead
52435 + /* Get base addresses from OF tree
52437 - hose->cfg_data = ioremap(0xf2000000, 0x02000000);
52438 + if (of_address_to_resource(np, 0, &cfg_res) ||
52439 + of_address_to_resource(np, 1, &self_res)) {
52440 + printk(KERN_ERR "PCI: Failed to get U3/U4 HT resources !\n");
52444 + /* Map external cfg space access into cfg_data and self registers
52447 + hose->cfg_data = ioremap(cfg_res.start, 0x02000000);
52448 + hose->cfg_addr = ioremap(self_res.start,
52449 + self_res.end - self_res.start + 1);
52452 - * /ht node doesn't expose a "ranges" property, so we "remove"
52453 - * regions that have been allocated to AGP. So far, this version of
52454 - * the code doesn't assign any of the 0xfxxxxxxx "fine" memory regions
52455 - * to /ht. We need to fix that sooner or later by either parsing all
52456 - * child "ranges" properties or figuring out the U3 address space
52457 - * decoding logic and then read its configuration register (if any).
52458 + * /ht node doesn't expose a "ranges" property, we read the register
52459 + * that controls the decoding logic and use that for memory regions.
52460 + * The IO region is hard coded since it is fixed in HW as well.
52462 hose->io_base_phys = 0xf4000000;
52463 hose->pci_io_size = 0x00400000;
52464 @@ -808,76 +853,33 @@
52465 hose->pci_mem_offset = 0;
52466 hose->first_busno = 0;
52467 hose->last_busno = 0xef;
52468 - hose->mem_resources[0].name = np->full_name;
52469 - hose->mem_resources[0].start = 0x80000000;
52470 - hose->mem_resources[0].end = 0xefffffff;
52471 - hose->mem_resources[0].flags = IORESOURCE_MEM;
52475 - if (u3_agp != NULL)
52477 - else if (u4_pcie != NULL)
52480 - if (other == NULL) {
52481 - DBG("U3/4 has no AGP/PCIE, using full resource range\n");
52484 + /* Note: fix offset when cfg_addr becomes a void * */
52485 + decode = in_be32(hose->cfg_addr + 0x80);
52487 - /* Fixup bus range vs. PCIE */
52489 - hose->last_busno = u4_pcie->first_busno - 1;
52491 - /* We "remove" the AGP resources from the resources allocated to HT,
52492 - * that is we create "holes". However, that code does assumptions
52493 - * that so far happen to be true (cross fingers...), typically that
52494 - * resources in the AGP node are properly ordered
52497 - for (i=0; i<3; i++) {
52498 - struct resource *res = &other->mem_resources[i];
52499 - if (res->flags != IORESOURCE_MEM)
52501 - /* We don't care about "fine" resources */
52502 - if (res->start >= 0xf0000000)
52504 - /* Check if it's just a matter of "shrinking" us in one
52507 - if (hose->mem_resources[cur].start == res->start) {
52508 - DBG("U3/HT: shrink start of %d, %08lx -> %08lx\n",
52509 - cur, hose->mem_resources[cur].start,
52511 - hose->mem_resources[cur].start = res->end + 1;
52514 - if (hose->mem_resources[cur].end == res->end) {
52515 - DBG("U3/HT: shrink end of %d, %08lx -> %08lx\n",
52516 - cur, hose->mem_resources[cur].end,
52518 - hose->mem_resources[cur].end = res->start - 1;
52521 - /* No, it's not the case, we need a hole */
52523 - /* not enough resources for a hole, we drop part
52526 - printk(KERN_WARNING "Running out of resources"
52527 - " for /ht host !\n");
52528 - hose->mem_resources[cur].end = res->start - 1;
52532 - DBG("U3/HT: hole, %d end at %08lx, %d start at %08lx\n",
52533 - cur-1, res->start - 1, cur, res->end + 1);
52534 - hose->mem_resources[cur].name = np->full_name;
52535 - hose->mem_resources[cur].flags = IORESOURCE_MEM;
52536 - hose->mem_resources[cur].start = res->end + 1;
52537 - hose->mem_resources[cur].end = hose->mem_resources[cur-1].end;
52538 - hose->mem_resources[cur-1].end = res->start - 1;
52540 + DBG("PCI: Apple HT bridge decode register: 0x%08x\n", decode);
52542 + /* NOTE: The decode register setup is a bit weird... region
52543 + * 0xf8000000 for example is marked as enabled in there while it's
52544 + & actually the memory controller registers.
52545 + * That means that we are incorrectly attributing it to HT.
52547 + * In a similar vein, region 0xf4000000 is actually the HT IO space but
52548 + * also marked as enabled in here and 0xf9000000 is used by some other
52549 + * internal bits of the northbridge.
52551 + * Unfortunately, we can't just mask out those bit as we would end
52552 + * up with more regions than we can cope (linux can only cope with
52553 + * 3 memory regions for a PHB at this stage).
52555 + * So for now, we just do a little hack. We happen to -know- that
52556 + * Apple firmware doesn't assign things below 0xfa000000 for that
52557 + * bridge anyway so we mask out all bits we don't want.
52559 + decode &= 0x003fffff;
52561 + /* Now parse the resulting bits and build resources */
52562 + parse_region_decode(hose, decode);
52564 #endif /* CONFIG_PPC64 */
52566 @@ -994,6 +996,8 @@
52567 struct device_node *np, *root;
52568 struct device_node *ht = NULL;
52570 + ppc_pci_flags = PPC_PCI_CAN_SKIP_ISA_ALIGN;
52572 root = of_find_node_by_path("/");
52573 if (root == NULL) {
52574 printk(KERN_CRIT "pmac_pci_init: can't find root "
52575 @@ -1032,15 +1036,15 @@
52579 - struct device_node *np = u3_agp->arch_data;
52580 + struct device_node *np = u3_agp->dn;
52581 PCI_DN(np)->busno = 0xf0;
52582 for (np = np->child; np; np = np->sibling)
52583 PCI_DN(np)->busno = 0xf0;
52585 /* pmac_check_ht_link(); */
52587 - /* Tell pci.c to not use the common resource allocation mechanism */
52588 - pci_probe_only = 1;
52589 + /* We can allocate missing resources if any */
52590 + pci_probe_only = 0;
52592 #else /* CONFIG_PPC64 */
52594 @@ -1051,13 +1055,13 @@
52595 * some offset between bus number and domains for now when we
52596 * assign all busses should help for now
52598 - if (pci_assign_all_buses)
52599 + if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS)
52600 pcibios_assign_bus_offset = 0x10;
52605 -pmac_pci_enable_device_hook(struct pci_dev *dev, int initial)
52606 +#ifdef CONFIG_PPC32
52607 +int pmac_pci_enable_device_hook(struct pci_dev *dev)
52609 struct device_node* node;
52611 @@ -1099,24 +1103,21 @@
52616 + * Fixup various header fields on 32 bits. We don't do that on
52617 + * 64 bits as some of these have strange values behind the HT
52618 + * bridge and we must not, for example, enable MWI or set the
52619 + * cache line size on them.
52625 - * Make sure PCI is correctly configured
52627 - * We use old pci_bios versions of the function since, by
52628 - * default, gmac is not powered up, and so will be absent
52629 - * from the kernel initial PCI lookup.
52631 - * Should be replaced by 2.4 new PCI mechanisms and really
52632 - * register the device.
52634 pci_read_config_word(dev, PCI_COMMAND, &cmd);
52635 cmd |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER
52636 | PCI_COMMAND_INVALIDATE;
52637 pci_write_config_word(dev, PCI_COMMAND, cmd);
52638 pci_write_config_byte(dev, PCI_LATENCY_TIMER, 16);
52640 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
52641 L1_CACHE_BYTES >> 2);
52643 @@ -1124,6 +1125,18 @@
52647 +void __devinit pmac_pci_fixup_ohci(struct pci_dev *dev)
52649 + struct device_node *node = pci_device_to_OF_node(dev);
52651 + /* We don't want to assign resources to USB controllers
52652 + * absent from the OF tree (iBook second controller)
52654 + if (dev->class == PCI_CLASS_SERIAL_USB_OHCI && !node)
52655 + dev->resource[0].flags = 0;
52657 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, PCI_ANY_ID, pmac_pci_fixup_ohci);
52659 /* We power down some devices after they have been probed. They'll
52660 * be powered back on later on
52662 @@ -1171,7 +1184,6 @@
52666 -#ifdef CONFIG_PPC32
52667 void pmac_pci_fixup_cardbus(struct pci_dev* dev)
52669 if (!machine_is(powermac))
52670 @@ -1259,7 +1271,7 @@
52673 DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata);
52675 +#endif /* CONFIG_PPC32 */
52678 * Disable second function on K2-SATA, it's broken
52679 --- a/arch/powerpc/platforms/powermac/pfunc_base.c
52680 +++ b/arch/powerpc/platforms/powermac/pfunc_base.c
52681 @@ -363,8 +363,7 @@
52686 -arch_initcall(pmac_pfunc_base_install);
52687 +machine_arch_initcall(powermac, pmac_pfunc_base_install);
52691 --- a/arch/powerpc/platforms/powermac/pic.c
52692 +++ b/arch/powerpc/platforms/powermac/pic.c
52693 @@ -690,6 +690,5 @@
52694 sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic);
52698 -subsys_initcall(init_pmacpic_sysfs);
52699 +machine_subsys_initcall(powermac, init_pmacpic_sysfs);
52701 --- a/arch/powerpc/platforms/powermac/pmac.h
52702 +++ b/arch/powerpc/platforms/powermac/pmac.h
52704 extern void pmac_nvram_update(void);
52705 extern unsigned char pmac_nvram_read_byte(int addr);
52706 extern void pmac_nvram_write_byte(int addr, unsigned char val);
52707 -extern int pmac_pci_enable_device_hook(struct pci_dev *dev, int initial);
52708 +extern int pmac_pci_enable_device_hook(struct pci_dev *dev);
52709 extern void pmac_pcibios_after_init(void);
52710 extern int of_show_percpuinfo(struct seq_file *m, int i);
52712 --- a/arch/powerpc/platforms/powermac/setup.c
52713 +++ b/arch/powerpc/platforms/powermac/setup.c
52715 #include <linux/root_dev.h>
52716 #include <linux/bitops.h>
52717 #include <linux/suspend.h>
52718 +#include <linux/of_device.h>
52719 +#include <linux/of_platform.h>
52721 #include <asm/reg.h>
52722 #include <asm/sections.h>
52724 #include <asm/btext.h>
52725 #include <asm/pmac_feature.h>
52726 #include <asm/time.h>
52727 -#include <asm/of_device.h>
52728 -#include <asm/of_platform.h>
52729 #include <asm/mmu_context.h>
52730 #include <asm/iommu.h>
52731 #include <asm/smu.h>
52733 #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
52735 #ifdef CONFIG_PPC64
52736 -#include <asm/udbg.h>
52740 @@ -398,17 +397,13 @@
52742 static int pmac_late_init(void)
52744 - if (!machine_is(powermac))
52748 /* this is udbg (which is __init) and we can later use it during
52749 * cpu hotplug (in smp_core99_kick_cpu) */
52750 ppc_md.progress = NULL;
52754 -late_initcall(pmac_late_init);
52755 +machine_late_initcall(powermac, pmac_late_init);
52758 * This is __init_refok because we check for "initializing" before
52759 @@ -535,9 +530,6 @@
52760 if (machine_is(chrp))
52763 - if (!machine_is(powermac))
52766 np = of_find_node_by_name(NULL, "valkyrie");
52768 of_platform_device_create(np, "valkyrie", NULL);
52769 @@ -552,8 +544,7 @@
52774 -device_initcall(pmac_declare_of_platform_devices);
52775 +machine_device_initcall(powermac, pmac_declare_of_platform_devices);
52778 * Called very early, MMU is off, device-tree isn't unflattened
52779 @@ -613,9 +604,11 @@
52781 /* We need to use normal PCI probing for the AGP bus,
52782 * since the device for the AGP bridge isn't in the tree.
52783 + * Same for the PCIe host on U4 and the HT host bridge.
52785 if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") ||
52786 - of_device_is_compatible(node, "u4-pcie")))
52787 + of_device_is_compatible(node, "u4-pcie") ||
52788 + of_device_is_compatible(node, "u3-ht")))
52789 return PCI_PROBE_NORMAL;
52790 return PCI_PROBE_DEVTREE;
52792 --- a/arch/powerpc/platforms/powermac/time.c
52793 +++ b/arch/powerpc/platforms/powermac/time.c
52794 @@ -84,12 +84,14 @@
52798 +#if defined(CONFIG_ADB_CUDA) || defined(CONFIG_ADB_PMU)
52799 static void to_rtc_time(unsigned long now, struct rtc_time *tm)
52802 tm->tm_year -= 1900;
52807 static unsigned long from_rtc_time(struct rtc_time *tm)
52809 --- a/arch/powerpc/platforms/ps3/Kconfig
52810 +++ b/arch/powerpc/platforms/ps3/Kconfig
52812 This support is mainly for Linux kernel development. If unsure,
52815 -config PS3_USE_LPAR_ADDR
52816 - depends on PPC_PS3 && EXPERIMENTAL
52817 - bool "PS3 use lpar address space"
52820 - This option is solely for experimentation by experts. Disables
52821 - translation of lpar addresses. SPE support currently won't work
52822 - without this set to y.
52824 - If you have any doubt, choose the default y.
52829 @@ -138,4 +127,17 @@
52830 be disabled on the kernel command line using "ps3flash=off", to
52831 not allocate this fixed buffer.
52834 + tristate "PS3 Logical Performance Monitor support"
52835 + depends on PPC_PS3
52837 + Include support for the PS3 Logical Performance Monitor.
52839 + This support is required to use the logical performance monitor
52840 + of the PS3's LV1 hypervisor.
52842 + If you intend to use the advanced performance monitoring and
52843 + profiling support of the Cell processor with programs like
52844 + oprofile and perfmon2, then say Y or M, otherwise say N.
52847 --- a/arch/powerpc/platforms/ps3/device-init.c
52848 +++ b/arch/powerpc/platforms/ps3/device-init.c
52850 #include <linux/kernel.h>
52851 #include <linux/kthread.h>
52852 #include <linux/init.h>
52853 +#include <linux/reboot.h>
52855 #include <asm/firmware.h>
52856 #include <asm/lv1call.h>
52859 #include "platform.h"
52861 +static int __init ps3_register_lpm_devices(void)
52866 + struct ps3_system_bus_device *dev;
52868 + pr_debug(" -> %s:%d\n", __func__, __LINE__);
52870 + dev = kzalloc(sizeof(*dev), GFP_KERNEL);
52874 + dev->match_id = PS3_MATCH_ID_LPM;
52875 + dev->dev_type = PS3_DEVICE_TYPE_LPM;
52877 + /* The current lpm driver only supports a single BE processor. */
52879 + result = ps3_repository_read_be_node_id(0, &dev->lpm.node_id);
52882 + pr_debug("%s:%d: ps3_repository_read_be_node_id failed \n",
52883 + __func__, __LINE__);
52884 + goto fail_read_repo;
52887 + result = ps3_repository_read_lpm_privileges(dev->lpm.node_id, &tmp1,
52888 + &dev->lpm.rights);
52891 + pr_debug("%s:%d: ps3_repository_read_lpm_privleges failed \n",
52892 + __func__, __LINE__);
52893 + goto fail_read_repo;
52896 + lv1_get_logical_partition_id(&tmp2);
52898 + if (tmp1 != tmp2) {
52899 + pr_debug("%s:%d: wrong lpar\n",
52900 + __func__, __LINE__);
52901 + result = -ENODEV;
52902 + goto fail_rights;
52905 + if (!(dev->lpm.rights & PS3_LPM_RIGHTS_USE_LPM)) {
52906 + pr_debug("%s:%d: don't have rights to use lpm\n",
52907 + __func__, __LINE__);
52909 + goto fail_rights;
52912 + pr_debug("%s:%d: pu_id %lu, rights %lu(%lxh)\n",
52913 + __func__, __LINE__, dev->lpm.pu_id, dev->lpm.rights,
52914 + dev->lpm.rights);
52916 + result = ps3_repository_read_pu_id(0, &dev->lpm.pu_id);
52919 + pr_debug("%s:%d: ps3_repository_read_pu_id failed \n",
52920 + __func__, __LINE__);
52921 + goto fail_read_repo;
52924 + result = ps3_system_bus_device_register(dev);
52927 + pr_debug("%s:%d ps3_system_bus_device_register failed\n",
52928 + __func__, __LINE__);
52929 + goto fail_register;
52932 + pr_debug(" <- %s:%d\n", __func__, __LINE__);
52940 + pr_debug(" <- %s:%d: failed\n", __func__, __LINE__);
52945 * ps3_setup_gelic_device - Setup and register a gelic device instance.
52947 @@ -238,166 +322,6 @@
52951 -static int ps3stor_wait_for_completion(u64 dev_id, u64 tag,
52952 - unsigned int timeout)
52955 - unsigned int retries = 0;
52958 - for (retries = 0; retries < timeout; retries++) {
52959 - result = lv1_storage_check_async_status(dev_id, tag, &status);
52967 - pr_debug("%s:%u: check_async_status: %s, status %lx\n",
52968 - __func__, __LINE__, ps3_result(result), status);
52974 - * ps3_storage_wait_for_device - Wait for a storage device to become ready.
52975 - * @repo: The repository device to wait for.
52977 - * Uses the hypervisor's storage device notification mechanism to wait until
52978 - * a storage device is ready. The device notification mechanism uses a
52979 - * psuedo device (id = -1) to asynchronously notify the guest when storage
52980 - * devices become ready. The notification device has a block size of 512
52984 -static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)
52986 - int error = -ENODEV;
52988 - const u64 notification_dev_id = (u64)-1LL;
52989 - const unsigned int timeout = HZ;
52993 - enum ps3_notify_type {
52994 - notify_device_ready = 0,
52995 - notify_region_probe = 1,
52996 - notify_region_update = 2,
52999 - u64 operation_code; /* must be zero */
53000 - u64 event_mask; /* OR of 1UL << enum ps3_notify_type */
53003 - u64 event_type; /* enum ps3_notify_type */
53010 - pr_debug(" -> %s:%u: (%u:%u:%u)\n", __func__, __LINE__, repo->bus_id,
53011 - repo->dev_id, repo->dev_type);
53013 - buf = kzalloc(512, GFP_KERNEL);
53017 - lpar = ps3_mm_phys_to_lpar(__pa(buf));
53018 - notify_cmd = buf;
53019 - notify_event = buf;
53021 - result = lv1_open_device(repo->bus_id, notification_dev_id, 0);
53023 - printk(KERN_ERR "%s:%u: lv1_open_device %s\n", __func__,
53024 - __LINE__, ps3_result(result));
53028 - /* Setup and write the request for device notification. */
53030 - notify_cmd->operation_code = 0; /* must be zero */
53031 - notify_cmd->event_mask = 1UL << notify_region_probe;
53033 - result = lv1_storage_write(notification_dev_id, 0, 0, 1, 0, lpar,
53036 - printk(KERN_ERR "%s:%u: write failed %s\n", __func__, __LINE__,
53037 - ps3_result(result));
53041 - /* Wait for the write completion */
53043 - result = ps3stor_wait_for_completion(notification_dev_id, tag,
53046 - printk(KERN_ERR "%s:%u: write not completed %s\n", __func__,
53047 - __LINE__, ps3_result(result));
53051 - /* Loop here processing the requested notification events. */
53054 - memset(notify_event, 0, sizeof(*notify_event));
53056 - result = lv1_storage_read(notification_dev_id, 0, 0, 1, 0,
53059 - printk(KERN_ERR "%s:%u: write failed %s\n", __func__,
53060 - __LINE__, ps3_result(result));
53064 - result = ps3stor_wait_for_completion(notification_dev_id, tag,
53067 - printk(KERN_ERR "%s:%u: read not completed %s\n",
53068 - __func__, __LINE__, ps3_result(result));
53072 - pr_debug("%s:%d: notify event (%u:%u:%u): event_type 0x%lx, "
53073 - "port %lu\n", __func__, __LINE__, repo->bus_index,
53074 - repo->dev_index, repo->dev_type,
53075 - notify_event->event_type, notify_event->dev_port);
53077 - if (notify_event->event_type != notify_region_probe ||
53078 - notify_event->bus_id != repo->bus_id) {
53079 - pr_debug("%s:%u: bad notify_event: event %lu, "
53080 - "dev_id %lu, dev_type %lu\n",
53081 - __func__, __LINE__, notify_event->event_type,
53082 - notify_event->dev_id, notify_event->dev_type);
53086 - if (notify_event->dev_id == repo->dev_id &&
53087 - notify_event->dev_type == repo->dev_type) {
53088 - pr_debug("%s:%u: device ready (%u:%u:%u)\n", __func__,
53089 - __LINE__, repo->bus_index, repo->dev_index,
53095 - if (notify_event->dev_id == repo->dev_id &&
53096 - notify_event->dev_type == PS3_DEV_TYPE_NOACCESS) {
53097 - pr_debug("%s:%u: no access: dev_id %u\n", __func__,
53098 - __LINE__, repo->dev_id);
53104 - lv1_close_device(repo->bus_id, notification_dev_id);
53107 - pr_debug(" <- %s:%u\n", __func__, __LINE__);
53111 static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
53112 enum ps3_match_id match_id)
53114 @@ -449,16 +373,6 @@
53115 goto fail_find_interrupt;
53118 - /* FIXME: Arrange to only do this on a 'cold' boot */
53120 - result = ps3_storage_wait_for_device(repo);
53122 - printk(KERN_ERR "%s:%u: storage_notification failed %d\n",
53123 - __func__, __LINE__, result);
53124 - result = -ENODEV;
53125 - goto fail_probe_notification;
53128 for (i = 0; i < num_regions; i++) {
53131 @@ -494,7 +408,6 @@
53133 fail_device_register:
53135 -fail_probe_notification:
53136 fail_find_interrupt:
53139 @@ -659,62 +572,268 @@
53143 +static void ps3_find_and_add_device(u64 bus_id, u64 dev_id)
53145 + struct ps3_repository_device repo;
53147 + unsigned int retries;
53148 + unsigned long rem;
53151 + * On some firmware versions (e.g. 1.90), the device may not show up
53152 + * in the repository immediately
53154 + for (retries = 0; retries < 10; retries++) {
53155 + res = ps3_repository_find_device_by_id(&repo, bus_id, dev_id);
53159 + rem = msleep_interruptible(100);
53163 + pr_warning("%s:%u: device %lu:%lu not found\n", __func__, __LINE__,
53169 + pr_debug("%s:%u: device %lu:%lu found after %u retries\n",
53170 + __func__, __LINE__, bus_id, dev_id, retries);
53172 + ps3_register_repository_device(&repo);
53176 +#define PS3_NOTIFICATION_DEV_ID ULONG_MAX
53177 +#define PS3_NOTIFICATION_INTERRUPT_ID 0
53179 +struct ps3_notification_device {
53180 + struct ps3_system_bus_device sbd;
53184 + struct completion done;
53187 +enum ps3_notify_type {
53188 + notify_device_ready = 0,
53189 + notify_region_probe = 1,
53190 + notify_region_update = 2,
53193 +struct ps3_notify_cmd {
53194 + u64 operation_code; /* must be zero */
53195 + u64 event_mask; /* OR of 1UL << enum ps3_notify_type */
53198 +struct ps3_notify_event {
53199 + u64 event_type; /* enum ps3_notify_type */
53206 +static irqreturn_t ps3_notification_interrupt(int irq, void *data)
53208 + struct ps3_notification_device *dev = data;
53212 + spin_lock(&dev->lock);
53213 + res = lv1_storage_get_async_status(PS3_NOTIFICATION_DEV_ID, &tag,
53215 + if (tag != dev->tag)
53216 + pr_err("%s:%u: tag mismatch, got %lx, expected %lx\n",
53217 + __func__, __LINE__, tag, dev->tag);
53220 + pr_err("%s:%u: res %d status 0x%lx\n", __func__, __LINE__, res,
53223 + pr_debug("%s:%u: completed, status 0x%lx\n", __func__,
53224 + __LINE__, status);
53225 + dev->lv1_status = status;
53226 + complete(&dev->done);
53228 + spin_unlock(&dev->lock);
53229 + return IRQ_HANDLED;
53232 +static int ps3_notification_read_write(struct ps3_notification_device *dev,
53233 + u64 lpar, int write)
53235 + const char *op = write ? "write" : "read";
53236 + unsigned long flags;
53239 + init_completion(&dev->done);
53240 + spin_lock_irqsave(&dev->lock, flags);
53241 + res = write ? lv1_storage_write(dev->sbd.dev_id, 0, 0, 1, 0, lpar,
53243 + : lv1_storage_read(dev->sbd.dev_id, 0, 0, 1, 0, lpar,
53245 + spin_unlock_irqrestore(&dev->lock, flags);
53247 + pr_err("%s:%u: %s failed %d\n", __func__, __LINE__, op, res);
53250 + pr_debug("%s:%u: notification %s issued\n", __func__, __LINE__, op);
53252 + res = wait_event_interruptible(dev->done.wait,
53253 + dev->done.done || kthread_should_stop());
53254 + if (kthread_should_stop())
53257 + pr_debug("%s:%u: interrupted %s\n", __func__, __LINE__, op);
53261 + if (dev->lv1_status) {
53262 + pr_err("%s:%u: %s not completed, status 0x%lx\n", __func__,
53263 + __LINE__, op, dev->lv1_status);
53266 + pr_debug("%s:%u: notification %s completed\n", __func__, __LINE__, op);
53271 +static struct task_struct *probe_task;
53274 * ps3_probe_thread - Background repository probing at system startup.
53276 * This implementation only supports background probing on a single bus.
53277 + * It uses the hypervisor's storage device notification mechanism to wait until
53278 + * a storage device is ready. The device notification mechanism uses a
53279 + * pseudo device to asynchronously notify the guest when storage devices become
53280 + * ready. The notification device has a block size of 512 bytes.
53283 static int ps3_probe_thread(void *data)
53285 - struct ps3_repository_device *repo = data;
53287 - unsigned int ms = 250;
53288 + struct ps3_notification_device dev;
53290 + unsigned int irq;
53293 + struct ps3_notify_cmd *notify_cmd;
53294 + struct ps3_notify_event *notify_event;
53296 pr_debug(" -> %s:%u: kthread started\n", __func__, __LINE__);
53300 + buf = kzalloc(512, GFP_KERNEL);
53304 - pr_debug("%s:%u: probing...\n", __func__, __LINE__);
53305 + lpar = ps3_mm_phys_to_lpar(__pa(buf));
53306 + notify_cmd = buf;
53307 + notify_event = buf;
53309 + /* dummy system bus device */
53310 + dev.sbd.bus_id = (u64)data;
53311 + dev.sbd.dev_id = PS3_NOTIFICATION_DEV_ID;
53312 + dev.sbd.interrupt_id = PS3_NOTIFICATION_INTERRUPT_ID;
53314 + res = lv1_open_device(dev.sbd.bus_id, dev.sbd.dev_id, 0);
53316 + pr_err("%s:%u: lv1_open_device failed %s\n", __func__,
53317 + __LINE__, ps3_result(res));
53321 + res = ps3_sb_event_receive_port_setup(&dev.sbd, PS3_BINDING_CPU_ANY,
53324 + pr_err("%s:%u: ps3_sb_event_receive_port_setup failed %d\n",
53325 + __func__, __LINE__, res);
53326 + goto fail_close_device;
53329 + spin_lock_init(&dev.lock);
53331 + res = request_irq(irq, ps3_notification_interrupt, IRQF_DISABLED,
53332 + "ps3_notification", &dev);
53334 + pr_err("%s:%u: request_irq failed %d\n", __func__, __LINE__,
53336 + goto fail_sb_event_receive_port_destroy;
53339 + /* Setup and write the request for device notification. */
53340 + notify_cmd->operation_code = 0; /* must be zero */
53341 + notify_cmd->event_mask = 1UL << notify_region_probe;
53344 - result = ps3_repository_find_device(repo);
53345 + res = ps3_notification_read_write(&dev, lpar, 1);
53347 + goto fail_free_irq;
53349 - if (result == -ENODEV)
53350 - pr_debug("%s:%u: nothing new\n", __func__,
53353 - pr_debug("%s:%u: find device error.\n",
53354 - __func__, __LINE__);
53356 - pr_debug("%s:%u: found device (%u:%u:%u)\n",
53357 - __func__, __LINE__, repo->bus_index,
53358 - repo->dev_index, repo->dev_type);
53359 - ps3_register_repository_device(repo);
53360 - ps3_repository_bump_device(repo);
53363 - } while (!result);
53364 + /* Loop here processing the requested notification events. */
53368 - pr_debug("%s:%u: ms %u\n", __func__, __LINE__, ms);
53369 + memset(notify_event, 0, sizeof(*notify_event));
53372 + res = ps3_notification_read_write(&dev, lpar, 0);
53376 - msleep_interruptible(ms);
53377 + pr_debug("%s:%u: notify event type 0x%lx bus id %lu dev id %lu"
53378 + " type %lu port %lu\n", __func__, __LINE__,
53379 + notify_event->event_type, notify_event->bus_id,
53380 + notify_event->dev_id, notify_event->dev_type,
53381 + notify_event->dev_port);
53383 + if (notify_event->event_type != notify_region_probe ||
53384 + notify_event->bus_id != dev.sbd.bus_id) {
53385 + pr_warning("%s:%u: bad notify_event: event %lu, "
53386 + "dev_id %lu, dev_type %lu\n",
53387 + __func__, __LINE__, notify_event->event_type,
53388 + notify_event->dev_id,
53389 + notify_event->dev_type);
53393 - /* An exponential backoff. */
53395 + ps3_find_and_add_device(dev.sbd.bus_id, notify_event->dev_id);
53397 } while (!kthread_should_stop());
53400 + free_irq(irq, &dev);
53401 +fail_sb_event_receive_port_destroy:
53402 + ps3_sb_event_receive_port_destroy(&dev.sbd, irq);
53403 +fail_close_device:
53404 + lv1_close_device(dev.sbd.bus_id, dev.sbd.dev_id);
53408 + probe_task = NULL;
53410 pr_debug(" <- %s:%u: kthread finished\n", __func__, __LINE__);
53416 + * ps3_stop_probe_thread - Stops the background probe thread.
53420 +static int ps3_stop_probe_thread(struct notifier_block *nb, unsigned long code,
53424 + kthread_stop(probe_task);
53428 +static struct notifier_block nb = {
53429 + .notifier_call = ps3_stop_probe_thread
53433 * ps3_start_probe_thread - Starts the background probe thread.
53436 @@ -723,7 +842,7 @@
53439 struct task_struct *task;
53440 - static struct ps3_repository_device repo; /* must be static */
53441 + struct ps3_repository_device repo;
53443 pr_debug(" -> %s:%d\n", __func__, __LINE__);
53445 @@ -746,7 +865,8 @@
53449 - task = kthread_run(ps3_probe_thread, &repo, "ps3-probe-%u", bus_type);
53450 + task = kthread_run(ps3_probe_thread, (void *)repo.bus_id,
53451 + "ps3-probe-%u", bus_type);
53453 if (IS_ERR(task)) {
53454 result = PTR_ERR(task);
53455 @@ -755,6 +875,9 @@
53459 + probe_task = task;
53460 + register_reboot_notifier(&nb);
53462 pr_debug(" <- %s:%d\n", __func__, __LINE__);
53465 @@ -787,6 +910,8 @@
53467 ps3_register_sound_devices();
53469 + ps3_register_lpm_devices();
53471 pr_debug(" <- %s:%d\n", __func__, __LINE__);
53474 --- a/arch/powerpc/platforms/ps3/mm.c
53475 +++ b/arch/powerpc/platforms/ps3/mm.c
53480 -#if defined(CONFIG_PS3_USE_LPAR_ADDR)
53481 - USE_LPAR_ADDR = 1,
53483 - USE_LPAR_ADDR = 0,
53485 #if defined(CONFIG_PS3_DYNAMIC_DMA)
53486 USE_DYNAMIC_DMA = 1,
53488 @@ -137,11 +132,8 @@
53489 unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr)
53491 BUG_ON(is_kernel_addr(phys_addr));
53492 - if (USE_LPAR_ADDR)
53493 - return phys_addr;
53495 - return (phys_addr < map.rm.size || phys_addr >= map.total)
53496 - ? phys_addr : phys_addr + map.r1.offset;
53497 + return (phys_addr < map.rm.size || phys_addr >= map.total)
53498 + ? phys_addr : phys_addr + map.r1.offset;
53501 EXPORT_SYMBOL(ps3_mm_phys_to_lpar);
53502 @@ -309,7 +301,7 @@
53504 BUG_ON(!mem_init_done);
53506 - start_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size;
53507 + start_addr = map.rm.size;
53508 start_pfn = start_addr >> PAGE_SHIFT;
53509 nr_pages = (map.r1.size + PAGE_SIZE - 1) >> PAGE_SHIFT;
53511 @@ -359,7 +351,7 @@
53512 static void __maybe_unused _dma_dump_region(const struct ps3_dma_region *r,
53513 const char *func, int line)
53515 - DBG("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id,
53516 + DBG("%s:%d: dev %lu:%lu\n", func, line, r->dev->bus_id,
53518 DBG("%s:%d: page_size %u\n", func, line, r->page_size);
53519 DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
53520 @@ -394,7 +386,7 @@
53521 static void _dma_dump_chunk (const struct dma_chunk* c, const char* func,
53524 - DBG("%s:%d: r.dev %u:%u\n", func, line,
53525 + DBG("%s:%d: r.dev %lu:%lu\n", func, line,
53526 c->region->dev->bus_id, c->region->dev->dev_id);
53527 DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr);
53528 DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size);
53529 @@ -658,7 +650,7 @@
53532 if (!r->dev->bus_id) {
53533 - pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__,
53534 + pr_info("%s:%d: %lu:%lu no dma\n", __func__, __LINE__,
53535 r->dev->bus_id, r->dev->dev_id);
53538 @@ -724,7 +716,7 @@
53541 if (!r->dev->bus_id) {
53542 - pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__,
53543 + pr_info("%s:%d: %lu:%lu no dma\n", __func__, __LINE__,
53544 r->dev->bus_id, r->dev->dev_id);
53547 @@ -1007,7 +999,7 @@
53549 if (r->offset + r->len > map.rm.size) {
53550 /* Map (part of) 2nd RAM chunk */
53551 - virt_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size;
53552 + virt_addr = map.rm.size;
53554 if (r->offset >= map.rm.size)
53555 virt_addr += r->offset - map.rm.size;
53556 --- a/arch/powerpc/platforms/ps3/platform.h
53557 +++ b/arch/powerpc/platforms/ps3/platform.h
53558 @@ -89,13 +89,11 @@
53559 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
53560 PS3_DEV_TYPE_SB_GPIO = 6,
53561 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
53562 - PS3_DEV_TYPE_STOR_DUMMY = 32,
53563 - PS3_DEV_TYPE_NOACCESS = 255,
53566 int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
53568 -int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id);
53569 +int ps3_repository_read_bus_id(unsigned int bus_index, u64 *bus_id);
53570 int ps3_repository_read_bus_type(unsigned int bus_index,
53571 enum ps3_bus_type *bus_type);
53572 int ps3_repository_read_bus_num_dev(unsigned int bus_index,
53573 @@ -119,7 +117,7 @@
53574 int ps3_repository_read_dev_str(unsigned int bus_index,
53575 unsigned int dev_index, const char *dev_str, u64 *value);
53576 int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
53577 - unsigned int *dev_id);
53579 int ps3_repository_read_dev_type(unsigned int bus_index,
53580 unsigned int dev_index, enum ps3_dev_type *dev_type);
53581 int ps3_repository_read_dev_intr(unsigned int bus_index,
53582 @@ -138,21 +136,17 @@
53583 /* repository bus enumerators */
53585 struct ps3_repository_device {
53586 - enum ps3_bus_type bus_type;
53587 unsigned int bus_index;
53588 - unsigned int bus_id;
53589 - enum ps3_dev_type dev_type;
53590 unsigned int dev_index;
53591 - unsigned int dev_id;
53592 + enum ps3_bus_type bus_type;
53593 + enum ps3_dev_type dev_type;
53598 -static inline struct ps3_repository_device *ps3_repository_bump_device(
53599 - struct ps3_repository_device *repo)
53601 - repo->dev_index++;
53604 int ps3_repository_find_device(struct ps3_repository_device *repo);
53605 +int ps3_repository_find_device_by_id(struct ps3_repository_device *repo,
53606 + u64 bus_id, u64 dev_id);
53607 int ps3_repository_find_devices(enum ps3_bus_type bus_type,
53608 int (*callback)(const struct ps3_repository_device *repo));
53609 int ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from,
53610 @@ -186,10 +180,10 @@
53611 unsigned int dev_index, unsigned int region_index,
53612 unsigned int *region_id, u64 *region_start, u64 *region_size);
53614 -/* repository pu and memory info */
53615 +/* repository logical pu and memory info */
53617 -int ps3_repository_read_num_pu(unsigned int *num_pu);
53618 -int ps3_repository_read_ppe_id(unsigned int *pu_index, unsigned int *ppe_id);
53619 +int ps3_repository_read_num_pu(u64 *num_pu);
53620 +int ps3_repository_read_pu_id(unsigned int pu_index, u64 *pu_id);
53621 int ps3_repository_read_rm_base(unsigned int ppe_id, u64 *rm_base);
53622 int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size);
53623 int ps3_repository_read_region_total(u64 *region_total);
53624 @@ -200,9 +194,15 @@
53626 int ps3_repository_read_num_be(unsigned int *num_be);
53627 int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id);
53628 +int ps3_repository_read_be_id(u64 node_id, u64 *be_id);
53629 int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq);
53630 int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq);
53632 +/* repository performance monitor info */
53634 +int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar,
53637 /* repository 'Other OS' area */
53639 int ps3_repository_read_boot_dat_addr(u64 *lpar_addr);
53640 --- a/arch/powerpc/platforms/ps3/repository.c
53641 +++ b/arch/powerpc/platforms/ps3/repository.c
53645 #define dump_field(_a, _b) _dump_field(_a, _b, __func__, __LINE__)
53646 -static void _dump_field(const char *hdr, u64 n, const char* func, int line)
53647 +static void _dump_field(const char *hdr, u64 n, const char *func, int line)
53653 #define dump_node_name(_a, _b, _c, _d, _e) \
53654 _dump_node_name(_a, _b, _c, _d, _e, __func__, __LINE__)
53655 -static void _dump_node_name (unsigned int lpar_id, u64 n1, u64 n2, u64 n3,
53656 - u64 n4, const char* func, int line)
53657 +static void _dump_node_name(unsigned int lpar_id, u64 n1, u64 n2, u64 n3,
53658 + u64 n4, const char *func, int line)
53660 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id);
53661 _dump_field("n1: ", n1, func, line);
53663 #define dump_node(_a, _b, _c, _d, _e, _f, _g) \
53664 _dump_node(_a, _b, _c, _d, _e, _f, _g, __func__, __LINE__)
53665 static void _dump_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4,
53666 - u64 v1, u64 v2, const char* func, int line)
53667 + u64 v1, u64 v2, const char *func, int line)
53669 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id);
53670 _dump_field("n1: ", n1, func, line);
53671 @@ -165,21 +165,18 @@
53672 make_first_field("bus", bus_index),
53673 make_field(bus_str, 0),
53679 -int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id)
53680 +int ps3_repository_read_bus_id(unsigned int bus_index, u64 *bus_id)
53684 - u64 v2; /* unused */
53686 result = read_node(PS3_LPAR_ID_PME,
53687 make_first_field("bus", bus_index),
53688 make_field("id", 0),
53696 @@ -193,7 +190,7 @@
53697 make_first_field("bus", bus_index),
53698 make_field("type", 0),
53705 @@ -208,7 +205,7 @@
53706 make_first_field("bus", bus_index),
53707 make_field("num_dev", 0),
53714 @@ -221,22 +218,20 @@
53715 make_field("dev", dev_index),
53716 make_field(dev_str, 0),
53722 int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
53723 - unsigned int *dev_id)
53729 result = read_node(PS3_LPAR_ID_PME,
53730 make_first_field("bus", bus_index),
53731 make_field("dev", dev_index),
53732 make_field("id", 0),
53740 @@ -251,14 +246,14 @@
53741 make_field("dev", dev_index),
53742 make_field("type", 0),
53750 int ps3_repository_read_dev_intr(unsigned int bus_index,
53751 unsigned int dev_index, unsigned int intr_index,
53752 - enum ps3_interrupt_type *intr_type, unsigned int* interrupt_id)
53753 + enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id)
53757 @@ -287,7 +282,7 @@
53758 make_field("dev", dev_index),
53759 make_field("reg", reg_index),
53760 make_field("type", 0),
53766 @@ -332,7 +327,7 @@
53770 - pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %u, num_dev %u\n",
53771 + pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %lu, num_dev %u\n",
53772 __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id,
53775 @@ -349,47 +344,95 @@
53779 - if (tmp.bus_type == PS3_BUS_TYPE_STORAGE) {
53781 - * A storage device may show up in the repository before the
53782 - * hypervisor has finished probing its type and regions
53784 - unsigned int num_regions;
53786 - if (tmp.dev_type == PS3_DEV_TYPE_STOR_DUMMY) {
53787 - pr_debug("%s:%u storage device not ready\n", __func__,
53791 + result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
53794 - result = ps3_repository_read_stor_dev_num_regions(tmp.bus_index,
53798 + pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__,
53803 + pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %lu\n",
53804 + __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id);
53810 +int ps3_repository_find_device_by_id(struct ps3_repository_device *repo,
53811 + u64 bus_id, u64 dev_id)
53813 + int result = -ENODEV;
53814 + struct ps3_repository_device tmp;
53815 + unsigned int num_dev;
53817 + pr_debug(" -> %s:%u: find device by id %lu:%lu\n", __func__, __LINE__,
53820 + for (tmp.bus_index = 0; tmp.bus_index < 10; tmp.bus_index++) {
53821 + result = ps3_repository_read_bus_id(tmp.bus_index,
53824 - pr_debug("%s:%d read_stor_dev_num_regions failed\n",
53825 - __func__, __LINE__);
53826 + pr_debug("%s:%u read_bus_id(%u) failed\n", __func__,
53827 + __LINE__, tmp.bus_index);
53831 - if (!num_regions) {
53832 - pr_debug("%s:%u storage device has no regions yet\n",
53833 - __func__, __LINE__);
53836 + if (tmp.bus_id == bus_id)
53839 + pr_debug("%s:%u: skip, bus_id %lu\n", __func__, __LINE__,
53842 + pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__);
53845 - result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
53848 + result = ps3_repository_read_bus_type(tmp.bus_index, &tmp.bus_type);
53850 + pr_debug("%s:%u read_bus_type(%u) failed\n", __func__,
53851 + __LINE__, tmp.bus_index);
53855 + result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev);
53857 - pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__,
53859 + pr_debug("%s:%u read_bus_num_dev failed\n", __func__,
53864 - pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %u\n",
53865 - __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id);
53866 + for (tmp.dev_index = 0; tmp.dev_index < num_dev; tmp.dev_index++) {
53867 + result = ps3_repository_read_dev_id(tmp.bus_index,
53871 + pr_debug("%s:%u read_dev_id(%u:%u) failed\n", __func__,
53872 + __LINE__, tmp.bus_index, tmp.dev_index);
53876 + if (tmp.dev_id == dev_id)
53879 + pr_debug("%s:%u: skip, dev_id %lu\n", __func__, __LINE__,
53882 + pr_debug(" <- %s:%u: dev not found\n", __func__, __LINE__);
53886 + result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index,
53889 + pr_debug("%s:%u read_dev_type failed\n", __func__, __LINE__);
53893 + pr_debug(" <- %s:%u: found: type (%u:%u) index (%u:%u) id (%lu:%lu)\n",
53894 + __func__, __LINE__, tmp.bus_type, tmp.dev_type, tmp.bus_index,
53895 + tmp.dev_index, tmp.bus_id, tmp.dev_id);
53899 @@ -402,50 +445,34 @@
53901 pr_debug(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type);
53903 - for (repo.bus_index = 0; repo.bus_index < 10; repo.bus_index++) {
53904 + repo.bus_type = bus_type;
53905 + result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index);
53907 + pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__);
53911 - result = ps3_repository_read_bus_type(repo.bus_index,
53913 + result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id);
53915 + pr_debug("%s:%d read_bus_id(%u) failed\n", __func__, __LINE__,
53921 - pr_debug("%s:%d read_bus_type(%u) failed\n",
53922 - __func__, __LINE__, repo.bus_index);
53923 + for (repo.dev_index = 0; ; repo.dev_index++) {
53924 + result = ps3_repository_find_device(&repo);
53925 + if (result == -ENODEV) {
53928 + } else if (result)
53932 - if (repo.bus_type != bus_type) {
53933 - pr_debug("%s:%d: skip, bus_type %u\n", __func__,
53934 - __LINE__, repo.bus_type);
53938 - result = ps3_repository_read_bus_id(repo.bus_index,
53941 + result = callback(&repo);
53943 - pr_debug("%s:%d read_bus_id(%u) failed\n",
53944 - __func__, __LINE__, repo.bus_index);
53948 - for (repo.dev_index = 0; ; repo.dev_index++) {
53949 - result = ps3_repository_find_device(&repo);
53951 - if (result == -ENODEV) {
53954 - } else if (result)
53957 - result = callback(&repo);
53960 - pr_debug("%s:%d: abort at callback\n", __func__,
53964 + pr_debug("%s:%d: abort at callback\n", __func__,
53971 pr_debug(" <- %s:%d\n", __func__, __LINE__);
53972 @@ -561,7 +588,7 @@
53973 make_first_field("bus", bus_index),
53974 make_field("dev", dev_index),
53975 make_field("port", 0),
53980 int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index,
53981 @@ -571,7 +598,7 @@
53982 make_first_field("bus", bus_index),
53983 make_field("dev", dev_index),
53984 make_field("blk_size", 0),
53986 + 0, blk_size, NULL);
53989 int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index,
53990 @@ -581,7 +608,7 @@
53991 make_first_field("bus", bus_index),
53992 make_field("dev", dev_index),
53993 make_field("n_blocks", 0),
53994 - 0, num_blocks, 0);
53995 + 0, num_blocks, NULL);
53998 int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index,
53999 @@ -594,7 +621,7 @@
54000 make_first_field("bus", bus_index),
54001 make_field("dev", dev_index),
54002 make_field("n_regs", 0),
54008 @@ -611,7 +638,7 @@
54009 make_field("dev", dev_index),
54010 make_field("region", region_index),
54011 make_field("id", 0),
54017 @@ -624,7 +651,7 @@
54018 make_field("dev", dev_index),
54019 make_field("region", region_index),
54020 make_field("size", 0),
54022 + region_size, NULL);
54025 int ps3_repository_read_stor_dev_region_start(unsigned int bus_index,
54026 @@ -635,7 +662,7 @@
54027 make_field("dev", dev_index),
54028 make_field("region", region_index),
54029 make_field("start", 0),
54030 - region_start, 0);
54031 + region_start, NULL);
54034 int ps3_repository_read_stor_dev_info(unsigned int bus_index,
54035 @@ -684,6 +711,35 @@
54040 + * ps3_repository_read_num_pu - Number of logical PU processors for this lpar.
54043 +int ps3_repository_read_num_pu(u64 *num_pu)
54046 + return read_node(PS3_LPAR_ID_CURRENT,
54047 + make_first_field("bi", 0),
54048 + make_field("pun", 0),
54054 + * ps3_repository_read_pu_id - Read the logical PU id.
54055 + * @pu_index: Zero based index.
54056 + * @pu_id: The logical PU id.
54059 +int ps3_repository_read_pu_id(unsigned int pu_index, u64 *pu_id)
54061 + return read_node(PS3_LPAR_ID_CURRENT,
54062 + make_first_field("bi", 0),
54063 + make_field("pu", pu_index),
54068 int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size)
54070 return read_node(PS3_LPAR_ID_CURRENT,
54071 @@ -691,7 +747,7 @@
54072 make_field("pu", 0),
54074 make_field("rm_size", 0),
54079 int ps3_repository_read_region_total(u64 *region_total)
54080 @@ -700,7 +756,7 @@
54081 make_first_field("bi", 0),
54082 make_field("rgntotal", 0),
54084 - region_total, 0);
54085 + region_total, NULL);
54089 @@ -736,7 +792,7 @@
54090 make_first_field("bi", 0),
54091 make_field("spun", 0),
54095 *num_spu_reserved = v1;
54098 @@ -755,7 +811,7 @@
54099 make_first_field("bi", 0),
54100 make_field("spursvn", 0),
54104 *num_resource_id = v1;
54107 @@ -768,7 +824,7 @@
54110 int ps3_repository_read_spu_resource_id(unsigned int res_index,
54111 - enum ps3_spu_resource_type* resource_type, unsigned int *resource_id)
54112 + enum ps3_spu_resource_type *resource_type, unsigned int *resource_id)
54116 @@ -785,14 +841,14 @@
54120 -int ps3_repository_read_boot_dat_address(u64 *address)
54121 +static int ps3_repository_read_boot_dat_address(u64 *address)
54123 return read_node(PS3_LPAR_ID_CURRENT,
54124 make_first_field("bi", 0),
54125 make_field("boot_dat", 0),
54126 make_field("address", 0),
54132 int ps3_repository_read_boot_dat_size(unsigned int *size)
54133 @@ -805,7 +861,7 @@
54134 make_field("boot_dat", 0),
54135 make_field("size", 0),
54142 @@ -820,7 +876,7 @@
54143 make_field("vir_uart", 0),
54144 make_field("port", 0),
54145 make_field("avset", 0),
54151 @@ -835,7 +891,7 @@
54152 make_field("vir_uart", 0),
54153 make_field("port", 0),
54154 make_field("sysmgr", 0),
54160 @@ -856,6 +912,10 @@
54161 : ps3_repository_read_boot_dat_size(size);
54165 + * ps3_repository_read_num_be - Number of physical BE processors in the system.
54168 int ps3_repository_read_num_be(unsigned int *num_be)
54171 @@ -866,11 +926,17 @@
54182 + * ps3_repository_read_be_node_id - Read the physical BE processor node id.
54183 + * @be_index: Zero based index.
54184 + * @node_id: The BE processor node id.
54187 int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id)
54189 return read_node(PS3_LPAR_ID_PME,
54190 @@ -878,7 +944,23 @@
54199 + * ps3_repository_read_be_id - Read the physical BE processor id.
54200 + * @node_id: The BE processor node id.
54201 + * @be_id: The BE processor id.
54204 +int ps3_repository_read_be_id(u64 node_id, u64 *be_id)
54206 + return read_node(PS3_LPAR_ID_PME,
54207 + make_first_field("be", 0),
54214 int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq)
54215 @@ -888,7 +970,7 @@
54217 make_field("clock", 0),
54223 int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq)
54224 @@ -897,11 +979,29 @@
54228 - result = ps3_repository_read_be_node_id(0, &node_id);
54229 + result = ps3_repository_read_be_node_id(be_index, &node_id);
54230 return result ? result
54231 : ps3_repository_read_tb_freq(node_id, tb_freq);
54234 +int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar,
54242 + result = ps3_repository_read_be_node_id(be_index, &node_id);
54243 + return result ? result
54244 + : read_node(PS3_LPAR_ID_PME,
54245 + make_first_field("be", 0),
54247 + make_field("lpm", 0),
54248 + make_field("priv", 0),
54254 int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
54255 @@ -1034,7 +1134,7 @@
54259 - pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %u\n", __func__,
54260 + pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %lu\n", __func__,
54261 __LINE__, repo->bus_index, repo->dev_index,
54262 repo->dev_type, repo->dev_id);
54264 @@ -1091,7 +1191,7 @@
54268 - pr_debug("%s:%d bus_%u: bus_type %u, bus_id %u, num_dev %u\n",
54269 + pr_debug("%s:%d bus_%u: bus_type %u, bus_id %lu, num_dev %u\n",
54270 __func__, __LINE__, repo.bus_index, repo.bus_type,
54271 repo.bus_id, num_dev);
54273 --- a/arch/powerpc/platforms/ps3/spu.c
54274 +++ b/arch/powerpc/platforms/ps3/spu.c
54276 #include <asm/spu_priv1.h>
54277 #include <asm/lv1call.h>
54279 +#include "../cell/spufs/spufs.h"
54280 #include "platform.h"
54282 /* spu_management_ops */
54283 @@ -419,10 +420,34 @@
54288 + * ps3_enable_spu - Enable SPU run control.
54290 + * An outstanding enhancement for the PS3 would be to add a guard to check
54291 + * for incorrect access to the spu problem state when the spu context is
54292 + * disabled. This check could be implemented with a flag added to the spu
54293 + * context that would inhibit mapping problem state pages, and a routine
54294 + * to unmap spu problem state pages. When the spu is enabled with
54295 + * ps3_enable_spu() the flag would be set allowing pages to be mapped,
54296 + * and when the spu is disabled with ps3_disable_spu() the flag would be
54297 + * cleared and the mapped problem state pages would be unmapped.
54300 +static void ps3_enable_spu(struct spu_context *ctx)
54304 +static void ps3_disable_spu(struct spu_context *ctx)
54306 + ctx->ops->runcntl_stop(ctx);
54309 const struct spu_management_ops spu_management_ps3_ops = {
54310 .enumerate_spus = ps3_enumerate_spus,
54311 .create_spu = ps3_create_spu,
54312 .destroy_spu = ps3_destroy_spu,
54313 + .enable_spu = ps3_enable_spu,
54314 + .disable_spu = ps3_disable_spu,
54315 .init_affinity = ps3_init_affinity,
54318 @@ -505,8 +530,6 @@
54319 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK
54320 | MFC_STATE1_PROBLEM_STATE_MASK);
54322 - sr1 |= MFC_STATE1_MASTER_RUN_CONTROL_MASK;
54324 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed));
54326 spu_pdata(spu)->cache.sr1 = sr1;
54327 --- a/arch/powerpc/platforms/ps3/system-bus.c
54328 +++ b/arch/powerpc/platforms/ps3/system-bus.c
54331 } static usage_hack;
54333 -static int ps3_is_device(struct ps3_system_bus_device *dev,
54334 - unsigned int bus_id, unsigned int dev_id)
54335 +static int ps3_is_device(struct ps3_system_bus_device *dev, u64 bus_id,
54338 return dev->bus_id == bus_id && dev->dev_id == dev_id;
54340 @@ -182,8 +182,8 @@
54341 case PS3_MATCH_ID_SYSTEM_MANAGER:
54342 pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
54343 __LINE__, dev->match_id);
54344 - pr_debug("%s:%d: bus_id: %u\n", __func__,
54345 - __LINE__, dev->bus_id);
54346 + pr_debug("%s:%d: bus_id: %lu\n", __func__, __LINE__,
54351 @@ -220,8 +220,8 @@
54352 case PS3_MATCH_ID_SYSTEM_MANAGER:
54353 pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
54354 __LINE__, dev->match_id);
54355 - pr_debug("%s:%d: bus_id: %u\n", __func__,
54356 - __LINE__, dev->bus_id);
54357 + pr_debug("%s:%d: bus_id: %lu\n", __func__, __LINE__,
54362 @@ -240,7 +240,7 @@
54363 static void _dump_mmio_region(const struct ps3_mmio_region* r,
54364 const char* func, int line)
54366 - pr_debug("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id,
54367 + pr_debug("%s:%d: dev %lu:%lu\n", func, line, r->dev->bus_id,
54369 pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
54370 pr_debug("%s:%d: len %lxh\n", func, line, r->len);
54371 @@ -715,6 +715,7 @@
54372 static unsigned int dev_ioc0_count;
54373 static unsigned int dev_sb_count;
54374 static unsigned int dev_vuart_count;
54375 + static unsigned int dev_lpm_count;
54377 if (!dev->core.parent)
54378 dev->core.parent = &ps3_system_bus;
54379 @@ -737,6 +738,10 @@
54380 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
54381 "vuart_%02x", ++dev_vuart_count);
54383 + case PS3_DEVICE_TYPE_LPM:
54384 + snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
54385 + "lpm_%02x", ++dev_lpm_count);
54390 --- a/arch/powerpc/platforms/pseries/eeh.c
54391 +++ b/arch/powerpc/platforms/pseries/eeh.c
54393 #include <linux/rbtree.h>
54394 #include <linux/seq_file.h>
54395 #include <linux/spinlock.h>
54396 +#include <linux/of.h>
54398 #include <asm/atomic.h>
54399 #include <asm/eeh.h>
54400 #include <asm/eeh_event.h>
54401 @@ -169,7 +171,6 @@
54403 static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len)
54405 - struct device_node *dn;
54406 struct pci_dev *dev = pdn->pcidev;
54409 @@ -243,12 +244,12 @@
54411 /* Gather status on devices under the bridge */
54412 if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) {
54413 - dn = pdn->node->child;
54415 + struct device_node *dn;
54417 + for_each_child_of_node(pdn->node, dn) {
54420 n += gather_pci_data(pdn, buf+n, len-n);
54421 - dn = dn->sibling;
54425 @@ -372,7 +373,7 @@
54429 -/** Mark all devices that are peers of this device as failed.
54430 +/** Mark all devices that are children of this device as failed.
54431 * Mark the device driver too, so that it can see the failure
54432 * immediately; this is critical, since some drivers poll
54433 * status registers in interrupts ... If a driver is polling,
54434 @@ -380,9 +381,11 @@
54435 * an interrupt context, which is bad.
54438 -static void __eeh_mark_slot (struct device_node *dn, int mode_flag)
54439 +static void __eeh_mark_slot(struct device_node *parent, int mode_flag)
54442 + struct device_node *dn;
54444 + for_each_child_of_node(parent, dn) {
54446 /* Mark the pci device driver too */
54447 struct pci_dev *dev = PCI_DN(dn)->pcidev;
54448 @@ -392,10 +395,8 @@
54449 if (dev && dev->driver)
54450 dev->error_state = pci_channel_io_frozen;
54453 - __eeh_mark_slot (dn->child, mode_flag);
54454 + __eeh_mark_slot(dn, mode_flag);
54456 - dn = dn->sibling;
54460 @@ -415,19 +416,19 @@
54462 dev->error_state = pci_channel_io_frozen;
54464 - __eeh_mark_slot (dn->child, mode_flag);
54465 + __eeh_mark_slot(dn, mode_flag);
54468 -static void __eeh_clear_slot (struct device_node *dn, int mode_flag)
54469 +static void __eeh_clear_slot(struct device_node *parent, int mode_flag)
54472 + struct device_node *dn;
54474 + for_each_child_of_node(parent, dn) {
54476 PCI_DN(dn)->eeh_mode &= ~mode_flag;
54477 PCI_DN(dn)->eeh_check_count = 0;
54479 - __eeh_clear_slot (dn->child, mode_flag);
54480 + __eeh_clear_slot(dn, mode_flag);
54482 - dn = dn->sibling;
54486 @@ -444,7 +445,7 @@
54488 PCI_DN(dn)->eeh_mode &= ~mode_flag;
54489 PCI_DN(dn)->eeh_check_count = 0;
54490 - __eeh_clear_slot (dn->child, mode_flag);
54491 + __eeh_clear_slot(dn, mode_flag);
54492 spin_unlock_irqrestore(&confirm_error_lock, flags);
54495 @@ -480,6 +481,7 @@
54499 + dn = find_device_pe(dn);
54502 /* Access to IO BARs might get this far and still not want checking. */
54503 @@ -545,7 +547,7 @@
54505 /* Note that config-io to empty slots may fail;
54506 * they are empty when they don't have children. */
54507 - if ((rets[0] == 5) && (dn->child == NULL)) {
54508 + if ((rets[0] == 5) && (rets[2] == 0) && (dn->child == NULL)) {
54510 pdn->eeh_false_positives ++;
54512 @@ -848,11 +850,8 @@
54513 if ((pdn->eeh_mode & EEH_MODE_SUPPORTED) && !IS_BRIDGE(pdn->class_code))
54514 __restore_bars (pdn);
54516 - dn = pdn->node->child;
54518 + for_each_child_of_node(pdn->node, dn)
54519 eeh_restore_bars (PCI_DN(dn));
54520 - dn = dn->sibling;
54525 @@ -1130,7 +1129,8 @@
54526 void eeh_add_device_tree_early(struct device_node *dn)
54528 struct device_node *sib;
54529 - for (sib = dn->child; sib; sib = sib->sibling)
54531 + for_each_child_of_node(dn, sib)
54532 eeh_add_device_tree_early(sib);
54533 eeh_add_device_early(dn);
54535 --- a/arch/powerpc/platforms/pseries/eeh_driver.c
54536 +++ b/arch/powerpc/platforms/pseries/eeh_driver.c
54537 @@ -310,8 +310,6 @@
54538 const char *location, *pci_str, *drv_str;
54540 frozen_dn = find_device_pe(event->dn);
54541 - frozen_bus = pcibios_find_pci_bus(frozen_dn);
54545 location = of_get_property(event->dn, "ibm,loc-code", NULL);
54546 @@ -321,6 +319,8 @@
54547 location, pci_name(event->dev));
54551 + frozen_bus = pcibios_find_pci_bus(frozen_dn);
54552 location = of_get_property(frozen_dn, "ibm,loc-code", NULL);
54553 location = location ? location : "unknown";
54555 @@ -354,13 +354,6 @@
54556 if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
54557 goto excess_failures;
54559 - /* Get the current PCI slot state. */
54560 - rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
54562 - printk(KERN_WARNING "EEH: Permanent failure\n");
54566 printk(KERN_WARNING
54567 "EEH: This PCI device has failed %d times in the last hour:\n",
54568 frozen_pdn->eeh_freeze_count);
54569 @@ -376,6 +369,14 @@
54571 pci_walk_bus(frozen_bus, eeh_report_error, &result);
54573 + /* Get the current PCI slot state. This can take a long time,
54574 + * sometimes over 3 seconds for certain systems. */
54575 + rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
54577 + printk(KERN_WARNING "EEH: Permanent failure\n");
54581 /* Since rtas may enable MMIO when posting the error log,
54582 * don't post the error log until after all dev drivers
54583 * have been informed.
54584 --- a/arch/powerpc/platforms/pseries/iommu.c
54585 +++ b/arch/powerpc/platforms/pseries/iommu.c
54586 @@ -251,7 +251,7 @@
54587 const unsigned long *basep;
54590 - node = (struct device_node *)phb->arch_data;
54593 basep = of_get_property(node, "linux,tce-base", NULL);
54594 sizep = of_get_property(node, "linux,tce-size", NULL);
54595 @@ -296,11 +296,12 @@
54596 static void iommu_table_setparms_lpar(struct pci_controller *phb,
54597 struct device_node *dn,
54598 struct iommu_table *tbl,
54599 - const void *dma_window)
54600 + const void *dma_window,
54603 unsigned long offset, size;
54605 - tbl->it_busno = PCI_DN(dn)->bussubno;
54606 + tbl->it_busno = bussubno;
54607 of_parse_dma_window(dn, dma_window, &tbl->it_index, &offset, &size);
54610 @@ -420,17 +421,10 @@
54611 pdn->full_name, ppci->iommu_table);
54613 if (!ppci->iommu_table) {
54614 - /* Bussubno hasn't been copied yet.
54615 - * Do it now because iommu_table_setparms_lpar needs it.
54618 - ppci->bussubno = bus->number;
54620 tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL,
54623 - iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window);
54625 + iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window,
54627 ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node);
54628 DBG(" created table: %p\n", ppci->iommu_table);
54630 @@ -523,14 +517,10 @@
54633 if (!pci->iommu_table) {
54634 - /* iommu_table_setparms_lpar needs bussubno. */
54635 - pci->bussubno = pci->phb->bus->number;
54637 tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL,
54640 - iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window);
54642 + iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window,
54643 + pci->phb->bus->number);
54644 pci->iommu_table = iommu_init_table(tbl, pci->phb->node);
54645 DBG(" created table: %p\n", pci->iommu_table);
54647 @@ -556,7 +546,7 @@
54648 case PSERIES_RECONFIG_REMOVE:
54649 if (pci && pci->iommu_table &&
54650 of_get_property(np, "ibm,dma-window", NULL))
54651 - iommu_free_table(np);
54652 + iommu_free_table(pci->iommu_table, np->full_name);
54656 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c
54657 +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
54660 /* Must be called before pci_bus_add_devices */
54662 -pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus)
54663 +pcibios_fixup_new_pci_devices(struct pci_bus *bus)
54665 struct pci_dev *dev;
54668 /* Fill device archdata and setup iommu table */
54669 pcibios_setup_new_device(dev);
54672 - pcibios_fixup_device_resources(dev, bus);
54673 pci_read_irq_line(dev);
54674 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
54675 struct resource *r = &dev->resource[i];
54676 @@ -132,8 +130,8 @@
54678 pci_scan_child_bus(child_bus);
54680 - /* Fixup new pci devices without touching bus struct */
54681 - pcibios_fixup_new_pci_devices(child_bus, 0);
54682 + /* Fixup new pci devices */
54683 + pcibios_fixup_new_pci_devices(child_bus);
54685 /* Make the discovered devices available */
54686 pci_bus_add_devices(child_bus);
54687 @@ -169,7 +167,7 @@
54688 /* use ofdt-based probe */
54689 of_scan_bus(dn, bus);
54690 if (!list_empty(&bus->devices)) {
54691 - pcibios_fixup_new_pci_devices(bus, 0);
54692 + pcibios_fixup_new_pci_devices(bus);
54693 pci_bus_add_devices(bus);
54694 eeh_add_device_tree_late(bus);
54696 @@ -178,7 +176,7 @@
54697 slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
54698 num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
54700 - pcibios_fixup_new_pci_devices(bus, 1);
54701 + pcibios_fixup_new_pci_devices(bus);
54702 pci_bus_add_devices(bus);
54703 eeh_add_device_tree_late(bus);
54705 @@ -208,7 +206,7 @@
54706 eeh_add_device_tree_early(dn);
54709 - pcibios_fixup_new_pci_devices(phb->bus, 0);
54710 + pcibios_fixup_new_pci_devices(phb->bus);
54711 pci_bus_add_devices(phb->bus);
54712 eeh_add_device_tree_late(phb->bus);
54714 --- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
54715 +++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
54717 return plpar_hcall_norets(H_POLL_PENDING);
54720 -static inline long prod_processor(void)
54722 - return plpar_hcall_norets(H_PROD);
54725 static inline long cede_processor(void)
54727 return plpar_hcall_norets(H_CEDE);
54728 --- a/arch/powerpc/platforms/pseries/smp.c
54729 +++ b/arch/powerpc/platforms/pseries/smp.c
54731 #include <asm/pSeries_reconfig.h>
54732 #include <asm/mpic.h>
54733 #include <asm/vdso_datapage.h>
54734 +#include <asm/cputhreads.h>
54736 #include "plpar_wrappers.h"
54737 #include "pseries.h"
54738 @@ -202,7 +203,7 @@
54740 if (system_state < SYSTEM_RUNNING &&
54741 cpu_has_feature(CPU_FTR_SMT) &&
54742 - !smt_enabled_at_boot && nr % 2 != 0)
54743 + !smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
54747 --- a/arch/powerpc/platforms/pseries/xics.c
54748 +++ b/arch/powerpc/platforms/pseries/xics.c
54749 @@ -87,19 +87,25 @@
54750 /* Direct HW low level accessors */
54753 -static inline unsigned int direct_xirr_info_get(int n_cpu)
54754 +static inline unsigned int direct_xirr_info_get(void)
54756 - return in_be32(&xics_per_cpu[n_cpu]->xirr.word);
54757 + int cpu = smp_processor_id();
54759 + return in_be32(&xics_per_cpu[cpu]->xirr.word);
54762 -static inline void direct_xirr_info_set(int n_cpu, int value)
54763 +static inline void direct_xirr_info_set(int value)
54765 - out_be32(&xics_per_cpu[n_cpu]->xirr.word, value);
54766 + int cpu = smp_processor_id();
54768 + out_be32(&xics_per_cpu[cpu]->xirr.word, value);
54771 -static inline void direct_cppr_info(int n_cpu, u8 value)
54772 +static inline void direct_cppr_info(u8 value)
54774 - out_8(&xics_per_cpu[n_cpu]->xirr.bytes[0], value);
54775 + int cpu = smp_processor_id();
54777 + out_8(&xics_per_cpu[cpu]->xirr.bytes[0], value);
54780 static inline void direct_qirr_info(int n_cpu, u8 value)
54781 @@ -111,7 +117,7 @@
54782 /* LPAR low level accessors */
54785 -static inline unsigned int lpar_xirr_info_get(int n_cpu)
54786 +static inline unsigned int lpar_xirr_info_get(void)
54788 unsigned long lpar_rc;
54789 unsigned long return_value;
54790 @@ -122,7 +128,7 @@
54791 return (unsigned int)return_value;
54794 -static inline void lpar_xirr_info_set(int n_cpu, int value)
54795 +static inline void lpar_xirr_info_set(int value)
54797 unsigned long lpar_rc;
54798 unsigned long val64 = value & 0xffffffff;
54799 @@ -133,7 +139,7 @@
54803 -static inline void lpar_cppr_info(int n_cpu, u8 value)
54804 +static inline void lpar_cppr_info(u8 value)
54806 unsigned long lpar_rc;
54808 @@ -275,21 +281,19 @@
54810 static void xics_eoi_direct(unsigned int virq)
54812 - int cpu = smp_processor_id();
54813 unsigned int irq = (unsigned int)irq_map[virq].hwirq;
54816 - direct_xirr_info_set(cpu, (0xff << 24) | irq);
54817 + direct_xirr_info_set((0xff << 24) | irq);
54821 static void xics_eoi_lpar(unsigned int virq)
54823 - int cpu = smp_processor_id();
54824 unsigned int irq = (unsigned int)irq_map[virq].hwirq;
54827 - lpar_xirr_info_set(cpu, (0xff << 24) | irq);
54828 + lpar_xirr_info_set((0xff << 24) | irq);
54831 static inline unsigned int xics_remap_irq(unsigned int vec)
54832 @@ -312,16 +316,12 @@
54834 static unsigned int xics_get_irq_direct(void)
54836 - unsigned int cpu = smp_processor_id();
54838 - return xics_remap_irq(direct_xirr_info_get(cpu));
54839 + return xics_remap_irq(direct_xirr_info_get());
54842 static unsigned int xics_get_irq_lpar(void)
54844 - unsigned int cpu = smp_processor_id();
54846 - return xics_remap_irq(lpar_xirr_info_get(cpu));
54847 + return xics_remap_irq(lpar_xirr_info_get());
54851 @@ -387,12 +387,12 @@
54853 #endif /* CONFIG_SMP */
54855 -static void xics_set_cpu_priority(int cpu, unsigned char cppr)
54856 +static void xics_set_cpu_priority(unsigned char cppr)
54858 if (firmware_has_feature(FW_FEATURE_LPAR))
54859 - lpar_cppr_info(cpu, cppr);
54860 + lpar_cppr_info(cppr);
54862 - direct_cppr_info(cpu, cppr);
54863 + direct_cppr_info(cppr);
54867 @@ -440,9 +440,7 @@
54869 void xics_setup_cpu(void)
54871 - int cpu = smp_processor_id();
54873 - xics_set_cpu_priority(cpu, 0xff);
54874 + xics_set_cpu_priority(0xff);
54877 * Put the calling processor into the GIQ. This is really only
54878 @@ -783,7 +781,7 @@
54880 struct irq_desc *desc;
54882 - xics_set_cpu_priority(cpu, 0);
54883 + xics_set_cpu_priority(0);
54887 @@ -824,10 +822,11 @@
54888 void xics_migrate_irqs_away(void)
54891 - unsigned int irq, virq, cpu = smp_processor_id();
54892 + int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id();
54893 + unsigned int irq, virq;
54895 /* Reject any interrupt that was queued to us... */
54896 - xics_set_cpu_priority(cpu, 0);
54897 + xics_set_cpu_priority(0);
54899 /* remove ourselves from the global interrupt queue */
54900 status = rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE,
54901 @@ -835,7 +834,7 @@
54902 WARN_ON(status < 0);
54904 /* Allow IPIs again... */
54905 - xics_set_cpu_priority(cpu, DEFAULT_PRIORITY);
54906 + xics_set_cpu_priority(DEFAULT_PRIORITY);
54908 for_each_irq(virq) {
54909 struct irq_desc *desc;
54910 @@ -874,7 +873,7 @@
54911 * The irq has to be migrated only in the single cpu
54914 - if (xics_status[0] != get_hard_smp_processor_id(cpu))
54915 + if (xics_status[0] != hw_cpu)
54918 printk(KERN_WARNING "IRQ %u affinity broken off cpu %u\n",
54919 --- a/arch/powerpc/platforms/pseries/xics.h
54920 +++ b/arch/powerpc/platforms/pseries/xics.h
54922 extern void xics_request_IPIs(void);
54923 extern void xics_migrate_irqs_away(void);
54925 -/* first argument is ignored for now*/
54926 -void pSeriesLP_cppr_info(int n_cpu, u8 value);
54928 struct xics_ipi_struct {
54929 volatile unsigned long value;
54930 } ____cacheline_aligned;
54932 +++ b/arch/powerpc/sysdev/Kconfig
54934 +# For a description of the syntax of this configuration file,
54935 +# see Documentation/kbuild/kconfig-language.txt.
54938 +config PPC4xx_PCI_EXPRESS
54940 + depends on PCI && 4xx
54942 --- a/arch/powerpc/sysdev/Makefile
54943 +++ b/arch/powerpc/sysdev/Makefile
54945 EXTRA_CFLAGS += -mno-minimal-toc
54948 -mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o
54949 +mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o mpic_pasemi_msi.o
54950 obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-obj-y)
54952 obj-$(CONFIG_PPC_MPC106) += grackle.o
54954 obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
54955 obj-$(CONFIG_FSL_SOC) += fsl_soc.o
54956 obj-$(CONFIG_FSL_PCI) += fsl_pci.o
54957 +obj-$(CONFIG_RAPIDIO) += fsl_rio.o
54958 obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
54959 obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
54960 obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/
54962 ifeq ($(CONFIG_PPC_MERGE),y)
54963 obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
54964 obj-$(CONFIG_PPC_I8259) += i8259.o
54965 -obj-$(CONFIG_PPC_83xx) += ipic.o
54966 +obj-$(CONFIG_IPIC) += ipic.o
54967 obj-$(CONFIG_4xx) += uic.o
54968 obj-$(CONFIG_XILINX_VIRTEX) += xilinx_intc.o
54969 +obj-$(CONFIG_OF_RTC) += of_rtc.o
54970 +ifeq ($(CONFIG_PCI),y)
54971 +obj-$(CONFIG_4xx) += ppc4xx_pci.o
54975 # Temporary hack until we have migrated to asm-powerpc
54976 --- a/arch/powerpc/sysdev/axonram.c
54977 +++ b/arch/powerpc/sysdev/axonram.c
54979 #include <linux/slab.h>
54980 #include <linux/string.h>
54981 #include <linux/types.h>
54982 -#include <asm/of_device.h>
54983 -#include <asm/of_platform.h>
54984 +#include <linux/of_device.h>
54985 +#include <linux/of_platform.h>
54987 #include <asm/page.h>
54988 #include <asm/prom.h>
54990 --- a/arch/powerpc/sysdev/bestcomm/bestcomm.h
54991 +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.h
54995 /* ======================================================================== */
54996 -/* Generic task managment */
54997 +/* Generic task management */
54998 /* ======================================================================== */
55001 --- a/arch/powerpc/sysdev/commproc.c
55002 +++ b/arch/powerpc/sysdev/commproc.c
55003 @@ -240,6 +240,34 @@
55007 +static DEFINE_SPINLOCK(cmd_lock);
55009 +#define MAX_CR_CMD_LOOPS 10000
55011 +int cpm_command(u32 command, u8 opcode)
55014 + unsigned long flags;
55016 + if (command & 0xffffff0f)
55019 + spin_lock_irqsave(&cmd_lock, flags);
55022 + out_be16(&cpmp->cp_cpcr, command | CPM_CR_FLG | (opcode << 8));
55023 + for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
55024 + if ((in_be16(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0)
55027 + printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__);
55030 + spin_unlock_irqrestore(&cmd_lock, flags);
55033 +EXPORT_SYMBOL(cpm_command);
55035 /* We used to do this earlier, but have to postpone as long as possible
55036 * to ensure the kernel VM is now running.
55038 @@ -408,7 +436,7 @@
55039 #endif /* !CONFIG_PPC_CPM_NEW_BINDING */
55041 struct cpm_ioport16 {
55042 - __be16 dir, par, sor, dat, intr;
55043 + __be16 dir, par, odr_sor, dat, intr;
55047 @@ -438,6 +466,13 @@
55049 clrbits32(&iop->par, pin);
55051 + if (port == CPM_PORTB) {
55052 + if (flags & CPM_PIN_OPENDRAIN)
55053 + setbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
55055 + clrbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
55058 if (port == CPM_PORTE) {
55059 if (flags & CPM_PIN_SECONDARY)
55060 setbits32(&iop->sor, pin);
55061 @@ -471,11 +506,17 @@
55063 clrbits16(&iop->par, pin);
55065 + if (port == CPM_PORTA) {
55066 + if (flags & CPM_PIN_OPENDRAIN)
55067 + setbits16(&iop->odr_sor, pin);
55069 + clrbits16(&iop->odr_sor, pin);
55071 if (port == CPM_PORTC) {
55072 if (flags & CPM_PIN_SECONDARY)
55073 - setbits16(&iop->sor, pin);
55074 + setbits16(&iop->odr_sor, pin);
55076 - clrbits16(&iop->sor, pin);
55077 + clrbits16(&iop->odr_sor, pin);
55081 --- a/arch/powerpc/sysdev/cpm2_common.c
55082 +++ b/arch/powerpc/sysdev/cpm2_common.c
55084 cpmp = &cpm2_immr->im_cpm;
55087 +static DEFINE_SPINLOCK(cmd_lock);
55089 +#define MAX_CR_CMD_LOOPS 10000
55091 +int cpm_command(u32 command, u8 opcode)
55094 + unsigned long flags;
55096 + spin_lock_irqsave(&cmd_lock, flags);
55099 + out_be32(&cpmp->cp_cpcr, command | opcode | CPM_CR_FLG);
55100 + for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
55101 + if ((in_be32(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0)
55104 + printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__);
55107 + spin_unlock_irqrestore(&cmd_lock, flags);
55110 +EXPORT_SYMBOL(cpm_command);
55112 /* Set a baud rate generator. This needs lots of work. There are
55113 * eight BRGs, which can be connected to the CPM channels or output
55114 * as clocks. The BRGs are in two different block of internal
55115 --- a/arch/powerpc/sysdev/fsl_pci.c
55116 +++ b/arch/powerpc/sysdev/fsl_pci.c
55118 struct ccsr_pci __iomem *pci;
55121 - pr_debug("PCI memory map start 0x%x, size 0x%x\n", rsrc->start,
55122 - rsrc->end - rsrc->start + 1);
55123 + pr_debug("PCI memory map start 0x%016llx, size 0x%016llx\n",
55124 + (u64)rsrc->start, (u64)rsrc->end - (u64)rsrc->start + 1);
55125 pci = ioremap(rsrc->start, rsrc->end - rsrc->start + 1);
55127 /* Disable all windows (except powar0 since its ignored) */
55128 @@ -46,17 +46,17 @@
55129 /* Setup outbound MEM window */
55130 for(i = 0; i < 3; i++)
55131 if (hose->mem_resources[i].flags & IORESOURCE_MEM){
55132 - pr_debug("PCI MEM resource start 0x%08x, size 0x%08x.\n",
55133 - hose->mem_resources[i].start,
55134 - hose->mem_resources[i].end
55135 - - hose->mem_resources[i].start + 1);
55136 - out_be32(&pci->pow[i+1].potar,
55137 - (hose->mem_resources[i].start >> 12)
55139 + resource_size_t pci_addr_start =
55140 + hose->mem_resources[i].start -
55141 + hose->pci_mem_offset;
55142 + pr_debug("PCI MEM resource start 0x%016llx, size 0x%016llx.\n",
55143 + (u64)hose->mem_resources[i].start,
55144 + (u64)hose->mem_resources[i].end
55145 + - (u64)hose->mem_resources[i].start + 1);
55146 + out_be32(&pci->pow[i+1].potar, (pci_addr_start >> 12));
55147 out_be32(&pci->pow[i+1].potear, 0);
55148 out_be32(&pci->pow[i+1].powbar,
55149 - (hose->mem_resources[i].start >> 12)
55151 + (hose->mem_resources[i].start >> 12));
55152 /* Enable, Mem R/W */
55153 out_be32(&pci->pow[i+1].powar, 0x80044000
55154 | (__ilog2(hose->mem_resources[i].end
55155 @@ -65,15 +65,14 @@
55157 /* Setup outbound IO window */
55158 if (hose->io_resource.flags & IORESOURCE_IO){
55159 - pr_debug("PCI IO resource start 0x%08x, size 0x%08x, phy base 0x%08x.\n",
55160 - hose->io_resource.start,
55161 - hose->io_resource.end - hose->io_resource.start + 1,
55162 - hose->io_base_phys);
55163 - out_be32(&pci->pow[i+1].potar, (hose->io_resource.start >> 12)
55165 + pr_debug("PCI IO resource start 0x%016llx, size 0x%016llx, "
55166 + "phy base 0x%016llx.\n",
55167 + (u64)hose->io_resource.start,
55168 + (u64)hose->io_resource.end - (u64)hose->io_resource.start + 1,
55169 + (u64)hose->io_base_phys);
55170 + out_be32(&pci->pow[i+1].potar, (hose->io_resource.start >> 12));
55171 out_be32(&pci->pow[i+1].potear, 0);
55172 - out_be32(&pci->pow[i+1].powbar, (hose->io_base_phys >> 12)
55174 + out_be32(&pci->pow[i+1].powbar, (hose->io_base_phys >> 12));
55175 /* Enable, IO R/W */
55176 out_be32(&pci->pow[i+1].powar, 0x80088000
55177 | (__ilog2(hose->io_resource.end
55178 @@ -107,55 +106,17 @@
55182 -static void __init quirk_fsl_pcie_transparent(struct pci_dev *dev)
55184 - struct resource *res;
55185 - int i, res_idx = PCI_BRIDGE_RESOURCES;
55186 - struct pci_controller *hose;
55187 +static int fsl_pcie_bus_fixup;
55189 +static void __init quirk_fsl_pcie_header(struct pci_dev *dev)
55191 /* if we aren't a PCIe don't bother */
55192 if (!pci_find_capability(dev, PCI_CAP_ID_EXP))
55196 - * Make the bridge be transparent.
55198 - dev->transparent = 1;
55200 - hose = pci_bus_to_host(dev->bus);
55202 - printk(KERN_ERR "Can't find hose for bus %d\n",
55203 - dev->bus->number);
55207 - /* Clear out any of the virtual P2P bridge registers */
55208 - pci_write_config_word(dev, PCI_IO_BASE_UPPER16, 0);
55209 - pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, 0);
55210 - pci_write_config_byte(dev, PCI_IO_BASE, 0x10);
55211 - pci_write_config_byte(dev, PCI_IO_LIMIT, 0);
55212 - pci_write_config_word(dev, PCI_MEMORY_BASE, 0x10);
55213 - pci_write_config_word(dev, PCI_MEMORY_LIMIT, 0);
55214 - pci_write_config_word(dev, PCI_PREF_BASE_UPPER32, 0x0);
55215 - pci_write_config_word(dev, PCI_PREF_LIMIT_UPPER32, 0x0);
55216 - pci_write_config_word(dev, PCI_PREF_MEMORY_BASE, 0x10);
55217 - pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, 0);
55219 - if (hose->io_resource.flags) {
55220 - res = &dev->resource[res_idx++];
55221 - res->start = hose->io_resource.start;
55222 - res->end = hose->io_resource.end;
55223 - res->flags = hose->io_resource.flags;
55224 - update_bridge_resource(dev, res);
55227 - for (i = 0; i < 3; i++) {
55228 - res = &dev->resource[res_idx + i];
55229 - res->start = hose->mem_resources[i].start;
55230 - res->end = hose->mem_resources[i].end;
55231 - res->flags = hose->mem_resources[i].flags;
55232 - update_bridge_resource(dev, res);
55234 + dev->class = PCI_CLASS_BRIDGE_PCI << 8;
55235 + fsl_pcie_bus_fixup = 1;
55239 int __init fsl_pcie_check_link(struct pci_controller *hose)
55240 @@ -172,11 +133,24 @@
55241 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
55244 - /* deal with bogus pci_bus when we don't have anything connected on PCIe */
55245 - if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
55246 - if (bus->parent) {
55247 - for (i = 0; i < 4; ++i)
55248 - bus->resource[i] = bus->parent->resource[i];
55249 + if ((bus->parent == hose->bus) &&
55250 + ((fsl_pcie_bus_fixup &&
55251 + early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) ||
55252 + (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK)))
55254 + for (i = 0; i < 4; ++i) {
55255 + struct resource *res = bus->resource[i];
55256 + struct resource *par = bus->parent->resource[i];
55262 + if (res && par) {
55263 + res->start = par->start;
55264 + res->end = par->end;
55265 + res->flags = par->flags;
55270 @@ -202,7 +176,7 @@
55271 printk(KERN_WARNING "Can't get bus-range for %s, assume"
55272 " bus 0\n", dev->full_name);
55274 - pci_assign_all_buses = 1;
55275 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
55276 hose = pcibios_alloc_controller(dev);
55279 @@ -222,7 +196,7 @@
55280 hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
55283 - printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx."
55284 + printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. "
55285 "Firmware bus number: %d->%d\n",
55286 (unsigned long long)rsrc.start, hose->first_busno,
55288 @@ -240,23 +214,23 @@
55292 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8548E, quirk_fsl_pcie_transparent);
55293 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8548, quirk_fsl_pcie_transparent);
55294 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8543E, quirk_fsl_pcie_transparent);
55295 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8543, quirk_fsl_pcie_transparent);
55296 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8547E, quirk_fsl_pcie_transparent);
55297 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8545E, quirk_fsl_pcie_transparent);
55298 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8545, quirk_fsl_pcie_transparent);
55299 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8568E, quirk_fsl_pcie_transparent);
55300 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8568, quirk_fsl_pcie_transparent);
55301 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8567E, quirk_fsl_pcie_transparent);
55302 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8567, quirk_fsl_pcie_transparent);
55303 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533E, quirk_fsl_pcie_transparent);
55304 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_transparent);
55305 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_transparent);
55306 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_transparent);
55307 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_transparent);
55308 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_transparent);
55309 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_transparent);
55310 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_transparent);
55311 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_transparent);
55312 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8548E, quirk_fsl_pcie_header);
55313 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8548, quirk_fsl_pcie_header);
55314 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8543E, quirk_fsl_pcie_header);
55315 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8543, quirk_fsl_pcie_header);
55316 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8547E, quirk_fsl_pcie_header);
55317 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8545E, quirk_fsl_pcie_header);
55318 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8545, quirk_fsl_pcie_header);
55319 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8568E, quirk_fsl_pcie_header);
55320 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8568, quirk_fsl_pcie_header);
55321 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8567E, quirk_fsl_pcie_header);
55322 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8567, quirk_fsl_pcie_header);
55323 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8533E, quirk_fsl_pcie_header);
55324 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_header);
55325 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_header);
55326 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_header);
55327 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_header);
55328 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_header);
55329 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_header);
55330 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header);
55331 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
55333 +++ b/arch/powerpc/sysdev/fsl_rio.c
55336 + * MPC85xx RapidIO support
55338 + * Copyright 2005 MontaVista Software, Inc.
55339 + * Matt Porter <mporter@kernel.crashing.org>
55341 + * This program is free software; you can redistribute it and/or modify it
55342 + * under the terms of the GNU General Public License as published by the
55343 + * Free Software Foundation; either version 2 of the License, or (at your
55344 + * option) any later version.
55347 +#include <linux/init.h>
55348 +#include <linux/module.h>
55349 +#include <linux/types.h>
55350 +#include <linux/dma-mapping.h>
55351 +#include <linux/interrupt.h>
55352 +#include <linux/rio.h>
55353 +#include <linux/rio_drv.h>
55355 +#include <asm/io.h>
55357 +#define RIO_REGS_BASE (CCSRBAR + 0xc0000)
55358 +#define RIO_ATMU_REGS_OFFSET 0x10c00
55359 +#define RIO_MSG_REGS_OFFSET 0x11000
55360 +#define RIO_MAINT_WIN_SIZE 0x400000
55361 +#define RIO_DBELL_WIN_SIZE 0x1000
55363 +#define RIO_MSG_OMR_MUI 0x00000002
55364 +#define RIO_MSG_OSR_TE 0x00000080
55365 +#define RIO_MSG_OSR_QOI 0x00000020
55366 +#define RIO_MSG_OSR_QFI 0x00000010
55367 +#define RIO_MSG_OSR_MUB 0x00000004
55368 +#define RIO_MSG_OSR_EOMI 0x00000002
55369 +#define RIO_MSG_OSR_QEI 0x00000001
55371 +#define RIO_MSG_IMR_MI 0x00000002
55372 +#define RIO_MSG_ISR_TE 0x00000080
55373 +#define RIO_MSG_ISR_QFI 0x00000010
55374 +#define RIO_MSG_ISR_DIQI 0x00000001
55376 +#define RIO_MSG_DESC_SIZE 32
55377 +#define RIO_MSG_BUFFER_SIZE 4096
55378 +#define RIO_MIN_TX_RING_SIZE 2
55379 +#define RIO_MAX_TX_RING_SIZE 2048
55380 +#define RIO_MIN_RX_RING_SIZE 2
55381 +#define RIO_MAX_RX_RING_SIZE 2048
55383 +#define DOORBELL_DMR_DI 0x00000002
55384 +#define DOORBELL_DSR_TE 0x00000080
55385 +#define DOORBELL_DSR_QFI 0x00000010
55386 +#define DOORBELL_DSR_DIQI 0x00000001
55387 +#define DOORBELL_TID_OFFSET 0x03
55388 +#define DOORBELL_SID_OFFSET 0x05
55389 +#define DOORBELL_INFO_OFFSET 0x06
55391 +#define DOORBELL_MESSAGE_SIZE 0x08
55392 +#define DBELL_SID(x) (*(u8 *)(x + DOORBELL_SID_OFFSET))
55393 +#define DBELL_TID(x) (*(u8 *)(x + DOORBELL_TID_OFFSET))
55394 +#define DBELL_INF(x) (*(u16 *)(x + DOORBELL_INFO_OFFSET))
55396 +struct rio_atmu_regs {
55405 +struct rio_msg_regs {
55438 +struct rio_tx_desc {
55449 +static u32 regs_win;
55450 +static struct rio_atmu_regs *atmu_regs;
55451 +static struct rio_atmu_regs *maint_atmu_regs;
55452 +static struct rio_atmu_regs *dbell_atmu_regs;
55453 +static u32 dbell_win;
55454 +static u32 maint_win;
55455 +static struct rio_msg_regs *msg_regs;
55457 +static struct rio_dbell_ring {
55462 +static struct rio_msg_tx_ring {
55465 + void *virt_buffer[RIO_MAX_TX_RING_SIZE];
55466 + dma_addr_t phys_buffer[RIO_MAX_TX_RING_SIZE];
55472 +static struct rio_msg_rx_ring {
55475 + void *virt_buffer[RIO_MAX_RX_RING_SIZE];
55482 + * mpc85xx_rio_doorbell_send - Send a MPC85xx doorbell message
55483 + * @index: ID of RapidIO interface
55484 + * @destid: Destination ID of target device
55485 + * @data: 16-bit info field of RapidIO doorbell message
55487 + * Sends a MPC85xx doorbell message. Returns %0 on success or
55488 + * %-EINVAL on failure.
55490 +static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data)
55492 + pr_debug("mpc85xx_doorbell_send: index %d destid %4.4x data %4.4x\n",
55493 + index, destid, data);
55494 + out_be32((void *)&dbell_atmu_regs->rowtar, destid << 22);
55495 + out_be16((void *)(dbell_win), data);
55501 + * mpc85xx_local_config_read - Generate a MPC85xx local config space read
55502 + * @index: ID of RapdiIO interface
55503 + * @offset: Offset into configuration space
55504 + * @len: Length (in bytes) of the maintenance transaction
55505 + * @data: Value to be read into
55507 + * Generates a MPC85xx local configuration space read. Returns %0 on
55508 + * success or %-EINVAL on failure.
55510 +static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data)
55512 + pr_debug("mpc85xx_local_config_read: index %d offset %8.8x\n", index,
55514 + *data = in_be32((void *)(regs_win + offset));
55520 + * mpc85xx_local_config_write - Generate a MPC85xx local config space write
55521 + * @index: ID of RapdiIO interface
55522 + * @offset: Offset into configuration space
55523 + * @len: Length (in bytes) of the maintenance transaction
55524 + * @data: Value to be written
55526 + * Generates a MPC85xx local configuration space write. Returns %0 on
55527 + * success or %-EINVAL on failure.
55529 +static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data)
55532 + ("mpc85xx_local_config_write: index %d offset %8.8x data %8.8x\n",
55533 + index, offset, data);
55534 + out_be32((void *)(regs_win + offset), data);
55540 + * mpc85xx_rio_config_read - Generate a MPC85xx read maintenance transaction
55541 + * @index: ID of RapdiIO interface
55542 + * @destid: Destination ID of transaction
55543 + * @hopcount: Number of hops to target device
55544 + * @offset: Offset into configuration space
55545 + * @len: Length (in bytes) of the maintenance transaction
55546 + * @val: Location to be read into
55548 + * Generates a MPC85xx read maintenance transaction. Returns %0 on
55549 + * success or %-EINVAL on failure.
55552 +mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len,
55558 + ("mpc85xx_rio_config_read: index %d destid %d hopcount %d offset %8.8x len %d\n",
55559 + index, destid, hopcount, offset, len);
55560 + out_be32((void *)&maint_atmu_regs->rowtar,
55561 + (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9));
55563 + data = (u8 *) maint_win + offset;
55566 + *val = in_8((u8 *) data);
55569 + *val = in_be16((u16 *) data);
55572 + *val = in_be32((u32 *) data);
55580 + * mpc85xx_rio_config_write - Generate a MPC85xx write maintenance transaction
55581 + * @index: ID of RapdiIO interface
55582 + * @destid: Destination ID of transaction
55583 + * @hopcount: Number of hops to target device
55584 + * @offset: Offset into configuration space
55585 + * @len: Length (in bytes) of the maintenance transaction
55586 + * @val: Value to be written
55588 + * Generates an MPC85xx write maintenance transaction. Returns %0 on
55589 + * success or %-EINVAL on failure.
55592 +mpc85xx_rio_config_write(int index, u16 destid, u8 hopcount, u32 offset,
55593 + int len, u32 val)
55597 + ("mpc85xx_rio_config_write: index %d destid %d hopcount %d offset %8.8x len %d val %8.8x\n",
55598 + index, destid, hopcount, offset, len, val);
55599 + out_be32((void *)&maint_atmu_regs->rowtar,
55600 + (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9));
55602 + data = (u8 *) maint_win + offset;
55605 + out_8((u8 *) data, val);
55608 + out_be16((u16 *) data, val);
55611 + out_be32((u32 *) data, val);
55619 + * rio_hw_add_outb_message - Add message to the MPC85xx outbound message queue
55620 + * @mport: Master port with outbound message queue
55621 + * @rdev: Target of outbound message
55622 + * @mbox: Outbound mailbox
55623 + * @buffer: Message to add to outbound queue
55624 + * @len: Length of message
55626 + * Adds the @buffer message to the MPC85xx outbound message queue. Returns
55627 + * %0 on success or %-EINVAL on failure.
55630 +rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox,
55631 + void *buffer, size_t len)
55634 + struct rio_tx_desc *desc =
55635 + (struct rio_tx_desc *)msg_tx_ring.virt + msg_tx_ring.tx_slot;
55639 + ("RIO: rio_hw_add_outb_message(): destid %4.4x mbox %d buffer %8.8x len %8.8x\n",
55640 + rdev->destid, mbox, (int)buffer, len);
55642 + if ((len < 8) || (len > RIO_MAX_MSG_SIZE)) {
55647 + /* Copy and clear rest of buffer */
55648 + memcpy(msg_tx_ring.virt_buffer[msg_tx_ring.tx_slot], buffer, len);
55649 + if (len < (RIO_MAX_MSG_SIZE - 4))
55650 + memset((void *)((u32) msg_tx_ring.
55651 + virt_buffer[msg_tx_ring.tx_slot] + len), 0,
55652 + RIO_MAX_MSG_SIZE - len);
55654 + /* Set mbox field for message */
55655 + desc->dport = mbox & 0x3;
55657 + /* Enable EOMI interrupt, set priority, and set destid */
55658 + desc->dattr = 0x28000000 | (rdev->destid << 2);
55660 + /* Set transfer size aligned to next power of 2 (in double words) */
55661 + desc->dwcnt = is_power_of_2(len) ? len : 1 << get_bitmask_order(len);
55663 + /* Set snooping and source buffer address */
55664 + desc->saddr = 0x00000004 | msg_tx_ring.phys_buffer[msg_tx_ring.tx_slot];
55666 + /* Increment enqueue pointer */
55667 + omr = in_be32((void *)&msg_regs->omr);
55668 + out_be32((void *)&msg_regs->omr, omr | RIO_MSG_OMR_MUI);
55670 + /* Go to next descriptor */
55671 + if (++msg_tx_ring.tx_slot == msg_tx_ring.size)
55672 + msg_tx_ring.tx_slot = 0;
55678 +EXPORT_SYMBOL_GPL(rio_hw_add_outb_message);
55681 + * mpc85xx_rio_tx_handler - MPC85xx outbound message interrupt handler
55682 + * @irq: Linux interrupt number
55683 + * @dev_instance: Pointer to interrupt-specific data
55685 + * Handles outbound message interrupts. Executes a register outbound
55686 + * mailbox event handler and acks the interrupt occurrence.
55688 +static irqreturn_t
55689 +mpc85xx_rio_tx_handler(int irq, void *dev_instance)
55692 + struct rio_mport *port = (struct rio_mport *)dev_instance;
55694 + osr = in_be32((void *)&msg_regs->osr);
55696 + if (osr & RIO_MSG_OSR_TE) {
55697 + pr_info("RIO: outbound message transmission error\n");
55698 + out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_TE);
55702 + if (osr & RIO_MSG_OSR_QOI) {
55703 + pr_info("RIO: outbound message queue overflow\n");
55704 + out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_QOI);
55708 + if (osr & RIO_MSG_OSR_EOMI) {
55709 + u32 dqp = in_be32((void *)&msg_regs->odqdpar);
55710 + int slot = (dqp - msg_tx_ring.phys) >> 5;
55711 + port->outb_msg[0].mcback(port, msg_tx_ring.dev_id, -1, slot);
55713 + /* Ack the end-of-message interrupt */
55714 + out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_EOMI);
55718 + return IRQ_HANDLED;
55722 + * rio_open_outb_mbox - Initialize MPC85xx outbound mailbox
55723 + * @mport: Master port implementing the outbound message unit
55724 + * @dev_id: Device specific pointer to pass on event
55725 + * @mbox: Mailbox to open
55726 + * @entries: Number of entries in the outbound mailbox ring
55728 + * Initializes buffer ring, request the outbound message interrupt,
55729 + * and enables the outbound message unit. Returns %0 on success and
55730 + * %-EINVAL or %-ENOMEM on failure.
55732 +int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
55734 + int i, j, rc = 0;
55736 + if ((entries < RIO_MIN_TX_RING_SIZE) ||
55737 + (entries > RIO_MAX_TX_RING_SIZE) || (!is_power_of_2(entries))) {
55742 + /* Initialize shadow copy ring */
55743 + msg_tx_ring.dev_id = dev_id;
55744 + msg_tx_ring.size = entries;
55746 + for (i = 0; i < msg_tx_ring.size; i++) {
55748 + (msg_tx_ring.virt_buffer[i] =
55749 + dma_alloc_coherent(NULL, RIO_MSG_BUFFER_SIZE,
55750 + &msg_tx_ring.phys_buffer[i],
55753 + for (j = 0; j < msg_tx_ring.size; j++)
55754 + if (msg_tx_ring.virt_buffer[j])
55755 + dma_free_coherent(NULL,
55756 + RIO_MSG_BUFFER_SIZE,
55765 + /* Initialize outbound message descriptor ring */
55766 + if (!(msg_tx_ring.virt = dma_alloc_coherent(NULL,
55767 + msg_tx_ring.size *
55768 + RIO_MSG_DESC_SIZE,
55769 + &msg_tx_ring.phys,
55774 + memset(msg_tx_ring.virt, 0, msg_tx_ring.size * RIO_MSG_DESC_SIZE);
55775 + msg_tx_ring.tx_slot = 0;
55777 + /* Point dequeue/enqueue pointers at first entry in ring */
55778 + out_be32((void *)&msg_regs->odqdpar, msg_tx_ring.phys);
55779 + out_be32((void *)&msg_regs->odqepar, msg_tx_ring.phys);
55781 + /* Configure for snooping */
55782 + out_be32((void *)&msg_regs->osar, 0x00000004);
55784 + /* Clear interrupt status */
55785 + out_be32((void *)&msg_regs->osr, 0x000000b3);
55787 + /* Hook up outbound message handler */
55789 + request_irq(MPC85xx_IRQ_RIO_TX, mpc85xx_rio_tx_handler, 0,
55790 + "msg_tx", (void *)mport)) < 0)
55794 + * Configure outbound message unit
55796 + * Interrupts (all enabled, except QEIE)
55800 + out_be32((void *)&msg_regs->omr, 0x00100220);
55802 + /* Set number of entries */
55803 + out_be32((void *)&msg_regs->omr,
55804 + in_be32((void *)&msg_regs->omr) |
55805 + ((get_bitmask_order(entries) - 2) << 12));
55807 + /* Now enable the unit */
55808 + out_be32((void *)&msg_regs->omr, in_be32((void *)&msg_regs->omr) | 0x1);
55814 + dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
55815 + msg_tx_ring.virt, msg_tx_ring.phys);
55818 + for (i = 0; i < msg_tx_ring.size; i++)
55819 + dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE,
55820 + msg_tx_ring.virt_buffer[i],
55821 + msg_tx_ring.phys_buffer[i]);
55827 + * rio_close_outb_mbox - Shut down MPC85xx outbound mailbox
55828 + * @mport: Master port implementing the outbound message unit
55829 + * @mbox: Mailbox to close
55831 + * Disables the outbound message unit, free all buffers, and
55832 + * frees the outbound message interrupt.
55834 +void rio_close_outb_mbox(struct rio_mport *mport, int mbox)
55836 + /* Disable inbound message unit */
55837 + out_be32((void *)&msg_regs->omr, 0);
55840 + dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
55841 + msg_tx_ring.virt, msg_tx_ring.phys);
55843 + /* Free interrupt */
55844 + free_irq(MPC85xx_IRQ_RIO_TX, (void *)mport);
55848 + * mpc85xx_rio_rx_handler - MPC85xx inbound message interrupt handler
55849 + * @irq: Linux interrupt number
55850 + * @dev_instance: Pointer to interrupt-specific data
55852 + * Handles inbound message interrupts. Executes a registered inbound
55853 + * mailbox event handler and acks the interrupt occurrence.
55855 +static irqreturn_t
55856 +mpc85xx_rio_rx_handler(int irq, void *dev_instance)
55859 + struct rio_mport *port = (struct rio_mport *)dev_instance;
55861 + isr = in_be32((void *)&msg_regs->isr);
55863 + if (isr & RIO_MSG_ISR_TE) {
55864 + pr_info("RIO: inbound message reception error\n");
55865 + out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_TE);
55869 + /* XXX Need to check/dispatch until queue empty */
55870 + if (isr & RIO_MSG_ISR_DIQI) {
55872 + * We implement *only* mailbox 0, but can receive messages
55873 + * for any mailbox/letter to that mailbox destination. So,
55874 + * make the callback with an unknown/invalid mailbox number
55877 + port->inb_msg[0].mcback(port, msg_rx_ring.dev_id, -1, -1);
55879 + /* Ack the queueing interrupt */
55880 + out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_DIQI);
55884 + return IRQ_HANDLED;
55888 + * rio_open_inb_mbox - Initialize MPC85xx inbound mailbox
55889 + * @mport: Master port implementing the inbound message unit
55890 + * @dev_id: Device specific pointer to pass on event
55891 + * @mbox: Mailbox to open
55892 + * @entries: Number of entries in the inbound mailbox ring
55894 + * Initializes buffer ring, request the inbound message interrupt,
55895 + * and enables the inbound message unit. Returns %0 on success
55896 + * and %-EINVAL or %-ENOMEM on failure.
55898 +int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
55902 + if ((entries < RIO_MIN_RX_RING_SIZE) ||
55903 + (entries > RIO_MAX_RX_RING_SIZE) || (!is_power_of_2(entries))) {
55908 + /* Initialize client buffer ring */
55909 + msg_rx_ring.dev_id = dev_id;
55910 + msg_rx_ring.size = entries;
55911 + msg_rx_ring.rx_slot = 0;
55912 + for (i = 0; i < msg_rx_ring.size; i++)
55913 + msg_rx_ring.virt_buffer[i] = NULL;
55915 + /* Initialize inbound message ring */
55916 + if (!(msg_rx_ring.virt = dma_alloc_coherent(NULL,
55917 + msg_rx_ring.size *
55918 + RIO_MAX_MSG_SIZE,
55919 + &msg_rx_ring.phys,
55925 + /* Point dequeue/enqueue pointers at first entry in ring */
55926 + out_be32((void *)&msg_regs->ifqdpar, (u32) msg_rx_ring.phys);
55927 + out_be32((void *)&msg_regs->ifqepar, (u32) msg_rx_ring.phys);
55929 + /* Clear interrupt status */
55930 + out_be32((void *)&msg_regs->isr, 0x00000091);
55932 + /* Hook up inbound message handler */
55934 + request_irq(MPC85xx_IRQ_RIO_RX, mpc85xx_rio_rx_handler, 0,
55935 + "msg_rx", (void *)mport)) < 0) {
55936 + dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE,
55937 + msg_tx_ring.virt_buffer[i],
55938 + msg_tx_ring.phys_buffer[i]);
55943 + * Configure inbound message unit:
55945 + * 4KB max message size
55946 + * Unmask all interrupt sources
55949 + out_be32((void *)&msg_regs->imr, 0x001b0060);
55951 + /* Set number of queue entries */
55952 + out_be32((void *)&msg_regs->imr,
55953 + in_be32((void *)&msg_regs->imr) |
55954 + ((get_bitmask_order(entries) - 2) << 12));
55956 + /* Now enable the unit */
55957 + out_be32((void *)&msg_regs->imr, in_be32((void *)&msg_regs->imr) | 0x1);
55964 + * rio_close_inb_mbox - Shut down MPC85xx inbound mailbox
55965 + * @mport: Master port implementing the inbound message unit
55966 + * @mbox: Mailbox to close
55968 + * Disables the inbound message unit, free all buffers, and
55969 + * frees the inbound message interrupt.
55971 +void rio_close_inb_mbox(struct rio_mport *mport, int mbox)
55973 + /* Disable inbound message unit */
55974 + out_be32((void *)&msg_regs->imr, 0);
55977 + dma_free_coherent(NULL, msg_rx_ring.size * RIO_MAX_MSG_SIZE,
55978 + msg_rx_ring.virt, msg_rx_ring.phys);
55980 + /* Free interrupt */
55981 + free_irq(MPC85xx_IRQ_RIO_RX, (void *)mport);
55985 + * rio_hw_add_inb_buffer - Add buffer to the MPC85xx inbound message queue
55986 + * @mport: Master port implementing the inbound message unit
55987 + * @mbox: Inbound mailbox number
55988 + * @buf: Buffer to add to inbound queue
55990 + * Adds the @buf buffer to the MPC85xx inbound message queue. Returns
55991 + * %0 on success or %-EINVAL on failure.
55993 +int rio_hw_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf)
55997 + pr_debug("RIO: rio_hw_add_inb_buffer(), msg_rx_ring.rx_slot %d\n",
55998 + msg_rx_ring.rx_slot);
56000 + if (msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot]) {
56002 + "RIO: error adding inbound buffer %d, buffer exists\n",
56003 + msg_rx_ring.rx_slot);
56008 + msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot] = buf;
56009 + if (++msg_rx_ring.rx_slot == msg_rx_ring.size)
56010 + msg_rx_ring.rx_slot = 0;
56016 +EXPORT_SYMBOL_GPL(rio_hw_add_inb_buffer);
56019 + * rio_hw_get_inb_message - Fetch inbound message from the MPC85xx message unit
56020 + * @mport: Master port implementing the inbound message unit
56021 + * @mbox: Inbound mailbox number
56023 + * Gets the next available inbound message from the inbound message queue.
56024 + * A pointer to the message is returned on success or NULL on failure.
56026 +void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox)
56029 + u32 phys_buf, virt_buf;
56030 + void *buf = NULL;
56033 + phys_buf = in_be32((void *)&msg_regs->ifqdpar);
56035 + /* If no more messages, then bail out */
56036 + if (phys_buf == in_be32((void *)&msg_regs->ifqepar))
56039 + virt_buf = (u32) msg_rx_ring.virt + (phys_buf - msg_rx_ring.phys);
56040 + buf_idx = (phys_buf - msg_rx_ring.phys) / RIO_MAX_MSG_SIZE;
56041 + buf = msg_rx_ring.virt_buffer[buf_idx];
56045 + "RIO: inbound message copy failed, no buffers\n");
56049 + /* Copy max message size, caller is expected to allocate that big */
56050 + memcpy(buf, (void *)virt_buf, RIO_MAX_MSG_SIZE);
56052 + /* Clear the available buffer */
56053 + msg_rx_ring.virt_buffer[buf_idx] = NULL;
56056 + imr = in_be32((void *)&msg_regs->imr);
56057 + out_be32((void *)&msg_regs->imr, imr | RIO_MSG_IMR_MI);
56063 +EXPORT_SYMBOL_GPL(rio_hw_get_inb_message);
56066 + * mpc85xx_rio_dbell_handler - MPC85xx doorbell interrupt handler
56067 + * @irq: Linux interrupt number
56068 + * @dev_instance: Pointer to interrupt-specific data
56070 + * Handles doorbell interrupts. Parses a list of registered
56071 + * doorbell event handlers and executes a matching event handler.
56073 +static irqreturn_t
56074 +mpc85xx_rio_dbell_handler(int irq, void *dev_instance)
56077 + struct rio_mport *port = (struct rio_mport *)dev_instance;
56079 + dsr = in_be32((void *)&msg_regs->dsr);
56081 + if (dsr & DOORBELL_DSR_TE) {
56082 + pr_info("RIO: doorbell reception error\n");
56083 + out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_TE);
56087 + if (dsr & DOORBELL_DSR_QFI) {
56088 + pr_info("RIO: doorbell queue full\n");
56089 + out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_QFI);
56093 + /* XXX Need to check/dispatch until queue empty */
56094 + if (dsr & DOORBELL_DSR_DIQI) {
56096 + (u32) dbell_ring.virt +
56097 + (in_be32((void *)&msg_regs->dqdpar) & 0xfff);
56099 + struct rio_dbell *dbell;
56103 + ("RIO: processing doorbell, sid %2.2x tid %2.2x info %4.4x\n",
56104 + DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
56106 + list_for_each_entry(dbell, &port->dbells, node) {
56107 + if ((dbell->res->start <= DBELL_INF(dmsg)) &&
56108 + (dbell->res->end >= DBELL_INF(dmsg))) {
56114 + dbell->dinb(port, dbell->dev_id, DBELL_SID(dmsg), DBELL_TID(dmsg),
56115 + DBELL_INF(dmsg));
56118 + ("RIO: spurious doorbell, sid %2.2x tid %2.2x info %4.4x\n",
56119 + DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
56121 + dmr = in_be32((void *)&msg_regs->dmr);
56122 + out_be32((void *)&msg_regs->dmr, dmr | DOORBELL_DMR_DI);
56123 + out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_DIQI);
56127 + return IRQ_HANDLED;
56131 + * mpc85xx_rio_doorbell_init - MPC85xx doorbell interface init
56132 + * @mport: Master port implementing the inbound doorbell unit
56134 + * Initializes doorbell unit hardware and inbound DMA buffer
56135 + * ring. Called from mpc85xx_rio_setup(). Returns %0 on success
56136 + * or %-ENOMEM on failure.
56138 +static int mpc85xx_rio_doorbell_init(struct rio_mport *mport)
56142 + /* Map outbound doorbell window immediately after maintenance window */
56143 + if (!(dbell_win =
56144 + (u32) ioremap(mport->iores.start + RIO_MAINT_WIN_SIZE,
56145 + RIO_DBELL_WIN_SIZE))) {
56147 + "RIO: unable to map outbound doorbell window\n");
56152 + /* Initialize inbound doorbells */
56153 + if (!(dbell_ring.virt = dma_alloc_coherent(NULL,
56154 + 512 * DOORBELL_MESSAGE_SIZE,
56155 + &dbell_ring.phys,
56157 + printk(KERN_ERR "RIO: unable allocate inbound doorbell ring\n");
56159 + iounmap((void *)dbell_win);
56163 + /* Point dequeue/enqueue pointers at first entry in ring */
56164 + out_be32((void *)&msg_regs->dqdpar, (u32) dbell_ring.phys);
56165 + out_be32((void *)&msg_regs->dqepar, (u32) dbell_ring.phys);
56167 + /* Clear interrupt status */
56168 + out_be32((void *)&msg_regs->dsr, 0x00000091);
56170 + /* Hook up doorbell handler */
56172 + request_irq(MPC85xx_IRQ_RIO_BELL, mpc85xx_rio_dbell_handler, 0,
56173 + "dbell_rx", (void *)mport) < 0)) {
56174 + iounmap((void *)dbell_win);
56175 + dma_free_coherent(NULL, 512 * DOORBELL_MESSAGE_SIZE,
56176 + dbell_ring.virt, dbell_ring.phys);
56178 + "MPC85xx RIO: unable to request inbound doorbell irq");
56182 + /* Configure doorbells for snooping, 512 entries, and enable */
56183 + out_be32((void *)&msg_regs->dmr, 0x00108161);
56189 +static char *cmdline = NULL;
56191 +static int mpc85xx_rio_get_hdid(int index)
56193 + /* XXX Need to parse multiple entries in some format */
56197 + return simple_strtol(cmdline, NULL, 0);
56200 +static int mpc85xx_rio_get_cmdline(char *s)
56209 +__setup("riohdid=", mpc85xx_rio_get_cmdline);
56212 + * mpc85xx_rio_setup - Setup MPC85xx RapidIO interface
56213 + * @law_start: Starting physical address of RapidIO LAW
56214 + * @law_size: Size of RapidIO LAW
56216 + * Initializes MPC85xx RapidIO hardware interface, configures
56217 + * master port with system-specific info, and registers the
56218 + * master port with the RapidIO subsystem.
56220 +void mpc85xx_rio_setup(int law_start, int law_size)
56222 + struct rio_ops *ops;
56223 + struct rio_mport *port;
56225 + ops = kmalloc(sizeof(struct rio_ops), GFP_KERNEL);
56226 + ops->lcread = mpc85xx_local_config_read;
56227 + ops->lcwrite = mpc85xx_local_config_write;
56228 + ops->cread = mpc85xx_rio_config_read;
56229 + ops->cwrite = mpc85xx_rio_config_write;
56230 + ops->dsend = mpc85xx_rio_doorbell_send;
56232 + port = kmalloc(sizeof(struct rio_mport), GFP_KERNEL);
56235 + INIT_LIST_HEAD(&port->dbells);
56236 + port->iores.start = law_start;
56237 + port->iores.end = law_start + law_size;
56238 + port->iores.flags = IORESOURCE_MEM;
56240 + rio_init_dbell_res(&port->riores[RIO_DOORBELL_RESOURCE], 0, 0xffff);
56241 + rio_init_mbox_res(&port->riores[RIO_INB_MBOX_RESOURCE], 0, 0);
56242 + rio_init_mbox_res(&port->riores[RIO_OUTB_MBOX_RESOURCE], 0, 0);
56243 + strcpy(port->name, "RIO0 mport");
56246 + port->host_deviceid = mpc85xx_rio_get_hdid(port->id);
56248 + rio_register_mport(port);
56250 + regs_win = (u32) ioremap(RIO_REGS_BASE, 0x20000);
56251 + atmu_regs = (struct rio_atmu_regs *)(regs_win + RIO_ATMU_REGS_OFFSET);
56252 + maint_atmu_regs = atmu_regs + 1;
56253 + dbell_atmu_regs = atmu_regs + 2;
56254 + msg_regs = (struct rio_msg_regs *)(regs_win + RIO_MSG_REGS_OFFSET);
56256 + /* Configure maintenance transaction window */
56257 + out_be32((void *)&maint_atmu_regs->rowbar, 0x000c0000);
56258 + out_be32((void *)&maint_atmu_regs->rowar, 0x80077015);
56260 + maint_win = (u32) ioremap(law_start, RIO_MAINT_WIN_SIZE);
56262 + /* Configure outbound doorbell window */
56263 + out_be32((void *)&dbell_atmu_regs->rowbar, 0x000c0400);
56264 + out_be32((void *)&dbell_atmu_regs->rowar, 0x8004200b);
56265 + mpc85xx_rio_doorbell_init(port);
56268 +++ b/arch/powerpc/sysdev/fsl_rio.h
56271 + * MPC85xx RapidIO definitions
56273 + * Copyright 2005 MontaVista Software, Inc.
56274 + * Matt Porter <mporter@kernel.crashing.org>
56276 + * This program is free software; you can redistribute it and/or modify it
56277 + * under the terms of the GNU General Public License as published by the
56278 + * Free Software Foundation; either version 2 of the License, or (at your
56279 + * option) any later version.
56282 +#ifndef __PPC_SYSLIB_PPC85XX_RIO_H
56283 +#define __PPC_SYSLIB_PPC85XX_RIO_H
56285 +#include <linux/init.h>
56287 +extern void mpc85xx_rio_setup(int law_start, int law_size);
56289 +#endif /* __PPC_SYSLIB_PPC85XX_RIO_H */
56290 --- a/arch/powerpc/sysdev/fsl_soc.c
56291 +++ b/arch/powerpc/sysdev/fsl_soc.c
56293 #include <linux/platform_device.h>
56294 #include <linux/of_platform.h>
56295 #include <linux/phy.h>
56296 +#include <linux/phy_fixed.h>
56297 #include <linux/spi/spi.h>
56298 #include <linux/fsl_devices.h>
56299 #include <linux/fs_enet_pd.h>
56300 @@ -54,10 +55,18 @@
56301 soc = of_find_node_by_type(NULL, "soc");
56304 - const void *prop = of_get_property(soc, "reg", &size);
56306 + const u32 *prop = of_get_property(soc, "#address-cells", &size);
56308 + if (prop && size == 4)
56313 + prop = of_get_property(soc, "ranges", &size);
56315 - immrbase = of_translate_address(soc, prop);
56316 + immrbase = of_translate_address(soc, prop + naddr);
56321 @@ -130,17 +139,51 @@
56322 EXPORT_SYMBOL(get_baudrate);
56323 #endif /* CONFIG_CPM2 */
56325 -static int __init gfar_mdio_of_init(void)
56326 +#ifdef CONFIG_FIXED_PHY
56327 +static int __init of_add_fixed_phys(void)
56330 struct device_node *np;
56333 + struct fixed_phy_status status = {};
56335 + for_each_node_by_name(np, "ethernet") {
56336 + fixed_link = (u32 *)of_get_property(np, "fixed-link", NULL);
56341 + status.duplex = fixed_link[1];
56342 + status.speed = fixed_link[2];
56343 + status.pause = fixed_link[3];
56344 + status.asym_pause = fixed_link[4];
56346 + ret = fixed_phy_add(PHY_POLL, fixed_link[0], &status);
56355 +arch_initcall(of_add_fixed_phys);
56356 +#endif /* CONFIG_FIXED_PHY */
56358 +static int __init gfar_mdio_of_init(void)
56360 + struct device_node *np = NULL;
56361 struct platform_device *mdio_dev;
56362 struct resource res;
56365 - for (np = NULL, i = 0;
56366 - (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL;
56368 + np = of_find_compatible_node(np, NULL, "fsl,gianfar-mdio");
56370 + /* try the deprecated version */
56372 + np = of_find_compatible_node(np, "mdio", "gianfar");
56376 struct device_node *child = NULL;
56377 struct gianfar_mdio_data mdio_data;
56378 @@ -179,11 +222,13 @@
56386 platform_device_unregister(mdio_dev);
56392 @@ -193,7 +238,6 @@
56393 static const char *gfar_rx_intr = "rx";
56394 static const char *gfar_err_intr = "error";
56397 static int __init gfar_of_init(void)
56399 struct device_node *np;
56400 @@ -277,29 +321,43 @@
56401 gfar_data.interface = PHY_INTERFACE_MODE_MII;
56403 ph = of_get_property(np, "phy-handle", NULL);
56404 - phy = of_find_node_by_phandle(*ph);
56405 + if (ph == NULL) {
56408 - if (phy == NULL) {
56412 + fixed_link = (u32 *)of_get_property(np, "fixed-link",
56414 + if (!fixed_link) {
56419 - mdio = of_get_parent(phy);
56420 + gfar_data.bus_id = 0;
56421 + gfar_data.phy_id = fixed_link[0];
56423 + phy = of_find_node_by_phandle(*ph);
56425 + if (phy == NULL) {
56430 + mdio = of_get_parent(phy);
56432 + id = of_get_property(phy, "reg", NULL);
56433 + ret = of_address_to_resource(mdio, 0, &res);
56435 + of_node_put(phy);
56436 + of_node_put(mdio);
56440 + gfar_data.phy_id = *id;
56441 + gfar_data.bus_id = res.start;
56443 - id = of_get_property(phy, "reg", NULL);
56444 - ret = of_address_to_resource(mdio, 0, &res);
56451 - gfar_data.phy_id = *id;
56452 - gfar_data.bus_id = res.start;
56454 - of_node_put(phy);
56455 - of_node_put(mdio);
56458 platform_device_add_data(gfar_dev, &gfar_data,
56460 @@ -390,13 +448,11 @@
56461 static int __init fsl_i2c_of_init(void)
56463 struct device_node *np;
56465 + unsigned int i = 0;
56466 struct platform_device *i2c_dev;
56469 - for (np = NULL, i = 0;
56470 - (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL;
56472 + for_each_compatible_node(np, NULL, "fsl-i2c") {
56473 struct resource r[2];
56474 struct fsl_i2c_platform_data i2c_data;
56475 const unsigned char *flags = NULL;
56476 @@ -432,7 +488,7 @@
56480 - of_register_i2c_devices(np, i);
56481 + of_register_i2c_devices(np, i++);
56485 @@ -528,14 +584,12 @@
56486 static int __init fsl_usb_of_init(void)
56488 struct device_node *np;
56490 + unsigned int i = 0;
56491 struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL,
56492 *usb_dev_dr_client = NULL;
56495 - for (np = NULL, i = 0;
56496 - (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL;
56498 + for_each_compatible_node(np, NULL, "fsl-usb2-mph") {
56499 struct resource r[2];
56500 struct fsl_usb2_platform_data usb_data;
56501 const unsigned char *prop = NULL;
56502 @@ -578,11 +632,10 @@
56503 fsl_usb2_platform_data));
56510 - (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL;
56512 + for_each_compatible_node(np, NULL, "fsl-usb2-dr") {
56513 struct resource r[2];
56514 struct fsl_usb2_platform_data usb_data;
56515 const unsigned char *prop = NULL;
56516 @@ -654,6 +707,7 @@
56517 fsl_usb2_platform_data))))
56524 @@ -1125,13 +1179,12 @@
56526 static int __init fsl_pcmcia_of_init(void)
56528 - struct device_node *np = NULL;
56529 + struct device_node *np;
56531 * Register all the devices which type is "pcmcia"
56533 - while ((np = of_find_compatible_node(np,
56534 - "pcmcia", "fsl,pq-pcmcia")) != NULL)
56535 - of_platform_device_create(np, "m8xx-pcmcia", NULL);
56536 + for_each_compatible_node(np, "pcmcia", "fsl,pq-pcmcia")
56537 + of_platform_device_create(np, "m8xx-pcmcia", NULL);
56541 --- a/arch/powerpc/sysdev/grackle.c
56542 +++ b/arch/powerpc/sysdev/grackle.c
56545 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0);
56546 if (machine_is_compatible("PowerMac1,1"))
56547 - pci_assign_all_buses = 1;
56548 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
56549 if (machine_is_compatible("AAPL,PowerBook1998"))
56550 grackle_set_loop_snoop(hose, 1);
56551 #if 0 /* Disabled for now, HW problems ??? */
56552 --- a/arch/powerpc/sysdev/ipic.c
56553 +++ b/arch/powerpc/sysdev/ipic.c
56554 @@ -30,11 +30,67 @@
56557 static struct ipic * primary_ipic;
56558 +static struct irq_chip ipic_level_irq_chip, ipic_edge_irq_chip;
56559 static DEFINE_SPINLOCK(ipic_lock);
56561 static struct ipic_info ipic_info[] = {
56563 + .mask = IPIC_SIMSR_H,
56564 + .prio = IPIC_SIPRR_C,
56565 + .force = IPIC_SIFCR_H,
56570 + .mask = IPIC_SIMSR_H,
56571 + .prio = IPIC_SIPRR_C,
56572 + .force = IPIC_SIFCR_H,
56577 + .mask = IPIC_SIMSR_H,
56578 + .prio = IPIC_SIPRR_C,
56579 + .force = IPIC_SIFCR_H,
56584 + .mask = IPIC_SIMSR_H,
56585 + .prio = IPIC_SIPRR_C,
56586 + .force = IPIC_SIFCR_H,
56591 + .mask = IPIC_SIMSR_H,
56592 + .prio = IPIC_SIPRR_C,
56593 + .force = IPIC_SIFCR_H,
56598 + .mask = IPIC_SIMSR_H,
56599 + .prio = IPIC_SIPRR_C,
56600 + .force = IPIC_SIFCR_H,
56605 + .mask = IPIC_SIMSR_H,
56606 + .prio = IPIC_SIPRR_C,
56607 + .force = IPIC_SIFCR_H,
56612 + .mask = IPIC_SIMSR_H,
56613 + .prio = IPIC_SIPRR_C,
56614 + .force = IPIC_SIFCR_H,
56619 - .pend = IPIC_SIPNR_H,
56620 .mask = IPIC_SIMSR_H,
56621 .prio = IPIC_SIPRR_D,
56622 .force = IPIC_SIFCR_H,
56627 - .pend = IPIC_SIPNR_H,
56628 .mask = IPIC_SIMSR_H,
56629 .prio = IPIC_SIPRR_D,
56630 .force = IPIC_SIFCR_H,
56631 @@ -50,15 +105,27 @@
56635 - .pend = IPIC_SIPNR_H,
56636 .mask = IPIC_SIMSR_H,
56637 .prio = IPIC_SIPRR_D,
56638 .force = IPIC_SIFCR_H,
56643 + .mask = IPIC_SIMSR_H,
56644 + .prio = IPIC_SIPRR_D,
56645 + .force = IPIC_SIFCR_H,
56650 + .mask = IPIC_SIMSR_H,
56651 + .prio = IPIC_SIPRR_D,
56652 + .force = IPIC_SIFCR_H,
56657 - .pend = IPIC_SIPNR_H,
56658 .mask = IPIC_SIMSR_H,
56659 .prio = IPIC_SIPRR_D,
56660 .force = IPIC_SIFCR_H,
56665 - .pend = IPIC_SIPNR_H,
56666 .mask = IPIC_SIMSR_H,
56667 .prio = IPIC_SIPRR_D,
56668 .force = IPIC_SIFCR_H,
56673 - .pend = IPIC_SIPNR_H,
56674 .mask = IPIC_SIMSR_H,
56675 .prio = IPIC_SIPRR_D,
56676 .force = IPIC_SIFCR_H,
56681 - .pend = IPIC_SEPNR,
56682 + .ack = IPIC_SEPNR,
56683 .mask = IPIC_SEMSR,
56684 .prio = IPIC_SMPRR_A,
56685 .force = IPIC_SEFCR,
56690 - .pend = IPIC_SEPNR,
56691 + .ack = IPIC_SEPNR,
56692 .mask = IPIC_SEMSR,
56693 .prio = IPIC_SMPRR_A,
56694 .force = IPIC_SEFCR,
56699 - .pend = IPIC_SEPNR,
56700 + .ack = IPIC_SEPNR,
56701 .mask = IPIC_SEMSR,
56702 .prio = IPIC_SMPRR_A,
56703 .force = IPIC_SEFCR,
56704 @@ -106,7 +171,7 @@
56708 - .pend = IPIC_SEPNR,
56709 + .ack = IPIC_SEPNR,
56710 .mask = IPIC_SEMSR,
56711 .prio = IPIC_SMPRR_B,
56712 .force = IPIC_SEFCR,
56713 @@ -114,7 +179,7 @@
56717 - .pend = IPIC_SEPNR,
56718 + .ack = IPIC_SEPNR,
56719 .mask = IPIC_SEMSR,
56720 .prio = IPIC_SMPRR_B,
56721 .force = IPIC_SEFCR,
56722 @@ -122,7 +187,7 @@
56726 - .pend = IPIC_SEPNR,
56727 + .ack = IPIC_SEPNR,
56728 .mask = IPIC_SEMSR,
56729 .prio = IPIC_SMPRR_B,
56730 .force = IPIC_SEFCR,
56731 @@ -130,7 +195,7 @@
56735 - .pend = IPIC_SEPNR,
56736 + .ack = IPIC_SEPNR,
56737 .mask = IPIC_SEMSR,
56738 .prio = IPIC_SMPRR_B,
56739 .force = IPIC_SEFCR,
56740 @@ -138,7 +203,6 @@
56744 - .pend = IPIC_SIPNR_H,
56745 .mask = IPIC_SIMSR_H,
56746 .prio = IPIC_SIPRR_A,
56747 .force = IPIC_SIFCR_H,
56748 @@ -146,7 +210,6 @@
56752 - .pend = IPIC_SIPNR_H,
56753 .mask = IPIC_SIMSR_H,
56754 .prio = IPIC_SIPRR_A,
56755 .force = IPIC_SIFCR_H,
56756 @@ -154,7 +217,6 @@
56760 - .pend = IPIC_SIPNR_H,
56761 .mask = IPIC_SIMSR_H,
56762 .prio = IPIC_SIPRR_A,
56763 .force = IPIC_SIFCR_H,
56764 @@ -162,7 +224,6 @@
56768 - .pend = IPIC_SIPNR_H,
56769 .mask = IPIC_SIMSR_H,
56770 .prio = IPIC_SIPRR_A,
56771 .force = IPIC_SIFCR_H,
56772 @@ -170,7 +231,6 @@
56776 - .pend = IPIC_SIPNR_H,
56777 .mask = IPIC_SIMSR_H,
56778 .prio = IPIC_SIPRR_A,
56779 .force = IPIC_SIFCR_H,
56780 @@ -178,7 +238,6 @@
56784 - .pend = IPIC_SIPNR_H,
56785 .mask = IPIC_SIMSR_H,
56786 .prio = IPIC_SIPRR_A,
56787 .force = IPIC_SIFCR_H,
56788 @@ -186,7 +245,6 @@
56792 - .pend = IPIC_SIPNR_H,
56793 .mask = IPIC_SIMSR_H,
56794 .prio = IPIC_SIPRR_A,
56795 .force = IPIC_SIFCR_H,
56796 @@ -194,15 +252,69 @@
56800 - .pend = IPIC_SIPNR_H,
56801 .mask = IPIC_SIMSR_H,
56802 .prio = IPIC_SIPRR_A,
56803 .force = IPIC_SIFCR_H,
56808 + .mask = IPIC_SIMSR_H,
56809 + .prio = IPIC_SIPRR_B,
56810 + .force = IPIC_SIFCR_H,
56815 + .mask = IPIC_SIMSR_H,
56816 + .prio = IPIC_SIPRR_B,
56817 + .force = IPIC_SIFCR_H,
56822 + .mask = IPIC_SIMSR_H,
56823 + .prio = IPIC_SIPRR_B,
56824 + .force = IPIC_SIFCR_H,
56829 + .mask = IPIC_SIMSR_H,
56830 + .prio = IPIC_SIPRR_B,
56831 + .force = IPIC_SIFCR_H,
56836 + .mask = IPIC_SIMSR_H,
56837 + .prio = IPIC_SIPRR_B,
56838 + .force = IPIC_SIFCR_H,
56843 + .mask = IPIC_SIMSR_H,
56844 + .prio = IPIC_SIPRR_B,
56845 + .force = IPIC_SIFCR_H,
56850 + .mask = IPIC_SIMSR_H,
56851 + .prio = IPIC_SIPRR_B,
56852 + .force = IPIC_SIFCR_H,
56857 + .mask = IPIC_SIMSR_H,
56858 + .prio = IPIC_SIPRR_B,
56859 + .force = IPIC_SIFCR_H,
56864 - .pend = IPIC_SEPNR,
56865 .mask = IPIC_SEMSR,
56866 .prio = IPIC_SMPRR_A,
56867 .force = IPIC_SEFCR,
56868 @@ -210,7 +322,6 @@
56872 - .pend = IPIC_SIPNR_L,
56873 .mask = IPIC_SIMSR_L,
56874 .prio = IPIC_SMPRR_A,
56875 .force = IPIC_SIFCR_L,
56876 @@ -218,7 +329,6 @@
56880 - .pend = IPIC_SIPNR_L,
56881 .mask = IPIC_SIMSR_L,
56882 .prio = IPIC_SMPRR_A,
56883 .force = IPIC_SIFCR_L,
56884 @@ -226,7 +336,6 @@
56888 - .pend = IPIC_SIPNR_L,
56889 .mask = IPIC_SIMSR_L,
56890 .prio = IPIC_SMPRR_A,
56891 .force = IPIC_SIFCR_L,
56892 @@ -234,7 +343,6 @@
56896 - .pend = IPIC_SIPNR_L,
56897 .mask = IPIC_SIMSR_L,
56898 .prio = IPIC_SMPRR_A,
56899 .force = IPIC_SIFCR_L,
56900 @@ -242,7 +350,6 @@
56904 - .pend = IPIC_SIPNR_L,
56905 .mask = IPIC_SIMSR_L,
56906 .prio = IPIC_SMPRR_B,
56907 .force = IPIC_SIFCR_L,
56908 @@ -250,7 +357,6 @@
56912 - .pend = IPIC_SIPNR_L,
56913 .mask = IPIC_SIMSR_L,
56914 .prio = IPIC_SMPRR_B,
56915 .force = IPIC_SIFCR_L,
56916 @@ -258,7 +364,6 @@
56920 - .pend = IPIC_SIPNR_L,
56921 .mask = IPIC_SIMSR_L,
56922 .prio = IPIC_SMPRR_B,
56923 .force = IPIC_SIFCR_L,
56924 @@ -266,7 +371,6 @@
56928 - .pend = IPIC_SIPNR_L,
56929 .mask = IPIC_SIMSR_L,
56930 .prio = IPIC_SMPRR_B,
56931 .force = IPIC_SIFCR_L,
56932 @@ -274,91 +378,120 @@
56936 - .pend = IPIC_SIPNR_L,
56937 .mask = IPIC_SIMSR_L,
56939 .force = IPIC_SIFCR_L,
56943 - .pend = IPIC_SIPNR_L,
56944 .mask = IPIC_SIMSR_L,
56946 .force = IPIC_SIFCR_L,
56950 - .pend = IPIC_SIPNR_L,
56951 .mask = IPIC_SIMSR_L,
56953 .force = IPIC_SIFCR_L,
56957 - .pend = IPIC_SIPNR_L,
56958 .mask = IPIC_SIMSR_L,
56960 .force = IPIC_SIFCR_L,
56964 - .pend = IPIC_SIPNR_L,
56965 .mask = IPIC_SIMSR_L,
56967 .force = IPIC_SIFCR_L,
56971 - .pend = IPIC_SIPNR_L,
56972 .mask = IPIC_SIMSR_L,
56974 .force = IPIC_SIFCR_L,
56978 - .pend = IPIC_SIPNR_L,
56979 .mask = IPIC_SIMSR_L,
56981 .force = IPIC_SIFCR_L,
56985 - .pend = IPIC_SIPNR_L,
56986 .mask = IPIC_SIMSR_L,
56988 .force = IPIC_SIFCR_L,
56992 - .pend = IPIC_SIPNR_L,
56993 .mask = IPIC_SIMSR_L,
56995 .force = IPIC_SIFCR_L,
56999 + .mask = IPIC_SIMSR_L,
57001 + .force = IPIC_SIFCR_L,
57005 + .mask = IPIC_SIMSR_L,
57007 + .force = IPIC_SIFCR_L,
57011 + .mask = IPIC_SIMSR_L,
57013 + .force = IPIC_SIFCR_L,
57017 - .pend = IPIC_SIPNR_L,
57018 .mask = IPIC_SIMSR_L,
57020 .force = IPIC_SIFCR_L,
57024 - .pend = IPIC_SIPNR_L,
57025 .mask = IPIC_SIMSR_L,
57027 .force = IPIC_SIFCR_L,
57031 + .mask = IPIC_SIMSR_L,
57033 + .force = IPIC_SIFCR_L,
57037 + .mask = IPIC_SIMSR_L,
57039 + .force = IPIC_SIFCR_L,
57043 + .mask = IPIC_SIMSR_L,
57045 + .force = IPIC_SIFCR_L,
57049 + .mask = IPIC_SIMSR_L,
57051 + .force = IPIC_SIFCR_L,
57055 - .pend = IPIC_SIPNR_L,
57056 .mask = IPIC_SIMSR_L,
57058 .force = IPIC_SIFCR_L,
57062 - .pend = IPIC_SIPNR_L,
57063 .mask = IPIC_SIMSR_L,
57065 .force = IPIC_SIFCR_L,
57066 @@ -412,6 +545,10 @@
57067 temp &= ~(1 << (31 - ipic_info[src].bit));
57068 ipic_write(ipic->regs, ipic_info[src].mask, temp);
57070 + /* mb() can't guarantee that masking is finished. But it does finish
57071 + * for nearly all cases. */
57074 spin_unlock_irqrestore(&ipic_lock, flags);
57077 @@ -424,9 +561,13 @@
57079 spin_lock_irqsave(&ipic_lock, flags);
57081 - temp = ipic_read(ipic->regs, ipic_info[src].pend);
57082 + temp = ipic_read(ipic->regs, ipic_info[src].ack);
57083 temp |= (1 << (31 - ipic_info[src].bit));
57084 - ipic_write(ipic->regs, ipic_info[src].pend, temp);
57085 + ipic_write(ipic->regs, ipic_info[src].ack, temp);
57087 + /* mb() can't guarantee that ack is finished. But it does finish
57088 + * for nearly all cases. */
57091 spin_unlock_irqrestore(&ipic_lock, flags);
57093 @@ -444,9 +585,13 @@
57094 temp &= ~(1 << (31 - ipic_info[src].bit));
57095 ipic_write(ipic->regs, ipic_info[src].mask, temp);
57097 - temp = ipic_read(ipic->regs, ipic_info[src].pend);
57098 + temp = ipic_read(ipic->regs, ipic_info[src].ack);
57099 temp |= (1 << (31 - ipic_info[src].bit));
57100 - ipic_write(ipic->regs, ipic_info[src].pend, temp);
57101 + ipic_write(ipic->regs, ipic_info[src].ack, temp);
57103 + /* mb() can't guarantee that ack is finished. But it does finish
57104 + * for nearly all cases. */
57107 spin_unlock_irqrestore(&ipic_lock, flags);
57109 @@ -468,14 +613,22 @@
57113 + /* ipic supports only edge mode on external interrupts */
57114 + if ((flow_type & IRQ_TYPE_EDGE_FALLING) && !ipic_info[src].ack) {
57115 + printk(KERN_ERR "ipic: edge sense not supported on internal "
57120 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
57121 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
57122 if (flow_type & IRQ_TYPE_LEVEL_LOW) {
57123 desc->status |= IRQ_LEVEL;
57124 desc->handle_irq = handle_level_irq;
57125 + desc->chip = &ipic_level_irq_chip;
57127 desc->handle_irq = handle_edge_irq;
57128 + desc->chip = &ipic_edge_irq_chip;
57131 /* only EXT IRQ senses are programmable on ipic
57132 @@ -500,7 +653,16 @@
57136 -static struct irq_chip ipic_irq_chip = {
57137 +/* level interrupts and edge interrupts have different ack operations */
57138 +static struct irq_chip ipic_level_irq_chip = {
57139 + .typename = " IPIC ",
57140 + .unmask = ipic_unmask_irq,
57141 + .mask = ipic_mask_irq,
57142 + .mask_ack = ipic_mask_irq,
57143 + .set_type = ipic_set_irq_type,
57146 +static struct irq_chip ipic_edge_irq_chip = {
57147 .typename = " IPIC ",
57148 .unmask = ipic_unmask_irq,
57149 .mask = ipic_mask_irq,
57150 @@ -519,13 +681,9 @@
57151 irq_hw_number_t hw)
57153 struct ipic *ipic = h->host_data;
57154 - struct irq_chip *chip;
57156 - /* Default chip */
57157 - chip = &ipic->hc_irq;
57159 set_irq_chip_data(virq, ipic);
57160 - set_irq_chip_and_handler(virq, chip, handle_level_irq);
57161 + set_irq_chip_and_handler(virq, &ipic_level_irq_chip, handle_level_irq);
57163 /* Set default irq type */
57164 set_irq_type(virq, IRQ_TYPE_NONE);
57165 @@ -584,7 +742,6 @@
57166 ipic->regs = ioremap(res.start, res.end - res.start + 1);
57168 ipic->irqhost->host_data = ipic;
57169 - ipic->hc_irq = ipic_irq_chip;
57172 ipic_write(ipic->regs, IPIC_SICNR, 0x0);
57173 @@ -593,6 +750,10 @@
57174 * configure SICFR accordingly */
57175 if (flags & IPIC_SPREADMODE_GRP_A)
57176 temp |= SICFR_IPSA;
57177 + if (flags & IPIC_SPREADMODE_GRP_B)
57178 + temp |= SICFR_IPSB;
57179 + if (flags & IPIC_SPREADMODE_GRP_C)
57180 + temp |= SICFR_IPSC;
57181 if (flags & IPIC_SPREADMODE_GRP_D)
57182 temp |= SICFR_IPSD;
57183 if (flags & IPIC_SPREADMODE_MIX_A)
57184 @@ -600,7 +761,7 @@
57185 if (flags & IPIC_SPREADMODE_MIX_B)
57186 temp |= SICFR_MPSB;
57188 - ipic_write(ipic->regs, IPIC_SICNR, temp);
57189 + ipic_write(ipic->regs, IPIC_SICFR, temp);
57191 /* handle MCP route */
57193 @@ -672,10 +833,12 @@
57195 void ipic_set_default_priority(void)
57197 - ipic_write(primary_ipic->regs, IPIC_SIPRR_A, IPIC_SIPRR_A_DEFAULT);
57198 - ipic_write(primary_ipic->regs, IPIC_SIPRR_D, IPIC_SIPRR_D_DEFAULT);
57199 - ipic_write(primary_ipic->regs, IPIC_SMPRR_A, IPIC_SMPRR_A_DEFAULT);
57200 - ipic_write(primary_ipic->regs, IPIC_SMPRR_B, IPIC_SMPRR_B_DEFAULT);
57201 + ipic_write(primary_ipic->regs, IPIC_SIPRR_A, IPIC_PRIORITY_DEFAULT);
57202 + ipic_write(primary_ipic->regs, IPIC_SIPRR_B, IPIC_PRIORITY_DEFAULT);
57203 + ipic_write(primary_ipic->regs, IPIC_SIPRR_C, IPIC_PRIORITY_DEFAULT);
57204 + ipic_write(primary_ipic->regs, IPIC_SIPRR_D, IPIC_PRIORITY_DEFAULT);
57205 + ipic_write(primary_ipic->regs, IPIC_SMPRR_A, IPIC_PRIORITY_DEFAULT);
57206 + ipic_write(primary_ipic->regs, IPIC_SMPRR_B, IPIC_PRIORITY_DEFAULT);
57209 void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq)
57210 --- a/arch/powerpc/sysdev/ipic.h
57211 +++ b/arch/powerpc/sysdev/ipic.h
57212 @@ -23,13 +23,12 @@
57213 #define IPIC_IRQ_EXT7 23
57215 /* Default Priority Registers */
57216 -#define IPIC_SIPRR_A_DEFAULT 0x05309770
57217 -#define IPIC_SIPRR_D_DEFAULT 0x05309770
57218 -#define IPIC_SMPRR_A_DEFAULT 0x05309770
57219 -#define IPIC_SMPRR_B_DEFAULT 0x05309770
57220 +#define IPIC_PRIORITY_DEFAULT 0x05309770
57222 /* System Global Interrupt Configuration Register */
57223 #define SICFR_IPSA 0x00010000
57224 +#define SICFR_IPSB 0x00020000
57225 +#define SICFR_IPSC 0x00040000
57226 #define SICFR_IPSD 0x00080000
57227 #define SICFR_MPSA 0x00200000
57228 #define SICFR_MPSB 0x00400000
57229 @@ -45,13 +44,11 @@
57231 /* The remapper for this IPIC */
57232 struct irq_host *irqhost;
57234 - /* The "linux" controller struct */
57235 - struct irq_chip hc_irq;
57239 - u8 pend; /* pending register offset from base */
57240 + u8 ack; /* pending register offset from base if the irq
57241 + supports ack operation */
57242 u8 mask; /* mask register offset from base */
57243 u8 prio; /* priority register offset from base */
57244 u8 force; /* force register offset from base */
57245 --- a/arch/powerpc/sysdev/mmio_nvram.c
57246 +++ b/arch/powerpc/sysdev/mmio_nvram.c
57248 nvram_addr = r.start;
57249 mmio_nvram_len = r.end - r.start + 1;
57250 if ( (!mmio_nvram_len) || (!nvram_addr) ) {
57251 - printk(KERN_WARNING "nvram: address or lenght is 0\n");
57252 + printk(KERN_WARNING "nvram: address or length is 0\n");
57256 --- a/arch/powerpc/sysdev/mpic.c
57257 +++ b/arch/powerpc/sysdev/mpic.c
57266 @@ -121,6 +122,7 @@
57270 + TSI108_CPU_MCACK,
57274 @@ -265,7 +267,7 @@
57278 -static void _mpic_map_mmio(struct mpic *mpic, unsigned long phys_addr,
57279 +static void _mpic_map_mmio(struct mpic *mpic, phys_addr_t phys_addr,
57280 struct mpic_reg_bank *rb, unsigned int offset,
57283 @@ -285,7 +287,7 @@
57284 BUG_ON(!DCR_MAP_OK(rb->dhost));
57287 -static inline void mpic_map(struct mpic *mpic, unsigned long phys_addr,
57288 +static inline void mpic_map(struct mpic *mpic, phys_addr_t phys_addr,
57289 struct mpic_reg_bank *rb, unsigned int offset,
57292 @@ -612,12 +614,11 @@
57296 -static irqreturn_t mpic_ipi_action(int irq, void *dev_id)
57297 +static irqreturn_t mpic_ipi_action(int irq, void *data)
57299 - struct mpic *mpic;
57300 + long ipi = (long)data;
57302 - mpic = mpic_find(irq, NULL);
57303 - smp_message_recv(mpic_irq_to_hw(irq) - mpic->ipi_vecs[0]);
57304 + smp_message_recv(ipi);
57306 return IRQ_HANDLED;
57308 @@ -842,6 +843,24 @@
57312 +void mpic_set_vector(unsigned int virq, unsigned int vector)
57314 + struct mpic *mpic = mpic_from_irq(virq);
57315 + unsigned int src = mpic_irq_to_hw(virq);
57316 + unsigned int vecpri;
57318 + DBG("mpic: set_vector(mpic:@%p,virq:%d,src:%d,vector:0x%x)\n",
57319 + mpic, virq, src, vector);
57321 + if (src >= mpic->irq_count)
57324 + vecpri = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
57325 + vecpri = vecpri & ~MPIC_INFO(VECPRI_VECTOR_MASK);
57326 + vecpri |= vector;
57327 + mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
57330 static struct irq_chip mpic_irq_chip = {
57331 .mask = mpic_mask_irq,
57332 .unmask = mpic_unmask_irq,
57333 @@ -1109,6 +1128,11 @@
57337 + if (flags & MPIC_ENABLE_MCK)
57338 + mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
57339 + mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
57340 + | MPIC_GREG_GCONF_MCK);
57342 /* Read feature register, calculate num CPUs and, for non-ISU
57343 * MPICs, num sources as well. On ISU MPICs, sources are counted
57344 * as ISUs are added
57345 @@ -1230,6 +1254,8 @@
57346 mpic_u3msi_init(mpic);
57349 + mpic_pasemi_msi_init(mpic);
57351 for (i = 0; i < mpic->num_sources; i++) {
57352 /* start with vector = source number, and masked */
57353 u32 vecpri = MPIC_VECPRI_MASK | i |
57354 @@ -1253,6 +1279,11 @@
57355 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
57356 | MPIC_GREG_GCONF_8259_PTHROU_DIS);
57358 + if (mpic->flags & MPIC_NO_BIAS)
57359 + mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
57360 + mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
57361 + | MPIC_GREG_GCONF_NO_BIAS);
57363 /* Set current processor priority to 0 */
57364 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0);
57366 @@ -1419,13 +1450,13 @@
57367 mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0]));
57370 -unsigned int mpic_get_one_irq(struct mpic *mpic)
57371 +static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)
57375 - src = mpic_cpu_read(MPIC_INFO(CPU_INTACK)) & MPIC_INFO(VECPRI_VECTOR_MASK);
57376 + src = mpic_cpu_read(reg) & MPIC_INFO(VECPRI_VECTOR_MASK);
57378 - DBG("%s: get_one_irq(): %d\n", mpic->name, src);
57379 + DBG("%s: get_one_irq(reg 0x%x): %d\n", mpic->name, reg, src);
57381 if (unlikely(src == mpic->spurious_vec)) {
57382 if (mpic->flags & MPIC_SPV_EOI)
57383 @@ -1443,6 +1474,11 @@
57384 return irq_linear_revmap(mpic->irqhost, src);
57387 +unsigned int mpic_get_one_irq(struct mpic *mpic)
57389 + return _mpic_get_one_irq(mpic, MPIC_INFO(CPU_INTACK));
57392 unsigned int mpic_get_irq(void)
57394 struct mpic *mpic = mpic_primary;
57395 @@ -1452,12 +1488,20 @@
57396 return mpic_get_one_irq(mpic);
57399 +unsigned int mpic_get_mcirq(void)
57401 + struct mpic *mpic = mpic_primary;
57403 + BUG_ON(mpic == NULL);
57405 + return _mpic_get_one_irq(mpic, MPIC_INFO(CPU_MCACK));
57409 void mpic_request_ipis(void)
57411 struct mpic *mpic = mpic_primary;
57414 static char *ipi_names[] = {
57415 "IPI0 (call function)",
57416 "IPI1 (reschedule)",
57417 @@ -1472,14 +1516,14 @@
57418 unsigned int vipi = irq_create_mapping(mpic->irqhost,
57419 mpic->ipi_vecs[0] + i);
57420 if (vipi == NO_IRQ) {
57421 - printk(KERN_ERR "Failed to map IPI %d\n", i);
57422 + printk(KERN_ERR "Failed to map IPI %ld\n", i);
57425 err = request_irq(vipi, mpic_ipi_action,
57426 IRQF_DISABLED|IRQF_PERCPU,
57427 - ipi_names[i], mpic);
57428 + ipi_names[i], (void *)i);
57430 - printk(KERN_ERR "Request of irq %d for IPI %d failed\n",
57431 + printk(KERN_ERR "Request of irq %d for IPI %ld failed\n",
57435 --- a/arch/powerpc/sysdev/mpic.h
57436 +++ b/arch/powerpc/sysdev/mpic.h
57438 extern irq_hw_number_t mpic_msi_alloc_hwirqs(struct mpic *mpic, int num);
57439 extern void mpic_msi_free_hwirqs(struct mpic *mpic, int offset, int num);
57440 extern int mpic_u3msi_init(struct mpic *mpic);
57441 +extern int mpic_pasemi_msi_init(struct mpic *mpic);
57443 static inline void mpic_msi_reserve_hwirq(struct mpic *mpic,
57444 irq_hw_number_t hwirq)
57445 @@ -28,12 +29,15 @@
57450 +static inline int mpic_pasemi_msi_init(struct mpic *mpic)
57456 extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type);
57457 -extern void mpic_end_irq(unsigned int irq);
57458 -extern void mpic_mask_irq(unsigned int irq);
57459 -extern void mpic_unmask_irq(unsigned int irq);
57460 +extern void mpic_set_vector(unsigned int virq, unsigned int vector);
57461 extern void mpic_set_affinity(unsigned int irq, cpumask_t cpumask);
57463 #endif /* _POWERPC_SYSDEV_MPIC_H */
57465 +++ b/arch/powerpc/sysdev/mpic_pasemi_msi.c
57468 + * Copyright 2007, Olof Johansson, PA Semi
57470 + * Based on arch/powerpc/sysdev/mpic_u3msi.c:
57472 + * Copyright 2006, Segher Boessenkool, IBM Corporation.
57473 + * Copyright 2006-2007, Michael Ellerman, IBM Corporation.
57475 + * This program is free software; you can redistribute it and/or
57476 + * modify it under the terms of the GNU General Public License
57477 + * as published by the Free Software Foundation; version 2 of the
57484 +#include <linux/irq.h>
57485 +#include <linux/bootmem.h>
57486 +#include <linux/msi.h>
57487 +#include <asm/mpic.h>
57488 +#include <asm/prom.h>
57489 +#include <asm/hw_irq.h>
57490 +#include <asm/ppc-pci.h>
57494 +/* Allocate 16 interrupts per device, to give an alignment of 16,
57495 + * since that's the size of the grouping w.r.t. affinity. If someone
57496 + * needs more than 32 MSI's down the road we'll have to rethink this,
57497 + * but it should be OK for now.
57499 +#define ALLOC_CHUNK 16
57501 +#define PASEMI_MSI_ADDR 0xfc080000
57503 +/* A bit ugly, can we get this from the pci_dev somehow? */
57504 +static struct mpic *msi_mpic;
57507 +static void mpic_pasemi_msi_mask_irq(unsigned int irq)
57509 + pr_debug("mpic_pasemi_msi_mask_irq %d\n", irq);
57510 + mask_msi_irq(irq);
57511 + mpic_mask_irq(irq);
57514 +static void mpic_pasemi_msi_unmask_irq(unsigned int irq)
57516 + pr_debug("mpic_pasemi_msi_unmask_irq %d\n", irq);
57517 + mpic_unmask_irq(irq);
57518 + unmask_msi_irq(irq);
57521 +static struct irq_chip mpic_pasemi_msi_chip = {
57522 + .shutdown = mpic_pasemi_msi_mask_irq,
57523 + .mask = mpic_pasemi_msi_mask_irq,
57524 + .unmask = mpic_pasemi_msi_unmask_irq,
57525 + .eoi = mpic_end_irq,
57526 + .set_type = mpic_set_irq_type,
57527 + .set_affinity = mpic_set_affinity,
57528 + .typename = "PASEMI-MSI ",
57531 +static int pasemi_msi_check_device(struct pci_dev *pdev, int nvec, int type)
57533 + if (type == PCI_CAP_ID_MSIX)
57534 + pr_debug("pasemi_msi: MSI-X untested, trying anyway\n");
57539 +static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev)
57541 + struct msi_desc *entry;
57543 + pr_debug("pasemi_msi_teardown_msi_irqs, pdev %p\n", pdev);
57545 + list_for_each_entry(entry, &pdev->msi_list, list) {
57546 + if (entry->irq == NO_IRQ)
57549 + set_irq_msi(entry->irq, NULL);
57550 + mpic_msi_free_hwirqs(msi_mpic, virq_to_hw(entry->irq),
57552 + irq_dispose_mapping(entry->irq);
57558 +static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
57560 + irq_hw_number_t hwirq;
57561 + unsigned int virq;
57562 + struct msi_desc *entry;
57563 + struct msi_msg msg;
57566 + pr_debug("pasemi_msi_setup_msi_irqs, pdev %p nvec %d type %d\n",
57567 + pdev, nvec, type);
57569 + msg.address_hi = 0;
57570 + msg.address_lo = PASEMI_MSI_ADDR;
57572 + list_for_each_entry(entry, &pdev->msi_list, list) {
57573 + /* Allocate 16 interrupts for now, since that's the grouping for
57574 + * affinity. This can be changed later if it turns out 32 is too
57575 + * few MSIs for someone, but restrictions will apply to how the
57576 + * sources can be changed independently.
57578 + hwirq = mpic_msi_alloc_hwirqs(msi_mpic, ALLOC_CHUNK);
57580 + pr_debug("pasemi_msi: failed allocating hwirq\n");
57584 + virq = irq_create_mapping(msi_mpic->irqhost, hwirq);
57585 + if (virq == NO_IRQ) {
57586 + pr_debug("pasemi_msi: failed mapping hwirq 0x%lx\n", hwirq);
57587 + mpic_msi_free_hwirqs(msi_mpic, hwirq, ALLOC_CHUNK);
57591 + /* Vector on MSI is really an offset, the hardware adds
57592 + * it to the value written at the magic address. So set
57593 + * it to 0 to remain sane.
57595 + mpic_set_vector(virq, 0);
57597 + set_irq_msi(virq, entry);
57598 + set_irq_chip(virq, &mpic_pasemi_msi_chip);
57599 + set_irq_type(virq, IRQ_TYPE_EDGE_RISING);
57601 + pr_debug("pasemi_msi: allocated virq 0x%x (hw 0x%lx) addr 0x%lx\n",
57602 + virq, hwirq, addr);
57604 + /* Likewise, the device writes [0...511] into the target
57605 + * register to generate MSI [512...1023]
57607 + msg.data = hwirq-0x200;
57608 + write_msi_msg(virq, &msg);
57614 +int mpic_pasemi_msi_init(struct mpic *mpic)
57618 + if (!mpic->irqhost->of_node ||
57619 + !of_device_is_compatible(mpic->irqhost->of_node,
57620 + "pasemi,pwrficient-openpic"))
57623 + rc = mpic_msi_init_allocator(mpic);
57625 + pr_debug("pasemi_msi: Error allocating bitmap!\n");
57629 + pr_debug("pasemi_msi: Registering PA Semi MPIC MSI callbacks\n");
57632 + WARN_ON(ppc_md.setup_msi_irqs);
57633 + ppc_md.setup_msi_irqs = pasemi_msi_setup_msi_irqs;
57634 + ppc_md.teardown_msi_irqs = pasemi_msi_teardown_msi_irqs;
57635 + ppc_md.msi_check_device = pasemi_msi_check_device;
57639 --- a/arch/powerpc/sysdev/mv64x60_dev.c
57640 +++ b/arch/powerpc/sysdev/mv64x60_dev.c
57641 @@ -241,7 +241,7 @@
57643 /* only register the shared platform device the first time through */
57644 if (id == 0 && (err = eth_register_shared_pdev(np)))
57648 memset(r, 0, sizeof(r));
57649 of_irq_to_resource(np, 0, &r[0]);
57650 @@ -451,22 +451,19 @@
57655 - (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); id++)
57656 - if ((err = mv64x60_mpsc_device_setup(np, id)))
57658 + for_each_compatible_node(np, "serial", "marvell,mpsc")
57659 + if ((err = mv64x60_mpsc_device_setup(np, id++)))
57663 - (np = of_find_compatible_node(np, "network",
57664 - "marvell,mv64x60-eth"));
57666 - if ((err = mv64x60_eth_device_setup(np, id)))
57668 + for_each_compatible_node(np, "network", "marvell,mv64x60-eth")
57669 + if ((err = mv64x60_eth_device_setup(np, id++)))
57673 - (np = of_find_compatible_node(np, "i2c", "marvell,mv64x60-i2c"));
57675 - if ((err = mv64x60_i2c_device_setup(np, id)))
57677 + for_each_compatible_node(np, "i2c", "marvell,mv64x60-i2c")
57678 + if ((err = mv64x60_i2c_device_setup(np, id++)))
57681 /* support up to one watchdog timer */
57682 @@ -477,7 +474,6 @@
57690 --- a/arch/powerpc/sysdev/mv64x60_pci.c
57691 +++ b/arch/powerpc/sysdev/mv64x60_pci.c
57692 @@ -164,8 +164,8 @@
57694 void __init mv64x60_pci_init(void)
57696 - struct device_node *np = NULL;
57697 + struct device_node *np;
57699 - while ((np = of_find_compatible_node(np, "pci", "marvell,mv64x60-pci")))
57700 + for_each_compatible_node(np, "pci", "marvell,mv64x60-pci")
57701 mv64x60_add_bridge(np);
57703 --- a/arch/powerpc/sysdev/mv64x60_udbg.c
57704 +++ b/arch/powerpc/sysdev/mv64x60_udbg.c
57705 @@ -85,10 +85,10 @@
57710 - (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); )
57711 + for_each_compatible_node(np, "serial", "marvell,mpsc") {
57716 of_node_put(stdout);
57719 +++ b/arch/powerpc/sysdev/of_rtc.c
57722 + * Instantiate mmio-mapped RTC chips based on device tree information
57724 + * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
57726 + * This program is free software; you can redistribute it and/or modify it
57727 + * under the terms of the GNU General Public License as published by the
57728 + * Free Software Foundation; either version 2 of the License, or (at your
57729 + * option) any later version.
57731 +#include <linux/kernel.h>
57732 +#include <linux/of.h>
57733 +#include <linux/init.h>
57734 +#include <linux/of_platform.h>
57736 +static __initdata struct {
57737 + const char *compatible;
57739 +} of_rtc_table[] = {
57740 + { "ds1743-nvram", "rtc-ds1742" },
57743 +void __init of_instantiate_rtc(void)
57745 + struct device_node *node;
57749 + for (i = 0; i < ARRAY_SIZE(of_rtc_table); i++) {
57750 + char *plat_name = of_rtc_table[i].plat_name;
57752 + for_each_compatible_node(node, NULL,
57753 + of_rtc_table[i].compatible) {
57754 + struct resource *res;
57756 + res = kmalloc(sizeof(*res), GFP_KERNEL);
57758 + printk(KERN_ERR "OF RTC: Out of memory "
57759 + "allocating resource structure for %s\n",
57760 + node->full_name);
57764 + err = of_address_to_resource(node, 0, res);
57766 + printk(KERN_ERR "OF RTC: Error "
57767 + "translating resources for %s\n",
57768 + node->full_name);
57772 + printk(KERN_INFO "OF_RTC: %s is a %s @ 0x%llx-0x%llx\n",
57773 + node->full_name, plat_name,
57774 + (unsigned long long)res->start,
57775 + (unsigned long long)res->end);
57776 + platform_device_register_simple(plat_name, -1, res, 1);
57780 --- a/arch/powerpc/sysdev/pmi.c
57781 +++ b/arch/powerpc/sysdev/pmi.c
57783 #include <linux/completion.h>
57784 #include <linux/spinlock.h>
57785 #include <linux/workqueue.h>
57786 +#include <linux/of_device.h>
57787 +#include <linux/of_platform.h>
57789 -#include <asm/of_device.h>
57790 -#include <asm/of_platform.h>
57791 #include <asm/io.h>
57792 #include <asm/pmi.h>
57793 #include <asm/prom.h>
57795 +++ b/arch/powerpc/sysdev/ppc4xx_pci.c
57798 + * PCI / PCI-X / PCI-Express support for 4xx parts
57800 + * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
57802 + * Most PCI Express code is coming from Stefan Roese implementation for
57803 + * arch/ppc in the Denx tree, slightly reworked by me.
57805 + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
57807 + * Some of that comes itself from a previous implementation for 440SPE only
57808 + * by Roland Dreier:
57810 + * Copyright (c) 2005 Cisco Systems. All rights reserved.
57811 + * Roland Dreier <rolandd@cisco.com>
57817 +#include <linux/kernel.h>
57818 +#include <linux/pci.h>
57819 +#include <linux/init.h>
57820 +#include <linux/of.h>
57821 +#include <linux/bootmem.h>
57822 +#include <linux/delay.h>
57824 +#include <asm/io.h>
57825 +#include <asm/pci-bridge.h>
57826 +#include <asm/machdep.h>
57827 +#include <asm/dcr.h>
57828 +#include <asm/dcr-regs.h>
57830 +#include "ppc4xx_pci.h"
57832 +static int dma_offset_set;
57834 +/* Move that to a useable header */
57835 +extern unsigned long total_memory;
57837 +#define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL))
57838 +#define U64_TO_U32_HIGH(val) ((u32)((val) >> 32))
57840 +#ifdef CONFIG_RESOURCES_64BIT
57841 +#define RES_TO_U32_LOW(val) U64_TO_U32_LOW(val)
57842 +#define RES_TO_U32_HIGH(val) U64_TO_U32_HIGH(val)
57844 +#define RES_TO_U32_LOW(val) (val)
57845 +#define RES_TO_U32_HIGH(val) (0)
57848 +static inline int ppc440spe_revA(void)
57850 + /* Catch both 440SPe variants, with and without RAID6 support */
57851 + if ((mfspr(SPRN_PVR) & 0xffefffff) == 0x53421890)
57857 +static void fixup_ppc4xx_pci_bridge(struct pci_dev *dev)
57859 + struct pci_controller *hose;
57862 + if (dev->devfn != 0 || dev->bus->self != NULL)
57865 + hose = pci_bus_to_host(dev->bus);
57866 + if (hose == NULL)
57869 + if (!of_device_is_compatible(hose->dn, "ibm,plb-pciex") &&
57870 + !of_device_is_compatible(hose->dn, "ibm,plb-pcix") &&
57871 + !of_device_is_compatible(hose->dn, "ibm,plb-pci"))
57874 + /* Hide the PCI host BARs from the kernel as their content doesn't
57875 + * fit well in the resource management
57877 + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
57878 + dev->resource[i].start = dev->resource[i].end = 0;
57879 + dev->resource[i].flags = 0;
57882 + printk(KERN_INFO "PCI: Hiding 4xx host bridge resources %s\n",
57885 +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, fixup_ppc4xx_pci_bridge);
57887 +static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose,
57888 + void __iomem *reg,
57889 + struct resource *res)
57892 + const u32 *ranges;
57894 + int pna = of_n_addr_cells(hose->dn);
57895 + int np = pna + 5;
57899 + res->end = size = 0x80000000;
57900 + res->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
57902 + /* Get dma-ranges property */
57903 + ranges = of_get_property(hose->dn, "dma-ranges", &rlen);
57904 + if (ranges == NULL)
57908 + while ((rlen -= np * 4) >= 0) {
57909 + u32 pci_space = ranges[0];
57910 + u64 pci_addr = of_read_number(ranges + 1, 2);
57911 + u64 cpu_addr = of_translate_dma_address(hose->dn, ranges + 3);
57912 + size = of_read_number(ranges + pna + 3, 2);
57914 + if (cpu_addr == OF_BAD_ADDR || size == 0)
57917 + /* We only care about memory */
57918 + if ((pci_space & 0x03000000) != 0x02000000)
57921 + /* We currently only support memory at 0, and pci_addr
57922 + * within 32 bits space
57924 + if (cpu_addr != 0 || pci_addr > 0xffffffff) {
57925 + printk(KERN_WARNING "%s: Ignored unsupported dma range"
57926 + " 0x%016llx...0x%016llx -> 0x%016llx\n",
57927 + hose->dn->full_name,
57928 + pci_addr, pci_addr + size - 1, cpu_addr);
57932 + /* Check if not prefetchable */
57933 + if (!(pci_space & 0x40000000))
57934 + res->flags &= ~IORESOURCE_PREFETCH;
57938 + res->start = pci_addr;
57939 +#ifndef CONFIG_RESOURCES_64BIT
57940 + /* Beware of 32 bits resources */
57941 + if ((pci_addr + size) > 0x100000000ull)
57942 + res->end = 0xffffffff;
57945 + res->end = res->start + size - 1;
57949 + /* We only support one global DMA offset */
57950 + if (dma_offset_set && pci_dram_offset != res->start) {
57951 + printk(KERN_ERR "%s: dma-ranges(s) mismatch\n",
57952 + hose->dn->full_name);
57956 + /* Check that we can fit all of memory as we don't support
57957 + * DMA bounce buffers
57959 + if (size < total_memory) {
57960 + printk(KERN_ERR "%s: dma-ranges too small "
57961 + "(size=%llx total_memory=%lx)\n",
57962 + hose->dn->full_name, size, total_memory);
57966 + /* Check we are a power of 2 size and that base is a multiple of size*/
57967 + if (!is_power_of_2(size) ||
57968 + (res->start & (size - 1)) != 0) {
57969 + printk(KERN_ERR "%s: dma-ranges unaligned\n",
57970 + hose->dn->full_name);
57974 + /* Check that we are fully contained within 32 bits space */
57975 + if (res->end > 0xffffffff) {
57976 + printk(KERN_ERR "%s: dma-ranges outside of 32 bits space\n",
57977 + hose->dn->full_name);
57981 + dma_offset_set = 1;
57982 + pci_dram_offset = res->start;
57984 + printk(KERN_INFO "4xx PCI DMA offset set to 0x%08lx\n",
57985 + pci_dram_offset);
57990 + * 4xx PCI 2.x part
57993 +static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose,
57994 + void __iomem *reg)
57996 + u32 la, ma, pcila, pciha;
57999 + /* Setup outbound memory windows */
58000 + for (i = j = 0; i < 3; i++) {
58001 + struct resource *res = &hose->mem_resources[i];
58003 + /* we only care about memory windows */
58004 + if (!(res->flags & IORESOURCE_MEM))
58007 + printk(KERN_WARNING "%s: Too many ranges\n",
58008 + hose->dn->full_name);
58012 + /* Calculate register values */
58014 + pciha = RES_TO_U32_HIGH(res->start - hose->pci_mem_offset);
58015 + pcila = RES_TO_U32_LOW(res->start - hose->pci_mem_offset);
58017 + ma = res->end + 1 - res->start;
58018 + if (!is_power_of_2(ma) || ma < 0x1000 || ma > 0xffffffffu) {
58019 + printk(KERN_WARNING "%s: Resource out of range\n",
58020 + hose->dn->full_name);
58023 + ma = (0xffffffffu << ilog2(ma)) | 0x1;
58024 + if (res->flags & IORESOURCE_PREFETCH)
58027 + /* Program register values */
58028 + writel(la, reg + PCIL0_PMM0LA + (0x10 * j));
58029 + writel(pcila, reg + PCIL0_PMM0PCILA + (0x10 * j));
58030 + writel(pciha, reg + PCIL0_PMM0PCIHA + (0x10 * j));
58031 + writel(ma, reg + PCIL0_PMM0MA + (0x10 * j));
58036 +static void __init ppc4xx_configure_pci_PTMs(struct pci_controller *hose,
58037 + void __iomem *reg,
58038 + const struct resource *res)
58040 + resource_size_t size = res->end - res->start + 1;
58043 + /* Calculate window size */
58044 + sa = (0xffffffffu << ilog2(size)) | 1;
58047 + /* RAM is always at 0 local for now */
58048 + writel(0, reg + PCIL0_PTM1LA);
58049 + writel(sa, reg + PCIL0_PTM1MS);
58051 + /* Map on PCI side */
58052 + early_write_config_dword(hose, hose->first_busno, 0,
58053 + PCI_BASE_ADDRESS_1, res->start);
58054 + early_write_config_dword(hose, hose->first_busno, 0,
58055 + PCI_BASE_ADDRESS_2, 0x00000000);
58056 + early_write_config_word(hose, hose->first_busno, 0,
58057 + PCI_COMMAND, 0x0006);
58060 +static void __init ppc4xx_probe_pci_bridge(struct device_node *np)
58063 + struct resource rsrc_cfg;
58064 + struct resource rsrc_reg;
58065 + struct resource dma_window;
58066 + struct pci_controller *hose = NULL;
58067 + void __iomem *reg = NULL;
58068 + const int *bus_range;
58071 + /* Fetch config space registers address */
58072 + if (of_address_to_resource(np, 0, &rsrc_cfg)) {
58073 + printk(KERN_ERR "%s:Can't get PCI config register base !",
58077 + /* Fetch host bridge internal registers address */
58078 + if (of_address_to_resource(np, 3, &rsrc_reg)) {
58079 + printk(KERN_ERR "%s: Can't get PCI internal register base !",
58084 + /* Check if primary bridge */
58085 + if (of_get_property(np, "primary", NULL))
58088 + /* Get bus range if any */
58089 + bus_range = of_get_property(np, "bus-range", NULL);
58091 + /* Map registers */
58092 + reg = ioremap(rsrc_reg.start, rsrc_reg.end + 1 - rsrc_reg.start);
58093 + if (reg == NULL) {
58094 + printk(KERN_ERR "%s: Can't map registers !", np->full_name);
58098 + /* Allocate the host controller data structure */
58099 + hose = pcibios_alloc_controller(np);
58103 + hose->first_busno = bus_range ? bus_range[0] : 0x0;
58104 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
58106 + /* Setup config space */
58107 + setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 0x4, 0);
58109 + /* Disable all windows */
58110 + writel(0, reg + PCIL0_PMM0MA);
58111 + writel(0, reg + PCIL0_PMM1MA);
58112 + writel(0, reg + PCIL0_PMM2MA);
58113 + writel(0, reg + PCIL0_PTM1MS);
58114 + writel(0, reg + PCIL0_PTM2MS);
58116 + /* Parse outbound mapping resources */
58117 + pci_process_bridge_OF_ranges(hose, np, primary);
58119 + /* Parse inbound mapping resources */
58120 + if (ppc4xx_parse_dma_ranges(hose, reg, &dma_window) != 0)
58123 + /* Configure outbound ranges POMs */
58124 + ppc4xx_configure_pci_PMMs(hose, reg);
58126 + /* Configure inbound ranges PIMs */
58127 + ppc4xx_configure_pci_PTMs(hose, reg, &dma_window);
58129 + /* We don't need the registers anymore */
58135 + pcibios_free_controller(hose);
58144 +static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose,
58145 + void __iomem *reg)
58147 + u32 lah, lal, pciah, pcial, sa;
58150 + /* Setup outbound memory windows */
58151 + for (i = j = 0; i < 3; i++) {
58152 + struct resource *res = &hose->mem_resources[i];
58154 + /* we only care about memory windows */
58155 + if (!(res->flags & IORESOURCE_MEM))
58158 + printk(KERN_WARNING "%s: Too many ranges\n",
58159 + hose->dn->full_name);
58163 + /* Calculate register values */
58164 + lah = RES_TO_U32_HIGH(res->start);
58165 + lal = RES_TO_U32_LOW(res->start);
58166 + pciah = RES_TO_U32_HIGH(res->start - hose->pci_mem_offset);
58167 + pcial = RES_TO_U32_LOW(res->start - hose->pci_mem_offset);
58168 + sa = res->end + 1 - res->start;
58169 + if (!is_power_of_2(sa) || sa < 0x100000 ||
58170 + sa > 0xffffffffu) {
58171 + printk(KERN_WARNING "%s: Resource out of range\n",
58172 + hose->dn->full_name);
58175 + sa = (0xffffffffu << ilog2(sa)) | 0x1;
58177 + /* Program register values */
58179 + writel(lah, reg + PCIX0_POM0LAH);
58180 + writel(lal, reg + PCIX0_POM0LAL);
58181 + writel(pciah, reg + PCIX0_POM0PCIAH);
58182 + writel(pcial, reg + PCIX0_POM0PCIAL);
58183 + writel(sa, reg + PCIX0_POM0SA);
58185 + writel(lah, reg + PCIX0_POM1LAH);
58186 + writel(lal, reg + PCIX0_POM1LAL);
58187 + writel(pciah, reg + PCIX0_POM1PCIAH);
58188 + writel(pcial, reg + PCIX0_POM1PCIAL);
58189 + writel(sa, reg + PCIX0_POM1SA);
58195 +static void __init ppc4xx_configure_pcix_PIMs(struct pci_controller *hose,
58196 + void __iomem *reg,
58197 + const struct resource *res,
58199 + int enable_msi_hole)
58201 + resource_size_t size = res->end - res->start + 1;
58204 + /* RAM is always at 0 */
58205 + writel(0x00000000, reg + PCIX0_PIM0LAH);
58206 + writel(0x00000000, reg + PCIX0_PIM0LAL);
58208 + /* Calculate window size */
58209 + sa = (0xffffffffu << ilog2(size)) | 1;
58211 + if (res->flags & IORESOURCE_PREFETCH)
58213 + if (enable_msi_hole)
58215 + writel(sa, reg + PCIX0_PIM0SA);
58217 + writel(0xffffffff, reg + PCIX0_PIM0SAH);
58219 + /* Map on PCI side */
58220 + writel(0x00000000, reg + PCIX0_BAR0H);
58221 + writel(res->start, reg + PCIX0_BAR0L);
58222 + writew(0x0006, reg + PCIX0_COMMAND);
58225 +static void __init ppc4xx_probe_pcix_bridge(struct device_node *np)
58227 + struct resource rsrc_cfg;
58228 + struct resource rsrc_reg;
58229 + struct resource dma_window;
58230 + struct pci_controller *hose = NULL;
58231 + void __iomem *reg = NULL;
58232 + const int *bus_range;
58233 + int big_pim = 0, msi = 0, primary = 0;
58235 + /* Fetch config space registers address */
58236 + if (of_address_to_resource(np, 0, &rsrc_cfg)) {
58237 + printk(KERN_ERR "%s:Can't get PCI-X config register base !",
58241 + /* Fetch host bridge internal registers address */
58242 + if (of_address_to_resource(np, 3, &rsrc_reg)) {
58243 + printk(KERN_ERR "%s: Can't get PCI-X internal register base !",
58248 + /* Check if it supports large PIMs (440GX) */
58249 + if (of_get_property(np, "large-inbound-windows", NULL))
58252 + /* Check if we should enable MSIs inbound hole */
58253 + if (of_get_property(np, "enable-msi-hole", NULL))
58256 + /* Check if primary bridge */
58257 + if (of_get_property(np, "primary", NULL))
58260 + /* Get bus range if any */
58261 + bus_range = of_get_property(np, "bus-range", NULL);
58263 + /* Map registers */
58264 + reg = ioremap(rsrc_reg.start, rsrc_reg.end + 1 - rsrc_reg.start);
58265 + if (reg == NULL) {
58266 + printk(KERN_ERR "%s: Can't map registers !", np->full_name);
58270 + /* Allocate the host controller data structure */
58271 + hose = pcibios_alloc_controller(np);
58275 + hose->first_busno = bus_range ? bus_range[0] : 0x0;
58276 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
58278 + /* Setup config space */
58279 + setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 0x4, 0);
58281 + /* Disable all windows */
58282 + writel(0, reg + PCIX0_POM0SA);
58283 + writel(0, reg + PCIX0_POM1SA);
58284 + writel(0, reg + PCIX0_POM2SA);
58285 + writel(0, reg + PCIX0_PIM0SA);
58286 + writel(0, reg + PCIX0_PIM1SA);
58287 + writel(0, reg + PCIX0_PIM2SA);
58289 + writel(0, reg + PCIX0_PIM0SAH);
58290 + writel(0, reg + PCIX0_PIM2SAH);
58293 + /* Parse outbound mapping resources */
58294 + pci_process_bridge_OF_ranges(hose, np, primary);
58296 + /* Parse inbound mapping resources */
58297 + if (ppc4xx_parse_dma_ranges(hose, reg, &dma_window) != 0)
58300 + /* Configure outbound ranges POMs */
58301 + ppc4xx_configure_pcix_POMs(hose, reg);
58303 + /* Configure inbound ranges PIMs */
58304 + ppc4xx_configure_pcix_PIMs(hose, reg, &dma_window, big_pim, msi);
58306 + /* We don't need the registers anymore */
58312 + pcibios_free_controller(hose);
58317 +#ifdef CONFIG_PPC4xx_PCI_EXPRESS
58320 + * 4xx PCI-Express part
58322 + * We support 3 parts currently based on the compatible property:
58324 + * ibm,plb-pciex-440spe
58325 + * ibm,plb-pciex-405ex
58327 + * Anything else will be rejected for now as they are all subtly
58328 + * different unfortunately.
58332 +#define MAX_PCIE_BUS_MAPPED 0x40
58334 +struct ppc4xx_pciex_port
58336 + struct pci_controller *hose;
58337 + struct device_node *node;
58338 + unsigned int index;
58342 + unsigned int sdr_base;
58344 + struct resource cfg_space;
58345 + struct resource utl_regs;
58346 + void __iomem *utl_base;
58349 +static struct ppc4xx_pciex_port *ppc4xx_pciex_ports;
58350 +static unsigned int ppc4xx_pciex_port_count;
58352 +struct ppc4xx_pciex_hwops
58354 + int (*core_init)(struct device_node *np);
58355 + int (*port_init_hw)(struct ppc4xx_pciex_port *port);
58356 + int (*setup_utl)(struct ppc4xx_pciex_port *port);
58359 +static struct ppc4xx_pciex_hwops *ppc4xx_pciex_hwops;
58363 +/* Check various reset bits of the 440SPe PCIe core */
58364 +static int __init ppc440spe_pciex_check_reset(struct device_node *np)
58366 + u32 valPE0, valPE1, valPE2;
58369 + /* SDR0_PEGPLLLCT1 reset */
58370 + if (!(mfdcri(SDR0, PESDR0_PLLLCT1) & 0x01000000)) {
58372 + * the PCIe core was probably already initialised
58373 + * by firmware - let's re-reset RCSSET regs
58375 + * -- Shouldn't we also re-reset the whole thing ? -- BenH
58377 + pr_debug("PCIE: SDR0_PLLLCT1 already reset.\n");
58378 + mtdcri(SDR0, PESDR0_440SPE_RCSSET, 0x01010000);
58379 + mtdcri(SDR0, PESDR1_440SPE_RCSSET, 0x01010000);
58380 + mtdcri(SDR0, PESDR2_440SPE_RCSSET, 0x01010000);
58383 + valPE0 = mfdcri(SDR0, PESDR0_440SPE_RCSSET);
58384 + valPE1 = mfdcri(SDR0, PESDR1_440SPE_RCSSET);
58385 + valPE2 = mfdcri(SDR0, PESDR2_440SPE_RCSSET);
58387 + /* SDR0_PExRCSSET rstgu */
58388 + if (!(valPE0 & 0x01000000) ||
58389 + !(valPE1 & 0x01000000) ||
58390 + !(valPE2 & 0x01000000)) {
58391 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstgu error\n");
58395 + /* SDR0_PExRCSSET rstdl */
58396 + if (!(valPE0 & 0x00010000) ||
58397 + !(valPE1 & 0x00010000) ||
58398 + !(valPE2 & 0x00010000)) {
58399 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstdl error\n");
58403 + /* SDR0_PExRCSSET rstpyn */
58404 + if ((valPE0 & 0x00001000) ||
58405 + (valPE1 & 0x00001000) ||
58406 + (valPE2 & 0x00001000)) {
58407 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstpyn error\n");
58411 + /* SDR0_PExRCSSET hldplb */
58412 + if ((valPE0 & 0x10000000) ||
58413 + (valPE1 & 0x10000000) ||
58414 + (valPE2 & 0x10000000)) {
58415 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET hldplb error\n");
58419 + /* SDR0_PExRCSSET rdy */
58420 + if ((valPE0 & 0x00100000) ||
58421 + (valPE1 & 0x00100000) ||
58422 + (valPE2 & 0x00100000)) {
58423 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rdy error\n");
58427 + /* SDR0_PExRCSSET shutdown */
58428 + if ((valPE0 & 0x00000100) ||
58429 + (valPE1 & 0x00000100) ||
58430 + (valPE2 & 0x00000100)) {
58431 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET shutdown error\n");
58438 +/* Global PCIe core initializations for 440SPe core */
58439 +static int __init ppc440spe_pciex_core_init(struct device_node *np)
58441 + int time_out = 20;
58443 + /* Set PLL clock receiver to LVPECL */
58444 + mtdcri(SDR0, PESDR0_PLLLCT1, mfdcri(SDR0, PESDR0_PLLLCT1) | 1 << 28);
58446 + /* Shouldn't we do all the calibration stuff etc... here ? */
58447 + if (ppc440spe_pciex_check_reset(np))
58450 + if (!(mfdcri(SDR0, PESDR0_PLLLCT2) & 0x10000)) {
58451 + printk(KERN_INFO "PCIE: PESDR_PLLCT2 resistance calibration "
58452 + "failed (0x%08x)\n",
58453 + mfdcri(SDR0, PESDR0_PLLLCT2));
58457 + /* De-assert reset of PCIe PLL, wait for lock */
58458 + mtdcri(SDR0, PESDR0_PLLLCT1,
58459 + mfdcri(SDR0, PESDR0_PLLLCT1) & ~(1 << 24));
58462 + while (time_out) {
58463 + if (!(mfdcri(SDR0, PESDR0_PLLLCT3) & 0x10000000)) {
58470 + printk(KERN_INFO "PCIE: VCO output not locked\n");
58474 + pr_debug("PCIE initialization OK\n");
58479 +static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58481 + u32 val = 1 << 24;
58483 + if (port->endpoint)
58484 + val = PTYPE_LEGACY_ENDPOINT << 20;
58486 + val = PTYPE_ROOT_PORT << 20;
58488 + if (port->index == 0)
58489 + val |= LNKW_X8 << 12;
58491 + val |= LNKW_X4 << 12;
58493 + mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET, val);
58494 + mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET1, 0x20222222);
58495 + if (ppc440spe_revA())
58496 + mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x11000000);
58497 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL0SET1, 0x35000000);
58498 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL1SET1, 0x35000000);
58499 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL2SET1, 0x35000000);
58500 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL3SET1, 0x35000000);
58501 + if (port->index == 0) {
58502 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL4SET1,
58504 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL5SET1,
58506 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL6SET1,
58508 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL7SET1,
58511 + val = mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET);
58512 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
58513 + (val & ~(1 << 24 | 1 << 16)) | 1 << 12);
58518 +static int ppc440speA_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58520 + return ppc440spe_pciex_init_port_hw(port);
58523 +static int ppc440speB_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58525 + int rc = ppc440spe_pciex_init_port_hw(port);
58527 + port->has_ibpre = 1;
58532 +static int ppc440speA_pciex_init_utl(struct ppc4xx_pciex_port *port)
58534 + /* XXX Check what that value means... I hate magic */
58535 + dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x68782800);
58538 + * Set buffer allocations and then assert VRB and TXE.
58540 + out_be32(port->utl_base + PEUTL_OUTTR, 0x08000000);
58541 + out_be32(port->utl_base + PEUTL_INTR, 0x02000000);
58542 + out_be32(port->utl_base + PEUTL_OPDBSZ, 0x10000000);
58543 + out_be32(port->utl_base + PEUTL_PBBSZ, 0x53000000);
58544 + out_be32(port->utl_base + PEUTL_IPHBSZ, 0x08000000);
58545 + out_be32(port->utl_base + PEUTL_IPDBSZ, 0x10000000);
58546 + out_be32(port->utl_base + PEUTL_RCIRQEN, 0x00f00000);
58547 + out_be32(port->utl_base + PEUTL_PCTL, 0x80800066);
58552 +static int ppc440speB_pciex_init_utl(struct ppc4xx_pciex_port *port)
58554 + /* Report CRS to the operating system */
58555 + out_be32(port->utl_base + PEUTL_PBCTL, 0x08000000);
58560 +static struct ppc4xx_pciex_hwops ppc440speA_pcie_hwops __initdata =
58562 + .core_init = ppc440spe_pciex_core_init,
58563 + .port_init_hw = ppc440speA_pciex_init_port_hw,
58564 + .setup_utl = ppc440speA_pciex_init_utl,
58567 +static struct ppc4xx_pciex_hwops ppc440speB_pcie_hwops __initdata =
58569 + .core_init = ppc440spe_pciex_core_init,
58570 + .port_init_hw = ppc440speB_pciex_init_port_hw,
58571 + .setup_utl = ppc440speB_pciex_init_utl,
58574 +#endif /* CONFIG_44x */
58578 +static int __init ppc405ex_pciex_core_init(struct device_node *np)
58580 + /* Nothing to do, return 2 ports */
58584 +static void ppc405ex_pcie_phy_reset(struct ppc4xx_pciex_port *port)
58586 + /* Assert the PE0_PHY reset */
58587 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01010000);
58590 + /* deassert the PE0_hotreset */
58591 + if (port->endpoint)
58592 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01111000);
58594 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01101000);
58596 + /* poll for phy !reset */
58597 + /* XXX FIXME add timeout */
58598 + while (!(mfdcri(SDR0, port->sdr_base + PESDRn_405EX_PHYSTA) & 0x00001000))
58601 + /* deassert the PE0_gpl_utl_reset */
58602 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x00101000);
58605 +static int ppc405ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58609 + if (port->endpoint)
58610 + val = PTYPE_LEGACY_ENDPOINT;
58612 + val = PTYPE_ROOT_PORT;
58614 + mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET,
58615 + 1 << 24 | val << 20 | LNKW_X1 << 12);
58617 + mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET1, 0x00000000);
58618 + mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x01010000);
58619 + mtdcri(SDR0, port->sdr_base + PESDRn_405EX_PHYSET1, 0x720F0000);
58620 + mtdcri(SDR0, port->sdr_base + PESDRn_405EX_PHYSET2, 0x70600003);
58623 + * Only reset the PHY when no link is currently established.
58624 + * This is for the Atheros PCIe board which has problems to establish
58625 + * the link (again) after this PHY reset. All other currently tested
58626 + * PCIe boards don't show this problem.
58627 + * This has to be re-tested and fixed in a later release!
58629 +#if 0 /* XXX FIXME: Not resetting the PHY will leave all resources
58630 + * configured as done previously by U-Boot. Then Linux will currently
58631 + * not reassign them. So the PHY reset is now done always. This will
58632 + * lead to problems with the Atheros PCIe board again.
58634 + val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP);
58635 + if (!(val & 0x00001000))
58636 + ppc405ex_pcie_phy_reset(port);
58638 + ppc405ex_pcie_phy_reset(port);
58641 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, 0x10000000); /* guarded on */
58643 + port->has_ibpre = 1;
58648 +static int ppc405ex_pciex_init_utl(struct ppc4xx_pciex_port *port)
58650 + dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x0);
58653 + * Set buffer allocations and then assert VRB and TXE.
58655 + out_be32(port->utl_base + PEUTL_OUTTR, 0x02000000);
58656 + out_be32(port->utl_base + PEUTL_INTR, 0x02000000);
58657 + out_be32(port->utl_base + PEUTL_OPDBSZ, 0x04000000);
58658 + out_be32(port->utl_base + PEUTL_PBBSZ, 0x21000000);
58659 + out_be32(port->utl_base + PEUTL_IPHBSZ, 0x02000000);
58660 + out_be32(port->utl_base + PEUTL_IPDBSZ, 0x04000000);
58661 + out_be32(port->utl_base + PEUTL_RCIRQEN, 0x00f00000);
58662 + out_be32(port->utl_base + PEUTL_PCTL, 0x80800066);
58664 + out_be32(port->utl_base + PEUTL_PBCTL, 0x08000000);
58669 +static struct ppc4xx_pciex_hwops ppc405ex_pcie_hwops __initdata =
58671 + .core_init = ppc405ex_pciex_core_init,
58672 + .port_init_hw = ppc405ex_pciex_init_port_hw,
58673 + .setup_utl = ppc405ex_pciex_init_utl,
58676 +#endif /* CONFIG_40x */
58679 +/* Check that the core has been initied and if not, do it */
58680 +static int __init ppc4xx_pciex_check_core_init(struct device_node *np)
58682 + static int core_init;
58683 + int count = -ENODEV;
58689 + if (of_device_is_compatible(np, "ibm,plb-pciex-440spe")) {
58690 + if (ppc440spe_revA())
58691 + ppc4xx_pciex_hwops = &ppc440speA_pcie_hwops;
58693 + ppc4xx_pciex_hwops = &ppc440speB_pcie_hwops;
58695 +#endif /* CONFIG_44x */
58697 + if (of_device_is_compatible(np, "ibm,plb-pciex-405ex"))
58698 + ppc4xx_pciex_hwops = &ppc405ex_pcie_hwops;
58700 + if (ppc4xx_pciex_hwops == NULL) {
58701 + printk(KERN_WARNING "PCIE: unknown host type %s\n",
58706 + count = ppc4xx_pciex_hwops->core_init(np);
58708 + ppc4xx_pciex_ports =
58709 + kzalloc(count * sizeof(struct ppc4xx_pciex_port),
58711 + if (ppc4xx_pciex_ports) {
58712 + ppc4xx_pciex_port_count = count;
58715 + printk(KERN_WARNING "PCIE: failed to allocate ports array\n");
58721 +static void __init ppc4xx_pciex_port_init_mapping(struct ppc4xx_pciex_port *port)
58723 + /* We map PCI Express configuration based on the reg property */
58724 + dcr_write(port->dcrs, DCRO_PEGPL_CFGBAH,
58725 + RES_TO_U32_HIGH(port->cfg_space.start));
58726 + dcr_write(port->dcrs, DCRO_PEGPL_CFGBAL,
58727 + RES_TO_U32_LOW(port->cfg_space.start));
58729 + /* XXX FIXME: Use size from reg property. For now, map 512M */
58730 + dcr_write(port->dcrs, DCRO_PEGPL_CFGMSK, 0xe0000001);
58732 + /* We map UTL registers based on the reg property */
58733 + dcr_write(port->dcrs, DCRO_PEGPL_REGBAH,
58734 + RES_TO_U32_HIGH(port->utl_regs.start));
58735 + dcr_write(port->dcrs, DCRO_PEGPL_REGBAL,
58736 + RES_TO_U32_LOW(port->utl_regs.start));
58738 + /* XXX FIXME: Use size from reg property */
58739 + dcr_write(port->dcrs, DCRO_PEGPL_REGMSK, 0x00007001);
58741 + /* Disable all other outbound windows */
58742 + dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL, 0);
58743 + dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKL, 0);
58744 + dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKL, 0);
58745 + dcr_write(port->dcrs, DCRO_PEGPL_MSGMSK, 0);
58748 +static int __init ppc4xx_pciex_wait_on_sdr(struct ppc4xx_pciex_port *port,
58749 + unsigned int sdr_offset,
58750 + unsigned int mask,
58751 + unsigned int value,
58756 + while(timeout_ms--) {
58757 + val = mfdcri(SDR0, port->sdr_base + sdr_offset);
58758 + if ((val & mask) == value) {
58759 + pr_debug("PCIE%d: Wait on SDR %x success with tm %d (%08x)\n",
58760 + port->index, sdr_offset, timeout_ms, val);
58768 +static int __init ppc4xx_pciex_port_init(struct ppc4xx_pciex_port *port)
58773 + if (ppc4xx_pciex_hwops->port_init_hw)
58774 + rc = ppc4xx_pciex_hwops->port_init_hw(port);
58778 + printk(KERN_INFO "PCIE%d: Checking link...\n",
58781 + /* Wait for reset to complete */
58782 + if (ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS, 1 << 20, 0, 10)) {
58783 + printk(KERN_WARNING "PCIE%d: PGRST failed\n",
58788 + /* Check for card presence detect if supported, if not, just wait for
58789 + * link unconditionally.
58791 + * note that we don't fail if there is no link, we just filter out
58792 + * config space accesses. That way, it will be easier to implement
58793 + * hotplug later on.
58795 + if (!port->has_ibpre ||
58796 + !ppc4xx_pciex_wait_on_sdr(port, PESDRn_LOOP,
58797 + 1 << 28, 1 << 28, 100)) {
58799 + "PCIE%d: Device detected, waiting for link...\n",
58801 + if (ppc4xx_pciex_wait_on_sdr(port, PESDRn_LOOP,
58802 + 0x1000, 0x1000, 2000))
58803 + printk(KERN_WARNING
58804 + "PCIE%d: Link up failed\n", port->index);
58807 + "PCIE%d: link is up !\n", port->index);
58811 + printk(KERN_INFO "PCIE%d: No device detected.\n", port->index);
58814 + * Initialize mapping: disable all regions and configure
58815 + * CFG and REG regions based on resources in the device tree
58817 + ppc4xx_pciex_port_init_mapping(port);
58822 + port->utl_base = ioremap(port->utl_regs.start, 0x100);
58823 + BUG_ON(port->utl_base == NULL);
58826 + * Setup UTL registers --BenH.
58828 + if (ppc4xx_pciex_hwops->setup_utl)
58829 + ppc4xx_pciex_hwops->setup_utl(port);
58832 + * Check for VC0 active and assert RDY.
58834 + if (port->link &&
58835 + ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS,
58836 + 1 << 16, 1 << 16, 5000)) {
58837 + printk(KERN_INFO "PCIE%d: VC0 not active\n", port->index);
58841 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
58842 + mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) | 1 << 20);
58848 +static int ppc4xx_pciex_validate_bdf(struct ppc4xx_pciex_port *port,
58849 + struct pci_bus *bus,
58850 + unsigned int devfn)
58852 + static int message;
58854 + /* Endpoint can not generate upstream(remote) config cycles */
58855 + if (port->endpoint && bus->number != port->hose->first_busno)
58856 + return PCIBIOS_DEVICE_NOT_FOUND;
58858 + /* Check we are within the mapped range */
58859 + if (bus->number > port->hose->last_busno) {
58861 + printk(KERN_WARNING "Warning! Probing bus %u"
58862 + " out of range !\n", bus->number);
58865 + return PCIBIOS_DEVICE_NOT_FOUND;
58868 + /* The root complex has only one device / function */
58869 + if (bus->number == port->hose->first_busno && devfn != 0)
58870 + return PCIBIOS_DEVICE_NOT_FOUND;
58872 + /* The other side of the RC has only one device as well */
58873 + if (bus->number == (port->hose->first_busno + 1) &&
58874 + PCI_SLOT(devfn) != 0)
58875 + return PCIBIOS_DEVICE_NOT_FOUND;
58877 + /* Check if we have a link */
58878 + if ((bus->number != port->hose->first_busno) && !port->link)
58879 + return PCIBIOS_DEVICE_NOT_FOUND;
58884 +static void __iomem *ppc4xx_pciex_get_config_base(struct ppc4xx_pciex_port *port,
58885 + struct pci_bus *bus,
58886 + unsigned int devfn)
58890 + /* Remove the casts when we finally remove the stupid volatile
58891 + * in struct pci_controller
58893 + if (bus->number == port->hose->first_busno)
58894 + return (void __iomem *)port->hose->cfg_addr;
58896 + relbus = bus->number - (port->hose->first_busno + 1);
58897 + return (void __iomem *)port->hose->cfg_data +
58898 + ((relbus << 20) | (devfn << 12));
58901 +static int ppc4xx_pciex_read_config(struct pci_bus *bus, unsigned int devfn,
58902 + int offset, int len, u32 *val)
58904 + struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
58905 + struct ppc4xx_pciex_port *port =
58906 + &ppc4xx_pciex_ports[hose->indirect_type];
58907 + void __iomem *addr;
58910 + BUG_ON(hose != port->hose);
58912 + if (ppc4xx_pciex_validate_bdf(port, bus, devfn) != 0)
58913 + return PCIBIOS_DEVICE_NOT_FOUND;
58915 + addr = ppc4xx_pciex_get_config_base(port, bus, devfn);
58918 + * Reading from configuration space of non-existing device can
58919 + * generate transaction errors. For the read duration we suppress
58920 + * assertion of machine check exceptions to avoid those.
58922 + gpl_cfg = dcr_read(port->dcrs, DCRO_PEGPL_CFG);
58923 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg | GPL_DMER_MASK_DISA);
58925 + /* Make sure no CRS is recorded */
58926 + out_be32(port->utl_base + PEUTL_RCSTA, 0x00040000);
58930 + *val = in_8((u8 *)(addr + offset));
58933 + *val = in_le16((u16 *)(addr + offset));
58936 + *val = in_le32((u32 *)(addr + offset));
58940 + pr_debug("pcie-config-read: bus=%3d [%3d..%3d] devfn=0x%04x"
58941 + " offset=0x%04x len=%d, addr=0x%p val=0x%08x\n",
58942 + bus->number, hose->first_busno, hose->last_busno,
58943 + devfn, offset, len, addr + offset, *val);
58945 + /* Check for CRS (440SPe rev B does that for us but heh ..) */
58946 + if (in_be32(port->utl_base + PEUTL_RCSTA) & 0x00040000) {
58947 + pr_debug("Got CRS !\n");
58948 + if (len != 4 || offset != 0)
58949 + return PCIBIOS_DEVICE_NOT_FOUND;
58950 + *val = 0xffff0001;
58953 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg);
58955 + return PCIBIOS_SUCCESSFUL;
58958 +static int ppc4xx_pciex_write_config(struct pci_bus *bus, unsigned int devfn,
58959 + int offset, int len, u32 val)
58961 + struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
58962 + struct ppc4xx_pciex_port *port =
58963 + &ppc4xx_pciex_ports[hose->indirect_type];
58964 + void __iomem *addr;
58967 + if (ppc4xx_pciex_validate_bdf(port, bus, devfn) != 0)
58968 + return PCIBIOS_DEVICE_NOT_FOUND;
58970 + addr = ppc4xx_pciex_get_config_base(port, bus, devfn);
58973 + * Reading from configuration space of non-existing device can
58974 + * generate transaction errors. For the read duration we suppress
58975 + * assertion of machine check exceptions to avoid those.
58977 + gpl_cfg = dcr_read(port->dcrs, DCRO_PEGPL_CFG);
58978 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg | GPL_DMER_MASK_DISA);
58980 + pr_debug("pcie-config-write: bus=%3d [%3d..%3d] devfn=0x%04x"
58981 + " offset=0x%04x len=%d, addr=0x%p val=0x%08x\n",
58982 + bus->number, hose->first_busno, hose->last_busno,
58983 + devfn, offset, len, addr + offset, val);
58987 + out_8((u8 *)(addr + offset), val);
58990 + out_le16((u16 *)(addr + offset), val);
58993 + out_le32((u32 *)(addr + offset), val);
58997 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg);
58999 + return PCIBIOS_SUCCESSFUL;
59002 +static struct pci_ops ppc4xx_pciex_pci_ops =
59004 + .read = ppc4xx_pciex_read_config,
59005 + .write = ppc4xx_pciex_write_config,
59008 +static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port,
59009 + struct pci_controller *hose,
59010 + void __iomem *mbase)
59012 + u32 lah, lal, pciah, pcial, sa;
59015 + /* Setup outbound memory windows */
59016 + for (i = j = 0; i < 3; i++) {
59017 + struct resource *res = &hose->mem_resources[i];
59019 + /* we only care about memory windows */
59020 + if (!(res->flags & IORESOURCE_MEM))
59023 + printk(KERN_WARNING "%s: Too many ranges\n",
59024 + port->node->full_name);
59028 + /* Calculate register values */
59029 + lah = RES_TO_U32_HIGH(res->start);
59030 + lal = RES_TO_U32_LOW(res->start);
59031 + pciah = RES_TO_U32_HIGH(res->start - hose->pci_mem_offset);
59032 + pcial = RES_TO_U32_LOW(res->start - hose->pci_mem_offset);
59033 + sa = res->end + 1 - res->start;
59034 + if (!is_power_of_2(sa) || sa < 0x100000 ||
59035 + sa > 0xffffffffu) {
59036 + printk(KERN_WARNING "%s: Resource out of range\n",
59037 + port->node->full_name);
59040 + sa = (0xffffffffu << ilog2(sa)) | 0x1;
59042 + /* Program register values */
59045 + out_le32(mbase + PECFG_POM0LAH, pciah);
59046 + out_le32(mbase + PECFG_POM0LAL, pcial);
59047 + dcr_write(port->dcrs, DCRO_PEGPL_OMR1BAH, lah);
59048 + dcr_write(port->dcrs, DCRO_PEGPL_OMR1BAL, lal);
59049 + dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKH, 0x7fffffff);
59050 + dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL, sa | 3);
59053 + out_le32(mbase + PECFG_POM1LAH, pciah);
59054 + out_le32(mbase + PECFG_POM1LAL, pcial);
59055 + dcr_write(port->dcrs, DCRO_PEGPL_OMR2BAH, lah);
59056 + dcr_write(port->dcrs, DCRO_PEGPL_OMR2BAL, lal);
59057 + dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKH, 0x7fffffff);
59058 + dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKL, sa | 3);
59064 + /* Configure IO, always 64K starting at 0 */
59065 + if (hose->io_resource.flags & IORESOURCE_IO) {
59066 + lah = RES_TO_U32_HIGH(hose->io_base_phys);
59067 + lal = RES_TO_U32_LOW(hose->io_base_phys);
59068 + out_le32(mbase + PECFG_POM2LAH, 0);
59069 + out_le32(mbase + PECFG_POM2LAL, 0);
59070 + dcr_write(port->dcrs, DCRO_PEGPL_OMR3BAH, lah);
59071 + dcr_write(port->dcrs, DCRO_PEGPL_OMR3BAL, lal);
59072 + dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKH, 0x7fffffff);
59073 + dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKL, 0xffff0000 | 3);
59077 +static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port,
59078 + struct pci_controller *hose,
59079 + void __iomem *mbase,
59080 + struct resource *res)
59082 + resource_size_t size = res->end - res->start + 1;
59085 + /* Calculate window size */
59086 + sa = (0xffffffffffffffffull << ilog2(size));;
59087 + if (res->flags & IORESOURCE_PREFETCH)
59090 + out_le32(mbase + PECFG_BAR0HMPA, RES_TO_U32_HIGH(sa));
59091 + out_le32(mbase + PECFG_BAR0LMPA, RES_TO_U32_LOW(sa));
59093 + /* The setup of the split looks weird to me ... let's see if it works */
59094 + out_le32(mbase + PECFG_PIM0LAL, 0x00000000);
59095 + out_le32(mbase + PECFG_PIM0LAH, 0x00000000);
59096 + out_le32(mbase + PECFG_PIM1LAL, 0x00000000);
59097 + out_le32(mbase + PECFG_PIM1LAH, 0x00000000);
59098 + out_le32(mbase + PECFG_PIM01SAH, 0xffff0000);
59099 + out_le32(mbase + PECFG_PIM01SAL, 0x00000000);
59101 + /* Enable inbound mapping */
59102 + out_le32(mbase + PECFG_PIMEN, 0x1);
59104 + out_le32(mbase + PCI_BASE_ADDRESS_0, RES_TO_U32_LOW(res->start));
59105 + out_le32(mbase + PCI_BASE_ADDRESS_1, RES_TO_U32_HIGH(res->start));
59107 + /* Enable I/O, Mem, and Busmaster cycles */
59108 + out_le16(mbase + PCI_COMMAND,
59109 + in_le16(mbase + PCI_COMMAND) |
59110 + PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
59113 +static void __init ppc4xx_pciex_port_setup_hose(struct ppc4xx_pciex_port *port)
59115 + struct resource dma_window;
59116 + struct pci_controller *hose = NULL;
59117 + const int *bus_range;
59118 + int primary = 0, busses;
59119 + void __iomem *mbase = NULL, *cfg_data = NULL;
59121 + /* XXX FIXME: Handle endpoint mode properly */
59122 + if (port->endpoint) {
59123 + printk(KERN_WARNING "PCIE%d: Port in endpoint mode !\n",
59128 + /* Check if primary bridge */
59129 + if (of_get_property(port->node, "primary", NULL))
59132 + /* Get bus range if any */
59133 + bus_range = of_get_property(port->node, "bus-range", NULL);
59135 + /* Allocate the host controller data structure */
59136 + hose = pcibios_alloc_controller(port->node);
59140 + /* We stick the port number in "indirect_type" so the config space
59141 + * ops can retrieve the port data structure easily
59143 + hose->indirect_type = port->index;
59145 + /* Get bus range */
59146 + hose->first_busno = bus_range ? bus_range[0] : 0x0;
59147 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
59149 + /* Because of how big mapping the config space is (1M per bus), we
59150 + * limit how many busses we support. In the long run, we could replace
59151 + * that with something akin to kmap_atomic instead. We set aside 1 bus
59152 + * for the host itself too.
59154 + busses = hose->last_busno - hose->first_busno; /* This is off by 1 */
59155 + if (busses > MAX_PCIE_BUS_MAPPED) {
59156 + busses = MAX_PCIE_BUS_MAPPED;
59157 + hose->last_busno = hose->first_busno + busses;
59160 + /* We map the external config space in cfg_data and the host config
59161 + * space in cfg_addr. External space is 1M per bus, internal space
59164 + cfg_data = ioremap(port->cfg_space.start +
59165 + (hose->first_busno + 1) * 0x100000,
59166 + busses * 0x100000);
59167 + mbase = ioremap(port->cfg_space.start + 0x10000000, 0x1000);
59168 + if (cfg_data == NULL || mbase == NULL) {
59169 + printk(KERN_ERR "%s: Can't map config space !",
59170 + port->node->full_name);
59174 + hose->cfg_data = cfg_data;
59175 + hose->cfg_addr = mbase;
59177 + pr_debug("PCIE %s, bus %d..%d\n", port->node->full_name,
59178 + hose->first_busno, hose->last_busno);
59179 + pr_debug(" config space mapped at: root @0x%p, other @0x%p\n",
59180 + hose->cfg_addr, hose->cfg_data);
59182 + /* Setup config space */
59183 + hose->ops = &ppc4xx_pciex_pci_ops;
59184 + port->hose = hose;
59185 + mbase = (void __iomem *)hose->cfg_addr;
59188 + * Set bus numbers on our root port
59190 + out_8(mbase + PCI_PRIMARY_BUS, hose->first_busno);
59191 + out_8(mbase + PCI_SECONDARY_BUS, hose->first_busno + 1);
59192 + out_8(mbase + PCI_SUBORDINATE_BUS, hose->last_busno);
59195 + * OMRs are already reset, also disable PIMs
59197 + out_le32(mbase + PECFG_PIMEN, 0);
59199 + /* Parse outbound mapping resources */
59200 + pci_process_bridge_OF_ranges(hose, port->node, primary);
59202 + /* Parse inbound mapping resources */
59203 + if (ppc4xx_parse_dma_ranges(hose, mbase, &dma_window) != 0)
59206 + /* Configure outbound ranges POMs */
59207 + ppc4xx_configure_pciex_POMs(port, hose, mbase);
59209 + /* Configure inbound ranges PIMs */
59210 + ppc4xx_configure_pciex_PIMs(port, hose, mbase, &dma_window);
59212 + /* The root complex doesn't show up if we don't set some vendor
59213 + * and device IDs into it. Those are the same bogus one that the
59214 + * initial code in arch/ppc add. We might want to change that.
59216 + out_le16(mbase + 0x200, 0xaaa0 + port->index);
59217 + out_le16(mbase + 0x202, 0xbed0 + port->index);
59219 + /* Set Class Code to PCI-PCI bridge and Revision Id to 1 */
59220 + out_le32(mbase + 0x208, 0x06040001);
59222 + printk(KERN_INFO "PCIE%d: successfully set as root-complex\n",
59227 + pcibios_free_controller(hose);
59229 + iounmap(cfg_data);
59234 +static void __init ppc4xx_probe_pciex_bridge(struct device_node *np)
59236 + struct ppc4xx_pciex_port *port;
59239 + unsigned int dcrs;
59241 + /* First, proceed to core initialization as we assume there's
59242 + * only one PCIe core in the system
59244 + if (ppc4xx_pciex_check_core_init(np))
59247 + /* Get the port number from the device-tree */
59248 + pval = of_get_property(np, "port", NULL);
59249 + if (pval == NULL) {
59250 + printk(KERN_ERR "PCIE: Can't find port number for %s\n",
59255 + if (portno >= ppc4xx_pciex_port_count) {
59256 + printk(KERN_ERR "PCIE: port number out of range for %s\n",
59260 + port = &ppc4xx_pciex_ports[portno];
59261 + port->index = portno;
59262 + port->node = of_node_get(np);
59263 + pval = of_get_property(np, "sdr-base", NULL);
59264 + if (pval == NULL) {
59265 + printk(KERN_ERR "PCIE: missing sdr-base for %s\n",
59269 + port->sdr_base = *pval;
59271 + /* XXX Currently, we only support root complex mode */
59272 + port->endpoint = 0;
59274 + /* Fetch config space registers address */
59275 + if (of_address_to_resource(np, 0, &port->cfg_space)) {
59276 + printk(KERN_ERR "%s: Can't get PCI-E config space !",
59280 + /* Fetch host bridge internal registers address */
59281 + if (of_address_to_resource(np, 1, &port->utl_regs)) {
59282 + printk(KERN_ERR "%s: Can't get UTL register base !",
59288 + dcrs = dcr_resource_start(np, 0);
59290 + printk(KERN_ERR "%s: Can't get DCR register base !",
59294 + port->dcrs = dcr_map(np, dcrs, dcr_resource_len(np, 0));
59296 + /* Initialize the port specific registers */
59297 + if (ppc4xx_pciex_port_init(port)) {
59298 + printk(KERN_WARNING "PCIE%d: Port init failed\n", port->index);
59302 + /* Setup the linux hose data structure */
59303 + ppc4xx_pciex_port_setup_hose(port);
59306 +#endif /* CONFIG_PPC4xx_PCI_EXPRESS */
59308 +static int __init ppc4xx_pci_find_bridges(void)
59310 + struct device_node *np;
59312 +#ifdef CONFIG_PPC4xx_PCI_EXPRESS
59313 + for_each_compatible_node(np, NULL, "ibm,plb-pciex")
59314 + ppc4xx_probe_pciex_bridge(np);
59316 + for_each_compatible_node(np, NULL, "ibm,plb-pcix")
59317 + ppc4xx_probe_pcix_bridge(np);
59318 + for_each_compatible_node(np, NULL, "ibm,plb-pci")
59319 + ppc4xx_probe_pci_bridge(np);
59323 +arch_initcall(ppc4xx_pci_find_bridges);
59326 +++ b/arch/powerpc/sysdev/ppc4xx_pci.h
59329 + * PCI / PCI-X / PCI-Express support for 4xx parts
59331 + * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
59333 + * Bits and pieces extracted from arch/ppc support by
59335 + * Matt Porter <mporter@kernel.crashing.org>
59337 + * Copyright 2002-2005 MontaVista Software Inc.
59339 +#ifndef __PPC4XX_PCI_H__
59340 +#define __PPC4XX_PCI_H__
59343 + * 4xx PCI-X bridge register definitions
59345 +#define PCIX0_VENDID 0x000
59346 +#define PCIX0_DEVID 0x002
59347 +#define PCIX0_COMMAND 0x004
59348 +#define PCIX0_STATUS 0x006
59349 +#define PCIX0_REVID 0x008
59350 +#define PCIX0_CLS 0x009
59351 +#define PCIX0_CACHELS 0x00c
59352 +#define PCIX0_LATTIM 0x00d
59353 +#define PCIX0_HDTYPE 0x00e
59354 +#define PCIX0_BIST 0x00f
59355 +#define PCIX0_BAR0L 0x010
59356 +#define PCIX0_BAR0H 0x014
59357 +#define PCIX0_BAR1 0x018
59358 +#define PCIX0_BAR2L 0x01c
59359 +#define PCIX0_BAR2H 0x020
59360 +#define PCIX0_BAR3 0x024
59361 +#define PCIX0_CISPTR 0x028
59362 +#define PCIX0_SBSYSVID 0x02c
59363 +#define PCIX0_SBSYSID 0x02e
59364 +#define PCIX0_EROMBA 0x030
59365 +#define PCIX0_CAP 0x034
59366 +#define PCIX0_RES0 0x035
59367 +#define PCIX0_RES1 0x036
59368 +#define PCIX0_RES2 0x038
59369 +#define PCIX0_INTLN 0x03c
59370 +#define PCIX0_INTPN 0x03d
59371 +#define PCIX0_MINGNT 0x03e
59372 +#define PCIX0_MAXLTNCY 0x03f
59373 +#define PCIX0_BRDGOPT1 0x040
59374 +#define PCIX0_BRDGOPT2 0x044
59375 +#define PCIX0_ERREN 0x050
59376 +#define PCIX0_ERRSTS 0x054
59377 +#define PCIX0_PLBBESR 0x058
59378 +#define PCIX0_PLBBEARL 0x05c
59379 +#define PCIX0_PLBBEARH 0x060
59380 +#define PCIX0_POM0LAL 0x068
59381 +#define PCIX0_POM0LAH 0x06c
59382 +#define PCIX0_POM0SA 0x070
59383 +#define PCIX0_POM0PCIAL 0x074
59384 +#define PCIX0_POM0PCIAH 0x078
59385 +#define PCIX0_POM1LAL 0x07c
59386 +#define PCIX0_POM1LAH 0x080
59387 +#define PCIX0_POM1SA 0x084
59388 +#define PCIX0_POM1PCIAL 0x088
59389 +#define PCIX0_POM1PCIAH 0x08c
59390 +#define PCIX0_POM2SA 0x090
59391 +#define PCIX0_PIM0SAL 0x098
59392 +#define PCIX0_PIM0SA PCIX0_PIM0SAL
59393 +#define PCIX0_PIM0LAL 0x09c
59394 +#define PCIX0_PIM0LAH 0x0a0
59395 +#define PCIX0_PIM1SA 0x0a4
59396 +#define PCIX0_PIM1LAL 0x0a8
59397 +#define PCIX0_PIM1LAH 0x0ac
59398 +#define PCIX0_PIM2SAL 0x0b0
59399 +#define PCIX0_PIM2SA PCIX0_PIM2SAL
59400 +#define PCIX0_PIM2LAL 0x0b4
59401 +#define PCIX0_PIM2LAH 0x0b8
59402 +#define PCIX0_OMCAPID 0x0c0
59403 +#define PCIX0_OMNIPTR 0x0c1
59404 +#define PCIX0_OMMC 0x0c2
59405 +#define PCIX0_OMMA 0x0c4
59406 +#define PCIX0_OMMUA 0x0c8
59407 +#define PCIX0_OMMDATA 0x0cc
59408 +#define PCIX0_OMMEOI 0x0ce
59409 +#define PCIX0_PMCAPID 0x0d0
59410 +#define PCIX0_PMNIPTR 0x0d1
59411 +#define PCIX0_PMC 0x0d2
59412 +#define PCIX0_PMCSR 0x0d4
59413 +#define PCIX0_PMCSRBSE 0x0d6
59414 +#define PCIX0_PMDATA 0x0d7
59415 +#define PCIX0_PMSCRR 0x0d8
59416 +#define PCIX0_CAPID 0x0dc
59417 +#define PCIX0_NIPTR 0x0dd
59418 +#define PCIX0_CMD 0x0de
59419 +#define PCIX0_STS 0x0e0
59420 +#define PCIX0_IDR 0x0e4
59421 +#define PCIX0_CID 0x0e8
59422 +#define PCIX0_RID 0x0ec
59423 +#define PCIX0_PIM0SAH 0x0f8
59424 +#define PCIX0_PIM2SAH 0x0fc
59425 +#define PCIX0_MSGIL 0x100
59426 +#define PCIX0_MSGIH 0x104
59427 +#define PCIX0_MSGOL 0x108
59428 +#define PCIX0_MSGOH 0x10c
59429 +#define PCIX0_IM 0x1f8
59432 + * 4xx PCI bridge register definitions
59434 +#define PCIL0_PMM0LA 0x00
59435 +#define PCIL0_PMM0MA 0x04
59436 +#define PCIL0_PMM0PCILA 0x08
59437 +#define PCIL0_PMM0PCIHA 0x0c
59438 +#define PCIL0_PMM1LA 0x10
59439 +#define PCIL0_PMM1MA 0x14
59440 +#define PCIL0_PMM1PCILA 0x18
59441 +#define PCIL0_PMM1PCIHA 0x1c
59442 +#define PCIL0_PMM2LA 0x20
59443 +#define PCIL0_PMM2MA 0x24
59444 +#define PCIL0_PMM2PCILA 0x28
59445 +#define PCIL0_PMM2PCIHA 0x2c
59446 +#define PCIL0_PTM1MS 0x30
59447 +#define PCIL0_PTM1LA 0x34
59448 +#define PCIL0_PTM2MS 0x38
59449 +#define PCIL0_PTM2LA 0x3c
59452 + * 4xx PCIe bridge register definitions
59456 +#define DCRO_PEGPL_CFGBAH 0x00
59457 +#define DCRO_PEGPL_CFGBAL 0x01
59458 +#define DCRO_PEGPL_CFGMSK 0x02
59459 +#define DCRO_PEGPL_MSGBAH 0x03
59460 +#define DCRO_PEGPL_MSGBAL 0x04
59461 +#define DCRO_PEGPL_MSGMSK 0x05
59462 +#define DCRO_PEGPL_OMR1BAH 0x06
59463 +#define DCRO_PEGPL_OMR1BAL 0x07
59464 +#define DCRO_PEGPL_OMR1MSKH 0x08
59465 +#define DCRO_PEGPL_OMR1MSKL 0x09
59466 +#define DCRO_PEGPL_OMR2BAH 0x0a
59467 +#define DCRO_PEGPL_OMR2BAL 0x0b
59468 +#define DCRO_PEGPL_OMR2MSKH 0x0c
59469 +#define DCRO_PEGPL_OMR2MSKL 0x0d
59470 +#define DCRO_PEGPL_OMR3BAH 0x0e
59471 +#define DCRO_PEGPL_OMR3BAL 0x0f
59472 +#define DCRO_PEGPL_OMR3MSKH 0x10
59473 +#define DCRO_PEGPL_OMR3MSKL 0x11
59474 +#define DCRO_PEGPL_REGBAH 0x12
59475 +#define DCRO_PEGPL_REGBAL 0x13
59476 +#define DCRO_PEGPL_REGMSK 0x14
59477 +#define DCRO_PEGPL_SPECIAL 0x15
59478 +#define DCRO_PEGPL_CFG 0x16
59479 +#define DCRO_PEGPL_ESR 0x17
59480 +#define DCRO_PEGPL_EARH 0x18
59481 +#define DCRO_PEGPL_EARL 0x19
59482 +#define DCRO_PEGPL_EATR 0x1a
59485 +#define GPL_DMER_MASK_DISA 0x02000000
59488 + * System DCRs (SDRs)
59490 +#define PESDR0_PLLLCT1 0x03a0
59491 +#define PESDR0_PLLLCT2 0x03a1
59492 +#define PESDR0_PLLLCT3 0x03a2
59495 + * 440SPe additional DCRs
59497 +#define PESDR0_440SPE_UTLSET1 0x0300
59498 +#define PESDR0_440SPE_UTLSET2 0x0301
59499 +#define PESDR0_440SPE_DLPSET 0x0302
59500 +#define PESDR0_440SPE_LOOP 0x0303
59501 +#define PESDR0_440SPE_RCSSET 0x0304
59502 +#define PESDR0_440SPE_RCSSTS 0x0305
59503 +#define PESDR0_440SPE_HSSL0SET1 0x0306
59504 +#define PESDR0_440SPE_HSSL0SET2 0x0307
59505 +#define PESDR0_440SPE_HSSL0STS 0x0308
59506 +#define PESDR0_440SPE_HSSL1SET1 0x0309
59507 +#define PESDR0_440SPE_HSSL1SET2 0x030a
59508 +#define PESDR0_440SPE_HSSL1STS 0x030b
59509 +#define PESDR0_440SPE_HSSL2SET1 0x030c
59510 +#define PESDR0_440SPE_HSSL2SET2 0x030d
59511 +#define PESDR0_440SPE_HSSL2STS 0x030e
59512 +#define PESDR0_440SPE_HSSL3SET1 0x030f
59513 +#define PESDR0_440SPE_HSSL3SET2 0x0310
59514 +#define PESDR0_440SPE_HSSL3STS 0x0311
59515 +#define PESDR0_440SPE_HSSL4SET1 0x0312
59516 +#define PESDR0_440SPE_HSSL4SET2 0x0313
59517 +#define PESDR0_440SPE_HSSL4STS 0x0314
59518 +#define PESDR0_440SPE_HSSL5SET1 0x0315
59519 +#define PESDR0_440SPE_HSSL5SET2 0x0316
59520 +#define PESDR0_440SPE_HSSL5STS 0x0317
59521 +#define PESDR0_440SPE_HSSL6SET1 0x0318
59522 +#define PESDR0_440SPE_HSSL6SET2 0x0319
59523 +#define PESDR0_440SPE_HSSL6STS 0x031a
59524 +#define PESDR0_440SPE_HSSL7SET1 0x031b
59525 +#define PESDR0_440SPE_HSSL7SET2 0x031c
59526 +#define PESDR0_440SPE_HSSL7STS 0x031d
59527 +#define PESDR0_440SPE_HSSCTLSET 0x031e
59528 +#define PESDR0_440SPE_LANE_ABCD 0x031f
59529 +#define PESDR0_440SPE_LANE_EFGH 0x0320
59531 +#define PESDR1_440SPE_UTLSET1 0x0340
59532 +#define PESDR1_440SPE_UTLSET2 0x0341
59533 +#define PESDR1_440SPE_DLPSET 0x0342
59534 +#define PESDR1_440SPE_LOOP 0x0343
59535 +#define PESDR1_440SPE_RCSSET 0x0344
59536 +#define PESDR1_440SPE_RCSSTS 0x0345
59537 +#define PESDR1_440SPE_HSSL0SET1 0x0346
59538 +#define PESDR1_440SPE_HSSL0SET2 0x0347
59539 +#define PESDR1_440SPE_HSSL0STS 0x0348
59540 +#define PESDR1_440SPE_HSSL1SET1 0x0349
59541 +#define PESDR1_440SPE_HSSL1SET2 0x034a
59542 +#define PESDR1_440SPE_HSSL1STS 0x034b
59543 +#define PESDR1_440SPE_HSSL2SET1 0x034c
59544 +#define PESDR1_440SPE_HSSL2SET2 0x034d
59545 +#define PESDR1_440SPE_HSSL2STS 0x034e
59546 +#define PESDR1_440SPE_HSSL3SET1 0x034f
59547 +#define PESDR1_440SPE_HSSL3SET2 0x0350
59548 +#define PESDR1_440SPE_HSSL3STS 0x0351
59549 +#define PESDR1_440SPE_HSSCTLSET 0x0352
59550 +#define PESDR1_440SPE_LANE_ABCD 0x0353
59552 +#define PESDR2_440SPE_UTLSET1 0x0370
59553 +#define PESDR2_440SPE_UTLSET2 0x0371
59554 +#define PESDR2_440SPE_DLPSET 0x0372
59555 +#define PESDR2_440SPE_LOOP 0x0373
59556 +#define PESDR2_440SPE_RCSSET 0x0374
59557 +#define PESDR2_440SPE_RCSSTS 0x0375
59558 +#define PESDR2_440SPE_HSSL0SET1 0x0376
59559 +#define PESDR2_440SPE_HSSL0SET2 0x0377
59560 +#define PESDR2_440SPE_HSSL0STS 0x0378
59561 +#define PESDR2_440SPE_HSSL1SET1 0x0379
59562 +#define PESDR2_440SPE_HSSL1SET2 0x037a
59563 +#define PESDR2_440SPE_HSSL1STS 0x037b
59564 +#define PESDR2_440SPE_HSSL2SET1 0x037c
59565 +#define PESDR2_440SPE_HSSL2SET2 0x037d
59566 +#define PESDR2_440SPE_HSSL2STS 0x037e
59567 +#define PESDR2_440SPE_HSSL3SET1 0x037f
59568 +#define PESDR2_440SPE_HSSL3SET2 0x0380
59569 +#define PESDR2_440SPE_HSSL3STS 0x0381
59570 +#define PESDR2_440SPE_HSSCTLSET 0x0382
59571 +#define PESDR2_440SPE_LANE_ABCD 0x0383
59574 + * 405EX additional DCRs
59576 +#define PESDR0_405EX_UTLSET1 0x0400
59577 +#define PESDR0_405EX_UTLSET2 0x0401
59578 +#define PESDR0_405EX_DLPSET 0x0402
59579 +#define PESDR0_405EX_LOOP 0x0403
59580 +#define PESDR0_405EX_RCSSET 0x0404
59581 +#define PESDR0_405EX_RCSSTS 0x0405
59582 +#define PESDR0_405EX_PHYSET1 0x0406
59583 +#define PESDR0_405EX_PHYSET2 0x0407
59584 +#define PESDR0_405EX_BIST 0x0408
59585 +#define PESDR0_405EX_LPB 0x040B
59586 +#define PESDR0_405EX_PHYSTA 0x040C
59588 +#define PESDR1_405EX_UTLSET1 0x0440
59589 +#define PESDR1_405EX_UTLSET2 0x0441
59590 +#define PESDR1_405EX_DLPSET 0x0442
59591 +#define PESDR1_405EX_LOOP 0x0443
59592 +#define PESDR1_405EX_RCSSET 0x0444
59593 +#define PESDR1_405EX_RCSSTS 0x0445
59594 +#define PESDR1_405EX_PHYSET1 0x0446
59595 +#define PESDR1_405EX_PHYSET2 0x0447
59596 +#define PESDR1_405EX_BIST 0x0448
59597 +#define PESDR1_405EX_LPB 0x044B
59598 +#define PESDR1_405EX_PHYSTA 0x044C
59601 + * Of the above, some are common offsets from the base
59603 +#define PESDRn_UTLSET1 0x00
59604 +#define PESDRn_UTLSET2 0x01
59605 +#define PESDRn_DLPSET 0x02
59606 +#define PESDRn_LOOP 0x03
59607 +#define PESDRn_RCSSET 0x04
59608 +#define PESDRn_RCSSTS 0x05
59611 +#define PESDRn_440SPE_HSSL0SET1 0x06
59612 +#define PESDRn_440SPE_HSSL0SET2 0x07
59613 +#define PESDRn_440SPE_HSSL0STS 0x08
59614 +#define PESDRn_440SPE_HSSL1SET1 0x09
59615 +#define PESDRn_440SPE_HSSL1SET2 0x0a
59616 +#define PESDRn_440SPE_HSSL1STS 0x0b
59617 +#define PESDRn_440SPE_HSSL2SET1 0x0c
59618 +#define PESDRn_440SPE_HSSL2SET2 0x0d
59619 +#define PESDRn_440SPE_HSSL2STS 0x0e
59620 +#define PESDRn_440SPE_HSSL3SET1 0x0f
59621 +#define PESDRn_440SPE_HSSL3SET2 0x10
59622 +#define PESDRn_440SPE_HSSL3STS 0x11
59624 +/* 440spe port 0 only */
59625 +#define PESDRn_440SPE_HSSL4SET1 0x12
59626 +#define PESDRn_440SPE_HSSL4SET2 0x13
59627 +#define PESDRn_440SPE_HSSL4STS 0x14
59628 +#define PESDRn_440SPE_HSSL5SET1 0x15
59629 +#define PESDRn_440SPE_HSSL5SET2 0x16
59630 +#define PESDRn_440SPE_HSSL5STS 0x17
59631 +#define PESDRn_440SPE_HSSL6SET1 0x18
59632 +#define PESDRn_440SPE_HSSL6SET2 0x19
59633 +#define PESDRn_440SPE_HSSL6STS 0x1a
59634 +#define PESDRn_440SPE_HSSL7SET1 0x1b
59635 +#define PESDRn_440SPE_HSSL7SET2 0x1c
59636 +#define PESDRn_440SPE_HSSL7STS 0x1d
59639 +#define PESDRn_405EX_PHYSET1 0x06
59640 +#define PESDRn_405EX_PHYSET2 0x07
59641 +#define PESDRn_405EX_PHYSTA 0x0c
59644 + * UTL register offsets
59646 +#define PEUTL_PBCTL 0x00
59647 +#define PEUTL_PBBSZ 0x20
59648 +#define PEUTL_OPDBSZ 0x68
59649 +#define PEUTL_IPHBSZ 0x70
59650 +#define PEUTL_IPDBSZ 0x78
59651 +#define PEUTL_OUTTR 0x90
59652 +#define PEUTL_INTR 0x98
59653 +#define PEUTL_PCTL 0xa0
59654 +#define PEUTL_RCSTA 0xB0
59655 +#define PEUTL_RCIRQEN 0xb8
59658 + * Config space register offsets
59660 +#define PECFG_ECRTCTL 0x074
59662 +#define PECFG_BAR0LMPA 0x210
59663 +#define PECFG_BAR0HMPA 0x214
59664 +#define PECFG_BAR1MPA 0x218
59665 +#define PECFG_BAR2LMPA 0x220
59666 +#define PECFG_BAR2HMPA 0x224
59668 +#define PECFG_PIMEN 0x33c
59669 +#define PECFG_PIM0LAL 0x340
59670 +#define PECFG_PIM0LAH 0x344
59671 +#define PECFG_PIM1LAL 0x348
59672 +#define PECFG_PIM1LAH 0x34c
59673 +#define PECFG_PIM01SAL 0x350
59674 +#define PECFG_PIM01SAH 0x354
59676 +#define PECFG_POM0LAL 0x380
59677 +#define PECFG_POM0LAH 0x384
59678 +#define PECFG_POM1LAL 0x388
59679 +#define PECFG_POM1LAH 0x38c
59680 +#define PECFG_POM2LAL 0x390
59681 +#define PECFG_POM2LAH 0x394
59686 + PTYPE_ENDPOINT = 0x0,
59687 + PTYPE_LEGACY_ENDPOINT = 0x1,
59688 + PTYPE_ROOT_PORT = 0x4,
59696 +#endif /* __PPC4XX_PCI_H__ */
59697 --- a/arch/powerpc/sysdev/qe_lib/Kconfig
59698 +++ b/arch/powerpc/sysdev/qe_lib/Kconfig
59704 + default y if SERIAL_QE
59706 This option provides qe_lib support to UCC slow
59707 protocols: UART, BISYNC, QMC
59708 --- a/arch/powerpc/sysdev/qe_lib/qe.c
59709 +++ b/arch/powerpc/sysdev/qe_lib/qe.c
59711 #include <linux/module.h>
59712 #include <linux/delay.h>
59713 #include <linux/ioport.h>
59714 +#include <linux/crc32.h>
59715 #include <asm/irq.h>
59716 #include <asm/page.h>
59717 #include <asm/pgtable.h>
59718 @@ -167,19 +168,20 @@
59720 /* Program the BRG to the given sampling rate and multiplier
59722 - * @brg: the BRG, 1-16
59723 + * @brg: the BRG, QE_BRG1 - QE_BRG16
59724 * @rate: the desired sampling rate
59725 * @multiplier: corresponds to the value programmed in GUMR_L[RDCR] or
59726 * GUMR_L[TDCR]. E.g., if this BRG is the RX clock, and GUMR_L[RDCR]=01,
59727 * then 'multiplier' should be 8.
59729 - * Also note that the value programmed into the BRGC register must be even.
59731 -void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier)
59732 +int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier)
59734 u32 divisor, tempval;
59737 + if ((brg < QE_BRG1) || (brg > QE_BRG16))
59740 divisor = get_brg_clk() / (rate * multiplier);
59742 if (divisor > QE_BRGC_DIVISOR_MAX + 1) {
59743 @@ -196,8 +198,43 @@
59744 tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) |
59745 QE_BRGC_ENABLE | div16;
59747 - out_be32(&qe_immr->brg.brgc[brg - 1], tempval);
59748 + out_be32(&qe_immr->brg.brgc[brg - QE_BRG1], tempval);
59752 +EXPORT_SYMBOL(qe_setbrg);
59754 +/* Convert a string to a QE clock source enum
59756 + * This function takes a string, typically from a property in the device
59757 + * tree, and returns the corresponding "enum qe_clock" value.
59759 +enum qe_clock qe_clock_source(const char *source)
59763 + if (strcasecmp(source, "none") == 0)
59764 + return QE_CLK_NONE;
59766 + if (strncasecmp(source, "brg", 3) == 0) {
59767 + i = simple_strtoul(source + 3, NULL, 10);
59768 + if ((i >= 1) && (i <= 16))
59769 + return (QE_BRG1 - 1) + i;
59771 + return QE_CLK_DUMMY;
59774 + if (strncasecmp(source, "clk", 3) == 0) {
59775 + i = simple_strtoul(source + 3, NULL, 10);
59776 + if ((i >= 1) && (i <= 24))
59777 + return (QE_CLK1 - 1) + i;
59779 + return QE_CLK_DUMMY;
59782 + return QE_CLK_DUMMY;
59784 +EXPORT_SYMBOL(qe_clock_source);
59786 /* Initialize SNUMs (thread serial numbers) according to
59787 * QE Module Control chapter, SNUM table
59788 @@ -358,3 +395,249 @@
59789 return (void *)&qe_immr->muram[offset];
59791 EXPORT_SYMBOL(qe_muram_addr);
59793 +/* The maximum number of RISCs we support */
59794 +#define MAX_QE_RISC 2
59796 +/* Firmware information stored here for qe_get_firmware_info() */
59797 +static struct qe_firmware_info qe_firmware_info;
59800 + * Set to 1 if QE firmware has been uploaded, and therefore
59801 + * qe_firmware_info contains valid data.
59803 +static int qe_firmware_uploaded;
59806 + * Upload a QE microcode
59808 + * This function is a worker function for qe_upload_firmware(). It does
59809 + * the actual uploading of the microcode.
59811 +static void qe_upload_microcode(const void *base,
59812 + const struct qe_microcode *ucode)
59814 + const __be32 *code = base + be32_to_cpu(ucode->code_offset);
59817 + if (ucode->major || ucode->minor || ucode->revision)
59818 + printk(KERN_INFO "qe-firmware: "
59819 + "uploading microcode '%s' version %u.%u.%u\n",
59820 + ucode->id, ucode->major, ucode->minor, ucode->revision);
59822 + printk(KERN_INFO "qe-firmware: "
59823 + "uploading microcode '%s'\n", ucode->id);
59825 + /* Use auto-increment */
59826 + out_be32(&qe_immr->iram.iadd, be32_to_cpu(ucode->iram_offset) |
59827 + QE_IRAM_IADD_AIE | QE_IRAM_IADD_BADDR);
59829 + for (i = 0; i < be32_to_cpu(ucode->count); i++)
59830 + out_be32(&qe_immr->iram.idata, be32_to_cpu(code[i]));
59834 + * Upload a microcode to the I-RAM at a specific address.
59836 + * See Documentation/powerpc/qe-firmware.txt for information on QE microcode
59839 + * Currently, only version 1 is supported, so the 'version' field must be
59842 + * The SOC model and revision are not validated, they are only displayed for
59843 + * informational purposes.
59845 + * 'calc_size' is the calculated size, in bytes, of the firmware structure and
59846 + * all of the microcode structures, minus the CRC.
59848 + * 'length' is the size that the structure says it is, including the CRC.
59850 +int qe_upload_firmware(const struct qe_firmware *firmware)
59855 + size_t calc_size = sizeof(struct qe_firmware);
59857 + const struct qe_header *hdr;
59860 + printk(KERN_ERR "qe-firmware: invalid pointer\n");
59864 + hdr = &firmware->header;
59865 + length = be32_to_cpu(hdr->length);
59867 + /* Check the magic */
59868 + if ((hdr->magic[0] != 'Q') || (hdr->magic[1] != 'E') ||
59869 + (hdr->magic[2] != 'F')) {
59870 + printk(KERN_ERR "qe-firmware: not a microcode\n");
59874 + /* Check the version */
59875 + if (hdr->version != 1) {
59876 + printk(KERN_ERR "qe-firmware: unsupported version\n");
59880 + /* Validate some of the fields */
59881 + if ((firmware->count < 1) || (firmware->count >= MAX_QE_RISC)) {
59882 + printk(KERN_ERR "qe-firmware: invalid data\n");
59886 + /* Validate the length and check if there's a CRC */
59887 + calc_size += (firmware->count - 1) * sizeof(struct qe_microcode);
59889 + for (i = 0; i < firmware->count; i++)
59891 + * For situations where the second RISC uses the same microcode
59892 + * as the first, the 'code_offset' and 'count' fields will be
59893 + * zero, so it's okay to add those.
59895 + calc_size += sizeof(__be32) *
59896 + be32_to_cpu(firmware->microcode[i].count);
59898 + /* Validate the length */
59899 + if (length != calc_size + sizeof(__be32)) {
59900 + printk(KERN_ERR "qe-firmware: invalid length\n");
59904 + /* Validate the CRC */
59905 + crc = be32_to_cpu(*(__be32 *)((void *)firmware + calc_size));
59906 + if (crc != crc32(0, firmware, calc_size)) {
59907 + printk(KERN_ERR "qe-firmware: firmware CRC is invalid\n");
59912 + * If the microcode calls for it, split the I-RAM.
59914 + if (!firmware->split)
59915 + setbits16(&qe_immr->cp.cercr, QE_CP_CERCR_CIR);
59917 + if (firmware->soc.model)
59919 + "qe-firmware: firmware '%s' for %u V%u.%u\n",
59920 + firmware->id, be16_to_cpu(firmware->soc.model),
59921 + firmware->soc.major, firmware->soc.minor);
59923 + printk(KERN_INFO "qe-firmware: firmware '%s'\n",
59927 + * The QE only supports one microcode per RISC, so clear out all the
59928 + * saved microcode information and put in the new.
59930 + memset(&qe_firmware_info, 0, sizeof(qe_firmware_info));
59931 + strcpy(qe_firmware_info.id, firmware->id);
59932 + qe_firmware_info.extended_modes = firmware->extended_modes;
59933 + memcpy(qe_firmware_info.vtraps, firmware->vtraps,
59934 + sizeof(firmware->vtraps));
59936 + /* Loop through each microcode. */
59937 + for (i = 0; i < firmware->count; i++) {
59938 + const struct qe_microcode *ucode = &firmware->microcode[i];
59940 + /* Upload a microcode if it's present */
59941 + if (ucode->code_offset)
59942 + qe_upload_microcode(firmware, ucode);
59944 + /* Program the traps for this processor */
59945 + for (j = 0; j < 16; j++) {
59946 + u32 trap = be32_to_cpu(ucode->traps[j]);
59949 + out_be32(&qe_immr->rsp[i].tibcr[j], trap);
59952 + /* Enable traps */
59953 + out_be32(&qe_immr->rsp[i].eccr, be32_to_cpu(ucode->eccr));
59956 + qe_firmware_uploaded = 1;
59960 +EXPORT_SYMBOL(qe_upload_firmware);
59963 + * Get info on the currently-loaded firmware
59965 + * This function also checks the device tree to see if the boot loader has
59966 + * uploaded a firmware already.
59968 +struct qe_firmware_info *qe_get_firmware_info(void)
59970 + static int initialized;
59971 + struct property *prop;
59972 + struct device_node *qe;
59973 + struct device_node *fw = NULL;
59974 + const char *sprop;
59978 + * If we haven't checked yet, and a driver hasn't uploaded a firmware
59979 + * yet, then check the device tree for information.
59981 + if (initialized || qe_firmware_uploaded)
59987 + * Newer device trees have an "fsl,qe" compatible property for the QE
59988 + * node, but we still need to support older device trees.
59990 + qe = of_find_compatible_node(NULL, NULL, "fsl,qe");
59992 + qe = of_find_node_by_type(NULL, "qe");
59997 + /* Find the 'firmware' child node */
59998 + for_each_child_of_node(qe, fw) {
59999 + if (strcmp(fw->name, "firmware") == 0)
60005 + /* Did we find the 'firmware' node? */
60009 + qe_firmware_uploaded = 1;
60011 + /* Copy the data into qe_firmware_info*/
60012 + sprop = of_get_property(fw, "id", NULL);
60014 + strncpy(qe_firmware_info.id, sprop,
60015 + sizeof(qe_firmware_info.id) - 1);
60017 + prop = of_find_property(fw, "extended-modes", NULL);
60018 + if (prop && (prop->length == sizeof(u64))) {
60019 + const u64 *iprop = prop->value;
60021 + qe_firmware_info.extended_modes = *iprop;
60024 + prop = of_find_property(fw, "virtual-traps", NULL);
60025 + if (prop && (prop->length == 32)) {
60026 + const u32 *iprop = prop->value;
60028 + for (i = 0; i < ARRAY_SIZE(qe_firmware_info.vtraps); i++)
60029 + qe_firmware_info.vtraps[i] = iprop[i];
60034 + return &qe_firmware_info;
60036 +EXPORT_SYMBOL(qe_get_firmware_info);
60038 --- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c
60039 +++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
60041 #include <linux/stddef.h>
60042 #include <linux/interrupt.h>
60043 #include <linux/err.h>
60044 +#include <linux/module.h>
60046 #include <asm/io.h>
60047 #include <asm/immap_qe.h>
60049 default: return QE_CR_SUBBLOCK_INVALID;
60052 +EXPORT_SYMBOL(ucc_slow_get_qe_cr_subblock);
60054 void ucc_slow_poll_transmitter_now(struct ucc_slow_private * uccs)
60057 qe_issue_cmd(QE_GRACEFUL_STOP_TX, id,
60058 QE_CR_PROTOCOL_UNSPECIFIED, 0);
60060 +EXPORT_SYMBOL(ucc_slow_graceful_stop_tx);
60062 void ucc_slow_stop_tx(struct ucc_slow_private * uccs)
60065 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
60066 qe_issue_cmd(QE_STOP_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
60068 +EXPORT_SYMBOL(ucc_slow_stop_tx);
60070 void ucc_slow_restart_tx(struct ucc_slow_private * uccs)
60073 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
60074 qe_issue_cmd(QE_RESTART_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
60076 +EXPORT_SYMBOL(ucc_slow_restart_tx);
60078 void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode)
60082 out_be32(&us_regs->gumr_l, gumr_l);
60084 +EXPORT_SYMBOL(ucc_slow_enable);
60086 void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
60088 @@ -114,6 +120,7 @@
60090 out_be32(&us_regs->gumr_l, gumr_l);
60092 +EXPORT_SYMBOL(ucc_slow_disable);
60094 /* Initialize the UCC for Slow operations
60096 @@ -347,6 +354,7 @@
60100 +EXPORT_SYMBOL(ucc_slow_init);
60102 void ucc_slow_free(struct ucc_slow_private * uccs)
60104 @@ -366,5 +374,5 @@
60109 +EXPORT_SYMBOL(ucc_slow_free);
60111 --- a/arch/powerpc/sysdev/tsi108_dev.c
60112 +++ b/arch/powerpc/sysdev/tsi108_dev.c
60113 @@ -66,14 +66,12 @@
60114 static int __init tsi108_eth_of_init(void)
60116 struct device_node *np;
60118 + unsigned int i = 0;
60119 struct platform_device *tsi_eth_dev;
60120 struct resource res;
60123 - for (np = NULL, i = 0;
60124 - (np = of_find_compatible_node(np, "network", "tsi108-ethernet")) != NULL;
60126 + for_each_compatible_node(np, "network", "tsi108-ethernet") {
60127 struct resource r[2];
60128 struct device_node *phy, *mdio;
60129 hw_info tsi_eth_data;
60131 __FUNCTION__,r[1].name, r[1].start, r[1].end);
60134 - platform_device_register_simple("tsi-ethernet", i, &r[0],
60135 + platform_device_register_simple("tsi-ethernet", i++, &r[0],
60138 if (IS_ERR(tsi_eth_dev)) {
60139 @@ -154,6 +152,7 @@
60141 platform_device_unregister(tsi_eth_dev);
60147 --- a/arch/powerpc/sysdev/uic.c
60148 +++ b/arch/powerpc/sysdev/uic.c
60149 @@ -53,21 +53,23 @@
60151 /* The remapper for this UIC */
60152 struct irq_host *irqhost;
60154 - /* For secondary UICs, the cascade interrupt's irqaction */
60155 - struct irqaction cascade;
60158 static void uic_unmask_irq(unsigned int virq)
60160 + struct irq_desc *desc = get_irq_desc(virq);
60161 struct uic *uic = get_irq_chip_data(virq);
60162 unsigned int src = uic_irq_to_hw(virq);
60163 unsigned long flags;
60167 + sr = 1 << (31-src);
60168 spin_lock_irqsave(&uic->lock, flags);
60169 + /* ack level-triggered interrupts here */
60170 + if (desc->status & IRQ_LEVEL)
60171 + mtdcr(uic->dcrbase + UIC_SR, sr);
60172 er = mfdcr(uic->dcrbase + UIC_ER);
60173 - er |= 1 << (31 - src);
60175 mtdcr(uic->dcrbase + UIC_ER, er);
60176 spin_unlock_irqrestore(&uic->lock, flags);
60180 static void uic_mask_ack_irq(unsigned int virq)
60182 + struct irq_desc *desc = get_irq_desc(virq);
60183 struct uic *uic = get_irq_chip_data(virq);
60184 unsigned int src = uic_irq_to_hw(virq);
60185 unsigned long flags;
60186 @@ -109,7 +112,16 @@
60187 er = mfdcr(uic->dcrbase + UIC_ER);
60189 mtdcr(uic->dcrbase + UIC_ER, er);
60190 - mtdcr(uic->dcrbase + UIC_SR, sr);
60191 + /* On the UIC, acking (i.e. clearing the SR bit)
60192 + * a level irq will have no effect if the interrupt
60193 + * is still asserted by the device, even if
60194 + * the interrupt is already masked. Therefore
60195 + * we only ack the egde interrupts here, while
60196 + * level interrupts are ack'ed after the actual
60197 + * isr call in the uic_unmask_irq()
60199 + if (!(desc->status & IRQ_LEVEL))
60200 + mtdcr(uic->dcrbase + UIC_SR, sr);
60201 spin_unlock_irqrestore(&uic->lock, flags);
60204 @@ -173,64 +185,6 @@
60205 .set_type = uic_set_irq_type,
60209 - * handle_uic_irq - irq flow handler for UIC
60210 - * @irq: the interrupt number
60211 - * @desc: the interrupt description structure for this irq
60213 - * This is modified version of the generic handle_level_irq() suitable
60214 - * for the UIC. On the UIC, acking (i.e. clearing the SR bit) a level
60215 - * irq will have no effect if the interrupt is still asserted by the
60216 - * device, even if the interrupt is already masked. Therefore, unlike
60217 - * the standard handle_level_irq(), we must ack the interrupt *after*
60218 - * invoking the ISR (which should have de-asserted the interrupt in
60219 - * the external source). For edge interrupts we ack at the beginning
60220 - * instead of the end, to keep the window in which we can miss an
60221 - * interrupt as small as possible.
60223 -void fastcall handle_uic_irq(unsigned int irq, struct irq_desc *desc)
60225 - unsigned int cpu = smp_processor_id();
60226 - struct irqaction *action;
60227 - irqreturn_t action_ret;
60229 - spin_lock(&desc->lock);
60230 - if (desc->status & IRQ_LEVEL)
60231 - desc->chip->mask(irq);
60233 - desc->chip->mask_ack(irq);
60235 - if (unlikely(desc->status & IRQ_INPROGRESS))
60237 - desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
60238 - kstat_cpu(cpu).irqs[irq]++;
60241 - * If its disabled or no action available
60242 - * keep it masked and get out of here
60244 - action = desc->action;
60245 - if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
60246 - desc->status |= IRQ_PENDING;
60250 - desc->status |= IRQ_INPROGRESS;
60251 - desc->status &= ~IRQ_PENDING;
60252 - spin_unlock(&desc->lock);
60254 - action_ret = handle_IRQ_event(irq, action);
60256 - spin_lock(&desc->lock);
60257 - desc->status &= ~IRQ_INPROGRESS;
60258 - if (desc->status & IRQ_LEVEL)
60259 - desc->chip->ack(irq);
60260 - if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
60261 - desc->chip->unmask(irq);
60263 - spin_unlock(&desc->lock);
60266 static int uic_host_map(struct irq_host *h, unsigned int virq,
60267 irq_hw_number_t hw)
60269 @@ -239,7 +193,7 @@
60270 set_irq_chip_data(virq, uic);
60271 /* Despite the name, handle_level_irq() works for both level
60272 * and edge irqs on UIC. FIXME: check this is correct */
60273 - set_irq_chip_and_handler(virq, &uic_irq_chip, handle_uic_irq);
60274 + set_irq_chip_and_handler(virq, &uic_irq_chip, handle_level_irq);
60276 /* Set default irq type */
60277 set_irq_type(virq, IRQ_TYPE_NONE);
60278 @@ -264,23 +218,36 @@
60279 .xlate = uic_host_xlate,
60282 -irqreturn_t uic_cascade(int virq, void *data)
60283 +void uic_irq_cascade(unsigned int virq, struct irq_desc *desc)
60285 - struct uic *uic = data;
60286 + struct uic *uic = get_irq_data(virq);
60291 + spin_lock(&desc->lock);
60292 + if (desc->status & IRQ_LEVEL)
60293 + desc->chip->mask(virq);
60295 + desc->chip->mask_ack(virq);
60296 + spin_unlock(&desc->lock);
60298 msr = mfdcr(uic->dcrbase + UIC_MSR);
60299 if (!msr) /* spurious interrupt */
60300 - return IRQ_HANDLED;
60301 + goto uic_irq_ret;
60303 src = 32 - ffs(msr);
60305 subvirq = irq_linear_revmap(uic->irqhost, src);
60306 generic_handle_irq(subvirq);
60308 - return IRQ_HANDLED;
60310 + spin_lock(&desc->lock);
60311 + if (desc->status & IRQ_LEVEL)
60312 + desc->chip->ack(virq);
60313 + if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
60314 + desc->chip->unmask(virq);
60315 + spin_unlock(&desc->lock);
60318 static struct uic * __init uic_init_one(struct device_node *node)
60319 @@ -342,33 +309,27 @@
60320 const u32 *interrupts;
60322 /* First locate and initialize the top-level UIC */
60324 - np = of_find_compatible_node(NULL, NULL, "ibm,uic");
60326 + for_each_compatible_node(np, NULL, "ibm,uic") {
60327 interrupts = of_get_property(np, "interrupts", NULL);
60328 - if (! interrupts)
60332 - np = of_find_compatible_node(np, NULL, "ibm,uic");
60335 BUG_ON(!np); /* uic_init_tree() assumes there's a UIC as the
60336 * top-level interrupt controller */
60337 primary_uic = uic_init_one(np);
60338 - if (! primary_uic)
60339 + if (!primary_uic)
60340 panic("Unable to initialize primary UIC %s\n", np->full_name);
60342 irq_set_default_host(primary_uic->irqhost);
60345 /* The scan again for cascaded UICs */
60346 - np = of_find_compatible_node(NULL, NULL, "ibm,uic");
60348 + for_each_compatible_node(np, NULL, "ibm,uic") {
60349 interrupts = of_get_property(np, "interrupts", NULL);
60351 /* Secondary UIC */
60355 uic = uic_init_one(np);
60357 @@ -377,20 +338,11 @@
60359 cascade_virq = irq_of_parse_and_map(np, 0);
60361 - uic->cascade.handler = uic_cascade;
60362 - uic->cascade.name = "UIC cascade";
60363 - uic->cascade.dev_id = uic;
60365 - ret = setup_irq(cascade_virq, &uic->cascade);
60367 - printk(KERN_ERR "Failed to setup_irq(%d) for "
60368 - "UIC%d cascade\n", cascade_virq,
60370 + set_irq_data(cascade_virq, uic);
60371 + set_irq_chained_handler(cascade_virq, uic_irq_cascade);
60373 /* FIXME: setup critical cascade?? */
60376 - np = of_find_compatible_node(np, NULL, "ibm,uic");
60380 --- a/arch/powerpc/sysdev/xilinx_intc.c
60381 +++ b/arch/powerpc/sysdev/xilinx_intc.c
60382 @@ -135,10 +135,16 @@
60383 struct device_node *np;
60385 /* find top level interrupt controller */
60386 - for_each_compatible_node(np, NULL, "xilinx,intc") {
60387 + for_each_compatible_node(np, NULL, "xlnx,opb-intc-1.00.c") {
60388 if (!of_get_property(np, "interrupts", NULL))
60392 + for_each_compatible_node(np, NULL, "xlnx,xps-intc-1.00.a") {
60393 + if (!of_get_property(np, "interrupts", NULL))
60398 /* xilinx interrupt controller needs to be top level */
60400 --- a/arch/powerpc/xmon/setjmp.S
60401 +++ b/arch/powerpc/xmon/setjmp.S
60403 #include <asm/ppc_asm.h>
60404 #include <asm/asm-offsets.h>
60406 -_GLOBAL(xmon_setjmp)
60409 - PPC_STL r1,SZL(r3)
60410 - PPC_STL r2,2*SZL(r3)
60412 - PPC_STL r0,3*SZL(r3)
60413 - PPC_STL r13,4*SZL(r3)
60414 - PPC_STL r14,5*SZL(r3)
60415 - PPC_STL r15,6*SZL(r3)
60416 - PPC_STL r16,7*SZL(r3)
60417 - PPC_STL r17,8*SZL(r3)
60418 - PPC_STL r18,9*SZL(r3)
60419 - PPC_STL r19,10*SZL(r3)
60420 - PPC_STL r20,11*SZL(r3)
60421 - PPC_STL r21,12*SZL(r3)
60422 - PPC_STL r22,13*SZL(r3)
60423 - PPC_STL r23,14*SZL(r3)
60424 - PPC_STL r24,15*SZL(r3)
60425 - PPC_STL r25,16*SZL(r3)
60426 - PPC_STL r26,17*SZL(r3)
60427 - PPC_STL r27,18*SZL(r3)
60428 - PPC_STL r28,19*SZL(r3)
60429 - PPC_STL r29,20*SZL(r3)
60430 - PPC_STL r30,21*SZL(r3)
60431 - PPC_STL r31,22*SZL(r3)
60435 -_GLOBAL(xmon_longjmp)
60439 -1: PPC_LL r13,4*SZL(r3)
60440 - PPC_LL r14,5*SZL(r3)
60441 - PPC_LL r15,6*SZL(r3)
60442 - PPC_LL r16,7*SZL(r3)
60443 - PPC_LL r17,8*SZL(r3)
60444 - PPC_LL r18,9*SZL(r3)
60445 - PPC_LL r19,10*SZL(r3)
60446 - PPC_LL r20,11*SZL(r3)
60447 - PPC_LL r21,12*SZL(r3)
60448 - PPC_LL r22,13*SZL(r3)
60449 - PPC_LL r23,14*SZL(r3)
60450 - PPC_LL r24,15*SZL(r3)
60451 - PPC_LL r25,16*SZL(r3)
60452 - PPC_LL r26,17*SZL(r3)
60453 - PPC_LL r27,18*SZL(r3)
60454 - PPC_LL r28,19*SZL(r3)
60455 - PPC_LL r29,20*SZL(r3)
60456 - PPC_LL r30,21*SZL(r3)
60457 - PPC_LL r31,22*SZL(r3)
60458 - PPC_LL r0,3*SZL(r3)
60461 - PPC_LL r1,SZL(r3)
60462 - PPC_LL r2,2*SZL(r3)
60468 * Grab the register values as they are now.
60469 * This won't do a particularily good job because we really
60470 --- a/arch/powerpc/xmon/xmon.c
60471 +++ b/arch/powerpc/xmon/xmon.c
60473 #include <asm/spu.h>
60474 #include <asm/spu_priv1.h>
60475 #include <asm/firmware.h>
60476 +#include <asm/setjmp.h>
60478 #ifdef CONFIG_PPC64
60479 #include <asm/hvcall.h>
60482 static char tmpstr[128];
60484 -#define JMP_BUF_LEN 23
60485 static long bus_error_jmp[JMP_BUF_LEN];
60486 static int catch_memory_errors;
60487 static long *xmon_fault_jmp[NR_CPUS];
60488 -#define setjmp xmon_setjmp
60489 -#define longjmp xmon_longjmp
60491 /* Breakpoint stuff */
60493 @@ -153,13 +151,15 @@
60495 static int do_spu_cmd(void);
60498 +static void dump_tlb_44x(void);
60501 int xmon_no_auto_backtrace;
60503 extern void xmon_enter(void);
60504 extern void xmon_leave(void);
60506 -extern long setjmp(long *);
60507 -extern void longjmp(long *, long);
60508 extern void xmon_save_regs(struct pt_regs *);
60510 #ifdef CONFIG_PPC64
60511 @@ -231,6 +231,9 @@
60512 #ifdef CONFIG_PPC_STD_MMU_32
60513 " u dump segment registers\n"
60521 @@ -856,6 +859,11 @@
60531 printf("Unrecognized command: ");
60533 @@ -2527,16 +2535,33 @@
60534 static void dump_slb(void)
60537 - unsigned long tmp;
60538 + unsigned long esid,vsid,valid;
60539 + unsigned long llp;
60541 printf("SLB contents of cpu %x\n", smp_processor_id());
60543 - for (i = 0; i < SLB_NUM_ENTRIES; i++) {
60544 - asm volatile("slbmfee %0,%1" : "=r" (tmp) : "r" (i));
60545 - printf("%02d %016lx ", i, tmp);
60547 - asm volatile("slbmfev %0,%1" : "=r" (tmp) : "r" (i));
60548 - printf("%016lx\n", tmp);
60549 + for (i = 0; i < mmu_slb_size; i++) {
60550 + asm volatile("slbmfee %0,%1" : "=r" (esid) : "r" (i));
60551 + asm volatile("slbmfev %0,%1" : "=r" (vsid) : "r" (i));
60552 + valid = (esid & SLB_ESID_V);
60553 + if (valid | esid | vsid) {
60554 + printf("%02d %016lx %016lx", i, esid, vsid);
60556 + llp = vsid & SLB_VSID_LLP;
60557 + if (vsid & SLB_VSID_B_1T) {
60558 + printf(" 1T ESID=%9lx VSID=%13lx LLP:%3lx \n",
60559 + GET_ESID_1T(esid),
60560 + (vsid & ~SLB_VSID_B) >> SLB_VSID_SHIFT_1T,
60563 + printf(" 256M ESID=%9lx VSID=%13lx LLP:%3lx \n",
60565 + (vsid & ~SLB_VSID_B) >> SLB_VSID_SHIFT,
60574 @@ -2581,6 +2606,32 @@
60579 +static void dump_tlb_44x(void)
60583 + for (i = 0; i < PPC44x_TLB_SIZE; i++) {
60584 + unsigned long w0,w1,w2;
60585 + asm volatile("tlbre %0,%1,0" : "=r" (w0) : "r" (i));
60586 + asm volatile("tlbre %0,%1,1" : "=r" (w1) : "r" (i));
60587 + asm volatile("tlbre %0,%1,2" : "=r" (w2) : "r" (i));
60588 + printf("[%02x] %08x %08x %08x ", i, w0, w1, w2);
60589 + if (w0 & PPC44x_TLB_VALID) {
60590 + printf("V %08x -> %01x%08x %c%c%c%c%c",
60591 + w0 & PPC44x_TLB_EPN_MASK,
60592 + w1 & PPC44x_TLB_ERPN_MASK,
60593 + w1 & PPC44x_TLB_RPN_MASK,
60594 + (w2 & PPC44x_TLB_W) ? 'W' : 'w',
60595 + (w2 & PPC44x_TLB_I) ? 'I' : 'i',
60596 + (w2 & PPC44x_TLB_M) ? 'M' : 'm',
60597 + (w2 & PPC44x_TLB_G) ? 'G' : 'g',
60598 + (w2 & PPC44x_TLB_E) ? 'E' : 'e');
60603 +#endif /* CONFIG_44x */
60604 void xmon_init(int enable)
60606 #ifdef CONFIG_PPC_ISERIES
60607 --- a/arch/ppc/kernel/Makefile
60608 +++ b/arch/ppc/kernel/Makefile
60611 obj-$(CONFIG_MODULES) += ppc_ksyms.o
60612 obj-$(CONFIG_PCI) += pci.o
60613 -obj-$(CONFIG_RAPIDIO) += rio.o
60614 obj-$(CONFIG_KGDB) += ppc-stub.o
60615 obj-$(CONFIG_SMP) += smp.o smp-tbsync.o
60616 obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
60617 --- a/arch/ppc/kernel/head_44x.S
60618 +++ b/arch/ppc/kernel/head_44x.S
60619 @@ -195,7 +195,7 @@
60621 ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_I | PPC44x_TLB_G)
60623 - li r0,0 /* TLB slot 0 */
60624 + li r0,62 /* TLB slot 62 */
60626 tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */
60627 tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */
60628 --- a/arch/ppc/kernel/rio.c
60632 - * RapidIO PPC32 support
60634 - * Copyright 2005 MontaVista Software, Inc.
60635 - * Matt Porter <mporter@kernel.crashing.org>
60637 - * This program is free software; you can redistribute it and/or modify it
60638 - * under the terms of the GNU General Public License as published by the
60639 - * Free Software Foundation; either version 2 of the License, or (at your
60640 - * option) any later version.
60643 -#include <linux/init.h>
60644 -#include <linux/kernel.h>
60645 -#include <linux/rio.h>
60647 -#include <asm/rio.h>
60650 - * platform_rio_init - Do platform specific RIO init
60652 - * Any platform specific initialization of RapdIO
60653 - * hardware is done here as well as registration
60654 - * of any active master ports in the system.
60656 -void __attribute__ ((weak))
60657 - platform_rio_init(void)
60659 - printk(KERN_WARNING "RIO: No platform_rio_init() present\n");
60663 - * ppc_rio_init - Do PPC32 RIO init
60665 - * Calls platform-specific RIO init code and then calls
60666 - * rio_init_mports() to initialize any master ports that
60667 - * have been registered with the RIO subsystem.
60669 -static int __init ppc_rio_init(void)
60671 - printk(KERN_INFO "RIO: RapidIO init\n");
60673 - /* Platform specific initialization */
60674 - platform_rio_init();
60676 - /* Enumerate all registered ports */
60677 - rio_init_mports();
60682 -subsys_initcall(ppc_rio_init);
60683 --- a/arch/ppc/kernel/setup.c
60684 +++ b/arch/ppc/kernel/setup.c
60686 #include <asm/nvram.h>
60687 #include <asm/xmon.h>
60688 #include <asm/ocp.h>
60689 -#include <asm/prom.h>
60691 #define USES_PPC_SYS (defined(CONFIG_85xx) || defined(CONFIG_83xx) || \
60692 defined(CONFIG_MPC10X_BRIDGE) || defined(CONFIG_8260) || \
60693 --- a/arch/ppc/kernel/traps.c
60694 +++ b/arch/ppc/kernel/traps.c
60695 @@ -231,39 +231,25 @@
60699 -void machine_check_exception(struct pt_regs *regs)
60700 +#if defined(CONFIG_4xx)
60701 +int machine_check_4xx(struct pt_regs *regs)
60703 unsigned long reason = get_mc_reason(regs);
60705 - if (user_mode(regs)) {
60706 - regs->msr |= MSR_RI;
60707 - _exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
60711 -#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
60712 - /* the qspan pci read routines can cause machine checks -- Cort */
60713 - bad_page_fault(regs, regs->dar, SIGBUS);
60717 - if (debugger_fault_handler) {
60718 - debugger_fault_handler(regs);
60719 - regs->msr |= MSR_RI;
60723 - if (check_io_access(regs))
60726 -#if defined(CONFIG_4xx) && !defined(CONFIG_440A)
60727 if (reason & ESR_IMCP) {
60728 printk("Instruction");
60729 mtspr(SPRN_ESR, reason & ~ESR_IMCP);
60732 printk(" machine check in kernel mode.\n");
60733 -#elif defined(CONFIG_440A)
60738 +int machine_check_440A(struct pt_regs *regs)
60740 + unsigned long reason = get_mc_reason(regs);
60742 printk("Machine check in kernel mode.\n");
60743 if (reason & ESR_IMCP){
60744 printk("Instruction Synchronous Machine Check exception\n");
60745 @@ -293,7 +279,13 @@
60747 mtspr(SPRN_MCSR, mcsr);
60749 -#elif defined (CONFIG_E500)
60752 +#elif defined(CONFIG_E500)
60753 +int machine_check_e500(struct pt_regs *regs)
60755 + unsigned long reason = get_mc_reason(regs);
60757 printk("Machine check in kernel mode.\n");
60758 printk("Caused by (from MCSR=%lx): ", reason);
60760 @@ -305,8 +297,6 @@
60761 printk("Data Cache Push Parity Error\n");
60762 if (reason & MCSR_DCPERR)
60763 printk("Data Cache Parity Error\n");
60764 - if (reason & MCSR_GL_CI)
60765 - printk("Guarded Load or Cache-Inhibited stwcx.\n");
60766 if (reason & MCSR_BUS_IAERR)
60767 printk("Bus - Instruction Address Error\n");
60768 if (reason & MCSR_BUS_RAERR)
60769 @@ -318,12 +308,19 @@
60770 if (reason & MCSR_BUS_RBERR)
60771 printk("Bus - Read Data Bus Error\n");
60772 if (reason & MCSR_BUS_WBERR)
60773 - printk("Bus - Write Data Bus Error\n");
60774 + printk("Bus - Read Data Bus Error\n");
60775 if (reason & MCSR_BUS_IPERR)
60776 printk("Bus - Instruction Parity Error\n");
60777 if (reason & MCSR_BUS_RPERR)
60778 printk("Bus - Read Parity Error\n");
60779 -#elif defined (CONFIG_E200)
60783 +#elif defined(CONFIG_E200)
60784 +int machine_check_e200(struct pt_regs *regs)
60786 + unsigned long reason = get_mc_reason(regs);
60788 printk("Machine check in kernel mode.\n");
60789 printk("Caused by (from MCSR=%lx): ", reason);
60791 @@ -341,7 +338,14 @@
60792 printk("Bus - Read Bus Error on data load\n");
60793 if (reason & MCSR_BUS_WRERR)
60794 printk("Bus - Write Bus Error on buffered store or cache line push\n");
60795 -#else /* !CONFIG_4xx && !CONFIG_E500 && !CONFIG_E200 */
60800 +int machine_check_generic(struct pt_regs *regs)
60802 + unsigned long reason = get_mc_reason(regs);
60804 printk("Machine check in kernel mode.\n");
60805 printk("Caused by (from SRR1=%lx): ", reason);
60806 switch (reason & 0x601F0000) {
60807 @@ -371,7 +375,39 @@
60809 printk("Unknown values in msr\n");
60811 -#endif /* CONFIG_4xx */
60814 +#endif /* everything else */
60816 +void machine_check_exception(struct pt_regs *regs)
60820 + if (cur_cpu_spec->machine_check)
60821 + recover = cur_cpu_spec->machine_check(regs);
60825 + if (user_mode(regs)) {
60826 + regs->msr |= MSR_RI;
60827 + _exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
60831 +#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
60832 + /* the qspan pci read routines can cause machine checks -- Cort */
60833 + bad_page_fault(regs, regs->dar, SIGBUS);
60837 + if (debugger_fault_handler) {
60838 + debugger_fault_handler(regs);
60839 + regs->msr |= MSR_RI;
60843 + if (check_io_access(regs))
60847 * Optional platform-provided routine to print out
60848 --- a/arch/ppc/mm/44x_mmu.c
60849 +++ b/arch/ppc/mm/44x_mmu.c
60850 @@ -60,38 +60,28 @@
60851 * Just needed it declared someplace.
60853 unsigned int tlb_44x_index = 0;
60854 -unsigned int tlb_44x_hwater = 62;
60855 +unsigned int tlb_44x_hwater = PPC4XX_TLB_SIZE - 1 - PPC44x_EARLY_TLBS;
60856 int icache_44x_need_flush;
60859 * "Pins" a 256MB TLB entry in AS0 for kernel lowmem
60861 -static void __init
60862 -ppc44x_pin_tlb(int slot, unsigned int virt, unsigned int phys)
60863 +static void __init ppc44x_pin_tlb(unsigned int virt, unsigned int phys)
60865 - unsigned long attrib = 0;
60867 - __asm__ __volatile__("\
60868 - clrrwi %2,%2,10\n\
60870 - clrrwi %1,%1,10\n\
60873 - tlbwe %2,%3,%6\n\
60874 - tlbwe %1,%3,%7\n\
60876 + __asm__ __volatile__(
60877 + "tlbwe %2,%3,%4\n"
60878 + "tlbwe %1,%3,%5\n"
60879 + "tlbwe %0,%3,%6\n"
60881 - : "r" (attrib), "r" (phys), "r" (virt), "r" (slot),
60882 - "i" (PPC44x_TLB_VALID | PPC44x_TLB_256M),
60883 - "i" (PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G),
60884 + : "r" (PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G),
60886 + "r" (virt | PPC44x_TLB_VALID | PPC44x_TLB_256M),
60887 + "r" (tlb_44x_hwater--), /* slot for this TLB entry */
60888 "i" (PPC44x_TLB_PAGEID),
60889 "i" (PPC44x_TLB_XLAT),
60890 "i" (PPC44x_TLB_ATTRIB));
60894 - * MMU_init_hw does the chip-specific initialization of the MMU hardware.
60896 void __init MMU_init_hw(void)
60898 flush_instruction_cache();
60899 @@ -99,22 +89,13 @@
60901 unsigned long __init mmu_mapin_ram(void)
60903 - unsigned int pinned_tlbs = 1;
60906 - /* Determine number of entries necessary to cover lowmem */
60907 - pinned_tlbs = (unsigned int)
60908 - (_ALIGN(total_lowmem, PPC_PIN_SIZE) >> PPC44x_PIN_SHIFT);
60910 - /* Write upper watermark to save location */
60911 - tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs;
60912 + unsigned long addr;
60914 - /* If necessary, set additional pinned TLBs */
60915 - if (pinned_tlbs > 1)
60916 - for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) {
60917 - unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC_PIN_SIZE;
60918 - ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr);
60920 + /* Pin in enough TLBs to cover any lowmem not covered by the
60921 + * initial 256M mapping established in head_44x.S */
60922 + for (addr = PPC_PIN_SIZE; addr < total_lowmem;
60923 + addr += PPC_PIN_SIZE)
60924 + ppc44x_pin_tlb(addr + PAGE_OFFSET, addr);
60926 return total_lowmem;
60928 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c
60929 +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c
60932 #include <mm/mmu_decl.h>
60934 -#include <syslib/ppc85xx_rio.h>
60936 #include <platforms/85xx/mpc85xx_ads_common.h>
60939 @@ -190,6 +188,7 @@
60940 #endif /* CONFIG_PCI */
60942 #ifdef CONFIG_RAPIDIO
60943 +extern void mpc85xx_rio_setup(int law_start, int law_size);
60944 void platform_rio_init(void)
60946 /* 512MB RIO LAW at 0xc0000000 */
60947 --- a/arch/ppc/platforms/85xx/stx_gp3.c
60948 +++ b/arch/ppc/platforms/85xx/stx_gp3.c
60949 @@ -50,12 +50,10 @@
60950 #include <asm/irq.h>
60951 #include <asm/immap_85xx.h>
60952 #include <asm/cpm2.h>
60953 -#include <asm/mpc85xx.h>
60954 #include <asm/ppc_sys.h>
60956 #include <syslib/cpm2_pic.h>
60957 #include <syslib/ppc85xx_common.h>
60958 -#include <syslib/ppc85xx_rio.h>
60961 unsigned char __res[sizeof(bd_t)];
60962 @@ -271,6 +269,7 @@
60963 #endif /* CONFIG_PCI */
60965 #ifdef CONFIG_RAPIDIO
60966 +extern void mpc85xx_rio_setup(int law_start, int law_size);
60968 platform_rio_init(void)
60970 --- a/arch/ppc/platforms/85xx/tqm85xx.c
60971 +++ b/arch/ppc/platforms/85xx/tqm85xx.c
60973 #include <syslib/ppc85xx_setup.h>
60974 #include <syslib/cpm2_pic.h>
60975 #include <syslib/ppc85xx_common.h>
60976 -#include <syslib/ppc85xx_rio.h>
60979 unsigned long isa_io_base = 0;
60980 @@ -309,6 +308,7 @@
60981 #endif /* CONFIG_PCI */
60983 #ifdef CONFIG_RAPIDIO
60984 +extern void mpc85xx_rio_setup(int law_start, int law_size);
60985 void platform_rio_init(void)
60987 /* 512MB RIO LAW at 0xc0000000 */
60988 --- a/arch/ppc/platforms/ev64260.c
60989 +++ b/arch/ppc/platforms/ev64260.c
60990 @@ -336,7 +336,7 @@
60993 if (early_serial_setup(&port) != 0)
60994 - printk(KERN_WARNING "Early serial init of port 0"
60995 + printk(KERN_WARNING "Early serial init of port 0 "
60999 @@ -388,7 +388,7 @@
61000 ev64260_early_serial_map();
61003 - printk(KERN_INFO "%s %s port (C) 2001 MontaVista Software, Inc."
61004 + printk(KERN_INFO "%s %s port (C) 2001 MontaVista Software, Inc. "
61005 "(source@mvista.com)\n", BOARD_VENDOR, BOARD_MACHINE);
61007 if (ppc_md.progress)
61008 --- a/arch/ppc/platforms/prep_pci.c
61009 +++ b/arch/ppc/platforms/prep_pci.c
61010 @@ -1099,7 +1099,6 @@
61011 pci_write_config_byte(dev, 0x43, reg);
61014 - pci_dev_put(dev);
61017 if ((dev = pci_get_device(PCI_VENDOR_ID_WINBOND,
61018 --- a/arch/ppc/syslib/Makefile
61019 +++ b/arch/ppc/syslib/Makefile
61021 ifeq ($(CONFIG_85xx),y)
61022 obj-$(CONFIG_PCI) += pci_auto.o
61024 -obj-$(CONFIG_RAPIDIO) += ppc85xx_rio.o
61025 obj-$(CONFIG_83xx) += ppc83xx_setup.o ppc_sys.o \
61026 mpc83xx_sys.o mpc83xx_devices.o ipic.o
61027 ifeq ($(CONFIG_83xx),y)
61028 --- a/arch/ppc/syslib/gt64260_pic.c
61029 +++ b/arch/ppc/syslib/gt64260_pic.c
61031 #include <linux/interrupt.h>
61032 #include <linux/sched.h>
61033 #include <linux/signal.h>
61034 -#include <linux/stddef.h>
61035 #include <linux/delay.h>
61036 #include <linux/irq.h>
61038 --- a/arch/ppc/syslib/mpc52xx_pic.c
61039 +++ b/arch/ppc/syslib/mpc52xx_pic.c
61041 #include <linux/init.h>
61042 #include <linux/sched.h>
61043 #include <linux/signal.h>
61044 -#include <linux/stddef.h>
61045 #include <linux/delay.h>
61046 #include <linux/irq.h>
61048 --- a/arch/ppc/syslib/mv64360_pic.c
61049 +++ b/arch/ppc/syslib/mv64360_pic.c
61051 #include <linux/init.h>
61052 #include <linux/sched.h>
61053 #include <linux/signal.h>
61054 -#include <linux/stddef.h>
61055 #include <linux/delay.h>
61056 #include <linux/irq.h>
61057 #include <linux/interrupt.h>
61058 --- a/arch/ppc/syslib/ocp.c
61059 +++ b/arch/ppc/syslib/ocp.c
61060 @@ -376,7 +376,7 @@
61062 down_write(&ocp_devices_sem);
61063 dev = __ocp_find_device(vendor, function, index);
61064 - list_del((struct list_head *)dev);
61065 + list_del(&dev->link);
61066 up_write(&ocp_devices_sem);
61068 DBG(("ocp: ocp_remove_one_device(vendor: %x, function: %x, index: %d)... done.\n", vendor, function, index));
61069 --- a/arch/ppc/syslib/ppc83xx_setup.c
61070 +++ b/arch/ppc/syslib/ppc83xx_setup.c
61073 #include <syslib/ppc83xx_setup.h>
61074 #if defined(CONFIG_PCI)
61075 -#include <asm/delay.h>
61076 #include <syslib/ppc83xx_pci.h>
61079 --- a/arch/ppc/syslib/ppc85xx_rio.c
61083 - * MPC85xx RapidIO support
61085 - * Copyright 2005 MontaVista Software, Inc.
61086 - * Matt Porter <mporter@kernel.crashing.org>
61088 - * This program is free software; you can redistribute it and/or modify it
61089 - * under the terms of the GNU General Public License as published by the
61090 - * Free Software Foundation; either version 2 of the License, or (at your
61091 - * option) any later version.
61094 -#include <linux/init.h>
61095 -#include <linux/module.h>
61096 -#include <linux/types.h>
61097 -#include <linux/dma-mapping.h>
61098 -#include <linux/interrupt.h>
61099 -#include <linux/rio.h>
61100 -#include <linux/rio_drv.h>
61102 -#include <asm/io.h>
61104 -#define RIO_REGS_BASE (CCSRBAR + 0xc0000)
61105 -#define RIO_ATMU_REGS_OFFSET 0x10c00
61106 -#define RIO_MSG_REGS_OFFSET 0x11000
61107 -#define RIO_MAINT_WIN_SIZE 0x400000
61108 -#define RIO_DBELL_WIN_SIZE 0x1000
61110 -#define RIO_MSG_OMR_MUI 0x00000002
61111 -#define RIO_MSG_OSR_TE 0x00000080
61112 -#define RIO_MSG_OSR_QOI 0x00000020
61113 -#define RIO_MSG_OSR_QFI 0x00000010
61114 -#define RIO_MSG_OSR_MUB 0x00000004
61115 -#define RIO_MSG_OSR_EOMI 0x00000002
61116 -#define RIO_MSG_OSR_QEI 0x00000001
61118 -#define RIO_MSG_IMR_MI 0x00000002
61119 -#define RIO_MSG_ISR_TE 0x00000080
61120 -#define RIO_MSG_ISR_QFI 0x00000010
61121 -#define RIO_MSG_ISR_DIQI 0x00000001
61123 -#define RIO_MSG_DESC_SIZE 32
61124 -#define RIO_MSG_BUFFER_SIZE 4096
61125 -#define RIO_MIN_TX_RING_SIZE 2
61126 -#define RIO_MAX_TX_RING_SIZE 2048
61127 -#define RIO_MIN_RX_RING_SIZE 2
61128 -#define RIO_MAX_RX_RING_SIZE 2048
61130 -#define DOORBELL_DMR_DI 0x00000002
61131 -#define DOORBELL_DSR_TE 0x00000080
61132 -#define DOORBELL_DSR_QFI 0x00000010
61133 -#define DOORBELL_DSR_DIQI 0x00000001
61134 -#define DOORBELL_TID_OFFSET 0x03
61135 -#define DOORBELL_SID_OFFSET 0x05
61136 -#define DOORBELL_INFO_OFFSET 0x06
61138 -#define DOORBELL_MESSAGE_SIZE 0x08
61139 -#define DBELL_SID(x) (*(u8 *)(x + DOORBELL_SID_OFFSET))
61140 -#define DBELL_TID(x) (*(u8 *)(x + DOORBELL_TID_OFFSET))
61141 -#define DBELL_INF(x) (*(u16 *)(x + DOORBELL_INFO_OFFSET))
61143 -struct rio_atmu_regs {
61152 -struct rio_msg_regs {
61185 -struct rio_tx_desc {
61196 -static u32 regs_win;
61197 -static struct rio_atmu_regs *atmu_regs;
61198 -static struct rio_atmu_regs *maint_atmu_regs;
61199 -static struct rio_atmu_regs *dbell_atmu_regs;
61200 -static u32 dbell_win;
61201 -static u32 maint_win;
61202 -static struct rio_msg_regs *msg_regs;
61204 -static struct rio_dbell_ring {
61209 -static struct rio_msg_tx_ring {
61212 - void *virt_buffer[RIO_MAX_TX_RING_SIZE];
61213 - dma_addr_t phys_buffer[RIO_MAX_TX_RING_SIZE];
61219 -static struct rio_msg_rx_ring {
61222 - void *virt_buffer[RIO_MAX_RX_RING_SIZE];
61229 - * mpc85xx_rio_doorbell_send - Send a MPC85xx doorbell message
61230 - * @index: ID of RapidIO interface
61231 - * @destid: Destination ID of target device
61232 - * @data: 16-bit info field of RapidIO doorbell message
61234 - * Sends a MPC85xx doorbell message. Returns %0 on success or
61235 - * %-EINVAL on failure.
61237 -static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data)
61239 - pr_debug("mpc85xx_doorbell_send: index %d destid %4.4x data %4.4x\n",
61240 - index, destid, data);
61241 - out_be32((void *)&dbell_atmu_regs->rowtar, destid << 22);
61242 - out_be16((void *)(dbell_win), data);
61248 - * mpc85xx_local_config_read - Generate a MPC85xx local config space read
61249 - * @index: ID of RapdiIO interface
61250 - * @offset: Offset into configuration space
61251 - * @len: Length (in bytes) of the maintenance transaction
61252 - * @data: Value to be read into
61254 - * Generates a MPC85xx local configuration space read. Returns %0 on
61255 - * success or %-EINVAL on failure.
61257 -static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data)
61259 - pr_debug("mpc85xx_local_config_read: index %d offset %8.8x\n", index,
61261 - *data = in_be32((void *)(regs_win + offset));
61267 - * mpc85xx_local_config_write - Generate a MPC85xx local config space write
61268 - * @index: ID of RapdiIO interface
61269 - * @offset: Offset into configuration space
61270 - * @len: Length (in bytes) of the maintenance transaction
61271 - * @data: Value to be written
61273 - * Generates a MPC85xx local configuration space write. Returns %0 on
61274 - * success or %-EINVAL on failure.
61276 -static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data)
61279 - ("mpc85xx_local_config_write: index %d offset %8.8x data %8.8x\n",
61280 - index, offset, data);
61281 - out_be32((void *)(regs_win + offset), data);
61287 - * mpc85xx_rio_config_read - Generate a MPC85xx read maintenance transaction
61288 - * @index: ID of RapdiIO interface
61289 - * @destid: Destination ID of transaction
61290 - * @hopcount: Number of hops to target device
61291 - * @offset: Offset into configuration space
61292 - * @len: Length (in bytes) of the maintenance transaction
61293 - * @val: Location to be read into
61295 - * Generates a MPC85xx read maintenance transaction. Returns %0 on
61296 - * success or %-EINVAL on failure.
61299 -mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len,
61305 - ("mpc85xx_rio_config_read: index %d destid %d hopcount %d offset %8.8x len %d\n",
61306 - index, destid, hopcount, offset, len);
61307 - out_be32((void *)&maint_atmu_regs->rowtar,
61308 - (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9));
61310 - data = (u8 *) maint_win + offset;
61313 - *val = in_8((u8 *) data);
61316 - *val = in_be16((u16 *) data);
61319 - *val = in_be32((u32 *) data);
61327 - * mpc85xx_rio_config_write - Generate a MPC85xx write maintenance transaction
61328 - * @index: ID of RapdiIO interface
61329 - * @destid: Destination ID of transaction
61330 - * @hopcount: Number of hops to target device
61331 - * @offset: Offset into configuration space
61332 - * @len: Length (in bytes) of the maintenance transaction
61333 - * @val: Value to be written
61335 - * Generates an MPC85xx write maintenance transaction. Returns %0 on
61336 - * success or %-EINVAL on failure.
61339 -mpc85xx_rio_config_write(int index, u16 destid, u8 hopcount, u32 offset,
61340 - int len, u32 val)
61344 - ("mpc85xx_rio_config_write: index %d destid %d hopcount %d offset %8.8x len %d val %8.8x\n",
61345 - index, destid, hopcount, offset, len, val);
61346 - out_be32((void *)&maint_atmu_regs->rowtar,
61347 - (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9));
61349 - data = (u8 *) maint_win + offset;
61352 - out_8((u8 *) data, val);
61355 - out_be16((u16 *) data, val);
61358 - out_be32((u32 *) data, val);
61366 - * rio_hw_add_outb_message - Add message to the MPC85xx outbound message queue
61367 - * @mport: Master port with outbound message queue
61368 - * @rdev: Target of outbound message
61369 - * @mbox: Outbound mailbox
61370 - * @buffer: Message to add to outbound queue
61371 - * @len: Length of message
61373 - * Adds the @buffer message to the MPC85xx outbound message queue. Returns
61374 - * %0 on success or %-EINVAL on failure.
61377 -rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox,
61378 - void *buffer, size_t len)
61381 - struct rio_tx_desc *desc =
61382 - (struct rio_tx_desc *)msg_tx_ring.virt + msg_tx_ring.tx_slot;
61386 - ("RIO: rio_hw_add_outb_message(): destid %4.4x mbox %d buffer %8.8x len %8.8x\n",
61387 - rdev->destid, mbox, (int)buffer, len);
61389 - if ((len < 8) || (len > RIO_MAX_MSG_SIZE)) {
61394 - /* Copy and clear rest of buffer */
61395 - memcpy(msg_tx_ring.virt_buffer[msg_tx_ring.tx_slot], buffer, len);
61396 - if (len < (RIO_MAX_MSG_SIZE - 4))
61397 - memset((void *)((u32) msg_tx_ring.
61398 - virt_buffer[msg_tx_ring.tx_slot] + len), 0,
61399 - RIO_MAX_MSG_SIZE - len);
61401 - /* Set mbox field for message */
61402 - desc->dport = mbox & 0x3;
61404 - /* Enable EOMI interrupt, set priority, and set destid */
61405 - desc->dattr = 0x28000000 | (rdev->destid << 2);
61407 - /* Set transfer size aligned to next power of 2 (in double words) */
61408 - desc->dwcnt = is_power_of_2(len) ? len : 1 << get_bitmask_order(len);
61410 - /* Set snooping and source buffer address */
61411 - desc->saddr = 0x00000004 | msg_tx_ring.phys_buffer[msg_tx_ring.tx_slot];
61413 - /* Increment enqueue pointer */
61414 - omr = in_be32((void *)&msg_regs->omr);
61415 - out_be32((void *)&msg_regs->omr, omr | RIO_MSG_OMR_MUI);
61417 - /* Go to next descriptor */
61418 - if (++msg_tx_ring.tx_slot == msg_tx_ring.size)
61419 - msg_tx_ring.tx_slot = 0;
61425 -EXPORT_SYMBOL_GPL(rio_hw_add_outb_message);
61428 - * mpc85xx_rio_tx_handler - MPC85xx outbound message interrupt handler
61429 - * @irq: Linux interrupt number
61430 - * @dev_instance: Pointer to interrupt-specific data
61432 - * Handles outbound message interrupts. Executes a register outbound
61433 - * mailbox event handler and acks the interrupt occurrence.
61435 -static irqreturn_t
61436 -mpc85xx_rio_tx_handler(int irq, void *dev_instance)
61439 - struct rio_mport *port = (struct rio_mport *)dev_instance;
61441 - osr = in_be32((void *)&msg_regs->osr);
61443 - if (osr & RIO_MSG_OSR_TE) {
61444 - pr_info("RIO: outbound message transmission error\n");
61445 - out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_TE);
61449 - if (osr & RIO_MSG_OSR_QOI) {
61450 - pr_info("RIO: outbound message queue overflow\n");
61451 - out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_QOI);
61455 - if (osr & RIO_MSG_OSR_EOMI) {
61456 - u32 dqp = in_be32((void *)&msg_regs->odqdpar);
61457 - int slot = (dqp - msg_tx_ring.phys) >> 5;
61458 - port->outb_msg[0].mcback(port, msg_tx_ring.dev_id, -1, slot);
61460 - /* Ack the end-of-message interrupt */
61461 - out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_EOMI);
61465 - return IRQ_HANDLED;
61469 - * rio_open_outb_mbox - Initialize MPC85xx outbound mailbox
61470 - * @mport: Master port implementing the outbound message unit
61471 - * @dev_id: Device specific pointer to pass on event
61472 - * @mbox: Mailbox to open
61473 - * @entries: Number of entries in the outbound mailbox ring
61475 - * Initializes buffer ring, request the outbound message interrupt,
61476 - * and enables the outbound message unit. Returns %0 on success and
61477 - * %-EINVAL or %-ENOMEM on failure.
61479 -int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
61481 - int i, j, rc = 0;
61483 - if ((entries < RIO_MIN_TX_RING_SIZE) ||
61484 - (entries > RIO_MAX_TX_RING_SIZE) || (!is_power_of_2(entries))) {
61489 - /* Initialize shadow copy ring */
61490 - msg_tx_ring.dev_id = dev_id;
61491 - msg_tx_ring.size = entries;
61493 - for (i = 0; i < msg_tx_ring.size; i++) {
61495 - (msg_tx_ring.virt_buffer[i] =
61496 - dma_alloc_coherent(NULL, RIO_MSG_BUFFER_SIZE,
61497 - &msg_tx_ring.phys_buffer[i],
61500 - for (j = 0; j < msg_tx_ring.size; j++)
61501 - if (msg_tx_ring.virt_buffer[j])
61502 - dma_free_coherent(NULL,
61503 - RIO_MSG_BUFFER_SIZE,
61512 - /* Initialize outbound message descriptor ring */
61513 - if (!(msg_tx_ring.virt = dma_alloc_coherent(NULL,
61514 - msg_tx_ring.size *
61515 - RIO_MSG_DESC_SIZE,
61516 - &msg_tx_ring.phys,
61521 - memset(msg_tx_ring.virt, 0, msg_tx_ring.size * RIO_MSG_DESC_SIZE);
61522 - msg_tx_ring.tx_slot = 0;
61524 - /* Point dequeue/enqueue pointers at first entry in ring */
61525 - out_be32((void *)&msg_regs->odqdpar, msg_tx_ring.phys);
61526 - out_be32((void *)&msg_regs->odqepar, msg_tx_ring.phys);
61528 - /* Configure for snooping */
61529 - out_be32((void *)&msg_regs->osar, 0x00000004);
61531 - /* Clear interrupt status */
61532 - out_be32((void *)&msg_regs->osr, 0x000000b3);
61534 - /* Hook up outbound message handler */
61536 - request_irq(MPC85xx_IRQ_RIO_TX, mpc85xx_rio_tx_handler, 0,
61537 - "msg_tx", (void *)mport)) < 0)
61541 - * Configure outbound message unit
61543 - * Interrupts (all enabled, except QEIE)
61547 - out_be32((void *)&msg_regs->omr, 0x00100220);
61549 - /* Set number of entries */
61550 - out_be32((void *)&msg_regs->omr,
61551 - in_be32((void *)&msg_regs->omr) |
61552 - ((get_bitmask_order(entries) - 2) << 12));
61554 - /* Now enable the unit */
61555 - out_be32((void *)&msg_regs->omr, in_be32((void *)&msg_regs->omr) | 0x1);
61561 - dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
61562 - msg_tx_ring.virt, msg_tx_ring.phys);
61565 - for (i = 0; i < msg_tx_ring.size; i++)
61566 - dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE,
61567 - msg_tx_ring.virt_buffer[i],
61568 - msg_tx_ring.phys_buffer[i]);
61574 - * rio_close_outb_mbox - Shut down MPC85xx outbound mailbox
61575 - * @mport: Master port implementing the outbound message unit
61576 - * @mbox: Mailbox to close
61578 - * Disables the outbound message unit, free all buffers, and
61579 - * frees the outbound message interrupt.
61581 -void rio_close_outb_mbox(struct rio_mport *mport, int mbox)
61583 - /* Disable inbound message unit */
61584 - out_be32((void *)&msg_regs->omr, 0);
61587 - dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
61588 - msg_tx_ring.virt, msg_tx_ring.phys);
61590 - /* Free interrupt */
61591 - free_irq(MPC85xx_IRQ_RIO_TX, (void *)mport);
61595 - * mpc85xx_rio_rx_handler - MPC85xx inbound message interrupt handler
61596 - * @irq: Linux interrupt number
61597 - * @dev_instance: Pointer to interrupt-specific data
61599 - * Handles inbound message interrupts. Executes a registered inbound
61600 - * mailbox event handler and acks the interrupt occurrence.
61602 -static irqreturn_t
61603 -mpc85xx_rio_rx_handler(int irq, void *dev_instance)
61606 - struct rio_mport *port = (struct rio_mport *)dev_instance;
61608 - isr = in_be32((void *)&msg_regs->isr);
61610 - if (isr & RIO_MSG_ISR_TE) {
61611 - pr_info("RIO: inbound message reception error\n");
61612 - out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_TE);
61616 - /* XXX Need to check/dispatch until queue empty */
61617 - if (isr & RIO_MSG_ISR_DIQI) {
61619 - * We implement *only* mailbox 0, but can receive messages
61620 - * for any mailbox/letter to that mailbox destination. So,
61621 - * make the callback with an unknown/invalid mailbox number
61624 - port->inb_msg[0].mcback(port, msg_rx_ring.dev_id, -1, -1);
61626 - /* Ack the queueing interrupt */
61627 - out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_DIQI);
61631 - return IRQ_HANDLED;
61635 - * rio_open_inb_mbox - Initialize MPC85xx inbound mailbox
61636 - * @mport: Master port implementing the inbound message unit
61637 - * @dev_id: Device specific pointer to pass on event
61638 - * @mbox: Mailbox to open
61639 - * @entries: Number of entries in the inbound mailbox ring
61641 - * Initializes buffer ring, request the inbound message interrupt,
61642 - * and enables the inbound message unit. Returns %0 on success
61643 - * and %-EINVAL or %-ENOMEM on failure.
61645 -int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
61649 - if ((entries < RIO_MIN_RX_RING_SIZE) ||
61650 - (entries > RIO_MAX_RX_RING_SIZE) || (!is_power_of_2(entries))) {
61655 - /* Initialize client buffer ring */
61656 - msg_rx_ring.dev_id = dev_id;
61657 - msg_rx_ring.size = entries;
61658 - msg_rx_ring.rx_slot = 0;
61659 - for (i = 0; i < msg_rx_ring.size; i++)
61660 - msg_rx_ring.virt_buffer[i] = NULL;
61662 - /* Initialize inbound message ring */
61663 - if (!(msg_rx_ring.virt = dma_alloc_coherent(NULL,
61664 - msg_rx_ring.size *
61665 - RIO_MAX_MSG_SIZE,
61666 - &msg_rx_ring.phys,
61672 - /* Point dequeue/enqueue pointers at first entry in ring */
61673 - out_be32((void *)&msg_regs->ifqdpar, (u32) msg_rx_ring.phys);
61674 - out_be32((void *)&msg_regs->ifqepar, (u32) msg_rx_ring.phys);
61676 - /* Clear interrupt status */
61677 - out_be32((void *)&msg_regs->isr, 0x00000091);
61679 - /* Hook up inbound message handler */
61681 - request_irq(MPC85xx_IRQ_RIO_RX, mpc85xx_rio_rx_handler, 0,
61682 - "msg_rx", (void *)mport)) < 0) {
61683 - dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE,
61684 - msg_tx_ring.virt_buffer[i],
61685 - msg_tx_ring.phys_buffer[i]);
61690 - * Configure inbound message unit:
61692 - * 4KB max message size
61693 - * Unmask all interrupt sources
61696 - out_be32((void *)&msg_regs->imr, 0x001b0060);
61698 - /* Set number of queue entries */
61699 - out_be32((void *)&msg_regs->imr,
61700 - in_be32((void *)&msg_regs->imr) |
61701 - ((get_bitmask_order(entries) - 2) << 12));
61703 - /* Now enable the unit */
61704 - out_be32((void *)&msg_regs->imr, in_be32((void *)&msg_regs->imr) | 0x1);
61711 - * rio_close_inb_mbox - Shut down MPC85xx inbound mailbox
61712 - * @mport: Master port implementing the inbound message unit
61713 - * @mbox: Mailbox to close
61715 - * Disables the inbound message unit, free all buffers, and
61716 - * frees the inbound message interrupt.
61718 -void rio_close_inb_mbox(struct rio_mport *mport, int mbox)
61720 - /* Disable inbound message unit */
61721 - out_be32((void *)&msg_regs->imr, 0);
61724 - dma_free_coherent(NULL, msg_rx_ring.size * RIO_MAX_MSG_SIZE,
61725 - msg_rx_ring.virt, msg_rx_ring.phys);
61727 - /* Free interrupt */
61728 - free_irq(MPC85xx_IRQ_RIO_RX, (void *)mport);
61732 - * rio_hw_add_inb_buffer - Add buffer to the MPC85xx inbound message queue
61733 - * @mport: Master port implementing the inbound message unit
61734 - * @mbox: Inbound mailbox number
61735 - * @buf: Buffer to add to inbound queue
61737 - * Adds the @buf buffer to the MPC85xx inbound message queue. Returns
61738 - * %0 on success or %-EINVAL on failure.
61740 -int rio_hw_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf)
61744 - pr_debug("RIO: rio_hw_add_inb_buffer(), msg_rx_ring.rx_slot %d\n",
61745 - msg_rx_ring.rx_slot);
61747 - if (msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot]) {
61749 - "RIO: error adding inbound buffer %d, buffer exists\n",
61750 - msg_rx_ring.rx_slot);
61755 - msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot] = buf;
61756 - if (++msg_rx_ring.rx_slot == msg_rx_ring.size)
61757 - msg_rx_ring.rx_slot = 0;
61763 -EXPORT_SYMBOL_GPL(rio_hw_add_inb_buffer);
61766 - * rio_hw_get_inb_message - Fetch inbound message from the MPC85xx message unit
61767 - * @mport: Master port implementing the inbound message unit
61768 - * @mbox: Inbound mailbox number
61770 - * Gets the next available inbound message from the inbound message queue.
61771 - * A pointer to the message is returned on success or NULL on failure.
61773 -void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox)
61776 - u32 phys_buf, virt_buf;
61777 - void *buf = NULL;
61780 - phys_buf = in_be32((void *)&msg_regs->ifqdpar);
61782 - /* If no more messages, then bail out */
61783 - if (phys_buf == in_be32((void *)&msg_regs->ifqepar))
61786 - virt_buf = (u32) msg_rx_ring.virt + (phys_buf - msg_rx_ring.phys);
61787 - buf_idx = (phys_buf - msg_rx_ring.phys) / RIO_MAX_MSG_SIZE;
61788 - buf = msg_rx_ring.virt_buffer[buf_idx];
61792 - "RIO: inbound message copy failed, no buffers\n");
61796 - /* Copy max message size, caller is expected to allocate that big */
61797 - memcpy(buf, (void *)virt_buf, RIO_MAX_MSG_SIZE);
61799 - /* Clear the available buffer */
61800 - msg_rx_ring.virt_buffer[buf_idx] = NULL;
61803 - imr = in_be32((void *)&msg_regs->imr);
61804 - out_be32((void *)&msg_regs->imr, imr | RIO_MSG_IMR_MI);
61810 -EXPORT_SYMBOL_GPL(rio_hw_get_inb_message);
61813 - * mpc85xx_rio_dbell_handler - MPC85xx doorbell interrupt handler
61814 - * @irq: Linux interrupt number
61815 - * @dev_instance: Pointer to interrupt-specific data
61817 - * Handles doorbell interrupts. Parses a list of registered
61818 - * doorbell event handlers and executes a matching event handler.
61820 -static irqreturn_t
61821 -mpc85xx_rio_dbell_handler(int irq, void *dev_instance)
61824 - struct rio_mport *port = (struct rio_mport *)dev_instance;
61826 - dsr = in_be32((void *)&msg_regs->dsr);
61828 - if (dsr & DOORBELL_DSR_TE) {
61829 - pr_info("RIO: doorbell reception error\n");
61830 - out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_TE);
61834 - if (dsr & DOORBELL_DSR_QFI) {
61835 - pr_info("RIO: doorbell queue full\n");
61836 - out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_QFI);
61840 - /* XXX Need to check/dispatch until queue empty */
61841 - if (dsr & DOORBELL_DSR_DIQI) {
61843 - (u32) dbell_ring.virt +
61844 - (in_be32((void *)&msg_regs->dqdpar) & 0xfff);
61846 - struct rio_dbell *dbell;
61850 - ("RIO: processing doorbell, sid %2.2x tid %2.2x info %4.4x\n",
61851 - DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
61853 - list_for_each_entry(dbell, &port->dbells, node) {
61854 - if ((dbell->res->start <= DBELL_INF(dmsg)) &&
61855 - (dbell->res->end >= DBELL_INF(dmsg))) {
61861 - dbell->dinb(port, dbell->dev_id, DBELL_SID(dmsg), DBELL_TID(dmsg),
61862 - DBELL_INF(dmsg));
61865 - ("RIO: spurious doorbell, sid %2.2x tid %2.2x info %4.4x\n",
61866 - DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
61868 - dmr = in_be32((void *)&msg_regs->dmr);
61869 - out_be32((void *)&msg_regs->dmr, dmr | DOORBELL_DMR_DI);
61870 - out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_DIQI);
61874 - return IRQ_HANDLED;
61878 - * mpc85xx_rio_doorbell_init - MPC85xx doorbell interface init
61879 - * @mport: Master port implementing the inbound doorbell unit
61881 - * Initializes doorbell unit hardware and inbound DMA buffer
61882 - * ring. Called from mpc85xx_rio_setup(). Returns %0 on success
61883 - * or %-ENOMEM on failure.
61885 -static int mpc85xx_rio_doorbell_init(struct rio_mport *mport)
61889 - /* Map outbound doorbell window immediately after maintenance window */
61890 - if (!(dbell_win =
61891 - (u32) ioremap(mport->iores.start + RIO_MAINT_WIN_SIZE,
61892 - RIO_DBELL_WIN_SIZE))) {
61894 - "RIO: unable to map outbound doorbell window\n");
61899 - /* Initialize inbound doorbells */
61900 - if (!(dbell_ring.virt = dma_alloc_coherent(NULL,
61901 - 512 * DOORBELL_MESSAGE_SIZE,
61902 - &dbell_ring.phys,
61904 - printk(KERN_ERR "RIO: unable allocate inbound doorbell ring\n");
61906 - iounmap((void *)dbell_win);
61910 - /* Point dequeue/enqueue pointers at first entry in ring */
61911 - out_be32((void *)&msg_regs->dqdpar, (u32) dbell_ring.phys);
61912 - out_be32((void *)&msg_regs->dqepar, (u32) dbell_ring.phys);
61914 - /* Clear interrupt status */
61915 - out_be32((void *)&msg_regs->dsr, 0x00000091);
61917 - /* Hook up doorbell handler */
61919 - request_irq(MPC85xx_IRQ_RIO_BELL, mpc85xx_rio_dbell_handler, 0,
61920 - "dbell_rx", (void *)mport) < 0)) {
61921 - iounmap((void *)dbell_win);
61922 - dma_free_coherent(NULL, 512 * DOORBELL_MESSAGE_SIZE,
61923 - dbell_ring.virt, dbell_ring.phys);
61925 - "MPC85xx RIO: unable to request inbound doorbell irq");
61929 - /* Configure doorbells for snooping, 512 entries, and enable */
61930 - out_be32((void *)&msg_regs->dmr, 0x00108161);
61936 -static char *cmdline = NULL;
61938 -static int mpc85xx_rio_get_hdid(int index)
61940 - /* XXX Need to parse multiple entries in some format */
61944 - return simple_strtol(cmdline, NULL, 0);
61947 -static int mpc85xx_rio_get_cmdline(char *s)
61956 -__setup("riohdid=", mpc85xx_rio_get_cmdline);
61959 - * mpc85xx_rio_setup - Setup MPC85xx RapidIO interface
61960 - * @law_start: Starting physical address of RapidIO LAW
61961 - * @law_size: Size of RapidIO LAW
61963 - * Initializes MPC85xx RapidIO hardware interface, configures
61964 - * master port with system-specific info, and registers the
61965 - * master port with the RapidIO subsystem.
61967 -void mpc85xx_rio_setup(int law_start, int law_size)
61969 - struct rio_ops *ops;
61970 - struct rio_mport *port;
61972 - ops = kmalloc(sizeof(struct rio_ops), GFP_KERNEL);
61973 - ops->lcread = mpc85xx_local_config_read;
61974 - ops->lcwrite = mpc85xx_local_config_write;
61975 - ops->cread = mpc85xx_rio_config_read;
61976 - ops->cwrite = mpc85xx_rio_config_write;
61977 - ops->dsend = mpc85xx_rio_doorbell_send;
61979 - port = kmalloc(sizeof(struct rio_mport), GFP_KERNEL);
61982 - INIT_LIST_HEAD(&port->dbells);
61983 - port->iores.start = law_start;
61984 - port->iores.end = law_start + law_size;
61985 - port->iores.flags = IORESOURCE_MEM;
61987 - rio_init_dbell_res(&port->riores[RIO_DOORBELL_RESOURCE], 0, 0xffff);
61988 - rio_init_mbox_res(&port->riores[RIO_INB_MBOX_RESOURCE], 0, 0);
61989 - rio_init_mbox_res(&port->riores[RIO_OUTB_MBOX_RESOURCE], 0, 0);
61990 - strcpy(port->name, "RIO0 mport");
61993 - port->host_deviceid = mpc85xx_rio_get_hdid(port->id);
61995 - rio_register_mport(port);
61997 - regs_win = (u32) ioremap(RIO_REGS_BASE, 0x20000);
61998 - atmu_regs = (struct rio_atmu_regs *)(regs_win + RIO_ATMU_REGS_OFFSET);
61999 - maint_atmu_regs = atmu_regs + 1;
62000 - dbell_atmu_regs = atmu_regs + 2;
62001 - msg_regs = (struct rio_msg_regs *)(regs_win + RIO_MSG_REGS_OFFSET);
62003 - /* Configure maintenance transaction window */
62004 - out_be32((void *)&maint_atmu_regs->rowbar, 0x000c0000);
62005 - out_be32((void *)&maint_atmu_regs->rowar, 0x80077015);
62007 - maint_win = (u32) ioremap(law_start, RIO_MAINT_WIN_SIZE);
62009 - /* Configure outbound doorbell window */
62010 - out_be32((void *)&dbell_atmu_regs->rowbar, 0x000c0400);
62011 - out_be32((void *)&dbell_atmu_regs->rowar, 0x8004200b);
62012 - mpc85xx_rio_doorbell_init(port);
62014 --- a/arch/ppc/syslib/ppc85xx_rio.h
62018 - * MPC85xx RapidIO definitions
62020 - * Copyright 2005 MontaVista Software, Inc.
62021 - * Matt Porter <mporter@kernel.crashing.org>
62023 - * This program is free software; you can redistribute it and/or modify it
62024 - * under the terms of the GNU General Public License as published by the
62025 - * Free Software Foundation; either version 2 of the License, or (at your
62026 - * option) any later version.
62029 -#ifndef __PPC_SYSLIB_PPC85XX_RIO_H
62030 -#define __PPC_SYSLIB_PPC85XX_RIO_H
62032 -#include <linux/init.h>
62034 -extern void mpc85xx_rio_setup(int law_start, int law_size);
62036 -#endif /* __PPC_SYSLIB_PPC85XX_RIO_H */
62037 --- a/arch/ppc/syslib/ppc8xx_pic.c
62038 +++ b/arch/ppc/syslib/ppc8xx_pic.c
62040 * the only interrupt controller. Some boards, like the MBX and
62041 * Sandpoint have the 8259 as a secondary controller. Depending
62042 * upon the processor type, the internal controller can have as
62043 - * few as 16 interrups or as many as 64. We could use the
62044 + * few as 16 interrupts or as many as 64. We could use the
62045 * "clear_bit()" and "set_bit()" functions like other platforms,
62046 * but they are overkill for us.
62048 --- a/arch/ppc/syslib/ppc_sys.c
62049 +++ b/arch/ppc/syslib/ppc_sys.c
62050 @@ -185,7 +185,7 @@
62054 - Here we'll replace .name pointers with fixed-lenght strings
62055 + Here we'll replace .name pointers with fixed-length strings
62056 Hereby, this should be called *before* any func stuff triggeded.
62058 void ppc_sys_device_initfunc(void)
62059 --- a/arch/ppc/xmon/start.c
62060 +++ b/arch/ppc/xmon/start.c
62062 #include <linux/sysrq.h>
62063 #include <linux/bitops.h>
62064 #include <asm/xmon.h>
62065 -#include <asm/machdep.h>
62066 #include <asm/errno.h>
62067 #include <asm/processor.h>
62068 #include <asm/delay.h>
62069 --- a/drivers/ata/Kconfig
62070 +++ b/drivers/ata/Kconfig
62071 @@ -607,13 +607,23 @@
62073 config PATA_PLATFORM
62074 tristate "Generic platform device PATA support"
62075 - depends on EMBEDDED || ARCH_RPC
62076 + depends on EMBEDDED || ARCH_RPC || PPC
62078 This option enables support for generic directly connected ATA
62079 devices commonly found on embedded systems.
62083 +config PATA_OF_PLATFORM
62084 + tristate "OpenFirmware platform device PATA support"
62085 + depends on PATA_PLATFORM && PPC_OF
62087 + This option enables support for generic directly connected ATA
62088 + devices commonly found on embedded systems with OpenFirmware
62091 + If unsure, say N.
62094 tristate "Acorn ICS PATA support"
62095 depends on ARM && ARCH_ACORN
62096 --- a/drivers/ata/Makefile
62097 +++ b/drivers/ata/Makefile
62099 obj-$(CONFIG_PATA_SCC) += pata_scc.o
62100 obj-$(CONFIG_PATA_BF54X) += pata_bf54x.o
62101 obj-$(CONFIG_PATA_PLATFORM) += pata_platform.o
62102 +obj-$(CONFIG_PATA_OF_PLATFORM) += pata_of_platform.o
62103 obj-$(CONFIG_PATA_ICSIDE) += pata_icside.o
62104 # Should be last but two libata driver
62105 obj-$(CONFIG_PATA_ACPI) += pata_acpi.o
62107 +++ b/drivers/ata/pata_of_platform.c
62110 + * OF-platform PATA driver
62112 + * Copyright (c) 2007 MontaVista Software, Inc.
62113 + * Anton Vorontsov <avorontsov@ru.mvista.com>
62115 + * This program is free software; you can redistribute it and/or modify
62116 + * it under the terms of the GNU General Public License (Version 2) as
62117 + * published by the Free Software Foundation.
62120 +#include <linux/kernel.h>
62121 +#include <linux/module.h>
62122 +#include <linux/of_platform.h>
62123 +#include <linux/pata_platform.h>
62125 +static int __devinit pata_of_platform_probe(struct of_device *ofdev,
62126 + const struct of_device_id *match)
62129 + struct device_node *dn = ofdev->node;
62130 + struct resource io_res;
62131 + struct resource ctl_res;
62132 + struct resource irq_res;
62133 + unsigned int reg_shift = 0;
62134 + int pio_mode = 0;
62138 + ret = of_address_to_resource(dn, 0, &io_res);
62140 + dev_err(&ofdev->dev, "can't get IO address from "
62141 + "device tree\n");
62145 + if (of_device_is_compatible(dn, "electra-ide")) {
62146 + /* Altstatus is really at offset 0x3f6 from the primary window
62147 + * on electra-ide. Adjust ctl_res and io_res accordingly.
62149 + ctl_res = io_res;
62150 + ctl_res.start = ctl_res.start+0x3f6;
62151 + io_res.end = ctl_res.start-1;
62153 + ret = of_address_to_resource(dn, 1, &ctl_res);
62155 + dev_err(&ofdev->dev, "can't get CTL address from "
62156 + "device tree\n");
62161 + ret = of_irq_to_resource(dn, 0, &irq_res);
62162 + if (ret == NO_IRQ)
62163 + irq_res.start = irq_res.end = -1;
62165 + irq_res.flags = 0;
62167 + prop = of_get_property(dn, "reg-shift", NULL);
62169 + reg_shift = *prop;
62171 + prop = of_get_property(dn, "pio-mode", NULL);
62173 + pio_mode = *prop;
62174 + if (pio_mode > 6) {
62175 + dev_err(&ofdev->dev, "invalid pio-mode\n");
62179 + dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
62182 + pio_mask = 1 << pio_mode;
62183 + pio_mask |= (1 << pio_mode) - 1;
62185 + return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, &irq_res,
62186 + reg_shift, pio_mask);
62189 +static int __devexit pata_of_platform_remove(struct of_device *ofdev)
62191 + return __pata_platform_remove(&ofdev->dev);
62194 +static struct of_device_id pata_of_platform_match[] = {
62195 + { .compatible = "ata-generic", },
62196 + { .compatible = "electra-ide", },
62199 +MODULE_DEVICE_TABLE(of, pata_of_platform_match);
62201 +static struct of_platform_driver pata_of_platform_driver = {
62202 + .name = "pata_of_platform",
62203 + .match_table = pata_of_platform_match,
62204 + .probe = pata_of_platform_probe,
62205 + .remove = __devexit_p(pata_of_platform_remove),
62208 +static int __init pata_of_platform_init(void)
62210 + return of_register_platform_driver(&pata_of_platform_driver);
62212 +module_init(pata_of_platform_init);
62214 +static void __exit pata_of_platform_exit(void)
62216 + of_unregister_platform_driver(&pata_of_platform_driver);
62218 +module_exit(pata_of_platform_exit);
62220 +MODULE_DESCRIPTION("OF-platform PATA driver");
62221 +MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
62222 +MODULE_LICENSE("GPL");
62223 --- a/drivers/ata/pata_platform.c
62224 +++ b/drivers/ata/pata_platform.c
62228 static void pata_platform_setup_port(struct ata_ioports *ioaddr,
62229 - struct pata_platform_info *info)
62230 + unsigned int shift)
62232 - unsigned int shift = 0;
62234 /* Fixup the port shift for platforms that need it */
62235 - if (info && info->ioport_shift)
62236 - shift = info->ioport_shift;
62238 ioaddr->data_addr = ioaddr->cmd_addr + (ATA_REG_DATA << shift);
62239 ioaddr->error_addr = ioaddr->cmd_addr + (ATA_REG_ERR << shift);
62240 ioaddr->feature_addr = ioaddr->cmd_addr + (ATA_REG_FEATURE << shift);
62241 @@ -114,8 +109,13 @@
62245 - * pata_platform_probe - attach a platform interface
62246 - * @pdev: platform device
62247 + * __pata_platform_probe - attach a platform interface
62249 + * @io_res: Resource representing I/O base
62250 + * @ctl_res: Resource representing CTL base
62251 + * @irq_res: Resource representing IRQ and its flags
62252 + * @ioport_shift: I/O port shift
62253 + * @__pio_mask: PIO mask
62255 * Register a platform bus IDE interface. Such interfaces are PIO and we
62256 * assume do not support IRQ sharing.
62257 @@ -135,42 +135,18 @@
62259 * If no IRQ resource is present, PIO polling mode is used instead.
62261 -static int __devinit pata_platform_probe(struct platform_device *pdev)
62262 +int __devinit __pata_platform_probe(struct device *dev,
62263 + struct resource *io_res,
62264 + struct resource *ctl_res,
62265 + struct resource *irq_res,
62266 + unsigned int ioport_shift,
62269 - struct resource *io_res, *ctl_res;
62270 struct ata_host *host;
62271 struct ata_port *ap;
62272 - struct pata_platform_info *pp_info;
62277 - * Simple resource validation ..
62279 - if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
62280 - dev_err(&pdev->dev, "invalid number of resources\n");
62285 - * Get the I/O base first
62287 - io_res = platform_get_resource(pdev, IORESOURCE_IO, 0);
62288 - if (io_res == NULL) {
62289 - io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
62290 - if (unlikely(io_res == NULL))
62295 - * Then the CTL base
62297 - ctl_res = platform_get_resource(pdev, IORESOURCE_IO, 1);
62298 - if (ctl_res == NULL) {
62299 - ctl_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
62300 - if (unlikely(ctl_res == NULL))
62304 + int irq_flags = 0;
62308 @@ -181,20 +157,21 @@
62312 - irq = platform_get_irq(pdev, 0);
62314 - irq = 0; /* no irq */
62315 + if (irq_res && irq_res->start > 0) {
62316 + irq = irq_res->start;
62317 + irq_flags = irq_res->flags;
62321 * Now that that's out of the way, wire up the port..
62323 - host = ata_host_alloc(&pdev->dev, 1);
62324 + host = ata_host_alloc(dev, 1);
62327 ap = host->ports[0];
62329 ap->ops = &pata_platform_port_ops;
62330 - ap->pio_mask = pio_mask;
62331 + ap->pio_mask = __pio_mask;
62332 ap->flags |= ATA_FLAG_SLAVE_POSS;
62335 @@ -209,25 +186,24 @@
62336 * Handle the MMIO case
62339 - ap->ioaddr.cmd_addr = devm_ioremap(&pdev->dev, io_res->start,
62340 + ap->ioaddr.cmd_addr = devm_ioremap(dev, io_res->start,
62341 io_res->end - io_res->start + 1);
62342 - ap->ioaddr.ctl_addr = devm_ioremap(&pdev->dev, ctl_res->start,
62343 + ap->ioaddr.ctl_addr = devm_ioremap(dev, ctl_res->start,
62344 ctl_res->end - ctl_res->start + 1);
62346 - ap->ioaddr.cmd_addr = devm_ioport_map(&pdev->dev, io_res->start,
62347 + ap->ioaddr.cmd_addr = devm_ioport_map(dev, io_res->start,
62348 io_res->end - io_res->start + 1);
62349 - ap->ioaddr.ctl_addr = devm_ioport_map(&pdev->dev, ctl_res->start,
62350 + ap->ioaddr.ctl_addr = devm_ioport_map(dev, ctl_res->start,
62351 ctl_res->end - ctl_res->start + 1);
62353 if (!ap->ioaddr.cmd_addr || !ap->ioaddr.ctl_addr) {
62354 - dev_err(&pdev->dev, "failed to map IO/CTL base\n");
62355 + dev_err(dev, "failed to map IO/CTL base\n");
62359 ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
62361 - pp_info = pdev->dev.platform_data;
62362 - pata_platform_setup_port(&ap->ioaddr, pp_info);
62363 + pata_platform_setup_port(&ap->ioaddr, ioport_shift);
62365 ata_port_desc(ap, "%s cmd 0x%llx ctl 0x%llx", mmio ? "mmio" : "ioport",
62366 (unsigned long long)io_res->start,
62367 @@ -235,26 +211,78 @@
62370 return ata_host_activate(host, irq, irq ? ata_interrupt : NULL,
62371 - pp_info ? pp_info->irq_flags : 0,
62372 - &pata_platform_sht);
62373 + irq_flags, &pata_platform_sht);
62375 +EXPORT_SYMBOL_GPL(__pata_platform_probe);
62378 - * pata_platform_remove - unplug a platform interface
62379 - * @pdev: platform device
62380 + * __pata_platform_remove - unplug a platform interface
62383 * A platform bus ATA device has been unplugged. Perform the needed
62384 * cleanup. Also called on module unload for any active devices.
62386 -static int __devexit pata_platform_remove(struct platform_device *pdev)
62387 +int __devexit __pata_platform_remove(struct device *dev)
62389 - struct device *dev = &pdev->dev;
62390 struct ata_host *host = dev_get_drvdata(dev);
62392 ata_host_detach(host);
62396 +EXPORT_SYMBOL_GPL(__pata_platform_remove);
62398 +static int __devinit pata_platform_probe(struct platform_device *pdev)
62400 + struct resource *io_res;
62401 + struct resource *ctl_res;
62402 + struct resource *irq_res;
62403 + struct pata_platform_info *pp_info = pdev->dev.platform_data;
62406 + * Simple resource validation ..
62408 + if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
62409 + dev_err(&pdev->dev, "invalid number of resources\n");
62414 + * Get the I/O base first
62416 + io_res = platform_get_resource(pdev, IORESOURCE_IO, 0);
62417 + if (io_res == NULL) {
62418 + io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
62419 + if (unlikely(io_res == NULL))
62424 + * Then the CTL base
62426 + ctl_res = platform_get_resource(pdev, IORESOURCE_IO, 1);
62427 + if (ctl_res == NULL) {
62428 + ctl_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
62429 + if (unlikely(ctl_res == NULL))
62436 + irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
62438 + irq_res->flags = pp_info ? pp_info->irq_flags : 0;
62440 + return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res,
62441 + pp_info ? pp_info->ioport_shift : 0,
62445 +static int __devexit pata_platform_remove(struct platform_device *pdev)
62447 + return __pata_platform_remove(&pdev->dev);
62450 static struct platform_driver pata_platform_driver = {
62451 .probe = pata_platform_probe,
62452 --- a/drivers/char/hw_random/Kconfig
62453 +++ b/drivers/char/hw_random/Kconfig
62457 This driver provides kernel-side support for the Random Number
62458 - Generator hardware found on PA6T-1682M processor.
62459 + Generator hardware found on PA Semi PWRficient SoCs.
62461 To compile this driver as a module, choose M here: the
62462 module will be called pasemi-rng.
62463 --- a/drivers/char/hw_random/pasemi-rng.c
62464 +++ b/drivers/char/hw_random/pasemi-rng.c
62465 @@ -126,10 +126,9 @@
62468 static struct of_device_id rng_match[] = {
62470 - .compatible = "1682m-rng",
62473 + { .compatible = "1682m-rng", },
62474 + { .compatible = "pasemi,pwrficient-rng", },
62478 static struct of_platform_driver rng_driver = {
62479 --- a/drivers/edac/pasemi_edac.c
62480 +++ b/drivers/edac/pasemi_edac.c
62481 @@ -225,7 +225,7 @@
62483 mci->mod_name = MODULE_NAME;
62484 mci->dev_name = pci_name(pdev);
62485 - mci->ctl_name = "pasemi,1682m-mc";
62486 + mci->ctl_name = "pasemi,pwrficient-mc";
62487 mci->edac_check = pasemi_edac_check;
62488 mci->ctl_page_to_phys = NULL;
62489 pci_read_config_dword(pdev, MCCFG_SCRUB, &scrub);
62490 @@ -297,4 +297,4 @@
62492 MODULE_LICENSE("GPL");
62493 MODULE_AUTHOR("Egor Martovetsky <egor@pasemi.com>");
62494 -MODULE_DESCRIPTION("MC support for PA Semi PA6T-1682M memory controller");
62495 +MODULE_DESCRIPTION("MC support for PA Semi PWRficient memory controller");
62496 --- a/drivers/macintosh/adb.c
62497 +++ b/drivers/macintosh/adb.c
62499 #include <linux/spinlock.h>
62500 #include <linux/completion.h>
62501 #include <linux/device.h>
62502 +#include <linux/kthread.h>
62504 #include <asm/uaccess.h>
62505 #include <asm/semaphore.h>
62506 @@ -82,21 +83,11 @@
62507 BLOCKING_NOTIFIER_HEAD(adb_client_list);
62508 static int adb_got_sleep;
62509 static int adb_inited;
62510 -static pid_t adb_probe_task_pid;
62511 static DECLARE_MUTEX(adb_probe_mutex);
62512 -static struct completion adb_probe_task_comp;
62513 static int sleepy_trackpad;
62514 static int autopoll_devs;
62515 int __adb_probe_sync;
62517 -#ifdef CONFIG_PM_SLEEP
62518 -static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when);
62519 -static struct pmu_sleep_notifier adb_sleep_notifier = {
62520 - adb_notify_sleep,
62525 static int adb_scan_bus(void);
62526 static int do_adb_reset_bus(void);
62527 static void adbdev_init(void);
62528 @@ -134,16 +125,6 @@
62533 -static __inline__ void adb_wait_ms(unsigned int ms)
62535 - if (current->pid && adb_probe_task_pid &&
62536 - adb_probe_task_pid == current->pid)
62542 static int adb_scan_bus(void)
62544 int i, highFree=0, noMovement;
62545 @@ -248,13 +229,10 @@
62547 adb_probe_task(void *x)
62549 - strcpy(current->comm, "kadbprobe");
62551 printk(KERN_INFO "adb: starting probe task...\n");
62552 do_adb_reset_bus();
62553 printk(KERN_INFO "adb: finished probe task...\n");
62555 - adb_probe_task_pid = 0;
62556 up(&adb_probe_mutex);
62559 @@ -263,7 +241,7 @@
62561 __adb_probe_task(struct work_struct *bullshit)
62563 - adb_probe_task_pid = kernel_thread(adb_probe_task, NULL, SIGCHLD | CLONE_KERNEL);
62564 + kthread_run(adb_probe_task, NULL, "kadbprobe");
62567 static DECLARE_WORK(adb_reset_work, __adb_probe_task);
62568 @@ -281,6 +259,36 @@
62574 + * notify clients before sleep
62576 +static int adb_suspend(struct platform_device *dev, pm_message_t state)
62578 + adb_got_sleep = 1;
62579 + /* We need to get a lock on the probe thread */
62580 + down(&adb_probe_mutex);
62581 + /* Stop autopoll */
62582 + if (adb_controller->autopoll)
62583 + adb_controller->autopoll(0);
62584 + blocking_notifier_call_chain(&adb_client_list, ADB_MSG_POWERDOWN, NULL);
62590 + * reset bus after sleep
62592 +static int adb_resume(struct platform_device *dev)
62594 + adb_got_sleep = 0;
62595 + up(&adb_probe_mutex);
62600 +#endif /* CONFIG_PM */
62602 int __init adb_init(void)
62604 struct adb_driver *driver;
62605 @@ -313,15 +321,12 @@
62606 printk(KERN_WARNING "Warning: no ADB interface detected\n");
62607 adb_controller = NULL;
62609 -#ifdef CONFIG_PM_SLEEP
62610 - pmu_register_sleep_notifier(&adb_sleep_notifier);
62611 -#endif /* CONFIG_PM */
62613 if (machine_is_compatible("AAPL,PowerBook1998") ||
62614 machine_is_compatible("PowerBook1,1"))
62615 sleepy_trackpad = 1;
62616 #endif /* CONFIG_PPC */
62617 - init_completion(&adb_probe_task_comp);
62622 @@ -330,33 +335,6 @@
62624 __initcall(adb_init);
62628 - * notify clients before sleep and reset bus afterwards
62631 -adb_notify_sleep(struct pmu_sleep_notifier *self, int when)
62634 - case PBOOK_SLEEP_REQUEST:
62635 - adb_got_sleep = 1;
62636 - /* We need to get a lock on the probe thread */
62637 - down(&adb_probe_mutex);
62638 - /* Stop autopoll */
62639 - if (adb_controller->autopoll)
62640 - adb_controller->autopoll(0);
62641 - blocking_notifier_call_chain(&adb_client_list,
62642 - ADB_MSG_POWERDOWN, NULL);
62645 - adb_got_sleep = 0;
62646 - up(&adb_probe_mutex);
62651 -#endif /* CONFIG_PM */
62654 do_adb_reset_bus(void)
62656 @@ -373,7 +351,7 @@
62658 if (sleepy_trackpad) {
62659 /* Let the trackpad settle down */
62660 - adb_wait_ms(500);
62664 down(&adb_handler_sem);
62665 @@ -389,7 +367,7 @@
62667 if (sleepy_trackpad) {
62668 /* Let the trackpad settle down */
62669 - adb_wait_ms(1500);
62674 @@ -413,41 +391,27 @@
62675 adb_controller->poll();
62679 -adb_probe_wakeup(struct adb_request *req)
62680 +static void adb_sync_req_done(struct adb_request *req)
62682 - complete(&adb_probe_task_comp);
62684 + struct completion *comp = req->arg;
62686 -/* Static request used during probe */
62687 -static struct adb_request adb_sreq;
62688 -static unsigned long adb_sreq_lock; // Use semaphore ! */
62693 adb_request(struct adb_request *req, void (*done)(struct adb_request *),
62694 int flags, int nbytes, ...)
62700 + struct completion comp;
62702 if ((adb_controller == NULL) || (adb_controller->send_request == NULL))
62706 - if (req == NULL && (flags & ADBREQ_NOSEND))
62709 - if (req == NULL) {
62710 - if (test_and_set_bit(0,&adb_sreq_lock)) {
62711 - printk("adb.c: Warning: contention on static request !\n");
62715 - flags |= ADBREQ_SYNC;
62720 req->nbytes = nbytes+1;
62722 req->reply_expected = flags & ADBREQ_REPLY;
62723 @@ -460,25 +424,18 @@
62724 if (flags & ADBREQ_NOSEND)
62727 - /* Synchronous requests send from the probe thread cause it to
62728 - * block. Beware that the "done" callback will be overriden !
62730 - if ((flags & ADBREQ_SYNC) &&
62731 - (current->pid && adb_probe_task_pid &&
62732 - adb_probe_task_pid == current->pid)) {
62733 - req->done = adb_probe_wakeup;
62734 - rc = adb_controller->send_request(req, 0);
62735 - if (rc || req->complete)
62737 - wait_for_completion(&adb_probe_task_comp);
62742 - rc = adb_controller->send_request(req, flags & ADBREQ_SYNC);
62745 - clear_bit(0, &adb_sreq_lock);
62746 + /* Synchronous requests block using an on-stack completion */
62747 + if (flags & ADBREQ_SYNC) {
62749 + req->done = adb_sync_req_done;
62750 + req->arg = ∁
62751 + init_completion(&comp);
62754 + rc = adb_controller->send_request(req, 0);
62756 + if ((flags & ADBREQ_SYNC) && !rc && !req->complete)
62757 + wait_for_completion(&comp);
62761 @@ -864,7 +821,29 @@
62762 .release = adb_release,
62766 +static struct platform_driver adb_pfdrv = {
62771 + .suspend = adb_suspend,
62772 + .resume = adb_resume,
62776 +static struct platform_device adb_pfdev = {
62781 +adb_dummy_probe(struct platform_device *dev)
62783 + if (dev == &adb_pfdev)
62788 +static void __init
62791 if (register_chrdev(ADB_MAJOR, "adb", &adb_fops)) {
62792 @@ -876,4 +855,7 @@
62793 if (IS_ERR(adb_dev_class))
62795 class_device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb");
62797 + platform_device_register(&adb_pfdev);
62798 + platform_driver_probe(&adb_pfdrv, adb_dummy_probe);
62800 --- a/drivers/macintosh/mediabay.c
62801 +++ b/drivers/macintosh/mediabay.c
62803 #include <linux/stddef.h>
62804 #include <linux/init.h>
62805 #include <linux/ide.h>
62806 +#include <linux/kthread.h>
62807 #include <asm/prom.h>
62808 #include <asm/pgtable.h>
62809 #include <asm/io.h>
62814 -#define MB_IGNORE_SIGNALS
62817 #define MBDBG(fmt, arg...) printk(KERN_INFO fmt , ## arg)
62818 @@ -622,12 +622,7 @@
62822 - strcpy(current->comm, "media-bay");
62823 -#ifdef MB_IGNORE_SIGNALS
62824 - sigfillset(¤t->blocked);
62828 + while (!kthread_should_stop()) {
62829 for (i = 0; i < media_bay_count; ++i) {
62830 down(&media_bays[i].lock);
62831 if (!media_bays[i].sleeping)
62832 @@ -636,9 +631,8 @@
62835 msleep_interruptible(MB_POLL_DELAY);
62836 - if (signal_pending(current))
62842 static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_device_id *match)
62843 @@ -699,7 +693,7 @@
62845 /* Startup kernel thread */
62847 - kernel_thread(media_bay_task, NULL, CLONE_KERNEL);
62848 + kthread_run(media_bay_task, NULL, "media-bay");
62852 --- a/drivers/macintosh/therm_adt746x.c
62853 +++ b/drivers/macintosh/therm_adt746x.c
62854 @@ -553,6 +553,7 @@
62855 struct device_node* np;
62857 int i = 0, offset = 0;
62860 np = of_find_node_by_name(NULL, "fan");
62862 @@ -612,17 +613,20 @@
62866 - device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature);
62867 - device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature);
62868 - device_create_file(&of_dev->dev, &dev_attr_sensor1_limit);
62869 - device_create_file(&of_dev->dev, &dev_attr_sensor2_limit);
62870 - device_create_file(&of_dev->dev, &dev_attr_sensor1_location);
62871 - device_create_file(&of_dev->dev, &dev_attr_sensor2_location);
62872 - device_create_file(&of_dev->dev, &dev_attr_limit_adjust);
62873 - device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed);
62874 - device_create_file(&of_dev->dev, &dev_attr_sensor1_fan_speed);
62875 + err = device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature);
62876 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature);
62877 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_limit);
62878 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_limit);
62879 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_location);
62880 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_location);
62881 + err |= device_create_file(&of_dev->dev, &dev_attr_limit_adjust);
62882 + err |= device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed);
62883 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_fan_speed);
62884 if(therm_type == ADT7460)
62885 - device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed);
62886 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed);
62888 + printk(KERN_WARNING
62889 + "Failed to create tempertaure attribute file(s).\n");
62891 #ifndef CONFIG_I2C_POWERMAC
62892 request_module("i2c-powermac");
62893 --- a/drivers/macintosh/therm_pm72.c
62894 +++ b/drivers/macintosh/therm_pm72.c
62895 @@ -121,6 +121,7 @@
62896 #include <linux/reboot.h>
62897 #include <linux/kmod.h>
62898 #include <linux/i2c.h>
62899 +#include <linux/kthread.h>
62900 #include <asm/prom.h>
62901 #include <asm/machdep.h>
62902 #include <asm/io.h>
62903 @@ -161,7 +162,7 @@
62905 static int cpu_count;
62906 static int cpu_pid_type;
62907 -static pid_t ctrl_task;
62908 +static struct task_struct *ctrl_task;
62909 static struct completion ctrl_complete;
62910 static int critical_state;
62911 static int rackmac;
62912 @@ -1156,6 +1157,8 @@
62914 static int init_cpu_state(struct cpu_pid_state *state, int index)
62918 state->index = index;
62920 state->rpm = (cpu_pid_type == CPU_PID_TYPE_RACKMAC) ? 4000 : 1000;
62921 @@ -1181,18 +1184,21 @@
62922 DBG("CPU %d Using %d power history entries\n", index, state->count_power);
62925 - device_create_file(&of_dev->dev, &dev_attr_cpu0_temperature);
62926 - device_create_file(&of_dev->dev, &dev_attr_cpu0_voltage);
62927 - device_create_file(&of_dev->dev, &dev_attr_cpu0_current);
62928 - device_create_file(&of_dev->dev, &dev_attr_cpu0_exhaust_fan_rpm);
62929 - device_create_file(&of_dev->dev, &dev_attr_cpu0_intake_fan_rpm);
62930 + err = device_create_file(&of_dev->dev, &dev_attr_cpu0_temperature);
62931 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu0_voltage);
62932 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu0_current);
62933 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu0_exhaust_fan_rpm);
62934 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu0_intake_fan_rpm);
62936 - device_create_file(&of_dev->dev, &dev_attr_cpu1_temperature);
62937 - device_create_file(&of_dev->dev, &dev_attr_cpu1_voltage);
62938 - device_create_file(&of_dev->dev, &dev_attr_cpu1_current);
62939 - device_create_file(&of_dev->dev, &dev_attr_cpu1_exhaust_fan_rpm);
62940 - device_create_file(&of_dev->dev, &dev_attr_cpu1_intake_fan_rpm);
62942 + err = device_create_file(&of_dev->dev, &dev_attr_cpu1_temperature);
62943 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_voltage);
62944 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_current);
62945 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_exhaust_fan_rpm);
62946 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_intake_fan_rpm);
62949 + printk(KERN_WARNING "Failed to create some of the atribute"
62950 + "files for CPU %d\n", index);
62954 @@ -1328,6 +1334,7 @@
62956 struct device_node *u3;
62957 int u3h = 1; /* conservative by default */
62961 * There are different PID params for machines with U3 and machines
62962 @@ -1379,8 +1386,11 @@
62963 if (state->monitor == NULL)
62966 - device_create_file(&of_dev->dev, &dev_attr_backside_temperature);
62967 - device_create_file(&of_dev->dev, &dev_attr_backside_fan_pwm);
62968 + err = device_create_file(&of_dev->dev, &dev_attr_backside_temperature);
62969 + err |= device_create_file(&of_dev->dev, &dev_attr_backside_fan_pwm);
62971 + printk(KERN_WARNING "Failed to create attribute file(s)"
62972 + " for backside fan\n");
62976 @@ -1491,6 +1501,8 @@
62978 static int init_drives_state(struct drives_pid_state *state)
62985 @@ -1499,8 +1511,11 @@
62986 if (state->monitor == NULL)
62989 - device_create_file(&of_dev->dev, &dev_attr_drives_temperature);
62990 - device_create_file(&of_dev->dev, &dev_attr_drives_fan_rpm);
62991 + err = device_create_file(&of_dev->dev, &dev_attr_drives_temperature);
62992 + err |= device_create_file(&of_dev->dev, &dev_attr_drives_fan_rpm);
62994 + printk(KERN_WARNING "Failed to create attribute file(s)"
62995 + " for drives bay fan\n");
62999 @@ -1621,7 +1636,9 @@
63000 if (state->monitor == NULL)
63003 - device_create_file(&of_dev->dev, &dev_attr_dimms_temperature);
63004 + if (device_create_file(&of_dev->dev, &dev_attr_dimms_temperature))
63005 + printk(KERN_WARNING "Failed to create attribute file"
63006 + " for DIMM temperature\n");
63010 @@ -1731,6 +1748,8 @@
63012 static int init_slots_state(struct slots_pid_state *state)
63019 @@ -1739,8 +1758,11 @@
63020 if (state->monitor == NULL)
63023 - device_create_file(&of_dev->dev, &dev_attr_slots_temperature);
63024 - device_create_file(&of_dev->dev, &dev_attr_slots_fan_pwm);
63025 + err = device_create_file(&of_dev->dev, &dev_attr_slots_temperature);
63026 + err |= device_create_file(&of_dev->dev, &dev_attr_slots_fan_pwm);
63028 + printk(KERN_WARNING "Failed to create attribute file(s)"
63029 + " for slots bay fan\n");
63033 @@ -1779,8 +1801,6 @@
63035 static int main_control_loop(void *x)
63037 - daemonize("kfand");
63039 DBG("main_control_loop started\n");
63041 down(&driver_lock);
63042 @@ -1956,7 +1976,7 @@
63044 init_completion(&ctrl_complete);
63046 - ctrl_task = kernel_thread(main_control_loop, NULL, SIGCHLD | CLONE_KERNEL);
63047 + ctrl_task = kthread_run(main_control_loop, NULL, "kfand");
63051 @@ -1964,7 +1984,7 @@
63053 static void stop_control_loops(void)
63055 - if (ctrl_task != 0)
63057 wait_for_completion(&ctrl_complete);
63060 --- a/drivers/macintosh/therm_windtunnel.c
63061 +++ b/drivers/macintosh/therm_windtunnel.c
63063 #include <linux/i2c.h>
63064 #include <linux/slab.h>
63065 #include <linux/init.h>
63066 +#include <linux/kthread.h>
63068 #include <asm/prom.h>
63069 #include <asm/machdep.h>
63073 volatile int running;
63074 - struct completion completion;
63076 + struct task_struct *poll_task;
63078 struct semaphore lock;
63079 struct of_device *of_dev;
63080 @@ -223,6 +223,7 @@
63081 setup_hardware( void )
63086 /* save registers (if we unload the module) */
63087 x.r0 = read_reg( x.fan, 0x00, 1 );
63088 @@ -265,8 +266,11 @@
63090 /* tune_fan( fan_up_table[x.upind].fan_setting ); */
63092 - device_create_file( &x.of_dev->dev, &dev_attr_cpu_temperature );
63093 - device_create_file( &x.of_dev->dev, &dev_attr_case_temperature );
63094 + err = device_create_file( &x.of_dev->dev, &dev_attr_cpu_temperature );
63095 + err |= device_create_file( &x.of_dev->dev, &dev_attr_case_temperature );
63097 + printk(KERN_WARNING
63098 + "Failed to create temperature attribute file(s).\n");
63102 @@ -282,27 +286,27 @@
63103 write_reg( x.fan, 0x00, x.r0, 1 );
63107 -control_loop( void *dummy )
63108 +static int control_loop(void *dummy)
63110 - daemonize("g4fand");
63117 - while( x.running ) {
63121 msleep_interruptible(8000);
63124 + if (kthread_should_stop())
63137 - complete_and_exit( &x.completion, 0 );
63142 @@ -322,8 +326,7 @@
63143 ret = i2c_probe( adapter, &addr_data, &do_probe );
63144 if( x.thermostat && x.fan ) {
63146 - init_completion( &x.completion );
63147 - x.poll_task = kernel_thread( control_loop, NULL, SIGCHLD | CLONE_KERNEL );
63148 + x.poll_task = kthread_run(control_loop, NULL, "g4fand");
63152 @@ -339,7 +342,8 @@
63156 - wait_for_completion( &x.completion );
63157 + kthread_stop(x.poll_task);
63158 + x.poll_task = NULL;
63160 if( client == x.thermostat )
63161 x.thermostat = NULL;
63162 --- a/drivers/macintosh/via-pmu-backlight.c
63163 +++ b/drivers/macintosh/via-pmu-backlight.c
63166 static void pmu_backlight_init_curve(u8 off, u8 min, u8 max)
63168 - unsigned int i, flat, count, range = (max - min);
63169 + int i, flat, count, range = (max - min);
63173 @@ -68,17 +68,11 @@
63177 -static int pmu_backlight_update_status(struct backlight_device *bd)
63178 +static int __pmu_backlight_update_status(struct backlight_device *bd)
63180 struct adb_request req;
63181 - unsigned long flags;
63182 int level = bd->props.brightness;
63184 - spin_lock_irqsave(&pmu_backlight_lock, flags);
63186 - /* Don't update brightness when sleeping */
63190 if (bd->props.power != FB_BLANK_UNBLANK ||
63191 bd->props.fb_blank != FB_BLANK_UNBLANK)
63192 @@ -99,12 +93,23 @@
63193 pmu_wait_complete(&req);
63197 - spin_unlock_irqrestore(&pmu_backlight_lock, flags);
63202 +static int pmu_backlight_update_status(struct backlight_device *bd)
63204 + unsigned long flags;
63207 + spin_lock_irqsave(&pmu_backlight_lock, flags);
63208 + /* Don't update brightness when sleeping */
63210 + rc = __pmu_backlight_update_status(bd);
63211 + spin_unlock_irqrestore(&pmu_backlight_lock, flags);
63216 static int pmu_backlight_get_brightness(struct backlight_device *bd)
63218 return bd->props.brightness;
63219 @@ -123,6 +128,16 @@
63221 spin_lock_irqsave(&pmu_backlight_lock, flags);
63223 + if (pmac_backlight) {
63225 + struct adb_request req;
63227 + pmu_request(&req, NULL, 2, PMU_POWER_CTRL,
63228 + PMU_POW_BACKLIGHT | PMU_POW_OFF);
63229 + pmu_wait_complete(&req);
63231 + __pmu_backlight_update_status(pmac_backlight);
63233 spin_unlock_irqrestore(&pmu_backlight_lock, flags);
63235 #endif /* CONFIG_PM */
63236 @@ -148,8 +163,8 @@
63238 bd = backlight_device_register(name, NULL, NULL, &pmu_backlight_data);
63240 - printk("pmubl: Backlight registration failed\n");
63242 + printk(KERN_ERR "PMU Backlight registration failed\n");
63245 bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1;
63246 pmu_backlight_init_curve(0x7F, 0x46, 0x0E);
63247 @@ -171,10 +186,5 @@
63248 bd->props.power = FB_BLANK_UNBLANK;
63249 backlight_update_status(bd);
63251 - printk("pmubl: Backlight initialized (%s)\n", name);
63257 + printk(KERN_INFO "PMU Backlight initialized (%s)\n", name);
63259 --- a/drivers/macintosh/via-pmu.c
63260 +++ b/drivers/macintosh/via-pmu.c
63261 @@ -10,13 +10,11 @@
63263 * Copyright (C) 1998 Paul Mackerras and Fabio Riccardi.
63264 * Copyright (C) 2001-2002 Benjamin Herrenschmidt
63265 + * Copyright (C) 2006-2007 Johannes Berg
63267 * THIS DRIVER IS BECOMING A TOTAL MESS !
63268 * - Cleanup atomically disabling reply to PMU events after
63269 * a sleep or a freq. switch
63270 - * - Move sleep code out of here to pmac_pm, merge into new
63271 - * common PM infrastructure
63272 - * - Save/Restore PCI space properly
63275 #include <stdarg.h>
63277 #include <linux/adb.h>
63278 #include <linux/pmu.h>
63279 #include <linux/cuda.h>
63280 -#include <linux/smp_lock.h>
63281 #include <linux/module.h>
63282 #include <linux/spinlock.h>
63283 #include <linux/pm.h>
63285 #include "via-pmu-event.h"
63287 /* Some compile options */
63288 -#undef SUSPEND_USES_PMU
63289 -#define DEBUG_SLEEP
63290 -#undef HACKED_PCI_SAVE
63291 +#undef DEBUG_SLEEP
63293 /* Misc minor number allocated for /dev/pmu */
63294 #define PMU_MINOR 154
63295 @@ -152,12 +147,9 @@
63296 static u8 pmu_intr_mask;
63297 static int pmu_version;
63298 static int drop_interrupts;
63299 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
63300 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
63301 static int option_lid_wakeup = 1;
63302 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
63303 -#if (defined(CONFIG_PM_SLEEP)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT_LEGACY)
63304 -static int sleep_in_progress;
63306 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
63307 static unsigned long async_req_locks;
63308 static unsigned int pmu_irq_stats[11];
63310 @@ -177,7 +169,6 @@
63314 -BLOCKING_NOTIFIER_HEAD(sleep_notifier_list);
63317 static int adb_dev_map;
63318 @@ -224,7 +215,7 @@
63321 int pmu_polled_request(struct adb_request *req);
63322 -int pmu_wink(struct adb_request *req);
63323 +void pmu_blink(int n);
63327 @@ -875,7 +866,7 @@
63331 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
63332 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
63333 if (pmu_kind == PMU_KEYLARGO_BASED &&
63334 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0)
63335 p += sprintf(p, "lid_wakeup=%d\n", option_lid_wakeup);
63336 @@ -916,7 +907,7 @@
63340 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
63341 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
63342 if (pmu_kind == PMU_KEYLARGO_BASED &&
63343 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0)
63344 if (!strcmp(label, "lid_wakeup"))
63345 @@ -1256,9 +1247,7 @@
63348 unsigned long flags;
63349 -#ifdef SUSPEND_USES_PMU
63350 - struct adb_request *req;
63356 @@ -1276,17 +1265,10 @@
63357 via_pmu_interrupt(0, NULL);
63358 spin_lock_irqsave(&pmu_lock, flags);
63359 if (!adb_int_pending && pmu_state == idle && !req_awaiting_reply) {
63360 -#ifdef SUSPEND_USES_PMU
63361 - pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, 0);
63362 - spin_unlock_irqrestore(&pmu_lock, flags);
63363 - while(!req.complete)
63365 -#else /* SUSPEND_USES_PMU */
63367 disable_irq_nosync(gpio_irq);
63368 out_8(&via[IER], CB1_INT | IER_CLR);
63369 spin_unlock_irqrestore(&pmu_lock, flags);
63370 -#endif /* SUSPEND_USES_PMU */
63374 @@ -1307,18 +1289,11 @@
63377 adb_int_pending = 1;
63378 -#ifdef SUSPEND_USES_PMU
63379 - pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask);
63380 - spin_unlock_irqrestore(&pmu_lock, flags);
63381 - while(!req.complete)
63383 -#else /* SUSPEND_USES_PMU */
63385 enable_irq(gpio_irq);
63386 out_8(&via[IER], CB1_INT | IER_SET);
63387 spin_unlock_irqrestore(&pmu_lock, flags);
63389 -#endif /* SUSPEND_USES_PMU */
63392 /* Interrupt data could be the result data from an ADB cmd */
63393 @@ -1738,228 +1713,7 @@
63397 -#ifdef CONFIG_PM_SLEEP
63399 -static LIST_HEAD(sleep_notifiers);
63402 -pmu_register_sleep_notifier(struct pmu_sleep_notifier *n)
63404 - struct list_head *list;
63405 - struct pmu_sleep_notifier *notifier;
63407 - for (list = sleep_notifiers.next; list != &sleep_notifiers;
63408 - list = list->next) {
63409 - notifier = list_entry(list, struct pmu_sleep_notifier, list);
63410 - if (n->priority > notifier->priority)
63413 - __list_add(&n->list, list->prev, list);
63416 -EXPORT_SYMBOL(pmu_register_sleep_notifier);
63419 -pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* n)
63421 - if (n->list.next == 0)
63423 - list_del(&n->list);
63424 - n->list.next = NULL;
63427 -EXPORT_SYMBOL(pmu_unregister_sleep_notifier);
63428 -#endif /* CONFIG_PM_SLEEP */
63430 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
63432 -/* Sleep is broadcast last-to-first */
63433 -static void broadcast_sleep(int when)
63435 - struct list_head *list;
63436 - struct pmu_sleep_notifier *notifier;
63438 - for (list = sleep_notifiers.prev; list != &sleep_notifiers;
63439 - list = list->prev) {
63440 - notifier = list_entry(list, struct pmu_sleep_notifier, list);
63441 - notifier->notifier_call(notifier, when);
63445 -/* Wake is broadcast first-to-last */
63446 -static void broadcast_wake(void)
63448 - struct list_head *list;
63449 - struct pmu_sleep_notifier *notifier;
63451 - for (list = sleep_notifiers.next; list != &sleep_notifiers;
63452 - list = list->next) {
63453 - notifier = list_entry(list, struct pmu_sleep_notifier, list);
63454 - notifier->notifier_call(notifier, PBOOK_WAKE);
63459 - * This struct is used to store config register values for
63460 - * PCI devices which may get powered off when we sleep.
63462 -static struct pci_save {
63463 -#ifndef HACKED_PCI_SAVE
63471 -} *pbook_pci_saves;
63472 -static int pbook_npci_saves;
63475 -pbook_alloc_pci_save(void)
63478 - struct pci_dev *pd = NULL;
63481 - while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
63486 - pbook_pci_saves = (struct pci_save *)
63487 - kmalloc(npci * sizeof(struct pci_save), GFP_KERNEL);
63488 - pbook_npci_saves = npci;
63492 -pbook_free_pci_save(void)
63494 - if (pbook_pci_saves == NULL)
63496 - kfree(pbook_pci_saves);
63497 - pbook_pci_saves = NULL;
63498 - pbook_npci_saves = 0;
63502 -pbook_pci_save(void)
63504 - struct pci_save *ps = pbook_pci_saves;
63505 - struct pci_dev *pd = NULL;
63506 - int npci = pbook_npci_saves;
63511 - while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
63512 - if (npci-- == 0) {
63516 -#ifndef HACKED_PCI_SAVE
63517 - pci_read_config_word(pd, PCI_COMMAND, &ps->command);
63518 - pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
63519 - pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr);
63520 - pci_read_config_dword(pd, PCI_ROM_ADDRESS, &ps->rom_address);
63523 - for (i=1;i<16;i++)
63524 - pci_read_config_dword(pd, i<<4, &ps->config[i]);
63530 -/* For this to work, we must take care of a few things: If gmac was enabled
63531 - * during boot, it will be in the pci dev list. If it's disabled at this point
63532 - * (and it will probably be), then you can't access it's config space.
63535 -pbook_pci_restore(void)
63538 - struct pci_save *ps = pbook_pci_saves - 1;
63539 - struct pci_dev *pd = NULL;
63540 - int npci = pbook_npci_saves;
63543 - while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
63544 -#ifdef HACKED_PCI_SAVE
63546 - if (npci-- == 0) {
63551 - for (i=2;i<16;i++)
63552 - pci_write_config_dword(pd, i<<4, ps->config[i]);
63553 - pci_write_config_dword(pd, 4, ps->config[1]);
63558 - if (ps->command == 0)
63560 - pci_read_config_word(pd, PCI_COMMAND, &cmd);
63561 - if ((ps->command & ~cmd) == 0)
63563 - switch (pd->hdr_type) {
63564 - case PCI_HEADER_TYPE_NORMAL:
63565 - for (j = 0; j < 6; ++j)
63566 - pci_write_config_dword(pd,
63567 - PCI_BASE_ADDRESS_0 + j*4,
63568 - pd->resource[j].start);
63569 - pci_write_config_dword(pd, PCI_ROM_ADDRESS,
63570 - ps->rom_address);
63571 - pci_write_config_word(pd, PCI_CACHE_LINE_SIZE,
63573 - pci_write_config_word(pd, PCI_INTERRUPT_LINE,
63575 - pci_write_config_word(pd, PCI_COMMAND, ps->command);
63582 -#ifdef DEBUG_SLEEP
63583 -/* N.B. This doesn't work on the 3400 */
63587 - struct adb_request req;
63589 - memset(&req, 0, sizeof(req));
63591 - for (; n > 0; --n) {
63594 - req.data[0] = 0xee;
63598 - req.reply[0] = ADB_RET_OK;
63599 - req.reply_len = 1;
63600 - req.reply_expected = 0;
63601 - pmu_polled_request(&req);
63605 - req.data[0] = 0xee;
63609 - req.reply[0] = ADB_RET_OK;
63610 - req.reply_len = 1;
63611 - req.reply_expected = 0;
63612 - pmu_polled_request(&req);
63619 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
63621 * Put the powerbook to sleep.
63623 @@ -1994,134 +1748,6 @@
63624 out_8(&via[IER], IER_SET | SR_INT | CB1_INT);
63627 -extern void pmu_backlight_set_sleep(int sleep);
63630 -pmac_suspend_devices(void)
63634 - pm_prepare_console();
63636 - /* Notify old-style device drivers */
63637 - broadcast_sleep(PBOOK_SLEEP_REQUEST);
63639 - /* Sync the disks. */
63640 - /* XXX It would be nice to have some way to ensure that
63641 - * nobody is dirtying any new buffers while we wait. That
63642 - * could be achieved using the refrigerator for processes
63643 - * that swsusp uses
63647 - broadcast_sleep(PBOOK_SLEEP_NOW);
63649 - /* Send suspend call to devices, hold the device core's dpm_sem */
63650 - ret = device_suspend(PMSG_SUSPEND);
63652 - broadcast_wake();
63653 - printk(KERN_ERR "Driver sleep failed\n");
63657 -#ifdef CONFIG_PMAC_BACKLIGHT
63658 - /* Tell backlight code not to muck around with the chip anymore */
63659 - pmu_backlight_set_sleep(1);
63662 - /* Call platform functions marked "on sleep" */
63663 - pmac_pfunc_i2c_suspend();
63664 - pmac_pfunc_base_suspend();
63666 - /* Stop preemption */
63667 - preempt_disable();
63669 - /* Make sure the decrementer won't interrupt us */
63670 - asm volatile("mtdec %0" : : "r" (0x7fffffff));
63671 - /* Make sure any pending DEC interrupt occurring while we did
63672 - * the above didn't re-enable the DEC */
63674 - asm volatile("mtdec %0" : : "r" (0x7fffffff));
63676 - /* We can now disable MSR_EE. This code of course works properly only
63677 - * on UP machines... For SMP, if we ever implement sleep, we'll have to
63678 - * stop the "other" CPUs way before we do all that stuff.
63680 - local_irq_disable();
63682 - /* Broadcast power down irq
63683 - * This isn't that useful in most cases (only directly wired devices can
63684 - * use this but still... This will take care of sysdev's as well, so
63685 - * we exit from here with local irqs disabled and PIC off.
63687 - ret = device_power_down(PMSG_SUSPEND);
63689 - wakeup_decrementer();
63690 - local_irq_enable();
63691 - preempt_enable();
63693 - broadcast_wake();
63694 - printk(KERN_ERR "Driver powerdown failed\n");
63698 - /* Wait for completion of async requests */
63699 - while (!batt_req.complete)
63702 - /* Giveup the lazy FPU & vec so we don't have to back them
63703 - * up from the low level code
63705 - enable_kernel_fp();
63707 -#ifdef CONFIG_ALTIVEC
63708 - if (cpu_has_feature(CPU_FTR_ALTIVEC))
63709 - enable_kernel_altivec();
63710 -#endif /* CONFIG_ALTIVEC */
63716 -pmac_wakeup_devices(void)
63720 -#ifdef CONFIG_PMAC_BACKLIGHT
63721 - /* Tell backlight code it can use the chip again */
63722 - pmu_backlight_set_sleep(0);
63725 - /* Power back up system devices (including the PIC) */
63726 - device_power_up();
63728 - /* Force a poll of ADB interrupts */
63729 - adb_int_pending = 1;
63730 - via_pmu_interrupt(0, NULL);
63732 - /* Restart jiffies & scheduling */
63733 - wakeup_decrementer();
63735 - /* Re-enable local CPU interrupts */
63736 - local_irq_enable();
63738 - preempt_enable();
63740 - /* Call platform functions marked "on wake" */
63741 - pmac_pfunc_base_resume();
63742 - pmac_pfunc_i2c_resume();
63744 - /* Resume devices */
63747 - /* Notify old style drivers */
63748 - broadcast_wake();
63750 - pm_restore_console();
63755 #define GRACKLE_PM (1<<7)
63756 #define GRACKLE_DOZE (1<<5)
63757 #define GRACKLE_NAP (1<<4)
63758 @@ -2132,19 +1758,12 @@
63759 unsigned long save_l2cr;
63760 unsigned short pmcr1;
63761 struct adb_request req;
63763 struct pci_dev *grackle;
63765 grackle = pci_get_bus_and_slot(0, 0);
63769 - ret = pmac_suspend_devices();
63771 - printk(KERN_ERR "Sleep rejected by devices\n");
63775 /* Turn off various things. Darwin does some retry tests here... */
63776 pmu_request(&req, NULL, 2, PMU_POWER_CTRL0, PMU_POW0_OFF|PMU_POW0_HARD_DRIVE);
63777 pmu_wait_complete(&req);
63778 @@ -2207,8 +1826,6 @@
63779 PMU_POW_ON|PMU_POW_BACKLIGHT|PMU_POW_CHARGER|PMU_POW_IRLED|PMU_POW_MEDIABAY);
63780 pmu_wait_complete(&req);
63782 - pmac_wakeup_devices();
63787 @@ -2218,7 +1835,6 @@
63788 unsigned long save_l2cr;
63789 unsigned long save_l3cr;
63790 struct adb_request req;
63793 if (pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) < 0) {
63794 printk(KERN_ERR "Sleep mode not supported on this machine\n");
63795 @@ -2228,12 +1844,6 @@
63796 if (num_online_cpus() > 1 || cpu_is_offline(0))
63799 - ret = pmac_suspend_devices();
63801 - printk(KERN_ERR "Sleep rejected by devices\n");
63805 /* Stop environment and ADB interrupts */
63806 pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, 0);
63807 pmu_wait_complete(&req);
63808 @@ -2304,45 +1914,33 @@
63809 /* Restore LPJ, cpufreq will adjust the cpu frequency */
63810 loops_per_jiffy /= 2;
63812 - pmac_wakeup_devices();
63817 #define PB3400_MEM_CTRL 0xf8000000
63818 #define PB3400_MEM_CTRL_SLEEP 0x70
63821 -powerbook_sleep_3400(void)
63822 +static void __iomem *pb3400_mem_ctrl;
63824 +static void powerbook_sleep_init_3400(void)
63827 + /* map in the memory controller registers */
63828 + pb3400_mem_ctrl = ioremap(PB3400_MEM_CTRL, 0x100);
63829 + if (pb3400_mem_ctrl == NULL)
63830 + printk(KERN_WARNING "ioremap failed: sleep won't be possible");
63833 +static int powerbook_sleep_3400(void)
63838 + unsigned long msr;
63839 struct adb_request sleep_req;
63840 - void __iomem *mem_ctrl;
63841 unsigned int __iomem *mem_ctrl_sleep;
63843 - /* first map in the memory controller registers */
63844 - mem_ctrl = ioremap(PB3400_MEM_CTRL, 0x100);
63845 - if (mem_ctrl == NULL) {
63846 - printk("powerbook_sleep_3400: ioremap failed\n");
63847 + if (pb3400_mem_ctrl == NULL)
63850 - mem_ctrl_sleep = mem_ctrl + PB3400_MEM_CTRL_SLEEP;
63852 - /* Allocate room for PCI save */
63853 - pbook_alloc_pci_save();
63855 - ret = pmac_suspend_devices();
63857 - pbook_free_pci_save();
63858 - iounmap(mem_ctrl);
63859 - printk(KERN_ERR "Sleep rejected by devices\n");
63863 - /* Save the state of PCI config space for some slots */
63864 - pbook_pci_save();
63865 + mem_ctrl_sleep = pb3400_mem_ctrl + PB3400_MEM_CTRL_SLEEP;
63867 /* Set the memory controller to keep the memory refreshed
63868 while we're asleep */
63869 @@ -2357,41 +1955,34 @@
63871 /* Ask the PMU to put us to sleep */
63872 pmu_request(&sleep_req, NULL, 5, PMU_SLEEP, 'M', 'A', 'T', 'T');
63873 - while (!sleep_req.complete)
63875 + pmu_wait_complete(&sleep_req);
63878 - pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,1);
63879 + pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, 1);
63881 - /* displacement-flush the L2 cache - necessary? */
63882 - for (p = KERNELBASE; p < KERNELBASE + 0x100000; p += 0x1000)
63883 - i = *(volatile int *)p;
63886 /* Put the CPU into sleep mode */
63887 hid0 = mfspr(SPRN_HID0);
63888 hid0 = (hid0 & ~(HID0_NAP | HID0_DOZE)) | HID0_SLEEP;
63889 mtspr(SPRN_HID0, hid0);
63890 - mtmsr(mfmsr() | MSR_POW | MSR_EE);
63892 + local_irq_enable();
63893 + msr = mfmsr() | MSR_POW;
63899 + local_irq_disable();
63901 /* OK, we're awake again, start restoring things */
63902 out_be32(mem_ctrl_sleep, 0x3f);
63903 - pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,0);
63904 - pbook_pci_restore();
63907 - /* wait for the PMU interrupt sequence to complete */
63911 - pmac_wakeup_devices();
63912 - pbook_free_pci_save();
63913 - iounmap(mem_ctrl);
63914 + pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, 0);
63919 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
63920 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
63923 * Support for /dev/pmu device
63924 @@ -2548,7 +2139,6 @@
63925 struct pmu_private *pp = file->private_data;
63926 unsigned long flags;
63930 file->private_data = NULL;
63931 spin_lock_irqsave(&all_pvt_lock, flags);
63932 @@ -2562,10 +2152,96 @@
63940 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
63941 +static void pmac_suspend_disable_irqs(void)
63943 + /* Call platform functions marked "on sleep" */
63944 + pmac_pfunc_i2c_suspend();
63945 + pmac_pfunc_base_suspend();
63948 +static int powerbook_sleep(suspend_state_t state)
63952 + /* Wait for completion of async requests */
63953 + while (!batt_req.complete)
63956 + /* Giveup the lazy FPU & vec so we don't have to back them
63957 + * up from the low level code
63959 + enable_kernel_fp();
63961 +#ifdef CONFIG_ALTIVEC
63962 + if (cpu_has_feature(CPU_FTR_ALTIVEC))
63963 + enable_kernel_altivec();
63964 +#endif /* CONFIG_ALTIVEC */
63966 + switch (pmu_kind) {
63967 + case PMU_OHARE_BASED:
63968 + error = powerbook_sleep_3400();
63970 + case PMU_HEATHROW_BASED:
63971 + case PMU_PADDINGTON_BASED:
63972 + error = powerbook_sleep_grackle();
63974 + case PMU_KEYLARGO_BASED:
63975 + error = powerbook_sleep_Core99();
63989 +static void pmac_suspend_enable_irqs(void)
63991 + /* Force a poll of ADB interrupts */
63992 + adb_int_pending = 1;
63993 + via_pmu_interrupt(0, NULL);
63997 + /* Call platform functions marked "on wake" */
63998 + pmac_pfunc_base_resume();
63999 + pmac_pfunc_i2c_resume();
64002 +static int pmu_sleep_valid(suspend_state_t state)
64004 + return state == PM_SUSPEND_MEM
64005 + && (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) >= 0);
64008 +static struct platform_suspend_ops pmu_pm_ops = {
64009 + .enter = powerbook_sleep,
64010 + .valid = pmu_sleep_valid,
64013 +static int register_pmu_pm_ops(void)
64015 + if (pmu_kind == PMU_OHARE_BASED)
64016 + powerbook_sleep_init_3400();
64017 + ppc_md.suspend_disable_irqs = pmac_suspend_disable_irqs;
64018 + ppc_md.suspend_enable_irqs = pmac_suspend_enable_irqs;
64019 + suspend_set_ops(&pmu_pm_ops);
64024 +device_initcall(register_pmu_pm_ops);
64028 pmu_ioctl(struct inode * inode, struct file *filp,
64029 u_int cmd, u_long arg)
64030 @@ -2574,35 +2250,15 @@
64031 int error = -EINVAL;
64034 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
64035 case PMU_IOC_SLEEP:
64036 if (!capable(CAP_SYS_ADMIN))
64038 - if (sleep_in_progress)
64040 - sleep_in_progress = 1;
64041 - switch (pmu_kind) {
64042 - case PMU_OHARE_BASED:
64043 - error = powerbook_sleep_3400();
64045 - case PMU_HEATHROW_BASED:
64046 - case PMU_PADDINGTON_BASED:
64047 - error = powerbook_sleep_grackle();
64049 - case PMU_KEYLARGO_BASED:
64050 - error = powerbook_sleep_Core99();
64055 - sleep_in_progress = 0;
64057 + return pm_suspend(PM_SUSPEND_MEM);
64058 case PMU_IOC_CAN_SLEEP:
64059 - if (pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) < 0)
64060 + if (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) < 0)
64061 return put_user(0, argp);
64063 return put_user(1, argp);
64064 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64066 #ifdef CONFIG_PMAC_BACKLIGHT_LEGACY
64067 /* Compatibility ioctl's for backlight */
64068 @@ -2610,9 +2266,6 @@
64072 - if (sleep_in_progress)
64075 brightness = pmac_backlight_get_legacy_brightness();
64076 if (brightness < 0)
64078 @@ -2624,9 +2277,6 @@
64082 - if (sleep_in_progress)
64085 error = get_user(brightness, argp);
64088 @@ -2751,15 +2401,43 @@
64089 local_irq_restore(flags);
64092 -#endif /* DEBUG_SLEEP */
64094 +/* N.B. This doesn't work on the 3400 */
64095 +void pmu_blink(int n)
64097 + struct adb_request req;
64099 -/* FIXME: This is a temporary set of callbacks to enable us
64100 - * to do suspend-to-disk.
64102 + memset(&req, 0, sizeof(req));
64104 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
64105 + for (; n > 0; --n) {
64108 + req.data[0] = 0xee;
64112 + req.reply[0] = ADB_RET_OK;
64113 + req.reply_len = 1;
64114 + req.reply_expected = 0;
64115 + pmu_polled_request(&req);
64119 + req.data[0] = 0xee;
64123 + req.reply[0] = ADB_RET_OK;
64124 + req.reply_len = 1;
64125 + req.reply_expected = 0;
64126 + pmu_polled_request(&req);
64131 +#endif /* DEBUG_SLEEP */
64133 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64134 int pmu_sys_suspended;
64136 static int pmu_sys_suspend(struct sys_device *sysdev, pm_message_t state)
64137 @@ -2767,10 +2445,15 @@
64138 if (state.event != PM_EVENT_SUSPEND || pmu_sys_suspended)
64141 - /* Suspend PMU event interrupts */
64142 + /* Suspend PMU event interrupts */\
64145 pmu_sys_suspended = 1;
64147 +#ifdef CONFIG_PMAC_BACKLIGHT
64148 + /* Tell backlight code not to muck around with the chip anymore */
64149 + pmu_backlight_set_sleep(1);
64155 @@ -2785,15 +2468,18 @@
64156 pmu_request(&req, NULL, 2, PMU_SYSTEM_READY, 2);
64157 pmu_wait_complete(&req);
64159 +#ifdef CONFIG_PMAC_BACKLIGHT
64160 + /* Tell backlight code it can use the chip again */
64161 + pmu_backlight_set_sleep(0);
64163 /* Resume PMU event interrupts */
64166 pmu_sys_suspended = 0;
64171 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64172 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
64174 static struct sysdev_class pmu_sysclass = {
64175 set_kset_name("pmu"),
64176 @@ -2804,10 +2490,10 @@
64179 static struct sysdev_driver driver_pmu = {
64180 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
64181 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64182 .suspend = &pmu_sys_suspend,
64183 .resume = &pmu_sys_resume,
64184 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64185 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
64188 static int __init init_pmu_sysfs(void)
64189 @@ -2842,10 +2528,10 @@
64190 EXPORT_SYMBOL(pmu_suspend);
64191 EXPORT_SYMBOL(pmu_resume);
64192 EXPORT_SYMBOL(pmu_unlock);
64193 -#if defined(CONFIG_PPC32)
64194 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64195 EXPORT_SYMBOL(pmu_enable_irled);
64196 EXPORT_SYMBOL(pmu_battery_count);
64197 EXPORT_SYMBOL(pmu_batteries);
64198 EXPORT_SYMBOL(pmu_power_flags);
64199 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64200 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
64202 --- a/drivers/net/fs_enet/fs_enet-main.c
64203 +++ b/drivers/net/fs_enet/fs_enet-main.c
64204 @@ -1178,8 +1178,15 @@
64205 struct device_node *phynode, *mdionode;
64206 struct resource res;
64210 + data = of_get_property(np, "fixed-link", NULL);
64212 + snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data);
64216 - const u32 *data = of_get_property(np, "phy-handle", &len);
64217 + data = of_get_property(np, "phy-handle", &len);
64218 if (!data || len != 4)
64221 --- a/drivers/net/fs_enet/mac-fcc.c
64222 +++ b/drivers/net/fs_enet/mac-fcc.c
64224 static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 op)
64226 const struct fs_platform_info *fpi = fep->fpi;
64229 - W32(cpmp, cp_cpcr, fpi->cp_command | op | CPM_CR_FLG);
64230 - for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
64231 - if ((R32(cpmp, cp_cpcr) & CPM_CR_FLG) == 0)
64234 - printk(KERN_ERR "%s(): Not able to issue CPM command\n",
64237 + return cpm_command(fpi->cp_command, op);
64240 static int do_pd_setup(struct fs_enet_private *fep)
64241 --- a/drivers/net/fs_enet/mac-scc.c
64242 +++ b/drivers/net/fs_enet/mac-scc.c
64243 @@ -89,21 +89,12 @@
64244 * Delay to wait for SCC reset command to complete (in us)
64246 #define SCC_RESET_DELAY 50
64247 -#define MAX_CR_CMD_LOOPS 10000
64249 static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op)
64251 const struct fs_platform_info *fpi = fep->fpi;
64254 - W16(cpmp, cp_cpcr, fpi->cp_command | CPM_CR_FLG | (op << 8));
64255 - for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
64256 - if ((R16(cpmp, cp_cpcr) & CPM_CR_FLG) == 0)
64259 - printk(KERN_ERR "%s(): Not able to issue CPM command\n",
64262 + return cpm_command(fpi->cp_command, op);
64265 static int do_pd_setup(struct fs_enet_private *fep)
64266 --- a/drivers/net/ibm_newemac/core.c
64267 +++ b/drivers/net/ibm_newemac/core.c
64269 #include <linux/mii.h>
64270 #include <linux/bitops.h>
64271 #include <linux/workqueue.h>
64272 +#include <linux/of.h>
64274 #include <asm/processor.h>
64275 #include <asm/io.h>
64276 --- a/drivers/net/phy/Kconfig
64277 +++ b/drivers/net/phy/Kconfig
64278 @@ -61,34 +61,12 @@
64279 Currently supports the IP175C PHY.
64282 - tristate "Drivers for PHY emulation on fixed speed/link"
64283 + bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs"
64285 - Adds the driver to PHY layer to cover the boards that do not have any PHY bound,
64286 - but with the ability to manipulate the speed/link in software. The relevant MII
64287 - speed/duplex parameters could be effectively handled in a user-specified function.
64288 - Currently tested with mpc866ads.
64289 + Adds the platform "fixed" MDIO Bus to cover the boards that use
64290 + PHYs that are not connected to the real MDIO bus.
64292 -config FIXED_MII_10_FDX
64293 - bool "Emulation for 10M Fdx fixed PHY behavior"
64294 - depends on FIXED_PHY
64296 -config FIXED_MII_100_FDX
64297 - bool "Emulation for 100M Fdx fixed PHY behavior"
64298 - depends on FIXED_PHY
64300 -config FIXED_MII_1000_FDX
64301 - bool "Emulation for 1000M Fdx fixed PHY behavior"
64302 - depends on FIXED_PHY
64304 -config FIXED_MII_AMNT
64305 - int "Number of emulated PHYs to allocate "
64306 - depends on FIXED_PHY
64309 - Sometimes it is required to have several independent emulated
64310 - PHYs on the bus (in case of multi-eth but phy-less HW for instance).
64311 - This control will have specified number allocated for each fixed
64312 - PHY type enabled.
64313 + Currently tested with mpc866ads and mpc8349e-mitx.
64315 config MDIO_BITBANG
64316 tristate "Support for bitbanged MDIO buses"
64317 --- a/drivers/net/phy/fixed.c
64318 +++ b/drivers/net/phy/fixed.c
64319 @@ -1,362 +1,253 @@
64321 - * drivers/net/phy/fixed.c
64322 + * Fixed MDIO bus (MDIO bus emulation with fixed PHYs)
64324 - * Driver for fixed PHYs, when transceiver is able to operate in one fixed mode.
64325 + * Author: Vitaly Bordug <vbordug@ru.mvista.com>
64326 + * Anton Vorontsov <avorontsov@ru.mvista.com>
64328 - * Author: Vitaly Bordug
64330 - * Copyright (c) 2006 MontaVista Software, Inc.
64331 + * Copyright (c) 2006-2007 MontaVista Software, Inc.
64333 * This program is free software; you can redistribute it and/or modify it
64334 * under the terms of the GNU General Public License as published by the
64335 * Free Software Foundation; either version 2 of the License, or (at your
64336 * option) any later version.
64340 #include <linux/kernel.h>
64341 -#include <linux/string.h>
64342 -#include <linux/errno.h>
64343 -#include <linux/unistd.h>
64344 -#include <linux/slab.h>
64345 -#include <linux/interrupt.h>
64346 -#include <linux/init.h>
64347 -#include <linux/delay.h>
64348 -#include <linux/netdevice.h>
64349 -#include <linux/etherdevice.h>
64350 -#include <linux/skbuff.h>
64351 -#include <linux/spinlock.h>
64352 -#include <linux/mm.h>
64353 #include <linux/module.h>
64354 +#include <linux/platform_device.h>
64355 +#include <linux/list.h>
64356 #include <linux/mii.h>
64357 -#include <linux/ethtool.h>
64358 #include <linux/phy.h>
64359 #include <linux/phy_fixed.h>
64361 -#include <asm/io.h>
64362 -#include <asm/irq.h>
64363 -#include <asm/uaccess.h>
64365 -/* we need to track the allocated pointers in order to free them on exit */
64366 -static struct fixed_info *fixed_phy_ptrs[CONFIG_FIXED_MII_AMNT*MAX_PHY_AMNT];
64368 -/*-----------------------------------------------------------------------------
64369 - * If something weird is required to be done with link/speed,
64370 - * network driver is able to assign a function to implement this.
64371 - * May be useful for PHY's that need to be software-driven.
64372 - *-----------------------------------------------------------------------------*/
64373 -int fixed_mdio_set_link_update(struct phy_device *phydev,
64374 - int (*link_update) (struct net_device *,
64375 - struct fixed_phy_status *))
64377 - struct fixed_info *fixed;
64379 - if (link_update == NULL)
64381 +#define MII_REGS_NUM 29
64384 - if (phydev->bus) {
64385 - fixed = phydev->bus->priv;
64386 - fixed->link_update = link_update;
64393 -EXPORT_SYMBOL(fixed_mdio_set_link_update);
64394 +struct fixed_mdio_bus {
64395 + int irqs[PHY_MAX_ADDR];
64396 + struct mii_bus mii_bus;
64397 + struct list_head phys;
64400 -struct fixed_info *fixed_mdio_get_phydev (int phydev_ind)
64402 - if (phydev_ind >= MAX_PHY_AMNT)
64404 - return fixed_phy_ptrs[phydev_ind];
64406 +struct fixed_phy {
64408 + u16 regs[MII_REGS_NUM];
64409 + struct phy_device *phydev;
64410 + struct fixed_phy_status status;
64411 + int (*link_update)(struct net_device *, struct fixed_phy_status *);
64412 + struct list_head node;
64415 -EXPORT_SYMBOL(fixed_mdio_get_phydev);
64416 +static struct platform_device *pdev;
64417 +static struct fixed_mdio_bus platform_fmb = {
64418 + .phys = LIST_HEAD_INIT(platform_fmb.phys),
64421 -/*-----------------------------------------------------------------------------
64422 - * This is used for updating internal mii regs from the status
64423 - *-----------------------------------------------------------------------------*/
64424 -#if defined(CONFIG_FIXED_MII_100_FDX) || defined(CONFIG_FIXED_MII_10_FDX) || defined(CONFIG_FIXED_MII_1000_FDX)
64425 -static int fixed_mdio_update_regs(struct fixed_info *fixed)
64426 +static int fixed_phy_update_regs(struct fixed_phy *fp)
64428 - u16 *regs = fixed->regs;
64430 + u16 bmsr = BMSR_ANEGCAPABLE;
64436 - printk(KERN_ERR "%s: regs not set up", __FUNCTION__);
64440 - if (fixed->phy_status.link)
64441 - bmsr |= BMSR_LSTATUS;
64443 - if (fixed->phy_status.duplex) {
64444 + if (fp->status.duplex) {
64445 bmcr |= BMCR_FULLDPLX;
64447 - switch (fixed->phy_status.speed) {
64448 + switch (fp->status.speed) {
64450 + bmsr |= BMSR_ESTATEN;
64451 + bmcr |= BMCR_SPEED1000;
64452 + lpagb |= LPA_1000FULL;
64455 bmsr |= BMSR_100FULL;
64456 bmcr |= BMCR_SPEED100;
64457 + lpa |= LPA_100FULL;
64461 bmsr |= BMSR_10FULL;
64462 + lpa |= LPA_10FULL;
64465 + printk(KERN_WARNING "fixed phy: unknown speed\n");
64469 - switch (fixed->phy_status.speed) {
64470 + switch (fp->status.speed) {
64472 + bmsr |= BMSR_ESTATEN;
64473 + bmcr |= BMCR_SPEED1000;
64474 + lpagb |= LPA_1000HALF;
64477 bmsr |= BMSR_100HALF;
64478 bmcr |= BMCR_SPEED100;
64479 + lpa |= LPA_100HALF;
64483 - bmsr |= BMSR_100HALF;
64484 + bmsr |= BMSR_10HALF;
64485 + lpa |= LPA_10HALF;
64488 + printk(KERN_WARNING "fixed phy: unknown speed\n");
64493 - regs[MII_BMCR] = bmcr;
64494 - regs[MII_BMSR] = bmsr | 0x800; /*we are always capable of 10 hdx */
64495 + if (fp->status.link)
64496 + bmsr |= BMSR_LSTATUS | BMSR_ANEGCOMPLETE;
64498 + if (fp->status.pause)
64499 + lpa |= LPA_PAUSE_CAP;
64501 + if (fp->status.asym_pause)
64502 + lpa |= LPA_PAUSE_ASYM;
64504 + fp->regs[MII_PHYSID1] = fp->id >> 16;
64505 + fp->regs[MII_PHYSID2] = fp->id;
64507 + fp->regs[MII_BMSR] = bmsr;
64508 + fp->regs[MII_BMCR] = bmcr;
64509 + fp->regs[MII_LPA] = lpa;
64510 + fp->regs[MII_STAT1000] = lpagb;
64515 -static int fixed_mii_read(struct mii_bus *bus, int phy_id, int location)
64516 +static int fixed_mdio_read(struct mii_bus *bus, int phy_id, int reg_num)
64518 - struct fixed_info *fixed = bus->priv;
64519 + struct fixed_mdio_bus *fmb = container_of(bus, struct fixed_mdio_bus,
64521 + struct fixed_phy *fp;
64523 - /* if user has registered link update callback, use it */
64524 - if (fixed->phydev)
64525 - if (fixed->phydev->attached_dev) {
64526 - if (fixed->link_update) {
64527 - fixed->link_update(fixed->phydev->attached_dev,
64528 - &fixed->phy_status);
64529 - fixed_mdio_update_regs(fixed);
64530 + if (reg_num >= MII_REGS_NUM)
64533 + list_for_each_entry(fp, &fmb->phys, node) {
64534 + if (fp->id == phy_id) {
64535 + /* Issue callback if user registered it. */
64536 + if (fp->link_update) {
64537 + fp->link_update(fp->phydev->attached_dev,
64539 + fixed_phy_update_regs(fp);
64541 + return fp->regs[reg_num];
64545 - if ((unsigned int)location >= fixed->regs_num)
64547 - return fixed->regs[location];
64551 -static int fixed_mii_write(struct mii_bus *bus, int phy_id, int location,
64553 +static int fixed_mdio_write(struct mii_bus *bus, int phy_id, int reg_num,
64556 - /* do nothing for now */
64560 -static int fixed_mii_reset(struct mii_bus *bus)
64562 + * If something weird is required to be done with link/speed,
64563 + * network driver is able to assign a function to implement this.
64564 + * May be useful for PHY's that need to be software-driven.
64566 +int fixed_phy_set_link_update(struct phy_device *phydev,
64567 + int (*link_update)(struct net_device *,
64568 + struct fixed_phy_status *))
64570 - /*nothing here - no way/need to reset it */
64574 + struct fixed_mdio_bus *fmb = &platform_fmb;
64575 + struct fixed_phy *fp;
64577 -static int fixed_config_aneg(struct phy_device *phydev)
64579 - /* :TODO:03/13/2006 09:45:37 PM::
64580 - The full autoneg funcionality can be emulated,
64581 - but no need to have anything here for now
64585 + if (!link_update || !phydev || !phydev->bus)
64588 -/*-----------------------------------------------------------------------------
64589 - * the manual bind will do the magic - with phy_id_mask == 0
64590 - * match will never return true...
64591 - *-----------------------------------------------------------------------------*/
64592 -static struct phy_driver fixed_mdio_driver = {
64593 - .name = "Fixed PHY",
64594 -#ifdef CONFIG_FIXED_MII_1000_FDX
64595 - .features = PHY_GBIT_FEATURES,
64597 - .features = PHY_BASIC_FEATURES,
64599 - .config_aneg = fixed_config_aneg,
64600 - .read_status = genphy_read_status,
64601 - .driver = { .owner = THIS_MODULE, },
64603 + list_for_each_entry(fp, &fmb->phys, node) {
64604 + if (fp->id == phydev->phy_id) {
64605 + fp->link_update = link_update;
64606 + fp->phydev = phydev;
64611 -static void fixed_mdio_release(struct device *dev)
64613 - struct phy_device *phydev = container_of(dev, struct phy_device, dev);
64614 - struct mii_bus *bus = phydev->bus;
64615 - struct fixed_info *fixed = bus->priv;
64620 - kfree(fixed->regs);
64624 +EXPORT_SYMBOL_GPL(fixed_phy_set_link_update);
64626 -/*-----------------------------------------------------------------------------
64627 - * This func is used to create all the necessary stuff, bind
64628 - * the fixed phy driver and register all it on the mdio_bus_type.
64629 - * speed is either 10 or 100 or 1000, duplex is boolean.
64630 - * number is used to create multiple fixed PHYs, so that several devices can
64631 - * utilize them simultaneously.
64633 - * The device on mdio bus will look like [bus_id]:[phy_id],
64634 - * bus_id = number
64635 - * phy_id = speed+duplex.
64636 - *-----------------------------------------------------------------------------*/
64637 -#if defined(CONFIG_FIXED_MII_100_FDX) || defined(CONFIG_FIXED_MII_10_FDX) || defined(CONFIG_FIXED_MII_1000_FDX)
64638 -struct fixed_info *fixed_mdio_register_device(
64639 - int bus_id, int speed, int duplex, u8 phy_id)
64640 +int fixed_phy_add(unsigned int irq, int phy_id,
64641 + struct fixed_phy_status *status)
64643 - struct mii_bus *new_bus;
64644 - struct fixed_info *fixed;
64645 - struct phy_device *phydev;
64648 + struct fixed_mdio_bus *fmb = &platform_fmb;
64649 + struct fixed_phy *fp;
64651 - struct device *dev = kzalloc(sizeof(struct device), GFP_KERNEL);
64652 + fp = kzalloc(sizeof(*fp), GFP_KERNEL);
64657 - goto err_dev_alloc;
64658 + memset(fp->regs, 0xFF, sizeof(fp->regs[0]) * MII_REGS_NUM);
64660 - new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
64661 + fmb->irqs[phy_id] = irq;
64663 - if (new_bus == NULL)
64664 - goto err_bus_alloc;
64666 - fixed = kzalloc(sizeof(struct fixed_info), GFP_KERNEL);
64668 - if (fixed == NULL)
64669 - goto err_fixed_alloc;
64671 - fixed->regs = kzalloc(MII_REGS_NUM * sizeof(int), GFP_KERNEL);
64672 - if (NULL == fixed->regs)
64673 - goto err_fixed_regs_alloc;
64675 - fixed->regs_num = MII_REGS_NUM;
64676 - fixed->phy_status.speed = speed;
64677 - fixed->phy_status.duplex = duplex;
64678 - fixed->phy_status.link = 1;
64680 - new_bus->name = "Fixed MII Bus";
64681 - new_bus->read = &fixed_mii_read;
64682 - new_bus->write = &fixed_mii_write;
64683 - new_bus->reset = &fixed_mii_reset;
64684 - /*set up workspace */
64685 - fixed_mdio_update_regs(fixed);
64686 - new_bus->priv = fixed;
64688 - new_bus->dev = dev;
64689 - dev_set_drvdata(dev, new_bus);
64691 - /* create phy_device and register it on the mdio bus */
64692 - phydev = phy_device_create(new_bus, 0, 0);
64693 - if (phydev == NULL)
64694 - goto err_phy_dev_create;
64697 - * Put the phydev pointer into the fixed pack so that bus read/write
64698 - * code could be able to access for instance attached netdev. Well it
64699 - * doesn't have to do so, only in case of utilizing user-specified
64703 - fixed->phydev = phydev;
64704 - phydev->speed = speed;
64705 - phydev->duplex = duplex;
64707 - phydev->irq = PHY_IGNORE_INTERRUPT;
64708 - phydev->dev.bus = &mdio_bus_type;
64710 - snprintf(phydev->dev.bus_id, BUS_ID_SIZE,
64711 - PHY_ID_FMT, bus_id, phy_id);
64713 - phydev->bus = new_bus;
64715 - phydev->dev.driver = &fixed_mdio_driver.driver;
64716 - phydev->dev.release = fixed_mdio_release;
64717 - err = phydev->dev.driver->probe(&phydev->dev);
64719 - printk(KERN_ERR "Phy %s: problems with fixed driver\n",
64720 - phydev->dev.bus_id);
64723 - err = device_register(&phydev->dev);
64725 - printk(KERN_ERR "Phy %s failed to register\n",
64726 - phydev->dev.bus_id);
64729 - //phydev->state = PHY_RUNNING; /* make phy go up quick, but in 10Mbit/HDX
64732 + fp->status = *status;
64736 -err_phy_dev_create:
64737 - kfree(fixed->regs);
64738 -err_fixed_regs_alloc:
64745 + ret = fixed_phy_update_regs(fp);
64750 + list_add_tail(&fp->node, &fmb->phys);
64756 -MODULE_DESCRIPTION("Fixed PHY device & driver for PAL");
64757 -MODULE_AUTHOR("Vitaly Bordug");
64758 -MODULE_LICENSE("GPL");
64763 +EXPORT_SYMBOL_GPL(fixed_phy_add);
64765 -static int __init fixed_init(void)
64766 +static int __init fixed_mdio_bus_init(void)
64770 -/* register on the bus... Not expected to be matched
64771 - * with anything there...
64774 - phy_driver_register(&fixed_mdio_driver);
64775 + struct fixed_mdio_bus *fmb = &platform_fmb;
64778 -/* We will create several mdio devices here, and will bound the upper
64779 - * driver to them.
64781 - * Then the external software can lookup the phy bus by searching
64782 - * for 0:101, to be connected to the virtual 100M Fdx phy.
64784 - * In case several virtual PHYs required, the bus_id will be in form
64785 - * [num]:[duplex]+[speed], which make it able even to define
64786 - * driver-specific link control callback, if for instance PHY is
64787 - * completely SW-driven.
64789 - for (i=1; i <= CONFIG_FIXED_MII_AMNT; i++) {
64790 -#ifdef CONFIG_FIXED_MII_1000_FDX
64791 - fixed_phy_ptrs[cnt++] = fixed_mdio_register_device(0, 1000, 1, i);
64793 -#ifdef CONFIG_FIXED_MII_100_FDX
64794 - fixed_phy_ptrs[cnt++] = fixed_mdio_register_device(1, 100, 1, i);
64796 -#ifdef CONFIG_FIXED_MII_10_FDX
64797 - fixed_phy_ptrs[cnt++] = fixed_mdio_register_device(2, 10, 1, i);
64799 + pdev = platform_device_register_simple("Fixed MDIO bus", 0, NULL, 0);
64805 + fmb->mii_bus.id = 0;
64806 + fmb->mii_bus.name = "Fixed MDIO Bus";
64807 + fmb->mii_bus.dev = &pdev->dev;
64808 + fmb->mii_bus.read = &fixed_mdio_read;
64809 + fmb->mii_bus.write = &fixed_mdio_write;
64810 + fmb->mii_bus.irq = fmb->irqs;
64812 + ret = mdiobus_register(&fmb->mii_bus);
64814 + goto err_mdiobus_reg;
64819 + platform_device_unregister(pdev);
64823 +module_init(fixed_mdio_bus_init);
64825 -static void __exit fixed_exit(void)
64826 +static void __exit fixed_mdio_bus_exit(void)
64829 + struct fixed_mdio_bus *fmb = &platform_fmb;
64830 + struct fixed_phy *fp;
64832 - phy_driver_unregister(&fixed_mdio_driver);
64833 - for (i=0; i < MAX_PHY_AMNT; i++)
64834 - if ( fixed_phy_ptrs[i] )
64835 - device_unregister(&fixed_phy_ptrs[i]->phydev->dev);
64836 + mdiobus_unregister(&fmb->mii_bus);
64837 + platform_device_unregister(pdev);
64839 + list_for_each_entry(fp, &fmb->phys, node) {
64840 + list_del(&fp->node);
64844 +module_exit(fixed_mdio_bus_exit);
64846 -module_init(fixed_init);
64847 -module_exit(fixed_exit);
64848 +MODULE_DESCRIPTION("Fixed MDIO bus (MDIO bus emulation with fixed PHYs)");
64849 +MODULE_AUTHOR("Vitaly Bordug");
64850 +MODULE_LICENSE("GPL");
64851 --- a/drivers/net/ps3_gelic_net.c
64852 +++ b/drivers/net/ps3_gelic_net.c
64853 @@ -58,11 +58,11 @@
64855 return &card->dev->core;
64857 -static inline unsigned int bus_id(struct gelic_net_card *card)
64858 +static inline u64 bus_id(struct gelic_net_card *card)
64860 return card->dev->bus_id;
64862 -static inline unsigned int dev_id(struct gelic_net_card *card)
64863 +static inline u64 dev_id(struct gelic_net_card *card)
64865 return card->dev->dev_id;
64867 --- a/drivers/net/ucc_geth.c
64868 +++ b/drivers/net/ucc_geth.c
64869 @@ -3822,6 +3822,7 @@
64870 int err, ucc_num, max_speed = 0;
64872 const unsigned int *prop;
64873 + const char *sprop;
64874 const void *mac_addr;
64875 phy_interface_t phy_interface;
64876 static const int enet_to_speed[] = {
64877 @@ -3854,10 +3855,56 @@
64879 ug_info->uf_info.ucc_num = ucc_num;
64881 - prop = of_get_property(np, "rx-clock", NULL);
64882 - ug_info->uf_info.rx_clock = *prop;
64883 - prop = of_get_property(np, "tx-clock", NULL);
64884 - ug_info->uf_info.tx_clock = *prop;
64885 + sprop = of_get_property(np, "rx-clock-name", NULL);
64887 + ug_info->uf_info.rx_clock = qe_clock_source(sprop);
64888 + if ((ug_info->uf_info.rx_clock < QE_CLK_NONE) ||
64889 + (ug_info->uf_info.rx_clock > QE_CLK24)) {
64891 + "ucc_geth: invalid rx-clock-name property\n");
64895 + prop = of_get_property(np, "rx-clock", NULL);
64897 + /* If both rx-clock-name and rx-clock are missing,
64898 + we want to tell people to use rx-clock-name. */
64900 + "ucc_geth: missing rx-clock-name property\n");
64903 + if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
64905 + "ucc_geth: invalid rx-clock propperty\n");
64908 + ug_info->uf_info.rx_clock = *prop;
64911 + sprop = of_get_property(np, "tx-clock-name", NULL);
64913 + ug_info->uf_info.tx_clock = qe_clock_source(sprop);
64914 + if ((ug_info->uf_info.tx_clock < QE_CLK_NONE) ||
64915 + (ug_info->uf_info.tx_clock > QE_CLK24)) {
64917 + "ucc_geth: invalid tx-clock-name property\n");
64921 + prop = of_get_property(np, "rx-clock", NULL);
64924 + "ucc_geth: mising tx-clock-name property\n");
64927 + if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
64929 + "ucc_geth: invalid tx-clock property\n");
64932 + ug_info->uf_info.tx_clock = *prop;
64935 err = of_address_to_resource(np, 0, &res);
64938 --- a/drivers/of/base.c
64939 +++ b/drivers/of/base.c
64940 @@ -273,3 +273,61 @@
64943 EXPORT_SYMBOL(of_find_compatible_node);
64946 + * of_match_node - Tell if an device_node has a matching of_match structure
64947 + * @matches: array of of device match structures to search in
64948 + * @node: the of device structure to match against
64950 + * Low level utility function used by device matching.
64952 +const struct of_device_id *of_match_node(const struct of_device_id *matches,
64953 + const struct device_node *node)
64955 + while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
64957 + if (matches->name[0])
64958 + match &= node->name
64959 + && !strcmp(matches->name, node->name);
64960 + if (matches->type[0])
64961 + match &= node->type
64962 + && !strcmp(matches->type, node->type);
64963 + if (matches->compatible[0])
64964 + match &= of_device_is_compatible(node,
64965 + matches->compatible);
64972 +EXPORT_SYMBOL(of_match_node);
64975 + * of_find_matching_node - Find a node based on an of_device_id match
64977 + * @from: The node to start searching from or NULL, the node
64978 + * you pass will not be searched, only the next one
64979 + * will; typically, you pass what the previous call
64980 + * returned. of_node_put() will be called on it
64981 + * @matches: array of of device match structures to search in
64983 + * Returns a node pointer with refcount incremented, use
64984 + * of_node_put() on it when done.
64986 +struct device_node *of_find_matching_node(struct device_node *from,
64987 + const struct of_device_id *matches)
64989 + struct device_node *np;
64991 + read_lock(&devtree_lock);
64992 + np = from ? from->allnext : allnodes;
64993 + for (; np; np = np->allnext) {
64994 + if (of_match_node(matches, np) && of_node_get(np))
64997 + of_node_put(from);
64998 + read_unlock(&devtree_lock);
65001 +EXPORT_SYMBOL(of_find_matching_node);
65002 --- a/drivers/of/device.c
65003 +++ b/drivers/of/device.c
65005 #include <asm/errno.h>
65008 - * of_match_node - Tell if an device_node has a matching of_match structure
65009 - * @ids: array of of device match structures to search in
65010 - * @node: the of device structure to match against
65012 - * Low level utility function used by device matching.
65014 -const struct of_device_id *of_match_node(const struct of_device_id *matches,
65015 - const struct device_node *node)
65017 - while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
65019 - if (matches->name[0])
65020 - match &= node->name
65021 - && !strcmp(matches->name, node->name);
65022 - if (matches->type[0])
65023 - match &= node->type
65024 - && !strcmp(matches->type, node->type);
65025 - if (matches->compatible[0])
65026 - match &= of_device_is_compatible(node,
65027 - matches->compatible);
65034 -EXPORT_SYMBOL(of_match_node);
65037 * of_match_device - Tell if an of_device structure has a matching
65038 * of_match structure
65039 * @ids: array of of device match structures to search in
65040 --- a/drivers/ps3/Makefile
65041 +++ b/drivers/ps3/Makefile
65043 obj-$(CONFIG_PPC_PS3) += sys-manager-core.o
65044 obj-$(CONFIG_PS3_SYS_MANAGER) += ps3-sys-manager.o
65045 obj-$(CONFIG_PS3_STORAGE) += ps3stor_lib.o
65046 +obj-$(CONFIG_PS3_LPM) += ps3-lpm.o
65048 +++ b/drivers/ps3/ps3-lpm.c
65051 + * PS3 Logical Performance Monitor.
65053 + * Copyright (C) 2007 Sony Computer Entertainment Inc.
65054 + * Copyright 2007 Sony Corp.
65056 + * This program is free software; you can redistribute it and/or modify
65057 + * it under the terms of the GNU General Public License as published by
65058 + * the Free Software Foundation; version 2 of the License.
65060 + * This program is distributed in the hope that it will be useful,
65061 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
65062 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
65063 + * GNU General Public License for more details.
65065 + * You should have received a copy of the GNU General Public License
65066 + * along with this program; if not, write to the Free Software
65067 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
65070 +#include <linux/kernel.h>
65071 +#include <linux/module.h>
65072 +#include <linux/interrupt.h>
65073 +#include <linux/uaccess.h>
65074 +#include <asm/ps3.h>
65075 +#include <asm/lv1call.h>
65076 +#include <asm/cell-pmu.h>
65079 +/* BOOKMARK tag macros */
65080 +#define PS3_PM_BOOKMARK_START 0x8000000000000000ULL
65081 +#define PS3_PM_BOOKMARK_STOP 0x4000000000000000ULL
65082 +#define PS3_PM_BOOKMARK_TAG_KERNEL 0x1000000000000000ULL
65083 +#define PS3_PM_BOOKMARK_TAG_USER 0x3000000000000000ULL
65084 +#define PS3_PM_BOOKMARK_TAG_MASK_HI 0xF000000000000000ULL
65085 +#define PS3_PM_BOOKMARK_TAG_MASK_LO 0x0F00000000000000ULL
65087 +/* CBE PM CONTROL register macros */
65088 +#define PS3_PM_CONTROL_PPU_TH0_BOOKMARK 0x00001000
65089 +#define PS3_PM_CONTROL_PPU_TH1_BOOKMARK 0x00000800
65090 +#define PS3_PM_CONTROL_PPU_COUNT_MODE_MASK 0x000C0000
65091 +#define PS3_PM_CONTROL_PPU_COUNT_MODE_PROBLEM 0x00080000
65092 +#define PS3_WRITE_PM_MASK 0xFFFFFFFFFFFFFFFFULL
65094 +/* CBE PM START STOP register macros */
65095 +#define PS3_PM_START_STOP_PPU_TH0_BOOKMARK_START 0x02000000
65096 +#define PS3_PM_START_STOP_PPU_TH1_BOOKMARK_START 0x01000000
65097 +#define PS3_PM_START_STOP_PPU_TH0_BOOKMARK_STOP 0x00020000
65098 +#define PS3_PM_START_STOP_PPU_TH1_BOOKMARK_STOP 0x00010000
65099 +#define PS3_PM_START_STOP_START_MASK 0xFF000000
65100 +#define PS3_PM_START_STOP_STOP_MASK 0x00FF0000
65102 +/* CBE PM COUNTER register macres */
65103 +#define PS3_PM_COUNTER_MASK_HI 0xFFFFFFFF00000000ULL
65104 +#define PS3_PM_COUNTER_MASK_LO 0x00000000FFFFFFFFULL
65106 +/* BASE SIGNAL GROUP NUMBER macros */
65107 +#define PM_ISLAND2_BASE_SIGNAL_GROUP_NUMBER 0
65108 +#define PM_ISLAND2_SIGNAL_GROUP_NUMBER1 6
65109 +#define PM_ISLAND2_SIGNAL_GROUP_NUMBER2 7
65110 +#define PM_ISLAND3_BASE_SIGNAL_GROUP_NUMBER 7
65111 +#define PM_ISLAND4_BASE_SIGNAL_GROUP_NUMBER 15
65112 +#define PM_SPU_TRIGGER_SIGNAL_GROUP_NUMBER 17
65113 +#define PM_SPU_EVENT_SIGNAL_GROUP_NUMBER 18
65114 +#define PM_ISLAND5_BASE_SIGNAL_GROUP_NUMBER 18
65115 +#define PM_ISLAND6_BASE_SIGNAL_GROUP_NUMBER 24
65116 +#define PM_ISLAND7_BASE_SIGNAL_GROUP_NUMBER 49
65117 +#define PM_ISLAND8_BASE_SIGNAL_GROUP_NUMBER 52
65118 +#define PM_SIG_GROUP_SPU 41
65119 +#define PM_SIG_GROUP_SPU_TRIGGER 42
65120 +#define PM_SIG_GROUP_SPU_EVENT 43
65121 +#define PM_SIG_GROUP_MFC_MAX 60
65124 + * struct ps3_lpm_shadow_regs - Performance monitor shadow registers.
65126 + * @pm_control: Shadow of the processor's pm_control register.
65127 + * @pm_start_stop: Shadow of the processor's pm_start_stop register.
65128 + * @pm_interval: Shadow of the processor's pm_interval register.
65129 + * @group_control: Shadow of the processor's group_control register.
65130 + * @debug_bus_control: Shadow of the processor's debug_bus_control register.
65132 + * The logical performance monitor provides a write-only interface to
65133 + * these processor registers. These shadow variables cache the processor
65134 + * register values for reading.
65136 + * The initial value of the shadow registers at lpm creation is
65137 + * PS3_LPM_SHADOW_REG_INIT.
65140 +struct ps3_lpm_shadow_regs {
65142 + u64 pm_start_stop;
65144 + u64 group_control;
65145 + u64 debug_bus_control;
65148 +#define PS3_LPM_SHADOW_REG_INIT 0xFFFFFFFF00000000ULL
65151 + * struct ps3_lpm_priv - Private lpm device data.
65153 + * @open: An atomic variable indicating the lpm driver has been opened.
65154 + * @rights: The lpm rigths granted by the system policy module. A logical
65155 + * OR of enum ps3_lpm_rights.
65156 + * @node_id: The node id of a BE prosessor whose performance monitor this
65157 + * lpar has the right to use.
65158 + * @pu_id: The lv1 id of the logical PU.
65159 + * @lpm_id: The lv1 id of this lpm instance.
65160 + * @outlet_id: The outlet created by lv1 for this lpm instance.
65161 + * @tb_count: The number of bytes of data held in the lv1 trace buffer.
65162 + * @tb_cache: Kernel buffer to receive the data from the lv1 trace buffer.
65163 + * Must be 128 byte aligned.
65164 + * @tb_cache_size: Size of the kernel @tb_cache buffer. Must be 128 byte
65166 + * @tb_cache_internal: An unaligned buffer allocated by this driver to be
65167 + * used for the trace buffer cache when ps3_lpm_open() is called with a
65168 + * NULL tb_cache argument. Otherwise unused.
65169 + * @shadow: Processor register shadow of type struct ps3_lpm_shadow_regs.
65170 + * @sbd: The struct ps3_system_bus_device attached to this driver.
65172 + * The trace buffer is a buffer allocated and used internally to the lv1
65173 + * hypervisor to collect trace data. The trace buffer cache is a guest
65174 + * buffer that accepts the trace data from the trace buffer.
65177 +struct ps3_lpm_priv {
65186 + u64 tb_cache_size;
65187 + void *tb_cache_internal;
65188 + struct ps3_lpm_shadow_regs shadow;
65189 + struct ps3_system_bus_device *sbd;
65193 + PS3_LPM_DEFAULT_TB_CACHE_SIZE = 0x4000,
65197 + * lpm_priv - Static instance of the lpm data.
65199 + * Since the exported routines don't support the notion of a device
65200 + * instance we need to hold the instance in this static variable
65201 + * and then only allow at most one instance at a time to be created.
65204 +static struct ps3_lpm_priv *lpm_priv;
65206 +static struct device *sbd_core(void)
65208 + BUG_ON(!lpm_priv || !lpm_priv->sbd);
65209 + return &lpm_priv->sbd->core;
65213 + * use_start_stop_bookmark - Enable the PPU bookmark trace.
65215 + * And it enables PPU bookmark triggers ONLY if the other triggers are not set.
65216 + * The start/stop bookmarks are inserted at ps3_enable_pm() and ps3_disable_pm()
65217 + * to start/stop LPM.
65219 + * Used to get good quality of the performance counter.
65222 +enum {use_start_stop_bookmark = 1,};
65224 +void ps3_set_bookmark(u64 bookmark)
65227 + * As per the PPE book IV, to avoid bookmark loss there must
65228 + * not be a traced branch within 10 cycles of setting the
65229 + * SPRN_BKMK register. The actual text is unclear if 'within'
65230 + * includes cycles before the call.
65233 + asm volatile("or 29, 29, 29;"); /* db10cyc */
65234 + mtspr(SPRN_BKMK, bookmark);
65235 + asm volatile("or 29, 29, 29;"); /* db10cyc */
65237 +EXPORT_SYMBOL_GPL(ps3_set_bookmark);
65239 +void ps3_set_pm_bookmark(u64 tag, u64 incident, u64 th_id)
65243 + bookmark = (get_tb() & 0x00000000FFFFFFFFULL) |
65244 + PS3_PM_BOOKMARK_TAG_KERNEL;
65245 + bookmark = ((tag << 56) & PS3_PM_BOOKMARK_TAG_MASK_LO) |
65246 + (incident << 48) | (th_id << 32) | bookmark;
65247 + ps3_set_bookmark(bookmark);
65249 +EXPORT_SYMBOL_GPL(ps3_set_pm_bookmark);
65252 + * ps3_read_phys_ctr - Read physical counter registers.
65254 + * Each physical counter can act as one 32 bit counter or as two 16 bit
65258 +u32 ps3_read_phys_ctr(u32 cpu, u32 phys_ctr)
65264 + if (phys_ctr >= NR_PHYS_CTRS) {
65265 + dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__,
65266 + __LINE__, phys_ctr);
65270 + result = lv1_set_lpm_counter(lpm_priv->lpm_id, 0, 0, 0, 0, &counter0415,
65273 + dev_err(sbd_core(), "%s:%u: lv1_set_lpm_counter failed: "
65274 + "phys_ctr %u, %s\n", __func__, __LINE__, phys_ctr,
65275 + ps3_result(result));
65279 + switch (phys_ctr) {
65281 + return counter0415 >> 32;
65283 + return counter0415 & PS3_PM_COUNTER_MASK_LO;
65285 + return counter2637 >> 32;
65287 + return counter2637 & PS3_PM_COUNTER_MASK_LO;
65293 +EXPORT_SYMBOL_GPL(ps3_read_phys_ctr);
65296 + * ps3_write_phys_ctr - Write physical counter registers.
65298 + * Each physical counter can act as one 32 bit counter or as two 16 bit
65302 +void ps3_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val)
65305 + u64 counter0415_mask;
65307 + u64 counter2637_mask;
65310 + if (phys_ctr >= NR_PHYS_CTRS) {
65311 + dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__,
65312 + __LINE__, phys_ctr);
65316 + switch (phys_ctr) {
65318 + counter0415 = (u64)val << 32;
65319 + counter0415_mask = PS3_PM_COUNTER_MASK_HI;
65320 + counter2637 = 0x0;
65321 + counter2637_mask = 0x0;
65324 + counter0415 = (u64)val;
65325 + counter0415_mask = PS3_PM_COUNTER_MASK_LO;
65326 + counter2637 = 0x0;
65327 + counter2637_mask = 0x0;
65330 + counter0415 = 0x0;
65331 + counter0415_mask = 0x0;
65332 + counter2637 = (u64)val << 32;
65333 + counter2637_mask = PS3_PM_COUNTER_MASK_HI;
65336 + counter0415 = 0x0;
65337 + counter0415_mask = 0x0;
65338 + counter2637 = (u64)val;
65339 + counter2637_mask = PS3_PM_COUNTER_MASK_LO;
65345 + result = lv1_set_lpm_counter(lpm_priv->lpm_id,
65346 + counter0415, counter0415_mask,
65347 + counter2637, counter2637_mask,
65348 + &counter0415, &counter2637);
65350 + dev_err(sbd_core(), "%s:%u: lv1_set_lpm_counter failed: "
65351 + "phys_ctr %u, val %u, %s\n", __func__, __LINE__,
65352 + phys_ctr, val, ps3_result(result));
65354 +EXPORT_SYMBOL_GPL(ps3_write_phys_ctr);
65357 + * ps3_read_ctr - Read counter.
65359 + * Read 16 or 32 bits depending on the current size of the counter.
65360 + * Counters 4, 5, 6 & 7 are always 16 bit.
65363 +u32 ps3_read_ctr(u32 cpu, u32 ctr)
65366 + u32 phys_ctr = ctr & (NR_PHYS_CTRS - 1);
65368 + val = ps3_read_phys_ctr(cpu, phys_ctr);
65370 + if (ps3_get_ctr_size(cpu, phys_ctr) == 16)
65371 + val = (ctr < NR_PHYS_CTRS) ? (val >> 16) : (val & 0xffff);
65375 +EXPORT_SYMBOL_GPL(ps3_read_ctr);
65378 + * ps3_write_ctr - Write counter.
65380 + * Write 16 or 32 bits depending on the current size of the counter.
65381 + * Counters 4, 5, 6 & 7 are always 16 bit.
65384 +void ps3_write_ctr(u32 cpu, u32 ctr, u32 val)
65389 + phys_ctr = ctr & (NR_PHYS_CTRS - 1);
65391 + if (ps3_get_ctr_size(cpu, phys_ctr) == 16) {
65392 + phys_val = ps3_read_phys_ctr(cpu, phys_ctr);
65394 + if (ctr < NR_PHYS_CTRS)
65395 + val = (val << 16) | (phys_val & 0xffff);
65397 + val = (val & 0xffff) | (phys_val & 0xffff0000);
65400 + ps3_write_phys_ctr(cpu, phys_ctr, val);
65402 +EXPORT_SYMBOL_GPL(ps3_write_ctr);
65405 + * ps3_read_pm07_control - Read counter control registers.
65407 + * Each logical counter has a corresponding control register.
65410 +u32 ps3_read_pm07_control(u32 cpu, u32 ctr)
65414 +EXPORT_SYMBOL_GPL(ps3_read_pm07_control);
65417 + * ps3_write_pm07_control - Write counter control registers.
65419 + * Each logical counter has a corresponding control register.
65422 +void ps3_write_pm07_control(u32 cpu, u32 ctr, u32 val)
65425 + static const u64 mask = 0xFFFFFFFFFFFFFFFFULL;
65428 + if (ctr >= NR_CTRS) {
65429 + dev_dbg(sbd_core(), "%s:%u: ctr too big: %u\n", __func__,
65434 + result = lv1_set_lpm_counter_control(lpm_priv->lpm_id, ctr, val, mask,
65437 + dev_err(sbd_core(), "%s:%u: lv1_set_lpm_counter_control "
65438 + "failed: ctr %u, %s\n", __func__, __LINE__, ctr,
65439 + ps3_result(result));
65441 +EXPORT_SYMBOL_GPL(ps3_write_pm07_control);
65444 + * ps3_read_pm - Read Other LPM control registers.
65447 +u32 ps3_read_pm(u32 cpu, enum pm_reg_name reg)
65454 + return lpm_priv->shadow.pm_control;
65455 + case trace_address:
65456 + return CBE_PM_TRACE_BUF_EMPTY;
65457 + case pm_start_stop:
65458 + return lpm_priv->shadow.pm_start_stop;
65459 + case pm_interval:
65460 + return lpm_priv->shadow.pm_interval;
65461 + case group_control:
65462 + return lpm_priv->shadow.group_control;
65463 + case debug_bus_control:
65464 + return lpm_priv->shadow.debug_bus_control;
65466 + result = lv1_get_lpm_interrupt_status(lpm_priv->lpm_id,
65470 + dev_dbg(sbd_core(), "%s:%u: lv1 get_lpm_status failed: "
65471 + "reg %u, %s\n", __func__, __LINE__, reg,
65472 + ps3_result(result));
65475 + case ext_tr_timer:
65478 + dev_dbg(sbd_core(), "%s:%u: unknown reg: %d\n", __func__,
65486 +EXPORT_SYMBOL_GPL(ps3_read_pm);
65489 + * ps3_write_pm - Write Other LPM control registers.
65492 +void ps3_write_pm(u32 cpu, enum pm_reg_name reg, u32 val)
65498 + case group_control:
65499 + if (val != lpm_priv->shadow.group_control)
65500 + result = lv1_set_lpm_group_control(lpm_priv->lpm_id,
65502 + PS3_WRITE_PM_MASK,
65504 + lpm_priv->shadow.group_control = val;
65506 + case debug_bus_control:
65507 + if (val != lpm_priv->shadow.debug_bus_control)
65508 + result = lv1_set_lpm_debug_bus_control(lpm_priv->lpm_id,
65510 + PS3_WRITE_PM_MASK,
65512 + lpm_priv->shadow.debug_bus_control = val;
65515 + if (use_start_stop_bookmark)
65516 + val |= (PS3_PM_CONTROL_PPU_TH0_BOOKMARK |
65517 + PS3_PM_CONTROL_PPU_TH1_BOOKMARK);
65518 + if (val != lpm_priv->shadow.pm_control)
65519 + result = lv1_set_lpm_general_control(lpm_priv->lpm_id,
65521 + PS3_WRITE_PM_MASK,
65524 + lpm_priv->shadow.pm_control = val;
65526 + case pm_interval:
65527 + if (val != lpm_priv->shadow.pm_interval)
65528 + result = lv1_set_lpm_interval(lpm_priv->lpm_id, val,
65529 + PS3_WRITE_PM_MASK, &dummy);
65530 + lpm_priv->shadow.pm_interval = val;
65532 + case pm_start_stop:
65533 + if (val != lpm_priv->shadow.pm_start_stop)
65534 + result = lv1_set_lpm_trigger_control(lpm_priv->lpm_id,
65536 + PS3_WRITE_PM_MASK,
65538 + lpm_priv->shadow.pm_start_stop = val;
65540 + case trace_address:
65541 + case ext_tr_timer:
65545 + dev_dbg(sbd_core(), "%s:%u: unknown reg: %d\n", __func__,
65552 + dev_err(sbd_core(), "%s:%u: lv1 set_control failed: "
65553 + "reg %u, %s\n", __func__, __LINE__, reg,
65554 + ps3_result(result));
65556 +EXPORT_SYMBOL_GPL(ps3_write_pm);
65559 + * ps3_get_ctr_size - Get the size of a physical counter.
65561 + * Returns either 16 or 32.
65564 +u32 ps3_get_ctr_size(u32 cpu, u32 phys_ctr)
65568 + if (phys_ctr >= NR_PHYS_CTRS) {
65569 + dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__,
65570 + __LINE__, phys_ctr);
65574 + pm_ctrl = ps3_read_pm(cpu, pm_control);
65575 + return (pm_ctrl & CBE_PM_16BIT_CTR(phys_ctr)) ? 16 : 32;
65577 +EXPORT_SYMBOL_GPL(ps3_get_ctr_size);
65580 + * ps3_set_ctr_size - Set the size of a physical counter to 16 or 32 bits.
65583 +void ps3_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size)
65587 + if (phys_ctr >= NR_PHYS_CTRS) {
65588 + dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__,
65589 + __LINE__, phys_ctr);
65593 + pm_ctrl = ps3_read_pm(cpu, pm_control);
65595 + switch (ctr_size) {
65597 + pm_ctrl |= CBE_PM_16BIT_CTR(phys_ctr);
65598 + ps3_write_pm(cpu, pm_control, pm_ctrl);
65602 + pm_ctrl &= ~CBE_PM_16BIT_CTR(phys_ctr);
65603 + ps3_write_pm(cpu, pm_control, pm_ctrl);
65609 +EXPORT_SYMBOL_GPL(ps3_set_ctr_size);
65611 +static u64 pm_translate_signal_group_number_on_island2(u64 subgroup)
65614 + if (subgroup == 2)
65617 + if (subgroup <= 6)
65618 + return PM_ISLAND2_BASE_SIGNAL_GROUP_NUMBER + subgroup;
65619 + else if (subgroup == 7)
65620 + return PM_ISLAND2_SIGNAL_GROUP_NUMBER1;
65622 + return PM_ISLAND2_SIGNAL_GROUP_NUMBER2;
65625 +static u64 pm_translate_signal_group_number_on_island3(u64 subgroup)
65628 + switch (subgroup) {
65640 + return PM_ISLAND3_BASE_SIGNAL_GROUP_NUMBER + subgroup;
65643 +static u64 pm_translate_signal_group_number_on_island4(u64 subgroup)
65645 + return PM_ISLAND4_BASE_SIGNAL_GROUP_NUMBER + subgroup;
65648 +static u64 pm_translate_signal_group_number_on_island5(u64 subgroup)
65651 + switch (subgroup) {
65661 + return PM_ISLAND5_BASE_SIGNAL_GROUP_NUMBER + subgroup;
65664 +static u64 pm_translate_signal_group_number_on_island6(u64 subgroup,
65667 + switch (subgroup) {
65677 + switch (subsubgroup) {
65681 + subsubgroup += 2;
65687 + subsubgroup += 4;
65692 + subsubgroup += 5;
65698 + if (subgroup <= 5)
65699 + return (PM_ISLAND6_BASE_SIGNAL_GROUP_NUMBER + subgroup);
65701 + return (PM_ISLAND6_BASE_SIGNAL_GROUP_NUMBER + subgroup
65702 + + subsubgroup - 1);
65705 +static u64 pm_translate_signal_group_number_on_island7(u64 subgroup)
65707 + return PM_ISLAND7_BASE_SIGNAL_GROUP_NUMBER + subgroup;
65710 +static u64 pm_translate_signal_group_number_on_island8(u64 subgroup)
65712 + return PM_ISLAND8_BASE_SIGNAL_GROUP_NUMBER + subgroup;
65715 +static u64 pm_signal_group_to_ps3_lv1_signal_group(u64 group)
65724 + if (group < 1000) {
65725 + if (group < 100) {
65726 + if (20 <= group && group < 30) {
65728 + subgroup = group - 20;
65729 + } else if (30 <= group && group < 40) {
65731 + subgroup = group - 30;
65732 + } else if (40 <= group && group < 50) {
65734 + subgroup = group - 40;
65735 + } else if (50 <= group && group < 60) {
65737 + subgroup = group - 50;
65738 + } else if (60 <= group && group < 70) {
65740 + subgroup = group - 60;
65741 + } else if (70 <= group && group < 80) {
65743 + subgroup = group - 70;
65744 + } else if (80 <= group && group < 90) {
65746 + subgroup = group - 80;
65748 + } else if (200 <= group && group < 300) {
65750 + subgroup = group - 200;
65751 + } else if (600 <= group && group < 700) {
65754 + subsubgroup = group - 650;
65756 + } else if (6000 <= group && group < 7000) {
65759 + subsubgroup = group - 6500;
65762 + switch (island) {
65764 + return pm_translate_signal_group_number_on_island2(subgroup);
65766 + return pm_translate_signal_group_number_on_island3(subgroup);
65768 + return pm_translate_signal_group_number_on_island4(subgroup);
65770 + return pm_translate_signal_group_number_on_island5(subgroup);
65772 + return pm_translate_signal_group_number_on_island6(subgroup,
65775 + return pm_translate_signal_group_number_on_island7(subgroup);
65777 + return pm_translate_signal_group_number_on_island8(subgroup);
65779 + dev_dbg(sbd_core(), "%s:%u: island not found: %lu\n", __func__,
65780 + __LINE__, group);
65787 +static u64 pm_bus_word_to_ps3_lv1_bus_word(u8 word)
65803 +static int __ps3_set_signal(u64 lv1_signal_group, u64 bus_select,
65804 + u64 signal_select, u64 attr1, u64 attr2, u64 attr3)
65808 + ret = lv1_set_lpm_signal(lpm_priv->lpm_id, lv1_signal_group, bus_select,
65809 + signal_select, attr1, attr2, attr3);
65811 + dev_err(sbd_core(),
65812 + "%s:%u: error:%d 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx\n",
65813 + __func__, __LINE__, ret, lv1_signal_group, bus_select,
65814 + signal_select, attr1, attr2, attr3);
65819 +int ps3_set_signal(u64 signal_group, u8 signal_bit, u16 sub_unit,
65823 + u64 lv1_signal_group;
65825 + u64 signal_select;
65826 + u64 attr1, attr2, attr3;
65828 + if (signal_group == 0)
65829 + return __ps3_set_signal(0, 0, 0, 0, 0, 0);
65831 + lv1_signal_group =
65832 + pm_signal_group_to_ps3_lv1_signal_group(signal_group);
65833 + bus_select = pm_bus_word_to_ps3_lv1_bus_word(bus_word);
65835 + switch (signal_group) {
65836 + case PM_SIG_GROUP_SPU_TRIGGER:
65837 + signal_select = 1;
65838 + signal_select = signal_select << (63 - signal_bit);
65840 + case PM_SIG_GROUP_SPU_EVENT:
65841 + signal_select = 1;
65842 + signal_select = (signal_select << (63 - signal_bit)) | 0x3;
65845 + signal_select = 0;
65850 + * 0: physical object.
65851 + * 1: logical object.
65852 + * This parameter is only used for the PPE and SPE signals.
65857 + * This parameter is used to specify the target physical/logical
65858 + * PPE/SPE object.
65860 + if (PM_SIG_GROUP_SPU <= signal_group &&
65861 + signal_group < PM_SIG_GROUP_MFC_MAX)
65862 + attr2 = sub_unit;
65864 + attr2 = lpm_priv->pu_id;
65867 + * This parameter is only used for setting the SPE signal.
65871 + ret = __ps3_set_signal(lv1_signal_group, bus_select, signal_select,
65872 + attr1, attr2, attr3);
65874 + dev_err(sbd_core(), "%s:%u: __ps3_set_signal failed: %d\n",
65875 + __func__, __LINE__, ret);
65879 +EXPORT_SYMBOL_GPL(ps3_set_signal);
65881 +u32 ps3_get_hw_thread_id(int cpu)
65883 + return get_hard_smp_processor_id(cpu);
65885 +EXPORT_SYMBOL_GPL(ps3_get_hw_thread_id);
65888 + * ps3_enable_pm - Enable the entire performance monitoring unit.
65890 + * When we enable the LPM, all pending writes to counters get committed.
65893 +void ps3_enable_pm(u32 cpu)
65897 + int insert_bookmark = 0;
65899 + lpm_priv->tb_count = 0;
65901 + if (use_start_stop_bookmark) {
65902 + if (!(lpm_priv->shadow.pm_start_stop &
65903 + (PS3_PM_START_STOP_START_MASK
65904 + | PS3_PM_START_STOP_STOP_MASK))) {
65905 + result = lv1_set_lpm_trigger_control(lpm_priv->lpm_id,
65906 + (PS3_PM_START_STOP_PPU_TH0_BOOKMARK_START |
65907 + PS3_PM_START_STOP_PPU_TH1_BOOKMARK_START |
65908 + PS3_PM_START_STOP_PPU_TH0_BOOKMARK_STOP |
65909 + PS3_PM_START_STOP_PPU_TH1_BOOKMARK_STOP),
65910 + 0xFFFFFFFFFFFFFFFFULL, &tmp);
65913 + dev_err(sbd_core(), "%s:%u: "
65914 + "lv1_set_lpm_trigger_control failed: "
65915 + "%s\n", __func__, __LINE__,
65916 + ps3_result(result));
65918 + insert_bookmark = !result;
65922 + result = lv1_start_lpm(lpm_priv->lpm_id);
65925 + dev_err(sbd_core(), "%s:%u: lv1_start_lpm failed: %s\n",
65926 + __func__, __LINE__, ps3_result(result));
65928 + if (use_start_stop_bookmark && !result && insert_bookmark)
65929 + ps3_set_bookmark(get_tb() | PS3_PM_BOOKMARK_START);
65931 +EXPORT_SYMBOL_GPL(ps3_enable_pm);
65934 + * ps3_disable_pm - Disable the entire performance monitoring unit.
65937 +void ps3_disable_pm(u32 cpu)
65942 + ps3_set_bookmark(get_tb() | PS3_PM_BOOKMARK_STOP);
65944 + result = lv1_stop_lpm(lpm_priv->lpm_id, &tmp);
65947 + if(result != LV1_WRONG_STATE)
65948 + dev_err(sbd_core(), "%s:%u: lv1_stop_lpm failed: %s\n",
65949 + __func__, __LINE__, ps3_result(result));
65953 + lpm_priv->tb_count = tmp;
65955 + dev_dbg(sbd_core(), "%s:%u: tb_count %lu (%lxh)\n", __func__, __LINE__,
65956 + lpm_priv->tb_count, lpm_priv->tb_count);
65958 +EXPORT_SYMBOL_GPL(ps3_disable_pm);
65961 + * ps3_lpm_copy_tb - Copy data from the trace buffer to a kernel buffer.
65962 + * @offset: Offset in bytes from the start of the trace buffer.
65963 + * @buf: Copy destination.
65964 + * @count: Maximum count of bytes to copy.
65965 + * @bytes_copied: Pointer to a variable that will recieve the number of
65966 + * bytes copied to @buf.
65968 + * On error @buf will contain any successfully copied trace buffer data
65969 + * and bytes_copied will be set to the number of bytes successfully copied.
65972 +int ps3_lpm_copy_tb(unsigned long offset, void *buf, unsigned long count,
65973 + unsigned long *bytes_copied)
65977 + *bytes_copied = 0;
65979 + if (!lpm_priv->tb_cache)
65982 + if (offset >= lpm_priv->tb_count)
65985 + count = min(count, lpm_priv->tb_count - offset);
65987 + while (*bytes_copied < count) {
65988 + const unsigned long request = count - *bytes_copied;
65991 + result = lv1_copy_lpm_trace_buffer(lpm_priv->lpm_id, offset,
65994 + dev_dbg(sbd_core(), "%s:%u: 0x%lx bytes at 0x%lx\n",
65995 + __func__, __LINE__, request, offset);
65997 + dev_err(sbd_core(), "%s:%u: lv1_copy_lpm_trace_buffer "
65998 + "failed: %s\n", __func__, __LINE__,
65999 + ps3_result(result));
66000 + return result == LV1_WRONG_STATE ? -EBUSY : -EINVAL;
66003 + memcpy(buf, lpm_priv->tb_cache, tmp);
66005 + *bytes_copied += tmp;
66008 + dev_dbg(sbd_core(), "%s:%u: copied %lxh bytes\n", __func__, __LINE__,
66013 +EXPORT_SYMBOL_GPL(ps3_lpm_copy_tb);
66016 + * ps3_lpm_copy_tb_to_user - Copy data from the trace buffer to a user buffer.
66017 + * @offset: Offset in bytes from the start of the trace buffer.
66018 + * @buf: A __user copy destination.
66019 + * @count: Maximum count of bytes to copy.
66020 + * @bytes_copied: Pointer to a variable that will recieve the number of
66021 + * bytes copied to @buf.
66023 + * On error @buf will contain any successfully copied trace buffer data
66024 + * and bytes_copied will be set to the number of bytes successfully copied.
66027 +int ps3_lpm_copy_tb_to_user(unsigned long offset, void __user *buf,
66028 + unsigned long count, unsigned long *bytes_copied)
66032 + *bytes_copied = 0;
66034 + if (!lpm_priv->tb_cache)
66037 + if (offset >= lpm_priv->tb_count)
66040 + count = min(count, lpm_priv->tb_count - offset);
66042 + while (*bytes_copied < count) {
66043 + const unsigned long request = count - *bytes_copied;
66046 + result = lv1_copy_lpm_trace_buffer(lpm_priv->lpm_id, offset,
66049 + dev_dbg(sbd_core(), "%s:%u: 0x%lx bytes at 0x%lx\n",
66050 + __func__, __LINE__, request, offset);
66051 + dev_err(sbd_core(), "%s:%u: lv1_copy_lpm_trace_buffer "
66052 + "failed: %s\n", __func__, __LINE__,
66053 + ps3_result(result));
66054 + return result == LV1_WRONG_STATE ? -EBUSY : -EINVAL;
66057 + result = copy_to_user(buf, lpm_priv->tb_cache, tmp);
66060 + dev_dbg(sbd_core(), "%s:%u: 0x%lx bytes at 0x%p\n",
66061 + __func__, __LINE__, tmp, buf);
66062 + dev_err(sbd_core(), "%s:%u: copy_to_user failed: %d\n",
66063 + __func__, __LINE__, result);
66068 + *bytes_copied += tmp;
66071 + dev_dbg(sbd_core(), "%s:%u: copied %lxh bytes\n", __func__, __LINE__,
66076 +EXPORT_SYMBOL_GPL(ps3_lpm_copy_tb_to_user);
66079 + * ps3_get_and_clear_pm_interrupts -
66081 + * Clearing interrupts for the entire performance monitoring unit.
66082 + * Reading pm_status clears the interrupt bits.
66085 +u32 ps3_get_and_clear_pm_interrupts(u32 cpu)
66087 + return ps3_read_pm(cpu, pm_status);
66089 +EXPORT_SYMBOL_GPL(ps3_get_and_clear_pm_interrupts);
66092 + * ps3_enable_pm_interrupts -
66094 + * Enabling interrupts for the entire performance monitoring unit.
66095 + * Enables the interrupt bits in the pm_status register.
66098 +void ps3_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask)
66101 + ps3_write_pm(cpu, pm_status, mask);
66103 +EXPORT_SYMBOL_GPL(ps3_enable_pm_interrupts);
66106 + * ps3_enable_pm_interrupts -
66108 + * Disabling interrupts for the entire performance monitoring unit.
66111 +void ps3_disable_pm_interrupts(u32 cpu)
66113 + ps3_get_and_clear_pm_interrupts(cpu);
66114 + ps3_write_pm(cpu, pm_status, 0);
66116 +EXPORT_SYMBOL_GPL(ps3_disable_pm_interrupts);
66119 + * ps3_lpm_open - Open the logical performance monitor device.
66120 + * @tb_type: Specifies the type of trace buffer lv1 sould use for this lpm
66121 + * instance, specified by one of enum ps3_lpm_tb_type.
66122 + * @tb_cache: Optional user supplied buffer to use as the trace buffer cache.
66123 + * If NULL, the driver will allocate and manage an internal buffer.
66124 + * Unused when when @tb_type is PS3_LPM_TB_TYPE_NONE.
66125 + * @tb_cache_size: The size in bytes of the user supplied @tb_cache buffer.
66126 + * Unused when @tb_cache is NULL or @tb_type is PS3_LPM_TB_TYPE_NONE.
66129 +int ps3_lpm_open(enum ps3_lpm_tb_type tb_type, void *tb_cache,
66130 + u64 tb_cache_size)
66135 + BUG_ON(!lpm_priv);
66136 + BUG_ON(tb_type != PS3_LPM_TB_TYPE_NONE
66137 + && tb_type != PS3_LPM_TB_TYPE_INTERNAL);
66139 + if (tb_type == PS3_LPM_TB_TYPE_NONE && tb_cache)
66140 + dev_dbg(sbd_core(), "%s:%u: bad in vals\n", __func__, __LINE__);
66142 + if (!atomic_add_unless(&lpm_priv->open, 1, 1)) {
66143 + dev_dbg(sbd_core(), "%s:%u: busy\n", __func__, __LINE__);
66147 + /* Note tb_cache needs 128 byte alignment. */
66149 + if (tb_type == PS3_LPM_TB_TYPE_NONE) {
66150 + lpm_priv->tb_cache_size = 0;
66151 + lpm_priv->tb_cache_internal = NULL;
66152 + lpm_priv->tb_cache = NULL;
66153 + } else if (tb_cache) {
66154 + if (tb_cache != (void *)_ALIGN_UP((unsigned long)tb_cache, 128)
66155 + || tb_cache_size != _ALIGN_UP(tb_cache_size, 128)) {
66156 + dev_err(sbd_core(), "%s:%u: unaligned tb_cache\n",
66157 + __func__, __LINE__);
66158 + result = -EINVAL;
66161 + lpm_priv->tb_cache_size = tb_cache_size;
66162 + lpm_priv->tb_cache_internal = NULL;
66163 + lpm_priv->tb_cache = tb_cache;
66165 + lpm_priv->tb_cache_size = PS3_LPM_DEFAULT_TB_CACHE_SIZE;
66166 + lpm_priv->tb_cache_internal = kzalloc(
66167 + lpm_priv->tb_cache_size + 127, GFP_KERNEL);
66168 + if (!lpm_priv->tb_cache_internal) {
66169 + dev_err(sbd_core(), "%s:%u: alloc internal tb_cache "
66170 + "failed\n", __func__, __LINE__);
66171 + result = -ENOMEM;
66172 + goto fail_malloc;
66174 + lpm_priv->tb_cache = (void *)_ALIGN_UP(
66175 + (unsigned long)lpm_priv->tb_cache_internal, 128);
66178 + result = lv1_construct_lpm(lpm_priv->node_id, tb_type, 0, 0,
66179 + ps3_mm_phys_to_lpar(__pa(lpm_priv->tb_cache)),
66180 + lpm_priv->tb_cache_size, &lpm_priv->lpm_id,
66181 + &lpm_priv->outlet_id, &tb_size);
66184 + dev_err(sbd_core(), "%s:%u: lv1_construct_lpm failed: %s\n",
66185 + __func__, __LINE__, ps3_result(result));
66186 + result = -EINVAL;
66187 + goto fail_construct;
66190 + lpm_priv->shadow.pm_control = PS3_LPM_SHADOW_REG_INIT;
66191 + lpm_priv->shadow.pm_start_stop = PS3_LPM_SHADOW_REG_INIT;
66192 + lpm_priv->shadow.pm_interval = PS3_LPM_SHADOW_REG_INIT;
66193 + lpm_priv->shadow.group_control = PS3_LPM_SHADOW_REG_INIT;
66194 + lpm_priv->shadow.debug_bus_control = PS3_LPM_SHADOW_REG_INIT;
66196 + dev_dbg(sbd_core(), "%s:%u: lpm_id 0x%lx, outlet_id 0x%lx, "
66197 + "tb_size 0x%lx\n", __func__, __LINE__, lpm_priv->lpm_id,
66198 + lpm_priv->outlet_id, tb_size);
66203 + kfree(lpm_priv->tb_cache_internal);
66204 + lpm_priv->tb_cache_internal = NULL;
66207 + atomic_dec(&lpm_priv->open);
66210 +EXPORT_SYMBOL_GPL(ps3_lpm_open);
66213 + * ps3_lpm_close - Close the lpm device.
66217 +int ps3_lpm_close(void)
66219 + dev_dbg(sbd_core(), "%s:%u\n", __func__, __LINE__);
66221 + lv1_destruct_lpm(lpm_priv->lpm_id);
66222 + lpm_priv->lpm_id = 0;
66224 + kfree(lpm_priv->tb_cache_internal);
66225 + lpm_priv->tb_cache_internal = NULL;
66227 + atomic_dec(&lpm_priv->open);
66230 +EXPORT_SYMBOL_GPL(ps3_lpm_close);
66232 +static int __devinit ps3_lpm_probe(struct ps3_system_bus_device *dev)
66234 + dev_dbg(&dev->core, " -> %s:%u\n", __func__, __LINE__);
66237 + dev_info(&dev->core, "%s:%u: called twice\n",
66238 + __func__, __LINE__);
66242 + lpm_priv = kzalloc(sizeof(*lpm_priv), GFP_KERNEL);
66247 + lpm_priv->sbd = dev;
66248 + lpm_priv->node_id = dev->lpm.node_id;
66249 + lpm_priv->pu_id = dev->lpm.pu_id;
66250 + lpm_priv->rights = dev->lpm.rights;
66252 + dev_info(&dev->core, " <- %s:%u:\n", __func__, __LINE__);
66257 +static int ps3_lpm_remove(struct ps3_system_bus_device *dev)
66259 + dev_dbg(&dev->core, " -> %s:%u:\n", __func__, __LINE__);
66266 + dev_info(&dev->core, " <- %s:%u:\n", __func__, __LINE__);
66270 +static struct ps3_system_bus_driver ps3_lpm_driver = {
66271 + .match_id = PS3_MATCH_ID_LPM,
66272 + .core.name = "ps3-lpm",
66273 + .core.owner = THIS_MODULE,
66274 + .probe = ps3_lpm_probe,
66275 + .remove = ps3_lpm_remove,
66276 + .shutdown = ps3_lpm_remove,
66279 +static int __init ps3_lpm_init(void)
66281 + pr_debug("%s:%d:\n", __func__, __LINE__);
66282 + return ps3_system_bus_driver_register(&ps3_lpm_driver);
66285 +static void __exit ps3_lpm_exit(void)
66287 + pr_debug("%s:%d:\n", __func__, __LINE__);
66288 + ps3_system_bus_driver_unregister(&ps3_lpm_driver);
66291 +module_init(ps3_lpm_init);
66292 +module_exit(ps3_lpm_exit);
66294 +MODULE_LICENSE("GPL v2");
66295 +MODULE_DESCRIPTION("PS3 Logical Performance Monitor Driver");
66296 +MODULE_AUTHOR("Sony Corporation");
66297 +MODULE_ALIAS(PS3_MODULE_ALIAS_LPM);
66298 --- a/drivers/ps3/ps3-sys-manager.c
66299 +++ b/drivers/ps3/ps3-sys-manager.c
66300 @@ -452,7 +452,7 @@
66301 case PS3_SM_EVENT_THERMAL_ALERT:
66302 dev_dbg(&dev->core, "%s:%d: THERMAL_ALERT (zone %u)\n",
66303 __func__, __LINE__, event.value);
66304 - printk(KERN_INFO "PS3 Thermal Alert Zone %u\n", event.value);
66305 + pr_info("PS3 Thermal Alert Zone %u\n", event.value);
66307 case PS3_SM_EVENT_THERMAL_CLEARED:
66308 dev_dbg(&dev->core, "%s:%d: THERMAL_CLEARED (zone %u)\n",
66309 @@ -488,7 +488,7 @@
66310 result = ps3_vuart_read(dev, &cmd, sizeof(cmd));
66311 BUG_ON(result && "need to retry here");
66317 if (cmd.version != 1) {
66318 @@ -521,7 +521,7 @@
66319 result = ps3_vuart_read(dev, &header,
66320 sizeof(struct ps3_sys_manager_header));
66326 if (header.version != 1) {
66327 @@ -589,9 +589,9 @@
66328 PS3_SM_WAKE_DEFAULT);
66329 ps3_sys_manager_send_request_shutdown(dev);
66331 - printk(KERN_EMERG "System Halted, OK to turn off power\n");
66332 + pr_emerg("System Halted, OK to turn off power\n");
66336 ps3_sys_manager_handle_msg(dev);
66339 @@ -626,9 +626,9 @@
66340 PS3_SM_WAKE_DEFAULT);
66341 ps3_sys_manager_send_request_shutdown(dev);
66343 - printk(KERN_EMERG "System Halted, OK to turn off power\n");
66344 + pr_emerg("System Halted, OK to turn off power\n");
66348 ps3_sys_manager_handle_msg(dev);
66351 --- a/drivers/ps3/ps3-vuart.c
66352 +++ b/drivers/ps3/ps3-vuart.c
66353 @@ -108,18 +108,18 @@
66357 -} __attribute__ ((aligned (32)));
66358 +} __attribute__((aligned(32)));
66360 #define dump_ports_bmp(_b) _dump_ports_bmp(_b, __func__, __LINE__)
66361 static void __maybe_unused _dump_ports_bmp(
66362 - const struct ports_bmp* bmp, const char* func, int line)
66363 + const struct ports_bmp *bmp, const char *func, int line)
66365 pr_debug("%s:%d: ports_bmp: %016lxh\n", func, line, bmp->status);
66368 #define dump_port_params(_b) _dump_port_params(_b, __func__, __LINE__)
66369 static void __maybe_unused _dump_port_params(unsigned int port_number,
66370 - const char* func, int line)
66371 + const char *func, int line)
66374 static const char *strings[] = {
66375 @@ -363,7 +363,7 @@
66378 static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev,
66379 - const void* buf, unsigned int bytes, unsigned long *bytes_written)
66380 + const void *buf, unsigned int bytes, unsigned long *bytes_written)
66383 struct ps3_vuart_port_priv *priv = to_port_priv(dev);
66384 @@ -431,7 +431,7 @@
66386 struct ps3_vuart_port_priv *priv = to_port_priv(dev);
66391 result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes_waiting);
66393 @@ -526,9 +526,8 @@
66395 lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_KERNEL);
66402 memcpy(lb->data, buf, bytes);
66403 lb->head = lb->data;
66404 @@ -878,7 +877,7 @@
66405 struct vuart_bus_priv {
66406 struct ports_bmp *bmp;
66408 - struct semaphore probe_mutex;
66409 + struct mutex probe_mutex;
66411 struct ps3_system_bus_device *devices[PORT_COUNT];
66412 } static vuart_bus_priv;
66413 @@ -926,9 +925,8 @@
66415 BUG_ON(vuart_bus_priv.use_count > 2);
66417 - if (vuart_bus_priv.use_count != 1) {
66418 + if (vuart_bus_priv.use_count != 1)
66422 BUG_ON(vuart_bus_priv.bmp);
66424 @@ -1017,7 +1015,7 @@
66428 - down(&vuart_bus_priv.probe_mutex);
66429 + mutex_lock(&vuart_bus_priv.probe_mutex);
66431 result = ps3_vuart_bus_interrupt_get();
66433 @@ -1077,7 +1075,7 @@
66437 - up(&vuart_bus_priv.probe_mutex);
66438 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66442 @@ -1090,7 +1088,7 @@
66444 ps3_vuart_bus_interrupt_put();
66445 fail_setup_interrupt:
66446 - up(&vuart_bus_priv.probe_mutex);
66447 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66448 dev_dbg(&dev->core, "%s:%d: failed\n", __func__, __LINE__);
66451 @@ -1129,7 +1127,7 @@
66455 - down(&vuart_bus_priv.probe_mutex);
66456 + mutex_lock(&vuart_bus_priv.probe_mutex);
66458 dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__,
66460 @@ -1137,7 +1135,7 @@
66461 if (!dev->core.driver) {
66462 dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__,
66464 - up(&vuart_bus_priv.probe_mutex);
66465 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66469 @@ -1160,7 +1158,7 @@
66472 dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);
66473 - up(&vuart_bus_priv.probe_mutex);
66474 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66478 @@ -1180,7 +1178,7 @@
66482 - down(&vuart_bus_priv.probe_mutex);
66483 + mutex_lock(&vuart_bus_priv.probe_mutex);
66485 dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__,
66487 @@ -1188,7 +1186,7 @@
66488 if (!dev->core.driver) {
66489 dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__,
66491 - up(&vuart_bus_priv.probe_mutex);
66492 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66496 @@ -1212,7 +1210,7 @@
66498 dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);
66500 - up(&vuart_bus_priv.probe_mutex);
66501 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66505 @@ -1223,7 +1221,7 @@
66506 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
66509 - init_MUTEX(&vuart_bus_priv.probe_mutex);
66510 + mutex_init(&vuart_bus_priv.probe_mutex);
66514 --- a/drivers/serial/Kconfig
66515 +++ b/drivers/serial/Kconfig
66516 @@ -1284,4 +1284,14 @@
66517 Currently, only 8250 compatible ports are supported, but
66518 others can easily be added.
66521 + tristate "Freescale QUICC Engine serial port support"
66522 + depends on QUICC_ENGINE
66523 + select SERIAL_CORE
66527 + This driver supports the QE serial ports on Freescale embedded
66528 + PowerPC that contain a QUICC Engine.
66531 --- a/drivers/serial/Makefile
66532 +++ b/drivers/serial/Makefile
66534 obj-$(CONFIG_SERIAL_NETX) += netx-serial.o
66535 obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o
66536 obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o
66537 +obj-$(CONFIG_SERIAL_QE) += ucc_uart.o
66538 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c
66539 +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
66541 #ifdef CONFIG_PPC_CPM_NEW_BINDING
66542 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
66544 - u16 __iomem *cpcr = &cpmp->cp_cpcr;
66546 - out_be16(cpcr, port->command | (cmd << 8) | CPM_CR_FLG);
66547 - while (in_be16(cpcr) & CPM_CR_FLG)
66549 + cpm_command(port->command, cmd);
66552 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
66553 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
66554 +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
66556 #ifdef CONFIG_PPC_CPM_NEW_BINDING
66557 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
66559 - cpm_cpm2_t __iomem *cp = cpm2_map(im_cpm);
66561 - out_be32(&cp->cp_cpcr, port->command | cmd | CPM_CR_FLG);
66562 - while (in_be32(&cp->cp_cpcr) & CPM_CR_FLG)
66566 + cpm_command(port->command, cmd);
66569 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
66570 @@ -171,9 +165,9 @@
66571 * really has to get out of the driver so boards can
66572 * be supported in a sane fashion.
66574 + volatile cpmux_t *cpmux = cpm2_map(im_cpmux);
66575 #ifndef CONFIG_STX_GP3
66576 volatile iop_cpm2_t *io = cpm2_map(im_ioport);
66577 - volatile cpmux_t *cpmux = cpm2_map(im_cpmux);
66579 io->iop_pparb |= 0x008b0000;
66580 io->iop_pdirb |= 0x00880000;
66581 --- a/drivers/serial/mpc52xx_uart.c
66582 +++ b/drivers/serial/mpc52xx_uart.c
66584 * DCD. However, the pin multiplexing aren't changed and should be set either
66585 * by the bootloader or in the platform init code.
66587 - * The idx field must be equal to the PSC index ( e.g. 0 for PSC1, 1 for PSC2,
66588 + * The idx field must be equal to the PSC index (e.g. 0 for PSC1, 1 for PSC2,
66589 * and so on). So the PSC1 is mapped to /dev/ttyPSC0, PSC2 to /dev/ttyPSC1 and
66590 * so on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly
66591 * fpr the console code : without this 1:1 mapping, at early boot time, when we
66592 @@ -68,11 +68,12 @@
66593 #include <linux/sysrq.h>
66594 #include <linux/console.h>
66596 -#include <asm/delay.h>
66597 -#include <asm/io.h>
66598 +#include <linux/delay.h>
66599 +#include <linux/io.h>
66601 #if defined(CONFIG_PPC_MERGE)
66602 -#include <asm/of_platform.h>
66603 +#include <linux/of.h>
66604 +#include <linux/of_platform.h>
66606 #include <linux/platform_device.h>
66608 @@ -111,16 +112,18 @@
66611 #define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase))
66612 +#define FIFO(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1))
66615 /* Forward declaration of the interruption handling routine */
66616 -static irqreturn_t mpc52xx_uart_int(int irq,void *dev_id);
66617 +static irqreturn_t mpc52xx_uart_int(int irq, void *dev_id);
66620 /* Simple macro to test if a port is console or not. This one is taken
66621 * for serial_core.c and maybe should be moved to serial_core.h ? */
66622 #ifdef CONFIG_SERIAL_CORE_CONSOLE
66623 -#define uart_console(port) ((port)->cons && (port)->cons->index == (port)->line)
66624 +#define uart_console(port) \
66625 + ((port)->cons && (port)->cons->index == (port)->line)
66627 #define uart_console(port) (0)
66629 @@ -162,7 +165,7 @@
66631 /* port->lock taken by caller */
66632 port->read_status_mask &= ~MPC52xx_PSC_IMR_TXRDY;
66633 - out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
66634 + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
66638 @@ -170,7 +173,7 @@
66640 /* port->lock taken by caller */
66641 port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY;
66642 - out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
66643 + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
66647 @@ -184,7 +187,7 @@
66648 /* Make sure tx interrupts are on */
66649 /* Truly necessary ??? They should be anyway */
66650 port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY;
66651 - out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
66652 + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
66655 spin_unlock_irqrestore(&port->lock, flags);
66656 @@ -195,7 +198,7 @@
66658 /* port->lock taken by caller */
66659 port->read_status_mask &= ~MPC52xx_PSC_IMR_RXRDY;
66660 - out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
66661 + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
66665 @@ -210,10 +213,10 @@
66666 unsigned long flags;
66667 spin_lock_irqsave(&port->lock, flags);
66670 - out_8(&PSC(port)->command,MPC52xx_PSC_START_BRK);
66672 + out_8(&PSC(port)->command, MPC52xx_PSC_START_BRK);
66674 - out_8(&PSC(port)->command,MPC52xx_PSC_STOP_BRK);
66675 + out_8(&PSC(port)->command, MPC52xx_PSC_STOP_BRK);
66677 spin_unlock_irqrestore(&port->lock, flags);
66679 @@ -222,6 +225,7 @@
66680 mpc52xx_uart_startup(struct uart_port *port)
66682 struct mpc52xx_psc __iomem *psc = PSC(port);
66683 + struct mpc52xx_psc_fifo __iomem *fifo = FIFO(port);
66687 @@ -231,23 +235,23 @@
66690 /* Reset/activate the port, clear and enable interrupts */
66691 - out_8(&psc->command,MPC52xx_PSC_RST_RX);
66692 - out_8(&psc->command,MPC52xx_PSC_RST_TX);
66693 + out_8(&psc->command, MPC52xx_PSC_RST_RX);
66694 + out_8(&psc->command, MPC52xx_PSC_RST_TX);
66696 - out_be32(&psc->sicr,0); /* UART mode DCD ignored */
66697 + out_be32(&psc->sicr, 0); /* UART mode DCD ignored */
66699 out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00); /* /16 prescaler on */
66701 - out_8(&psc->rfcntl, 0x00);
66702 - out_be16(&psc->rfalarm, 0x1ff);
66703 - out_8(&psc->tfcntl, 0x07);
66704 - out_be16(&psc->tfalarm, 0x80);
66705 + out_8(&fifo->rfcntl, 0x00);
66706 + out_be16(&fifo->rfalarm, 0x1ff);
66707 + out_8(&fifo->tfcntl, 0x07);
66708 + out_be16(&fifo->tfalarm, 0x80);
66710 port->read_status_mask |= MPC52xx_PSC_IMR_RXRDY | MPC52xx_PSC_IMR_TXRDY;
66711 - out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);
66712 + out_be16(&psc->mpc52xx_psc_imr, port->read_status_mask);
66714 - out_8(&psc->command,MPC52xx_PSC_TX_ENABLE);
66715 - out_8(&psc->command,MPC52xx_PSC_RX_ENABLE);
66716 + out_8(&psc->command, MPC52xx_PSC_TX_ENABLE);
66717 + out_8(&psc->command, MPC52xx_PSC_RX_ENABLE);
66721 @@ -258,12 +262,12 @@
66722 struct mpc52xx_psc __iomem *psc = PSC(port);
66724 /* Shut down the port. Leave TX active if on a console port */
66725 - out_8(&psc->command,MPC52xx_PSC_RST_RX);
66726 + out_8(&psc->command, MPC52xx_PSC_RST_RX);
66727 if (!uart_console(port))
66728 - out_8(&psc->command,MPC52xx_PSC_RST_TX);
66729 + out_8(&psc->command, MPC52xx_PSC_RST_TX);
66731 port->read_status_mask = 0;
66732 - out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);
66733 + out_be16(&psc->mpc52xx_psc_imr, port->read_status_mask);
66735 /* Release interrupt */
66736 free_irq(port->irq, port);
66737 @@ -271,7 +275,7 @@
66740 mpc52xx_uart_set_termios(struct uart_port *port, struct ktermios *new,
66741 - struct ktermios *old)
66742 + struct ktermios *old)
66744 struct mpc52xx_psc __iomem *psc = PSC(port);
66745 unsigned long flags;
66746 @@ -283,14 +287,14 @@
66749 switch (new->c_cflag & CSIZE) {
66750 - case CS5: mr1 |= MPC52xx_PSC_MODE_5_BITS;
66752 - case CS6: mr1 |= MPC52xx_PSC_MODE_6_BITS;
66754 - case CS7: mr1 |= MPC52xx_PSC_MODE_7_BITS;
66757 - default: mr1 |= MPC52xx_PSC_MODE_8_BITS;
66758 + case CS5: mr1 |= MPC52xx_PSC_MODE_5_BITS;
66760 + case CS6: mr1 |= MPC52xx_PSC_MODE_6_BITS;
66762 + case CS7: mr1 |= MPC52xx_PSC_MODE_7_BITS;
66765 + default: mr1 |= MPC52xx_PSC_MODE_8_BITS;
66768 if (new->c_cflag & PARENB) {
66769 @@ -332,24 +336,24 @@
66773 - printk( KERN_ERR "mpc52xx_uart.c: "
66774 + printk(KERN_ERR "mpc52xx_uart.c: "
66775 "Unable to flush RX & TX fifos in-time in set_termios."
66776 - "Some chars may have been lost.\n" );
66777 + "Some chars may have been lost.\n");
66779 /* Reset the TX & RX */
66780 - out_8(&psc->command,MPC52xx_PSC_RST_RX);
66781 - out_8(&psc->command,MPC52xx_PSC_RST_TX);
66782 + out_8(&psc->command, MPC52xx_PSC_RST_RX);
66783 + out_8(&psc->command, MPC52xx_PSC_RST_TX);
66785 /* Send new mode settings */
66786 - out_8(&psc->command,MPC52xx_PSC_SEL_MODE_REG_1);
66787 - out_8(&psc->mode,mr1);
66788 - out_8(&psc->mode,mr2);
66789 - out_8(&psc->ctur,ctr >> 8);
66790 - out_8(&psc->ctlr,ctr & 0xff);
66791 + out_8(&psc->command, MPC52xx_PSC_SEL_MODE_REG_1);
66792 + out_8(&psc->mode, mr1);
66793 + out_8(&psc->mode, mr2);
66794 + out_8(&psc->ctur, ctr >> 8);
66795 + out_8(&psc->ctlr, ctr & 0xff);
66797 /* Reenable TX & RX */
66798 - out_8(&psc->command,MPC52xx_PSC_TX_ENABLE);
66799 - out_8(&psc->command,MPC52xx_PSC_RX_ENABLE);
66800 + out_8(&psc->command, MPC52xx_PSC_TX_ENABLE);
66801 + out_8(&psc->command, MPC52xx_PSC_RX_ENABLE);
66803 /* We're all set, release the lock */
66804 spin_unlock_irqrestore(&port->lock, flags);
66805 @@ -364,7 +368,8 @@
66807 mpc52xx_uart_release_port(struct uart_port *port)
66809 - if (port->flags & UPF_IOREMAP) { /* remapped by us ? */
66810 + /* remapped by us ? */
66811 + if (port->flags & UPF_IOREMAP) {
66812 iounmap(port->membase);
66813 port->membase = NULL;
66815 @@ -379,7 +384,7 @@
66817 if (port->flags & UPF_IOREMAP) /* Need to remap ? */
66818 port->membase = ioremap(port->mapbase,
66819 - sizeof(struct mpc52xx_psc));
66820 + sizeof(struct mpc52xx_psc));
66822 if (!port->membase)
66824 @@ -398,22 +403,22 @@
66826 mpc52xx_uart_config_port(struct uart_port *port, int flags)
66828 - if ( (flags & UART_CONFIG_TYPE) &&
66829 - (mpc52xx_uart_request_port(port) == 0) )
66830 - port->type = PORT_MPC52xx;
66831 + if ((flags & UART_CONFIG_TYPE)
66832 + && (mpc52xx_uart_request_port(port) == 0))
66833 + port->type = PORT_MPC52xx;
66837 mpc52xx_uart_verify_port(struct uart_port *port, struct serial_struct *ser)
66839 - if ( ser->type != PORT_UNKNOWN && ser->type != PORT_MPC52xx )
66840 + if (ser->type != PORT_UNKNOWN && ser->type != PORT_MPC52xx)
66843 - if ( (ser->irq != port->irq) ||
66844 - (ser->io_type != SERIAL_IO_MEM) ||
66845 - (ser->baud_base != port->uartclk) ||
66846 - (ser->iomem_base != (void*)port->mapbase) ||
66847 - (ser->hub6 != 0 ) )
66848 + if ((ser->irq != port->irq) ||
66849 + (ser->io_type != SERIAL_IO_MEM) ||
66850 + (ser->baud_base != port->uartclk) ||
66851 + (ser->iomem_base != (void *)port->mapbase) ||
66852 + (ser->hub6 != 0))
66856 @@ -455,8 +460,8 @@
66857 unsigned short status;
66859 /* While we can read, do so ! */
66860 - while ( (status = in_be16(&PSC(port)->mpc52xx_psc_status)) &
66861 - MPC52xx_PSC_SR_RXRDY) {
66862 + while ((status = in_be16(&PSC(port)->mpc52xx_psc_status)) &
66863 + MPC52xx_PSC_SR_RXRDY) {
66866 ch = in_8(&PSC(port)->mpc52xx_psc_buffer_8);
66867 @@ -474,9 +479,9 @@
66871 - if ( status & (MPC52xx_PSC_SR_PE |
66872 - MPC52xx_PSC_SR_FE |
66873 - MPC52xx_PSC_SR_RB) ) {
66874 + if (status & (MPC52xx_PSC_SR_PE |
66875 + MPC52xx_PSC_SR_FE |
66876 + MPC52xx_PSC_SR_RB)) {
66878 if (status & MPC52xx_PSC_SR_RB) {
66880 @@ -487,7 +492,7 @@
66883 /* Clear error condition */
66884 - out_8(&PSC(port)->command,MPC52xx_PSC_RST_ERR_STAT);
66885 + out_8(&PSC(port)->command, MPC52xx_PSC_RST_ERR_STAT);
66888 tty_insert_flip_char(tty, ch, flag);
66889 @@ -568,16 +573,16 @@
66891 /* Do we need to receive chars ? */
66892 /* For this RX interrupts must be on and some chars waiting */
66893 - if ( status & MPC52xx_PSC_IMR_RXRDY )
66894 + if (status & MPC52xx_PSC_IMR_RXRDY)
66895 keepgoing |= mpc52xx_uart_int_rx_chars(port);
66897 /* Do we need to send chars ? */
66898 /* For this, TX must be ready and TX interrupt enabled */
66899 - if ( status & MPC52xx_PSC_IMR_TXRDY )
66900 + if (status & MPC52xx_PSC_IMR_TXRDY)
66901 keepgoing |= mpc52xx_uart_int_tx_chars(port);
66903 /* Limit number of iteration */
66908 } while (keepgoing);
66909 @@ -596,7 +601,7 @@
66912 mpc52xx_console_get_options(struct uart_port *port,
66913 - int *baud, int *parity, int *bits, int *flow)
66914 + int *baud, int *parity, int *bits, int *flow)
66916 struct mpc52xx_psc __iomem *psc = PSC(port);
66918 @@ -604,7 +609,7 @@
66919 pr_debug("mpc52xx_console_get_options(port=%p)\n", port);
66921 /* Read the mode registers */
66922 - out_8(&psc->command,MPC52xx_PSC_SEL_MODE_REG_1);
66923 + out_8(&psc->command, MPC52xx_PSC_SEL_MODE_REG_1);
66924 mr1 = in_8(&psc->mode);
66926 /* CT{U,L}R are write-only ! */
66927 @@ -616,11 +621,18 @@
66930 switch (mr1 & MPC52xx_PSC_MODE_BITS_MASK) {
66931 - case MPC52xx_PSC_MODE_5_BITS: *bits = 5; break;
66932 - case MPC52xx_PSC_MODE_6_BITS: *bits = 6; break;
66933 - case MPC52xx_PSC_MODE_7_BITS: *bits = 7; break;
66934 - case MPC52xx_PSC_MODE_8_BITS:
66935 - default: *bits = 8;
66936 + case MPC52xx_PSC_MODE_5_BITS:
66939 + case MPC52xx_PSC_MODE_6_BITS:
66942 + case MPC52xx_PSC_MODE_7_BITS:
66945 + case MPC52xx_PSC_MODE_8_BITS:
66950 if (mr1 & MPC52xx_PSC_MODE_PARNONE)
66951 @@ -657,7 +669,7 @@
66952 /* Wait the TX buffer to be empty */
66953 j = 20000; /* Maximum wait */
66954 while (!(in_be16(&psc->mpc52xx_psc_status) &
66955 - MPC52xx_PSC_SR_TXEMP) && --j)
66956 + MPC52xx_PSC_SR_TXEMP) && --j)
66960 @@ -730,16 +742,18 @@
66963 pr_debug("Console on ttyPSC%x is %s\n",
66964 - co->index, mpc52xx_uart_nodes[co->index]->full_name);
66965 + co->index, mpc52xx_uart_nodes[co->index]->full_name);
66967 /* Fetch register locations */
66968 - if ((ret = of_address_to_resource(np, 0, &res)) != 0) {
66969 + ret = of_address_to_resource(np, 0, &res);
66971 pr_debug("Could not get resources for PSC%x\n", co->index);
66975 /* Search for bus-frequency property in this node or a parent */
66976 - if ((ipb_freq = mpc52xx_find_ipb_freq(np)) == 0) {
66977 + ipb_freq = mpc52xx_find_ipb_freq(np);
66978 + if (ipb_freq == 0) {
66979 pr_debug("Could not find IPB bus frequency!\n");
66982 @@ -757,7 +771,8 @@
66985 pr_debug("mpc52xx-psc uart at %p, mapped to %p, irq=%x, freq=%i\n",
66986 - (void*)port->mapbase, port->membase, port->irq, port->uartclk);
66987 + (void *)port->mapbase, port->membase,
66988 + port->irq, port->uartclk);
66990 /* Setup the port parameters accoding to options */
66992 @@ -766,7 +781,7 @@
66993 mpc52xx_console_get_options(port, &baud, &parity, &bits, &flow);
66995 pr_debug("Setting console parameters: %i %i%c1 flow=%c\n",
66996 - baud, bits, parity, flow);
66997 + baud, bits, parity, flow);
66999 return uart_set_options(port, co, baud, parity, bits, flow);
67001 @@ -781,7 +796,7 @@
67002 .device = uart_console_device,
67003 .setup = mpc52xx_console_setup,
67004 .flags = CON_PRINTBUFFER,
67005 - .index = -1, /* Specified on the cmdline (e.g. console=ttyPSC0 ) */
67006 + .index = -1, /* Specified on the cmdline (e.g. console=ttyPSC0) */
67007 .data = &mpc52xx_uart_driver,
67010 @@ -809,7 +824,6 @@
67011 /* ======================================================================== */
67013 static struct uart_driver mpc52xx_uart_driver = {
67014 - .owner = THIS_MODULE,
67015 .driver_name = "mpc52xx_psc_uart",
67016 .dev_name = "ttyPSC",
67017 .major = SERIAL_PSC_MAJOR,
67018 @@ -837,7 +851,7 @@
67019 if (idx < 0 || idx >= MPC52xx_PSC_MAXNUM)
67022 - if (!mpc52xx_match_psc_function(idx,"uart"))
67023 + if (!mpc52xx_match_psc_function(idx, "uart"))
67026 /* Init the port structure */
67027 @@ -848,13 +862,13 @@
67028 port->fifosize = 512;
67029 port->iotype = UPIO_MEM;
67030 port->flags = UPF_BOOT_AUTOCONF |
67031 - ( uart_console(port) ? 0 : UPF_IOREMAP );
67032 + (uart_console(port) ? 0 : UPF_IOREMAP);
67034 port->ops = &mpc52xx_uart_ops;
67035 port->dev = &dev->dev;
67037 /* Search for IRQ and mapbase */
67038 - for (i=0 ; i<dev->num_resources ; i++, res++) {
67039 + for (i = 0 ; i < dev->num_resources ; i++, res++) {
67040 if (res->flags & IORESOURCE_MEM)
67041 port->mapbase = res->start;
67042 else if (res->flags & IORESOURCE_IRQ)
67043 @@ -866,7 +880,7 @@
67044 /* Add the port to the uart sub-system */
67045 ret = uart_add_one_port(&mpc52xx_uart_driver, port);
67047 - platform_set_drvdata(dev, (void*)port);
67048 + platform_set_drvdata(dev, (void *)port);
67052 @@ -917,6 +931,7 @@
67053 .resume = mpc52xx_uart_resume,
67056 + .owner = THIS_MODULE,
67057 .name = "mpc52xx-psc",
67060 @@ -946,10 +961,11 @@
67061 if (idx >= MPC52xx_PSC_MAXNUM)
67063 pr_debug("Found %s assigned to ttyPSC%x\n",
67064 - mpc52xx_uart_nodes[idx]->full_name, idx);
67065 + mpc52xx_uart_nodes[idx]->full_name, idx);
67067 /* Search for bus-frequency property in this node or a parent */
67068 - if ((ipb_freq = mpc52xx_find_ipb_freq(op->node)) == 0) {
67069 + ipb_freq = mpc52xx_find_ipb_freq(op->node);
67070 + if (ipb_freq == 0) {
67071 dev_dbg(&op->dev, "Could not find IPB bus frequency!\n");
67074 @@ -962,22 +978,23 @@
67075 port->fifosize = 512;
67076 port->iotype = UPIO_MEM;
67077 port->flags = UPF_BOOT_AUTOCONF |
67078 - ( uart_console(port) ? 0 : UPF_IOREMAP );
67079 + (uart_console(port) ? 0 : UPF_IOREMAP);
67081 port->ops = &mpc52xx_uart_ops;
67082 port->dev = &op->dev;
67084 /* Search for IRQ and mapbase */
67085 - if ((ret = of_address_to_resource(op->node, 0, &res)) != 0)
67086 + ret = of_address_to_resource(op->node, 0, &res);
67090 port->mapbase = res.start;
67091 port->irq = irq_of_parse_and_map(op->node, 0);
67093 dev_dbg(&op->dev, "mpc52xx-psc uart at %p, irq=%x, freq=%i\n",
67094 - (void*)port->mapbase, port->irq, port->uartclk);
67095 + (void *)port->mapbase, port->irq, port->uartclk);
67097 - if ((port->irq==NO_IRQ) || !port->mapbase) {
67098 + if ((port->irq == NO_IRQ) || !port->mapbase) {
67099 printk(KERN_ERR "Could not allocate resources for PSC\n");
67102 @@ -985,7 +1002,7 @@
67103 /* Add the port to the uart sub-system */
67104 ret = uart_add_one_port(&mpc52xx_uart_driver, port);
67106 - dev_set_drvdata(&op->dev, (void*)port);
67107 + dev_set_drvdata(&op->dev, (void *)port);
67111 @@ -1048,6 +1065,7 @@
67113 return; /* No free slot; abort */
67116 /* If the slot is already occupied, then swap slots */
67117 if (mpc52xx_uart_nodes[idx] && (free_idx != -1))
67118 mpc52xx_uart_nodes[free_idx] = mpc52xx_uart_nodes[idx];
67119 @@ -1057,7 +1075,7 @@
67121 mpc52xx_uart_of_enumerate(void)
67123 - static int enum_done = 0;
67124 + static int enum_done;
67125 struct device_node *np;
67126 const unsigned int *devno;
67128 @@ -1071,7 +1089,7 @@
67130 /* Is a particular device number requested? */
67131 devno = of_get_property(np, "port-number", NULL);
67132 - mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1);
67133 + mpc52xx_uart_of_assign(np, devno ? *devno : -1);
67137 @@ -1079,15 +1097,13 @@
67138 for (i = 0; i < MPC52xx_PSC_MAXNUM; i++) {
67139 if (mpc52xx_uart_nodes[i])
67140 pr_debug("%s assigned to ttyPSC%x\n",
67141 - mpc52xx_uart_nodes[i]->full_name, i);
67142 + mpc52xx_uart_nodes[i]->full_name, i);
67146 MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match);
67148 static struct of_platform_driver mpc52xx_uart_of_driver = {
67149 - .owner = THIS_MODULE,
67150 - .name = "mpc52xx-psc-uart",
67151 .match_table = mpc52xx_uart_of_match,
67152 .probe = mpc52xx_uart_of_probe,
67153 .remove = mpc52xx_uart_of_remove,
67154 @@ -1113,7 +1129,8 @@
67156 printk(KERN_INFO "Serial: MPC52xx PSC UART driver\n");
67158 - if ((ret = uart_register_driver(&mpc52xx_uart_driver)) != 0) {
67159 + ret = uart_register_driver(&mpc52xx_uart_driver);
67161 printk(KERN_ERR "%s: uart_register_driver failed (%i)\n",
67164 --- a/drivers/serial/uartlite.c
67165 +++ b/drivers/serial/uartlite.c
67166 @@ -539,7 +539,7 @@
67168 * @dev: pointer to device structure
67170 -static int __devinit ulite_release(struct device *dev)
67171 +static int __devexit ulite_release(struct device *dev)
67173 struct uart_port *port = dev_get_drvdata(dev);
67175 @@ -572,14 +572,14 @@
67176 return ulite_assign(&pdev->dev, pdev->id, res->start, res2->start);
67179 -static int ulite_remove(struct platform_device *pdev)
67180 +static int __devexit ulite_remove(struct platform_device *pdev)
67182 return ulite_release(&pdev->dev);
67185 static struct platform_driver ulite_platform_driver = {
67186 .probe = ulite_probe,
67187 - .remove = ulite_remove,
67188 + .remove = __devexit_p(ulite_remove),
67190 .owner = THIS_MODULE,
67191 .name = "uartlite",
67193 +++ b/drivers/serial/ucc_uart.c
67196 + * Freescale QUICC Engine UART device driver
67198 + * Author: Timur Tabi <timur@freescale.com>
67200 + * Copyright 2007 Freescale Semiconductor, Inc. This file is licensed under
67201 + * the terms of the GNU General Public License version 2. This program
67202 + * is licensed "as is" without any warranty of any kind, whether express
67205 + * This driver adds support for UART devices via Freescale's QUICC Engine
67206 + * found on some Freescale SOCs.
67208 + * If Soft-UART support is needed but not already present, then this driver
67209 + * will request and upload the "Soft-UART" microcode upon probe. The
67210 + * filename of the microcode should be fsl_qe_ucode_uart_X_YZ.bin, where "X"
67211 + * is the name of the SOC (e.g. 8323), and YZ is the revision of the SOC,
67212 + * (e.g. "11" for 1.1).
67215 +#include <linux/module.h>
67216 +#include <linux/serial.h>
67217 +#include <linux/serial_core.h>
67218 +#include <linux/io.h>
67219 +#include <linux/of_platform.h>
67220 +#include <linux/dma-mapping.h>
67222 +#include <linux/fs_uart_pd.h>
67223 +#include <asm/ucc_slow.h>
67225 +#include <linux/firmware.h>
67226 +#include <asm/reg.h>
67229 + * The GUMR flag for Soft UART. This would normally be defined in qe.h,
67230 + * but Soft-UART is a hack and we want to keep everything related to it in
67233 +#define UCC_SLOW_GUMR_H_SUART 0x00004000 /* Soft-UART */
67236 + * soft_uart is 1 if we need to use Soft-UART mode
67238 +static int soft_uart;
67240 + * firmware_loaded is 1 if the firmware has been loaded, 0 otherwise.
67242 +static int firmware_loaded;
67244 +/* Enable this macro to configure all serial ports in internal loopback
67246 +/* #define LOOPBACK */
67248 +/* The major and minor device numbers are defined in
67249 + * http://www.lanana.org/docs/device-list/devices-2.6+.txt. For the QE
67250 + * UART, we have major number 204 and minor numbers 46 - 49, which are the
67251 + * same as for the CPM2. This decision was made because no Freescale part
67252 + * has both a CPM and a QE.
67254 +#define SERIAL_QE_MAJOR 204
67255 +#define SERIAL_QE_MINOR 46
67257 +/* Since we only have minor numbers 46 - 49, there is a hard limit of 4 ports */
67258 +#define UCC_MAX_UART 4
67260 +/* The number of buffer descriptors for receiving characters. */
67261 +#define RX_NUM_FIFO 4
67263 +/* The number of buffer descriptors for transmitting characters. */
67264 +#define TX_NUM_FIFO 4
67266 +/* The maximum size of the character buffer for a single RX BD. */
67267 +#define RX_BUF_SIZE 32
67269 +/* The maximum size of the character buffer for a single TX BD. */
67270 +#define TX_BUF_SIZE 32
67273 + * The number of jiffies to wait after receiving a close command before the
67274 + * device is actually closed. This allows the last few characters to be
67275 + * sent over the wire.
67277 +#define UCC_WAIT_CLOSING 100
67279 +struct ucc_uart_pram {
67280 + struct ucc_slow_pram common;
67281 + u8 res1[8]; /* reserved */
67282 + __be16 maxidl; /* Maximum idle chars */
67283 + __be16 idlc; /* temp idle counter */
67284 + __be16 brkcr; /* Break count register */
67285 + __be16 parec; /* receive parity error counter */
67286 + __be16 frmec; /* receive framing error counter */
67287 + __be16 nosec; /* receive noise counter */
67288 + __be16 brkec; /* receive break condition counter */
67289 + __be16 brkln; /* last received break length */
67290 + __be16 uaddr[2]; /* UART address character 1 & 2 */
67291 + __be16 rtemp; /* Temp storage */
67292 + __be16 toseq; /* Transmit out of sequence char */
67293 + __be16 cchars[8]; /* control characters 1-8 */
67294 + __be16 rccm; /* receive control character mask */
67295 + __be16 rccr; /* receive control character register */
67296 + __be16 rlbc; /* receive last break character */
67297 + __be16 res2; /* reserved */
67298 + __be32 res3; /* reserved, should be cleared */
67299 + u8 res4; /* reserved, should be cleared */
67300 + u8 res5[3]; /* reserved, should be cleared */
67301 + __be32 res6; /* reserved, should be cleared */
67302 + __be32 res7; /* reserved, should be cleared */
67303 + __be32 res8; /* reserved, should be cleared */
67304 + __be32 res9; /* reserved, should be cleared */
67305 + __be32 res10; /* reserved, should be cleared */
67306 + __be32 res11; /* reserved, should be cleared */
67307 + __be32 res12; /* reserved, should be cleared */
67308 + __be32 res13; /* reserved, should be cleared */
67309 +/* The rest is for Soft-UART only */
67310 + __be16 supsmr; /* 0x90, Shadow UPSMR */
67311 + __be16 res92; /* 0x92, reserved, initialize to 0 */
67312 + __be32 rx_state; /* 0x94, RX state, initialize to 0 */
67313 + __be32 rx_cnt; /* 0x98, RX count, initialize to 0 */
67314 + u8 rx_length; /* 0x9C, Char length, set to 1+CL+PEN+1+SL */
67315 + u8 rx_bitmark; /* 0x9D, reserved, initialize to 0 */
67316 + u8 rx_temp_dlst_qe; /* 0x9E, reserved, initialize to 0 */
67317 + u8 res14[0xBC - 0x9F]; /* reserved */
67318 + __be32 dump_ptr; /* 0xBC, Dump pointer */
67319 + __be32 rx_frame_rem; /* 0xC0, reserved, initialize to 0 */
67320 + u8 rx_frame_rem_size; /* 0xC4, reserved, initialize to 0 */
67321 + u8 tx_mode; /* 0xC5, mode, 0=AHDLC, 1=UART */
67322 + __be16 tx_state; /* 0xC6, TX state */
67323 + u8 res15[0xD0 - 0xC8]; /* reserved */
67324 + __be32 resD0; /* 0xD0, reserved, initialize to 0 */
67325 + u8 resD4; /* 0xD4, reserved, initialize to 0 */
67326 + __be16 resD5; /* 0xD5, reserved, initialize to 0 */
67327 +} __attribute__ ((packed));
67329 +/* SUPSMR definitions, for Soft-UART only */
67330 +#define UCC_UART_SUPSMR_SL 0x8000
67331 +#define UCC_UART_SUPSMR_RPM_MASK 0x6000
67332 +#define UCC_UART_SUPSMR_RPM_ODD 0x0000
67333 +#define UCC_UART_SUPSMR_RPM_LOW 0x2000
67334 +#define UCC_UART_SUPSMR_RPM_EVEN 0x4000
67335 +#define UCC_UART_SUPSMR_RPM_HIGH 0x6000
67336 +#define UCC_UART_SUPSMR_PEN 0x1000
67337 +#define UCC_UART_SUPSMR_TPM_MASK 0x0C00
67338 +#define UCC_UART_SUPSMR_TPM_ODD 0x0000
67339 +#define UCC_UART_SUPSMR_TPM_LOW 0x0400
67340 +#define UCC_UART_SUPSMR_TPM_EVEN 0x0800
67341 +#define UCC_UART_SUPSMR_TPM_HIGH 0x0C00
67342 +#define UCC_UART_SUPSMR_FRZ 0x0100
67343 +#define UCC_UART_SUPSMR_UM_MASK 0x00c0
67344 +#define UCC_UART_SUPSMR_UM_NORMAL 0x0000
67345 +#define UCC_UART_SUPSMR_UM_MAN_MULTI 0x0040
67346 +#define UCC_UART_SUPSMR_UM_AUTO_MULTI 0x00c0
67347 +#define UCC_UART_SUPSMR_CL_MASK 0x0030
67348 +#define UCC_UART_SUPSMR_CL_8 0x0030
67349 +#define UCC_UART_SUPSMR_CL_7 0x0020
67350 +#define UCC_UART_SUPSMR_CL_6 0x0010
67351 +#define UCC_UART_SUPSMR_CL_5 0x0000
67353 +#define UCC_UART_TX_STATE_AHDLC 0x00
67354 +#define UCC_UART_TX_STATE_UART 0x01
67355 +#define UCC_UART_TX_STATE_X1 0x00
67356 +#define UCC_UART_TX_STATE_X16 0x80
67358 +#define UCC_UART_PRAM_ALIGNMENT 0x100
67360 +#define UCC_UART_SIZE_OF_BD UCC_SLOW_SIZE_OF_BD
67361 +#define NUM_CONTROL_CHARS 8
67363 +/* Private per-port data structure */
67364 +struct uart_qe_port {
67365 + struct uart_port port;
67366 + struct ucc_slow __iomem *uccp;
67367 + struct ucc_uart_pram __iomem *uccup;
67368 + struct ucc_slow_info us_info;
67369 + struct ucc_slow_private *us_private;
67370 + struct device_node *np;
67371 + unsigned int ucc_num; /* First ucc is 0, not 1 */
67377 + int wait_closing;
67379 + struct qe_bd *rx_bd_base;
67380 + struct qe_bd *rx_cur;
67381 + struct qe_bd *tx_bd_base;
67382 + struct qe_bd *tx_cur;
67383 + unsigned char *tx_buf;
67384 + unsigned char *rx_buf;
67385 + void *bd_virt; /* virtual address of the BD buffers */
67386 + dma_addr_t bd_dma_addr; /* bus address of the BD buffers */
67387 + unsigned int bd_size; /* size of BD buffer space */
67390 +static struct uart_driver ucc_uart_driver = {
67391 + .owner = THIS_MODULE,
67392 + .driver_name = "serial",
67393 + .dev_name = "ttyQE",
67394 + .major = SERIAL_QE_MAJOR,
67395 + .minor = SERIAL_QE_MINOR,
67396 + .nr = UCC_MAX_UART,
67400 + * Virtual to physical address translation.
67402 + * Given the virtual address for a character buffer, this function returns
67403 + * the physical (DMA) equivalent.
67405 +static inline dma_addr_t cpu2qe_addr(void *addr, struct uart_qe_port *qe_port)
67407 + if (likely((addr >= qe_port->bd_virt)) &&
67408 + (addr < (qe_port->bd_virt + qe_port->bd_size)))
67409 + return qe_port->bd_dma_addr + (addr - qe_port->bd_virt);
67411 + /* something nasty happened */
67412 + printk(KERN_ERR "%s: addr=%p\n", __FUNCTION__, addr);
67418 + * Physical to virtual address translation.
67420 + * Given the physical (DMA) address for a character buffer, this function
67421 + * returns the virtual equivalent.
67423 +static inline void *qe2cpu_addr(dma_addr_t addr, struct uart_qe_port *qe_port)
67425 + /* sanity check */
67426 + if (likely((addr >= qe_port->bd_dma_addr) &&
67427 + (addr < (qe_port->bd_dma_addr + qe_port->bd_size))))
67428 + return qe_port->bd_virt + (addr - qe_port->bd_dma_addr);
67430 + /* something nasty happened */
67431 + printk(KERN_ERR "%s: addr=%x\n", __FUNCTION__, addr);
67437 + * Return 1 if the QE is done transmitting all buffers for this port
67439 + * This function scans each BD in sequence. If we find a BD that is not
67440 + * ready (READY=1), then we return 0 indicating that the QE is still sending
67441 + * data. If we reach the last BD (WRAP=1), then we know we've scanned
67442 + * the entire list, and all BDs are done.
67444 +static unsigned int qe_uart_tx_empty(struct uart_port *port)
67446 + struct uart_qe_port *qe_port =
67447 + container_of(port, struct uart_qe_port, port);
67448 + struct qe_bd *bdp = qe_port->tx_bd_base;
67451 + if (in_be16(&bdp->status) & BD_SC_READY)
67452 + /* This BD is not done, so return "not done" */
67455 + if (in_be16(&bdp->status) & BD_SC_WRAP)
67457 + * This BD is done and it's the last one, so return
67467 + * Set the modem control lines
67469 + * Although the QE can control the modem control lines (e.g. CTS), we
67470 + * don't need that support. This function must exist, however, otherwise
67471 + * the kernel will panic.
67473 +void qe_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
67478 + * Get the current modem control line status
67480 + * Although the QE can control the modem control lines (e.g. CTS), this
67481 + * driver currently doesn't support that, so we always return Carrier
67482 + * Detect, Data Set Ready, and Clear To Send.
67484 +static unsigned int qe_uart_get_mctrl(struct uart_port *port)
67486 + return TIOCM_CAR | TIOCM_DSR | TIOCM_CTS;
67490 + * Disable the transmit interrupt.
67492 + * Although this function is called "stop_tx", it does not actually stop
67493 + * transmission of data. Instead, it tells the QE to not generate an
67494 + * interrupt when the UCC is finished sending characters.
67496 +static void qe_uart_stop_tx(struct uart_port *port)
67498 + struct uart_qe_port *qe_port =
67499 + container_of(port, struct uart_qe_port, port);
67501 + clrbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_TX);
67505 + * Transmit as many characters to the HW as possible.
67507 + * This function will attempt to stuff of all the characters from the
67508 + * kernel's transmit buffer into TX BDs.
67510 + * A return value of non-zero indicates that it sucessfully stuffed all
67511 + * characters from the kernel buffer.
67513 + * A return value of zero indicates that there are still characters in the
67514 + * kernel's buffer that have not been transmitted, but there are no more BDs
67515 + * available. This function should be called again after a BD has been made
67518 +static int qe_uart_tx_pump(struct uart_qe_port *qe_port)
67520 + struct qe_bd *bdp;
67521 + unsigned char *p;
67522 + unsigned int count;
67523 + struct uart_port *port = &qe_port->port;
67524 + struct circ_buf *xmit = &port->info->xmit;
67526 + bdp = qe_port->rx_cur;
67528 + /* Handle xon/xoff */
67529 + if (port->x_char) {
67530 + /* Pick next descriptor and fill from buffer */
67531 + bdp = qe_port->tx_cur;
67533 + p = qe2cpu_addr(bdp->buf, qe_port);
67535 + *p++ = port->x_char;
67536 + out_be16(&bdp->length, 1);
67537 + setbits16(&bdp->status, BD_SC_READY);
67538 + /* Get next BD. */
67539 + if (in_be16(&bdp->status) & BD_SC_WRAP)
67540 + bdp = qe_port->tx_bd_base;
67543 + qe_port->tx_cur = bdp;
67545 + port->icount.tx++;
67546 + port->x_char = 0;
67550 + if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
67551 + qe_uart_stop_tx(port);
67555 + /* Pick next descriptor and fill from buffer */
67556 + bdp = qe_port->tx_cur;
67558 + while (!(in_be16(&bdp->status) & BD_SC_READY) &&
67559 + (xmit->tail != xmit->head)) {
67561 + p = qe2cpu_addr(bdp->buf, qe_port);
67562 + while (count < qe_port->tx_fifosize) {
67563 + *p++ = xmit->buf[xmit->tail];
67564 + xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
67565 + port->icount.tx++;
67567 + if (xmit->head == xmit->tail)
67571 + out_be16(&bdp->length, count);
67572 + setbits16(&bdp->status, BD_SC_READY);
67574 + /* Get next BD. */
67575 + if (in_be16(&bdp->status) & BD_SC_WRAP)
67576 + bdp = qe_port->tx_bd_base;
67580 + qe_port->tx_cur = bdp;
67582 + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
67583 + uart_write_wakeup(port);
67585 + if (uart_circ_empty(xmit)) {
67586 + /* The kernel buffer is empty, so turn off TX interrupts. We
67587 + don't need to be told when the QE is finished transmitting
67589 + qe_uart_stop_tx(port);
67597 + * Start transmitting data
67599 + * This function will start transmitting any available data, if the port
67600 + * isn't already transmitting data.
67602 +static void qe_uart_start_tx(struct uart_port *port)
67604 + struct uart_qe_port *qe_port =
67605 + container_of(port, struct uart_qe_port, port);
67607 + /* If we currently are transmitting, then just return */
67608 + if (in_be16(&qe_port->uccp->uccm) & UCC_UART_UCCE_TX)
67611 + /* Otherwise, pump the port and start transmission */
67612 + if (qe_uart_tx_pump(qe_port))
67613 + setbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_TX);
67617 + * Stop transmitting data
67619 +static void qe_uart_stop_rx(struct uart_port *port)
67621 + struct uart_qe_port *qe_port =
67622 + container_of(port, struct uart_qe_port, port);
67624 + clrbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_RX);
67628 + * Enable status change interrupts
67630 + * We don't support status change interrupts, but we need to define this
67631 + * function otherwise the kernel will panic.
67633 +static void qe_uart_enable_ms(struct uart_port *port)
67637 +/* Start or stop sending break signal
67639 + * This function controls the sending of a break signal. If break_state=1,
67640 + * then we start sending a break signal. If break_state=0, then we stop
67641 + * sending the break signal.
67643 +static void qe_uart_break_ctl(struct uart_port *port, int break_state)
67645 + struct uart_qe_port *qe_port =
67646 + container_of(port, struct uart_qe_port, port);
67649 + ucc_slow_stop_tx(qe_port->us_private);
67651 + ucc_slow_restart_tx(qe_port->us_private);
67654 +/* ISR helper function for receiving character.
67656 + * This function is called by the ISR to handling receiving characters
67658 +static void qe_uart_int_rx(struct uart_qe_port *qe_port)
67661 + unsigned char ch, *cp;
67662 + struct uart_port *port = &qe_port->port;
67663 + struct tty_struct *tty = port->info->tty;
67664 + struct qe_bd *bdp;
67666 + unsigned int flg;
67668 + /* Just loop through the closed BDs and copy the characters into
67671 + bdp = qe_port->rx_cur;
67673 + status = in_be16(&bdp->status);
67675 + /* If this one is empty, then we assume we've read them all */
67676 + if (status & BD_SC_EMPTY)
67679 + /* get number of characters, and check space in RX buffer */
67680 + i = in_be16(&bdp->length);
67682 + /* If we don't have enough room in RX buffer for the entire BD,
67683 + * then we try later, which will be the next RX interrupt.
67685 + if (tty_buffer_request_room(tty, i) < i) {
67686 + dev_dbg(port->dev, "ucc-uart: no room in RX buffer\n");
67690 + /* get pointer */
67691 + cp = qe2cpu_addr(bdp->buf, qe_port);
67693 + /* loop through the buffer */
67694 + while (i-- > 0) {
67696 + port->icount.rx++;
67697 + flg = TTY_NORMAL;
67699 + if (!i && status &
67700 + (BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV))
67701 + goto handle_error;
67702 + if (uart_handle_sysrq_char(port, ch))
67706 + tty_insert_flip_char(tty, ch, flg);
67710 + /* This BD is ready to be used again. Clear status. get next */
67711 + clrsetbits_be16(&bdp->status, BD_SC_BR | BD_SC_FR | BD_SC_PR |
67712 + BD_SC_OV | BD_SC_ID, BD_SC_EMPTY);
67713 + if (in_be16(&bdp->status) & BD_SC_WRAP)
67714 + bdp = qe_port->rx_bd_base;
67720 + /* Write back buffer pointer */
67721 + qe_port->rx_cur = bdp;
67723 + /* Activate BH processing */
67724 + tty_flip_buffer_push(tty);
67728 + /* Error processing */
67732 + if (status & BD_SC_BR)
67733 + port->icount.brk++;
67734 + if (status & BD_SC_PR)
67735 + port->icount.parity++;
67736 + if (status & BD_SC_FR)
67737 + port->icount.frame++;
67738 + if (status & BD_SC_OV)
67739 + port->icount.overrun++;
67741 + /* Mask out ignored conditions */
67742 + status &= port->read_status_mask;
67744 + /* Handle the remaining ones */
67745 + if (status & BD_SC_BR)
67747 + else if (status & BD_SC_PR)
67748 + flg = TTY_PARITY;
67749 + else if (status & BD_SC_FR)
67752 + /* Overrun does not affect the current character ! */
67753 + if (status & BD_SC_OV)
67754 + tty_insert_flip_char(tty, 0, TTY_OVERRUN);
67755 +#ifdef SUPPORT_SYSRQ
67758 + goto error_return;
67761 +/* Interrupt handler
67763 + * This interrupt handler is called after a BD is processed.
67765 +static irqreturn_t qe_uart_int(int irq, void *data)
67767 + struct uart_qe_port *qe_port = (struct uart_qe_port *) data;
67768 + struct ucc_slow __iomem *uccp = qe_port->uccp;
67771 + /* Clear the interrupts */
67772 + events = in_be16(&uccp->ucce);
67773 + out_be16(&uccp->ucce, events);
67775 + if (events & UCC_UART_UCCE_BRKE)
67776 + uart_handle_break(&qe_port->port);
67778 + if (events & UCC_UART_UCCE_RX)
67779 + qe_uart_int_rx(qe_port);
67781 + if (events & UCC_UART_UCCE_TX)
67782 + qe_uart_tx_pump(qe_port);
67784 + return events ? IRQ_HANDLED : IRQ_NONE;
67787 +/* Initialize buffer descriptors
67789 + * This function initializes all of the RX and TX buffer descriptors.
67791 +static void qe_uart_initbd(struct uart_qe_port *qe_port)
67795 + struct qe_bd *bdp;
67797 + /* Set the physical address of the host memory buffers in the buffer
67798 + * descriptors, and the virtual address for us to work with.
67800 + bd_virt = qe_port->bd_virt;
67801 + bdp = qe_port->rx_bd_base;
67802 + qe_port->rx_cur = qe_port->rx_bd_base;
67803 + for (i = 0; i < (qe_port->rx_nrfifos - 1); i++) {
67804 + out_be16(&bdp->status, BD_SC_EMPTY | BD_SC_INTRPT);
67805 + out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
67806 + out_be16(&bdp->length, 0);
67807 + bd_virt += qe_port->rx_fifosize;
67812 + out_be16(&bdp->status, BD_SC_WRAP | BD_SC_EMPTY | BD_SC_INTRPT);
67813 + out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
67814 + out_be16(&bdp->length, 0);
67816 + /* Set the physical address of the host memory
67817 + * buffers in the buffer descriptors, and the
67818 + * virtual address for us to work with.
67820 + bd_virt = qe_port->bd_virt +
67821 + L1_CACHE_ALIGN(qe_port->rx_nrfifos * qe_port->rx_fifosize);
67822 + qe_port->tx_cur = qe_port->tx_bd_base;
67823 + bdp = qe_port->tx_bd_base;
67824 + for (i = 0; i < (qe_port->tx_nrfifos - 1); i++) {
67825 + out_be16(&bdp->status, BD_SC_INTRPT);
67826 + out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
67827 + out_be16(&bdp->length, 0);
67828 + bd_virt += qe_port->tx_fifosize;
67832 + /* Loopback requires the preamble bit to be set on the first TX BD */
67834 + setbits16(&qe_port->tx_cur->status, BD_SC_P);
67837 + out_be16(&bdp->status, BD_SC_WRAP | BD_SC_INTRPT);
67838 + out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
67839 + out_be16(&bdp->length, 0);
67843 + * Initialize a UCC for UART.
67845 + * This function configures a given UCC to be used as a UART device. Basic
67846 + * UCC initialization is handled in qe_uart_request_port(). This function
67847 + * does all the UART-specific stuff.
67849 +static void qe_uart_init_ucc(struct uart_qe_port *qe_port)
67851 + u32 cecr_subblock;
67852 + struct ucc_slow __iomem *uccp = qe_port->uccp;
67853 + struct ucc_uart_pram *uccup = qe_port->uccup;
67857 + /* First, disable TX and RX in the UCC */
67858 + ucc_slow_disable(qe_port->us_private, COMM_DIR_RX_AND_TX);
67860 + /* Program the UCC UART parameter RAM */
67861 + out_8(&uccup->common.rbmr, UCC_BMR_GBL | UCC_BMR_BO_BE);
67862 + out_8(&uccup->common.tbmr, UCC_BMR_GBL | UCC_BMR_BO_BE);
67863 + out_be16(&uccup->common.mrblr, qe_port->rx_fifosize);
67864 + out_be16(&uccup->maxidl, 0x10);
67865 + out_be16(&uccup->brkcr, 1);
67866 + out_be16(&uccup->parec, 0);
67867 + out_be16(&uccup->frmec, 0);
67868 + out_be16(&uccup->nosec, 0);
67869 + out_be16(&uccup->brkec, 0);
67870 + out_be16(&uccup->uaddr[0], 0);
67871 + out_be16(&uccup->uaddr[1], 0);
67872 + out_be16(&uccup->toseq, 0);
67873 + for (i = 0; i < 8; i++)
67874 + out_be16(&uccup->cchars[i], 0xC000);
67875 + out_be16(&uccup->rccm, 0xc0ff);
67877 + /* Configure the GUMR registers for UART */
67879 + /* Soft-UART requires a 1X multiplier for TX */
67880 + clrsetbits_be32(&uccp->gumr_l,
67881 + UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK |
67882 + UCC_SLOW_GUMR_L_RDCR_MASK,
67883 + UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_1 |
67884 + UCC_SLOW_GUMR_L_RDCR_16);
67886 + clrsetbits_be32(&uccp->gumr_l,
67887 + UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK |
67888 + UCC_SLOW_GUMR_L_RDCR_MASK,
67889 + UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_16 |
67890 + UCC_SLOW_GUMR_L_RDCR_16);
67892 + clrsetbits_be32(&uccp->gumr_h, UCC_SLOW_GUMR_H_RFW,
67893 + UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX);
67896 + clrsetbits_be32(&uccp->gumr_l, UCC_SLOW_GUMR_L_DIAG_MASK,
67897 + UCC_SLOW_GUMR_L_DIAG_LOOP);
67898 + clrsetbits_be32(&uccp->gumr_h,
67899 + UCC_SLOW_GUMR_H_CTSP | UCC_SLOW_GUMR_H_RSYN,
67900 + UCC_SLOW_GUMR_H_CDS);
67903 + /* Enable rx interrupts and clear all pending events. */
67904 + out_be16(&uccp->uccm, 0);
67905 + out_be16(&uccp->ucce, 0xffff);
67906 + out_be16(&uccp->udsr, 0x7e7e);
67908 + /* Initialize UPSMR */
67909 + out_be16(&uccp->upsmr, 0);
67912 + out_be16(&uccup->supsmr, 0x30);
67913 + out_be16(&uccup->res92, 0);
67914 + out_be32(&uccup->rx_state, 0);
67915 + out_be32(&uccup->rx_cnt, 0);
67916 + out_8(&uccup->rx_bitmark, 0);
67917 + out_8(&uccup->rx_length, 10);
67918 + out_be32(&uccup->dump_ptr, 0x4000);
67919 + out_8(&uccup->rx_temp_dlst_qe, 0);
67920 + out_be32(&uccup->rx_frame_rem, 0);
67921 + out_8(&uccup->rx_frame_rem_size, 0);
67922 + /* Soft-UART requires TX to be 1X */
67923 + out_8(&uccup->tx_mode,
67924 + UCC_UART_TX_STATE_UART | UCC_UART_TX_STATE_X1);
67925 + out_be16(&uccup->tx_state, 0);
67926 + out_8(&uccup->resD4, 0);
67927 + out_be16(&uccup->resD5, 0);
67929 + /* Set UART mode.
67930 + * Enable receive and transmit.
67933 + /* From the microcode errata:
67934 + * 1.GUMR_L register, set mode=0010 (QMC).
67935 + * 2.Set GUMR_H[17] bit. (UART/AHDLC mode).
67936 + * 3.Set GUMR_H[19:20] (Transparent mode)
67937 + * 4.Clear GUMR_H[26] (RFW)
67939 + * 6.Receiver must use 16x over sampling
67941 + clrsetbits_be32(&uccp->gumr_l,
67942 + UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK |
67943 + UCC_SLOW_GUMR_L_RDCR_MASK,
67944 + UCC_SLOW_GUMR_L_MODE_QMC | UCC_SLOW_GUMR_L_TDCR_16 |
67945 + UCC_SLOW_GUMR_L_RDCR_16);
67947 + clrsetbits_be32(&uccp->gumr_h,
67948 + UCC_SLOW_GUMR_H_RFW | UCC_SLOW_GUMR_H_RSYN,
67949 + UCC_SLOW_GUMR_H_SUART | UCC_SLOW_GUMR_H_TRX |
67950 + UCC_SLOW_GUMR_H_TTX | UCC_SLOW_GUMR_H_TFL);
67953 + clrsetbits_be32(&uccp->gumr_l, UCC_SLOW_GUMR_L_DIAG_MASK,
67954 + UCC_SLOW_GUMR_L_DIAG_LOOP);
67955 + clrbits32(&uccp->gumr_h, UCC_SLOW_GUMR_H_CTSP |
67956 + UCC_SLOW_GUMR_H_CDS);
67959 + cecr_subblock = ucc_slow_get_qe_cr_subblock(qe_port->ucc_num);
67960 + qe_issue_cmd(QE_INIT_TX_RX, cecr_subblock,
67961 + QE_CR_PROTOCOL_UNSPECIFIED, 0);
67966 + * Initialize the port.
67968 +static int qe_uart_startup(struct uart_port *port)
67970 + struct uart_qe_port *qe_port =
67971 + container_of(port, struct uart_qe_port, port);
67975 + * If we're using Soft-UART mode, then we need to make sure the
67976 + * firmware has been uploaded first.
67978 + if (soft_uart && !firmware_loaded) {
67979 + dev_err(port->dev, "Soft-UART firmware not uploaded\n");
67983 + qe_uart_initbd(qe_port);
67984 + qe_uart_init_ucc(qe_port);
67986 + /* Install interrupt handler. */
67987 + ret = request_irq(port->irq, qe_uart_int, IRQF_SHARED, "ucc-uart",
67990 + dev_err(port->dev, "could not claim IRQ %u\n", port->irq);
67994 + /* Startup rx-int */
67995 + setbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_RX);
67996 + ucc_slow_enable(qe_port->us_private, COMM_DIR_RX_AND_TX);
68002 + * Shutdown the port.
68004 +static void qe_uart_shutdown(struct uart_port *port)
68006 + struct uart_qe_port *qe_port =
68007 + container_of(port, struct uart_qe_port, port);
68008 + struct ucc_slow __iomem *uccp = qe_port->uccp;
68009 + unsigned int timeout = 20;
68011 + /* Disable RX and TX */
68013 + /* Wait for all the BDs marked sent */
68014 + while (!qe_uart_tx_empty(port)) {
68015 + if (!--timeout) {
68016 + dev_warn(port->dev, "shutdown timeout\n");
68019 + set_current_state(TASK_UNINTERRUPTIBLE);
68020 + schedule_timeout(2);
68023 + if (qe_port->wait_closing) {
68024 + /* Wait a bit longer */
68025 + set_current_state(TASK_UNINTERRUPTIBLE);
68026 + schedule_timeout(qe_port->wait_closing);
68030 + ucc_slow_disable(qe_port->us_private, COMM_DIR_RX_AND_TX);
68031 + clrbits16(&uccp->uccm, UCC_UART_UCCE_TX | UCC_UART_UCCE_RX);
68033 + /* Shut them really down and reinit buffer descriptors */
68034 + ucc_slow_graceful_stop_tx(qe_port->us_private);
68035 + qe_uart_initbd(qe_port);
68037 + free_irq(port->irq, qe_port);
68041 + * Set the serial port parameters.
68043 +static void qe_uart_set_termios(struct uart_port *port,
68044 + struct ktermios *termios, struct ktermios *old)
68046 + struct uart_qe_port *qe_port =
68047 + container_of(port, struct uart_qe_port, port);
68048 + struct ucc_slow __iomem *uccp = qe_port->uccp;
68049 + unsigned int baud;
68050 + unsigned long flags;
68051 + u16 upsmr = in_be16(&uccp->upsmr);
68052 + struct ucc_uart_pram __iomem *uccup = qe_port->uccup;
68053 + u16 supsmr = in_be16(&uccup->supsmr);
68054 + u8 char_length = 2; /* 1 + CL + PEN + 1 + SL */
68056 + /* Character length programmed into the mode register is the
68057 + * sum of: 1 start bit, number of data bits, 0 or 1 parity bit,
68058 + * 1 or 2 stop bits, minus 1.
68059 + * The value 'bits' counts this for us.
68063 + upsmr &= UCC_UART_UPSMR_CL_MASK;
68064 + supsmr &= UCC_UART_SUPSMR_CL_MASK;
68066 + switch (termios->c_cflag & CSIZE) {
68068 + upsmr |= UCC_UART_UPSMR_CL_5;
68069 + supsmr |= UCC_UART_SUPSMR_CL_5;
68070 + char_length += 5;
68073 + upsmr |= UCC_UART_UPSMR_CL_6;
68074 + supsmr |= UCC_UART_SUPSMR_CL_6;
68075 + char_length += 6;
68078 + upsmr |= UCC_UART_UPSMR_CL_7;
68079 + supsmr |= UCC_UART_SUPSMR_CL_7;
68080 + char_length += 7;
68082 + default: /* case CS8 */
68083 + upsmr |= UCC_UART_UPSMR_CL_8;
68084 + supsmr |= UCC_UART_SUPSMR_CL_8;
68085 + char_length += 8;
68089 + /* If CSTOPB is set, we want two stop bits */
68090 + if (termios->c_cflag & CSTOPB) {
68091 + upsmr |= UCC_UART_UPSMR_SL;
68092 + supsmr |= UCC_UART_SUPSMR_SL;
68093 + char_length++; /* + SL */
68096 + if (termios->c_cflag & PARENB) {
68097 + upsmr |= UCC_UART_UPSMR_PEN;
68098 + supsmr |= UCC_UART_SUPSMR_PEN;
68099 + char_length++; /* + PEN */
68101 + if (!(termios->c_cflag & PARODD)) {
68102 + upsmr &= ~(UCC_UART_UPSMR_RPM_MASK |
68103 + UCC_UART_UPSMR_TPM_MASK);
68104 + upsmr |= UCC_UART_UPSMR_RPM_EVEN |
68105 + UCC_UART_UPSMR_TPM_EVEN;
68106 + supsmr &= ~(UCC_UART_SUPSMR_RPM_MASK |
68107 + UCC_UART_SUPSMR_TPM_MASK);
68108 + supsmr |= UCC_UART_SUPSMR_RPM_EVEN |
68109 + UCC_UART_SUPSMR_TPM_EVEN;
68114 + * Set up parity check flag
68116 + port->read_status_mask = BD_SC_EMPTY | BD_SC_OV;
68117 + if (termios->c_iflag & INPCK)
68118 + port->read_status_mask |= BD_SC_FR | BD_SC_PR;
68119 + if (termios->c_iflag & (BRKINT | PARMRK))
68120 + port->read_status_mask |= BD_SC_BR;
68123 + * Characters to ignore
68125 + port->ignore_status_mask = 0;
68126 + if (termios->c_iflag & IGNPAR)
68127 + port->ignore_status_mask |= BD_SC_PR | BD_SC_FR;
68128 + if (termios->c_iflag & IGNBRK) {
68129 + port->ignore_status_mask |= BD_SC_BR;
68131 + * If we're ignore parity and break indicators, ignore
68132 + * overruns too. (For real raw support).
68134 + if (termios->c_iflag & IGNPAR)
68135 + port->ignore_status_mask |= BD_SC_OV;
68138 + * !!! ignore all characters if CREAD is not set
68140 + if ((termios->c_cflag & CREAD) == 0)
68141 + port->read_status_mask &= ~BD_SC_EMPTY;
68143 + baud = uart_get_baud_rate(port, termios, old, 0, 115200);
68145 + /* Do we really need a spinlock here? */
68146 + spin_lock_irqsave(&port->lock, flags);
68148 + out_be16(&uccp->upsmr, upsmr);
68150 + out_be16(&uccup->supsmr, supsmr);
68151 + out_8(&uccup->rx_length, char_length);
68153 + /* Soft-UART requires a 1X multiplier for TX */
68154 + qe_setbrg(qe_port->us_info.rx_clock, baud, 16);
68155 + qe_setbrg(qe_port->us_info.tx_clock, baud, 1);
68157 + qe_setbrg(qe_port->us_info.rx_clock, baud, 16);
68158 + qe_setbrg(qe_port->us_info.tx_clock, baud, 16);
68161 + spin_unlock_irqrestore(&port->lock, flags);
68165 + * Return a pointer to a string that describes what kind of port this is.
68167 +static const char *qe_uart_type(struct uart_port *port)
68173 + * Allocate any memory and I/O resources required by the port.
68175 +static int qe_uart_request_port(struct uart_port *port)
68178 + struct uart_qe_port *qe_port =
68179 + container_of(port, struct uart_qe_port, port);
68180 + struct ucc_slow_info *us_info = &qe_port->us_info;
68181 + struct ucc_slow_private *uccs;
68182 + unsigned int rx_size, tx_size;
68184 + dma_addr_t bd_dma_addr = 0;
68186 + ret = ucc_slow_init(us_info, &uccs);
68188 + dev_err(port->dev, "could not initialize UCC%u\n",
68189 + qe_port->ucc_num);
68193 + qe_port->us_private = uccs;
68194 + qe_port->uccp = uccs->us_regs;
68195 + qe_port->uccup = (struct ucc_uart_pram *) uccs->us_pram;
68196 + qe_port->rx_bd_base = uccs->rx_bd;
68197 + qe_port->tx_bd_base = uccs->tx_bd;
68200 + * Allocate the transmit and receive data buffers.
68203 + rx_size = L1_CACHE_ALIGN(qe_port->rx_nrfifos * qe_port->rx_fifosize);
68204 + tx_size = L1_CACHE_ALIGN(qe_port->tx_nrfifos * qe_port->tx_fifosize);
68206 + bd_virt = dma_alloc_coherent(NULL, rx_size + tx_size, &bd_dma_addr,
68209 + dev_err(port->dev, "could not allocate buffer descriptors\n");
68213 + qe_port->bd_virt = bd_virt;
68214 + qe_port->bd_dma_addr = bd_dma_addr;
68215 + qe_port->bd_size = rx_size + tx_size;
68217 + qe_port->rx_buf = bd_virt;
68218 + qe_port->tx_buf = qe_port->rx_buf + rx_size;
68224 + * Configure the port.
68226 + * We say we're a CPM-type port because that's mostly true. Once the device
68227 + * is configured, this driver operates almost identically to the CPM serial
68230 +static void qe_uart_config_port(struct uart_port *port, int flags)
68232 + if (flags & UART_CONFIG_TYPE) {
68233 + port->type = PORT_CPM;
68234 + qe_uart_request_port(port);
68239 + * Release any memory and I/O resources that were allocated in
68240 + * qe_uart_request_port().
68242 +static void qe_uart_release_port(struct uart_port *port)
68244 + struct uart_qe_port *qe_port =
68245 + container_of(port, struct uart_qe_port, port);
68246 + struct ucc_slow_private *uccs = qe_port->us_private;
68248 + dma_free_coherent(NULL, qe_port->bd_size, qe_port->bd_virt,
68249 + qe_port->bd_dma_addr);
68251 + ucc_slow_free(uccs);
68255 + * Verify that the data in serial_struct is suitable for this device.
68257 +static int qe_uart_verify_port(struct uart_port *port,
68258 + struct serial_struct *ser)
68260 + if (ser->type != PORT_UNKNOWN && ser->type != PORT_CPM)
68263 + if (ser->irq < 0 || ser->irq >= NR_IRQS)
68266 + if (ser->baud_base < 9600)
68271 +/* UART operations
68273 + * Details on these functions can be found in Documentation/serial/driver
68275 +static struct uart_ops qe_uart_pops = {
68276 + .tx_empty = qe_uart_tx_empty,
68277 + .set_mctrl = qe_uart_set_mctrl,
68278 + .get_mctrl = qe_uart_get_mctrl,
68279 + .stop_tx = qe_uart_stop_tx,
68280 + .start_tx = qe_uart_start_tx,
68281 + .stop_rx = qe_uart_stop_rx,
68282 + .enable_ms = qe_uart_enable_ms,
68283 + .break_ctl = qe_uart_break_ctl,
68284 + .startup = qe_uart_startup,
68285 + .shutdown = qe_uart_shutdown,
68286 + .set_termios = qe_uart_set_termios,
68287 + .type = qe_uart_type,
68288 + .release_port = qe_uart_release_port,
68289 + .request_port = qe_uart_request_port,
68290 + .config_port = qe_uart_config_port,
68291 + .verify_port = qe_uart_verify_port,
68295 + * Obtain the SOC model number and revision level
68297 + * This function parses the device tree to obtain the SOC model. It then
68298 + * reads the SVR register to the revision.
68300 + * The device tree stores the SOC model two different ways.
68302 + * The new way is:
68305 + * compatible = "PowerPC,8323";
68306 + * device_type = "cpu";
68310 + * The old way is:
68311 + * PowerPC,8323@0 {
68312 + * device_type = "cpu";
68315 + * This code first checks the new way, and then the old way.
68317 +static unsigned int soc_info(unsigned int *rev_h, unsigned int *rev_l)
68319 + struct device_node *np;
68320 + const char *soc_string;
68321 + unsigned int svr;
68322 + unsigned int soc;
68324 + /* Find the CPU node */
68325 + np = of_find_node_by_type(NULL, "cpu");
68328 + /* Find the compatible property */
68329 + soc_string = of_get_property(np, "compatible", NULL);
68331 + /* No compatible property, so try the name. */
68332 + soc_string = np->name;
68334 + /* Extract the SOC number from the "PowerPC," string */
68335 + if ((sscanf(soc_string, "PowerPC,%u", &soc) != 1) || !soc)
68338 + /* Get the revision from the SVR */
68339 + svr = mfspr(SPRN_SVR);
68340 + *rev_h = (svr >> 4) & 0xf;
68341 + *rev_l = svr & 0xf;
68347 + * requst_firmware_nowait() callback function
68349 + * This function is called by the kernel when a firmware is made available,
68350 + * or if it times out waiting for the firmware.
68352 +static void uart_firmware_cont(const struct firmware *fw, void *context)
68354 + struct qe_firmware *firmware;
68355 + struct device *dev = context;
68359 + dev_err(dev, "firmware not found\n");
68363 + firmware = (struct qe_firmware *) fw->data;
68365 + if (firmware->header.length != fw->size) {
68366 + dev_err(dev, "invalid firmware\n");
68370 + ret = qe_upload_firmware(firmware);
68372 + dev_err(dev, "could not load firmware\n");
68376 + firmware_loaded = 1;
68379 +static int ucc_uart_probe(struct of_device *ofdev,
68380 + const struct of_device_id *match)
68382 + struct device_node *np = ofdev->node;
68383 + const unsigned int *iprop; /* Integer OF properties */
68384 + const char *sprop; /* String OF properties */
68385 + struct uart_qe_port *qe_port = NULL;
68386 + struct resource res;
68390 + * Determine if we need Soft-UART mode
68392 + if (of_find_property(np, "soft-uart", NULL)) {
68393 + dev_dbg(&ofdev->dev, "using Soft-UART mode\n");
68398 + * If we are using Soft-UART, determine if we need to upload the
68402 + struct qe_firmware_info *qe_fw_info;
68404 + qe_fw_info = qe_get_firmware_info();
68406 + /* Check if the firmware has been uploaded. */
68407 + if (qe_fw_info && strstr(qe_fw_info->id, "Soft-UART")) {
68408 + firmware_loaded = 1;
68410 + char filename[32];
68411 + unsigned int soc;
68412 + unsigned int rev_h;
68413 + unsigned int rev_l;
68415 + soc = soc_info(&rev_h, &rev_l);
68417 + dev_err(&ofdev->dev, "unknown CPU model\n");
68420 + sprintf(filename, "fsl_qe_ucode_uart_%u_%u%u.bin",
68421 + soc, rev_h, rev_l);
68423 + dev_info(&ofdev->dev, "waiting for firmware %s\n",
68427 + * We call request_firmware_nowait instead of
68428 + * request_firmware so that the driver can load and
68429 + * initialize the ports without holding up the rest of
68430 + * the kernel. If hotplug support is enabled in the
68431 + * kernel, then we use it.
68433 + ret = request_firmware_nowait(THIS_MODULE,
68434 + FW_ACTION_HOTPLUG, filename, &ofdev->dev,
68435 + &ofdev->dev, uart_firmware_cont);
68437 + dev_err(&ofdev->dev,
68438 + "could not load firmware %s\n",
68445 + qe_port = kzalloc(sizeof(struct uart_qe_port), GFP_KERNEL);
68447 + dev_err(&ofdev->dev, "can't allocate QE port structure\n");
68451 + /* Search for IRQ and mapbase */
68452 + ret = of_address_to_resource(np, 0, &res);
68454 + dev_err(&ofdev->dev, "missing 'reg' property in device tree\n");
68458 + if (!res.start) {
68459 + dev_err(&ofdev->dev, "invalid 'reg' property in device tree\n");
68463 + qe_port->port.mapbase = res.start;
68465 + /* Get the UCC number (device ID) */
68466 + /* UCCs are numbered 1-7 */
68467 + iprop = of_get_property(np, "device-id", NULL);
68468 + if (!iprop || (*iprop < 1) || (*iprop > UCC_MAX_NUM)) {
68469 + dev_err(&ofdev->dev,
68470 + "missing or invalid UCC specified in device tree\n");
68474 + qe_port->ucc_num = *iprop - 1;
68477 + * In the future, we should not require the BRG to be specified in the
68478 + * device tree. If no clock-source is specified, then just pick a BRG
68479 + * to use. This requires a new QE library function that manages BRG
68483 + sprop = of_get_property(np, "rx-clock-name", NULL);
68485 + dev_err(&ofdev->dev, "missing rx-clock-name in device tree\n");
68490 + qe_port->us_info.rx_clock = qe_clock_source(sprop);
68491 + if ((qe_port->us_info.rx_clock < QE_BRG1) ||
68492 + (qe_port->us_info.rx_clock > QE_BRG16)) {
68493 + dev_err(&ofdev->dev, "rx-clock-name must be a BRG for UART\n");
68499 + /* In internal loopback mode, TX and RX must use the same clock */
68500 + qe_port->us_info.tx_clock = qe_port->us_info.rx_clock;
68502 + sprop = of_get_property(np, "tx-clock-name", NULL);
68504 + dev_err(&ofdev->dev, "missing tx-clock-name in device tree\n");
68508 + qe_port->us_info.tx_clock = qe_clock_source(sprop);
68510 + if ((qe_port->us_info.tx_clock < QE_BRG1) ||
68511 + (qe_port->us_info.tx_clock > QE_BRG16)) {
68512 + dev_err(&ofdev->dev, "tx-clock-name must be a BRG for UART\n");
68517 + /* Get the port number, numbered 0-3 */
68518 + iprop = of_get_property(np, "port-number", NULL);
68520 + dev_err(&ofdev->dev, "missing port-number in device tree\n");
68524 + qe_port->port.line = *iprop;
68525 + if (qe_port->port.line >= UCC_MAX_UART) {
68526 + dev_err(&ofdev->dev, "port-number must be 0-%u\n",
68527 + UCC_MAX_UART - 1);
68532 + qe_port->port.irq = irq_of_parse_and_map(np, 0);
68533 + if (qe_port->port.irq == NO_IRQ) {
68534 + dev_err(&ofdev->dev, "could not map IRQ for UCC%u\n",
68535 + qe_port->ucc_num + 1);
68541 + * Newer device trees have an "fsl,qe" compatible property for the QE
68542 + * node, but we still need to support older device trees.
68544 + np = of_find_compatible_node(NULL, NULL, "fsl,qe");
68546 + np = of_find_node_by_type(NULL, "qe");
68548 + dev_err(&ofdev->dev, "could not find 'qe' node\n");
68554 + iprop = of_get_property(np, "brg-frequency", NULL);
68556 + dev_err(&ofdev->dev,
68557 + "missing brg-frequency in device tree\n");
68563 + qe_port->port.uartclk = *iprop;
68566 + * Older versions of U-Boot do not initialize the brg-frequency
68567 + * property, so in this case we assume the BRG frequency is
68568 + * half the QE bus frequency.
68570 + iprop = of_get_property(np, "bus-frequency", NULL);
68572 + dev_err(&ofdev->dev,
68573 + "missing QE bus-frequency in device tree\n");
68578 + qe_port->port.uartclk = *iprop / 2;
68580 + dev_err(&ofdev->dev,
68581 + "invalid QE bus-frequency in device tree\n");
68587 + spin_lock_init(&qe_port->port.lock);
68588 + qe_port->np = np;
68589 + qe_port->port.dev = &ofdev->dev;
68590 + qe_port->port.ops = &qe_uart_pops;
68591 + qe_port->port.iotype = UPIO_MEM;
68593 + qe_port->tx_nrfifos = TX_NUM_FIFO;
68594 + qe_port->tx_fifosize = TX_BUF_SIZE;
68595 + qe_port->rx_nrfifos = RX_NUM_FIFO;
68596 + qe_port->rx_fifosize = RX_BUF_SIZE;
68598 + qe_port->wait_closing = UCC_WAIT_CLOSING;
68599 + qe_port->port.fifosize = 512;
68600 + qe_port->port.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP;
68602 + qe_port->us_info.ucc_num = qe_port->ucc_num;
68603 + qe_port->us_info.regs = (phys_addr_t) res.start;
68604 + qe_port->us_info.irq = qe_port->port.irq;
68606 + qe_port->us_info.rx_bd_ring_len = qe_port->rx_nrfifos;
68607 + qe_port->us_info.tx_bd_ring_len = qe_port->tx_nrfifos;
68609 + /* Make sure ucc_slow_init() initializes both TX and RX */
68610 + qe_port->us_info.init_tx = 1;
68611 + qe_port->us_info.init_rx = 1;
68613 + /* Add the port to the uart sub-system. This will cause
68614 + * qe_uart_config_port() to be called, so the us_info structure must
68615 + * be initialized.
68617 + ret = uart_add_one_port(&ucc_uart_driver, &qe_port->port);
68619 + dev_err(&ofdev->dev, "could not add /dev/ttyQE%u\n",
68620 + qe_port->port.line);
68625 + dev_set_drvdata(&ofdev->dev, qe_port);
68627 + dev_info(&ofdev->dev, "UCC%u assigned to /dev/ttyQE%u\n",
68628 + qe_port->ucc_num + 1, qe_port->port.line);
68630 + /* Display the mknod command for this device */
68631 + dev_dbg(&ofdev->dev, "mknod command is 'mknod /dev/ttyQE%u c %u %u'\n",
68632 + qe_port->port.line, SERIAL_QE_MAJOR,
68633 + SERIAL_QE_MINOR + qe_port->port.line);
68638 +static int ucc_uart_remove(struct of_device *ofdev)
68640 + struct uart_qe_port *qe_port = dev_get_drvdata(&ofdev->dev);
68642 + dev_info(&ofdev->dev, "removing /dev/ttyQE%u\n", qe_port->port.line);
68644 + uart_remove_one_port(&ucc_uart_driver, &qe_port->port);
68646 + dev_set_drvdata(&ofdev->dev, NULL);
68652 +static struct of_device_id ucc_uart_match[] = {
68654 + .type = "serial",
68655 + .compatible = "ucc_uart",
68659 +MODULE_DEVICE_TABLE(of, ucc_uart_match);
68661 +static struct of_platform_driver ucc_uart_of_driver = {
68662 + .owner = THIS_MODULE,
68663 + .name = "ucc_uart",
68664 + .match_table = ucc_uart_match,
68665 + .probe = ucc_uart_probe,
68666 + .remove = ucc_uart_remove,
68669 +static int __init ucc_uart_init(void)
68673 + printk(KERN_INFO "Freescale QUICC Engine UART device driver\n");
68675 + printk(KERN_INFO "ucc-uart: Using loopback mode\n");
68678 + ret = uart_register_driver(&ucc_uart_driver);
68680 + printk(KERN_ERR "ucc-uart: could not register UART driver\n");
68684 + ret = of_register_platform_driver(&ucc_uart_of_driver);
68687 + "ucc-uart: could not register platform driver\n");
68692 +static void __exit ucc_uart_exit(void)
68695 + "Freescale QUICC Engine UART device driver unloading\n");
68697 + of_unregister_platform_driver(&ucc_uart_of_driver);
68698 + uart_unregister_driver(&ucc_uart_driver);
68701 +module_init(ucc_uart_init);
68702 +module_exit(ucc_uart_exit);
68704 +MODULE_DESCRIPTION("Freescale QUICC Engine (QE) UART");
68705 +MODULE_AUTHOR("Timur Tabi <timur@freescale.com>");
68706 +MODULE_LICENSE("GPL v2");
68707 +MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_QE_MAJOR);
68709 --- a/drivers/spi/mpc52xx_psc_spi.c
68710 +++ b/drivers/spi/mpc52xx_psc_spi.c
68711 @@ -330,6 +330,7 @@
68713 static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps)
68715 + struct device_node *np;
68716 struct mpc52xx_cdm __iomem *cdm;
68717 struct mpc52xx_gpio __iomem *gpio;
68718 struct mpc52xx_psc __iomem *psc = mps->psc;
68719 @@ -338,8 +339,12 @@
68722 #if defined(CONFIG_PPC_MERGE)
68723 - cdm = mpc52xx_find_and_map("mpc5200-cdm");
68724 - gpio = mpc52xx_find_and_map("mpc5200-gpio");
68725 + np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm");
68726 + cdm = of_iomap(np, 0);
68728 + np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio");
68729 + gpio = of_iomap(np, 0);
68732 cdm = ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE);
68733 gpio = ioremap(MPC52xx_PA(MPC52xx_GPIO_OFFSET), MPC52xx_GPIO_SIZE);
68734 --- a/fs/openpromfs/inode.c
68735 +++ b/fs/openpromfs/inode.c
68736 @@ -131,7 +131,7 @@
68737 /* Nothing to do */
68740 -static const struct seq_operations property_op = {
68741 +static struct seq_operations property_op = {
68742 .start = property_start,
68743 .next = property_next,
68744 .stop = property_stop,
68745 --- a/include/asm-powerpc/8xx_immap.h
68746 +++ b/include/asm-powerpc/8xx_immap.h
68747 @@ -123,7 +123,7 @@
68748 #define OR_G5LA 0x00000400 /* Output #GPL5 on #GPL_A5 */
68749 #define OR_G5LS 0x00000200 /* Drive #GPL high on falling edge of...*/
68750 #define OR_BI 0x00000100 /* Burst inhibit */
68751 -#define OR_SCY_MSK 0x000000f0 /* Cycle Lenght in Clocks */
68752 +#define OR_SCY_MSK 0x000000f0 /* Cycle Length in Clocks */
68753 #define OR_SCY_0_CLK 0x00000000 /* 0 clock cycles wait states */
68754 #define OR_SCY_1_CLK 0x00000010 /* 1 clock cycles wait states */
68755 #define OR_SCY_2_CLK 0x00000020 /* 2 clock cycles wait states */
68756 --- a/include/asm-powerpc/commproc.h
68757 +++ b/include/asm-powerpc/commproc.h
68758 @@ -693,7 +693,7 @@
68759 #define CICR_SCC_SCC3 ((uint)0x00200000) /* SCC3 @ SCCc */
68760 #define CICR_SCB_SCC2 ((uint)0x00040000) /* SCC2 @ SCCb */
68761 #define CICR_SCA_SCC1 ((uint)0x00000000) /* SCC1 @ SCCa */
68762 -#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrrupt */
68763 +#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrupt */
68764 #define CICR_HP_MASK ((uint)0x00001f00) /* Hi-pri int. */
68765 #define CICR_IEN ((uint)0x00000080) /* Int. enable */
68766 #define CICR_SPS ((uint)0x00000001) /* SCC Spread */
68767 --- a/include/asm-powerpc/cpm.h
68768 +++ b/include/asm-powerpc/cpm.h
68770 unsigned long cpm_muram_alloc_fixed(unsigned long offset, unsigned long size);
68771 void __iomem *cpm_muram_addr(unsigned long offset);
68772 dma_addr_t cpm_muram_dma(void __iomem *addr);
68773 +int cpm_command(u32 command, u8 opcode);
68776 --- a/include/asm-powerpc/cputable.h
68777 +++ b/include/asm-powerpc/cputable.h
68784 +extern int machine_check_generic(struct pt_regs *regs);
68785 +extern int machine_check_4xx(struct pt_regs *regs);
68786 +extern int machine_check_440A(struct pt_regs *regs);
68787 +extern int machine_check_e500(struct pt_regs *regs);
68788 +extern int machine_check_e200(struct pt_regs *regs);
68790 /* NOTE WELL: Update identify_cpu() if fields are added or removed! */
68792 /* CPU is matched via (PVR & pvr_mask) == pvr_value */
68793 @@ -97,6 +105,11 @@
68795 /* Name of processor class, for the ELF AT_PLATFORM entry */
68798 + /* Processor specific machine check handling. Return negative
68799 + * if the error is fatal, 1 if it was fully recovered and 0 to
68800 + * pass up (not CPU originated) */
68801 + int (*machine_check)(struct pt_regs *regs);
68804 extern struct cpu_spec *cur_cpu_spec;
68806 +++ b/include/asm-powerpc/cputhreads.h
68808 +#ifndef _ASM_POWERPC_CPUTHREADS_H
68809 +#define _ASM_POWERPC_CPUTHREADS_H
68811 +#include <linux/cpumask.h>
68814 + * Mapping of threads to cores
68818 +extern int threads_per_core;
68819 +extern int threads_shift;
68820 +extern cpumask_t threads_core_mask;
68822 +#define threads_per_core 1
68823 +#define threads_shift 0
68824 +#define threads_core_mask (CPU_MASK_CPU0)
68827 +/* cpu_thread_mask_to_cores - Return a cpumask of one per cores
68828 + * hit by the argument
68830 + * @threads: a cpumask of threads
68832 + * This function returns a cpumask which will have one "cpu" (or thread)
68833 + * bit set for each core that has at least one thread set in the argument.
68835 + * This can typically be used for things like IPI for tlb invalidations
68836 + * since those need to be done only once per core/TLB
68838 +static inline cpumask_t cpu_thread_mask_to_cores(cpumask_t threads)
68840 + cpumask_t tmp, res;
68843 + res = CPU_MASK_NONE;
68844 + for (i = 0; i < NR_CPUS; i += threads_per_core) {
68845 + cpus_shift_right(tmp, threads_core_mask, i);
68846 + if (cpus_intersects(threads, tmp))
68852 +static inline int cpu_nr_cores(void)
68854 + return NR_CPUS >> threads_shift;
68857 +static inline cpumask_t cpu_online_cores_map(void)
68859 + return cpu_thread_mask_to_cores(cpu_online_map);
68862 +static inline int cpu_thread_to_core(int cpu)
68864 + return cpu >> threads_shift;
68867 +static inline int cpu_thread_in_core(int cpu)
68869 + return cpu & (threads_per_core - 1);
68872 +static inline int cpu_first_thread_in_core(int cpu)
68874 + return cpu & ~(threads_per_core - 1);
68877 +#endif /* _ASM_POWERPC_CPUTHREADS_H */
68879 --- a/include/asm-powerpc/dcr-native.h
68880 +++ b/include/asm-powerpc/dcr-native.h
68883 #ifndef __ASSEMBLY__
68885 +#include <linux/spinlock.h>
68890 @@ -55,20 +57,28 @@
68893 /* R/W of indirect DCRs make use of standard naming conventions for DCRs */
68894 -#define mfdcri(base, reg) \
68896 - mtdcr(base ## _CFGADDR, base ## _ ## reg); \
68897 - mfdcr(base ## _CFGDATA); \
68898 +extern spinlock_t dcr_ind_lock;
68900 +#define mfdcri(base, reg) \
68902 + unsigned long flags; \
68903 + unsigned int val; \
68904 + spin_lock_irqsave(&dcr_ind_lock, flags); \
68905 + mtdcr(DCRN_ ## base ## _CONFIG_ADDR, reg); \
68906 + val = mfdcr(DCRN_ ## base ## _CONFIG_DATA); \
68907 + spin_unlock_irqrestore(&dcr_ind_lock, flags); \
68911 -#define mtdcri(base, reg, data) \
68913 - mtdcr(base ## _CFGADDR, base ## _ ## reg); \
68914 - mtdcr(base ## _CFGDATA, data); \
68915 +#define mtdcri(base, reg, data) \
68917 + unsigned long flags; \
68918 + spin_lock_irqsave(&dcr_ind_lock, flags); \
68919 + mtdcr(DCRN_ ## base ## _CONFIG_ADDR, reg); \
68920 + mtdcr(DCRN_ ## base ## _CONFIG_DATA, data); \
68921 + spin_unlock_irqrestore(&dcr_ind_lock, flags); \
68924 #endif /* __ASSEMBLY__ */
68925 #endif /* __KERNEL__ */
68926 #endif /* _ASM_POWERPC_DCR_NATIVE_H */
68930 +++ b/include/asm-powerpc/dcr-regs.h
68933 + * Common DCR / SDR / CPR register definitions used on various IBM/AMCC
68936 + * Copyright 2007 Benjamin Herrenschmidt, IBM Corp
68937 + * <benh@kernel.crashing.org>
68939 + * Mostly lifted from asm-ppc/ibm4xx.h by
68941 + * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
68945 +#ifndef __DCR_REGS_H__
68946 +#define __DCR_REGS_H__
68949 + * Most DCRs used for controlling devices such as the MAL, DMA engine,
68950 + * etc... are obtained for the device tree.
68952 + * The definitions in this files are fixed DCRs and indirect DCRs that
68953 + * are commonly used outside of specific drivers or refer to core
68954 + * common registers that may occasionally have to be tweaked outside
68955 + * of the driver main register set
68958 +/* CPRs (440GX and 440SP/440SPe) */
68959 +#define DCRN_CPR0_CONFIG_ADDR 0xc
68960 +#define DCRN_CPR0_CONFIG_DATA 0xd
68962 +/* SDRs (440GX and 440SP/440SPe) */
68963 +#define DCRN_SDR0_CONFIG_ADDR 0xe
68964 +#define DCRN_SDR0_CONFIG_DATA 0xf
68966 +#define SDR0_PFC0 0x4100
68967 +#define SDR0_PFC1 0x4101
68968 +#define SDR0_PFC1_EPS 0x1c00000
68969 +#define SDR0_PFC1_EPS_SHIFT 22
68970 +#define SDR0_PFC1_RMII 0x02000000
68971 +#define SDR0_MFR 0x4300
68972 +#define SDR0_MFR_TAH0 0x80000000 /* TAHOE0 Enable */
68973 +#define SDR0_MFR_TAH1 0x40000000 /* TAHOE1 Enable */
68974 +#define SDR0_MFR_PCM 0x10000000 /* PPC440GP irq compat mode */
68975 +#define SDR0_MFR_ECS 0x08000000 /* EMAC int clk */
68976 +#define SDR0_MFR_T0TXFL 0x00080000
68977 +#define SDR0_MFR_T0TXFH 0x00040000
68978 +#define SDR0_MFR_T1TXFL 0x00020000
68979 +#define SDR0_MFR_T1TXFH 0x00010000
68980 +#define SDR0_MFR_E0TXFL 0x00008000
68981 +#define SDR0_MFR_E0TXFH 0x00004000
68982 +#define SDR0_MFR_E0RXFL 0x00002000
68983 +#define SDR0_MFR_E0RXFH 0x00001000
68984 +#define SDR0_MFR_E1TXFL 0x00000800
68985 +#define SDR0_MFR_E1TXFH 0x00000400
68986 +#define SDR0_MFR_E1RXFL 0x00000200
68987 +#define SDR0_MFR_E1RXFH 0x00000100
68988 +#define SDR0_MFR_E2TXFL 0x00000080
68989 +#define SDR0_MFR_E2TXFH 0x00000040
68990 +#define SDR0_MFR_E2RXFL 0x00000020
68991 +#define SDR0_MFR_E2RXFH 0x00000010
68992 +#define SDR0_MFR_E3TXFL 0x00000008
68993 +#define SDR0_MFR_E3TXFH 0x00000004
68994 +#define SDR0_MFR_E3RXFL 0x00000002
68995 +#define SDR0_MFR_E3RXFH 0x00000001
68996 +#define SDR0_UART0 0x0120
68997 +#define SDR0_UART1 0x0121
68998 +#define SDR0_UART2 0x0122
68999 +#define SDR0_UART3 0x0123
69000 +#define SDR0_CUST0 0x4000
69002 +#endif /* __DCR_REGS_H__ */
69003 --- a/include/asm-powerpc/dma-mapping.h
69004 +++ b/include/asm-powerpc/dma-mapping.h
69006 return dma_ops->dma_supported(dev, mask);
69009 +/* We have our own implementation of pci_set_dma_mask() */
69010 +#define HAVE_ARCH_PCI_SET_DMA_MASK
69012 static inline int dma_set_mask(struct device *dev, u64 dma_mask)
69014 struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
69015 @@ -186,8 +189,6 @@
69016 extern struct dma_mapping_ops dma_iommu_ops;
69017 extern struct dma_mapping_ops dma_direct_ops;
69019 -extern unsigned long dma_direct_offset;
69021 #else /* CONFIG_PPC64 */
69023 #define dma_supported(dev, mask) (1)
69024 --- a/include/asm-powerpc/firmware.h
69025 +++ b/include/asm-powerpc/firmware.h
69027 FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
69028 FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
69029 FW_FEATURE_CELLEB_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_BEAT,
69030 - FW_FEATURE_CELLEB_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_BEAT,
69031 + FW_FEATURE_CELLEB_ALWAYS = 0,
69032 FW_FEATURE_NATIVE_POSSIBLE = 0,
69033 FW_FEATURE_NATIVE_ALWAYS = 0,
69034 FW_FEATURE_POSSIBLE =
69035 --- a/include/asm-powerpc/immap_86xx.h
69036 +++ b/include/asm-powerpc/immap_86xx.h
69037 @@ -89,14 +89,14 @@
69040 * guts: Pointer to GUTS structure
69041 - * co: The DMA controller (1 or 2)
69042 + * co: The DMA controller (0 or 1)
69043 * ch: The channel on the DMA controller (0, 1, 2, or 3)
69044 * device: The device to set as the source (CCSR_GUTS_DMACR_DEV_xx)
69046 static inline void guts_set_dmacr(struct ccsr_guts __iomem *guts,
69047 unsigned int co, unsigned int ch, unsigned int device)
69049 - unsigned int shift = 16 + (8 * (2 - co) + 2 * (3 - ch));
69050 + unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch));
69052 clrsetbits_be32(&guts->dmacr, 3 << shift, device << shift);
69054 @@ -118,6 +118,27 @@
69055 #define CCSR_GUTS_PMUXCR_DMA1_0 0x00000002
69056 #define CCSR_GUTS_PMUXCR_DMA1_3 0x00000001
69059 + * Set the DMA external control bits in the GUTS
69061 + * The DMA external control bits in the PMUXCR are only meaningful for
69062 + * channels 0 and 3. Any other channels are ignored.
69064 + * guts: Pointer to GUTS structure
69065 + * co: The DMA controller (0 or 1)
69066 + * ch: The channel on the DMA controller (0, 1, 2, or 3)
69067 + * value: the new value for the bit (0 or 1)
69069 +static inline void guts_set_pmuxcr_dma(struct ccsr_guts __iomem *guts,
69070 + unsigned int co, unsigned int ch, unsigned int value)
69072 + if ((ch == 0) || (ch == 3)) {
69073 + unsigned int shift = 2 * (co + 1) - (ch & 1) - 1;
69075 + clrsetbits_be32(&guts->pmuxcr, 1 << shift, value << shift);
69079 #define CCSR_GUTS_CLKDVDR_PXCKEN 0x80000000
69080 #define CCSR_GUTS_CLKDVDR_SSICKEN 0x20000000
69081 #define CCSR_GUTS_CLKDVDR_PXCKINV 0x10000000
69082 --- a/include/asm-powerpc/immap_qe.h
69083 +++ b/include/asm-powerpc/immap_qe.h
69084 @@ -393,9 +393,39 @@
69086 } __attribute__ ((packed));
69088 -/* RISC Special Registers (Trap and Breakpoint) */
69090 + * RISC Special Registers (Trap and Breakpoint). These are described in
69091 + * the QE Developer's Handbook.
69094 - u32 reg[0x40]; /* 64 32-bit registers */
69095 + __be32 tibcr[16]; /* Trap/instruction breakpoint control regs */
69120 + __be32 eccr; /* Exception control configuration register */
69122 + u8 res4[0x100-0xf8];
69123 } __attribute__ ((packed));
69126 --- a/include/asm-powerpc/io.h
69127 +++ b/include/asm-powerpc/io.h
69128 @@ -50,15 +50,16 @@
69129 #define PCI_DRAM_OFFSET pci_dram_offset
69131 #define _IO_BASE pci_io_base
69132 -#define _ISA_MEM_BASE 0
69133 +#define _ISA_MEM_BASE isa_mem_base
69134 #define PCI_DRAM_OFFSET 0
69137 extern unsigned long isa_io_base;
69138 -extern unsigned long isa_mem_base;
69139 extern unsigned long pci_io_base;
69140 extern unsigned long pci_dram_offset;
69142 +extern resource_size_t isa_mem_base;
69144 #if defined(CONFIG_PPC32) && defined(CONFIG_PPC_INDIRECT_IO)
69145 #error CONFIG_PPC_INDIRECT_IO is not yet supported on 32 bits
69147 --- a/include/asm-powerpc/iommu.h
69148 +++ b/include/asm-powerpc/iommu.h
69152 struct scatterlist;
69153 -struct device_node;
69155 /* Frees table for an individual device node */
69156 -extern void iommu_free_table(struct device_node *dn);
69157 +extern void iommu_free_table(struct iommu_table *tbl, const char *node_name);
69159 /* Initializes an iommu_table based in values set in the passed-in
69161 --- a/include/asm-powerpc/ipic.h
69162 +++ b/include/asm-powerpc/ipic.h
69163 @@ -20,11 +20,13 @@
69165 /* Flags when we init the IPIC */
69166 #define IPIC_SPREADMODE_GRP_A 0x00000001
69167 -#define IPIC_SPREADMODE_GRP_D 0x00000002
69168 -#define IPIC_SPREADMODE_MIX_A 0x00000004
69169 -#define IPIC_SPREADMODE_MIX_B 0x00000008
69170 -#define IPIC_DISABLE_MCP_OUT 0x00000010
69171 -#define IPIC_IRQ0_MCP 0x00000020
69172 +#define IPIC_SPREADMODE_GRP_B 0x00000002
69173 +#define IPIC_SPREADMODE_GRP_C 0x00000004
69174 +#define IPIC_SPREADMODE_GRP_D 0x00000008
69175 +#define IPIC_SPREADMODE_MIX_A 0x00000010
69176 +#define IPIC_SPREADMODE_MIX_B 0x00000020
69177 +#define IPIC_DISABLE_MCP_OUT 0x00000040
69178 +#define IPIC_IRQ0_MCP 0x00000080
69180 /* IPIC registers offsets */
69181 #define IPIC_SICFR 0x00 /* System Global Interrupt Configuration Register */
69182 --- a/include/asm-powerpc/iseries/hv_lp_event.h
69183 +++ b/include/asm-powerpc/iseries/hv_lp_event.h
69187 * Close an Lp Event Path for a type and partition
69188 - * returns 0 on sucess
69189 + * returns 0 on success
69191 extern int HvLpEvent_closePath(HvLpEvent_Type eventType, HvLpIndex lpIndex);
69193 --- a/include/asm-powerpc/kexec.h
69194 +++ b/include/asm-powerpc/kexec.h
69195 @@ -123,6 +123,9 @@
69196 extern void default_machine_kexec(struct kimage *image);
69197 extern int default_machine_kexec_prepare(struct kimage *image);
69198 extern void default_machine_crash_shutdown(struct pt_regs *regs);
69199 +typedef void (*crash_shutdown_t)(void);
69200 +extern int crash_shutdown_register(crash_shutdown_t handler);
69201 +extern int crash_shutdown_unregister(crash_shutdown_t handler);
69203 extern void machine_kexec_simple(struct kimage *image);
69204 extern void crash_kexec_secondary(struct pt_regs *regs);
69205 --- a/include/asm-powerpc/lmb.h
69206 +++ b/include/asm-powerpc/lmb.h
69208 extern unsigned long __init lmb_phys_mem_size(void);
69209 extern unsigned long __init lmb_end_of_DRAM(void);
69210 extern void __init lmb_enforce_memory_limit(unsigned long memory_limit);
69211 +extern int __init lmb_is_reserved(unsigned long addr);
69213 extern void lmb_dump_all(void);
69215 --- a/include/asm-powerpc/machdep.h
69216 +++ b/include/asm-powerpc/machdep.h
69217 @@ -204,6 +204,13 @@
69219 * optional PCI "hooks"
69221 + /* Called in indirect_* to avoid touching devices */
69222 + int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char);
69224 + /* Called at then very end of pcibios_init() */
69225 + void (*pcibios_after_init)(void);
69227 +#endif /* CONFIG_PPC32 */
69229 /* Called after PPC generic resource fixup to perform
69230 machine specific fixups */
69231 @@ -212,18 +219,9 @@
69232 /* Called for each PCI bus in the system when it's probed */
69233 void (*pcibios_fixup_bus)(struct pci_bus *);
69235 - /* Called when pci_enable_device() is called (initial=0) or
69236 - * when a device with no assigned resource is found (initial=1).
69237 - * Returns 0 to allow assignment/enabling of the device. */
69238 - int (*pcibios_enable_device_hook)(struct pci_dev *, int initial);
69240 - /* Called in indirect_* to avoid touching devices */
69241 - int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char);
69243 - /* Called at then very end of pcibios_init() */
69244 - void (*pcibios_after_init)(void);
69246 -#endif /* CONFIG_PPC32 */
69247 + /* Called when pci_enable_device() is called. Returns 0 to
69248 + * allow assignment/enabling of the device. */
69249 + int (*pcibios_enable_device_hook)(struct pci_dev *);
69251 /* Called to shutdown machine specific hardware not already controlled
69252 * by other drivers.
69253 @@ -253,6 +251,16 @@
69255 void (*machine_kexec)(struct kimage *image);
69256 #endif /* CONFIG_KEXEC */
69258 +#ifdef CONFIG_SUSPEND
69259 + /* These are called to disable and enable, respectively, IRQs when
69260 + * entering a suspend state. If NULL, then the generic versions
69261 + * will be called. The generic versions disable/enable the
69262 + * decrementer along with interrupts.
69264 + void (*suspend_disable_irqs)(void);
69265 + void (*suspend_enable_irqs)(void);
69269 extern void power4_idle(void);
69270 @@ -326,5 +334,31 @@
69271 ppc_md.log_error(buf, err_type, fatal);
69274 +#define __define_machine_initcall(mach,level,fn,id) \
69275 + static int __init __machine_initcall_##mach##_##fn(void) { \
69276 + if (machine_is(mach)) return fn(); \
69279 + __define_initcall(level,__machine_initcall_##mach##_##fn,id);
69281 +#define machine_core_initcall(mach,fn) __define_machine_initcall(mach,"1",fn,1)
69282 +#define machine_core_initcall_sync(mach,fn) __define_machine_initcall(mach,"1s",fn,1s)
69283 +#define machine_postcore_initcall(mach,fn) __define_machine_initcall(mach,"2",fn,2)
69284 +#define machine_postcore_initcall_sync(mach,fn) __define_machine_initcall(mach,"2s",fn,2s)
69285 +#define machine_arch_initcall(mach,fn) __define_machine_initcall(mach,"3",fn,3)
69286 +#define machine_arch_initcall_sync(mach,fn) __define_machine_initcall(mach,"3s",fn,3s)
69287 +#define machine_subsys_initcall(mach,fn) __define_machine_initcall(mach,"4",fn,4)
69288 +#define machine_subsys_initcall_sync(mach,fn) __define_machine_initcall(mach,"4s",fn,4s)
69289 +#define machine_fs_initcall(mach,fn) __define_machine_initcall(mach,"5",fn,5)
69290 +#define machine_fs_initcall_sync(mach,fn) __define_machine_initcall(mach,"5s",fn,5s)
69291 +#define machine_rootfs_initcall(mach,fn) __define_machine_initcall(mach,"rootfs",fn,rootfs)
69292 +#define machine_device_initcall(mach,fn) __define_machine_initcall(mach,"6",fn,6)
69293 +#define machine_device_initcall_sync(mach,fn) __define_machine_initcall(mach,"6s",fn,6s)
69294 +#define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7)
69295 +#define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s)
69297 +void generic_suspend_disable_irqs(void);
69298 +void generic_suspend_enable_irqs(void);
69300 #endif /* __KERNEL__ */
69301 #endif /* _ASM_POWERPC_MACHDEP_H */
69302 --- a/include/asm-powerpc/mmu-hash64.h
69303 +++ b/include/asm-powerpc/mmu-hash64.h
69305 #define HPTE_V_AVPN_SHIFT 7
69306 #define HPTE_V_AVPN ASM_CONST(0x3fffffffffffff80)
69307 #define HPTE_V_AVPN_VAL(x) (((x) & HPTE_V_AVPN) >> HPTE_V_AVPN_SHIFT)
69308 -#define HPTE_V_COMPARE(x,y) (!(((x) ^ (y)) & 0xffffffffffffff80))
69309 +#define HPTE_V_COMPARE(x,y) (!(((x) ^ (y)) & 0xffffffffffffff80UL))
69310 #define HPTE_V_BOLTED ASM_CONST(0x0000000000000010)
69311 #define HPTE_V_LOCK ASM_CONST(0x0000000000000008)
69312 #define HPTE_V_LARGE ASM_CONST(0x0000000000000004)
69313 @@ -180,6 +180,7 @@
69314 extern int mmu_io_psize;
69315 extern int mmu_kernel_ssize;
69316 extern int mmu_highuser_ssize;
69317 +extern u16 mmu_slb_size;
69320 * If the processor supports 64k normal pages but not 64k cache
69321 @@ -277,6 +278,7 @@
69322 extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
69323 unsigned long pstart, unsigned long mode,
69324 int psize, int ssize);
69325 +extern void set_huge_psize(int psize);
69327 extern void htab_initialize(void);
69328 extern void htab_initialize_secondary(void);
69329 --- a/include/asm-powerpc/mpc52xx.h
69330 +++ b/include/asm-powerpc/mpc52xx.h
69331 @@ -248,8 +248,6 @@
69333 #ifndef __ASSEMBLY__
69335 -extern void __iomem * mpc52xx_find_and_map(const char *);
69336 -extern void __iomem * mpc52xx_find_and_map_path(const char *path);
69337 extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node);
69338 extern void mpc5200_setup_xlb_arbiter(void);
69339 extern void mpc52xx_declare_of_platform_devices(void);
69340 @@ -257,7 +255,12 @@
69341 extern void mpc52xx_init_irq(void);
69342 extern unsigned int mpc52xx_get_irq(void);
69345 extern int __init mpc52xx_add_bridge(struct device_node *node);
69346 +extern void __init mpc52xx_setup_pci(void);
69348 +static inline void mpc52xx_setup_pci(void) { }
69351 extern void __init mpc52xx_map_wdt(void);
69352 extern void mpc52xx_restart(char *cmd);
69353 --- a/include/asm-powerpc/mpc52xx_psc.h
69354 +++ b/include/asm-powerpc/mpc52xx_psc.h
69355 @@ -153,6 +153,9 @@
69357 u8 irfdr; /* PSC + 0x54 */
69361 +struct mpc52xx_psc_fifo {
69362 u16 rfnum; /* PSC + 0x58 */
69364 u16 tfnum; /* PSC + 0x5c */
69365 --- a/include/asm-powerpc/mpc8260.h
69366 +++ b/include/asm-powerpc/mpc8260.h
69368 #ifndef __ASM_POWERPC_MPC8260_H__
69369 #define __ASM_POWERPC_MPC8260_H__
69371 +#define MPC82XX_BCR_PLDP 0x00800000 /* Pipeline Maximum Depth */
69375 --- a/include/asm-powerpc/mpic.h
69376 +++ b/include/asm-powerpc/mpic.h
69378 #define MPIC_GREG_GLOBAL_CONF_0 0x00020
69379 #define MPIC_GREG_GCONF_RESET 0x80000000
69380 #define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000
69381 +#define MPIC_GREG_GCONF_NO_BIAS 0x10000000
69382 #define MPIC_GREG_GCONF_BASE_MASK 0x000fffff
69383 +#define MPIC_GREG_GCONF_MCK 0x08000000
69384 #define MPIC_GREG_GLOBAL_CONF_1 0x00030
69385 #define MPIC_GREG_GLOBAL_CONF_1_SIE 0x08000000
69386 #define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK 0x70000000
69388 #define MPIC_CPU_WHOAMI_MASK 0x0000001f
69389 #define MPIC_CPU_INTACK 0x000a0
69390 #define MPIC_CPU_EOI 0x000b0
69391 +#define MPIC_CPU_MCACK 0x000c0
69394 * Per-source registers
69395 @@ -141,6 +144,7 @@
69396 #define TSI108_CPU_WHOAMI 0xffffffff
69397 #define TSI108_CPU_INTACK 0x00004
69398 #define TSI108_CPU_EOI 0x00008
69399 +#define TSI108_CPU_MCACK 0x00004 /* Doesn't really exist here */
69402 * Per-source registers
69403 @@ -183,6 +187,7 @@
69404 MPIC_IDX_CPU_WHOAMI,
69405 MPIC_IDX_CPU_INTACK,
69407 + MPIC_IDX_CPU_MCACK,
69410 MPIC_IDX_IRQ_STRIDE,
69411 @@ -344,6 +349,10 @@
69412 #define MPIC_USES_DCR 0x00000080
69413 /* MPIC has 11-bit vector fields (or larger) */
69414 #define MPIC_LARGE_VECTORS 0x00000100
69415 +/* Enable delivery of prio 15 interrupts as MCK instead of EE */
69416 +#define MPIC_ENABLE_MCK 0x00000200
69417 +/* Disable bias among target selection, spread interrupts evenly */
69418 +#define MPIC_NO_BIAS 0x00000400
69420 /* MPIC HW modification ID */
69421 #define MPIC_REGSET_MASK 0xf0000000
69422 @@ -447,10 +456,19 @@
69423 /* Send a message (IPI) to a given target (cpu number or MSG_*) */
69424 void smp_mpic_message_pass(int target, int msg);
69426 +/* Unmask a specific virq */
69427 +extern void mpic_unmask_irq(unsigned int irq);
69428 +/* Mask a specific virq */
69429 +extern void mpic_mask_irq(unsigned int irq);
69430 +/* EOI a specific virq */
69431 +extern void mpic_end_irq(unsigned int irq);
69433 /* Fetch interrupt from a given mpic */
69434 extern unsigned int mpic_get_one_irq(struct mpic *mpic);
69435 -/* This one gets to the primary mpic */
69436 +/* This one gets from the primary mpic */
69437 extern unsigned int mpic_get_irq(void);
69438 +/* Fetch Machine Check interrupt from primary mpic */
69439 +extern unsigned int mpic_get_mcirq(void);
69441 /* Set the EPIC clock ratio */
69442 void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio);
69443 --- a/include/asm-powerpc/nvram.h
69444 +++ b/include/asm-powerpc/nvram.h
69446 #ifndef _ASM_POWERPC_NVRAM_H
69447 #define _ASM_POWERPC_NVRAM_H
69449 +#include <linux/errno.h>
69451 #define NVRW_CNT 0x20
69452 #define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
69453 #define NVRAM_BLOCK_LEN 16
69455 extern struct nvram_partition *nvram_find_partition(int sig, const char *name);
69457 extern int pSeries_nvram_init(void);
69459 +#ifdef CONFIG_MMIO_NVRAM
69460 extern int mmio_nvram_init(void);
69462 +static inline int mmio_nvram_init(void)
69468 #endif /* __KERNEL__ */
69470 /* PowerMac specific nvram stuffs */
69471 --- a/include/asm-powerpc/of_platform.h
69472 +++ b/include/asm-powerpc/of_platform.h
69474 #include <linux/of_platform.h>
69476 /* Platform drivers register/unregister */
69477 -extern int of_register_platform_driver(struct of_platform_driver *drv);
69478 -extern void of_unregister_platform_driver(struct of_platform_driver *drv);
69479 +static inline int of_register_platform_driver(struct of_platform_driver *drv)
69481 + return of_register_driver(drv, &of_platform_bus_type);
69483 +static inline void of_unregister_platform_driver(struct of_platform_driver *drv)
69485 + of_unregister_driver(drv);
69488 /* Platform devices and busses creation */
69489 extern struct of_device *of_platform_device_create(struct device_node *np,
69491 #define OF_NO_DEEP_PROBE ((struct of_device_id *)-1)
69493 extern int of_platform_bus_probe(struct device_node *root,
69494 - struct of_device_id *matches,
69495 + const struct of_device_id *matches,
69496 struct device *parent);
69498 extern struct of_device *of_find_device_by_phandle(phandle ph);
69500 +extern void of_instantiate_rtc(void);
69502 #endif /* _ASM_POWERPC_OF_PLATFORM_H */
69503 --- a/include/asm-powerpc/pci-bridge.h
69504 +++ b/include/asm-powerpc/pci-bridge.h
69506 #ifndef _ASM_POWERPC_PCI_BRIDGE_H
69507 #define _ASM_POWERPC_PCI_BRIDGE_H
69511 + * This program is free software; you can redistribute it and/or
69512 + * modify it under the terms of the GNU General Public License
69513 + * as published by the Free Software Foundation; either version
69514 + * 2 of the License, or (at your option) any later version.
69516 #include <linux/pci.h>
69517 #include <linux/list.h>
69518 #include <linux/ioport.h>
69520 -#ifndef CONFIG_PPC64
69522 struct device_node;
69523 -struct pci_controller;
69525 +extern unsigned int ppc_pci_flags;
69527 + /* Force re-assigning all resources (ignore firmware
69528 + * setup completely)
69530 + PPC_PCI_REASSIGN_ALL_RSRC = 0x00000001,
69532 + /* Re-assign all bus numbers */
69533 + PPC_PCI_REASSIGN_ALL_BUS = 0x00000002,
69535 + /* Do not try to assign, just use existing setup */
69536 + PPC_PCI_PROBE_ONLY = 0x00000004,
69538 + /* Don't bother with ISA alignment unless the bridge has
69539 + * ISA forwarding enabled
69541 + PPC_PCI_CAN_SKIP_ISA_ALIGN = 0x00000008,
69543 + /* Enable domain numbers in /proc */
69544 + PPC_PCI_ENABLE_PROC_DOMAINS = 0x00000010,
69545 + /* ... except for domain 0 */
69546 + PPC_PCI_COMPAT_DOMAIN_0 = 0x00000020,
69551 * Structure of a PCI controller (host bridge)
69552 @@ -17,26 +44,41 @@
69553 struct pci_controller {
69554 struct pci_bus *bus;
69557 +#ifdef CONFIG_PPC64
69560 + struct device_node *dn;
69561 struct list_head list_node;
69562 struct device *parent;
69566 +#ifndef CONFIG_PPC64
69570 void __iomem *io_base_virt;
69571 +#ifdef CONFIG_PPC64
69572 + void *io_base_alloc;
69574 resource_size_t io_base_phys;
69575 +#ifndef CONFIG_PPC64
69576 + resource_size_t pci_io_size;
69579 /* Some machines (PReP) have a non 1:1 mapping of
69580 * the PCI memory space in the CPU bus space
69582 resource_size_t pci_mem_offset;
69583 +#ifdef CONFIG_PPC64
69584 + unsigned long pci_io_size;
69587 struct pci_ops *ops;
69588 - volatile unsigned int __iomem *cfg_addr;
69589 - volatile void __iomem *cfg_data;
69590 + unsigned int __iomem *cfg_addr;
69591 + void __iomem *cfg_data;
69593 +#ifndef CONFIG_PPC64
69595 * Used for variants of PCI indirect handling and possible quirks:
69596 * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1
69597 @@ -51,21 +93,30 @@
69599 * BIG_ENDIAN - cfg_addr is a big endian register
69601 -#define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001)
69602 -#define PPC_INDIRECT_TYPE_EXT_REG (0x00000002)
69603 -#define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS (0x00000004)
69604 -#define PPC_INDIRECT_TYPE_NO_PCIE_LINK (0x00000008)
69605 -#define PPC_INDIRECT_TYPE_BIG_ENDIAN (0x00000010)
69606 +#define PPC_INDIRECT_TYPE_SET_CFG_TYPE 0x00000001
69607 +#define PPC_INDIRECT_TYPE_EXT_REG 0x00000002
69608 +#define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS 0x00000004
69609 +#define PPC_INDIRECT_TYPE_NO_PCIE_LINK 0x00000008
69610 +#define PPC_INDIRECT_TYPE_BIG_ENDIAN 0x00000010
69613 +#endif /* !CONFIG_PPC64 */
69614 /* Currently, we limit ourselves to 1 IO range and 3 mem
69615 * ranges since the common pci_bus structure can't handle more
69617 struct resource io_resource;
69618 struct resource mem_resources[3];
69619 int global_number; /* PCI domain number */
69620 +#ifdef CONFIG_PPC64
69621 + unsigned long buid;
69622 + unsigned long dma_window_base_cur;
69623 + unsigned long dma_window_size;
69625 + void *private_data;
69626 +#endif /* CONFIG_PPC64 */
69629 +#ifndef CONFIG_PPC64
69631 static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus)
69633 return bus->sysdata;
69634 @@ -81,18 +132,18 @@
69636 /* These are used for config access before all the PCI probing
69638 -int early_read_config_byte(struct pci_controller *hose, int bus, int dev_fn,
69639 - int where, u8 *val);
69640 -int early_read_config_word(struct pci_controller *hose, int bus, int dev_fn,
69641 - int where, u16 *val);
69642 -int early_read_config_dword(struct pci_controller *hose, int bus, int dev_fn,
69643 - int where, u32 *val);
69644 -int early_write_config_byte(struct pci_controller *hose, int bus, int dev_fn,
69645 - int where, u8 val);
69646 -int early_write_config_word(struct pci_controller *hose, int bus, int dev_fn,
69647 - int where, u16 val);
69648 -int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn,
69649 - int where, u32 val);
69650 +extern int early_read_config_byte(struct pci_controller *hose, int bus,
69651 + int dev_fn, int where, u8 *val);
69652 +extern int early_read_config_word(struct pci_controller *hose, int bus,
69653 + int dev_fn, int where, u16 *val);
69654 +extern int early_read_config_dword(struct pci_controller *hose, int bus,
69655 + int dev_fn, int where, u32 *val);
69656 +extern int early_write_config_byte(struct pci_controller *hose, int bus,
69657 + int dev_fn, int where, u8 val);
69658 +extern int early_write_config_word(struct pci_controller *hose, int bus,
69659 + int dev_fn, int where, u16 val);
69660 +extern int early_write_config_dword(struct pci_controller *hose, int bus,
69661 + int dev_fn, int where, u32 val);
69663 extern int early_find_capability(struct pci_controller *hose, int bus,
69664 int dev_fn, int cap);
69665 @@ -101,87 +152,33 @@
69666 resource_size_t cfg_addr,
69667 resource_size_t cfg_data, u32 flags);
69668 extern void setup_grackle(struct pci_controller *hose);
69669 -extern void __init update_bridge_resource(struct pci_dev *dev,
69670 - struct resource *res);
69676 - * This program is free software; you can redistribute it and/or
69677 - * modify it under the terms of the GNU General Public License
69678 - * as published by the Free Software Foundation; either version
69679 - * 2 of the License, or (at your option) any later version.
69683 - * Structure of a PCI controller (host bridge)
69685 -struct pci_controller {
69686 - struct pci_bus *bus;
69690 - struct list_head list_node;
69691 - struct device *parent;
69696 - void __iomem *io_base_virt;
69697 - void *io_base_alloc;
69698 - resource_size_t io_base_phys;
69700 - /* Some machines have a non 1:1 mapping of
69701 - * the PCI memory space in the CPU bus space
69703 - resource_size_t pci_mem_offset;
69704 - unsigned long pci_io_size;
69706 - struct pci_ops *ops;
69707 - volatile unsigned int __iomem *cfg_addr;
69708 - volatile void __iomem *cfg_data;
69710 - /* Currently, we limit ourselves to 1 IO range and 3 mem
69711 - * ranges since the common pci_bus structure can't handle more
69713 - struct resource io_resource;
69714 - struct resource mem_resources[3];
69715 - int global_number;
69716 - unsigned long buid;
69717 - unsigned long dma_window_base_cur;
69718 - unsigned long dma_window_size;
69720 - void *private_data;
69722 +#else /* CONFIG_PPC64 */
69725 * PCI stuff, for nodes representing PCI devices, pointed to
69726 * by device_node->data.
69728 -struct pci_controller;
69729 struct iommu_table;
69732 int busno; /* pci bus number */
69733 - int bussubno; /* pci subordinate bus number */
69734 int devfn; /* pci device and function number */
69735 - int class_code; /* pci device class */
69737 struct pci_controller *phb; /* for pci devices */
69738 struct iommu_table *iommu_table; /* for phb's or bridges */
69739 - struct pci_dev *pcidev; /* back-pointer to the pci device */
69740 struct device_node *node; /* back-pointer to the device_node */
69742 int pci_ext_config_space; /* for pci devices */
69745 + struct pci_dev *pcidev; /* back-pointer to the pci device */
69746 + int class_code; /* pci device class */
69747 int eeh_mode; /* See eeh.h for possible EEH_MODEs */
69748 int eeh_config_addr;
69749 int eeh_pe_config_addr; /* new-style partition endpoint address */
69750 - int eeh_check_count; /* # times driver ignored error */
69751 - int eeh_freeze_count; /* # times this device froze up. */
69752 - int eeh_false_positives; /* # times this device reported #ff's */
69753 + int eeh_check_count; /* # times driver ignored error */
69754 + int eeh_freeze_count; /* # times this device froze up. */
69755 + int eeh_false_positives; /* # times this device reported #ff's */
69756 u32 config_space[16]; /* saved PCI config space */
69759 @@ -189,7 +186,7 @@
69760 /* Get the pointer to a device_node's pci_dn */
69761 #define PCI_DN(dn) ((struct pci_dn *) (dn)->data)
69763 -struct device_node *fetch_dev_dn(struct pci_dev *dev);
69764 +extern struct device_node *fetch_dev_dn(struct pci_dev *dev);
69766 /* Get a device_node from a pci_dev. This code must be fast except
69767 * in the case where the sysdata is incorrect and needs to be fixed
69768 @@ -227,14 +224,14 @@
69771 /** Find the bus corresponding to the indicated device node */
69772 -struct pci_bus * pcibios_find_pci_bus(struct device_node *dn);
69773 +extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn);
69775 /** Remove all of the PCI devices under this bus */
69776 -void pcibios_remove_pci_devices(struct pci_bus *bus);
69777 +extern void pcibios_remove_pci_devices(struct pci_bus *bus);
69779 /** Discover new pci devices under this bus, and add them */
69780 -void pcibios_add_pci_devices(struct pci_bus * bus);
69781 -void pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus);
69782 +extern void pcibios_add_pci_devices(struct pci_bus *bus);
69783 +extern void pcibios_fixup_new_pci_devices(struct pci_bus *bus);
69785 extern int pcibios_remove_root_bus(struct pci_controller *phb);
69787 @@ -270,20 +267,18 @@
69788 #define PHB_SET_NODE(PHB, NODE) ((PHB)->node = -1)
69791 -#endif /* CONFIG_PPC64 */
69792 +#endif /* CONFIG_PPC64 */
69794 /* Get the PCI host controller for an OF device */
69795 -extern struct pci_controller*
69796 -pci_find_hose_for_OF_device(struct device_node* node);
69797 +extern struct pci_controller *pci_find_hose_for_OF_device(
69798 + struct device_node* node);
69800 /* Fill up host controller resources from the OF node */
69802 -pci_process_bridge_OF_ranges(struct pci_controller *hose,
69803 - struct device_node *dev, int primary);
69804 +extern void pci_process_bridge_OF_ranges(struct pci_controller *hose,
69805 + struct device_node *dev, int primary);
69807 /* Allocate & free a PCI host bridge structure */
69808 -extern struct pci_controller *
69809 -pcibios_alloc_controller(struct device_node *dev);
69810 +extern struct pci_controller *pcibios_alloc_controller(struct device_node *dev);
69811 extern void pcibios_free_controller(struct pci_controller *phb);
69814 @@ -298,9 +293,7 @@
69820 +#endif /* CONFIG_PCI */
69823 -#endif /* __KERNEL__ */
69825 +#endif /* __KERNEL__ */
69826 +#endif /* _ASM_POWERPC_PCI_BRIDGE_H */
69827 --- a/include/asm-powerpc/pci.h
69828 +++ b/include/asm-powerpc/pci.h
69829 @@ -36,11 +36,10 @@
69832 * Set this to 1 if you want the kernel to re-assign all PCI
69834 + * bus numbers (don't do that on ppc64 yet !)
69836 -extern int pci_assign_all_buses;
69837 -#define pcibios_assign_all_busses() (pci_assign_all_buses)
69839 +#define pcibios_assign_all_busses() (ppc_pci_flags & \
69840 + PPC_PCI_REASSIGN_ALL_BUS)
69841 #define pcibios_scan_all_fns(a, b) 0
69843 static inline void pcibios_set_master(struct pci_dev *dev)
69845 #define get_pci_dma_ops() NULL
69848 -/* Decide whether to display the domain number in /proc */
69849 -extern int pci_proc_domain(struct pci_bus *bus);
69854 @@ -109,17 +105,14 @@
69855 *strategy_parameter = ~0UL;
69859 -/* Set the name of the bus as it appears in /proc/bus/pci */
69860 -static inline int pci_proc_domain(struct pci_bus *bus)
69865 #endif /* CONFIG_PPC64 */
69867 extern int pci_domain_nr(struct pci_bus *bus);
69869 +/* Decide whether to display the domain number in /proc */
69870 +extern int pci_proc_domain(struct pci_bus *bus);
69873 struct vm_area_struct;
69874 /* Map a range of PCI memory or I/O space for a device into user space */
69875 int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
69876 @@ -199,13 +192,12 @@
69880 -extern void pcibios_fixup_device_resources(struct pci_dev *dev,
69881 - struct pci_bus *bus);
69883 extern void pcibios_setup_new_device(struct pci_dev *dev);
69885 extern void pcibios_claim_one_bus(struct pci_bus *b);
69887 +extern void pcibios_resource_survey(void);
69889 extern struct pci_controller *init_phb_dynamic(struct device_node *dn);
69891 extern struct pci_dev *of_create_pci_dev(struct device_node *node,
69892 @@ -229,5 +221,8 @@
69893 const struct resource *rsrc,
69894 resource_size_t *start, resource_size_t *end);
69896 +extern void pcibios_do_bus_setup(struct pci_bus *bus);
69897 +extern void pcibios_fixup_of_probed_bus(struct pci_bus *bus);
69899 #endif /* __KERNEL__ */
69900 #endif /* __ASM_POWERPC_PCI_H */
69901 --- a/include/asm-powerpc/ppc-pci.h
69902 +++ b/include/asm-powerpc/ppc-pci.h
69906 extern struct list_head hose_list;
69907 -extern int global_phb_number;
69909 extern void find_and_init_phbs(void);
69912 extern unsigned long get_phb_buid (struct device_node *);
69913 extern int rtas_setup_phb(struct pci_controller *phb);
69915 -/* From iSeries PCI */
69916 -extern void iSeries_pcibios_init(void);
69918 extern unsigned long pci_probe_only;
69920 /* ---- EEH internal-use-only related routines ---- */
69921 --- a/include/asm-powerpc/prom.h
69922 +++ b/include/asm-powerpc/prom.h
69923 @@ -202,6 +202,10 @@
69925 extern u64 of_translate_address(struct device_node *np, const u32 *addr);
69927 +/* Translate a DMA address from device space to CPU space */
69928 +extern u64 of_translate_dma_address(struct device_node *dev,
69929 + const u32 *in_addr);
69931 /* Extract an address from a device, returns the region size and
69932 * the address space flags too. The PCI version uses a BAR number
69933 * instead of an absolute index
69934 --- a/include/asm-powerpc/ps3.h
69935 +++ b/include/asm-powerpc/ps3.h
69937 #include <linux/init.h>
69938 #include <linux/types.h>
69939 #include <linux/device.h>
69940 +#include "cell-pmu.h"
69942 union ps3_firmware_version {
69944 @@ -317,6 +318,7 @@
69945 PS3_MATCH_ID_STOR_FLASH = 8,
69946 PS3_MATCH_ID_SOUND = 9,
69947 PS3_MATCH_ID_GRAPHICS = 10,
69948 + PS3_MATCH_ID_LPM = 11,
69951 #define PS3_MODULE_ALIAS_EHCI "ps3:1"
69952 @@ -329,11 +331,13 @@
69953 #define PS3_MODULE_ALIAS_STOR_FLASH "ps3:8"
69954 #define PS3_MODULE_ALIAS_SOUND "ps3:9"
69955 #define PS3_MODULE_ALIAS_GRAPHICS "ps3:10"
69956 +#define PS3_MODULE_ALIAS_LPM "ps3:11"
69958 enum ps3_system_bus_device_type {
69959 PS3_DEVICE_TYPE_IOC0 = 1,
69960 PS3_DEVICE_TYPE_SB,
69961 PS3_DEVICE_TYPE_VUART,
69962 + PS3_DEVICE_TYPE_LPM,
69966 @@ -344,12 +348,17 @@
69967 enum ps3_match_id match_id;
69968 enum ps3_system_bus_device_type dev_type;
69970 - unsigned int bus_id; /* SB */
69971 - unsigned int dev_id; /* SB */
69972 + u64 bus_id; /* SB */
69973 + u64 dev_id; /* SB */
69974 unsigned int interrupt_id; /* SB */
69975 struct ps3_dma_region *d_region; /* SB, IOC0 */
69976 struct ps3_mmio_region *m_region; /* SB, IOC0*/
69977 unsigned int port_number; /* VUART */
69978 + struct { /* LPM */
69984 /* struct iommu_table *iommu_table; -- waiting for BenH's cleanups */
69985 struct device core;
69986 @@ -438,5 +447,66 @@
69987 extern struct ps3_prealloc ps3fb_videomemory;
69988 extern struct ps3_prealloc ps3flash_bounce_buffer;
69990 +/* logical performance monitor */
69993 + * enum ps3_lpm_rights - Rigths granted by the system policy module.
69995 + * @PS3_LPM_RIGHTS_USE_LPM: The right to use the lpm.
69996 + * @PS3_LPM_RIGHTS_USE_TB: The right to use the internal trace buffer.
69999 +enum ps3_lpm_rights {
70000 + PS3_LPM_RIGHTS_USE_LPM = 0x001,
70001 + PS3_LPM_RIGHTS_USE_TB = 0x100,
70005 + * enum ps3_lpm_tb_type - Type of trace buffer lv1 should use.
70007 + * @PS3_LPM_TB_TYPE_NONE: Do not use a trace buffer.
70008 + * @PS3_LPM_RIGHTS_USE_TB: Use the lv1 internal trace buffer. Must have
70009 + * rights @PS3_LPM_RIGHTS_USE_TB.
70012 +enum ps3_lpm_tb_type {
70013 + PS3_LPM_TB_TYPE_NONE = 0,
70014 + PS3_LPM_TB_TYPE_INTERNAL = 1,
70017 +int ps3_lpm_open(enum ps3_lpm_tb_type tb_type, void *tb_cache,
70018 + u64 tb_cache_size);
70019 +int ps3_lpm_close(void);
70020 +int ps3_lpm_copy_tb(unsigned long offset, void *buf, unsigned long count,
70021 + unsigned long *bytes_copied);
70022 +int ps3_lpm_copy_tb_to_user(unsigned long offset, void __user *buf,
70023 + unsigned long count, unsigned long *bytes_copied);
70024 +void ps3_set_bookmark(u64 bookmark);
70025 +void ps3_set_pm_bookmark(u64 tag, u64 incident, u64 th_id);
70026 +int ps3_set_signal(u64 rtas_signal_group, u8 signal_bit, u16 sub_unit,
70029 +u32 ps3_read_phys_ctr(u32 cpu, u32 phys_ctr);
70030 +void ps3_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val);
70031 +u32 ps3_read_ctr(u32 cpu, u32 ctr);
70032 +void ps3_write_ctr(u32 cpu, u32 ctr, u32 val);
70034 +u32 ps3_read_pm07_control(u32 cpu, u32 ctr);
70035 +void ps3_write_pm07_control(u32 cpu, u32 ctr, u32 val);
70036 +u32 ps3_read_pm(u32 cpu, enum pm_reg_name reg);
70037 +void ps3_write_pm(u32 cpu, enum pm_reg_name reg, u32 val);
70039 +u32 ps3_get_ctr_size(u32 cpu, u32 phys_ctr);
70040 +void ps3_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size);
70042 +void ps3_enable_pm(u32 cpu);
70043 +void ps3_disable_pm(u32 cpu);
70044 +void ps3_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask);
70045 +void ps3_disable_pm_interrupts(u32 cpu);
70047 +u32 ps3_get_and_clear_pm_interrupts(u32 cpu);
70048 +void ps3_sync_irq(int node);
70049 +u32 ps3_get_hw_thread_id(int cpu);
70050 +u64 ps3_get_spe_id(void *arg);
70053 --- a/include/asm-powerpc/ptrace.h
70054 +++ b/include/asm-powerpc/ptrace.h
70055 @@ -106,7 +106,8 @@
70057 #define FULL_REGS(regs) (((regs)->trap & 1) == 0)
70058 #ifndef __powerpc64__
70059 -#define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) == 0)
70060 +#define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) != 0)
70061 +#define IS_MCHECK_EXC(regs) (((regs)->trap & 4) != 0)
70062 #endif /* ! __powerpc64__ */
70063 #define TRAP(regs) ((regs)->trap & ~0xF)
70064 #ifdef __powerpc64__
70065 --- a/include/asm-powerpc/qe.h
70066 +++ b/include/asm-powerpc/qe.h
70068 #define MEM_PART_SECONDARY 1
70069 #define MEM_PART_MURAM 2
70071 +/* Clocks and BRGs */
70074 + QE_BRG1, /* Baud Rate Generator 1 */
70075 + QE_BRG2, /* Baud Rate Generator 2 */
70076 + QE_BRG3, /* Baud Rate Generator 3 */
70077 + QE_BRG4, /* Baud Rate Generator 4 */
70078 + QE_BRG5, /* Baud Rate Generator 5 */
70079 + QE_BRG6, /* Baud Rate Generator 6 */
70080 + QE_BRG7, /* Baud Rate Generator 7 */
70081 + QE_BRG8, /* Baud Rate Generator 8 */
70082 + QE_BRG9, /* Baud Rate Generator 9 */
70083 + QE_BRG10, /* Baud Rate Generator 10 */
70084 + QE_BRG11, /* Baud Rate Generator 11 */
70085 + QE_BRG12, /* Baud Rate Generator 12 */
70086 + QE_BRG13, /* Baud Rate Generator 13 */
70087 + QE_BRG14, /* Baud Rate Generator 14 */
70088 + QE_BRG15, /* Baud Rate Generator 15 */
70089 + QE_BRG16, /* Baud Rate Generator 16 */
70090 + QE_CLK1, /* Clock 1 */
70091 + QE_CLK2, /* Clock 2 */
70092 + QE_CLK3, /* Clock 3 */
70093 + QE_CLK4, /* Clock 4 */
70094 + QE_CLK5, /* Clock 5 */
70095 + QE_CLK6, /* Clock 6 */
70096 + QE_CLK7, /* Clock 7 */
70097 + QE_CLK8, /* Clock 8 */
70098 + QE_CLK9, /* Clock 9 */
70099 + QE_CLK10, /* Clock 10 */
70100 + QE_CLK11, /* Clock 11 */
70101 + QE_CLK12, /* Clock 12 */
70102 + QE_CLK13, /* Clock 13 */
70103 + QE_CLK14, /* Clock 14 */
70104 + QE_CLK15, /* Clock 15 */
70105 + QE_CLK16, /* Clock 16 */
70106 + QE_CLK17, /* Clock 17 */
70107 + QE_CLK18, /* Clock 18 */
70108 + QE_CLK19, /* Clock 19 */
70109 + QE_CLK20, /* Clock 20 */
70110 + QE_CLK21, /* Clock 21 */
70111 + QE_CLK22, /* Clock 22 */
70112 + QE_CLK23, /* Clock 23 */
70113 + QE_CLK24, /* Clock 24 */
70117 /* Export QE common operations */
70118 extern void qe_reset(void);
70119 extern int par_io_init(struct device_node *np);
70122 /* QE internal API */
70123 int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input);
70124 -void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier);
70125 +enum qe_clock qe_clock_source(const char *source);
70126 +int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier);
70127 int qe_get_snum(void);
70128 void qe_put_snum(u8 snum);
70129 unsigned long qe_muram_alloc(int size, int align);
70131 void qe_muram_dump(void);
70132 void *qe_muram_addr(unsigned long offset);
70134 +/* Structure that defines QE firmware binary files.
70136 + * See Documentation/powerpc/qe-firmware.txt for a description of these
70139 +struct qe_firmware {
70140 + struct qe_header {
70141 + __be32 length; /* Length of the entire structure, in bytes */
70142 + u8 magic[3]; /* Set to { 'Q', 'E', 'F' } */
70143 + u8 version; /* Version of this layout. First ver is '1' */
70145 + u8 id[62]; /* Null-terminated identifier string */
70146 + u8 split; /* 0 = shared I-RAM, 1 = split I-RAM */
70147 + u8 count; /* Number of microcode[] structures */
70149 + __be16 model; /* The SOC model */
70150 + u8 major; /* The SOC revision major */
70151 + u8 minor; /* The SOC revision minor */
70152 + } __attribute__ ((packed)) soc;
70153 + u8 padding[4]; /* Reserved, for alignment */
70154 + __be64 extended_modes; /* Extended modes */
70155 + __be32 vtraps[8]; /* Virtual trap addresses */
70156 + u8 reserved[4]; /* Reserved, for future expansion */
70157 + struct qe_microcode {
70158 + u8 id[32]; /* Null-terminated identifier */
70159 + __be32 traps[16]; /* Trap addresses, 0 == ignore */
70160 + __be32 eccr; /* The value for the ECCR register */
70161 + __be32 iram_offset; /* Offset into I-RAM for the code */
70162 + __be32 count; /* Number of 32-bit words of the code */
70163 + __be32 code_offset; /* Offset of the actual microcode */
70164 + u8 major; /* The microcode version major */
70165 + u8 minor; /* The microcode version minor */
70166 + u8 revision; /* The microcode version revision */
70167 + u8 padding; /* Reserved, for alignment */
70168 + u8 reserved[4]; /* Reserved, for future expansion */
70169 + } __attribute__ ((packed)) microcode[1];
70170 + /* All microcode binaries should be located here */
70171 + /* CRC32 should be located here, after the microcode binaries */
70172 +} __attribute__ ((packed));
70174 +struct qe_firmware_info {
70175 + char id[64]; /* Firmware name */
70176 + u32 vtraps[8]; /* Virtual trap addresses */
70177 + u64 extended_modes; /* Extended modes */
70180 +/* Upload a firmware to the QE */
70181 +int qe_upload_firmware(const struct qe_firmware *firmware);
70183 +/* Obtain information on the uploaded firmware */
70184 +struct qe_firmware_info *qe_get_firmware_info(void);
70186 /* Buffer descriptors */
70189 @@ -129,52 +228,6 @@
70190 COMM_DIR_RX_AND_TX = 3
70193 -/* Clocks and BRGs */
70196 - QE_BRG1, /* Baud Rate Generator 1 */
70197 - QE_BRG2, /* Baud Rate Generator 2 */
70198 - QE_BRG3, /* Baud Rate Generator 3 */
70199 - QE_BRG4, /* Baud Rate Generator 4 */
70200 - QE_BRG5, /* Baud Rate Generator 5 */
70201 - QE_BRG6, /* Baud Rate Generator 6 */
70202 - QE_BRG7, /* Baud Rate Generator 7 */
70203 - QE_BRG8, /* Baud Rate Generator 8 */
70204 - QE_BRG9, /* Baud Rate Generator 9 */
70205 - QE_BRG10, /* Baud Rate Generator 10 */
70206 - QE_BRG11, /* Baud Rate Generator 11 */
70207 - QE_BRG12, /* Baud Rate Generator 12 */
70208 - QE_BRG13, /* Baud Rate Generator 13 */
70209 - QE_BRG14, /* Baud Rate Generator 14 */
70210 - QE_BRG15, /* Baud Rate Generator 15 */
70211 - QE_BRG16, /* Baud Rate Generator 16 */
70212 - QE_CLK1, /* Clock 1 */
70213 - QE_CLK2, /* Clock 2 */
70214 - QE_CLK3, /* Clock 3 */
70215 - QE_CLK4, /* Clock 4 */
70216 - QE_CLK5, /* Clock 5 */
70217 - QE_CLK6, /* Clock 6 */
70218 - QE_CLK7, /* Clock 7 */
70219 - QE_CLK8, /* Clock 8 */
70220 - QE_CLK9, /* Clock 9 */
70221 - QE_CLK10, /* Clock 10 */
70222 - QE_CLK11, /* Clock 11 */
70223 - QE_CLK12, /* Clock 12 */
70224 - QE_CLK13, /* Clock 13 */
70225 - QE_CLK14, /* Clock 14 */
70226 - QE_CLK15, /* Clock 15 */
70227 - QE_CLK16, /* Clock 16 */
70228 - QE_CLK17, /* Clock 17 */
70229 - QE_CLK18, /* Clock 18 */
70230 - QE_CLK19, /* Clock 19 */
70231 - QE_CLK20, /* Clock 20 */
70232 - QE_CLK21, /* Clock 21 */
70233 - QE_CLK22, /* Clock 22 */
70234 - QE_CLK23, /* Clock 23 */
70235 - QE_CLK24, /* Clock 24 */
70239 /* QE CMXUCR Registers.
70240 * There are two UCCs represented in each of the four CMXUCR registers.
70241 * These values are for the UCC in the LSBs
70242 @@ -328,6 +381,15 @@
70244 #define QE_SDEBCR_BA_MASK 0x01FFFFFF
70246 +/* Communication Processor */
70247 +#define QE_CP_CERCR_MEE 0x8000 /* Multi-user RAM ECC enable */
70248 +#define QE_CP_CERCR_IEE 0x4000 /* Instruction RAM ECC enable */
70249 +#define QE_CP_CERCR_CIR 0x0800 /* Common instruction RAM */
70252 +#define QE_IRAM_IADD_AIE 0x80000000 /* Auto Increment Enable */
70253 +#define QE_IRAM_IADD_BADDR 0x00080000 /* Base Address */
70256 #define UPGCR_PROTOCOL 0x80000000 /* protocol ul2 or pl2 */
70257 #define UPGCR_TMS 0x40000000 /* Transmit master/slave mode */
70258 --- a/include/asm-powerpc/reg.h
70259 +++ b/include/asm-powerpc/reg.h
70260 @@ -553,6 +553,7 @@
70261 #define SPRN_PA6T_BTCR 978 /* Breakpoint and Tagging Control Register */
70262 #define SPRN_PA6T_IMAAT 979 /* Instruction Match Array Action Table */
70263 #define SPRN_PA6T_PCCR 1019 /* Power Counter Control Register */
70264 +#define SPRN_BKMK 1020 /* Cell Bookmark Register */
70265 #define SPRN_PA6T_RPCCR 1021 /* Retire PC Trace Control Register */
70268 @@ -691,12 +692,6 @@
70269 #define PV_BE 0x0070
70270 #define PV_PA6T 0x0090
70273 - * Number of entries in the SLB. If this ever changes we should handle
70274 - * it with a use a cpu feature fixup.
70276 -#define SLB_NUM_ENTRIES 64
70278 /* Macros for setting and retrieving special purpose registers */
70279 #ifndef __ASSEMBLY__
70280 #define mfmsr() ({unsigned long rval; \
70281 --- a/include/asm-powerpc/reg_booke.h
70282 +++ b/include/asm-powerpc/reg_booke.h
70283 @@ -123,16 +123,23 @@
70284 #define SPRN_SPEFSCR 0x200 /* SPE & Embedded FP Status & Control */
70285 #define SPRN_BBEAR 0x201 /* Branch Buffer Entry Address Register */
70286 #define SPRN_BBTAR 0x202 /* Branch Buffer Target Address Register */
70287 +#define SPRN_ATB 0x20E /* Alternate Time Base */
70288 +#define SPRN_ATBL 0x20E /* Alternate Time Base Lower */
70289 +#define SPRN_ATBU 0x20F /* Alternate Time Base Upper */
70290 #define SPRN_IVOR32 0x210 /* Interrupt Vector Offset Register 32 */
70291 #define SPRN_IVOR33 0x211 /* Interrupt Vector Offset Register 33 */
70292 #define SPRN_IVOR34 0x212 /* Interrupt Vector Offset Register 34 */
70293 #define SPRN_IVOR35 0x213 /* Interrupt Vector Offset Register 35 */
70294 +#define SPRN_IVOR36 0x214 /* Interrupt Vector Offset Register 36 */
70295 +#define SPRN_IVOR37 0x215 /* Interrupt Vector Offset Register 37 */
70296 #define SPRN_MCSRR0 0x23A /* Machine Check Save and Restore Register 0 */
70297 #define SPRN_MCSRR1 0x23B /* Machine Check Save and Restore Register 1 */
70298 #define SPRN_MCSR 0x23C /* Machine Check Status Register */
70299 #define SPRN_MCAR 0x23D /* Machine Check Address Register */
70300 #define SPRN_DSRR0 0x23E /* Debug Save and Restore Register 0 */
70301 #define SPRN_DSRR1 0x23F /* Debug Save and Restore Register 1 */
70302 +#define SPRN_SPRG8 0x25C /* Special Purpose Register General 8 */
70303 +#define SPRN_SPRG9 0x25D /* Special Purpose Register General 9 */
70304 #define SPRN_MAS0 0x270 /* MMU Assist Register 0 */
70305 #define SPRN_MAS1 0x271 /* MMU Assist Register 1 */
70306 #define SPRN_MAS2 0x272 /* MMU Assist Register 2 */
70307 @@ -140,15 +147,18 @@
70308 #define SPRN_MAS4 0x274 /* MMU Assist Register 4 */
70309 #define SPRN_MAS5 0x275 /* MMU Assist Register 5 */
70310 #define SPRN_MAS6 0x276 /* MMU Assist Register 6 */
70311 -#define SPRN_MAS7 0x3b0 /* MMU Assist Register 7 */
70312 #define SPRN_PID1 0x279 /* Process ID Register 1 */
70313 #define SPRN_PID2 0x27A /* Process ID Register 2 */
70314 #define SPRN_TLB0CFG 0x2B0 /* TLB 0 Config Register */
70315 #define SPRN_TLB1CFG 0x2B1 /* TLB 1 Config Register */
70316 +#define SPRN_EPR 0x2BE /* External Proxy Register */
70317 #define SPRN_CCR1 0x378 /* Core Configuration Register 1 */
70318 #define SPRN_ZPR 0x3B0 /* Zone Protection Register (40x) */
70319 +#define SPRN_MAS7 0x3B0 /* MMU Assist Register 7 */
70320 #define SPRN_MMUCR 0x3B2 /* MMU Control Register */
70321 #define SPRN_CCR0 0x3B3 /* Core Configuration Register 0 */
70322 +#define SPRN_EPLC 0x3B3 /* External Process ID Load Context */
70323 +#define SPRN_EPSC 0x3B4 /* External Process ID Store Context */
70324 #define SPRN_SGR 0x3B9 /* Storage Guarded Register */
70325 #define SPRN_DCWR 0x3BA /* Data Cache Write-thru Register */
70326 #define SPRN_SLER 0x3BB /* Little-endian real mode */
70327 @@ -159,6 +169,7 @@
70328 #define SPRN_L1CSR0 0x3F2 /* L1 Cache Control and Status Register 0 */
70329 #define SPRN_L1CSR1 0x3F3 /* L1 Cache Control and Status Register 1 */
70330 #define SPRN_PIT 0x3DB /* Programmable Interval Timer */
70331 +#define SPRN_BUCSR 0x3F5 /* Branch Unit Control and Status */
70332 #define SPRN_DCCR 0x3FA /* Data Cache Cacheability Register */
70333 #define SPRN_ICCR 0x3FB /* Instruction Cache Cacheability Register */
70334 #define SPRN_SVR 0x3FF /* System Version Register */
70335 @@ -207,7 +218,6 @@
70336 #define CCR1_TCS 0x00000080 /* Timer Clock Select */
70338 /* Bit definitions for the MCSR. */
70339 -#ifdef CONFIG_440A
70340 #define MCSR_MCS 0x80000000 /* Machine Check Summary */
70341 #define MCSR_IB 0x40000000 /* Instruction PLB Error */
70342 #define MCSR_DRB 0x20000000 /* Data Read PLB Error */
70343 @@ -217,7 +227,7 @@
70344 #define MCSR_DCSP 0x02000000 /* D-Cache Search Parity Error */
70345 #define MCSR_DCFP 0x01000000 /* D-Cache Flush Parity Error */
70346 #define MCSR_IMPE 0x00800000 /* Imprecise Machine Check Exception */
70350 #define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */
70351 #define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */
70352 @@ -293,7 +303,7 @@
70353 #define ESR_IMCB 0x20000000 /* Instr. Machine Check - Bus error */
70354 #define ESR_IMCT 0x10000000 /* Instr. Machine Check - Timeout */
70355 #define ESR_PIL 0x08000000 /* Program Exception - Illegal */
70356 -#define ESR_PPR 0x04000000 /* Program Exception - Priveleged */
70357 +#define ESR_PPR 0x04000000 /* Program Exception - Privileged */
70358 #define ESR_PTR 0x02000000 /* Program Exception - Trap */
70359 #define ESR_FP 0x01000000 /* Floating Point Operation */
70360 #define ESR_DST 0x00800000 /* Storage Exception - Data miss */
70362 +++ b/include/asm-powerpc/setjmp.h
70365 + * Copyright © 2008 Michael Neuling IBM Corporation
70367 + * This program is free software; you can redistribute it and/or
70368 + * modify it under the terms of the GNU General Public License
70369 + * as published by the Free Software Foundation; either version
70370 + * 2 of the License, or (at your option) any later version.
70373 +#ifndef _ASM_POWERPC_SETJMP_H
70374 +#define _ASM_POWERPC_SETJMP_H
70376 +#define JMP_BUF_LEN 23
70378 +extern long setjmp(long *);
70379 +extern void longjmp(long *, long);
70381 +#endif /* _ASM_POWERPC_SETJMP_H */
70382 --- a/include/asm-powerpc/smu.h
70383 +++ b/include/asm-powerpc/smu.h
70385 * Partition info commands
70387 * These commands are used to retrieve the sdb-partition-XX datas from
70388 - * the SMU. The lenght is always 2. First byte is the subcommand code
70389 + * the SMU. The length is always 2. First byte is the subcommand code
70390 * and second byte is the partition ID.
70392 * The reply is 6 bytes:
70393 @@ -173,12 +173,12 @@
70394 * Power supply control
70396 * The "sub" command is an ASCII string in the data, the
70397 - * data lenght is that of the string.
70398 + * data length is that of the string.
70400 * The VSLEW command can be used to get or set the voltage slewing.
70401 - * - lenght 5 (only "VSLEW") : it returns "DONE" and 3 bytes of
70402 + * - length 5 (only "VSLEW") : it returns "DONE" and 3 bytes of
70403 * reply at data offset 6, 7 and 8.
70404 - * - lenght 8 ("VSLEWxyz") has 3 additional bytes appended, and is
70405 + * - length 8 ("VSLEWxyz") has 3 additional bytes appended, and is
70406 * used to set the voltage slewing point. The SMU replies with "DONE"
70407 * I yet have to figure out their exact meaning of those 3 bytes in
70408 * both cases. They seem to be:
70409 @@ -201,20 +201,90 @@
70411 #define SMU_CMD_READ_ADC 0xd8
70416 * This command seem to be a grab bag of various things
70421 #define SMU_CMD_MISC_df_COMMAND 0xdf
70422 -#define SMU_CMD_MISC_df_SET_DISPLAY_LIT 0x02 /* i: 1 byte */
70425 + * Sets "system ready" status
70427 + * I did not yet understand how it exactly works or what it does.
70429 + * Guessing from OF code, 0x02 activates the display backlight. Apple uses/used
70430 + * the same codebase for all OF versions. On PowerBooks, this command would
70431 + * enable the backlight. For the G5s, it only activates the front LED. However,
70432 + * don't take this for granted.
70435 + * 2: status [0x00, 0x01 or 0x02]
70437 +#define SMU_CMD_MISC_df_SET_DISPLAY_LIT 0x02
70440 + * Sets mode of power switch.
70442 + * What this actually does is not yet known. Maybe it enables some interrupt.
70445 + * 2: enable power switch? [0x00 or 0x01]
70446 + * 3 (optional): enable nmi? [0x00 or 0x01]
70449 + * If parameter 2 is 0x00 and parameter 3 is not specified, returns wether
70450 + * NMI is enabled. Otherwise unknown.
70452 #define SMU_CMD_MISC_df_NMI_OPTION 0x04
70454 +/* Sets LED dimm offset.
70456 + * The front LED dimms itself during sleep. Its brightness (or, well, the PWM
70457 + * frequency) depends on current time. Therefore, the SMU needs to know the
70461 + * 2-8: unknown (BCD coding)
70463 +#define SMU_CMD_MISC_df_DIMM_OFFSET 0x99
70467 * Version info commands
70469 - * I haven't quite tried to figure out how these work
70471 + * 1 (optional): Specifies version part to retrieve
70476 #define SMU_CMD_VERSION_COMMAND 0xea
70477 +#define SMU_VERSION_RUNNING 0x00
70478 +#define SMU_VERSION_BASE 0x01
70479 +#define SMU_VERSION_UPDATE 0x02
70485 + * These are switches whose status seems to be known to the SMU.
70491 + * Switch bits (ORed, see below)
70493 +#define SMU_CMD_SWITCHES 0xdc
70495 +/* Switches bits */
70496 +#define SMU_SWITCH_CASE_CLOSED 0x01
70497 +#define SMU_SWITCH_AC_POWER 0x04
70498 +#define SMU_SWITCH_POWER_SWITCH 0x08
70502 @@ -243,10 +313,64 @@
70504 #define SMU_CMD_MISC_ee_COMMAND 0xee
70505 #define SMU_CMD_MISC_ee_GET_DATABLOCK_REC 0x02
70506 -#define SMU_CMD_MISC_ee_LEDS_CTRL 0x04 /* i: 00 (00,01) [00] */
70508 +/* Retrieves currently used watts.
70511 + * 1: 0x03 (Meaning unknown)
70513 +#define SMU_CMD_MISC_ee_GET_WATTS 0x03
70515 +#define SMU_CMD_MISC_ee_LEDS_CTRL 0x04 /* i: 00 (00,01) [00] */
70516 #define SMU_CMD_MISC_ee_GET_DATA 0x05 /* i: 00 , o: ?? */
70520 + * Power related commands
70525 +#define SMU_CMD_POWER_EVENTS_COMMAND 0x8f
70527 +/* SMU_POWER_EVENTS subcommands */
70529 + SMU_PWR_GET_POWERUP_EVENTS = 0x00,
70530 + SMU_PWR_SET_POWERUP_EVENTS = 0x01,
70531 + SMU_PWR_CLR_POWERUP_EVENTS = 0x02,
70532 + SMU_PWR_GET_WAKEUP_EVENTS = 0x03,
70533 + SMU_PWR_SET_WAKEUP_EVENTS = 0x04,
70534 + SMU_PWR_CLR_WAKEUP_EVENTS = 0x05,
70537 + * Get last shutdown cause
70540 + * 1 byte (signed char): Last shutdown cause. Exact meaning unknown.
70542 + SMU_PWR_LAST_SHUTDOWN_CAUSE = 0x07,
70545 + * Sets or gets server ID. Meaning or use is unknown.
70548 + * 2 (optional): Set server ID (1 byte)
70551 + * 1 byte (server ID?)
70553 + SMU_PWR_SERVER_ID = 0x08,
70556 +/* Power events wakeup bits */
70558 + SMU_PWR_WAKEUP_KEY = 0x01, /* Wake on key press */
70559 + SMU_PWR_WAKEUP_AC_INSERT = 0x02, /* Wake on AC adapter plug */
70560 + SMU_PWR_WAKEUP_AC_CHANGE = 0x04,
70561 + SMU_PWR_WAKEUP_LID_OPEN = 0x08,
70562 + SMU_PWR_WAKEUP_RING = 0x10,
70567 * - Kernel side interface -
70568 @@ -564,13 +688,13 @@
70570 __u8 cmd; /* SMU command byte */
70571 __u8 pad[3]; /* padding */
70572 - __u32 data_len; /* Lenght of data following */
70573 + __u32 data_len; /* Length of data following */
70576 struct smu_user_reply_hdr
70578 __u32 status; /* Command status */
70579 - __u32 reply_len; /* Lenght of data follwing */
70580 + __u32 reply_len; /* Length of data follwing */
70583 #endif /* _SMU_H */
70584 --- a/include/asm-powerpc/sparsemem.h
70585 +++ b/include/asm-powerpc/sparsemem.h
70588 #define SECTION_SIZE_BITS 24
70590 -#if defined(CONFIG_PS3_USE_LPAR_ADDR)
70591 -#define MAX_PHYSADDR_BITS 47
70592 -#define MAX_PHYSMEM_BITS 47
70594 #define MAX_PHYSADDR_BITS 44
70595 #define MAX_PHYSMEM_BITS 44
70598 #ifdef CONFIG_MEMORY_HOTPLUG
70599 extern void create_section_mapping(unsigned long start, unsigned long end);
70600 --- a/include/asm-powerpc/spu.h
70601 +++ b/include/asm-powerpc/spu.h
70602 @@ -104,6 +104,7 @@
70604 struct spu_context;
70605 struct spu_runqueue;
70607 struct device_node;
70609 enum spu_utilization_state {
70610 @@ -145,7 +146,6 @@
70611 void (* ibox_callback)(struct spu *spu);
70612 void (* stop_callback)(struct spu *spu);
70613 void (* mfc_callback)(struct spu *spu);
70614 - void (* dma_callback)(struct spu *spu, int type);
70618 @@ -196,10 +196,11 @@
70619 extern struct cbe_spu_info cbe_spu_info[];
70621 void spu_init_channels(struct spu *spu);
70622 -int spu_irq_class_0_bottom(struct spu *spu);
70623 -int spu_irq_class_1_bottom(struct spu *spu);
70624 void spu_irq_setaffinity(struct spu *spu, int cpu);
70626 +void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
70627 + void *code, int code_size);
70629 #ifdef CONFIG_KEXEC
70630 void crash_register_spus(struct list_head *list);
70632 @@ -210,6 +211,7 @@
70634 extern void spu_invalidate_slbs(struct spu *spu);
70635 extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm);
70636 +int spu_64k_pages_available(void);
70638 /* Calls from the memory management to the SPU */
70640 @@ -279,6 +281,8 @@
70641 int spu_add_sysdev_attr_group(struct attribute_group *attrs);
70642 void spu_remove_sysdev_attr_group(struct attribute_group *attrs);
70644 +int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
70645 + unsigned long dsisr, unsigned *flt);
70649 @@ -303,7 +307,7 @@
70650 extern void do_notify_spus_active(void);
70653 - * This defines the Local Store, Problem Area and Privlege Area of an SPU.
70654 + * This defines the Local Store, Problem Area and Privilege Area of an SPU.
70657 union mfc_tag_size_class_cmd {
70658 @@ -524,8 +528,24 @@
70659 #define CLASS2_ENABLE_SPU_STOP_INTR 0x2L
70660 #define CLASS2_ENABLE_SPU_HALT_INTR 0x4L
70661 #define CLASS2_ENABLE_SPU_DMA_TAG_GROUP_COMPLETE_INTR 0x8L
70662 +#define CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR 0x10L
70663 u8 pad_0x118_0x140[0x28]; /* 0x118 */
70664 u64 int_stat_RW[3]; /* 0x140 */
70665 +#define CLASS0_DMA_ALIGNMENT_INTR 0x1L
70666 +#define CLASS0_INVALID_DMA_COMMAND_INTR 0x2L
70667 +#define CLASS0_SPU_ERROR_INTR 0x4L
70668 +#define CLASS0_INTR_MASK 0x7L
70669 +#define CLASS1_SEGMENT_FAULT_INTR 0x1L
70670 +#define CLASS1_STORAGE_FAULT_INTR 0x2L
70671 +#define CLASS1_LS_COMPARE_SUSPEND_ON_GET_INTR 0x4L
70672 +#define CLASS1_LS_COMPARE_SUSPEND_ON_PUT_INTR 0x8L
70673 +#define CLASS1_INTR_MASK 0xfL
70674 +#define CLASS2_MAILBOX_INTR 0x1L
70675 +#define CLASS2_SPU_STOP_INTR 0x2L
70676 +#define CLASS2_SPU_HALT_INTR 0x4L
70677 +#define CLASS2_SPU_DMA_TAG_GROUP_COMPLETE_INTR 0x8L
70678 +#define CLASS2_MAILBOX_THRESHOLD_INTR 0x10L
70679 +#define CLASS2_INTR_MASK 0x1fL
70680 u8 pad_0x158_0x180[0x28]; /* 0x158 */
70681 u64 int_route_RW; /* 0x180 */
70683 --- a/include/asm-powerpc/spu_csa.h
70684 +++ b/include/asm-powerpc/spu_csa.h
70685 @@ -194,7 +194,7 @@
70689 - * struct spu_priv2_collapsed - condensed priviliged 2 area, w/o pads.
70690 + * struct spu_priv2_collapsed - condensed privileged 2 area, w/o pads.
70692 struct spu_priv2_collapsed {
70694 @@ -254,20 +254,11 @@
70695 u64 spu_chnldata_RW[32];
70696 u32 spu_mailbox_data[4];
70697 u32 pu_mailbox_data[1];
70699 + u64 dar, dsisr, class_0_pending;
70700 unsigned long suspend_time;
70701 spinlock_t register_lock;
70704 -extern int spu_init_csa(struct spu_state *csa);
70705 -extern void spu_fini_csa(struct spu_state *csa);
70706 -extern int spu_save(struct spu_state *prev, struct spu *spu);
70707 -extern int spu_restore(struct spu_state *new, struct spu *spu);
70708 -extern int spu_switch(struct spu_state *prev, struct spu_state *new,
70709 - struct spu *spu);
70710 -extern int spu_alloc_lscsa(struct spu_state *csa);
70711 -extern void spu_free_lscsa(struct spu_state *csa);
70713 #endif /* !__SPU__ */
70714 #endif /* __KERNEL__ */
70715 #endif /* !__ASSEMBLY__ */
70716 --- a/include/asm-powerpc/spu_priv1.h
70717 +++ b/include/asm-powerpc/spu_priv1.h
70719 #include <linux/types.h>
70722 +struct spu_context;
70724 /* access to priv1 registers */
70726 @@ -178,6 +179,8 @@
70727 int (*enumerate_spus)(int (*fn)(void *data));
70728 int (*create_spu)(struct spu *spu, void *data);
70729 int (*destroy_spu)(struct spu *spu);
70730 + void (*enable_spu)(struct spu_context *ctx);
70731 + void (*disable_spu)(struct spu_context *ctx);
70732 int (*init_affinity)(void);
70735 @@ -207,6 +210,18 @@
70736 return spu_management_ops->init_affinity();
70739 +static inline void
70740 +spu_enable_spu (struct spu_context *ctx)
70742 + spu_management_ops->enable_spu(ctx);
70745 +static inline void
70746 +spu_disable_spu (struct spu_context *ctx)
70748 + spu_management_ops->disable_spu(ctx);
70752 * The declarations folowing are put here for convenience
70753 * and only intended to be used by the platform setup code.
70754 --- a/include/asm-powerpc/system.h
70755 +++ b/include/asm-powerpc/system.h
70756 @@ -169,6 +169,8 @@
70757 extern void bad_page_fault(struct pt_regs *, unsigned long, int);
70758 extern int die(const char *, struct pt_regs *, long);
70759 extern void _exception(int, struct pt_regs *, int, unsigned long);
70760 +extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
70762 #ifdef CONFIG_BOOKE_WDT
70763 extern u32 booke_wdt_enabled;
70764 extern u32 booke_wdt_period;
70765 --- a/include/asm-powerpc/udbg.h
70766 +++ b/include/asm-powerpc/udbg.h
70768 extern void __init udbg_init_debug_beat(void);
70769 extern void __init udbg_init_btext(void);
70770 extern void __init udbg_init_44x_as1(void);
70771 +extern void __init udbg_init_40x_realmode(void);
70772 extern void __init udbg_init_cpm(void);
70774 #endif /* __KERNEL__ */
70775 --- a/include/asm-ppc/8xx_immap.h
70776 +++ b/include/asm-ppc/8xx_immap.h
70777 @@ -123,7 +123,7 @@
70778 #define OR_G5LA 0x00000400 /* Output #GPL5 on #GPL_A5 */
70779 #define OR_G5LS 0x00000200 /* Drive #GPL high on falling edge of...*/
70780 #define OR_BI 0x00000100 /* Burst inhibit */
70781 -#define OR_SCY_MSK 0x000000f0 /* Cycle Lenght in Clocks */
70782 +#define OR_SCY_MSK 0x000000f0 /* Cycle Length in Clocks */
70783 #define OR_SCY_0_CLK 0x00000000 /* 0 clock cycles wait states */
70784 #define OR_SCY_1_CLK 0x00000010 /* 1 clock cycles wait states */
70785 #define OR_SCY_2_CLK 0x00000020 /* 2 clock cycles wait states */
70786 --- a/include/asm-ppc/commproc.h
70787 +++ b/include/asm-ppc/commproc.h
70788 @@ -681,7 +681,7 @@
70789 #define CICR_SCC_SCC3 ((uint)0x00200000) /* SCC3 @ SCCc */
70790 #define CICR_SCB_SCC2 ((uint)0x00040000) /* SCC2 @ SCCb */
70791 #define CICR_SCA_SCC1 ((uint)0x00000000) /* SCC1 @ SCCa */
70792 -#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrrupt */
70793 +#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrupt */
70794 #define CICR_HP_MASK ((uint)0x00001f00) /* Hi-pri int. */
70795 #define CICR_IEN ((uint)0x00000080) /* Int. enable */
70796 #define CICR_SPS ((uint)0x00000001) /* SCC Spread */
70797 --- a/include/asm-ppc/mmu.h
70798 +++ b/include/asm-ppc/mmu.h
70799 @@ -383,6 +383,12 @@
70800 #define BOOKE_PAGESZ_256GB 14
70801 #define BOOKE_PAGESZ_1TB 15
70803 +#ifndef CONFIG_SERIAL_TEXT_DEBUG
70804 +#define PPC44x_EARLY_TLBS 1
70806 +#define PPC44x_EARLY_TLBS 2
70810 * Freescale Book-E MMU support
70812 --- a/include/asm-ppc/mpc52xx_psc.h
70813 +++ b/include/asm-ppc/mpc52xx_psc.h
70814 @@ -159,6 +159,9 @@
70816 u8 irfdr; /* PSC + 0x54 */
70820 +struct mpc52xx_psc_fifo {
70821 u16 rfnum; /* PSC + 0x58 */
70823 u16 tfnum; /* PSC + 0x5c */
70824 --- a/include/asm-ppc/reg_booke.h
70825 +++ b/include/asm-ppc/reg_booke.h
70826 @@ -207,7 +207,7 @@
70827 #define CCR1_TCS 0x00000080 /* Timer Clock Select */
70829 /* Bit definitions for the MCSR. */
70830 -#ifdef CONFIG_440A
70832 #define MCSR_MCS 0x80000000 /* Machine Check Summary */
70833 #define MCSR_IB 0x40000000 /* Instruction PLB Error */
70834 #define MCSR_DRB 0x20000000 /* Data Read PLB Error */
70835 @@ -283,7 +283,7 @@
70836 #define ESR_IMCB 0x20000000 /* Instr. Machine Check - Bus error */
70837 #define ESR_IMCT 0x10000000 /* Instr. Machine Check - Timeout */
70838 #define ESR_PIL 0x08000000 /* Program Exception - Illegal */
70839 -#define ESR_PPR 0x04000000 /* Program Exception - Priveleged */
70840 +#define ESR_PPR 0x04000000 /* Program Exception - Privileged */
70841 #define ESR_PTR 0x02000000 /* Program Exception - Trap */
70842 #define ESR_FP 0x01000000 /* Floating Point Operation */
70843 #define ESR_DST 0x00800000 /* Storage Exception - Data miss */
70844 --- a/include/linux/of.h
70845 +++ b/include/linux/of.h
70848 #include <linux/types.h>
70849 #include <linux/bitops.h>
70850 +#include <linux/mod_devicetable.h>
70852 #include <asm/prom.h>
70854 @@ -41,11 +42,20 @@
70855 #define for_each_compatible_node(dn, type, compatible) \
70856 for (dn = of_find_compatible_node(NULL, type, compatible); dn; \
70857 dn = of_find_compatible_node(dn, type, compatible))
70858 +extern struct device_node *of_find_matching_node(struct device_node *from,
70859 + const struct of_device_id *matches);
70860 +#define for_each_matching_node(dn, matches) \
70861 + for (dn = of_find_matching_node(NULL, matches); dn; \
70862 + dn = of_find_matching_node(dn, matches))
70863 extern struct device_node *of_find_node_by_path(const char *path);
70864 extern struct device_node *of_find_node_by_phandle(phandle handle);
70865 extern struct device_node *of_get_parent(const struct device_node *node);
70866 extern struct device_node *of_get_next_child(const struct device_node *node,
70867 struct device_node *prev);
70868 +#define for_each_child_of_node(parent, child) \
70869 + for (child = of_get_next_child(parent, NULL); child != NULL; \
70870 + child = of_get_next_child(parent, child))
70872 extern struct property *of_find_property(const struct device_node *np,
70877 extern int of_n_addr_cells(struct device_node *np);
70878 extern int of_n_size_cells(struct device_node *np);
70879 +extern const struct of_device_id *of_match_node(
70880 + const struct of_device_id *matches, const struct device_node *node);
70882 #endif /* _LINUX_OF_H */
70883 --- a/include/linux/of_device.h
70884 +++ b/include/linux/of_device.h
70887 #define to_of_device(d) container_of(d, struct of_device, dev)
70889 -extern const struct of_device_id *of_match_node(
70890 - const struct of_device_id *matches, const struct device_node *node);
70891 extern const struct of_device_id *of_match_device(
70892 const struct of_device_id *matches, const struct of_device *dev);
70894 --- a/include/linux/pata_platform.h
70895 +++ b/include/linux/pata_platform.h
70897 unsigned int irq_flags;
70900 +extern int __devinit __pata_platform_probe(struct device *dev,
70901 + struct resource *io_res,
70902 + struct resource *ctl_res,
70903 + struct resource *irq_res,
70904 + unsigned int ioport_shift,
70907 +extern int __devexit __pata_platform_remove(struct device *dev);
70909 #endif /* __LINUX_PATA_PLATFORM_H */
70910 --- a/include/linux/phy_fixed.h
70911 +++ b/include/linux/phy_fixed.h
70913 #ifndef __PHY_FIXED_H
70914 #define __PHY_FIXED_H
70916 -#define MII_REGS_NUM 29
70918 -/* max number of virtual phy stuff */
70919 -#define MAX_PHY_AMNT 10
70921 - The idea is to emulate normal phy behavior by responding with
70922 - pre-defined values to mii BMCR read, so that read_status hook could
70923 - take all the needed info.
70926 struct fixed_phy_status {
70937 -/*-----------------------------------------------------------------------------
70938 - * Private information hoder for mii_bus
70939 - *-----------------------------------------------------------------------------*/
70940 -struct fixed_info {
70943 - struct fixed_phy_status phy_status;
70944 - struct phy_device *phydev; /* pointer to the container */
70945 - /* link & speed cb */
70946 - int (*link_update) (struct net_device *, struct fixed_phy_status *);
70947 +#ifdef CONFIG_FIXED_PHY
70948 +extern int fixed_phy_add(unsigned int irq, int phy_id,
70949 + struct fixed_phy_status *status);
70951 +static inline int fixed_phy_add(unsigned int irq, int phy_id,
70952 + struct fixed_phy_status *status)
70956 +#endif /* CONFIG_FIXED_PHY */
70961 -int fixed_mdio_set_link_update(struct phy_device *,
70962 - int (*link_update) (struct net_device *, struct fixed_phy_status *));
70963 -struct fixed_info *fixed_mdio_get_phydev (int phydev_ind);
70965 + * This function issued only by fixed_phy-aware drivers, no need
70966 + * protect it with #ifdef
70968 +extern int fixed_phy_set_link_update(struct phy_device *phydev,
70969 + int (*link_update)(struct net_device *,
70970 + struct fixed_phy_status *));
70972 #endif /* __PHY_FIXED_H */
70973 --- a/include/linux/pmu.h
70974 +++ b/include/linux/pmu.h
70975 @@ -159,41 +159,7 @@
70976 extern int pmu_present(void);
70977 extern int pmu_get_model(void);
70981 - * Stuff for putting the powerbook to sleep and waking it again.
70984 -#include <linux/list.h>
70986 -struct pmu_sleep_notifier
70988 - void (*notifier_call)(struct pmu_sleep_notifier *self, int when);
70990 - struct list_head list;
70993 -/* Code values for calling sleep/wakeup handlers
70995 -#define PBOOK_SLEEP_REQUEST 1
70996 -#define PBOOK_SLEEP_NOW 2
70997 -#define PBOOK_WAKE 3
70999 -/* priority levels in notifiers */
71000 -#define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */
71001 -#define SLEEP_LEVEL_MEDIABAY 90 /* Media bay driver */
71002 -#define SLEEP_LEVEL_BLOCK 80 /* IDE, SCSI */
71003 -#define SLEEP_LEVEL_NET 70 /* bmac, gmac */
71004 -#define SLEEP_LEVEL_MISC 60 /* Anything else */
71005 -#define SLEEP_LEVEL_USERLAND 55 /* Reserved for apm_emu */
71006 -#define SLEEP_LEVEL_ADB 50 /* ADB (async) */
71007 -#define SLEEP_LEVEL_SOUND 40 /* Sound driver (blocking) */
71009 -/* special register notifier functions */
71010 -int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier);
71011 -int pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* notifier);
71013 -#endif /* CONFIG_PM */
71014 +extern void pmu_backlight_set_sleep(int sleep);
71016 #define PMU_MAX_BATTERIES 2