1 diff -x .git -x .gitignore -Nur linux-2.6.24/Documentation/kernel-parameters.txt powerpc.git/Documentation/kernel-parameters.txt
2 --- linux-2.6.24/Documentation/kernel-parameters.txt 2008-01-24 23:58:37.000000000 +0100
3 +++ powerpc.git/Documentation/kernel-parameters.txt 2008-01-28 20:25:33.000000000 +0100
5 See Documentation/isdn/README.HiSax.
7 hugepages= [HW,X86-32,IA-64] Maximal number of HugeTLB pages.
8 + hugepagesz= [HW,IA-64,PPC] The size of the HugeTLB pages.
10 i8042.direct [HW] Put keyboard port into non-translated mode
11 i8042.dumbkbd [HW] Pretend that controller can only read data from
12 diff -x .git -x .gitignore -Nur linux-2.6.24/Documentation/powerpc/00-INDEX powerpc.git/Documentation/powerpc/00-INDEX
13 --- linux-2.6.24/Documentation/powerpc/00-INDEX 2008-01-24 23:58:37.000000000 +0100
14 +++ powerpc.git/Documentation/powerpc/00-INDEX 2008-01-28 20:25:33.000000000 +0100
16 - info on sound support under Linux/PPC
18 - info on the kernel images for Linux/PPC
20 + - describes the layout of firmware binaries for the Freescale QUICC
21 + Engine and the code that parses and uploads the microcode therein.
22 diff -x .git -x .gitignore -Nur linux-2.6.24/Documentation/powerpc/booting-without-of.txt powerpc.git/Documentation/powerpc/booting-without-of.txt
23 --- linux-2.6.24/Documentation/powerpc/booting-without-of.txt 2008-01-24 23:58:37.000000000 +0100
24 +++ powerpc.git/Documentation/powerpc/booting-without-of.txt 2008-01-28 20:25:33.000000000 +0100
26 i) Freescale QUICC Engine module (QE)
27 j) CFI or JEDEC memory-mapped NOR flash
28 k) Global Utilities Block
30 + l) Freescale Communications Processor Module
31 + m) Chipselect/Local Bus
32 + n) 4xx/Axon EMAC ethernet nodes
34 + p) Freescale Synchronous Serial Interface
36 VII - Specifying interrupt information for devices
37 1) interrupts property
40 In general, the format of an address for a device is defined by the
41 parent bus type, based on the #address-cells and #size-cells
42 -property. In the absence of such a property, the parent's parent
43 -values are used, etc... The kernel requires the root node to have
44 -those properties defining addresses format for devices directly mapped
45 -on the processor bus.
46 +properties. Note that the parent's parent definitions of #address-cells
47 +and #size-cells are not inhereted so every node with children must specify
48 +them. The kernel requires the root node to have those properties defining
49 +addresses format for devices directly mapped on the processor bus.
51 Those 2 properties define 'cells' for representing an address and a
52 size. A "cell" is a 32-bit number. For example, if both contain 2
54 like address space bits, you'll have to add a bus translator to the
55 prom_parse.c file of the recent kernels for your bus type.
57 -The "reg" property only defines addresses and sizes (if #size-cells
58 -is non-0) within a given bus. In order to translate addresses upward
59 +The "reg" property only defines addresses and sizes (if #size-cells is
60 +non-0) within a given bus. In order to translate addresses upward
61 (that is into parent bus addresses, and possibly into CPU physical
62 addresses), all busses must contain a "ranges" property. If the
63 "ranges" property is missing at a given level, it's assumed that
64 -translation isn't possible. The format of the "ranges" property for a
66 +translation isn't possible, i.e., the registers are not visible on the
67 +parent bus. The format of the "ranges" property for a bus is a list
70 bus address, parent bus address, size
73 1/1 format, unless the processor supports physical addresses greater
74 than 32-bits, in which case a 2/1 format is recommended.
76 +Alternatively, the "ranges" property may be empty, indicating that the
77 +registers are visible on the parent bus using an identity mapping
78 +translation. In other words, the parent bus address space is the same
79 +as the child bus address space.
81 2) Note about "compatible" properties
82 -------------------------------------
83 @@ -1218,16 +1227,14 @@
86 - reg : Offset and length of the register set for the device
87 - - device_type : Should be "mdio"
88 - compatible : Should define the compatible device type for the
89 - mdio. Currently, this is most likely to be "gianfar"
90 + mdio. Currently, this is most likely to be "fsl,gianfar-mdio"
96 - device_type = "mdio";
97 - compatible = "gianfar";
98 + compatible = "fsl,gianfar-mdio";
102 @@ -1254,6 +1261,10 @@
103 services interrupts for this device.
104 - phy-handle : The phandle for the PHY connected to this ethernet
106 + - fixed-link : <a b c d e> where a is emulated phy id - choose any,
107 + but unique to the all specified fixed-links, b is duplex - 0 half,
108 + 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no
109 + pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause.
111 Recommended properties:
113 @@ -1408,7 +1419,6 @@
115 Example multi port host USB controller device node :
117 - device_type = "usb";
118 compatible = "fsl-usb2-mph";
120 #address-cells = <1>;
121 @@ -1422,7 +1432,6 @@
123 Example dual role USB controller device node :
125 - device_type = "usb";
126 compatible = "fsl-usb2-dr";
128 #address-cells = <1>;
129 @@ -1586,7 +1595,6 @@
130 iii) USB (Universal Serial Bus Controller)
133 - - device_type : should be "usb".
134 - compatible : could be "qe_udc" or "fhci-hcd".
135 - mode : the could be "host" or "slave".
136 - reg : Offset and length of the register set for the device
137 @@ -1600,7 +1608,6 @@
141 - device_type = "usb";
142 compatible = "qe_udc";
145 @@ -1613,7 +1620,7 @@
148 - device_type : should be "network", "hldc", "uart", "transparent"
150 + "bisync", "atm", or "serial".
151 - compatible : could be "ucc_geth" or "fsl_atm" and so on.
152 - model : should be "UCC".
153 - device-id : the ucc number(1-8), corresponding to UCCx in UM.
154 @@ -1626,6 +1633,26 @@
155 - interrupt-parent : the phandle for the interrupt controller that
156 services interrupts for this device.
157 - pio-handle : The phandle for the Parallel I/O port configuration.
158 + - port-number : for UART drivers, the port number to use, between 0 and 3.
159 + This usually corresponds to the /dev/ttyQE device, e.g. <0> = /dev/ttyQE0.
160 + The port number is added to the minor number of the device. Unlike the
161 + CPM UART driver, the port-number is required for the QE UART driver.
162 + - soft-uart : for UART drivers, if specified this means the QE UART device
163 + driver should use "Soft-UART" mode, which is needed on some SOCs that have
164 + broken UART hardware. Soft-UART is provided via a microcode upload.
165 + - rx-clock-name: the UCC receive clock source
166 + "none": clock source is disabled
167 + "brg1" through "brg16": clock source is BRG1-BRG16, respectively
168 + "clk1" through "clk24": clock source is CLK1-CLK24, respectively
169 + - tx-clock-name: the UCC transmit clock source
170 + "none": clock source is disabled
171 + "brg1" through "brg16": clock source is BRG1-BRG16, respectively
172 + "clk1" through "clk24": clock source is CLK1-CLK24, respectively
173 + The following two properties are deprecated. rx-clock has been replaced
174 + with rx-clock-name, and tx-clock has been replaced with tx-clock-name.
175 + Drivers that currently use the deprecated properties should continue to
176 + do so, in order to support older device trees, but they should be updated
177 + to check for the new properties first.
178 - rx-clock : represents the UCC receive clock source.
179 0x00 : clock source is disabled;
180 0x1~0x10 : clock source is BRG1~BRG16 respectively;
181 @@ -1772,6 +1799,32 @@
185 + viii) Uploaded QE firmware
187 + If a new firwmare has been uploaded to the QE (usually by the
188 + boot loader), then a 'firmware' child node should be added to the QE
189 + node. This node provides information on the uploaded firmware that
190 + device drivers may need.
192 + Required properties:
193 + - id: The string name of the firmware. This is taken from the 'id'
194 + member of the qe_firmware structure of the uploaded firmware.
195 + Device drivers can search this string to determine if the
196 + firmware they want is already present.
197 + - extended-modes: The Extended Modes bitfield, taken from the
198 + firmware binary. It is a 64-bit number represented
199 + as an array of two 32-bit numbers.
200 + - virtual-traps: The virtual traps, taken from the firmware binary.
201 + It is an array of 8 32-bit numbers.
207 + extended-modes = <0 0>;
208 + virtual-traps = <0 0 0 0 0 0 0 0>;
211 j) CFI or JEDEC memory-mapped NOR flash
213 Flash chips (Memory Technology Devices) are often used for solid state
214 @@ -2075,8 +2128,7 @@
218 - compatible = "fsl,mpc8272ads-localbus",
219 - "fsl,mpc8272-localbus",
220 + compatible = "fsl,mpc8272-localbus",
222 #address-cells = <2>;
224 @@ -2254,7 +2306,7 @@
231 The Xilinx EDK toolchain ships with a set of IP cores (devices) for use
232 in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range
233 @@ -2276,7 +2328,7 @@
234 properties of the device node. In general, device nodes for IP-cores
235 will take the following form:
237 - (name)@(base-address) {
238 + (name): (generic-name)@(base-address) {
239 compatible = "xlnx,(ip-core-name)-(HW_VER)"
240 [, (list of compatible devices), ...];
241 reg = <(baseaddr) (size)>;
242 @@ -2286,6 +2338,9 @@
243 xlnx,(parameter2) = <(int-value)>;
246 + (generic-name): an open firmware-style name that describes the
247 + generic class of device. Preferably, this is one word, such
248 + as 'serial' or 'ethernet'.
249 (ip-core-name): the name of the ip block (given after the BEGIN
250 directive in system.mhs). Should be in lowercase
251 and all underscores '_' converted to dashes '-'.
252 @@ -2294,9 +2349,9 @@
253 dropped from the parameter name, the name is converted
254 to lowercase and all underscore '_' characters are
255 converted to dashes '-'.
256 - (baseaddr): the C_BASEADDR parameter.
257 + (baseaddr): the baseaddr parameter value (often named C_BASEADDR).
258 (HW_VER): from the HW_VER parameter.
259 - (size): equals C_HIGHADDR - C_BASEADDR + 1
260 + (size): the address range size (often C_HIGHADDR - C_BASEADDR + 1).
262 Typically, the compatible list will include the exact IP core version
263 followed by an older IP core version which implements the same
264 @@ -2326,11 +2381,11 @@
266 becomes the following device tree node:
268 - opb-uartlite-0@ec100000 {
269 + opb_uartlite_0: serial@ec100000 {
270 device_type = "serial";
271 compatible = "xlnx,opb-uartlite-1.00.b";
272 reg = <ec100000 10000>;
273 - interrupt-parent = <&opb-intc>;
274 + interrupt-parent = <&opb_intc_0>;
275 interrupts = <1 0>; // got this from the opb_intc parameters
276 current-speed = <d#115200>; // standard serial device prop
277 clock-frequency = <d#50000000>; // standard serial device prop
278 @@ -2339,16 +2394,19 @@
279 xlnx,use-parity = <0>;
282 - Some IP cores actually implement 2 or more logical devices. In this case,
283 - the device should still describe the whole IP core with a single node
284 - and add a child node for each logical device. The ranges property can
285 - be used to translate from parent IP-core to the registers of each device.
286 - (Note: this makes the assumption that both logical devices have the same
287 - bus binding. If this is not true, then separate nodes should be used for
288 - each logical device). The 'cell-index' property can be used to enumerate
289 - logical devices within an IP core. For example, the following is the
290 - system.mhs entry for the dual ps2 controller found on the ml403 reference
292 + Some IP cores actually implement 2 or more logical devices. In
293 + this case, the device should still describe the whole IP core with
294 + a single node and add a child node for each logical device. The
295 + ranges property can be used to translate from parent IP-core to the
296 + registers of each device. In addition, the parent node should be
297 + compatible with the bus type 'xlnx,compound', and should contain
298 + #address-cells and #size-cells, as with any other bus. (Note: this
299 + makes the assumption that both logical devices have the same bus
300 + binding. If this is not true, then separate nodes should be used
301 + for each logical device). The 'cell-index' property can be used to
302 + enumerate logical devices within an IP core. For example, the
303 + following is the system.mhs entry for the dual ps2 controller found
304 + on the ml403 reference design.
306 BEGIN opb_ps2_dual_ref
307 PARAMETER INSTANCE = opb_ps2_dual_ref_0
308 @@ -2370,21 +2428,24 @@
310 It would result in the following device tree nodes:
312 - opb_ps2_dual_ref_0@a9000000 {
313 + opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {
314 + #address-cells = <1>;
316 + compatible = "xlnx,compound";
317 ranges = <0 a9000000 2000>;
318 // If this device had extra parameters, then they would
321 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
323 - interrupt-parent = <&opb-intc>;
324 + interrupt-parent = <&opb_intc_0>;
329 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
331 - interrupt-parent = <&opb-intc>;
332 + interrupt-parent = <&opb_intc_0>;
336 @@ -2447,17 +2508,18 @@
338 Gives this device tree (some properties removed for clarity):
342 #address-cells = <1>;
344 + compatible = "xlnx,plb-v34-1.02.a";
345 device_type = "ibm,plb";
346 ranges; // 1:1 translation
348 - plb-bram-if-cntrl-0@ffff0000 {
349 + plb_bram_if_cntrl_0: bram@ffff0000 {
350 reg = <ffff0000 10000>;
355 #address-cells = <1>;
357 ranges = <20000000 20000000 20000000
358 @@ -2465,11 +2527,11 @@
359 80000000 80000000 40000000
360 c0000000 c0000000 20000000>;
362 - opb-uart16550-0@a0000000 {
363 + opb_uart16550_0: serial@a0000000 {
364 reg = <a00000000 2000>;
367 - opb-intc-0@d1000fc0 {
368 + opb_intc_0: interrupt-controller@d1000fc0 {
372 @@ -2514,6 +2576,46 @@
374 - current-speed : Baud rate of uartlite
376 + p) Freescale Synchronous Serial Interface
378 + The SSI is a serial device that communicates with audio codecs. It can
379 + be programmed in AC97, I2S, left-justified, or right-justified modes.
381 + Required properties:
382 + - compatible : compatible list, containing "fsl,ssi"
383 + - cell-index : the SSI, <0> = SSI1, <1> = SSI2, and so on
384 + - reg : offset and length of the register set for the device
385 + - interrupts : <a b> where a is the interrupt number and b is a
386 + field that represents an encoding of the sense and
387 + level information for the interrupt. This should be
388 + encoded based on the information in section 2)
389 + depending on the type of interrupt controller you
391 + - interrupt-parent : the phandle for the interrupt controller that
392 + services interrupts for this device.
393 + - fsl,mode : the operating mode for the SSI interface
394 + "i2s-slave" - I2S mode, SSI is clock slave
395 + "i2s-master" - I2S mode, SSI is clock master
396 + "lj-slave" - left-justified mode, SSI is clock slave
397 + "lj-master" - l.j. mode, SSI is clock master
398 + "rj-slave" - right-justified mode, SSI is clock slave
399 + "rj-master" - r.j., SSI is clock master
400 + "ac97-slave" - AC97 mode, SSI is clock slave
401 + "ac97-master" - AC97 mode, SSI is clock master
403 + Optional properties:
404 + - codec-handle : phandle to a 'codec' node that defines an audio
405 + codec connected to this SSI. This node is typically
406 + a child of an I2C or other control node.
408 + Child 'codec' node required properties:
409 + - compatible : compatible list, contains the name of the codec
411 + Child 'codec' node optional properties:
412 + - clock-frequency : The frequency of the input clock, which typically
413 + comes from an on-board dedicated oscillator.
416 More devices will be defined as this spec matures.
418 VII - Specifying interrupt information for devices
419 diff -x .git -x .gitignore -Nur linux-2.6.24/Documentation/powerpc/qe_firmware.txt powerpc.git/Documentation/powerpc/qe_firmware.txt
420 --- linux-2.6.24/Documentation/powerpc/qe_firmware.txt 1970-01-01 01:00:00.000000000 +0100
421 +++ powerpc.git/Documentation/powerpc/qe_firmware.txt 2008-01-28 20:25:33.000000000 +0100
423 + Freescale QUICC Engine Firmware Uploading
424 + -----------------------------------------
426 +(c) 2007 Timur Tabi <timur at freescale.com>,
427 + Freescale Semiconductor
432 + I - Software License for Firmware
434 + II - Microcode Availability
436 + III - Description and Terminology
438 + IV - Microcode Programming Details
440 + V - Firmware Structure Layout
442 + VI - Sample Code for Creating Firmware Files
444 +Revision Information
445 +====================
447 +November 30, 2007: Rev 1.0 - Initial version
449 +I - Software License for Firmware
450 +=================================
452 +Each firmware file comes with its own software license. For information on
453 +the particular license, please see the license text that is distributed with
456 +II - Microcode Availability
457 +===========================
459 +Firmware files are distributed through various channels. Some are available on
460 +http://opensource.freescale.com. For other firmware files, please contact
461 +your Freescale representative or your operating system vendor.
463 +III - Description and Terminology
464 +================================
466 +In this document, the term 'microcode' refers to the sequence of 32-bit
467 +integers that compose the actual QE microcode.
469 +The term 'firmware' refers to a binary blob that contains the microcode as
470 +well as other data that
472 + 1) describes the microcode's purpose
473 + 2) describes how and where to upload the microcode
474 + 3) specifies the values of various registers
475 + 4) includes additional data for use by specific device drivers
477 +Firmware files are binary files that contain only a firmware.
479 +IV - Microcode Programming Details
480 +===================================
482 +The QE architecture allows for only one microcode present in I-RAM for each
483 +RISC processor. To replace any current microcode, a full QE reset (which
484 +disables the microcode) must be performed first.
486 +QE microcode is uploaded using the following procedure:
488 +1) The microcode is placed into I-RAM at a specific location, using the
489 + IRAM.IADD and IRAM.IDATA registers.
491 +2) The CERCR.CIR bit is set to 0 or 1, depending on whether the firmware
492 + needs split I-RAM. Split I-RAM is only meaningful for SOCs that have
493 + QEs with multiple RISC processors, such as the 8360. Splitting the I-RAM
494 + allows each processor to run a different microcode, effectively creating an
495 + asymmetric multiprocessing (AMP) system.
497 +3) The TIBCR trap registers are loaded with the addresses of the trap handlers
500 +4) The RSP.ECCR register is programmed with the value provided.
502 +5) If necessary, device drivers that need the virtual traps and extended mode
503 + data will use them.
505 +Virtual Microcode Traps
507 +These virtual traps are conditional branches in the microcode. These are
508 +"soft" provisional introduced in the ROMcode in order to enable higher
509 +flexibility and save h/w traps If new features are activated or an issue is
510 +being fixed in the RAM package utilizing they should be activated. This data
511 +structure signals the microcode which of these virtual traps is active.
513 +This structure contains 6 words that the application should copy to some
514 +specific been defined. This table describes the structure.
516 + ---------------------------------------------------------------
517 + | Offset in | | Destination Offset | Size of |
518 + | array | Protocol | within PRAM | Operand |
519 + --------------------------------------------------------------|
520 + | 0 | Ethernet | 0xF8 | 4 bytes |
521 + | | interworking | | |
522 + ---------------------------------------------------------------
523 + | 4 | ATM | 0xF8 | 4 bytes |
524 + | | interworking | | |
525 + ---------------------------------------------------------------
526 + | 8 | PPP | 0xF8 | 4 bytes |
527 + | | interworking | | |
528 + ---------------------------------------------------------------
529 + | 12 | Ethernet RX | 0x22 | 1 byte |
530 + | | Distributor Page | | |
531 + ---------------------------------------------------------------
532 + | 16 | ATM Globtal | 0x28 | 1 byte |
533 + | | Params Table | | |
534 + ---------------------------------------------------------------
535 + | 20 | Insert Frame | 0xF8 | 4 bytes |
536 + ---------------------------------------------------------------
541 +This is a double word bit array (64 bits) that defines special functionality
542 +which has an impact on the softwarew drivers. Each bit has its own impact
543 +and has special instructions for the s/w associated with it. This structure is
544 +described in this table:
546 + -----------------------------------------------------------------------
547 + | Bit # | Name | Description |
548 + -----------------------------------------------------------------------
549 + | 0 | General | Indicates that prior to each host command |
550 + | | push command | given by the application, the software must |
551 + | | | assert a special host command (push command)|
552 + | | | CECDR = 0x00800000. |
553 + | | | CECR = 0x01c1000f. |
554 + -----------------------------------------------------------------------
555 + | 1 | UCC ATM | Indicates that after issuing ATM RX INIT |
556 + | | RX INIT | command, the host must issue another special|
557 + | | push command | command (push command) and immediately |
558 + | | | following that re-issue the ATM RX INIT |
559 + | | | command. (This makes the sequence of |
560 + | | | initializing the ATM receiver a sequence of |
561 + | | | three host commands) |
562 + | | | CECDR = 0x00800000. |
563 + | | | CECR = 0x01c1000f. |
564 + -----------------------------------------------------------------------
565 + | 2 | Add/remove | Indicates that following the specific host |
566 + | | command | command: "Add/Remove entry in Hash Lookup |
567 + | | validation | Table" used in Interworking setup, the user |
568 + | | | must issue another command. |
569 + | | | CECDR = 0xce000003. |
570 + | | | CECR = 0x01c10f58. |
571 + -----------------------------------------------------------------------
572 + | 3 | General push | Indicates that the s/w has to initialize |
573 + | | command | some pointers in the Ethernet thread pages |
574 + | | | which are used when Header Compression is |
575 + | | | activated. The full details of these |
576 + | | | pointers is located in the software drivers.|
577 + -----------------------------------------------------------------------
578 + | 4 | General push | Indicates that after issuing Ethernet TX |
579 + | | command | INIT command, user must issue this command |
580 + | | | for each SNUM of Ethernet TX thread. |
581 + | | | CECDR = 0x00800003. |
582 + | | | CECR = 0x7'b{0}, 8'b{Enet TX thread SNUM}, |
583 + | | | 1'b{1}, 12'b{0}, 4'b{1} |
584 + -----------------------------------------------------------------------
585 + | 5 - 31 | N/A | Reserved, set to zero. |
586 + -----------------------------------------------------------------------
588 +V - Firmware Structure Layout
589 +==============================
591 +QE microcode from Freescale is typically provided as a header file. This
592 +header file contains macros that define the microcode binary itself as well as
593 +some other data used in uploading that microcode. The format of these files
594 +do not lend themselves to simple inclusion into other code. Hence,
595 +the need for a more portable format. This section defines that format.
597 +Instead of distributing a header file, the microcode and related data are
598 +embedded into a binary blob. This blob is passed to the qe_upload_firmware()
599 +function, which parses the blob and performs everything necessary to upload
602 +All integers are big-endian. See the comments for function
603 +qe_upload_firmware() for up-to-date implementation information.
605 +This structure supports versioning, where the version of the structure is
606 +embedded into the structure itself. To ensure forward and backwards
607 +compatibility, all versions of the structure must use the same 'qe_header'
608 +structure at the beginning.
610 +'header' (type: struct qe_header):
611 + The 'length' field is the size, in bytes, of the entire structure,
612 + including all the microcode embedded in it, as well as the CRC (if
615 + The 'magic' field is an array of three bytes that contains the letters
616 + 'Q', 'E', and 'F'. This is an identifier that indicates that this
617 + structure is a QE Firmware structure.
619 + The 'version' field is a single byte that indicates the version of this
620 + structure. If the layout of the structure should ever need to be
621 + changed to add support for additional types of microcode, then the
622 + version number should also be changed.
624 +The 'id' field is a null-terminated string(suitable for printing) that
625 +identifies the firmware.
627 +The 'count' field indicates the number of 'microcode' structures. There
628 +must be one and only one 'microcode' structure for each RISC processor.
629 +Therefore, this field also represents the number of RISC processors for this
632 +The 'soc' structure contains the SOC numbers and revisions used to match
633 +the microcode to the SOC itself. Normally, the microcode loader should
634 +check the data in this structure with the SOC number and revisions, and
635 +only upload the microcode if there's a match. However, this check is not
636 +made on all platforms.
638 +Although it is not recommended, you can specify '0' in the soc.model
639 +field to skip matching SOCs altogether.
641 +The 'model' field is a 16-bit number that matches the actual SOC. The
642 +'major' and 'minor' fields are the major and minor revision numbrs,
643 +respectively, of the SOC.
645 +For example, to match the 8323, revision 1.0:
650 +'padding' is neccessary for structure alignment. This field ensures that the
651 +'extended_modes' field is aligned on a 64-bit boundary.
653 +'extended_modes' is a bitfield that defines special functionality which has an
654 +impact on the device drivers. Each bit has its own impact and has special
655 +instructions for the driver associated with it. This field is stored in
656 +the QE library and available to any driver that calles qe_get_firmware_info().
658 +'vtraps' is an array of 8 words that contain virtual trap values for each
659 +virtual traps. As with 'extended_modes', this field is stored in the QE
660 +library and available to any driver that calles qe_get_firmware_info().
662 +'microcode' (type: struct qe_microcode):
663 + For each RISC processor there is one 'microcode' structure. The first
664 + 'microcode' structure is for the first RISC, and so on.
666 + The 'id' field is a null-terminated string suitable for printing that
667 + identifies this particular microcode.
669 + 'traps' is an array of 16 words that contain hardware trap values
670 + for each of the 16 traps. If trap[i] is 0, then this particular
671 + trap is to be ignored (i.e. not written to TIBCR[i]). The entire value
672 + is written as-is to the TIBCR[i] register, so be sure to set the EN
673 + and T_IBP bits if necessary.
675 + 'eccr' is the value to program into the ECCR register.
677 + 'iram_offset' is the offset into IRAM to start writing the
680 + 'count' is the number of 32-bit words in the microcode.
682 + 'code_offset' is the offset, in bytes, from the beginning of this
683 + structure where the microcode itself can be found. The first
684 + microcode binary should be located immediately after the 'microcode'
687 + 'major', 'minor', and 'revision' are the major, minor, and revision
688 + version numbers, respectively, of the microcode. If all values are 0,
689 + then these fields are ignored.
691 + 'reserved' is necessary for structure alignment. Since 'microcode'
692 + is an array, the 64-bit 'extended_modes' field needs to be aligned
693 + on a 64-bit boundary, and this can only happen if the size of
694 + 'microcode' is a multiple of 8 bytes. To ensure that, we add
697 +After the last microcode is a 32-bit CRC. It can be calculated using
700 +u32 crc32(const u8 *p, unsigned int len)
707 + for (i = 0; i < 8; i++)
708 + crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0);
713 +VI - Sample Code for Creating Firmware Files
714 +============================================
716 +A Python program that creates firmware binaries from the header files normally
717 +distributed by Freescale can be found on http://opensource.freescale.com.
718 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/Kconfig powerpc.git/arch/powerpc/Kconfig
719 --- linux-2.6.24/arch/powerpc/Kconfig 2008-01-24 23:58:37.000000000 +0100
720 +++ powerpc.git/arch/powerpc/Kconfig 2008-01-28 21:37:04.000000000 +0100
722 Used to allow a board to specify it wants a uImage built by default
730 depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL))
731 @@ -160,11 +163,13 @@
733 config PPC_OF_PLATFORM_PCI
736 depends on PPC64 # not supported on 32 bits yet
739 source "init/Kconfig"
741 +source "arch/powerpc/sysdev/Kconfig"
742 source "arch/powerpc/platforms/Kconfig"
744 menu "Kernel options"
750 + default !PPC_ISERIES || PCI
756 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
757 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
760 default y if !40x && !CPM2 && !8xx && !PPC_83xx \
761 && !PPC_85xx && !PPC_86xx
762 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx
763 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/Kconfig.debug powerpc.git/arch/powerpc/Kconfig.debug
764 --- linux-2.6.24/arch/powerpc/Kconfig.debug 2008-01-24 23:58:37.000000000 +0100
765 +++ powerpc.git/arch/powerpc/Kconfig.debug 2008-01-28 20:25:49.000000000 +0100
768 config PPC_EARLY_DEBUG
769 bool "Early debugging (dangerous)"
771 + Say Y to enable some early debugging facilities that may be available
772 + for your processor/board combination. Those facilities are hacks
773 + intended to debug problems early during boot, this should not be
774 + enabled in a production kernel.
775 + Note that enabling this will also cause the kernel default log level
776 + to be pushed to max automatically very early during boot
779 prompt "Early debugging console"
783 Select this to enable early debugging for IBM 44x chips via the
784 - inbuilt serial port.
785 + inbuilt serial port. If you enable this, ensure you set
786 + PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board.
788 +config PPC_EARLY_DEBUG_40x
789 + bool "Early serial debugging for IBM/AMCC 40x CPUs"
792 + Select this to enable early debugging for IBM 40x chips via the
793 + inbuilt serial port. This works on chips with a 16550 compatible
794 + UART. Xilinx chips with uartlite cannot use this option.
796 config PPC_EARLY_DEBUG_CPM
797 bool "Early serial debugging for Freescale CPM-based serial ports"
798 @@ -235,12 +251,20 @@
799 hex "Low 32 bits of early debug UART physical address"
800 depends on PPC_EARLY_DEBUG_44x
803 + You probably want 0x40000200 for ebony boards and
804 + 0x40000300 for taishan
806 config PPC_EARLY_DEBUG_44x_PHYSHIGH
807 hex "EPRN of early debug UART physical address"
808 depends on PPC_EARLY_DEBUG_44x
811 +config PPC_EARLY_DEBUG_40x_PHYSADDR
812 + hex "Early debug UART physical address"
813 + depends on PPC_EARLY_DEBUG_40x
814 + default "0xef600300"
816 config PPC_EARLY_DEBUG_CPM_ADDR
817 hex "CPM UART early debug transmit descriptor address"
818 depends on PPC_EARLY_DEBUG_CPM
819 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/Makefile powerpc.git/arch/powerpc/Makefile
820 --- linux-2.6.24/arch/powerpc/Makefile 2008-01-24 23:58:37.000000000 +0100
821 +++ powerpc.git/arch/powerpc/Makefile 2008-01-28 20:25:49.000000000 +0100
823 $(BOOT_TARGETS): vmlinux
824 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
826 +bootwrapper_install:
827 + $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
830 @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
831 @echo ' install - Install kernel using'
832 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/4xx.c powerpc.git/arch/powerpc/boot/4xx.c
833 --- linux-2.6.24/arch/powerpc/boot/4xx.c 2008-01-24 23:58:37.000000000 +0100
834 +++ powerpc.git/arch/powerpc/boot/4xx.c 2008-01-28 20:25:49.000000000 +0100
838 /* Read the 4xx SDRAM controller to get size of system memory. */
839 -void ibm4xx_fixup_memsize(void)
840 +void ibm4xx_sdram_fixup_memsize(void)
843 unsigned long memsize, bank_config;
846 for (i = 0; i < ARRAY_SIZE(sdram_bxcr); i++) {
847 - mtdcr(DCRN_SDRAM0_CFGADDR, sdram_bxcr[i]);
848 - bank_config = mfdcr(DCRN_SDRAM0_CFGDATA);
850 + bank_config = SDRAM0_READ(sdram_bxcr[i]);
851 if (bank_config & SDRAM_CONFIG_BANK_ENABLE)
852 memsize += SDRAM_CONFIG_BANK_SIZE(bank_config);
855 dt_fixup_memory(0, memsize);
858 +/* Read the 440SPe MQ controller to get size of system memory. */
859 +#define DCRN_MQ0_B0BAS 0x40
860 +#define DCRN_MQ0_B1BAS 0x41
861 +#define DCRN_MQ0_B2BAS 0x42
862 +#define DCRN_MQ0_B3BAS 0x43
864 +static u64 ibm440spe_decode_bas(u32 bas)
866 + u64 base = ((u64)(bas & 0xFFE00000u)) << 2;
868 + /* open coded because I'm paranoid about invalid values */
869 + switch ((bas >> 4) & 0xFFF) {
873 + return base + 0x000800000ull;
875 + return base + 0x001000000ull;
877 + return base + 0x002000000ull;
879 + return base + 0x004000000ull;
881 + return base + 0x008000000ull;
883 + return base + 0x010000000ull;
885 + return base + 0x020000000ull;
887 + return base + 0x040000000ull;
889 + return base + 0x080000000ull;
891 + return base + 0x100000000ull;
893 + printf("Memory BAS value 0x%08x unsupported !\n", bas);
897 +void ibm440spe_fixup_memsize(void)
899 + u64 banktop, memsize = 0;
901 + /* Ultimately, we should directly construct the memory node
902 + * so we are able to handle holes in the memory address space
904 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B0BAS));
905 + if (banktop > memsize)
907 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B1BAS));
908 + if (banktop > memsize)
910 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B2BAS));
911 + if (banktop > memsize)
913 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B3BAS));
914 + if (banktop > memsize)
917 + dt_fixup_memory(0, memsize);
921 /* 4xx DDR1/2 Denali memory controller support */
926 #define DDR_GET_VAL(val, mask, shift) (((val) >> (shift)) & (mask))
928 -static inline u32 mfdcr_sdram0(u32 reg)
930 - mtdcr(DCRN_SDRAM0_CFGADDR, reg);
931 - return mfdcr(DCRN_SDRAM0_CFGDATA);
934 void ibm4xx_denali_fixup_memsize(void)
936 u32 val, max_cs, max_col, max_row;
937 u32 cs, col, row, bank, dpath;
938 unsigned long memsize;
940 - val = mfdcr_sdram0(DDR0_02);
941 + val = SDRAM0_READ(DDR0_02);
942 if (!DDR_GET_VAL(val, DDR_START, DDR_START_SHIFT))
943 fatal("DDR controller is not initialized\n");
946 max_row = DDR_GET_VAL(val, DDR_MAX_ROW_REG, DDR_MAX_ROW_REG_SHIFT);
949 - val = mfdcr_sdram0(DDR0_10);
950 + val = SDRAM0_READ(DDR0_10);
952 val = DDR_GET_VAL(val, DDR_CS_MAP, DDR_CS_MAP_SHIFT);
960 @@ -115,15 +170,15 @@
961 fatal("DDR wrong CS configuration\n");
963 /* get data path bytes */
964 - val = mfdcr_sdram0(DDR0_14);
965 + val = SDRAM0_READ(DDR0_14);
967 if (DDR_GET_VAL(val, DDR_REDUC, DDR_REDUC_SHIFT))
968 dpath = 8; /* 64 bits */
970 dpath = 4; /* 32 bits */
972 - /* get adress pins (rows) */
973 - val = mfdcr_sdram0(DDR0_42);
974 + /* get address pins (rows) */
975 + val = SDRAM0_READ(DDR0_42);
977 row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT);
982 /* get collomn size and banks */
983 - val = mfdcr_sdram0(DDR0_43);
984 + val = SDRAM0_READ(DDR0_43);
986 col = DDR_GET_VAL(val, DDR_COL_SZ, DDR_COL_SZ_SHIFT);
988 @@ -179,13 +234,17 @@
989 #define EMAC_RESET 0x20000000
990 void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1)
992 - /* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't do this for us */
993 + /* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't
1001 mtdcr(DCRN_MAL0_CFG, MAL_RESET);
1002 + while (mfdcr(DCRN_MAL0_CFG) & MAL_RESET)
1003 + ; /* loop until reset takes effect */
1006 /* Read 4xx EBC bus bridge registers to get mappings of the peripheral
1007 @@ -217,84 +276,335 @@
1008 setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32));
1011 -#define SPRN_CCR1 0x378
1012 -void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
1013 +/* Calculate 440GP clocks */
1014 +void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
1016 - u32 cpu, plb, opb, ebc, tb, uart0, m, vco;
1018 - u32 fwdva, fwdvb, fbdv, lfbdv, opbdv0, perdv0, spcid0, prbdv0, tmp;
1020 - mtdcr(DCRN_CPR0_ADDR, CPR0_PLLD0);
1021 - reg = mfdcr(DCRN_CPR0_DATA);
1022 - tmp = (reg & 0x000F0000) >> 16;
1023 - fwdva = tmp ? tmp : 16;
1024 - tmp = (reg & 0x00000700) >> 8;
1025 - fwdvb = tmp ? tmp : 8;
1026 - tmp = (reg & 0x1F000000) >> 24;
1027 - fbdv = tmp ? tmp : 32;
1028 - lfbdv = (reg & 0x0000007F);
1030 - mtdcr(DCRN_CPR0_ADDR, CPR0_OPBD0);
1031 - reg = mfdcr(DCRN_CPR0_DATA);
1032 - tmp = (reg & 0x03000000) >> 24;
1033 - opbdv0 = tmp ? tmp : 4;
1035 - mtdcr(DCRN_CPR0_ADDR, CPR0_PERD0);
1036 - reg = mfdcr(DCRN_CPR0_DATA);
1037 - tmp = (reg & 0x07000000) >> 24;
1038 - perdv0 = tmp ? tmp : 8;
1040 - mtdcr(DCRN_CPR0_ADDR, CPR0_PRIMBD0);
1041 - reg = mfdcr(DCRN_CPR0_DATA);
1042 - tmp = (reg & 0x07000000) >> 24;
1043 - prbdv0 = tmp ? tmp : 8;
1045 - mtdcr(DCRN_CPR0_ADDR, CPR0_SCPID);
1046 - reg = mfdcr(DCRN_CPR0_DATA);
1047 - tmp = (reg & 0x03000000) >> 24;
1048 - spcid0 = tmp ? tmp : 4;
1051 - mtdcr(DCRN_CPR0_ADDR, CPR0_PLLC0);
1052 - reg = mfdcr(DCRN_CPR0_DATA);
1053 - tmp = (reg & 0x03000000) >> 24;
1054 - if (tmp == 0) { /* PLL output */
1055 - tmp = (reg & 0x20000000) >> 29;
1056 - if (!tmp) /* PLLOUTA */
1057 - m = fbdv * lfbdv * fwdva;
1058 + u32 sys0 = mfdcr(DCRN_CPC0_SYS0);
1059 + u32 cr0 = mfdcr(DCRN_CPC0_CR0);
1060 + u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
1061 + u32 opdv = CPC0_SYS0_OPDV(sys0);
1062 + u32 epdv = CPC0_SYS0_EPDV(sys0);
1064 + if (sys0 & CPC0_SYS0_BYPASS) {
1065 + /* Bypass system PLL */
1066 + cpu = plb = sys_clk;
1068 + if (sys0 & CPC0_SYS0_EXTSL)
1070 + m = CPC0_SYS0_FWDVB(sys0) * opdv * epdv;
1072 - m = fbdv * lfbdv * fwdvb;
1074 + m = CPC0_SYS0_FBDV(sys0) * CPC0_SYS0_FWDVA(sys0);
1075 + cpu = sys_clk * m / CPC0_SYS0_FWDVA(sys0);
1076 + plb = sys_clk * m / CPC0_SYS0_FWDVB(sys0);
1078 - else if (tmp == 1) /* CPU output */
1084 + /* FIXME: Check if this is for all 440GP, or just Ebony */
1085 + if ((mfpvr() & 0xf0000fff) == 0x40000440)
1086 + /* Rev. B 440GP, use external system clock */
1089 - m = perdv0 * opbdv0 * fwdvb;
1090 + /* Rev. C 440GP, errata force us to use internal clock */
1093 - vco = (m * sysclk) + (m >> 1);
1094 - cpu = vco / fwdva;
1095 - plb = vco / fwdvb / prbdv0;
1096 - opb = plb / opbdv0;
1097 - ebc = plb / perdv0;
1098 + if (cr0 & CPC0_CR0_U0EC)
1099 + /* External UART clock */
1102 + /* Internal UART clock */
1103 + uart0 = plb / CPC0_CR0_UDIV(cr0);
1107 + if (cr0 & CPC0_CR0_U1EC)
1108 + /* External UART clock */
1111 + /* Internal UART clock */
1112 + uart1 = plb / CPC0_CR0_UDIV(cr0);
1114 + printf("PPC440GP: SysClk = %dMHz (%x)\n\r",
1115 + (sys_clk + 500000) / 1000000, sys_clk);
1117 + dt_fixup_cpu_clocks(cpu, tb, 0);
1119 + dt_fixup_clock("/plb", plb);
1120 + dt_fixup_clock("/plb/opb", opb);
1121 + dt_fixup_clock("/plb/opb/ebc", ebc);
1122 + dt_fixup_clock("/plb/opb/serial@40000200", uart0);
1123 + dt_fixup_clock("/plb/opb/serial@40000300", uart1);
1126 +#define SPRN_CCR1 0x378
1128 +static inline u32 __fix_zero(u32 v, u32 def)
1130 + return v ? v : def;
1133 +static unsigned int __ibm440eplike_fixup_clocks(unsigned int sys_clk,
1134 + unsigned int tmr_clk,
1135 + int per_clk_from_opb)
1138 + u32 pllc = CPR0_READ(DCRN_CPR0_PLLC);
1139 + u32 plld = CPR0_READ(DCRN_CPR0_PLLD);
1142 + u32 fbdv = __fix_zero((plld >> 24) & 0x1f, 32);
1143 + u32 fwdva = __fix_zero((plld >> 16) & 0xf, 16);
1144 + u32 fwdvb = __fix_zero((plld >> 8) & 7, 8);
1145 + u32 lfbdv = __fix_zero(plld & 0x3f, 64);
1146 + u32 pradv0 = __fix_zero((CPR0_READ(DCRN_CPR0_PRIMAD) >> 24) & 7, 8);
1147 + u32 prbdv0 = __fix_zero((CPR0_READ(DCRN_CPR0_PRIMBD) >> 24) & 7, 8);
1148 + u32 opbdv0 = __fix_zero((CPR0_READ(DCRN_CPR0_OPBD) >> 24) & 3, 4);
1149 + u32 perdv0 = __fix_zero((CPR0_READ(DCRN_CPR0_PERD) >> 24) & 3, 4);
1151 + /* Input clocks for primary dividers */
1154 + /* Resulting clocks */
1155 + u32 cpu, plb, opb, ebc, vco;
1158 + u32 ccr1, tb = tmr_clk;
1160 + if (pllc & 0x40000000) {
1163 + /* Feedback path */
1164 + switch ((pllc >> 24) & 7) {
1167 + m = ((pllc & 0x20000000) ? fwdvb : fwdva) * lfbdv;
1171 + m = fwdva * pradv0;
1175 + m = fwdvb * prbdv0 * opbdv0 * perdv0;
1178 + printf("WARNING ! Invalid PLL feedback source !\n");
1182 + vco = sys_clk * m;
1183 + clk_a = vco / fwdva;
1184 + clk_b = vco / fwdvb;
1187 + /* Bypass system PLL */
1189 + clk_a = clk_b = sys_clk;
1192 + cpu = clk_a / pradv0;
1193 + plb = clk_b / prbdv0;
1194 + opb = plb / opbdv0;
1195 + ebc = (per_clk_from_opb ? opb : plb) / perdv0;
1197 /* Figure out timebase. Either CPU or default TmrClk */
1201 - "=&r"(reg) : "i"(SPRN_CCR1));
1203 - tb = 25000000; /* TmrClk is 25MHz */
1205 + ccr1 = mfspr(SPRN_CCR1);
1207 + /* If passed a 0 tmr_clk, force CPU clock */
1210 + mtspr(SPRN_CCR1, ccr1);
1212 + if ((ccr1 & 0x0080) == 0)
1215 dt_fixup_cpu_clocks(cpu, tb, 0);
1216 dt_fixup_clock("/plb", plb);
1217 dt_fixup_clock("/plb/opb", opb);
1218 dt_fixup_clock("/plb/opb/ebc", ebc);
1223 +static void eplike_fixup_uart_clk(int index, const char *path,
1224 + unsigned int ser_clk,
1225 + unsigned int plb_clk)
1228 + unsigned int clock;
1232 + sdr = SDR0_READ(DCRN_SDR0_UART0);
1235 + sdr = SDR0_READ(DCRN_SDR0_UART1);
1238 + sdr = SDR0_READ(DCRN_SDR0_UART2);
1241 + sdr = SDR0_READ(DCRN_SDR0_UART3);
1247 + if (sdr & 0x00800000u)
1250 + clock = plb_clk / __fix_zero(sdr & 0xff, 256);
1252 + dt_fixup_clock(path, clock);
1255 +void ibm440ep_fixup_clocks(unsigned int sys_clk,
1256 + unsigned int ser_clk,
1257 + unsigned int tmr_clk)
1259 + unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 0);
1261 + /* serial clocks beed fixup based on int/ext */
1262 + eplike_fixup_uart_clk(0, "/plb/opb/serial@ef600300", ser_clk, plb_clk);
1263 + eplike_fixup_uart_clk(1, "/plb/opb/serial@ef600400", ser_clk, plb_clk);
1264 + eplike_fixup_uart_clk(2, "/plb/opb/serial@ef600500", ser_clk, plb_clk);
1265 + eplike_fixup_uart_clk(3, "/plb/opb/serial@ef600600", ser_clk, plb_clk);
1268 +void ibm440gx_fixup_clocks(unsigned int sys_clk,
1269 + unsigned int ser_clk,
1270 + unsigned int tmr_clk)
1272 + unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
1274 + /* serial clocks beed fixup based on int/ext */
1275 + eplike_fixup_uart_clk(0, "/plb/opb/serial@40000200", ser_clk, plb_clk);
1276 + eplike_fixup_uart_clk(1, "/plb/opb/serial@40000300", ser_clk, plb_clk);
1279 +void ibm440spe_fixup_clocks(unsigned int sys_clk,
1280 + unsigned int ser_clk,
1281 + unsigned int tmr_clk)
1283 + unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
1285 + /* serial clocks beed fixup based on int/ext */
1286 + eplike_fixup_uart_clk(0, "/plb/opb/serial@10000200", ser_clk, plb_clk);
1287 + eplike_fixup_uart_clk(1, "/plb/opb/serial@10000300", ser_clk, plb_clk);
1288 + eplike_fixup_uart_clk(2, "/plb/opb/serial@10000600", ser_clk, plb_clk);
1291 +void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
1293 + u32 pllmr = mfdcr(DCRN_CPC0_PLLMR);
1294 + u32 cpc0_cr0 = mfdcr(DCRN_405_CPC0_CR0);
1295 + u32 cpc0_cr1 = mfdcr(DCRN_405_CPC0_CR1);
1296 + u32 psr = mfdcr(DCRN_405_CPC0_PSR);
1297 + u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
1298 + u32 fwdv, fwdvb, fbdv, cbdv, opdv, epdv, ppdv, udiv;
1300 + fwdv = (8 - ((pllmr & 0xe0000000) >> 29));
1301 + fbdv = (pllmr & 0x1e000000) >> 25;
1304 + cbdv = ((pllmr & 0x00060000) >> 17) + 1; /* CPU:PLB */
1305 + opdv = ((pllmr & 0x00018000) >> 15) + 1; /* PLB:OPB */
1306 + ppdv = ((pllmr & 0x00001800) >> 13) + 1; /* PLB:PCI */
1307 + epdv = ((pllmr & 0x00001800) >> 11) + 2; /* PLB:EBC */
1308 + udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1;
1310 + /* check for 405GPr */
1311 + if ((mfpvr() & 0xfffffff0) == (0x50910951 & 0xfffffff0)) {
1312 + fwdvb = 8 - (pllmr & 0x00000007);
1313 + if (!(psr & 0x00001000)) /* PCI async mode enable == 0 */
1314 + if (psr & 0x00000020) /* New mode enable */
1315 + m = fwdvb * 2 * ppdv;
1317 + m = fwdvb * cbdv * ppdv;
1318 + else if (psr & 0x00000020) /* New mode enable */
1319 + if (psr & 0x00000800) /* PerClk synch mode */
1320 + m = fwdvb * 2 * epdv;
1323 + else if (epdv == fbdv)
1324 + m = fbdv * cbdv * epdv;
1326 + m = fbdv * fwdvb * cbdv;
1328 + cpu = sys_clk * m / fwdv;
1329 + plb = sys_clk * m / (fwdvb * cbdv);
1331 + m = fwdv * fbdv * cbdv;
1332 + cpu = sys_clk * m / fwdv;
1338 + if (cpc0_cr0 & 0x80)
1339 + /* uart0 uses the external clock */
1342 + uart0 = cpu / udiv;
1344 + if (cpc0_cr0 & 0x40)
1345 + /* uart1 uses the external clock */
1348 + uart1 = cpu / udiv;
1350 + /* setup the timebase clock to tick at the cpu frequency */
1351 + cpc0_cr1 = cpc0_cr1 & ~0x00800000;
1352 + mtdcr(DCRN_405_CPC0_CR1, cpc0_cr1);
1355 + dt_fixup_cpu_clocks(cpu, tb, 0);
1356 + dt_fixup_clock("/plb", plb);
1357 + dt_fixup_clock("/plb/opb", opb);
1358 + dt_fixup_clock("/plb/ebc", ebc);
1359 + dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
1360 + dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
1364 +void ibm405ep_fixup_clocks(unsigned int sys_clk)
1366 + u32 pllmr0 = mfdcr(DCRN_CPC0_PLLMR0);
1367 + u32 pllmr1 = mfdcr(DCRN_CPC0_PLLMR1);
1368 + u32 cpc0_ucr = mfdcr(DCRN_CPC0_UCR);
1369 + u32 cpu, plb, opb, ebc, uart0, uart1;
1370 + u32 fwdva, fwdvb, fbdv, cbdv, opdv, epdv;
1371 + u32 pllmr0_ccdv, tb, m;
1373 + fwdva = 8 - ((pllmr1 & 0x00070000) >> 16);
1374 + fwdvb = 8 - ((pllmr1 & 0x00007000) >> 12);
1375 + fbdv = (pllmr1 & 0x00f00000) >> 20;
1379 + cbdv = ((pllmr0 & 0x00030000) >> 16) + 1; /* CPU:PLB */
1380 + epdv = ((pllmr0 & 0x00000300) >> 8) + 2; /* PLB:EBC */
1381 + opdv = ((pllmr0 & 0x00003000) >> 12) + 1; /* PLB:OPB */
1385 + pllmr0_ccdv = ((pllmr0 & 0x00300000) >> 20) + 1;
1386 + if (pllmr1 & 0x80000000)
1387 + cpu = sys_clk * m / (fwdva * pllmr0_ccdv);
1389 + cpu = sys_clk / pllmr0_ccdv;
1395 + uart0 = cpu / (cpc0_ucr & 0x0000007f);
1396 + uart1 = cpu / ((cpc0_ucr & 0x00007f00) >> 8);
1398 + dt_fixup_cpu_clocks(cpu, tb, 0);
1399 + dt_fixup_clock("/plb", plb);
1400 + dt_fixup_clock("/plb/opb", opb);
1401 + dt_fixup_clock("/plb/ebc", ebc);
1402 dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
1403 - dt_fixup_clock("/plb/opb/serial@ef600400", uart0);
1404 - dt_fixup_clock("/plb/opb/serial@ef600500", uart0);
1405 - dt_fixup_clock("/plb/opb/serial@ef600600", uart0);
1406 + dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
1408 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/4xx.h powerpc.git/arch/powerpc/boot/4xx.h
1409 --- linux-2.6.24/arch/powerpc/boot/4xx.h 2008-01-24 23:58:37.000000000 +0100
1410 +++ powerpc.git/arch/powerpc/boot/4xx.h 2008-01-28 20:25:49.000000000 +0100
1412 #ifndef _POWERPC_BOOT_4XX_H_
1413 #define _POWERPC_BOOT_4XX_H_
1415 -void ibm4xx_fixup_memsize(void);
1416 +void ibm4xx_sdram_fixup_memsize(void);
1417 +void ibm440spe_fixup_memsize(void);
1418 void ibm4xx_denali_fixup_memsize(void);
1419 void ibm44x_dbcr_reset(void);
1420 void ibm40x_dbcr_reset(void);
1421 void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1);
1422 void ibm4xx_fixup_ebc_ranges(const char *ebc);
1423 -void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk);
1425 +void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk);
1426 +void ibm405ep_fixup_clocks(unsigned int sys_clk);
1427 +void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk);
1428 +void ibm440ep_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
1429 + unsigned int tmr_clk);
1430 +void ibm440gx_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
1431 + unsigned int tmr_clk);
1432 +void ibm440spe_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
1433 + unsigned int tmr_clk);
1435 #endif /* _POWERPC_BOOT_4XX_H_ */
1436 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/Makefile powerpc.git/arch/powerpc/boot/Makefile
1437 --- linux-2.6.24/arch/powerpc/boot/Makefile 2008-01-24 23:58:37.000000000 +0100
1438 +++ powerpc.git/arch/powerpc/boot/Makefile 2008-01-28 20:25:49.000000000 +0100
1440 BOOTCFLAGS += -fno-stack-protector
1443 -BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
1444 +BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) -I$(srctree)/$(src)/libfdt
1446 $(obj)/4xx.o: BOOTCFLAGS += -mcpu=440
1447 $(obj)/ebony.o: BOOTCFLAGS += -mcpu=440
1448 +$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=440
1449 +$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
1450 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
1453 zlib := inffast.c inflate.c inftrees.c
1454 zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h
1455 zliblinuxheader := zlib.h zconf.h zutil.h
1457 $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \
1458 $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
1460 -src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
1461 +src-libfdt := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
1462 +src-wlib := string.S crt0.S stdio.c main.c \
1463 + $(addprefix libfdt/,$(src-libfdt)) libfdt-wrapper.c \
1464 ns16550.c serial.c simple_alloc.c div64.S util.S \
1465 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
1466 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \
1467 cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \
1468 fsl-soc.c mpc8xx.c pq2.c
1469 -src-plat := of.c cuboot-52xx.c cuboot-83xx.c cuboot-85xx.c holly.c \
1470 +src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \
1471 cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
1472 ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \
1473 cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c cuboot-bamboo.c \
1474 - fixed-head.S ep88xc.c cuboot-hpc2.c
1475 + fixed-head.S ep88xc.c cuboot-hpc2.c ep405.c cuboot-taishan.c \
1476 + cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
1478 src-boot := $(src-wlib) $(src-plat) empty.c
1480 src-boot := $(addprefix $(obj)/, $(src-boot))
1481 @@ -101,24 +108,61 @@
1482 cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
1484 $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c FORCE
1485 + $(Q)mkdir -p $(dir $@)
1486 $(call if_changed_dep,bootcc)
1487 $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S FORCE
1488 + $(Q)mkdir -p $(dir $@)
1489 $(call if_changed_dep,bootas)
1491 $(obj)/wrapper.a: $(obj-wlib) FORCE
1492 $(call if_changed,bootar)
1494 -hostprogs-y := addnote addRamDisk hack-coff mktree
1495 +hostprogs-y := addnote addRamDisk hack-coff mktree dtc
1497 targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
1498 extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
1499 $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
1501 wrapper :=$(srctree)/$(src)/wrapper
1502 -wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
1503 +wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree dtc) \
1507 +# Bits for building dtc
1508 +# DTC_GENPARSER := 1 # Uncomment to rebuild flex/bison output
1510 +dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o srcpos.o checks.o
1511 +dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
1512 +dtc-objs := $(addprefix dtc-src/, $(dtc-objs))
1514 +# prerequisites on generated files needs to be explicit
1515 +$(obj)/dtc-src/dtc-parser.tab.o: $(obj)/dtc-src/dtc-parser.tab.c $(obj)/dtc-src/dtc-parser.tab.h
1516 +$(obj)/dtc-src/dtc-lexer.lex.o: $(obj)/dtc-src/dtc-lexer.lex.c $(obj)/dtc-src/dtc-parser.tab.h
1518 +HOSTCFLAGS += -I$(src)/dtc-src/ -I$(src)/libfdt/
1520 +targets += dtc-src/dtc-parser.tab.c
1521 +targets += dtc-src/dtc-lexer.lex.c
1523 +ifdef DTC_GENPARSER
1527 +quiet_cmd_bison = BISON $@
1528 + cmd_bison = $(BISON) -o$@ -d $<; cp $@ $@_shipped
1529 +quiet_cmd_flex = FLEX $@
1530 + cmd_flex = $(FLEX) -o$@ $<; cp $@ $@_shipped
1532 +$(obj)/dtc-src/dtc-parser.tab.c: $(src)/dtc-src/dtc-parser.y FORCE
1533 + $(call if_changed,bison)
1535 +$(obj)/dtc-src/dtc-parser.tab.h: $(obj)/dtc-src/dtc-parser.tab.c
1537 +$(obj)/dtc-src/dtc-lexer.lex.c: $(src)/dtc-src/dtc-lexer.l FORCE
1538 + $(call if_changed,flex)
1542 # Bits for building various flavours of zImage
1544 ifneq ($(CROSS32_COMPILE),)
1545 @@ -150,15 +194,26 @@
1546 ifneq ($(CONFIG_DEVICE_TREE),"")
1547 image-$(CONFIG_PPC_8xx) += cuImage.8xx
1548 image-$(CONFIG_PPC_EP88XC) += zImage.ep88xc
1549 +image-$(CONFIG_EP405) += zImage.ep405
1550 image-$(CONFIG_8260) += cuImage.pq2
1551 +image-$(CONFIG_EP8248E) += zImage.ep8248e
1552 image-$(CONFIG_PPC_MPC52xx) += cuImage.52xx
1553 +image-$(CONFIG_STORCENTER) += cuImage.824x
1554 image-$(CONFIG_PPC_83xx) += cuImage.83xx
1555 image-$(CONFIG_PPC_85xx) += cuImage.85xx
1556 image-$(CONFIG_MPC7448HPC2) += cuImage.hpc2
1557 image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony
1558 image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo
1559 image-$(CONFIG_SEQUOIA) += cuImage.sequoia
1560 +image-$(CONFIG_RAINIER) += cuImage.rainier
1561 image-$(CONFIG_WALNUT) += treeImage.walnut
1562 +image-$(CONFIG_TAISHAN) += cuImage.taishan
1563 +image-$(CONFIG_KATMAI) += cuImage.katmai
1564 +image-$(CONFIG_WARP) += cuImage.warp
1567 +ifneq ($(CONFIG_REDBOOT),"")
1568 +image-$(CONFIG_PPC_8xx) += zImage.redboot-8xx
1571 # For 32-bit powermacs, build the COFF and miboot images
1572 @@ -243,3 +298,51 @@
1573 clean-kernel += $(addsuffix .gz,$(clean-kernel))
1574 # If not absolute clean-files are relative to $(obj).
1575 clean-files += $(addprefix $(objtree)/, $(clean-kernel))
1577 +WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
1578 +WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
1579 +WRAPPER_BINDIR := /usr/sbin
1582 +extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
1583 +hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs-y))
1584 +wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
1585 +dts-installed := $(patsubst $(obj)/dts/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(obj)/dts/*.dts))
1587 +all-installed := $(extra-installed) $(hostprogs-installed) $(wrapper-installed) $(dts-installed)
1589 +quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
1590 + cmd_mkdir = mkdir -p $@
1592 +quiet_cmd_install = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,%,$@)
1593 + cmd_install = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,$(obj)/%,$@) $@
1595 +quiet_cmd_install_dts = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,dts/%,$@)
1596 + cmd_install_dts = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,$(srctree)/$(obj)/dts/%,$@) $@
1598 +quiet_cmd_install_exe = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@)
1599 + cmd_install_exe = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(obj)/%,$@) $@
1601 +quiet_cmd_install_wrapper = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@)
1602 + cmd_install_wrapper = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(srctree)/$(obj)/%,$@) $@ ;\
1603 + sed -i $@ -e 's%^object=.*%object=$(WRAPPER_OBJDIR)%' \
1604 + -e 's%^objbin=.*%objbin=$(WRAPPER_BINDIR)%' \
1607 +$(DESTDIR)$(WRAPPER_OBJDIR) $(DESTDIR)$(WRAPPER_DTSDIR) $(DESTDIR)$(WRAPPER_BINDIR):
1610 +$(extra-installed) : $(DESTDIR)$(WRAPPER_OBJDIR)/% : $(obj)/% | $(DESTDIR)$(WRAPPER_OBJDIR)
1611 + $(call cmd,install)
1613 +$(hostprogs-installed) : $(DESTDIR)$(WRAPPER_BINDIR)/% : $(obj)/% | $(DESTDIR)$(WRAPPER_BINDIR)
1614 + $(call cmd,install_exe)
1616 +$(dts-installed) : $(DESTDIR)$(WRAPPER_DTSDIR)/% : $(srctree)/$(obj)/dts/% | $(DESTDIR)$(WRAPPER_DTSDIR)
1617 + $(call cmd,install_dts)
1619 +$(wrapper-installed): $(DESTDIR)$(WRAPPER_BINDIR) $(srctree)/$(obj)/wrapper | $(DESTDIR)$(WRAPPER_BINDIR)
1620 + $(call cmd,install_wrapper)
1622 +$(obj)/bootwrapper_install: $(all-installed)
1624 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/bamboo.c powerpc.git/arch/powerpc/boot/bamboo.c
1625 --- linux-2.6.24/arch/powerpc/boot/bamboo.c 2008-01-24 23:58:37.000000000 +0100
1626 +++ powerpc.git/arch/powerpc/boot/bamboo.c 2008-01-28 20:25:49.000000000 +0100
1629 unsigned long sysclk = 33333333;
1631 - ibm440ep_fixup_clocks(sysclk, 11059200);
1632 - ibm4xx_fixup_memsize();
1633 + ibm440ep_fixup_clocks(sysclk, 11059200, 25000000);
1634 + ibm4xx_sdram_fixup_memsize();
1635 ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
1636 dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1);
1639 platform_ops.exit = ibm44x_dbcr_reset;
1642 - ft_init(_dtb_start, 0, 32);
1643 + fdt_init(_dtb_start);
1644 serial_console_init();
1646 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-52xx.c powerpc.git/arch/powerpc/boot/cuboot-52xx.c
1647 --- linux-2.6.24/arch/powerpc/boot/cuboot-52xx.c 2008-01-24 23:58:37.000000000 +0100
1648 +++ powerpc.git/arch/powerpc/boot/cuboot-52xx.c 2008-01-28 20:25:49.000000000 +0100
1650 unsigned long r6, unsigned long r7)
1653 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1654 + fdt_init(_dtb_start);
1655 serial_console_init();
1656 platform_ops.fixups = platform_fixups;
1658 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-824x.c powerpc.git/arch/powerpc/boot/cuboot-824x.c
1659 --- linux-2.6.24/arch/powerpc/boot/cuboot-824x.c 1970-01-01 01:00:00.000000000 +0100
1660 +++ powerpc.git/arch/powerpc/boot/cuboot-824x.c 2008-01-28 20:25:49.000000000 +0100
1663 + * Old U-boot compatibility for 824x
1665 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
1667 + * This program is free software; you can redistribute it and/or modify it
1668 + * under the terms of the GNU General Public License version 2 as published
1669 + * by the Free Software Foundation.
1674 +#include "cuboot.h"
1676 +#define TARGET_824x
1677 +#include "ppcboot.h"
1682 +static void platform_fixups(void)
1686 + dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
1687 + dt_fixup_mac_addresses(bd.bi_enetaddr);
1688 + dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
1690 + soc = find_node_by_devtype(NULL, "soc");
1692 + void *serial = NULL;
1694 + setprop(soc, "bus-frequency", &bd.bi_busfreq,
1695 + sizeof(bd.bi_busfreq));
1697 + while ((serial = find_node_by_devtype(serial, "serial"))) {
1698 + if (get_parent(serial) != soc)
1701 + setprop(serial, "clock-frequency", &bd.bi_busfreq,
1702 + sizeof(bd.bi_busfreq));
1707 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1708 + unsigned long r6, unsigned long r7)
1711 + fdt_init(_dtb_start);
1712 + serial_console_init();
1713 + platform_ops.fixups = platform_fixups;
1715 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-83xx.c powerpc.git/arch/powerpc/boot/cuboot-83xx.c
1716 --- linux-2.6.24/arch/powerpc/boot/cuboot-83xx.c 2008-01-24 23:58:37.000000000 +0100
1717 +++ powerpc.git/arch/powerpc/boot/cuboot-83xx.c 2008-01-28 20:25:49.000000000 +0100
1721 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
1722 - dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
1723 + dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
1724 + dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
1725 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
1727 /* Unfortunately, the specific model number is encoded in the
1729 unsigned long r6, unsigned long r7)
1732 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1733 + fdt_init(_dtb_start);
1734 serial_console_init();
1735 platform_ops.fixups = platform_fixups;
1737 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-85xx.c powerpc.git/arch/powerpc/boot/cuboot-85xx.c
1738 --- linux-2.6.24/arch/powerpc/boot/cuboot-85xx.c 2008-01-24 23:58:37.000000000 +0100
1739 +++ powerpc.git/arch/powerpc/boot/cuboot-85xx.c 2008-01-28 20:25:49.000000000 +0100
1743 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
1744 - dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr,
1746 + dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
1747 + dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
1748 + dt_fixup_mac_address_by_alias("ethernet2", bd.bi_enet2addr);
1749 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 8, bd.bi_busfreq);
1751 /* Unfortunately, the specific model number is encoded in the
1753 unsigned long r6, unsigned long r7)
1756 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1757 + fdt_init(_dtb_start);
1758 serial_console_init();
1759 platform_ops.fixups = platform_fixups;
1761 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-8xx.c powerpc.git/arch/powerpc/boot/cuboot-8xx.c
1762 --- linux-2.6.24/arch/powerpc/boot/cuboot-8xx.c 2008-01-24 23:58:37.000000000 +0100
1763 +++ powerpc.git/arch/powerpc/boot/cuboot-8xx.c 2008-01-28 20:25:49.000000000 +0100
1765 unsigned long r6, unsigned long r7)
1768 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1769 + fdt_init(_dtb_start);
1770 serial_console_init();
1771 platform_ops.fixups = platform_fixups;
1773 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-hpc2.c powerpc.git/arch/powerpc/boot/cuboot-hpc2.c
1774 --- linux-2.6.24/arch/powerpc/boot/cuboot-hpc2.c 2008-01-24 23:58:37.000000000 +0100
1775 +++ powerpc.git/arch/powerpc/boot/cuboot-hpc2.c 2008-01-28 20:25:49.000000000 +0100
1777 unsigned long r6, unsigned long r7)
1780 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1781 + fdt_init(_dtb_start);
1782 serial_console_init();
1783 platform_ops.fixups = platform_fixups;
1785 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-katmai.c powerpc.git/arch/powerpc/boot/cuboot-katmai.c
1786 --- linux-2.6.24/arch/powerpc/boot/cuboot-katmai.c 1970-01-01 01:00:00.000000000 +0100
1787 +++ powerpc.git/arch/powerpc/boot/cuboot-katmai.c 2008-01-28 20:25:49.000000000 +0100
1790 + * Old U-boot compatibility for Katmai
1792 + * Author: Hugh Blemings <hugh@au.ibm.com>
1794 + * Copyright 2007 Hugh Blemings, IBM Corporation.
1795 + * Based on cuboot-ebony.c which is:
1796 + * Copyright 2007 David Gibson, IBM Corporation.
1797 + * Based on cuboot-83xx.c, which is:
1798 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
1800 + * This program is free software; you can redistribute it and/or modify it
1801 + * under the terms of the GNU General Public License version 2 as published
1802 + * by the Free Software Foundation.
1811 +#include "cuboot.h"
1814 +#include "ppcboot.h"
1820 +static void katmai_fixups(void)
1822 + unsigned long sysclk = 33333000;
1824 + /* 440SP Clock logic is all but identical to 440GX
1825 + * so we just use that code for now at least
1827 + ibm440spe_fixup_clocks(sysclk, 6 * 1843200, 0);
1829 + ibm440spe_fixup_memsize();
1831 + dt_fixup_mac_address(0, bd.bi_enetaddr);
1833 + ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
1836 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1837 + unsigned long r6, unsigned long r7)
1841 + platform_ops.fixups = katmai_fixups;
1842 + fdt_init(_dtb_start);
1843 + serial_console_init();
1845 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-pq2.c powerpc.git/arch/powerpc/boot/cuboot-pq2.c
1846 --- linux-2.6.24/arch/powerpc/boot/cuboot-pq2.c 2008-01-24 23:58:37.000000000 +0100
1847 +++ powerpc.git/arch/powerpc/boot/cuboot-pq2.c 2008-01-28 20:25:49.000000000 +0100
1849 unsigned long r6, unsigned long r7)
1852 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
1853 + fdt_init(_dtb_start);
1854 serial_console_init();
1855 platform_ops.fixups = pq2_platform_fixups;
1857 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-rainier.c powerpc.git/arch/powerpc/boot/cuboot-rainier.c
1858 --- linux-2.6.24/arch/powerpc/boot/cuboot-rainier.c 1970-01-01 01:00:00.000000000 +0100
1859 +++ powerpc.git/arch/powerpc/boot/cuboot-rainier.c 2008-01-28 20:25:49.000000000 +0100
1862 + * Old U-boot compatibility for Rainier
1864 + * Valentine Barshak <vbarshak@ru.mvista.com>
1865 + * Copyright 2007 MontaVista Software, Inc
1867 + * Based on Ebony code by David Gibson <david@gibson.dropbear.id.au>
1868 + * Copyright IBM Corporation, 2007
1870 + * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com>
1871 + * Copyright IBM Corporation, 2007
1873 + * This program is free software; you can redistribute it and/or
1874 + * modify it under the terms of the GNU General Public License
1875 + * as published by the Free Software Foundation; version 2 of the License
1878 +#include <stdarg.h>
1879 +#include <stddef.h>
1882 +#include "string.h"
1889 +#include "cuboot.h"
1893 +#include "ppcboot.h"
1898 +static void rainier_fixups(void)
1900 + unsigned long sysclk = 33333333;
1902 + ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
1903 + ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
1904 + ibm4xx_denali_fixup_memsize();
1905 + dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr);
1908 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1909 + unsigned long r6, unsigned long r7)
1912 + platform_ops.fixups = rainier_fixups;
1913 + platform_ops.exit = ibm44x_dbcr_reset;
1914 + fdt_init(_dtb_start);
1915 + serial_console_init();
1917 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-sequoia.c powerpc.git/arch/powerpc/boot/cuboot-sequoia.c
1918 --- linux-2.6.24/arch/powerpc/boot/cuboot-sequoia.c 2008-01-24 23:58:37.000000000 +0100
1919 +++ powerpc.git/arch/powerpc/boot/cuboot-sequoia.c 2008-01-28 20:25:49.000000000 +0100
1922 unsigned long sysclk = 33333333;
1924 - ibm440ep_fixup_clocks(sysclk, 11059200);
1925 + ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
1926 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
1927 ibm4xx_denali_fixup_memsize();
1928 dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr);
1931 platform_ops.fixups = sequoia_fixups;
1932 platform_ops.exit = ibm44x_dbcr_reset;
1933 - ft_init(_dtb_start, 0, 32);
1934 + fdt_init(_dtb_start);
1935 serial_console_init();
1937 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-taishan.c powerpc.git/arch/powerpc/boot/cuboot-taishan.c
1938 --- linux-2.6.24/arch/powerpc/boot/cuboot-taishan.c 1970-01-01 01:00:00.000000000 +0100
1939 +++ powerpc.git/arch/powerpc/boot/cuboot-taishan.c 2008-01-28 20:25:49.000000000 +0100
1942 + * Old U-boot compatibility for Taishan
1944 + * Author: Hugh Blemings <hugh@au.ibm.com>
1946 + * Copyright 2007 Hugh Blemings, IBM Corporation.
1947 + * Based on cuboot-ebony.c which is:
1948 + * Copyright 2007 David Gibson, IBM Corporation.
1949 + * Based on cuboot-83xx.c, which is:
1950 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
1952 + * This program is free software; you can redistribute it and/or modify it
1953 + * under the terms of the GNU General Public License version 2 as published
1954 + * by the Free Software Foundation.
1959 +#include "cuboot.h"
1965 +#include "ppcboot.h"
1971 +static void taishan_fixups(void)
1973 + /* FIXME: sysclk should be derived by reading the FPGA
1975 + unsigned long sysclk = 33000000;
1977 + ibm440gx_fixup_clocks(sysclk, 6 * 1843200, 25000000);
1979 + ibm4xx_sdram_fixup_memsize();
1981 + dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
1983 + ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
1986 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1987 + unsigned long r6, unsigned long r7)
1991 + platform_ops.fixups = taishan_fixups;
1992 + fdt_init(_dtb_start);
1993 + serial_console_init();
1995 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/cuboot-warp.c powerpc.git/arch/powerpc/boot/cuboot-warp.c
1996 --- linux-2.6.24/arch/powerpc/boot/cuboot-warp.c 1970-01-01 01:00:00.000000000 +0100
1997 +++ powerpc.git/arch/powerpc/boot/cuboot-warp.c 2008-01-28 20:25:49.000000000 +0100
2000 + * Copyright (c) 2008 PIKA Technologies
2001 + * Sean MacLennan <smaclennan@pikatech.com>
2003 + * This program is free software; you can redistribute it and/or modify it
2004 + * under the terms of the GNU General Public License version 2 as published
2005 + * by the Free Software Foundation.
2010 +#include "cuboot.h"
2013 +#include "ppcboot.h"
2017 +static void warp_fixups(void)
2019 + unsigned long sysclk = 66000000;
2021 + ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
2022 + ibm4xx_sdram_fixup_memsize();
2023 + ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
2024 + dt_fixup_mac_addresses(&bd.bi_enetaddr);
2028 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
2029 + unsigned long r6, unsigned long r7)
2033 + platform_ops.fixups = warp_fixups;
2034 + platform_ops.exit = ibm44x_dbcr_reset;
2035 + fdt_init(_dtb_start);
2036 + serial_console_init();
2038 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dcr.h powerpc.git/arch/powerpc/boot/dcr.h
2039 --- linux-2.6.24/arch/powerpc/boot/dcr.h 2008-01-24 23:58:37.000000000 +0100
2040 +++ powerpc.git/arch/powerpc/boot/dcr.h 2008-01-28 20:25:49.000000000 +0100
2042 #define DCRN_SDRAM0_CFGADDR 0x010
2043 #define DCRN_SDRAM0_CFGDATA 0x011
2045 +#define SDRAM0_READ(offset) ({\
2046 + mtdcr(DCRN_SDRAM0_CFGADDR, offset); \
2047 + mfdcr(DCRN_SDRAM0_CFGDATA); })
2048 +#define SDRAM0_WRITE(offset, data) ({\
2049 + mtdcr(DCRN_SDRAM0_CFGADDR, offset); \
2050 + mtdcr(DCRN_SDRAM0_CFGDATA, data); })
2052 #define SDRAM0_B0CR 0x40
2053 #define SDRAM0_B1CR 0x44
2054 #define SDRAM0_B2CR 0x48
2055 #define SDRAM0_B3CR 0x4c
2057 -static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR, SDRAM0_B2CR, SDRAM0_B3CR };
2058 +static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR,
2059 + SDRAM0_B2CR, SDRAM0_B3CR };
2061 #define SDRAM_CONFIG_BANK_ENABLE 0x00000001
2062 #define SDRAM_CONFIG_SIZE_MASK 0x000e0000
2063 @@ -138,5 +146,54 @@
2064 #define DCRN_CPC0_PLLMR 0xb0
2065 #define DCRN_405_CPC0_CR0 0xb1
2066 #define DCRN_405_CPC0_CR1 0xb2
2067 +#define DCRN_405_CPC0_PSR 0xb4
2069 +/* 405EP Clocking/Power Management/Chip Control regs */
2070 +#define DCRN_CPC0_PLLMR0 0xf0
2071 +#define DCRN_CPC0_PLLMR1 0xf4
2072 +#define DCRN_CPC0_UCR 0xf5
2074 +/* 440GX Clock control etc */
2077 +#define DCRN_CPR0_CLKUPD 0x020
2078 +#define DCRN_CPR0_PLLC 0x040
2079 +#define DCRN_CPR0_PLLD 0x060
2080 +#define DCRN_CPR0_PRIMAD 0x080
2081 +#define DCRN_CPR0_PRIMBD 0x0a0
2082 +#define DCRN_CPR0_OPBD 0x0c0
2083 +#define DCRN_CPR0_PERD 0x0e0
2084 +#define DCRN_CPR0_MALD 0x100
2086 +#define DCRN_SDR0_CONFIG_ADDR 0xe
2087 +#define DCRN_SDR0_CONFIG_DATA 0xf
2089 +/* SDR read/write helper macros */
2090 +#define SDR0_READ(offset) ({\
2091 + mtdcr(DCRN_SDR0_CONFIG_ADDR, offset); \
2092 + mfdcr(DCRN_SDR0_CONFIG_DATA); })
2093 +#define SDR0_WRITE(offset, data) ({\
2094 + mtdcr(DCRN_SDR0_CONFIG_ADDR, offset); \
2095 + mtdcr(DCRN_SDR0_CONFIG_DATA, data); })
2097 +#define DCRN_SDR0_UART0 0x0120
2098 +#define DCRN_SDR0_UART1 0x0121
2099 +#define DCRN_SDR0_UART2 0x0122
2100 +#define DCRN_SDR0_UART3 0x0123
2103 +/* CPRs read/write helper macros - based off include/asm-ppc/ibm44x.h */
2105 +#define DCRN_CPR0_CFGADDR 0xc
2106 +#define DCRN_CPR0_CFGDATA 0xd
2108 +#define CPR0_READ(offset) ({\
2109 + mtdcr(DCRN_CPR0_CFGADDR, offset); \
2110 + mfdcr(DCRN_CPR0_CFGDATA); })
2111 +#define CPR0_WRITE(offset, data) ({\
2112 + mtdcr(DCRN_CPR0_CFGADDR, offset); \
2113 + mtdcr(DCRN_CPR0_CFGDATA, data); })
2117 #endif /* _PPC_BOOT_DCR_H_ */
2118 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/devtree.c powerpc.git/arch/powerpc/boot/devtree.c
2119 --- linux-2.6.24/arch/powerpc/boot/devtree.c 2008-01-24 23:58:37.000000000 +0100
2120 +++ powerpc.git/arch/powerpc/boot/devtree.c 2008-01-28 20:25:49.000000000 +0100
2125 +void dt_fixup_mac_address_by_alias(const char *alias, const u8 *addr)
2127 + void *devp = find_node_by_alias(alias);
2130 + printf("%s: local-mac-address <-"
2131 + " %02x:%02x:%02x:%02x:%02x:%02x\n\r", alias,
2132 + addr[0], addr[1], addr[2],
2133 + addr[3], addr[4], addr[5]);
2135 + setprop(devp, "local-mac-address", addr, 6);
2139 void dt_fixup_mac_address(u32 index, const u8 *addr)
2141 void *devp = find_node_by_prop_value(NULL, "linux,network-index",
2142 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/Makefile.dtc powerpc.git/arch/powerpc/boot/dtc-src/Makefile.dtc
2143 --- linux-2.6.24/arch/powerpc/boot/dtc-src/Makefile.dtc 1970-01-01 01:00:00.000000000 +0100
2144 +++ powerpc.git/arch/powerpc/boot/dtc-src/Makefile.dtc 2008-01-28 20:25:49.000000000 +0100
2148 +# This is not a complete Makefile of itself. Instead, it is designed to
2149 +# be easily embeddable into other systems of Makefiles.
2151 +DTC_SRCS = dtc.c flattree.c fstree.c data.c livetree.c treesource.c srcpos.c \
2153 +DTC_EXTRA = dtc.h srcpos.h
2154 +DTC_LEXFILES = dtc-lexer.l
2155 +DTC_BISONFILES = dtc-parser.y
2157 +DTC_LEX_SRCS = $(DTC_LEXFILES:%.l=%.lex.c)
2158 +DTC_BISON_SRCS = $(DTC_BISONFILES:%.y=%.tab.c)
2159 +DTC_BISON_INCLUDES = $(DTC_BISONFILES:%.y=%.tab.h)
2161 +DTC_GEN_SRCS = $(DTC_LEX_SRCS) $(DTC_BISON_SRCS)
2162 +DTC_GEN_ALL = $(DTC_GEN_SRCS) $(DTC_BISON_INCLUDES)
2163 +DTC_OBJS = $(DTC_SRCS:%.c=%.o) $(DTC_GEN_SRCS:%.c=%.o)
2165 +DTC_CLEANFILES = $(DTC_GEN_ALL)
2167 +# We assume the containing Makefile system can do auto-dependencies for most
2168 +# things, but we supply the dependencies on generated header files explicitly
2170 +$(addprefix $(DTC_objdir)/,$(DTC_GEN_SRCS:%.c=%.o)): $(addprefix $(DTC_objdir)/,$(DTC_BISON_INCLUDES))
2171 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/checks.c powerpc.git/arch/powerpc/boot/dtc-src/checks.c
2172 --- linux-2.6.24/arch/powerpc/boot/dtc-src/checks.c 1970-01-01 01:00:00.000000000 +0100
2173 +++ powerpc.git/arch/powerpc/boot/dtc-src/checks.c 2008-01-28 20:25:49.000000000 +0100
2176 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2007.
2179 + * This program is free software; you can redistribute it and/or
2180 + * modify it under the terms of the GNU General Public License as
2181 + * published by the Free Software Foundation; either version 2 of the
2182 + * License, or (at your option) any later version.
2184 + * This program is distributed in the hope that it will be useful,
2185 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2186 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2187 + * General Public License for more details.
2189 + * You should have received a copy of the GNU General Public License
2190 + * along with this program; if not, write to the Free Software
2191 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
2197 +#ifdef TRACE_CHECKS
2198 +#define TRACE(c, ...) \
2200 + fprintf(stderr, "=== %s: ", (c)->name); \
2201 + fprintf(stderr, __VA_ARGS__); \
2202 + fprintf(stderr, "\n"); \
2205 +#define TRACE(c, fmt, ...) do { } while (0)
2223 +typedef void (*tree_check_fn)(struct check *c, struct node *dt);
2224 +typedef void (*node_check_fn)(struct check *c, struct node *dt, struct node *node);
2225 +typedef void (*prop_check_fn)(struct check *c, struct node *dt,
2226 + struct node *node, struct property *prop);
2230 + tree_check_fn tree_fn;
2231 + node_check_fn node_fn;
2232 + prop_check_fn prop_fn;
2234 + enum checklevel level;
2235 + enum checkstatus status;
2238 + struct check **prereq;
2241 +#define CHECK(nm, tfn, nfn, pfn, d, lvl, ...) \
2242 + static struct check *nm##_prereqs[] = { __VA_ARGS__ }; \
2243 + static struct check nm = { \
2245 + .tree_fn = (tfn), \
2246 + .node_fn = (nfn), \
2247 + .prop_fn = (pfn), \
2250 + .status = UNCHECKED, \
2251 + .num_prereqs = ARRAY_SIZE(nm##_prereqs), \
2252 + .prereq = nm##_prereqs, \
2255 +#define TREE_CHECK(nm, d, lvl, ...) \
2256 + CHECK(nm, check_##nm, NULL, NULL, d, lvl, __VA_ARGS__)
2257 +#define NODE_CHECK(nm, d, lvl, ...) \
2258 + CHECK(nm, NULL, check_##nm, NULL, d, lvl, __VA_ARGS__)
2259 +#define PROP_CHECK(nm, d, lvl, ...) \
2260 + CHECK(nm, NULL, NULL, check_##nm, d, lvl, __VA_ARGS__)
2261 +#define BATCH_CHECK(nm, lvl, ...) \
2262 + CHECK(nm, NULL, NULL, NULL, NULL, lvl, __VA_ARGS__)
2265 +static inline void check_msg(struct check *c, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
2267 +static inline void check_msg(struct check *c, const char *fmt, ...)
2270 + va_start(ap, fmt);
2272 + if ((c->level < WARN) || (c->level <= quiet))
2273 + return; /* Suppress message */
2275 + fprintf(stderr, "%s (%s): ",
2276 + (c->level == ERROR) ? "ERROR" : "Warning", c->name);
2277 + vfprintf(stderr, fmt, ap);
2278 + fprintf(stderr, "\n");
2281 +#define FAIL(c, ...) \
2283 + TRACE((c), "\t\tFAILED at %s:%d", __FILE__, __LINE__); \
2284 + (c)->status = FAILED; \
2285 + check_msg((c), __VA_ARGS__); \
2288 +static void check_nodes_props(struct check *c, struct node *dt, struct node *node)
2290 + struct node *child;
2291 + struct property *prop;
2293 + TRACE(c, "%s", node->fullpath);
2295 + c->node_fn(c, dt, node);
2298 + for_each_property(node, prop) {
2299 + TRACE(c, "%s\t'%s'", node->fullpath, prop->name);
2300 + c->prop_fn(c, dt, node, prop);
2303 + for_each_child(node, child)
2304 + check_nodes_props(c, dt, child);
2307 +static int run_check(struct check *c, struct node *dt)
2312 + assert(!c->inprogress);
2314 + if (c->status != UNCHECKED)
2317 + c->inprogress = 1;
2319 + for (i = 0; i < c->num_prereqs; i++) {
2320 + struct check *prq = c->prereq[i];
2321 + error |= run_check(prq, dt);
2322 + if (prq->status != PASSED) {
2323 + c->status = PREREQ;
2324 + check_msg(c, "Failed prerequisite '%s'",
2325 + c->prereq[i]->name);
2329 + if (c->status != UNCHECKED)
2332 + if (c->node_fn || c->prop_fn)
2333 + check_nodes_props(c, dt, dt);
2336 + c->tree_fn(c, dt);
2337 + if (c->status == UNCHECKED)
2338 + c->status = PASSED;
2340 + TRACE(c, "\tCompleted, status %d", c->status);
2343 + c->inprogress = 0;
2344 + if ((c->status != PASSED) && (c->level == ERROR))
2350 + * Utility check functions
2353 +static void check_is_string(struct check *c, struct node *root,
2354 + struct node *node)
2356 + struct property *prop;
2357 + char *propname = c->data;
2359 + prop = get_property(node, propname);
2361 + return; /* Not present, assumed ok */
2363 + if (!data_is_one_string(prop->val))
2364 + FAIL(c, "\"%s\" property in %s is not a string",
2365 + propname, node->fullpath);
2367 +#define CHECK_IS_STRING(nm, propname, lvl) \
2368 + CHECK(nm, NULL, check_is_string, NULL, (propname), (lvl))
2370 +static void check_is_cell(struct check *c, struct node *root,
2371 + struct node *node)
2373 + struct property *prop;
2374 + char *propname = c->data;
2376 + prop = get_property(node, propname);
2378 + return; /* Not present, assumed ok */
2380 + if (prop->val.len != sizeof(cell_t))
2381 + FAIL(c, "\"%s\" property in %s is not a single cell",
2382 + propname, node->fullpath);
2384 +#define CHECK_IS_CELL(nm, propname, lvl) \
2385 + CHECK(nm, NULL, check_is_cell, NULL, (propname), (lvl))
2388 + * Structural check functions
2391 +static void check_duplicate_node_names(struct check *c, struct node *dt,
2392 + struct node *node)
2394 + struct node *child, *child2;
2396 + for_each_child(node, child)
2397 + for (child2 = child->next_sibling;
2399 + child2 = child2->next_sibling)
2400 + if (streq(child->name, child2->name))
2401 + FAIL(c, "Duplicate node name %s",
2404 +NODE_CHECK(duplicate_node_names, NULL, ERROR);
2406 +static void check_duplicate_property_names(struct check *c, struct node *dt,
2407 + struct node *node)
2409 + struct property *prop, *prop2;
2411 + for_each_property(node, prop)
2412 + for (prop2 = prop->next; prop2; prop2 = prop2->next)
2413 + if (streq(prop->name, prop2->name))
2414 + FAIL(c, "Duplicate property name %s in %s",
2415 + prop->name, node->fullpath);
2417 +NODE_CHECK(duplicate_property_names, NULL, ERROR);
2419 +static void check_explicit_phandles(struct check *c, struct node *root,
2420 + struct node *node)
2422 + struct property *prop;
2423 + struct node *other;
2426 + prop = get_property(node, "linux,phandle");
2428 + return; /* No phandle, that's fine */
2430 + if (prop->val.len != sizeof(cell_t)) {
2431 + FAIL(c, "%s has bad length (%d) linux,phandle property",
2432 + node->fullpath, prop->val.len);
2436 + phandle = propval_cell(prop);
2437 + if ((phandle == 0) || (phandle == -1)) {
2438 + FAIL(c, "%s has invalid linux,phandle value 0x%x",
2439 + node->fullpath, phandle);
2443 + other = get_node_by_phandle(root, phandle);
2445 + FAIL(c, "%s has duplicated phandle 0x%x (seen before at %s)",
2446 + node->fullpath, phandle, other->fullpath);
2450 + node->phandle = phandle;
2452 +NODE_CHECK(explicit_phandles, NULL, ERROR);
2454 +static void check_name_properties(struct check *c, struct node *root,
2455 + struct node *node)
2457 + struct property *prop;
2459 + prop = get_property(node, "name");
2461 + return; /* No name property, that's fine */
2463 + if ((prop->val.len != node->basenamelen+1)
2464 + || (memcmp(prop->val.val, node->name, node->basenamelen) != 0))
2465 + FAIL(c, "\"name\" property in %s is incorrect (\"%s\" instead"
2466 + " of base node name)", node->fullpath, prop->val.val);
2468 +CHECK_IS_STRING(name_is_string, "name", ERROR);
2469 +NODE_CHECK(name_properties, NULL, ERROR, &name_is_string);
2472 + * Reference fixup functions
2475 +static void fixup_phandle_references(struct check *c, struct node *dt,
2476 + struct node *node, struct property *prop)
2478 + struct marker *m = prop->val.markers;
2479 + struct node *refnode;
2482 + for_each_marker_of_type(m, REF_PHANDLE) {
2483 + assert(m->offset + sizeof(cell_t) <= prop->val.len);
2485 + refnode = get_node_by_ref(dt, m->ref);
2487 + FAIL(c, "Reference to non-existent node or label \"%s\"\n",
2492 + phandle = get_node_phandle(dt, refnode);
2493 + *((cell_t *)(prop->val.val + m->offset)) = cpu_to_be32(phandle);
2496 +CHECK(phandle_references, NULL, NULL, fixup_phandle_references, NULL, ERROR,
2497 + &duplicate_node_names, &explicit_phandles);
2499 +static void fixup_path_references(struct check *c, struct node *dt,
2500 + struct node *node, struct property *prop)
2502 + struct marker *m = prop->val.markers;
2503 + struct node *refnode;
2506 + for_each_marker_of_type(m, REF_PATH) {
2507 + assert(m->offset <= prop->val.len);
2509 + refnode = get_node_by_ref(dt, m->ref);
2511 + FAIL(c, "Reference to non-existent node or label \"%s\"\n",
2516 + path = refnode->fullpath;
2517 + prop->val = data_insert_at_marker(prop->val, m, path,
2518 + strlen(path) + 1);
2521 +CHECK(path_references, NULL, NULL, fixup_path_references, NULL, ERROR,
2522 + &duplicate_node_names);
2527 +CHECK_IS_CELL(address_cells_is_cell, "#address-cells", WARN);
2528 +CHECK_IS_CELL(size_cells_is_cell, "#size-cells", WARN);
2529 +CHECK_IS_CELL(interrupt_cells_is_cell, "#interrupt-cells", WARN);
2531 +CHECK_IS_STRING(device_type_is_string, "device_type", WARN);
2532 +CHECK_IS_STRING(model_is_string, "model", WARN);
2533 +CHECK_IS_STRING(status_is_string, "status", WARN);
2535 +static void fixup_addr_size_cells(struct check *c, struct node *dt,
2536 + struct node *node)
2538 + struct property *prop;
2540 + node->addr_cells = -1;
2541 + node->size_cells = -1;
2543 + prop = get_property(node, "#address-cells");
2545 + node->addr_cells = propval_cell(prop);
2547 + prop = get_property(node, "#size-cells");
2549 + node->size_cells = propval_cell(prop);
2551 +CHECK(addr_size_cells, NULL, fixup_addr_size_cells, NULL, NULL, WARN,
2552 + &address_cells_is_cell, &size_cells_is_cell);
2554 +#define node_addr_cells(n) \
2555 + (((n)->addr_cells == -1) ? 2 : (n)->addr_cells)
2556 +#define node_size_cells(n) \
2557 + (((n)->size_cells == -1) ? 1 : (n)->size_cells)
2559 +static void check_reg_format(struct check *c, struct node *dt,
2560 + struct node *node)
2562 + struct property *prop;
2563 + int addr_cells, size_cells, entrylen;
2565 + prop = get_property(node, "reg");
2567 + return; /* No "reg", that's fine */
2569 + if (!node->parent) {
2570 + FAIL(c, "Root node has a \"reg\" property");
2574 + if (prop->val.len == 0)
2575 + FAIL(c, "\"reg\" property in %s is empty", node->fullpath);
2577 + addr_cells = node_addr_cells(node->parent);
2578 + size_cells = node_size_cells(node->parent);
2579 + entrylen = (addr_cells + size_cells) * sizeof(cell_t);
2581 + if ((prop->val.len % entrylen) != 0)
2582 + FAIL(c, "\"reg\" property in %s has invalid length (%d bytes) "
2583 + "(#address-cells == %d, #size-cells == %d)",
2584 + node->fullpath, prop->val.len, addr_cells, size_cells);
2586 +NODE_CHECK(reg_format, NULL, WARN, &addr_size_cells);
2588 +static void check_ranges_format(struct check *c, struct node *dt,
2589 + struct node *node)
2591 + struct property *prop;
2592 + int c_addr_cells, p_addr_cells, c_size_cells, p_size_cells, entrylen;
2594 + prop = get_property(node, "ranges");
2598 + if (!node->parent) {
2599 + FAIL(c, "Root node has a \"ranges\" property");
2603 + p_addr_cells = node_addr_cells(node->parent);
2604 + p_size_cells = node_size_cells(node->parent);
2605 + c_addr_cells = node_addr_cells(node);
2606 + c_size_cells = node_size_cells(node);
2607 + entrylen = (p_addr_cells + c_addr_cells + c_size_cells) * sizeof(cell_t);
2609 + if (prop->val.len == 0) {
2610 + if (p_addr_cells != c_addr_cells)
2611 + FAIL(c, "%s has empty \"ranges\" property but its "
2612 + "#address-cells (%d) differs from %s (%d)",
2613 + node->fullpath, c_addr_cells, node->parent->fullpath,
2615 + if (p_size_cells != c_size_cells)
2616 + FAIL(c, "%s has empty \"ranges\" property but its "
2617 + "#size-cells (%d) differs from %s (%d)",
2618 + node->fullpath, c_size_cells, node->parent->fullpath,
2620 + } else if ((prop->val.len % entrylen) != 0) {
2621 + FAIL(c, "\"ranges\" property in %s has invalid length (%d bytes) "
2622 + "(parent #address-cells == %d, child #address-cells == %d, "
2623 + "#size-cells == %d)", node->fullpath, prop->val.len,
2624 + p_addr_cells, c_addr_cells, c_size_cells);
2627 +NODE_CHECK(ranges_format, NULL, WARN, &addr_size_cells);
2632 +static void check_avoid_default_addr_size(struct check *c, struct node *dt,
2633 + struct node *node)
2635 + struct property *reg, *ranges;
2637 + if (!node->parent)
2638 + return; /* Ignore root node */
2640 + reg = get_property(node, "reg");
2641 + ranges = get_property(node, "ranges");
2643 + if (!reg && !ranges)
2646 + if ((node->parent->addr_cells == -1))
2647 + FAIL(c, "Relying on default #address-cells value for %s",
2650 + if ((node->parent->size_cells == -1))
2651 + FAIL(c, "Relying on default #size-cells value for %s",
2654 +NODE_CHECK(avoid_default_addr_size, NULL, WARN, &addr_size_cells);
2656 +static void check_obsolete_chosen_interrupt_controller(struct check *c,
2659 + struct node *chosen;
2660 + struct property *prop;
2662 + chosen = get_node_by_path(dt, "/chosen");
2666 + prop = get_property(chosen, "interrupt-controller");
2668 + FAIL(c, "/chosen has obsolete \"interrupt-controller\" "
2671 +TREE_CHECK(obsolete_chosen_interrupt_controller, NULL, WARN);
2673 +static struct check *check_table[] = {
2674 + &duplicate_node_names, &duplicate_property_names,
2675 + &name_is_string, &name_properties,
2676 + &explicit_phandles,
2677 + &phandle_references, &path_references,
2679 + &address_cells_is_cell, &size_cells_is_cell, &interrupt_cells_is_cell,
2680 + &device_type_is_string, &model_is_string, &status_is_string,
2682 + &addr_size_cells, ®_format, &ranges_format,
2684 + &avoid_default_addr_size,
2685 + &obsolete_chosen_interrupt_controller,
2688 +int check_semantics(struct node *dt, int outversion, int boot_cpuid_phys);
2690 +void process_checks(int force, struct boot_info *bi,
2691 + int checkflag, int outversion, int boot_cpuid_phys)
2693 + struct node *dt = bi->dt;
2697 + for (i = 0; i < ARRAY_SIZE(check_table); i++) {
2698 + struct check *c = check_table[i];
2700 + if (c->level != IGNORE)
2701 + error = error || run_check(c, dt);
2706 + fprintf(stderr, "ERROR: Input tree has errors, aborting "
2707 + "(use -f to force output)\n");
2709 + } else if (quiet < 3) {
2710 + fprintf(stderr, "Warning: Input tree has errors, "
2711 + "output forced\n");
2717 + fprintf(stderr, "Warning: Skipping semantic checks due to structural errors\n");
2719 + if (!check_semantics(bi->dt, outversion,
2721 + fprintf(stderr, "Warning: Input tree has semantic errors\n");
2727 + * Semantic check functions
2730 +#define ERRMSG(...) if (quiet < 2) fprintf(stderr, "ERROR: " __VA_ARGS__)
2731 +#define WARNMSG(...) if (quiet < 1) fprintf(stderr, "Warning: " __VA_ARGS__)
2733 +#define DO_ERR(...) do {ERRMSG(__VA_ARGS__); ok = 0; } while (0)
2735 +#define CHECK_HAVE(node, propname) \
2737 + if (! (prop = get_property((node), (propname)))) \
2738 + DO_ERR("Missing \"%s\" property in %s\n", (propname), \
2739 + (node)->fullpath); \
2742 +#define CHECK_HAVE_WARN(node, propname) \
2744 + if (! (prop = get_property((node), (propname)))) \
2745 + WARNMSG("%s has no \"%s\" property\n", \
2746 + (node)->fullpath, (propname)); \
2749 +#define CHECK_HAVE_STRING(node, propname) \
2751 + CHECK_HAVE((node), (propname)); \
2752 + if (prop && !data_is_one_string(prop->val)) \
2753 + DO_ERR("\"%s\" property in %s is not a string\n", \
2754 + (propname), (node)->fullpath); \
2757 +#define CHECK_HAVE_STREQ(node, propname, value) \
2759 + CHECK_HAVE_STRING((node), (propname)); \
2760 + if (prop && !streq(prop->val.val, (value))) \
2761 + DO_ERR("%s has wrong %s, %s (should be %s\n", \
2762 + (node)->fullpath, (propname), \
2763 + prop->val.val, (value)); \
2766 +#define CHECK_HAVE_ONECELL(node, propname) \
2768 + CHECK_HAVE((node), (propname)); \
2769 + if (prop && (prop->val.len != sizeof(cell_t))) \
2770 + DO_ERR("\"%s\" property in %s has wrong size %d (should be 1 cell)\n", (propname), (node)->fullpath, prop->val.len); \
2773 +#define CHECK_HAVE_WARN_ONECELL(node, propname) \
2775 + CHECK_HAVE_WARN((node), (propname)); \
2776 + if (prop && (prop->val.len != sizeof(cell_t))) \
2777 + DO_ERR("\"%s\" property in %s has wrong size %d (should be 1 cell)\n", (propname), (node)->fullpath, prop->val.len); \
2780 +#define CHECK_HAVE_WARN_PHANDLE(xnode, propname, root) \
2782 + struct node *ref; \
2783 + CHECK_HAVE_WARN_ONECELL((xnode), (propname)); \
2785 + cell_t phandle = propval_cell(prop); \
2786 + if ((phandle == 0) || (phandle == -1)) { \
2787 + DO_ERR("\"%s\" property in %s contains an invalid phandle %x\n", (propname), (xnode)->fullpath, phandle); \
2789 + ref = get_node_by_phandle((root), propval_cell(prop)); \
2791 + DO_ERR("\"%s\" property in %s refers to non-existant phandle %x\n", (propname), (xnode)->fullpath, propval_cell(prop)); \
2796 +#define CHECK_HAVE_WARN_STRING(node, propname) \
2798 + CHECK_HAVE_WARN((node), (propname)); \
2799 + if (prop && !data_is_one_string(prop->val)) \
2800 + DO_ERR("\"%s\" property in %s is not a string\n", \
2801 + (propname), (node)->fullpath); \
2804 +static int check_root(struct node *root)
2806 + struct property *prop;
2809 + CHECK_HAVE_STRING(root, "model");
2810 + CHECK_HAVE_WARN(root, "compatible");
2815 +static int check_cpus(struct node *root, int outversion, int boot_cpuid_phys)
2817 + struct node *cpus, *cpu;
2818 + struct property *prop;
2819 + struct node *bootcpu = NULL;
2822 + cpus = get_subnode(root, "cpus");
2824 + ERRMSG("Missing /cpus node\n");
2828 + if (cpus->addr_cells != 1)
2829 + DO_ERR("%s has bad #address-cells value %d (should be 1)\n",
2830 + cpus->fullpath, cpus->addr_cells);
2831 + if (cpus->size_cells != 0)
2832 + DO_ERR("%s has bad #size-cells value %d (should be 0)\n",
2833 + cpus->fullpath, cpus->size_cells);
2835 + for_each_child(cpus, cpu) {
2836 + CHECK_HAVE_STREQ(cpu, "device_type", "cpu");
2838 + CHECK_HAVE_ONECELL(cpu, "reg");
2843 + unitnum = strtol(get_unitname(cpu), &eptr, 16);
2845 + WARNMSG("%s has bad format unit name %s (should be CPU number\n",
2846 + cpu->fullpath, get_unitname(cpu));
2847 + } else if (unitnum != propval_cell(prop)) {
2848 + WARNMSG("%s unit name \"%s\" does not match \"reg\" property <%x>\n",
2849 + cpu->fullpath, get_unitname(cpu),
2850 + propval_cell(prop));
2854 +/* CHECK_HAVE_ONECELL(cpu, "d-cache-line-size"); */
2855 +/* CHECK_HAVE_ONECELL(cpu, "i-cache-line-size"); */
2856 + CHECK_HAVE_ONECELL(cpu, "d-cache-size");
2857 + CHECK_HAVE_ONECELL(cpu, "i-cache-size");
2859 + CHECK_HAVE_WARN_ONECELL(cpu, "clock-frequency");
2860 + CHECK_HAVE_WARN_ONECELL(cpu, "timebase-frequency");
2862 + prop = get_property(cpu, "linux,boot-cpu");
2864 + if (prop->val.len)
2865 + WARNMSG("\"linux,boot-cpu\" property in %s is non-empty\n",
2868 + DO_ERR("Multiple boot cpus (%s and %s)\n",
2869 + bootcpu->fullpath, cpu->fullpath);
2875 + if (outversion < 2) {
2877 + WARNMSG("No cpu has \"linux,boot-cpu\" property\n");
2880 + WARNMSG("\"linux,boot-cpu\" property is deprecated in blob version 2 or higher\n");
2881 + if (boot_cpuid_phys == 0xfeedbeef)
2882 + WARNMSG("physical boot CPU not set. Use -b option to set\n");
2888 +static int check_memory(struct node *root)
2891 + struct property *prop;
2895 + for_each_child(root, mem) {
2896 + if (! strneq(mem->name, "memory", mem->basenamelen))
2901 + CHECK_HAVE_STREQ(mem, "device_type", "memory");
2902 + CHECK_HAVE(mem, "reg");
2905 + if (nnodes == 0) {
2906 + ERRMSG("No memory nodes\n");
2913 +int check_semantics(struct node *dt, int outversion, int boot_cpuid_phys)
2917 + ok = ok && check_root(dt);
2918 + ok = ok && check_cpus(dt, outversion, boot_cpuid_phys);
2919 + ok = ok && check_memory(dt);
2925 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/data.c powerpc.git/arch/powerpc/boot/dtc-src/data.c
2926 --- linux-2.6.24/arch/powerpc/boot/dtc-src/data.c 1970-01-01 01:00:00.000000000 +0100
2927 +++ powerpc.git/arch/powerpc/boot/dtc-src/data.c 2008-01-28 20:25:49.000000000 +0100
2930 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
2933 + * This program is free software; you can redistribute it and/or
2934 + * modify it under the terms of the GNU General Public License as
2935 + * published by the Free Software Foundation; either version 2 of the
2936 + * License, or (at your option) any later version.
2938 + * This program is distributed in the hope that it will be useful,
2939 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2940 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2941 + * General Public License for more details.
2943 + * You should have received a copy of the GNU General Public License
2944 + * along with this program; if not, write to the Free Software
2945 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
2951 +void data_free(struct data d)
2953 + struct marker *m, *nm;
2963 + assert(!d.val || d.asize);
2969 +struct data data_grow_for(struct data d, int xlen)
2974 + /* we must start with an allocated datum */
2975 + assert(!d.val || d.asize);
2984 + while ((d.len + xlen) > newsize)
2987 + nd.asize = newsize;
2988 + nd.val = xrealloc(d.val, newsize);
2990 + assert(nd.asize >= (d.len + xlen));
2995 +struct data data_copy_mem(const char *mem, int len)
2999 + d = data_grow_for(empty_data, len);
3002 + memcpy(d.val, mem, len);
3007 +static char get_oct_char(const char *s, int *i)
3021 + val = strtol(x, &endx, 8);
3022 + if ((endx - x) == 0)
3023 + fprintf(stderr, "Empty \\nnn escape\n");
3029 +static char get_hex_char(const char *s, int *i)
3040 + val = strtol(x, &endx, 16);
3041 + if ((endx - x) == 0)
3042 + fprintf(stderr, "Empty \\x escape\n");
3048 +struct data data_copy_escape_string(const char *s, int len)
3054 + d = data_grow_for(empty_data, strlen(s)+1);
3069 + q[d.len++] = '\a';
3072 + q[d.len++] = '\b';
3075 + q[d.len++] = '\t';
3078 + q[d.len++] = '\n';
3081 + q[d.len++] = '\v';
3084 + q[d.len++] = '\f';
3087 + q[d.len++] = '\r';
3097 + i--; /* need to re-read the first digit as
3098 + * part of the octal value */
3099 + q[d.len++] = get_oct_char(s, &i);
3102 + q[d.len++] = get_hex_char(s, &i);
3109 + q[d.len++] = '\0';
3113 +struct data data_copy_file(FILE *f, size_t len)
3117 + d = data_grow_for(empty_data, len);
3120 + fread(d.val, len, 1, f);
3125 +struct data data_append_data(struct data d, const void *p, int len)
3127 + d = data_grow_for(d, len);
3128 + memcpy(d.val + d.len, p, len);
3133 +struct data data_insert_at_marker(struct data d, struct marker *m,
3134 + const void *p, int len)
3136 + d = data_grow_for(d, len);
3137 + memmove(d.val + m->offset + len, d.val + m->offset, d.len - m->offset);
3138 + memcpy(d.val + m->offset, p, len);
3141 + /* Adjust all markers after the one we're inserting at */
3143 + for_each_marker(m)
3148 +struct data data_append_markers(struct data d, struct marker *m)
3150 + struct marker **mp = &d.markers;
3152 + /* Find the end of the markerlist */
3154 + mp = &((*mp)->next);
3159 +struct data data_merge(struct data d1, struct data d2)
3162 + struct marker *m2 = d2.markers;
3164 + d = data_append_markers(data_append_data(d1, d2.val, d2.len), m2);
3166 + /* Adjust for the length of d1 */
3167 + for_each_marker(m2)
3168 + m2->offset += d1.len;
3170 + d2.markers = NULL; /* So data_free() doesn't clobber them */
3176 +struct data data_append_cell(struct data d, cell_t word)
3178 + cell_t beword = cpu_to_be32(word);
3180 + return data_append_data(d, &beword, sizeof(beword));
3183 +struct data data_append_re(struct data d, const struct fdt_reserve_entry *re)
3185 + struct fdt_reserve_entry bere;
3187 + bere.address = cpu_to_be64(re->address);
3188 + bere.size = cpu_to_be64(re->size);
3190 + return data_append_data(d, &bere, sizeof(bere));
3193 +struct data data_append_addr(struct data d, u64 addr)
3195 + u64 beaddr = cpu_to_be64(addr);
3197 + return data_append_data(d, &beaddr, sizeof(beaddr));
3200 +struct data data_append_byte(struct data d, uint8_t byte)
3202 + return data_append_data(d, &byte, 1);
3205 +struct data data_append_zeroes(struct data d, int len)
3207 + d = data_grow_for(d, len);
3209 + memset(d.val + d.len, 0, len);
3214 +struct data data_append_align(struct data d, int align)
3216 + int newlen = ALIGN(d.len, align);
3217 + return data_append_zeroes(d, newlen - d.len);
3220 +struct data data_add_marker(struct data d, enum markertype type, char *ref)
3224 + m = xmalloc(sizeof(*m));
3225 + m->offset = d.len;
3230 + return data_append_markers(d, m);
3233 +int data_is_one_string(struct data d)
3241 + for (i = 0; i < len-1; i++)
3242 + if (d.val[i] == '\0')
3245 + if (d.val[len-1] != '\0')
3250 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/dtc-lexer.l powerpc.git/arch/powerpc/boot/dtc-src/dtc-lexer.l
3251 --- linux-2.6.24/arch/powerpc/boot/dtc-src/dtc-lexer.l 1970-01-01 01:00:00.000000000 +0100
3252 +++ powerpc.git/arch/powerpc/boot/dtc-src/dtc-lexer.l 2008-01-28 20:25:49.000000000 +0100
3255 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3258 + * This program is free software; you can redistribute it and/or
3259 + * modify it under the terms of the GNU General Public License as
3260 + * published by the Free Software Foundation; either version 2 of the
3261 + * License, or (at your option) any later version.
3263 + * This program is distributed in the hope that it will be useful,
3264 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3265 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3266 + * General Public License for more details.
3268 + * You should have received a copy of the GNU General Public License
3269 + * along with this program; if not, write to the Free Software
3270 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
3274 +%option noyywrap nounput yylineno
3281 +PROPNODECHAR [a-zA-Z0-9,._+*#?@-]
3282 +PATHCHAR ({PROPNODECHAR}|[/])
3283 +LABEL [a-zA-Z_][a-zA-Z0-9_]*
3287 +#include "srcpos.h"
3288 +#include "dtc-parser.tab.h"
3291 +/*#define LEXDEBUG 1*/
3294 +#define DPRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
3296 +#define DPRINT(fmt, ...) do { } while (0)
3299 +static int dts_version; /* = 0 */
3301 +#define BEGIN_DEFAULT() if (dts_version == 0) { \
3302 + DPRINT("<INITIAL>\n"); \
3305 + DPRINT("<V1>\n"); \
3311 +<*>"/include/" BEGIN(INCLUDE);
3313 +<INCLUDE>\"[^"\n]*\" {
3314 + yytext[strlen(yytext) - 1] = 0;
3315 + if (!push_input_file(yytext + 1)) {
3316 + /* Some unrecoverable error.*/
3324 + if (!pop_input_file()) {
3329 +<*>\"([^\\"]|\\.)*\" {
3330 + yylloc.filenum = srcpos_filenum;
3331 + yylloc.first_line = yylineno;
3332 + DPRINT("String: %s\n", yytext);
3333 + yylval.data = data_copy_escape_string(yytext+1,
3335 + yylloc.first_line = yylineno;
3340 + yylloc.filenum = srcpos_filenum;
3341 + yylloc.first_line = yylineno;
3342 + DPRINT("Keyword: /dts-v1/\n");
3348 +<*>"/memreserve/" {
3349 + yylloc.filenum = srcpos_filenum;
3350 + yylloc.first_line = yylineno;
3351 + DPRINT("Keyword: /memreserve/\n");
3353 + return DT_MEMRESERVE;
3357 + yylloc.filenum = srcpos_filenum;
3358 + yylloc.first_line = yylineno;
3359 + DPRINT("Label: %s\n", yytext);
3360 + yylval.labelref = strdup(yytext);
3361 + yylval.labelref[yyleng-1] = '\0';
3366 + yylloc.filenum = srcpos_filenum;
3367 + yylloc.first_line = yylineno;
3368 + if (*yytext == 'b')
3370 + else if (*yytext == 'o')
3372 + else if (*yytext == 'd')
3373 + yylval.cbase = 10;
3375 + yylval.cbase = 16;
3376 + DPRINT("Base: %d\n", yylval.cbase);
3380 +<INITIAL>[0-9a-fA-F]+ {
3381 + yylloc.filenum = srcpos_filenum;
3382 + yylloc.first_line = yylineno;
3383 + yylval.literal = strdup(yytext);
3384 + DPRINT("Literal: '%s'\n", yylval.literal);
3385 + return DT_LEGACYLITERAL;
3388 +<V1>[0-9]+|0[xX][0-9a-fA-F]+ {
3389 + yylloc.filenum = srcpos_filenum;
3390 + yylloc.first_line = yylineno;
3391 + yylval.literal = strdup(yytext);
3392 + DPRINT("Literal: '%s'\n", yylval.literal);
3393 + return DT_LITERAL;
3396 +\&{LABEL} { /* label reference */
3397 + yylloc.filenum = srcpos_filenum;
3398 + yylloc.first_line = yylineno;
3399 + DPRINT("Ref: %s\n", yytext+1);
3400 + yylval.labelref = strdup(yytext+1);
3404 +"&{/"{PATHCHAR}+\} { /* new-style path reference */
3405 + yylloc.filenum = srcpos_filenum;
3406 + yylloc.first_line = yylineno;
3407 + yytext[yyleng-1] = '\0';
3408 + DPRINT("Ref: %s\n", yytext+2);
3409 + yylval.labelref = strdup(yytext+2);
3413 +<INITIAL>"&/"{PATHCHAR}+ { /* old-style path reference */
3414 + yylloc.filenum = srcpos_filenum;
3415 + yylloc.first_line = yylineno;
3416 + DPRINT("Ref: %s\n", yytext+1);
3417 + yylval.labelref = strdup(yytext+1);
3421 +<BYTESTRING>[0-9a-fA-F]{2} {
3422 + yylloc.filenum = srcpos_filenum;
3423 + yylloc.first_line = yylineno;
3424 + yylval.byte = strtol(yytext, NULL, 16);
3425 + DPRINT("Byte: %02x\n", (int)yylval.byte);
3430 + yylloc.filenum = srcpos_filenum;
3431 + yylloc.first_line = yylineno;
3432 + DPRINT("/BYTESTRING\n");
3437 +<PROPNODENAME>{PROPNODECHAR}+ {
3438 + yylloc.filenum = srcpos_filenum;
3439 + yylloc.first_line = yylineno;
3440 + DPRINT("PropNodeName: %s\n", yytext);
3441 + yylval.propnodename = strdup(yytext);
3443 + return DT_PROPNODENAME;
3447 +<*>[[:space:]]+ /* eat whitespace */
3449 +<*>"/*"([^*]|\*+[^*/])*\*+"/" {
3450 + yylloc.filenum = srcpos_filenum;
3451 + yylloc.first_line = yylineno;
3452 + DPRINT("Comment: %s\n", yytext);
3453 + /* eat comments */
3456 +<*>"//".*\n /* eat line comments */
3459 + yylloc.filenum = srcpos_filenum;
3460 + yylloc.first_line = yylineno;
3461 + DPRINT("Char: %c (\\x%02x)\n", yytext[0],
3462 + (unsigned)yytext[0]);
3463 + if (yytext[0] == '[') {
3464 + DPRINT("<BYTESTRING>\n");
3465 + BEGIN(BYTESTRING);
3467 + if ((yytext[0] == '{')
3468 + || (yytext[0] == ';')) {
3469 + DPRINT("<PROPNODENAME>\n");
3470 + BEGIN(PROPNODENAME);
3479 + * Stack of nested include file contexts.
3485 + YY_BUFFER_STATE yy_prev_buf;
3486 + int yy_prev_lineno;
3487 + struct incl_file *prev;
3490 +struct incl_file *incl_file_stack;
3494 + * Detect infinite include recursion.
3496 +#define MAX_INCLUDE_DEPTH (100)
3498 +static int incl_depth = 0;
3501 +int push_input_file(const char *filename)
3504 + struct incl_file *incl_file;
3507 + yyerror("No include file name given.");
3511 + if (incl_depth++ >= MAX_INCLUDE_DEPTH) {
3512 + yyerror("Includes nested too deeply");
3516 + f = dtc_open_file(filename);
3518 + incl_file = malloc(sizeof(struct incl_file));
3520 + yyerror("Can not allocate include file space.");
3525 + * Save current context.
3527 + incl_file->yy_prev_buf = YY_CURRENT_BUFFER;
3528 + incl_file->yy_prev_lineno = yylineno;
3529 + incl_file->filenum = srcpos_filenum;
3530 + incl_file->file = yyin;
3531 + incl_file->prev = incl_file_stack;
3533 + incl_file_stack = incl_file;
3536 + * Establish new context.
3538 + srcpos_filenum = lookup_file_name(filename, 0);
3541 + yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
3547 +int pop_input_file(void)
3549 + struct incl_file *incl_file;
3551 + if (incl_file_stack == 0)
3560 + incl_file = incl_file_stack;
3561 + incl_file_stack = incl_file->prev;
3564 + * Recover old context.
3566 + yy_delete_buffer(YY_CURRENT_BUFFER);
3567 + yy_switch_to_buffer(incl_file->yy_prev_buf);
3568 + yylineno = incl_file->yy_prev_lineno;
3569 + srcpos_filenum = incl_file->filenum;
3570 + yyin = incl_file->file;
3577 + if (YY_CURRENT_BUFFER == 0)
3582 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped powerpc.git/arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped
3583 --- linux-2.6.24/arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped 1970-01-01 01:00:00.000000000 +0100
3584 +++ powerpc.git/arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped 2008-01-28 20:25:49.000000000 +0100
3586 +#line 2 "dtc-lexer.lex.c"
3588 +#line 4 "dtc-lexer.lex.c"
3590 +#define YY_INT_ALIGNED short int
3592 +/* A lexical scanner generated by flex */
3594 +#define FLEX_SCANNER
3595 +#define YY_FLEX_MAJOR_VERSION 2
3596 +#define YY_FLEX_MINOR_VERSION 5
3597 +#define YY_FLEX_SUBMINOR_VERSION 33
3598 +#if YY_FLEX_SUBMINOR_VERSION > 0
3602 +/* First, we deal with platform-specific or compiler-specific issues. */
3604 +/* begin standard C headers. */
3606 +#include <string.h>
3608 +#include <stdlib.h>
3610 +/* end standard C headers. */
3612 +/* flex integer type definitions */
3617 +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
3619 +#if __STDC_VERSION__ >= 199901L
3621 +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
3622 + * if you want the limit (max/min) macros for int types.
3624 +#ifndef __STDC_LIMIT_MACROS
3625 +#define __STDC_LIMIT_MACROS 1
3628 +#include <inttypes.h>
3629 +typedef int8_t flex_int8_t;
3630 +typedef uint8_t flex_uint8_t;
3631 +typedef int16_t flex_int16_t;
3632 +typedef uint16_t flex_uint16_t;
3633 +typedef int32_t flex_int32_t;
3634 +typedef uint32_t flex_uint32_t;
3636 +typedef signed char flex_int8_t;
3637 +typedef short int flex_int16_t;
3638 +typedef int flex_int32_t;
3639 +typedef unsigned char flex_uint8_t;
3640 +typedef unsigned short int flex_uint16_t;
3641 +typedef unsigned int flex_uint32_t;
3644 +/* Limits of integral types. */
3646 +#define INT8_MIN (-128)
3649 +#define INT16_MIN (-32767-1)
3652 +#define INT32_MIN (-2147483647-1)
3655 +#define INT8_MAX (127)
3658 +#define INT16_MAX (32767)
3661 +#define INT32_MAX (2147483647)
3664 +#define UINT8_MAX (255U)
3667 +#define UINT16_MAX (65535U)
3670 +#define UINT32_MAX (4294967295U)
3673 +#endif /* ! FLEXINT_H */
3677 +/* The "const" storage-class-modifier is valid. */
3678 +#define YY_USE_CONST
3680 +#else /* ! __cplusplus */
3684 +#define YY_USE_CONST
3686 +#endif /* __STDC__ */
3687 +#endif /* ! __cplusplus */
3689 +#ifdef YY_USE_CONST
3690 +#define yyconst const
3695 +/* Returned upon end-of-file. */
3698 +/* Promotes a possibly negative, possibly signed char to an unsigned
3699 + * integer for use as an array index. If the signed char is negative,
3700 + * we want to instead treat it as an 8-bit unsigned char, hence the
3703 +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
3705 +/* Enter a start condition. This macro really ought to take a parameter,
3706 + * but we do it the disgusting crufty way forced on us by the ()-less
3707 + * definition of BEGIN.
3709 +#define BEGIN (yy_start) = 1 + 2 *
3711 +/* Translate the current start state into a value that can be later handed
3712 + * to BEGIN to return to the state. The YYSTATE alias is for lex
3715 +#define YY_START (((yy_start) - 1) / 2)
3716 +#define YYSTATE YY_START
3718 +/* Action number for EOF rule of a given start state. */
3719 +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
3721 +/* Special action meaning "start processing a new file". */
3722 +#define YY_NEW_FILE yyrestart(yyin )
3724 +#define YY_END_OF_BUFFER_CHAR 0
3726 +/* Size of default input buffer. */
3727 +#ifndef YY_BUF_SIZE
3728 +#define YY_BUF_SIZE 16384
3731 +/* The state buf must be large enough to hold one state per character in the main buffer.
3733 +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
3735 +#ifndef YY_TYPEDEF_YY_BUFFER_STATE
3736 +#define YY_TYPEDEF_YY_BUFFER_STATE
3737 +typedef struct yy_buffer_state *YY_BUFFER_STATE;
3742 +extern FILE *yyin, *yyout;
3744 +#define EOB_ACT_CONTINUE_SCAN 0
3745 +#define EOB_ACT_END_OF_FILE 1
3746 +#define EOB_ACT_LAST_MATCH 2
3748 + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
3749 + * access to the local variable yy_act. Since yyless() is a macro, it would break
3750 + * existing scanners that call yyless() from OUTSIDE yylex.
3751 + * One obvious solution it to make yy_act a global. I tried that, and saw
3752 + * a 5% performance hit in a non-yylineno scanner, because yy_act is
3753 + * normally declared as a register variable-- so it is not worth it.
3755 + #define YY_LESS_LINENO(n) \
3758 + for ( yyl = n; yyl < yyleng; ++yyl )\
3759 + if ( yytext[yyl] == '\n' )\
3763 +/* Return all but the first "n" matched characters back to the input stream. */
3764 +#define yyless(n) \
3767 + /* Undo effects of setting up yytext. */ \
3768 + int yyless_macro_arg = (n); \
3769 + YY_LESS_LINENO(yyless_macro_arg);\
3770 + *yy_cp = (yy_hold_char); \
3771 + YY_RESTORE_YY_MORE_OFFSET \
3772 + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
3773 + YY_DO_BEFORE_ACTION; /* set up yytext again */ \
3777 +#define unput(c) yyunput( c, (yytext_ptr) )
3779 +/* The following is because we cannot portably get our hands on size_t
3780 + * (without autoconf's help, which isn't available because we want
3781 + * flex-generated scanners to compile on their own).
3784 +#ifndef YY_TYPEDEF_YY_SIZE_T
3785 +#define YY_TYPEDEF_YY_SIZE_T
3786 +typedef unsigned int yy_size_t;
3789 +#ifndef YY_STRUCT_YY_BUFFER_STATE
3790 +#define YY_STRUCT_YY_BUFFER_STATE
3791 +struct yy_buffer_state
3793 + FILE *yy_input_file;
3795 + char *yy_ch_buf; /* input buffer */
3796 + char *yy_buf_pos; /* current position in input buffer */
3798 + /* Size of input buffer in bytes, not including room for EOB
3801 + yy_size_t yy_buf_size;
3803 + /* Number of characters read into yy_ch_buf, not including EOB
3808 + /* Whether we "own" the buffer - i.e., we know we created it,
3809 + * and can realloc() it to grow it, and should free() it to
3812 + int yy_is_our_buffer;
3814 + /* Whether this is an "interactive" input source; if so, and
3815 + * if we're using stdio for input, then we want to use getc()
3816 + * instead of fread(), to make sure we stop fetching input after
3819 + int yy_is_interactive;
3821 + /* Whether we're considered to be at the beginning of a line.
3822 + * If so, '^' rules will be active on the next match, otherwise
3827 + int yy_bs_lineno; /**< The line count. */
3828 + int yy_bs_column; /**< The column count. */
3830 + /* Whether to try to fill the input buffer when we reach the
3833 + int yy_fill_buffer;
3835 + int yy_buffer_status;
3837 +#define YY_BUFFER_NEW 0
3838 +#define YY_BUFFER_NORMAL 1
3839 + /* When an EOF's been seen but there's still some text to process
3840 + * then we mark the buffer as YY_EOF_PENDING, to indicate that we
3841 + * shouldn't try reading from the input source any more. We might
3842 + * still have a bunch of tokens to match, though, because of
3843 + * possible backing-up.
3845 + * When we actually see the EOF, we change the status to "new"
3846 + * (via yyrestart()), so that the user can continue scanning by
3847 + * just pointing yyin at a new input file.
3849 +#define YY_BUFFER_EOF_PENDING 2
3852 +#endif /* !YY_STRUCT_YY_BUFFER_STATE */
3854 +/* Stack of input buffers. */
3855 +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
3856 +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
3857 +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
3859 +/* We provide macros for accessing buffer states in case in the
3860 + * future we want to put the buffer states in a more general
3861 + * "scanner state".
3863 + * Returns the top of the stack, or NULL.
3865 +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
3866 + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
3869 +/* Same as previous macro, but useful when we know that the buffer stack is not
3870 + * NULL or when we need an lvalue. For internal use only.
3872 +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
3874 +/* yy_hold_char holds the character lost when yytext is formed. */
3875 +static char yy_hold_char;
3876 +static int yy_n_chars; /* number of characters read into yy_ch_buf */
3879 +/* Points to current character in buffer. */
3880 +static char *yy_c_buf_p = (char *) 0;
3881 +static int yy_init = 0; /* whether we need to initialize */
3882 +static int yy_start = 0; /* start state number */
3884 +/* Flag which is used to allow yywrap()'s to do buffer switches
3885 + * instead of setting up a fresh yyin. A bit of a hack ...
3887 +static int yy_did_buffer_switch_on_eof;
3889 +void yyrestart (FILE *input_file );
3890 +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
3891 +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
3892 +void yy_delete_buffer (YY_BUFFER_STATE b );
3893 +void yy_flush_buffer (YY_BUFFER_STATE b );
3894 +void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
3895 +void yypop_buffer_state (void );
3897 +static void yyensure_buffer_stack (void );
3898 +static void yy_load_buffer_state (void );
3899 +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
3901 +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
3903 +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
3904 +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
3905 +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
3907 +void *yyalloc (yy_size_t );
3908 +void *yyrealloc (void *,yy_size_t );
3909 +void yyfree (void * );
3911 +#define yy_new_buffer yy_create_buffer
3913 +#define yy_set_interactive(is_interactive) \
3915 + if ( ! YY_CURRENT_BUFFER ){ \
3916 + yyensure_buffer_stack (); \
3917 + YY_CURRENT_BUFFER_LVALUE = \
3918 + yy_create_buffer(yyin,YY_BUF_SIZE ); \
3920 + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
3923 +#define yy_set_bol(at_bol) \
3925 + if ( ! YY_CURRENT_BUFFER ){\
3926 + yyensure_buffer_stack (); \
3927 + YY_CURRENT_BUFFER_LVALUE = \
3928 + yy_create_buffer(yyin,YY_BUF_SIZE ); \
3930 + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
3933 +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
3935 +/* Begin user sect3 */
3938 +#define YY_SKIP_YYWRAP
3940 +typedef unsigned char YY_CHAR;
3942 +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
3944 +typedef int yy_state_type;
3946 +extern int yylineno;
3950 +extern char *yytext;
3951 +#define yytext_ptr yytext
3953 +static yy_state_type yy_get_previous_state (void );
3954 +static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
3955 +static int yy_get_next_buffer (void );
3956 +static void yy_fatal_error (yyconst char msg[] );
3958 +/* Done after the current pattern has been matched and before the
3959 + * corresponding action - sets up yytext.
3961 +#define YY_DO_BEFORE_ACTION \
3962 + (yytext_ptr) = yy_bp; \
3963 + yyleng = (size_t) (yy_cp - yy_bp); \
3964 + (yy_hold_char) = *yy_cp; \
3966 + (yy_c_buf_p) = yy_cp;
3968 +#define YY_NUM_RULES 20
3969 +#define YY_END_OF_BUFFER 21
3970 +/* This struct is not used in this scanner,
3971 + but its presence is necessary. */
3972 +struct yy_trans_info
3974 + flex_int32_t yy_verify;
3975 + flex_int32_t yy_nxt;
3977 +static yyconst flex_int16_t yy_accept[94] =
3979 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3980 + 21, 19, 16, 16, 19, 19, 19, 8, 8, 19,
3981 + 8, 19, 19, 19, 19, 14, 15, 15, 19, 9,
3982 + 9, 16, 0, 3, 0, 0, 10, 0, 0, 0,
3983 + 0, 0, 0, 8, 8, 6, 0, 7, 0, 2,
3984 + 0, 13, 13, 15, 15, 9, 0, 12, 10, 0,
3985 + 0, 0, 0, 18, 0, 0, 0, 2, 9, 0,
3986 + 17, 0, 0, 0, 11, 0, 0, 0, 0, 0,
3987 + 0, 0, 0, 0, 4, 0, 0, 1, 0, 0,
3992 +static yyconst flex_int32_t yy_ec[256] =
3994 + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
3995 + 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
3996 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3997 + 1, 2, 1, 4, 5, 1, 1, 6, 1, 1,
3998 + 1, 7, 8, 8, 9, 8, 10, 11, 12, 13,
3999 + 13, 13, 13, 13, 13, 13, 13, 14, 1, 1,
4000 + 1, 1, 8, 8, 15, 15, 15, 15, 15, 15,
4001 + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
4002 + 16, 16, 16, 16, 16, 16, 16, 17, 16, 16,
4003 + 1, 18, 19, 1, 16, 1, 15, 20, 21, 22,
4005 + 23, 15, 16, 24, 25, 16, 16, 26, 27, 28,
4006 + 24, 16, 16, 29, 30, 31, 32, 33, 16, 17,
4007 + 16, 16, 34, 1, 35, 1, 1, 1, 1, 1,
4008 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4009 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4010 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4011 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4012 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4013 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4014 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4016 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4017 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4018 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4019 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4020 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4024 +static yyconst flex_int32_t yy_meta[36] =
4026 + 1, 1, 1, 1, 2, 1, 2, 2, 2, 3,
4027 + 4, 4, 4, 5, 6, 7, 7, 1, 1, 6,
4028 + 6, 6, 6, 7, 7, 7, 7, 7, 7, 7,
4032 +static yyconst flex_int16_t yy_base[107] =
4034 + 0, 0, 32, 0, 53, 0, 76, 0, 108, 111,
4035 + 280, 288, 37, 39, 33, 36, 106, 0, 123, 146,
4036 + 255, 251, 45, 0, 159, 288, 0, 53, 108, 172,
4037 + 114, 127, 158, 288, 245, 0, 0, 234, 235, 236,
4038 + 197, 195, 199, 0, 0, 288, 0, 288, 160, 288,
4039 + 183, 288, 0, 0, 183, 182, 0, 0, 0, 0,
4040 + 204, 189, 207, 288, 179, 187, 180, 194, 0, 171,
4041 + 288, 196, 178, 174, 288, 169, 169, 177, 165, 153,
4042 + 143, 155, 137, 118, 288, 122, 42, 288, 36, 36,
4043 + 40, 288, 288, 212, 218, 223, 229, 234, 239, 245,
4045 + 251, 255, 262, 270, 275, 280
4048 +static yyconst flex_int16_t yy_def[107] =
4050 + 93, 1, 1, 3, 3, 5, 93, 7, 3, 3,
4051 + 93, 93, 93, 93, 94, 95, 93, 96, 93, 19,
4052 + 19, 20, 97, 98, 20, 93, 99, 100, 95, 93,
4053 + 93, 93, 94, 93, 94, 101, 102, 93, 103, 104,
4054 + 93, 93, 93, 96, 19, 93, 20, 93, 97, 93,
4055 + 97, 93, 20, 99, 100, 93, 105, 101, 102, 106,
4056 + 103, 103, 104, 93, 93, 93, 93, 94, 105, 106,
4057 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4058 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4059 + 93, 93, 0, 93, 93, 93, 93, 93, 93, 93,
4061 + 93, 93, 93, 93, 93, 93
4064 +static yyconst flex_int16_t yy_nxt[324] =
4066 + 12, 13, 14, 15, 12, 16, 12, 12, 12, 17,
4067 + 18, 18, 18, 12, 19, 20, 20, 12, 12, 21,
4068 + 19, 21, 19, 22, 20, 20, 20, 20, 20, 20,
4069 + 20, 20, 20, 12, 12, 23, 34, 12, 32, 32,
4070 + 32, 32, 12, 12, 12, 36, 20, 33, 50, 92,
4071 + 35, 20, 20, 20, 20, 20, 15, 54, 91, 54,
4072 + 54, 54, 51, 24, 24, 24, 46, 25, 90, 38,
4073 + 89, 26, 25, 25, 25, 25, 12, 13, 14, 15,
4074 + 27, 12, 27, 27, 27, 17, 27, 27, 27, 12,
4075 + 28, 28, 28, 12, 12, 28, 28, 28, 28, 28,
4077 + 28, 28, 28, 28, 28, 28, 28, 28, 28, 12,
4078 + 12, 15, 39, 29, 15, 40, 29, 93, 30, 31,
4079 + 31, 30, 31, 31, 56, 56, 56, 41, 32, 32,
4080 + 42, 88, 43, 45, 45, 45, 46, 45, 47, 47,
4081 + 87, 38, 45, 45, 45, 45, 47, 47, 47, 47,
4082 + 47, 47, 47, 47, 47, 47, 47, 47, 47, 86,
4083 + 47, 34, 33, 50, 85, 47, 47, 47, 47, 53,
4084 + 53, 53, 84, 53, 83, 35, 82, 51, 53, 53,
4085 + 53, 53, 56, 56, 56, 93, 68, 54, 57, 54,
4086 + 54, 54, 56, 56, 56, 62, 46, 34, 71, 81,
4088 + 80, 79, 78, 77, 76, 75, 74, 73, 72, 64,
4089 + 62, 35, 33, 33, 33, 33, 33, 33, 33, 33,
4090 + 37, 67, 66, 37, 37, 37, 44, 65, 44, 49,
4091 + 49, 49, 49, 49, 49, 49, 49, 52, 64, 52,
4092 + 54, 62, 54, 60, 54, 54, 55, 93, 55, 55,
4093 + 55, 55, 58, 58, 58, 48, 58, 58, 59, 48,
4094 + 59, 59, 61, 61, 61, 61, 61, 61, 61, 61,
4095 + 63, 63, 63, 63, 63, 63, 63, 63, 69, 93,
4096 + 69, 70, 70, 70, 93, 70, 70, 11, 93, 93,
4097 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4099 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4100 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4104 +static yyconst flex_int16_t yy_chk[324] =
4106 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4107 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4108 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4109 + 1, 1, 1, 1, 1, 3, 15, 3, 13, 13,
4110 + 14, 14, 3, 3, 3, 16, 3, 23, 23, 91,
4111 + 15, 3, 3, 3, 3, 3, 5, 28, 90, 28,
4112 + 28, 28, 23, 5, 5, 5, 28, 5, 89, 16,
4113 + 87, 5, 5, 5, 5, 5, 7, 7, 7, 7,
4114 + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
4115 + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
4117 + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
4118 + 7, 9, 17, 9, 10, 17, 10, 29, 9, 9,
4119 + 9, 10, 10, 10, 31, 31, 31, 17, 32, 32,
4120 + 17, 86, 17, 19, 19, 19, 19, 19, 19, 19,
4121 + 84, 29, 19, 19, 19, 19, 19, 19, 19, 19,
4122 + 19, 19, 19, 19, 19, 19, 20, 20, 20, 83,
4123 + 20, 33, 49, 49, 82, 20, 20, 20, 20, 25,
4124 + 25, 25, 81, 25, 80, 33, 79, 49, 25, 25,
4125 + 25, 25, 30, 30, 30, 51, 51, 55, 30, 55,
4126 + 55, 55, 56, 56, 56, 62, 55, 68, 62, 78,
4128 + 77, 76, 74, 73, 72, 70, 67, 66, 65, 63,
4129 + 61, 68, 94, 94, 94, 94, 94, 94, 94, 94,
4130 + 95, 43, 42, 95, 95, 95, 96, 41, 96, 97,
4131 + 97, 97, 97, 97, 97, 97, 97, 98, 40, 98,
4132 + 99, 39, 99, 38, 99, 99, 100, 35, 100, 100,
4133 + 100, 100, 101, 101, 101, 22, 101, 101, 102, 21,
4134 + 102, 102, 103, 103, 103, 103, 103, 103, 103, 103,
4135 + 104, 104, 104, 104, 104, 104, 104, 104, 105, 11,
4136 + 105, 106, 106, 106, 0, 106, 106, 93, 93, 93,
4137 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4139 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4140 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4144 +/* Table of booleans, true if rule could match eol. */
4145 +static yyconst flex_int32_t yy_rule_can_match_eol[21] =
4147 +0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,
4150 +static yy_state_type yy_last_accepting_state;
4151 +static char *yy_last_accepting_cpos;
4153 +extern int yy_flex_debug;
4154 +int yy_flex_debug = 0;
4156 +/* The intent behind this definition is that it'll catch
4157 + * any uses of REJECT which flex missed.
4159 +#define REJECT reject_used_but_not_detected
4160 +#define yymore() yymore_used_but_not_detected
4161 +#define YY_MORE_ADJ 0
4162 +#define YY_RESTORE_YY_MORE_OFFSET
4164 +#line 1 "dtc-lexer.l"
4166 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
4169 + * This program is free software; you can redistribute it and/or
4170 + * modify it under the terms of the GNU General Public License as
4171 + * published by the Free Software Foundation; either version 2 of the
4172 + * License, or (at your option) any later version.
4174 + * This program is distributed in the hope that it will be useful,
4175 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4176 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4177 + * General Public License for more details.
4179 + * You should have received a copy of the GNU General Public License
4180 + * along with this program; if not, write to the Free Software
4181 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
4188 +#line 33 "dtc-lexer.l"
4190 +#include "srcpos.h"
4191 +#include "dtc-parser.tab.h"
4194 +/*#define LEXDEBUG 1*/
4197 +#define DPRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
4199 +#define DPRINT(fmt, ...) do { } while (0)
4202 +static int dts_version; /* = 0 */
4204 +#define BEGIN_DEFAULT() if (dts_version == 0) { \
4205 + DPRINT("<INITIAL>\n"); \
4208 + DPRINT("<V1>\n"); \
4211 +#line 627 "dtc-lexer.lex.c"
4215 +#define BYTESTRING 2
4216 +#define PROPNODENAME 3
4219 +#ifndef YY_NO_UNISTD_H
4220 +/* Special case for "unistd.h", since it is non-ANSI. We include it way
4221 + * down here because we want the user's section 1 to have been scanned first.
4222 + * The user has a chance to override it with an option.
4224 +#include <unistd.h>
4227 +#ifndef YY_EXTRA_TYPE
4228 +#define YY_EXTRA_TYPE void *
4231 +static int yy_init_globals (void );
4233 +/* Macros after this point can all be overridden by user definitions in
4237 +#ifndef YY_SKIP_YYWRAP
4239 +extern "C" int yywrap (void );
4241 +extern int yywrap (void );
4246 +static void yy_flex_strncpy (char *,yyconst char *,int );
4249 +#ifdef YY_NEED_STRLEN
4250 +static int yy_flex_strlen (yyconst char * );
4253 +#ifndef YY_NO_INPUT
4256 +static int yyinput (void );
4258 +static int input (void );
4263 +/* Amount of stuff to slurp up with each read. */
4264 +#ifndef YY_READ_BUF_SIZE
4265 +#define YY_READ_BUF_SIZE 8192
4268 +/* Copy whatever the last rule matched to the standard output. */
4270 +/* This used to be an fputs(), but since the string might contain NUL's,
4271 + * we now use fwrite().
4273 +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
4276 +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
4277 + * is returned in "result".
4280 +#define YY_INPUT(buf,result,max_size) \
4281 + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
4285 + for ( n = 0; n < max_size && \
4286 + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
4287 + buf[n] = (char) c; \
4288 + if ( c == '\n' ) \
4289 + buf[n++] = (char) c; \
4290 + if ( c == EOF && ferror( yyin ) ) \
4291 + YY_FATAL_ERROR( "input in flex scanner failed" ); \
4297 + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
4299 + if( errno != EINTR) \
4301 + YY_FATAL_ERROR( "input in flex scanner failed" ); \
4312 +/* No semi-colon after return; correct usage is to write "yyterminate();" -
4313 + * we don't want an extra ';' after the "return" because that will cause
4314 + * some compilers to complain about unreachable statements.
4316 +#ifndef yyterminate
4317 +#define yyterminate() return YY_NULL
4320 +/* Number of entries by which start-condition stack grows. */
4321 +#ifndef YY_START_STACK_INCR
4322 +#define YY_START_STACK_INCR 25
4325 +/* Report a fatal error. */
4326 +#ifndef YY_FATAL_ERROR
4327 +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
4330 +/* end tables serialization structures and prototypes */
4332 +/* Default declaration of generated scanner - a define so the user can
4333 + * easily add parameters.
4336 +#define YY_DECL_IS_OURS 1
4338 +extern int yylex (void);
4340 +#define YY_DECL int yylex (void)
4341 +#endif /* !YY_DECL */
4343 +/* Code executed at the beginning of each rule, after yytext and yyleng
4344 + * have been set up.
4346 +#ifndef YY_USER_ACTION
4347 +#define YY_USER_ACTION
4350 +/* Code executed at the end of each rule. */
4352 +#define YY_BREAK break;
4355 +#define YY_RULE_SETUP \
4358 +/** The main scanner function which does all the work.
4362 + register yy_state_type yy_current_state;
4363 + register char *yy_cp, *yy_bp;
4364 + register int yy_act;
4366 +#line 57 "dtc-lexer.l"
4368 +#line 784 "dtc-lexer.lex.c"
4374 +#ifdef YY_USER_INIT
4378 + if ( ! (yy_start) )
4379 + (yy_start) = 1; /* first start state */
4387 + if ( ! YY_CURRENT_BUFFER ) {
4388 + yyensure_buffer_stack ();
4389 + YY_CURRENT_BUFFER_LVALUE =
4390 + yy_create_buffer(yyin,YY_BUF_SIZE );
4393 + yy_load_buffer_state( );
4396 + while ( 1 ) /* loops until end-of-file is reached */
4398 + yy_cp = (yy_c_buf_p);
4400 + /* Support of yytext. */
4401 + *yy_cp = (yy_hold_char);
4403 + /* yy_bp points to the position in yy_ch_buf of the start of
4404 + * the current run.
4408 + yy_current_state = (yy_start);
4412 + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
4413 + if ( yy_accept[yy_current_state] )
4415 + (yy_last_accepting_state) = yy_current_state;
4416 + (yy_last_accepting_cpos) = yy_cp;
4418 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4420 + yy_current_state = (int) yy_def[yy_current_state];
4421 + if ( yy_current_state >= 94 )
4422 + yy_c = yy_meta[(unsigned int) yy_c];
4424 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4427 + while ( yy_base[yy_current_state] != 288 );
4430 + yy_act = yy_accept[yy_current_state];
4431 + if ( yy_act == 0 )
4432 + { /* have to back up */
4433 + yy_cp = (yy_last_accepting_cpos);
4434 + yy_current_state = (yy_last_accepting_state);
4435 + yy_act = yy_accept[yy_current_state];
4438 + YY_DO_BEFORE_ACTION;
4440 + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
4443 + for ( yyl = 0; yyl < yyleng; ++yyl )
4444 + if ( yytext[yyl] == '\n' )
4450 +do_action: /* This label is used only to access EOF actions. */
4453 + { /* beginning of action switch */
4454 + case 0: /* must back up */
4455 + /* undo the effects of YY_DO_BEFORE_ACTION */
4456 + *yy_cp = (yy_hold_char);
4457 + yy_cp = (yy_last_accepting_cpos);
4458 + yy_current_state = (yy_last_accepting_state);
4459 + goto yy_find_action;
4463 +#line 58 "dtc-lexer.l"
4468 +#line 60 "dtc-lexer.l"
4470 + yytext[strlen(yytext) - 1] = 0;
4471 + if (!push_input_file(yytext + 1)) {
4472 + /* Some unrecoverable error.*/
4478 +case YY_STATE_EOF(INITIAL):
4479 +case YY_STATE_EOF(INCLUDE):
4480 +case YY_STATE_EOF(BYTESTRING):
4481 +case YY_STATE_EOF(PROPNODENAME):
4482 +case YY_STATE_EOF(V1):
4483 +#line 70 "dtc-lexer.l"
4485 + if (!pop_input_file()) {
4491 +/* rule 3 can match eol */
4493 +#line 76 "dtc-lexer.l"
4495 + yylloc.filenum = srcpos_filenum;
4496 + yylloc.first_line = yylineno;
4497 + DPRINT("String: %s\n", yytext);
4498 + yylval.data = data_copy_escape_string(yytext+1,
4500 + yylloc.first_line = yylineno;
4506 +#line 86 "dtc-lexer.l"
4508 + yylloc.filenum = srcpos_filenum;
4509 + yylloc.first_line = yylineno;
4510 + DPRINT("Keyword: /dts-v1/\n");
4518 +#line 95 "dtc-lexer.l"
4520 + yylloc.filenum = srcpos_filenum;
4521 + yylloc.first_line = yylineno;
4522 + DPRINT("Keyword: /memreserve/\n");
4524 + return DT_MEMRESERVE;
4529 +#line 103 "dtc-lexer.l"
4531 + yylloc.filenum = srcpos_filenum;
4532 + yylloc.first_line = yylineno;
4533 + DPRINT("Label: %s\n", yytext);
4534 + yylval.labelref = strdup(yytext);
4535 + yylval.labelref[yyleng-1] = '\0';
4541 +#line 112 "dtc-lexer.l"
4543 + yylloc.filenum = srcpos_filenum;
4544 + yylloc.first_line = yylineno;
4545 + if (*yytext == 'b')
4547 + else if (*yytext == 'o')
4549 + else if (*yytext == 'd')
4550 + yylval.cbase = 10;
4552 + yylval.cbase = 16;
4553 + DPRINT("Base: %d\n", yylval.cbase);
4559 +#line 127 "dtc-lexer.l"
4561 + yylloc.filenum = srcpos_filenum;
4562 + yylloc.first_line = yylineno;
4563 + yylval.literal = strdup(yytext);
4564 + DPRINT("Literal: '%s'\n", yylval.literal);
4565 + return DT_LEGACYLITERAL;
4570 +#line 135 "dtc-lexer.l"
4572 + yylloc.filenum = srcpos_filenum;
4573 + yylloc.first_line = yylineno;
4574 + yylval.literal = strdup(yytext);
4575 + DPRINT("Literal: '%s'\n", yylval.literal);
4576 + return DT_LITERAL;
4581 +#line 143 "dtc-lexer.l"
4582 +{ /* label reference */
4583 + yylloc.filenum = srcpos_filenum;
4584 + yylloc.first_line = yylineno;
4585 + DPRINT("Ref: %s\n", yytext+1);
4586 + yylval.labelref = strdup(yytext+1);
4592 +#line 151 "dtc-lexer.l"
4593 +{ /* new-style path reference */
4594 + yylloc.filenum = srcpos_filenum;
4595 + yylloc.first_line = yylineno;
4596 + yytext[yyleng-1] = '\0';
4597 + DPRINT("Ref: %s\n", yytext+2);
4598 + yylval.labelref = strdup(yytext+2);
4604 +#line 160 "dtc-lexer.l"
4605 +{ /* old-style path reference */
4606 + yylloc.filenum = srcpos_filenum;
4607 + yylloc.first_line = yylineno;
4608 + DPRINT("Ref: %s\n", yytext+1);
4609 + yylval.labelref = strdup(yytext+1);
4615 +#line 168 "dtc-lexer.l"
4617 + yylloc.filenum = srcpos_filenum;
4618 + yylloc.first_line = yylineno;
4619 + yylval.byte = strtol(yytext, NULL, 16);
4620 + DPRINT("Byte: %02x\n", (int)yylval.byte);
4626 +#line 176 "dtc-lexer.l"
4628 + yylloc.filenum = srcpos_filenum;
4629 + yylloc.first_line = yylineno;
4630 + DPRINT("/BYTESTRING\n");
4637 +#line 184 "dtc-lexer.l"
4639 + yylloc.filenum = srcpos_filenum;
4640 + yylloc.first_line = yylineno;
4641 + DPRINT("PropNodeName: %s\n", yytext);
4642 + yylval.propnodename = strdup(yytext);
4644 + return DT_PROPNODENAME;
4648 +/* rule 16 can match eol */
4650 +#line 194 "dtc-lexer.l"
4651 +/* eat whitespace */
4654 +/* rule 17 can match eol */
4656 +#line 196 "dtc-lexer.l"
4658 + yylloc.filenum = srcpos_filenum;
4659 + yylloc.first_line = yylineno;
4660 + DPRINT("Comment: %s\n", yytext);
4661 + /* eat comments */
4665 +/* rule 18 can match eol */
4667 +#line 203 "dtc-lexer.l"
4668 +/* eat line comments */
4672 +#line 205 "dtc-lexer.l"
4674 + yylloc.filenum = srcpos_filenum;
4675 + yylloc.first_line = yylineno;
4676 + DPRINT("Char: %c (\\x%02x)\n", yytext[0],
4677 + (unsigned)yytext[0]);
4678 + if (yytext[0] == '[') {
4679 + DPRINT("<BYTESTRING>\n");
4680 + BEGIN(BYTESTRING);
4682 + if ((yytext[0] == '{')
4683 + || (yytext[0] == ';')) {
4684 + DPRINT("<PROPNODENAME>\n");
4685 + BEGIN(PROPNODENAME);
4692 +#line 222 "dtc-lexer.l"
4695 +#line 1111 "dtc-lexer.lex.c"
4697 + case YY_END_OF_BUFFER:
4699 + /* Amount of text matched not including the EOB char. */
4700 + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
4702 + /* Undo the effects of YY_DO_BEFORE_ACTION. */
4703 + *yy_cp = (yy_hold_char);
4704 + YY_RESTORE_YY_MORE_OFFSET
4706 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
4708 + /* We're scanning a new file or input source. It's
4709 + * possible that this happened because the user
4710 + * just pointed yyin at a new source and called
4711 + * yylex(). If so, then we have to assure
4712 + * consistency between YY_CURRENT_BUFFER and our
4713 + * globals. Here is the right place to do so, because
4714 + * this is the first action (other than possibly a
4715 + * back-up) that will match for the new input source.
4717 + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
4718 + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
4719 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
4722 + /* Note that here we test for yy_c_buf_p "<=" to the position
4723 + * of the first EOB in the buffer, since yy_c_buf_p will
4724 + * already have been incremented past the NUL character
4725 + * (since all states make transitions on EOB to the
4726 + * end-of-buffer state). Contrast this with the test
4729 + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
4730 + { /* This was really a NUL. */
4731 + yy_state_type yy_next_state;
4733 + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
4735 + yy_current_state = yy_get_previous_state( );
4737 + /* Okay, we're now positioned to make the NUL
4738 + * transition. We couldn't have
4739 + * yy_get_previous_state() go ahead and do it
4740 + * for us because it doesn't know how to deal
4741 + * with the possibility of jamming (and we don't
4742 + * want to build jamming into it because then it
4743 + * will run more slowly).
4746 + yy_next_state = yy_try_NUL_trans( yy_current_state );
4748 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
4750 + if ( yy_next_state )
4752 + /* Consume the NUL. */
4753 + yy_cp = ++(yy_c_buf_p);
4754 + yy_current_state = yy_next_state;
4760 + yy_cp = (yy_c_buf_p);
4761 + goto yy_find_action;
4765 + else switch ( yy_get_next_buffer( ) )
4767 + case EOB_ACT_END_OF_FILE:
4769 + (yy_did_buffer_switch_on_eof) = 0;
4773 + /* Note: because we've taken care in
4774 + * yy_get_next_buffer() to have set up
4775 + * yytext, we can now set up
4776 + * yy_c_buf_p so that if some total
4777 + * hoser (like flex itself) wants to
4778 + * call the scanner after we return the
4779 + * YY_NULL, it'll still work - another
4780 + * YY_NULL will get returned.
4782 + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
4784 + yy_act = YY_STATE_EOF(YY_START);
4790 + if ( ! (yy_did_buffer_switch_on_eof) )
4796 + case EOB_ACT_CONTINUE_SCAN:
4798 + (yytext_ptr) + yy_amount_of_matched_text;
4800 + yy_current_state = yy_get_previous_state( );
4802 + yy_cp = (yy_c_buf_p);
4803 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
4806 + case EOB_ACT_LAST_MATCH:
4808 + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
4810 + yy_current_state = yy_get_previous_state( );
4812 + yy_cp = (yy_c_buf_p);
4813 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
4814 + goto yy_find_action;
4821 + "fatal flex scanner internal error--no action found" );
4822 + } /* end of action switch */
4823 + } /* end of scanning one token */
4824 +} /* end of yylex */
4826 +/* yy_get_next_buffer - try to read in a new buffer
4828 + * Returns a code representing an action:
4829 + * EOB_ACT_LAST_MATCH -
4830 + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
4831 + * EOB_ACT_END_OF_FILE - end of file
4833 +static int yy_get_next_buffer (void)
4835 + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
4836 + register char *source = (yytext_ptr);
4837 + register int number_to_move, i;
4840 + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
4842 + "fatal flex scanner internal error--end of buffer missed" );
4844 + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
4845 + { /* Don't try to fill the buffer, so this is an EOF. */
4846 + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
4848 + /* We matched a single character, the EOB, so
4849 + * treat this as a final EOF.
4851 + return EOB_ACT_END_OF_FILE;
4856 + /* We matched some text prior to the EOB, first
4859 + return EOB_ACT_LAST_MATCH;
4863 + /* Try to read more data. */
4865 + /* First move last chars to start of buffer. */
4866 + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
4868 + for ( i = 0; i < number_to_move; ++i )
4869 + *(dest++) = *(source++);
4871 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
4872 + /* don't do the read, it's not guaranteed to return an EOF,
4873 + * just force an EOF
4875 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
4880 + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
4882 + while ( num_to_read <= 0 )
4883 + { /* Not enough room in the buffer - grow it. */
4885 + /* just a shorter name for the current buffer */
4886 + YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
4888 + int yy_c_buf_p_offset =
4889 + (int) ((yy_c_buf_p) - b->yy_ch_buf);
4891 + if ( b->yy_is_our_buffer )
4893 + int new_size = b->yy_buf_size * 2;
4895 + if ( new_size <= 0 )
4896 + b->yy_buf_size += b->yy_buf_size / 8;
4898 + b->yy_buf_size *= 2;
4900 + b->yy_ch_buf = (char *)
4901 + /* Include room in for 2 EOB chars. */
4902 + yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
4905 + /* Can't grow it, we don't own it. */
4908 + if ( ! b->yy_ch_buf )
4910 + "fatal error - scanner input buffer overflow" );
4912 + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
4914 + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
4915 + number_to_move - 1;
4919 + if ( num_to_read > YY_READ_BUF_SIZE )
4920 + num_to_read = YY_READ_BUF_SIZE;
4922 + /* Read in more data. */
4923 + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
4924 + (yy_n_chars), (size_t) num_to_read );
4926 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
4929 + if ( (yy_n_chars) == 0 )
4931 + if ( number_to_move == YY_MORE_ADJ )
4933 + ret_val = EOB_ACT_END_OF_FILE;
4939 + ret_val = EOB_ACT_LAST_MATCH;
4940 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
4941 + YY_BUFFER_EOF_PENDING;
4946 + ret_val = EOB_ACT_CONTINUE_SCAN;
4948 + (yy_n_chars) += number_to_move;
4949 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
4950 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
4952 + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
4957 +/* yy_get_previous_state - get the state just before the EOB char was reached */
4959 + static yy_state_type yy_get_previous_state (void)
4961 + register yy_state_type yy_current_state;
4962 + register char *yy_cp;
4964 + yy_current_state = (yy_start);
4966 + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
4968 + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
4969 + if ( yy_accept[yy_current_state] )
4971 + (yy_last_accepting_state) = yy_current_state;
4972 + (yy_last_accepting_cpos) = yy_cp;
4974 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4976 + yy_current_state = (int) yy_def[yy_current_state];
4977 + if ( yy_current_state >= 94 )
4978 + yy_c = yy_meta[(unsigned int) yy_c];
4980 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4983 + return yy_current_state;
4986 +/* yy_try_NUL_trans - try to make a transition on the NUL character
4989 + * next_state = yy_try_NUL_trans( current_state );
4991 + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
4993 + register int yy_is_jam;
4994 + register char *yy_cp = (yy_c_buf_p);
4996 + register YY_CHAR yy_c = 1;
4997 + if ( yy_accept[yy_current_state] )
4999 + (yy_last_accepting_state) = yy_current_state;
5000 + (yy_last_accepting_cpos) = yy_cp;
5002 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
5004 + yy_current_state = (int) yy_def[yy_current_state];
5005 + if ( yy_current_state >= 94 )
5006 + yy_c = yy_meta[(unsigned int) yy_c];
5008 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
5009 + yy_is_jam = (yy_current_state == 93);
5011 + return yy_is_jam ? 0 : yy_current_state;
5014 +#ifndef YY_NO_INPUT
5016 + static int yyinput (void)
5018 + static int input (void)
5024 + *(yy_c_buf_p) = (yy_hold_char);
5026 + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
5028 + /* yy_c_buf_p now points to the character we want to return.
5029 + * If this occurs *before* the EOB characters, then it's a
5030 + * valid NUL; if not, then we've hit the end of the buffer.
5032 + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
5033 + /* This was really a NUL. */
5034 + *(yy_c_buf_p) = '\0';
5037 + { /* need more input */
5038 + int offset = (yy_c_buf_p) - (yytext_ptr);
5041 + switch ( yy_get_next_buffer( ) )
5043 + case EOB_ACT_LAST_MATCH:
5044 + /* This happens because yy_g_n_b()
5045 + * sees that we've accumulated a
5046 + * token and flags that we need to
5047 + * try matching the token before
5048 + * proceeding. But for input(),
5049 + * there's no matching to consider.
5050 + * So convert the EOB_ACT_LAST_MATCH
5051 + * to EOB_ACT_END_OF_FILE.
5054 + /* Reset buffer status. */
5059 + case EOB_ACT_END_OF_FILE:
5064 + if ( ! (yy_did_buffer_switch_on_eof) )
5073 + case EOB_ACT_CONTINUE_SCAN:
5074 + (yy_c_buf_p) = (yytext_ptr) + offset;
5080 + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
5081 + *(yy_c_buf_p) = '\0'; /* preserve yytext */
5082 + (yy_hold_char) = *++(yy_c_buf_p);
5091 +#endif /* ifndef YY_NO_INPUT */
5093 +/** Immediately switch to a different input stream.
5094 + * @param input_file A readable stream.
5096 + * @note This function does not reset the start condition to @c INITIAL .
5098 + void yyrestart (FILE * input_file )
5101 + if ( ! YY_CURRENT_BUFFER ){
5102 + yyensure_buffer_stack ();
5103 + YY_CURRENT_BUFFER_LVALUE =
5104 + yy_create_buffer(yyin,YY_BUF_SIZE );
5107 + yy_init_buffer(YY_CURRENT_BUFFER,input_file );
5108 + yy_load_buffer_state( );
5111 +/** Switch to a different input buffer.
5112 + * @param new_buffer The new input buffer.
5115 + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
5118 + /* TODO. We should be able to replace this entire function body
5120 + * yypop_buffer_state();
5121 + * yypush_buffer_state(new_buffer);
5123 + yyensure_buffer_stack ();
5124 + if ( YY_CURRENT_BUFFER == new_buffer )
5127 + if ( YY_CURRENT_BUFFER )
5129 + /* Flush out information for old buffer. */
5130 + *(yy_c_buf_p) = (yy_hold_char);
5131 + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
5132 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
5135 + YY_CURRENT_BUFFER_LVALUE = new_buffer;
5136 + yy_load_buffer_state( );
5138 + /* We don't actually know whether we did this switch during
5139 + * EOF (yywrap()) processing, but the only time this flag
5140 + * is looked at is after yywrap() is called, so it's safe
5141 + * to go ahead and always set it.
5143 + (yy_did_buffer_switch_on_eof) = 1;
5146 +static void yy_load_buffer_state (void)
5148 + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
5149 + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
5150 + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
5151 + (yy_hold_char) = *(yy_c_buf_p);
5154 +/** Allocate and initialize an input buffer state.
5155 + * @param file A readable stream.
5156 + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
5158 + * @return the allocated buffer state.
5160 + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
5162 + YY_BUFFER_STATE b;
5164 + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
5166 + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
5168 + b->yy_buf_size = size;
5170 + /* yy_ch_buf has to be 2 characters longer than the size given because
5171 + * we need to put in 2 end-of-buffer characters.
5173 + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
5174 + if ( ! b->yy_ch_buf )
5175 + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
5177 + b->yy_is_our_buffer = 1;
5179 + yy_init_buffer(b,file );
5184 +/** Destroy the buffer.
5185 + * @param b a buffer created with yy_create_buffer()
5188 + void yy_delete_buffer (YY_BUFFER_STATE b )
5194 + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
5195 + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
5197 + if ( b->yy_is_our_buffer )
5198 + yyfree((void *) b->yy_ch_buf );
5200 + yyfree((void *) b );
5203 +#ifndef __cplusplus
5204 +extern int isatty (int );
5205 +#endif /* __cplusplus */
5207 +/* Initializes or reinitializes a buffer.
5208 + * This function is sometimes called more than once on the same buffer,
5209 + * such as during a yyrestart() or at EOF.
5211 + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
5214 + int oerrno = errno;
5216 + yy_flush_buffer(b );
5218 + b->yy_input_file = file;
5219 + b->yy_fill_buffer = 1;
5221 + /* If b is the current buffer, then yy_init_buffer was _probably_
5222 + * called from yyrestart() or through yy_get_next_buffer.
5223 + * In that case, we don't want to reset the lineno or column.
5225 + if (b != YY_CURRENT_BUFFER){
5226 + b->yy_bs_lineno = 1;
5227 + b->yy_bs_column = 0;
5230 + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
5235 +/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
5236 + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
5239 + void yy_flush_buffer (YY_BUFFER_STATE b )
5244 + b->yy_n_chars = 0;
5246 + /* We always need two end-of-buffer characters. The first causes
5247 + * a transition to the end-of-buffer state. The second causes
5248 + * a jam in that state.
5250 + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
5251 + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
5253 + b->yy_buf_pos = &b->yy_ch_buf[0];
5256 + b->yy_buffer_status = YY_BUFFER_NEW;
5258 + if ( b == YY_CURRENT_BUFFER )
5259 + yy_load_buffer_state( );
5262 +/** Pushes the new state onto the stack. The new state becomes
5263 + * the current state. This function will allocate the stack
5265 + * @param new_buffer The new state.
5268 +void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
5270 + if (new_buffer == NULL)
5273 + yyensure_buffer_stack();
5275 + /* This block is copied from yy_switch_to_buffer. */
5276 + if ( YY_CURRENT_BUFFER )
5278 + /* Flush out information for old buffer. */
5279 + *(yy_c_buf_p) = (yy_hold_char);
5280 + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
5281 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
5284 + /* Only push if top exists. Otherwise, replace top. */
5285 + if (YY_CURRENT_BUFFER)
5286 + (yy_buffer_stack_top)++;
5287 + YY_CURRENT_BUFFER_LVALUE = new_buffer;
5289 + /* copied from yy_switch_to_buffer. */
5290 + yy_load_buffer_state( );
5291 + (yy_did_buffer_switch_on_eof) = 1;
5294 +/** Removes and deletes the top of the stack, if present.
5295 + * The next element becomes the new top.
5298 +void yypop_buffer_state (void)
5300 + if (!YY_CURRENT_BUFFER)
5303 + yy_delete_buffer(YY_CURRENT_BUFFER );
5304 + YY_CURRENT_BUFFER_LVALUE = NULL;
5305 + if ((yy_buffer_stack_top) > 0)
5306 + --(yy_buffer_stack_top);
5308 + if (YY_CURRENT_BUFFER) {
5309 + yy_load_buffer_state( );
5310 + (yy_did_buffer_switch_on_eof) = 1;
5314 +/* Allocates the stack if it does not exist.
5315 + * Guarantees space for at least one push.
5317 +static void yyensure_buffer_stack (void)
5321 + if (!(yy_buffer_stack)) {
5323 + /* First allocation is just for 2 elements, since we don't know if this
5324 + * scanner will even need a stack. We use 2 instead of 1 to avoid an
5325 + * immediate realloc on the next call.
5328 + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
5329 + (num_to_alloc * sizeof(struct yy_buffer_state*)
5332 + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
5334 + (yy_buffer_stack_max) = num_to_alloc;
5335 + (yy_buffer_stack_top) = 0;
5339 + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
5341 + /* Increase the buffer to prepare for a possible push. */
5342 + int grow_size = 8 /* arbitrary grow size */;
5344 + num_to_alloc = (yy_buffer_stack_max) + grow_size;
5345 + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
5346 + ((yy_buffer_stack),
5347 + num_to_alloc * sizeof(struct yy_buffer_state*)
5350 + /* zero only the new slots.*/
5351 + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
5352 + (yy_buffer_stack_max) = num_to_alloc;
5356 +/** Setup the input buffer state to scan directly from a user-specified character buffer.
5357 + * @param base the character buffer
5358 + * @param size the size in bytes of the character buffer
5360 + * @return the newly allocated buffer state object.
5362 +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
5364 + YY_BUFFER_STATE b;
5367 + base[size-2] != YY_END_OF_BUFFER_CHAR ||
5368 + base[size-1] != YY_END_OF_BUFFER_CHAR )
5369 + /* They forgot to leave room for the EOB's. */
5372 + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
5374 + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
5376 + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
5377 + b->yy_buf_pos = b->yy_ch_buf = base;
5378 + b->yy_is_our_buffer = 0;
5379 + b->yy_input_file = 0;
5380 + b->yy_n_chars = b->yy_buf_size;
5381 + b->yy_is_interactive = 0;
5383 + b->yy_fill_buffer = 0;
5384 + b->yy_buffer_status = YY_BUFFER_NEW;
5386 + yy_switch_to_buffer(b );
5391 +/** Setup the input buffer state to scan a string. The next call to yylex() will
5392 + * scan from a @e copy of @a str.
5393 + * @param yystr a NUL-terminated string to scan
5395 + * @return the newly allocated buffer state object.
5396 + * @note If you want to scan bytes that may contain NUL values, then use
5397 + * yy_scan_bytes() instead.
5399 +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
5402 + return yy_scan_bytes(yystr,strlen(yystr) );
5405 +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
5406 + * scan from a @e copy of @a bytes.
5407 + * @param bytes the byte buffer to scan
5408 + * @param len the number of bytes in the buffer pointed to by @a bytes.
5410 + * @return the newly allocated buffer state object.
5412 +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
5414 + YY_BUFFER_STATE b;
5419 + /* Get memory for full buffer, including space for trailing EOB's. */
5420 + n = _yybytes_len + 2;
5421 + buf = (char *) yyalloc(n );
5423 + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
5425 + for ( i = 0; i < _yybytes_len; ++i )
5426 + buf[i] = yybytes[i];
5428 + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
5430 + b = yy_scan_buffer(buf,n );
5432 + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
5434 + /* It's okay to grow etc. this buffer, and we should throw it
5435 + * away when we're done.
5437 + b->yy_is_our_buffer = 1;
5442 +#ifndef YY_EXIT_FAILURE
5443 +#define YY_EXIT_FAILURE 2
5446 +static void yy_fatal_error (yyconst char* msg )
5448 + (void) fprintf( stderr, "%s\n", msg );
5449 + exit( YY_EXIT_FAILURE );
5452 +/* Redefine yyless() so it works in section 3 code. */
5455 +#define yyless(n) \
5458 + /* Undo effects of setting up yytext. */ \
5459 + int yyless_macro_arg = (n); \
5460 + YY_LESS_LINENO(yyless_macro_arg);\
5461 + yytext[yyleng] = (yy_hold_char); \
5462 + (yy_c_buf_p) = yytext + yyless_macro_arg; \
5463 + (yy_hold_char) = *(yy_c_buf_p); \
5464 + *(yy_c_buf_p) = '\0'; \
5465 + yyleng = yyless_macro_arg; \
5469 +/* Accessor methods (get/set functions) to struct members. */
5471 +/** Get the current line number.
5474 +int yyget_lineno (void)
5480 +/** Get the input stream.
5483 +FILE *yyget_in (void)
5488 +/** Get the output stream.
5491 +FILE *yyget_out (void)
5496 +/** Get the length of the current token.
5499 +int yyget_leng (void)
5504 +/** Get the current token.
5508 +char *yyget_text (void)
5513 +/** Set the current line number.
5514 + * @param line_number
5517 +void yyset_lineno (int line_number )
5520 + yylineno = line_number;
5523 +/** Set the input stream. This does not discard the current
5525 + * @param in_str A readable stream.
5527 + * @see yy_switch_to_buffer
5529 +void yyset_in (FILE * in_str )
5534 +void yyset_out (FILE * out_str )
5539 +int yyget_debug (void)
5541 + return yy_flex_debug;
5544 +void yyset_debug (int bdebug )
5546 + yy_flex_debug = bdebug ;
5549 +static int yy_init_globals (void)
5551 + /* Initialization is the same as for the non-reentrant scanner.
5552 + * This function is called from yylex_destroy(), so don't allocate here.
5555 + /* We do not touch yylineno unless the option is enabled. */
5558 + (yy_buffer_stack) = 0;
5559 + (yy_buffer_stack_top) = 0;
5560 + (yy_buffer_stack_max) = 0;
5561 + (yy_c_buf_p) = (char *) 0;
5565 +/* Defined in main.c */
5570 + yyin = (FILE *) 0;
5571 + yyout = (FILE *) 0;
5574 + /* For future reference: Set errno on error, since we are called by
5580 +/* yylex_destroy is for both reentrant and non-reentrant scanners. */
5581 +int yylex_destroy (void)
5584 + /* Pop the buffer stack, destroying each element. */
5585 + while(YY_CURRENT_BUFFER){
5586 + yy_delete_buffer(YY_CURRENT_BUFFER );
5587 + YY_CURRENT_BUFFER_LVALUE = NULL;
5588 + yypop_buffer_state();
5591 + /* Destroy the stack itself. */
5592 + yyfree((yy_buffer_stack) );
5593 + (yy_buffer_stack) = NULL;
5595 + /* Reset the globals. This is important in a non-reentrant scanner so the next time
5596 + * yylex() is called, initialization will occur. */
5597 + yy_init_globals( );
5603 + * Internal utility routines.
5607 +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
5610 + for ( i = 0; i < n; ++i )
5615 +#ifdef YY_NEED_STRLEN
5616 +static int yy_flex_strlen (yyconst char * s )
5619 + for ( n = 0; s[n]; ++n )
5626 +void *yyalloc (yy_size_t size )
5628 + return (void *) malloc( size );
5631 +void *yyrealloc (void * ptr, yy_size_t size )
5633 + /* The cast to (char *) in the following accommodates both
5634 + * implementations that use char* generic pointers, and those
5635 + * that use void* generic pointers. It works with the latter
5636 + * because both ANSI C and C++ allow castless assignment from
5637 + * any pointer type to void*, and deal with argument conversions
5638 + * as though doing an assignment.
5640 + return (void *) realloc( (char *) ptr, size );
5643 +void yyfree (void * ptr )
5645 + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
5648 +#define YYTABLES_NAME "yytables"
5650 +#line 222 "dtc-lexer.l"
5656 + * Stack of nested include file contexts.
5662 + YY_BUFFER_STATE yy_prev_buf;
5663 + int yy_prev_lineno;
5664 + struct incl_file *prev;
5667 +struct incl_file *incl_file_stack;
5671 + * Detect infinite include recursion.
5673 +#define MAX_INCLUDE_DEPTH (100)
5675 +static int incl_depth = 0;
5678 +int push_input_file(const char *filename)
5681 + struct incl_file *incl_file;
5684 + yyerror("No include file name given.");
5688 + if (incl_depth++ >= MAX_INCLUDE_DEPTH) {
5689 + yyerror("Includes nested too deeply");
5693 + f = dtc_open_file(filename);
5695 + incl_file = malloc(sizeof(struct incl_file));
5697 + yyerror("Can not allocate include file space.");
5702 + * Save current context.
5704 + incl_file->yy_prev_buf = YY_CURRENT_BUFFER;
5705 + incl_file->yy_prev_lineno = yylineno;
5706 + incl_file->filenum = srcpos_filenum;
5707 + incl_file->file = yyin;
5708 + incl_file->prev = incl_file_stack;
5710 + incl_file_stack = incl_file;
5713 + * Establish new context.
5715 + srcpos_filenum = lookup_file_name(filename, 0);
5718 + yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
5724 +int pop_input_file(void)
5726 + struct incl_file *incl_file;
5728 + if (incl_file_stack == 0)
5737 + incl_file = incl_file_stack;
5738 + incl_file_stack = incl_file->prev;
5741 + * Recover old context.
5743 + yy_delete_buffer(YY_CURRENT_BUFFER);
5744 + yy_switch_to_buffer(incl_file->yy_prev_buf);
5745 + yylineno = incl_file->yy_prev_lineno;
5746 + srcpos_filenum = incl_file->filenum;
5747 + yyin = incl_file->file;
5754 + if (YY_CURRENT_BUFFER == 0)
5760 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped powerpc.git/arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped
5761 --- linux-2.6.24/arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped 1970-01-01 01:00:00.000000000 +0100
5762 +++ powerpc.git/arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped 2008-01-28 20:25:49.000000000 +0100
5764 +/* A Bison parser, made by GNU Bison 2.3. */
5766 +/* Skeleton implementation for Bison's Yacc-like parsers in C
5768 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
5769 + Free Software Foundation, Inc.
5771 + This program is free software; you can redistribute it and/or modify
5772 + it under the terms of the GNU General Public License as published by
5773 + the Free Software Foundation; either version 2, or (at your option)
5774 + any later version.
5776 + This program is distributed in the hope that it will be useful,
5777 + but WITHOUT ANY WARRANTY; without even the implied warranty of
5778 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5779 + GNU General Public License for more details.
5781 + You should have received a copy of the GNU General Public License
5782 + along with this program; if not, write to the Free Software
5783 + Foundation, Inc., 51 Franklin Street, Fifth Floor,
5784 + Boston, MA 02110-1301, USA. */
5786 +/* As a special exception, you may create a larger work that contains
5787 + part or all of the Bison parser skeleton and distribute that work
5788 + under terms of your choice, so long as that work isn't itself a
5789 + parser generator using the skeleton or a modified version thereof
5790 + as a parser skeleton. Alternatively, if you modify or redistribute
5791 + the parser skeleton itself, you may (at your option) remove this
5792 + special exception, which will cause the skeleton and the resulting
5793 + Bison output files to be licensed under the GNU General Public
5794 + License without this special exception.
5796 + This special exception was added by the Free Software Foundation in
5797 + version 2.2 of Bison. */
5799 +/* C LALR(1) parser skeleton written by Richard Stallman, by
5800 + simplifying the original so-called "semantic" parser. */
5802 +/* All symbols defined below should begin with yy or YY, to avoid
5803 + infringing on user name space. This should be done even for local
5804 + variables, as they might otherwise be expanded by user macros.
5805 + There are some unavoidable exceptions within include files to
5806 + define necessary library symbols; they are noted "INFRINGES ON
5807 + USER NAME SPACE" below. */
5809 +/* Identify Bison output. */
5812 +/* Bison version. */
5813 +#define YYBISON_VERSION "2.3"
5815 +/* Skeleton name. */
5816 +#define YYSKELETON_NAME "yacc.c"
5818 +/* Pure parsers. */
5821 +/* Using locations. */
5822 +#define YYLSP_NEEDED 1
5827 +#ifndef YYTOKENTYPE
5828 +# define YYTOKENTYPE
5829 + /* Put the tokens into the symbol table, so that GDB and other debuggers
5830 + know about them. */
5831 + enum yytokentype {
5833 + DT_MEMRESERVE = 259,
5834 + DT_PROPNODENAME = 260,
5836 + DT_LEGACYLITERAL = 262,
5846 +#define DT_MEMRESERVE 259
5847 +#define DT_PROPNODENAME 260
5848 +#define DT_LITERAL 261
5849 +#define DT_LEGACYLITERAL 262
5850 +#define DT_BASE 263
5851 +#define DT_BYTE 264
5852 +#define DT_STRING 265
5853 +#define DT_LABEL 266
5859 +/* Copy the first part of user declarations. */
5860 +#line 23 "dtc-parser.y"
5863 +#include "srcpos.h"
5866 +unsigned long long eval_literal(const char *s, int base, int bits);
5868 +extern struct boot_info *the_boot_info;
5872 +/* Enabling traces. */
5877 +/* Enabling verbose error messages. */
5878 +#ifdef YYERROR_VERBOSE
5879 +# undef YYERROR_VERBOSE
5880 +# define YYERROR_VERBOSE 1
5882 +# define YYERROR_VERBOSE 0
5885 +/* Enabling the token table. */
5886 +#ifndef YYTOKEN_TABLE
5887 +# define YYTOKEN_TABLE 0
5890 +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
5891 +typedef union YYSTYPE
5892 +#line 34 "dtc-parser.y"
5894 + char *propnodename;
5897 + unsigned int cbase;
5903 + struct property *prop;
5904 + struct property *proplist;
5905 + struct node *node;
5906 + struct node *nodelist;
5907 + struct reserve_info *re;
5909 +/* Line 187 of yacc.c. */
5910 +#line 148 "dtc-parser.tab.c"
5912 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
5913 +# define YYSTYPE_IS_DECLARED 1
5914 +# define YYSTYPE_IS_TRIVIAL 1
5917 +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
5918 +typedef struct YYLTYPE
5925 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
5926 +# define YYLTYPE_IS_DECLARED 1
5927 +# define YYLTYPE_IS_TRIVIAL 1
5931 +/* Copy the second part of user declarations. */
5934 +/* Line 216 of yacc.c. */
5935 +#line 173 "dtc-parser.tab.c"
5941 +#ifdef YYTYPE_UINT8
5942 +typedef YYTYPE_UINT8 yytype_uint8;
5944 +typedef unsigned char yytype_uint8;
5948 +typedef YYTYPE_INT8 yytype_int8;
5949 +#elif (defined __STDC__ || defined __C99__FUNC__ \
5950 + || defined __cplusplus || defined _MSC_VER)
5951 +typedef signed char yytype_int8;
5953 +typedef short int yytype_int8;
5956 +#ifdef YYTYPE_UINT16
5957 +typedef YYTYPE_UINT16 yytype_uint16;
5959 +typedef unsigned short int yytype_uint16;
5962 +#ifdef YYTYPE_INT16
5963 +typedef YYTYPE_INT16 yytype_int16;
5965 +typedef short int yytype_int16;
5969 +# ifdef __SIZE_TYPE__
5970 +# define YYSIZE_T __SIZE_TYPE__
5971 +# elif defined size_t
5972 +# define YYSIZE_T size_t
5973 +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
5974 + || defined __cplusplus || defined _MSC_VER)
5975 +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
5976 +# define YYSIZE_T size_t
5978 +# define YYSIZE_T unsigned int
5982 +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
5987 +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
5988 +# define YY_(msgid) dgettext ("bison-runtime", msgid)
5992 +# define YY_(msgid) msgid
5996 +/* Suppress unused-variable warnings by "using" E. */
5997 +#if ! defined lint || defined __GNUC__
5998 +# define YYUSE(e) ((void) (e))
6000 +# define YYUSE(e) /* empty */
6003 +/* Identity function, used to suppress warnings about constant conditions. */
6005 +# define YYID(n) (n)
6007 +#if (defined __STDC__ || defined __C99__FUNC__ \
6008 + || defined __cplusplus || defined _MSC_VER)
6021 +#if ! defined yyoverflow || YYERROR_VERBOSE
6023 +/* The parser invokes alloca or malloc; define the necessary symbols. */
6025 +# ifdef YYSTACK_USE_ALLOCA
6026 +# if YYSTACK_USE_ALLOCA
6028 +# define YYSTACK_ALLOC __builtin_alloca
6029 +# elif defined __BUILTIN_VA_ARG_INCR
6030 +# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
6031 +# elif defined _AIX
6032 +# define YYSTACK_ALLOC __alloca
6033 +# elif defined _MSC_VER
6034 +# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
6035 +# define alloca _alloca
6037 +# define YYSTACK_ALLOC alloca
6038 +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
6039 + || defined __cplusplus || defined _MSC_VER)
6040 +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
6042 +# define _STDLIB_H 1
6049 +# ifdef YYSTACK_ALLOC
6050 + /* Pacify GCC's `empty if-body' warning. */
6051 +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
6052 +# ifndef YYSTACK_ALLOC_MAXIMUM
6053 + /* The OS might guarantee only one guard page at the bottom of the stack,
6054 + and a page size can be as small as 4096 bytes. So we cannot safely
6055 + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
6056 + to allow for a few compiler-allocated temporary stack slots. */
6057 +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
6060 +# define YYSTACK_ALLOC YYMALLOC
6061 +# define YYSTACK_FREE YYFREE
6062 +# ifndef YYSTACK_ALLOC_MAXIMUM
6063 +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
6065 +# if (defined __cplusplus && ! defined _STDLIB_H \
6066 + && ! ((defined YYMALLOC || defined malloc) \
6067 + && (defined YYFREE || defined free)))
6068 +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
6070 +# define _STDLIB_H 1
6074 +# define YYMALLOC malloc
6075 +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
6076 + || defined __cplusplus || defined _MSC_VER)
6077 +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
6081 +# define YYFREE free
6082 +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
6083 + || defined __cplusplus || defined _MSC_VER)
6084 +void free (void *); /* INFRINGES ON USER NAME SPACE */
6088 +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
6091 +#if (! defined yyoverflow \
6092 + && (! defined __cplusplus \
6093 + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
6094 + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
6096 +/* A type that is properly aligned for any stack member. */
6099 + yytype_int16 yyss;
6104 +/* The size of the maximum gap between one aligned stack and the next. */
6105 +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
6107 +/* The size of an array large to enough to hold all stacks, each with
6109 +# define YYSTACK_BYTES(N) \
6110 + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
6111 + + 2 * YYSTACK_GAP_MAXIMUM)
6113 +/* Copy COUNT objects from FROM to TO. The source and destination do
6116 +# if defined __GNUC__ && 1 < __GNUC__
6117 +# define YYCOPY(To, From, Count) \
6118 + __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
6120 +# define YYCOPY(To, From, Count) \
6124 + for (yyi = 0; yyi < (Count); yyi++) \
6125 + (To)[yyi] = (From)[yyi]; \
6131 +/* Relocate STACK from its old location to the new one. The
6132 + local variables YYSIZE and YYSTACKSIZE give the old and new number of
6133 + elements in the stack, and YYPTR gives the new location of the
6134 + stack. Advance YYPTR to a properly aligned location for the next
6136 +# define YYSTACK_RELOCATE(Stack) \
6139 + YYSIZE_T yynewbytes; \
6140 + YYCOPY (&yyptr->Stack, Stack, yysize); \
6141 + Stack = &yyptr->Stack; \
6142 + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
6143 + yyptr += yynewbytes / sizeof (*yyptr); \
6149 +/* YYFINAL -- State number of the termination state. */
6151 +/* YYLAST -- Last index in YYTABLE. */
6154 +/* YYNTOKENS -- Number of terminals. */
6155 +#define YYNTOKENS 24
6156 +/* YYNNTS -- Number of nonterminals. */
6158 +/* YYNRULES -- Number of rules. */
6159 +#define YYNRULES 43
6160 +/* YYNRULES -- Number of states. */
6161 +#define YYNSTATES 67
6163 +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
6164 +#define YYUNDEFTOK 2
6165 +#define YYMAXUTOK 267
6167 +#define YYTRANSLATE(YYX) \
6168 + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
6170 +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
6171 +static const yytype_uint8 yytranslate[] =
6173 + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6174 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6175 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6176 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6177 + 2, 2, 2, 2, 23, 14, 2, 15, 2, 2,
6178 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 13,
6179 + 19, 18, 20, 2, 2, 2, 2, 2, 2, 2,
6180 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6181 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6182 + 2, 21, 2, 22, 2, 2, 2, 2, 2, 2,
6183 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6184 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6185 + 2, 2, 2, 16, 2, 17, 2, 2, 2, 2,
6186 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6187 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6188 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6189 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6190 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6191 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6192 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6193 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6194 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6195 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6196 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6197 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
6198 + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
6199 + 5, 6, 7, 8, 9, 10, 11, 12
6203 +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
6205 +static const yytype_uint8 yyprhs[] =
6207 + 0, 0, 3, 8, 11, 12, 15, 21, 22, 25,
6208 + 27, 34, 36, 38, 41, 47, 48, 51, 57, 61,
6209 + 64, 69, 74, 77, 80, 81, 84, 87, 88, 91,
6210 + 94, 97, 98, 100, 102, 105, 106, 109, 112, 113,
6211 + 116, 119, 123, 124
6214 +/* YYRHS -- A `-1'-separated list of the rules' RHS. */
6215 +static const yytype_int8 yyrhs[] =
6217 + 25, 0, -1, 3, 13, 26, 31, -1, 28, 31,
6218 + -1, -1, 27, 26, -1, 43, 4, 30, 30, 13,
6219 + -1, -1, 29, 28, -1, 27, -1, 43, 4, 30,
6220 + 14, 30, 13, -1, 6, -1, 7, -1, 15, 32,
6221 + -1, 16, 33, 41, 17, 13, -1, -1, 33, 34,
6222 + -1, 43, 5, 18, 35, 13, -1, 43, 5, 13,
6223 + -1, 36, 10, -1, 36, 19, 37, 20, -1, 36,
6224 + 21, 40, 22, -1, 36, 12, -1, 35, 11, -1,
6225 + -1, 35, 23, -1, 36, 11, -1, -1, 37, 39,
6226 + -1, 37, 12, -1, 37, 11, -1, -1, 8, -1,
6227 + 6, -1, 38, 7, -1, -1, 40, 9, -1, 40,
6228 + 11, -1, -1, 42, 41, -1, 42, 34, -1, 43,
6229 + 5, 32, -1, -1, 11, -1
6232 +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
6233 +static const yytype_uint16 yyrline[] =
6235 + 0, 85, 85, 89, 97, 100, 107, 115, 118, 125,
6236 + 129, 136, 140, 147, 154, 162, 165, 172, 176, 183,
6237 + 187, 191, 195, 199, 207, 210, 214, 222, 225, 229,
6238 + 234, 242, 245, 249, 253, 261, 264, 268, 276, 279,
6239 + 283, 291, 299, 302
6243 +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
6244 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
6245 + First, the terminals, then, starting at YYNTOKENS, nonterminals. */
6246 +static const char *const yytname[] =
6248 + "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE",
6249 + "DT_PROPNODENAME", "DT_LITERAL", "DT_LEGACYLITERAL", "DT_BASE",
6250 + "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF", "';'", "'-'", "'/'", "'{'",
6251 + "'}'", "'='", "'<'", "'>'", "'['", "']'", "','", "$accept", "sourcefile",
6252 + "memreserves", "memreserve", "v0_memreserves", "v0_memreserve", "addr",
6253 + "devicetree", "nodedef", "proplist", "propdef", "propdata",
6254 + "propdataprefix", "celllist", "cellbase", "cellval", "bytestring",
6255 + "subnodes", "subnode", "label", 0
6260 +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
6261 + token YYLEX-NUM. */
6262 +static const yytype_uint16 yytoknum[] =
6264 + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
6265 + 265, 266, 267, 59, 45, 47, 123, 125, 61, 60,
6270 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
6271 +static const yytype_uint8 yyr1[] =
6273 + 0, 24, 25, 25, 26, 26, 27, 28, 28, 29,
6274 + 29, 30, 30, 31, 32, 33, 33, 34, 34, 35,
6275 + 35, 35, 35, 35, 36, 36, 36, 37, 37, 37,
6276 + 37, 38, 38, 39, 39, 40, 40, 40, 41, 41,
6280 +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
6281 +static const yytype_uint8 yyr2[] =
6283 + 0, 2, 4, 2, 0, 2, 5, 0, 2, 1,
6284 + 6, 1, 1, 2, 5, 0, 2, 5, 3, 2,
6285 + 4, 4, 2, 2, 0, 2, 2, 0, 2, 2,
6286 + 2, 0, 1, 1, 2, 0, 2, 2, 0, 2,
6290 +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
6291 + STATE-NUM when YYTABLE doesn't specify something else to do. Zero
6292 + means the default is an error. */
6293 +static const yytype_uint8 yydefact[] =
6295 + 7, 0, 43, 0, 9, 0, 7, 0, 4, 1,
6296 + 0, 3, 8, 0, 0, 4, 0, 15, 13, 11,
6297 + 12, 0, 2, 5, 0, 38, 0, 0, 0, 16,
6298 + 0, 38, 0, 0, 6, 0, 40, 39, 0, 10,
6299 + 14, 18, 24, 41, 0, 0, 23, 17, 25, 19,
6300 + 26, 22, 27, 35, 31, 0, 33, 32, 30, 29,
6301 + 20, 0, 28, 36, 37, 21, 34
6304 +/* YYDEFGOTO[NTERM-NUM]. */
6305 +static const yytype_int8 yydefgoto[] =
6307 + -1, 3, 14, 4, 5, 6, 27, 11, 18, 25,
6308 + 29, 44, 45, 54, 61, 62, 55, 30, 31, 7
6311 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
6313 +#define YYPACT_NINF -13
6314 +static const yytype_int8 yypact[] =
6316 + 23, 11, -13, 37, -13, -4, 18, 39, 18, -13,
6317 + 28, -13, -13, 34, -4, 18, 41, -13, -13, -13,
6318 + -13, 25, -13, -13, 34, -3, 34, 33, 34, -13,
6319 + 30, -3, 43, 36, -13, 38, -13, -13, 20, -13,
6320 + -13, -13, -13, -13, 2, 9, -13, -13, -13, -13,
6321 + -13, -13, -13, -13, -2, -6, -13, -13, -13, -13,
6322 + -13, 45, -13, -13, -13, -13, -13
6325 +/* YYPGOTO[NTERM-NUM]. */
6326 +static const yytype_int8 yypgoto[] =
6328 + -13, -13, 35, 27, 47, -13, -12, 40, 17, -13,
6329 + 26, -13, -13, -13, -13, -13, -13, 29, -13, -8
6332 +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
6333 + positive, shift that token. If negative, reduce the rule which
6334 + number is the opposite. If zero, do what YYDEFACT says.
6335 + If YYTABLE_NINF, syntax error. */
6336 +#define YYTABLE_NINF -43
6337 +static const yytype_int8 yytable[] =
6339 + 16, 21, -42, 63, 56, 64, 57, 16, 2, 58,
6340 + 59, 10, 28, 46, 33, 47, 65, 32, 60, 49,
6341 + 50, 51, -42, 32, 8, 48, 1, -42, 52, 2,
6342 + 53, 19, 20, 41, 2, 15, 17, 9, 42, 26,
6343 + 19, 20, 15, 13, 17, 24, 34, 35, 38, 39,
6344 + 23, 40, 66, 12, 22, 43, 0, 36, 0, 0,
6348 +static const yytype_int8 yycheck[] =
6350 + 8, 13, 5, 9, 6, 11, 8, 15, 11, 11,
6351 + 12, 15, 24, 11, 26, 13, 22, 25, 20, 10,
6352 + 11, 12, 4, 31, 13, 23, 3, 4, 19, 11,
6353 + 21, 6, 7, 13, 11, 8, 16, 0, 18, 14,
6354 + 6, 7, 15, 4, 16, 4, 13, 17, 5, 13,
6355 + 15, 13, 7, 6, 14, 38, -1, 31, -1, -1,
6359 +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
6360 + symbol of state STATE-NUM. */
6361 +static const yytype_uint8 yystos[] =
6363 + 0, 3, 11, 25, 27, 28, 29, 43, 13, 0,
6364 + 15, 31, 28, 4, 26, 27, 43, 16, 32, 6,
6365 + 7, 30, 31, 26, 4, 33, 14, 30, 30, 34,
6366 + 41, 42, 43, 30, 13, 17, 34, 41, 5, 13,
6367 + 13, 13, 18, 32, 35, 36, 11, 13, 23, 10,
6368 + 11, 12, 19, 21, 37, 40, 6, 8, 11, 12,
6369 + 20, 38, 39, 9, 11, 22, 7
6372 +#define yyerrok (yyerrstatus = 0)
6373 +#define yyclearin (yychar = YYEMPTY)
6374 +#define YYEMPTY (-2)
6377 +#define YYACCEPT goto yyacceptlab
6378 +#define YYABORT goto yyabortlab
6379 +#define YYERROR goto yyerrorlab
6382 +/* Like YYERROR except do call yyerror. This remains here temporarily
6383 + to ease the transition to the new meaning of YYERROR, for GCC.
6384 + Once GCC version 2 has supplanted version 1, this can go. */
6386 +#define YYFAIL goto yyerrlab
6388 +#define YYRECOVERING() (!!yyerrstatus)
6390 +#define YYBACKUP(Token, Value) \
6392 + if (yychar == YYEMPTY && yylen == 1) \
6394 + yychar = (Token); \
6395 + yylval = (Value); \
6396 + yytoken = YYTRANSLATE (yychar); \
6402 + yyerror (YY_("syntax error: cannot back up")); \
6409 +#define YYERRCODE 256
6412 +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
6413 + If N is 0, then set CURRENT to the empty location which ends
6414 + the previous symbol: RHS[0] (always defined). */
6416 +#define YYRHSLOC(Rhs, K) ((Rhs)[K])
6417 +#ifndef YYLLOC_DEFAULT
6418 +# define YYLLOC_DEFAULT(Current, Rhs, N) \
6422 + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
6423 + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
6424 + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
6425 + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
6429 + (Current).first_line = (Current).last_line = \
6430 + YYRHSLOC (Rhs, 0).last_line; \
6431 + (Current).first_column = (Current).last_column = \
6432 + YYRHSLOC (Rhs, 0).last_column; \
6438 +/* YY_LOCATION_PRINT -- Print the location on the stream.
6439 + This macro was not mandated originally: define only if we know
6440 + we won't break user code: when these are the locations we know. */
6442 +#ifndef YY_LOCATION_PRINT
6443 +# if YYLTYPE_IS_TRIVIAL
6444 +# define YY_LOCATION_PRINT(File, Loc) \
6445 + fprintf (File, "%d.%d-%d.%d", \
6446 + (Loc).first_line, (Loc).first_column, \
6447 + (Loc).last_line, (Loc).last_column)
6449 +# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
6454 +/* YYLEX -- calling `yylex' with the right arguments. */
6457 +# define YYLEX yylex (YYLEX_PARAM)
6459 +# define YYLEX yylex ()
6462 +/* Enable debugging if requested. */
6466 +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
6467 +# define YYFPRINTF fprintf
6470 +# define YYDPRINTF(Args) \
6476 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
6480 + YYFPRINTF (stderr, "%s ", Title); \
6481 + yy_symbol_print (stderr, \
6482 + Type, Value, Location); \
6483 + YYFPRINTF (stderr, "\n"); \
6488 +/*--------------------------------.
6489 +| Print this symbol on YYOUTPUT. |
6490 +`--------------------------------*/
6493 +#if (defined __STDC__ || defined __C99__FUNC__ \
6494 + || defined __cplusplus || defined _MSC_VER)
6496 +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
6499 +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
6502 + YYSTYPE const * const yyvaluep;
6503 + YYLTYPE const * const yylocationp;
6508 + YYUSE (yylocationp);
6510 + if (yytype < YYNTOKENS)
6511 + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
6523 +/*--------------------------------.
6524 +| Print this symbol on YYOUTPUT. |
6525 +`--------------------------------*/
6527 +#if (defined __STDC__ || defined __C99__FUNC__ \
6528 + || defined __cplusplus || defined _MSC_VER)
6530 +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
6533 +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
6536 + YYSTYPE const * const yyvaluep;
6537 + YYLTYPE const * const yylocationp;
6540 + if (yytype < YYNTOKENS)
6541 + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
6543 + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
6545 + YY_LOCATION_PRINT (yyoutput, *yylocationp);
6546 + YYFPRINTF (yyoutput, ": ");
6547 + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
6548 + YYFPRINTF (yyoutput, ")");
6551 +/*------------------------------------------------------------------.
6552 +| yy_stack_print -- Print the state stack from its BOTTOM up to its |
6553 +| TOP (included). |
6554 +`------------------------------------------------------------------*/
6556 +#if (defined __STDC__ || defined __C99__FUNC__ \
6557 + || defined __cplusplus || defined _MSC_VER)
6559 +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
6562 +yy_stack_print (bottom, top)
6563 + yytype_int16 *bottom;
6564 + yytype_int16 *top;
6567 + YYFPRINTF (stderr, "Stack now");
6568 + for (; bottom <= top; ++bottom)
6569 + YYFPRINTF (stderr, " %d", *bottom);
6570 + YYFPRINTF (stderr, "\n");
6573 +# define YY_STACK_PRINT(Bottom, Top) \
6576 + yy_stack_print ((Bottom), (Top)); \
6580 +/*------------------------------------------------.
6581 +| Report that the YYRULE is going to be reduced. |
6582 +`------------------------------------------------*/
6584 +#if (defined __STDC__ || defined __C99__FUNC__ \
6585 + || defined __cplusplus || defined _MSC_VER)
6587 +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
6590 +yy_reduce_print (yyvsp, yylsp, yyrule)
6596 + int yynrhs = yyr2[yyrule];
6598 + unsigned long int yylno = yyrline[yyrule];
6599 + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
6600 + yyrule - 1, yylno);
6601 + /* The symbols being reduced. */
6602 + for (yyi = 0; yyi < yynrhs; yyi++)
6604 + fprintf (stderr, " $%d = ", yyi + 1);
6605 + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
6606 + &(yyvsp[(yyi + 1) - (yynrhs)])
6607 + , &(yylsp[(yyi + 1) - (yynrhs)]) );
6608 + fprintf (stderr, "\n");
6612 +# define YY_REDUCE_PRINT(Rule) \
6615 + yy_reduce_print (yyvsp, yylsp, Rule); \
6618 +/* Nonzero means print parse trace. It is left uninitialized so that
6619 + multiple parsers can coexist. */
6621 +#else /* !YYDEBUG */
6622 +# define YYDPRINTF(Args)
6623 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
6624 +# define YY_STACK_PRINT(Bottom, Top)
6625 +# define YY_REDUCE_PRINT(Rule)
6626 +#endif /* !YYDEBUG */
6629 +/* YYINITDEPTH -- initial size of the parser's stacks. */
6630 +#ifndef YYINITDEPTH
6631 +# define YYINITDEPTH 200
6634 +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
6635 + if the built-in stack extension method is used).
6637 + Do not make this value too large; the results are undefined if
6638 + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
6639 + evaluated with infinite-precision integer arithmetic. */
6642 +# define YYMAXDEPTH 10000
6647 +#if YYERROR_VERBOSE
6650 +# if defined __GLIBC__ && defined _STRING_H
6651 +# define yystrlen strlen
6653 +/* Return the length of YYSTR. */
6654 +#if (defined __STDC__ || defined __C99__FUNC__ \
6655 + || defined __cplusplus || defined _MSC_VER)
6657 +yystrlen (const char *yystr)
6661 + const char *yystr;
6665 + for (yylen = 0; yystr[yylen]; yylen++)
6673 +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
6674 +# define yystpcpy stpcpy
6676 +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
6678 +#if (defined __STDC__ || defined __C99__FUNC__ \
6679 + || defined __cplusplus || defined _MSC_VER)
6681 +yystpcpy (char *yydest, const char *yysrc)
6684 +yystpcpy (yydest, yysrc)
6686 + const char *yysrc;
6689 + char *yyd = yydest;
6690 + const char *yys = yysrc;
6692 + while ((*yyd++ = *yys++) != '\0')
6701 +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
6702 + quotes and backslashes, so that it's suitable for yyerror. The
6703 + heuristic is that double-quoting is unnecessary unless the string
6704 + contains an apostrophe, a comma, or backslash (other than
6705 + backslash-backslash). YYSTR is taken from yytname. If YYRES is
6706 + null, do not copy; instead, return the length of what the result
6707 + would have been. */
6709 +yytnamerr (char *yyres, const char *yystr)
6711 + if (*yystr == '"')
6714 + char const *yyp = yystr;
6721 + goto do_not_strip_quotes;
6724 + if (*++yyp != '\\')
6725 + goto do_not_strip_quotes;
6726 + /* Fall through. */
6729 + yyres[yyn] = *yyp;
6735 + yyres[yyn] = '\0';
6738 + do_not_strip_quotes: ;
6742 + return yystrlen (yystr);
6744 + return yystpcpy (yyres, yystr) - yyres;
6748 +/* Copy into YYRESULT an error message about the unexpected token
6749 + YYCHAR while in state YYSTATE. Return the number of bytes copied,
6750 + including the terminating null byte. If YYRESULT is null, do not
6751 + copy anything; just return the number of bytes that would be
6752 + copied. As a special case, return 0 if an ordinary "syntax error"
6753 + message will do. Return YYSIZE_MAXIMUM if overflow occurs during
6754 + size calculation. */
6756 +yysyntax_error (char *yyresult, int yystate, int yychar)
6758 + int yyn = yypact[yystate];
6760 + if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
6764 + int yytype = YYTRANSLATE (yychar);
6765 + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
6766 + YYSIZE_T yysize = yysize0;
6768 + int yysize_overflow = 0;
6769 + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
6770 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
6774 + /* This is so xgettext sees the translatable formats that are
6775 + constructed on the fly. */
6776 + YY_("syntax error, unexpected %s");
6777 + YY_("syntax error, unexpected %s, expecting %s");
6778 + YY_("syntax error, unexpected %s, expecting %s or %s");
6779 + YY_("syntax error, unexpected %s, expecting %s or %s or %s");
6780 + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
6784 + static char const yyunexpected[] = "syntax error, unexpected %s";
6785 + static char const yyexpecting[] = ", expecting %s";
6786 + static char const yyor[] = " or %s";
6787 + char yyformat[sizeof yyunexpected
6788 + + sizeof yyexpecting - 1
6789 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
6790 + * (sizeof yyor - 1))];
6791 + char const *yyprefix = yyexpecting;
6793 + /* Start YYX at -YYN if negative to avoid negative indexes in
6795 + int yyxbegin = yyn < 0 ? -yyn : 0;
6797 + /* Stay within bounds of both yycheck and yytname. */
6798 + int yychecklim = YYLAST - yyn + 1;
6799 + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
6802 + yyarg[0] = yytname[yytype];
6803 + yyfmt = yystpcpy (yyformat, yyunexpected);
6805 + for (yyx = yyxbegin; yyx < yyxend; ++yyx)
6806 + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
6808 + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
6812 + yyformat[sizeof yyunexpected - 1] = '\0';
6815 + yyarg[yycount++] = yytname[yyx];
6816 + yysize1 = yysize + yytnamerr (0, yytname[yyx]);
6817 + yysize_overflow |= (yysize1 < yysize);
6819 + yyfmt = yystpcpy (yyfmt, yyprefix);
6823 + yyf = YY_(yyformat);
6824 + yysize1 = yysize + yystrlen (yyf);
6825 + yysize_overflow |= (yysize1 < yysize);
6828 + if (yysize_overflow)
6829 + return YYSIZE_MAXIMUM;
6833 + /* Avoid sprintf, as that infringes on the user's name space.
6834 + Don't have undefined behavior even if the translation
6835 + produced a string with the wrong number of "%s"s. */
6836 + char *yyp = yyresult;
6838 + while ((*yyp = *yyf) != '\0')
6840 + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
6842 + yyp += yytnamerr (yyp, yyarg[yyi++]);
6855 +#endif /* YYERROR_VERBOSE */
6858 +/*-----------------------------------------------.
6859 +| Release the memory associated to this symbol. |
6860 +`-----------------------------------------------*/
6863 +#if (defined __STDC__ || defined __C99__FUNC__ \
6864 + || defined __cplusplus || defined _MSC_VER)
6866 +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
6869 +yydestruct (yymsg, yytype, yyvaluep, yylocationp)
6870 + const char *yymsg;
6872 + YYSTYPE *yyvaluep;
6873 + YYLTYPE *yylocationp;
6877 + YYUSE (yylocationp);
6880 + yymsg = "Deleting";
6881 + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
6892 +/* Prevent warnings from -Wmissing-prototypes. */
6894 +#ifdef YYPARSE_PARAM
6895 +#if defined __STDC__ || defined __cplusplus
6896 +int yyparse (void *YYPARSE_PARAM);
6900 +#else /* ! YYPARSE_PARAM */
6901 +#if defined __STDC__ || defined __cplusplus
6902 +int yyparse (void);
6906 +#endif /* ! YYPARSE_PARAM */
6910 +/* The look-ahead symbol. */
6913 +/* The semantic value of the look-ahead symbol. */
6916 +/* Number of syntax errors so far. */
6918 +/* Location data for the look-ahead symbol. */
6927 +#ifdef YYPARSE_PARAM
6928 +#if (defined __STDC__ || defined __C99__FUNC__ \
6929 + || defined __cplusplus || defined _MSC_VER)
6931 +yyparse (void *YYPARSE_PARAM)
6934 +yyparse (YYPARSE_PARAM)
6935 + void *YYPARSE_PARAM;
6937 +#else /* ! YYPARSE_PARAM */
6938 +#if (defined __STDC__ || defined __C99__FUNC__ \
6939 + || defined __cplusplus || defined _MSC_VER)
6953 + /* Number of tokens to shift before error messages enabled. */
6955 + /* Look-ahead token as an internal (translated) token number. */
6957 +#if YYERROR_VERBOSE
6958 + /* Buffer for error messages, and its allocated size. */
6959 + char yymsgbuf[128];
6960 + char *yymsg = yymsgbuf;
6961 + YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
6964 + /* Three stacks and their tools:
6965 + `yyss': related to states,
6966 + `yyvs': related to semantic values,
6967 + `yyls': related to locations.
6969 + Refer to the stacks thru separate pointers, to allow yyoverflow
6970 + to reallocate them elsewhere. */
6972 + /* The state stack. */
6973 + yytype_int16 yyssa[YYINITDEPTH];
6974 + yytype_int16 *yyss = yyssa;
6975 + yytype_int16 *yyssp;
6977 + /* The semantic value stack. */
6978 + YYSTYPE yyvsa[YYINITDEPTH];
6979 + YYSTYPE *yyvs = yyvsa;
6982 + /* The location stack. */
6983 + YYLTYPE yylsa[YYINITDEPTH];
6984 + YYLTYPE *yyls = yylsa;
6986 + /* The locations where the error started and ended. */
6987 + YYLTYPE yyerror_range[2];
6989 +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
6991 + YYSIZE_T yystacksize = YYINITDEPTH;
6993 + /* The variables used to return semantic value and location from the
6994 + action routines. */
6998 + /* The number of symbols on the RHS of the reduced rule.
6999 + Keep to zero when no symbol should be popped. */
7002 + YYDPRINTF ((stderr, "Starting parse\n"));
7007 + yychar = YYEMPTY; /* Cause a token to be read. */
7009 + /* Initialize stack pointers.
7010 + Waste one element of value and location stack
7011 + so that they stay on the same level as the state stack.
7012 + The wasted elements are never initialized. */
7017 +#if YYLTYPE_IS_TRIVIAL
7018 + /* Initialize the default location before parsing starts. */
7019 + yylloc.first_line = yylloc.last_line = 1;
7020 + yylloc.first_column = yylloc.last_column = 0;
7025 +/*------------------------------------------------------------.
7026 +| yynewstate -- Push a new state, which is found in yystate. |
7027 +`------------------------------------------------------------*/
7029 + /* In all cases, when you get here, the value and location stacks
7030 + have just been pushed. So pushing a state here evens the stacks. */
7036 + if (yyss + yystacksize - 1 <= yyssp)
7038 + /* Get the current used size of the three stacks, in elements. */
7039 + YYSIZE_T yysize = yyssp - yyss + 1;
7043 + /* Give user a chance to reallocate the stack. Use copies of
7044 + these so that the &'s don't force the real ones into
7046 + YYSTYPE *yyvs1 = yyvs;
7047 + yytype_int16 *yyss1 = yyss;
7048 + YYLTYPE *yyls1 = yyls;
7050 + /* Each stack pointer address is followed by the size of the
7051 + data in use in that stack, in bytes. This used to be a
7052 + conditional around just the two extra args, but that might
7053 + be undefined if yyoverflow is a macro. */
7054 + yyoverflow (YY_("memory exhausted"),
7055 + &yyss1, yysize * sizeof (*yyssp),
7056 + &yyvs1, yysize * sizeof (*yyvsp),
7057 + &yyls1, yysize * sizeof (*yylsp),
7063 +#else /* no yyoverflow */
7064 +# ifndef YYSTACK_RELOCATE
7065 + goto yyexhaustedlab;
7067 + /* Extend the stack our own way. */
7068 + if (YYMAXDEPTH <= yystacksize)
7069 + goto yyexhaustedlab;
7071 + if (YYMAXDEPTH < yystacksize)
7072 + yystacksize = YYMAXDEPTH;
7075 + yytype_int16 *yyss1 = yyss;
7076 + union yyalloc *yyptr =
7077 + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
7079 + goto yyexhaustedlab;
7080 + YYSTACK_RELOCATE (yyss);
7081 + YYSTACK_RELOCATE (yyvs);
7082 + YYSTACK_RELOCATE (yyls);
7083 +# undef YYSTACK_RELOCATE
7084 + if (yyss1 != yyssa)
7085 + YYSTACK_FREE (yyss1);
7088 +#endif /* no yyoverflow */
7090 + yyssp = yyss + yysize - 1;
7091 + yyvsp = yyvs + yysize - 1;
7092 + yylsp = yyls + yysize - 1;
7094 + YYDPRINTF ((stderr, "Stack size increased to %lu\n",
7095 + (unsigned long int) yystacksize));
7097 + if (yyss + yystacksize - 1 <= yyssp)
7101 + YYDPRINTF ((stderr, "Entering state %d\n", yystate));
7110 + /* Do appropriate processing given the current state. Read a
7111 + look-ahead token if we need one and don't already have one. */
7113 + /* First try to decide what to do without reference to look-ahead token. */
7114 + yyn = yypact[yystate];
7115 + if (yyn == YYPACT_NINF)
7118 + /* Not known => get a look-ahead token if don't already have one. */
7120 + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
7121 + if (yychar == YYEMPTY)
7123 + YYDPRINTF ((stderr, "Reading a token: "));
7127 + if (yychar <= YYEOF)
7129 + yychar = yytoken = YYEOF;
7130 + YYDPRINTF ((stderr, "Now at end of input.\n"));
7134 + yytoken = YYTRANSLATE (yychar);
7135 + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
7138 + /* If the proper action on seeing token YYTOKEN is to reduce or to
7139 + detect an error, take that action. */
7141 + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
7143 + yyn = yytable[yyn];
7146 + if (yyn == 0 || yyn == YYTABLE_NINF)
7152 + if (yyn == YYFINAL)
7155 + /* Count tokens shifted since error; after three, turn off error
7160 + /* Shift the look-ahead token. */
7161 + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
7163 + /* Discard the shifted token unless it is eof. */
7164 + if (yychar != YYEOF)
7168 + *++yyvsp = yylval;
7169 + *++yylsp = yylloc;
7173 +/*-----------------------------------------------------------.
7174 +| yydefault -- do the default action for the current state. |
7175 +`-----------------------------------------------------------*/
7177 + yyn = yydefact[yystate];
7183 +/*-----------------------------.
7184 +| yyreduce -- Do a reduction. |
7185 +`-----------------------------*/
7187 + /* yyn is the number of a rule to reduce with. */
7188 + yylen = yyr2[yyn];
7190 + /* If YYLEN is nonzero, implement the default value of the action:
7193 + Otherwise, the following line sets YYVAL to garbage.
7194 + This behavior is undocumented and Bison
7195 + users should not rely upon it. Assigning to YYVAL
7196 + unconditionally makes the parser a bit smaller, and it avoids a
7197 + GCC warning that YYVAL may be used uninitialized. */
7198 + yyval = yyvsp[1-yylen];
7200 + /* Default location. */
7201 + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
7202 + YY_REDUCE_PRINT (yyn);
7206 +#line 86 "dtc-parser.y"
7208 + the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node));
7213 +#line 90 "dtc-parser.y"
7215 + the_boot_info = build_boot_info((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].node));
7220 +#line 97 "dtc-parser.y"
7222 + (yyval.re) = NULL;
7227 +#line 101 "dtc-parser.y"
7229 + (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
7234 +#line 108 "dtc-parser.y"
7236 + (yyval.re) = build_reserve_entry((yyvsp[(3) - (5)].addr), (yyvsp[(4) - (5)].addr), (yyvsp[(1) - (5)].labelref));
7241 +#line 115 "dtc-parser.y"
7243 + (yyval.re) = NULL;
7248 +#line 119 "dtc-parser.y"
7250 + (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
7255 +#line 126 "dtc-parser.y"
7257 + (yyval.re) = (yyvsp[(1) - (1)].re);
7262 +#line 130 "dtc-parser.y"
7264 + (yyval.re) = build_reserve_entry((yyvsp[(3) - (6)].addr), (yyvsp[(5) - (6)].addr) - (yyvsp[(3) - (6)].addr) + 1, (yyvsp[(1) - (6)].labelref));
7269 +#line 137 "dtc-parser.y"
7271 + (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
7276 +#line 141 "dtc-parser.y"
7278 + (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 16, 64);
7283 +#line 148 "dtc-parser.y"
7285 + (yyval.node) = name_node((yyvsp[(2) - (2)].node), "", NULL);
7290 +#line 155 "dtc-parser.y"
7292 + (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
7297 +#line 162 "dtc-parser.y"
7299 + (yyval.proplist) = NULL;
7304 +#line 166 "dtc-parser.y"
7306 + (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
7311 +#line 173 "dtc-parser.y"
7313 + (yyval.prop) = build_property((yyvsp[(2) - (5)].propnodename), (yyvsp[(4) - (5)].data), (yyvsp[(1) - (5)].labelref));
7318 +#line 177 "dtc-parser.y"
7320 + (yyval.prop) = build_property((yyvsp[(2) - (3)].propnodename), empty_data, (yyvsp[(1) - (3)].labelref));
7325 +#line 184 "dtc-parser.y"
7327 + (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
7332 +#line 188 "dtc-parser.y"
7334 + (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
7339 +#line 192 "dtc-parser.y"
7341 + (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
7346 +#line 196 "dtc-parser.y"
7348 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
7353 +#line 200 "dtc-parser.y"
7355 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7360 +#line 207 "dtc-parser.y"
7362 + (yyval.data) = empty_data;
7367 +#line 211 "dtc-parser.y"
7369 + (yyval.data) = (yyvsp[(1) - (2)].data);
7374 +#line 215 "dtc-parser.y"
7376 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7381 +#line 222 "dtc-parser.y"
7383 + (yyval.data) = empty_data;
7388 +#line 226 "dtc-parser.y"
7390 + (yyval.data) = data_append_cell((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].cell));
7395 +#line 230 "dtc-parser.y"
7397 + (yyval.data) = data_append_cell(data_add_marker((yyvsp[(1) - (2)].data), REF_PHANDLE,
7398 + (yyvsp[(2) - (2)].labelref)), -1);
7403 +#line 235 "dtc-parser.y"
7405 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7410 +#line 242 "dtc-parser.y"
7412 + (yyval.cbase) = 16;
7417 +#line 250 "dtc-parser.y"
7419 + (yyval.cell) = eval_literal((yyvsp[(1) - (1)].literal), 0, 32);
7424 +#line 254 "dtc-parser.y"
7426 + (yyval.cell) = eval_literal((yyvsp[(2) - (2)].literal), (yyvsp[(1) - (2)].cbase), 32);
7431 +#line 261 "dtc-parser.y"
7433 + (yyval.data) = empty_data;
7438 +#line 265 "dtc-parser.y"
7440 + (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
7445 +#line 269 "dtc-parser.y"
7447 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7452 +#line 276 "dtc-parser.y"
7454 + (yyval.nodelist) = NULL;
7459 +#line 280 "dtc-parser.y"
7461 + (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
7466 +#line 284 "dtc-parser.y"
7468 + yyerror("syntax error: properties must precede subnodes\n");
7474 +#line 292 "dtc-parser.y"
7476 + (yyval.node) = name_node((yyvsp[(3) - (3)].node), (yyvsp[(2) - (3)].propnodename), (yyvsp[(1) - (3)].labelref));
7481 +#line 299 "dtc-parser.y"
7483 + (yyval.labelref) = NULL;
7488 +#line 303 "dtc-parser.y"
7490 + (yyval.labelref) = (yyvsp[(1) - (1)].labelref);
7495 +/* Line 1267 of yacc.c. */
7496 +#line 1734 "dtc-parser.tab.c"
7499 + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7501 + YYPOPSTACK (yylen);
7503 + YY_STACK_PRINT (yyss, yyssp);
7508 + /* Now `shift' the result of the reduction. Determine what state
7509 + that goes to, based on the state we popped back to and the rule
7510 + number reduced by. */
7514 + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7515 + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7516 + yystate = yytable[yystate];
7518 + yystate = yydefgoto[yyn - YYNTOKENS];
7523 +/*------------------------------------.
7524 +| yyerrlab -- here on detecting error |
7525 +`------------------------------------*/
7527 + /* If not already recovering from an error, report this error. */
7531 +#if ! YYERROR_VERBOSE
7532 + yyerror (YY_("syntax error"));
7535 + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7536 + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7538 + YYSIZE_T yyalloc = 2 * yysize;
7539 + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
7540 + yyalloc = YYSTACK_ALLOC_MAXIMUM;
7541 + if (yymsg != yymsgbuf)
7542 + YYSTACK_FREE (yymsg);
7543 + yymsg = (char *) YYSTACK_ALLOC (yyalloc);
7545 + yymsg_alloc = yyalloc;
7549 + yymsg_alloc = sizeof yymsgbuf;
7553 + if (0 < yysize && yysize <= yymsg_alloc)
7555 + (void) yysyntax_error (yymsg, yystate, yychar);
7560 + yyerror (YY_("syntax error"));
7562 + goto yyexhaustedlab;
7568 + yyerror_range[0] = yylloc;
7570 + if (yyerrstatus == 3)
7572 + /* If just tried and failed to reuse look-ahead token after an
7573 + error, discard it. */
7575 + if (yychar <= YYEOF)
7577 + /* Return failure if at end of input. */
7578 + if (yychar == YYEOF)
7583 + yydestruct ("Error: discarding",
7584 + yytoken, &yylval, &yylloc);
7589 + /* Else will try to reuse look-ahead token after shifting the error
7594 +/*---------------------------------------------------.
7595 +| yyerrorlab -- error raised explicitly by YYERROR. |
7596 +`---------------------------------------------------*/
7599 + /* Pacify compilers like GCC when the user code never invokes
7600 + YYERROR and the label yyerrorlab therefore never appears in user
7602 + if (/*CONSTCOND*/ 0)
7605 + yyerror_range[0] = yylsp[1-yylen];
7606 + /* Do not reclaim the symbols of the rule which action triggered
7608 + YYPOPSTACK (yylen);
7610 + YY_STACK_PRINT (yyss, yyssp);
7615 +/*-------------------------------------------------------------.
7616 +| yyerrlab1 -- common code for both syntax error and YYERROR. |
7617 +`-------------------------------------------------------------*/
7619 + yyerrstatus = 3; /* Each real token shifted decrements this. */
7623 + yyn = yypact[yystate];
7624 + if (yyn != YYPACT_NINF)
7627 + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7629 + yyn = yytable[yyn];
7635 + /* Pop the current state because it cannot handle the error token. */
7636 + if (yyssp == yyss)
7639 + yyerror_range[0] = *yylsp;
7640 + yydestruct ("Error: popping",
7641 + yystos[yystate], yyvsp, yylsp);
7644 + YY_STACK_PRINT (yyss, yyssp);
7647 + if (yyn == YYFINAL)
7650 + *++yyvsp = yylval;
7652 + yyerror_range[1] = yylloc;
7653 + /* Using YYLLOC is tempting, but would change the location of
7654 + the look-ahead. YYLOC is available though. */
7655 + YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
7658 + /* Shift the error token. */
7659 + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7665 +/*-------------------------------------.
7666 +| yyacceptlab -- YYACCEPT comes here. |
7667 +`-------------------------------------*/
7672 +/*-----------------------------------.
7673 +| yyabortlab -- YYABORT comes here. |
7674 +`-----------------------------------*/
7680 +/*-------------------------------------------------.
7681 +| yyexhaustedlab -- memory exhaustion comes here. |
7682 +`-------------------------------------------------*/
7684 + yyerror (YY_("memory exhausted"));
7686 + /* Fall through. */
7690 + if (yychar != YYEOF && yychar != YYEMPTY)
7691 + yydestruct ("Cleanup: discarding lookahead",
7692 + yytoken, &yylval, &yylloc);
7693 + /* Do not reclaim the symbols of the rule which action triggered
7694 + this YYABORT or YYACCEPT. */
7695 + YYPOPSTACK (yylen);
7696 + YY_STACK_PRINT (yyss, yyssp);
7697 + while (yyssp != yyss)
7699 + yydestruct ("Cleanup: popping",
7700 + yystos[*yyssp], yyvsp, yylsp);
7704 + if (yyss != yyssa)
7705 + YYSTACK_FREE (yyss);
7707 +#if YYERROR_VERBOSE
7708 + if (yymsg != yymsgbuf)
7709 + YYSTACK_FREE (yymsg);
7711 + /* Make sure YYID is used. */
7712 + return YYID (yyresult);
7716 +#line 308 "dtc-parser.y"
7719 +void yyerror (char const *s)
7721 + const char *fname = srcpos_filename_for_num(yylloc.filenum);
7723 + if (strcmp(fname, "-") == 0)
7726 + fprintf(stderr, "%s:%d %s\n",
7727 + fname, yylloc.first_line, s);
7730 +unsigned long long eval_literal(const char *s, int base, int bits)
7732 + unsigned long long val;
7736 + val = strtoull(s, &e, base);
7738 + yyerror("bad characters in literal");
7739 + else if ((errno == ERANGE)
7740 + || ((bits < 64) && (val >= (1ULL << bits))))
7741 + yyerror("literal out of range");
7742 + else if (errno != 0)
7743 + yyerror("bad literal");
7747 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped powerpc.git/arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped
7748 --- linux-2.6.24/arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped 1970-01-01 01:00:00.000000000 +0100
7749 +++ powerpc.git/arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped 2008-01-28 20:25:49.000000000 +0100
7751 +/* A Bison parser, made by GNU Bison 2.3. */
7753 +/* Skeleton interface for Bison's Yacc-like parsers in C
7755 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7756 + Free Software Foundation, Inc.
7758 + This program is free software; you can redistribute it and/or modify
7759 + it under the terms of the GNU General Public License as published by
7760 + the Free Software Foundation; either version 2, or (at your option)
7761 + any later version.
7763 + This program is distributed in the hope that it will be useful,
7764 + but WITHOUT ANY WARRANTY; without even the implied warranty of
7765 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7766 + GNU General Public License for more details.
7768 + You should have received a copy of the GNU General Public License
7769 + along with this program; if not, write to the Free Software
7770 + Foundation, Inc., 51 Franklin Street, Fifth Floor,
7771 + Boston, MA 02110-1301, USA. */
7773 +/* As a special exception, you may create a larger work that contains
7774 + part or all of the Bison parser skeleton and distribute that work
7775 + under terms of your choice, so long as that work isn't itself a
7776 + parser generator using the skeleton or a modified version thereof
7777 + as a parser skeleton. Alternatively, if you modify or redistribute
7778 + the parser skeleton itself, you may (at your option) remove this
7779 + special exception, which will cause the skeleton and the resulting
7780 + Bison output files to be licensed under the GNU General Public
7781 + License without this special exception.
7783 + This special exception was added by the Free Software Foundation in
7784 + version 2.2 of Bison. */
7787 +#ifndef YYTOKENTYPE
7788 +# define YYTOKENTYPE
7789 + /* Put the tokens into the symbol table, so that GDB and other debuggers
7790 + know about them. */
7791 + enum yytokentype {
7793 + DT_MEMRESERVE = 259,
7794 + DT_PROPNODENAME = 260,
7796 + DT_LEGACYLITERAL = 262,
7806 +#define DT_MEMRESERVE 259
7807 +#define DT_PROPNODENAME 260
7808 +#define DT_LITERAL 261
7809 +#define DT_LEGACYLITERAL 262
7810 +#define DT_BASE 263
7811 +#define DT_BYTE 264
7812 +#define DT_STRING 265
7813 +#define DT_LABEL 266
7819 +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
7820 +typedef union YYSTYPE
7821 +#line 34 "dtc-parser.y"
7823 + char *propnodename;
7826 + unsigned int cbase;
7832 + struct property *prop;
7833 + struct property *proplist;
7834 + struct node *node;
7835 + struct node *nodelist;
7836 + struct reserve_info *re;
7838 +/* Line 1489 of yacc.c. */
7839 +#line 90 "dtc-parser.tab.h"
7841 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
7842 +# define YYSTYPE_IS_DECLARED 1
7843 +# define YYSTYPE_IS_TRIVIAL 1
7846 +extern YYSTYPE yylval;
7848 +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
7849 +typedef struct YYLTYPE
7856 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
7857 +# define YYLTYPE_IS_DECLARED 1
7858 +# define YYLTYPE_IS_TRIVIAL 1
7861 +extern YYLTYPE yylloc;
7862 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/dtc-parser.y powerpc.git/arch/powerpc/boot/dtc-src/dtc-parser.y
7863 --- linux-2.6.24/arch/powerpc/boot/dtc-src/dtc-parser.y 1970-01-01 01:00:00.000000000 +0100
7864 +++ powerpc.git/arch/powerpc/boot/dtc-src/dtc-parser.y 2008-01-28 20:25:49.000000000 +0100
7867 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
7870 + * This program is free software; you can redistribute it and/or
7871 + * modify it under the terms of the GNU General Public License as
7872 + * published by the Free Software Foundation; either version 2 of the
7873 + * License, or (at your option) any later version.
7875 + * This program is distributed in the hope that it will be useful,
7876 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7877 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7878 + * General Public License for more details.
7880 + * You should have received a copy of the GNU General Public License
7881 + * along with this program; if not, write to the Free Software
7882 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
7890 +#include "srcpos.h"
7893 +unsigned long long eval_literal(const char *s, int base, int bits);
7895 +extern struct boot_info *the_boot_info;
7900 + char *propnodename;
7903 + unsigned int cbase;
7909 + struct property *prop;
7910 + struct property *proplist;
7911 + struct node *node;
7912 + struct node *nodelist;
7913 + struct reserve_info *re;
7917 +%token DT_MEMRESERVE
7918 +%token <propnodename> DT_PROPNODENAME
7919 +%token <literal> DT_LITERAL
7920 +%token <literal> DT_LEGACYLITERAL
7921 +%token <cbase> DT_BASE
7922 +%token <byte> DT_BYTE
7923 +%token <data> DT_STRING
7924 +%token <labelref> DT_LABEL
7925 +%token <labelref> DT_REF
7927 +%type <data> propdata
7928 +%type <data> propdataprefix
7929 +%type <re> memreserve
7930 +%type <re> memreserves
7931 +%type <re> v0_memreserve
7932 +%type <re> v0_memreserves
7934 +%type <data> celllist
7935 +%type <cbase> cellbase
7936 +%type <cell> cellval
7937 +%type <data> bytestring
7938 +%type <prop> propdef
7939 +%type <proplist> proplist
7941 +%type <node> devicetree
7942 +%type <node> nodedef
7943 +%type <node> subnode
7944 +%type <nodelist> subnodes
7945 +%type <labelref> label
7950 + DT_V1 ';' memreserves devicetree
7952 + the_boot_info = build_boot_info($3, $4);
7954 + | v0_memreserves devicetree
7956 + the_boot_info = build_boot_info($1, $2);
7965 + | memreserve memreserves
7967 + $$ = chain_reserve_entry($1, $2);
7972 + label DT_MEMRESERVE addr addr ';'
7974 + $$ = build_reserve_entry($3, $4, $1);
7983 + | v0_memreserve v0_memreserves
7985 + $$ = chain_reserve_entry($1, $2);
7994 + | label DT_MEMRESERVE addr '-' addr ';'
7996 + $$ = build_reserve_entry($3, $5 - $3 + 1, $1);
8003 + $$ = eval_literal($1, 0, 64);
8005 + | DT_LEGACYLITERAL
8007 + $$ = eval_literal($1, 16, 64);
8014 + $$ = name_node($2, "", NULL);
8019 + '{' proplist subnodes '}' ';'
8021 + $$ = build_node($2, $3);
8030 + | proplist propdef
8032 + $$ = chain_property($2, $1);
8037 + label DT_PROPNODENAME '=' propdata ';'
8039 + $$ = build_property($2, $4, $1);
8041 + | label DT_PROPNODENAME ';'
8043 + $$ = build_property($2, empty_data, $1);
8048 + propdataprefix DT_STRING
8050 + $$ = data_merge($1, $2);
8052 + | propdataprefix '<' celllist '>'
8054 + $$ = data_merge($1, $3);
8056 + | propdataprefix '[' bytestring ']'
8058 + $$ = data_merge($1, $3);
8060 + | propdataprefix DT_REF
8062 + $$ = data_add_marker($1, REF_PATH, $2);
8064 + | propdata DT_LABEL
8066 + $$ = data_add_marker($1, LABEL, $2);
8079 + | propdataprefix DT_LABEL
8081 + $$ = data_add_marker($1, LABEL, $2);
8090 + | celllist cellval
8092 + $$ = data_append_cell($1, $2);
8096 + $$ = data_append_cell(data_add_marker($1, REF_PHANDLE,
8099 + | celllist DT_LABEL
8101 + $$ = data_add_marker($1, LABEL, $2);
8116 + $$ = eval_literal($1, 0, 32);
8118 + | cellbase DT_LEGACYLITERAL
8120 + $$ = eval_literal($2, $1, 32);
8129 + | bytestring DT_BYTE
8131 + $$ = data_append_byte($1, $2);
8133 + | bytestring DT_LABEL
8135 + $$ = data_add_marker($1, LABEL, $2);
8144 + | subnode subnodes
8146 + $$ = chain_node($1, $2);
8150 + yyerror("syntax error: properties must precede subnodes\n");
8156 + label DT_PROPNODENAME nodedef
8158 + $$ = name_node($3, $2, $1);
8175 +void yyerror (char const *s)
8177 + const char *fname = srcpos_filename_for_num(yylloc.filenum);
8179 + if (strcmp(fname, "-") == 0)
8182 + fprintf(stderr, "%s:%d %s\n",
8183 + fname, yylloc.first_line, s);
8186 +unsigned long long eval_literal(const char *s, int base, int bits)
8188 + unsigned long long val;
8192 + val = strtoull(s, &e, base);
8194 + yyerror("bad characters in literal");
8195 + else if ((errno == ERANGE)
8196 + || ((bits < 64) && (val >= (1ULL << bits))))
8197 + yyerror("literal out of range");
8198 + else if (errno != 0)
8199 + yyerror("bad literal");
8202 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/dtc.c powerpc.git/arch/powerpc/boot/dtc-src/dtc.c
8203 --- linux-2.6.24/arch/powerpc/boot/dtc-src/dtc.c 1970-01-01 01:00:00.000000000 +0100
8204 +++ powerpc.git/arch/powerpc/boot/dtc-src/dtc.c 2008-01-28 20:25:49.000000000 +0100
8207 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
8210 + * This program is free software; you can redistribute it and/or
8211 + * modify it under the terms of the GNU General Public License as
8212 + * published by the Free Software Foundation; either version 2 of the
8213 + * License, or (at your option) any later version.
8215 + * This program is distributed in the hope that it will be useful,
8216 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8217 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8218 + * General Public License for more details.
8220 + * You should have received a copy of the GNU General Public License
8221 + * along with this program; if not, write to the Free Software
8222 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
8227 +#include "srcpos.h"
8229 +#include "version_gen.h"
8232 + * Command line options
8234 +int quiet; /* Level of quietness */
8235 +int reservenum; /* Number of memory reservation slots */
8236 +int minsize; /* Minimum blob size */
8237 +int padsize; /* Additional padding to blob */
8239 +char *join_path(const char *path, const char *name)
8241 + int lenp = strlen(path);
8242 + int lenn = strlen(name);
8244 + int needslash = 1;
8247 + len = lenp + lenn + 2;
8248 + if ((lenp > 0) && (path[lenp-1] == '/')) {
8253 + str = xmalloc(len);
8254 + memcpy(str, path, lenp);
8259 + memcpy(str+lenp, name, lenn+1);
8263 +void fill_fullpaths(struct node *tree, const char *prefix)
8265 + struct node *child;
8268 + tree->fullpath = join_path(prefix, tree->name);
8270 + unit = strchr(tree->name, '@');
8272 + tree->basenamelen = unit - tree->name;
8274 + tree->basenamelen = strlen(tree->name);
8276 + for_each_child(tree, child)
8277 + fill_fullpaths(child, tree->fullpath);
8280 +static void __attribute__ ((noreturn)) usage(void)
8282 + fprintf(stderr, "Usage:\n");
8283 + fprintf(stderr, "\tdtc [options] <input file>\n");
8284 + fprintf(stderr, "\nOptions:\n");
8285 + fprintf(stderr, "\t-h\n");
8286 + fprintf(stderr, "\t\tThis help text\n");
8287 + fprintf(stderr, "\t-q\n");
8288 + fprintf(stderr, "\t\tQuiet: -q suppress warnings, -qq errors, -qqq all\n");
8289 + fprintf(stderr, "\t-I <input format>\n");
8290 + fprintf(stderr, "\t\tInput formats are:\n");
8291 + fprintf(stderr, "\t\t\tdts - device tree source text\n");
8292 + fprintf(stderr, "\t\t\tdtb - device tree blob\n");
8293 + fprintf(stderr, "\t\t\tfs - /proc/device-tree style directory\n");
8294 + fprintf(stderr, "\t-o <output file>\n");
8295 + fprintf(stderr, "\t-O <output format>\n");
8296 + fprintf(stderr, "\t\tOutput formats are:\n");
8297 + fprintf(stderr, "\t\t\tdts - device tree source text\n");
8298 + fprintf(stderr, "\t\t\tdtb - device tree blob\n");
8299 + fprintf(stderr, "\t\t\tasm - assembler source\n");
8300 + fprintf(stderr, "\t-V <output version>\n");
8301 + fprintf(stderr, "\t\tBlob version to produce, defaults to %d (relevant for dtb\n\t\tand asm output only)\n", DEFAULT_FDT_VERSION);
8302 + fprintf(stderr, "\t-R <number>\n");
8303 + fprintf(stderr, "\t\tMake space for <number> reserve map entries (relevant for \n\t\tdtb and asm output only)\n");
8304 + fprintf(stderr, "\t-S <bytes>\n");
8305 + fprintf(stderr, "\t\tMake the blob at least <bytes> long (extra space)\n");
8306 + fprintf(stderr, "\t-p <bytes>\n");
8307 + fprintf(stderr, "\t\tAdd padding to the blob of <bytes> long (extra space)\n");
8308 + fprintf(stderr, "\t-b <number>\n");
8309 + fprintf(stderr, "\t\tSet the physical boot cpu\n");
8310 + fprintf(stderr, "\t-f\n");
8311 + fprintf(stderr, "\t\tForce - try to produce output even if the input tree has errors\n");
8312 + fprintf(stderr, "\t-v\n");
8313 + fprintf(stderr, "\t\tPrint DTC version and exit\n");
8317 +int main(int argc, char *argv[])
8319 + struct boot_info *bi;
8320 + const char *inform = "dts";
8321 + const char *outform = "dts";
8322 + const char *outname = "-";
8323 + int force = 0, check = 0;
8327 + FILE *outf = NULL;
8328 + int outversion = DEFAULT_FDT_VERSION;
8329 + int boot_cpuid_phys = 0xfeedbeef;
8336 + while ((opt = getopt(argc, argv, "hI:O:o:V:R:S:p:fcqb:v")) != EOF) {
8348 + outversion = strtol(optarg, NULL, 0);
8351 + reservenum = strtol(optarg, NULL, 0);
8354 + minsize = strtol(optarg, NULL, 0);
8357 + padsize = strtol(optarg, NULL, 0);
8369 + boot_cpuid_phys = strtol(optarg, NULL, 0);
8372 + printf("Version: %s\n", DTC_VERSION);
8380 + if (argc > (optind+1))
8382 + else if (argc < (optind+1))
8385 + arg = argv[optind];
8387 + /* minsize and padsize are mutually exclusive */
8388 + if ((minsize) && (padsize)) {
8389 + die("Can't set both -p and -S\n");
8392 + fprintf(stderr, "DTC: %s->%s on file \"%s\"\n",
8393 + inform, outform, arg);
8395 + if (streq(inform, "dts")) {
8396 + bi = dt_from_source(arg);
8397 + } else if (streq(inform, "fs")) {
8398 + bi = dt_from_fs(arg);
8399 + } else if(streq(inform, "dtb")) {
8400 + inf = dtc_open_file(arg);
8401 + bi = dt_from_blob(inf);
8403 + die("Unknown input format \"%s\"\n", inform);
8406 + if (inf && (inf != stdin))
8409 + if (! bi || ! bi->dt)
8410 + die("Couldn't read input tree\n");
8412 + process_checks(force, bi, check, outversion, boot_cpuid_phys);
8414 + if (streq(outname, "-")) {
8417 + outf = fopen(outname, "w");
8419 + die("Couldn't open output file %s: %s\n",
8420 + outname, strerror(errno));
8423 + if (streq(outform, "dts")) {
8424 + dt_to_source(outf, bi);
8425 + } else if (streq(outform, "dtb")) {
8426 + dt_to_blob(outf, bi, outversion, boot_cpuid_phys);
8427 + } else if (streq(outform, "asm")) {
8428 + dt_to_asm(outf, bi, outversion, boot_cpuid_phys);
8429 + } else if (streq(outform, "null")) {
8432 + die("Unknown output format \"%s\"\n", outform);
8437 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/dtc.h powerpc.git/arch/powerpc/boot/dtc-src/dtc.h
8438 --- linux-2.6.24/arch/powerpc/boot/dtc-src/dtc.h 1970-01-01 01:00:00.000000000 +0100
8439 +++ powerpc.git/arch/powerpc/boot/dtc-src/dtc.h 2008-01-28 20:25:49.000000000 +0100
8445 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
8448 + * This program is free software; you can redistribute it and/or
8449 + * modify it under the terms of the GNU General Public License as
8450 + * published by the Free Software Foundation; either version 2 of the
8451 + * License, or (at your option) any later version.
8453 + * This program is distributed in the hope that it will be useful,
8454 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8455 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8456 + * General Public License for more details.
8458 + * You should have received a copy of the GNU General Public License
8459 + * along with this program; if not, write to the Free Software
8460 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
8465 +#include <string.h>
8466 +#include <stdlib.h>
8467 +#include <stdint.h>
8468 +#include <stdarg.h>
8469 +#include <assert.h>
8472 +#include <unistd.h>
8473 +#include <netinet/in.h>
8474 +#include <endian.h>
8475 +#include <byteswap.h>
8479 +#define DEFAULT_FDT_VERSION 17
8481 + * Command line options
8483 +extern int quiet; /* Level of quietness */
8484 +extern int reservenum; /* Number of memory reservation slots */
8485 +extern int minsize; /* Minimum blob size */
8486 +extern int padsize; /* Additional padding to blob */
8488 +static inline void __attribute__((noreturn)) die(char * str, ...)
8492 + va_start(ap, str);
8493 + fprintf(stderr, "FATAL ERROR: ");
8494 + vfprintf(stderr, str, ap);
8498 +static inline void *xmalloc(size_t len)
8500 + void *new = malloc(len);
8503 + die("malloc() failed\n");
8508 +static inline void *xrealloc(void *p, size_t len)
8510 + void *new = realloc(p, len);
8513 + die("realloc() failed (len=%d)\n", len);
8518 +typedef uint8_t u8;
8519 +typedef uint16_t u16;
8520 +typedef uint32_t u32;
8521 +typedef uint64_t u64;
8522 +typedef u32 cell_t;
8524 +#define cpu_to_be16(x) htons(x)
8525 +#define be16_to_cpu(x) ntohs(x)
8527 +#define cpu_to_be32(x) htonl(x)
8528 +#define be32_to_cpu(x) ntohl(x)
8530 +#if __BYTE_ORDER == __BIG_ENDIAN
8531 +#define cpu_to_be64(x) (x)
8532 +#define be64_to_cpu(x) (x)
8534 +#define cpu_to_be64(x) bswap_64(x)
8535 +#define be64_to_cpu(x) bswap_64(x)
8538 +#define streq(a, b) (strcmp((a), (b)) == 0)
8539 +#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
8541 +#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
8542 +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
8552 + enum markertype type;
8555 + struct marker *next;
8562 + struct marker *markers;
8566 +#define empty_data ((struct data){ /* all .members = 0 or NULL */ })
8568 +#define for_each_marker(m) \
8569 + for (; (m); (m) = (m)->next)
8570 +#define for_each_marker_of_type(m, t) \
8571 + for_each_marker(m) \
8572 + if ((m)->type == (t))
8574 +void data_free(struct data d);
8576 +struct data data_grow_for(struct data d, int xlen);
8578 +struct data data_copy_mem(const char *mem, int len);
8579 +struct data data_copy_escape_string(const char *s, int len);
8580 +struct data data_copy_file(FILE *f, size_t len);
8582 +struct data data_append_data(struct data d, const void *p, int len);
8583 +struct data data_insert_at_marker(struct data d, struct marker *m,
8584 + const void *p, int len);
8585 +struct data data_merge(struct data d1, struct data d2);
8586 +struct data data_append_cell(struct data d, cell_t word);
8587 +struct data data_append_re(struct data d, const struct fdt_reserve_entry *re);
8588 +struct data data_append_addr(struct data d, u64 addr);
8589 +struct data data_append_byte(struct data d, uint8_t byte);
8590 +struct data data_append_zeroes(struct data d, int len);
8591 +struct data data_append_align(struct data d, int align);
8593 +struct data data_add_marker(struct data d, enum markertype type, char *ref);
8595 +int data_is_one_string(struct data d);
8597 +/* DT constraints */
8599 +#define MAX_PROPNAME_LEN 31
8600 +#define MAX_NODENAME_LEN 31
8607 + struct property *next;
8614 + struct property *proplist;
8615 + struct node *children;
8617 + struct node *parent;
8618 + struct node *next_sibling;
8624 + int addr_cells, size_cells;
8629 +#define for_each_property(n, p) \
8630 + for ((p) = (n)->proplist; (p); (p) = (p)->next)
8632 +#define for_each_child(n, c) \
8633 + for ((c) = (n)->children; (c); (c) = (c)->next_sibling)
8635 +struct property *build_property(char *name, struct data val, char *label);
8636 +struct property *chain_property(struct property *first, struct property *list);
8637 +struct property *reverse_properties(struct property *first);
8639 +struct node *build_node(struct property *proplist, struct node *children);
8640 +struct node *name_node(struct node *node, char *name, char *label);
8641 +struct node *chain_node(struct node *first, struct node *list);
8643 +void add_property(struct node *node, struct property *prop);
8644 +void add_child(struct node *parent, struct node *child);
8646 +const char *get_unitname(struct node *node);
8647 +struct property *get_property(struct node *node, const char *propname);
8648 +cell_t propval_cell(struct property *prop);
8649 +struct node *get_subnode(struct node *node, const char *nodename);
8650 +struct node *get_node_by_path(struct node *tree, const char *path);
8651 +struct node *get_node_by_label(struct node *tree, const char *label);
8652 +struct node *get_node_by_phandle(struct node *tree, cell_t phandle);
8653 +struct node *get_node_by_ref(struct node *tree, const char *ref);
8654 +cell_t get_node_phandle(struct node *root, struct node *node);
8656 +/* Boot info (tree plus memreserve information */
8658 +struct reserve_info {
8659 + struct fdt_reserve_entry re;
8661 + struct reserve_info *next;
8666 +struct reserve_info *build_reserve_entry(u64 start, u64 len, char *label);
8667 +struct reserve_info *chain_reserve_entry(struct reserve_info *first,
8668 + struct reserve_info *list);
8669 +struct reserve_info *add_reserve_entry(struct reserve_info *list,
8670 + struct reserve_info *new);
8674 + struct reserve_info *reservelist;
8675 + struct node *dt; /* the device tree */
8678 +struct boot_info *build_boot_info(struct reserve_info *reservelist,
8679 + struct node *tree);
8683 +void process_checks(int force, struct boot_info *bi,
8684 + int checkflag, int outversion, int boot_cpuid_phys);
8686 +/* Flattened trees */
8688 +void dt_to_blob(FILE *f, struct boot_info *bi, int version,
8689 + int boot_cpuid_phys);
8690 +void dt_to_asm(FILE *f, struct boot_info *bi, int version,
8691 + int boot_cpuid_phys);
8693 +struct boot_info *dt_from_blob(FILE *f);
8697 +void dt_to_source(FILE *f, struct boot_info *bi);
8698 +struct boot_info *dt_from_source(const char *f);
8702 +struct boot_info *dt_from_fs(const char *dirname);
8706 +char *join_path(const char *path, const char *name);
8707 +void fill_fullpaths(struct node *tree, const char *prefix);
8709 +#endif /* _DTC_H */
8710 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/flattree.c powerpc.git/arch/powerpc/boot/dtc-src/flattree.c
8711 --- linux-2.6.24/arch/powerpc/boot/dtc-src/flattree.c 1970-01-01 01:00:00.000000000 +0100
8712 +++ powerpc.git/arch/powerpc/boot/dtc-src/flattree.c 2008-01-28 20:25:49.000000000 +0100
8715 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
8718 + * This program is free software; you can redistribute it and/or
8719 + * modify it under the terms of the GNU General Public License as
8720 + * published by the Free Software Foundation; either version 2 of the
8721 + * License, or (at your option) any later version.
8723 + * This program is distributed in the hope that it will be useful,
8724 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8725 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8726 + * General Public License for more details.
8728 + * You should have received a copy of the GNU General Public License
8729 + * along with this program; if not, write to the Free Software
8730 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
8736 +#define FTF_FULLPATH 0x1
8737 +#define FTF_VARALIGN 0x2
8738 +#define FTF_NAMEPROPS 0x4
8739 +#define FTF_BOOTCPUID 0x8
8740 +#define FTF_STRTABSIZE 0x10
8741 +#define FTF_STRUCTSIZE 0x20
8742 +#define FTF_NOPS 0x40
8744 +static struct version_info {
8746 + int last_comp_version;
8749 +} version_table[] = {
8750 + {1, 1, FDT_V1_SIZE,
8751 + FTF_FULLPATH|FTF_VARALIGN|FTF_NAMEPROPS},
8752 + {2, 1, FDT_V2_SIZE,
8753 + FTF_FULLPATH|FTF_VARALIGN|FTF_NAMEPROPS|FTF_BOOTCPUID},
8754 + {3, 1, FDT_V3_SIZE,
8755 + FTF_FULLPATH|FTF_VARALIGN|FTF_NAMEPROPS|FTF_BOOTCPUID|FTF_STRTABSIZE},
8756 + {16, 16, FDT_V3_SIZE,
8757 + FTF_BOOTCPUID|FTF_STRTABSIZE|FTF_NOPS},
8758 + {17, 16, FDT_V17_SIZE,
8759 + FTF_BOOTCPUID|FTF_STRTABSIZE|FTF_STRUCTSIZE|FTF_NOPS},
8763 + void (*cell)(void *, cell_t);
8764 + void (*string)(void *, char *, int);
8765 + void (*align)(void *, int);
8766 + void (*data)(void *, struct data);
8767 + void (*beginnode)(void *, const char *);
8768 + void (*endnode)(void *, const char *);
8769 + void (*property)(void *, const char *);
8772 +static void bin_emit_cell(void *e, cell_t val)
8774 + struct data *dtbuf = e;
8776 + *dtbuf = data_append_cell(*dtbuf, val);
8779 +static void bin_emit_string(void *e, char *str, int len)
8781 + struct data *dtbuf = e;
8784 + len = strlen(str);
8786 + *dtbuf = data_append_data(*dtbuf, str, len);
8787 + *dtbuf = data_append_byte(*dtbuf, '\0');
8790 +static void bin_emit_align(void *e, int a)
8792 + struct data *dtbuf = e;
8794 + *dtbuf = data_append_align(*dtbuf, a);
8797 +static void bin_emit_data(void *e, struct data d)
8799 + struct data *dtbuf = e;
8801 + *dtbuf = data_append_data(*dtbuf, d.val, d.len);
8804 +static void bin_emit_beginnode(void *e, const char *label)
8806 + bin_emit_cell(e, FDT_BEGIN_NODE);
8809 +static void bin_emit_endnode(void *e, const char *label)
8811 + bin_emit_cell(e, FDT_END_NODE);
8814 +static void bin_emit_property(void *e, const char *label)
8816 + bin_emit_cell(e, FDT_PROP);
8819 +static struct emitter bin_emitter = {
8820 + .cell = bin_emit_cell,
8821 + .string = bin_emit_string,
8822 + .align = bin_emit_align,
8823 + .data = bin_emit_data,
8824 + .beginnode = bin_emit_beginnode,
8825 + .endnode = bin_emit_endnode,
8826 + .property = bin_emit_property,
8829 +static void emit_label(FILE *f, const char *prefix, const char *label)
8831 + fprintf(f, "\t.globl\t%s_%s\n", prefix, label);
8832 + fprintf(f, "%s_%s:\n", prefix, label);
8833 + fprintf(f, "_%s_%s:\n", prefix, label);
8836 +static void emit_offset_label(FILE *f, const char *label, int offset)
8838 + fprintf(f, "\t.globl\t%s\n", label);
8839 + fprintf(f, "%s\t= . + %d\n", label, offset);
8842 +static void asm_emit_cell(void *e, cell_t val)
8846 + fprintf(f, "\t.long\t0x%x\n", val);
8849 +static void asm_emit_string(void *e, char *str, int len)
8860 + fprintf(f, "\t.string\t\"%s\"\n", str);
8867 +static void asm_emit_align(void *e, int a)
8871 + fprintf(f, "\t.balign\t%d\n", a);
8874 +static void asm_emit_data(void *e, struct data d)
8882 + if (m->type == LABEL)
8883 + emit_offset_label(f, m->ref, m->offset);
8887 + while ((d.len - off) >= sizeof(u32)) {
8888 + fprintf(f, "\t.long\t0x%x\n",
8889 + be32_to_cpu(*((u32 *)(d.val+off))));
8890 + off += sizeof(u32);
8893 + if ((d.len - off) >= sizeof(u16)) {
8894 + fprintf(f, "\t.short\t0x%hx\n",
8895 + be16_to_cpu(*((u16 *)(d.val+off))));
8896 + off += sizeof(u16);
8899 + if ((d.len - off) >= 1) {
8900 + fprintf(f, "\t.byte\t0x%hhx\n", d.val[off]);
8904 + assert(off == d.len);
8907 +static void asm_emit_beginnode(void *e, const char *label)
8912 + fprintf(f, "\t.globl\t%s\n", label);
8913 + fprintf(f, "%s:\n", label);
8915 + fprintf(f, "\t.long\tFDT_BEGIN_NODE\n");
8918 +static void asm_emit_endnode(void *e, const char *label)
8922 + fprintf(f, "\t.long\tFDT_END_NODE\n");
8924 + fprintf(f, "\t.globl\t%s_end\n", label);
8925 + fprintf(f, "%s_end:\n", label);
8929 +static void asm_emit_property(void *e, const char *label)
8934 + fprintf(f, "\t.globl\t%s\n", label);
8935 + fprintf(f, "%s:\n", label);
8937 + fprintf(f, "\t.long\tFDT_PROP\n");
8940 +static struct emitter asm_emitter = {
8941 + .cell = asm_emit_cell,
8942 + .string = asm_emit_string,
8943 + .align = asm_emit_align,
8944 + .data = asm_emit_data,
8945 + .beginnode = asm_emit_beginnode,
8946 + .endnode = asm_emit_endnode,
8947 + .property = asm_emit_property,
8950 +static int stringtable_insert(struct data *d, const char *str)
8954 + /* FIXME: do this more efficiently? */
8956 + for (i = 0; i < d->len; i++) {
8957 + if (streq(str, d->val + i))
8961 + *d = data_append_data(*d, str, strlen(str)+1);
8965 +static void flatten_tree(struct node *tree, struct emitter *emit,
8966 + void *etarget, struct data *strbuf,
8967 + struct version_info *vi)
8969 + struct property *prop;
8970 + struct node *child;
8971 + int seen_name_prop = 0;
8973 + emit->beginnode(etarget, tree->label);
8975 + if (vi->flags & FTF_FULLPATH)
8976 + emit->string(etarget, tree->fullpath, 0);
8978 + emit->string(etarget, tree->name, 0);
8980 + emit->align(etarget, sizeof(cell_t));
8982 + for_each_property(tree, prop) {
8985 + if (streq(prop->name, "name"))
8986 + seen_name_prop = 1;
8988 + nameoff = stringtable_insert(strbuf, prop->name);
8990 + emit->property(etarget, prop->label);
8991 + emit->cell(etarget, prop->val.len);
8992 + emit->cell(etarget, nameoff);
8994 + if ((vi->flags & FTF_VARALIGN) && (prop->val.len >= 8))
8995 + emit->align(etarget, 8);
8997 + emit->data(etarget, prop->val);
8998 + emit->align(etarget, sizeof(cell_t));
9001 + if ((vi->flags & FTF_NAMEPROPS) && !seen_name_prop) {
9002 + emit->property(etarget, NULL);
9003 + emit->cell(etarget, tree->basenamelen+1);
9004 + emit->cell(etarget, stringtable_insert(strbuf, "name"));
9006 + if ((vi->flags & FTF_VARALIGN) && ((tree->basenamelen+1) >= 8))
9007 + emit->align(etarget, 8);
9009 + emit->string(etarget, tree->name, tree->basenamelen);
9010 + emit->align(etarget, sizeof(cell_t));
9013 + for_each_child(tree, child) {
9014 + flatten_tree(child, emit, etarget, strbuf, vi);
9017 + emit->endnode(etarget, tree->label);
9020 +static struct data flatten_reserve_list(struct reserve_info *reservelist,
9021 + struct version_info *vi)
9023 + struct reserve_info *re;
9024 + struct data d = empty_data;
9025 + static struct fdt_reserve_entry null_re = {0,0};
9028 + for (re = reservelist; re; re = re->next) {
9029 + d = data_append_re(d, &re->re);
9032 + * Add additional reserved slots if the user asked for them.
9034 + for (j = 0; j < reservenum; j++) {
9035 + d = data_append_re(d, &null_re);
9041 +static void make_fdt_header(struct fdt_header *fdt,
9042 + struct version_info *vi,
9043 + int reservesize, int dtsize, int strsize,
9044 + int boot_cpuid_phys)
9048 + reservesize += sizeof(struct fdt_reserve_entry);
9050 + memset(fdt, 0xff, sizeof(*fdt));
9052 + fdt->magic = cpu_to_be32(FDT_MAGIC);
9053 + fdt->version = cpu_to_be32(vi->version);
9054 + fdt->last_comp_version = cpu_to_be32(vi->last_comp_version);
9056 + /* Reserve map should be doubleword aligned */
9057 + reserve_off = ALIGN(vi->hdr_size, 8);
9059 + fdt->off_mem_rsvmap = cpu_to_be32(reserve_off);
9060 + fdt->off_dt_struct = cpu_to_be32(reserve_off + reservesize);
9061 + fdt->off_dt_strings = cpu_to_be32(reserve_off + reservesize
9063 + fdt->totalsize = cpu_to_be32(reserve_off + reservesize + dtsize + strsize);
9065 + if (vi->flags & FTF_BOOTCPUID)
9066 + fdt->boot_cpuid_phys = cpu_to_be32(boot_cpuid_phys);
9067 + if (vi->flags & FTF_STRTABSIZE)
9068 + fdt->size_dt_strings = cpu_to_be32(strsize);
9069 + if (vi->flags & FTF_STRUCTSIZE)
9070 + fdt->size_dt_struct = cpu_to_be32(dtsize);
9073 +void dt_to_blob(FILE *f, struct boot_info *bi, int version,
9074 + int boot_cpuid_phys)
9076 + struct version_info *vi = NULL;
9078 + struct data blob = empty_data;
9079 + struct data reservebuf = empty_data;
9080 + struct data dtbuf = empty_data;
9081 + struct data strbuf = empty_data;
9082 + struct fdt_header fdt;
9085 + for (i = 0; i < ARRAY_SIZE(version_table); i++) {
9086 + if (version_table[i].version == version)
9087 + vi = &version_table[i];
9090 + die("Unknown device tree blob version %d\n", version);
9092 + flatten_tree(bi->dt, &bin_emitter, &dtbuf, &strbuf, vi);
9093 + bin_emit_cell(&dtbuf, FDT_END);
9095 + reservebuf = flatten_reserve_list(bi->reservelist, vi);
9098 + make_fdt_header(&fdt, vi, reservebuf.len, dtbuf.len, strbuf.len,
9102 + * If the user asked for more space than is used, adjust the totalsize.
9104 + if (minsize > 0) {
9105 + padlen = minsize - be32_to_cpu(fdt.totalsize);
9106 + if ((padlen < 0) && (quiet < 1))
9108 + "Warning: blob size %d >= minimum size %d\n",
9109 + be32_to_cpu(fdt.totalsize), minsize);
9116 + int tsize = be32_to_cpu(fdt.totalsize);
9118 + fdt.totalsize = cpu_to_be32(tsize);
9122 + * Assemble the blob: start with the header, add with alignment
9123 + * the reserve buffer, add the reserve map terminating zeroes,
9124 + * the device tree itself, and finally the strings.
9126 + blob = data_append_data(blob, &fdt, sizeof(fdt));
9127 + blob = data_append_align(blob, 8);
9128 + blob = data_merge(blob, reservebuf);
9129 + blob = data_append_zeroes(blob, sizeof(struct fdt_reserve_entry));
9130 + blob = data_merge(blob, dtbuf);
9131 + blob = data_merge(blob, strbuf);
9134 + * If the user asked for more space than is used, pad out the blob.
9137 + blob = data_append_zeroes(blob, padlen);
9139 + fwrite(blob.val, blob.len, 1, f);
9142 + die("Error writing device tree blob: %s\n", strerror(errno));
9145 + * data_merge() frees the right-hand element so only the blob
9146 + * remains to be freed.
9151 +static void dump_stringtable_asm(FILE *f, struct data strbuf)
9158 + while (p < (strbuf.val + strbuf.len)) {
9160 + fprintf(f, "\t.string \"%s\"\n", p);
9165 +void dt_to_asm(FILE *f, struct boot_info *bi, int version, int boot_cpuid_phys)
9167 + struct version_info *vi = NULL;
9169 + struct data strbuf = empty_data;
9170 + struct reserve_info *re;
9171 + const char *symprefix = "dt";
9173 + for (i = 0; i < ARRAY_SIZE(version_table); i++) {
9174 + if (version_table[i].version == version)
9175 + vi = &version_table[i];
9178 + die("Unknown device tree blob version %d\n", version);
9180 + fprintf(f, "/* autogenerated by dtc, do not edit */\n\n");
9181 + fprintf(f, "#define FDT_MAGIC 0x%x\n", FDT_MAGIC);
9182 + fprintf(f, "#define FDT_BEGIN_NODE 0x%x\n", FDT_BEGIN_NODE);
9183 + fprintf(f, "#define FDT_END_NODE 0x%x\n", FDT_END_NODE);
9184 + fprintf(f, "#define FDT_PROP 0x%x\n", FDT_PROP);
9185 + fprintf(f, "#define FDT_END 0x%x\n", FDT_END);
9188 + emit_label(f, symprefix, "blob_start");
9189 + emit_label(f, symprefix, "header");
9190 + fprintf(f, "\t.long\tFDT_MAGIC\t\t\t\t/* magic */\n");
9191 + fprintf(f, "\t.long\t_%s_blob_abs_end - _%s_blob_start\t/* totalsize */\n",
9192 + symprefix, symprefix);
9193 + fprintf(f, "\t.long\t_%s_struct_start - _%s_blob_start\t/* off_dt_struct */\n",
9194 + symprefix, symprefix);
9195 + fprintf(f, "\t.long\t_%s_strings_start - _%s_blob_start\t/* off_dt_strings */\n",
9196 + symprefix, symprefix);
9197 + fprintf(f, "\t.long\t_%s_reserve_map - _%s_blob_start\t/* off_dt_strings */\n",
9198 + symprefix, symprefix);
9199 + fprintf(f, "\t.long\t%d\t\t\t\t\t/* version */\n", vi->version);
9200 + fprintf(f, "\t.long\t%d\t\t\t\t\t/* last_comp_version */\n",
9201 + vi->last_comp_version);
9203 + if (vi->flags & FTF_BOOTCPUID)
9204 + fprintf(f, "\t.long\t%i\t\t\t\t\t/* boot_cpuid_phys */\n",
9207 + if (vi->flags & FTF_STRTABSIZE)
9208 + fprintf(f, "\t.long\t_%s_strings_end - _%s_strings_start\t/* size_dt_strings */\n",
9209 + symprefix, symprefix);
9211 + if (vi->flags & FTF_STRUCTSIZE)
9212 + fprintf(f, "\t.long\t_%s_struct_end - _%s_struct_start\t/* size_dt_struct */\n",
9213 + symprefix, symprefix);
9216 + * Reserve map entries.
9217 + * Align the reserve map to a doubleword boundary.
9218 + * Each entry is an (address, size) pair of u64 values.
9219 + * Always supply a zero-sized temination entry.
9221 + asm_emit_align(f, 8);
9222 + emit_label(f, symprefix, "reserve_map");
9224 + fprintf(f, "/* Memory reserve map from source file */\n");
9227 + * Use .long on high and low halfs of u64s to avoid .quad
9228 + * as it appears .quad isn't available in some assemblers.
9230 + for (re = bi->reservelist; re; re = re->next) {
9232 + fprintf(f, "\t.globl\t%s\n", re->label);
9233 + fprintf(f, "%s:\n", re->label);
9235 + fprintf(f, "\t.long\t0x%08x, 0x%08x\n",
9236 + (unsigned int)(re->re.address >> 32),
9237 + (unsigned int)(re->re.address & 0xffffffff));
9238 + fprintf(f, "\t.long\t0x%08x, 0x%08x\n",
9239 + (unsigned int)(re->re.size >> 32),
9240 + (unsigned int)(re->re.size & 0xffffffff));
9242 + for (i = 0; i < reservenum; i++) {
9243 + fprintf(f, "\t.long\t0, 0\n\t.long\t0, 0\n");
9246 + fprintf(f, "\t.long\t0, 0\n\t.long\t0, 0\n");
9248 + emit_label(f, symprefix, "struct_start");
9249 + flatten_tree(bi->dt, &asm_emitter, f, &strbuf, vi);
9250 + fprintf(f, "\t.long\tFDT_END\n");
9251 + emit_label(f, symprefix, "struct_end");
9253 + emit_label(f, symprefix, "strings_start");
9254 + dump_stringtable_asm(f, strbuf);
9255 + emit_label(f, symprefix, "strings_end");
9257 + emit_label(f, symprefix, "blob_end");
9260 + * If the user asked for more space than is used, pad it out.
9262 + if (minsize > 0) {
9263 + fprintf(f, "\t.space\t%d - (_%s_blob_end - _%s_blob_start), 0\n",
9264 + minsize, symprefix, symprefix);
9266 + if (padsize > 0) {
9267 + fprintf(f, "\t.space\t%d, 0\n", padsize);
9269 + emit_label(f, symprefix, "blob_abs_end");
9271 + data_free(strbuf);
9275 + char *base, *limit, *ptr;
9278 +static void inbuf_init(struct inbuf *inb, void *base, void *limit)
9281 + inb->limit = limit;
9282 + inb->ptr = inb->base;
9285 +static void flat_read_chunk(struct inbuf *inb, void *p, int len)
9287 + if ((inb->ptr + len) > inb->limit)
9288 + die("Premature end of data parsing flat device tree\n");
9290 + memcpy(p, inb->ptr, len);
9295 +static u32 flat_read_word(struct inbuf *inb)
9299 + assert(((inb->ptr - inb->base) % sizeof(val)) == 0);
9301 + flat_read_chunk(inb, &val, sizeof(val));
9303 + return be32_to_cpu(val);
9306 +static void flat_realign(struct inbuf *inb, int align)
9308 + int off = inb->ptr - inb->base;
9310 + inb->ptr = inb->base + ALIGN(off, align);
9311 + if (inb->ptr > inb->limit)
9312 + die("Premature end of data parsing flat device tree\n");
9315 +static char *flat_read_string(struct inbuf *inb)
9318 + const char *p = inb->ptr;
9322 + if (p >= inb->limit)
9323 + die("Premature end of data parsing flat device tree\n");
9325 + } while ((*p++) != '\0');
9327 + str = strdup(inb->ptr);
9331 + flat_realign(inb, sizeof(u32));
9336 +static struct data flat_read_data(struct inbuf *inb, int len)
9338 + struct data d = empty_data;
9341 + return empty_data;
9343 + d = data_grow_for(d, len);
9346 + flat_read_chunk(inb, d.val, len);
9348 + flat_realign(inb, sizeof(u32));
9353 +static char *flat_read_stringtable(struct inbuf *inb, int offset)
9357 + p = inb->base + offset;
9359 + if (p >= inb->limit || p < inb->base)
9360 + die("String offset %d overruns string table\n",
9369 + return strdup(inb->base + offset);
9372 +static struct property *flat_read_property(struct inbuf *dtbuf,
9373 + struct inbuf *strbuf, int flags)
9375 + u32 proplen, stroff;
9379 + proplen = flat_read_word(dtbuf);
9380 + stroff = flat_read_word(dtbuf);
9382 + name = flat_read_stringtable(strbuf, stroff);
9384 + if ((flags & FTF_VARALIGN) && (proplen >= 8))
9385 + flat_realign(dtbuf, 8);
9387 + val = flat_read_data(dtbuf, proplen);
9389 + return build_property(name, val, NULL);
9393 +static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
9395 + struct reserve_info *reservelist = NULL;
9396 + struct reserve_info *new;
9398 + struct fdt_reserve_entry re;
9401 + * Each entry is a pair of u64 (addr, size) values for 4 cell_t's.
9402 + * List terminates at an entry with size equal to zero.
9404 + * First pass, count entries.
9408 + flat_read_chunk(inb, &re, sizeof(re));
9409 + re.address = be64_to_cpu(re.address);
9410 + re.size = be64_to_cpu(re.size);
9414 + new = build_reserve_entry(re.address, re.size, NULL);
9415 + reservelist = add_reserve_entry(reservelist, new);
9418 + return reservelist;
9422 +static char *nodename_from_path(const char *ppath, const char *cpath)
9424 + const char *lslash;
9427 + lslash = strrchr(cpath, '/');
9431 + plen = lslash - cpath;
9433 + if (streq(cpath, "/") && streq(ppath, ""))
9436 + if ((plen == 0) && streq(ppath, "/"))
9437 + return strdup(lslash+1);
9439 + if (! strneq(ppath, cpath, plen))
9442 + return strdup(lslash+1);
9445 +static const char PROPCHAR[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,._+*#?-";
9446 +static const char UNITCHAR[] = "0123456789abcdef,";
9448 +static int check_node_name(const char *name)
9450 + const char *atpos;
9453 + atpos = strrchr(name, '@');
9456 + basenamelen = atpos - name;
9458 + basenamelen = strlen(name);
9460 + if (strspn(name, PROPCHAR) < basenamelen)
9464 + && ((basenamelen + 1 + strspn(atpos+1, UNITCHAR)) < strlen(name)))
9467 + return basenamelen;
9470 +static struct node *unflatten_tree(struct inbuf *dtbuf,
9471 + struct inbuf *strbuf,
9472 + const char *parent_path, int flags)
9474 + struct node *node;
9477 + node = build_node(NULL, NULL);
9479 + if (flags & FTF_FULLPATH) {
9480 + node->fullpath = flat_read_string(dtbuf);
9481 + node->name = nodename_from_path(parent_path, node->fullpath);
9484 + die("Path \"%s\" is not valid as a child of \"%s\"\n",
9485 + node->fullpath, parent_path);
9487 + node->name = flat_read_string(dtbuf);
9488 + node->fullpath = join_path(parent_path, node->name);
9491 + node->basenamelen = check_node_name(node->name);
9492 + if (node->basenamelen < 0) {
9493 + fprintf(stderr, "Warning \"%s\" has incorrect format\n", node->name);
9497 + struct property *prop;
9498 + struct node *child;
9500 + val = flat_read_word(dtbuf);
9503 + if (node->children)
9504 + fprintf(stderr, "Warning: Flat tree input has "
9505 + "subnodes preceding a property.\n");
9506 + prop = flat_read_property(dtbuf, strbuf, flags);
9507 + add_property(node, prop);
9510 + case FDT_BEGIN_NODE:
9511 + child = unflatten_tree(dtbuf,strbuf, node->fullpath,
9513 + add_child(node, child);
9516 + case FDT_END_NODE:
9520 + die("Premature FDT_END in device tree blob\n");
9524 + if (!(flags & FTF_NOPS))
9525 + fprintf(stderr, "Warning: NOP tag found in flat tree"
9526 + " version <16\n");
9532 + die("Invalid opcode word %08x in device tree blob\n",
9535 + } while (val != FDT_END_NODE);
9541 +struct boot_info *dt_from_blob(FILE *f)
9543 + u32 magic, totalsize, version, size_str, size_dt;
9544 + u32 off_dt, off_str, off_mem_rsvmap;
9547 + struct fdt_header *fdt;
9549 + struct inbuf dtbuf, strbuf;
9550 + struct inbuf memresvbuf;
9552 + struct reserve_info *reservelist;
9553 + struct node *tree;
9557 + rc = fread(&magic, sizeof(magic), 1, f);
9559 + die("Error reading DT blob magic number: %s\n",
9563 + die("EOF reading DT blob magic number\n");
9565 + die("Mysterious short read reading magic number\n");
9568 + magic = be32_to_cpu(magic);
9569 + if (magic != FDT_MAGIC)
9570 + die("Blob has incorrect magic number\n");
9572 + rc = fread(&totalsize, sizeof(totalsize), 1, f);
9574 + die("Error reading DT blob size: %s\n", strerror(errno));
9577 + die("EOF reading DT blob size\n");
9579 + die("Mysterious short read reading blob size\n");
9582 + totalsize = be32_to_cpu(totalsize);
9583 + if (totalsize < FDT_V1_SIZE)
9584 + die("DT blob size (%d) is too small\n", totalsize);
9586 + blob = xmalloc(totalsize);
9588 + fdt = (struct fdt_header *)blob;
9589 + fdt->magic = cpu_to_be32(magic);
9590 + fdt->totalsize = cpu_to_be32(totalsize);
9592 + sizeleft = totalsize - sizeof(magic) - sizeof(totalsize);
9593 + p = blob + sizeof(magic) + sizeof(totalsize);
9595 + while (sizeleft) {
9597 + die("EOF before reading %d bytes of DT blob\n",
9600 + rc = fread(p, 1, sizeleft, f);
9602 + die("Error reading DT blob: %s\n",
9609 + off_dt = be32_to_cpu(fdt->off_dt_struct);
9610 + off_str = be32_to_cpu(fdt->off_dt_strings);
9611 + off_mem_rsvmap = be32_to_cpu(fdt->off_mem_rsvmap);
9612 + version = be32_to_cpu(fdt->version);
9614 + fprintf(stderr, "\tmagic:\t\t\t0x%x\n", magic);
9615 + fprintf(stderr, "\ttotalsize:\t\t%d\n", totalsize);
9616 + fprintf(stderr, "\toff_dt_struct:\t\t0x%x\n", off_dt);
9617 + fprintf(stderr, "\toff_dt_strings:\t\t0x%x\n", off_str);
9618 + fprintf(stderr, "\toff_mem_rsvmap:\t\t0x%x\n", off_mem_rsvmap);
9619 + fprintf(stderr, "\tversion:\t\t0x%x\n", version );
9620 + fprintf(stderr, "\tlast_comp_version:\t0x%x\n",
9621 + be32_to_cpu(fdt->last_comp_version));
9623 + if (off_mem_rsvmap >= totalsize)
9624 + die("Mem Reserve structure offset exceeds total size\n");
9626 + if (off_dt >= totalsize)
9627 + die("DT structure offset exceeds total size\n");
9629 + if (off_str > totalsize)
9630 + die("String table offset exceeds total size\n");
9633 + fprintf(stderr, "\tboot_cpuid_phys:\t0x%x\n",
9634 + be32_to_cpu(fdt->boot_cpuid_phys));
9637 + if (version >= 3) {
9638 + size_str = be32_to_cpu(fdt->size_dt_strings);
9639 + fprintf(stderr, "\tsize_dt_strings:\t%d\n", size_str);
9640 + if (off_str+size_str > totalsize)
9641 + die("String table extends past total size\n");
9644 + if (version >= 17) {
9645 + size_dt = be32_to_cpu(fdt->size_dt_struct);
9646 + fprintf(stderr, "\tsize_dt_struct:\t\t%d\n", size_dt);
9647 + if (off_dt+size_dt > totalsize)
9648 + die("Structure block extends past total size\n");
9651 + if (version < 16) {
9652 + flags |= FTF_FULLPATH | FTF_NAMEPROPS | FTF_VARALIGN;
9654 + flags |= FTF_NOPS;
9657 + inbuf_init(&memresvbuf,
9658 + blob + off_mem_rsvmap, blob + totalsize);
9659 + inbuf_init(&dtbuf, blob + off_dt, blob + totalsize);
9660 + if (size_str >= 0)
9661 + inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str);
9663 + inbuf_init(&strbuf, blob + off_str, blob + totalsize);
9665 + reservelist = flat_read_mem_reserve(&memresvbuf);
9667 + val = flat_read_word(&dtbuf);
9669 + if (val != FDT_BEGIN_NODE)
9670 + die("Device tree blob doesn't begin with FDT_BEGIN_NODE (begins with 0x%08x)\n", val);
9672 + tree = unflatten_tree(&dtbuf, &strbuf, "", flags);
9674 + val = flat_read_word(&dtbuf);
9675 + if (val != FDT_END)
9676 + die("Device tree blob doesn't end with FDT_END\n");
9680 + return build_boot_info(reservelist, tree);
9682 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/fstree.c powerpc.git/arch/powerpc/boot/dtc-src/fstree.c
9683 --- linux-2.6.24/arch/powerpc/boot/dtc-src/fstree.c 1970-01-01 01:00:00.000000000 +0100
9684 +++ powerpc.git/arch/powerpc/boot/dtc-src/fstree.c 2008-01-28 20:25:49.000000000 +0100
9687 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
9690 + * This program is free software; you can redistribute it and/or
9691 + * modify it under the terms of the GNU General Public License as
9692 + * published by the Free Software Foundation; either version 2 of the
9693 + * License, or (at your option) any later version.
9695 + * This program is distributed in the hope that it will be useful,
9696 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
9697 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9698 + * General Public License for more details.
9700 + * You should have received a copy of the GNU General Public License
9701 + * along with this program; if not, write to the Free Software
9702 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
9708 +#include <dirent.h>
9709 +#include <sys/stat.h>
9711 +static struct node *read_fstree(const char *dirname)
9714 + struct dirent *de;
9716 + struct node *tree;
9718 + d = opendir(dirname);
9720 + die("opendir(): %s\n", strerror(errno));
9722 + tree = build_node(NULL, NULL);
9724 + while ((de = readdir(d)) != NULL) {
9727 + if (streq(de->d_name, ".")
9728 + || streq(de->d_name, ".."))
9731 + tmpnam = join_path(dirname, de->d_name);
9733 + if (lstat(tmpnam, &st) < 0)
9734 + die("stat(%s): %s\n", tmpnam, strerror(errno));
9736 + if (S_ISREG(st.st_mode)) {
9737 + struct property *prop;
9740 + pfile = fopen(tmpnam, "r");
9743 + "WARNING: Cannot open %s: %s\n",
9744 + tmpnam, strerror(errno));
9746 + prop = build_property(strdup(de->d_name),
9747 + data_copy_file(pfile,
9750 + add_property(tree, prop);
9753 + } else if (S_ISDIR(st.st_mode)) {
9754 + struct node *newchild;
9756 + newchild = read_fstree(tmpnam);
9757 + newchild = name_node(newchild, strdup(de->d_name),
9759 + add_child(tree, newchild);
9768 +struct boot_info *dt_from_fs(const char *dirname)
9770 + struct node *tree;
9772 + tree = read_fstree(dirname);
9773 + tree = name_node(tree, "", NULL);
9775 + fill_fullpaths(tree, "");
9777 + return build_boot_info(NULL, tree);
9780 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/livetree.c powerpc.git/arch/powerpc/boot/dtc-src/livetree.c
9781 --- linux-2.6.24/arch/powerpc/boot/dtc-src/livetree.c 1970-01-01 01:00:00.000000000 +0100
9782 +++ powerpc.git/arch/powerpc/boot/dtc-src/livetree.c 2008-01-28 20:25:49.000000000 +0100
9785 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
9788 + * This program is free software; you can redistribute it and/or
9789 + * modify it under the terms of the GNU General Public License as
9790 + * published by the Free Software Foundation; either version 2 of the
9791 + * License, or (at your option) any later version.
9793 + * This program is distributed in the hope that it will be useful,
9794 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
9795 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9796 + * General Public License for more details.
9798 + * You should have received a copy of the GNU General Public License
9799 + * along with this program; if not, write to the Free Software
9800 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
9807 + * Tree building functions
9810 +struct property *build_property(char *name, struct data val, char *label)
9812 + struct property *new = xmalloc(sizeof(*new));
9819 + new->label = label;
9824 +struct property *chain_property(struct property *first, struct property *list)
9826 + assert(first->next == NULL);
9828 + first->next = list;
9832 +struct property *reverse_properties(struct property *first)
9834 + struct property *p = first;
9835 + struct property *head = NULL;
9836 + struct property *next;
9847 +struct node *build_node(struct property *proplist, struct node *children)
9849 + struct node *new = xmalloc(sizeof(*new));
9850 + struct node *child;
9852 + memset(new, 0, sizeof(*new));
9854 + new->proplist = reverse_properties(proplist);
9855 + new->children = children;
9857 + for_each_child(new, child) {
9858 + child->parent = new;
9864 +struct node *name_node(struct node *node, char *name, char * label)
9866 + assert(node->name == NULL);
9868 + node->name = name;
9870 + node->label = label;
9875 +struct node *chain_node(struct node *first, struct node *list)
9877 + assert(first->next_sibling == NULL);
9879 + first->next_sibling = list;
9883 +void add_property(struct node *node, struct property *prop)
9885 + struct property **p;
9887 + prop->next = NULL;
9889 + p = &node->proplist;
9891 + p = &((*p)->next);
9896 +void add_child(struct node *parent, struct node *child)
9900 + child->next_sibling = NULL;
9902 + p = &parent->children;
9904 + p = &((*p)->next_sibling);
9909 +struct reserve_info *build_reserve_entry(u64 address, u64 size, char *label)
9911 + struct reserve_info *new = xmalloc(sizeof(*new));
9913 + new->re.address = address;
9914 + new->re.size = size;
9918 + new->label = label;
9923 +struct reserve_info *chain_reserve_entry(struct reserve_info *first,
9924 + struct reserve_info *list)
9926 + assert(first->next == NULL);
9928 + first->next = list;
9932 +struct reserve_info *add_reserve_entry(struct reserve_info *list,
9933 + struct reserve_info *new)
9935 + struct reserve_info *last;
9942 + for (last = list; last->next; last = last->next)
9950 +struct boot_info *build_boot_info(struct reserve_info *reservelist,
9951 + struct node *tree)
9953 + struct boot_info *bi;
9955 + bi = xmalloc(sizeof(*bi));
9956 + bi->reservelist = reservelist;
9963 + * Tree accessor functions
9966 +const char *get_unitname(struct node *node)
9968 + if (node->name[node->basenamelen] == '\0')
9971 + return node->name + node->basenamelen + 1;
9974 +struct property *get_property(struct node *node, const char *propname)
9976 + struct property *prop;
9978 + for_each_property(node, prop)
9979 + if (streq(prop->name, propname))
9985 +cell_t propval_cell(struct property *prop)
9987 + assert(prop->val.len == sizeof(cell_t));
9988 + return be32_to_cpu(*((cell_t *)prop->val.val));
9991 +struct node *get_subnode(struct node *node, const char *nodename)
9993 + struct node *child;
9995 + for_each_child(node, child)
9996 + if (streq(child->name, nodename))
10002 +struct node *get_node_by_path(struct node *tree, const char *path)
10005 + struct node *child;
10007 + if (!path || ! (*path))
10010 + while (path[0] == '/')
10013 + p = strchr(path, '/');
10015 + for_each_child(tree, child) {
10016 + if (p && strneq(path, child->name, p-path))
10017 + return get_node_by_path(child, p+1);
10018 + else if (!p && streq(path, child->name))
10025 +struct node *get_node_by_label(struct node *tree, const char *label)
10027 + struct node *child, *node;
10029 + assert(label && (strlen(label) > 0));
10031 + if (tree->label && streq(tree->label, label))
10034 + for_each_child(tree, child) {
10035 + node = get_node_by_label(child, label);
10043 +struct node *get_node_by_phandle(struct node *tree, cell_t phandle)
10045 + struct node *child, *node;
10047 + assert((phandle != 0) && (phandle != -1));
10049 + if (tree->phandle == phandle)
10052 + for_each_child(tree, child) {
10053 + node = get_node_by_phandle(child, phandle);
10061 +struct node *get_node_by_ref(struct node *tree, const char *ref)
10063 + if (ref[0] == '/')
10064 + return get_node_by_path(tree, ref);
10066 + return get_node_by_label(tree, ref);
10069 +cell_t get_node_phandle(struct node *root, struct node *node)
10071 + static cell_t phandle = 1; /* FIXME: ick, static local */
10073 + if ((node->phandle != 0) && (node->phandle != -1))
10074 + return node->phandle;
10076 + assert(! get_property(node, "linux,phandle"));
10078 + while (get_node_by_phandle(root, phandle))
10081 + node->phandle = phandle;
10082 + add_property(node,
10083 + build_property("linux,phandle",
10084 + data_append_cell(empty_data, phandle),
10087 + return node->phandle;
10089 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/srcpos.c powerpc.git/arch/powerpc/boot/dtc-src/srcpos.c
10090 --- linux-2.6.24/arch/powerpc/boot/dtc-src/srcpos.c 1970-01-01 01:00:00.000000000 +0100
10091 +++ powerpc.git/arch/powerpc/boot/dtc-src/srcpos.c 2008-01-28 20:25:49.000000000 +0100
10094 + * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc.
10096 + * This program is free software; you can redistribute it and/or
10097 + * modify it under the terms of the GNU General Public License as
10098 + * published by the Free Software Foundation; either version 2 of the
10099 + * License, or (at your option) any later version.
10101 + * This program is distributed in the hope that it will be useful,
10102 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
10103 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10104 + * General Public License for more details.
10106 + * You should have received a copy of the GNU General Public License
10107 + * along with this program; if not, write to the Free Software
10108 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
10113 +#include "srcpos.h"
10117 + * Record the complete unique set of opened file names.
10118 + * Primarily used to cache source position file names.
10120 +#define MAX_N_FILE_NAMES (100)
10122 +const char *file_names[MAX_N_FILE_NAMES];
10123 +static int n_file_names = 0;
10126 + * Like yylineno, this is the current open file pos.
10129 +int srcpos_filenum = -1;
10133 +FILE *dtc_open_file(const char *fname)
10137 + if (lookup_file_name(fname, 1) < 0)
10138 + die("Too many files opened\n");
10140 + if (streq(fname, "-"))
10143 + f = fopen(fname, "r");
10146 + die("Couldn't open \"%s\": %s\n", fname, strerror(errno));
10154 + * Locate and optionally add filename fname in the file_names[] array.
10156 + * If the filename is currently not in the array and the boolean
10157 + * add_it is non-zero, an attempt to add the filename will be made.
10160 + * Index [0..MAX_N_FILE_NAMES) where the filename is kept
10161 + * -1 if the name can not be recorded
10164 +int lookup_file_name(const char *fname, int add_it)
10168 + for (i = 0; i < n_file_names; i++) {
10169 + if (strcmp(file_names[i], fname) == 0)
10174 + if (n_file_names < MAX_N_FILE_NAMES) {
10175 + file_names[n_file_names] = strdup(fname);
10176 + return n_file_names++;
10184 +const char *srcpos_filename_for_num(int filenum)
10186 + if (0 <= filenum && filenum < n_file_names) {
10187 + return file_names[filenum];
10194 +const char *srcpos_get_filename(void)
10196 + return srcpos_filename_for_num(srcpos_filenum);
10198 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/srcpos.h powerpc.git/arch/powerpc/boot/dtc-src/srcpos.h
10199 --- linux-2.6.24/arch/powerpc/boot/dtc-src/srcpos.h 1970-01-01 01:00:00.000000000 +0100
10200 +++ powerpc.git/arch/powerpc/boot/dtc-src/srcpos.h 2008-01-28 20:25:49.000000000 +0100
10203 + * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc.
10205 + * This program is free software; you can redistribute it and/or
10206 + * modify it under the terms of the GNU General Public License as
10207 + * published by the Free Software Foundation; either version 2 of the
10208 + * License, or (at your option) any later version.
10210 + * This program is distributed in the hope that it will be useful,
10211 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
10212 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10213 + * General Public License for more details.
10215 + * You should have received a copy of the GNU General Public License
10216 + * along with this program; if not, write to the Free Software
10217 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
10222 + * Augment the standard YYLTYPE with a filenum index into an
10223 + * array of all opened filenames.
10226 +#if ! defined(YYLTYPE) && ! defined(YYLTYPE_IS_DECLARED)
10227 +typedef struct YYLTYPE {
10229 + int first_column;
10235 +#define YYLTYPE_IS_DECLARED 1
10236 +#define YYLTYPE_IS_TRIVIAL 1
10239 +/* Cater to old parser templates. */
10241 +#define YYID(n) (n)
10244 +#define YYLLOC_DEFAULT(Current, Rhs, N) \
10248 + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
10249 + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
10250 + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
10251 + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
10252 + (Current).filenum = YYRHSLOC (Rhs, N).filenum; \
10256 + (Current).first_line = (Current).last_line = \
10257 + YYRHSLOC (Rhs, 0).last_line; \
10258 + (Current).first_column = (Current).last_column = \
10259 + YYRHSLOC (Rhs, 0).last_column; \
10260 + (Current).filenum = YYRHSLOC (Rhs, 0).filenum; \
10266 +extern void yyerror(char const *);
10268 +extern int srcpos_filenum;
10270 +extern int push_input_file(const char *filename);
10271 +extern int pop_input_file(void);
10273 +extern FILE *dtc_open_file(const char *fname);
10274 +extern int lookup_file_name(const char *fname, int add_it);
10275 +extern const char *srcpos_filename_for_num(int filenum);
10276 +const char *srcpos_get_filename(void);
10277 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/treesource.c powerpc.git/arch/powerpc/boot/dtc-src/treesource.c
10278 --- linux-2.6.24/arch/powerpc/boot/dtc-src/treesource.c 1970-01-01 01:00:00.000000000 +0100
10279 +++ powerpc.git/arch/powerpc/boot/dtc-src/treesource.c 2008-01-28 20:25:49.000000000 +0100
10282 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
10285 + * This program is free software; you can redistribute it and/or
10286 + * modify it under the terms of the GNU General Public License as
10287 + * published by the Free Software Foundation; either version 2 of the
10288 + * License, or (at your option) any later version.
10290 + * This program is distributed in the hope that it will be useful,
10291 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
10292 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10293 + * General Public License for more details.
10295 + * You should have received a copy of the GNU General Public License
10296 + * along with this program; if not, write to the Free Software
10297 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
10302 +#include "srcpos.h"
10304 +extern FILE *yyin;
10305 +extern int yyparse(void);
10306 +extern void yyerror(char const *);
10308 +struct boot_info *the_boot_info;
10310 +struct boot_info *dt_from_source(const char *fname)
10312 + the_boot_info = NULL;
10314 + push_input_file(fname);
10316 + if (yyparse() != 0)
10319 + fill_fullpaths(the_boot_info->dt, "");
10321 + return the_boot_info;
10324 +static void write_prefix(FILE *f, int level)
10328 + for (i = 0; i < level; i++)
10332 +int isstring(char c)
10334 + return (isprint(c)
10336 + || strchr("\a\b\t\n\v\f\r", c));
10339 +static void write_propval_string(FILE *f, struct data val)
10341 + const char *str = val.val;
10343 + int newchunk = 1;
10344 + struct marker *m = val.markers;
10346 + assert(str[val.len-1] == '\0');
10348 + for (i = 0; i < (val.len-1); i++) {
10352 + while (m && (m->offset <= i)) {
10353 + if (m->type == LABEL) {
10354 + assert(m->offset == i);
10355 + fprintf(f, "%s: ", m->ref);
10359 + fprintf(f, "\"");
10365 + fprintf(f, "\\a");
10368 + fprintf(f, "\\b");
10371 + fprintf(f, "\\t");
10374 + fprintf(f, "\\n");
10377 + fprintf(f, "\\v");
10380 + fprintf(f, "\\f");
10383 + fprintf(f, "\\r");
10386 + fprintf(f, "\\\\");
10389 + fprintf(f, "\\\"");
10392 + fprintf(f, "\", ");
10397 + fprintf(f, "%c", c);
10399 + fprintf(f, "\\x%02hhx", c);
10402 + fprintf(f, "\"");
10404 + /* Wrap up any labels at the end of the value */
10405 + for_each_marker_of_type(m, LABEL) {
10406 + assert (m->offset == val.len);
10407 + fprintf(f, " %s:", m->ref);
10411 +static void write_propval_cells(FILE *f, struct data val)
10413 + void *propend = val.val + val.len;
10414 + cell_t *cp = (cell_t *)val.val;
10415 + struct marker *m = val.markers;
10419 + while (m && (m->offset <= ((char *)cp - val.val))) {
10420 + if (m->type == LABEL) {
10421 + assert(m->offset == ((char *)cp - val.val));
10422 + fprintf(f, "%s: ", m->ref);
10427 + fprintf(f, "0x%x", be32_to_cpu(*cp++));
10428 + if ((void *)cp >= propend)
10433 + /* Wrap up any labels at the end of the value */
10434 + for_each_marker_of_type(m, LABEL) {
10435 + assert (m->offset == val.len);
10436 + fprintf(f, " %s:", m->ref);
10441 +static void write_propval_bytes(FILE *f, struct data val)
10443 + void *propend = val.val + val.len;
10444 + const char *bp = val.val;
10445 + struct marker *m = val.markers;
10449 + while (m && (m->offset == (bp-val.val))) {
10450 + if (m->type == LABEL)
10451 + fprintf(f, "%s: ", m->ref);
10455 + fprintf(f, "%02hhx", *bp++);
10456 + if ((void *)bp >= propend)
10461 + /* Wrap up any labels at the end of the value */
10462 + for_each_marker_of_type(m, LABEL) {
10463 + assert (m->offset == val.len);
10464 + fprintf(f, " %s:", m->ref);
10469 +static void write_propval(FILE *f, struct property *prop)
10471 + int len = prop->val.len;
10472 + const char *p = prop->val.val;
10473 + struct marker *m = prop->val.markers;
10474 + int nnotstring = 0, nnul = 0;
10475 + int nnotstringlbl = 0, nnotcelllbl = 0;
10479 + fprintf(f, ";\n");
10483 + for (i = 0; i < len; i++) {
10484 + if (! isstring(p[i]))
10486 + if (p[i] == '\0')
10490 + for_each_marker_of_type(m, LABEL) {
10491 + if ((m->offset > 0) && (prop->val.val[m->offset - 1] != '\0'))
10493 + if ((m->offset % sizeof(cell_t)) != 0)
10497 + fprintf(f, " = ");
10498 + if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul < (len-nnul))
10499 + && (nnotstringlbl == 0)) {
10500 + write_propval_string(f, prop->val);
10501 + } else if (((len % sizeof(cell_t)) == 0) && (nnotcelllbl == 0)) {
10502 + write_propval_cells(f, prop->val);
10504 + write_propval_bytes(f, prop->val);
10507 + fprintf(f, ";\n");
10510 +static void write_tree_source_node(FILE *f, struct node *tree, int level)
10512 + struct property *prop;
10513 + struct node *child;
10515 + write_prefix(f, level);
10517 + fprintf(f, "%s: ", tree->label);
10518 + if (tree->name && (*tree->name))
10519 + fprintf(f, "%s {\n", tree->name);
10521 + fprintf(f, "/ {\n");
10523 + for_each_property(tree, prop) {
10524 + write_prefix(f, level+1);
10526 + fprintf(f, "%s: ", prop->label);
10527 + fprintf(f, "%s", prop->name);
10528 + write_propval(f, prop);
10530 + for_each_child(tree, child) {
10531 + fprintf(f, "\n");
10532 + write_tree_source_node(f, child, level+1);
10534 + write_prefix(f, level);
10535 + fprintf(f, "};\n");
10539 +void dt_to_source(FILE *f, struct boot_info *bi)
10541 + struct reserve_info *re;
10543 + fprintf(f, "/dts-v1/;\n\n");
10545 + for (re = bi->reservelist; re; re = re->next) {
10547 + fprintf(f, "%s: ", re->label);
10548 + fprintf(f, "/memreserve/\t0x%016llx 0x%016llx;\n",
10549 + (unsigned long long)re->re.address,
10550 + (unsigned long long)re->re.size);
10553 + write_tree_source_node(f, bi->dt, 0);
10556 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dtc-src/version_gen.h powerpc.git/arch/powerpc/boot/dtc-src/version_gen.h
10557 --- linux-2.6.24/arch/powerpc/boot/dtc-src/version_gen.h 1970-01-01 01:00:00.000000000 +0100
10558 +++ powerpc.git/arch/powerpc/boot/dtc-src/version_gen.h 2008-01-28 20:25:49.000000000 +0100
10560 +#define DTC_VERSION "DTC 1.0.0-gd6f9b62f"
10561 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/adder875-redboot.dts powerpc.git/arch/powerpc/boot/dts/adder875-redboot.dts
10562 --- linux-2.6.24/arch/powerpc/boot/dts/adder875-redboot.dts 1970-01-01 01:00:00.000000000 +0100
10563 +++ powerpc.git/arch/powerpc/boot/dts/adder875-redboot.dts 2008-01-28 20:25:49.000000000 +0100
10566 + * Device Tree Source for MPC885 ADS running RedBoot
10568 + * Copyright 2006 MontaVista Software, Inc.
10569 + * Copyright 2007 Freescale Semiconductor, Inc.
10571 + * This program is free software; you can redistribute it and/or modify it
10572 + * under the terms of the GNU General Public License as published by the
10573 + * Free Software Foundation; either version 2 of the License, or (at your
10574 + * option) any later version.
10579 + model = "Analogue & Micro Adder MPC875";
10580 + compatible = "analogue-and-micro,adder875";
10581 + #address-cells = <1>;
10582 + #size-cells = <1>;
10585 + console = &console;
10586 + ethernet0 = ð0;
10587 + ethernet1 = ð1;
10591 + #address-cells = <1>;
10592 + #size-cells = <0>;
10595 + device_type = "cpu";
10597 + d-cache-line-size = <16>;
10598 + i-cache-line-size = <16>;
10599 + d-cache-size = <8192>;
10600 + i-cache-size = <8192>;
10601 + timebase-frequency = <0>;
10602 + bus-frequency = <0>;
10603 + clock-frequency = <0>;
10604 + interrupts = <15 2>; // decrementer interrupt
10605 + interrupt-parent = <&PIC>;
10610 + device_type = "memory";
10611 + reg = <0 0x01000000>;
10614 + localbus@fa200100 {
10615 + compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus",
10617 + #address-cells = <2>;
10618 + #size-cells = <1>;
10619 + reg = <0xfa200100 0x40>;
10622 + 0 0 0xfe000000 0x00800000
10623 + 2 0 0xfa100000 0x00008000
10627 + compatible = "cfi-flash";
10628 + reg = <0 0 0x800000>;
10629 + bank-width = <2>;
10630 + device-width = <2>;
10635 + compatible = "fsl,mpc875-immr", "fsl,pq1-soc", "simple-bus";
10636 + #address-cells = <1>;
10637 + #size-cells = <1>;
10638 + ranges = <0 0xfa200000 0x00004000>;
10640 + // Temporary until code stops depending on it.
10641 + device_type = "soc";
10643 + // Temporary until get_immrbase() is fixed.
10644 + reg = <0xfa200000 0x4000>;
10647 + compatible = "fsl,mpc875-fec-mdio", "fsl,pq1-fec-mdio";
10648 + reg = <0xe00 0x188>;
10649 + #address-cells = <1>;
10650 + #size-cells = <0>;
10652 + PHY0: ethernet-phy@0 {
10654 + device_type = "ethernet-phy";
10657 + PHY1: ethernet-phy@1 {
10659 + device_type = "ethernet-phy";
10663 + eth0: ethernet@e00 {
10664 + device_type = "network";
10665 + compatible = "fsl,mpc875-fec-enet",
10666 + "fsl,pq1-fec-enet";
10667 + reg = <0xe00 0x188>;
10668 + local-mac-address = [ 00 00 00 00 00 00 ];
10669 + interrupts = <3 1>;
10670 + interrupt-parent = <&PIC>;
10671 + phy-handle = <&PHY0>;
10672 + linux,network-index = <0>;
10675 + eth1: ethernet@1e00 {
10676 + device_type = "network";
10677 + compatible = "fsl,mpc875-fec-enet",
10678 + "fsl,pq1-fec-enet";
10679 + reg = <0x1e00 0x188>;
10680 + local-mac-address = [ 00 00 00 00 00 00 ];
10681 + interrupts = <7 1>;
10682 + interrupt-parent = <&PIC>;
10683 + phy-handle = <&PHY1>;
10684 + linux,network-index = <1>;
10687 + PIC: interrupt-controller@0 {
10688 + interrupt-controller;
10689 + #interrupt-cells = <2>;
10691 + compatible = "fsl,mpc875-pic", "fsl,pq1-pic";
10695 + #address-cells = <1>;
10696 + #size-cells = <1>;
10697 + compatible = "fsl,mpc875-cpm", "fsl,cpm1", "simple-bus";
10698 + interrupts = <0>; // cpm error interrupt
10699 + interrupt-parent = <&CPM_PIC>;
10700 + reg = <0x9c0 0x40>;
10704 + #address-cells = <1>;
10705 + #size-cells = <1>;
10706 + ranges = <0 0x2000 0x2000>;
10709 + compatible = "fsl,cpm-muram-data";
10710 + reg = <0 0x1c00>;
10715 + compatible = "fsl,mpc875-brg",
10718 + reg = <0x9f0 0x10>;
10721 + CPM_PIC: interrupt-controller@930 {
10722 + interrupt-controller;
10723 + #interrupt-cells = <1>;
10724 + interrupts = <5 2 0 2>;
10725 + interrupt-parent = <&PIC>;
10726 + reg = <0x930 0x20>;
10727 + compatible = "fsl,mpc875-cpm-pic",
10731 + console: serial@a80 {
10732 + device_type = "serial";
10733 + compatible = "fsl,mpc875-smc-uart",
10734 + "fsl,cpm1-smc-uart";
10735 + reg = <0xa80 0x10 0x3e80 0x40>;
10736 + interrupts = <4>;
10737 + interrupt-parent = <&CPM_PIC>;
10738 + fsl,cpm-brg = <1>;
10739 + fsl,cpm-command = <0x0090>;
10740 + current-speed = <115200>;
10746 + linux,stdout-path = &console;
10749 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/adder875-uboot.dts powerpc.git/arch/powerpc/boot/dts/adder875-uboot.dts
10750 --- linux-2.6.24/arch/powerpc/boot/dts/adder875-uboot.dts 1970-01-01 01:00:00.000000000 +0100
10751 +++ powerpc.git/arch/powerpc/boot/dts/adder875-uboot.dts 2008-01-28 20:25:49.000000000 +0100
10754 + * Device Tree Source for MPC885 ADS running U-Boot
10756 + * Copyright 2006 MontaVista Software, Inc.
10757 + * Copyright 2007 Freescale Semiconductor, Inc.
10759 + * This program is free software; you can redistribute it and/or modify it
10760 + * under the terms of the GNU General Public License as published by the
10761 + * Free Software Foundation; either version 2 of the License, or (at your
10762 + * option) any later version.
10767 + model = "Analogue & Micro Adder MPC875";
10768 + compatible = "analogue-and-micro,adder875";
10769 + #address-cells = <1>;
10770 + #size-cells = <1>;
10773 + console = &console;
10774 + ethernet0 = ð0;
10775 + ethernet1 = ð1;
10779 + #address-cells = <1>;
10780 + #size-cells = <0>;
10783 + device_type = "cpu";
10785 + d-cache-line-size = <16>;
10786 + i-cache-line-size = <16>;
10787 + d-cache-size = <8192>;
10788 + i-cache-size = <8192>;
10789 + timebase-frequency = <0>;
10790 + bus-frequency = <0>;
10791 + clock-frequency = <0>;
10792 + interrupts = <15 2>; // decrementer interrupt
10793 + interrupt-parent = <&PIC>;
10798 + device_type = "memory";
10799 + reg = <0 0x01000000>;
10802 + localbus@ff000100 {
10803 + compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus",
10805 + #address-cells = <2>;
10806 + #size-cells = <1>;
10807 + reg = <0xff000100 0x40>;
10810 + 0 0 0xfe000000 0x01000000
10814 + compatible = "cfi-flash";
10815 + reg = <0 0 0x800000>;
10816 + bank-width = <2>;
10817 + device-width = <2>;
10822 + compatible = "fsl,mpc875-immr", "fsl,pq1-soc", "simple-bus";
10823 + #address-cells = <1>;
10824 + #size-cells = <1>;
10825 + ranges = <0 0xff000000 0x00004000>;
10827 + // Temporary until code stops depending on it.
10828 + device_type = "soc";
10830 + // Temporary until get_immrbase() is fixed.
10831 + reg = <0xff000000 0x4000>;
10834 + compatible = "fsl,mpc875-fec-mdio", "fsl,pq1-fec-mdio";
10835 + reg = <0xe00 0x188>;
10836 + #address-cells = <1>;
10837 + #size-cells = <0>;
10839 + PHY0: ethernet-phy@0 {
10841 + device_type = "ethernet-phy";
10844 + PHY1: ethernet-phy@1 {
10846 + device_type = "ethernet-phy";
10850 + eth0: ethernet@e00 {
10851 + device_type = "network";
10852 + compatible = "fsl,mpc875-fec-enet",
10853 + "fsl,pq1-fec-enet";
10854 + reg = <0xe00 0x188>;
10855 + local-mac-address = [ 00 00 00 00 00 00 ];
10856 + interrupts = <3 1>;
10857 + interrupt-parent = <&PIC>;
10858 + phy-handle = <&PHY0>;
10859 + linux,network-index = <0>;
10862 + eth1: ethernet@1e00 {
10863 + device_type = "network";
10864 + compatible = "fsl,mpc875-fec-enet",
10865 + "fsl,pq1-fec-enet";
10866 + reg = <0x1e00 0x188>;
10867 + local-mac-address = [ 00 00 00 00 00 00 ];
10868 + interrupts = <7 1>;
10869 + interrupt-parent = <&PIC>;
10870 + phy-handle = <&PHY1>;
10871 + linux,network-index = <1>;
10874 + PIC: interrupt-controller@0 {
10875 + interrupt-controller;
10876 + #interrupt-cells = <2>;
10878 + compatible = "fsl,mpc875-pic", "fsl,pq1-pic";
10882 + #address-cells = <1>;
10883 + #size-cells = <1>;
10884 + compatible = "fsl,mpc875-cpm", "fsl,cpm1", "simple-bus";
10885 + interrupts = <0>; // cpm error interrupt
10886 + interrupt-parent = <&CPM_PIC>;
10887 + reg = <0x9c0 0x40>;
10891 + #address-cells = <1>;
10892 + #size-cells = <1>;
10893 + ranges = <0 0x2000 0x2000>;
10896 + compatible = "fsl,cpm-muram-data";
10897 + reg = <0 0x1c00>;
10902 + compatible = "fsl,mpc875-brg",
10905 + reg = <0x9f0 0x10>;
10908 + CPM_PIC: interrupt-controller@930 {
10909 + interrupt-controller;
10910 + #interrupt-cells = <1>;
10911 + interrupts = <5 2 0 2>;
10912 + interrupt-parent = <&PIC>;
10913 + reg = <0x930 0x20>;
10914 + compatible = "fsl,mpc875-cpm-pic",
10918 + console: serial@a80 {
10919 + device_type = "serial";
10920 + compatible = "fsl,mpc875-smc-uart",
10921 + "fsl,cpm1-smc-uart";
10922 + reg = <0xa80 0x10 0x3e80 0x40>;
10923 + interrupts = <4>;
10924 + interrupt-parent = <&CPM_PIC>;
10925 + fsl,cpm-brg = <1>;
10926 + fsl,cpm-command = <0x0090>;
10927 + current-speed = <115200>;
10933 + linux,stdout-path = &console;
10936 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/bamboo.dts powerpc.git/arch/powerpc/boot/dts/bamboo.dts
10937 --- linux-2.6.24/arch/powerpc/boot/dts/bamboo.dts 2008-01-24 23:58:37.000000000 +0100
10938 +++ powerpc.git/arch/powerpc/boot/dts/bamboo.dts 2008-01-28 20:25:49.000000000 +0100
10939 @@ -16,14 +16,24 @@
10941 model = "amcc,bamboo";
10942 compatible = "amcc,bamboo";
10943 - dcr-parent = <&/cpus/PowerPC,440EP@0>;
10944 + dcr-parent = <&/cpus/cpu@0>;
10947 + ethernet0 = &EMAC0;
10948 + ethernet1 = &EMAC1;
10949 + serial0 = &UART0;
10950 + serial1 = &UART1;
10951 + serial2 = &UART2;
10952 + serial3 = &UART3;
10956 #address-cells = <1>;
10959 - PowerPC,440EP@0 {
10961 device_type = "cpu";
10962 + model = "PowerPC,440EP";
10964 clock-frequency = <0>; /* Filled in by zImage */
10965 timebase-frequency = <0>; /* Filled in by zImage */
10966 @@ -126,7 +136,6 @@
10967 #address-cells = <2>;
10969 clock-frequency = <0>; /* Filled in by zImage */
10971 interrupts = <5 1>;
10972 interrupt-parent = <&UIC1>;
10974 @@ -238,11 +247,56 @@
10975 zmii-device = <&ZMII0>;
10976 zmii-channel = <1>;
10980 + compatible = "ohci-be";
10981 + reg = <ef601000 80>;
10982 + interrupts = <8 1 9 1>;
10983 + interrupt-parent = < &UIC1 >;
10987 + PCI0: pci@ec000000 {
10988 + device_type = "pci";
10989 + #interrupt-cells = <1>;
10990 + #size-cells = <2>;
10991 + #address-cells = <3>;
10992 + compatible = "ibm,plb440ep-pci", "ibm,plb-pci";
10994 + reg = <0 eec00000 8 /* Config space access */
10995 + 0 eed00000 4 /* IACK */
10996 + 0 eed00000 4 /* Special cycle */
10997 + 0 ef400000 40>; /* Internal registers */
10999 + /* Outbound ranges, one memory and one IO,
11000 + * later cannot be changed. Chip supports a second
11001 + * IO range but we don't use it for now
11003 + ranges = <02000000 0 a0000000 0 a0000000 0 20000000
11004 + 01000000 0 00000000 0 e8000000 0 00010000>;
11006 + /* Inbound 2GB range starting at 0 */
11007 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
11009 + /* Bamboo has all 4 IRQ pins tied together per slot */
11010 + interrupt-map-mask = <f800 0 0 0>;
11011 + interrupt-map = <
11013 + 0800 0 0 0 &UIC0 1c 8
11016 + 1000 0 0 0 &UIC0 1b 8
11019 + 1800 0 0 0 &UIC0 1a 8
11022 + 2000 0 0 0 &UIC0 19 8
11028 linux,stdout-path = "/plb/opb/serial@ef600300";
11029 - bootargs = "console=ttyS0,115200";
11032 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/cm5200.dts powerpc.git/arch/powerpc/boot/dts/cm5200.dts
11033 --- linux-2.6.24/arch/powerpc/boot/dts/cm5200.dts 1970-01-01 01:00:00.000000000 +0100
11034 +++ powerpc.git/arch/powerpc/boot/dts/cm5200.dts 2008-01-28 20:25:49.000000000 +0100
11037 + * CM5200 board Device Tree Source
11039 + * Copyright (C) 2007 Semihalf
11040 + * Marian Balakowicz <m8@semihalf.com>
11042 + * This program is free software; you can redistribute it and/or modify it
11043 + * under the terms of the GNU General Public License as published by the
11044 + * Free Software Foundation; either version 2 of the License, or (at your
11045 + * option) any later version.
11049 + * WARNING: Do not depend on this tree layout remaining static just yet.
11050 + * The MPC5200 device tree conventions are still in flux
11051 + * Keep an eye on the linuxppc-dev mailing list for more details
11055 + model = "schindler,cm5200";
11056 + compatible = "schindler,cm5200";
11057 + #address-cells = <1>;
11058 + #size-cells = <1>;
11061 + #address-cells = <1>;
11062 + #size-cells = <0>;
11065 + device_type = "cpu";
11067 + d-cache-line-size = <20>;
11068 + i-cache-line-size = <20>;
11069 + d-cache-size = <4000>; // L1, 16K
11070 + i-cache-size = <4000>; // L1, 16K
11071 + timebase-frequency = <0>; // from bootloader
11072 + bus-frequency = <0>; // from bootloader
11073 + clock-frequency = <0>; // from bootloader
11078 + device_type = "memory";
11079 + reg = <00000000 04000000>; // 64MB
11082 + soc5200@f0000000 {
11083 + model = "fsl,mpc5200b";
11084 + compatible = "fsl,mpc5200b";
11085 + revision = ""; // from bootloader
11086 + device_type = "soc";
11087 + ranges = <0 f0000000 0000c000>;
11088 + reg = <f0000000 00000100>;
11089 + bus-frequency = <0>; // from bootloader
11090 + system-frequency = <0>; // from bootloader
11093 + compatible = "mpc5200b-cdm","mpc5200-cdm";
11097 + mpc5200_pic: pic@500 {
11098 + // 5200 interrupts are encoded into two levels;
11099 + interrupt-controller;
11100 + #interrupt-cells = <3>;
11101 + compatible = "mpc5200b-pic","mpc5200-pic";
11105 + gpt@600 { // General Purpose Timer
11106 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11108 + interrupts = <1 9 0>;
11109 + interrupt-parent = <&mpc5200_pic>;
11113 + gpt@610 { // General Purpose Timer
11114 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11116 + interrupts = <1 a 0>;
11117 + interrupt-parent = <&mpc5200_pic>;
11120 + gpt@620 { // General Purpose Timer
11121 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11123 + interrupts = <1 b 0>;
11124 + interrupt-parent = <&mpc5200_pic>;
11127 + gpt@630 { // General Purpose Timer
11128 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11130 + interrupts = <1 c 0>;
11131 + interrupt-parent = <&mpc5200_pic>;
11134 + gpt@640 { // General Purpose Timer
11135 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11137 + interrupts = <1 d 0>;
11138 + interrupt-parent = <&mpc5200_pic>;
11141 + gpt@650 { // General Purpose Timer
11142 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11144 + interrupts = <1 e 0>;
11145 + interrupt-parent = <&mpc5200_pic>;
11148 + gpt@660 { // General Purpose Timer
11149 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11151 + interrupts = <1 f 0>;
11152 + interrupt-parent = <&mpc5200_pic>;
11155 + gpt@670 { // General Purpose Timer
11156 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11158 + interrupts = <1 10 0>;
11159 + interrupt-parent = <&mpc5200_pic>;
11162 + rtc@800 { // Real time clock
11163 + compatible = "mpc5200b-rtc","mpc5200-rtc";
11165 + interrupts = <1 5 0 1 6 0>;
11166 + interrupt-parent = <&mpc5200_pic>;
11170 + compatible = "mpc5200b-gpio","mpc5200-gpio";
11172 + interrupts = <1 7 0>;
11173 + interrupt-parent = <&mpc5200_pic>;
11177 + compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup";
11179 + interrupts = <1 8 0 0 3 0>;
11180 + interrupt-parent = <&mpc5200_pic>;
11184 + compatible = "mpc5200b-spi","mpc5200-spi";
11186 + interrupts = <2 d 0 2 e 0>;
11187 + interrupt-parent = <&mpc5200_pic>;
11191 + device_type = "usb-ohci-be";
11192 + compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
11194 + interrupts = <2 6 0>;
11195 + interrupt-parent = <&mpc5200_pic>;
11198 + dma-controller@1200 {
11199 + compatible = "mpc5200b-bestcomm","mpc5200-bestcomm";
11201 + interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
11202 + 3 4 0 3 5 0 3 6 0 3 7 0
11203 + 3 8 0 3 9 0 3 a 0 3 b 0
11204 + 3 c 0 3 d 0 3 e 0 3 f 0>;
11205 + interrupt-parent = <&mpc5200_pic>;
11209 + compatible = "mpc5200b-xlb","mpc5200-xlb";
11210 + reg = <1f00 100>;
11213 + serial@2000 { // PSC1
11214 + device_type = "serial";
11215 + compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
11216 + port-number = <0>; // Logical port assignment
11217 + reg = <2000 100>;
11218 + interrupts = <2 1 0>;
11219 + interrupt-parent = <&mpc5200_pic>;
11222 + serial@2200 { // PSC2
11223 + device_type = "serial";
11224 + compatible = "mpc5200-psc-uart";
11225 + port-number = <1>; // Logical port assignment
11226 + reg = <2200 100>;
11227 + interrupts = <2 2 0>;
11228 + interrupt-parent = <&mpc5200_pic>;
11231 + serial@2400 { // PSC3
11232 + device_type = "serial";
11233 + compatible = "mpc5200-psc-uart";
11234 + port-number = <2>; // Logical port assignment
11235 + reg = <2400 100>;
11236 + interrupts = <2 3 0>;
11237 + interrupt-parent = <&mpc5200_pic>;
11240 + serial@2c00 { // PSC6
11241 + device_type = "serial";
11242 + compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
11243 + port-number = <5>; // Logical port assignment
11244 + reg = <2c00 100>;
11245 + interrupts = <2 4 0>;
11246 + interrupt-parent = <&mpc5200_pic>;
11250 + device_type = "network";
11251 + compatible = "mpc5200b-fec","mpc5200-fec";
11252 + reg = <3000 800>;
11253 + local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */
11254 + interrupts = <2 5 0>;
11255 + interrupt-parent = <&mpc5200_pic>;
11259 + compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
11261 + interrupts = <2 10 0>;
11262 + interrupt-parent = <&mpc5200_pic>;
11263 + fsl5200-clocking;
11267 + compatible = "mpc5200b-sram","mpc5200-sram";
11268 + reg = <8000 4000>;
11272 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/ebony.dts powerpc.git/arch/powerpc/boot/dts/ebony.dts
11273 --- linux-2.6.24/arch/powerpc/boot/dts/ebony.dts 2008-01-24 23:58:37.000000000 +0100
11274 +++ powerpc.git/arch/powerpc/boot/dts/ebony.dts 2008-01-28 20:25:49.000000000 +0100
11275 @@ -16,14 +16,22 @@
11277 model = "ibm,ebony";
11278 compatible = "ibm,ebony";
11279 - dcr-parent = <&/cpus/PowerPC,440GP@0>;
11280 + dcr-parent = <&/cpus/cpu@0>;
11283 + ethernet0 = &EMAC0;
11284 + ethernet1 = &EMAC1;
11285 + serial0 = &UART0;
11286 + serial1 = &UART1;
11290 #address-cells = <1>;
11293 - PowerPC,440GP@0 {
11295 device_type = "cpu";
11296 + model = "PowerPC,440GP";
11298 clock-frequency = <0>; // Filled in by zImage
11299 timebase-frequency = <0>; // Filled in by zImage
11300 @@ -150,9 +158,10 @@
11307 - compatible = "ds1743";
11308 + compatible = "ds1743-nvram";
11313 @@ -284,12 +293,43 @@
11317 - PCIX0: pci@1234 {
11318 + PCIX0: pci@20ec00000 {
11319 device_type = "pci";
11321 - reg = <2 0ec00000 8
11324 + #interrupt-cells = <1>;
11325 + #size-cells = <2>;
11326 + #address-cells = <3>;
11327 + compatible = "ibm,plb440gp-pcix", "ibm,plb-pcix";
11329 + reg = <2 0ec00000 8 /* Config space access */
11330 + 0 0 0 /* no IACK cycles */
11331 + 2 0ed00000 4 /* Special cycles */
11332 + 2 0ec80000 f0 /* Internal registers */
11333 + 2 0ec80100 fc>; /* Internal messaging registers */
11335 + /* Outbound ranges, one memory and one IO,
11336 + * later cannot be changed
11338 + ranges = <02000000 0 80000000 00000003 80000000 0 80000000
11339 + 01000000 0 00000000 00000002 08000000 0 00010000>;
11341 + /* Inbound 2GB range starting at 0 */
11342 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
11344 + /* Ebony has all 4 IRQ pins tied together per slot */
11345 + interrupt-map-mask = <f800 0 0 0>;
11346 + interrupt-map = <
11348 + 0800 0 0 0 &UIC0 17 8
11351 + 1000 0 0 0 &UIC0 18 8
11354 + 1800 0 0 0 &UIC0 19 8
11357 + 2000 0 0 0 &UIC0 1a 8
11362 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/ep405.dts powerpc.git/arch/powerpc/boot/dts/ep405.dts
11363 --- linux-2.6.24/arch/powerpc/boot/dts/ep405.dts 1970-01-01 01:00:00.000000000 +0100
11364 +++ powerpc.git/arch/powerpc/boot/dts/ep405.dts 2008-01-28 20:25:49.000000000 +0100
11367 + * Device Tree Source for EP405
11369 + * Copyright 2007 IBM Corp.
11370 + * Benjamin Herrenschmidt <benh@kernel.crashing.org>
11372 + * This file is licensed under the terms of the GNU General Public
11373 + * License version 2. This program is licensed "as is" without
11374 + * any warranty of any kind, whether express or implied.
11378 + #address-cells = <1>;
11379 + #size-cells = <1>;
11381 + compatible = "ep405";
11382 + dcr-parent = <&/cpus/cpu@0>;
11385 + ethernet0 = &EMAC;
11386 + serial0 = &UART0;
11387 + serial1 = &UART1;
11391 + #address-cells = <1>;
11392 + #size-cells = <0>;
11395 + device_type = "cpu";
11396 + model = "PowerPC,405GP";
11398 + clock-frequency = <bebc200>; /* Filled in by zImage */
11399 + timebase-frequency = <0>; /* Filled in by zImage */
11400 + i-cache-line-size = <20>;
11401 + d-cache-line-size = <20>;
11402 + i-cache-size = <4000>;
11403 + d-cache-size = <4000>;
11405 + dcr-access-method = "native";
11410 + device_type = "memory";
11411 + reg = <0 0>; /* Filled in by zImage */
11414 + UIC0: interrupt-controller {
11415 + compatible = "ibm,uic";
11416 + interrupt-controller;
11417 + cell-index = <0>;
11418 + dcr-reg = <0c0 9>;
11419 + #address-cells = <0>;
11420 + #size-cells = <0>;
11421 + #interrupt-cells = <2>;
11425 + compatible = "ibm,plb3";
11426 + #address-cells = <1>;
11427 + #size-cells = <1>;
11429 + clock-frequency = <0>; /* Filled in by zImage */
11431 + SDRAM0: memory-controller {
11432 + compatible = "ibm,sdram-405gp";
11433 + dcr-reg = <010 2>;
11437 + compatible = "ibm,mcmal-405gp", "ibm,mcmal";
11438 + dcr-reg = <180 62>;
11439 + num-tx-chans = <1>;
11440 + num-rx-chans = <1>;
11441 + interrupt-parent = <&UIC0>;
11451 + compatible = "ibm,opb-405gp", "ibm,opb";
11452 + #address-cells = <1>;
11453 + #size-cells = <1>;
11454 + ranges = <ef600000 ef600000 a00000>;
11455 + dcr-reg = <0a0 5>;
11456 + clock-frequency = <0>; /* Filled in by zImage */
11458 + UART0: serial@ef600300 {
11459 + device_type = "serial";
11460 + compatible = "ns16550";
11461 + reg = <ef600300 8>;
11462 + virtual-reg = <ef600300>;
11463 + clock-frequency = <0>; /* Filled in by zImage */
11464 + current-speed = <2580>;
11465 + interrupt-parent = <&UIC0>;
11466 + interrupts = <0 4>;
11469 + UART1: serial@ef600400 {
11470 + device_type = "serial";
11471 + compatible = "ns16550";
11472 + reg = <ef600400 8>;
11473 + virtual-reg = <ef600400>;
11474 + clock-frequency = <0>; /* Filled in by zImage */
11475 + current-speed = <2580>;
11476 + interrupt-parent = <&UIC0>;
11477 + interrupts = <1 4>;
11480 + IIC: i2c@ef600500 {
11481 + compatible = "ibm,iic-405gp", "ibm,iic";
11482 + reg = <ef600500 11>;
11483 + interrupt-parent = <&UIC0>;
11484 + interrupts = <2 4>;
11487 + GPIO: gpio@ef600700 {
11488 + compatible = "ibm,gpio-405gp";
11489 + reg = <ef600700 20>;
11492 + EMAC: ethernet@ef600800 {
11493 + linux,network-index = <0>;
11494 + device_type = "network";
11495 + compatible = "ibm,emac-405gp", "ibm,emac";
11496 + interrupt-parent = <&UIC0>;
11498 + f 4 /* Ethernet */
11499 + 9 4 /* Ethernet Wake Up */>;
11500 + local-mac-address = [000000000000]; /* Filled in by zImage */
11501 + reg = <ef600800 70>;
11502 + mal-device = <&MAL>;
11503 + mal-tx-channel = <0>;
11504 + mal-rx-channel = <0>;
11505 + cell-index = <0>;
11506 + max-frame-size = <5dc>;
11507 + rx-fifo-size = <1000>;
11508 + tx-fifo-size = <800>;
11509 + phy-mode = "rmii";
11510 + phy-map = <00000000>;
11516 + compatible = "ibm,ebc-405gp", "ibm,ebc";
11517 + dcr-reg = <012 2>;
11518 + #address-cells = <2>;
11519 + #size-cells = <1>;
11522 + /* The ranges property is supplied by the bootwrapper
11523 + * and is based on the firmware's configuration of the
11526 + clock-frequency = <0>; /* Filled in by zImage */
11528 + /* NVRAM and RTC */
11530 + compatible = "ds1742";
11531 + reg = <4 200000 0>; /* size fixed up by zImage */
11534 + /* "BCSR" CPLD contains a PCI irq controller */
11536 + compatible = "ep405-bcsr";
11538 + interrupt-controller;
11539 + /* Routing table */
11540 + irq-routing = [ 00 /* SYSERR */
11544 + 02 /* NB PCIIRQ mux ? */
11545 + 03 /* SB Winbond 8259 ? */
11546 + 04 /* Serial Ring */
11547 + 05 /* USB (ep405pc) */
11555 + 07]; /* Reserved */
11559 + PCI0: pci@ec000000 {
11560 + device_type = "pci";
11561 + #interrupt-cells = <1>;
11562 + #size-cells = <2>;
11563 + #address-cells = <3>;
11564 + compatible = "ibm,plb405gp-pci", "ibm,plb-pci";
11566 + reg = <eec00000 8 /* Config space access */
11567 + eed80000 4 /* IACK */
11568 + eed80000 4 /* Special cycle */
11569 + ef480000 40>; /* Internal registers */
11571 + /* Outbound ranges, one memory and one IO,
11572 + * later cannot be changed. Chip supports a second
11573 + * IO range but we don't use it for now
11575 + ranges = <02000000 0 80000000 80000000 0 20000000
11576 + 01000000 0 00000000 e8000000 0 00010000>;
11578 + /* Inbound 2GB range starting at 0 */
11579 + dma-ranges = <42000000 0 0 0 0 80000000>;
11581 + /* That's all I know about IRQs on that thing ... */
11582 + interrupt-map-mask = <f800 0 0 0>;
11583 + interrupt-map = <
11585 + 7000 0 0 0 &UIC0 1e 8 /* IRQ5 */
11591 + linux,stdout-path = "/plb/opb/serial@ef600300";
11594 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/ep8248e.dts powerpc.git/arch/powerpc/boot/dts/ep8248e.dts
11595 --- linux-2.6.24/arch/powerpc/boot/dts/ep8248e.dts 1970-01-01 01:00:00.000000000 +0100
11596 +++ powerpc.git/arch/powerpc/boot/dts/ep8248e.dts 2008-01-28 20:25:49.000000000 +0100
11599 + * Device Tree for the Embedded Planet EP8248E board running PlanetCore.
11601 + * Copyright 2007 Freescale Semiconductor Inc.
11603 + * This program is free software; you can redistribute it and/or modify it
11604 + * under the terms of the GNU General Public License as published by the
11605 + * Free Software Foundation; either version 2 of the License, or (at your
11606 + * option) any later version.
11611 + model = "EP8248E";
11612 + compatible = "fsl,ep8248e";
11613 + #address-cells = <1>;
11614 + #size-cells = <1>;
11617 + planetcore-SMC1 = &smc1;
11618 + planetcore-SCC1 = &scc1;
11619 + ethernet0 = ð0;
11620 + ethernet1 = ð1;
11626 + #address-cells = <1>;
11627 + #size-cells = <0>;
11630 + device_type = "cpu";
11632 + d-cache-line-size = <32>;
11633 + i-cache-line-size = <32>;
11634 + d-cache-size = <16384>;
11635 + i-cache-size = <16384>;
11636 + timebase-frequency = <0>;
11637 + clock-frequency = <0>;
11641 + localbus@f0010100 {
11642 + compatible = "fsl,mpc8248-localbus",
11643 + "fsl,pq2-localbus",
11645 + #address-cells = <2>;
11646 + #size-cells = <1>;
11647 + reg = <0xf0010100 0x40>;
11649 + ranges = <0 0 0xfc000000 0x04000000
11650 + 1 0 0xfa000000 0x00008000>;
11652 + flash@0,3800000 {
11653 + compatible = "cfi-flash";
11654 + reg = <0 0x3800000 0x800000>;
11655 + bank-width = <4>;
11656 + device-width = <2>;
11660 + #address-cells = <2>;
11661 + #size-cells = <1>;
11662 + reg = <1 0 0x10>;
11663 + compatible = "fsl,ep8248e-bcsr";
11667 + device_type = "mdio";
11668 + compatible = "fsl,ep8248e-mdio-bitbang";
11669 + #address-cells = <1>;
11670 + #size-cells = <0>;
11673 + PHY0: ethernet-phy@0 {
11674 + interrupt-parent = <&PIC>;
11676 + device_type = "ethernet-phy";
11679 + PHY1: ethernet-phy@1 {
11680 + interrupt-parent = <&PIC>;
11682 + device_type = "ethernet-phy";
11689 + device_type = "memory";
11694 + #address-cells = <1>;
11695 + #size-cells = <1>;
11696 + compatible = "fsl,mpc8248-immr", "fsl,pq2-soc", "simple-bus";
11697 + ranges = <0x00000000 0xf0000000 0x00053000>;
11699 + // Temporary until code stops depending on it.
11700 + device_type = "soc";
11702 + // Temporary -- will go away once kernel uses ranges for get_immrbase().
11703 + reg = <0xf0000000 0x00053000>;
11706 + #address-cells = <1>;
11707 + #size-cells = <1>;
11708 + #interrupt-cells = <2>;
11709 + compatible = "fsl,mpc8248-cpm", "fsl,cpm2",
11711 + reg = <0x119c0 0x30>;
11715 + #address-cells = <1>;
11716 + #size-cells = <1>;
11717 + ranges = <0 0 0x10000>;
11720 + compatible = "fsl,cpm-muram-data";
11721 + reg = <0 0x1100 0x1140
11722 + 0xec0 0x9800 0x800>;
11727 + compatible = "fsl,mpc8248-brg",
11730 + reg = <0x119f0 0x10 0x115f0 0x10>;
11733 + /* Monitor port/SMC1 */
11734 + smc1: serial@11a80 {
11735 + device_type = "serial";
11736 + compatible = "fsl,mpc8248-smc-uart",
11737 + "fsl,cpm2-smc-uart";
11738 + reg = <0x11a80 0x20 0x1100 0x40>;
11739 + interrupts = <4 8>;
11740 + interrupt-parent = <&PIC>;
11741 + fsl,cpm-brg = <7>;
11742 + fsl,cpm-command = <0x1d000000>;
11743 + linux,planetcore-label = "SMC1";
11746 + /* "Serial" port/SCC1 */
11747 + scc1: serial@11a00 {
11748 + device_type = "serial";
11749 + compatible = "fsl,mpc8248-scc-uart",
11750 + "fsl,cpm2-scc-uart";
11751 + reg = <0x11a00 0x20 0x8000 0x100>;
11752 + interrupts = <40 8>;
11753 + interrupt-parent = <&PIC>;
11754 + fsl,cpm-brg = <1>;
11755 + fsl,cpm-command = <0x00800000>;
11756 + linux,planetcore-label = "SCC1";
11759 + eth0: ethernet@11300 {
11760 + device_type = "network";
11761 + compatible = "fsl,mpc8248-fcc-enet",
11762 + "fsl,cpm2-fcc-enet";
11763 + reg = <0x11300 0x20 0x8400 0x100 0x11390 1>;
11764 + local-mac-address = [ 00 00 00 00 00 00 ];
11765 + interrupts = <32 8>;
11766 + interrupt-parent = <&PIC>;
11767 + phy-handle = <&PHY0>;
11768 + linux,network-index = <0>;
11769 + fsl,cpm-command = <0x12000300>;
11772 + eth1: ethernet@11320 {
11773 + device_type = "network";
11774 + compatible = "fsl,mpc8248-fcc-enet",
11775 + "fsl,cpm2-fcc-enet";
11776 + reg = <0x11320 0x20 0x8500 0x100 0x113b0 1>;
11777 + local-mac-address = [ 00 00 00 00 00 00 ];
11778 + interrupts = <33 8>;
11779 + interrupt-parent = <&PIC>;
11780 + phy-handle = <&PHY1>;
11781 + linux,network-index = <1>;
11782 + fsl,cpm-command = <0x16200300>;
11786 + #address-cells = <1>;
11787 + #size-cells = <0>;
11788 + compatible = "fsl,mpc8248-usb",
11790 + reg = <0x11b60 0x18 0x8b00 0x100>;
11791 + interrupt-parent = <&PIC>;
11792 + interrupts = <11 8>;
11793 + fsl,cpm-command = <0x2e600000>;
11797 + PIC: interrupt-controller@10c00 {
11798 + #interrupt-cells = <2>;
11799 + interrupt-controller;
11800 + reg = <0x10c00 0x80>;
11801 + compatible = "fsl,mpc8248-pic", "fsl,pq2-pic";
11805 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/haleakala.dts powerpc.git/arch/powerpc/boot/dts/haleakala.dts
11806 --- linux-2.6.24/arch/powerpc/boot/dts/haleakala.dts 1970-01-01 01:00:00.000000000 +0100
11807 +++ powerpc.git/arch/powerpc/boot/dts/haleakala.dts 2008-01-28 20:25:49.000000000 +0100
11810 + * Device Tree Source for AMCC Haleakala (405EXr)
11812 + * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
11814 + * This file is licensed under the terms of the GNU General Public
11815 + * License version 2. This program is licensed "as is" without
11816 + * any warranty of any kind, whether express or implied.
11820 + #address-cells = <1>;
11821 + #size-cells = <1>;
11822 + model = "amcc,haleakala";
11823 + compatible = "amcc,kilauea";
11824 + dcr-parent = <&/cpus/cpu@0>;
11827 + ethernet0 = &EMAC0;
11828 + serial0 = &UART0;
11829 + serial1 = &UART1;
11833 + #address-cells = <1>;
11834 + #size-cells = <0>;
11837 + device_type = "cpu";
11838 + model = "PowerPC,405EXr";
11840 + clock-frequency = <0>; /* Filled in by U-Boot */
11841 + timebase-frequency = <0>; /* Filled in by U-Boot */
11842 + i-cache-line-size = <20>;
11843 + d-cache-line-size = <20>;
11844 + i-cache-size = <4000>; /* 16 kB */
11845 + d-cache-size = <4000>; /* 16 kB */
11847 + dcr-access-method = "native";
11852 + device_type = "memory";
11853 + reg = <0 0>; /* Filled in by U-Boot */
11856 + UIC0: interrupt-controller {
11857 + compatible = "ibm,uic-405exr", "ibm,uic";
11858 + interrupt-controller;
11859 + cell-index = <0>;
11860 + dcr-reg = <0c0 009>;
11861 + #address-cells = <0>;
11862 + #size-cells = <0>;
11863 + #interrupt-cells = <2>;
11866 + UIC1: interrupt-controller1 {
11867 + compatible = "ibm,uic-405exr","ibm,uic";
11868 + interrupt-controller;
11869 + cell-index = <1>;
11870 + dcr-reg = <0d0 009>;
11871 + #address-cells = <0>;
11872 + #size-cells = <0>;
11873 + #interrupt-cells = <2>;
11874 + interrupts = <1e 4 1f 4>; /* cascade */
11875 + interrupt-parent = <&UIC0>;
11878 + UIC2: interrupt-controller2 {
11879 + compatible = "ibm,uic-405exr","ibm,uic";
11880 + interrupt-controller;
11881 + cell-index = <2>;
11882 + dcr-reg = <0e0 009>;
11883 + #address-cells = <0>;
11884 + #size-cells = <0>;
11885 + #interrupt-cells = <2>;
11886 + interrupts = <1c 4 1d 4>; /* cascade */
11887 + interrupt-parent = <&UIC0>;
11891 + compatible = "ibm,plb-405exr", "ibm,plb4";
11892 + #address-cells = <1>;
11893 + #size-cells = <1>;
11895 + clock-frequency = <0>; /* Filled in by U-Boot */
11897 + SDRAM0: memory-controller {
11898 + compatible = "ibm,sdram-405exr";
11899 + dcr-reg = <010 2>;
11903 + compatible = "ibm,mcmal-405exr", "ibm,mcmal2";
11904 + dcr-reg = <180 62>;
11905 + num-tx-chans = <2>;
11906 + num-rx-chans = <2>;
11907 + interrupt-parent = <&MAL0>;
11908 + interrupts = <0 1 2 3 4>;
11909 + #interrupt-cells = <1>;
11910 + #address-cells = <0>;
11911 + #size-cells = <0>;
11912 + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
11913 + /*RXEOB*/ 1 &UIC0 b 4
11914 + /*SERR*/ 2 &UIC1 0 4
11915 + /*TXDE*/ 3 &UIC1 1 4
11916 + /*RXDE*/ 4 &UIC1 2 4>;
11917 + interrupt-map-mask = <ffffffff>;
11921 + compatible = "ibm,opb-405exr", "ibm,opb";
11922 + #address-cells = <1>;
11923 + #size-cells = <1>;
11924 + ranges = <80000000 80000000 10000000
11925 + ef600000 ef600000 a00000
11926 + f0000000 f0000000 10000000>;
11927 + dcr-reg = <0a0 5>;
11928 + clock-frequency = <0>; /* Filled in by U-Boot */
11931 + compatible = "ibm,ebc-405exr", "ibm,ebc";
11932 + dcr-reg = <012 2>;
11933 + #address-cells = <2>;
11934 + #size-cells = <1>;
11935 + clock-frequency = <0>; /* Filled in by U-Boot */
11936 + /* ranges property is supplied by U-Boot */
11937 + interrupts = <5 1>;
11938 + interrupt-parent = <&UIC1>;
11941 + compatible = "amd,s29gl512n", "cfi-flash";
11942 + bank-width = <2>;
11943 + reg = <0 000000 4000000>;
11944 + #address-cells = <1>;
11945 + #size-cells = <1>;
11947 + label = "kernel";
11948 + reg = <0 200000>;
11950 + partition@200000 {
11952 + reg = <200000 200000>;
11954 + partition@400000 {
11956 + reg = <400000 3b60000>;
11958 + partition@3f60000 {
11960 + reg = <3f60000 40000>;
11962 + partition@3fa0000 {
11963 + label = "u-boot";
11964 + reg = <3fa0000 60000>;
11969 + UART0: serial@ef600200 {
11970 + device_type = "serial";
11971 + compatible = "ns16550";
11972 + reg = <ef600200 8>;
11973 + virtual-reg = <ef600200>;
11974 + clock-frequency = <0>; /* Filled in by U-Boot */
11975 + current-speed = <0>;
11976 + interrupt-parent = <&UIC0>;
11977 + interrupts = <1a 4>;
11980 + UART1: serial@ef600300 {
11981 + device_type = "serial";
11982 + compatible = "ns16550";
11983 + reg = <ef600300 8>;
11984 + virtual-reg = <ef600300>;
11985 + clock-frequency = <0>; /* Filled in by U-Boot */
11986 + current-speed = <0>;
11987 + interrupt-parent = <&UIC0>;
11988 + interrupts = <1 4>;
11991 + IIC0: i2c@ef600400 {
11992 + compatible = "ibm,iic-405exr", "ibm,iic";
11993 + reg = <ef600400 14>;
11994 + interrupt-parent = <&UIC0>;
11995 + interrupts = <2 4>;
11998 + IIC1: i2c@ef600500 {
11999 + compatible = "ibm,iic-405exr", "ibm,iic";
12000 + reg = <ef600500 14>;
12001 + interrupt-parent = <&UIC0>;
12002 + interrupts = <7 4>;
12006 + RGMII0: emac-rgmii@ef600b00 {
12007 + compatible = "ibm,rgmii-405exr", "ibm,rgmii";
12008 + reg = <ef600b00 104>;
12012 + EMAC0: ethernet@ef600900 {
12013 + linux,network-index = <0>;
12014 + device_type = "network";
12015 + compatible = "ibm,emac-405exr", "ibm,emac4";
12016 + interrupt-parent = <&EMAC0>;
12017 + interrupts = <0 1>;
12018 + #interrupt-cells = <1>;
12019 + #address-cells = <0>;
12020 + #size-cells = <0>;
12021 + interrupt-map = </*Status*/ 0 &UIC0 18 4
12022 + /*Wake*/ 1 &UIC1 1d 4>;
12023 + reg = <ef600900 70>;
12024 + local-mac-address = [000000000000]; /* Filled in by U-Boot */
12025 + mal-device = <&MAL0>;
12026 + mal-tx-channel = <0>;
12027 + mal-rx-channel = <0>;
12028 + cell-index = <0>;
12029 + max-frame-size = <5dc>;
12030 + rx-fifo-size = <1000>;
12031 + tx-fifo-size = <800>;
12032 + phy-mode = "rgmii";
12033 + phy-map = <00000000>;
12034 + rgmii-device = <&RGMII0>;
12035 + rgmii-channel = <0>;
12036 + has-inverted-stacr-oc;
12037 + has-new-stacr-staopc;
12041 + PCIE0: pciex@0a0000000 {
12042 + device_type = "pci";
12043 + #interrupt-cells = <1>;
12044 + #size-cells = <2>;
12045 + #address-cells = <3>;
12046 + compatible = "ibm,plb-pciex-405exr", "ibm,plb-pciex";
12048 + port = <0>; /* port number */
12049 + reg = <a0000000 20000000 /* Config space access */
12050 + ef000000 00001000>; /* Registers */
12051 + dcr-reg = <040 020>;
12052 + sdr-base = <400>;
12054 + /* Outbound ranges, one memory and one IO,
12055 + * later cannot be changed
12057 + ranges = <02000000 0 80000000 90000000 0 08000000
12058 + 01000000 0 00000000 e0000000 0 00010000>;
12060 + /* Inbound 2GB range starting at 0 */
12061 + dma-ranges = <42000000 0 0 0 0 80000000>;
12063 + /* This drives busses 0x00 to 0x3f */
12064 + bus-range = <00 3f>;
12066 + /* Legacy interrupts (note the weird polarity, the bridge seems
12067 + * to invert PCIe legacy interrupts).
12068 + * We are de-swizzling here because the numbers are actually for
12069 + * port of the root complex virtual P2P bridge. But I want
12070 + * to avoid putting a node for it in the tree, so the numbers
12071 + * below are basically de-swizzled numbers.
12072 + * The real slot is on idsel 0, so the swizzling is 1:1
12074 + interrupt-map-mask = <0000 0 0 7>;
12075 + interrupt-map = <
12076 + 0000 0 0 1 &UIC2 0 4 /* swizzled int A */
12077 + 0000 0 0 2 &UIC2 1 4 /* swizzled int B */
12078 + 0000 0 0 3 &UIC2 2 4 /* swizzled int C */
12079 + 0000 0 0 4 &UIC2 3 4 /* swizzled int D */>;
12083 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/katmai.dts powerpc.git/arch/powerpc/boot/dts/katmai.dts
12084 --- linux-2.6.24/arch/powerpc/boot/dts/katmai.dts 1970-01-01 01:00:00.000000000 +0100
12085 +++ powerpc.git/arch/powerpc/boot/dts/katmai.dts 2008-01-28 20:25:49.000000000 +0100
12088 + * Device Tree Source for AMCC Katmai eval board
12090 + * Copyright (c) 2006, 2007 IBM Corp.
12091 + * Benjamin Herrenschmidt <benh@kernel.crashing.org>
12093 + * Copyright (c) 2006, 2007 IBM Corp.
12094 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
12096 + * This file is licensed under the terms of the GNU General Public
12097 + * License version 2. This program is licensed "as is" without
12098 + * any warranty of any kind, whether express or implied.
12102 + #address-cells = <2>;
12103 + #size-cells = <1>;
12104 + model = "amcc,katmai";
12105 + compatible = "amcc,katmai";
12106 + dcr-parent = <&/cpus/cpu@0>;
12109 + ethernet0 = &EMAC0;
12110 + serial0 = &UART0;
12111 + serial1 = &UART1;
12112 + serial2 = &UART2;
12116 + #address-cells = <1>;
12117 + #size-cells = <0>;
12120 + device_type = "cpu";
12121 + model = "PowerPC,440SPe";
12123 + clock-frequency = <0>; /* Filled in by zImage */
12124 + timebase-frequency = <0>; /* Filled in by zImage */
12125 + i-cache-line-size = <20>;
12126 + d-cache-line-size = <20>;
12127 + i-cache-size = <20000>;
12128 + d-cache-size = <20000>;
12130 + dcr-access-method = "native";
12135 + device_type = "memory";
12136 + reg = <0 0 0>; /* Filled in by zImage */
12139 + UIC0: interrupt-controller0 {
12140 + compatible = "ibm,uic-440spe","ibm,uic";
12141 + interrupt-controller;
12142 + cell-index = <0>;
12143 + dcr-reg = <0c0 009>;
12144 + #address-cells = <0>;
12145 + #size-cells = <0>;
12146 + #interrupt-cells = <2>;
12149 + UIC1: interrupt-controller1 {
12150 + compatible = "ibm,uic-440spe","ibm,uic";
12151 + interrupt-controller;
12152 + cell-index = <1>;
12153 + dcr-reg = <0d0 009>;
12154 + #address-cells = <0>;
12155 + #size-cells = <0>;
12156 + #interrupt-cells = <2>;
12157 + interrupts = <1e 4 1f 4>; /* cascade */
12158 + interrupt-parent = <&UIC0>;
12161 + UIC2: interrupt-controller2 {
12162 + compatible = "ibm,uic-440spe","ibm,uic";
12163 + interrupt-controller;
12164 + cell-index = <2>;
12165 + dcr-reg = <0e0 009>;
12166 + #address-cells = <0>;
12167 + #size-cells = <0>;
12168 + #interrupt-cells = <2>;
12169 + interrupts = <a 4 b 4>; /* cascade */
12170 + interrupt-parent = <&UIC0>;
12173 + UIC3: interrupt-controller3 {
12174 + compatible = "ibm,uic-440spe","ibm,uic";
12175 + interrupt-controller;
12176 + cell-index = <3>;
12177 + dcr-reg = <0f0 009>;
12178 + #address-cells = <0>;
12179 + #size-cells = <0>;
12180 + #interrupt-cells = <2>;
12181 + interrupts = <10 4 11 4>; /* cascade */
12182 + interrupt-parent = <&UIC0>;
12186 + compatible = "ibm,sdr-440spe";
12187 + dcr-reg = <00e 002>;
12191 + compatible = "ibm,cpr-440spe";
12192 + dcr-reg = <00c 002>;
12196 + compatible = "ibm,plb-440spe", "ibm,plb-440gp", "ibm,plb4";
12197 + #address-cells = <2>;
12198 + #size-cells = <1>;
12200 + clock-frequency = <0>; /* Filled in by zImage */
12203 + compatible = "ibm,sdram-440spe", "ibm,sdram-405gp";
12204 + dcr-reg = <010 2>;
12208 + compatible = "ibm,mcmal-440spe", "ibm,mcmal2";
12209 + dcr-reg = <180 62>;
12210 + num-tx-chans = <2>;
12211 + num-rx-chans = <1>;
12212 + interrupt-parent = <&MAL0>;
12213 + interrupts = <0 1 2 3 4>;
12214 + #interrupt-cells = <1>;
12215 + #address-cells = <0>;
12216 + #size-cells = <0>;
12217 + interrupt-map = </*TXEOB*/ 0 &UIC1 6 4
12218 + /*RXEOB*/ 1 &UIC1 7 4
12219 + /*SERR*/ 2 &UIC1 1 4
12220 + /*TXDE*/ 3 &UIC1 2 4
12221 + /*RXDE*/ 4 &UIC1 3 4>;
12225 + compatible = "ibm,opb-440spe", "ibm,opb-440gp", "ibm,opb";
12226 + #address-cells = <1>;
12227 + #size-cells = <1>;
12228 + ranges = <00000000 4 e0000000 20000000>;
12229 + clock-frequency = <0>; /* Filled in by zImage */
12232 + compatible = "ibm,ebc-440spe", "ibm,ebc-440gp", "ibm,ebc";
12233 + dcr-reg = <012 2>;
12234 + #address-cells = <2>;
12235 + #size-cells = <1>;
12236 + clock-frequency = <0>; /* Filled in by zImage */
12237 + interrupts = <5 1>;
12238 + interrupt-parent = <&UIC1>;
12241 + UART0: serial@10000200 {
12242 + device_type = "serial";
12243 + compatible = "ns16550";
12244 + reg = <10000200 8>;
12245 + virtual-reg = <a0000200>;
12246 + clock-frequency = <0>; /* Filled in by zImage */
12247 + current-speed = <1c200>;
12248 + interrupt-parent = <&UIC0>;
12249 + interrupts = <0 4>;
12252 + UART1: serial@10000300 {
12253 + device_type = "serial";
12254 + compatible = "ns16550";
12255 + reg = <10000300 8>;
12256 + virtual-reg = <a0000300>;
12257 + clock-frequency = <0>;
12258 + current-speed = <0>;
12259 + interrupt-parent = <&UIC0>;
12260 + interrupts = <1 4>;
12264 + UART2: serial@10000600 {
12265 + device_type = "serial";
12266 + compatible = "ns16550";
12267 + reg = <10000600 8>;
12268 + virtual-reg = <a0000600>;
12269 + clock-frequency = <0>;
12270 + current-speed = <0>;
12271 + interrupt-parent = <&UIC1>;
12272 + interrupts = <5 4>;
12275 + IIC0: i2c@10000400 {
12276 + device_type = "i2c";
12277 + compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
12278 + reg = <10000400 14>;
12279 + interrupt-parent = <&UIC0>;
12280 + interrupts = <2 4>;
12283 + IIC1: i2c@10000500 {
12284 + device_type = "i2c";
12285 + compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
12286 + reg = <10000500 14>;
12287 + interrupt-parent = <&UIC0>;
12288 + interrupts = <3 4>;
12291 + EMAC0: ethernet@10000800 {
12292 + linux,network-index = <0>;
12293 + device_type = "network";
12294 + compatible = "ibm,emac-440spe", "ibm,emac4";
12295 + interrupt-parent = <&UIC1>;
12296 + interrupts = <1c 4 1d 4>;
12297 + reg = <10000800 70>;
12298 + local-mac-address = [000000000000];
12299 + mal-device = <&MAL0>;
12300 + mal-tx-channel = <0>;
12301 + mal-rx-channel = <0>;
12302 + cell-index = <0>;
12303 + max-frame-size = <5dc>;
12304 + rx-fifo-size = <1000>;
12305 + tx-fifo-size = <800>;
12306 + phy-mode = "gmii";
12307 + phy-map = <00000000>;
12308 + has-inverted-stacr-oc;
12309 + has-new-stacr-staopc;
12313 + PCIX0: pci@c0ec00000 {
12314 + device_type = "pci";
12315 + #interrupt-cells = <1>;
12316 + #size-cells = <2>;
12317 + #address-cells = <3>;
12318 + compatible = "ibm,plb-pcix-440spe", "ibm,plb-pcix";
12320 + large-inbound-windows;
12322 + reg = <c 0ec00000 8 /* Config space access */
12323 + 0 0 0 /* no IACK cycles */
12324 + c 0ed00000 4 /* Special cycles */
12325 + c 0ec80000 100 /* Internal registers */
12326 + c 0ec80100 fc>; /* Internal messaging registers */
12328 + /* Outbound ranges, one memory and one IO,
12329 + * later cannot be changed
12331 + ranges = <02000000 0 80000000 0000000d 80000000 0 80000000
12332 + 01000000 0 00000000 0000000c 08000000 0 00010000>;
12334 + /* Inbound 2GB range starting at 0 */
12335 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12337 + /* This drives busses 0 to 0xf */
12338 + bus-range = <0 f>;
12341 + * On Katmai, the following PCI-X interrupts signals
12342 + * have to be enabled via jumpers (only INTA is
12343 + * enabled per default):
12349 + interrupt-map-mask = <f800 0 0 7>;
12350 + interrupt-map = <
12352 + 0800 0 0 1 &UIC1 14 8
12353 + 0800 0 0 2 &UIC1 13 8
12354 + 0800 0 0 3 &UIC1 12 8
12355 + 0800 0 0 4 &UIC1 11 8
12359 + PCIE0: pciex@d00000000 {
12360 + device_type = "pci";
12361 + #interrupt-cells = <1>;
12362 + #size-cells = <2>;
12363 + #address-cells = <3>;
12364 + compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
12366 + port = <0>; /* port number */
12367 + reg = <d 00000000 20000000 /* Config space access */
12368 + c 10000000 00001000>; /* Registers */
12369 + dcr-reg = <100 020>;
12370 + sdr-base = <300>;
12372 + /* Outbound ranges, one memory and one IO,
12373 + * later cannot be changed
12375 + ranges = <02000000 0 80000000 0000000e 00000000 0 80000000
12376 + 01000000 0 00000000 0000000f 80000000 0 00010000>;
12378 + /* Inbound 2GB range starting at 0 */
12379 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12381 + /* This drives busses 10 to 0x1f */
12382 + bus-range = <10 1f>;
12384 + /* Legacy interrupts (note the weird polarity, the bridge seems
12385 + * to invert PCIe legacy interrupts).
12386 + * We are de-swizzling here because the numbers are actually for
12387 + * port of the root complex virtual P2P bridge. But I want
12388 + * to avoid putting a node for it in the tree, so the numbers
12389 + * below are basically de-swizzled numbers.
12390 + * The real slot is on idsel 0, so the swizzling is 1:1
12392 + interrupt-map-mask = <0000 0 0 7>;
12393 + interrupt-map = <
12394 + 0000 0 0 1 &UIC3 0 4 /* swizzled int A */
12395 + 0000 0 0 2 &UIC3 1 4 /* swizzled int B */
12396 + 0000 0 0 3 &UIC3 2 4 /* swizzled int C */
12397 + 0000 0 0 4 &UIC3 3 4 /* swizzled int D */>;
12400 + PCIE1: pciex@d20000000 {
12401 + device_type = "pci";
12402 + #interrupt-cells = <1>;
12403 + #size-cells = <2>;
12404 + #address-cells = <3>;
12405 + compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
12407 + port = <1>; /* port number */
12408 + reg = <d 20000000 20000000 /* Config space access */
12409 + c 10001000 00001000>; /* Registers */
12410 + dcr-reg = <120 020>;
12411 + sdr-base = <340>;
12413 + /* Outbound ranges, one memory and one IO,
12414 + * later cannot be changed
12416 + ranges = <02000000 0 80000000 0000000e 80000000 0 80000000
12417 + 01000000 0 00000000 0000000f 80010000 0 00010000>;
12419 + /* Inbound 2GB range starting at 0 */
12420 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12422 + /* This drives busses 10 to 0x1f */
12423 + bus-range = <20 2f>;
12425 + /* Legacy interrupts (note the weird polarity, the bridge seems
12426 + * to invert PCIe legacy interrupts).
12427 + * We are de-swizzling here because the numbers are actually for
12428 + * port of the root complex virtual P2P bridge. But I want
12429 + * to avoid putting a node for it in the tree, so the numbers
12430 + * below are basically de-swizzled numbers.
12431 + * The real slot is on idsel 0, so the swizzling is 1:1
12433 + interrupt-map-mask = <0000 0 0 7>;
12434 + interrupt-map = <
12435 + 0000 0 0 1 &UIC3 4 4 /* swizzled int A */
12436 + 0000 0 0 2 &UIC3 5 4 /* swizzled int B */
12437 + 0000 0 0 3 &UIC3 6 4 /* swizzled int C */
12438 + 0000 0 0 4 &UIC3 7 4 /* swizzled int D */>;
12441 + PCIE2: pciex@d40000000 {
12442 + device_type = "pci";
12443 + #interrupt-cells = <1>;
12444 + #size-cells = <2>;
12445 + #address-cells = <3>;
12446 + compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
12448 + port = <2>; /* port number */
12449 + reg = <d 40000000 20000000 /* Config space access */
12450 + c 10002000 00001000>; /* Registers */
12451 + dcr-reg = <140 020>;
12452 + sdr-base = <370>;
12454 + /* Outbound ranges, one memory and one IO,
12455 + * later cannot be changed
12457 + ranges = <02000000 0 80000000 0000000f 00000000 0 80000000
12458 + 01000000 0 00000000 0000000f 80020000 0 00010000>;
12460 + /* Inbound 2GB range starting at 0 */
12461 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12463 + /* This drives busses 10 to 0x1f */
12464 + bus-range = <30 3f>;
12466 + /* Legacy interrupts (note the weird polarity, the bridge seems
12467 + * to invert PCIe legacy interrupts).
12468 + * We are de-swizzling here because the numbers are actually for
12469 + * port of the root complex virtual P2P bridge. But I want
12470 + * to avoid putting a node for it in the tree, so the numbers
12471 + * below are basically de-swizzled numbers.
12472 + * The real slot is on idsel 0, so the swizzling is 1:1
12474 + interrupt-map-mask = <0000 0 0 7>;
12475 + interrupt-map = <
12476 + 0000 0 0 1 &UIC3 8 4 /* swizzled int A */
12477 + 0000 0 0 2 &UIC3 9 4 /* swizzled int B */
12478 + 0000 0 0 3 &UIC3 a 4 /* swizzled int C */
12479 + 0000 0 0 4 &UIC3 b 4 /* swizzled int D */>;
12484 + linux,stdout-path = "/plb/opb/serial@10000200";
12487 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/kilauea.dts powerpc.git/arch/powerpc/boot/dts/kilauea.dts
12488 --- linux-2.6.24/arch/powerpc/boot/dts/kilauea.dts 2008-01-24 23:58:37.000000000 +0100
12489 +++ powerpc.git/arch/powerpc/boot/dts/kilauea.dts 2008-01-28 20:25:49.000000000 +0100
12490 @@ -13,14 +13,22 @@
12492 model = "amcc,kilauea";
12493 compatible = "amcc,kilauea";
12494 - dcr-parent = <&/cpus/PowerPC,405EX@0>;
12495 + dcr-parent = <&/cpus/cpu@0>;
12498 + ethernet0 = &EMAC0;
12499 + ethernet1 = &EMAC1;
12500 + serial0 = &UART0;
12501 + serial1 = &UART1;
12505 #address-cells = <1>;
12508 - PowerPC,405EX@0 {
12510 device_type = "cpu";
12511 + model = "PowerPC,405EX";
12513 clock-frequency = <0>; /* Filled in by U-Boot */
12514 timebase-frequency = <0>; /* Filled in by U-Boot */
12515 @@ -194,6 +202,7 @@
12516 device_type = "rgmii-interface";
12517 compatible = "ibm,rgmii-405ex", "ibm,rgmii";
12518 reg = <ef600b00 104>;
12522 EMAC0: ethernet@ef600900 {
12523 @@ -220,6 +229,8 @@
12524 phy-map = <00000000>;
12525 rgmii-device = <&RGMII0>;
12526 rgmii-channel = <0>;
12527 + has-inverted-stacr-oc;
12528 + has-new-stacr-staopc;
12531 EMAC1: ethernet@ef600a00 {
12532 @@ -246,7 +257,91 @@
12533 phy-map = <00000000>;
12534 rgmii-device = <&RGMII0>;
12535 rgmii-channel = <1>;
12536 + has-inverted-stacr-oc;
12537 + has-new-stacr-staopc;
12541 + PCIE0: pciex@0a0000000 {
12542 + device_type = "pci";
12543 + #interrupt-cells = <1>;
12544 + #size-cells = <2>;
12545 + #address-cells = <3>;
12546 + compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
12548 + port = <0>; /* port number */
12549 + reg = <a0000000 20000000 /* Config space access */
12550 + ef000000 00001000>; /* Registers */
12551 + dcr-reg = <040 020>;
12552 + sdr-base = <400>;
12554 + /* Outbound ranges, one memory and one IO,
12555 + * later cannot be changed
12557 + ranges = <02000000 0 80000000 90000000 0 08000000
12558 + 01000000 0 00000000 e0000000 0 00010000>;
12560 + /* Inbound 2GB range starting at 0 */
12561 + dma-ranges = <42000000 0 0 0 0 80000000>;
12563 + /* This drives busses 0x00 to 0x3f */
12564 + bus-range = <00 3f>;
12566 + /* Legacy interrupts (note the weird polarity, the bridge seems
12567 + * to invert PCIe legacy interrupts).
12568 + * We are de-swizzling here because the numbers are actually for
12569 + * port of the root complex virtual P2P bridge. But I want
12570 + * to avoid putting a node for it in the tree, so the numbers
12571 + * below are basically de-swizzled numbers.
12572 + * The real slot is on idsel 0, so the swizzling is 1:1
12574 + interrupt-map-mask = <0000 0 0 7>;
12575 + interrupt-map = <
12576 + 0000 0 0 1 &UIC2 0 4 /* swizzled int A */
12577 + 0000 0 0 2 &UIC2 1 4 /* swizzled int B */
12578 + 0000 0 0 3 &UIC2 2 4 /* swizzled int C */
12579 + 0000 0 0 4 &UIC2 3 4 /* swizzled int D */>;
12582 + PCIE1: pciex@0c0000000 {
12583 + device_type = "pci";
12584 + #interrupt-cells = <1>;
12585 + #size-cells = <2>;
12586 + #address-cells = <3>;
12587 + compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
12589 + port = <1>; /* port number */
12590 + reg = <c0000000 20000000 /* Config space access */
12591 + ef001000 00001000>; /* Registers */
12592 + dcr-reg = <060 020>;
12593 + sdr-base = <440>;
12595 + /* Outbound ranges, one memory and one IO,
12596 + * later cannot be changed
12598 + ranges = <02000000 0 80000000 98000000 0 08000000
12599 + 01000000 0 00000000 e0010000 0 00010000>;
12601 + /* Inbound 2GB range starting at 0 */
12602 + dma-ranges = <42000000 0 0 0 0 80000000>;
12604 + /* This drives busses 0x40 to 0x7f */
12605 + bus-range = <40 7f>;
12607 + /* Legacy interrupts (note the weird polarity, the bridge seems
12608 + * to invert PCIe legacy interrupts).
12609 + * We are de-swizzling here because the numbers are actually for
12610 + * port of the root complex virtual P2P bridge. But I want
12611 + * to avoid putting a node for it in the tree, so the numbers
12612 + * below are basically de-swizzled numbers.
12613 + * The real slot is on idsel 0, so the swizzling is 1:1
12615 + interrupt-map-mask = <0000 0 0 7>;
12616 + interrupt-map = <
12617 + 0000 0 0 1 &UIC2 b 4 /* swizzled int A */
12618 + 0000 0 0 2 &UIC2 c 4 /* swizzled int B */
12619 + 0000 0 0 3 &UIC2 d 4 /* swizzled int C */
12620 + 0000 0 0 4 &UIC2 e 4 /* swizzled int D */>;
12624 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/kuroboxHD.dts powerpc.git/arch/powerpc/boot/dts/kuroboxHD.dts
12625 --- linux-2.6.24/arch/powerpc/boot/dts/kuroboxHD.dts 2008-01-24 23:58:37.000000000 +0100
12626 +++ powerpc.git/arch/powerpc/boot/dts/kuroboxHD.dts 2008-01-28 20:25:49.000000000 +0100
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 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/kuroboxHG.dts powerpc.git/arch/powerpc/boot/dts/kuroboxHG.dts
12679 --- linux-2.6.24/arch/powerpc/boot/dts/kuroboxHG.dts 2008-01-24 23:58:37.000000000 +0100
12680 +++ powerpc.git/arch/powerpc/boot/dts/kuroboxHG.dts 2008-01-28 20:25:49.000000000 +0100
12682 #address-cells = <1>;
12686 + serial0 = &serial0;
12687 + serial1 = &serial1;
12692 #address-cells = <1>;
12696 #address-cells = <1>;
12698 - device_type = "i2c";
12699 + cell-index = <0>;
12700 compatible = "fsl-i2c";
12701 reg = <80003000 1000>;
12702 interrupts = <5 2>;
12707 - serial@80004500 {
12708 + serial0: serial@80004500 {
12709 + cell-index = <0>;
12710 device_type = "serial";
12711 compatible = "ns16550";
12712 reg = <80004500 8>;
12714 interrupt-parent = <&mpic>;
12717 - serial@80004600 {
12718 + serial1: serial@80004600 {
12719 + cell-index = <1>;
12720 device_type = "serial";
12721 compatible = "ns16550";
12722 reg = <80004600 8>;
12723 @@ -102,7 +110,7 @@
12724 reg = <80040000 40000>;
12728 + pci0: pci@fec00000 {
12729 #address-cells = <3>;
12731 #interrupt-cells = <1>;
12732 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/lite5200.dts powerpc.git/arch/powerpc/boot/dts/lite5200.dts
12733 --- linux-2.6.24/arch/powerpc/boot/dts/lite5200.dts 2008-01-24 23:58:37.000000000 +0100
12734 +++ powerpc.git/arch/powerpc/boot/dts/lite5200.dts 2008-01-28 20:25:49.000000000 +0100
12737 model = "fsl,lite5200";
12738 // revision = "1.0";
12739 - compatible = "fsl,lite5200","generic-mpc5200";
12740 + compatible = "fsl,lite5200";
12741 #address-cells = <1>;
12744 @@ -284,7 +284,8 @@
12748 - device_type = "i2c";
12749 + #address-cells = <1>;
12750 + #size-cells = <0>;
12751 compatible = "mpc5200-i2c","fsl-i2c";
12754 @@ -294,7 +295,8 @@
12758 - device_type = "i2c";
12759 + #address-cells = <1>;
12760 + #size-cells = <0>;
12761 compatible = "mpc5200-i2c","fsl-i2c";
12764 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/lite5200b.dts powerpc.git/arch/powerpc/boot/dts/lite5200b.dts
12765 --- linux-2.6.24/arch/powerpc/boot/dts/lite5200b.dts 2008-01-24 23:58:37.000000000 +0100
12766 +++ powerpc.git/arch/powerpc/boot/dts/lite5200b.dts 2008-01-28 20:25:49.000000000 +0100
12769 model = "fsl,lite5200b";
12770 // revision = "1.0";
12771 - compatible = "fsl,lite5200b","generic-mpc5200";
12772 + compatible = "fsl,lite5200b";
12773 #address-cells = <1>;
12776 @@ -300,7 +300,8 @@
12780 - device_type = "i2c";
12781 + #address-cells = <1>;
12782 + #size-cells = <0>;
12783 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
12786 @@ -310,7 +311,8 @@
12790 - device_type = "i2c";
12791 + #address-cells = <1>;
12792 + #size-cells = <0>;
12793 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
12796 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/makalu.dts powerpc.git/arch/powerpc/boot/dts/makalu.dts
12797 --- linux-2.6.24/arch/powerpc/boot/dts/makalu.dts 1970-01-01 01:00:00.000000000 +0100
12798 +++ powerpc.git/arch/powerpc/boot/dts/makalu.dts 2008-01-28 20:25:49.000000000 +0100
12801 + * Device Tree Source for AMCC Makalu (405EX)
12803 + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
12805 + * This file is licensed under the terms of the GNU General Public
12806 + * License version 2. This program is licensed "as is" without
12807 + * any warranty of any kind, whether express or implied.
12811 + #address-cells = <1>;
12812 + #size-cells = <1>;
12813 + model = "amcc,makalu";
12814 + compatible = "amcc,makalu";
12815 + dcr-parent = <&/cpus/cpu@0>;
12818 + ethernet0 = &EMAC0;
12819 + ethernet1 = &EMAC1;
12820 + serial0 = &UART0;
12821 + serial1 = &UART1;
12825 + #address-cells = <1>;
12826 + #size-cells = <0>;
12829 + device_type = "cpu";
12830 + model = "PowerPC,405EX";
12832 + clock-frequency = <0>; /* Filled in by U-Boot */
12833 + timebase-frequency = <0>; /* Filled in by U-Boot */
12834 + i-cache-line-size = <20>;
12835 + d-cache-line-size = <20>;
12836 + i-cache-size = <4000>; /* 16 kB */
12837 + d-cache-size = <4000>; /* 16 kB */
12839 + dcr-access-method = "native";
12844 + device_type = "memory";
12845 + reg = <0 0>; /* Filled in by U-Boot */
12848 + UIC0: interrupt-controller {
12849 + compatible = "ibm,uic-405ex", "ibm,uic";
12850 + interrupt-controller;
12851 + cell-index = <0>;
12852 + dcr-reg = <0c0 009>;
12853 + #address-cells = <0>;
12854 + #size-cells = <0>;
12855 + #interrupt-cells = <2>;
12858 + UIC1: interrupt-controller1 {
12859 + compatible = "ibm,uic-405ex","ibm,uic";
12860 + interrupt-controller;
12861 + cell-index = <1>;
12862 + dcr-reg = <0d0 009>;
12863 + #address-cells = <0>;
12864 + #size-cells = <0>;
12865 + #interrupt-cells = <2>;
12866 + interrupts = <1e 4 1f 4>; /* cascade */
12867 + interrupt-parent = <&UIC0>;
12870 + UIC2: interrupt-controller2 {
12871 + compatible = "ibm,uic-405ex","ibm,uic";
12872 + interrupt-controller;
12873 + cell-index = <2>;
12874 + dcr-reg = <0e0 009>;
12875 + #address-cells = <0>;
12876 + #size-cells = <0>;
12877 + #interrupt-cells = <2>;
12878 + interrupts = <1c 4 1d 4>; /* cascade */
12879 + interrupt-parent = <&UIC0>;
12883 + compatible = "ibm,plb-405ex", "ibm,plb4";
12884 + #address-cells = <1>;
12885 + #size-cells = <1>;
12887 + clock-frequency = <0>; /* Filled in by U-Boot */
12889 + SDRAM0: memory-controller {
12890 + compatible = "ibm,sdram-405ex";
12891 + dcr-reg = <010 2>;
12895 + compatible = "ibm,mcmal-405ex", "ibm,mcmal2";
12896 + dcr-reg = <180 62>;
12897 + num-tx-chans = <2>;
12898 + num-rx-chans = <2>;
12899 + interrupt-parent = <&MAL0>;
12900 + interrupts = <0 1 2 3 4>;
12901 + #interrupt-cells = <1>;
12902 + #address-cells = <0>;
12903 + #size-cells = <0>;
12904 + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
12905 + /*RXEOB*/ 1 &UIC0 b 4
12906 + /*SERR*/ 2 &UIC1 0 4
12907 + /*TXDE*/ 3 &UIC1 1 4
12908 + /*RXDE*/ 4 &UIC1 2 4>;
12909 + interrupt-map-mask = <ffffffff>;
12913 + compatible = "ibm,opb-405ex", "ibm,opb";
12914 + #address-cells = <1>;
12915 + #size-cells = <1>;
12916 + ranges = <80000000 80000000 10000000
12917 + ef600000 ef600000 a00000
12918 + f0000000 f0000000 10000000>;
12919 + dcr-reg = <0a0 5>;
12920 + clock-frequency = <0>; /* Filled in by U-Boot */
12923 + compatible = "ibm,ebc-405ex", "ibm,ebc";
12924 + dcr-reg = <012 2>;
12925 + #address-cells = <2>;
12926 + #size-cells = <1>;
12927 + clock-frequency = <0>; /* Filled in by U-Boot */
12928 + /* ranges property is supplied by U-Boot */
12929 + interrupts = <5 1>;
12930 + interrupt-parent = <&UIC1>;
12933 + compatible = "amd,s29gl512n", "cfi-flash";
12934 + bank-width = <2>;
12935 + reg = <0 000000 4000000>;
12936 + #address-cells = <1>;
12937 + #size-cells = <1>;
12939 + label = "kernel";
12940 + reg = <0 200000>;
12942 + partition@200000 {
12944 + reg = <200000 200000>;
12946 + partition@400000 {
12948 + reg = <400000 3b60000>;
12950 + partition@3f60000 {
12952 + reg = <3f60000 40000>;
12954 + partition@3fa0000 {
12955 + label = "u-boot";
12956 + reg = <3fa0000 60000>;
12961 + UART0: serial@ef600200 {
12962 + device_type = "serial";
12963 + compatible = "ns16550";
12964 + reg = <ef600200 8>;
12965 + virtual-reg = <ef600200>;
12966 + clock-frequency = <0>; /* Filled in by U-Boot */
12967 + current-speed = <0>;
12968 + interrupt-parent = <&UIC0>;
12969 + interrupts = <1a 4>;
12972 + UART1: serial@ef600300 {
12973 + device_type = "serial";
12974 + compatible = "ns16550";
12975 + reg = <ef600300 8>;
12976 + virtual-reg = <ef600300>;
12977 + clock-frequency = <0>; /* Filled in by U-Boot */
12978 + current-speed = <0>;
12979 + interrupt-parent = <&UIC0>;
12980 + interrupts = <1 4>;
12983 + IIC0: i2c@ef600400 {
12984 + device_type = "i2c";
12985 + compatible = "ibm,iic-405ex", "ibm,iic";
12986 + reg = <ef600400 14>;
12987 + interrupt-parent = <&UIC0>;
12988 + interrupts = <2 4>;
12991 + IIC1: i2c@ef600500 {
12992 + device_type = "i2c";
12993 + compatible = "ibm,iic-405ex", "ibm,iic";
12994 + reg = <ef600500 14>;
12995 + interrupt-parent = <&UIC0>;
12996 + interrupts = <7 4>;
13000 + RGMII0: emac-rgmii@ef600b00 {
13001 + device_type = "rgmii-interface";
13002 + compatible = "ibm,rgmii-405ex", "ibm,rgmii";
13003 + reg = <ef600b00 104>;
13007 + EMAC0: ethernet@ef600900 {
13008 + linux,network-index = <0>;
13009 + device_type = "network";
13010 + compatible = "ibm,emac-405ex", "ibm,emac4";
13011 + interrupt-parent = <&EMAC0>;
13012 + interrupts = <0 1>;
13013 + #interrupt-cells = <1>;
13014 + #address-cells = <0>;
13015 + #size-cells = <0>;
13016 + interrupt-map = </*Status*/ 0 &UIC0 18 4
13017 + /*Wake*/ 1 &UIC1 1d 4>;
13018 + reg = <ef600900 70>;
13019 + local-mac-address = [000000000000]; /* Filled in by U-Boot */
13020 + mal-device = <&MAL0>;
13021 + mal-tx-channel = <0>;
13022 + mal-rx-channel = <0>;
13023 + cell-index = <0>;
13024 + max-frame-size = <5dc>;
13025 + rx-fifo-size = <1000>;
13026 + tx-fifo-size = <800>;
13027 + phy-mode = "rgmii";
13028 + phy-map = <0000003f>; /* Start at 6 */
13029 + rgmii-device = <&RGMII0>;
13030 + rgmii-channel = <0>;
13031 + has-inverted-stacr-oc;
13032 + has-new-stacr-staopc;
13035 + EMAC1: ethernet@ef600a00 {
13036 + linux,network-index = <1>;
13037 + device_type = "network";
13038 + compatible = "ibm,emac-405ex", "ibm,emac4";
13039 + interrupt-parent = <&EMAC1>;
13040 + interrupts = <0 1>;
13041 + #interrupt-cells = <1>;
13042 + #address-cells = <0>;
13043 + #size-cells = <0>;
13044 + interrupt-map = </*Status*/ 0 &UIC0 19 4
13045 + /*Wake*/ 1 &UIC1 1f 4>;
13046 + reg = <ef600a00 70>;
13047 + local-mac-address = [000000000000]; /* Filled in by U-Boot */
13048 + mal-device = <&MAL0>;
13049 + mal-tx-channel = <1>;
13050 + mal-rx-channel = <1>;
13051 + cell-index = <1>;
13052 + max-frame-size = <5dc>;
13053 + rx-fifo-size = <1000>;
13054 + tx-fifo-size = <800>;
13055 + phy-mode = "rgmii";
13056 + phy-map = <00000000>;
13057 + rgmii-device = <&RGMII0>;
13058 + rgmii-channel = <1>;
13059 + has-inverted-stacr-oc;
13060 + has-new-stacr-staopc;
13064 + PCIE0: pciex@0a0000000 {
13065 + device_type = "pci";
13066 + #interrupt-cells = <1>;
13067 + #size-cells = <2>;
13068 + #address-cells = <3>;
13069 + compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
13071 + port = <0>; /* port number */
13072 + reg = <a0000000 20000000 /* Config space access */
13073 + ef000000 00001000>; /* Registers */
13074 + dcr-reg = <040 020>;
13075 + sdr-base = <400>;
13077 + /* Outbound ranges, one memory and one IO,
13078 + * later cannot be changed
13080 + ranges = <02000000 0 80000000 90000000 0 08000000
13081 + 01000000 0 00000000 e0000000 0 00010000>;
13083 + /* Inbound 2GB range starting at 0 */
13084 + dma-ranges = <42000000 0 0 0 0 80000000>;
13086 + /* This drives busses 0x00 to 0x3f */
13087 + bus-range = <00 3f>;
13089 + /* Legacy interrupts (note the weird polarity, the bridge seems
13090 + * to invert PCIe legacy interrupts).
13091 + * We are de-swizzling here because the numbers are actually for
13092 + * port of the root complex virtual P2P bridge. But I want
13093 + * to avoid putting a node for it in the tree, so the numbers
13094 + * below are basically de-swizzled numbers.
13095 + * The real slot is on idsel 0, so the swizzling is 1:1
13097 + interrupt-map-mask = <0000 0 0 7>;
13098 + interrupt-map = <
13099 + 0000 0 0 1 &UIC2 0 4 /* swizzled int A */
13100 + 0000 0 0 2 &UIC2 1 4 /* swizzled int B */
13101 + 0000 0 0 3 &UIC2 2 4 /* swizzled int C */
13102 + 0000 0 0 4 &UIC2 3 4 /* swizzled int D */>;
13105 + PCIE1: pciex@0c0000000 {
13106 + device_type = "pci";
13107 + #interrupt-cells = <1>;
13108 + #size-cells = <2>;
13109 + #address-cells = <3>;
13110 + compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
13112 + port = <1>; /* port number */
13113 + reg = <c0000000 20000000 /* Config space access */
13114 + ef001000 00001000>; /* Registers */
13115 + dcr-reg = <060 020>;
13116 + sdr-base = <440>;
13118 + /* Outbound ranges, one memory and one IO,
13119 + * later cannot be changed
13121 + ranges = <02000000 0 80000000 98000000 0 08000000
13122 + 01000000 0 00000000 e0010000 0 00010000>;
13124 + /* Inbound 2GB range starting at 0 */
13125 + dma-ranges = <42000000 0 0 0 0 80000000>;
13127 + /* This drives busses 0x40 to 0x7f */
13128 + bus-range = <40 7f>;
13130 + /* Legacy interrupts (note the weird polarity, the bridge seems
13131 + * to invert PCIe legacy interrupts).
13132 + * We are de-swizzling here because the numbers are actually for
13133 + * port of the root complex virtual P2P bridge. But I want
13134 + * to avoid putting a node for it in the tree, so the numbers
13135 + * below are basically de-swizzled numbers.
13136 + * The real slot is on idsel 0, so the swizzling is 1:1
13138 + interrupt-map-mask = <0000 0 0 7>;
13139 + interrupt-map = <
13140 + 0000 0 0 1 &UIC2 b 4 /* swizzled int A */
13141 + 0000 0 0 2 &UIC2 c 4 /* swizzled int B */
13142 + 0000 0 0 3 &UIC2 d 4 /* swizzled int C */
13143 + 0000 0 0 4 &UIC2 e 4 /* swizzled int D */>;
13147 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/motionpro.dts powerpc.git/arch/powerpc/boot/dts/motionpro.dts
13148 --- linux-2.6.24/arch/powerpc/boot/dts/motionpro.dts 1970-01-01 01:00:00.000000000 +0100
13149 +++ powerpc.git/arch/powerpc/boot/dts/motionpro.dts 2008-01-28 20:25:49.000000000 +0100
13152 + * Motion-PRO board Device Tree Source
13154 + * Copyright (C) 2007 Semihalf
13155 + * Marian Balakowicz <m8@semihalf.com>
13157 + * This program is free software; you can redistribute it and/or modify it
13158 + * under the terms of the GNU General Public License as published by the
13159 + * Free Software Foundation; either version 2 of the License, or (at your
13160 + * option) any later version.
13164 + * WARNING: Do not depend on this tree layout remaining static just yet.
13165 + * The MPC5200 device tree conventions are still in flux
13166 + * Keep an eye on the linuxppc-dev mailing list for more details
13170 + model = "promess,motionpro";
13171 + compatible = "promess,motionpro";
13172 + #address-cells = <1>;
13173 + #size-cells = <1>;
13176 + #address-cells = <1>;
13177 + #size-cells = <0>;
13180 + device_type = "cpu";
13182 + d-cache-line-size = <20>;
13183 + i-cache-line-size = <20>;
13184 + d-cache-size = <4000>; // L1, 16K
13185 + i-cache-size = <4000>; // L1, 16K
13186 + timebase-frequency = <0>; // from bootloader
13187 + bus-frequency = <0>; // from bootloader
13188 + clock-frequency = <0>; // from bootloader
13193 + device_type = "memory";
13194 + reg = <00000000 04000000>; // 64MB
13197 + soc5200@f0000000 {
13198 + model = "fsl,mpc5200b";
13199 + compatible = "fsl,mpc5200b";
13200 + revision = ""; // from bootloader
13201 + device_type = "soc";
13202 + ranges = <0 f0000000 0000c000>;
13203 + reg = <f0000000 00000100>;
13204 + bus-frequency = <0>; // from bootloader
13205 + system-frequency = <0>; // from bootloader
13208 + compatible = "mpc5200b-cdm","mpc5200-cdm";
13212 + mpc5200_pic: pic@500 {
13213 + // 5200 interrupts are encoded into two levels;
13214 + interrupt-controller;
13215 + #interrupt-cells = <3>;
13216 + compatible = "mpc5200b-pic","mpc5200-pic";
13220 + gpt@600 { // General Purpose Timer
13221 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13223 + interrupts = <1 9 0>;
13224 + interrupt-parent = <&mpc5200_pic>;
13228 + gpt@610 { // General Purpose Timer
13229 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13231 + interrupts = <1 a 0>;
13232 + interrupt-parent = <&mpc5200_pic>;
13235 + gpt@620 { // General Purpose Timer
13236 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13238 + interrupts = <1 b 0>;
13239 + interrupt-parent = <&mpc5200_pic>;
13242 + gpt@630 { // General Purpose Timer
13243 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13245 + interrupts = <1 c 0>;
13246 + interrupt-parent = <&mpc5200_pic>;
13249 + gpt@640 { // General Purpose Timer
13250 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13252 + interrupts = <1 d 0>;
13253 + interrupt-parent = <&mpc5200_pic>;
13256 + gpt@650 { // General Purpose Timer
13257 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13259 + interrupts = <1 e 0>;
13260 + interrupt-parent = <&mpc5200_pic>;
13263 + motionpro-led@660 { // Motion-PRO status LED
13264 + compatible = "promess,motionpro-led";
13265 + label = "motionpro-statusled";
13267 + interrupts = <1 f 0>;
13268 + interrupt-parent = <&mpc5200_pic>;
13269 + blink-delay = <64>; // 100 msec
13272 + motionpro-led@670 { // Motion-PRO ready LED
13273 + compatible = "promess,motionpro-led";
13274 + label = "motionpro-readyled";
13276 + interrupts = <1 10 0>;
13277 + interrupt-parent = <&mpc5200_pic>;
13280 + rtc@800 { // Real time clock
13281 + compatible = "mpc5200b-rtc","mpc5200-rtc";
13283 + interrupts = <1 5 0 1 6 0>;
13284 + interrupt-parent = <&mpc5200_pic>;
13288 + compatible = "mpc5200b-mscan","mpc5200-mscan";
13289 + interrupts = <2 12 0>;
13290 + interrupt-parent = <&mpc5200_pic>;
13295 + compatible = "mpc5200b-gpio","mpc5200-gpio";
13297 + interrupts = <1 7 0>;
13298 + interrupt-parent = <&mpc5200_pic>;
13302 + compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup";
13304 + interrupts = <1 8 0 0 3 0>;
13305 + interrupt-parent = <&mpc5200_pic>;
13310 + compatible = "mpc5200b-spi","mpc5200-spi";
13312 + interrupts = <2 d 0 2 e 0>;
13313 + interrupt-parent = <&mpc5200_pic>;
13317 + compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
13319 + interrupts = <2 6 0>;
13320 + interrupt-parent = <&mpc5200_pic>;
13323 + dma-controller@1200 {
13324 + compatible = "mpc5200b-bestcomm","mpc5200-bestcomm";
13326 + interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
13327 + 3 4 0 3 5 0 3 6 0 3 7 0
13328 + 3 8 0 3 9 0 3 a 0 3 b 0
13329 + 3 c 0 3 d 0 3 e 0 3 f 0>;
13330 + interrupt-parent = <&mpc5200_pic>;
13334 + compatible = "mpc5200b-xlb","mpc5200-xlb";
13335 + reg = <1f00 100>;
13338 + serial@2000 { // PSC1
13339 + device_type = "serial";
13340 + compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
13341 + port-number = <0>; // Logical port assignment
13342 + reg = <2000 100>;
13343 + interrupts = <2 1 0>;
13344 + interrupt-parent = <&mpc5200_pic>;
13347 + // PSC2 in spi master mode
13348 + spi@2200 { // PSC2
13349 + compatible = "mpc5200b-psc-spi","mpc5200-psc-spi";
13350 + cell-index = <1>;
13351 + reg = <2200 100>;
13352 + interrupts = <2 2 0>;
13353 + interrupt-parent = <&mpc5200_pic>;
13356 + // PSC5 in uart mode
13357 + serial@2800 { // PSC5
13358 + device_type = "serial";
13359 + compatible = "mpc5200b-psc-uart","mpc5200-psc-uart";
13360 + port-number = <4>; // Logical port assignment
13361 + reg = <2800 100>;
13362 + interrupts = <2 c 0>;
13363 + interrupt-parent = <&mpc5200_pic>;
13367 + device_type = "network";
13368 + compatible = "mpc5200b-fec","mpc5200-fec";
13369 + reg = <3000 800>;
13370 + local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */
13371 + interrupts = <2 5 0>;
13372 + interrupt-parent = <&mpc5200_pic>;
13376 + compatible = "mpc5200b-ata","mpc5200-ata";
13377 + reg = <3a00 100>;
13378 + interrupts = <2 7 0>;
13379 + interrupt-parent = <&mpc5200_pic>;
13383 + compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
13385 + interrupts = <2 10 0>;
13386 + interrupt-parent = <&mpc5200_pic>;
13387 + fsl5200-clocking;
13391 + compatible = "mpc5200b-sram","mpc5200-sram";
13392 + reg = <8000 4000>;
13397 + model = "fsl,lpb";
13398 + compatible = "fsl,lpb";
13399 + #address-cells = <2>;
13400 + #size-cells = <1>;
13401 + ranges = <1 0 50000000 00010000
13402 + 2 0 50010000 00010000
13403 + 3 0 50020000 00010000>;
13405 + // 8-bit DualPort SRAM on LocalPlus Bus CS1
13407 + compatible = "promess,motionpro-kollmorgen";
13408 + reg = <1 0 10000>;
13409 + interrupts = <1 1 0>;
13410 + interrupt-parent = <&mpc5200_pic>;
13413 + // 8-bit board CPLD on LocalPlus Bus CS2
13415 + compatible = "promess,motionpro-cpld";
13416 + reg = <2 0 10000>;
13419 + // 8-bit custom Anybus Module on LocalPlus Bus CS3
13421 + compatible = "promess,motionpro-anybus";
13422 + reg = <3 0 10000>;
13424 + pro_module_general@3,0 {
13425 + compatible = "promess,pro_module_general";
13428 + pro_module_dio@3,800 {
13429 + compatible = "promess,pro_module_dio";
13435 + #interrupt-cells = <1>;
13436 + #size-cells = <2>;
13437 + #address-cells = <3>;
13438 + device_type = "pci";
13439 + compatible = "mpc5200b-pci","mpc5200-pci";
13440 + reg = <f0000d00 100>;
13441 + interrupt-map-mask = <f800 0 0 7>;
13442 + interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
13443 + c000 0 0 2 &mpc5200_pic 1 1 3
13444 + c000 0 0 3 &mpc5200_pic 1 2 3
13445 + c000 0 0 4 &mpc5200_pic 1 3 3
13447 + c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
13448 + c800 0 0 2 &mpc5200_pic 1 2 3
13449 + c800 0 0 3 &mpc5200_pic 1 3 3
13450 + c800 0 0 4 &mpc5200_pic 0 0 3>;
13451 + clock-frequency = <0>; // From boot loader
13452 + interrupts = <2 8 0 2 9 0 2 a 0>;
13453 + interrupt-parent = <&mpc5200_pic>;
13454 + bus-range = <0 0>;
13455 + ranges = <42000000 0 80000000 80000000 0 20000000
13456 + 02000000 0 a0000000 a0000000 0 10000000
13457 + 01000000 0 00000000 b0000000 0 01000000>;
13460 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8313erdb.dts powerpc.git/arch/powerpc/boot/dts/mpc8313erdb.dts
13461 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8313erdb.dts 2008-01-24 23:58:37.000000000 +0100
13462 +++ powerpc.git/arch/powerpc/boot/dts/mpc8313erdb.dts 2008-01-28 20:25:49.000000000 +0100
13464 #address-cells = <1>;
13468 + ethernet0 = &enet0;
13469 + ethernet1 = &enet1;
13470 + serial0 = &serial0;
13471 + serial1 = &serial1;
13476 #address-cells = <1>;
13478 @@ -37,10 +45,58 @@
13479 reg = <00000000 08000000>; // 128MB at 0
13482 + localbus@e0005000 {
13483 + #address-cells = <2>;
13484 + #size-cells = <1>;
13485 + compatible = "fsl,mpc8313-elbc", "fsl,elbc", "simple-bus";
13486 + reg = <e0005000 1000>;
13487 + interrupts = <d#77 8>;
13488 + interrupt-parent = <&ipic>;
13490 + // CS0 and CS1 are swapped when
13491 + // booting from nand, but the
13492 + // addresses are the same.
13493 + ranges = <0 0 fe000000 00800000
13494 + 1 0 e2800000 00008000
13495 + 2 0 f0000000 00020000
13496 + 3 0 fa000000 00008000>;
13499 + #address-cells = <1>;
13500 + #size-cells = <1>;
13501 + compatible = "cfi-flash";
13502 + reg = <0 0 800000>;
13503 + bank-width = <2>;
13504 + device-width = <1>;
13508 + #address-cells = <1>;
13509 + #size-cells = <1>;
13510 + compatible = "fsl,mpc8313-fcm-nand",
13511 + "fsl,elbc-fcm-nand";
13512 + reg = <1 0 2000>;
13515 + reg = <0 100000>;
13520 + reg = <100000 300000>;
13524 + reg = <400000 1c00000>;
13530 #address-cells = <1>;
13532 device_type = "soc";
13533 + compatible = "simple-bus";
13534 ranges = <0 e0000000 00100000>;
13535 reg = <e0000000 00000200>;
13536 bus-frequency = <0>;
13541 - device_type = "i2c";
13542 + #address-cells = <1>;
13543 + #size-cells = <0>;
13544 + cell-index = <0>;
13545 compatible = "fsl-i2c";
13547 interrupts = <e 8>;
13552 - device_type = "i2c";
13553 + #address-cells = <1>;
13554 + #size-cells = <0>;
13555 + cell-index = <1>;
13556 compatible = "fsl-i2c";
13558 interrupts = <f 8>;
13561 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
13563 - device_type = "usb";
13564 compatible = "fsl-usb2-dr";
13565 reg = <23000 1000>;
13566 #address-cells = <1>;
13567 @@ -91,11 +150,10 @@
13571 - device_type = "mdio";
13572 - compatible = "gianfar";
13573 - reg = <24520 20>;
13574 #address-cells = <1>;
13576 + compatible = "fsl,gianfar-mdio";
13577 + reg = <24520 20>;
13578 phy1: ethernet-phy@1 {
13579 interrupt-parent = < &ipic >;
13580 interrupts = <13 8>;
13581 @@ -110,7 +168,8 @@
13586 + enet0: ethernet@24000 {
13587 + cell-index = <0>;
13588 device_type = "network";
13590 compatible = "gianfar";
13591 @@ -121,7 +180,8 @@
13592 phy-handle = < &phy1 >;
13596 + enet1: ethernet@25000 {
13597 + cell-index = <1>;
13598 device_type = "network";
13600 compatible = "gianfar";
13601 @@ -132,7 +192,8 @@
13602 phy-handle = < &phy4 >;
13606 + serial0: serial@4500 {
13607 + cell-index = <0>;
13608 device_type = "serial";
13609 compatible = "ns16550";
13611 @@ -141,7 +202,8 @@
13612 interrupt-parent = < &ipic >;
13616 + serial1: serial@4600 {
13617 + cell-index = <1>;
13618 device_type = "serial";
13619 compatible = "ns16550";
13621 @@ -179,7 +241,8 @@
13626 + pci0: pci@e0008500 {
13627 + cell-index = <1>;
13628 interrupt-map-mask = <f800 0 0 7>;
13631 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc832x_mds.dts powerpc.git/arch/powerpc/boot/dts/mpc832x_mds.dts
13632 --- linux-2.6.24/arch/powerpc/boot/dts/mpc832x_mds.dts 2008-01-24 23:58:37.000000000 +0100
13633 +++ powerpc.git/arch/powerpc/boot/dts/mpc832x_mds.dts 2008-01-28 20:25:49.000000000 +0100
13635 * under the terms of the GNU General Public License as published by the
13636 * Free Software Foundation; either version 2 of the License, or (at your
13637 * option) any later version.
13639 + * To enable external serial I/O on a Freescale MPC 8323 SYS/MDS board, do
13642 + * 1) On chip U61, lift (disconnect) pins 21 (TXD) and 22 (RXD) from the board.
13643 + * 2) Solder a wire from U61-21 to P19A-23. P19 is a grid of pins on the board
13644 + * next to the serial ports.
13645 + * 3) Solder a wire from U61-22 to P19K-22.
13647 + * Note that there's a typo in the schematic. The board labels the last column
13648 + * of pins "P19K", but in the schematic, that column is called "P19J". So if
13649 + * you're going by the schematic, the pin is called "P19J-K22".
13654 #address-cells = <1>;
13658 + ethernet0 = &enet0;
13659 + ethernet1 = &enet1;
13660 + serial0 = &serial0;
13661 + serial1 = &serial1;
13666 #address-cells = <1>;
13670 #address-cells = <1>;
13672 - device_type = "i2c";
13673 + cell-index = <0>;
13674 compatible = "fsl-i2c";
13676 interrupts = <e 8>;
13682 + serial0: serial@4500 {
13683 + cell-index = <0>;
13684 device_type = "serial";
13685 compatible = "ns16550";
13688 interrupt-parent = < &ipic >;
13692 + serial1: serial@4600 {
13693 + cell-index = <1>;
13694 device_type = "serial";
13695 compatible = "ns16550";
13697 @@ -159,6 +181,23 @@
13698 1 1e 1 0 1 0 /* TX_EN */
13699 1 1f 2 0 1 0>;/* CRS */
13701 + pio5: ucc_pin@05 {
13705 + * port pin dir drain sel irq
13707 + 2 0 1 0 2 0 /* TxD5 */
13708 + 2 8 2 0 2 0 /* RxD5 */
13710 + 2 1d 2 0 0 0 /* CTS5 */
13711 + 2 1f 1 0 2 0 /* RTS5 */
13713 + 2 18 2 0 0 0 /* CD */
13721 @@ -166,6 +205,7 @@
13722 #address-cells = <1>;
13724 device_type = "qe";
13725 + compatible = "fsl,qe";
13727 ranges = <0 e0100000 00100000>;
13728 reg = <e0100000 480>;
13729 @@ -200,7 +240,6 @@
13733 - device_type = "usb";
13734 compatible = "qe_udc";
13735 reg = <6c0 40 8B00 100>;
13737 @@ -208,48 +247,58 @@
13742 + enet0: ucc@2200 {
13743 device_type = "network";
13744 compatible = "ucc_geth";
13746 + cell-index = <3>;
13750 interrupt-parent = < &qeic >;
13752 - * mac-address is deprecated and will be removed
13753 - * in 2.6.25. Only recent versions of
13754 - * U-Boot support local-mac-address, however.
13756 - mac-address = [ 00 00 00 00 00 00 ];
13757 local-mac-address = [ 00 00 00 00 00 00 ];
13760 + rx-clock-name = "clk9";
13761 + tx-clock-name = "clk10";
13762 phy-handle = < &phy3 >;
13763 pio-handle = < &pio3 >;
13767 + enet1: ucc@3200 {
13768 device_type = "network";
13769 compatible = "ucc_geth";
13771 + cell-index = <4>;
13775 interrupt-parent = < &qeic >;
13777 - * mac-address is deprecated and will be removed
13778 - * in 2.6.25. Only recent versions of
13779 - * U-Boot support local-mac-address, however.
13781 - mac-address = [ 00 00 00 00 00 00 ];
13782 local-mac-address = [ 00 00 00 00 00 00 ];
13785 + rx-clock-name = "clk7";
13786 + tx-clock-name = "clk8";
13787 phy-handle = < &phy4 >;
13788 pio-handle = < &pio4 >;
13792 + device_type = "serial";
13793 + compatible = "ucc_uart";
13795 + device-id = <5>; /* The UCC number, 1-7*/
13796 + port-number = <0>; /* Which ttyQEx device */
13797 + soft-uart; /* We need Soft-UART */
13798 + reg = <2400 200>;
13799 + interrupts = <28>; /* From Table 18-12 */
13800 + interrupt-parent = < &qeic >;
13802 + * For Soft-UART, we need to set TX to 1X, which
13803 + * means specifying separate clock sources.
13805 + rx-clock-name = "brg5";
13806 + tx-clock-name = "brg6";
13807 + pio-handle = < &pio5 >;
13812 #address-cells = <1>;
13814 @@ -283,7 +332,8 @@
13819 + pci0: pci@e0008500 {
13820 + cell-index = <1>;
13821 interrupt-map-mask = <f800 0 0 7>;
13823 /* IDSEL 0x11 AD17 */
13824 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc832x_rdb.dts powerpc.git/arch/powerpc/boot/dts/mpc832x_rdb.dts
13825 --- linux-2.6.24/arch/powerpc/boot/dts/mpc832x_rdb.dts 2008-01-24 23:58:37.000000000 +0100
13826 +++ powerpc.git/arch/powerpc/boot/dts/mpc832x_rdb.dts 2008-01-28 20:25:49.000000000 +0100
13828 #address-cells = <1>;
13832 + ethernet0 = &enet0;
13833 + ethernet1 = &enet1;
13834 + serial0 = &serial0;
13835 + serial1 = &serial1;
13840 #address-cells = <1>;
13846 - device_type = "i2c";
13847 + #address-cells = <1>;
13848 + #size-cells = <0>;
13849 + cell-index = <0>;
13850 compatible = "fsl-i2c";
13852 interrupts = <e 8>;
13858 + serial0: serial@4500 {
13859 + cell-index = <0>;
13860 device_type = "serial";
13861 compatible = "ns16550";
13864 interrupt-parent = <&pic>;
13868 + serial1: serial@4600 {
13869 + cell-index = <1>;
13870 device_type = "serial";
13871 compatible = "ns16550";
13873 @@ -187,44 +199,34 @@
13878 + enet0: ucc@3000 {
13879 device_type = "network";
13880 compatible = "ucc_geth";
13882 + cell-index = <2>;
13886 interrupt-parent = <&qeic>;
13888 - * mac-address is deprecated and will be removed
13889 - * in 2.6.25. Only recent versions of
13890 - * U-Boot support local-mac-address, however.
13892 - mac-address = [ 00 00 00 00 00 00 ];
13893 local-mac-address = [ 00 00 00 00 00 00 ];
13896 + rx-clock-name = "clk16";
13897 + tx-clock-name = "clk3";
13898 phy-handle = <&phy00>;
13899 pio-handle = <&ucc2pio>;
13903 + enet1: ucc@2200 {
13904 device_type = "network";
13905 compatible = "ucc_geth";
13907 + cell-index = <3>;
13911 interrupt-parent = <&qeic>;
13913 - * mac-address is deprecated and will be removed
13914 - * in 2.6.25. Only recent versions of
13915 - * U-Boot support local-mac-address, however.
13917 - mac-address = [ 00 00 00 00 00 00 ];
13918 local-mac-address = [ 00 00 00 00 00 00 ];
13921 + rx-clock-name = "clk9";
13922 + tx-clock-name = "clk10";
13923 phy-handle = <&phy04>;
13924 pio-handle = <&ucc3pio>;
13926 @@ -262,7 +264,8 @@
13931 + pci0: pci@e0008500 {
13932 + cell-index = <1>;
13933 interrupt-map-mask = <f800 0 0 7>;
13935 /* IDSEL 0x10 AD16 (USB) */
13936 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8349emitx.dts powerpc.git/arch/powerpc/boot/dts/mpc8349emitx.dts
13937 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8349emitx.dts 2008-01-24 23:58:37.000000000 +0100
13938 +++ powerpc.git/arch/powerpc/boot/dts/mpc8349emitx.dts 2008-01-28 20:25:49.000000000 +0100
13940 #address-cells = <1>;
13944 + ethernet0 = &enet0;
13945 + ethernet1 = &enet1;
13946 + serial0 = &serial0;
13947 + serial1 = &serial1;
13953 #address-cells = <1>;
13959 - device_type = "i2c";
13960 + #address-cells = <1>;
13961 + #size-cells = <0>;
13962 + cell-index = <0>;
13963 compatible = "fsl-i2c";
13965 interrupts = <e 8>;
13970 - device_type = "i2c";
13971 + #address-cells = <1>;
13972 + #size-cells = <0>;
13973 + cell-index = <1>;
13974 compatible = "fsl-i2c";
13976 interrupts = <f 8>;
13981 - device_type = "usb";
13982 compatible = "fsl-usb2-mph";
13983 reg = <22000 1000>;
13984 #address-cells = <1>;
13989 - device_type = "usb";
13990 compatible = "fsl-usb2-dr";
13991 reg = <23000 1000>;
13992 #address-cells = <1>;
13993 @@ -102,11 +113,10 @@
13997 - device_type = "mdio";
13998 - compatible = "gianfar";
13999 - reg = <24520 20>;
14000 #address-cells = <1>;
14002 + compatible = "fsl,gianfar-mdio";
14003 + reg = <24520 20>;
14006 phy1c: ethernet-phy@1c {
14007 @@ -115,27 +125,14 @@
14009 device_type = "ethernet-phy";
14012 - /* Vitesse 7385 */
14013 - phy1f: ethernet-phy@1f {
14014 - interrupt-parent = < &ipic >;
14015 - interrupts = <12 8>;
14017 - device_type = "ethernet-phy";
14022 + enet0: ethernet@24000 {
14023 + cell-index = <0>;
14024 device_type = "network";
14026 compatible = "gianfar";
14027 reg = <24000 1000>;
14029 - * address is deprecated and will be removed
14030 - * in 2.6.25. Only recent versions of
14031 - * U-Boot support local-mac-address, however.
14033 - address = [ 00 00 00 00 00 00 ];
14034 local-mac-address = [ 00 00 00 00 00 00 ];
14035 interrupts = <20 8 21 8 22 8>;
14036 interrupt-parent = < &ipic >;
14037 @@ -143,27 +140,22 @@
14038 linux,network-index = <0>;
14042 - #address-cells = <1>;
14043 - #size-cells = <0>;
14044 + enet1: ethernet@25000 {
14045 + cell-index = <1>;
14046 device_type = "network";
14048 compatible = "gianfar";
14049 reg = <25000 1000>;
14051 - * address is deprecated and will be removed
14052 - * in 2.6.25. Only recent versions of
14053 - * U-Boot support local-mac-address, however.
14055 - address = [ 00 00 00 00 00 00 ];
14056 local-mac-address = [ 00 00 00 00 00 00 ];
14057 interrupts = <23 8 24 8 25 8>;
14058 interrupt-parent = < &ipic >;
14059 - phy-handle = < &phy1f >;
14060 + /* Vitesse 7385 isn't on the MDIO bus */
14061 + fixed-link = <1 1 d#1000 0 0>;
14062 linux,network-index = <1>;
14066 + serial0: serial@4500 {
14067 + cell-index = <0>;
14068 device_type = "serial";
14069 compatible = "ns16550";
14071 @@ -172,7 +164,8 @@
14072 interrupt-parent = < &ipic >;
14076 + serial1: serial@4600 {
14077 + cell-index = <1>;
14078 device_type = "serial";
14079 compatible = "ns16550";
14081 @@ -203,7 +196,8 @@
14086 + pci0: pci@e0008500 {
14087 + cell-index = <1>;
14088 interrupt-map-mask = <f800 0 0 7>;
14090 /* IDSEL 0x10 - SATA */
14091 @@ -224,7 +218,8 @@
14092 device_type = "pci";
14096 + pci1: pci@e0008600 {
14097 + cell-index = <2>;
14098 interrupt-map-mask = <f800 0 0 7>;
14100 /* IDSEL 0x0E - MiniPCI Slot */
14101 @@ -249,6 +244,21 @@
14102 device_type = "pci";
14107 + localbus@e0005000 {
14108 + #address-cells = <2>;
14109 + #size-cells = <1>;
14110 + compatible = "fsl,mpc8349e-localbus",
14111 + "fsl,pq2pro-localbus";
14112 + reg = <e0005000 d8>;
14113 + ranges = <3 0 f0000000 210>;
14116 + compatible = "fsl,mpc8349emitx-pata", "ata-generic";
14117 + reg = <3 0 10 3 20c 4>;
14120 + interrupts = <17 8>;
14121 + interrupt-parent = <&ipic>;
14125 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8349emitxgp.dts powerpc.git/arch/powerpc/boot/dts/mpc8349emitxgp.dts
14126 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8349emitxgp.dts 2008-01-24 23:58:37.000000000 +0100
14127 +++ powerpc.git/arch/powerpc/boot/dts/mpc8349emitxgp.dts 2008-01-28 20:25:49.000000000 +0100
14129 #address-cells = <1>;
14133 + ethernet0 = &enet0;
14134 + serial0 = &serial0;
14135 + serial1 = &serial1;
14140 #address-cells = <1>;
14146 - device_type = "i2c";
14147 + #address-cells = <1>;
14148 + #size-cells = <0>;
14149 + cell-index = <0>;
14150 compatible = "fsl-i2c";
14152 interrupts = <e 8>;
14157 - device_type = "i2c";
14158 + #address-cells = <1>;
14159 + #size-cells = <0>;
14160 + cell-index = <1>;
14161 compatible = "fsl-i2c";
14163 interrupts = <f 8>;
14168 - device_type = "usb";
14169 compatible = "fsl-usb2-dr";
14170 reg = <23000 1000>;
14171 #address-cells = <1>;
14172 @@ -90,11 +100,10 @@
14176 - device_type = "mdio";
14177 - compatible = "gianfar";
14178 - reg = <24520 20>;
14179 #address-cells = <1>;
14181 + compatible = "fsl,gianfar-mdio";
14182 + reg = <24520 20>;
14185 phy1c: ethernet-phy@1c {
14186 @@ -105,7 +114,8 @@
14191 + enet0: ethernet@24000 {
14192 + cell-index = <0>;
14193 device_type = "network";
14195 compatible = "gianfar";
14196 @@ -117,7 +127,8 @@
14197 linux,network-index = <0>;
14201 + serial0: serial@4500 {
14202 + cell-index = <0>;
14203 device_type = "serial";
14204 compatible = "ns16550";
14206 @@ -126,7 +137,8 @@
14207 interrupt-parent = < &ipic >;
14211 + serial1: serial@4600 {
14212 + cell-index = <1>;
14213 device_type = "serial";
14214 compatible = "ns16550";
14216 @@ -157,7 +169,8 @@
14221 + pci0: pci@e0008600 {
14222 + cell-index = <2>;
14223 interrupt-map-mask = <f800 0 0 7>;
14225 /* IDSEL 0x0F - PCI Slot */
14226 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc834x_mds.dts powerpc.git/arch/powerpc/boot/dts/mpc834x_mds.dts
14227 --- linux-2.6.24/arch/powerpc/boot/dts/mpc834x_mds.dts 2008-01-24 23:58:37.000000000 +0100
14228 +++ powerpc.git/arch/powerpc/boot/dts/mpc834x_mds.dts 2008-01-28 20:25:49.000000000 +0100
14230 #address-cells = <1>;
14234 + ethernet0 = &enet0;
14235 + ethernet1 = &enet1;
14236 + serial0 = &serial0;
14237 + serial1 = &serial1;
14243 #address-cells = <1>;
14247 #address-cells = <1>;
14249 - device_type = "i2c";
14250 + cell-index = <0>;
14251 compatible = "fsl-i2c";
14253 interrupts = <e 8>;
14256 #address-cells = <1>;
14258 - device_type = "i2c";
14259 + cell-index = <1>;
14260 compatible = "fsl-i2c";
14262 interrupts = <f 8>;
14264 /* phy type (ULPI or SERIAL) are only types supportted for MPH */
14265 /* port = 0 or 1 */
14267 - device_type = "usb";
14268 compatible = "fsl-usb2-mph";
14269 reg = <22000 1000>;
14270 #address-cells = <1>;
14271 @@ -107,7 +115,6 @@
14273 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
14275 - device_type = "usb";
14276 compatible = "fsl-usb2-dr";
14277 reg = <23000 1000>;
14278 #address-cells = <1>;
14279 @@ -119,11 +126,11 @@
14283 - device_type = "mdio";
14284 - compatible = "gianfar";
14285 - reg = <24520 20>;
14286 #address-cells = <1>;
14288 + compatible = "fsl,gianfar-mdio";
14289 + reg = <24520 20>;
14291 phy0: ethernet-phy@0 {
14292 interrupt-parent = < &ipic >;
14293 interrupts = <11 8>;
14294 @@ -138,17 +145,12 @@
14299 + enet0: ethernet@24000 {
14300 + cell-index = <0>;
14301 device_type = "network";
14303 compatible = "gianfar";
14304 reg = <24000 1000>;
14306 - * address is deprecated and will be removed
14307 - * in 2.6.25. Only recent versions of
14308 - * U-Boot support local-mac-address, however.
14310 - address = [ 00 00 00 00 00 00 ];
14311 local-mac-address = [ 00 00 00 00 00 00 ];
14312 interrupts = <20 8 21 8 22 8>;
14313 interrupt-parent = < &ipic >;
14314 @@ -156,19 +158,12 @@
14315 linux,network-index = <0>;
14319 - #address-cells = <1>;
14320 - #size-cells = <0>;
14321 + enet1: ethernet@25000 {
14322 + cell-index = <1>;
14323 device_type = "network";
14325 compatible = "gianfar";
14326 reg = <25000 1000>;
14328 - * address is deprecated and will be removed
14329 - * in 2.6.25. Only recent versions of
14330 - * U-Boot support local-mac-address, however.
14332 - address = [ 00 00 00 00 00 00 ];
14333 local-mac-address = [ 00 00 00 00 00 00 ];
14334 interrupts = <23 8 24 8 25 8>;
14335 interrupt-parent = < &ipic >;
14336 @@ -176,7 +171,8 @@
14337 linux,network-index = <1>;
14341 + serial0: serial@4500 {
14342 + cell-index = <0>;
14343 device_type = "serial";
14344 compatible = "ns16550";
14346 @@ -185,7 +181,8 @@
14347 interrupt-parent = < &ipic >;
14351 + serial1: serial@4600 {
14352 + cell-index = <1>;
14353 device_type = "serial";
14354 compatible = "ns16550";
14356 @@ -225,7 +222,8 @@
14361 + pci0: pci@e0008500 {
14362 + cell-index = <1>;
14363 interrupt-map-mask = <f800 0 0 7>;
14366 @@ -285,7 +283,8 @@
14367 device_type = "pci";
14371 + pci1: pci@e0008600 {
14372 + cell-index = <2>;
14373 interrupt-map-mask = <f800 0 0 7>;
14376 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc836x_mds.dts powerpc.git/arch/powerpc/boot/dts/mpc836x_mds.dts
14377 --- linux-2.6.24/arch/powerpc/boot/dts/mpc836x_mds.dts 2008-01-24 23:58:37.000000000 +0100
14378 +++ powerpc.git/arch/powerpc/boot/dts/mpc836x_mds.dts 2008-01-28 20:25:49.000000000 +0100
14380 #address-cells = <1>;
14384 + ethernet0 = &enet0;
14385 + ethernet1 = &enet1;
14386 + serial0 = &serial0;
14387 + serial1 = &serial1;
14392 #address-cells = <1>;
14396 #address-cells = <1>;
14398 - device_type = "i2c";
14399 + cell-index = <0>;
14400 compatible = "fsl-i2c";
14402 interrupts = <e 8>;
14405 #address-cells = <1>;
14407 - device_type = "i2c";
14408 + cell-index = <1>;
14409 compatible = "fsl-i2c";
14411 interrupts = <f 8>;
14417 + serial0: serial@4500 {
14418 + cell-index = <0>;
14419 device_type = "serial";
14420 compatible = "ns16550";
14423 interrupt-parent = < &ipic >;
14427 + serial1: serial@4600 {
14428 + cell-index = <1>;
14429 device_type = "serial";
14430 compatible = "ns16550";
14432 @@ -231,7 +241,6 @@
14436 - device_type = "usb";
14437 compatible = "qe_udc";
14438 reg = <6c0 40 8B00 100>;
14440 @@ -239,45 +248,35 @@
14445 + enet0: ucc@2000 {
14446 device_type = "network";
14447 compatible = "ucc_geth";
14449 + cell-index = <1>;
14453 interrupt-parent = < &qeic >;
14455 - * mac-address is deprecated and will be removed
14456 - * in 2.6.25. Only recent versions of
14457 - * U-Boot support local-mac-address, however.
14459 - mac-address = [ 00 00 00 00 00 00 ];
14460 local-mac-address = [ 00 00 00 00 00 00 ];
14463 + rx-clock-name = "none";
14464 + tx-clock-name = "clk9";
14465 phy-handle = < &phy0 >;
14466 phy-connection-type = "rgmii-id";
14467 pio-handle = < &pio1 >;
14471 + enet1: ucc@3000 {
14472 device_type = "network";
14473 compatible = "ucc_geth";
14475 + cell-index = <2>;
14479 interrupt-parent = < &qeic >;
14481 - * mac-address is deprecated and will be removed
14482 - * in 2.6.25. Only recent versions of
14483 - * U-Boot support local-mac-address, however.
14485 - mac-address = [ 00 00 00 00 00 00 ];
14486 local-mac-address = [ 00 00 00 00 00 00 ];
14489 + rx-clock-name = "none";
14490 + tx-clock-name = "clk4";
14491 phy-handle = < &phy1 >;
14492 phy-connection-type = "rgmii-id";
14493 pio-handle = < &pio2 >;
14494 @@ -316,7 +315,8 @@
14499 + pci0: pci@e0008500 {
14500 + cell-index = <1>;
14501 interrupt-map-mask = <f800 0 0 7>;
14504 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8377_mds.dts powerpc.git/arch/powerpc/boot/dts/mpc8377_mds.dts
14505 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8377_mds.dts 1970-01-01 01:00:00.000000000 +0100
14506 +++ powerpc.git/arch/powerpc/boot/dts/mpc8377_mds.dts 2008-01-28 20:25:49.000000000 +0100
14509 + * MPC8377E MDS Device Tree Source
14511 + * Copyright 2007 Freescale Semiconductor Inc.
14513 + * This program is free software; you can redistribute it and/or modify it
14514 + * under the terms of the GNU General Public License as published by the
14515 + * Free Software Foundation; either version 2 of the License, or (at your
14516 + * option) any later version.
14522 + model = "fsl,mpc8377emds";
14523 + compatible = "fsl,mpc8377emds","fsl,mpc837xmds";
14524 + #address-cells = <1>;
14525 + #size-cells = <1>;
14528 + ethernet0 = &enet0;
14529 + ethernet1 = &enet1;
14530 + serial0 = &serial0;
14531 + serial1 = &serial1;
14536 + #address-cells = <1>;
14537 + #size-cells = <0>;
14540 + device_type = "cpu";
14542 + d-cache-line-size = <0x20>;
14543 + i-cache-line-size = <0x20>;
14544 + d-cache-size = <0x8000>; // L1, 32K
14545 + i-cache-size = <0x8000>; // L1, 32K
14546 + timebase-frequency = <0>;
14547 + bus-frequency = <0>;
14548 + clock-frequency = <0>;
14553 + device_type = "memory";
14554 + reg = <0x00000000 0x20000000>; // 512MB at 0
14558 + #address-cells = <1>;
14559 + #size-cells = <1>;
14560 + device_type = "soc";
14561 + ranges = <0x0 0xe0000000 0x00100000>;
14562 + reg = <0xe0000000 0x00000200>;
14563 + bus-frequency = <0>;
14566 + compatible = "mpc83xx_wdt";
14567 + reg = <0x200 0x100>;
14571 + #address-cells = <1>;
14572 + #size-cells = <0>;
14573 + cell-index = <0>;
14574 + compatible = "fsl-i2c";
14575 + reg = <0x3000 0x100>;
14576 + interrupts = <0xe 0x8>;
14577 + interrupt-parent = < &ipic >;
14582 + #address-cells = <1>;
14583 + #size-cells = <0>;
14584 + cell-index = <1>;
14585 + compatible = "fsl-i2c";
14586 + reg = <0x3100 0x100>;
14587 + interrupts = <0xf 0x8>;
14588 + interrupt-parent = < &ipic >;
14593 + compatible = "fsl_spi";
14594 + reg = <0x7000 0x1000>;
14595 + interrupts = <0x10 0x8>;
14596 + interrupt-parent = < &ipic >;
14600 + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
14602 + compatible = "fsl-usb2-dr";
14603 + reg = <0x23000 0x1000>;
14604 + #address-cells = <1>;
14605 + #size-cells = <0>;
14606 + interrupt-parent = < &ipic >;
14607 + interrupts = <0x26 0x8>;
14608 + phy_type = "utmi_wide";
14612 + #address-cells = <1>;
14613 + #size-cells = <0>;
14614 + compatible = "fsl,gianfar-mdio";
14615 + reg = <0x24520 0x20>;
14616 + phy2: ethernet-phy@2 {
14617 + interrupt-parent = < &ipic >;
14618 + interrupts = <0x11 0x8>;
14620 + device_type = "ethernet-phy";
14622 + phy3: ethernet-phy@3 {
14623 + interrupt-parent = < &ipic >;
14624 + interrupts = <0x12 0x8>;
14626 + device_type = "ethernet-phy";
14630 + enet0: ethernet@24000 {
14631 + cell-index = <0>;
14632 + device_type = "network";
14634 + compatible = "gianfar";
14635 + reg = <0x24000 0x1000>;
14636 + local-mac-address = [ 00 00 00 00 00 00 ];
14637 + interrupts = <0x20 0x8 0x21 0x8 0x22 0x8>;
14638 + phy-connection-type = "mii";
14639 + interrupt-parent = < &ipic >;
14640 + phy-handle = < &phy2 >;
14643 + enet1: ethernet@25000 {
14644 + cell-index = <1>;
14645 + device_type = "network";
14647 + compatible = "gianfar";
14648 + reg = <0x25000 0x1000>;
14649 + local-mac-address = [ 00 00 00 00 00 00 ];
14650 + interrupts = <0x23 0x8 0x24 0x8 0x25 0x8>;
14651 + phy-connection-type = "mii";
14652 + interrupt-parent = < &ipic >;
14653 + phy-handle = < &phy3 >;
14656 + serial0: serial@4500 {
14657 + cell-index = <0>;
14658 + device_type = "serial";
14659 + compatible = "ns16550";
14660 + reg = <0x4500 0x100>;
14661 + clock-frequency = <0>;
14662 + interrupts = <0x9 0x8>;
14663 + interrupt-parent = < &ipic >;
14666 + serial1: serial@4600 {
14667 + cell-index = <1>;
14668 + device_type = "serial";
14669 + compatible = "ns16550";
14670 + reg = <0x4600 0x100>;
14671 + clock-frequency = <0>;
14672 + interrupts = <0xa 0x8>;
14673 + interrupt-parent = < &ipic >;
14678 + compatible = "talitos";
14679 + reg = <0x30000 0x10000>;
14680 + interrupts = <0xb 0x8>;
14681 + interrupt-parent = < &ipic >;
14682 + /* Rev. 3.0 geometry */
14683 + num-channels = <4>;
14684 + channel-fifo-len = <0x18>;
14685 + exec-units-mask = <0x000001fe>;
14686 + descriptor-types-mask = <0x03ab0ebf>;
14691 + compatible = "fsl,esdhc";
14692 + reg = <0x2e000 0x1000>;
14693 + interrupts = <0x2a 0x8>;
14694 + interrupt-parent = < &ipic >;
14698 + compatible = "fsl,mpc8379-sata";
14699 + reg = <0x18000 0x1000>;
14700 + interrupts = <0x2c 0x8>;
14701 + interrupt-parent = < &ipic >;
14705 + compatible = "fsl,mpc8379-sata";
14706 + reg = <0x19000 0x1000>;
14707 + interrupts = <0x2d 0x8>;
14708 + interrupt-parent = < &ipic >;
14712 + * interrupts cell = <intr #, sense>
14713 + * sense values match linux IORESOURCE_IRQ_* defines:
14714 + * sense == 8: Level, low assertion
14715 + * sense == 2: Edge, high-to-low change
14718 + compatible = "fsl,ipic";
14719 + interrupt-controller;
14720 + #address-cells = <0>;
14721 + #interrupt-cells = <2>;
14722 + reg = <0x700 0x100>;
14726 + pci0: pci@e0008500 {
14727 + cell-index = <0>;
14728 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
14729 + interrupt-map = <
14732 + 0x8800 0x0 0x0 0x1 &ipic 0x14 0x8
14733 + 0x8800 0x0 0x0 0x2 &ipic 0x15 0x8
14734 + 0x8800 0x0 0x0 0x3 &ipic 0x16 0x8
14735 + 0x8800 0x0 0x0 0x4 &ipic 0x17 0x8
14738 + 0x9000 0x0 0x0 0x1 &ipic 0x16 0x8
14739 + 0x9000 0x0 0x0 0x2 &ipic 0x17 0x8
14740 + 0x9000 0x0 0x0 0x3 &ipic 0x14 0x8
14741 + 0x9000 0x0 0x0 0x4 &ipic 0x15 0x8
14744 + 0x9800 0x0 0x0 0x1 &ipic 0x17 0x8
14745 + 0x9800 0x0 0x0 0x2 &ipic 0x14 0x8
14746 + 0x9800 0x0 0x0 0x3 &ipic 0x15 0x8
14747 + 0x9800 0x0 0x0 0x4 &ipic 0x16 0x8
14750 + 0xa800 0x0 0x0 0x1 &ipic 0x14 0x8
14751 + 0xa800 0x0 0x0 0x2 &ipic 0x15 0x8
14752 + 0xa800 0x0 0x0 0x3 &ipic 0x16 0x8
14753 + 0xa800 0x0 0x0 0x4 &ipic 0x17 0x8
14756 + 0xb000 0x0 0x0 0x1 &ipic 0x17 0x8
14757 + 0xb000 0x0 0x0 0x2 &ipic 0x14 0x8
14758 + 0xb000 0x0 0x0 0x3 &ipic 0x15 0x8
14759 + 0xb000 0x0 0x0 0x4 &ipic 0x16 0x8
14762 + 0xb800 0x0 0x0 0x1 &ipic 0x16 0x8
14763 + 0xb800 0x0 0x0 0x2 &ipic 0x17 0x8
14764 + 0xb800 0x0 0x0 0x3 &ipic 0x14 0x8
14765 + 0xb800 0x0 0x0 0x4 &ipic 0x15 0x8
14768 + 0xc000 0x0 0x0 0x1 &ipic 0x15 0x8
14769 + 0xc000 0x0 0x0 0x2 &ipic 0x16 0x8
14770 + 0xc000 0x0 0x0 0x3 &ipic 0x17 0x8
14771 + 0xc000 0x0 0x0 0x4 &ipic 0x14 0x8>;
14772 + interrupt-parent = < &ipic >;
14773 + interrupts = <0x42 0x8>;
14774 + bus-range = <0 0>;
14775 + ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
14776 + 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
14777 + 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
14778 + clock-frequency = <0>;
14779 + #interrupt-cells = <1>;
14780 + #size-cells = <2>;
14781 + #address-cells = <3>;
14782 + reg = <0xe0008500 0x100>;
14783 + compatible = "fsl,mpc8349-pci";
14784 + device_type = "pci";
14787 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8378_mds.dts powerpc.git/arch/powerpc/boot/dts/mpc8378_mds.dts
14788 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8378_mds.dts 1970-01-01 01:00:00.000000000 +0100
14789 +++ powerpc.git/arch/powerpc/boot/dts/mpc8378_mds.dts 2008-01-28 20:25:49.000000000 +0100
14792 + * MPC8378E MDS Device Tree Source
14794 + * Copyright 2007 Freescale Semiconductor Inc.
14796 + * This program is free software; you can redistribute it and/or modify it
14797 + * under the terms of the GNU General Public License as published by the
14798 + * Free Software Foundation; either version 2 of the License, or (at your
14799 + * option) any later version.
14805 + model = "fsl,mpc8378emds";
14806 + compatible = "fsl,mpc8378emds","fsl,mpc837xmds";
14807 + #address-cells = <1>;
14808 + #size-cells = <1>;
14811 + ethernet0 = &enet0;
14812 + ethernet1 = &enet1;
14813 + serial0 = &serial0;
14814 + serial1 = &serial1;
14819 + #address-cells = <1>;
14820 + #size-cells = <0>;
14823 + device_type = "cpu";
14825 + d-cache-line-size = <0x20>;
14826 + i-cache-line-size = <0x20>;
14827 + d-cache-size = <0x8000>; // L1, 32K
14828 + i-cache-size = <0x8000>; // L1, 32K
14829 + timebase-frequency = <0>;
14830 + bus-frequency = <0>;
14831 + clock-frequency = <0>;
14836 + device_type = "memory";
14837 + reg = <0x00000000 0x20000000>; // 512MB at 0
14841 + #address-cells = <1>;
14842 + #size-cells = <1>;
14843 + device_type = "soc";
14844 + ranges = <0x0 0xe0000000 0x00100000>;
14845 + reg = <0xe0000000 0x00000200>;
14846 + bus-frequency = <0>;
14849 + compatible = "mpc83xx_wdt";
14850 + reg = <0x200 0x100>;
14854 + #address-cells = <1>;
14855 + #size-cells = <0>;
14856 + cell-index = <0>;
14857 + compatible = "fsl-i2c";
14858 + reg = <0x3000 0x100>;
14859 + interrupts = <0xe 0x8>;
14860 + interrupt-parent = < &ipic >;
14865 + #address-cells = <1>;
14866 + #size-cells = <0>;
14867 + cell-index = <1>;
14868 + compatible = "fsl-i2c";
14869 + reg = <0x3100 0x100>;
14870 + interrupts = <0xf 0x8>;
14871 + interrupt-parent = < &ipic >;
14876 + compatible = "fsl_spi";
14877 + reg = <0x7000 0x1000>;
14878 + interrupts = <0x10 0x8>;
14879 + interrupt-parent = < &ipic >;
14883 + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
14885 + compatible = "fsl-usb2-dr";
14886 + reg = <0x23000 0x1000>;
14887 + #address-cells = <1>;
14888 + #size-cells = <0>;
14889 + interrupt-parent = < &ipic >;
14890 + interrupts = <0x26 0x8>;
14891 + phy_type = "utmi_wide";
14895 + #address-cells = <1>;
14896 + #size-cells = <0>;
14897 + compatible = "fsl,gianfar-mdio";
14898 + reg = <0x24520 0x20>;
14899 + phy2: ethernet-phy@2 {
14900 + interrupt-parent = < &ipic >;
14901 + interrupts = <0x11 0x8>;
14903 + device_type = "ethernet-phy";
14905 + phy3: ethernet-phy@3 {
14906 + interrupt-parent = < &ipic >;
14907 + interrupts = <0x12 0x8>;
14909 + device_type = "ethernet-phy";
14913 + enet0: ethernet@24000 {
14914 + cell-index = <0>;
14915 + device_type = "network";
14917 + compatible = "gianfar";
14918 + reg = <0x24000 0x1000>;
14919 + local-mac-address = [ 00 00 00 00 00 00 ];
14920 + interrupts = <0x20 0x8 0x21 0x8 0x22 0x8>;
14921 + phy-connection-type = "mii";
14922 + interrupt-parent = < &ipic >;
14923 + phy-handle = < &phy2 >;
14926 + enet1: ethernet@25000 {
14927 + cell-index = <1>;
14928 + device_type = "network";
14930 + compatible = "gianfar";
14931 + reg = <0x25000 0x1000>;
14932 + local-mac-address = [ 00 00 00 00 00 00 ];
14933 + interrupts = <0x23 0x8 0x24 0x8 0x25 0x8>;
14934 + phy-connection-type = "mii";
14935 + interrupt-parent = < &ipic >;
14936 + phy-handle = < &phy3 >;
14939 + serial0: serial@4500 {
14940 + cell-index = <0>;
14941 + device_type = "serial";
14942 + compatible = "ns16550";
14943 + reg = <0x4500 0x100>;
14944 + clock-frequency = <0>;
14945 + interrupts = <0x9 0x8>;
14946 + interrupt-parent = < &ipic >;
14949 + serial1: serial@4600 {
14950 + cell-index = <1>;
14951 + device_type = "serial";
14952 + compatible = "ns16550";
14953 + reg = <0x4600 0x100>;
14954 + clock-frequency = <0>;
14955 + interrupts = <0xa 0x8>;
14956 + interrupt-parent = < &ipic >;
14961 + compatible = "talitos";
14962 + reg = <0x30000 0x10000>;
14963 + interrupts = <0xb 0x8>;
14964 + interrupt-parent = < &ipic >;
14965 + /* Rev. 3.0 geometry */
14966 + num-channels = <4>;
14967 + channel-fifo-len = <0x18>;
14968 + exec-units-mask = <0x000001fe>;
14969 + descriptor-types-mask = <0x03ab0ebf>;
14974 + compatible = "fsl,esdhc";
14975 + reg = <0x2e000 0x1000>;
14976 + interrupts = <0x2a 0x8>;
14977 + interrupt-parent = < &ipic >;
14981 + * interrupts cell = <intr #, sense>
14982 + * sense values match linux IORESOURCE_IRQ_* defines:
14983 + * sense == 8: Level, low assertion
14984 + * sense == 2: Edge, high-to-low change
14987 + compatible = "fsl,ipic";
14988 + interrupt-controller;
14989 + #address-cells = <0>;
14990 + #interrupt-cells = <2>;
14991 + reg = <0x700 0x100>;
14995 + pci0: pci@e0008500 {
14996 + cell-index = <0>;
14997 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
14998 + interrupt-map = <
15001 + 0x8800 0x0 0x0 0x1 &ipic 0x14 0x8
15002 + 0x8800 0x0 0x0 0x2 &ipic 0x15 0x8
15003 + 0x8800 0x0 0x0 0x3 &ipic 0x16 0x8
15004 + 0x8800 0x0 0x0 0x4 &ipic 0x17 0x8
15007 + 0x9000 0x0 0x0 0x1 &ipic 0x16 0x8
15008 + 0x9000 0x0 0x0 0x2 &ipic 0x17 0x8
15009 + 0x9000 0x0 0x0 0x3 &ipic 0x14 0x8
15010 + 0x9000 0x0 0x0 0x4 &ipic 0x15 0x8
15013 + 0x9800 0x0 0x0 0x1 &ipic 0x17 0x8
15014 + 0x9800 0x0 0x0 0x2 &ipic 0x14 0x8
15015 + 0x9800 0x0 0x0 0x3 &ipic 0x15 0x8
15016 + 0x9800 0x0 0x0 0x4 &ipic 0x16 0x8
15019 + 0xa800 0x0 0x0 0x1 &ipic 0x14 0x8
15020 + 0xa800 0x0 0x0 0x2 &ipic 0x15 0x8
15021 + 0xa800 0x0 0x0 0x3 &ipic 0x16 0x8
15022 + 0xa800 0x0 0x0 0x4 &ipic 0x17 0x8
15025 + 0xb000 0x0 0x0 0x1 &ipic 0x17 0x8
15026 + 0xb000 0x0 0x0 0x2 &ipic 0x14 0x8
15027 + 0xb000 0x0 0x0 0x3 &ipic 0x15 0x8
15028 + 0xb000 0x0 0x0 0x4 &ipic 0x16 0x8
15031 + 0xb800 0x0 0x0 0x1 &ipic 0x16 0x8
15032 + 0xb800 0x0 0x0 0x2 &ipic 0x17 0x8
15033 + 0xb800 0x0 0x0 0x3 &ipic 0x14 0x8
15034 + 0xb800 0x0 0x0 0x4 &ipic 0x15 0x8
15037 + 0xc000 0x0 0x0 0x1 &ipic 0x15 0x8
15038 + 0xc000 0x0 0x0 0x2 &ipic 0x16 0x8
15039 + 0xc000 0x0 0x0 0x3 &ipic 0x17 0x8
15040 + 0xc000 0x0 0x0 0x4 &ipic 0x14 0x8>;
15041 + interrupt-parent = < &ipic >;
15042 + interrupts = <0x42 0x8>;
15043 + bus-range = <0 0>;
15044 + ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
15045 + 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
15046 + 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
15047 + clock-frequency = <0>;
15048 + #interrupt-cells = <1>;
15049 + #size-cells = <2>;
15050 + #address-cells = <3>;
15051 + reg = <0xe0008500 0x100>;
15052 + compatible = "fsl,mpc8349-pci";
15053 + device_type = "pci";
15056 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8379_mds.dts powerpc.git/arch/powerpc/boot/dts/mpc8379_mds.dts
15057 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8379_mds.dts 1970-01-01 01:00:00.000000000 +0100
15058 +++ powerpc.git/arch/powerpc/boot/dts/mpc8379_mds.dts 2008-01-28 20:25:49.000000000 +0100
15061 + * MPC8379E MDS Device Tree Source
15063 + * Copyright 2007 Freescale Semiconductor Inc.
15065 + * This program is free software; you can redistribute it and/or modify it
15066 + * under the terms of the GNU General Public License as published by the
15067 + * Free Software Foundation; either version 2 of the License, or (at your
15068 + * option) any later version.
15074 + model = "fsl,mpc8379emds";
15075 + compatible = "fsl,mpc8379emds","fsl,mpc837xmds";
15076 + #address-cells = <1>;
15077 + #size-cells = <1>;
15080 + ethernet0 = &enet0;
15081 + ethernet1 = &enet1;
15082 + serial0 = &serial0;
15083 + serial1 = &serial1;
15088 + #address-cells = <1>;
15089 + #size-cells = <0>;
15092 + device_type = "cpu";
15094 + d-cache-line-size = <0x20>;
15095 + i-cache-line-size = <0x20>;
15096 + d-cache-size = <0x8000>; // L1, 32K
15097 + i-cache-size = <0x8000>; // L1, 32K
15098 + timebase-frequency = <0>;
15099 + bus-frequency = <0>;
15100 + clock-frequency = <0>;
15105 + device_type = "memory";
15106 + reg = <0x00000000 0x20000000>; // 512MB at 0
15110 + #address-cells = <1>;
15111 + #size-cells = <1>;
15112 + device_type = "soc";
15113 + ranges = <0x0 0xe0000000 0x00100000>;
15114 + reg = <0xe0000000 0x00000200>;
15115 + bus-frequency = <0>;
15118 + compatible = "mpc83xx_wdt";
15119 + reg = <0x200 0x100>;
15123 + #address-cells = <1>;
15124 + #size-cells = <0>;
15125 + cell-index = <0>;
15126 + compatible = "fsl-i2c";
15127 + reg = <0x3000 0x100>;
15128 + interrupts = <0xe 0x8>;
15129 + interrupt-parent = < &ipic >;
15134 + #address-cells = <1>;
15135 + #size-cells = <0>;
15136 + cell-index = <1>;
15137 + compatible = "fsl-i2c";
15138 + reg = <0x3100 0x100>;
15139 + interrupts = <0xf 0x8>;
15140 + interrupt-parent = < &ipic >;
15145 + compatible = "fsl_spi";
15146 + reg = <0x7000 0x1000>;
15147 + interrupts = <0x10 0x8>;
15148 + interrupt-parent = < &ipic >;
15152 + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
15154 + compatible = "fsl-usb2-dr";
15155 + reg = <0x23000 0x1000>;
15156 + #address-cells = <1>;
15157 + #size-cells = <0>;
15158 + interrupt-parent = < &ipic >;
15159 + interrupts = <0x26 0x8>;
15160 + phy_type = "utmi_wide";
15164 + #address-cells = <1>;
15165 + #size-cells = <0>;
15166 + compatible = "fsl,gianfar-mdio";
15167 + reg = <0x24520 0x20>;
15168 + phy2: ethernet-phy@2 {
15169 + interrupt-parent = < &ipic >;
15170 + interrupts = <0x11 0x8>;
15172 + device_type = "ethernet-phy";
15174 + phy3: ethernet-phy@3 {
15175 + interrupt-parent = < &ipic >;
15176 + interrupts = <0x12 0x8>;
15178 + device_type = "ethernet-phy";
15182 + enet0: ethernet@24000 {
15183 + cell-index = <0>;
15184 + device_type = "network";
15186 + compatible = "gianfar";
15187 + reg = <0x24000 0x1000>;
15188 + local-mac-address = [ 00 00 00 00 00 00 ];
15189 + interrupts = <0x20 0x8 0x21 0x8 0x22 0x8>;
15190 + phy-connection-type = "mii";
15191 + interrupt-parent = < &ipic >;
15192 + phy-handle = < &phy2 >;
15195 + enet1: ethernet@25000 {
15196 + cell-index = <1>;
15197 + device_type = "network";
15199 + compatible = "gianfar";
15200 + reg = <0x25000 0x1000>;
15201 + local-mac-address = [ 00 00 00 00 00 00 ];
15202 + interrupts = <0x23 0x8 0x24 0x8 0x25 0x8>;
15203 + phy-connection-type = "mii";
15204 + interrupt-parent = < &ipic >;
15205 + phy-handle = < &phy3 >;
15208 + serial0: serial@4500 {
15209 + cell-index = <0>;
15210 + device_type = "serial";
15211 + compatible = "ns16550";
15212 + reg = <0x4500 0x100>;
15213 + clock-frequency = <0>;
15214 + interrupts = <0x9 0x8>;
15215 + interrupt-parent = < &ipic >;
15218 + serial1: serial@4600 {
15219 + cell-index = <1>;
15220 + device_type = "serial";
15221 + compatible = "ns16550";
15222 + reg = <0x4600 0x100>;
15223 + clock-frequency = <0>;
15224 + interrupts = <0xa 0x8>;
15225 + interrupt-parent = < &ipic >;
15230 + compatible = "talitos";
15231 + reg = <0x30000 0x10000>;
15232 + interrupts = <0xb 0x8>;
15233 + interrupt-parent = < &ipic >;
15234 + /* Rev. 3.0 geometry */
15235 + num-channels = <4>;
15236 + channel-fifo-len = <0x18>;
15237 + exec-units-mask = <0x000001fe>;
15238 + descriptor-types-mask = <0x03ab0ebf>;
15243 + compatible = "fsl,esdhc";
15244 + reg = <0x2e000 0x1000>;
15245 + interrupts = <0x2a 0x8>;
15246 + interrupt-parent = < &ipic >;
15250 + compatible = "fsl,mpc8379-sata";
15251 + reg = <0x18000 0x1000>;
15252 + interrupts = <0x2c 0x8>;
15253 + interrupt-parent = < &ipic >;
15257 + compatible = "fsl,mpc8379-sata";
15258 + reg = <0x19000 0x1000>;
15259 + interrupts = <0x2d 0x8>;
15260 + interrupt-parent = < &ipic >;
15264 + compatible = "fsl,mpc8379-sata";
15265 + reg = <0x1a000 0x1000>;
15266 + interrupts = <0x2e 0x8>;
15267 + interrupt-parent = < &ipic >;
15271 + compatible = "fsl,mpc8379-sata";
15272 + reg = <0x1b000 0x1000>;
15273 + interrupts = <0x2f 0x8>;
15274 + interrupt-parent = < &ipic >;
15278 + * interrupts cell = <intr #, sense>
15279 + * sense values match linux IORESOURCE_IRQ_* defines:
15280 + * sense == 8: Level, low assertion
15281 + * sense == 2: Edge, high-to-low change
15284 + compatible = "fsl,ipic";
15285 + interrupt-controller;
15286 + #address-cells = <0>;
15287 + #interrupt-cells = <2>;
15288 + reg = <0x700 0x100>;
15292 + pci0: pci@e0008500 {
15293 + cell-index = <0>;
15294 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
15295 + interrupt-map = <
15298 + 0x8800 0x0 0x0 0x1 &ipic 0x14 0x8
15299 + 0x8800 0x0 0x0 0x2 &ipic 0x15 0x8
15300 + 0x8800 0x0 0x0 0x3 &ipic 0x16 0x8
15301 + 0x8800 0x0 0x0 0x4 &ipic 0x17 0x8
15304 + 0x9000 0x0 0x0 0x1 &ipic 0x16 0x8
15305 + 0x9000 0x0 0x0 0x2 &ipic 0x17 0x8
15306 + 0x9000 0x0 0x0 0x3 &ipic 0x14 0x8
15307 + 0x9000 0x0 0x0 0x4 &ipic 0x15 0x8
15310 + 0x9800 0x0 0x0 0x1 &ipic 0x17 0x8
15311 + 0x9800 0x0 0x0 0x2 &ipic 0x14 0x8
15312 + 0x9800 0x0 0x0 0x3 &ipic 0x15 0x8
15313 + 0x9800 0x0 0x0 0x4 &ipic 0x16 0x8
15316 + 0xa800 0x0 0x0 0x1 &ipic 0x14 0x8
15317 + 0xa800 0x0 0x0 0x2 &ipic 0x15 0x8
15318 + 0xa800 0x0 0x0 0x3 &ipic 0x16 0x8
15319 + 0xa800 0x0 0x0 0x4 &ipic 0x17 0x8
15322 + 0xb000 0x0 0x0 0x1 &ipic 0x17 0x8
15323 + 0xb000 0x0 0x0 0x2 &ipic 0x14 0x8
15324 + 0xb000 0x0 0x0 0x3 &ipic 0x15 0x8
15325 + 0xb000 0x0 0x0 0x4 &ipic 0x16 0x8
15328 + 0xb800 0x0 0x0 0x1 &ipic 0x16 0x8
15329 + 0xb800 0x0 0x0 0x2 &ipic 0x17 0x8
15330 + 0xb800 0x0 0x0 0x3 &ipic 0x14 0x8
15331 + 0xb800 0x0 0x0 0x4 &ipic 0x15 0x8
15334 + 0xc000 0x0 0x0 0x1 &ipic 0x15 0x8
15335 + 0xc000 0x0 0x0 0x2 &ipic 0x16 0x8
15336 + 0xc000 0x0 0x0 0x3 &ipic 0x17 0x8
15337 + 0xc000 0x0 0x0 0x4 &ipic 0x14 0x8>;
15338 + interrupt-parent = < &ipic >;
15339 + interrupts = <0x42 0x8>;
15340 + bus-range = <0 0>;
15341 + ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
15342 + 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
15343 + 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
15344 + clock-frequency = <0>;
15345 + #interrupt-cells = <1>;
15346 + #size-cells = <2>;
15347 + #address-cells = <3>;
15348 + reg = <0xe0008500 0x100>;
15349 + compatible = "fsl,mpc8349-pci";
15350 + device_type = "pci";
15353 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8540ads.dts powerpc.git/arch/powerpc/boot/dts/mpc8540ads.dts
15354 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8540ads.dts 2008-01-24 23:58:37.000000000 +0100
15355 +++ powerpc.git/arch/powerpc/boot/dts/mpc8540ads.dts 2008-01-28 20:25:49.000000000 +0100
15357 #address-cells = <1>;
15361 + ethernet0 = &enet0;
15362 + ethernet1 = &enet1;
15363 + ethernet2 = &enet2;
15364 + serial0 = &serial0;
15365 + serial1 = &serial1;
15370 #address-cells = <1>;
15376 - device_type = "i2c";
15377 + #address-cells = <1>;
15378 + #size-cells = <0>;
15379 + cell-index = <0>;
15380 compatible = "fsl-i2c";
15382 interrupts = <2b 2>;
15385 #address-cells = <1>;
15387 - device_type = "mdio";
15388 - compatible = "gianfar";
15389 + compatible = "fsl,gianfar-mdio";
15392 phy0: ethernet-phy@0 {
15393 interrupt-parent = <&mpic>;
15394 interrupts = <5 1>;
15395 @@ -97,64 +108,44 @@
15400 - #address-cells = <1>;
15401 - #size-cells = <0>;
15402 + enet0: ethernet@24000 {
15403 + cell-index = <0>;
15404 device_type = "network";
15406 compatible = "gianfar";
15407 reg = <24000 1000>;
15409 - * address is deprecated and will be removed
15410 - * in 2.6.25. Only recent versions of
15411 - * U-Boot support local-mac-address, however.
15413 - address = [ 00 00 00 00 00 00 ];
15414 local-mac-address = [ 00 00 00 00 00 00 ];
15415 interrupts = <1d 2 1e 2 22 2>;
15416 interrupt-parent = <&mpic>;
15417 phy-handle = <&phy0>;
15421 - #address-cells = <1>;
15422 - #size-cells = <0>;
15423 + enet1: ethernet@25000 {
15424 + cell-index = <1>;
15425 device_type = "network";
15427 compatible = "gianfar";
15428 reg = <25000 1000>;
15430 - * address is deprecated and will be removed
15431 - * in 2.6.25. Only recent versions of
15432 - * U-Boot support local-mac-address, however.
15434 - address = [ 00 00 00 00 00 00 ];
15435 local-mac-address = [ 00 00 00 00 00 00 ];
15436 interrupts = <23 2 24 2 28 2>;
15437 interrupt-parent = <&mpic>;
15438 phy-handle = <&phy1>;
15442 - #address-cells = <1>;
15443 - #size-cells = <0>;
15444 + enet2: ethernet@26000 {
15445 + cell-index = <2>;
15446 device_type = "network";
15448 compatible = "gianfar";
15449 reg = <26000 1000>;
15451 - * address is deprecated and will be removed
15452 - * in 2.6.25. Only recent versions of
15453 - * U-Boot support local-mac-address, however.
15455 - address = [ 00 00 00 00 00 00 ];
15456 local-mac-address = [ 00 00 00 00 00 00 ];
15457 interrupts = <29 2>;
15458 interrupt-parent = <&mpic>;
15459 phy-handle = <&phy3>;
15463 + serial0: serial@4500 {
15464 + cell-index = <0>;
15465 device_type = "serial";
15466 compatible = "ns16550";
15467 reg = <4500 100>; // reg base, size
15468 @@ -163,7 +154,8 @@
15469 interrupt-parent = <&mpic>;
15473 + serial1: serial@4600 {
15474 + cell-index = <1>;
15475 device_type = "serial";
15476 compatible = "ns16550";
15477 reg = <4600 100>; // reg base, size
15478 @@ -183,7 +175,8 @@
15483 + pci0: pci@e0008000 {
15484 + cell-index = <0>;
15485 interrupt-map-mask = <f800 0 0 7>;
15488 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8541cds.dts powerpc.git/arch/powerpc/boot/dts/mpc8541cds.dts
15489 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8541cds.dts 2008-01-24 23:58:37.000000000 +0100
15490 +++ powerpc.git/arch/powerpc/boot/dts/mpc8541cds.dts 2008-01-28 20:25:49.000000000 +0100
15492 #address-cells = <1>;
15496 + ethernet0 = &enet0;
15497 + ethernet1 = &enet1;
15498 + serial0 = &serial0;
15499 + serial1 = &serial1;
15505 #address-cells = <1>;
15511 - device_type = "i2c";
15512 + #address-cells = <1>;
15513 + #size-cells = <0>;
15514 + cell-index = <0>;
15515 compatible = "fsl-i2c";
15517 interrupts = <2b 2>;
15520 #address-cells = <1>;
15522 - device_type = "mdio";
15523 - compatible = "gianfar";
15524 + compatible = "fsl,gianfar-mdio";
15527 phy0: ethernet-phy@0 {
15528 interrupt-parent = <&mpic>;
15529 interrupts = <5 1>;
15535 - #address-cells = <1>;
15536 - #size-cells = <0>;
15537 + enet0: ethernet@24000 {
15538 + cell-index = <0>;
15539 device_type = "network";
15541 compatible = "gianfar";
15542 @@ -104,9 +114,8 @@
15543 phy-handle = <&phy0>;
15547 - #address-cells = <1>;
15548 - #size-cells = <0>;
15549 + enet1: ethernet@25000 {
15550 + cell-index = <1>;
15551 device_type = "network";
15553 compatible = "gianfar";
15554 @@ -117,7 +126,8 @@
15555 phy-handle = <&phy1>;
15559 + serial0: serial@4500 {
15560 + cell-index = <0>;
15561 device_type = "serial";
15562 compatible = "ns16550";
15563 reg = <4500 100>; // reg base, size
15564 @@ -126,7 +136,8 @@
15565 interrupt-parent = <&mpic>;
15569 + serial1: serial@4600 {
15570 + cell-index = <1>;
15571 device_type = "serial";
15572 compatible = "ns16550";
15573 reg = <4600 100>; // reg base, size
15574 @@ -183,7 +194,8 @@
15578 - pci1: pci@e0008000 {
15579 + pci0: pci@e0008000 {
15580 + cell-index = <0>;
15581 interrupt-map-mask = <1f800 0 0 7>;
15584 @@ -250,11 +262,12 @@
15585 #interrupt-cells = <2>;
15586 compatible = "chrp,iic";
15588 - interrupt-parent = <&pci1>;
15589 + interrupt-parent = <&pci0>;
15594 + pci1: pci@e0009000 {
15595 + cell-index = <1>;
15596 interrupt-map-mask = <f800 0 0 7>;
15599 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8544ds.dts powerpc.git/arch/powerpc/boot/dts/mpc8544ds.dts
15600 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8544ds.dts 2008-01-24 23:58:37.000000000 +0100
15601 +++ powerpc.git/arch/powerpc/boot/dts/mpc8544ds.dts 2008-01-28 20:25:49.000000000 +0100
15603 #address-cells = <1>;
15607 + ethernet0 = &enet0;
15608 + ethernet1 = &enet1;
15609 + serial0 = &serial0;
15610 + serial1 = &serial1;
15619 #address-cells = <1>;
15624 - device_type = "i2c";
15625 + #address-cells = <1>;
15626 + #size-cells = <0>;
15627 + cell-index = <0>;
15628 compatible = "fsl-i2c";
15630 interrupts = <2b 2>;
15631 @@ -72,12 +85,23 @@
15636 + #address-cells = <1>;
15637 + #size-cells = <0>;
15638 + cell-index = <1>;
15639 + compatible = "fsl-i2c";
15640 + reg = <3100 100>;
15641 + interrupts = <2b 2>;
15642 + interrupt-parent = <&mpic>;
15647 #address-cells = <1>;
15649 - device_type = "mdio";
15650 - compatible = "gianfar";
15651 + compatible = "fsl,gianfar-mdio";
15654 phy0: ethernet-phy@0 {
15655 interrupt-parent = <&mpic>;
15656 interrupts = <a 1>;
15662 - #address-cells = <1>;
15663 - #size-cells = <0>;
15664 + enet0: ethernet@24000 {
15665 + cell-index = <0>;
15666 device_type = "network";
15668 compatible = "gianfar";
15669 @@ -106,9 +129,8 @@
15670 phy-connection-type = "rgmii-id";
15674 - #address-cells = <1>;
15675 - #size-cells = <0>;
15676 + enet1: ethernet@26000 {
15677 + cell-index = <1>;
15678 device_type = "network";
15680 compatible = "gianfar";
15681 @@ -120,7 +142,8 @@
15682 phy-connection-type = "rgmii-id";
15686 + serial0: serial@4500 {
15687 + cell-index = <0>;
15688 device_type = "serial";
15689 compatible = "ns16550";
15691 @@ -129,7 +152,8 @@
15692 interrupt-parent = <&mpic>;
15696 + serial1: serial@4600 {
15697 + cell-index = <1>;
15698 device_type = "serial";
15699 compatible = "ns16550";
15701 @@ -156,7 +180,8 @@
15706 + pci0: pci@e0008000 {
15707 + cell-index = <0>;
15708 compatible = "fsl,mpc8540-pci";
15709 device_type = "pci";
15710 interrupt-map-mask = <f800 0 0 7>;
15711 @@ -187,7 +212,8 @@
15712 reg = <e0008000 1000>;
15716 + pci1: pcie@e0009000 {
15717 + cell-index = <1>;
15718 compatible = "fsl,mpc8548-pcie";
15719 device_type = "pci";
15720 #interrupt-cells = <1>;
15721 @@ -223,7 +249,8 @@
15726 + pci2: pcie@e000a000 {
15727 + cell-index = <2>;
15728 compatible = "fsl,mpc8548-pcie";
15729 device_type = "pci";
15730 #interrupt-cells = <1>;
15731 @@ -259,7 +286,8 @@
15736 + pci3: pcie@e000b000 {
15737 + cell-index = <3>;
15738 compatible = "fsl,mpc8548-pcie";
15739 device_type = "pci";
15740 #interrupt-cells = <1>;
15741 @@ -276,9 +304,9 @@
15744 e000 0 0 1 &i8259 c 2
15745 - e100 0 0 1 &i8259 9 2
15746 - e200 0 0 1 &i8259 a 2
15747 - e300 0 0 1 &i8259 b 2
15748 + e100 0 0 2 &i8259 9 2
15749 + e200 0 0 3 &i8259 a 2
15750 + e300 0 0 4 &i8259 b 2
15752 // IDSEL 0x1d Audio
15753 e800 0 0 1 &i8259 6 2
15754 @@ -369,6 +397,5 @@
15761 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8548cds.dts powerpc.git/arch/powerpc/boot/dts/mpc8548cds.dts
15762 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8548cds.dts 2008-01-24 23:58:37.000000000 +0100
15763 +++ powerpc.git/arch/powerpc/boot/dts/mpc8548cds.dts 2008-01-28 20:25:49.000000000 +0100
15765 #address-cells = <1>;
15769 + ethernet0 = &enet0;
15770 + ethernet1 = &enet1;
15772 + ethernet2 = &enet2;
15773 + ethernet3 = &enet3;
15775 + serial0 = &serial0;
15776 + serial1 = &serial1;
15783 #address-cells = <1>;
15789 - device_type = "i2c";
15790 + #address-cells = <1>;
15791 + #size-cells = <0>;
15792 + cell-index = <0>;
15793 compatible = "fsl-i2c";
15795 interrupts = <2b 2>;
15796 @@ -71,12 +87,23 @@
15801 + #address-cells = <1>;
15802 + #size-cells = <0>;
15803 + cell-index = <1>;
15804 + compatible = "fsl-i2c";
15805 + reg = <3100 100>;
15806 + interrupts = <2b 2>;
15807 + interrupt-parent = <&mpic>;
15812 #address-cells = <1>;
15814 - device_type = "mdio";
15815 - compatible = "gianfar";
15816 + compatible = "fsl,gianfar-mdio";
15819 phy0: ethernet-phy@0 {
15820 interrupt-parent = <&mpic>;
15821 interrupts = <5 1>;
15822 @@ -103,9 +130,8 @@
15827 - #address-cells = <1>;
15828 - #size-cells = <0>;
15829 + enet0: ethernet@24000 {
15830 + cell-index = <0>;
15831 device_type = "network";
15833 compatible = "gianfar";
15834 @@ -116,9 +142,8 @@
15835 phy-handle = <&phy0>;
15839 - #address-cells = <1>;
15840 - #size-cells = <0>;
15841 + enet1: ethernet@25000 {
15842 + cell-index = <1>;
15843 device_type = "network";
15845 compatible = "gianfar";
15846 @@ -130,9 +155,8 @@
15849 /* eTSEC 3/4 are currently broken
15851 - #address-cells = <1>;
15852 - #size-cells = <0>;
15853 + enet2: ethernet@26000 {
15854 + cell-index = <2>;
15855 device_type = "network";
15857 compatible = "gianfar";
15858 @@ -143,9 +167,8 @@
15859 phy-handle = <&phy2>;
15863 - #address-cells = <1>;
15864 - #size-cells = <0>;
15865 + enet3: ethernet@27000 {
15866 + cell-index = <3>;
15867 device_type = "network";
15869 compatible = "gianfar";
15870 @@ -157,7 +180,8 @@
15875 + serial0: serial@4500 {
15876 + cell-index = <0>;
15877 device_type = "serial";
15878 compatible = "ns16550";
15879 reg = <4500 100>; // reg base, size
15880 @@ -166,7 +190,8 @@
15881 interrupt-parent = <&mpic>;
15885 + serial1: serial@4600 {
15886 + cell-index = <1>;
15887 device_type = "serial";
15888 compatible = "ns16550";
15889 reg = <4600 100>; // reg base, size
15890 @@ -193,7 +218,8 @@
15895 + pci0: pci@e0008000 {
15896 + cell-index = <0>;
15897 interrupt-map-mask = <f800 0 0 7>;
15899 /* IDSEL 0x4 (PCIX Slot 2) */
15900 @@ -342,7 +368,8 @@
15905 + pci1: pci@e0009000 {
15906 + cell-index = <1>;
15907 interrupt-map-mask = <f800 0 0 7>;
15910 @@ -366,7 +393,8 @@
15911 device_type = "pci";
15915 + pci2: pcie@e000a000 {
15916 + cell-index = <2>;
15917 interrupt-map-mask = <f800 0 0 7>;
15920 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8555cds.dts powerpc.git/arch/powerpc/boot/dts/mpc8555cds.dts
15921 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8555cds.dts 2008-01-24 23:58:37.000000000 +0100
15922 +++ powerpc.git/arch/powerpc/boot/dts/mpc8555cds.dts 2008-01-28 20:25:49.000000000 +0100
15924 #address-cells = <1>;
15928 + ethernet0 = &enet0;
15929 + ethernet1 = &enet1;
15930 + serial0 = &serial0;
15931 + serial1 = &serial1;
15937 #address-cells = <1>;
15943 - device_type = "i2c";
15944 + #address-cells = <1>;
15945 + #size-cells = <0>;
15946 + cell-index = <0>;
15947 compatible = "fsl-i2c";
15949 interrupts = <2b 2>;
15952 #address-cells = <1>;
15954 - device_type = "mdio";
15955 - compatible = "gianfar";
15956 + compatible = "fsl,gianfar-mdio";
15959 phy0: ethernet-phy@0 {
15960 interrupt-parent = <&mpic>;
15961 interrupts = <5 1>;
15967 - #address-cells = <1>;
15968 - #size-cells = <0>;
15969 + enet0: ethernet@24000 {
15970 + cell-index = <0>;
15971 device_type = "network";
15973 compatible = "gianfar";
15974 @@ -104,9 +114,8 @@
15975 phy-handle = <&phy0>;
15979 - #address-cells = <1>;
15980 - #size-cells = <0>;
15981 + enet1: ethernet@25000 {
15982 + cell-index = <1>;
15983 device_type = "network";
15985 compatible = "gianfar";
15986 @@ -117,7 +126,8 @@
15987 phy-handle = <&phy1>;
15991 + serial0: serial@4500 {
15992 + cell-index = <0>;
15993 device_type = "serial";
15994 compatible = "ns16550";
15995 reg = <4500 100>; // reg base, size
15996 @@ -126,7 +136,8 @@
15997 interrupt-parent = <&mpic>;
16001 + serial1: serial@4600 {
16002 + cell-index = <1>;
16003 device_type = "serial";
16004 compatible = "ns16550";
16005 reg = <4600 100>; // reg base, size
16006 @@ -183,7 +194,8 @@
16010 - pci1: pci@e0008000 {
16011 + pci0: pci@e0008000 {
16012 + cell-index = <0>;
16013 interrupt-map-mask = <1f800 0 0 7>;
16016 @@ -250,11 +262,12 @@
16017 #interrupt-cells = <2>;
16018 compatible = "chrp,iic";
16020 - interrupt-parent = <&pci1>;
16021 + interrupt-parent = <&pci0>;
16026 + pci1: pci@e0009000 {
16027 + cell-index = <1>;
16028 interrupt-map-mask = <f800 0 0 7>;
16031 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8560ads.dts powerpc.git/arch/powerpc/boot/dts/mpc8560ads.dts
16032 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8560ads.dts 2008-01-24 23:58:37.000000000 +0100
16033 +++ powerpc.git/arch/powerpc/boot/dts/mpc8560ads.dts 2008-01-28 20:25:49.000000000 +0100
16035 #address-cells = <1>;
16039 + ethernet0 = &enet0;
16040 + ethernet1 = &enet1;
16041 + ethernet2 = &enet2;
16042 + ethernet3 = &enet3;
16043 + serial0 = &serial0;
16044 + serial1 = &serial1;
16049 #address-cells = <1>;
16051 @@ -63,11 +73,11 @@
16055 - device_type = "mdio";
16056 - compatible = "gianfar";
16057 - reg = <24520 20>;
16058 #address-cells = <1>;
16060 + compatible = "fsl,gianfar-mdio";
16061 + reg = <24520 20>;
16063 phy0: ethernet-phy@0 {
16064 interrupt-parent = <&mpic>;
16065 interrupts = <5 1>;
16066 @@ -94,36 +104,24 @@
16071 + enet0: ethernet@24000 {
16072 + cell-index = <0>;
16073 device_type = "network";
16075 compatible = "gianfar";
16076 reg = <24000 1000>;
16078 - * address is deprecated and will be removed
16079 - * in 2.6.25. Only recent versions of
16080 - * U-Boot support local-mac-address, however.
16082 - address = [ 00 00 00 00 00 00 ];
16083 local-mac-address = [ 00 00 00 00 00 00 ];
16084 interrupts = <1d 2 1e 2 22 2>;
16085 interrupt-parent = <&mpic>;
16086 phy-handle = <&phy0>;
16090 - #address-cells = <1>;
16091 - #size-cells = <0>;
16092 + enet1: ethernet@25000 {
16093 + cell-index = <1>;
16094 device_type = "network";
16096 compatible = "gianfar";
16097 reg = <25000 1000>;
16099 - * address is deprecated and will be removed
16100 - * in 2.6.25. Only recent versions of
16101 - * U-Boot support local-mac-address, however.
16103 - address = [ 00 00 00 00 00 00 ];
16104 local-mac-address = [ 00 00 00 00 00 00 ];
16105 interrupts = <23 2 24 2 28 2>;
16106 interrupt-parent = <&mpic>;
16107 @@ -174,7 +172,7 @@
16108 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
16112 + serial0: serial@91a00 {
16113 device_type = "serial";
16114 compatible = "fsl,mpc8560-scc-uart",
16115 "fsl,cpm2-scc-uart";
16116 @@ -186,7 +184,7 @@
16117 interrupt-parent = <&cpmpic>;
16121 + serial1: serial@91a20 {
16122 device_type = "serial";
16123 compatible = "fsl,mpc8560-scc-uart",
16124 "fsl,cpm2-scc-uart";
16125 @@ -198,17 +196,11 @@
16126 interrupt-parent = <&cpmpic>;
16130 + enet2: ethernet@91320 {
16131 device_type = "network";
16132 compatible = "fsl,mpc8560-fcc-enet",
16133 "fsl,cpm2-fcc-enet";
16134 reg = <91320 20 88500 100 913b0 1>;
16136 - * mac-address is deprecated and will be removed
16137 - * in 2.6.25. Only recent versions of
16138 - * U-Boot support local-mac-address, however.
16140 - mac-address = [ 00 00 00 00 00 00 ];
16141 local-mac-address = [ 00 00 00 00 00 00 ];
16142 fsl,cpm-command = <16200300>;
16143 interrupts = <21 8>;
16144 @@ -216,17 +208,11 @@
16145 phy-handle = <&phy2>;
16149 + enet3: ethernet@91340 {
16150 device_type = "network";
16151 compatible = "fsl,mpc8560-fcc-enet",
16152 "fsl,cpm2-fcc-enet";
16153 reg = <91340 20 88600 100 913d0 1>;
16155 - * mac-address is deprecated and will be removed
16156 - * in 2.6.25. Only recent versions of
16157 - * U-Boot support local-mac-address, however.
16159 - mac-address = [ 00 00 00 00 00 00 ];
16160 local-mac-address = [ 00 00 00 00 00 00 ];
16161 fsl,cpm-command = <1a400300>;
16162 interrupts = <22 8>;
16163 @@ -236,7 +222,8 @@
16168 + pci0: pci@e0008000 {
16169 + cell-index = <0>;
16170 #interrupt-cells = <1>;
16172 #address-cells = <3>;
16173 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8568mds.dts powerpc.git/arch/powerpc/boot/dts/mpc8568mds.dts
16174 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8568mds.dts 2008-01-24 23:58:37.000000000 +0100
16175 +++ powerpc.git/arch/powerpc/boot/dts/mpc8568mds.dts 2008-01-28 20:25:49.000000000 +0100
16177 #address-cells = <1>;
16181 + ethernet0 = &enet0;
16182 + ethernet1 = &enet1;
16183 + ethernet2 = &enet2;
16184 + ethernet3 = &enet3;
16185 + serial0 = &serial0;
16186 + serial1 = &serial1;
16192 #address-cells = <1>;
16196 #address-cells = <1>;
16198 - device_type = "i2c";
16199 + cell-index = <0>;
16200 compatible = "fsl-i2c";
16202 interrupts = <2b 2>;
16205 #address-cells = <1>;
16207 - device_type = "i2c";
16208 + cell-index = <1>;
16209 compatible = "fsl-i2c";
16211 interrupts = <2b 2>;
16212 @@ -101,9 +112,9 @@
16214 #address-cells = <1>;
16216 - device_type = "mdio";
16217 - compatible = "gianfar";
16218 + compatible = "fsl,gianfar-mdio";
16221 phy0: ethernet-phy@7 {
16222 interrupt-parent = <&mpic>;
16223 interrupts = <1 1>;
16224 @@ -130,45 +141,32 @@
16229 - #address-cells = <1>;
16230 - #size-cells = <0>;
16231 + enet0: ethernet@24000 {
16232 + cell-index = <0>;
16233 device_type = "network";
16235 compatible = "gianfar";
16236 reg = <24000 1000>;
16238 - * mac-address is deprecated and will be removed
16239 - * in 2.6.25. Only recent versions of
16240 - * U-Boot support local-mac-address, however.
16242 - mac-address = [ 00 00 00 00 00 00 ];
16243 local-mac-address = [ 00 00 00 00 00 00 ];
16244 interrupts = <1d 2 1e 2 22 2>;
16245 interrupt-parent = <&mpic>;
16246 phy-handle = <&phy2>;
16250 - #address-cells = <1>;
16251 - #size-cells = <0>;
16252 + enet1: ethernet@25000 {
16253 + cell-index = <1>;
16254 device_type = "network";
16256 compatible = "gianfar";
16257 reg = <25000 1000>;
16259 - * mac-address is deprecated and will be removed
16260 - * in 2.6.25. Only recent versions of
16261 - * U-Boot support local-mac-address, however.
16263 - mac-address = [ 00 00 00 00 00 00 ];
16264 local-mac-address = [ 00 00 00 00 00 00 ];
16265 interrupts = <23 2 24 2 28 2>;
16266 interrupt-parent = <&mpic>;
16267 phy-handle = <&phy3>;
16271 + serial0: serial@4500 {
16272 + cell-index = <0>;
16273 device_type = "serial";
16274 compatible = "ns16550";
16276 @@ -183,7 +181,8 @@
16281 + serial1: serial@4600 {
16282 + cell-index = <1>;
16283 device_type = "serial";
16284 compatible = "ns16550";
16286 @@ -318,45 +317,35 @@
16291 + enet2: ucc@2000 {
16292 device_type = "network";
16293 compatible = "ucc_geth";
16295 + cell-index = <1>;
16299 interrupt-parent = <&qeic>;
16301 - * mac-address is deprecated and will be removed
16302 - * in 2.6.25. Only recent versions of
16303 - * U-Boot support local-mac-address, however.
16305 - mac-address = [ 00 00 00 00 00 00 ];
16306 local-mac-address = [ 00 00 00 00 00 00 ];
16309 + rx-clock-name = "none";
16310 + tx-clock-name = "clk16";
16311 pio-handle = <&pio1>;
16312 phy-handle = <&phy0>;
16313 phy-connection-type = "rgmii-id";
16317 + enet3: ucc@3000 {
16318 device_type = "network";
16319 compatible = "ucc_geth";
16321 + cell-index = <2>;
16325 interrupt-parent = <&qeic>;
16327 - * mac-address is deprecated and will be removed
16328 - * in 2.6.25. Only recent versions of
16329 - * U-Boot support local-mac-address, however.
16331 - mac-address = [ 00 00 00 00 00 00 ];
16332 local-mac-address = [ 00 00 00 00 00 00 ];
16335 + rx-clock-name = "none";
16336 + tx-clock-name = "clk16";
16337 pio-handle = <&pio2>;
16338 phy-handle = <&phy1>;
16339 phy-connection-type = "rgmii-id";
16340 @@ -366,7 +355,6 @@
16341 #address-cells = <1>;
16344 - device_type = "mdio";
16345 compatible = "ucc_geth_phy";
16347 /* These are the same PHYs as on
16348 @@ -410,7 +398,8 @@
16353 + pci0: pci@e0008000 {
16354 + cell-index = <0>;
16355 interrupt-map-mask = <f800 0 0 7>;
16357 /* IDSEL 0x12 AD18 */
16358 @@ -440,7 +429,8 @@
16363 + pci1: pcie@e000a000 {
16364 + cell-index = <2>;
16365 interrupt-map-mask = <f800 0 0 7>;
16368 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8572ds.dts powerpc.git/arch/powerpc/boot/dts/mpc8572ds.dts
16369 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8572ds.dts 2008-01-24 23:58:37.000000000 +0100
16370 +++ powerpc.git/arch/powerpc/boot/dts/mpc8572ds.dts 2008-01-28 20:25:49.000000000 +0100
16372 #address-cells = <1>;
16376 + ethernet0 = &enet0;
16377 + ethernet1 = &enet1;
16378 + ethernet2 = &enet2;
16379 + ethernet3 = &enet3;
16380 + serial0 = &serial0;
16381 + serial1 = &serial1;
16388 #address-cells = <1>;
16394 - device_type = "i2c";
16395 + #address-cells = <1>;
16396 + #size-cells = <0>;
16397 + cell-index = <0>;
16398 compatible = "fsl-i2c";
16400 interrupts = <2b 2>;
16405 - device_type = "i2c";
16406 + #address-cells = <1>;
16407 + #size-cells = <0>;
16408 + cell-index = <1>;
16409 compatible = "fsl-i2c";
16411 interrupts = <2b 2>;
16414 #address-cells = <1>;
16416 - device_type = "mdio";
16417 - compatible = "gianfar";
16418 + compatible = "fsl,gianfar-mdio";
16421 phy0: ethernet-phy@0 {
16422 interrupt-parent = <&mpic>;
16423 interrupts = <a 1>;
16424 @@ -114,9 +130,8 @@
16429 - #address-cells = <1>;
16430 - #size-cells = <0>;
16431 + enet0: ethernet@24000 {
16432 + cell-index = <0>;
16433 device_type = "network";
16435 compatible = "gianfar";
16436 @@ -128,9 +143,8 @@
16437 phy-connection-type = "rgmii-id";
16441 - #address-cells = <1>;
16442 - #size-cells = <0>;
16443 + enet1: ethernet@25000 {
16444 + cell-index = <1>;
16445 device_type = "network";
16447 compatible = "gianfar";
16448 @@ -142,9 +156,8 @@
16449 phy-connection-type = "rgmii-id";
16453 - #address-cells = <1>;
16454 - #size-cells = <0>;
16455 + enet2: ethernet@26000 {
16456 + cell-index = <2>;
16457 device_type = "network";
16459 compatible = "gianfar";
16460 @@ -156,9 +169,8 @@
16461 phy-connection-type = "rgmii-id";
16465 - #address-cells = <1>;
16466 - #size-cells = <0>;
16467 + enet3: ethernet@27000 {
16468 + cell-index = <3>;
16469 device_type = "network";
16471 compatible = "gianfar";
16472 @@ -170,7 +182,8 @@
16473 phy-connection-type = "rgmii-id";
16477 + serial0: serial@4500 {
16478 + cell-index = <0>;
16479 device_type = "serial";
16480 compatible = "ns16550";
16482 @@ -179,7 +192,8 @@
16483 interrupt-parent = <&mpic>;
16487 + serial1: serial@4600 {
16488 + cell-index = <1>;
16489 device_type = "serial";
16490 compatible = "ns16550";
16492 @@ -206,7 +220,8 @@
16497 + pci0: pcie@ffe08000 {
16498 + cell-index = <0>;
16499 compatible = "fsl,mpc8548-pcie";
16500 device_type = "pci";
16501 #interrupt-cells = <1>;
16502 @@ -319,9 +334,9 @@
16505 e000 0 0 1 &i8259 c 2
16506 - e100 0 0 1 &i8259 9 2
16507 - e200 0 0 1 &i8259 a 2
16508 - e300 0 0 1 &i8259 b 2
16509 + e100 0 0 2 &i8259 9 2
16510 + e200 0 0 3 &i8259 a 2
16511 + e300 0 0 4 &i8259 b 2
16513 // IDSEL 0x1d Audio
16514 e800 0 0 1 &i8259 6 2
16515 @@ -415,7 +430,8 @@
16520 + pci1: pcie@ffe09000 {
16521 + cell-index = <1>;
16522 compatible = "fsl,mpc8548-pcie";
16523 device_type = "pci";
16524 #interrupt-cells = <1>;
16525 @@ -451,7 +467,8 @@
16530 + pci2: pcie@ffe0a000 {
16531 + cell-index = <2>;
16532 compatible = "fsl,mpc8548-pcie";
16533 device_type = "pci";
16534 #interrupt-cells = <1>;
16535 @@ -464,6 +481,7 @@
16536 clock-frequency = <1fca055>;
16537 interrupt-parent = <&mpic>;
16538 interrupts = <1b 2>;
16539 + interrupt-map-mask = <f800 0 0 7>;
16542 0000 0 0 1 &mpic 0 1
16543 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8610_hpcd.dts powerpc.git/arch/powerpc/boot/dts/mpc8610_hpcd.dts
16544 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8610_hpcd.dts 2008-01-24 23:58:37.000000000 +0100
16545 +++ powerpc.git/arch/powerpc/boot/dts/mpc8610_hpcd.dts 2008-01-28 20:25:49.000000000 +0100
16548 * MPC8610 HPCD Device Tree Source
16550 - * Copyright 2007 Freescale Semiconductor Inc.
16551 + * Copyright 2007-2008 Freescale Semiconductor Inc.
16553 * This program is free software; you can redistribute it and/or modify it
16554 * under the terms of the GNU General Public License Version 2 as published
16556 #address-cells = <1>;
16560 + serial0 = &serial0;
16561 + serial1 = &serial1;
16567 #address-cells = <1>;
16569 @@ -42,33 +49,42 @@
16571 #interrupt-cells = <2>;
16572 device_type = "soc";
16573 + compatible = "fsl,mpc8610-immr", "simple-bus";
16574 ranges = <0 e0000000 00100000>;
16575 reg = <e0000000 1000>;
16576 bus-frequency = <0>;
16579 - device_type = "i2c";
16580 - compatible = "fsl-i2c";
16581 #address-cells = <1>;
16583 + cell-index = <0>;
16584 + compatible = "fsl-i2c";
16586 interrupts = <2b 2>;
16587 interrupt-parent = <&mpic>;
16590 + cs4270:codec@4f {
16591 + compatible = "cirrus,cs4270";
16593 + /* MCLK source is a stand-alone oscillator */
16594 + clock-frequency = <bb8000>;
16599 - device_type = "i2c";
16600 - compatible = "fsl-i2c";
16601 #address-cells = <1>;
16603 + cell-index = <1>;
16604 + compatible = "fsl-i2c";
16606 interrupts = <2b 2>;
16607 interrupt-parent = <&mpic>;
16612 + serial0: serial@4500 {
16613 + cell-index = <0>;
16614 device_type = "serial";
16615 compatible = "ns16550";
16618 interrupt-parent = <&mpic>;
16622 + serial1: serial@4600 {
16623 + cell-index = <1>;
16624 device_type = "serial";
16625 compatible = "ns16550";
16628 interrupt-parent = <&mpic>;
16632 mpic: interrupt-controller@40000 {
16633 clock-frequency = <0>;
16634 interrupt-controller;
16635 @@ -103,9 +119,113 @@
16636 reg = <e0000 1000>;
16641 + compatible = "fsl,mpc8610-ssi";
16642 + cell-index = <0>;
16643 + reg = <16000 100>;
16644 + interrupt-parent = <&mpic>;
16645 + interrupts = <3e 2>;
16646 + fsl,mode = "i2s-slave";
16647 + codec-handle = <&cs4270>;
16651 + compatible = "fsl,mpc8610-ssi";
16652 + cell-index = <1>;
16653 + reg = <16100 100>;
16654 + interrupt-parent = <&mpic>;
16655 + interrupts = <3f 2>;
16659 + #address-cells = <1>;
16660 + #size-cells = <1>;
16661 + compatible = "fsl,mpc8610-dma", "fsl,eloplus-dma";
16662 + cell-index = <0>;
16663 + reg = <21300 4>; /* DMA general status register */
16664 + ranges = <0 21100 200>;
16667 + compatible = "fsl,mpc8610-dma-channel",
16668 + "fsl,eloplus-dma-channel";
16669 + cell-index = <0>;
16671 + interrupt-parent = <&mpic>;
16672 + interrupts = <14 2>;
16675 + compatible = "fsl,mpc8610-dma-channel",
16676 + "fsl,eloplus-dma-channel";
16677 + cell-index = <1>;
16679 + interrupt-parent = <&mpic>;
16680 + interrupts = <15 2>;
16683 + compatible = "fsl,mpc8610-dma-channel",
16684 + "fsl,eloplus-dma-channel";
16685 + cell-index = <2>;
16687 + interrupt-parent = <&mpic>;
16688 + interrupts = <16 2>;
16691 + compatible = "fsl,mpc8610-dma-channel",
16692 + "fsl,eloplus-dma-channel";
16693 + cell-index = <3>;
16695 + interrupt-parent = <&mpic>;
16696 + interrupts = <17 2>;
16701 + #address-cells = <1>;
16702 + #size-cells = <1>;
16703 + compatible = "fsl,mpc8610-dma", "fsl,mpc8540-dma";
16704 + cell-index = <1>;
16705 + reg = <c300 4>; /* DMA general status register */
16706 + ranges = <0 c100 200>;
16709 + compatible = "fsl,mpc8610-dma-channel",
16710 + "fsl,mpc8540-dma-channel";
16711 + cell-index = <0>;
16713 + interrupt-parent = <&mpic>;
16714 + interrupts = <3c 2>;
16717 + compatible = "fsl,mpc8610-dma-channel",
16718 + "fsl,mpc8540-dma-channel";
16719 + cell-index = <1>;
16721 + interrupt-parent = <&mpic>;
16722 + interrupts = <3d 2>;
16725 + compatible = "fsl,mpc8610-dma-channel",
16726 + "fsl,mpc8540-dma-channel";
16727 + cell-index = <2>;
16729 + interrupt-parent = <&mpic>;
16730 + interrupts = <3e 2>;
16733 + compatible = "fsl,mpc8610-dma-channel",
16734 + "fsl,mpc8540-dma-channel";
16735 + cell-index = <3>;
16737 + interrupt-parent = <&mpic>;
16738 + interrupts = <3f 2>;
16745 + pci0: pci@e0008000 {
16746 + cell-index = <0>;
16747 compatible = "fsl,mpc8610-pci";
16748 device_type = "pci";
16749 #interrupt-cells = <1>;
16750 @@ -134,7 +254,8 @@
16755 + pci1: pcie@e000a000 {
16756 + cell-index = <1>;
16757 compatible = "fsl,mpc8641-pcie";
16758 device_type = "pci";
16759 #interrupt-cells = <1>;
16760 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc8641_hpcn.dts powerpc.git/arch/powerpc/boot/dts/mpc8641_hpcn.dts
16761 --- linux-2.6.24/arch/powerpc/boot/dts/mpc8641_hpcn.dts 2008-01-24 23:58:37.000000000 +0100
16762 +++ powerpc.git/arch/powerpc/boot/dts/mpc8641_hpcn.dts 2008-01-28 20:25:49.000000000 +0100
16764 #address-cells = <1>;
16768 + ethernet0 = &enet0;
16769 + ethernet1 = &enet1;
16770 + ethernet2 = &enet2;
16771 + ethernet3 = &enet3;
16772 + serial0 = &serial0;
16773 + serial1 = &serial1;
16779 #address-cells = <1>;
16781 @@ -49,16 +60,60 @@
16782 reg = <00000000 40000000>; // 1G at 0x0
16785 + localbus@f8005000 {
16786 + #address-cells = <2>;
16787 + #size-cells = <1>;
16788 + compatible = "fsl,mpc8641-localbus", "simple-bus";
16789 + reg = <f8005000 1000>;
16790 + interrupts = <13 2>;
16791 + interrupt-parent = <&mpic>;
16793 + ranges = <0 0 ff800000 00800000
16794 + 1 0 fe000000 01000000
16795 + 2 0 f8200000 00100000
16796 + 3 0 f8100000 00100000>;
16799 + compatible = "cfi-flash";
16800 + reg = <0 0 00800000>;
16801 + bank-width = <2>;
16802 + device-width = <2>;
16803 + #address-cells = <1>;
16804 + #size-cells = <1>;
16806 + label = "kernel";
16807 + reg = <00000000 00300000>;
16809 + partition@300000 {
16810 + label = "firmware b";
16811 + reg = <00300000 00100000>;
16814 + partition@400000 {
16816 + reg = <00400000 00300000>;
16818 + partition@700000 {
16819 + label = "firmware a";
16820 + reg = <00700000 00100000>;
16827 #address-cells = <1>;
16829 device_type = "soc";
16830 + compatible = "simple-bus";
16831 ranges = <00000000 f8000000 00100000>;
16832 reg = <f8000000 00001000>; // CCSRBAR
16833 bus-frequency = <0>;
16836 - device_type = "i2c";
16837 + #address-cells = <1>;
16838 + #size-cells = <0>;
16839 + cell-index = <0>;
16840 compatible = "fsl-i2c";
16842 interrupts = <2b 2>;
16847 - device_type = "i2c";
16848 + #address-cells = <1>;
16849 + #size-cells = <0>;
16850 + cell-index = <1>;
16851 compatible = "fsl-i2c";
16853 interrupts = <2b 2>;
16856 #address-cells = <1>;
16858 - device_type = "mdio";
16859 - compatible = "gianfar";
16860 + compatible = "fsl,gianfar-mdio";
16863 phy0: ethernet-phy@0 {
16864 interrupt-parent = <&mpic>;
16865 interrupts = <a 1>;
16866 @@ -107,19 +164,12 @@
16871 - #address-cells = <1>;
16872 - #size-cells = <0>;
16873 + enet0: ethernet@24000 {
16874 + cell-index = <0>;
16875 device_type = "network";
16877 compatible = "gianfar";
16878 reg = <24000 1000>;
16880 - * mac-address is deprecated and will be removed
16881 - * in 2.6.25. Only recent versions of
16882 - * U-Boot support local-mac-address, however.
16884 - mac-address = [ 00 00 00 00 00 00 ];
16885 local-mac-address = [ 00 00 00 00 00 00 ];
16886 interrupts = <1d 2 1e 2 22 2>;
16887 interrupt-parent = <&mpic>;
16888 @@ -127,19 +177,12 @@
16889 phy-connection-type = "rgmii-id";
16893 - #address-cells = <1>;
16894 - #size-cells = <0>;
16895 + enet1: ethernet@25000 {
16896 + cell-index = <1>;
16897 device_type = "network";
16899 compatible = "gianfar";
16900 reg = <25000 1000>;
16902 - * mac-address is deprecated and will be removed
16903 - * in 2.6.25. Only recent versions of
16904 - * U-Boot support local-mac-address, however.
16906 - mac-address = [ 00 00 00 00 00 00 ];
16907 local-mac-address = [ 00 00 00 00 00 00 ];
16908 interrupts = <23 2 24 2 28 2>;
16909 interrupt-parent = <&mpic>;
16910 @@ -147,19 +190,12 @@
16911 phy-connection-type = "rgmii-id";
16915 - #address-cells = <1>;
16916 - #size-cells = <0>;
16917 + enet2: ethernet@26000 {
16918 + cell-index = <2>;
16919 device_type = "network";
16921 compatible = "gianfar";
16922 reg = <26000 1000>;
16924 - * mac-address is deprecated and will be removed
16925 - * in 2.6.25. Only recent versions of
16926 - * U-Boot support local-mac-address, however.
16928 - mac-address = [ 00 00 00 00 00 00 ];
16929 local-mac-address = [ 00 00 00 00 00 00 ];
16930 interrupts = <1F 2 20 2 21 2>;
16931 interrupt-parent = <&mpic>;
16932 @@ -167,26 +203,21 @@
16933 phy-connection-type = "rgmii-id";
16937 - #address-cells = <1>;
16938 - #size-cells = <0>;
16939 + enet3: ethernet@27000 {
16940 + cell-index = <3>;
16941 device_type = "network";
16943 compatible = "gianfar";
16944 reg = <27000 1000>;
16946 - * mac-address is deprecated and will be removed
16947 - * in 2.6.25. Only recent versions of
16948 - * U-Boot support local-mac-address, however.
16950 - mac-address = [ 00 00 00 00 00 00 ];
16951 local-mac-address = [ 00 00 00 00 00 00 ];
16952 interrupts = <25 2 26 2 27 2>;
16953 interrupt-parent = <&mpic>;
16954 phy-handle = <&phy3>;
16955 phy-connection-type = "rgmii-id";
16959 + serial0: serial@4500 {
16960 + cell-index = <0>;
16961 device_type = "serial";
16962 compatible = "ns16550";
16964 @@ -195,7 +226,8 @@
16965 interrupt-parent = <&mpic>;
16969 + serial1: serial@4600 {
16970 + cell-index = <1>;
16971 device_type = "serial";
16972 compatible = "ns16550";
16974 @@ -222,7 +254,8 @@
16979 + pci0: pcie@f8008000 {
16980 + cell-index = <0>;
16981 compatible = "fsl,mpc8641-pcie";
16982 device_type = "pci";
16983 #interrupt-cells = <1>;
16984 @@ -335,9 +368,9 @@
16987 e000 0 0 1 &i8259 c 2
16988 - e100 0 0 1 &i8259 9 2
16989 - e200 0 0 1 &i8259 a 2
16990 - e300 0 0 1 &i8259 b 2
16991 + e100 0 0 2 &i8259 9 2
16992 + e200 0 0 3 &i8259 a 2
16993 + e300 0 0 4 &i8259 b 2
16995 // IDSEL 0x1d Audio
16996 e800 0 0 1 &i8259 6 2
16997 @@ -430,7 +463,8 @@
17002 + pci1: pcie@f8009000 {
17003 + cell-index = <1>;
17004 compatible = "fsl,mpc8641-pcie";
17005 device_type = "pci";
17006 #interrupt-cells = <1>;
17007 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/mpc866ads.dts powerpc.git/arch/powerpc/boot/dts/mpc866ads.dts
17008 --- linux-2.6.24/arch/powerpc/boot/dts/mpc866ads.dts 2008-01-24 23:58:37.000000000 +0100
17009 +++ powerpc.git/arch/powerpc/boot/dts/mpc866ads.dts 2008-01-28 20:25:49.000000000 +0100
17013 model = "MPC866ADS";
17014 - compatible = "mpc8xx";
17015 + compatible = "fsl,mpc866ads";
17016 #address-cells = <1>;
17019 @@ -23,15 +23,15 @@
17021 device_type = "cpu";
17023 - d-cache-line-size = <20>; // 32 bytes
17024 - i-cache-line-size = <20>; // 32 bytes
17025 + d-cache-line-size = <10>; // 16 bytes
17026 + i-cache-line-size = <10>; // 16 bytes
17027 d-cache-size = <2000>; // L1, 8K
17028 i-cache-size = <4000>; // L1, 16K
17029 timebase-frequency = <0>;
17030 bus-frequency = <0>;
17031 clock-frequency = <0>;
17032 interrupts = <f 2>; // decrementer interrupt
17033 - interrupt-parent = <&Mpc8xx_pic>;
17034 + interrupt-parent = <&PIC>;
17038 @@ -40,107 +40,139 @@
17039 reg = <00000000 800000>;
17042 - soc866@ff000000 {
17043 + localbus@ff000100 {
17044 + compatible = "fsl,mpc866-localbus", "fsl,pq1-localbus";
17045 + #address-cells = <2>;
17046 + #size-cells = <1>;
17047 + reg = <ff000100 40>;
17050 + 1 0 ff080000 00008000
17051 + 5 0 ff0a0000 00008000
17054 + board-control@1,0 {
17055 + reg = <1 0 20 5 300 4>;
17056 + compatible = "fsl,mpc866ads-bcsr";
17061 #address-cells = <1>;
17063 device_type = "soc";
17064 ranges = <0 ff000000 00100000>;
17065 reg = <ff000000 00000200>;
17066 bus-frequency = <0>;
17068 - device_type = "mdio";
17069 - compatible = "fs_enet";
17073 + compatible = "fsl,mpc866-fec-mdio", "fsl,pq1-fec-mdio";
17075 #address-cells = <1>;
17077 - phy: ethernet-phy@f {
17078 + PHY: ethernet-phy@f {
17080 device_type = "ethernet-phy";
17086 device_type = "network";
17087 - compatible = "fs_enet";
17090 + compatible = "fsl,mpc866-fec-enet",
17091 + "fsl,pq1-fec-enet";
17093 - mac-address = [ 00 00 0C 00 01 FD ];
17094 + local-mac-address = [ 00 00 00 00 00 00 ];
17095 interrupts = <3 1>;
17096 - interrupt-parent = <&Mpc8xx_pic>;
17097 - phy-handle = <&Phy>;
17098 + interrupt-parent = <&PIC>;
17099 + phy-handle = <&PHY>;
17100 + linux,network-index = <0>;
17103 - mpc8xx_pic: pic@ff000000 {
17105 interrupt-controller;
17106 - #address-cells = <0>;
17107 #interrupt-cells = <2>;
17109 - device_type = "mpc8xx-pic";
17110 - compatible = "CPM";
17111 + compatible = "fsl,mpc866-pic", "fsl,pq1-pic";
17116 #address-cells = <1>;
17118 - device_type = "cpm";
17120 - ranges = <0 0 4000>;
17122 - command-proc = <9c0>;
17123 + compatible = "fsl,mpc866-cpm", "fsl,cpm1";
17126 brg-frequency = <0>;
17127 interrupts = <0 2>; // cpm error interrupt
17128 - interrupt-parent = <&Cpm_pic>;
17129 + interrupt-parent = <&CPM_PIC>;
17131 - cpm_pic: pic@930 {
17133 + #address-cells = <1>;
17134 + #size-cells = <1>;
17135 + ranges = <0 2000 2000>;
17138 + compatible = "fsl,cpm-muram-data";
17144 + compatible = "fsl,mpc866-brg",
17148 + clock-frequency = <0>;
17151 + CPM_PIC: pic@930 {
17152 interrupt-controller;
17153 #address-cells = <0>;
17154 - #interrupt-cells = <2>;
17155 + #interrupt-cells = <1>;
17156 interrupts = <5 2 0 2>;
17157 - interrupt-parent = <&Mpc8xx_pic>;
17158 + interrupt-parent = <&PIC>;
17160 - device_type = "cpm-pic";
17161 - compatible = "CPM";
17162 + compatible = "fsl,mpc866-cpm-pic",
17169 device_type = "serial";
17170 - compatible = "cpm_uart";
17173 + compatible = "fsl,mpc866-smc-uart",
17174 + "fsl,cpm1-smc-uart";
17175 reg = <a80 10 3e80 40>;
17176 - clock-setup = <00ffffff 0>;
17179 - current-speed = <0>;
17180 - interrupts = <4 3>;
17181 - interrupt-parent = <&Cpm_pic>;
17182 + interrupts = <4>;
17183 + interrupt-parent = <&CPM_PIC>;
17184 + fsl,cpm-brg = <1>;
17185 + fsl,cpm-command = <0090>;
17190 device_type = "serial";
17191 - compatible = "cpm_uart";
17194 - reg = <a90 20 3f80 40>;
17195 - clock-setup = <ff00ffff 90000>;
17198 - current-speed = <0>;
17199 - interrupts = <3 3>;
17200 - interrupt-parent = <&Cpm_pic>;
17201 + compatible = "fsl,mpc866-smc-uart",
17202 + "fsl,cpm1-smc-uart";
17203 + reg = <a90 10 3f80 40>;
17204 + interrupts = <3>;
17205 + interrupt-parent = <&CPM_PIC>;
17206 + fsl,cpm-brg = <2>;
17207 + fsl,cpm-command = <00d0>;
17212 device_type = "network";
17213 - compatible = "fs_enet";
17216 - reg = <a00 18 3c00 80>;
17217 - mac-address = [ 00 00 0C 00 03 FD ];
17218 - interrupts = <1e 3>;
17219 - interrupt-parent = <&Cpm_pic>;
17220 + compatible = "fsl,mpc866-scc-enet",
17221 + "fsl,cpm1-scc-enet";
17222 + reg = <a00 18 3c00 100>;
17223 + local-mac-address = [ 00 00 00 00 00 00 ];
17224 + interrupts = <1e>;
17225 + interrupt-parent = <&CPM_PIC>;
17226 + fsl,cpm-command = <0000>;
17227 + linux,network-index = <1>;
17233 + linux,stdout-path = "/soc/cpm/serial@a80";
17236 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/rainier.dts powerpc.git/arch/powerpc/boot/dts/rainier.dts
17237 --- linux-2.6.24/arch/powerpc/boot/dts/rainier.dts 1970-01-01 01:00:00.000000000 +0100
17238 +++ powerpc.git/arch/powerpc/boot/dts/rainier.dts 2008-01-28 20:25:49.000000000 +0100
17241 + * Device Tree Source for AMCC Rainier
17243 + * Based on Sequoia code
17244 + * Copyright (c) 2007 MontaVista Software, Inc.
17246 + * FIXME: Draft only!
17248 + * This file is licensed under the terms of the GNU General Public
17249 + * License version 2. This program is licensed "as is" without
17250 + * any warranty of any kind, whether express or implied.
17255 + #address-cells = <2>;
17256 + #size-cells = <1>;
17257 + model = "amcc,rainier";
17258 + compatible = "amcc,rainier";
17259 + dcr-parent = <&/cpus/cpu@0>;
17262 + ethernet0 = &EMAC0;
17263 + ethernet1 = &EMAC1;
17264 + serial0 = &UART0;
17265 + serial1 = &UART1;
17266 + serial2 = &UART2;
17267 + serial3 = &UART3;
17271 + #address-cells = <1>;
17272 + #size-cells = <0>;
17275 + device_type = "cpu";
17276 + model = "PowerPC,440GRx";
17278 + clock-frequency = <0>; /* Filled in by zImage */
17279 + timebase-frequency = <0>; /* Filled in by zImage */
17280 + i-cache-line-size = <20>;
17281 + d-cache-line-size = <20>;
17282 + i-cache-size = <8000>;
17283 + d-cache-size = <8000>;
17285 + dcr-access-method = "native";
17290 + device_type = "memory";
17291 + reg = <0 0 0>; /* Filled in by zImage */
17294 + UIC0: interrupt-controller0 {
17295 + compatible = "ibm,uic-440grx","ibm,uic";
17296 + interrupt-controller;
17297 + cell-index = <0>;
17298 + dcr-reg = <0c0 009>;
17299 + #address-cells = <0>;
17300 + #size-cells = <0>;
17301 + #interrupt-cells = <2>;
17304 + UIC1: interrupt-controller1 {
17305 + compatible = "ibm,uic-440grx","ibm,uic";
17306 + interrupt-controller;
17307 + cell-index = <1>;
17308 + dcr-reg = <0d0 009>;
17309 + #address-cells = <0>;
17310 + #size-cells = <0>;
17311 + #interrupt-cells = <2>;
17312 + interrupts = <1e 4 1f 4>; /* cascade */
17313 + interrupt-parent = <&UIC0>;
17316 + UIC2: interrupt-controller2 {
17317 + compatible = "ibm,uic-440grx","ibm,uic";
17318 + interrupt-controller;
17319 + cell-index = <2>;
17320 + dcr-reg = <0e0 009>;
17321 + #address-cells = <0>;
17322 + #size-cells = <0>;
17323 + #interrupt-cells = <2>;
17324 + interrupts = <1c 4 1d 4>; /* cascade */
17325 + interrupt-parent = <&UIC0>;
17329 + compatible = "ibm,sdr-440grx", "ibm,sdr-440ep";
17330 + dcr-reg = <00e 002>;
17334 + compatible = "ibm,cpr-440grx", "ibm,cpr-440ep";
17335 + dcr-reg = <00c 002>;
17339 + compatible = "ibm,plb-440grx", "ibm,plb4";
17340 + #address-cells = <2>;
17341 + #size-cells = <1>;
17343 + clock-frequency = <0>; /* Filled in by zImage */
17346 + compatible = "ibm,sdram-440grx", "ibm,sdram-44x-ddr2denali";
17347 + dcr-reg = <010 2>;
17351 + compatible = "ibm,dma-440grx", "ibm,dma-4xx";
17352 + dcr-reg = <100 027>;
17356 + compatible = "ibm,mcmal-440grx", "ibm,mcmal2";
17357 + dcr-reg = <180 62>;
17358 + num-tx-chans = <2>;
17359 + num-rx-chans = <2>;
17360 + interrupt-parent = <&MAL0>;
17361 + interrupts = <0 1 2 3 4>;
17362 + #interrupt-cells = <1>;
17363 + #address-cells = <0>;
17364 + #size-cells = <0>;
17365 + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
17366 + /*RXEOB*/ 1 &UIC0 b 4
17367 + /*SERR*/ 2 &UIC1 0 4
17368 + /*TXDE*/ 3 &UIC1 1 4
17369 + /*RXDE*/ 4 &UIC1 2 4>;
17370 + interrupt-map-mask = <ffffffff>;
17374 + compatible = "ibm,opb-440grx", "ibm,opb";
17375 + #address-cells = <1>;
17376 + #size-cells = <1>;
17377 + ranges = <00000000 1 00000000 80000000
17378 + 80000000 1 80000000 80000000>;
17379 + interrupt-parent = <&UIC1>;
17380 + interrupts = <7 4>;
17381 + clock-frequency = <0>; /* Filled in by zImage */
17384 + compatible = "ibm,ebc-440grx", "ibm,ebc";
17385 + dcr-reg = <012 2>;
17386 + #address-cells = <2>;
17387 + #size-cells = <1>;
17388 + clock-frequency = <0>; /* Filled in by zImage */
17389 + interrupts = <5 1>;
17390 + interrupt-parent = <&UIC1>;
17393 + compatible = "amd,s29gl256n", "cfi-flash";
17394 + bank-width = <2>;
17395 + reg = <0 000000 4000000>;
17396 + #address-cells = <1>;
17397 + #size-cells = <1>;
17399 + label = "Kernel";
17400 + reg = <0 180000>;
17402 + partition@180000 {
17403 + label = "ramdisk";
17404 + reg = <180000 200000>;
17406 + partition@380000 {
17407 + label = "file system";
17408 + reg = <380000 3aa0000>;
17410 + partition@3e20000 {
17412 + reg = <3e20000 140000>;
17414 + partition@3f60000 {
17416 + reg = <3f60000 40000>;
17418 + partition@3fa0000 {
17419 + label = "u-boot";
17420 + reg = <3fa0000 60000>;
17426 + UART0: serial@ef600300 {
17427 + device_type = "serial";
17428 + compatible = "ns16550";
17429 + reg = <ef600300 8>;
17430 + virtual-reg = <ef600300>;
17431 + clock-frequency = <0>; /* Filled in by zImage */
17432 + current-speed = <1c200>;
17433 + interrupt-parent = <&UIC0>;
17434 + interrupts = <0 4>;
17437 + UART1: serial@ef600400 {
17438 + device_type = "serial";
17439 + compatible = "ns16550";
17440 + reg = <ef600400 8>;
17441 + virtual-reg = <ef600400>;
17442 + clock-frequency = <0>;
17443 + current-speed = <0>;
17444 + interrupt-parent = <&UIC0>;
17445 + interrupts = <1 4>;
17448 + UART2: serial@ef600500 {
17449 + device_type = "serial";
17450 + compatible = "ns16550";
17451 + reg = <ef600500 8>;
17452 + virtual-reg = <ef600500>;
17453 + clock-frequency = <0>;
17454 + current-speed = <0>;
17455 + interrupt-parent = <&UIC1>;
17456 + interrupts = <3 4>;
17459 + UART3: serial@ef600600 {
17460 + device_type = "serial";
17461 + compatible = "ns16550";
17462 + reg = <ef600600 8>;
17463 + virtual-reg = <ef600600>;
17464 + clock-frequency = <0>;
17465 + current-speed = <0>;
17466 + interrupt-parent = <&UIC1>;
17467 + interrupts = <4 4>;
17470 + IIC0: i2c@ef600700 {
17471 + device_type = "i2c";
17472 + compatible = "ibm,iic-440grx", "ibm,iic";
17473 + reg = <ef600700 14>;
17474 + interrupt-parent = <&UIC0>;
17475 + interrupts = <2 4>;
17478 + IIC1: i2c@ef600800 {
17479 + device_type = "i2c";
17480 + compatible = "ibm,iic-440grx", "ibm,iic";
17481 + reg = <ef600800 14>;
17482 + interrupt-parent = <&UIC0>;
17483 + interrupts = <7 4>;
17486 + ZMII0: emac-zmii@ef600d00 {
17487 + device_type = "zmii-interface";
17488 + compatible = "ibm,zmii-440grx", "ibm,zmii";
17489 + reg = <ef600d00 c>;
17492 + RGMII0: emac-rgmii@ef601000 {
17493 + device_type = "rgmii-interface";
17494 + compatible = "ibm,rgmii-440grx", "ibm,rgmii";
17495 + reg = <ef601000 8>;
17499 + EMAC0: ethernet@ef600e00 {
17500 + linux,network-index = <0>;
17501 + device_type = "network";
17502 + compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4";
17503 + interrupt-parent = <&EMAC0>;
17504 + interrupts = <0 1>;
17505 + #interrupt-cells = <1>;
17506 + #address-cells = <0>;
17507 + #size-cells = <0>;
17508 + interrupt-map = </*Status*/ 0 &UIC0 18 4
17509 + /*Wake*/ 1 &UIC1 1d 4>;
17510 + reg = <ef600e00 70>;
17511 + local-mac-address = [000000000000];
17512 + mal-device = <&MAL0>;
17513 + mal-tx-channel = <0>;
17514 + mal-rx-channel = <0>;
17515 + cell-index = <0>;
17516 + max-frame-size = <5dc>;
17517 + rx-fifo-size = <1000>;
17518 + tx-fifo-size = <800>;
17519 + phy-mode = "rgmii";
17520 + phy-map = <00000000>;
17521 + zmii-device = <&ZMII0>;
17522 + zmii-channel = <0>;
17523 + rgmii-device = <&RGMII0>;
17524 + rgmii-channel = <0>;
17525 + has-inverted-stacr-oc;
17526 + has-new-stacr-staopc;
17529 + EMAC1: ethernet@ef600f00 {
17530 + linux,network-index = <1>;
17531 + device_type = "network";
17532 + compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4";
17533 + interrupt-parent = <&EMAC1>;
17534 + interrupts = <0 1>;
17535 + #interrupt-cells = <1>;
17536 + #address-cells = <0>;
17537 + #size-cells = <0>;
17538 + interrupt-map = </*Status*/ 0 &UIC0 19 4
17539 + /*Wake*/ 1 &UIC1 1f 4>;
17540 + reg = <ef600f00 70>;
17541 + local-mac-address = [000000000000];
17542 + mal-device = <&MAL0>;
17543 + mal-tx-channel = <1>;
17544 + mal-rx-channel = <1>;
17545 + cell-index = <1>;
17546 + max-frame-size = <5dc>;
17547 + rx-fifo-size = <1000>;
17548 + tx-fifo-size = <800>;
17549 + phy-mode = "rgmii";
17550 + phy-map = <00000000>;
17551 + zmii-device = <&ZMII0>;
17552 + zmii-channel = <1>;
17553 + rgmii-device = <&RGMII0>;
17554 + rgmii-channel = <1>;
17555 + has-inverted-stacr-oc;
17556 + has-new-stacr-staopc;
17560 + PCI0: pci@1ec000000 {
17561 + device_type = "pci";
17562 + #interrupt-cells = <1>;
17563 + #size-cells = <2>;
17564 + #address-cells = <3>;
17565 + compatible = "ibm,plb440grx-pci", "ibm,plb-pci";
17567 + reg = <1 eec00000 8 /* Config space access */
17568 + 1 eed00000 4 /* IACK */
17569 + 1 eed00000 4 /* Special cycle */
17570 + 1 ef400000 40>; /* Internal registers */
17572 + /* Outbound ranges, one memory and one IO,
17573 + * later cannot be changed. Chip supports a second
17574 + * IO range but we don't use it for now
17576 + ranges = <02000000 0 80000000 1 80000000 0 10000000
17577 + 01000000 0 00000000 1 e8000000 0 00100000>;
17579 + /* Inbound 2GB range starting at 0 */
17580 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
17582 + /* All PCI interrupts are routed to IRQ 67 */
17583 + interrupt-map-mask = <0000 0 0 0>;
17584 + interrupt-map = < 0000 0 0 0 &UIC2 3 8 >;
17589 + linux,stdout-path = "/plb/opb/serial@ef600300";
17590 + bootargs = "console=ttyS0,115200";
17593 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/sequoia.dts powerpc.git/arch/powerpc/boot/dts/sequoia.dts
17594 --- linux-2.6.24/arch/powerpc/boot/dts/sequoia.dts 2008-01-24 23:58:37.000000000 +0100
17595 +++ powerpc.git/arch/powerpc/boot/dts/sequoia.dts 2008-01-28 20:25:49.000000000 +0100
17596 @@ -17,14 +17,24 @@
17598 model = "amcc,sequoia";
17599 compatible = "amcc,sequoia";
17600 - dcr-parent = <&/cpus/PowerPC,440EPx@0>;
17601 + dcr-parent = <&/cpus/cpu@0>;
17604 + ethernet0 = &EMAC0;
17605 + ethernet1 = &EMAC1;
17606 + serial0 = &UART0;
17607 + serial1 = &UART1;
17608 + serial2 = &UART2;
17609 + serial3 = &UART3;
17613 #address-cells = <1>;
17616 - PowerPC,440EPx@0 {
17618 device_type = "cpu";
17619 + model = "PowerPC,440EPx";
17621 clock-frequency = <0>; /* Filled in by zImage */
17622 timebase-frequency = <0>; /* Filled in by zImage */
17624 clock-frequency = <0>; /* Filled in by zImage */
17627 - device_type = "memory-controller";
17628 compatible = "ibm,sdram-440epx", "ibm,sdram-44x-ddr2denali";
17631 @@ -122,6 +131,13 @@
17632 interrupt-map-mask = <ffffffff>;
17635 + USB1: usb@e0000400 {
17636 + compatible = "ohci-be";
17637 + reg = <0 e0000400 60>;
17638 + interrupt-parent = <&UIC0>;
17639 + interrupts = <15 8>;
17643 compatible = "ibm,opb-440epx", "ibm,opb";
17644 #address-cells = <1>;
17645 @@ -308,6 +324,33 @@
17646 has-new-stacr-staopc;
17650 + PCI0: pci@1ec000000 {
17651 + device_type = "pci";
17652 + #interrupt-cells = <1>;
17653 + #size-cells = <2>;
17654 + #address-cells = <3>;
17655 + compatible = "ibm,plb440epx-pci", "ibm,plb-pci";
17657 + reg = <1 eec00000 8 /* Config space access */
17658 + 1 eed00000 4 /* IACK */
17659 + 1 eed00000 4 /* Special cycle */
17660 + 1 ef400000 40>; /* Internal registers */
17662 + /* Outbound ranges, one memory and one IO,
17663 + * later cannot be changed. Chip supports a second
17664 + * IO range but we don't use it for now
17666 + ranges = <02000000 0 80000000 1 80000000 0 10000000
17667 + 01000000 0 00000000 1 e8000000 0 00100000>;
17669 + /* Inbound 2GB range starting at 0 */
17670 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
17672 + /* All PCI interrupts are routed to IRQ 67 */
17673 + interrupt-map-mask = <0000 0 0 0>;
17674 + interrupt-map = < 0000 0 0 0 &UIC2 3 8 >;
17679 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/storcenter.dts powerpc.git/arch/powerpc/boot/dts/storcenter.dts
17680 --- linux-2.6.24/arch/powerpc/boot/dts/storcenter.dts 1970-01-01 01:00:00.000000000 +0100
17681 +++ powerpc.git/arch/powerpc/boot/dts/storcenter.dts 2008-01-28 20:25:49.000000000 +0100
17684 + * Device Tree Source for IOMEGA StorCenter
17686 + * Copyright 2007 Oyvind Repvik
17687 + * Copyright 2007 Jon Loeliger
17689 + * Based on the Kurobox DTS by G. Liakhovetski <g.liakhovetski@gmx.de>
17691 + * This file is licensed under the terms of the GNU General Public
17692 + * License version 2. This program is licensed "as is" without any
17693 + * warranty of any kind, whether express or implied.
17697 + model = "StorCenter";
17698 + compatible = "storcenter";
17699 + #address-cells = <1>;
17700 + #size-cells = <1>;
17703 + serial0 = &serial0;
17704 + serial1 = &serial1;
17709 + #address-cells = <1>;
17710 + #size-cells = <0>;
17713 + device_type = "cpu";
17715 + clock-frequency = <d# 200000000>; /* Hz */
17716 + timebase-frequency = <d# 25000000>; /* Hz */
17717 + bus-frequency = <0>; /* from bootwrapper */
17718 + i-cache-line-size = <d# 32>; /* bytes */
17719 + d-cache-line-size = <d# 32>; /* bytes */
17720 + i-cache-size = <4000>;
17721 + d-cache-size = <4000>;
17726 + device_type = "memory";
17727 + reg = <00000000 04000000>; /* 64MB @ 0x0 */
17731 + #address-cells = <1>;
17732 + #size-cells = <1>;
17733 + device_type = "soc";
17734 + compatible = "fsl,mpc8241", "mpc10x";
17735 + store-gathering = <0>; /* 0 == off, !0 == on */
17736 + ranges = <0 fc000000 100000>;
17737 + reg = <fc000000 100000>; /* EUMB */
17738 + bus-frequency = <0>; /* fixed by loader */
17741 + #address-cells = <1>;
17742 + #size-cells = <0>;
17743 + compatible = "fsl-i2c";
17744 + reg = <3000 100>;
17745 + interrupts = <5 2>;
17746 + interrupt-parent = <&mpic>;
17749 + compatible = "dallas,ds1337";
17754 + serial0: serial@4500 {
17755 + cell-index = <0>;
17756 + device_type = "serial";
17757 + compatible = "ns16550";
17759 + clock-frequency = <d# 97553800>; /* Hz */
17760 + current-speed = <d# 115200>;
17761 + interrupts = <9 2>;
17762 + interrupt-parent = <&mpic>;
17765 + serial1: serial@4600 {
17766 + cell-index = <1>;
17767 + device_type = "serial";
17768 + compatible = "ns16550";
17770 + clock-frequency = <d# 97553800>; /* Hz */
17771 + current-speed = <d# 9600>;
17772 + interrupts = <a 2>;
17773 + interrupt-parent = <&mpic>;
17776 + mpic: interrupt-controller@40000 {
17777 + #interrupt-cells = <2>;
17778 + device_type = "open-pic";
17779 + compatible = "chrp,open-pic";
17780 + interrupt-controller;
17781 + reg = <40000 40000>;
17786 + pci0: pci@fe800000 {
17787 + #address-cells = <3>;
17788 + #size-cells = <2>;
17789 + #interrupt-cells = <1>;
17790 + device_type = "pci";
17791 + compatible = "mpc10x-pci";
17792 + reg = <fe800000 1000>;
17793 + ranges = <01000000 0 0 fe000000 0 00c00000
17794 + 02000000 0 80000000 80000000 0 70000000>;
17795 + bus-range = <0 ff>;
17796 + clock-frequency = <d# 97553800>; /* Hz */
17797 + interrupt-parent = <&mpic>;
17798 + interrupt-map-mask = <f800 0 0 7>;
17799 + interrupt-map = <
17800 + /* IDSEL 13 - IDE */
17801 + 6800 0 0 1 &mpic 0 1
17802 + 6800 0 0 2 &mpic 0 1
17803 + 6800 0 0 3 &mpic 0 1
17804 + /* IDSEL 14 - USB */
17805 + 7000 0 0 1 &mpic 0 1
17806 + 7000 0 0 2 &mpic 0 1
17807 + 7000 0 0 3 &mpic 0 1
17808 + 7000 0 0 4 &mpic 0 1
17809 + /* IDSEL 15 - ETH */
17810 + 7800 0 0 1 &mpic 0 1
17811 + 7800 0 0 2 &mpic 0 1
17812 + 7800 0 0 3 &mpic 0 1
17813 + 7800 0 0 4 &mpic 0 1
17818 + linux,stdout-path = "/soc/serial@4500";
17821 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/taishan.dts powerpc.git/arch/powerpc/boot/dts/taishan.dts
17822 --- linux-2.6.24/arch/powerpc/boot/dts/taishan.dts 1970-01-01 01:00:00.000000000 +0100
17823 +++ powerpc.git/arch/powerpc/boot/dts/taishan.dts 2008-01-28 20:25:49.000000000 +0100
17826 + * Device Tree Source for IBM/AMCC Taishan
17828 + * Copyright 2007 IBM Corp.
17829 + * Hugh Blemings <hugh@au.ibm.com> based off code by
17830 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>, David Gibson <dwg@au1.ibm.com>
17832 + * This file is licensed under the terms of the GNU General Public
17833 + * License version 2. This program is licensed "as is" without
17834 + * any warranty of any kind, whether express or implied.
17838 + #address-cells = <2>;
17839 + #size-cells = <1>;
17840 + model = "amcc,taishan";
17841 + compatible = "amcc,taishan";
17842 + dcr-parent = <&/cpus/cpu@0>;
17845 + ethernet0 = &EMAC2;
17846 + ethernet1 = &EMAC3;
17847 + serial0 = &UART0;
17848 + serial1 = &UART1;
17852 + #address-cells = <1>;
17853 + #size-cells = <0>;
17856 + device_type = "cpu";
17857 + model = "PowerPC,440GX";
17859 + clock-frequency = <2FAF0800>; // 800MHz
17860 + timebase-frequency = <0>; // Filled in by zImage
17861 + i-cache-line-size = <32>;
17862 + d-cache-line-size = <32>;
17863 + i-cache-size = <8000>; /* 32 kB */
17864 + d-cache-size = <8000>; /* 32 kB */
17866 + dcr-access-method = "native";
17871 + device_type = "memory";
17872 + reg = <0 0 0>; // Filled in by zImage
17876 + UICB0: interrupt-controller-base {
17877 + compatible = "ibm,uic-440gx", "ibm,uic";
17878 + interrupt-controller;
17879 + cell-index = <3>;
17880 + dcr-reg = <200 009>;
17881 + #address-cells = <0>;
17882 + #size-cells = <0>;
17883 + #interrupt-cells = <2>;
17887 + UIC0: interrupt-controller0 {
17888 + compatible = "ibm,uic-440gx", "ibm,uic";
17889 + interrupt-controller;
17890 + cell-index = <0>;
17891 + dcr-reg = <0c0 009>;
17892 + #address-cells = <0>;
17893 + #size-cells = <0>;
17894 + #interrupt-cells = <2>;
17895 + interrupts = <01 4 00 4>; /* cascade - first non-critical */
17896 + interrupt-parent = <&UICB0>;
17900 + UIC1: interrupt-controller1 {
17901 + compatible = "ibm,uic-440gx", "ibm,uic";
17902 + interrupt-controller;
17903 + cell-index = <1>;
17904 + dcr-reg = <0d0 009>;
17905 + #address-cells = <0>;
17906 + #size-cells = <0>;
17907 + #interrupt-cells = <2>;
17908 + interrupts = <03 4 02 4>; /* cascade */
17909 + interrupt-parent = <&UICB0>;
17912 + UIC2: interrupt-controller2 {
17913 + compatible = "ibm,uic-440gx", "ibm,uic";
17914 + interrupt-controller;
17915 + cell-index = <2>; /* was 1 */
17916 + dcr-reg = <210 009>;
17917 + #address-cells = <0>;
17918 + #size-cells = <0>;
17919 + #interrupt-cells = <2>;
17920 + interrupts = <05 4 04 4>; /* cascade */
17921 + interrupt-parent = <&UICB0>;
17926 + compatible = "ibm,cpc-440gp";
17927 + dcr-reg = <0b0 003 0e0 010>;
17928 + // FIXME: anything else?
17932 + compatible = "ibm,plb-440gx", "ibm,plb4";
17933 + #address-cells = <2>;
17934 + #size-cells = <1>;
17936 + clock-frequency = <9896800>; // 160MHz
17938 + SDRAM0: memory-controller {
17939 + compatible = "ibm,sdram-440gp";
17940 + dcr-reg = <010 2>;
17941 + // FIXME: anything else?
17945 + compatible = "ibm,sram-440gp";
17946 + dcr-reg = <020 8 00a 1>;
17951 + compatible = "ibm,dma-440gp";
17952 + dcr-reg = <100 027>;
17956 + compatible = "ibm,mcmal-440gx", "ibm,mcmal2";
17957 + dcr-reg = <180 62>;
17958 + num-tx-chans = <4>;
17959 + num-rx-chans = <4>;
17960 + interrupt-parent = <&MAL0>;
17961 + interrupts = <0 1 2 3 4>;
17962 + #interrupt-cells = <1>;
17963 + #address-cells = <0>;
17964 + #size-cells = <0>;
17965 + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
17966 + /*RXEOB*/ 1 &UIC0 b 4
17967 + /*SERR*/ 2 &UIC1 0 4
17968 + /*TXDE*/ 3 &UIC1 1 4
17969 + /*RXDE*/ 4 &UIC1 2 4>;
17970 + interrupt-map-mask = <ffffffff>;
17974 + compatible = "ibm,opb-440gx", "ibm,opb";
17975 + #address-cells = <1>;
17976 + #size-cells = <1>;
17977 + /* Wish there was a nicer way of specifying a full 32-bit
17979 + ranges = <00000000 1 00000000 80000000
17980 + 80000000 1 80000000 80000000>;
17981 + dcr-reg = <090 00b>;
17982 + interrupt-parent = <&UIC1>;
17983 + interrupts = <7 4>;
17984 + clock-frequency = <4C4B400>; // 80MHz
17988 + compatible = "ibm,ebc-440gx", "ibm,ebc";
17989 + dcr-reg = <012 2>;
17990 + #address-cells = <2>;
17991 + #size-cells = <1>;
17992 + clock-frequency = <4C4B400>; // 80MHz
17994 + /* ranges property is supplied by zImage
17995 + * based on firmware's configuration of the
17998 + interrupts = <5 4>;
17999 + interrupt-parent = <&UIC1>;
18001 + /* TODO: Add other EBC devices */
18006 + UART0: serial@40000200 {
18007 + device_type = "serial";
18008 + compatible = "ns16550";
18009 + reg = <40000200 8>;
18010 + virtual-reg = <e0000200>;
18011 + clock-frequency = <A8C000>;
18012 + current-speed = <1C200>; /* 115200 */
18013 + interrupt-parent = <&UIC0>;
18014 + interrupts = <0 4>;
18017 + UART1: serial@40000300 {
18018 + device_type = "serial";
18019 + compatible = "ns16550";
18020 + reg = <40000300 8>;
18021 + virtual-reg = <e0000300>;
18022 + clock-frequency = <A8C000>;
18023 + current-speed = <1C200>; /* 115200 */
18024 + interrupt-parent = <&UIC0>;
18025 + interrupts = <1 4>;
18028 + IIC0: i2c@40000400 {
18030 + device_type = "i2c";
18031 + compatible = "ibm,iic-440gp", "ibm,iic";
18032 + reg = <40000400 14>;
18033 + interrupt-parent = <&UIC0>;
18034 + interrupts = <2 4>;
18036 + IIC1: i2c@40000500 {
18038 + device_type = "i2c";
18039 + compatible = "ibm,iic-440gp", "ibm,iic";
18040 + reg = <40000500 14>;
18041 + interrupt-parent = <&UIC0>;
18042 + interrupts = <3 4>;
18045 + GPIO0: gpio@40000700 {
18047 + compatible = "ibm,gpio-440gp";
18048 + reg = <40000700 20>;
18051 + ZMII0: emac-zmii@40000780 {
18052 + device_type = "zgmii-interface";
18053 + compatible = "ibm,zmii-440gx", "ibm,zmii";
18054 + reg = <40000780 c>;
18057 + RGMII0: emac-rgmii@40000790 {
18058 + device_type = "rgmii-interface";
18059 + compatible = "ibm,rgmii";
18060 + reg = <40000790 8>;
18064 + EMAC0: ethernet@40000800 {
18066 + linux,network-index = <2>;
18067 + device_type = "network";
18068 + compatible = "ibm,emac-440gx", "ibm,emac4";
18069 + interrupt-parent = <&UIC1>;
18070 + interrupts = <1c 4 1d 4>;
18071 + reg = <40000800 70>;
18072 + local-mac-address = [000000000000]; // Filled in by zImage
18073 + mal-device = <&MAL0>;
18074 + mal-tx-channel = <0>;
18075 + mal-rx-channel = <0>;
18076 + cell-index = <0>;
18077 + max-frame-size = <5dc>;
18078 + rx-fifo-size = <1000>;
18079 + tx-fifo-size = <800>;
18080 + phy-mode = "rmii";
18081 + phy-map = <00000001>;
18082 + zmii-device = <&ZMII0>;
18083 + zmii-channel = <0>;
18085 + EMAC1: ethernet@40000900 {
18087 + linux,network-index = <3>;
18088 + device_type = "network";
18089 + compatible = "ibm,emac-440gx", "ibm,emac4";
18090 + interrupt-parent = <&UIC1>;
18091 + interrupts = <1e 4 1f 4>;
18092 + reg = <40000900 70>;
18093 + local-mac-address = [000000000000]; // Filled in by zImage
18094 + mal-device = <&MAL0>;
18095 + mal-tx-channel = <1>;
18096 + mal-rx-channel = <1>;
18097 + cell-index = <1>;
18098 + max-frame-size = <5dc>;
18099 + rx-fifo-size = <1000>;
18100 + tx-fifo-size = <800>;
18101 + phy-mode = "rmii";
18102 + phy-map = <00000001>;
18103 + zmii-device = <&ZMII0>;
18104 + zmii-channel = <1>;
18107 + EMAC2: ethernet@40000c00 {
18108 + linux,network-index = <0>;
18109 + device_type = "network";
18110 + compatible = "ibm,emac-440gx", "ibm,emac4";
18111 + interrupt-parent = <&UIC2>;
18112 + interrupts = <0 4 1 4>;
18113 + reg = <40000c00 70>;
18114 + local-mac-address = [000000000000]; // Filled in by zImage
18115 + mal-device = <&MAL0>;
18116 + mal-tx-channel = <2>;
18117 + mal-rx-channel = <2>;
18118 + cell-index = <2>;
18119 + max-frame-size = <5dc>;
18120 + rx-fifo-size = <1000>;
18121 + tx-fifo-size = <800>;
18122 + phy-mode = "rgmii";
18123 + phy-map = <00000001>;
18124 + rgmii-device = <&RGMII0>;
18125 + rgmii-channel = <0>;
18126 + zmii-device = <&ZMII0>;
18127 + zmii-channel = <2>;
18130 + EMAC3: ethernet@40000e00 {
18131 + linux,network-index = <1>;
18132 + device_type = "network";
18133 + compatible = "ibm,emac-440gx", "ibm,emac4";
18134 + interrupt-parent = <&UIC2>;
18135 + interrupts = <2 4 3 4>;
18136 + reg = <40000e00 70>;
18137 + local-mac-address = [000000000000]; // Filled in by zImage
18138 + mal-device = <&MAL0>;
18139 + mal-tx-channel = <3>;
18140 + mal-rx-channel = <3>;
18141 + cell-index = <3>;
18142 + max-frame-size = <5dc>;
18143 + rx-fifo-size = <1000>;
18144 + tx-fifo-size = <800>;
18145 + phy-mode = "rgmii";
18146 + phy-map = <00000003>;
18147 + rgmii-device = <&RGMII0>;
18148 + rgmii-channel = <1>;
18149 + zmii-device = <&ZMII0>;
18150 + zmii-channel = <3>;
18154 + GPT0: gpt@40000a00 {
18156 + reg = <40000a00 d4>;
18157 + interrupt-parent = <&UIC0>;
18158 + interrupts = <12 4 13 4 14 4 15 4 16 4>;
18163 + PCIX0: pci@20ec00000 {
18164 + device_type = "pci";
18165 + #interrupt-cells = <1>;
18166 + #size-cells = <2>;
18167 + #address-cells = <3>;
18168 + compatible = "ibm,plb440gp-pcix", "ibm,plb-pcix";
18170 + large-inbound-windows;
18172 + reg = <2 0ec00000 8 /* Config space access */
18173 + 0 0 0 /* no IACK cycles */
18174 + 2 0ed00000 4 /* Special cycles */
18175 + 2 0ec80000 100 /* Internal registers */
18176 + 2 0ec80100 fc>; /* Internal messaging registers */
18178 + /* Outbound ranges, one memory and one IO,
18179 + * later cannot be changed
18181 + ranges = <02000000 0 80000000 00000003 80000000 0 80000000
18182 + 01000000 0 00000000 00000002 08000000 0 00010000>;
18184 + /* Inbound 2GB range starting at 0 */
18185 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
18187 + interrupt-map-mask = <f800 0 0 7>;
18188 + interrupt-map = <
18190 + 0800 0 0 1 &UIC0 17 8
18191 + 0800 0 0 2 &UIC0 18 8
18192 + 0800 0 0 3 &UIC0 19 8
18193 + 0800 0 0 4 &UIC0 1a 8
18196 + 1000 0 0 1 &UIC0 18 8
18197 + 1000 0 0 2 &UIC0 19 8
18198 + 1000 0 0 3 &UIC0 1a 8
18199 + 1000 0 0 4 &UIC0 17 8
18205 + linux,stdout-path = "/plb/opb/serial@40000300";
18208 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/tqm5200.dts powerpc.git/arch/powerpc/boot/dts/tqm5200.dts
18209 --- linux-2.6.24/arch/powerpc/boot/dts/tqm5200.dts 1970-01-01 01:00:00.000000000 +0100
18210 +++ powerpc.git/arch/powerpc/boot/dts/tqm5200.dts 2008-01-28 20:25:49.000000000 +0100
18213 + * TQM5200 board Device Tree Source
18215 + * Copyright (C) 2007 Semihalf
18216 + * Marian Balakowicz <m8@semihalf.com>
18218 + * This program is free software; you can redistribute it and/or modify it
18219 + * under the terms of the GNU General Public License as published by the
18220 + * Free Software Foundation; either version 2 of the License, or (at your
18221 + * option) any later version.
18225 + * WARNING: Do not depend on this tree layout remaining static just yet.
18226 + * The MPC5200 device tree conventions are still in flux
18227 + * Keep an eye on the linuxppc-dev mailing list for more details
18231 + model = "tqc,tqm5200";
18232 + compatible = "tqc,tqm5200";
18233 + #address-cells = <1>;
18234 + #size-cells = <1>;
18237 + #address-cells = <1>;
18238 + #size-cells = <0>;
18241 + device_type = "cpu";
18243 + d-cache-line-size = <20>;
18244 + i-cache-line-size = <20>;
18245 + d-cache-size = <4000>; // L1, 16K
18246 + i-cache-size = <4000>; // L1, 16K
18247 + timebase-frequency = <0>; // from bootloader
18248 + bus-frequency = <0>; // from bootloader
18249 + clock-frequency = <0>; // from bootloader
18254 + device_type = "memory";
18255 + reg = <00000000 04000000>; // 64MB
18258 + soc5200@f0000000 {
18259 + model = "fsl,mpc5200";
18260 + compatible = "fsl,mpc5200";
18261 + revision = ""; // from bootloader
18262 + device_type = "soc";
18263 + ranges = <0 f0000000 0000c000>;
18264 + reg = <f0000000 00000100>;
18265 + bus-frequency = <0>; // from bootloader
18266 + system-frequency = <0>; // from bootloader
18269 + compatible = "mpc5200-cdm";
18273 + mpc5200_pic: pic@500 {
18274 + // 5200 interrupts are encoded into two levels;
18275 + interrupt-controller;
18276 + #interrupt-cells = <3>;
18277 + compatible = "mpc5200-pic";
18281 + gpt@600 { // General Purpose Timer
18282 + compatible = "fsl,mpc5200-gpt";
18284 + interrupts = <1 9 0>;
18285 + interrupt-parent = <&mpc5200_pic>;
18290 + compatible = "mpc5200-gpio";
18292 + interrupts = <1 7 0>;
18293 + interrupt-parent = <&mpc5200_pic>;
18297 + compatible = "mpc5200-ohci","ohci-be";
18299 + interrupts = <2 6 0>;
18300 + interrupt-parent = <&mpc5200_pic>;
18303 + dma-controller@1200 {
18304 + compatible = "mpc5200-bestcomm";
18306 + interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
18307 + 3 4 0 3 5 0 3 6 0 3 7 0
18308 + 3 8 0 3 9 0 3 a 0 3 b 0
18309 + 3 c 0 3 d 0 3 e 0 3 f 0>;
18310 + interrupt-parent = <&mpc5200_pic>;
18314 + compatible = "mpc5200-xlb";
18315 + reg = <1f00 100>;
18318 + serial@2000 { // PSC1
18319 + device_type = "serial";
18320 + compatible = "mpc5200-psc-uart";
18321 + port-number = <0>; // Logical port assignment
18322 + reg = <2000 100>;
18323 + interrupts = <2 1 0>;
18324 + interrupt-parent = <&mpc5200_pic>;
18327 + serial@2200 { // PSC2
18328 + device_type = "serial";
18329 + compatible = "mpc5200-psc-uart";
18330 + port-number = <1>; // Logical port assignment
18331 + reg = <2200 100>;
18332 + interrupts = <2 2 0>;
18333 + interrupt-parent = <&mpc5200_pic>;
18336 + serial@2400 { // PSC3
18337 + device_type = "serial";
18338 + compatible = "mpc5200-psc-uart";
18339 + port-number = <2>; // Logical port assignment
18340 + reg = <2400 100>;
18341 + interrupts = <2 3 0>;
18342 + interrupt-parent = <&mpc5200_pic>;
18346 + device_type = "network";
18347 + compatible = "mpc5200-fec";
18348 + reg = <3000 800>;
18349 + local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */
18350 + interrupts = <2 5 0>;
18351 + interrupt-parent = <&mpc5200_pic>;
18355 + compatible = "mpc5200-ata";
18356 + reg = <3a00 100>;
18357 + interrupts = <2 7 0>;
18358 + interrupt-parent = <&mpc5200_pic>;
18362 + compatible = "mpc5200-i2c","fsl-i2c";
18364 + interrupts = <2 10 0>;
18365 + interrupt-parent = <&mpc5200_pic>;
18366 + fsl5200-clocking;
18370 + compatible = "mpc5200-sram";
18371 + reg = <8000 4000>;
18376 + #interrupt-cells = <1>;
18377 + #size-cells = <2>;
18378 + #address-cells = <3>;
18379 + device_type = "pci";
18380 + compatible = "fsl,mpc5200-pci";
18381 + reg = <f0000d00 100>;
18382 + interrupt-map-mask = <f800 0 0 7>;
18383 + interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3
18384 + c000 0 0 2 &mpc5200_pic 0 0 3
18385 + c000 0 0 3 &mpc5200_pic 0 0 3
18386 + c000 0 0 4 &mpc5200_pic 0 0 3>;
18387 + clock-frequency = <0>; // From boot loader
18388 + interrupts = <2 8 0 2 9 0 2 a 0>;
18389 + interrupt-parent = <&mpc5200_pic>;
18390 + bus-range = <0 0>;
18391 + ranges = <42000000 0 80000000 80000000 0 10000000
18392 + 02000000 0 90000000 90000000 0 10000000
18393 + 01000000 0 00000000 a0000000 0 01000000>;
18396 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/walnut.dts powerpc.git/arch/powerpc/boot/dts/walnut.dts
18397 --- linux-2.6.24/arch/powerpc/boot/dts/walnut.dts 2008-01-24 23:58:37.000000000 +0100
18398 +++ powerpc.git/arch/powerpc/boot/dts/walnut.dts 2008-01-28 20:25:49.000000000 +0100
18399 @@ -14,14 +14,21 @@
18401 model = "ibm,walnut";
18402 compatible = "ibm,walnut";
18403 - dcr-parent = <&/cpus/PowerPC,405GP@0>;
18404 + dcr-parent = <&/cpus/cpu@0>;
18407 + ethernet0 = &EMAC;
18408 + serial0 = &UART0;
18409 + serial1 = &UART1;
18413 #address-cells = <1>;
18416 - PowerPC,405GP@0 {
18418 device_type = "cpu";
18419 + model = "PowerPC,405GP";
18421 clock-frequency = <bebc200>; /* Filled in by zImage */
18422 timebase-frequency = <0>; /* Filled in by zImage */
18423 @@ -168,9 +175,10 @@
18429 /* NVRAM and RTC */
18430 - compatible = "ds1743";
18431 + compatible = "ds1743-nvram";
18436 @@ -190,6 +198,45 @@
18437 virtual-reg = <f0300005>;
18441 + PCI0: pci@ec000000 {
18442 + device_type = "pci";
18443 + #interrupt-cells = <1>;
18444 + #size-cells = <2>;
18445 + #address-cells = <3>;
18446 + compatible = "ibm,plb405gp-pci", "ibm,plb-pci";
18448 + reg = <eec00000 8 /* Config space access */
18449 + eed80000 4 /* IACK */
18450 + eed80000 4 /* Special cycle */
18451 + ef480000 40>; /* Internal registers */
18453 + /* Outbound ranges, one memory and one IO,
18454 + * later cannot be changed. Chip supports a second
18455 + * IO range but we don't use it for now
18457 + ranges = <02000000 0 80000000 80000000 0 20000000
18458 + 01000000 0 00000000 e8000000 0 00010000>;
18460 + /* Inbound 2GB range starting at 0 */
18461 + dma-ranges = <42000000 0 0 0 0 80000000>;
18463 + /* Walnut has all 4 IRQ pins tied together per slot */
18464 + interrupt-map-mask = <f800 0 0 0>;
18465 + interrupt-map = <
18467 + 0800 0 0 0 &UIC0 1c 8
18470 + 1000 0 0 0 &UIC0 1d 8
18473 + 1800 0 0 0 &UIC0 1e 8
18476 + 2000 0 0 0 &UIC0 1f 8
18482 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/dts/warp.dts powerpc.git/arch/powerpc/boot/dts/warp.dts
18483 --- linux-2.6.24/arch/powerpc/boot/dts/warp.dts 1970-01-01 01:00:00.000000000 +0100
18484 +++ powerpc.git/arch/powerpc/boot/dts/warp.dts 2008-01-28 20:25:49.000000000 +0100
18487 + * Device Tree Source for PIKA Warp
18489 + * Copyright (c) 2008 PIKA Technologies
18490 + * Sean MacLennan <smaclennan@pikatech.com>
18492 + * This file is licensed under the terms of the GNU General Public
18493 + * License version 2. This program is licensed "as is" without
18494 + * any warranty of any kind, whether express or implied.
18498 + #address-cells = <2>;
18499 + #size-cells = <1>;
18500 + model = "pika,warp";
18501 + compatible = "pika,warp";
18502 + dcr-parent = <&/cpus/cpu@0>;
18505 + ethernet0 = &EMAC0;
18506 + serial0 = &UART0;
18510 + #address-cells = <1>;
18511 + #size-cells = <0>;
18514 + device_type = "cpu";
18515 + model = "PowerPC,440EP";
18517 + clock-frequency = <0>; /* Filled in by zImage */
18518 + timebase-frequency = <0>; /* Filled in by zImage */
18519 + i-cache-line-size = <20>;
18520 + d-cache-line-size = <20>;
18521 + i-cache-size = <8000>;
18522 + d-cache-size = <8000>;
18524 + dcr-access-method = "native";
18529 + device_type = "memory";
18530 + reg = <0 0 0>; /* Filled in by zImage */
18533 + UIC0: interrupt-controller0 {
18534 + compatible = "ibm,uic-440ep","ibm,uic";
18535 + interrupt-controller;
18536 + cell-index = <0>;
18537 + dcr-reg = <0c0 009>;
18538 + #address-cells = <0>;
18539 + #size-cells = <0>;
18540 + #interrupt-cells = <2>;
18543 + UIC1: interrupt-controller1 {
18544 + compatible = "ibm,uic-440ep","ibm,uic";
18545 + interrupt-controller;
18546 + cell-index = <1>;
18547 + dcr-reg = <0d0 009>;
18548 + #address-cells = <0>;
18549 + #size-cells = <0>;
18550 + #interrupt-cells = <2>;
18551 + interrupts = <1e 4 1f 4>; /* cascade */
18552 + interrupt-parent = <&UIC0>;
18556 + compatible = "ibm,sdr-440ep";
18557 + dcr-reg = <00e 002>;
18561 + compatible = "ibm,cpr-440ep";
18562 + dcr-reg = <00c 002>;
18566 + compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4";
18567 + #address-cells = <2>;
18568 + #size-cells = <1>;
18570 + clock-frequency = <0>; /* Filled in by zImage */
18573 + compatible = "ibm,sdram-440ep", "ibm,sdram-405gp";
18574 + dcr-reg = <010 2>;
18578 + compatible = "ibm,dma-440ep", "ibm,dma-440gp";
18579 + dcr-reg = <100 027>;
18583 + compatible = "ibm,mcmal-440ep", "ibm,mcmal-440gp", "ibm,mcmal";
18584 + dcr-reg = <180 62>;
18585 + num-tx-chans = <4>;
18586 + num-rx-chans = <2>;
18587 + interrupt-parent = <&MAL0>;
18588 + interrupts = <0 1 2 3 4>;
18589 + #interrupt-cells = <1>;
18590 + #address-cells = <0>;
18591 + #size-cells = <0>;
18592 + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
18593 + /*RXEOB*/ 1 &UIC0 b 4
18594 + /*SERR*/ 2 &UIC1 0 4
18595 + /*TXDE*/ 3 &UIC1 1 4
18596 + /*RXDE*/ 4 &UIC1 2 4>;
18600 + compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb";
18601 + #address-cells = <1>;
18602 + #size-cells = <1>;
18603 + ranges = <00000000 0 00000000 80000000
18604 + 80000000 0 80000000 80000000>;
18605 + interrupt-parent = <&UIC1>;
18606 + interrupts = <7 4>;
18607 + clock-frequency = <0>; /* Filled in by zImage */
18610 + compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc";
18611 + dcr-reg = <012 2>;
18612 + #address-cells = <2>;
18613 + #size-cells = <1>;
18614 + clock-frequency = <0>; /* Filled in by zImage */
18615 + interrupts = <5 1>;
18616 + interrupt-parent = <&UIC1>;
18619 + compatible = "pika,fpga";
18620 + reg = <2 0 2200>;
18621 + interrupts = <18 8>;
18622 + interrupt-parent = <&UIC0>;
18626 + compatible = "amd,s29gl512n", "cfi-flash";
18627 + bank-width = <2>;
18628 + reg = <0 0 4000000>;
18629 + #address-cells = <1>;
18630 + #size-cells = <1>;
18632 + label = "kernel";
18633 + reg = <0 180000>;
18635 + partition@180000 {
18637 + reg = <180000 3480000>;
18639 + partition@3600000 {
18641 + reg = <3600000 900000>;
18643 + partition@3f00000 {
18645 + reg = <3f00000 40000>;
18647 + partition@3f40000 {
18649 + reg = <3f40000 40000>;
18651 + partition@3f80000 {
18652 + label = "u-boot";
18653 + reg = <3f80000 80000>;
18658 + UART0: serial@ef600300 {
18659 + device_type = "serial";
18660 + compatible = "ns16550";
18661 + reg = <ef600300 8>;
18662 + virtual-reg = <ef600300>;
18663 + clock-frequency = <0>; /* Filled in by zImage */
18664 + current-speed = <1c200>;
18665 + interrupt-parent = <&UIC0>;
18666 + interrupts = <0 4>;
18669 + IIC0: i2c@ef600700 {
18670 + compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
18671 + reg = <ef600700 14>;
18672 + interrupt-parent = <&UIC0>;
18673 + interrupts = <2 4>;
18676 + GPIO0: gpio@ef600b00 {
18677 + compatible = "ibm,gpio-440ep";
18678 + reg = <ef600b00 48>;
18681 + GPIO1: gpio@ef600c00 {
18682 + compatible = "ibm,gpio-440ep";
18683 + reg = <ef600c00 48>;
18686 + ZMII0: emac-zmii@ef600d00 {
18687 + compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii";
18688 + reg = <ef600d00 c>;
18691 + EMAC0: ethernet@ef600e00 {
18692 + linux,network-index = <0>;
18693 + device_type = "network";
18694 + compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac";
18695 + interrupt-parent = <&UIC1>;
18696 + interrupts = <1c 4 1d 4>;
18697 + reg = <ef600e00 70>;
18698 + local-mac-address = [000000000000];
18699 + mal-device = <&MAL0>;
18700 + mal-tx-channel = <0 1>;
18701 + mal-rx-channel = <0>;
18702 + cell-index = <0>;
18703 + max-frame-size = <5dc>;
18704 + rx-fifo-size = <1000>;
18705 + tx-fifo-size = <800>;
18706 + phy-mode = "rmii";
18707 + phy-map = <00000000>;
18708 + zmii-device = <&ZMII0>;
18709 + zmii-channel = <0>;
18713 + compatible = "ohci-be";
18714 + reg = <ef601000 80>;
18715 + interrupts = <8 1 9 1>;
18716 + interrupt-parent = < &UIC1 >;
18722 + linux,stdout-path = "/plb/opb/serial@ef600300";
18725 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/ebony.c powerpc.git/arch/powerpc/boot/ebony.c
18726 --- linux-2.6.24/arch/powerpc/boot/ebony.c 2008-01-24 23:58:37.000000000 +0100
18727 +++ powerpc.git/arch/powerpc/boot/ebony.c 2008-01-28 20:25:49.000000000 +0100
18730 static u8 *ebony_mac0, *ebony_mac1;
18732 -/* Calculate 440GP clocks */
18733 -void ibm440gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
18735 - u32 sys0 = mfdcr(DCRN_CPC0_SYS0);
18736 - u32 cr0 = mfdcr(DCRN_CPC0_CR0);
18737 - u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
18738 - u32 opdv = CPC0_SYS0_OPDV(sys0);
18739 - u32 epdv = CPC0_SYS0_EPDV(sys0);
18741 - if (sys0 & CPC0_SYS0_BYPASS) {
18742 - /* Bypass system PLL */
18743 - cpu = plb = sysclk;
18745 - if (sys0 & CPC0_SYS0_EXTSL)
18747 - m = CPC0_SYS0_FWDVB(sys0) * opdv * epdv;
18750 - m = CPC0_SYS0_FBDV(sys0) * CPC0_SYS0_FWDVA(sys0);
18751 - cpu = sysclk * m / CPC0_SYS0_FWDVA(sys0);
18752 - plb = sysclk * m / CPC0_SYS0_FWDVB(sys0);
18755 - opb = plb / opdv;
18756 - ebc = opb / epdv;
18758 - /* FIXME: Check if this is for all 440GP, or just Ebony */
18759 - if ((mfpvr() & 0xf0000fff) == 0x40000440)
18760 - /* Rev. B 440GP, use external system clock */
18763 - /* Rev. C 440GP, errata force us to use internal clock */
18766 - if (cr0 & CPC0_CR0_U0EC)
18767 - /* External UART clock */
18770 - /* Internal UART clock */
18771 - uart0 = plb / CPC0_CR0_UDIV(cr0);
18773 - if (cr0 & CPC0_CR0_U1EC)
18774 - /* External UART clock */
18777 - /* Internal UART clock */
18778 - uart1 = plb / CPC0_CR0_UDIV(cr0);
18780 - printf("PPC440GP: SysClk = %dMHz (%x)\n\r",
18781 - (sysclk + 500000) / 1000000, sysclk);
18783 - dt_fixup_cpu_clocks(cpu, tb, 0);
18785 - dt_fixup_clock("/plb", plb);
18786 - dt_fixup_clock("/plb/opb", opb);
18787 - dt_fixup_clock("/plb/opb/ebc", ebc);
18788 - dt_fixup_clock("/plb/opb/serial@40000200", uart0);
18789 - dt_fixup_clock("/plb/opb/serial@40000300", uart1);
18792 #define EBONY_FPGA_PATH "/plb/opb/ebc/fpga"
18793 #define EBONY_FPGA_FLASH_SEL 0x01
18794 #define EBONY_SMALL_FLASH_PATH "/plb/opb/ebc/small-flash"
18796 unsigned long sysclk = 33000000;
18798 ibm440gp_fixup_clocks(sysclk, 6 * 1843200);
18799 - ibm4xx_fixup_memsize();
18800 + ibm4xx_sdram_fixup_memsize();
18801 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1);
18802 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
18803 ebony_flashsel_fixup();
18805 platform_ops.exit = ibm44x_dbcr_reset;
18808 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
18809 + fdt_init(_dtb_start);
18810 serial_console_init();
18812 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/ep405.c powerpc.git/arch/powerpc/boot/ep405.c
18813 --- linux-2.6.24/arch/powerpc/boot/ep405.c 1970-01-01 01:00:00.000000000 +0100
18814 +++ powerpc.git/arch/powerpc/boot/ep405.c 2008-01-28 20:25:49.000000000 +0100
18817 + * Embedded Planet EP405 with PlanetCore firmware
18819 + * (c) Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp,\
18821 + * Based on ep88xc.c by
18823 + * Scott Wood <scottwood@freescale.com>
18825 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
18827 + * This program is free software; you can redistribute it and/or modify it
18828 + * under the terms of the GNU General Public License version 2 as published
18829 + * by the Free Software Foundation.
18833 +#include "stdio.h"
18834 +#include "planetcore.h"
18839 +static char *table;
18840 +static u64 mem_size;
18842 +static void platform_fixups(void)
18847 + dt_fixup_memory(0, mem_size);
18848 + planetcore_set_mac_addrs(table);
18850 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) {
18851 + printf("No PlanetCore crystal frequency key.\r\n");
18854 + ibm405gp_fixup_clocks(val, 0xa8c000);
18855 + ibm4xx_quiesce_eth((u32 *)0xef600800, NULL);
18856 + ibm4xx_fixup_ebc_ranges("/plb/ebc");
18858 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_KB_NVRAM, &val)) {
18859 + printf("No PlanetCore NVRAM size key.\r\n");
18862 + nvrtc = finddevice("/plb/ebc/nvrtc@4,200000");
18863 + if (nvrtc != NULL) {
18864 + u32 reg[3] = { 4, 0x200000, 0};
18865 + getprop(nvrtc, "reg", reg, 3);
18866 + reg[2] = (val << 10) & 0xffffffff;
18867 + setprop(nvrtc, "reg", reg, 3);
18871 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
18872 + unsigned long r6, unsigned long r7)
18874 + table = (char *)r3;
18875 + planetcore_prepare_table(table);
18877 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size))
18880 + mem_size *= 1024 * 1024;
18881 + simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
18883 + fdt_init(_dtb_start);
18885 + planetcore_set_stdout_path(table);
18887 + serial_console_init();
18888 + platform_ops.fixups = platform_fixups;
18890 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/ep8248e.c powerpc.git/arch/powerpc/boot/ep8248e.c
18891 --- linux-2.6.24/arch/powerpc/boot/ep8248e.c 1970-01-01 01:00:00.000000000 +0100
18892 +++ powerpc.git/arch/powerpc/boot/ep8248e.c 2008-01-28 20:25:49.000000000 +0100
18895 + * Embedded Planet EP8248E with PlanetCore firmware
18897 + * Author: Scott Wood <scottwood@freescale.com>
18899 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
18901 + * This program is free software; you can redistribute it and/or modify it
18902 + * under the terms of the GNU General Public License version 2 as published
18903 + * by the Free Software Foundation.
18907 +#include "stdio.h"
18908 +#include "planetcore.h"
18911 +static char *table;
18912 +static u64 mem_size;
18916 +static void platform_fixups(void)
18920 + dt_fixup_memory(0, mem_size);
18921 + planetcore_set_mac_addrs(table);
18923 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) {
18924 + printf("No PlanetCore crystal frequency key.\r\n");
18928 + pq2_fixup_clocks(val);
18931 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
18932 + unsigned long r6, unsigned long r7)
18934 + table = (char *)r3;
18935 + planetcore_prepare_table(table);
18937 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size))
18940 + mem_size *= 1024 * 1024;
18941 + simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
18943 + fdt_init(_dtb_start);
18945 + planetcore_set_stdout_path(table);
18946 + serial_console_init();
18947 + platform_ops.fixups = platform_fixups;
18949 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/ep88xc.c powerpc.git/arch/powerpc/boot/ep88xc.c
18950 --- linux-2.6.24/arch/powerpc/boot/ep88xc.c 2008-01-24 23:58:37.000000000 +0100
18951 +++ powerpc.git/arch/powerpc/boot/ep88xc.c 2008-01-28 20:25:49.000000000 +0100
18953 mem_size *= 1024 * 1024;
18954 simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
18956 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
18957 + fdt_init(_dtb_start);
18959 planetcore_set_stdout_path(table);
18961 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/flatdevtree.c powerpc.git/arch/powerpc/boot/flatdevtree.c
18962 --- linux-2.6.24/arch/powerpc/boot/flatdevtree.c 2008-01-24 23:58:37.000000000 +0100
18963 +++ powerpc.git/arch/powerpc/boot/flatdevtree.c 1970-01-01 01:00:00.000000000 +0100
18966 - * This program is free software; you can redistribute it and/or modify
18967 - * it under the terms of the GNU General Public License as published by
18968 - * the Free Software Foundation; either version 2 of the License, or
18969 - * (at your option) any later version.
18971 - * This program is distributed in the hope that it will be useful,
18972 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
18973 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18974 - * GNU General Public License for more details.
18976 - * You should have received a copy of the GNU General Public License
18977 - * along with this program; if not, write to the Free Software
18978 - * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18980 - * Copyright Pantelis Antoniou 2006
18981 - * Copyright (C) IBM Corporation 2006
18983 - * Authors: Pantelis Antoniou <pantelis@embeddedalley.com>
18984 - * Hollis Blanchard <hollisb@us.ibm.com>
18985 - * Mark A. Greer <mgreer@mvista.com>
18986 - * Paul Mackerras <paulus@samba.org>
18989 -#include <string.h>
18990 -#include <stddef.h>
18991 -#include "flatdevtree.h"
18992 -#include "flatdevtree_env.h"
18994 -#define _ALIGN(x, al) (((x) + (al) - 1) & ~((al) - 1))
18996 -static char *ft_root_node(struct ft_cxt *cxt)
18998 - return cxt->rgn[FT_STRUCT].start;
19001 -/* Routines for keeping node ptrs returned by ft_find_device current */
19002 -/* First entry not used b/c it would return 0 and be taken as NULL/error */
19003 -static void *ft_get_phandle(struct ft_cxt *cxt, char *node)
19010 - for (i = 1; i < cxt->nodes_used; i++) /* already there? */
19011 - if (cxt->node_tbl[i] == node)
19012 - return (void *)i;
19014 - if (cxt->nodes_used < cxt->node_max) {
19015 - cxt->node_tbl[cxt->nodes_used] = node;
19016 - return (void *)cxt->nodes_used++;
19022 -static char *ft_node_ph2node(struct ft_cxt *cxt, const void *phandle)
19024 - unsigned int i = (unsigned int)phandle;
19026 - if (i < cxt->nodes_used)
19027 - return cxt->node_tbl[i];
19031 -static void ft_node_update_before(struct ft_cxt *cxt, char *addr, int shift)
19038 - for (i = 1; i < cxt->nodes_used; i++)
19039 - if (cxt->node_tbl[i] < addr)
19040 - cxt->node_tbl[i] += shift;
19043 -static void ft_node_update_after(struct ft_cxt *cxt, char *addr, int shift)
19050 - for (i = 1; i < cxt->nodes_used; i++)
19051 - if (cxt->node_tbl[i] >= addr)
19052 - cxt->node_tbl[i] += shift;
19055 -/* Struct used to return info from ft_next() */
19058 - const char *name;
19063 -/* Set ptrs to current one's info; return addr of next one */
19064 -static char *ft_next(struct ft_cxt *cxt, char *p, struct ft_atom *ret)
19068 - if (p >= cxt->rgn[FT_STRUCT].start + cxt->rgn[FT_STRUCT].size)
19071 - ret->tag = be32_to_cpu(*(u32 *) p);
19074 - switch (ret->tag) { /* Tag */
19075 - case OF_DT_BEGIN_NODE:
19077 - ret->data = (void *)(p - 4); /* start of node */
19078 - p += _ALIGN(strlen(p) + 1, 4);
19081 - ret->size = sz = be32_to_cpu(*(u32 *) p);
19082 - ret->name = cxt->str_anchor + be32_to_cpu(*(u32 *) (p + 4));
19083 - ret->data = (void *)(p + 8);
19084 - p += 8 + _ALIGN(sz, 4);
19086 - case OF_DT_END_NODE:
19098 -#define HDR_SIZE _ALIGN(sizeof(struct boot_param_header), 8)
19099 -#define EXPAND_INCR 1024 /* alloc this much extra when expanding */
19101 -/* Copy the tree to a newly-allocated region and put things in order */
19102 -static int ft_reorder(struct ft_cxt *cxt, int nextra)
19104 - unsigned long tot;
19105 - enum ft_rgn_id r;
19109 - tot = HDR_SIZE + EXPAND_INCR;
19110 - for (r = FT_RSVMAP; r <= FT_STRINGS; ++r)
19111 - tot += cxt->rgn[r].size;
19114 - tot = _ALIGN(tot, 8);
19116 - if (!cxt->realloc)
19118 - p = cxt->realloc(NULL, tot);
19122 - memcpy(p, cxt->bph, sizeof(struct boot_param_header));
19123 - /* offsets get fixed up later */
19125 - cxt->bph = (struct boot_param_header *)p;
19126 - cxt->max_size = tot;
19130 - memcpy(p, cxt->rgn[FT_RSVMAP].start, cxt->rgn[FT_RSVMAP].size);
19131 - cxt->rgn[FT_RSVMAP].start = p;
19132 - p += cxt->rgn[FT_RSVMAP].size;
19134 - memcpy(p, cxt->rgn[FT_STRUCT].start, cxt->rgn[FT_STRUCT].size);
19135 - ft_node_update_after(cxt, cxt->rgn[FT_STRUCT].start,
19136 - p - cxt->rgn[FT_STRUCT].start);
19137 - cxt->p += p - cxt->rgn[FT_STRUCT].start;
19138 - cxt->rgn[FT_STRUCT].start = p;
19140 - p = pend - cxt->rgn[FT_STRINGS].size;
19141 - memcpy(p, cxt->rgn[FT_STRINGS].start, cxt->rgn[FT_STRINGS].size);
19142 - stroff = cxt->str_anchor - cxt->rgn[FT_STRINGS].start;
19143 - cxt->rgn[FT_STRINGS].start = p;
19144 - cxt->str_anchor = p + stroff;
19146 - cxt->isordered = 1;
19150 -static inline char *prev_end(struct ft_cxt *cxt, enum ft_rgn_id r)
19152 - if (r > FT_RSVMAP)
19153 - return cxt->rgn[r - 1].start + cxt->rgn[r - 1].size;
19154 - return (char *)cxt->bph + HDR_SIZE;
19157 -static inline char *next_start(struct ft_cxt *cxt, enum ft_rgn_id r)
19159 - if (r < FT_STRINGS)
19160 - return cxt->rgn[r + 1].start;
19161 - return (char *)cxt->bph + cxt->max_size;
19165 - * See if we can expand region rgn by nextra bytes by using up
19166 - * free space after or before the region.
19168 -static int ft_shuffle(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn,
19172 - char *rgn_start, *rgn_end;
19174 - rgn_start = cxt->rgn[rgn].start;
19175 - rgn_end = rgn_start + cxt->rgn[rgn].size;
19176 - if (nextra <= 0 || rgn_end + nextra <= next_start(cxt, rgn)) {
19177 - /* move following stuff */
19178 - if (p < rgn_end) {
19180 - memmove(p, p - nextra, rgn_end - p + nextra);
19182 - memmove(p + nextra, p, rgn_end - p);
19183 - if (rgn == FT_STRUCT)
19184 - ft_node_update_after(cxt, p, nextra);
19186 - cxt->rgn[rgn].size += nextra;
19187 - if (rgn == FT_STRINGS)
19188 - /* assumes strings only added at beginning */
19189 - cxt->str_anchor += nextra;
19192 - if (prev_end(cxt, rgn) <= rgn_start - nextra) {
19193 - /* move preceding stuff */
19194 - if (p > rgn_start) {
19195 - memmove(rgn_start - nextra, rgn_start, p - rgn_start);
19196 - if (rgn == FT_STRUCT)
19197 - ft_node_update_before(cxt, p, -nextra);
19200 - cxt->rgn[rgn].start -= nextra;
19201 - cxt->rgn[rgn].size += nextra;
19207 -static int ft_make_space(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn,
19210 - unsigned long size, ssize, tot;
19211 - char *str, *next;
19212 - enum ft_rgn_id r;
19214 - if (!cxt->isordered) {
19215 - unsigned long rgn_off = *pp - cxt->rgn[rgn].start;
19217 - if (!ft_reorder(cxt, nextra))
19220 - *pp = cxt->rgn[rgn].start + rgn_off;
19222 - if (ft_shuffle(cxt, pp, rgn, nextra))
19225 - /* See if there is space after the strings section */
19226 - ssize = cxt->rgn[FT_STRINGS].size;
19227 - if (cxt->rgn[FT_STRINGS].start + ssize
19228 - < (char *)cxt->bph + cxt->max_size) {
19229 - /* move strings up as far as possible */
19230 - str = (char *)cxt->bph + cxt->max_size - ssize;
19231 - cxt->str_anchor += str - cxt->rgn[FT_STRINGS].start;
19232 - memmove(str, cxt->rgn[FT_STRINGS].start, ssize);
19233 - cxt->rgn[FT_STRINGS].start = str;
19234 - /* enough space now? */
19235 - if (rgn >= FT_STRUCT && ft_shuffle(cxt, pp, rgn, nextra))
19239 - /* how much total free space is there following this region? */
19241 - for (r = rgn; r < FT_STRINGS; ++r) {
19242 - char *r_end = cxt->rgn[r].start + cxt->rgn[r].size;
19243 - tot += next_start(cxt, rgn) - r_end;
19246 - /* cast is to shut gcc up; we know nextra >= 0 */
19247 - if (tot < (unsigned int)nextra) {
19248 - /* have to reallocate */
19249 - char *newp, *new_start;
19252 - if (!cxt->realloc)
19254 - size = _ALIGN(cxt->max_size + (nextra - tot) + EXPAND_INCR, 8);
19255 - newp = cxt->realloc(cxt->bph, size);
19258 - cxt->max_size = size;
19259 - shift = newp - (char *)cxt->bph;
19261 - if (shift) { /* realloc can return same addr */
19262 - cxt->bph = (struct boot_param_header *)newp;
19263 - ft_node_update_after(cxt, cxt->rgn[FT_STRUCT].start,
19265 - for (r = FT_RSVMAP; r <= FT_STRINGS; ++r) {
19266 - new_start = cxt->rgn[r].start + shift;
19267 - cxt->rgn[r].start = new_start;
19270 - cxt->str_anchor += shift;
19273 - /* move strings up to the end */
19274 - str = newp + size - ssize;
19275 - cxt->str_anchor += str - cxt->rgn[FT_STRINGS].start;
19276 - memmove(str, cxt->rgn[FT_STRINGS].start, ssize);
19277 - cxt->rgn[FT_STRINGS].start = str;
19279 - if (ft_shuffle(cxt, pp, rgn, nextra))
19283 - /* must be FT_RSVMAP and we need to move FT_STRUCT up */
19284 - if (rgn == FT_RSVMAP) {
19285 - next = cxt->rgn[FT_RSVMAP].start + cxt->rgn[FT_RSVMAP].size
19287 - ssize = cxt->rgn[FT_STRUCT].size;
19288 - if (next + ssize >= cxt->rgn[FT_STRINGS].start)
19289 - return 0; /* "can't happen" */
19290 - memmove(next, cxt->rgn[FT_STRUCT].start, ssize);
19291 - ft_node_update_after(cxt, cxt->rgn[FT_STRUCT].start, nextra);
19292 - cxt->rgn[FT_STRUCT].start = next;
19294 - if (ft_shuffle(cxt, pp, rgn, nextra))
19298 - return 0; /* "can't happen" */
19301 -static void ft_put_word(struct ft_cxt *cxt, u32 v)
19303 - *(u32 *) cxt->p = cpu_to_be32(v);
19307 -static void ft_put_bin(struct ft_cxt *cxt, const void *data, unsigned int sz)
19309 - unsigned long sza = _ALIGN(sz, 4);
19311 - /* zero out the alignment gap if necessary */
19313 - *(u32 *) (cxt->p + sza - 4) = 0;
19315 - /* copy in the data */
19316 - memcpy(cxt->p, data, sz);
19321 -char *ft_begin_node(struct ft_cxt *cxt, const char *name)
19323 - unsigned long nlen = strlen(name) + 1;
19324 - unsigned long len = 8 + _ALIGN(nlen, 4);
19327 - if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, len))
19332 - ft_put_word(cxt, OF_DT_BEGIN_NODE);
19333 - ft_put_bin(cxt, name, strlen(name) + 1);
19338 -void ft_end_node(struct ft_cxt *cxt)
19340 - ft_put_word(cxt, OF_DT_END_NODE);
19343 -void ft_nop(struct ft_cxt *cxt)
19345 - if (ft_make_space(cxt, &cxt->p, FT_STRUCT, 4))
19346 - ft_put_word(cxt, OF_DT_NOP);
19349 -#define NO_STRING 0x7fffffff
19351 -static int lookup_string(struct ft_cxt *cxt, const char *name)
19355 - p = cxt->rgn[FT_STRINGS].start;
19356 - end = p + cxt->rgn[FT_STRINGS].size;
19357 - while (p < end) {
19358 - if (strcmp(p, (char *)name) == 0)
19359 - return p - cxt->str_anchor;
19360 - p += strlen(p) + 1;
19363 - return NO_STRING;
19366 -/* lookup string and insert if not found */
19367 -static int map_string(struct ft_cxt *cxt, const char *name)
19372 - off = lookup_string(cxt, name);
19373 - if (off != NO_STRING)
19375 - p = cxt->rgn[FT_STRINGS].start;
19376 - if (!ft_make_space(cxt, &p, FT_STRINGS, strlen(name) + 1))
19377 - return NO_STRING;
19379 - return p - cxt->str_anchor;
19382 -int ft_prop(struct ft_cxt *cxt, const char *name, const void *data,
19387 - off = map_string(cxt, name);
19388 - if (off == NO_STRING)
19391 - len = 12 + _ALIGN(sz, 4);
19392 - if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, len))
19395 - ft_put_word(cxt, OF_DT_PROP);
19396 - ft_put_word(cxt, sz);
19397 - ft_put_word(cxt, off);
19398 - ft_put_bin(cxt, data, sz);
19402 -int ft_prop_str(struct ft_cxt *cxt, const char *name, const char *str)
19404 - return ft_prop(cxt, name, str, strlen(str) + 1);
19407 -int ft_prop_int(struct ft_cxt *cxt, const char *name, unsigned int val)
19409 - u32 v = cpu_to_be32((u32) val);
19411 - return ft_prop(cxt, name, &v, 4);
19414 -/* Calculate the size of the reserved map */
19415 -static unsigned long rsvmap_size(struct ft_cxt *cxt)
19417 - struct ft_reserve *res;
19419 - res = (struct ft_reserve *)cxt->rgn[FT_RSVMAP].start;
19420 - while (res->start || res->len)
19422 - return (char *)(res + 1) - cxt->rgn[FT_RSVMAP].start;
19425 -/* Calculate the size of the struct region by stepping through it */
19426 -static unsigned long struct_size(struct ft_cxt *cxt)
19428 - char *p = cxt->rgn[FT_STRUCT].start;
19430 - struct ft_atom atom;
19432 - /* make check in ft_next happy */
19433 - if (cxt->rgn[FT_STRUCT].size == 0)
19434 - cxt->rgn[FT_STRUCT].size = 0xfffffffful - (unsigned long)p;
19436 - while ((next = ft_next(cxt, p, &atom)) != NULL)
19438 - return p + 4 - cxt->rgn[FT_STRUCT].start;
19441 -/* add `adj' on to all string offset values in the struct area */
19442 -static void adjust_string_offsets(struct ft_cxt *cxt, int adj)
19444 - char *p = cxt->rgn[FT_STRUCT].start;
19446 - struct ft_atom atom;
19449 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19450 - if (atom.tag == OF_DT_PROP) {
19451 - off = be32_to_cpu(*(u32 *) (p + 8));
19452 - *(u32 *) (p + 8) = cpu_to_be32(off + adj);
19458 -/* start construction of the flat OF tree from scratch */
19459 -void ft_begin(struct ft_cxt *cxt, void *blob, unsigned int max_size,
19460 - void *(*realloc_fn) (void *, unsigned long))
19462 - struct boot_param_header *bph = blob;
19464 - struct ft_reserve *pres;
19466 - /* clear the cxt */
19467 - memset(cxt, 0, sizeof(*cxt));
19470 - cxt->max_size = max_size;
19471 - cxt->realloc = realloc_fn;
19472 - cxt->isordered = 1;
19474 - /* zero everything in the header area */
19475 - memset(bph, 0, sizeof(*bph));
19477 - bph->magic = cpu_to_be32(OF_DT_HEADER);
19478 - bph->version = cpu_to_be32(0x10);
19479 - bph->last_comp_version = cpu_to_be32(0x10);
19481 - /* start pointers */
19482 - cxt->rgn[FT_RSVMAP].start = p = blob + HDR_SIZE;
19483 - cxt->rgn[FT_RSVMAP].size = sizeof(struct ft_reserve);
19484 - pres = (struct ft_reserve *)p;
19485 - cxt->rgn[FT_STRUCT].start = p += sizeof(struct ft_reserve);
19486 - cxt->rgn[FT_STRUCT].size = 4;
19487 - cxt->rgn[FT_STRINGS].start = blob + max_size;
19488 - cxt->rgn[FT_STRINGS].size = 0;
19490 - /* init rsvmap and struct */
19493 - *(u32 *) p = cpu_to_be32(OF_DT_END);
19495 - cxt->str_anchor = blob;
19498 -/* open up an existing blob to be examined or modified */
19499 -int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size,
19500 - unsigned int max_find_device,
19501 - void *(*realloc_fn) (void *, unsigned long))
19503 - struct boot_param_header *bph = blob;
19505 - /* can't cope with version < 16 */
19506 - if (be32_to_cpu(bph->version) < 16)
19509 - /* clear the cxt */
19510 - memset(cxt, 0, sizeof(*cxt));
19512 - /* alloc node_tbl to track node ptrs returned by ft_find_device */
19513 - ++max_find_device;
19514 - cxt->node_tbl = realloc_fn(NULL, max_find_device * sizeof(char *));
19515 - if (!cxt->node_tbl)
19517 - memset(cxt->node_tbl, 0, max_find_device * sizeof(char *));
19518 - cxt->node_max = max_find_device;
19519 - cxt->nodes_used = 1; /* don't use idx 0 b/c looks like NULL */
19522 - cxt->max_size = max_size;
19523 - cxt->realloc = realloc_fn;
19525 - cxt->rgn[FT_RSVMAP].start = blob + be32_to_cpu(bph->off_mem_rsvmap);
19526 - cxt->rgn[FT_RSVMAP].size = rsvmap_size(cxt);
19527 - cxt->rgn[FT_STRUCT].start = blob + be32_to_cpu(bph->off_dt_struct);
19528 - cxt->rgn[FT_STRUCT].size = struct_size(cxt);
19529 - cxt->rgn[FT_STRINGS].start = blob + be32_to_cpu(bph->off_dt_strings);
19530 - cxt->rgn[FT_STRINGS].size = be32_to_cpu(bph->dt_strings_size);
19532 - cxt->p = cxt->rgn[FT_STRUCT].start;
19533 - cxt->str_anchor = cxt->rgn[FT_STRINGS].start;
19538 -/* add a reserver physical area to the rsvmap */
19539 -int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size)
19542 - struct ft_reserve *pres;
19544 - p = cxt->rgn[FT_RSVMAP].start + cxt->rgn[FT_RSVMAP].size
19545 - - sizeof(struct ft_reserve);
19546 - if (!ft_make_space(cxt, &p, FT_RSVMAP, sizeof(struct ft_reserve)))
19549 - pres = (struct ft_reserve *)p;
19550 - pres->start = cpu_to_be64(physaddr);
19551 - pres->len = cpu_to_be64(size);
19556 -void ft_begin_tree(struct ft_cxt *cxt)
19558 - cxt->p = ft_root_node(cxt);
19561 -void ft_end_tree(struct ft_cxt *cxt)
19563 - struct boot_param_header *bph = cxt->bph;
19564 - char *p, *oldstr, *str, *endp;
19565 - unsigned long ssize;
19568 - if (!cxt->isordered)
19569 - return; /* we haven't touched anything */
19571 - /* adjust string offsets */
19572 - oldstr = cxt->rgn[FT_STRINGS].start;
19573 - adj = cxt->str_anchor - oldstr;
19575 - adjust_string_offsets(cxt, adj);
19577 - /* make strings end on 8-byte boundary */
19578 - ssize = cxt->rgn[FT_STRINGS].size;
19579 - endp = (char *)_ALIGN((unsigned long)cxt->rgn[FT_STRUCT].start
19580 - + cxt->rgn[FT_STRUCT].size + ssize, 8);
19581 - str = endp - ssize;
19583 - /* move strings down to end of structs */
19584 - memmove(str, oldstr, ssize);
19585 - cxt->str_anchor = str;
19586 - cxt->rgn[FT_STRINGS].start = str;
19588 - /* fill in header fields */
19590 - bph->totalsize = cpu_to_be32(endp - p);
19591 - bph->off_mem_rsvmap = cpu_to_be32(cxt->rgn[FT_RSVMAP].start - p);
19592 - bph->off_dt_struct = cpu_to_be32(cxt->rgn[FT_STRUCT].start - p);
19593 - bph->off_dt_strings = cpu_to_be32(cxt->rgn[FT_STRINGS].start - p);
19594 - bph->dt_strings_size = cpu_to_be32(ssize);
19597 -void *ft_find_device(struct ft_cxt *cxt, const void *top, const char *srch_path)
19602 - node = ft_node_ph2node(cxt, top);
19603 - if (node == NULL)
19606 - node = ft_root_node(cxt);
19609 - node = ft_find_descendent(cxt, node, srch_path);
19610 - return ft_get_phandle(cxt, node);
19613 -void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path)
19615 - struct ft_atom atom;
19617 - const char *cp, *q;
19621 - const char *path_comp[FT_MAX_DEPTH];
19627 - while ((p = ft_next(cxt, p, &atom)) != NULL) {
19628 - switch (atom.tag) {
19629 - case OF_DT_BEGIN_NODE:
19631 - if (depth != dmatch)
19633 - cxt->genealogy[depth] = atom.data;
19634 - cxt->genealogy[depth + 1] = NULL;
19635 - if (depth && !(strncmp(atom.name, cp, cl) == 0
19636 - && (atom.name[cl] == '/'
19637 - || atom.name[cl] == '\0'
19638 - || atom.name[cl] == '@')))
19640 - path_comp[dmatch] = cp;
19641 - /* it matches so far, advance to next path component */
19643 - /* skip slashes */
19644 - while (*cp == '/')
19646 - /* we're done if this is the end of the string */
19648 - return atom.data;
19649 - /* look for end of this component */
19650 - q = strchr(cp, '/');
19657 - case OF_DT_END_NODE:
19660 - if (dmatch > depth) {
19662 - cl = cp - path_comp[dmatch] - 1;
19663 - cp = path_comp[dmatch];
19664 - while (cl > 0 && cp[cl - 1] == '/')
19674 -void *__ft_get_parent(struct ft_cxt *cxt, void *node)
19677 - struct ft_atom atom;
19680 - for (d = 0; cxt->genealogy[d] != NULL; ++d)
19681 - if (cxt->genealogy[d] == node)
19682 - return d > 0 ? cxt->genealogy[d - 1] : NULL;
19684 - /* have to do it the hard way... */
19685 - p = ft_root_node(cxt);
19687 - while ((p = ft_next(cxt, p, &atom)) != NULL) {
19688 - switch (atom.tag) {
19689 - case OF_DT_BEGIN_NODE:
19690 - cxt->genealogy[d] = atom.data;
19691 - if (node == atom.data) {
19693 - cxt->genealogy[d + 1] = NULL;
19694 - return d > 0 ? cxt->genealogy[d - 1] : NULL;
19698 - case OF_DT_END_NODE:
19706 -void *ft_get_parent(struct ft_cxt *cxt, const void *phandle)
19708 - void *node = ft_node_ph2node(cxt, phandle);
19709 - if (node == NULL)
19712 - node = __ft_get_parent(cxt, node);
19713 - return ft_get_phandle(cxt, node);
19716 -static const void *__ft_get_prop(struct ft_cxt *cxt, void *node,
19717 - const char *propname, unsigned int *len)
19719 - struct ft_atom atom;
19722 - while ((node = ft_next(cxt, node, &atom)) != NULL) {
19723 - switch (atom.tag) {
19724 - case OF_DT_BEGIN_NODE:
19729 - if (depth != 1 || strcmp(atom.name, propname))
19733 - *len = atom.size;
19735 - return atom.data;
19737 - case OF_DT_END_NODE:
19738 - if (--depth <= 0)
19746 -int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
19747 - void *buf, const unsigned int buflen)
19749 - const void *data;
19750 - unsigned int size;
19752 - void *node = ft_node_ph2node(cxt, phandle);
19756 - data = __ft_get_prop(cxt, node, propname, &size);
19758 - unsigned int clipped_size = min(size, buflen);
19759 - memcpy(buf, data, clipped_size);
19766 -void *__ft_find_node_by_prop_value(struct ft_cxt *cxt, void *prev,
19767 - const char *propname, const char *propval,
19768 - unsigned int proplen)
19770 - struct ft_atom atom;
19771 - char *p = ft_root_node(cxt);
19773 - int past_prev = prev ? 0 : 1;
19776 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19777 - const void *data;
19778 - unsigned int size;
19780 - switch (atom.tag) {
19781 - case OF_DT_BEGIN_NODE:
19789 - if (!past_prev || depth < 1)
19792 - data = __ft_get_prop(cxt, p, propname, &size);
19793 - if (!data || size != proplen)
19795 - if (memcmp(data, propval, size))
19800 - case OF_DT_END_NODE:
19801 - if (depth-- == 0)
19813 -void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev,
19814 - const char *propname, const char *propval,
19817 - void *node = NULL;
19820 - node = ft_node_ph2node(cxt, prev);
19826 - node = __ft_find_node_by_prop_value(cxt, node, propname,
19827 - propval, proplen);
19828 - return ft_get_phandle(cxt, node);
19831 -int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
19832 - const void *buf, const unsigned int buflen)
19834 - struct ft_atom atom;
19839 - node = ft_node_ph2node(cxt, phandle);
19840 - if (node == NULL)
19843 - next = ft_next(cxt, node, &atom);
19844 - if (atom.tag != OF_DT_BEGIN_NODE)
19845 - /* phandle didn't point to a node */
19849 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19850 - switch (atom.tag) {
19851 - case OF_DT_BEGIN_NODE: /* properties must go before subnodes */
19852 - case OF_DT_END_NODE:
19853 - /* haven't found the property, insert here */
19855 - return ft_prop(cxt, propname, buf, buflen);
19857 - if (strcmp(atom.name, propname))
19859 - /* found an existing property, overwrite it */
19860 - nextra = _ALIGN(buflen, 4) - _ALIGN(atom.size, 4);
19861 - cxt->p = atom.data;
19862 - if (nextra && !ft_make_space(cxt, &cxt->p, FT_STRUCT,
19865 - *(u32 *) (cxt->p - 8) = cpu_to_be32(buflen);
19866 - ft_put_bin(cxt, buf, buflen);
19874 -int ft_del_prop(struct ft_cxt *cxt, const void *phandle, const char *propname)
19876 - struct ft_atom atom;
19881 - node = ft_node_ph2node(cxt, phandle);
19882 - if (node == NULL)
19886 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19887 - switch (atom.tag) {
19888 - case OF_DT_BEGIN_NODE:
19889 - case OF_DT_END_NODE:
19892 - if (strcmp(atom.name, propname))
19894 - /* found the property, remove it */
19895 - size = 12 + -_ALIGN(atom.size, 4);
19897 - if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, -size))
19906 -void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name)
19908 - struct ft_atom atom;
19909 - char *p, *next, *ret;
19913 - p = ft_node_ph2node(cxt, parent);
19917 - p = ft_root_node(cxt);
19920 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19921 - switch (atom.tag) {
19922 - case OF_DT_BEGIN_NODE:
19924 - if (depth == 1 && strcmp(atom.name, name) == 0)
19925 - /* duplicate node name, return error */
19928 - case OF_DT_END_NODE:
19932 - /* end of node, insert here */
19934 - ret = ft_begin_node(cxt, name);
19935 - ft_end_node(cxt);
19936 - return ft_get_phandle(cxt, ret);
19943 -/* Returns the start of the path within the provided buffer, or NULL on
19946 -char *ft_get_path(struct ft_cxt *cxt, const void *phandle,
19947 - char *buf, int len)
19949 - const char *path_comp[FT_MAX_DEPTH];
19950 - struct ft_atom atom;
19951 - char *p, *next, *pos;
19952 - int depth = 0, i;
19955 - node = ft_node_ph2node(cxt, phandle);
19956 - if (node == NULL)
19959 - p = ft_root_node(cxt);
19961 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19962 - switch (atom.tag) {
19963 - case OF_DT_BEGIN_NODE:
19964 - path_comp[depth++] = atom.name;
19970 - case OF_DT_END_NODE:
19971 - if (--depth == 0)
19980 - for (i = 1; i < depth; i++) {
19989 - strncpy(pos, path_comp[i], len);
19991 - if (pos[len - 1] != 0)
19994 - this_len = strlen(pos);
20001 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/flatdevtree.h powerpc.git/arch/powerpc/boot/flatdevtree.h
20002 --- linux-2.6.24/arch/powerpc/boot/flatdevtree.h 2008-01-24 23:58:37.000000000 +0100
20003 +++ powerpc.git/arch/powerpc/boot/flatdevtree.h 1970-01-01 01:00:00.000000000 +0100
20006 - * This program is free software; you can redistribute it and/or modify
20007 - * it under the terms of the GNU General Public License as published by
20008 - * the Free Software Foundation; either version 2 of the License, or
20009 - * (at your option) any later version.
20011 - * This program is distributed in the hope that it will be useful,
20012 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
20013 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20014 - * GNU General Public License for more details.
20016 - * You should have received a copy of the GNU General Public License
20017 - * along with this program; if not, write to the Free Software
20018 - * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20021 -#ifndef FLATDEVTREE_H
20022 -#define FLATDEVTREE_H
20024 -#include "flatdevtree_env.h"
20026 -/* Definitions used by the flattened device tree */
20027 -#define OF_DT_HEADER 0xd00dfeed /* marker */
20028 -#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
20029 -#define OF_DT_END_NODE 0x2 /* End node */
20030 -#define OF_DT_PROP 0x3 /* Property: name off, size, content */
20031 -#define OF_DT_NOP 0x4 /* nop */
20032 -#define OF_DT_END 0x9
20034 -#define OF_DT_VERSION 0x10
20036 -struct boot_param_header {
20037 - u32 magic; /* magic word OF_DT_HEADER */
20038 - u32 totalsize; /* total size of DT block */
20039 - u32 off_dt_struct; /* offset to structure */
20040 - u32 off_dt_strings; /* offset to strings */
20041 - u32 off_mem_rsvmap; /* offset to memory reserve map */
20042 - u32 version; /* format version */
20043 - u32 last_comp_version; /* last compatible version */
20044 - /* version 2 fields below */
20045 - u32 boot_cpuid_phys; /* Physical CPU id we're booting on */
20046 - /* version 3 fields below */
20047 - u32 dt_strings_size; /* size of the DT strings block */
20050 -struct ft_reserve {
20055 -struct ft_region {
20057 - unsigned long size;
20067 -#define FT_MAX_DEPTH 50
20070 - struct boot_param_header *bph;
20071 - int max_size; /* maximum size of tree */
20072 - int isordered; /* everything in standard order */
20073 - void *(*realloc)(void *, unsigned long);
20074 - char *str_anchor;
20075 - char *p; /* current insertion point in structs */
20076 - struct ft_region rgn[FT_N_REGION];
20077 - void *genealogy[FT_MAX_DEPTH+1];
20079 - unsigned int node_max;
20080 - unsigned int nodes_used;
20083 -char *ft_begin_node(struct ft_cxt *cxt, const char *name);
20084 -void ft_end_node(struct ft_cxt *cxt);
20086 -void ft_begin_tree(struct ft_cxt *cxt);
20087 -void ft_end_tree(struct ft_cxt *cxt);
20089 -void ft_nop(struct ft_cxt *cxt);
20090 -int ft_prop(struct ft_cxt *cxt, const char *name,
20091 - const void *data, unsigned int sz);
20092 -int ft_prop_str(struct ft_cxt *cxt, const char *name, const char *str);
20093 -int ft_prop_int(struct ft_cxt *cxt, const char *name, unsigned int val);
20094 -void ft_begin(struct ft_cxt *cxt, void *blob, unsigned int max_size,
20095 - void *(*realloc_fn)(void *, unsigned long));
20096 -int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size,
20097 - unsigned int max_find_device,
20098 - void *(*realloc_fn)(void *, unsigned long));
20099 -int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size);
20101 -void ft_dump_blob(const void *bphp);
20102 -void ft_merge_blob(struct ft_cxt *cxt, void *blob);
20103 -void *ft_find_device(struct ft_cxt *cxt, const void *top,
20104 - const char *srch_path);
20105 -void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path);
20106 -int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
20107 - void *buf, const unsigned int buflen);
20108 -int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
20109 - const void *buf, const unsigned int buflen);
20110 -void *ft_get_parent(struct ft_cxt *cxt, const void *phandle);
20111 -void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev,
20112 - const char *propname, const char *propval,
20114 -void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name);
20115 -char *ft_get_path(struct ft_cxt *cxt, const void *phandle, char *buf, int len);
20117 -#endif /* FLATDEVTREE_H */
20118 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/flatdevtree_misc.c powerpc.git/arch/powerpc/boot/flatdevtree_misc.c
20119 --- linux-2.6.24/arch/powerpc/boot/flatdevtree_misc.c 2008-01-24 23:58:37.000000000 +0100
20120 +++ powerpc.git/arch/powerpc/boot/flatdevtree_misc.c 1970-01-01 01:00:00.000000000 +0100
20123 - * This file does the necessary interface mapping between the bootwrapper
20124 - * device tree operations and the interface provided by shared source
20125 - * files flatdevicetree.[ch].
20127 - * Author: Mark A. Greer <mgreer@mvista.com>
20129 - * 2006 (c) MontaVista Software, Inc. This file is licensed under
20130 - * the terms of the GNU General Public License version 2. This program
20131 - * is licensed "as is" without any warranty of any kind, whether express
20134 -#include <stddef.h>
20135 -#include "flatdevtree.h"
20138 -static struct ft_cxt cxt;
20140 -static void *fdtm_finddevice(const char *name)
20142 - return ft_find_device(&cxt, NULL, name);
20145 -static int fdtm_getprop(const void *phandle, const char *propname,
20146 - void *buf, const int buflen)
20148 - return ft_get_prop(&cxt, phandle, propname, buf, buflen);
20151 -static int fdtm_setprop(const void *phandle, const char *propname,
20152 - const void *buf, const int buflen)
20154 - return ft_set_prop(&cxt, phandle, propname, buf, buflen);
20157 -static void *fdtm_get_parent(const void *phandle)
20159 - return ft_get_parent(&cxt, phandle);
20162 -static void *fdtm_create_node(const void *phandle, const char *name)
20164 - return ft_create_node(&cxt, phandle, name);
20167 -static void *fdtm_find_node_by_prop_value(const void *prev,
20168 - const char *propname,
20169 - const char *propval,
20172 - return ft_find_node_by_prop_value(&cxt, prev, propname,
20173 - propval, proplen);
20176 -static unsigned long fdtm_finalize(void)
20178 - ft_end_tree(&cxt);
20179 - return (unsigned long)cxt.bph;
20182 -static char *fdtm_get_path(const void *phandle, char *buf, int len)
20184 - return ft_get_path(&cxt, phandle, buf, len);
20187 -int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device)
20189 - dt_ops.finddevice = fdtm_finddevice;
20190 - dt_ops.getprop = fdtm_getprop;
20191 - dt_ops.setprop = fdtm_setprop;
20192 - dt_ops.get_parent = fdtm_get_parent;
20193 - dt_ops.create_node = fdtm_create_node;
20194 - dt_ops.find_node_by_prop_value = fdtm_find_node_by_prop_value;
20195 - dt_ops.finalize = fdtm_finalize;
20196 - dt_ops.get_path = fdtm_get_path;
20198 - return ft_open(&cxt, dt_blob, max_size, max_find_device,
20199 - platform_ops.realloc);
20201 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/holly.c powerpc.git/arch/powerpc/boot/holly.c
20202 --- linux-2.6.24/arch/powerpc/boot/holly.c 2008-01-24 23:58:37.000000000 +0100
20203 +++ powerpc.git/arch/powerpc/boot/holly.c 2008-01-28 20:25:49.000000000 +0100
20205 u32 heapsize = 0x8000000 - (u32)_end; /* 128M */
20207 simple_alloc_init(_end, heapsize, 32, 64);
20208 - ft_init(_dtb_start, 0, 4);
20209 + fdt_init(_dtb_start);
20210 serial_console_init();
20212 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt/Makefile.libfdt powerpc.git/arch/powerpc/boot/libfdt/Makefile.libfdt
20213 --- linux-2.6.24/arch/powerpc/boot/libfdt/Makefile.libfdt 1970-01-01 01:00:00.000000000 +0100
20214 +++ powerpc.git/arch/powerpc/boot/libfdt/Makefile.libfdt 2008-01-28 20:25:49.000000000 +0100
20218 +# This is not a complete Makefile of itself. Instead, it is designed to
20219 +# be easily embeddable into other systems of Makefiles.
20221 +LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
20222 +LIBFDT_INCLUDES = fdt.h libfdt.h
20223 +LIBFDT_EXTRA = libfdt_internal.h
20224 +LIBFDT_LIB = libfdt/libfdt.a
20226 +LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)
20228 +$(LIBFDT_objdir)/$(LIBFDT_LIB): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))
20230 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt/fdt.c powerpc.git/arch/powerpc/boot/libfdt/fdt.c
20231 --- linux-2.6.24/arch/powerpc/boot/libfdt/fdt.c 1970-01-01 01:00:00.000000000 +0100
20232 +++ powerpc.git/arch/powerpc/boot/libfdt/fdt.c 2008-01-28 20:25:49.000000000 +0100
20235 + * libfdt - Flat Device Tree manipulation
20236 + * Copyright (C) 2006 David Gibson, IBM Corporation.
20238 + * libfdt is dual licensed: you can use it either under the terms of
20239 + * the GPL, or the BSD license, at your option.
20241 + * a) This library is free software; you can redistribute it and/or
20242 + * modify it under the terms of the GNU General Public License as
20243 + * published by the Free Software Foundation; either version 2 of the
20244 + * License, or (at your option) any later version.
20246 + * This library is distributed in the hope that it will be useful,
20247 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
20248 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20249 + * GNU General Public License for more details.
20251 + * You should have received a copy of the GNU General Public
20252 + * License along with this library; if not, write to the Free
20253 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20254 + * MA 02110-1301 USA
20258 + * b) Redistribution and use in source and binary forms, with or
20259 + * without modification, are permitted provided that the following
20260 + * conditions are met:
20262 + * 1. Redistributions of source code must retain the above
20263 + * copyright notice, this list of conditions and the following
20265 + * 2. Redistributions in binary form must reproduce the above
20266 + * copyright notice, this list of conditions and the following
20267 + * disclaimer in the documentation and/or other materials
20268 + * provided with the distribution.
20270 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
20271 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20272 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20273 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20274 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20275 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20276 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20277 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20278 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20279 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20280 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
20281 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
20282 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20284 +#include "libfdt_env.h"
20287 +#include <libfdt.h>
20289 +#include "libfdt_internal.h"
20291 +int fdt_check_header(const void *fdt)
20293 + if (fdt_magic(fdt) == FDT_MAGIC) {
20294 + /* Complete tree */
20295 + if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION)
20296 + return -FDT_ERR_BADVERSION;
20297 + if (fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION)
20298 + return -FDT_ERR_BADVERSION;
20299 + } else if (fdt_magic(fdt) == SW_MAGIC) {
20300 + /* Unfinished sequential-write blob */
20301 + if (fdt_size_dt_struct(fdt) == 0)
20302 + return -FDT_ERR_BADSTATE;
20304 + return -FDT_ERR_BADMAGIC;
20310 +const void *fdt_offset_ptr(const void *fdt, int offset, int len)
20314 + if (fdt_version(fdt) >= 0x11)
20315 + if (((offset + len) < offset)
20316 + || ((offset + len) > fdt_size_dt_struct(fdt)))
20319 + p = _fdt_offset_ptr(fdt, offset);
20326 +uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset)
20328 + const uint32_t *tagp, *lenp;
20332 + if (offset % FDT_TAGSIZE)
20335 + tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
20337 + return FDT_END; /* premature end */
20338 + tag = fdt32_to_cpu(*tagp);
20339 + offset += FDT_TAGSIZE;
20342 + case FDT_BEGIN_NODE:
20345 + p = fdt_offset_ptr(fdt, offset++, 1);
20346 + } while (p && (*p != '\0'));
20351 + lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
20354 + /* skip name offset, length and value */
20355 + offset += 2*FDT_TAGSIZE + fdt32_to_cpu(*lenp);
20360 + *nextoffset = ALIGN(offset, FDT_TAGSIZE);
20365 +const char *_fdt_find_string(const char *strtab, int tabsize, const char *s)
20367 + int len = strlen(s) + 1;
20368 + const char *last = strtab + tabsize - len;
20371 + for (p = strtab; p <= last; p++)
20372 + if (memeq(p, s, len))
20377 +int fdt_move(const void *fdt, void *buf, int bufsize)
20379 + int err = fdt_check_header(fdt);
20384 + if (fdt_totalsize(fdt) > bufsize)
20385 + return -FDT_ERR_NOSPACE;
20387 + memmove(buf, fdt, fdt_totalsize(fdt));
20390 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt/fdt.h powerpc.git/arch/powerpc/boot/libfdt/fdt.h
20391 --- linux-2.6.24/arch/powerpc/boot/libfdt/fdt.h 1970-01-01 01:00:00.000000000 +0100
20392 +++ powerpc.git/arch/powerpc/boot/libfdt/fdt.h 2008-01-28 20:25:49.000000000 +0100
20397 +#ifndef __ASSEMBLY__
20399 +struct fdt_header {
20400 + uint32_t magic; /* magic word FDT_MAGIC */
20401 + uint32_t totalsize; /* total size of DT block */
20402 + uint32_t off_dt_struct; /* offset to structure */
20403 + uint32_t off_dt_strings; /* offset to strings */
20404 + uint32_t off_mem_rsvmap; /* offset to memory reserve map */
20405 + uint32_t version; /* format version */
20406 + uint32_t last_comp_version; /* last compatible version */
20408 + /* version 2 fields below */
20409 + uint32_t boot_cpuid_phys; /* Which physical CPU id we're
20411 + /* version 3 fields below */
20412 + uint32_t size_dt_strings; /* size of the strings block */
20414 + /* version 17 fields below */
20415 + uint32_t size_dt_struct; /* size of the structure block */
20418 +struct fdt_reserve_entry {
20419 + uint64_t address;
20423 +struct fdt_node_header {
20428 +struct fdt_property {
20431 + uint32_t nameoff;
20435 +#endif /* !__ASSEMBLY */
20437 +#define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
20438 +#define FDT_TAGSIZE sizeof(uint32_t)
20440 +#define FDT_BEGIN_NODE 0x1 /* Start node: full name */
20441 +#define FDT_END_NODE 0x2 /* End node */
20442 +#define FDT_PROP 0x3 /* Property: name off,
20444 +#define FDT_NOP 0x4 /* nop */
20445 +#define FDT_END 0x9
20447 +#define FDT_V1_SIZE (7*sizeof(uint32_t))
20448 +#define FDT_V2_SIZE (FDT_V1_SIZE + sizeof(uint32_t))
20449 +#define FDT_V3_SIZE (FDT_V2_SIZE + sizeof(uint32_t))
20450 +#define FDT_V16_SIZE FDT_V3_SIZE
20451 +#define FDT_V17_SIZE (FDT_V16_SIZE + sizeof(uint32_t))
20453 +#endif /* _FDT_H */
20454 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt/fdt_ro.c powerpc.git/arch/powerpc/boot/libfdt/fdt_ro.c
20455 --- linux-2.6.24/arch/powerpc/boot/libfdt/fdt_ro.c 1970-01-01 01:00:00.000000000 +0100
20456 +++ powerpc.git/arch/powerpc/boot/libfdt/fdt_ro.c 2008-01-28 20:25:49.000000000 +0100
20459 + * libfdt - Flat Device Tree manipulation
20460 + * Copyright (C) 2006 David Gibson, IBM Corporation.
20462 + * libfdt is dual licensed: you can use it either under the terms of
20463 + * the GPL, or the BSD license, at your option.
20465 + * a) This library is free software; you can redistribute it and/or
20466 + * modify it under the terms of the GNU General Public License as
20467 + * published by the Free Software Foundation; either version 2 of the
20468 + * License, or (at your option) any later version.
20470 + * This library is distributed in the hope that it will be useful,
20471 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
20472 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20473 + * GNU General Public License for more details.
20475 + * You should have received a copy of the GNU General Public
20476 + * License along with this library; if not, write to the Free
20477 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20478 + * MA 02110-1301 USA
20482 + * b) Redistribution and use in source and binary forms, with or
20483 + * without modification, are permitted provided that the following
20484 + * conditions are met:
20486 + * 1. Redistributions of source code must retain the above
20487 + * copyright notice, this list of conditions and the following
20489 + * 2. Redistributions in binary form must reproduce the above
20490 + * copyright notice, this list of conditions and the following
20491 + * disclaimer in the documentation and/or other materials
20492 + * provided with the distribution.
20494 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
20495 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20496 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20497 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20498 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20499 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20500 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20501 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20502 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20503 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20504 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
20505 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
20506 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20508 +#include "libfdt_env.h"
20511 +#include <libfdt.h>
20513 +#include "libfdt_internal.h"
20515 +#define CHECK_HEADER(fdt) \
20518 + if ((err = fdt_check_header(fdt)) != 0) \
20522 +static int nodename_eq(const void *fdt, int offset,
20523 + const char *s, int len)
20525 + const char *p = fdt_offset_ptr(fdt, offset, len+1);
20528 + /* short match */
20531 + if (memcmp(p, s, len) != 0)
20534 + if (p[len] == '\0')
20536 + else if (!memchr(s, '@', len) && (p[len] == '@'))
20542 +const char *fdt_string(const void *fdt, int stroffset)
20544 + return (char *)fdt + fdt_off_dt_strings(fdt) + stroffset;
20547 +int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size)
20549 + CHECK_HEADER(fdt);
20550 + *address = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->address);
20551 + *size = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->size);
20555 +int fdt_num_mem_rsv(const void *fdt)
20559 + while (fdt64_to_cpu(_fdt_mem_rsv(fdt, i)->size) != 0)
20564 +int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
20565 + const char *name, int namelen)
20569 + int offset, nextoffset;
20571 + CHECK_HEADER(fdt);
20573 + tag = fdt_next_tag(fdt, parentoffset, &nextoffset);
20574 + if (tag != FDT_BEGIN_NODE)
20575 + return -FDT_ERR_BADOFFSET;
20578 + offset = nextoffset;
20579 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20583 + return -FDT_ERR_TRUNCATED;
20585 + case FDT_BEGIN_NODE:
20589 + if (nodename_eq(fdt, offset+FDT_TAGSIZE, name, namelen))
20594 + case FDT_END_NODE:
20603 + return -FDT_ERR_BADSTRUCTURE;
20605 + } while (level >= 0);
20607 + return -FDT_ERR_NOTFOUND;
20610 +int fdt_subnode_offset(const void *fdt, int parentoffset,
20611 + const char *name)
20613 + return fdt_subnode_offset_namelen(fdt, parentoffset, name, strlen(name));
20616 +int fdt_path_offset(const void *fdt, const char *path)
20618 + const char *end = path + strlen(path);
20619 + const char *p = path;
20622 + CHECK_HEADER(fdt);
20624 + if (*path != '/')
20625 + return -FDT_ERR_BADPATH;
20630 + while (*p == '/')
20634 + q = strchr(p, '/');
20638 + offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p);
20648 +const char *fdt_get_name(const void *fdt, int nodeoffset, int *len)
20650 + const struct fdt_node_header *nh;
20653 + if ((err = fdt_check_header(fdt)) != 0)
20656 + err = -FDT_ERR_BADOFFSET;
20657 + nh = fdt_offset_ptr(fdt, nodeoffset, sizeof(*nh));
20658 + if (!nh || (fdt32_to_cpu(nh->tag) != FDT_BEGIN_NODE))
20662 + *len = strlen(nh->name);
20672 +const struct fdt_property *fdt_get_property(const void *fdt,
20674 + const char *name, int *lenp)
20677 + const struct fdt_property *prop;
20679 + int offset, nextoffset;
20682 + if ((err = fdt_check_header(fdt)) != 0)
20685 + err = -FDT_ERR_BADOFFSET;
20686 + if (nodeoffset % FDT_TAGSIZE)
20689 + tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
20690 + if (tag != FDT_BEGIN_NODE)
20694 + offset = nextoffset;
20696 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20699 + err = -FDT_ERR_TRUNCATED;
20702 + case FDT_BEGIN_NODE:
20703 + case FDT_END_NODE:
20708 + err = -FDT_ERR_BADSTRUCTURE;
20709 + prop = fdt_offset_ptr(fdt, offset, sizeof(*prop));
20712 + namestroff = fdt32_to_cpu(prop->nameoff);
20713 + if (streq(fdt_string(fdt, namestroff), name)) {
20715 + int len = fdt32_to_cpu(prop->len);
20716 + prop = fdt_offset_ptr(fdt, offset,
20717 + sizeof(*prop)+len);
20729 + err = -FDT_ERR_BADSTRUCTURE;
20732 + } while ((tag != FDT_BEGIN_NODE) && (tag != FDT_END_NODE));
20734 + err = -FDT_ERR_NOTFOUND;
20741 +const void *fdt_getprop(const void *fdt, int nodeoffset,
20742 + const char *name, int *lenp)
20744 + const struct fdt_property *prop;
20746 + prop = fdt_get_property(fdt, nodeoffset, name, lenp);
20750 + return prop->data;
20753 +uint32_t fdt_get_phandle(const void *fdt, int nodeoffset)
20755 + const uint32_t *php;
20758 + php = fdt_getprop(fdt, nodeoffset, "linux,phandle", &len);
20759 + if (!php || (len != sizeof(*php)))
20762 + return fdt32_to_cpu(*php);
20765 +int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen)
20768 + int p = 0, overflow = 0;
20769 + int offset, nextoffset, namelen;
20770 + const char *name;
20772 + CHECK_HEADER(fdt);
20774 + tag = fdt_next_tag(fdt, 0, &nextoffset);
20775 + if (tag != FDT_BEGIN_NODE)
20776 + return -FDT_ERR_BADSTRUCTURE;
20779 + return -FDT_ERR_NOSPACE;
20783 + while (nextoffset <= nodeoffset) {
20784 + offset = nextoffset;
20785 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20788 + return -FDT_ERR_BADOFFSET;
20790 + case FDT_BEGIN_NODE:
20791 + name = fdt_get_name(fdt, offset, &namelen);
20794 + if (overflow || ((p + namelen + 1) > buflen)) {
20798 + memcpy(buf + p, name, namelen);
20803 + case FDT_END_NODE:
20810 + } while (buf[p-1] != '/');
20818 + return -FDT_ERR_BADSTRUCTURE;
20823 + return -FDT_ERR_NOSPACE;
20825 + if (p > 1) /* special case so that root path is "/", not "" */
20831 +int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
20832 + int supernodedepth, int *nodedepth)
20836 + int offset, nextoffset = 0;
20837 + int supernodeoffset = -FDT_ERR_INTERNAL;
20839 + CHECK_HEADER(fdt);
20841 + if (supernodedepth < 0)
20842 + return -FDT_ERR_NOTFOUND;
20845 + offset = nextoffset;
20846 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20849 + return -FDT_ERR_BADOFFSET;
20851 + case FDT_BEGIN_NODE:
20853 + if (level == supernodedepth)
20854 + supernodeoffset = offset;
20857 + case FDT_END_NODE:
20866 + return -FDT_ERR_BADSTRUCTURE;
20868 + } while (offset < nodeoffset);
20871 + *nodedepth = level;
20873 + if (supernodedepth > level)
20874 + return -FDT_ERR_NOTFOUND;
20875 + return supernodeoffset;
20878 +int fdt_node_depth(const void *fdt, int nodeoffset)
20883 + err = fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, &nodedepth);
20885 + return (err < 0) ? err : -FDT_ERR_INTERNAL;
20886 + return nodedepth;
20889 +int fdt_parent_offset(const void *fdt, int nodeoffset)
20891 + int nodedepth = fdt_node_depth(fdt, nodeoffset);
20893 + if (nodedepth < 0)
20894 + return nodedepth;
20895 + return fdt_supernode_atdepth_offset(fdt, nodeoffset,
20896 + nodedepth - 1, NULL);
20899 +int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
20900 + const char *propname,
20901 + const void *propval, int proplen)
20904 + int offset, nextoffset;
20908 + CHECK_HEADER(fdt);
20910 + if (startoffset >= 0) {
20911 + tag = fdt_next_tag(fdt, startoffset, &nextoffset);
20912 + if (tag != FDT_BEGIN_NODE)
20913 + return -FDT_ERR_BADOFFSET;
20918 + /* FIXME: The algorithm here is pretty horrible: we scan each
20919 + * property of a node in fdt_getprop(), then if that didn't
20920 + * find what we want, we scan over them again making our way
20921 + * to the next node. Still it's the easiest to implement
20922 + * approach; performance can come later. */
20924 + offset = nextoffset;
20925 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20928 + case FDT_BEGIN_NODE:
20929 + val = fdt_getprop(fdt, offset, propname, &len);
20931 + && (len == proplen)
20932 + && (memcmp(val, propval, len) == 0))
20938 + case FDT_END_NODE:
20943 + return -FDT_ERR_BADSTRUCTURE;
20945 + } while (tag != FDT_END);
20947 + return -FDT_ERR_NOTFOUND;
20950 +int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle)
20952 + if ((phandle == 0) || (phandle == -1))
20953 + return -FDT_ERR_BADPHANDLE;
20954 + phandle = cpu_to_fdt32(phandle);
20955 + return fdt_node_offset_by_prop_value(fdt, -1, "linux,phandle",
20956 + &phandle, sizeof(phandle));
20959 +int _stringlist_contains(const void *strlist, int listlen, const char *str)
20961 + int len = strlen(str);
20964 + while (listlen >= len) {
20965 + if (memcmp(str, strlist, len+1) == 0)
20967 + p = memchr(strlist, '\0', listlen);
20969 + return 0; /* malformed strlist.. */
20970 + listlen -= (p-strlist) + 1;
20976 +int fdt_node_check_compatible(const void *fdt, int nodeoffset,
20977 + const char *compatible)
20979 + const void *prop;
20982 + prop = fdt_getprop(fdt, nodeoffset, "compatible", &len);
20985 + if (_stringlist_contains(prop, len, compatible))
20991 +int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
20992 + const char *compatible)
20995 + int offset, nextoffset;
20998 + CHECK_HEADER(fdt);
21000 + if (startoffset >= 0) {
21001 + tag = fdt_next_tag(fdt, startoffset, &nextoffset);
21002 + if (tag != FDT_BEGIN_NODE)
21003 + return -FDT_ERR_BADOFFSET;
21008 + /* FIXME: The algorithm here is pretty horrible: we scan each
21009 + * property of a node in fdt_node_check_compatible(), then if
21010 + * that didn't find what we want, we scan over them again
21011 + * making our way to the next node. Still it's the easiest to
21012 + * implement approach; performance can come later. */
21014 + offset = nextoffset;
21015 + tag = fdt_next_tag(fdt, offset, &nextoffset);
21018 + case FDT_BEGIN_NODE:
21019 + err = fdt_node_check_compatible(fdt, offset,
21022 + && (err != -FDT_ERR_NOTFOUND))
21024 + else if (err == 0)
21030 + case FDT_END_NODE:
21035 + return -FDT_ERR_BADSTRUCTURE;
21037 + } while (tag != FDT_END);
21039 + return -FDT_ERR_NOTFOUND;
21041 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt/fdt_rw.c powerpc.git/arch/powerpc/boot/libfdt/fdt_rw.c
21042 --- linux-2.6.24/arch/powerpc/boot/libfdt/fdt_rw.c 1970-01-01 01:00:00.000000000 +0100
21043 +++ powerpc.git/arch/powerpc/boot/libfdt/fdt_rw.c 2008-01-28 20:25:49.000000000 +0100
21046 + * libfdt - Flat Device Tree manipulation
21047 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21049 + * libfdt is dual licensed: you can use it either under the terms of
21050 + * the GPL, or the BSD license, at your option.
21052 + * a) This library is free software; you can redistribute it and/or
21053 + * modify it under the terms of the GNU General Public License as
21054 + * published by the Free Software Foundation; either version 2 of the
21055 + * License, or (at your option) any later version.
21057 + * This library is distributed in the hope that it will be useful,
21058 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21059 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21060 + * GNU General Public License for more details.
21062 + * You should have received a copy of the GNU General Public
21063 + * License along with this library; if not, write to the Free
21064 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21065 + * MA 02110-1301 USA
21069 + * b) Redistribution and use in source and binary forms, with or
21070 + * without modification, are permitted provided that the following
21071 + * conditions are met:
21073 + * 1. Redistributions of source code must retain the above
21074 + * copyright notice, this list of conditions and the following
21076 + * 2. Redistributions in binary form must reproduce the above
21077 + * copyright notice, this list of conditions and the following
21078 + * disclaimer in the documentation and/or other materials
21079 + * provided with the distribution.
21081 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21082 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21083 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21084 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21085 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21086 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21087 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21088 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21089 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21090 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21091 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
21092 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
21093 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21095 +#include "libfdt_env.h"
21098 +#include <libfdt.h>
21100 +#include "libfdt_internal.h"
21102 +static int _blocks_misordered(const void *fdt,
21103 + int mem_rsv_size, int struct_size)
21105 + return (fdt_off_mem_rsvmap(fdt) < ALIGN(sizeof(struct fdt_header), 8))
21106 + || (fdt_off_dt_struct(fdt) <
21107 + (fdt_off_mem_rsvmap(fdt) + mem_rsv_size))
21108 + || (fdt_off_dt_strings(fdt) <
21109 + (fdt_off_dt_struct(fdt) + struct_size))
21110 + || (fdt_totalsize(fdt) <
21111 + (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt)));
21114 +static int rw_check_header(void *fdt)
21118 + if ((err = fdt_check_header(fdt)))
21120 + if (fdt_version(fdt) < 17)
21121 + return -FDT_ERR_BADVERSION;
21122 + if (_blocks_misordered(fdt, sizeof(struct fdt_reserve_entry),
21123 + fdt_size_dt_struct(fdt)))
21124 + return -FDT_ERR_BADLAYOUT;
21125 + if (fdt_version(fdt) > 17)
21126 + fdt_set_version(fdt, 17);
21131 +#define RW_CHECK_HEADER(fdt) \
21134 + if ((err = rw_check_header(fdt)) != 0) \
21138 +static inline int _blob_data_size(void *fdt)
21140 + return fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
21143 +static int _blob_splice(void *fdt, void *p, int oldlen, int newlen)
21145 + void *end = fdt + _blob_data_size(fdt);
21147 + if (((p + oldlen) < p) || ((p + oldlen) > end))
21148 + return -FDT_ERR_BADOFFSET;
21149 + if ((end - oldlen + newlen) > (fdt + fdt_totalsize(fdt)))
21150 + return -FDT_ERR_NOSPACE;
21151 + memmove(p + newlen, p + oldlen, end - p - oldlen);
21155 +static int _blob_splice_mem_rsv(void *fdt, struct fdt_reserve_entry *p,
21156 + int oldn, int newn)
21158 + int delta = (newn - oldn) * sizeof(*p);
21160 + err = _blob_splice(fdt, p, oldn * sizeof(*p), newn * sizeof(*p));
21163 + fdt_set_off_dt_struct(fdt, fdt_off_dt_struct(fdt) + delta);
21164 + fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta);
21168 +static int _blob_splice_struct(void *fdt, void *p,
21169 + int oldlen, int newlen)
21171 + int delta = newlen - oldlen;
21174 + if ((err = _blob_splice(fdt, p, oldlen, newlen)))
21177 + fdt_set_size_dt_struct(fdt, fdt_size_dt_struct(fdt) + delta);
21178 + fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta);
21182 +static int _blob_splice_string(void *fdt, int newlen)
21184 + void *p = fdt + fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
21187 + if ((err = _blob_splice(fdt, p, 0, newlen)))
21190 + fdt_set_size_dt_strings(fdt, fdt_size_dt_strings(fdt) + newlen);
21194 +static int _find_add_string(void *fdt, const char *s)
21196 + char *strtab = (char *)fdt + fdt_off_dt_strings(fdt);
21199 + int len = strlen(s) + 1;
21202 + p = _fdt_find_string(strtab, fdt_size_dt_strings(fdt), s);
21205 + return (p - strtab);
21207 + new = strtab + fdt_size_dt_strings(fdt);
21208 + err = _blob_splice_string(fdt, len);
21212 + memcpy(new, s, len);
21213 + return (new - strtab);
21216 +int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size)
21218 + struct fdt_reserve_entry *re;
21221 + if ((err = rw_check_header(fdt)))
21224 + re = _fdt_mem_rsv_w(fdt, fdt_num_mem_rsv(fdt));
21225 + err = _blob_splice_mem_rsv(fdt, re, 0, 1);
21229 + re->address = cpu_to_fdt64(address);
21230 + re->size = cpu_to_fdt64(size);
21234 +int fdt_del_mem_rsv(void *fdt, int n)
21236 + struct fdt_reserve_entry *re = _fdt_mem_rsv_w(fdt, n);
21239 + if ((err = rw_check_header(fdt)))
21241 + if (n >= fdt_num_mem_rsv(fdt))
21242 + return -FDT_ERR_NOTFOUND;
21244 + err = _blob_splice_mem_rsv(fdt, re, 1, 0);
21250 +static int _resize_property(void *fdt, int nodeoffset, const char *name, int len,
21251 + struct fdt_property **prop)
21256 + *prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen);
21260 + if ((err = _blob_splice_struct(fdt, (*prop)->data,
21261 + ALIGN(oldlen, FDT_TAGSIZE),
21262 + ALIGN(len, FDT_TAGSIZE))))
21265 + (*prop)->len = cpu_to_fdt32(len);
21269 +static int _add_property(void *fdt, int nodeoffset, const char *name, int len,
21270 + struct fdt_property **prop)
21278 + tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
21279 + if (tag != FDT_BEGIN_NODE)
21280 + return -FDT_ERR_BADOFFSET;
21282 + namestroff = _find_add_string(fdt, name);
21283 + if (namestroff < 0)
21284 + return namestroff;
21286 + *prop = _fdt_offset_ptr_w(fdt, nextoffset);
21287 + proplen = sizeof(**prop) + ALIGN(len, FDT_TAGSIZE);
21289 + err = _blob_splice_struct(fdt, *prop, 0, proplen);
21293 + (*prop)->tag = cpu_to_fdt32(FDT_PROP);
21294 + (*prop)->nameoff = cpu_to_fdt32(namestroff);
21295 + (*prop)->len = cpu_to_fdt32(len);
21299 +int fdt_setprop(void *fdt, int nodeoffset, const char *name,
21300 + const void *val, int len)
21302 + struct fdt_property *prop;
21305 + if ((err = rw_check_header(fdt)))
21308 + err = _resize_property(fdt, nodeoffset, name, len, &prop);
21309 + if (err == -FDT_ERR_NOTFOUND)
21310 + err = _add_property(fdt, nodeoffset, name, len, &prop);
21314 + memcpy(prop->data, val, len);
21318 +int fdt_delprop(void *fdt, int nodeoffset, const char *name)
21320 + struct fdt_property *prop;
21321 + int len, proplen;
21323 + RW_CHECK_HEADER(fdt);
21325 + prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
21329 + proplen = sizeof(*prop) + ALIGN(len, FDT_TAGSIZE);
21330 + return _blob_splice_struct(fdt, prop, proplen, 0);
21333 +int fdt_add_subnode_namelen(void *fdt, int parentoffset,
21334 + const char *name, int namelen)
21336 + struct fdt_node_header *nh;
21337 + int offset, nextoffset;
21341 + uint32_t *endtag;
21343 + RW_CHECK_HEADER(fdt);
21345 + offset = fdt_subnode_offset_namelen(fdt, parentoffset, name, namelen);
21347 + return -FDT_ERR_EXISTS;
21348 + else if (offset != -FDT_ERR_NOTFOUND)
21351 + /* Try to place the new node after the parent's properties */
21352 + fdt_next_tag(fdt, parentoffset, &nextoffset); /* skip the BEGIN_NODE */
21354 + offset = nextoffset;
21355 + tag = fdt_next_tag(fdt, offset, &nextoffset);
21356 + } while (tag == FDT_PROP);
21358 + nh = _fdt_offset_ptr_w(fdt, offset);
21359 + nodelen = sizeof(*nh) + ALIGN(namelen+1, FDT_TAGSIZE) + FDT_TAGSIZE;
21361 + err = _blob_splice_struct(fdt, nh, 0, nodelen);
21365 + nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
21366 + memset(nh->name, 0, ALIGN(namelen+1, FDT_TAGSIZE));
21367 + memcpy(nh->name, name, namelen);
21368 + endtag = (uint32_t *)((void *)nh + nodelen - FDT_TAGSIZE);
21369 + *endtag = cpu_to_fdt32(FDT_END_NODE);
21374 +int fdt_add_subnode(void *fdt, int parentoffset, const char *name)
21376 + return fdt_add_subnode_namelen(fdt, parentoffset, name, strlen(name));
21379 +int fdt_del_node(void *fdt, int nodeoffset)
21383 + RW_CHECK_HEADER(fdt);
21385 + endoffset = _fdt_node_end_offset(fdt, nodeoffset);
21386 + if (endoffset < 0)
21387 + return endoffset;
21389 + return _blob_splice_struct(fdt, _fdt_offset_ptr_w(fdt, nodeoffset),
21390 + endoffset - nodeoffset, 0);
21393 +static void _packblocks(const void *fdt, void *buf,
21394 + int mem_rsv_size, int struct_size)
21396 + int mem_rsv_off, struct_off, strings_off;
21398 + mem_rsv_off = ALIGN(sizeof(struct fdt_header), 8);
21399 + struct_off = mem_rsv_off + mem_rsv_size;
21400 + strings_off = struct_off + struct_size;
21402 + memmove(buf + mem_rsv_off, fdt + fdt_off_mem_rsvmap(fdt), mem_rsv_size);
21403 + fdt_set_off_mem_rsvmap(buf, mem_rsv_off);
21405 + memmove(buf + struct_off, fdt + fdt_off_dt_struct(fdt), struct_size);
21406 + fdt_set_off_dt_struct(buf, struct_off);
21407 + fdt_set_size_dt_struct(buf, struct_size);
21409 + memmove(buf + strings_off, fdt + fdt_off_dt_strings(fdt),
21410 + fdt_size_dt_strings(fdt));
21411 + fdt_set_off_dt_strings(buf, strings_off);
21412 + fdt_set_size_dt_strings(buf, fdt_size_dt_strings(fdt));
21415 +int fdt_open_into(const void *fdt, void *buf, int bufsize)
21418 + int mem_rsv_size, struct_size;
21422 + err = fdt_check_header(fdt);
21426 + mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
21427 + * sizeof(struct fdt_reserve_entry);
21429 + if (fdt_version(fdt) >= 17) {
21430 + struct_size = fdt_size_dt_struct(fdt);
21433 + while (fdt_next_tag(fdt, struct_size, &struct_size) != FDT_END)
21437 + if (!_blocks_misordered(fdt, mem_rsv_size, struct_size)) {
21438 + /* no further work necessary */
21439 + err = fdt_move(fdt, buf, bufsize);
21442 + fdt_set_version(buf, 17);
21443 + fdt_set_size_dt_struct(buf, struct_size);
21444 + fdt_set_totalsize(buf, bufsize);
21448 + /* Need to reorder */
21449 + newsize = ALIGN(sizeof(struct fdt_header), 8) + mem_rsv_size
21450 + + struct_size + fdt_size_dt_strings(fdt);
21452 + if (bufsize < newsize)
21453 + return -FDT_ERR_NOSPACE;
21455 + if (((buf + newsize) <= fdt)
21456 + || (buf >= (fdt + fdt_totalsize(fdt)))) {
21459 + tmp = (void *)fdt + fdt_totalsize(fdt);
21460 + if ((tmp + newsize) > (buf + bufsize))
21461 + return -FDT_ERR_NOSPACE;
21464 + _packblocks(fdt, tmp, mem_rsv_size, struct_size);
21465 + memmove(buf, tmp, newsize);
21467 + fdt_set_magic(buf, FDT_MAGIC);
21468 + fdt_set_totalsize(buf, bufsize);
21469 + fdt_set_version(buf, 17);
21470 + fdt_set_last_comp_version(buf, 16);
21471 + fdt_set_boot_cpuid_phys(buf, fdt_boot_cpuid_phys(fdt));
21476 +int fdt_pack(void *fdt)
21478 + int mem_rsv_size;
21481 + err = rw_check_header(fdt);
21485 + mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
21486 + * sizeof(struct fdt_reserve_entry);
21487 + _packblocks(fdt, fdt, mem_rsv_size, fdt_size_dt_struct(fdt));
21488 + fdt_set_totalsize(fdt, _blob_data_size(fdt));
21492 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt/fdt_strerror.c powerpc.git/arch/powerpc/boot/libfdt/fdt_strerror.c
21493 --- linux-2.6.24/arch/powerpc/boot/libfdt/fdt_strerror.c 1970-01-01 01:00:00.000000000 +0100
21494 +++ powerpc.git/arch/powerpc/boot/libfdt/fdt_strerror.c 2008-01-28 20:25:49.000000000 +0100
21497 + * libfdt - Flat Device Tree manipulation
21498 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21500 + * libfdt is dual licensed: you can use it either under the terms of
21501 + * the GPL, or the BSD license, at your option.
21503 + * a) This library is free software; you can redistribute it and/or
21504 + * modify it under the terms of the GNU General Public License as
21505 + * published by the Free Software Foundation; either version 2 of the
21506 + * License, or (at your option) any later version.
21508 + * This library is distributed in the hope that it will be useful,
21509 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21510 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21511 + * GNU General Public License for more details.
21513 + * You should have received a copy of the GNU General Public
21514 + * License along with this library; if not, write to the Free
21515 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21516 + * MA 02110-1301 USA
21520 + * b) Redistribution and use in source and binary forms, with or
21521 + * without modification, are permitted provided that the following
21522 + * conditions are met:
21524 + * 1. Redistributions of source code must retain the above
21525 + * copyright notice, this list of conditions and the following
21527 + * 2. Redistributions in binary form must reproduce the above
21528 + * copyright notice, this list of conditions and the following
21529 + * disclaimer in the documentation and/or other materials
21530 + * provided with the distribution.
21532 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21533 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21534 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21535 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21536 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21537 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21538 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21539 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21540 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21541 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21542 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
21543 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
21544 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21546 +#include "libfdt_env.h"
21549 +#include <libfdt.h>
21551 +#include "libfdt_internal.h"
21553 +struct errtabent {
21557 +#define ERRTABENT(val) \
21558 + [(val)] = { .str = #val, }
21560 +static struct errtabent errtable[] = {
21561 + ERRTABENT(FDT_ERR_NOTFOUND),
21562 + ERRTABENT(FDT_ERR_EXISTS),
21563 + ERRTABENT(FDT_ERR_NOSPACE),
21565 + ERRTABENT(FDT_ERR_BADOFFSET),
21566 + ERRTABENT(FDT_ERR_BADPATH),
21567 + ERRTABENT(FDT_ERR_BADSTATE),
21569 + ERRTABENT(FDT_ERR_TRUNCATED),
21570 + ERRTABENT(FDT_ERR_BADMAGIC),
21571 + ERRTABENT(FDT_ERR_BADVERSION),
21572 + ERRTABENT(FDT_ERR_BADSTRUCTURE),
21573 + ERRTABENT(FDT_ERR_BADLAYOUT),
21575 +#define ERRTABSIZE (sizeof(errtable) / sizeof(errtable[0]))
21577 +const char *fdt_strerror(int errval)
21580 + return "<valid offset/length>";
21581 + else if (errval == 0)
21582 + return "<no error>";
21583 + else if (errval > -ERRTABSIZE) {
21584 + const char *s = errtable[-errval].str;
21590 + return "<unknown error>";
21592 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt/fdt_sw.c powerpc.git/arch/powerpc/boot/libfdt/fdt_sw.c
21593 --- linux-2.6.24/arch/powerpc/boot/libfdt/fdt_sw.c 1970-01-01 01:00:00.000000000 +0100
21594 +++ powerpc.git/arch/powerpc/boot/libfdt/fdt_sw.c 2008-01-28 20:25:49.000000000 +0100
21597 + * libfdt - Flat Device Tree manipulation
21598 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21600 + * libfdt is dual licensed: you can use it either under the terms of
21601 + * the GPL, or the BSD license, at your option.
21603 + * a) This library is free software; you can redistribute it and/or
21604 + * modify it under the terms of the GNU General Public License as
21605 + * published by the Free Software Foundation; either version 2 of the
21606 + * License, or (at your option) any later version.
21608 + * This library is distributed in the hope that it will be useful,
21609 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21610 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21611 + * GNU General Public License for more details.
21613 + * You should have received a copy of the GNU General Public
21614 + * License along with this library; if not, write to the Free
21615 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21616 + * MA 02110-1301 USA
21620 + * b) Redistribution and use in source and binary forms, with or
21621 + * without modification, are permitted provided that the following
21622 + * conditions are met:
21624 + * 1. Redistributions of source code must retain the above
21625 + * copyright notice, this list of conditions and the following
21627 + * 2. Redistributions in binary form must reproduce the above
21628 + * copyright notice, this list of conditions and the following
21629 + * disclaimer in the documentation and/or other materials
21630 + * provided with the distribution.
21632 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21633 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21634 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21635 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21636 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21637 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21638 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21639 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21640 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21641 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21642 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
21643 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
21644 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21646 +#include "libfdt_env.h"
21649 +#include <libfdt.h>
21651 +#include "libfdt_internal.h"
21653 +static int check_header_sw(void *fdt)
21655 + if (fdt_magic(fdt) != SW_MAGIC)
21656 + return -FDT_ERR_BADMAGIC;
21660 +static void *grab_space(void *fdt, int len)
21662 + int offset = fdt_size_dt_struct(fdt);
21665 + spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt)
21666 + - fdt_size_dt_strings(fdt);
21668 + if ((offset + len < offset) || (offset + len > spaceleft))
21671 + fdt_set_size_dt_struct(fdt, offset + len);
21672 + return fdt_offset_ptr_w(fdt, offset, len);
21675 +int fdt_create(void *buf, int bufsize)
21679 + if (bufsize < sizeof(struct fdt_header))
21680 + return -FDT_ERR_NOSPACE;
21682 + memset(buf, 0, bufsize);
21684 + fdt_set_magic(fdt, SW_MAGIC);
21685 + fdt_set_version(fdt, FDT_LAST_SUPPORTED_VERSION);
21686 + fdt_set_last_comp_version(fdt, FDT_FIRST_SUPPORTED_VERSION);
21687 + fdt_set_totalsize(fdt, bufsize);
21689 + fdt_set_off_mem_rsvmap(fdt, ALIGN(sizeof(struct fdt_header),
21690 + sizeof(struct fdt_reserve_entry)));
21691 + fdt_set_off_dt_struct(fdt, fdt_off_mem_rsvmap(fdt));
21692 + fdt_set_off_dt_strings(fdt, bufsize);
21697 +int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size)
21699 + struct fdt_reserve_entry *re;
21700 + int err = check_header_sw(fdt);
21705 + if (fdt_size_dt_struct(fdt))
21706 + return -FDT_ERR_BADSTATE;
21708 + offset = fdt_off_dt_struct(fdt);
21709 + if ((offset + sizeof(*re)) > fdt_totalsize(fdt))
21710 + return -FDT_ERR_NOSPACE;
21712 + re = (struct fdt_reserve_entry *)(fdt + offset);
21713 + re->address = cpu_to_fdt64(addr);
21714 + re->size = cpu_to_fdt64(size);
21716 + fdt_set_off_dt_struct(fdt, offset + sizeof(*re));
21721 +int fdt_finish_reservemap(void *fdt)
21723 + return fdt_add_reservemap_entry(fdt, 0, 0);
21726 +int fdt_begin_node(void *fdt, const char *name)
21728 + struct fdt_node_header *nh;
21729 + int err = check_header_sw(fdt);
21730 + int namelen = strlen(name) + 1;
21735 + nh = grab_space(fdt, sizeof(*nh) + ALIGN(namelen, FDT_TAGSIZE));
21737 + return -FDT_ERR_NOSPACE;
21739 + nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
21740 + memcpy(nh->name, name, namelen);
21744 +int fdt_end_node(void *fdt)
21747 + int err = check_header_sw(fdt);
21752 + en = grab_space(fdt, FDT_TAGSIZE);
21754 + return -FDT_ERR_NOSPACE;
21756 + *en = cpu_to_fdt32(FDT_END_NODE);
21760 +static int find_add_string(void *fdt, const char *s)
21762 + char *strtab = (char *)fdt + fdt_totalsize(fdt);
21764 + int strtabsize = fdt_size_dt_strings(fdt);
21765 + int len = strlen(s) + 1;
21766 + int struct_top, offset;
21768 + p = _fdt_find_string(strtab - strtabsize, strtabsize, s);
21770 + return p - strtab;
21773 + offset = -strtabsize - len;
21774 + struct_top = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
21775 + if (fdt_totalsize(fdt) + offset < struct_top)
21776 + return 0; /* no more room :( */
21778 + memcpy(strtab + offset, s, len);
21779 + fdt_set_size_dt_strings(fdt, strtabsize + len);
21783 +int fdt_property(void *fdt, const char *name, const void *val, int len)
21785 + struct fdt_property *prop;
21786 + int err = check_header_sw(fdt);
21792 + nameoff = find_add_string(fdt, name);
21793 + if (nameoff == 0)
21794 + return -FDT_ERR_NOSPACE;
21796 + prop = grab_space(fdt, sizeof(*prop) + ALIGN(len, FDT_TAGSIZE));
21798 + return -FDT_ERR_NOSPACE;
21800 + prop->tag = cpu_to_fdt32(FDT_PROP);
21801 + prop->nameoff = cpu_to_fdt32(nameoff);
21802 + prop->len = cpu_to_fdt32(len);
21803 + memcpy(prop->data, val, len);
21807 +int fdt_finish(void *fdt)
21809 + int err = check_header_sw(fdt);
21810 + char *p = (char *)fdt;
21812 + int oldstroffset, newstroffset;
21814 + int offset, nextoffset;
21819 + /* Add terminator */
21820 + end = grab_space(fdt, sizeof(*end));
21822 + return -FDT_ERR_NOSPACE;
21823 + *end = cpu_to_fdt32(FDT_END);
21825 + /* Relocate the string table */
21826 + oldstroffset = fdt_totalsize(fdt) - fdt_size_dt_strings(fdt);
21827 + newstroffset = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
21828 + memmove(p + newstroffset, p + oldstroffset, fdt_size_dt_strings(fdt));
21829 + fdt_set_off_dt_strings(fdt, newstroffset);
21831 + /* Walk the structure, correcting string offsets */
21833 + while ((tag = fdt_next_tag(fdt, offset, &nextoffset)) != FDT_END) {
21834 + if (tag == FDT_PROP) {
21835 + struct fdt_property *prop =
21836 + fdt_offset_ptr_w(fdt, offset, sizeof(*prop));
21840 + return -FDT_ERR_BADSTRUCTURE;
21842 + nameoff = fdt32_to_cpu(prop->nameoff);
21843 + nameoff += fdt_size_dt_strings(fdt);
21844 + prop->nameoff = cpu_to_fdt32(nameoff);
21846 + offset = nextoffset;
21849 + /* Finally, adjust the header */
21850 + fdt_set_totalsize(fdt, newstroffset + fdt_size_dt_strings(fdt));
21851 + fdt_set_magic(fdt, FDT_MAGIC);
21854 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt/fdt_wip.c powerpc.git/arch/powerpc/boot/libfdt/fdt_wip.c
21855 --- linux-2.6.24/arch/powerpc/boot/libfdt/fdt_wip.c 1970-01-01 01:00:00.000000000 +0100
21856 +++ powerpc.git/arch/powerpc/boot/libfdt/fdt_wip.c 2008-01-28 20:25:49.000000000 +0100
21859 + * libfdt - Flat Device Tree manipulation
21860 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21862 + * libfdt is dual licensed: you can use it either under the terms of
21863 + * the GPL, or the BSD license, at your option.
21865 + * a) This library is free software; you can redistribute it and/or
21866 + * modify it under the terms of the GNU General Public License as
21867 + * published by the Free Software Foundation; either version 2 of the
21868 + * License, or (at your option) any later version.
21870 + * This library is distributed in the hope that it will be useful,
21871 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21872 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21873 + * GNU General Public License for more details.
21875 + * You should have received a copy of the GNU General Public
21876 + * License along with this library; if not, write to the Free
21877 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21878 + * MA 02110-1301 USA
21882 + * b) Redistribution and use in source and binary forms, with or
21883 + * without modification, are permitted provided that the following
21884 + * conditions are met:
21886 + * 1. Redistributions of source code must retain the above
21887 + * copyright notice, this list of conditions and the following
21889 + * 2. Redistributions in binary form must reproduce the above
21890 + * copyright notice, this list of conditions and the following
21891 + * disclaimer in the documentation and/or other materials
21892 + * provided with the distribution.
21894 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21895 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21896 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21897 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21898 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21899 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21900 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21901 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21902 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21903 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21904 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
21905 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
21906 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21908 +#include "libfdt_env.h"
21911 +#include <libfdt.h>
21913 +#include "libfdt_internal.h"
21915 +int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
21916 + const void *val, int len)
21921 + propval = fdt_getprop_w(fdt, nodeoffset, name, &proplen);
21925 + if (proplen != len)
21926 + return -FDT_ERR_NOSPACE;
21928 + memcpy(propval, val, len);
21932 +static void nop_region(void *start, int len)
21936 + for (p = start; (void *)p < (start + len); p++)
21937 + *p = cpu_to_fdt32(FDT_NOP);
21940 +int fdt_nop_property(void *fdt, int nodeoffset, const char *name)
21942 + struct fdt_property *prop;
21945 + prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
21949 + nop_region(prop, len + sizeof(*prop));
21954 +int _fdt_node_end_offset(void *fdt, int nodeoffset)
21958 + int offset, nextoffset;
21960 + tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
21961 + if (tag != FDT_BEGIN_NODE)
21962 + return -FDT_ERR_BADOFFSET;
21964 + offset = nextoffset;
21965 + tag = fdt_next_tag(fdt, offset, &nextoffset);
21971 + case FDT_BEGIN_NODE:
21975 + case FDT_END_NODE:
21984 + return -FDT_ERR_BADSTRUCTURE;
21986 + } while (level >= 0);
21988 + return nextoffset;
21991 +int fdt_nop_node(void *fdt, int nodeoffset)
21995 + endoffset = _fdt_node_end_offset(fdt, nodeoffset);
21996 + if (endoffset < 0)
21997 + return endoffset;
21999 + nop_region(fdt_offset_ptr_w(fdt, nodeoffset, 0), endoffset - nodeoffset);
22002 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt/libfdt.h powerpc.git/arch/powerpc/boot/libfdt/libfdt.h
22003 --- linux-2.6.24/arch/powerpc/boot/libfdt/libfdt.h 1970-01-01 01:00:00.000000000 +0100
22004 +++ powerpc.git/arch/powerpc/boot/libfdt/libfdt.h 2008-01-28 20:25:49.000000000 +0100
22009 + * libfdt - Flat Device Tree manipulation
22010 + * Copyright (C) 2006 David Gibson, IBM Corporation.
22012 + * libfdt is dual licensed: you can use it either under the terms of
22013 + * the GPL, or the BSD license, at your option.
22015 + * a) This library is free software; you can redistribute it and/or
22016 + * modify it under the terms of the GNU General Public License as
22017 + * published by the Free Software Foundation; either version 2 of the
22018 + * License, or (at your option) any later version.
22020 + * This library is distributed in the hope that it will be useful,
22021 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22022 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22023 + * GNU General Public License for more details.
22025 + * You should have received a copy of the GNU General Public
22026 + * License along with this library; if not, write to the Free
22027 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22028 + * MA 02110-1301 USA
22032 + * b) Redistribution and use in source and binary forms, with or
22033 + * without modification, are permitted provided that the following
22034 + * conditions are met:
22036 + * 1. Redistributions of source code must retain the above
22037 + * copyright notice, this list of conditions and the following
22039 + * 2. Redistributions in binary form must reproduce the above
22040 + * copyright notice, this list of conditions and the following
22041 + * disclaimer in the documentation and/or other materials
22042 + * provided with the distribution.
22044 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
22045 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
22046 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22047 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22048 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22049 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22050 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22051 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22052 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22053 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22054 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22055 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
22056 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22059 +#include <libfdt_env.h>
22062 +#define FDT_FIRST_SUPPORTED_VERSION 0x10
22063 +#define FDT_LAST_SUPPORTED_VERSION 0x11
22065 +/* Error codes: informative error codes */
22066 +#define FDT_ERR_NOTFOUND 1
22067 + /* FDT_ERR_NOTFOUND: The requested node or property does not exist */
22068 +#define FDT_ERR_EXISTS 2
22069 + /* FDT_ERR_EXISTS: Attemped to create a node or property which
22070 + * already exists */
22071 +#define FDT_ERR_NOSPACE 3
22072 + /* FDT_ERR_NOSPACE: Operation needed to expand the device
22073 + * tree, but its buffer did not have sufficient space to
22074 + * contain the expanded tree. Use fdt_open_into() to move the
22075 + * device tree to a buffer with more space. */
22077 +/* Error codes: codes for bad parameters */
22078 +#define FDT_ERR_BADOFFSET 4
22079 + /* FDT_ERR_BADOFFSET: Function was passed a structure block
22080 + * offset which is out-of-bounds, or which points to an
22081 + * unsuitable part of the structure for the operation. */
22082 +#define FDT_ERR_BADPATH 5
22083 + /* FDT_ERR_BADPATH: Function was passed a badly formatted path
22084 + * (e.g. missing a leading / for a function which requires an
22085 + * absolute path) */
22086 +#define FDT_ERR_BADPHANDLE 6
22087 + /* FDT_ERR_BADPHANDLE: Function was passed an invalid phandle
22088 + * value. phandle values of 0 and -1 are not permitted. */
22089 +#define FDT_ERR_BADSTATE 7
22090 + /* FDT_ERR_BADSTATE: Function was passed an incomplete device
22091 + * tree created by the sequential-write functions, which is
22092 + * not sufficiently complete for the requested operation. */
22094 +/* Error codes: codes for bad device tree blobs */
22095 +#define FDT_ERR_TRUNCATED 8
22096 + /* FDT_ERR_TRUNCATED: Structure block of the given device tree
22097 + * ends without an FDT_END tag. */
22098 +#define FDT_ERR_BADMAGIC 9
22099 + /* FDT_ERR_BADMAGIC: Given "device tree" appears not to be a
22100 + * device tree at all - it is missing the flattened device
22101 + * tree magic number. */
22102 +#define FDT_ERR_BADVERSION 10
22103 + /* FDT_ERR_BADVERSION: Given device tree has a version which
22104 + * can't be handled by the requested operation. For
22105 + * read-write functions, this may mean that fdt_open_into() is
22106 + * required to convert the tree to the expected version. */
22107 +#define FDT_ERR_BADSTRUCTURE 11
22108 + /* FDT_ERR_BADSTRUCTURE: Given device tree has a corrupt
22109 + * structure block or other serious error (e.g. misnested
22110 + * nodes, or subnodes preceding properties). */
22111 +#define FDT_ERR_BADLAYOUT 12
22112 + /* FDT_ERR_BADLAYOUT: For read-write functions, the given
22113 + * device tree has it's sub-blocks in an order that the
22114 + * function can't handle (memory reserve map, then structure,
22115 + * then strings). Use fdt_open_into() to reorganize the tree
22116 + * into a form suitable for the read-write operations. */
22118 +/* "Can't happen" error indicating a bug in libfdt */
22119 +#define FDT_ERR_INTERNAL 13
22120 + /* FDT_ERR_INTERNAL: libfdt has failed an internal assertion.
22121 + * Should never be returned, if it is, it indicates a bug in
22122 + * libfdt itself. */
22124 +#define FDT_ERR_MAX 13
22126 +/**********************************************************************/
22127 +/* Low-level functions (you probably don't need these) */
22128 +/**********************************************************************/
22130 +const void *fdt_offset_ptr(const void *fdt, int offset, int checklen);
22131 +static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
22133 + return (void *)fdt_offset_ptr(fdt, offset, checklen);
22136 +uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset);
22138 +/**********************************************************************/
22139 +/* General functions */
22140 +/**********************************************************************/
22142 +#define fdt_get_header(fdt, field) \
22143 + (fdt32_to_cpu(((const struct fdt_header *)(fdt))->field))
22144 +#define fdt_magic(fdt) (fdt_get_header(fdt, magic))
22145 +#define fdt_totalsize(fdt) (fdt_get_header(fdt, totalsize))
22146 +#define fdt_off_dt_struct(fdt) (fdt_get_header(fdt, off_dt_struct))
22147 +#define fdt_off_dt_strings(fdt) (fdt_get_header(fdt, off_dt_strings))
22148 +#define fdt_off_mem_rsvmap(fdt) (fdt_get_header(fdt, off_mem_rsvmap))
22149 +#define fdt_version(fdt) (fdt_get_header(fdt, version))
22150 +#define fdt_last_comp_version(fdt) (fdt_get_header(fdt, last_comp_version))
22151 +#define fdt_boot_cpuid_phys(fdt) (fdt_get_header(fdt, boot_cpuid_phys))
22152 +#define fdt_size_dt_strings(fdt) (fdt_get_header(fdt, size_dt_strings))
22153 +#define fdt_size_dt_struct(fdt) (fdt_get_header(fdt, size_dt_struct))
22155 +#define __fdt_set_hdr(name) \
22156 + static inline void fdt_set_##name(void *fdt, uint32_t val) \
22158 + struct fdt_header *fdth = fdt; \
22159 + fdth->name = cpu_to_fdt32(val); \
22161 +__fdt_set_hdr(magic);
22162 +__fdt_set_hdr(totalsize);
22163 +__fdt_set_hdr(off_dt_struct);
22164 +__fdt_set_hdr(off_dt_strings);
22165 +__fdt_set_hdr(off_mem_rsvmap);
22166 +__fdt_set_hdr(version);
22167 +__fdt_set_hdr(last_comp_version);
22168 +__fdt_set_hdr(boot_cpuid_phys);
22169 +__fdt_set_hdr(size_dt_strings);
22170 +__fdt_set_hdr(size_dt_struct);
22171 +#undef __fdt_set_hdr
22174 + * fdt_check_header - sanity check a device tree or possible device tree
22175 + * @fdt: pointer to data which might be a flattened device tree
22177 + * fdt_check_header() checks that the given buffer contains what
22178 + * appears to be a flattened device tree with sane information in its
22182 + * 0, if the buffer appears to contain a valid device tree
22183 + * -FDT_ERR_BADMAGIC,
22184 + * -FDT_ERR_BADVERSION,
22185 + * -FDT_ERR_BADSTATE, standard meanings, as above
22187 +int fdt_check_header(const void *fdt);
22190 + * fdt_move - move a device tree around in memory
22191 + * @fdt: pointer to the device tree to move
22192 + * @buf: pointer to memory where the device is to be moved
22193 + * @bufsize: size of the memory space at buf
22195 + * fdt_move() relocates, if possible, the device tree blob located at
22196 + * fdt to the buffer at buf of size bufsize. The buffer may overlap
22197 + * with the existing device tree blob at fdt. Therefore,
22198 + * fdt_move(fdt, fdt, fdt_totalsize(fdt))
22199 + * should always succeed.
22203 + * -FDT_ERR_NOSPACE, bufsize is insufficient to contain the device tree
22204 + * -FDT_ERR_BADMAGIC,
22205 + * -FDT_ERR_BADVERSION,
22206 + * -FDT_ERR_BADSTATE, standard meanings
22208 +int fdt_move(const void *fdt, void *buf, int bufsize);
22210 +/**********************************************************************/
22211 +/* Read-only functions */
22212 +/**********************************************************************/
22215 + * fdt_string - retreive a string from the strings block of a device tree
22216 + * @fdt: pointer to the device tree blob
22217 + * @stroffset: offset of the string within the strings block (native endian)
22219 + * fdt_string() retrieves a pointer to a single string from the
22220 + * strings block of the device tree blob at fdt.
22223 + * a pointer to the string, on success
22224 + * NULL, if stroffset is out of bounds
22226 +const char *fdt_string(const void *fdt, int stroffset);
22229 + * fdt_num_mem_rsv - retreive the number of memory reserve map entries
22230 + * @fdt: pointer to the device tree blob
22232 + * Returns the number of entries in the device tree blob's memory
22233 + * reservation map. This does not include the terminating 0,0 entry
22234 + * or any other (0,0) entries reserved for expansion.
22237 + * the number of entries
22239 +int fdt_num_mem_rsv(const void *fdt);
22242 + * fdt_get_mem_rsv - retreive one memory reserve map entry
22243 + * @fdt: pointer to the device tree blob
22244 + * @address, @size: pointers to 64-bit variables
22246 + * On success, *address and *size will contain the address and size of
22247 + * the n-th reserve map entry from the device tree blob, in
22248 + * native-endian format.
22252 + * -FDT_ERR_BADMAGIC,
22253 + * -FDT_ERR_BADVERSION,
22254 + * -FDT_ERR_BADSTATE, standard meanings
22256 +int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size);
22259 + * fdt_subnode_offset_namelen - find a subnode based on substring
22260 + * @fdt: pointer to the device tree blob
22261 + * @parentoffset: structure block offset of a node
22262 + * @name: name of the subnode to locate
22263 + * @namelen: number of characters of name to consider
22265 + * Identical to fdt_subnode_offset(), but only examine the first
22266 + * namelen characters of name for matching the subnode name. This is
22267 + * useful for finding subnodes based on a portion of a larger string,
22268 + * such as a full path.
22270 +int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
22271 + const char *name, int namelen);
22273 + * fdt_subnode_offset - find a subnode of a given node
22274 + * @fdt: pointer to the device tree blob
22275 + * @parentoffset: structure block offset of a node
22276 + * @name: name of the subnode to locate
22278 + * fdt_subnode_offset() finds a subnode of the node at structure block
22279 + * offset parentoffset with the given name. name may include a unit
22280 + * address, in which case fdt_subnode_offset() will find the subnode
22281 + * with that unit address, or the unit address may be omitted, in
22282 + * which case fdt_subnode_offset() will find an arbitrary subnode
22283 + * whose name excluding unit address matches the given name.
22286 + * structure block offset of the requested subnode (>=0), on success
22287 + * -FDT_ERR_NOTFOUND, if the requested subnode does not exist
22288 + * -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE tag
22289 + * -FDT_ERR_BADMAGIC,
22290 + * -FDT_ERR_BADVERSION,
22291 + * -FDT_ERR_BADSTATE,
22292 + * -FDT_ERR_BADSTRUCTURE,
22293 + * -FDT_ERR_TRUNCATED, standard meanings.
22295 +int fdt_subnode_offset(const void *fdt, int parentoffset, const char *name);
22298 + * fdt_path_offset - find a tree node by its full path
22299 + * @fdt: pointer to the device tree blob
22300 + * @path: full path of the node to locate
22302 + * fdt_path_offset() finds a node of a given path in the device tree.
22303 + * Each path component may omit the unit address portion, but the
22304 + * results of this are undefined if any such path component is
22305 + * ambiguous (that is if there are multiple nodes at the relevant
22306 + * level matching the given component, differentiated only by unit
22310 + * structure block offset of the node with the requested path (>=0), on success
22311 + * -FDT_ERR_BADPATH, given path does not begin with '/' or is invalid
22312 + * -FDT_ERR_NOTFOUND, if the requested node does not exist
22313 + * -FDT_ERR_BADMAGIC,
22314 + * -FDT_ERR_BADVERSION,
22315 + * -FDT_ERR_BADSTATE,
22316 + * -FDT_ERR_BADSTRUCTURE,
22317 + * -FDT_ERR_TRUNCATED, standard meanings.
22319 +int fdt_path_offset(const void *fdt, const char *path);
22322 + * fdt_get_name - retreive the name of a given node
22323 + * @fdt: pointer to the device tree blob
22324 + * @nodeoffset: structure block offset of the starting node
22325 + * @lenp: pointer to an integer variable (will be overwritten) or NULL
22327 + * fdt_get_name() retrieves the name (including unit address) of the
22328 + * device tree node at structure block offset nodeoffset. If lenp is
22329 + * non-NULL, the length of this name is also returned, in the integer
22330 + * pointed to by lenp.
22333 + * pointer to the node's name, on success
22334 + * If lenp is non-NULL, *lenp contains the length of that name (>=0)
22336 + * if lenp is non-NULL *lenp contains an error code (<0):
22337 + * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
22338 + * -FDT_ERR_BADMAGIC,
22339 + * -FDT_ERR_BADVERSION,
22340 + * -FDT_ERR_BADSTATE, standard meanings
22342 +const char *fdt_get_name(const void *fdt, int nodeoffset, int *lenp);
22345 + * fdt_get_property - find a given property in a given node
22346 + * @fdt: pointer to the device tree blob
22347 + * @nodeoffset: offset of the node whose property to find
22348 + * @name: name of the property to find
22349 + * @lenp: pointer to an integer variable (will be overwritten) or NULL
22351 + * fdt_get_property() retrieves a pointer to the fdt_property
22352 + * structure within the device tree blob corresponding to the property
22353 + * named 'name' of the node at offset nodeoffset. If lenp is
22354 + * non-NULL, the length of the property value also returned, in the
22355 + * integer pointed to by lenp.
22358 + * pointer to the structure representing the property
22359 + * if lenp is non-NULL, *lenp contains the length of the property
22362 + * if lenp is non-NULL, *lenp contains an error code (<0):
22363 + * -FDT_ERR_NOTFOUND, node does not have named property
22364 + * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
22365 + * -FDT_ERR_BADMAGIC,
22366 + * -FDT_ERR_BADVERSION,
22367 + * -FDT_ERR_BADSTATE,
22368 + * -FDT_ERR_BADSTRUCTURE,
22369 + * -FDT_ERR_TRUNCATED, standard meanings
22371 +const struct fdt_property *fdt_get_property(const void *fdt, int nodeoffset,
22372 + const char *name, int *lenp);
22373 +static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset,
22374 + const char *name,
22377 + return (struct fdt_property *)fdt_get_property(fdt, nodeoffset,
22382 + * fdt_getprop - retrieve the value of a given property
22383 + * @fdt: pointer to the device tree blob
22384 + * @nodeoffset: offset of the node whose property to find
22385 + * @name: name of the property to find
22386 + * @lenp: pointer to an integer variable (will be overwritten) or NULL
22388 + * fdt_getprop() retrieves a pointer to the value of the property
22389 + * named 'name' of the node at offset nodeoffset (this will be a
22390 + * pointer to within the device blob itself, not a copy of the value).
22391 + * If lenp is non-NULL, the length of the property value also
22392 + * returned, in the integer pointed to by lenp.
22395 + * pointer to the property's value
22396 + * if lenp is non-NULL, *lenp contains the length of the property
22399 + * if lenp is non-NULL, *lenp contains an error code (<0):
22400 + * -FDT_ERR_NOTFOUND, node does not have named property
22401 + * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
22402 + * -FDT_ERR_BADMAGIC,
22403 + * -FDT_ERR_BADVERSION,
22404 + * -FDT_ERR_BADSTATE,
22405 + * -FDT_ERR_BADSTRUCTURE,
22406 + * -FDT_ERR_TRUNCATED, standard meanings
22408 +const void *fdt_getprop(const void *fdt, int nodeoffset,
22409 + const char *name, int *lenp);
22410 +static inline void *fdt_getprop_w(void *fdt, int nodeoffset,
22411 + const char *name, int *lenp)
22413 + return (void *)fdt_getprop(fdt, nodeoffset, name, lenp);
22417 + * fdt_get_phandle - retreive the phandle of a given node
22418 + * @fdt: pointer to the device tree blob
22419 + * @nodeoffset: structure block offset of the node
22421 + * fdt_get_phandle() retrieves the phandle of the device tree node at
22422 + * structure block offset nodeoffset.
22425 + * the phandle of the node at nodeoffset, on succes (!= 0, != -1)
22426 + * 0, if the node has no phandle, or another error occurs
22428 +uint32_t fdt_get_phandle(const void *fdt, int nodeoffset);
22431 + * fdt_get_path - determine the full path of a node
22432 + * @fdt: pointer to the device tree blob
22433 + * @nodeoffset: offset of the node whose path to find
22434 + * @buf: character buffer to contain the returned path (will be overwritten)
22435 + * @buflen: size of the character buffer at buf
22437 + * fdt_get_path() computes the full path of the node at offset
22438 + * nodeoffset, and records that path in the buffer at buf.
22440 + * NOTE: This function is expensive, as it must scan the device tree
22441 + * structure from the start to nodeoffset.
22445 + * buf contains the absolute path of the node at
22446 + * nodeoffset, as a NUL-terminated string.
22447 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22448 + * -FDT_ERR_NOSPACE, the path of the given node is longer than (bufsize-1)
22449 + * characters and will not fit in the given buffer.
22450 + * -FDT_ERR_BADMAGIC,
22451 + * -FDT_ERR_BADVERSION,
22452 + * -FDT_ERR_BADSTATE,
22453 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22455 +int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen);
22458 + * fdt_supernode_atdepth_offset - find a specific ancestor of a node
22459 + * @fdt: pointer to the device tree blob
22460 + * @nodeoffset: offset of the node whose parent to find
22461 + * @supernodedepth: depth of the ancestor to find
22462 + * @nodedepth: pointer to an integer variable (will be overwritten) or NULL
22464 + * fdt_supernode_atdepth_offset() finds an ancestor of the given node
22465 + * at a specific depth from the root (where the root itself has depth
22466 + * 0, its immediate subnodes depth 1 and so forth). So
22467 + * fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, NULL);
22468 + * will always return 0, the offset of the root node. If the node at
22469 + * nodeoffset has depth D, then:
22470 + * fdt_supernode_atdepth_offset(fdt, nodeoffset, D, NULL);
22471 + * will return nodeoffset itself.
22473 + * NOTE: This function is expensive, as it must scan the device tree
22474 + * structure from the start to nodeoffset.
22478 + * structure block offset of the node at node offset's ancestor
22479 + * of depth supernodedepth (>=0), on success
22480 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22481 +* -FDT_ERR_NOTFOUND, supernodedepth was greater than the depth of nodeoffset
22482 + * -FDT_ERR_BADMAGIC,
22483 + * -FDT_ERR_BADVERSION,
22484 + * -FDT_ERR_BADSTATE,
22485 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22487 +int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
22488 + int supernodedepth, int *nodedepth);
22491 + * fdt_node_depth - find the depth of a given node
22492 + * @fdt: pointer to the device tree blob
22493 + * @nodeoffset: offset of the node whose parent to find
22495 + * fdt_node_depth() finds the depth of a given node. The root node
22496 + * has depth 0, its immediate subnodes depth 1 and so forth.
22498 + * NOTE: This function is expensive, as it must scan the device tree
22499 + * structure from the start to nodeoffset.
22502 + * depth of the node at nodeoffset (>=0), on success
22503 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22504 + * -FDT_ERR_BADMAGIC,
22505 + * -FDT_ERR_BADVERSION,
22506 + * -FDT_ERR_BADSTATE,
22507 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22509 +int fdt_node_depth(const void *fdt, int nodeoffset);
22512 + * fdt_parent_offset - find the parent of a given node
22513 + * @fdt: pointer to the device tree blob
22514 + * @nodeoffset: offset of the node whose parent to find
22516 + * fdt_parent_offset() locates the parent node of a given node (that
22517 + * is, it finds the offset of the node which contains the node at
22518 + * nodeoffset as a subnode).
22520 + * NOTE: This function is expensive, as it must scan the device tree
22521 + * structure from the start to nodeoffset, *twice*.
22524 + * stucture block offset of the parent of the node at nodeoffset
22525 + * (>=0), on success
22526 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22527 + * -FDT_ERR_BADMAGIC,
22528 + * -FDT_ERR_BADVERSION,
22529 + * -FDT_ERR_BADSTATE,
22530 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22532 +int fdt_parent_offset(const void *fdt, int nodeoffset);
22535 + * fdt_node_offset_by_prop_value - find nodes with a given property value
22536 + * @fdt: pointer to the device tree blob
22537 + * @startoffset: only find nodes after this offset
22538 + * @propname: property name to check
22539 + * @propval: property value to search for
22540 + * @proplen: length of the value in propval
22542 + * fdt_node_offset_by_prop_value() returns the offset of the first
22543 + * node after startoffset, which has a property named propname whose
22544 + * value is of length proplen and has value equal to propval; or if
22545 + * startoffset is -1, the very first such node in the tree.
22547 + * To iterate through all nodes matching the criterion, the following
22548 + * idiom can be used:
22549 + * offset = fdt_node_offset_by_prop_value(fdt, -1, propname,
22550 + * propval, proplen);
22551 + * while (offset != -FDT_ERR_NOTFOUND) {
22552 + * // other code here
22553 + * offset = fdt_node_offset_by_prop_value(fdt, offset, propname,
22554 + * propval, proplen);
22557 + * Note the -1 in the first call to the function, if 0 is used here
22558 + * instead, the function will never locate the root node, even if it
22559 + * matches the criterion.
22562 + * structure block offset of the located node (>= 0, >startoffset),
22564 + * -FDT_ERR_NOTFOUND, no node matching the criterion exists in the
22565 + * tree after startoffset
22566 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22567 + * -FDT_ERR_BADMAGIC,
22568 + * -FDT_ERR_BADVERSION,
22569 + * -FDT_ERR_BADSTATE,
22570 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22572 +int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
22573 + const char *propname,
22574 + const void *propval, int proplen);
22577 + * fdt_node_offset_by_phandle - find the node with a given phandle
22578 + * @fdt: pointer to the device tree blob
22579 + * @phandle: phandle value
22581 + * fdt_node_offset_by_prop_value() returns the offset of the node
22582 + * which has the given phandle value. If there is more than one node
22583 + * in the tree with the given phandle (an invalid tree), results are
22587 + * structure block offset of the located node (>= 0), on success
22588 + * -FDT_ERR_NOTFOUND, no node with that phandle exists
22589 + * -FDT_ERR_BADPHANDLE, given phandle value was invalid (0 or -1)
22590 + * -FDT_ERR_BADMAGIC,
22591 + * -FDT_ERR_BADVERSION,
22592 + * -FDT_ERR_BADSTATE,
22593 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22595 +int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle);
22598 + * fdt_node_check_compatible: check a node's compatible property
22599 + * @fdt: pointer to the device tree blob
22600 + * @nodeoffset: offset of a tree node
22601 + * @compatible: string to match against
22604 + * fdt_node_check_compatible() returns 0 if the given node contains a
22605 + * 'compatible' property with the given string as one of its elements,
22606 + * it returns non-zero otherwise, or on error.
22609 + * 0, if the node has a 'compatible' property listing the given string
22610 + * 1, if the node has a 'compatible' property, but it does not list
22611 + * the given string
22612 + * -FDT_ERR_NOTFOUND, if the given node has no 'compatible' property
22613 + * -FDT_ERR_BADOFFSET, if nodeoffset does not refer to a BEGIN_NODE tag
22614 + * -FDT_ERR_BADMAGIC,
22615 + * -FDT_ERR_BADVERSION,
22616 + * -FDT_ERR_BADSTATE,
22617 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22619 +int fdt_node_check_compatible(const void *fdt, int nodeoffset,
22620 + const char *compatible);
22623 + * fdt_node_offset_by_compatible - find nodes with a given 'compatible' value
22624 + * @fdt: pointer to the device tree blob
22625 + * @startoffset: only find nodes after this offset
22626 + * @compatible: 'compatible' string to match against
22628 + * fdt_node_offset_by_compatible() returns the offset of the first
22629 + * node after startoffset, which has a 'compatible' property which
22630 + * lists the given compatible string; or if startoffset is -1, the
22631 + * very first such node in the tree.
22633 + * To iterate through all nodes matching the criterion, the following
22634 + * idiom can be used:
22635 + * offset = fdt_node_offset_by_compatible(fdt, -1, compatible);
22636 + * while (offset != -FDT_ERR_NOTFOUND) {
22637 + * // other code here
22638 + * offset = fdt_node_offset_by_compatible(fdt, offset, compatible);
22641 + * Note the -1 in the first call to the function, if 0 is used here
22642 + * instead, the function will never locate the root node, even if it
22643 + * matches the criterion.
22646 + * structure block offset of the located node (>= 0, >startoffset),
22648 + * -FDT_ERR_NOTFOUND, no node matching the criterion exists in the
22649 + * tree after startoffset
22650 + * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
22651 + * -FDT_ERR_BADMAGIC,
22652 + * -FDT_ERR_BADVERSION,
22653 + * -FDT_ERR_BADSTATE,
22654 + * -FDT_ERR_BADSTRUCTURE, standard meanings
22656 +int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
22657 + const char *compatible);
22659 +/**********************************************************************/
22660 +/* Write-in-place functions */
22661 +/**********************************************************************/
22663 +int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
22664 + const void *val, int len);
22665 +static inline int fdt_setprop_inplace_cell(void *fdt, int nodeoffset,
22666 + const char *name, uint32_t val)
22668 + val = cpu_to_fdt32(val);
22669 + return fdt_setprop_inplace(fdt, nodeoffset, name, &val, sizeof(val));
22672 +int fdt_nop_property(void *fdt, int nodeoffset, const char *name);
22673 +int fdt_nop_node(void *fdt, int nodeoffset);
22675 +/**********************************************************************/
22676 +/* Sequential write functions */
22677 +/**********************************************************************/
22679 +int fdt_create(void *buf, int bufsize);
22680 +int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size);
22681 +int fdt_finish_reservemap(void *fdt);
22682 +int fdt_begin_node(void *fdt, const char *name);
22683 +int fdt_property(void *fdt, const char *name, const void *val, int len);
22684 +static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
22686 + val = cpu_to_fdt32(val);
22687 + return fdt_property(fdt, name, &val, sizeof(val));
22689 +#define fdt_property_string(fdt, name, str) \
22690 + fdt_property(fdt, name, str, strlen(str)+1)
22691 +int fdt_end_node(void *fdt);
22692 +int fdt_finish(void *fdt);
22694 +/**********************************************************************/
22695 +/* Read-write functions */
22696 +/**********************************************************************/
22698 +int fdt_open_into(const void *fdt, void *buf, int bufsize);
22699 +int fdt_pack(void *fdt);
22701 +int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size);
22702 +int fdt_del_mem_rsv(void *fdt, int n);
22704 +int fdt_setprop(void *fdt, int nodeoffset, const char *name,
22705 + const void *val, int len);
22706 +static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
22709 + val = cpu_to_fdt32(val);
22710 + return fdt_setprop(fdt, nodeoffset, name, &val, sizeof(val));
22712 +#define fdt_setprop_string(fdt, nodeoffset, name, str) \
22713 + fdt_setprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)
22714 +int fdt_delprop(void *fdt, int nodeoffset, const char *name);
22715 +int fdt_add_subnode_namelen(void *fdt, int parentoffset,
22716 + const char *name, int namelen);
22717 +int fdt_add_subnode(void *fdt, int parentoffset, const char *name);
22718 +int fdt_del_node(void *fdt, int nodeoffset);
22720 +/**********************************************************************/
22721 +/* Debugging / informational functions */
22722 +/**********************************************************************/
22724 +const char *fdt_strerror(int errval);
22726 +#endif /* _LIBFDT_H */
22727 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt/libfdt_internal.h powerpc.git/arch/powerpc/boot/libfdt/libfdt_internal.h
22728 --- linux-2.6.24/arch/powerpc/boot/libfdt/libfdt_internal.h 1970-01-01 01:00:00.000000000 +0100
22729 +++ powerpc.git/arch/powerpc/boot/libfdt/libfdt_internal.h 2008-01-28 20:25:49.000000000 +0100
22731 +#ifndef _LIBFDT_INTERNAL_H
22732 +#define _LIBFDT_INTERNAL_H
22734 + * libfdt - Flat Device Tree manipulation
22735 + * Copyright (C) 2006 David Gibson, IBM Corporation.
22737 + * libfdt is dual licensed: you can use it either under the terms of
22738 + * the GPL, or the BSD license, at your option.
22740 + * a) This library is free software; you can redistribute it and/or
22741 + * modify it under the terms of the GNU General Public License as
22742 + * published by the Free Software Foundation; either version 2 of the
22743 + * License, or (at your option) any later version.
22745 + * This library is distributed in the hope that it will be useful,
22746 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22747 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22748 + * GNU General Public License for more details.
22750 + * You should have received a copy of the GNU General Public
22751 + * License along with this library; if not, write to the Free
22752 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22753 + * MA 02110-1301 USA
22757 + * b) Redistribution and use in source and binary forms, with or
22758 + * without modification, are permitted provided that the following
22759 + * conditions are met:
22761 + * 1. Redistributions of source code must retain the above
22762 + * copyright notice, this list of conditions and the following
22764 + * 2. Redistributions in binary form must reproduce the above
22765 + * copyright notice, this list of conditions and the following
22766 + * disclaimer in the documentation and/or other materials
22767 + * provided with the distribution.
22769 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
22770 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
22771 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22772 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22773 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22774 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22775 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22776 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22777 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22778 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22779 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22780 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
22781 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22785 +#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
22786 +#define PALIGN(p, a) ((void *)ALIGN((unsigned long)(p), (a)))
22788 +#define memeq(p, q, n) (memcmp((p), (q), (n)) == 0)
22789 +#define streq(p, q) (strcmp((p), (q)) == 0)
22791 +uint32_t _fdt_next_tag(const void *fdt, int startoffset, int *nextoffset);
22792 +const char *_fdt_find_string(const char *strtab, int tabsize, const char *s);
22793 +int _fdt_node_end_offset(void *fdt, int nodeoffset);
22795 +static inline const void *_fdt_offset_ptr(const void *fdt, int offset)
22797 + return fdt + fdt_off_dt_struct(fdt) + offset;
22800 +static inline void *_fdt_offset_ptr_w(void *fdt, int offset)
22802 + return (void *)_fdt_offset_ptr(fdt, offset);
22805 +static inline const struct fdt_reserve_entry *_fdt_mem_rsv(const void *fdt, int n)
22807 + const struct fdt_reserve_entry *rsv_table =
22808 + fdt + fdt_off_mem_rsvmap(fdt);
22810 + return rsv_table + n;
22812 +static inline struct fdt_reserve_entry *_fdt_mem_rsv_w(void *fdt, int n)
22814 + return (void *)_fdt_mem_rsv(fdt, n);
22817 +#define SW_MAGIC (~FDT_MAGIC)
22819 +#endif /* _LIBFDT_INTERNAL_H */
22820 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt-wrapper.c powerpc.git/arch/powerpc/boot/libfdt-wrapper.c
22821 --- linux-2.6.24/arch/powerpc/boot/libfdt-wrapper.c 1970-01-01 01:00:00.000000000 +0100
22822 +++ powerpc.git/arch/powerpc/boot/libfdt-wrapper.c 2008-01-28 20:25:49.000000000 +0100
22825 + * This file does the necessary interface mapping between the bootwrapper
22826 + * device tree operations and the interface provided by shared source
22827 + * files flatdevicetree.[ch].
22829 + * Copyright 2007 David Gibson, IBM Corporation.
22831 + * This library is free software; you can redistribute it and/or
22832 + * modify it under the terms of the GNU General Public License as
22833 + * published by the Free Software Foundation; either version 2 of the
22834 + * License, or (at your option) any later version.
22836 + * This library is distributed in the hope that it will be useful, but
22837 + * WITHOUT ANY WARRANTY; without even the implied warranty of
22838 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22839 + * General Public License for more details.
22841 + * You should have received a copy of the GNU General Public License
22842 + * along with this library; if not, write to the Free Software
22843 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22847 +#include <stddef.h>
22848 +#include <stdio.h>
22850 +#include <libfdt.h>
22854 +#define BAD_ERROR(err) (((err) < 0) \
22855 + && ((err) != -FDT_ERR_NOTFOUND) \
22856 + && ((err) != -FDT_ERR_EXISTS))
22858 +#define check_err(err) \
22860 + if (BAD_ERROR(err) || ((err < 0) && DEBUG)) \
22861 + printf("%s():%d %s\n\r", __FUNCTION__, __LINE__, \
22862 + fdt_strerror(err)); \
22863 + if (BAD_ERROR(err)) \
22865 + (err < 0) ? -1 : 0; \
22868 +#define offset_devp(off) \
22870 + int _offset = (off); \
22871 + check_err(_offset) ? NULL : (void *)(_offset+1); \
22874 +#define devp_offset_find(devp) (((int)(devp))-1)
22875 +#define devp_offset(devp) (devp ? ((int)(devp))-1 : 0)
22878 +static void *buf; /* = NULL */
22880 +#define EXPAND_GRANULARITY 1024
22882 +static void expand_buf(int minexpand)
22884 + int size = fdt_totalsize(fdt);
22887 + size = _ALIGN(size + minexpand, EXPAND_GRANULARITY);
22888 + buf = platform_ops.realloc(buf, size);
22890 + fatal("Couldn't find %d bytes to expand device tree\n\r", size);
22891 + rc = fdt_open_into(fdt, buf, size);
22893 + fatal("Couldn't expand fdt into new buffer: %s\n\r",
22894 + fdt_strerror(rc));
22899 +static void *fdt_wrapper_finddevice(const char *path)
22901 + return offset_devp(fdt_path_offset(fdt, path));
22904 +static int fdt_wrapper_getprop(const void *devp, const char *name,
22905 + void *buf, const int buflen)
22910 + p = fdt_getprop(fdt, devp_offset(devp), name, &len);
22912 + return check_err(len);
22913 + memcpy(buf, p, min(len, buflen));
22917 +static int fdt_wrapper_setprop(const void *devp, const char *name,
22918 + const void *buf, const int len)
22922 + rc = fdt_setprop(fdt, devp_offset(devp), name, buf, len);
22923 + if (rc == -FDT_ERR_NOSPACE) {
22924 + expand_buf(len + 16);
22925 + rc = fdt_setprop(fdt, devp_offset(devp), name, buf, len);
22928 + return check_err(rc);
22931 +static void *fdt_wrapper_get_parent(const void *devp)
22933 + return offset_devp(fdt_parent_offset(fdt, devp_offset(devp)));
22936 +static void *fdt_wrapper_create_node(const void *devp, const char *name)
22940 + offset = fdt_add_subnode(fdt, devp_offset(devp), name);
22941 + if (offset == -FDT_ERR_NOSPACE) {
22942 + expand_buf(strlen(name) + 16);
22943 + offset = fdt_add_subnode(fdt, devp_offset(devp), name);
22946 + return offset_devp(offset);
22949 +static void *fdt_wrapper_find_node_by_prop_value(const void *prev,
22950 + const char *name,
22954 + int offset = fdt_node_offset_by_prop_value(fdt, devp_offset_find(prev),
22956 + return offset_devp(offset);
22959 +static char *fdt_wrapper_get_path(const void *devp, char *buf, int len)
22963 + rc = fdt_get_path(fdt, devp_offset(devp), buf, len);
22964 + if (check_err(rc))
22969 +static unsigned long fdt_wrapper_finalize(void)
22973 + rc = fdt_pack(fdt);
22975 + fatal("Couldn't pack flat tree: %s\n\r",
22976 + fdt_strerror(rc));
22977 + return (unsigned long)fdt;
22980 +void fdt_init(void *blob)
22984 + dt_ops.finddevice = fdt_wrapper_finddevice;
22985 + dt_ops.getprop = fdt_wrapper_getprop;
22986 + dt_ops.setprop = fdt_wrapper_setprop;
22987 + dt_ops.get_parent = fdt_wrapper_get_parent;
22988 + dt_ops.create_node = fdt_wrapper_create_node;
22989 + dt_ops.find_node_by_prop_value = fdt_wrapper_find_node_by_prop_value;
22990 + dt_ops.get_path = fdt_wrapper_get_path;
22991 + dt_ops.finalize = fdt_wrapper_finalize;
22993 + /* Make sure the dt blob is the right version and so forth */
22995 + err = fdt_open_into(fdt, fdt, fdt_totalsize(blob));
22996 + if (err == -FDT_ERR_NOSPACE) {
22997 + int bufsize = fdt_totalsize(fdt) + 4;
22998 + buf = malloc(bufsize);
22999 + err = fdt_open_into(fdt, buf, bufsize);
23003 + fatal("fdt_init(): %s\n\r", fdt_strerror(err));
23008 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/libfdt_env.h powerpc.git/arch/powerpc/boot/libfdt_env.h
23009 --- linux-2.6.24/arch/powerpc/boot/libfdt_env.h 1970-01-01 01:00:00.000000000 +0100
23010 +++ powerpc.git/arch/powerpc/boot/libfdt_env.h 2008-01-28 20:25:49.000000000 +0100
23012 +#ifndef _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
23013 +#define _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
23015 +#include <types.h>
23016 +#include <string.h>
23018 +typedef u32 uint32_t;
23019 +typedef u64 uint64_t;
23021 +#define fdt16_to_cpu(x) (x)
23022 +#define cpu_to_fdt16(x) (x)
23023 +#define fdt32_to_cpu(x) (x)
23024 +#define cpu_to_fdt32(x) (x)
23025 +#define fdt64_to_cpu(x) (x)
23026 +#define cpu_to_fdt64(x) (x)
23028 +#endif /* _ARCH_POWERPC_BOOT_LIBFDT_ENV_H */
23029 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/main.c powerpc.git/arch/powerpc/boot/main.c
23030 --- linux-2.6.24/arch/powerpc/boot/main.c 2008-01-24 23:58:37.000000000 +0100
23031 +++ powerpc.git/arch/powerpc/boot/main.c 2008-01-28 20:25:49.000000000 +0100
23035 #include "gunzip_util.h"
23036 -#include "flatdevtree.h"
23039 static struct gunzip_state gzstate;
23040 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/ops.h powerpc.git/arch/powerpc/boot/ops.h
23041 --- linux-2.6.24/arch/powerpc/boot/ops.h 2008-01-24 23:58:37.000000000 +0100
23042 +++ powerpc.git/arch/powerpc/boot/ops.h 2008-01-28 20:25:49.000000000 +0100
23044 extern struct loader_info loader_info;
23047 -int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device);
23048 +void fdt_init(void *blob);
23049 int serial_console_init(void);
23050 int ns16550_console_init(void *devp, struct serial_console_data *scdp);
23051 int mpsc_console_init(void *devp, struct serial_console_data *scdp);
23052 @@ -159,9 +159,23 @@
23053 return find_node_by_prop_value_str(prev, "device_type", type);
23056 +static inline void *find_node_by_alias(const char *alias)
23058 + void *devp = finddevice("/aliases");
23061 + char path[MAX_PATH_LEN];
23062 + if (getprop(devp, alias, path, MAX_PATH_LEN) > 0)
23063 + return finddevice(path);
23069 void dt_fixup_memory(u64 start, u64 size);
23070 void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq);
23071 void dt_fixup_clock(const char *path, u32 freq);
23072 +void dt_fixup_mac_address_by_alias(const char *alias, const u8 *addr);
23073 void dt_fixup_mac_address(u32 index, const u8 *addr);
23074 void __dt_fixup_mac_addresses(u32 startindex, ...);
23075 #define dt_fixup_mac_addresses(...) \
23076 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/prpmc2800.c powerpc.git/arch/powerpc/boot/prpmc2800.c
23077 --- linux-2.6.24/arch/powerpc/boot/prpmc2800.c 2008-01-24 23:58:37.000000000 +0100
23078 +++ powerpc.git/arch/powerpc/boot/prpmc2800.c 2008-01-28 20:25:49.000000000 +0100
23079 @@ -547,8 +547,7 @@
23082 memmove(dtb, _dtb_start, dt_size);
23083 - if (ft_init(dtb, dt_size, 16))
23087 bridge_base = mv64x60_get_bridge_base();
23089 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/ps3.c powerpc.git/arch/powerpc/boot/ps3.c
23090 --- linux-2.6.24/arch/powerpc/boot/ps3.c 2008-01-24 23:58:37.000000000 +0100
23091 +++ powerpc.git/arch/powerpc/boot/ps3.c 2008-01-28 20:25:49.000000000 +0100
23092 @@ -131,7 +131,7 @@
23093 printf("\n-- PS3 bootwrapper --\n");
23095 simple_alloc_init(_end, heapsize, 32, 64);
23096 - ft_init(_dtb_start, 0, 4);
23097 + fdt_init(_dtb_start);
23099 chosen = finddevice("/chosen");
23101 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/redboot-8xx.c powerpc.git/arch/powerpc/boot/redboot-8xx.c
23102 --- linux-2.6.24/arch/powerpc/boot/redboot-8xx.c 1970-01-01 01:00:00.000000000 +0100
23103 +++ powerpc.git/arch/powerpc/boot/redboot-8xx.c 2008-01-28 20:25:49.000000000 +0100
23106 + * RedBoot firmware support
23108 + * Author: Scott Wood <scottwood@freescale.com>
23110 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
23112 + * This program is free software; you can redistribute it and/or modify it
23113 + * under the terms of the GNU General Public License version 2 as published
23114 + * by the Free Software Foundation.
23118 +#include "stdio.h"
23119 +#include "redboot.h"
23120 +#include "fsl-soc.h"
23126 +#define MHZ(x) ((x + 500000) / 1000000)
23128 +static void platform_fixups(void)
23132 + dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
23133 + dt_fixup_mac_addresses(bd.bi_enetaddr);
23134 + dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 16, bd.bi_busfreq);
23136 + node = finddevice("/soc/cpm/brg");
23138 + printf("BRG clock-frequency <- 0x%x (%dMHz)\r\n",
23139 + bd.bi_busfreq, MHZ(bd.bi_busfreq));
23140 + setprop(node, "clock-frequency", &bd.bi_busfreq, 4);
23144 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
23145 + unsigned long r6, unsigned long r7)
23147 + memcpy(&bd, (char *)r3, sizeof(bd));
23149 + if (bd.bi_tag != 0x42444944)
23152 + simple_alloc_init(_end,
23153 + bd.bi_memstart + bd.bi_memsize - (unsigned long)_end,
23156 + fdt_init(_dtb_start);
23157 + serial_console_init();
23158 + platform_ops.fixups = platform_fixups;
23160 + loader_info.cmdline = (char *)bd.bi_cmdline;
23161 + loader_info.cmdline_len = strlen((char *)bd.bi_cmdline);
23163 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/redboot.h powerpc.git/arch/powerpc/boot/redboot.h
23164 --- linux-2.6.24/arch/powerpc/boot/redboot.h 1970-01-01 01:00:00.000000000 +0100
23165 +++ powerpc.git/arch/powerpc/boot/redboot.h 2008-01-28 20:25:49.000000000 +0100
23167 +#ifndef _PPC_REDBOOT_H
23168 +#define _PPC_REDBOOT_H
23170 +//=========================================================================
23171 +// include/asm-ppc/redboot.h
23172 +// Copyright (c) 2002, 2003 Gary Thomas (<gary@mlbassoc.com>
23173 +// Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
23176 +// Board specific details, as provided by RedBoot
23179 +/* A Board Information structure that is given to a program when
23180 + * RedBoot starts it up. Note: not all fields make sense for all
23181 + * architectures and it's up to the platform specific code to fill
23182 + * in the details.
23184 +typedef struct bd_info {
23185 + unsigned int bi_tag; /* Should be 0x42444944 "BDID" */
23186 + unsigned int bi_size; /* Size of this structure */
23187 + unsigned int bi_revision; /* revision of this structure */
23188 + unsigned int bi_bdate; /* bootstrap date, i.e. 0x19971106 */
23189 + unsigned int bi_memstart; /* Memory start address */
23190 + unsigned int bi_memsize; /* Memory (end) size in bytes */
23191 + unsigned int bi_intfreq; /* Internal Freq, in Hz */
23192 + unsigned int bi_busfreq; /* Bus Freq, in Hz */
23193 + unsigned int bi_cpmfreq; /* CPM Freq, in Hz */
23194 + unsigned int bi_brgfreq; /* BRG Freq, in Hz */
23195 + unsigned int bi_vco; /* VCO Out from PLL */
23196 + unsigned int bi_pci_freq; /* PCI Freq, in Hz */
23197 + unsigned int bi_baudrate; /* Default console baud rate */
23198 + unsigned int bi_immr; /* IMMR when called from boot rom */
23199 + unsigned char bi_enetaddr[6];
23200 + unsigned int bi_flashbase; /* Physical address of FLASH memory */
23201 + unsigned int bi_flashsize; /* Length of FLASH memory */
23202 + int bi_flashwidth; /* Width (8,16,32,64) */
23203 + unsigned char *bi_cmdline; /* Pointer to command line */
23204 + unsigned char bi_esa[3][6]; /* Ethernet station addresses */
23205 + unsigned int bi_ramdisk_begin, bi_ramdisk_end;
23206 + struct { /* Information about [main] video screen */
23207 + short x_res; /* Horizontal resolution in pixels */
23208 + short y_res; /* Vertical resolution in pixels */
23209 + short bpp; /* Bits/pixel */
23210 + short mode; /* Type of pixels (packed, indexed) */
23211 + unsigned long fb; /* Pointer to frame buffer (pixel) memory */
23213 + void (*bi_cputc)(char); /* Write a character to the RedBoot console */
23214 + char (*bi_cgetc)(void); /* Read a character from the RedBoot console */
23215 + int (*bi_ctstc)(void); /* Test for input on the RedBoot console */
23218 +#define BI_REV 0x0102 /* Version 1.02 */
23220 +#define bi_pci_busfreq bi_pci_freq
23221 +#define bi_immr_base bi_immr
23223 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/reg.h powerpc.git/arch/powerpc/boot/reg.h
23224 --- linux-2.6.24/arch/powerpc/boot/reg.h 2008-01-24 23:58:37.000000000 +0100
23225 +++ powerpc.git/arch/powerpc/boot/reg.h 2008-01-28 20:25:49.000000000 +0100
23230 +#define __stringify_1(x) #x
23231 +#define __stringify(x) __stringify_1(x)
23233 +#define mfspr(rn) ({unsigned long rval; \
23234 + asm volatile("mfspr %0," __stringify(rn) \
23235 + : "=r" (rval)); rval; })
23236 +#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
23238 register void *__stack_pointer asm("r1");
23239 #define get_sp() (__stack_pointer)
23241 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/serial.c powerpc.git/arch/powerpc/boot/serial.c
23242 --- linux-2.6.24/arch/powerpc/boot/serial.c 2008-01-24 23:58:37.000000000 +0100
23243 +++ powerpc.git/arch/powerpc/boot/serial.c 2008-01-28 20:25:49.000000000 +0100
23244 @@ -128,7 +128,8 @@
23245 rc = cpm_console_init(devp, &serial_cd);
23246 else if (dt_is_compatible(devp, "mpc5200-psc-uart"))
23247 rc = mpc5200_psc_console_init(devp, &serial_cd);
23248 - else if (dt_is_compatible(devp, "xilinx,uartlite"))
23249 + else if (dt_is_compatible(devp, "xlnx,opb-uartlite-1.00.b") ||
23250 + dt_is_compatible(devp, "xlnx,xps-uartlite-1.00.a"))
23251 rc = uartlite_console_init(devp, &serial_cd);
23253 /* Add other serial console driver calls here */
23254 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/treeboot-walnut.c powerpc.git/arch/powerpc/boot/treeboot-walnut.c
23255 --- linux-2.6.24/arch/powerpc/boot/treeboot-walnut.c 2008-01-24 23:58:37.000000000 +0100
23256 +++ powerpc.git/arch/powerpc/boot/treeboot-walnut.c 2008-01-28 20:25:49.000000000 +0100
23261 -void ibm405gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
23263 - u32 pllmr = mfdcr(DCRN_CPC0_PLLMR);
23264 - u32 cpc0_cr0 = mfdcr(DCRN_405_CPC0_CR0);
23265 - u32 cpc0_cr1 = mfdcr(DCRN_405_CPC0_CR1);
23266 - u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
23267 - u32 fwdv, fbdv, cbdv, opdv, epdv, udiv;
23269 - fwdv = (8 - ((pllmr & 0xe0000000) >> 29));
23270 - fbdv = (pllmr & 0x1e000000) >> 25;
23271 - cbdv = ((pllmr & 0x00060000) >> 17) + 1;
23272 - opdv = ((pllmr & 0x00018000) >> 15) + 1;
23273 - epdv = ((pllmr & 0x00001800) >> 13) + 2;
23274 - udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1;
23276 - m = fwdv * fbdv * cbdv;
23278 - cpu = sysclk * m / fwdv;
23279 - plb = cpu / cbdv;
23280 - opb = plb / opdv;
23281 - ebc = plb / epdv;
23283 - if (cpc0_cr0 & 0x80) {
23284 - /* uart0 uses the external clock */
23287 - uart0 = cpu / udiv;
23290 - if (cpc0_cr0 & 0x40) {
23291 - /* uart1 uses the external clock */
23294 - uart1 = cpu / udiv;
23297 - /* setup the timebase clock to tick at the cpu frequency */
23298 - cpc0_cr1 = cpc0_cr1 & ~0x00800000;
23299 - mtdcr(DCRN_405_CPC0_CR1, cpc0_cr1);
23302 - dt_fixup_cpu_clocks(cpu, tb, 0);
23303 - dt_fixup_clock("/plb", plb);
23304 - dt_fixup_clock("/plb/opb", opb);
23305 - dt_fixup_clock("/plb/ebc", ebc);
23306 - dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
23307 - dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
23310 static void walnut_flashsel_fixup(void)
23314 #define WALNUT_OPENBIOS_MAC_OFF 0xfffffe0b
23315 static void walnut_fixups(void)
23317 - ibm4xx_fixup_memsize();
23318 + ibm4xx_sdram_fixup_memsize();
23319 ibm405gp_fixup_clocks(33330000, 0xa8c000);
23320 ibm4xx_quiesce_eth((u32 *)0xef600800, NULL);
23321 ibm4xx_fixup_ebc_ranges("/plb/ebc");
23323 simple_alloc_init(_end, avail_ram, 32, 32);
23324 platform_ops.fixups = walnut_fixups;
23325 platform_ops.exit = ibm40x_dbcr_reset;
23326 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
23327 + fdt_init(_dtb_start);
23328 serial_console_init();
23330 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/boot/wrapper powerpc.git/arch/powerpc/boot/wrapper
23331 --- linux-2.6.24/arch/powerpc/boot/wrapper 2008-01-24 23:58:37.000000000 +0100
23332 +++ powerpc.git/arch/powerpc/boot/wrapper 2008-01-28 20:25:49.000000000 +0100
23335 # directory for object and other files used by this script
23336 object=arch/powerpc/boot
23339 # directory for working files
23343 [ "$#" -gt 0 ] || usage
23349 @@ -116,10 +118,13 @@
23352 if [ -n "$dts" ]; then
23353 + if [ ! -r "$dts" -a -r "$object/dts/$dts" ]; then
23354 + dts="$object/dts/$dts"
23356 if [ -z "$dtb" ]; then
23357 dtb="$platform.dtb"
23359 - dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts"
23360 + $object/dtc -O dtb -o "$dtb" -b 0 "$dts"
23363 if [ -z "$kernel" ]; then
23364 @@ -163,7 +168,7 @@
23365 ksection=.kernel:vmlinux.bin
23366 isection=.kernel:initrd
23369 +ep88xc|ep405|redboot*|ep8248e)
23370 platformo="$object/fixed-head.o $object/$platform.o"
23373 @@ -246,11 +251,11 @@
23374 # post-processing needed for some platforms
23375 case "$platform" in
23377 - $object/addnote "$ofile"
23378 + $objbin/addnote "$ofile"
23381 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile"
23382 - $object/hack-coff "$ofile"
23383 + $objbin/hack-coff "$ofile"
23386 gzip -f -9 "$ofile"
23387 @@ -259,7 +264,7 @@
23390 mv "$ofile" "$ofile.elf"
23391 - $object/mktree "$ofile.elf" "$ofile" "$base" "$entry"
23392 + $objbin/mktree "$ofile.elf" "$ofile" "$base" "$entry"
23393 if [ -z "$cacheit" ]; then
23396 @@ -287,8 +292,6 @@
23400 - rm -f "$object/otheros.bld"
23402 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
23404 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
23405 @@ -299,6 +302,8 @@
23406 skip=$system_reset_overlay seek=$overlay_dest \
23407 count=$overlay_size bs=1
23409 - gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld"
23410 + odir="$(dirname "$ofile.bin")"
23411 + rm -f "$odir/otheros.bld"
23412 + gzip --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld"
23415 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/adder875-redboot_defconfig powerpc.git/arch/powerpc/configs/adder875-redboot_defconfig
23416 --- linux-2.6.24/arch/powerpc/configs/adder875-redboot_defconfig 1970-01-01 01:00:00.000000000 +0100
23417 +++ powerpc.git/arch/powerpc/configs/adder875-redboot_defconfig 2008-01-28 20:25:49.000000000 +0100
23420 +# Automatically generated make config: don't edit
23421 +# Linux kernel version: 2.6.24-rc6
23422 +# Thu Jan 17 16:17:38 2008
23424 +# CONFIG_PPC64 is not set
23427 +# Processor support
23429 +# CONFIG_6xx is not set
23430 +# CONFIG_PPC_85xx is not set
23432 +# CONFIG_40x is not set
23433 +# CONFIG_44x is not set
23434 +# CONFIG_E200 is not set
23436 +# CONFIG_PPC_MM_SLICES is not set
23437 +CONFIG_NOT_COHERENT_CACHE=y
23439 +CONFIG_WORD_SIZE=32
23440 +CONFIG_PPC_MERGE=y
23442 +CONFIG_GENERIC_CMOS_UPDATE=y
23443 +CONFIG_GENERIC_TIME=y
23444 +CONFIG_GENERIC_TIME_VSYSCALL=y
23445 +CONFIG_GENERIC_CLOCKEVENTS=y
23446 +CONFIG_GENERIC_HARDIRQS=y
23447 +CONFIG_IRQ_PER_CPU=y
23448 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
23449 +CONFIG_ARCH_HAS_ILOG2_U32=y
23450 +CONFIG_GENERIC_HWEIGHT=y
23451 +CONFIG_GENERIC_CALIBRATE_DELAY=y
23452 +CONFIG_GENERIC_FIND_NEXT_BIT=y
23453 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
23455 +CONFIG_EARLY_PRINTK=y
23456 +CONFIG_GENERIC_NVRAM=y
23457 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23458 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
23461 +# CONFIG_PPC_UDBG_16550 is not set
23462 +# CONFIG_GENERIC_TBSYNC is not set
23463 +CONFIG_AUDIT_ARCH=y
23464 +CONFIG_GENERIC_BUG=y
23465 +# CONFIG_DEFAULT_UIMAGE is not set
23467 +# CONFIG_PPC_DCR_NATIVE is not set
23468 +# CONFIG_PPC_DCR_MMIO is not set
23469 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
23474 +CONFIG_EXPERIMENTAL=y
23475 +CONFIG_BROKEN_ON_SMP=y
23476 +CONFIG_INIT_ENV_ARG_LIMIT=32
23477 +CONFIG_LOCALVERSION=""
23478 +CONFIG_LOCALVERSION_AUTO=y
23479 +# CONFIG_SWAP is not set
23481 +CONFIG_SYSVIPC_SYSCTL=y
23482 +# CONFIG_POSIX_MQUEUE is not set
23483 +# CONFIG_BSD_PROCESS_ACCT is not set
23484 +# CONFIG_TASKSTATS is not set
23485 +# CONFIG_USER_NS is not set
23486 +# CONFIG_PID_NS is not set
23487 +# CONFIG_AUDIT is not set
23488 +# CONFIG_IKCONFIG is not set
23489 +CONFIG_LOG_BUF_SHIFT=14
23490 +# CONFIG_CGROUPS is not set
23491 +CONFIG_FAIR_GROUP_SCHED=y
23492 +CONFIG_FAIR_USER_SCHED=y
23493 +# CONFIG_FAIR_CGROUP_SCHED is not set
23494 +CONFIG_SYSFS_DEPRECATED=y
23495 +# CONFIG_RELAY is not set
23496 +# CONFIG_BLK_DEV_INITRD is not set
23497 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
23500 +# CONFIG_SYSCTL_SYSCALL is not set
23502 +# CONFIG_KALLSYMS_ALL is not set
23503 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
23507 +# CONFIG_ELF_CORE is not set
23508 +# CONFIG_BASE_FULL is not set
23509 +# CONFIG_FUTEX is not set
23510 +CONFIG_ANON_INODES=y
23515 +# CONFIG_VM_EVENT_COUNTERS is not set
23516 +CONFIG_SLUB_DEBUG=y
23517 +# CONFIG_SLAB is not set
23519 +# CONFIG_SLOB is not set
23520 +# CONFIG_TINY_SHMEM is not set
23521 +CONFIG_BASE_SMALL=1
23522 +# CONFIG_MODULES is not set
23524 +# CONFIG_LBD is not set
23525 +# CONFIG_BLK_DEV_IO_TRACE is not set
23526 +# CONFIG_LSF is not set
23527 +# CONFIG_BLK_DEV_BSG is not set
23532 +CONFIG_IOSCHED_NOOP=y
23533 +# CONFIG_IOSCHED_AS is not set
23534 +CONFIG_IOSCHED_DEADLINE=y
23535 +# CONFIG_IOSCHED_CFQ is not set
23536 +# CONFIG_DEFAULT_AS is not set
23537 +CONFIG_DEFAULT_DEADLINE=y
23538 +# CONFIG_DEFAULT_CFQ is not set
23539 +# CONFIG_DEFAULT_NOOP is not set
23540 +CONFIG_DEFAULT_IOSCHED="deadline"
23543 +# Platform support
23545 +# CONFIG_PPC_MPC52xx is not set
23546 +# CONFIG_PPC_MPC5200 is not set
23547 +# CONFIG_PPC_CELL is not set
23548 +# CONFIG_PPC_CELL_NATIVE is not set
23550 +# CONFIG_MPC8XXFADS is not set
23551 +# CONFIG_MPC86XADS is not set
23552 +# CONFIG_MPC885ADS is not set
23553 +# CONFIG_PPC_EP88XC is not set
23554 +CONFIG_PPC_ADDER875=y
23557 +# MPC8xx CPM Options
23561 +# Generic MPC8xx Options
23563 +CONFIG_8xx_COPYBACK=y
23564 +# CONFIG_8xx_CPU6 is not set
23565 +CONFIG_8xx_CPU15=y
23566 +CONFIG_NO_UCODE_PATCH=y
23567 +# CONFIG_USB_SOF_UCODE_PATCH is not set
23568 +# CONFIG_I2C_SPI_UCODE_PATCH is not set
23569 +# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
23570 +# CONFIG_PQ2ADS is not set
23571 +# CONFIG_MPIC is not set
23572 +# CONFIG_MPIC_WEIRD is not set
23573 +# CONFIG_PPC_I8259 is not set
23574 +# CONFIG_PPC_RTAS is not set
23575 +# CONFIG_MMIO_NVRAM is not set
23576 +# CONFIG_PPC_MPC106 is not set
23577 +# CONFIG_PPC_970_NAP is not set
23578 +# CONFIG_PPC_INDIRECT_IO is not set
23579 +# CONFIG_GENERIC_IOMAP is not set
23580 +# CONFIG_CPU_FREQ is not set
23581 +# CONFIG_CPM2 is not set
23582 +CONFIG_PPC_CPM_NEW_BINDING=y
23583 +# CONFIG_FSL_ULI1575 is not set
23589 +# CONFIG_HIGHMEM is not set
23590 +# CONFIG_TICK_ONESHOT is not set
23591 +# CONFIG_NO_HZ is not set
23592 +# CONFIG_HIGH_RES_TIMERS is not set
23593 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
23594 +# CONFIG_HZ_100 is not set
23595 +# CONFIG_HZ_250 is not set
23596 +# CONFIG_HZ_300 is not set
23599 +CONFIG_PREEMPT_NONE=y
23600 +# CONFIG_PREEMPT_VOLUNTARY is not set
23601 +# CONFIG_PREEMPT is not set
23602 +CONFIG_BINFMT_ELF=y
23603 +# CONFIG_BINFMT_MISC is not set
23604 +# CONFIG_MATH_EMULATION is not set
23605 +# CONFIG_8XX_MINIMAL_FPEMU is not set
23606 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
23607 +CONFIG_ARCH_FLATMEM_ENABLE=y
23608 +CONFIG_ARCH_POPULATES_NODE_MAP=y
23609 +CONFIG_SELECT_MEMORY_MODEL=y
23610 +CONFIG_FLATMEM_MANUAL=y
23611 +# CONFIG_DISCONTIGMEM_MANUAL is not set
23612 +# CONFIG_SPARSEMEM_MANUAL is not set
23614 +CONFIG_FLAT_NODE_MEM_MAP=y
23615 +# CONFIG_SPARSEMEM_STATIC is not set
23616 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
23617 +CONFIG_SPLIT_PTLOCK_CPUS=4
23618 +# CONFIG_RESOURCES_64BIT is not set
23619 +CONFIG_ZONE_DMA_FLAG=1
23621 +CONFIG_VIRT_TO_BUS=y
23622 +# CONFIG_PROC_DEVICETREE is not set
23623 +# CONFIG_CMDLINE_BOOL is not set
23624 +# CONFIG_PM is not set
23625 +CONFIG_SUSPEND_UP_POSSIBLE=y
23626 +CONFIG_HIBERNATION_UP_POSSIBLE=y
23627 +# CONFIG_SECCOMP is not set
23628 +CONFIG_WANT_DEVICE_TREE=y
23629 +CONFIG_DEVICE_TREE="adder875-redboot.dts"
23630 +CONFIG_ISA_DMA_API=y
23637 +# CONFIG_PCI is not set
23638 +# CONFIG_PCI_DOMAINS is not set
23639 +# CONFIG_PCI_SYSCALL is not set
23640 +# CONFIG_PCI_QSPAN is not set
23641 +# CONFIG_ARCH_SUPPORTS_MSI is not set
23642 +# CONFIG_PCCARD is not set
23647 +# CONFIG_ADVANCED_OPTIONS is not set
23650 +# Default settings for advanced configuration options are used
23652 +CONFIG_HIGHMEM_START=0xfe000000
23653 +CONFIG_LOWMEM_SIZE=0x30000000
23654 +CONFIG_KERNEL_START=0xc0000000
23655 +CONFIG_TASK_SIZE=0x80000000
23656 +CONFIG_CONSISTENT_START=0xfd000000
23657 +CONFIG_CONSISTENT_SIZE=0x00200000
23658 +CONFIG_BOOT_LOAD=0x00400000
23666 +# Networking options
23669 +# CONFIG_PACKET_MMAP is not set
23671 +# CONFIG_NET_KEY is not set
23673 +CONFIG_IP_MULTICAST=y
23674 +# CONFIG_IP_ADVANCED_ROUTER is not set
23675 +CONFIG_IP_FIB_HASH=y
23677 +# CONFIG_IP_PNP_DHCP is not set
23678 +# CONFIG_IP_PNP_BOOTP is not set
23679 +# CONFIG_IP_PNP_RARP is not set
23680 +# CONFIG_NET_IPIP is not set
23681 +# CONFIG_NET_IPGRE is not set
23682 +# CONFIG_IP_MROUTE is not set
23683 +# CONFIG_ARPD is not set
23684 +CONFIG_SYN_COOKIES=y
23685 +# CONFIG_INET_AH is not set
23686 +# CONFIG_INET_ESP is not set
23687 +# CONFIG_INET_IPCOMP is not set
23688 +# CONFIG_INET_XFRM_TUNNEL is not set
23689 +# CONFIG_INET_TUNNEL is not set
23690 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
23691 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
23692 +# CONFIG_INET_XFRM_MODE_BEET is not set
23693 +# CONFIG_INET_LRO is not set
23694 +CONFIG_INET_DIAG=y
23695 +CONFIG_INET_TCP_DIAG=y
23696 +# CONFIG_TCP_CONG_ADVANCED is not set
23697 +CONFIG_TCP_CONG_CUBIC=y
23698 +CONFIG_DEFAULT_TCP_CONG="cubic"
23699 +# CONFIG_TCP_MD5SIG is not set
23700 +# CONFIG_IPV6 is not set
23701 +# CONFIG_INET6_XFRM_TUNNEL is not set
23702 +# CONFIG_INET6_TUNNEL is not set
23703 +# CONFIG_NETWORK_SECMARK is not set
23704 +# CONFIG_NETFILTER is not set
23705 +# CONFIG_IP_DCCP is not set
23706 +# CONFIG_IP_SCTP is not set
23707 +# CONFIG_TIPC is not set
23708 +# CONFIG_ATM is not set
23709 +# CONFIG_BRIDGE is not set
23710 +# CONFIG_VLAN_8021Q is not set
23711 +# CONFIG_DECNET is not set
23712 +# CONFIG_LLC2 is not set
23713 +# CONFIG_IPX is not set
23714 +# CONFIG_ATALK is not set
23715 +# CONFIG_X25 is not set
23716 +# CONFIG_LAPB is not set
23717 +# CONFIG_ECONET is not set
23718 +# CONFIG_WAN_ROUTER is not set
23719 +# CONFIG_NET_SCHED is not set
23724 +# CONFIG_NET_PKTGEN is not set
23725 +# CONFIG_HAMRADIO is not set
23726 +# CONFIG_IRDA is not set
23727 +# CONFIG_BT is not set
23728 +# CONFIG_AF_RXRPC is not set
23733 +# CONFIG_CFG80211 is not set
23734 +# CONFIG_WIRELESS_EXT is not set
23735 +# CONFIG_MAC80211 is not set
23736 +# CONFIG_IEEE80211 is not set
23737 +# CONFIG_RFKILL is not set
23738 +# CONFIG_NET_9P is not set
23745 +# Generic Driver Options
23747 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
23748 +CONFIG_STANDALONE=y
23749 +CONFIG_PREVENT_FIRMWARE_BUILD=y
23750 +# CONFIG_FW_LOADER is not set
23751 +# CONFIG_DEBUG_DRIVER is not set
23752 +# CONFIG_DEBUG_DEVRES is not set
23753 +# CONFIG_SYS_HYPERVISOR is not set
23754 +# CONFIG_CONNECTOR is not set
23756 +# CONFIG_MTD_DEBUG is not set
23757 +# CONFIG_MTD_CONCAT is not set
23758 +# CONFIG_MTD_PARTITIONS is not set
23761 +# User Modules And Translation Layers
23764 +CONFIG_MTD_BLKDEVS=y
23765 +CONFIG_MTD_BLOCK=y
23766 +# CONFIG_FTL is not set
23767 +# CONFIG_NFTL is not set
23768 +# CONFIG_INFTL is not set
23769 +# CONFIG_RFD_FTL is not set
23770 +# CONFIG_SSFDC is not set
23771 +# CONFIG_MTD_OOPS is not set
23774 +# RAM/ROM/Flash chip drivers
23777 +# CONFIG_MTD_JEDECPROBE is not set
23778 +CONFIG_MTD_GEN_PROBE=y
23779 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
23780 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
23781 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
23782 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
23783 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
23784 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
23785 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
23786 +CONFIG_MTD_CFI_I1=y
23787 +CONFIG_MTD_CFI_I2=y
23788 +# CONFIG_MTD_CFI_I4 is not set
23789 +# CONFIG_MTD_CFI_I8 is not set
23790 +# CONFIG_MTD_CFI_INTELEXT is not set
23791 +CONFIG_MTD_CFI_AMDSTD=y
23792 +# CONFIG_MTD_CFI_STAA is not set
23793 +CONFIG_MTD_CFI_UTIL=y
23794 +# CONFIG_MTD_RAM is not set
23795 +# CONFIG_MTD_ROM is not set
23796 +# CONFIG_MTD_ABSENT is not set
23799 +# Mapping drivers for chip access
23801 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
23802 +# CONFIG_MTD_PHYSMAP is not set
23803 +CONFIG_MTD_PHYSMAP_OF=y
23804 +# CONFIG_MTD_CFI_FLAGADM is not set
23805 +# CONFIG_MTD_PLATRAM is not set
23808 +# Self-contained MTD device drivers
23810 +# CONFIG_MTD_SLRAM is not set
23811 +# CONFIG_MTD_PHRAM is not set
23812 +# CONFIG_MTD_MTDRAM is not set
23813 +# CONFIG_MTD_BLOCK2MTD is not set
23816 +# Disk-On-Chip Device Drivers
23818 +# CONFIG_MTD_DOC2000 is not set
23819 +# CONFIG_MTD_DOC2001 is not set
23820 +# CONFIG_MTD_DOC2001PLUS is not set
23821 +# CONFIG_MTD_NAND is not set
23822 +# CONFIG_MTD_ONENAND is not set
23825 +# UBI - Unsorted block images
23827 +# CONFIG_MTD_UBI is not set
23828 +CONFIG_OF_DEVICE=y
23829 +# CONFIG_PARPORT is not set
23830 +# CONFIG_BLK_DEV is not set
23831 +# CONFIG_MISC_DEVICES is not set
23832 +# CONFIG_IDE is not set
23835 +# SCSI device support
23837 +# CONFIG_RAID_ATTRS is not set
23838 +# CONFIG_SCSI is not set
23839 +# CONFIG_SCSI_DMA is not set
23840 +# CONFIG_SCSI_NETLINK is not set
23841 +# CONFIG_ATA is not set
23842 +# CONFIG_MD is not set
23843 +# CONFIG_MACINTOSH_DRIVERS is not set
23844 +CONFIG_NETDEVICES=y
23845 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
23846 +# CONFIG_DUMMY is not set
23847 +# CONFIG_BONDING is not set
23848 +# CONFIG_MACVLAN is not set
23849 +# CONFIG_EQUALIZER is not set
23850 +# CONFIG_TUN is not set
23851 +# CONFIG_VETH is not set
23855 +# MII PHY device drivers
23857 +# CONFIG_MARVELL_PHY is not set
23858 +CONFIG_DAVICOM_PHY=y
23859 +# CONFIG_QSEMI_PHY is not set
23860 +# CONFIG_LXT_PHY is not set
23861 +# CONFIG_CICADA_PHY is not set
23862 +# CONFIG_VITESSE_PHY is not set
23863 +# CONFIG_SMSC_PHY is not set
23864 +# CONFIG_BROADCOM_PHY is not set
23865 +# CONFIG_ICPLUS_PHY is not set
23866 +# CONFIG_FIXED_PHY is not set
23867 +# CONFIG_MDIO_BITBANG is not set
23868 +CONFIG_NET_ETHERNET=y
23870 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
23871 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
23872 +# CONFIG_IBM_NEW_EMAC_TAH is not set
23873 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
23874 +# CONFIG_B44 is not set
23876 +# CONFIG_FS_ENET_HAS_SCC is not set
23877 +CONFIG_FS_ENET_HAS_FEC=y
23878 +CONFIG_FS_ENET_MDIO_FEC=y
23879 +# CONFIG_NETDEV_1000 is not set
23880 +# CONFIG_NETDEV_10000 is not set
23885 +# CONFIG_WLAN_PRE80211 is not set
23886 +# CONFIG_WLAN_80211 is not set
23887 +# CONFIG_WAN is not set
23888 +# CONFIG_PPP is not set
23889 +# CONFIG_SLIP is not set
23890 +# CONFIG_SHAPER is not set
23891 +# CONFIG_NETCONSOLE is not set
23892 +# CONFIG_NETPOLL is not set
23893 +# CONFIG_NET_POLL_CONTROLLER is not set
23894 +# CONFIG_ISDN is not set
23895 +# CONFIG_PHONE is not set
23898 +# Input device support
23901 +# CONFIG_INPUT_FF_MEMLESS is not set
23902 +# CONFIG_INPUT_POLLDEV is not set
23905 +# Userland interfaces
23907 +CONFIG_INPUT_MOUSEDEV=y
23908 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
23909 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
23910 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
23911 +# CONFIG_INPUT_JOYDEV is not set
23912 +# CONFIG_INPUT_EVDEV is not set
23913 +# CONFIG_INPUT_EVBUG is not set
23916 +# Input Device Drivers
23918 +CONFIG_INPUT_KEYBOARD=y
23919 +CONFIG_KEYBOARD_ATKBD=y
23920 +# CONFIG_KEYBOARD_SUNKBD is not set
23921 +# CONFIG_KEYBOARD_LKKBD is not set
23922 +# CONFIG_KEYBOARD_XTKBD is not set
23923 +# CONFIG_KEYBOARD_NEWTON is not set
23924 +# CONFIG_KEYBOARD_STOWAWAY is not set
23925 +CONFIG_INPUT_MOUSE=y
23926 +CONFIG_MOUSE_PS2=y
23927 +CONFIG_MOUSE_PS2_ALPS=y
23928 +CONFIG_MOUSE_PS2_LOGIPS2PP=y
23929 +CONFIG_MOUSE_PS2_SYNAPTICS=y
23930 +CONFIG_MOUSE_PS2_LIFEBOOK=y
23931 +CONFIG_MOUSE_PS2_TRACKPOINT=y
23932 +# CONFIG_MOUSE_PS2_TOUCHKIT is not set
23933 +# CONFIG_MOUSE_SERIAL is not set
23934 +# CONFIG_MOUSE_VSXXXAA is not set
23935 +# CONFIG_INPUT_JOYSTICK is not set
23936 +# CONFIG_INPUT_TABLET is not set
23937 +# CONFIG_INPUT_TOUCHSCREEN is not set
23938 +# CONFIG_INPUT_MISC is not set
23941 +# Hardware I/O ports
23944 +CONFIG_SERIO_I8042=y
23945 +CONFIG_SERIO_SERPORT=y
23946 +CONFIG_SERIO_LIBPS2=y
23947 +# CONFIG_SERIO_RAW is not set
23948 +# CONFIG_GAMEPORT is not set
23951 +# Character devices
23953 +# CONFIG_VT is not set
23954 +# CONFIG_SERIAL_NONSTANDARD is not set
23959 +# CONFIG_SERIAL_8250 is not set
23962 +# Non-8250 serial port support
23964 +# CONFIG_SERIAL_UARTLITE is not set
23965 +CONFIG_SERIAL_CORE=y
23966 +CONFIG_SERIAL_CORE_CONSOLE=y
23967 +CONFIG_SERIAL_CPM=y
23968 +CONFIG_SERIAL_CPM_CONSOLE=y
23969 +# CONFIG_SERIAL_CPM_SCC1 is not set
23970 +# CONFIG_SERIAL_CPM_SCC2 is not set
23971 +# CONFIG_SERIAL_CPM_SCC3 is not set
23972 +# CONFIG_SERIAL_CPM_SCC4 is not set
23973 +CONFIG_SERIAL_CPM_SMC1=y
23974 +CONFIG_SERIAL_CPM_SMC2=y
23975 +CONFIG_UNIX98_PTYS=y
23976 +# CONFIG_LEGACY_PTYS is not set
23977 +# CONFIG_IPMI_HANDLER is not set
23978 +CONFIG_HW_RANDOM=y
23979 +# CONFIG_NVRAM is not set
23981 +# CONFIG_GEN_RTC_X is not set
23982 +# CONFIG_R3964 is not set
23983 +# CONFIG_RAW_DRIVER is not set
23984 +# CONFIG_TCG_TPM is not set
23985 +# CONFIG_I2C is not set
23990 +# CONFIG_SPI is not set
23991 +# CONFIG_SPI_MASTER is not set
23992 +# CONFIG_W1 is not set
23993 +# CONFIG_POWER_SUPPLY is not set
23994 +# CONFIG_HWMON is not set
23995 +# CONFIG_WATCHDOG is not set
23998 +# Sonics Silicon Backplane
24000 +CONFIG_SSB_POSSIBLE=y
24001 +# CONFIG_SSB is not set
24004 +# Multifunction device drivers
24006 +# CONFIG_MFD_SM501 is not set
24009 +# Multimedia devices
24011 +# CONFIG_VIDEO_DEV is not set
24012 +# CONFIG_DVB_CORE is not set
24016 +# Graphics support
24018 +# CONFIG_VGASTATE is not set
24019 +CONFIG_VIDEO_OUTPUT_CONTROL=y
24020 +# CONFIG_FB is not set
24021 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
24024 +# Display device support
24026 +# CONFIG_DISPLAY_SUPPORT is not set
24031 +# CONFIG_SOUND is not set
24032 +# CONFIG_HID_SUPPORT is not set
24033 +# CONFIG_USB_SUPPORT is not set
24034 +# CONFIG_MMC is not set
24035 +# CONFIG_NEW_LEDS is not set
24036 +# CONFIG_EDAC is not set
24037 +# CONFIG_RTC_CLASS is not set
24042 +# CONFIG_UIO is not set
24047 +# CONFIG_EXT2_FS is not set
24048 +# CONFIG_EXT3_FS is not set
24049 +# CONFIG_EXT4DEV_FS is not set
24050 +# CONFIG_REISERFS_FS is not set
24051 +# CONFIG_JFS_FS is not set
24052 +# CONFIG_FS_POSIX_ACL is not set
24053 +# CONFIG_XFS_FS is not set
24054 +# CONFIG_GFS2_FS is not set
24055 +# CONFIG_OCFS2_FS is not set
24056 +# CONFIG_MINIX_FS is not set
24057 +# CONFIG_ROMFS_FS is not set
24058 +# CONFIG_INOTIFY is not set
24059 +# CONFIG_QUOTA is not set
24060 +# CONFIG_DNOTIFY is not set
24061 +# CONFIG_AUTOFS_FS is not set
24062 +# CONFIG_AUTOFS4_FS is not set
24063 +# CONFIG_FUSE_FS is not set
24066 +# CD-ROM/DVD Filesystems
24068 +# CONFIG_ISO9660_FS is not set
24069 +# CONFIG_UDF_FS is not set
24072 +# DOS/FAT/NT Filesystems
24074 +# CONFIG_MSDOS_FS is not set
24075 +# CONFIG_VFAT_FS is not set
24076 +# CONFIG_NTFS_FS is not set
24079 +# Pseudo filesystems
24082 +# CONFIG_PROC_KCORE is not set
24083 +CONFIG_PROC_SYSCTL=y
24086 +# CONFIG_TMPFS_POSIX_ACL is not set
24087 +# CONFIG_HUGETLB_PAGE is not set
24088 +# CONFIG_CONFIGFS_FS is not set
24091 +# Miscellaneous filesystems
24093 +# CONFIG_ADFS_FS is not set
24094 +# CONFIG_AFFS_FS is not set
24095 +# CONFIG_HFS_FS is not set
24096 +# CONFIG_HFSPLUS_FS is not set
24097 +# CONFIG_BEFS_FS is not set
24098 +# CONFIG_BFS_FS is not set
24099 +# CONFIG_EFS_FS is not set
24100 +# CONFIG_JFFS2_FS is not set
24102 +# CONFIG_VXFS_FS is not set
24103 +# CONFIG_HPFS_FS is not set
24104 +# CONFIG_QNX4FS_FS is not set
24105 +# CONFIG_SYSV_FS is not set
24106 +# CONFIG_UFS_FS is not set
24107 +CONFIG_NETWORK_FILESYSTEMS=y
24110 +# CONFIG_NFS_V3_ACL is not set
24111 +# CONFIG_NFS_V4 is not set
24112 +# CONFIG_NFS_DIRECTIO is not set
24113 +# CONFIG_NFSD is not set
24117 +CONFIG_NFS_COMMON=y
24119 +# CONFIG_SUNRPC_BIND34 is not set
24120 +# CONFIG_RPCSEC_GSS_KRB5 is not set
24121 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
24122 +# CONFIG_SMB_FS is not set
24123 +# CONFIG_CIFS is not set
24124 +# CONFIG_NCP_FS is not set
24125 +# CONFIG_CODA_FS is not set
24126 +# CONFIG_AFS_FS is not set
24131 +CONFIG_PARTITION_ADVANCED=y
24132 +# CONFIG_ACORN_PARTITION is not set
24133 +# CONFIG_OSF_PARTITION is not set
24134 +# CONFIG_AMIGA_PARTITION is not set
24135 +# CONFIG_ATARI_PARTITION is not set
24136 +# CONFIG_MAC_PARTITION is not set
24137 +CONFIG_MSDOS_PARTITION=y
24138 +# CONFIG_BSD_DISKLABEL is not set
24139 +# CONFIG_MINIX_SUBPARTITION is not set
24140 +# CONFIG_SOLARIS_X86_PARTITION is not set
24141 +# CONFIG_UNIXWARE_DISKLABEL is not set
24142 +# CONFIG_LDM_PARTITION is not set
24143 +# CONFIG_SGI_PARTITION is not set
24144 +# CONFIG_ULTRIX_PARTITION is not set
24145 +# CONFIG_SUN_PARTITION is not set
24146 +# CONFIG_KARMA_PARTITION is not set
24147 +# CONFIG_EFI_PARTITION is not set
24148 +# CONFIG_SYSV68_PARTITION is not set
24149 +# CONFIG_NLS is not set
24150 +# CONFIG_DLM is not set
24151 +# CONFIG_UCC_SLOW is not set
24154 +# Library routines
24156 +# CONFIG_CRC_CCITT is not set
24157 +# CONFIG_CRC16 is not set
24158 +# CONFIG_CRC_ITU_T is not set
24159 +# CONFIG_CRC32 is not set
24160 +# CONFIG_CRC7 is not set
24161 +# CONFIG_LIBCRC32C is not set
24162 +CONFIG_ZLIB_INFLATE=y
24163 +CONFIG_HAS_IOMEM=y
24164 +CONFIG_HAS_IOPORT=y
24166 +CONFIG_INSTRUMENTATION=y
24167 +# CONFIG_PROFILING is not set
24168 +# CONFIG_MARKERS is not set
24173 +# CONFIG_PRINTK_TIME is not set
24174 +CONFIG_ENABLE_WARN_DEPRECATED=y
24175 +CONFIG_ENABLE_MUST_CHECK=y
24176 +CONFIG_MAGIC_SYSRQ=y
24177 +# CONFIG_UNUSED_SYMBOLS is not set
24178 +# CONFIG_DEBUG_FS is not set
24179 +# CONFIG_HEADERS_CHECK is not set
24180 +CONFIG_DEBUG_KERNEL=y
24181 +# CONFIG_DEBUG_SHIRQ is not set
24182 +CONFIG_DETECT_SOFTLOCKUP=y
24183 +CONFIG_SCHED_DEBUG=y
24184 +# CONFIG_SCHEDSTATS is not set
24185 +# CONFIG_TIMER_STATS is not set
24186 +# CONFIG_SLUB_DEBUG_ON is not set
24187 +# CONFIG_DEBUG_SPINLOCK is not set
24188 +# CONFIG_DEBUG_MUTEXES is not set
24189 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
24190 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
24191 +# CONFIG_DEBUG_KOBJECT is not set
24192 +CONFIG_DEBUG_BUGVERBOSE=y
24193 +CONFIG_DEBUG_INFO=y
24194 +# CONFIG_DEBUG_VM is not set
24195 +# CONFIG_DEBUG_LIST is not set
24196 +# CONFIG_DEBUG_SG is not set
24197 +CONFIG_FORCED_INLINING=y
24198 +# CONFIG_BOOT_PRINTK_DELAY is not set
24199 +# CONFIG_FAULT_INJECTION is not set
24200 +# CONFIG_SAMPLES is not set
24201 +# CONFIG_DEBUG_STACKOVERFLOW is not set
24202 +# CONFIG_DEBUG_STACK_USAGE is not set
24203 +# CONFIG_DEBUG_PAGEALLOC is not set
24204 +# CONFIG_DEBUGGER is not set
24205 +# CONFIG_BDI_SWITCH is not set
24206 +# CONFIG_PPC_EARLY_DEBUG is not set
24209 +# Security options
24211 +# CONFIG_KEYS is not set
24212 +# CONFIG_SECURITY is not set
24213 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
24214 +# CONFIG_CRYPTO is not set
24215 +# CONFIG_PPC_CLOCK is not set
24216 +CONFIG_PPC_LIB_RHEAP=y
24217 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/adder875-uboot_defconfig powerpc.git/arch/powerpc/configs/adder875-uboot_defconfig
24218 --- linux-2.6.24/arch/powerpc/configs/adder875-uboot_defconfig 1970-01-01 01:00:00.000000000 +0100
24219 +++ powerpc.git/arch/powerpc/configs/adder875-uboot_defconfig 2008-01-28 20:25:49.000000000 +0100
24222 +# Automatically generated make config: don't edit
24223 +# Linux kernel version: 2.6.24-rc6
24224 +# Thu Jan 17 16:17:18 2008
24226 +# CONFIG_PPC64 is not set
24229 +# Processor support
24231 +# CONFIG_6xx is not set
24232 +# CONFIG_PPC_85xx is not set
24234 +# CONFIG_40x is not set
24235 +# CONFIG_44x is not set
24236 +# CONFIG_E200 is not set
24238 +# CONFIG_PPC_MM_SLICES is not set
24239 +CONFIG_NOT_COHERENT_CACHE=y
24241 +CONFIG_WORD_SIZE=32
24242 +CONFIG_PPC_MERGE=y
24244 +CONFIG_GENERIC_CMOS_UPDATE=y
24245 +CONFIG_GENERIC_TIME=y
24246 +CONFIG_GENERIC_TIME_VSYSCALL=y
24247 +CONFIG_GENERIC_CLOCKEVENTS=y
24248 +CONFIG_GENERIC_HARDIRQS=y
24249 +CONFIG_IRQ_PER_CPU=y
24250 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
24251 +CONFIG_ARCH_HAS_ILOG2_U32=y
24252 +CONFIG_GENERIC_HWEIGHT=y
24253 +CONFIG_GENERIC_CALIBRATE_DELAY=y
24254 +CONFIG_GENERIC_FIND_NEXT_BIT=y
24255 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
24257 +CONFIG_EARLY_PRINTK=y
24258 +CONFIG_GENERIC_NVRAM=y
24259 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
24260 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24263 +# CONFIG_PPC_UDBG_16550 is not set
24264 +# CONFIG_GENERIC_TBSYNC is not set
24265 +CONFIG_AUDIT_ARCH=y
24266 +CONFIG_GENERIC_BUG=y
24267 +# CONFIG_DEFAULT_UIMAGE is not set
24269 +# CONFIG_PPC_DCR_NATIVE is not set
24270 +# CONFIG_PPC_DCR_MMIO is not set
24271 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24276 +CONFIG_EXPERIMENTAL=y
24277 +CONFIG_BROKEN_ON_SMP=y
24278 +CONFIG_INIT_ENV_ARG_LIMIT=32
24279 +CONFIG_LOCALVERSION=""
24280 +CONFIG_LOCALVERSION_AUTO=y
24281 +# CONFIG_SWAP is not set
24283 +CONFIG_SYSVIPC_SYSCTL=y
24284 +# CONFIG_POSIX_MQUEUE is not set
24285 +# CONFIG_BSD_PROCESS_ACCT is not set
24286 +# CONFIG_TASKSTATS is not set
24287 +# CONFIG_USER_NS is not set
24288 +# CONFIG_PID_NS is not set
24289 +# CONFIG_AUDIT is not set
24290 +# CONFIG_IKCONFIG is not set
24291 +CONFIG_LOG_BUF_SHIFT=14
24292 +# CONFIG_CGROUPS is not set
24293 +CONFIG_FAIR_GROUP_SCHED=y
24294 +CONFIG_FAIR_USER_SCHED=y
24295 +# CONFIG_FAIR_CGROUP_SCHED is not set
24296 +CONFIG_SYSFS_DEPRECATED=y
24297 +# CONFIG_RELAY is not set
24298 +# CONFIG_BLK_DEV_INITRD is not set
24299 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
24302 +# CONFIG_SYSCTL_SYSCALL is not set
24304 +# CONFIG_KALLSYMS_ALL is not set
24305 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
24309 +# CONFIG_ELF_CORE is not set
24310 +# CONFIG_BASE_FULL is not set
24311 +# CONFIG_FUTEX is not set
24312 +CONFIG_ANON_INODES=y
24317 +# CONFIG_VM_EVENT_COUNTERS is not set
24318 +CONFIG_SLUB_DEBUG=y
24319 +# CONFIG_SLAB is not set
24321 +# CONFIG_SLOB is not set
24322 +# CONFIG_TINY_SHMEM is not set
24323 +CONFIG_BASE_SMALL=1
24324 +# CONFIG_MODULES is not set
24326 +# CONFIG_LBD is not set
24327 +# CONFIG_BLK_DEV_IO_TRACE is not set
24328 +# CONFIG_LSF is not set
24329 +# CONFIG_BLK_DEV_BSG is not set
24334 +CONFIG_IOSCHED_NOOP=y
24335 +# CONFIG_IOSCHED_AS is not set
24336 +CONFIG_IOSCHED_DEADLINE=y
24337 +# CONFIG_IOSCHED_CFQ is not set
24338 +# CONFIG_DEFAULT_AS is not set
24339 +CONFIG_DEFAULT_DEADLINE=y
24340 +# CONFIG_DEFAULT_CFQ is not set
24341 +# CONFIG_DEFAULT_NOOP is not set
24342 +CONFIG_DEFAULT_IOSCHED="deadline"
24345 +# Platform support
24347 +# CONFIG_PPC_MPC52xx is not set
24348 +# CONFIG_PPC_MPC5200 is not set
24349 +# CONFIG_PPC_CELL is not set
24350 +# CONFIG_PPC_CELL_NATIVE is not set
24352 +# CONFIG_MPC8XXFADS is not set
24353 +# CONFIG_MPC86XADS is not set
24354 +# CONFIG_MPC885ADS is not set
24355 +# CONFIG_PPC_EP88XC is not set
24356 +CONFIG_PPC_ADDER875=y
24359 +# MPC8xx CPM Options
24363 +# Generic MPC8xx Options
24365 +CONFIG_8xx_COPYBACK=y
24366 +# CONFIG_8xx_CPU6 is not set
24367 +CONFIG_8xx_CPU15=y
24368 +CONFIG_NO_UCODE_PATCH=y
24369 +# CONFIG_USB_SOF_UCODE_PATCH is not set
24370 +# CONFIG_I2C_SPI_UCODE_PATCH is not set
24371 +# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
24372 +# CONFIG_PQ2ADS is not set
24373 +# CONFIG_MPIC is not set
24374 +# CONFIG_MPIC_WEIRD is not set
24375 +# CONFIG_PPC_I8259 is not set
24376 +# CONFIG_PPC_RTAS is not set
24377 +# CONFIG_MMIO_NVRAM is not set
24378 +# CONFIG_PPC_MPC106 is not set
24379 +# CONFIG_PPC_970_NAP is not set
24380 +# CONFIG_PPC_INDIRECT_IO is not set
24381 +# CONFIG_GENERIC_IOMAP is not set
24382 +# CONFIG_CPU_FREQ is not set
24383 +# CONFIG_CPM2 is not set
24384 +CONFIG_PPC_CPM_NEW_BINDING=y
24385 +# CONFIG_FSL_ULI1575 is not set
24391 +# CONFIG_HIGHMEM is not set
24392 +# CONFIG_TICK_ONESHOT is not set
24393 +# CONFIG_NO_HZ is not set
24394 +# CONFIG_HIGH_RES_TIMERS is not set
24395 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
24396 +# CONFIG_HZ_100 is not set
24397 +# CONFIG_HZ_250 is not set
24398 +# CONFIG_HZ_300 is not set
24401 +CONFIG_PREEMPT_NONE=y
24402 +# CONFIG_PREEMPT_VOLUNTARY is not set
24403 +# CONFIG_PREEMPT is not set
24404 +CONFIG_BINFMT_ELF=y
24405 +# CONFIG_BINFMT_MISC is not set
24406 +# CONFIG_MATH_EMULATION is not set
24407 +# CONFIG_8XX_MINIMAL_FPEMU is not set
24408 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
24409 +CONFIG_ARCH_FLATMEM_ENABLE=y
24410 +CONFIG_ARCH_POPULATES_NODE_MAP=y
24411 +CONFIG_SELECT_MEMORY_MODEL=y
24412 +CONFIG_FLATMEM_MANUAL=y
24413 +# CONFIG_DISCONTIGMEM_MANUAL is not set
24414 +# CONFIG_SPARSEMEM_MANUAL is not set
24416 +CONFIG_FLAT_NODE_MEM_MAP=y
24417 +# CONFIG_SPARSEMEM_STATIC is not set
24418 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
24419 +CONFIG_SPLIT_PTLOCK_CPUS=4
24420 +# CONFIG_RESOURCES_64BIT is not set
24421 +CONFIG_ZONE_DMA_FLAG=1
24423 +CONFIG_VIRT_TO_BUS=y
24424 +# CONFIG_PROC_DEVICETREE is not set
24425 +# CONFIG_CMDLINE_BOOL is not set
24426 +# CONFIG_PM is not set
24427 +CONFIG_SUSPEND_UP_POSSIBLE=y
24428 +CONFIG_HIBERNATION_UP_POSSIBLE=y
24429 +# CONFIG_SECCOMP is not set
24430 +CONFIG_WANT_DEVICE_TREE=y
24431 +CONFIG_DEVICE_TREE="adder875-uboot.dts"
24432 +CONFIG_ISA_DMA_API=y
24439 +# CONFIG_PCI is not set
24440 +# CONFIG_PCI_DOMAINS is not set
24441 +# CONFIG_PCI_SYSCALL is not set
24442 +# CONFIG_PCI_QSPAN is not set
24443 +# CONFIG_ARCH_SUPPORTS_MSI is not set
24444 +# CONFIG_PCCARD is not set
24449 +# CONFIG_ADVANCED_OPTIONS is not set
24452 +# Default settings for advanced configuration options are used
24454 +CONFIG_HIGHMEM_START=0xfe000000
24455 +CONFIG_LOWMEM_SIZE=0x30000000
24456 +CONFIG_KERNEL_START=0xc0000000
24457 +CONFIG_TASK_SIZE=0x80000000
24458 +CONFIG_CONSISTENT_START=0xfd000000
24459 +CONFIG_CONSISTENT_SIZE=0x00200000
24460 +CONFIG_BOOT_LOAD=0x00400000
24468 +# Networking options
24471 +# CONFIG_PACKET_MMAP is not set
24473 +# CONFIG_NET_KEY is not set
24475 +CONFIG_IP_MULTICAST=y
24476 +# CONFIG_IP_ADVANCED_ROUTER is not set
24477 +CONFIG_IP_FIB_HASH=y
24479 +# CONFIG_IP_PNP_DHCP is not set
24480 +# CONFIG_IP_PNP_BOOTP is not set
24481 +# CONFIG_IP_PNP_RARP is not set
24482 +# CONFIG_NET_IPIP is not set
24483 +# CONFIG_NET_IPGRE is not set
24484 +# CONFIG_IP_MROUTE is not set
24485 +# CONFIG_ARPD is not set
24486 +CONFIG_SYN_COOKIES=y
24487 +# CONFIG_INET_AH is not set
24488 +# CONFIG_INET_ESP is not set
24489 +# CONFIG_INET_IPCOMP is not set
24490 +# CONFIG_INET_XFRM_TUNNEL is not set
24491 +# CONFIG_INET_TUNNEL is not set
24492 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
24493 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
24494 +# CONFIG_INET_XFRM_MODE_BEET is not set
24495 +# CONFIG_INET_LRO is not set
24496 +CONFIG_INET_DIAG=y
24497 +CONFIG_INET_TCP_DIAG=y
24498 +# CONFIG_TCP_CONG_ADVANCED is not set
24499 +CONFIG_TCP_CONG_CUBIC=y
24500 +CONFIG_DEFAULT_TCP_CONG="cubic"
24501 +# CONFIG_TCP_MD5SIG is not set
24502 +# CONFIG_IPV6 is not set
24503 +# CONFIG_INET6_XFRM_TUNNEL is not set
24504 +# CONFIG_INET6_TUNNEL is not set
24505 +# CONFIG_NETWORK_SECMARK is not set
24506 +# CONFIG_NETFILTER is not set
24507 +# CONFIG_IP_DCCP is not set
24508 +# CONFIG_IP_SCTP is not set
24509 +# CONFIG_TIPC is not set
24510 +# CONFIG_ATM is not set
24511 +# CONFIG_BRIDGE is not set
24512 +# CONFIG_VLAN_8021Q is not set
24513 +# CONFIG_DECNET is not set
24514 +# CONFIG_LLC2 is not set
24515 +# CONFIG_IPX is not set
24516 +# CONFIG_ATALK is not set
24517 +# CONFIG_X25 is not set
24518 +# CONFIG_LAPB is not set
24519 +# CONFIG_ECONET is not set
24520 +# CONFIG_WAN_ROUTER is not set
24521 +# CONFIG_NET_SCHED is not set
24526 +# CONFIG_NET_PKTGEN is not set
24527 +# CONFIG_HAMRADIO is not set
24528 +# CONFIG_IRDA is not set
24529 +# CONFIG_BT is not set
24530 +# CONFIG_AF_RXRPC is not set
24535 +# CONFIG_CFG80211 is not set
24536 +# CONFIG_WIRELESS_EXT is not set
24537 +# CONFIG_MAC80211 is not set
24538 +# CONFIG_IEEE80211 is not set
24539 +# CONFIG_RFKILL is not set
24540 +# CONFIG_NET_9P is not set
24547 +# Generic Driver Options
24549 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
24550 +CONFIG_STANDALONE=y
24551 +CONFIG_PREVENT_FIRMWARE_BUILD=y
24552 +# CONFIG_FW_LOADER is not set
24553 +# CONFIG_DEBUG_DRIVER is not set
24554 +# CONFIG_DEBUG_DEVRES is not set
24555 +# CONFIG_SYS_HYPERVISOR is not set
24556 +# CONFIG_CONNECTOR is not set
24558 +# CONFIG_MTD_DEBUG is not set
24559 +# CONFIG_MTD_CONCAT is not set
24560 +# CONFIG_MTD_PARTITIONS is not set
24563 +# User Modules And Translation Layers
24566 +CONFIG_MTD_BLKDEVS=y
24567 +CONFIG_MTD_BLOCK=y
24568 +# CONFIG_FTL is not set
24569 +# CONFIG_NFTL is not set
24570 +# CONFIG_INFTL is not set
24571 +# CONFIG_RFD_FTL is not set
24572 +# CONFIG_SSFDC is not set
24573 +# CONFIG_MTD_OOPS is not set
24576 +# RAM/ROM/Flash chip drivers
24579 +# CONFIG_MTD_JEDECPROBE is not set
24580 +CONFIG_MTD_GEN_PROBE=y
24581 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
24582 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
24583 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
24584 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
24585 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
24586 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
24587 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
24588 +CONFIG_MTD_CFI_I1=y
24589 +CONFIG_MTD_CFI_I2=y
24590 +# CONFIG_MTD_CFI_I4 is not set
24591 +# CONFIG_MTD_CFI_I8 is not set
24592 +# CONFIG_MTD_CFI_INTELEXT is not set
24593 +CONFIG_MTD_CFI_AMDSTD=y
24594 +# CONFIG_MTD_CFI_STAA is not set
24595 +CONFIG_MTD_CFI_UTIL=y
24596 +# CONFIG_MTD_RAM is not set
24597 +# CONFIG_MTD_ROM is not set
24598 +# CONFIG_MTD_ABSENT is not set
24601 +# Mapping drivers for chip access
24603 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
24604 +# CONFIG_MTD_PHYSMAP is not set
24605 +CONFIG_MTD_PHYSMAP_OF=y
24606 +# CONFIG_MTD_CFI_FLAGADM is not set
24607 +# CONFIG_MTD_PLATRAM is not set
24610 +# Self-contained MTD device drivers
24612 +# CONFIG_MTD_SLRAM is not set
24613 +# CONFIG_MTD_PHRAM is not set
24614 +# CONFIG_MTD_MTDRAM is not set
24615 +# CONFIG_MTD_BLOCK2MTD is not set
24618 +# Disk-On-Chip Device Drivers
24620 +# CONFIG_MTD_DOC2000 is not set
24621 +# CONFIG_MTD_DOC2001 is not set
24622 +# CONFIG_MTD_DOC2001PLUS is not set
24623 +# CONFIG_MTD_NAND is not set
24624 +# CONFIG_MTD_ONENAND is not set
24627 +# UBI - Unsorted block images
24629 +# CONFIG_MTD_UBI is not set
24630 +CONFIG_OF_DEVICE=y
24631 +# CONFIG_PARPORT is not set
24632 +# CONFIG_BLK_DEV is not set
24633 +# CONFIG_MISC_DEVICES is not set
24634 +# CONFIG_IDE is not set
24637 +# SCSI device support
24639 +# CONFIG_RAID_ATTRS is not set
24640 +# CONFIG_SCSI is not set
24641 +# CONFIG_SCSI_DMA is not set
24642 +# CONFIG_SCSI_NETLINK is not set
24643 +# CONFIG_ATA is not set
24644 +# CONFIG_MD is not set
24645 +# CONFIG_MACINTOSH_DRIVERS is not set
24646 +CONFIG_NETDEVICES=y
24647 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
24648 +# CONFIG_DUMMY is not set
24649 +# CONFIG_BONDING is not set
24650 +# CONFIG_MACVLAN is not set
24651 +# CONFIG_EQUALIZER is not set
24652 +# CONFIG_TUN is not set
24653 +# CONFIG_VETH is not set
24657 +# MII PHY device drivers
24659 +# CONFIG_MARVELL_PHY is not set
24660 +CONFIG_DAVICOM_PHY=y
24661 +# CONFIG_QSEMI_PHY is not set
24662 +# CONFIG_LXT_PHY is not set
24663 +# CONFIG_CICADA_PHY is not set
24664 +# CONFIG_VITESSE_PHY is not set
24665 +# CONFIG_SMSC_PHY is not set
24666 +# CONFIG_BROADCOM_PHY is not set
24667 +# CONFIG_ICPLUS_PHY is not set
24668 +# CONFIG_FIXED_PHY is not set
24669 +# CONFIG_MDIO_BITBANG is not set
24670 +CONFIG_NET_ETHERNET=y
24672 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
24673 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
24674 +# CONFIG_IBM_NEW_EMAC_TAH is not set
24675 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
24676 +# CONFIG_B44 is not set
24678 +# CONFIG_FS_ENET_HAS_SCC is not set
24679 +CONFIG_FS_ENET_HAS_FEC=y
24680 +CONFIG_FS_ENET_MDIO_FEC=y
24681 +# CONFIG_NETDEV_1000 is not set
24682 +# CONFIG_NETDEV_10000 is not set
24687 +# CONFIG_WLAN_PRE80211 is not set
24688 +# CONFIG_WLAN_80211 is not set
24689 +# CONFIG_WAN is not set
24690 +# CONFIG_PPP is not set
24691 +# CONFIG_SLIP is not set
24692 +# CONFIG_SHAPER is not set
24693 +# CONFIG_NETCONSOLE is not set
24694 +# CONFIG_NETPOLL is not set
24695 +# CONFIG_NET_POLL_CONTROLLER is not set
24696 +# CONFIG_ISDN is not set
24697 +# CONFIG_PHONE is not set
24700 +# Input device support
24703 +# CONFIG_INPUT_FF_MEMLESS is not set
24704 +# CONFIG_INPUT_POLLDEV is not set
24707 +# Userland interfaces
24709 +CONFIG_INPUT_MOUSEDEV=y
24710 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
24711 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
24712 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
24713 +# CONFIG_INPUT_JOYDEV is not set
24714 +# CONFIG_INPUT_EVDEV is not set
24715 +# CONFIG_INPUT_EVBUG is not set
24718 +# Input Device Drivers
24720 +CONFIG_INPUT_KEYBOARD=y
24721 +CONFIG_KEYBOARD_ATKBD=y
24722 +# CONFIG_KEYBOARD_SUNKBD is not set
24723 +# CONFIG_KEYBOARD_LKKBD is not set
24724 +# CONFIG_KEYBOARD_XTKBD is not set
24725 +# CONFIG_KEYBOARD_NEWTON is not set
24726 +# CONFIG_KEYBOARD_STOWAWAY is not set
24727 +CONFIG_INPUT_MOUSE=y
24728 +CONFIG_MOUSE_PS2=y
24729 +CONFIG_MOUSE_PS2_ALPS=y
24730 +CONFIG_MOUSE_PS2_LOGIPS2PP=y
24731 +CONFIG_MOUSE_PS2_SYNAPTICS=y
24732 +CONFIG_MOUSE_PS2_LIFEBOOK=y
24733 +CONFIG_MOUSE_PS2_TRACKPOINT=y
24734 +# CONFIG_MOUSE_PS2_TOUCHKIT is not set
24735 +# CONFIG_MOUSE_SERIAL is not set
24736 +# CONFIG_MOUSE_VSXXXAA is not set
24737 +# CONFIG_INPUT_JOYSTICK is not set
24738 +# CONFIG_INPUT_TABLET is not set
24739 +# CONFIG_INPUT_TOUCHSCREEN is not set
24740 +# CONFIG_INPUT_MISC is not set
24743 +# Hardware I/O ports
24746 +CONFIG_SERIO_I8042=y
24747 +CONFIG_SERIO_SERPORT=y
24748 +CONFIG_SERIO_LIBPS2=y
24749 +# CONFIG_SERIO_RAW is not set
24750 +# CONFIG_GAMEPORT is not set
24753 +# Character devices
24755 +# CONFIG_VT is not set
24756 +# CONFIG_SERIAL_NONSTANDARD is not set
24761 +# CONFIG_SERIAL_8250 is not set
24764 +# Non-8250 serial port support
24766 +# CONFIG_SERIAL_UARTLITE is not set
24767 +CONFIG_SERIAL_CORE=y
24768 +CONFIG_SERIAL_CORE_CONSOLE=y
24769 +CONFIG_SERIAL_CPM=y
24770 +CONFIG_SERIAL_CPM_CONSOLE=y
24771 +# CONFIG_SERIAL_CPM_SCC1 is not set
24772 +# CONFIG_SERIAL_CPM_SCC2 is not set
24773 +# CONFIG_SERIAL_CPM_SCC3 is not set
24774 +# CONFIG_SERIAL_CPM_SCC4 is not set
24775 +CONFIG_SERIAL_CPM_SMC1=y
24776 +CONFIG_SERIAL_CPM_SMC2=y
24777 +CONFIG_UNIX98_PTYS=y
24778 +# CONFIG_LEGACY_PTYS is not set
24779 +# CONFIG_IPMI_HANDLER is not set
24780 +CONFIG_HW_RANDOM=y
24781 +# CONFIG_NVRAM is not set
24783 +# CONFIG_GEN_RTC_X is not set
24784 +# CONFIG_R3964 is not set
24785 +# CONFIG_RAW_DRIVER is not set
24786 +# CONFIG_TCG_TPM is not set
24787 +# CONFIG_I2C is not set
24792 +# CONFIG_SPI is not set
24793 +# CONFIG_SPI_MASTER is not set
24794 +# CONFIG_W1 is not set
24795 +# CONFIG_POWER_SUPPLY is not set
24796 +# CONFIG_HWMON is not set
24797 +# CONFIG_WATCHDOG is not set
24800 +# Sonics Silicon Backplane
24802 +CONFIG_SSB_POSSIBLE=y
24803 +# CONFIG_SSB is not set
24806 +# Multifunction device drivers
24808 +# CONFIG_MFD_SM501 is not set
24811 +# Multimedia devices
24813 +# CONFIG_VIDEO_DEV is not set
24814 +# CONFIG_DVB_CORE is not set
24818 +# Graphics support
24820 +# CONFIG_VGASTATE is not set
24821 +CONFIG_VIDEO_OUTPUT_CONTROL=y
24822 +# CONFIG_FB is not set
24823 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
24826 +# Display device support
24828 +# CONFIG_DISPLAY_SUPPORT is not set
24833 +# CONFIG_SOUND is not set
24834 +# CONFIG_HID_SUPPORT is not set
24835 +# CONFIG_USB_SUPPORT is not set
24836 +# CONFIG_MMC is not set
24837 +# CONFIG_NEW_LEDS is not set
24838 +# CONFIG_EDAC is not set
24839 +# CONFIG_RTC_CLASS is not set
24844 +# CONFIG_UIO is not set
24849 +# CONFIG_EXT2_FS is not set
24850 +# CONFIG_EXT3_FS is not set
24851 +# CONFIG_EXT4DEV_FS is not set
24852 +# CONFIG_REISERFS_FS is not set
24853 +# CONFIG_JFS_FS is not set
24854 +# CONFIG_FS_POSIX_ACL is not set
24855 +# CONFIG_XFS_FS is not set
24856 +# CONFIG_GFS2_FS is not set
24857 +# CONFIG_OCFS2_FS is not set
24858 +# CONFIG_MINIX_FS is not set
24859 +# CONFIG_ROMFS_FS is not set
24860 +# CONFIG_INOTIFY is not set
24861 +# CONFIG_QUOTA is not set
24862 +# CONFIG_DNOTIFY is not set
24863 +# CONFIG_AUTOFS_FS is not set
24864 +# CONFIG_AUTOFS4_FS is not set
24865 +# CONFIG_FUSE_FS is not set
24868 +# CD-ROM/DVD Filesystems
24870 +# CONFIG_ISO9660_FS is not set
24871 +# CONFIG_UDF_FS is not set
24874 +# DOS/FAT/NT Filesystems
24876 +# CONFIG_MSDOS_FS is not set
24877 +# CONFIG_VFAT_FS is not set
24878 +# CONFIG_NTFS_FS is not set
24881 +# Pseudo filesystems
24884 +# CONFIG_PROC_KCORE is not set
24885 +CONFIG_PROC_SYSCTL=y
24888 +# CONFIG_TMPFS_POSIX_ACL is not set
24889 +# CONFIG_HUGETLB_PAGE is not set
24890 +# CONFIG_CONFIGFS_FS is not set
24893 +# Miscellaneous filesystems
24895 +# CONFIG_ADFS_FS is not set
24896 +# CONFIG_AFFS_FS is not set
24897 +# CONFIG_HFS_FS is not set
24898 +# CONFIG_HFSPLUS_FS is not set
24899 +# CONFIG_BEFS_FS is not set
24900 +# CONFIG_BFS_FS is not set
24901 +# CONFIG_EFS_FS is not set
24902 +# CONFIG_JFFS2_FS is not set
24904 +# CONFIG_VXFS_FS is not set
24905 +# CONFIG_HPFS_FS is not set
24906 +# CONFIG_QNX4FS_FS is not set
24907 +# CONFIG_SYSV_FS is not set
24908 +# CONFIG_UFS_FS is not set
24909 +CONFIG_NETWORK_FILESYSTEMS=y
24912 +# CONFIG_NFS_V3_ACL is not set
24913 +# CONFIG_NFS_V4 is not set
24914 +# CONFIG_NFS_DIRECTIO is not set
24915 +# CONFIG_NFSD is not set
24919 +CONFIG_NFS_COMMON=y
24921 +# CONFIG_SUNRPC_BIND34 is not set
24922 +# CONFIG_RPCSEC_GSS_KRB5 is not set
24923 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
24924 +# CONFIG_SMB_FS is not set
24925 +# CONFIG_CIFS is not set
24926 +# CONFIG_NCP_FS is not set
24927 +# CONFIG_CODA_FS is not set
24928 +# CONFIG_AFS_FS is not set
24933 +CONFIG_PARTITION_ADVANCED=y
24934 +# CONFIG_ACORN_PARTITION is not set
24935 +# CONFIG_OSF_PARTITION is not set
24936 +# CONFIG_AMIGA_PARTITION is not set
24937 +# CONFIG_ATARI_PARTITION is not set
24938 +# CONFIG_MAC_PARTITION is not set
24939 +CONFIG_MSDOS_PARTITION=y
24940 +# CONFIG_BSD_DISKLABEL is not set
24941 +# CONFIG_MINIX_SUBPARTITION is not set
24942 +# CONFIG_SOLARIS_X86_PARTITION is not set
24943 +# CONFIG_UNIXWARE_DISKLABEL is not set
24944 +# CONFIG_LDM_PARTITION is not set
24945 +# CONFIG_SGI_PARTITION is not set
24946 +# CONFIG_ULTRIX_PARTITION is not set
24947 +# CONFIG_SUN_PARTITION is not set
24948 +# CONFIG_KARMA_PARTITION is not set
24949 +# CONFIG_EFI_PARTITION is not set
24950 +# CONFIG_SYSV68_PARTITION is not set
24951 +# CONFIG_NLS is not set
24952 +# CONFIG_DLM is not set
24953 +# CONFIG_UCC_SLOW is not set
24956 +# Library routines
24958 +# CONFIG_CRC_CCITT is not set
24959 +# CONFIG_CRC16 is not set
24960 +# CONFIG_CRC_ITU_T is not set
24961 +# CONFIG_CRC32 is not set
24962 +# CONFIG_CRC7 is not set
24963 +# CONFIG_LIBCRC32C is not set
24964 +CONFIG_ZLIB_INFLATE=y
24965 +CONFIG_HAS_IOMEM=y
24966 +CONFIG_HAS_IOPORT=y
24968 +CONFIG_INSTRUMENTATION=y
24969 +# CONFIG_PROFILING is not set
24970 +# CONFIG_MARKERS is not set
24975 +# CONFIG_PRINTK_TIME is not set
24976 +CONFIG_ENABLE_WARN_DEPRECATED=y
24977 +CONFIG_ENABLE_MUST_CHECK=y
24978 +CONFIG_MAGIC_SYSRQ=y
24979 +# CONFIG_UNUSED_SYMBOLS is not set
24980 +# CONFIG_DEBUG_FS is not set
24981 +# CONFIG_HEADERS_CHECK is not set
24982 +CONFIG_DEBUG_KERNEL=y
24983 +# CONFIG_DEBUG_SHIRQ is not set
24984 +CONFIG_DETECT_SOFTLOCKUP=y
24985 +CONFIG_SCHED_DEBUG=y
24986 +# CONFIG_SCHEDSTATS is not set
24987 +# CONFIG_TIMER_STATS is not set
24988 +# CONFIG_SLUB_DEBUG_ON is not set
24989 +# CONFIG_DEBUG_SPINLOCK is not set
24990 +# CONFIG_DEBUG_MUTEXES is not set
24991 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
24992 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
24993 +# CONFIG_DEBUG_KOBJECT is not set
24994 +CONFIG_DEBUG_BUGVERBOSE=y
24995 +CONFIG_DEBUG_INFO=y
24996 +# CONFIG_DEBUG_VM is not set
24997 +# CONFIG_DEBUG_LIST is not set
24998 +# CONFIG_DEBUG_SG is not set
24999 +CONFIG_FORCED_INLINING=y
25000 +# CONFIG_BOOT_PRINTK_DELAY is not set
25001 +# CONFIG_FAULT_INJECTION is not set
25002 +# CONFIG_SAMPLES is not set
25003 +# CONFIG_DEBUG_STACKOVERFLOW is not set
25004 +# CONFIG_DEBUG_STACK_USAGE is not set
25005 +# CONFIG_DEBUG_PAGEALLOC is not set
25006 +# CONFIG_DEBUGGER is not set
25007 +# CONFIG_BDI_SWITCH is not set
25008 +# CONFIG_PPC_EARLY_DEBUG is not set
25011 +# Security options
25013 +# CONFIG_KEYS is not set
25014 +# CONFIG_SECURITY is not set
25015 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
25016 +# CONFIG_CRYPTO is not set
25017 +# CONFIG_PPC_CLOCK is not set
25018 +CONFIG_PPC_LIB_RHEAP=y
25019 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/bamboo_defconfig powerpc.git/arch/powerpc/configs/bamboo_defconfig
25020 --- linux-2.6.24/arch/powerpc/configs/bamboo_defconfig 2008-01-24 23:58:37.000000000 +0100
25021 +++ powerpc.git/arch/powerpc/configs/bamboo_defconfig 2008-01-28 20:25:49.000000000 +0100
25024 # Automatically generated make config: don't edit
25025 -# Linux kernel version: 2.6.24-rc4
25026 -# Thu Dec 6 16:48:04 2007
25027 +# Linux kernel version: 2.6.24-rc6
25028 +# Mon Dec 24 10:49:50 2007
25030 # CONFIG_PPC64 is not set
25032 @@ -131,6 +131,7 @@
25033 # CONFIG_DEFAULT_CFQ is not set
25034 # CONFIG_DEFAULT_NOOP is not set
25035 CONFIG_DEFAULT_IOSCHED="anticipatory"
25036 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
25040 @@ -143,6 +144,9 @@
25042 # CONFIG_EBONY is not set
25043 # CONFIG_SEQUOIA is not set
25044 +# CONFIG_TAISHAN is not set
25045 +# CONFIG_KATMAI is not set
25046 +# CONFIG_RAINIER is not set
25048 CONFIG_IBM440EP_ERR42=y
25049 # CONFIG_MPIC is not set
25050 @@ -372,9 +376,7 @@
25051 # CONFIG_FIREWIRE is not set
25052 # CONFIG_IEEE1394 is not set
25053 # CONFIG_I2O is not set
25054 -CONFIG_MACINTOSH_DRIVERS=y
25055 -# CONFIG_MAC_EMUMOUSEBTN is not set
25056 -# CONFIG_WINDFARM is not set
25057 +# CONFIG_MACINTOSH_DRIVERS is not set
25058 CONFIG_NETDEVICES=y
25059 # CONFIG_NETDEVICES_MULTIQUEUE is not set
25060 # CONFIG_DUMMY is not set
25061 @@ -736,19 +738,7 @@
25062 # CONFIG_KGDB is not set
25063 # CONFIG_XMON is not set
25064 # CONFIG_BDI_SWITCH is not set
25065 -CONFIG_PPC_EARLY_DEBUG=y
25066 -# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
25067 -# CONFIG_PPC_EARLY_DEBUG_G5 is not set
25068 -# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
25069 -# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
25070 -# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
25071 -# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
25072 -# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
25073 -# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
25074 -CONFIG_PPC_EARLY_DEBUG_44x=y
25075 -# CONFIG_PPC_EARLY_DEBUG_CPM is not set
25076 -CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
25077 -CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x0
25078 +# CONFIG_PPC_EARLY_DEBUG is not set
25082 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/celleb_defconfig powerpc.git/arch/powerpc/configs/celleb_defconfig
25083 --- linux-2.6.24/arch/powerpc/configs/celleb_defconfig 2008-01-24 23:58:37.000000000 +0100
25084 +++ powerpc.git/arch/powerpc/configs/celleb_defconfig 2008-01-28 20:25:49.000000000 +0100
25086 CONFIG_GENERIC_BUG=y
25087 # CONFIG_DEFAULT_UIMAGE is not set
25088 # CONFIG_PPC_DCR_NATIVE is not set
25089 -# CONFIG_PPC_DCR_MMIO is not set
25090 +CONFIG_PPC_DCR_MMIO=y
25092 CONFIG_PPC_OF_PLATFORM_PCI=y
25093 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
25095 @@ -148,7 +149,7 @@
25096 CONFIG_PPC_CELLEB=y
25097 # CONFIG_PPC_PS3 is not set
25099 -# CONFIG_PPC_CELL_NATIVE is not set
25100 +CONFIG_PPC_CELL_NATIVE=y
25101 # CONFIG_PPC_IBM_CELL_BLADE is not set
25104 @@ -157,13 +158,19 @@
25106 CONFIG_SPU_FS_64K_LS=y
25109 +# CONFIG_CBE_THERM is not set
25110 # CONFIG_PQ2ADS is not set
25111 +CONFIG_PPC_NATIVE=y
25112 +CONFIG_UDBG_RTAS_CONSOLE=y
25113 CONFIG_PPC_UDBG_BEAT=y
25114 -# CONFIG_MPIC is not set
25116 # CONFIG_MPIC_WEIRD is not set
25117 # CONFIG_PPC_I8259 is not set
25118 # CONFIG_U3_DART is not set
25119 -# CONFIG_PPC_RTAS is not set
25121 +# CONFIG_RTAS_ERROR_LOGGING is not set
25122 +# CONFIG_RTAS_PROC is not set
25123 # CONFIG_MMIO_NVRAM is not set
25124 # CONFIG_PPC_MPC106 is not set
25125 # CONFIG_PPC_970_NAP is not set
25126 @@ -593,10 +600,11 @@
25127 # CONFIG_NET_VENDOR_3COM is not set
25128 # CONFIG_NET_TULIP is not set
25129 # CONFIG_HP100 is not set
25130 -# CONFIG_IBM_NEW_EMAC_ZMII is not set
25131 -# CONFIG_IBM_NEW_EMAC_RGMII is not set
25132 -# CONFIG_IBM_NEW_EMAC_TAH is not set
25133 -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
25134 +# CONFIG_IBM_NEW_EMAC is not set
25135 +CONFIG_IBM_NEW_EMAC_ZMII=y
25136 +CONFIG_IBM_NEW_EMAC_RGMII=y
25137 +CONFIG_IBM_NEW_EMAC_TAH=y
25138 +CONFIG_IBM_NEW_EMAC_EMAC4=y
25139 # CONFIG_NET_PCI is not set
25140 # CONFIG_B44 is not set
25141 CONFIG_NETDEV_1000=y
25142 @@ -741,6 +749,7 @@
25143 CONFIG_UNIX98_PTYS=y
25144 # CONFIG_LEGACY_PTYS is not set
25145 CONFIG_HVC_DRIVER=y
25148 # CONFIG_IPMI_HANDLER is not set
25149 # CONFIG_HW_RANDOM is not set
25150 @@ -822,6 +831,7 @@
25151 # Watchdog Device Drivers
25153 # CONFIG_SOFT_WATCHDOG is not set
25154 +# CONFIG_WATCHDOG_RTAS is not set
25157 # PCI-based Watchdog Cards
25158 @@ -1245,17 +1255,7 @@
25160 # CONFIG_VIRQ_DEBUG is not set
25161 # CONFIG_BOOTX_TEXT is not set
25162 -CONFIG_PPC_EARLY_DEBUG=y
25163 -# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
25164 -# CONFIG_PPC_EARLY_DEBUG_G5 is not set
25165 -# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
25166 -# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
25167 -# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
25168 -# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
25169 -# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
25170 -CONFIG_PPC_EARLY_DEBUG_BEAT=y
25171 -# CONFIG_PPC_EARLY_DEBUG_44x is not set
25172 -# CONFIG_PPC_EARLY_DEBUG_CPM is not set
25173 +# CONFIG_PPC_EARLY_DEBUG is not set
25177 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/ebony_defconfig powerpc.git/arch/powerpc/configs/ebony_defconfig
25178 --- linux-2.6.24/arch/powerpc/configs/ebony_defconfig 2008-01-24 23:58:37.000000000 +0100
25179 +++ powerpc.git/arch/powerpc/configs/ebony_defconfig 2008-01-28 20:25:49.000000000 +0100
25182 # Automatically generated make config: don't edit
25183 -# Linux kernel version: 2.6.24-rc4
25184 -# Thu Dec 6 16:48:11 2007
25185 +# Linux kernel version: 2.6.24-rc6
25186 +# Mon Dec 24 11:16:26 2007
25188 # CONFIG_PPC64 is not set
25190 @@ -130,6 +130,7 @@
25191 # CONFIG_DEFAULT_CFQ is not set
25192 # CONFIG_DEFAULT_NOOP is not set
25193 CONFIG_DEFAULT_IOSCHED="anticipatory"
25194 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
25198 @@ -142,6 +143,9 @@
25199 # CONFIG_BAMBOO is not set
25201 # CONFIG_SEQUOIA is not set
25202 +# CONFIG_TAISHAN is not set
25203 +# CONFIG_KATMAI is not set
25204 +# CONFIG_RAINIER is not set
25206 # CONFIG_MPIC is not set
25207 # CONFIG_MPIC_WEIRD is not set
25208 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/ep405_defconfig powerpc.git/arch/powerpc/configs/ep405_defconfig
25209 --- linux-2.6.24/arch/powerpc/configs/ep405_defconfig 1970-01-01 01:00:00.000000000 +0100
25210 +++ powerpc.git/arch/powerpc/configs/ep405_defconfig 2008-01-28 20:25:49.000000000 +0100
25213 +# Automatically generated make config: don't edit
25214 +# Linux kernel version: 2.6.24-rc6
25215 +# Mon Dec 24 11:17:13 2007
25217 +# CONFIG_PPC64 is not set
25220 +# Processor support
25222 +# CONFIG_6xx is not set
25223 +# CONFIG_PPC_85xx is not set
25224 +# CONFIG_PPC_8xx is not set
25226 +# CONFIG_44x is not set
25227 +# CONFIG_E200 is not set
25229 +# CONFIG_PPC_MM_SLICES is not set
25230 +CONFIG_NOT_COHERENT_CACHE=y
25232 +CONFIG_WORD_SIZE=32
25233 +CONFIG_PPC_MERGE=y
25235 +CONFIG_GENERIC_CMOS_UPDATE=y
25236 +CONFIG_GENERIC_TIME=y
25237 +CONFIG_GENERIC_TIME_VSYSCALL=y
25238 +CONFIG_GENERIC_CLOCKEVENTS=y
25239 +CONFIG_GENERIC_HARDIRQS=y
25240 +CONFIG_IRQ_PER_CPU=y
25241 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
25242 +CONFIG_ARCH_HAS_ILOG2_U32=y
25243 +CONFIG_GENERIC_HWEIGHT=y
25244 +CONFIG_GENERIC_CALIBRATE_DELAY=y
25245 +CONFIG_GENERIC_FIND_NEXT_BIT=y
25246 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
25248 +CONFIG_EARLY_PRINTK=y
25249 +CONFIG_GENERIC_NVRAM=y
25250 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
25251 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
25254 +CONFIG_PPC_UDBG_16550=y
25255 +# CONFIG_GENERIC_TBSYNC is not set
25256 +CONFIG_AUDIT_ARCH=y
25257 +CONFIG_GENERIC_BUG=y
25258 +# CONFIG_DEFAULT_UIMAGE is not set
25259 +CONFIG_PPC_DCR_NATIVE=y
25260 +# CONFIG_PPC_DCR_MMIO is not set
25262 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
25267 +CONFIG_EXPERIMENTAL=y
25268 +CONFIG_BROKEN_ON_SMP=y
25269 +CONFIG_INIT_ENV_ARG_LIMIT=32
25270 +CONFIG_LOCALVERSION=""
25271 +CONFIG_LOCALVERSION_AUTO=y
25274 +CONFIG_SYSVIPC_SYSCTL=y
25275 +CONFIG_POSIX_MQUEUE=y
25276 +# CONFIG_BSD_PROCESS_ACCT is not set
25277 +# CONFIG_TASKSTATS is not set
25278 +# CONFIG_USER_NS is not set
25279 +# CONFIG_PID_NS is not set
25280 +# CONFIG_AUDIT is not set
25281 +# CONFIG_IKCONFIG is not set
25282 +CONFIG_LOG_BUF_SHIFT=14
25283 +# CONFIG_CGROUPS is not set
25284 +CONFIG_FAIR_GROUP_SCHED=y
25285 +CONFIG_FAIR_USER_SCHED=y
25286 +# CONFIG_FAIR_CGROUP_SCHED is not set
25287 +CONFIG_SYSFS_DEPRECATED=y
25288 +# CONFIG_RELAY is not set
25289 +CONFIG_BLK_DEV_INITRD=y
25290 +CONFIG_INITRAMFS_SOURCE=""
25291 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
25294 +CONFIG_SYSCTL_SYSCALL=y
25296 +CONFIG_KALLSYMS_ALL=y
25297 +CONFIG_KALLSYMS_EXTRA_PASS=y
25302 +CONFIG_BASE_FULL=y
25304 +CONFIG_ANON_INODES=y
25309 +CONFIG_VM_EVENT_COUNTERS=y
25310 +CONFIG_SLUB_DEBUG=y
25311 +# CONFIG_SLAB is not set
25313 +# CONFIG_SLOB is not set
25314 +CONFIG_RT_MUTEXES=y
25315 +# CONFIG_TINY_SHMEM is not set
25316 +CONFIG_BASE_SMALL=0
25318 +CONFIG_MODULE_UNLOAD=y
25319 +# CONFIG_MODULE_FORCE_UNLOAD is not set
25320 +# CONFIG_MODVERSIONS is not set
25321 +# CONFIG_MODULE_SRCVERSION_ALL is not set
25325 +# CONFIG_BLK_DEV_IO_TRACE is not set
25326 +# CONFIG_LSF is not set
25327 +# CONFIG_BLK_DEV_BSG is not set
25332 +CONFIG_IOSCHED_NOOP=y
25333 +CONFIG_IOSCHED_AS=y
25334 +CONFIG_IOSCHED_DEADLINE=y
25335 +CONFIG_IOSCHED_CFQ=y
25336 +CONFIG_DEFAULT_AS=y
25337 +# CONFIG_DEFAULT_DEADLINE is not set
25338 +# CONFIG_DEFAULT_CFQ is not set
25339 +# CONFIG_DEFAULT_NOOP is not set
25340 +CONFIG_DEFAULT_IOSCHED="anticipatory"
25341 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
25344 +# Platform support
25346 +# CONFIG_PPC_MPC52xx is not set
25347 +# CONFIG_PPC_MPC5200 is not set
25348 +# CONFIG_PPC_CELL is not set
25349 +# CONFIG_PPC_CELL_NATIVE is not set
25350 +# CONFIG_PQ2ADS is not set
25352 +# CONFIG_KILAUEA is not set
25353 +# CONFIG_MAKALU is not set
25354 +# CONFIG_WALNUT is not set
25355 +# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
25357 +CONFIG_IBM405_ERR77=y
25358 +CONFIG_IBM405_ERR51=y
25359 +# CONFIG_MPIC is not set
25360 +# CONFIG_MPIC_WEIRD is not set
25361 +# CONFIG_PPC_I8259 is not set
25362 +# CONFIG_PPC_RTAS is not set
25363 +# CONFIG_MMIO_NVRAM is not set
25364 +# CONFIG_PPC_MPC106 is not set
25365 +# CONFIG_PPC_970_NAP is not set
25366 +# CONFIG_PPC_INDIRECT_IO is not set
25367 +# CONFIG_GENERIC_IOMAP is not set
25368 +# CONFIG_CPU_FREQ is not set
25369 +# CONFIG_CPM2 is not set
25370 +# CONFIG_FSL_ULI1575 is not set
25375 +# CONFIG_HIGHMEM is not set
25376 +# CONFIG_TICK_ONESHOT is not set
25377 +# CONFIG_NO_HZ is not set
25378 +# CONFIG_HIGH_RES_TIMERS is not set
25379 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
25380 +# CONFIG_HZ_100 is not set
25382 +# CONFIG_HZ_300 is not set
25383 +# CONFIG_HZ_1000 is not set
25385 +CONFIG_PREEMPT_NONE=y
25386 +# CONFIG_PREEMPT_VOLUNTARY is not set
25387 +# CONFIG_PREEMPT is not set
25388 +CONFIG_BINFMT_ELF=y
25389 +# CONFIG_BINFMT_MISC is not set
25390 +# CONFIG_MATH_EMULATION is not set
25391 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
25392 +CONFIG_ARCH_FLATMEM_ENABLE=y
25393 +CONFIG_ARCH_POPULATES_NODE_MAP=y
25394 +CONFIG_SELECT_MEMORY_MODEL=y
25395 +CONFIG_FLATMEM_MANUAL=y
25396 +# CONFIG_DISCONTIGMEM_MANUAL is not set
25397 +# CONFIG_SPARSEMEM_MANUAL is not set
25399 +CONFIG_FLAT_NODE_MEM_MAP=y
25400 +# CONFIG_SPARSEMEM_STATIC is not set
25401 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
25402 +CONFIG_SPLIT_PTLOCK_CPUS=4
25403 +# CONFIG_RESOURCES_64BIT is not set
25404 +CONFIG_ZONE_DMA_FLAG=1
25406 +CONFIG_VIRT_TO_BUS=y
25407 +CONFIG_PROC_DEVICETREE=y
25408 +# CONFIG_CMDLINE_BOOL is not set
25409 +# CONFIG_PM is not set
25410 +CONFIG_SUSPEND_UP_POSSIBLE=y
25411 +CONFIG_HIBERNATION_UP_POSSIBLE=y
25413 +CONFIG_WANT_DEVICE_TREE=y
25414 +CONFIG_DEVICE_TREE="ep405.dts"
25415 +CONFIG_ISA_DMA_API=y
25421 +CONFIG_PPC_INDIRECT_PCI=y
25423 +CONFIG_PCI_DOMAINS=y
25424 +CONFIG_PCI_SYSCALL=y
25425 +# CONFIG_PCIEPORTBUS is not set
25426 +CONFIG_ARCH_SUPPORTS_MSI=y
25427 +# CONFIG_PCI_MSI is not set
25428 +CONFIG_PCI_LEGACY=y
25429 +# CONFIG_PCI_DEBUG is not set
25430 +# CONFIG_PCCARD is not set
25431 +# CONFIG_HOTPLUG_PCI is not set
25436 +# CONFIG_ADVANCED_OPTIONS is not set
25439 +# Default settings for advanced configuration options are used
25441 +CONFIG_HIGHMEM_START=0xfe000000
25442 +CONFIG_LOWMEM_SIZE=0x30000000
25443 +CONFIG_KERNEL_START=0xc0000000
25444 +CONFIG_TASK_SIZE=0xc0000000
25445 +CONFIG_CONSISTENT_START=0xff100000
25446 +CONFIG_CONSISTENT_SIZE=0x00200000
25447 +CONFIG_BOOT_LOAD=0x00400000
25455 +# Networking options
25458 +# CONFIG_PACKET_MMAP is not set
25460 +# CONFIG_NET_KEY is not set
25462 +# CONFIG_IP_MULTICAST is not set
25463 +# CONFIG_IP_ADVANCED_ROUTER is not set
25464 +CONFIG_IP_FIB_HASH=y
25466 +CONFIG_IP_PNP_DHCP=y
25467 +CONFIG_IP_PNP_BOOTP=y
25468 +# CONFIG_IP_PNP_RARP is not set
25469 +# CONFIG_NET_IPIP is not set
25470 +# CONFIG_NET_IPGRE is not set
25471 +# CONFIG_ARPD is not set
25472 +# CONFIG_SYN_COOKIES is not set
25473 +# CONFIG_INET_AH is not set
25474 +# CONFIG_INET_ESP is not set
25475 +# CONFIG_INET_IPCOMP is not set
25476 +# CONFIG_INET_XFRM_TUNNEL is not set
25477 +# CONFIG_INET_TUNNEL is not set
25478 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
25479 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
25480 +# CONFIG_INET_XFRM_MODE_BEET is not set
25481 +# CONFIG_INET_LRO is not set
25482 +CONFIG_INET_DIAG=y
25483 +CONFIG_INET_TCP_DIAG=y
25484 +# CONFIG_TCP_CONG_ADVANCED is not set
25485 +CONFIG_TCP_CONG_CUBIC=y
25486 +CONFIG_DEFAULT_TCP_CONG="cubic"
25487 +# CONFIG_TCP_MD5SIG is not set
25488 +# CONFIG_IPV6 is not set
25489 +# CONFIG_INET6_XFRM_TUNNEL is not set
25490 +# CONFIG_INET6_TUNNEL is not set
25491 +# CONFIG_NETWORK_SECMARK is not set
25492 +# CONFIG_NETFILTER is not set
25493 +# CONFIG_IP_DCCP is not set
25494 +# CONFIG_IP_SCTP is not set
25495 +# CONFIG_TIPC is not set
25496 +# CONFIG_ATM is not set
25497 +# CONFIG_BRIDGE is not set
25498 +# CONFIG_VLAN_8021Q is not set
25499 +# CONFIG_DECNET is not set
25500 +# CONFIG_LLC2 is not set
25501 +# CONFIG_IPX is not set
25502 +# CONFIG_ATALK is not set
25503 +# CONFIG_X25 is not set
25504 +# CONFIG_LAPB is not set
25505 +# CONFIG_ECONET is not set
25506 +# CONFIG_WAN_ROUTER is not set
25507 +# CONFIG_NET_SCHED is not set
25512 +# CONFIG_NET_PKTGEN is not set
25513 +# CONFIG_HAMRADIO is not set
25514 +# CONFIG_IRDA is not set
25515 +# CONFIG_BT is not set
25516 +# CONFIG_AF_RXRPC is not set
25521 +# CONFIG_CFG80211 is not set
25522 +# CONFIG_WIRELESS_EXT is not set
25523 +# CONFIG_MAC80211 is not set
25524 +# CONFIG_IEEE80211 is not set
25525 +# CONFIG_RFKILL is not set
25526 +# CONFIG_NET_9P is not set
25533 +# Generic Driver Options
25535 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
25536 +CONFIG_STANDALONE=y
25537 +CONFIG_PREVENT_FIRMWARE_BUILD=y
25538 +CONFIG_FW_LOADER=y
25539 +# CONFIG_DEBUG_DRIVER is not set
25540 +# CONFIG_DEBUG_DEVRES is not set
25541 +# CONFIG_SYS_HYPERVISOR is not set
25542 +CONFIG_CONNECTOR=y
25543 +CONFIG_PROC_EVENTS=y
25545 +# CONFIG_MTD_DEBUG is not set
25546 +# CONFIG_MTD_CONCAT is not set
25547 +CONFIG_MTD_PARTITIONS=y
25548 +# CONFIG_MTD_REDBOOT_PARTS is not set
25549 +CONFIG_MTD_CMDLINE_PARTS=y
25552 +# User Modules And Translation Layers
25555 +CONFIG_MTD_BLKDEVS=m
25556 +CONFIG_MTD_BLOCK=m
25557 +# CONFIG_MTD_BLOCK_RO is not set
25558 +# CONFIG_FTL is not set
25559 +# CONFIG_NFTL is not set
25560 +# CONFIG_INFTL is not set
25561 +# CONFIG_RFD_FTL is not set
25562 +# CONFIG_SSFDC is not set
25563 +# CONFIG_MTD_OOPS is not set
25566 +# RAM/ROM/Flash chip drivers
25569 +CONFIG_MTD_JEDECPROBE=y
25570 +CONFIG_MTD_GEN_PROBE=y
25571 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
25572 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
25573 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
25574 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
25575 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
25576 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
25577 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
25578 +CONFIG_MTD_CFI_I1=y
25579 +CONFIG_MTD_CFI_I2=y
25580 +# CONFIG_MTD_CFI_I4 is not set
25581 +# CONFIG_MTD_CFI_I8 is not set
25582 +# CONFIG_MTD_CFI_INTELEXT is not set
25583 +CONFIG_MTD_CFI_AMDSTD=y
25584 +# CONFIG_MTD_CFI_STAA is not set
25585 +CONFIG_MTD_CFI_UTIL=y
25586 +# CONFIG_MTD_RAM is not set
25587 +# CONFIG_MTD_ROM is not set
25588 +# CONFIG_MTD_ABSENT is not set
25591 +# Mapping drivers for chip access
25593 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
25594 +# CONFIG_MTD_PHYSMAP is not set
25595 +CONFIG_MTD_PHYSMAP_OF=y
25596 +# CONFIG_MTD_INTEL_VR_NOR is not set
25597 +# CONFIG_MTD_PLATRAM is not set
25600 +# Self-contained MTD device drivers
25602 +# CONFIG_MTD_PMC551 is not set
25603 +# CONFIG_MTD_SLRAM is not set
25604 +# CONFIG_MTD_PHRAM is not set
25605 +# CONFIG_MTD_MTDRAM is not set
25606 +# CONFIG_MTD_BLOCK2MTD is not set
25609 +# Disk-On-Chip Device Drivers
25611 +# CONFIG_MTD_DOC2000 is not set
25612 +# CONFIG_MTD_DOC2001 is not set
25613 +# CONFIG_MTD_DOC2001PLUS is not set
25614 +# CONFIG_MTD_NAND is not set
25615 +# CONFIG_MTD_ONENAND is not set
25618 +# UBI - Unsorted block images
25620 +# CONFIG_MTD_UBI is not set
25621 +CONFIG_OF_DEVICE=y
25622 +# CONFIG_PARPORT is not set
25624 +# CONFIG_BLK_DEV_FD is not set
25625 +# CONFIG_BLK_CPQ_DA is not set
25626 +# CONFIG_BLK_CPQ_CISS_DA is not set
25627 +# CONFIG_BLK_DEV_DAC960 is not set
25628 +# CONFIG_BLK_DEV_UMEM is not set
25629 +# CONFIG_BLK_DEV_COW_COMMON is not set
25630 +# CONFIG_BLK_DEV_LOOP is not set
25631 +# CONFIG_BLK_DEV_NBD is not set
25632 +# CONFIG_BLK_DEV_SX8 is not set
25633 +# CONFIG_BLK_DEV_UB is not set
25634 +CONFIG_BLK_DEV_RAM=y
25635 +CONFIG_BLK_DEV_RAM_COUNT=16
25636 +CONFIG_BLK_DEV_RAM_SIZE=35000
25637 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
25638 +# CONFIG_CDROM_PKTCDVD is not set
25639 +# CONFIG_ATA_OVER_ETH is not set
25640 +# CONFIG_XILINX_SYSACE is not set
25641 +CONFIG_MISC_DEVICES=y
25642 +# CONFIG_PHANTOM is not set
25643 +# CONFIG_EEPROM_93CX6 is not set
25644 +# CONFIG_SGI_IOC4 is not set
25645 +# CONFIG_TIFM_CORE is not set
25646 +# CONFIG_IDE is not set
25649 +# SCSI device support
25651 +# CONFIG_RAID_ATTRS is not set
25652 +# CONFIG_SCSI is not set
25653 +# CONFIG_SCSI_DMA is not set
25654 +# CONFIG_SCSI_NETLINK is not set
25655 +# CONFIG_ATA is not set
25656 +# CONFIG_MD is not set
25657 +# CONFIG_FUSION is not set
25660 +# IEEE 1394 (FireWire) support
25662 +# CONFIG_FIREWIRE is not set
25663 +# CONFIG_IEEE1394 is not set
25664 +# CONFIG_I2O is not set
25665 +# CONFIG_MACINTOSH_DRIVERS is not set
25666 +CONFIG_NETDEVICES=y
25667 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
25668 +# CONFIG_DUMMY is not set
25669 +# CONFIG_BONDING is not set
25670 +# CONFIG_MACVLAN is not set
25671 +# CONFIG_EQUALIZER is not set
25672 +# CONFIG_TUN is not set
25673 +# CONFIG_VETH is not set
25674 +# CONFIG_IP1000 is not set
25675 +# CONFIG_ARCNET is not set
25676 +# CONFIG_PHYLIB is not set
25677 +CONFIG_NET_ETHERNET=y
25678 +# CONFIG_MII is not set
25679 +# CONFIG_HAPPYMEAL is not set
25680 +# CONFIG_SUNGEM is not set
25681 +# CONFIG_CASSINI is not set
25682 +# CONFIG_NET_VENDOR_3COM is not set
25683 +# CONFIG_NET_TULIP is not set
25684 +# CONFIG_HP100 is not set
25685 +CONFIG_IBM_NEW_EMAC=y
25686 +CONFIG_IBM_NEW_EMAC_RXB=128
25687 +CONFIG_IBM_NEW_EMAC_TXB=64
25688 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
25689 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
25690 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
25691 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
25692 +CONFIG_IBM_NEW_EMAC_ZMII=y
25693 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
25694 +# CONFIG_IBM_NEW_EMAC_TAH is not set
25695 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
25696 +# CONFIG_NET_PCI is not set
25697 +# CONFIG_B44 is not set
25698 +CONFIG_NETDEV_1000=y
25699 +# CONFIG_ACENIC is not set
25700 +# CONFIG_DL2K is not set
25701 +# CONFIG_E1000 is not set
25702 +# CONFIG_E1000E is not set
25703 +# CONFIG_NS83820 is not set
25704 +# CONFIG_HAMACHI is not set
25705 +# CONFIG_YELLOWFIN is not set
25706 +# CONFIG_R8169 is not set
25707 +# CONFIG_SIS190 is not set
25708 +# CONFIG_SKGE is not set
25709 +# CONFIG_SKY2 is not set
25710 +# CONFIG_SK98LIN is not set
25711 +# CONFIG_VIA_VELOCITY is not set
25712 +# CONFIG_TIGON3 is not set
25713 +# CONFIG_BNX2 is not set
25714 +# CONFIG_QLA3XXX is not set
25715 +# CONFIG_ATL1 is not set
25716 +CONFIG_NETDEV_10000=y
25717 +# CONFIG_CHELSIO_T1 is not set
25718 +# CONFIG_CHELSIO_T3 is not set
25719 +# CONFIG_IXGBE is not set
25720 +# CONFIG_IXGB is not set
25721 +# CONFIG_S2IO is not set
25722 +# CONFIG_MYRI10GE is not set
25723 +# CONFIG_NETXEN_NIC is not set
25724 +# CONFIG_NIU is not set
25725 +# CONFIG_MLX4_CORE is not set
25726 +# CONFIG_TEHUTI is not set
25727 +# CONFIG_TR is not set
25732 +# CONFIG_WLAN_PRE80211 is not set
25733 +# CONFIG_WLAN_80211 is not set
25736 +# USB Network Adapters
25738 +# CONFIG_USB_CATC is not set
25739 +# CONFIG_USB_KAWETH is not set
25740 +# CONFIG_USB_PEGASUS is not set
25741 +# CONFIG_USB_RTL8150 is not set
25742 +# CONFIG_USB_USBNET is not set
25743 +# CONFIG_WAN is not set
25744 +# CONFIG_FDDI is not set
25745 +# CONFIG_HIPPI is not set
25746 +# CONFIG_PPP is not set
25747 +# CONFIG_SLIP is not set
25748 +# CONFIG_SHAPER is not set
25749 +# CONFIG_NETCONSOLE is not set
25750 +# CONFIG_NETPOLL is not set
25751 +# CONFIG_NET_POLL_CONTROLLER is not set
25752 +# CONFIG_ISDN is not set
25753 +# CONFIG_PHONE is not set
25756 +# Input device support
25758 +# CONFIG_INPUT is not set
25761 +# Hardware I/O ports
25763 +# CONFIG_SERIO is not set
25764 +# CONFIG_GAMEPORT is not set
25767 +# Character devices
25769 +# CONFIG_VT is not set
25770 +# CONFIG_SERIAL_NONSTANDARD is not set
25775 +CONFIG_SERIAL_8250=y
25776 +CONFIG_SERIAL_8250_CONSOLE=y
25777 +CONFIG_SERIAL_8250_PCI=y
25778 +CONFIG_SERIAL_8250_NR_UARTS=4
25779 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
25780 +CONFIG_SERIAL_8250_EXTENDED=y
25781 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
25782 +CONFIG_SERIAL_8250_SHARE_IRQ=y
25783 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
25784 +# CONFIG_SERIAL_8250_RSA is not set
25787 +# Non-8250 serial port support
25789 +# CONFIG_SERIAL_UARTLITE is not set
25790 +CONFIG_SERIAL_CORE=y
25791 +CONFIG_SERIAL_CORE_CONSOLE=y
25792 +# CONFIG_SERIAL_JSM is not set
25793 +CONFIG_SERIAL_OF_PLATFORM=y
25794 +CONFIG_UNIX98_PTYS=y
25795 +CONFIG_LEGACY_PTYS=y
25796 +CONFIG_LEGACY_PTY_COUNT=256
25797 +# CONFIG_IPMI_HANDLER is not set
25798 +# CONFIG_HW_RANDOM is not set
25799 +# CONFIG_NVRAM is not set
25800 +# CONFIG_GEN_RTC is not set
25801 +# CONFIG_R3964 is not set
25802 +# CONFIG_APPLICOM is not set
25803 +# CONFIG_RAW_DRIVER is not set
25804 +# CONFIG_TCG_TPM is not set
25806 +# CONFIG_I2C is not set
25811 +# CONFIG_SPI is not set
25812 +# CONFIG_SPI_MASTER is not set
25813 +# CONFIG_W1 is not set
25814 +# CONFIG_POWER_SUPPLY is not set
25815 +# CONFIG_HWMON is not set
25816 +# CONFIG_WATCHDOG is not set
25819 +# Sonics Silicon Backplane
25821 +CONFIG_SSB_POSSIBLE=y
25822 +# CONFIG_SSB is not set
25825 +# Multifunction device drivers
25827 +# CONFIG_MFD_SM501 is not set
25830 +# Multimedia devices
25832 +# CONFIG_VIDEO_DEV is not set
25833 +# CONFIG_DVB_CORE is not set
25834 +# CONFIG_DAB is not set
25837 +# Graphics support
25839 +# CONFIG_AGP is not set
25840 +# CONFIG_DRM is not set
25841 +# CONFIG_VGASTATE is not set
25842 +CONFIG_VIDEO_OUTPUT_CONTROL=m
25843 +# CONFIG_FB is not set
25844 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
25847 +# Display device support
25849 +# CONFIG_DISPLAY_SUPPORT is not set
25854 +# CONFIG_SOUND is not set
25855 +CONFIG_USB_SUPPORT=y
25856 +CONFIG_USB_ARCH_HAS_HCD=y
25857 +CONFIG_USB_ARCH_HAS_OHCI=y
25858 +CONFIG_USB_ARCH_HAS_EHCI=y
25860 +# CONFIG_USB_DEBUG is not set
25863 +# Miscellaneous USB options
25865 +CONFIG_USB_DEVICEFS=y
25866 +CONFIG_USB_DEVICE_CLASS=y
25867 +# CONFIG_USB_DYNAMIC_MINORS is not set
25868 +# CONFIG_USB_OTG is not set
25871 +# USB Host Controller Drivers
25873 +# CONFIG_USB_EHCI_HCD is not set
25874 +# CONFIG_USB_ISP116X_HCD is not set
25875 +CONFIG_USB_OHCI_HCD=y
25876 +CONFIG_USB_OHCI_HCD_PPC_OF=y
25877 +CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
25878 +CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
25879 +CONFIG_USB_OHCI_HCD_PCI=y
25880 +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
25881 +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
25882 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
25883 +# CONFIG_USB_UHCI_HCD is not set
25884 +# CONFIG_USB_SL811_HCD is not set
25885 +# CONFIG_USB_R8A66597_HCD is not set
25888 +# USB Device Class drivers
25890 +# CONFIG_USB_ACM is not set
25891 +# CONFIG_USB_PRINTER is not set
25894 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
25898 +# may also be needed; see USB_STORAGE Help for more information
25900 +# CONFIG_USB_LIBUSUAL is not set
25903 +# USB Imaging devices
25905 +# CONFIG_USB_MDC800 is not set
25909 +# USB port drivers
25913 +# USB Serial Converter support
25915 +# CONFIG_USB_SERIAL is not set
25918 +# USB Miscellaneous drivers
25920 +# CONFIG_USB_EMI62 is not set
25921 +# CONFIG_USB_EMI26 is not set
25922 +# CONFIG_USB_ADUTUX is not set
25923 +# CONFIG_USB_AUERSWALD is not set
25924 +# CONFIG_USB_RIO500 is not set
25925 +# CONFIG_USB_LEGOTOWER is not set
25926 +# CONFIG_USB_LCD is not set
25927 +# CONFIG_USB_BERRY_CHARGE is not set
25928 +# CONFIG_USB_LED is not set
25929 +# CONFIG_USB_CYPRESS_CY7C63 is not set
25930 +# CONFIG_USB_CYTHERM is not set
25931 +# CONFIG_USB_PHIDGET is not set
25932 +# CONFIG_USB_IDMOUSE is not set
25933 +# CONFIG_USB_FTDI_ELAN is not set
25934 +# CONFIG_USB_APPLEDISPLAY is not set
25935 +# CONFIG_USB_LD is not set
25936 +# CONFIG_USB_TRANCEVIBRATOR is not set
25937 +# CONFIG_USB_IOWARRIOR is not set
25938 +# CONFIG_USB_TEST is not set
25941 +# USB DSL modem support
25945 +# USB Gadget Support
25947 +# CONFIG_USB_GADGET is not set
25948 +# CONFIG_MMC is not set
25949 +# CONFIG_NEW_LEDS is not set
25950 +# CONFIG_INFINIBAND is not set
25951 +# CONFIG_EDAC is not set
25952 +# CONFIG_RTC_CLASS is not set
25957 +# CONFIG_UIO is not set
25963 +# CONFIG_EXT2_FS_XATTR is not set
25964 +# CONFIG_EXT2_FS_XIP is not set
25965 +# CONFIG_EXT3_FS is not set
25966 +# CONFIG_EXT4DEV_FS is not set
25967 +# CONFIG_REISERFS_FS is not set
25968 +# CONFIG_JFS_FS is not set
25969 +# CONFIG_FS_POSIX_ACL is not set
25970 +# CONFIG_XFS_FS is not set
25971 +# CONFIG_GFS2_FS is not set
25972 +# CONFIG_OCFS2_FS is not set
25973 +# CONFIG_MINIX_FS is not set
25974 +# CONFIG_ROMFS_FS is not set
25976 +CONFIG_INOTIFY_USER=y
25977 +# CONFIG_QUOTA is not set
25979 +# CONFIG_AUTOFS_FS is not set
25980 +# CONFIG_AUTOFS4_FS is not set
25981 +# CONFIG_FUSE_FS is not set
25984 +# CD-ROM/DVD Filesystems
25986 +# CONFIG_ISO9660_FS is not set
25987 +# CONFIG_UDF_FS is not set
25990 +# DOS/FAT/NT Filesystems
25992 +# CONFIG_MSDOS_FS is not set
25993 +# CONFIG_VFAT_FS is not set
25994 +# CONFIG_NTFS_FS is not set
25997 +# Pseudo filesystems
26000 +CONFIG_PROC_KCORE=y
26001 +CONFIG_PROC_SYSCTL=y
26004 +# CONFIG_TMPFS_POSIX_ACL is not set
26005 +# CONFIG_HUGETLB_PAGE is not set
26006 +# CONFIG_CONFIGFS_FS is not set
26009 +# Miscellaneous filesystems
26011 +# CONFIG_ADFS_FS is not set
26012 +# CONFIG_AFFS_FS is not set
26013 +# CONFIG_HFS_FS is not set
26014 +# CONFIG_HFSPLUS_FS is not set
26015 +# CONFIG_BEFS_FS is not set
26016 +# CONFIG_BFS_FS is not set
26017 +# CONFIG_EFS_FS is not set
26018 +# CONFIG_JFFS2_FS is not set
26020 +# CONFIG_VXFS_FS is not set
26021 +# CONFIG_HPFS_FS is not set
26022 +# CONFIG_QNX4FS_FS is not set
26023 +# CONFIG_SYSV_FS is not set
26024 +# CONFIG_UFS_FS is not set
26025 +CONFIG_NETWORK_FILESYSTEMS=y
26028 +# CONFIG_NFS_V3_ACL is not set
26029 +# CONFIG_NFS_V4 is not set
26030 +# CONFIG_NFS_DIRECTIO is not set
26031 +# CONFIG_NFSD is not set
26035 +CONFIG_NFS_COMMON=y
26037 +# CONFIG_SUNRPC_BIND34 is not set
26038 +# CONFIG_RPCSEC_GSS_KRB5 is not set
26039 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
26040 +# CONFIG_SMB_FS is not set
26041 +# CONFIG_CIFS is not set
26042 +# CONFIG_NCP_FS is not set
26043 +# CONFIG_CODA_FS is not set
26044 +# CONFIG_AFS_FS is not set
26049 +# CONFIG_PARTITION_ADVANCED is not set
26050 +CONFIG_MSDOS_PARTITION=y
26051 +# CONFIG_NLS is not set
26052 +# CONFIG_DLM is not set
26053 +# CONFIG_UCC_SLOW is not set
26056 +# Library routines
26058 +CONFIG_BITREVERSE=y
26059 +# CONFIG_CRC_CCITT is not set
26060 +# CONFIG_CRC16 is not set
26061 +# CONFIG_CRC_ITU_T is not set
26063 +# CONFIG_CRC7 is not set
26064 +# CONFIG_LIBCRC32C is not set
26065 +CONFIG_ZLIB_INFLATE=y
26067 +CONFIG_HAS_IOMEM=y
26068 +CONFIG_HAS_IOPORT=y
26070 +CONFIG_INSTRUMENTATION=y
26071 +# CONFIG_PROFILING is not set
26072 +# CONFIG_KPROBES is not set
26073 +# CONFIG_MARKERS is not set
26078 +# CONFIG_PRINTK_TIME is not set
26079 +CONFIG_ENABLE_WARN_DEPRECATED=y
26080 +CONFIG_ENABLE_MUST_CHECK=y
26081 +CONFIG_MAGIC_SYSRQ=y
26082 +# CONFIG_UNUSED_SYMBOLS is not set
26083 +# CONFIG_DEBUG_FS is not set
26084 +# CONFIG_HEADERS_CHECK is not set
26085 +CONFIG_DEBUG_KERNEL=y
26086 +# CONFIG_DEBUG_SHIRQ is not set
26087 +CONFIG_DETECT_SOFTLOCKUP=y
26088 +CONFIG_SCHED_DEBUG=y
26089 +# CONFIG_SCHEDSTATS is not set
26090 +# CONFIG_TIMER_STATS is not set
26091 +# CONFIG_SLUB_DEBUG_ON is not set
26092 +# CONFIG_DEBUG_RT_MUTEXES is not set
26093 +# CONFIG_RT_MUTEX_TESTER is not set
26094 +# CONFIG_DEBUG_SPINLOCK is not set
26095 +# CONFIG_DEBUG_MUTEXES is not set
26096 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
26097 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
26098 +# CONFIG_DEBUG_KOBJECT is not set
26099 +CONFIG_DEBUG_BUGVERBOSE=y
26100 +# CONFIG_DEBUG_INFO is not set
26101 +# CONFIG_DEBUG_VM is not set
26102 +# CONFIG_DEBUG_LIST is not set
26103 +# CONFIG_DEBUG_SG is not set
26104 +CONFIG_FORCED_INLINING=y
26105 +# CONFIG_BOOT_PRINTK_DELAY is not set
26106 +# CONFIG_RCU_TORTURE_TEST is not set
26107 +# CONFIG_FAULT_INJECTION is not set
26108 +# CONFIG_SAMPLES is not set
26109 +# CONFIG_DEBUG_STACKOVERFLOW is not set
26110 +# CONFIG_DEBUG_STACK_USAGE is not set
26111 +# CONFIG_DEBUG_PAGEALLOC is not set
26112 +# CONFIG_DEBUGGER is not set
26113 +# CONFIG_BDI_SWITCH is not set
26114 +# CONFIG_PPC_EARLY_DEBUG is not set
26117 +# Security options
26119 +# CONFIG_KEYS is not set
26120 +# CONFIG_SECURITY is not set
26121 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
26123 +CONFIG_CRYPTO_ALGAPI=y
26124 +CONFIG_CRYPTO_BLKCIPHER=y
26125 +CONFIG_CRYPTO_MANAGER=y
26126 +# CONFIG_CRYPTO_HMAC is not set
26127 +# CONFIG_CRYPTO_XCBC is not set
26128 +# CONFIG_CRYPTO_NULL is not set
26129 +# CONFIG_CRYPTO_MD4 is not set
26130 +CONFIG_CRYPTO_MD5=y
26131 +# CONFIG_CRYPTO_SHA1 is not set
26132 +# CONFIG_CRYPTO_SHA256 is not set
26133 +# CONFIG_CRYPTO_SHA512 is not set
26134 +# CONFIG_CRYPTO_WP512 is not set
26135 +# CONFIG_CRYPTO_TGR192 is not set
26136 +# CONFIG_CRYPTO_GF128MUL is not set
26137 +CONFIG_CRYPTO_ECB=y
26138 +CONFIG_CRYPTO_CBC=y
26139 +CONFIG_CRYPTO_PCBC=y
26140 +# CONFIG_CRYPTO_LRW is not set
26141 +# CONFIG_CRYPTO_XTS is not set
26142 +# CONFIG_CRYPTO_CRYPTD is not set
26143 +CONFIG_CRYPTO_DES=y
26144 +# CONFIG_CRYPTO_FCRYPT is not set
26145 +# CONFIG_CRYPTO_BLOWFISH is not set
26146 +# CONFIG_CRYPTO_TWOFISH is not set
26147 +# CONFIG_CRYPTO_SERPENT is not set
26148 +# CONFIG_CRYPTO_AES is not set
26149 +# CONFIG_CRYPTO_CAST5 is not set
26150 +# CONFIG_CRYPTO_CAST6 is not set
26151 +# CONFIG_CRYPTO_TEA is not set
26152 +# CONFIG_CRYPTO_ARC4 is not set
26153 +# CONFIG_CRYPTO_KHAZAD is not set
26154 +# CONFIG_CRYPTO_ANUBIS is not set
26155 +# CONFIG_CRYPTO_SEED is not set
26156 +# CONFIG_CRYPTO_DEFLATE is not set
26157 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
26158 +# CONFIG_CRYPTO_CRC32C is not set
26159 +# CONFIG_CRYPTO_CAMELLIA is not set
26160 +# CONFIG_CRYPTO_TEST is not set
26161 +# CONFIG_CRYPTO_AUTHENC is not set
26162 +CONFIG_CRYPTO_HW=y
26163 +# CONFIG_PPC_CLOCK is not set
26164 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/ep8248e_defconfig powerpc.git/arch/powerpc/configs/ep8248e_defconfig
26165 --- linux-2.6.24/arch/powerpc/configs/ep8248e_defconfig 1970-01-01 01:00:00.000000000 +0100
26166 +++ powerpc.git/arch/powerpc/configs/ep8248e_defconfig 2008-01-28 20:25:49.000000000 +0100
26169 +# Automatically generated make config: don't edit
26170 +# Linux kernel version: 2.6.24-rc6
26171 +# Fri Jan 11 14:02:06 2008
26173 +# CONFIG_PPC64 is not set
26176 +# Processor support
26179 +# CONFIG_PPC_85xx is not set
26180 +# CONFIG_PPC_8xx is not set
26181 +# CONFIG_40x is not set
26182 +# CONFIG_44x is not set
26183 +# CONFIG_E200 is not set
26185 +CONFIG_PPC_STD_MMU=y
26186 +CONFIG_PPC_STD_MMU_32=y
26187 +# CONFIG_PPC_MM_SLICES is not set
26188 +# CONFIG_SMP is not set
26190 +CONFIG_WORD_SIZE=32
26191 +CONFIG_PPC_MERGE=y
26193 +CONFIG_GENERIC_CMOS_UPDATE=y
26194 +CONFIG_GENERIC_TIME=y
26195 +CONFIG_GENERIC_TIME_VSYSCALL=y
26196 +CONFIG_GENERIC_CLOCKEVENTS=y
26197 +CONFIG_GENERIC_HARDIRQS=y
26198 +CONFIG_IRQ_PER_CPU=y
26199 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
26200 +CONFIG_ARCH_HAS_ILOG2_U32=y
26201 +CONFIG_GENERIC_HWEIGHT=y
26202 +CONFIG_GENERIC_CALIBRATE_DELAY=y
26203 +CONFIG_GENERIC_FIND_NEXT_BIT=y
26204 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
26206 +CONFIG_EARLY_PRINTK=y
26207 +CONFIG_GENERIC_NVRAM=y
26208 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
26209 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
26212 +# CONFIG_PPC_UDBG_16550 is not set
26213 +# CONFIG_GENERIC_TBSYNC is not set
26214 +CONFIG_AUDIT_ARCH=y
26215 +CONFIG_GENERIC_BUG=y
26216 +# CONFIG_DEFAULT_UIMAGE is not set
26217 +# CONFIG_PPC_DCR_NATIVE is not set
26218 +# CONFIG_PPC_DCR_MMIO is not set
26219 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26224 +# CONFIG_EXPERIMENTAL is not set
26225 +CONFIG_BROKEN_ON_SMP=y
26226 +CONFIG_INIT_ENV_ARG_LIMIT=32
26227 +CONFIG_LOCALVERSION=""
26228 +CONFIG_LOCALVERSION_AUTO=y
26231 +CONFIG_SYSVIPC_SYSCTL=y
26232 +# CONFIG_BSD_PROCESS_ACCT is not set
26233 +# CONFIG_TASKSTATS is not set
26234 +# CONFIG_AUDIT is not set
26236 +CONFIG_IKCONFIG_PROC=y
26237 +CONFIG_LOG_BUF_SHIFT=14
26238 +# CONFIG_CGROUPS is not set
26239 +CONFIG_FAIR_GROUP_SCHED=y
26240 +CONFIG_FAIR_USER_SCHED=y
26241 +# CONFIG_FAIR_CGROUP_SCHED is not set
26242 +CONFIG_SYSFS_DEPRECATED=y
26243 +# CONFIG_RELAY is not set
26244 +# CONFIG_BLK_DEV_INITRD is not set
26247 +CONFIG_SYSCTL_SYSCALL=y
26249 +CONFIG_KALLSYMS_ALL=y
26250 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
26255 +CONFIG_BASE_FULL=y
26257 +CONFIG_ANON_INODES=y
26262 +CONFIG_VM_EVENT_COUNTERS=y
26264 +# CONFIG_SLUB is not set
26265 +# CONFIG_SLOB is not set
26266 +CONFIG_RT_MUTEXES=y
26267 +# CONFIG_TINY_SHMEM is not set
26268 +CONFIG_BASE_SMALL=0
26269 +# CONFIG_MODULES is not set
26271 +# CONFIG_LBD is not set
26272 +# CONFIG_BLK_DEV_IO_TRACE is not set
26273 +# CONFIG_LSF is not set
26278 +CONFIG_IOSCHED_NOOP=y
26279 +# CONFIG_IOSCHED_AS is not set
26280 +CONFIG_IOSCHED_DEADLINE=y
26281 +# CONFIG_IOSCHED_CFQ is not set
26282 +# CONFIG_DEFAULT_AS is not set
26283 +CONFIG_DEFAULT_DEADLINE=y
26284 +# CONFIG_DEFAULT_CFQ is not set
26285 +# CONFIG_DEFAULT_NOOP is not set
26286 +CONFIG_DEFAULT_IOSCHED="deadline"
26289 +# Platform support
26291 +# CONFIG_PPC_MULTIPLATFORM is not set
26293 +# CONFIG_PPC_83xx is not set
26294 +# CONFIG_PPC_86xx is not set
26295 +# CONFIG_PPC_MPC52xx is not set
26296 +# CONFIG_PPC_MPC5200 is not set
26297 +# CONFIG_PPC_CELL is not set
26298 +# CONFIG_PPC_CELL_NATIVE is not set
26299 +# CONFIG_MPC8272_ADS is not set
26300 +# CONFIG_PQ2FADS is not set
26302 +# CONFIG_PQ2ADS is not set
26305 +# CONFIG_MPIC is not set
26306 +# CONFIG_MPIC_WEIRD is not set
26307 +# CONFIG_PPC_I8259 is not set
26308 +# CONFIG_PPC_RTAS is not set
26309 +# CONFIG_MMIO_NVRAM is not set
26310 +# CONFIG_PPC_MPC106 is not set
26311 +# CONFIG_PPC_970_NAP is not set
26312 +# CONFIG_PPC_INDIRECT_IO is not set
26313 +# CONFIG_GENERIC_IOMAP is not set
26314 +# CONFIG_CPU_FREQ is not set
26316 +CONFIG_PPC_CPM_NEW_BINDING=y
26317 +# CONFIG_FSL_ULI1575 is not set
26323 +# CONFIG_HIGHMEM is not set
26324 +# CONFIG_TICK_ONESHOT is not set
26325 +# CONFIG_NO_HZ is not set
26326 +# CONFIG_HIGH_RES_TIMERS is not set
26327 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
26328 +# CONFIG_HZ_100 is not set
26330 +# CONFIG_HZ_300 is not set
26331 +# CONFIG_HZ_1000 is not set
26333 +CONFIG_PREEMPT_NONE=y
26334 +# CONFIG_PREEMPT_VOLUNTARY is not set
26335 +# CONFIG_PREEMPT is not set
26336 +CONFIG_BINFMT_ELF=y
26337 +CONFIG_BINFMT_MISC=y
26338 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
26339 +CONFIG_ARCH_FLATMEM_ENABLE=y
26340 +CONFIG_ARCH_POPULATES_NODE_MAP=y
26342 +CONFIG_FLAT_NODE_MEM_MAP=y
26343 +# CONFIG_SPARSEMEM_STATIC is not set
26344 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
26345 +CONFIG_SPLIT_PTLOCK_CPUS=4
26346 +# CONFIG_RESOURCES_64BIT is not set
26347 +CONFIG_ZONE_DMA_FLAG=1
26349 +CONFIG_VIRT_TO_BUS=y
26350 +CONFIG_PROC_DEVICETREE=y
26351 +# CONFIG_CMDLINE_BOOL is not set
26352 +# CONFIG_PM is not set
26353 +CONFIG_SUSPEND_UP_POSSIBLE=y
26354 +CONFIG_HIBERNATION_UP_POSSIBLE=y
26355 +# CONFIG_SECCOMP is not set
26356 +CONFIG_WANT_DEVICE_TREE=y
26357 +CONFIG_DEVICE_TREE="ep8248e.dts"
26358 +CONFIG_ISA_DMA_API=y
26365 +# CONFIG_PCI is not set
26366 +# CONFIG_PCI_DOMAINS is not set
26367 +# CONFIG_PCI_SYSCALL is not set
26368 +# CONFIG_ARCH_SUPPORTS_MSI is not set
26369 +# CONFIG_PCCARD is not set
26374 +# CONFIG_ADVANCED_OPTIONS is not set
26377 +# Default settings for advanced configuration options are used
26379 +CONFIG_HIGHMEM_START=0xfe000000
26380 +CONFIG_LOWMEM_SIZE=0x30000000
26381 +CONFIG_KERNEL_START=0xc0000000
26382 +CONFIG_TASK_SIZE=0xc0000000
26383 +CONFIG_BOOT_LOAD=0x00400000
26391 +# Networking options
26394 +# CONFIG_PACKET_MMAP is not set
26397 +# CONFIG_XFRM_USER is not set
26398 +# CONFIG_NET_KEY is not set
26400 +CONFIG_IP_MULTICAST=y
26401 +# CONFIG_IP_ADVANCED_ROUTER is not set
26402 +CONFIG_IP_FIB_HASH=y
26404 +CONFIG_IP_PNP_DHCP=y
26405 +CONFIG_IP_PNP_BOOTP=y
26406 +# CONFIG_IP_PNP_RARP is not set
26407 +# CONFIG_NET_IPIP is not set
26408 +# CONFIG_NET_IPGRE is not set
26409 +# CONFIG_IP_MROUTE is not set
26410 +CONFIG_SYN_COOKIES=y
26411 +# CONFIG_INET_AH is not set
26412 +# CONFIG_INET_ESP is not set
26413 +# CONFIG_INET_IPCOMP is not set
26414 +# CONFIG_INET_XFRM_TUNNEL is not set
26415 +CONFIG_INET_TUNNEL=y
26416 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
26417 +CONFIG_INET_XFRM_MODE_TUNNEL=y
26418 +CONFIG_INET_XFRM_MODE_BEET=y
26419 +# CONFIG_INET_LRO is not set
26420 +CONFIG_INET_DIAG=y
26421 +CONFIG_INET_TCP_DIAG=y
26422 +# CONFIG_TCP_CONG_ADVANCED is not set
26423 +CONFIG_TCP_CONG_CUBIC=y
26424 +CONFIG_DEFAULT_TCP_CONG="cubic"
26425 +# CONFIG_IP_VS is not set
26427 +# CONFIG_IPV6_PRIVACY is not set
26428 +# CONFIG_IPV6_ROUTER_PREF is not set
26429 +# CONFIG_INET6_AH is not set
26430 +# CONFIG_INET6_ESP is not set
26431 +# CONFIG_INET6_IPCOMP is not set
26432 +# CONFIG_INET6_XFRM_TUNNEL is not set
26433 +# CONFIG_INET6_TUNNEL is not set
26434 +CONFIG_INET6_XFRM_MODE_TRANSPORT=y
26435 +CONFIG_INET6_XFRM_MODE_TUNNEL=y
26436 +CONFIG_INET6_XFRM_MODE_BEET=y
26438 +# CONFIG_IPV6_TUNNEL is not set
26439 +# CONFIG_NETWORK_SECMARK is not set
26440 +CONFIG_NETFILTER=y
26441 +# CONFIG_NETFILTER_DEBUG is not set
26444 +# Core Netfilter Configuration
26446 +# CONFIG_NETFILTER_NETLINK is not set
26447 +# CONFIG_NF_CONNTRACK_ENABLED is not set
26448 +# CONFIG_NF_CONNTRACK is not set
26449 +# CONFIG_NETFILTER_XTABLES is not set
26452 +# IP: Netfilter Configuration
26454 +# CONFIG_IP_NF_QUEUE is not set
26455 +# CONFIG_IP_NF_IPTABLES is not set
26456 +# CONFIG_IP_NF_ARPTABLES is not set
26457 +# CONFIG_BRIDGE is not set
26458 +# CONFIG_VLAN_8021Q is not set
26459 +# CONFIG_DECNET is not set
26460 +# CONFIG_LLC2 is not set
26461 +# CONFIG_IPX is not set
26462 +# CONFIG_ATALK is not set
26463 +# CONFIG_NET_SCHED is not set
26468 +# CONFIG_NET_PKTGEN is not set
26469 +# CONFIG_HAMRADIO is not set
26470 +# CONFIG_IRDA is not set
26471 +# CONFIG_BT is not set
26476 +# CONFIG_CFG80211 is not set
26477 +# CONFIG_WIRELESS_EXT is not set
26478 +# CONFIG_IEEE80211 is not set
26479 +# CONFIG_RFKILL is not set
26486 +# Generic Driver Options
26488 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
26489 +CONFIG_STANDALONE=y
26490 +CONFIG_PREVENT_FIRMWARE_BUILD=y
26491 +# CONFIG_FW_LOADER is not set
26492 +# CONFIG_DEBUG_DRIVER is not set
26493 +# CONFIG_DEBUG_DEVRES is not set
26494 +# CONFIG_SYS_HYPERVISOR is not set
26495 +# CONFIG_CONNECTOR is not set
26497 +# CONFIG_MTD_DEBUG is not set
26498 +# CONFIG_MTD_CONCAT is not set
26499 +# CONFIG_MTD_PARTITIONS is not set
26502 +# User Modules And Translation Layers
26505 +CONFIG_MTD_BLKDEVS=y
26506 +CONFIG_MTD_BLOCK=y
26507 +# CONFIG_FTL is not set
26508 +# CONFIG_NFTL is not set
26509 +# CONFIG_INFTL is not set
26510 +# CONFIG_RFD_FTL is not set
26511 +# CONFIG_SSFDC is not set
26512 +# CONFIG_MTD_OOPS is not set
26515 +# RAM/ROM/Flash chip drivers
26518 +# CONFIG_MTD_JEDECPROBE is not set
26519 +CONFIG_MTD_GEN_PROBE=y
26520 +CONFIG_MTD_CFI_ADV_OPTIONS=y
26521 +CONFIG_MTD_CFI_NOSWAP=y
26522 +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
26523 +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
26524 +CONFIG_MTD_CFI_GEOMETRY=y
26525 +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
26526 +# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set
26527 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
26528 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
26529 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
26530 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
26531 +# CONFIG_MTD_CFI_I1 is not set
26532 +CONFIG_MTD_CFI_I2=y
26533 +# CONFIG_MTD_CFI_I4 is not set
26534 +# CONFIG_MTD_CFI_I8 is not set
26535 +# CONFIG_MTD_OTP is not set
26536 +# CONFIG_MTD_CFI_INTELEXT is not set
26537 +CONFIG_MTD_CFI_AMDSTD=y
26538 +# CONFIG_MTD_CFI_STAA is not set
26539 +CONFIG_MTD_CFI_UTIL=y
26540 +# CONFIG_MTD_RAM is not set
26541 +# CONFIG_MTD_ROM is not set
26542 +# CONFIG_MTD_ABSENT is not set
26545 +# Mapping drivers for chip access
26547 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
26548 +# CONFIG_MTD_PHYSMAP is not set
26549 +CONFIG_MTD_PHYSMAP_OF=y
26550 +# CONFIG_MTD_PLATRAM is not set
26553 +# Self-contained MTD device drivers
26555 +# CONFIG_MTD_SLRAM is not set
26556 +# CONFIG_MTD_PHRAM is not set
26557 +# CONFIG_MTD_MTDRAM is not set
26558 +# CONFIG_MTD_BLOCK2MTD is not set
26561 +# Disk-On-Chip Device Drivers
26563 +# CONFIG_MTD_DOC2000 is not set
26564 +# CONFIG_MTD_DOC2001 is not set
26565 +# CONFIG_MTD_DOC2001PLUS is not set
26566 +# CONFIG_MTD_NAND is not set
26567 +# CONFIG_MTD_ONENAND is not set
26570 +# UBI - Unsorted block images
26572 +# CONFIG_MTD_UBI is not set
26573 +CONFIG_OF_DEVICE=y
26574 +# CONFIG_PARPORT is not set
26576 +# CONFIG_BLK_DEV_FD is not set
26577 +# CONFIG_BLK_DEV_COW_COMMON is not set
26578 +CONFIG_BLK_DEV_LOOP=y
26579 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
26580 +# CONFIG_BLK_DEV_NBD is not set
26581 +# CONFIG_BLK_DEV_RAM is not set
26582 +# CONFIG_CDROM_PKTCDVD is not set
26583 +# CONFIG_ATA_OVER_ETH is not set
26584 +# CONFIG_MISC_DEVICES is not set
26585 +# CONFIG_IDE is not set
26588 +# SCSI device support
26590 +# CONFIG_RAID_ATTRS is not set
26591 +# CONFIG_SCSI is not set
26592 +# CONFIG_SCSI_DMA is not set
26593 +# CONFIG_SCSI_NETLINK is not set
26594 +# CONFIG_ATA is not set
26595 +# CONFIG_MD is not set
26596 +# CONFIG_MACINTOSH_DRIVERS is not set
26597 +CONFIG_NETDEVICES=y
26598 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
26599 +# CONFIG_DUMMY is not set
26600 +# CONFIG_BONDING is not set
26601 +# CONFIG_EQUALIZER is not set
26602 +# CONFIG_TUN is not set
26603 +# CONFIG_VETH is not set
26607 +# MII PHY device drivers
26609 +# CONFIG_MARVELL_PHY is not set
26610 +CONFIG_DAVICOM_PHY=y
26611 +# CONFIG_QSEMI_PHY is not set
26612 +# CONFIG_LXT_PHY is not set
26613 +# CONFIG_CICADA_PHY is not set
26614 +# CONFIG_VITESSE_PHY is not set
26615 +# CONFIG_SMSC_PHY is not set
26616 +# CONFIG_BROADCOM_PHY is not set
26617 +# CONFIG_ICPLUS_PHY is not set
26618 +# CONFIG_FIXED_PHY is not set
26619 +CONFIG_MDIO_BITBANG=y
26620 +CONFIG_NET_ETHERNET=y
26622 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
26623 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
26624 +# CONFIG_IBM_NEW_EMAC_TAH is not set
26625 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
26626 +# CONFIG_B44 is not set
26628 +# CONFIG_FS_ENET_HAS_SCC is not set
26629 +CONFIG_FS_ENET_HAS_FCC=y
26630 +# CONFIG_FS_ENET_MDIO_FCC is not set
26631 +CONFIG_NETDEV_1000=y
26632 +CONFIG_NETDEV_10000=y
26637 +# CONFIG_WLAN_PRE80211 is not set
26638 +# CONFIG_WLAN_80211 is not set
26639 +# CONFIG_WAN is not set
26640 +# CONFIG_PPP is not set
26641 +# CONFIG_SLIP is not set
26642 +# CONFIG_NETPOLL is not set
26643 +# CONFIG_NET_POLL_CONTROLLER is not set
26644 +# CONFIG_ISDN is not set
26645 +# CONFIG_PHONE is not set
26648 +# Input device support
26650 +# CONFIG_INPUT is not set
26653 +# Hardware I/O ports
26655 +# CONFIG_SERIO is not set
26656 +# CONFIG_GAMEPORT is not set
26659 +# Character devices
26661 +# CONFIG_VT is not set
26662 +# CONFIG_SERIAL_NONSTANDARD is not set
26667 +# CONFIG_SERIAL_8250 is not set
26670 +# Non-8250 serial port support
26672 +# CONFIG_SERIAL_UARTLITE is not set
26673 +CONFIG_SERIAL_CORE=y
26674 +CONFIG_SERIAL_CORE_CONSOLE=y
26675 +CONFIG_SERIAL_CPM=y
26676 +CONFIG_SERIAL_CPM_CONSOLE=y
26677 +CONFIG_SERIAL_CPM_SCC1=y
26678 +# CONFIG_SERIAL_CPM_SCC2 is not set
26679 +# CONFIG_SERIAL_CPM_SCC3 is not set
26680 +CONFIG_SERIAL_CPM_SCC4=y
26681 +# CONFIG_SERIAL_CPM_SMC1 is not set
26682 +# CONFIG_SERIAL_CPM_SMC2 is not set
26683 +CONFIG_UNIX98_PTYS=y
26684 +CONFIG_LEGACY_PTYS=y
26685 +CONFIG_LEGACY_PTY_COUNT=256
26686 +# CONFIG_IPMI_HANDLER is not set
26687 +CONFIG_HW_RANDOM=y
26688 +# CONFIG_NVRAM is not set
26689 +# CONFIG_GEN_RTC is not set
26690 +# CONFIG_R3964 is not set
26691 +# CONFIG_RAW_DRIVER is not set
26692 +# CONFIG_I2C is not set
26697 +# CONFIG_SPI is not set
26698 +# CONFIG_SPI_MASTER is not set
26699 +# CONFIG_W1 is not set
26700 +# CONFIG_POWER_SUPPLY is not set
26701 +# CONFIG_HWMON is not set
26702 +# CONFIG_WATCHDOG is not set
26705 +# Sonics Silicon Backplane
26707 +CONFIG_SSB_POSSIBLE=y
26708 +# CONFIG_SSB is not set
26711 +# Multifunction device drivers
26713 +# CONFIG_MFD_SM501 is not set
26716 +# Multimedia devices
26718 +# CONFIG_VIDEO_DEV is not set
26719 +# CONFIG_DVB_CORE is not set
26723 +# Graphics support
26725 +# CONFIG_VGASTATE is not set
26726 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
26727 +# CONFIG_FB is not set
26728 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
26731 +# Display device support
26733 +# CONFIG_DISPLAY_SUPPORT is not set
26738 +# CONFIG_SOUND is not set
26739 +# CONFIG_USB_SUPPORT is not set
26740 +# CONFIG_MMC is not set
26741 +# CONFIG_NEW_LEDS is not set
26742 +# CONFIG_RTC_CLASS is not set
26747 +# CONFIG_UIO is not set
26753 +# CONFIG_EXT2_FS_XATTR is not set
26754 +# CONFIG_EXT2_FS_XIP is not set
26756 +# CONFIG_EXT3_FS_XATTR is not set
26758 +# CONFIG_REISERFS_FS is not set
26759 +# CONFIG_JFS_FS is not set
26760 +# CONFIG_FS_POSIX_ACL is not set
26761 +# CONFIG_XFS_FS is not set
26762 +# CONFIG_OCFS2_FS is not set
26763 +# CONFIG_MINIX_FS is not set
26764 +# CONFIG_ROMFS_FS is not set
26766 +CONFIG_INOTIFY_USER=y
26767 +# CONFIG_QUOTA is not set
26769 +# CONFIG_AUTOFS_FS is not set
26770 +CONFIG_AUTOFS4_FS=y
26771 +# CONFIG_FUSE_FS is not set
26774 +# CD-ROM/DVD Filesystems
26776 +# CONFIG_ISO9660_FS is not set
26777 +# CONFIG_UDF_FS is not set
26780 +# DOS/FAT/NT Filesystems
26782 +# CONFIG_MSDOS_FS is not set
26783 +# CONFIG_VFAT_FS is not set
26784 +# CONFIG_NTFS_FS is not set
26787 +# Pseudo filesystems
26790 +CONFIG_PROC_KCORE=y
26791 +CONFIG_PROC_SYSCTL=y
26794 +# CONFIG_TMPFS_POSIX_ACL is not set
26795 +# CONFIG_HUGETLB_PAGE is not set
26798 +# Miscellaneous filesystems
26800 +# CONFIG_HFSPLUS_FS is not set
26801 +# CONFIG_JFFS2_FS is not set
26803 +# CONFIG_VXFS_FS is not set
26804 +# CONFIG_HPFS_FS is not set
26805 +# CONFIG_QNX4FS_FS is not set
26806 +# CONFIG_SYSV_FS is not set
26807 +# CONFIG_UFS_FS is not set
26808 +CONFIG_NETWORK_FILESYSTEMS=y
26811 +# CONFIG_NFS_V3_ACL is not set
26812 +# CONFIG_NFS_DIRECTIO is not set
26813 +# CONFIG_NFSD is not set
26817 +CONFIG_NFS_COMMON=y
26819 +# CONFIG_SMB_FS is not set
26820 +# CONFIG_CIFS is not set
26821 +# CONFIG_NCP_FS is not set
26822 +# CONFIG_CODA_FS is not set
26827 +CONFIG_PARTITION_ADVANCED=y
26828 +# CONFIG_ACORN_PARTITION is not set
26829 +# CONFIG_OSF_PARTITION is not set
26830 +# CONFIG_AMIGA_PARTITION is not set
26831 +# CONFIG_ATARI_PARTITION is not set
26832 +# CONFIG_MAC_PARTITION is not set
26833 +CONFIG_MSDOS_PARTITION=y
26834 +# CONFIG_BSD_DISKLABEL is not set
26835 +# CONFIG_MINIX_SUBPARTITION is not set
26836 +# CONFIG_SOLARIS_X86_PARTITION is not set
26837 +# CONFIG_UNIXWARE_DISKLABEL is not set
26838 +# CONFIG_LDM_PARTITION is not set
26839 +# CONFIG_SGI_PARTITION is not set
26840 +# CONFIG_ULTRIX_PARTITION is not set
26841 +# CONFIG_SUN_PARTITION is not set
26842 +# CONFIG_KARMA_PARTITION is not set
26843 +# CONFIG_EFI_PARTITION is not set
26844 +# CONFIG_SYSV68_PARTITION is not set
26846 +CONFIG_NLS_DEFAULT="iso8859-1"
26847 +CONFIG_NLS_CODEPAGE_437=y
26848 +# CONFIG_NLS_CODEPAGE_737 is not set
26849 +# CONFIG_NLS_CODEPAGE_775 is not set
26850 +# CONFIG_NLS_CODEPAGE_850 is not set
26851 +# CONFIG_NLS_CODEPAGE_852 is not set
26852 +# CONFIG_NLS_CODEPAGE_855 is not set
26853 +# CONFIG_NLS_CODEPAGE_857 is not set
26854 +# CONFIG_NLS_CODEPAGE_860 is not set
26855 +# CONFIG_NLS_CODEPAGE_861 is not set
26856 +# CONFIG_NLS_CODEPAGE_862 is not set
26857 +# CONFIG_NLS_CODEPAGE_863 is not set
26858 +# CONFIG_NLS_CODEPAGE_864 is not set
26859 +# CONFIG_NLS_CODEPAGE_865 is not set
26860 +# CONFIG_NLS_CODEPAGE_866 is not set
26861 +# CONFIG_NLS_CODEPAGE_869 is not set
26862 +# CONFIG_NLS_CODEPAGE_936 is not set
26863 +# CONFIG_NLS_CODEPAGE_950 is not set
26864 +# CONFIG_NLS_CODEPAGE_932 is not set
26865 +# CONFIG_NLS_CODEPAGE_949 is not set
26866 +# CONFIG_NLS_CODEPAGE_874 is not set
26867 +# CONFIG_NLS_ISO8859_8 is not set
26868 +# CONFIG_NLS_CODEPAGE_1250 is not set
26869 +# CONFIG_NLS_CODEPAGE_1251 is not set
26870 +CONFIG_NLS_ASCII=y
26871 +CONFIG_NLS_ISO8859_1=y
26872 +# CONFIG_NLS_ISO8859_2 is not set
26873 +# CONFIG_NLS_ISO8859_3 is not set
26874 +# CONFIG_NLS_ISO8859_4 is not set
26875 +# CONFIG_NLS_ISO8859_5 is not set
26876 +# CONFIG_NLS_ISO8859_6 is not set
26877 +# CONFIG_NLS_ISO8859_7 is not set
26878 +# CONFIG_NLS_ISO8859_9 is not set
26879 +# CONFIG_NLS_ISO8859_13 is not set
26880 +# CONFIG_NLS_ISO8859_14 is not set
26881 +# CONFIG_NLS_ISO8859_15 is not set
26882 +# CONFIG_NLS_KOI8_R is not set
26883 +# CONFIG_NLS_KOI8_U is not set
26885 +# CONFIG_UCC_SLOW is not set
26888 +# Library routines
26890 +# CONFIG_CRC_CCITT is not set
26891 +# CONFIG_CRC16 is not set
26892 +# CONFIG_CRC_ITU_T is not set
26893 +# CONFIG_CRC32 is not set
26894 +# CONFIG_CRC7 is not set
26895 +# CONFIG_LIBCRC32C is not set
26896 +CONFIG_ZLIB_INFLATE=y
26898 +CONFIG_HAS_IOMEM=y
26899 +CONFIG_HAS_IOPORT=y
26901 +CONFIG_INSTRUMENTATION=y
26902 +# CONFIG_PROFILING is not set
26903 +# CONFIG_MARKERS is not set
26908 +# CONFIG_PRINTK_TIME is not set
26909 +CONFIG_ENABLE_WARN_DEPRECATED=y
26910 +CONFIG_ENABLE_MUST_CHECK=y
26911 +CONFIG_MAGIC_SYSRQ=y
26912 +# CONFIG_UNUSED_SYMBOLS is not set
26913 +# CONFIG_DEBUG_FS is not set
26914 +# CONFIG_HEADERS_CHECK is not set
26915 +CONFIG_DEBUG_KERNEL=y
26916 +# CONFIG_DEBUG_SHIRQ is not set
26917 +# CONFIG_DETECT_SOFTLOCKUP is not set
26918 +# CONFIG_SCHED_DEBUG is not set
26919 +# CONFIG_SCHEDSTATS is not set
26920 +# CONFIG_TIMER_STATS is not set
26921 +# CONFIG_DEBUG_SLAB is not set
26922 +# CONFIG_DEBUG_RT_MUTEXES is not set
26923 +# CONFIG_RT_MUTEX_TESTER is not set
26924 +# CONFIG_DEBUG_SPINLOCK is not set
26925 +# CONFIG_DEBUG_MUTEXES is not set
26926 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
26927 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
26928 +# CONFIG_DEBUG_KOBJECT is not set
26929 +CONFIG_DEBUG_BUGVERBOSE=y
26930 +CONFIG_DEBUG_INFO=y
26931 +# CONFIG_DEBUG_VM is not set
26932 +# CONFIG_DEBUG_LIST is not set
26933 +# CONFIG_DEBUG_SG is not set
26934 +CONFIG_FORCED_INLINING=y
26935 +# CONFIG_BOOT_PRINTK_DELAY is not set
26936 +# CONFIG_FAULT_INJECTION is not set
26937 +# CONFIG_SAMPLES is not set
26938 +# CONFIG_DEBUG_STACKOVERFLOW is not set
26939 +# CONFIG_DEBUG_STACK_USAGE is not set
26940 +# CONFIG_DEBUG_PAGEALLOC is not set
26941 +# CONFIG_DEBUGGER is not set
26942 +# CONFIG_KGDB_CONSOLE is not set
26943 +CONFIG_BDI_SWITCH=y
26944 +# CONFIG_PPC_EARLY_DEBUG is not set
26947 +# Security options
26949 +# CONFIG_KEYS is not set
26950 +# CONFIG_SECURITY is not set
26952 +CONFIG_CRYPTO_ALGAPI=y
26953 +CONFIG_CRYPTO_BLKCIPHER=y
26954 +CONFIG_CRYPTO_MANAGER=y
26955 +# CONFIG_CRYPTO_HMAC is not set
26956 +# CONFIG_CRYPTO_NULL is not set
26957 +# CONFIG_CRYPTO_MD4 is not set
26958 +CONFIG_CRYPTO_MD5=y
26959 +# CONFIG_CRYPTO_SHA1 is not set
26960 +# CONFIG_CRYPTO_SHA256 is not set
26961 +# CONFIG_CRYPTO_SHA512 is not set
26962 +# CONFIG_CRYPTO_WP512 is not set
26963 +# CONFIG_CRYPTO_TGR192 is not set
26964 +CONFIG_CRYPTO_ECB=y
26965 +CONFIG_CRYPTO_CBC=y
26966 +CONFIG_CRYPTO_PCBC=y
26967 +# CONFIG_CRYPTO_CRYPTD is not set
26968 +CONFIG_CRYPTO_DES=y
26969 +# CONFIG_CRYPTO_FCRYPT is not set
26970 +# CONFIG_CRYPTO_BLOWFISH is not set
26971 +# CONFIG_CRYPTO_TWOFISH is not set
26972 +# CONFIG_CRYPTO_SERPENT is not set
26973 +# CONFIG_CRYPTO_AES is not set
26974 +# CONFIG_CRYPTO_CAST5 is not set
26975 +# CONFIG_CRYPTO_CAST6 is not set
26976 +# CONFIG_CRYPTO_TEA is not set
26977 +# CONFIG_CRYPTO_ARC4 is not set
26978 +# CONFIG_CRYPTO_KHAZAD is not set
26979 +# CONFIG_CRYPTO_ANUBIS is not set
26980 +# CONFIG_CRYPTO_SEED is not set
26981 +# CONFIG_CRYPTO_DEFLATE is not set
26982 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
26983 +# CONFIG_CRYPTO_CRC32C is not set
26984 +# CONFIG_CRYPTO_CAMELLIA is not set
26985 +# CONFIG_CRYPTO_AUTHENC is not set
26986 +# CONFIG_CRYPTO_HW is not set
26987 +# CONFIG_PPC_CLOCK is not set
26988 +CONFIG_PPC_LIB_RHEAP=y
26989 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/katmai_defconfig powerpc.git/arch/powerpc/configs/katmai_defconfig
26990 --- linux-2.6.24/arch/powerpc/configs/katmai_defconfig 1970-01-01 01:00:00.000000000 +0100
26991 +++ powerpc.git/arch/powerpc/configs/katmai_defconfig 2008-01-28 20:25:49.000000000 +0100
26994 +# Automatically generated make config: don't edit
26995 +# Linux kernel version: 2.6.24-rc6
26996 +# Mon Dec 24 11:17:43 2007
26998 +# CONFIG_PPC64 is not set
27001 +# Processor support
27003 +# CONFIG_6xx is not set
27004 +# CONFIG_PPC_85xx is not set
27005 +# CONFIG_PPC_8xx is not set
27006 +# CONFIG_40x is not set
27008 +# CONFIG_E200 is not set
27011 +CONFIG_PTE_64BIT=y
27012 +CONFIG_PHYS_64BIT=y
27013 +# CONFIG_PPC_MM_SLICES is not set
27014 +CONFIG_NOT_COHERENT_CACHE=y
27016 +CONFIG_WORD_SIZE=32
27017 +CONFIG_PPC_MERGE=y
27019 +CONFIG_GENERIC_CMOS_UPDATE=y
27020 +CONFIG_GENERIC_TIME=y
27021 +CONFIG_GENERIC_TIME_VSYSCALL=y
27022 +CONFIG_GENERIC_CLOCKEVENTS=y
27023 +CONFIG_GENERIC_HARDIRQS=y
27024 +CONFIG_IRQ_PER_CPU=y
27025 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
27026 +CONFIG_ARCH_HAS_ILOG2_U32=y
27027 +CONFIG_GENERIC_HWEIGHT=y
27028 +CONFIG_GENERIC_CALIBRATE_DELAY=y
27029 +CONFIG_GENERIC_FIND_NEXT_BIT=y
27030 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
27032 +CONFIG_EARLY_PRINTK=y
27033 +CONFIG_GENERIC_NVRAM=y
27034 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
27035 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
27038 +CONFIG_PPC_UDBG_16550=y
27039 +# CONFIG_GENERIC_TBSYNC is not set
27040 +CONFIG_AUDIT_ARCH=y
27041 +CONFIG_GENERIC_BUG=y
27042 +# CONFIG_DEFAULT_UIMAGE is not set
27043 +CONFIG_PPC_DCR_NATIVE=y
27044 +# CONFIG_PPC_DCR_MMIO is not set
27046 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27051 +CONFIG_EXPERIMENTAL=y
27052 +CONFIG_BROKEN_ON_SMP=y
27053 +CONFIG_INIT_ENV_ARG_LIMIT=32
27054 +CONFIG_LOCALVERSION=""
27055 +CONFIG_LOCALVERSION_AUTO=y
27058 +CONFIG_SYSVIPC_SYSCTL=y
27059 +CONFIG_POSIX_MQUEUE=y
27060 +# CONFIG_BSD_PROCESS_ACCT is not set
27061 +# CONFIG_TASKSTATS is not set
27062 +# CONFIG_USER_NS is not set
27063 +# CONFIG_PID_NS is not set
27064 +# CONFIG_AUDIT is not set
27065 +# CONFIG_IKCONFIG is not set
27066 +CONFIG_LOG_BUF_SHIFT=14
27067 +# CONFIG_CGROUPS is not set
27068 +CONFIG_FAIR_GROUP_SCHED=y
27069 +CONFIG_FAIR_USER_SCHED=y
27070 +# CONFIG_FAIR_CGROUP_SCHED is not set
27071 +CONFIG_SYSFS_DEPRECATED=y
27072 +# CONFIG_RELAY is not set
27073 +CONFIG_BLK_DEV_INITRD=y
27074 +CONFIG_INITRAMFS_SOURCE=""
27075 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
27078 +CONFIG_SYSCTL_SYSCALL=y
27080 +# CONFIG_KALLSYMS_ALL is not set
27081 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
27086 +CONFIG_BASE_FULL=y
27088 +CONFIG_ANON_INODES=y
27093 +CONFIG_VM_EVENT_COUNTERS=y
27094 +CONFIG_SLUB_DEBUG=y
27095 +# CONFIG_SLAB is not set
27097 +# CONFIG_SLOB is not set
27098 +CONFIG_RT_MUTEXES=y
27099 +# CONFIG_TINY_SHMEM is not set
27100 +CONFIG_BASE_SMALL=0
27102 +CONFIG_MODULE_UNLOAD=y
27103 +# CONFIG_MODULE_FORCE_UNLOAD is not set
27104 +# CONFIG_MODVERSIONS is not set
27105 +# CONFIG_MODULE_SRCVERSION_ALL is not set
27109 +# CONFIG_BLK_DEV_IO_TRACE is not set
27110 +# CONFIG_LSF is not set
27111 +# CONFIG_BLK_DEV_BSG is not set
27116 +CONFIG_IOSCHED_NOOP=y
27117 +CONFIG_IOSCHED_AS=y
27118 +CONFIG_IOSCHED_DEADLINE=y
27119 +CONFIG_IOSCHED_CFQ=y
27120 +CONFIG_DEFAULT_AS=y
27121 +# CONFIG_DEFAULT_DEADLINE is not set
27122 +# CONFIG_DEFAULT_CFQ is not set
27123 +# CONFIG_DEFAULT_NOOP is not set
27124 +CONFIG_DEFAULT_IOSCHED="anticipatory"
27125 +CONFIG_PPC4xx_PCI_EXPRESS=y
27128 +# Platform support
27130 +# CONFIG_PPC_MPC52xx is not set
27131 +# CONFIG_PPC_MPC5200 is not set
27132 +# CONFIG_PPC_CELL is not set
27133 +# CONFIG_PPC_CELL_NATIVE is not set
27134 +# CONFIG_PQ2ADS is not set
27135 +# CONFIG_BAMBOO is not set
27136 +# CONFIG_EBONY is not set
27137 +# CONFIG_SEQUOIA is not set
27138 +# CONFIG_TAISHAN is not set
27140 +# CONFIG_RAINIER is not set
27142 +# CONFIG_MPIC is not set
27143 +# CONFIG_MPIC_WEIRD is not set
27144 +# CONFIG_PPC_I8259 is not set
27145 +# CONFIG_PPC_RTAS is not set
27146 +# CONFIG_MMIO_NVRAM is not set
27147 +# CONFIG_PPC_MPC106 is not set
27148 +# CONFIG_PPC_970_NAP is not set
27149 +# CONFIG_PPC_INDIRECT_IO is not set
27150 +# CONFIG_GENERIC_IOMAP is not set
27151 +# CONFIG_CPU_FREQ is not set
27152 +# CONFIG_CPM2 is not set
27153 +# CONFIG_FSL_ULI1575 is not set
27158 +# CONFIG_HIGHMEM is not set
27159 +# CONFIG_TICK_ONESHOT is not set
27160 +# CONFIG_NO_HZ is not set
27161 +# CONFIG_HIGH_RES_TIMERS is not set
27162 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
27163 +# CONFIG_HZ_100 is not set
27165 +# CONFIG_HZ_300 is not set
27166 +# CONFIG_HZ_1000 is not set
27168 +CONFIG_PREEMPT_NONE=y
27169 +# CONFIG_PREEMPT_VOLUNTARY is not set
27170 +# CONFIG_PREEMPT is not set
27171 +CONFIG_BINFMT_ELF=y
27172 +# CONFIG_BINFMT_MISC is not set
27173 +# CONFIG_MATH_EMULATION is not set
27174 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
27175 +CONFIG_ARCH_FLATMEM_ENABLE=y
27176 +CONFIG_ARCH_POPULATES_NODE_MAP=y
27177 +CONFIG_SELECT_MEMORY_MODEL=y
27178 +CONFIG_FLATMEM_MANUAL=y
27179 +# CONFIG_DISCONTIGMEM_MANUAL is not set
27180 +# CONFIG_SPARSEMEM_MANUAL is not set
27182 +CONFIG_FLAT_NODE_MEM_MAP=y
27183 +# CONFIG_SPARSEMEM_STATIC is not set
27184 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
27185 +CONFIG_SPLIT_PTLOCK_CPUS=4
27186 +CONFIG_RESOURCES_64BIT=y
27187 +CONFIG_ZONE_DMA_FLAG=1
27189 +CONFIG_VIRT_TO_BUS=y
27190 +CONFIG_PROC_DEVICETREE=y
27191 +CONFIG_CMDLINE_BOOL=y
27194 +CONFIG_WANT_DEVICE_TREE=y
27195 +CONFIG_DEVICE_TREE="katmai.dts"
27196 +CONFIG_ISA_DMA_API=y
27202 +CONFIG_PPC_INDIRECT_PCI=y
27204 +CONFIG_PCI_DOMAINS=y
27205 +CONFIG_PCI_SYSCALL=y
27206 +# CONFIG_PCIEPORTBUS is not set
27207 +CONFIG_ARCH_SUPPORTS_MSI=y
27208 +# CONFIG_PCI_MSI is not set
27209 +CONFIG_PCI_LEGACY=y
27210 +# CONFIG_PCI_DEBUG is not set
27211 +# CONFIG_PCCARD is not set
27212 +# CONFIG_HOTPLUG_PCI is not set
27217 +# CONFIG_ADVANCED_OPTIONS is not set
27220 +# Default settings for advanced configuration options are used
27222 +CONFIG_HIGHMEM_START=0xfe000000
27223 +CONFIG_LOWMEM_SIZE=0x30000000
27224 +CONFIG_KERNEL_START=0xc0000000
27225 +CONFIG_TASK_SIZE=0xc0000000
27226 +CONFIG_CONSISTENT_START=0xff100000
27227 +CONFIG_CONSISTENT_SIZE=0x00200000
27228 +CONFIG_BOOT_LOAD=0x01000000
27236 +# Networking options
27239 +# CONFIG_PACKET_MMAP is not set
27241 +# CONFIG_NET_KEY is not set
27243 +# CONFIG_IP_MULTICAST is not set
27244 +# CONFIG_IP_ADVANCED_ROUTER is not set
27245 +CONFIG_IP_FIB_HASH=y
27247 +CONFIG_IP_PNP_DHCP=y
27248 +CONFIG_IP_PNP_BOOTP=y
27249 +# CONFIG_IP_PNP_RARP is not set
27250 +# CONFIG_NET_IPIP is not set
27251 +# CONFIG_NET_IPGRE is not set
27252 +# CONFIG_ARPD is not set
27253 +# CONFIG_SYN_COOKIES is not set
27254 +# CONFIG_INET_AH is not set
27255 +# CONFIG_INET_ESP is not set
27256 +# CONFIG_INET_IPCOMP is not set
27257 +# CONFIG_INET_XFRM_TUNNEL is not set
27258 +# CONFIG_INET_TUNNEL is not set
27259 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
27260 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
27261 +# CONFIG_INET_XFRM_MODE_BEET is not set
27262 +# CONFIG_INET_LRO is not set
27263 +CONFIG_INET_DIAG=y
27264 +CONFIG_INET_TCP_DIAG=y
27265 +# CONFIG_TCP_CONG_ADVANCED is not set
27266 +CONFIG_TCP_CONG_CUBIC=y
27267 +CONFIG_DEFAULT_TCP_CONG="cubic"
27268 +# CONFIG_TCP_MD5SIG is not set
27269 +# CONFIG_IPV6 is not set
27270 +# CONFIG_INET6_XFRM_TUNNEL is not set
27271 +# CONFIG_INET6_TUNNEL is not set
27272 +# CONFIG_NETWORK_SECMARK is not set
27273 +# CONFIG_NETFILTER is not set
27274 +# CONFIG_IP_DCCP is not set
27275 +# CONFIG_IP_SCTP is not set
27276 +# CONFIG_TIPC is not set
27277 +# CONFIG_ATM is not set
27278 +# CONFIG_BRIDGE is not set
27279 +# CONFIG_VLAN_8021Q is not set
27280 +# CONFIG_DECNET is not set
27281 +# CONFIG_LLC2 is not set
27282 +# CONFIG_IPX is not set
27283 +# CONFIG_ATALK is not set
27284 +# CONFIG_X25 is not set
27285 +# CONFIG_LAPB is not set
27286 +# CONFIG_ECONET is not set
27287 +# CONFIG_WAN_ROUTER is not set
27288 +# CONFIG_NET_SCHED is not set
27293 +# CONFIG_NET_PKTGEN is not set
27294 +# CONFIG_HAMRADIO is not set
27295 +# CONFIG_IRDA is not set
27296 +# CONFIG_BT is not set
27297 +# CONFIG_AF_RXRPC is not set
27302 +# CONFIG_CFG80211 is not set
27303 +# CONFIG_WIRELESS_EXT is not set
27304 +# CONFIG_MAC80211 is not set
27305 +# CONFIG_IEEE80211 is not set
27306 +# CONFIG_RFKILL is not set
27307 +# CONFIG_NET_9P is not set
27314 +# Generic Driver Options
27316 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
27317 +CONFIG_STANDALONE=y
27318 +CONFIG_PREVENT_FIRMWARE_BUILD=y
27319 +CONFIG_FW_LOADER=y
27320 +# CONFIG_DEBUG_DRIVER is not set
27321 +# CONFIG_DEBUG_DEVRES is not set
27322 +# CONFIG_SYS_HYPERVISOR is not set
27323 +CONFIG_CONNECTOR=y
27324 +CONFIG_PROC_EVENTS=y
27325 +# CONFIG_MTD is not set
27326 +CONFIG_OF_DEVICE=y
27327 +# CONFIG_PARPORT is not set
27329 +# CONFIG_BLK_DEV_FD is not set
27330 +# CONFIG_BLK_CPQ_DA is not set
27331 +# CONFIG_BLK_CPQ_CISS_DA is not set
27332 +# CONFIG_BLK_DEV_DAC960 is not set
27333 +# CONFIG_BLK_DEV_UMEM is not set
27334 +# CONFIG_BLK_DEV_COW_COMMON is not set
27335 +# CONFIG_BLK_DEV_LOOP is not set
27336 +# CONFIG_BLK_DEV_NBD is not set
27337 +# CONFIG_BLK_DEV_SX8 is not set
27338 +CONFIG_BLK_DEV_RAM=y
27339 +CONFIG_BLK_DEV_RAM_COUNT=16
27340 +CONFIG_BLK_DEV_RAM_SIZE=35000
27341 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
27342 +# CONFIG_CDROM_PKTCDVD is not set
27343 +# CONFIG_ATA_OVER_ETH is not set
27344 +# CONFIG_XILINX_SYSACE is not set
27345 +CONFIG_MISC_DEVICES=y
27346 +# CONFIG_PHANTOM is not set
27347 +# CONFIG_EEPROM_93CX6 is not set
27348 +# CONFIG_SGI_IOC4 is not set
27349 +# CONFIG_TIFM_CORE is not set
27350 +# CONFIG_IDE is not set
27353 +# SCSI device support
27355 +# CONFIG_RAID_ATTRS is not set
27356 +# CONFIG_SCSI is not set
27357 +# CONFIG_SCSI_DMA is not set
27358 +# CONFIG_SCSI_NETLINK is not set
27359 +# CONFIG_ATA is not set
27360 +# CONFIG_MD is not set
27361 +# CONFIG_FUSION is not set
27364 +# IEEE 1394 (FireWire) support
27366 +# CONFIG_FIREWIRE is not set
27367 +# CONFIG_IEEE1394 is not set
27368 +# CONFIG_I2O is not set
27369 +CONFIG_MACINTOSH_DRIVERS=y
27370 +# CONFIG_MAC_EMUMOUSEBTN is not set
27371 +# CONFIG_WINDFARM is not set
27372 +CONFIG_NETDEVICES=y
27373 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
27374 +# CONFIG_DUMMY is not set
27375 +# CONFIG_BONDING is not set
27376 +# CONFIG_MACVLAN is not set
27377 +# CONFIG_EQUALIZER is not set
27378 +# CONFIG_TUN is not set
27379 +# CONFIG_VETH is not set
27380 +# CONFIG_IP1000 is not set
27381 +# CONFIG_ARCNET is not set
27382 +# CONFIG_PHYLIB is not set
27383 +CONFIG_NET_ETHERNET=y
27384 +# CONFIG_MII is not set
27385 +# CONFIG_HAPPYMEAL is not set
27386 +# CONFIG_SUNGEM is not set
27387 +# CONFIG_CASSINI is not set
27388 +# CONFIG_NET_VENDOR_3COM is not set
27389 +# CONFIG_NET_TULIP is not set
27390 +# CONFIG_HP100 is not set
27391 +CONFIG_IBM_NEW_EMAC=y
27392 +CONFIG_IBM_NEW_EMAC_RXB=128
27393 +CONFIG_IBM_NEW_EMAC_TXB=64
27394 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
27395 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
27396 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
27397 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
27398 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
27399 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
27400 +# CONFIG_IBM_NEW_EMAC_TAH is not set
27401 +CONFIG_IBM_NEW_EMAC_EMAC4=y
27402 +# CONFIG_NET_PCI is not set
27403 +# CONFIG_B44 is not set
27404 +CONFIG_NETDEV_1000=y
27405 +# CONFIG_ACENIC is not set
27406 +# CONFIG_DL2K is not set
27407 +# CONFIG_E1000 is not set
27408 +# CONFIG_E1000E is not set
27409 +# CONFIG_NS83820 is not set
27410 +# CONFIG_HAMACHI is not set
27411 +# CONFIG_YELLOWFIN is not set
27412 +# CONFIG_R8169 is not set
27413 +# CONFIG_SIS190 is not set
27414 +# CONFIG_SKGE is not set
27415 +# CONFIG_SKY2 is not set
27416 +# CONFIG_SK98LIN is not set
27417 +# CONFIG_VIA_VELOCITY is not set
27418 +# CONFIG_TIGON3 is not set
27419 +# CONFIG_BNX2 is not set
27420 +# CONFIG_QLA3XXX is not set
27421 +# CONFIG_ATL1 is not set
27422 +CONFIG_NETDEV_10000=y
27423 +# CONFIG_CHELSIO_T1 is not set
27424 +# CONFIG_CHELSIO_T3 is not set
27425 +# CONFIG_IXGBE is not set
27426 +# CONFIG_IXGB is not set
27427 +# CONFIG_S2IO is not set
27428 +# CONFIG_MYRI10GE is not set
27429 +# CONFIG_NETXEN_NIC is not set
27430 +# CONFIG_NIU is not set
27431 +# CONFIG_MLX4_CORE is not set
27432 +# CONFIG_TEHUTI is not set
27433 +# CONFIG_TR is not set
27438 +# CONFIG_WLAN_PRE80211 is not set
27439 +# CONFIG_WLAN_80211 is not set
27440 +# CONFIG_WAN is not set
27441 +# CONFIG_FDDI is not set
27442 +# CONFIG_HIPPI is not set
27443 +# CONFIG_PPP is not set
27444 +# CONFIG_SLIP is not set
27445 +# CONFIG_SHAPER is not set
27446 +# CONFIG_NETCONSOLE is not set
27447 +# CONFIG_NETPOLL is not set
27448 +# CONFIG_NET_POLL_CONTROLLER is not set
27449 +# CONFIG_ISDN is not set
27450 +# CONFIG_PHONE is not set
27453 +# Input device support
27455 +# CONFIG_INPUT is not set
27458 +# Hardware I/O ports
27460 +# CONFIG_SERIO is not set
27461 +# CONFIG_GAMEPORT is not set
27464 +# Character devices
27466 +# CONFIG_VT is not set
27467 +# CONFIG_SERIAL_NONSTANDARD is not set
27472 +CONFIG_SERIAL_8250=y
27473 +CONFIG_SERIAL_8250_CONSOLE=y
27474 +# CONFIG_SERIAL_8250_PCI is not set
27475 +CONFIG_SERIAL_8250_NR_UARTS=4
27476 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
27477 +CONFIG_SERIAL_8250_EXTENDED=y
27478 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
27479 +CONFIG_SERIAL_8250_SHARE_IRQ=y
27480 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
27481 +# CONFIG_SERIAL_8250_RSA is not set
27484 +# Non-8250 serial port support
27486 +# CONFIG_SERIAL_UARTLITE is not set
27487 +CONFIG_SERIAL_CORE=y
27488 +CONFIG_SERIAL_CORE_CONSOLE=y
27489 +# CONFIG_SERIAL_JSM is not set
27490 +CONFIG_SERIAL_OF_PLATFORM=y
27491 +CONFIG_UNIX98_PTYS=y
27492 +CONFIG_LEGACY_PTYS=y
27493 +CONFIG_LEGACY_PTY_COUNT=256
27494 +# CONFIG_IPMI_HANDLER is not set
27495 +# CONFIG_HW_RANDOM is not set
27496 +# CONFIG_NVRAM is not set
27497 +# CONFIG_GEN_RTC is not set
27498 +# CONFIG_R3964 is not set
27499 +# CONFIG_APPLICOM is not set
27500 +# CONFIG_RAW_DRIVER is not set
27501 +# CONFIG_TCG_TPM is not set
27503 +# CONFIG_I2C is not set
27508 +# CONFIG_SPI is not set
27509 +# CONFIG_SPI_MASTER is not set
27510 +# CONFIG_W1 is not set
27511 +# CONFIG_POWER_SUPPLY is not set
27512 +# CONFIG_HWMON is not set
27513 +# CONFIG_WATCHDOG is not set
27516 +# Sonics Silicon Backplane
27518 +CONFIG_SSB_POSSIBLE=y
27519 +# CONFIG_SSB is not set
27522 +# Multifunction device drivers
27524 +# CONFIG_MFD_SM501 is not set
27527 +# Multimedia devices
27529 +# CONFIG_VIDEO_DEV is not set
27530 +# CONFIG_DVB_CORE is not set
27534 +# Graphics support
27536 +# CONFIG_AGP is not set
27537 +# CONFIG_DRM is not set
27538 +# CONFIG_VGASTATE is not set
27539 +CONFIG_VIDEO_OUTPUT_CONTROL=m
27540 +# CONFIG_FB is not set
27541 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
27544 +# Display device support
27546 +# CONFIG_DISPLAY_SUPPORT is not set
27551 +# CONFIG_SOUND is not set
27552 +CONFIG_USB_SUPPORT=y
27553 +CONFIG_USB_ARCH_HAS_HCD=y
27554 +CONFIG_USB_ARCH_HAS_OHCI=y
27555 +CONFIG_USB_ARCH_HAS_EHCI=y
27556 +# CONFIG_USB is not set
27559 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
27563 +# USB Gadget Support
27565 +# CONFIG_USB_GADGET is not set
27566 +# CONFIG_MMC is not set
27567 +# CONFIG_NEW_LEDS is not set
27568 +# CONFIG_INFINIBAND is not set
27569 +# CONFIG_EDAC is not set
27570 +# CONFIG_RTC_CLASS is not set
27575 +# CONFIG_UIO is not set
27581 +# CONFIG_EXT2_FS_XATTR is not set
27582 +# CONFIG_EXT2_FS_XIP is not set
27583 +# CONFIG_EXT3_FS is not set
27584 +# CONFIG_EXT4DEV_FS is not set
27585 +# CONFIG_REISERFS_FS is not set
27586 +# CONFIG_JFS_FS is not set
27587 +# CONFIG_FS_POSIX_ACL is not set
27588 +# CONFIG_XFS_FS is not set
27589 +# CONFIG_GFS2_FS is not set
27590 +# CONFIG_OCFS2_FS is not set
27591 +# CONFIG_MINIX_FS is not set
27592 +# CONFIG_ROMFS_FS is not set
27594 +CONFIG_INOTIFY_USER=y
27595 +# CONFIG_QUOTA is not set
27597 +# CONFIG_AUTOFS_FS is not set
27598 +# CONFIG_AUTOFS4_FS is not set
27599 +# CONFIG_FUSE_FS is not set
27602 +# CD-ROM/DVD Filesystems
27604 +# CONFIG_ISO9660_FS is not set
27605 +# CONFIG_UDF_FS is not set
27608 +# DOS/FAT/NT Filesystems
27610 +# CONFIG_MSDOS_FS is not set
27611 +# CONFIG_VFAT_FS is not set
27612 +# CONFIG_NTFS_FS is not set
27615 +# Pseudo filesystems
27618 +CONFIG_PROC_KCORE=y
27619 +CONFIG_PROC_SYSCTL=y
27622 +# CONFIG_TMPFS_POSIX_ACL is not set
27623 +# CONFIG_HUGETLB_PAGE is not set
27624 +# CONFIG_CONFIGFS_FS is not set
27627 +# Miscellaneous filesystems
27629 +# CONFIG_ADFS_FS is not set
27630 +# CONFIG_AFFS_FS is not set
27631 +# CONFIG_HFS_FS is not set
27632 +# CONFIG_HFSPLUS_FS is not set
27633 +# CONFIG_BEFS_FS is not set
27634 +# CONFIG_BFS_FS is not set
27635 +# CONFIG_EFS_FS is not set
27637 +# CONFIG_VXFS_FS is not set
27638 +# CONFIG_HPFS_FS is not set
27639 +# CONFIG_QNX4FS_FS is not set
27640 +# CONFIG_SYSV_FS is not set
27641 +# CONFIG_UFS_FS is not set
27642 +CONFIG_NETWORK_FILESYSTEMS=y
27645 +# CONFIG_NFS_V3_ACL is not set
27646 +# CONFIG_NFS_V4 is not set
27647 +# CONFIG_NFS_DIRECTIO is not set
27648 +# CONFIG_NFSD is not set
27652 +CONFIG_NFS_COMMON=y
27654 +# CONFIG_SUNRPC_BIND34 is not set
27655 +# CONFIG_RPCSEC_GSS_KRB5 is not set
27656 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
27657 +# CONFIG_SMB_FS is not set
27658 +# CONFIG_CIFS is not set
27659 +# CONFIG_NCP_FS is not set
27660 +# CONFIG_CODA_FS is not set
27661 +# CONFIG_AFS_FS is not set
27666 +# CONFIG_PARTITION_ADVANCED is not set
27667 +CONFIG_MSDOS_PARTITION=y
27668 +# CONFIG_NLS is not set
27669 +# CONFIG_DLM is not set
27670 +# CONFIG_UCC_SLOW is not set
27673 +# Library routines
27675 +CONFIG_BITREVERSE=y
27676 +# CONFIG_CRC_CCITT is not set
27677 +# CONFIG_CRC16 is not set
27678 +# CONFIG_CRC_ITU_T is not set
27680 +# CONFIG_CRC7 is not set
27681 +# CONFIG_LIBCRC32C is not set
27682 +CONFIG_ZLIB_INFLATE=y
27684 +CONFIG_HAS_IOMEM=y
27685 +CONFIG_HAS_IOPORT=y
27687 +CONFIG_INSTRUMENTATION=y
27688 +# CONFIG_PROFILING is not set
27689 +# CONFIG_KPROBES is not set
27690 +# CONFIG_MARKERS is not set
27695 +# CONFIG_PRINTK_TIME is not set
27696 +CONFIG_ENABLE_WARN_DEPRECATED=y
27697 +CONFIG_ENABLE_MUST_CHECK=y
27698 +CONFIG_MAGIC_SYSRQ=y
27699 +# CONFIG_UNUSED_SYMBOLS is not set
27700 +# CONFIG_DEBUG_FS is not set
27701 +# CONFIG_HEADERS_CHECK is not set
27702 +CONFIG_DEBUG_KERNEL=y
27703 +# CONFIG_DEBUG_SHIRQ is not set
27704 +CONFIG_DETECT_SOFTLOCKUP=y
27705 +CONFIG_SCHED_DEBUG=y
27706 +# CONFIG_SCHEDSTATS is not set
27707 +# CONFIG_TIMER_STATS is not set
27708 +# CONFIG_SLUB_DEBUG_ON is not set
27709 +# CONFIG_DEBUG_RT_MUTEXES is not set
27710 +# CONFIG_RT_MUTEX_TESTER is not set
27711 +# CONFIG_DEBUG_SPINLOCK is not set
27712 +# CONFIG_DEBUG_MUTEXES is not set
27713 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
27714 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
27715 +# CONFIG_DEBUG_KOBJECT is not set
27716 +# CONFIG_DEBUG_BUGVERBOSE is not set
27717 +# CONFIG_DEBUG_INFO is not set
27718 +# CONFIG_DEBUG_VM is not set
27719 +# CONFIG_DEBUG_LIST is not set
27720 +# CONFIG_DEBUG_SG is not set
27721 +CONFIG_FORCED_INLINING=y
27722 +# CONFIG_BOOT_PRINTK_DELAY is not set
27723 +# CONFIG_RCU_TORTURE_TEST is not set
27724 +# CONFIG_FAULT_INJECTION is not set
27725 +# CONFIG_SAMPLES is not set
27726 +# CONFIG_DEBUG_STACKOVERFLOW is not set
27727 +# CONFIG_DEBUG_STACK_USAGE is not set
27728 +# CONFIG_DEBUG_PAGEALLOC is not set
27730 +# CONFIG_KGDB is not set
27731 +# CONFIG_XMON is not set
27732 +# CONFIG_BDI_SWITCH is not set
27733 +# CONFIG_PPC_EARLY_DEBUG is not set
27736 +# Security options
27738 +# CONFIG_KEYS is not set
27739 +# CONFIG_SECURITY is not set
27740 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
27742 +CONFIG_CRYPTO_ALGAPI=y
27743 +CONFIG_CRYPTO_BLKCIPHER=y
27744 +CONFIG_CRYPTO_MANAGER=y
27745 +# CONFIG_CRYPTO_HMAC is not set
27746 +# CONFIG_CRYPTO_XCBC is not set
27747 +# CONFIG_CRYPTO_NULL is not set
27748 +# CONFIG_CRYPTO_MD4 is not set
27749 +CONFIG_CRYPTO_MD5=y
27750 +# CONFIG_CRYPTO_SHA1 is not set
27751 +# CONFIG_CRYPTO_SHA256 is not set
27752 +# CONFIG_CRYPTO_SHA512 is not set
27753 +# CONFIG_CRYPTO_WP512 is not set
27754 +# CONFIG_CRYPTO_TGR192 is not set
27755 +# CONFIG_CRYPTO_GF128MUL is not set
27756 +CONFIG_CRYPTO_ECB=y
27757 +CONFIG_CRYPTO_CBC=y
27758 +CONFIG_CRYPTO_PCBC=y
27759 +# CONFIG_CRYPTO_LRW is not set
27760 +# CONFIG_CRYPTO_XTS is not set
27761 +# CONFIG_CRYPTO_CRYPTD is not set
27762 +CONFIG_CRYPTO_DES=y
27763 +# CONFIG_CRYPTO_FCRYPT is not set
27764 +# CONFIG_CRYPTO_BLOWFISH is not set
27765 +# CONFIG_CRYPTO_TWOFISH is not set
27766 +# CONFIG_CRYPTO_SERPENT is not set
27767 +# CONFIG_CRYPTO_AES is not set
27768 +# CONFIG_CRYPTO_CAST5 is not set
27769 +# CONFIG_CRYPTO_CAST6 is not set
27770 +# CONFIG_CRYPTO_TEA is not set
27771 +# CONFIG_CRYPTO_ARC4 is not set
27772 +# CONFIG_CRYPTO_KHAZAD is not set
27773 +# CONFIG_CRYPTO_ANUBIS is not set
27774 +# CONFIG_CRYPTO_SEED is not set
27775 +# CONFIG_CRYPTO_DEFLATE is not set
27776 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
27777 +# CONFIG_CRYPTO_CRC32C is not set
27778 +# CONFIG_CRYPTO_CAMELLIA is not set
27779 +# CONFIG_CRYPTO_TEST is not set
27780 +# CONFIG_CRYPTO_AUTHENC is not set
27781 +CONFIG_CRYPTO_HW=y
27782 +# CONFIG_PPC_CLOCK is not set
27783 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/kilauea_defconfig powerpc.git/arch/powerpc/configs/kilauea_defconfig
27784 --- linux-2.6.24/arch/powerpc/configs/kilauea_defconfig 2008-01-24 23:58:37.000000000 +0100
27785 +++ powerpc.git/arch/powerpc/configs/kilauea_defconfig 2008-01-28 20:25:49.000000000 +0100
27788 # Automatically generated make config: don't edit
27789 -# Linux kernel version: 2.6.24-rc4
27790 -# Thu Dec 6 16:48:20 2007
27791 +# Linux kernel version: 2.6.24-rc6
27792 +# Thu Jan 3 14:21:31 2008
27794 # CONFIG_PPC64 is not set
27797 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
27800 -# CONFIG_PPC_UDBG_16550 is not set
27801 +CONFIG_PPC_UDBG_16550=y
27802 # CONFIG_GENERIC_TBSYNC is not set
27803 CONFIG_AUDIT_ARCH=y
27804 CONFIG_GENERIC_BUG=y
27805 @@ -125,6 +125,7 @@
27806 # CONFIG_DEFAULT_CFQ is not set
27807 # CONFIG_DEFAULT_NOOP is not set
27808 CONFIG_DEFAULT_IOSCHED="anticipatory"
27809 +CONFIG_PPC4xx_PCI_EXPRESS=y
27813 @@ -134,9 +135,12 @@
27814 # CONFIG_PPC_CELL is not set
27815 # CONFIG_PPC_CELL_NATIVE is not set
27816 # CONFIG_PQ2ADS is not set
27817 +# CONFIG_EP405 is not set
27819 +# CONFIG_MAKALU is not set
27820 # CONFIG_WALNUT is not set
27821 # CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
27823 # CONFIG_MPIC is not set
27824 # CONFIG_MPIC_WEIRD is not set
27825 # CONFIG_PPC_I8259 is not set
27826 @@ -199,11 +203,17 @@
27830 -# CONFIG_PCI is not set
27831 -# CONFIG_PCI_DOMAINS is not set
27832 -# CONFIG_PCI_SYSCALL is not set
27833 -# CONFIG_ARCH_SUPPORTS_MSI is not set
27834 +CONFIG_PPC_INDIRECT_PCI=y
27836 +CONFIG_PCI_DOMAINS=y
27837 +CONFIG_PCI_SYSCALL=y
27838 +# CONFIG_PCIEPORTBUS is not set
27839 +CONFIG_ARCH_SUPPORTS_MSI=y
27840 +# CONFIG_PCI_MSI is not set
27841 +CONFIG_PCI_LEGACY=y
27842 +# CONFIG_PCI_DEBUG is not set
27843 # CONFIG_PCCARD is not set
27844 +# CONFIG_HOTPLUG_PCI is not set
27848 @@ -368,11 +378,13 @@
27849 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
27850 # CONFIG_MTD_PHYSMAP is not set
27851 CONFIG_MTD_PHYSMAP_OF=y
27852 +# CONFIG_MTD_INTEL_VR_NOR is not set
27853 # CONFIG_MTD_PLATRAM is not set
27856 # Self-contained MTD device drivers
27858 +# CONFIG_MTD_PMC551 is not set
27859 # CONFIG_MTD_SLRAM is not set
27860 # CONFIG_MTD_PHRAM is not set
27861 # CONFIG_MTD_MTDRAM is not set
27862 @@ -395,9 +407,14 @@
27863 # CONFIG_PARPORT is not set
27865 # CONFIG_BLK_DEV_FD is not set
27866 +# CONFIG_BLK_CPQ_DA is not set
27867 +# CONFIG_BLK_CPQ_CISS_DA is not set
27868 +# CONFIG_BLK_DEV_DAC960 is not set
27869 +# CONFIG_BLK_DEV_UMEM is not set
27870 # CONFIG_BLK_DEV_COW_COMMON is not set
27871 # CONFIG_BLK_DEV_LOOP is not set
27872 # CONFIG_BLK_DEV_NBD is not set
27873 +# CONFIG_BLK_DEV_SX8 is not set
27874 CONFIG_BLK_DEV_RAM=y
27875 CONFIG_BLK_DEV_RAM_COUNT=16
27876 CONFIG_BLK_DEV_RAM_SIZE=35000
27877 @@ -417,6 +434,14 @@
27878 # CONFIG_SCSI_NETLINK is not set
27879 # CONFIG_ATA is not set
27880 # CONFIG_MD is not set
27881 +# CONFIG_FUSION is not set
27884 +# IEEE 1394 (FireWire) support
27886 +# CONFIG_FIREWIRE is not set
27887 +# CONFIG_IEEE1394 is not set
27888 +# CONFIG_I2O is not set
27889 # CONFIG_MACINTOSH_DRIVERS is not set
27890 CONFIG_NETDEVICES=y
27891 # CONFIG_NETDEVICES_MULTIQUEUE is not set
27892 @@ -426,9 +451,33 @@
27893 # CONFIG_EQUALIZER is not set
27894 # CONFIG_TUN is not set
27895 # CONFIG_VETH is not set
27896 -# CONFIG_NET_ETHERNET is not set
27897 +# CONFIG_IP1000 is not set
27898 +# CONFIG_ARCNET is not set
27899 +# CONFIG_PHYLIB is not set
27900 +CONFIG_NET_ETHERNET=y
27901 +# CONFIG_MII is not set
27902 +# CONFIG_HAPPYMEAL is not set
27903 +# CONFIG_SUNGEM is not set
27904 +# CONFIG_CASSINI is not set
27905 +# CONFIG_NET_VENDOR_3COM is not set
27906 +# CONFIG_NET_TULIP is not set
27907 +# CONFIG_HP100 is not set
27908 +CONFIG_IBM_NEW_EMAC=y
27909 +CONFIG_IBM_NEW_EMAC_RXB=256
27910 +CONFIG_IBM_NEW_EMAC_TXB=256
27911 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
27912 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
27913 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
27914 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
27915 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
27916 +CONFIG_IBM_NEW_EMAC_RGMII=y
27917 +# CONFIG_IBM_NEW_EMAC_TAH is not set
27918 +CONFIG_IBM_NEW_EMAC_EMAC4=y
27919 +# CONFIG_NET_PCI is not set
27920 +# CONFIG_B44 is not set
27921 # CONFIG_NETDEV_1000 is not set
27922 # CONFIG_NETDEV_10000 is not set
27923 +# CONFIG_TR is not set
27927 @@ -436,6 +485,8 @@
27928 # CONFIG_WLAN_PRE80211 is not set
27929 # CONFIG_WLAN_80211 is not set
27930 # CONFIG_WAN is not set
27931 +# CONFIG_FDDI is not set
27932 +# CONFIG_HIPPI is not set
27933 # CONFIG_PPP is not set
27934 # CONFIG_SLIP is not set
27935 # CONFIG_SHAPER is not set
27936 @@ -467,6 +518,7 @@
27938 CONFIG_SERIAL_8250=y
27939 CONFIG_SERIAL_8250_CONSOLE=y
27940 +CONFIG_SERIAL_8250_PCI=y
27941 CONFIG_SERIAL_8250_NR_UARTS=4
27942 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
27943 CONFIG_SERIAL_8250_EXTENDED=y
27944 @@ -481,6 +533,7 @@
27945 # CONFIG_SERIAL_UARTLITE is not set
27946 CONFIG_SERIAL_CORE=y
27947 CONFIG_SERIAL_CORE_CONSOLE=y
27948 +# CONFIG_SERIAL_JSM is not set
27949 CONFIG_SERIAL_OF_PLATFORM=y
27950 CONFIG_UNIX98_PTYS=y
27951 CONFIG_LEGACY_PTYS=y
27952 @@ -490,8 +543,10 @@
27953 # CONFIG_NVRAM is not set
27954 # CONFIG_GEN_RTC is not set
27955 # CONFIG_R3964 is not set
27956 +# CONFIG_APPLICOM is not set
27957 # CONFIG_RAW_DRIVER is not set
27958 # CONFIG_TCG_TPM is not set
27960 # CONFIG_I2C is not set
27963 @@ -525,6 +580,8 @@
27967 +# CONFIG_AGP is not set
27968 +# CONFIG_DRM is not set
27969 # CONFIG_VGASTATE is not set
27970 # CONFIG_VIDEO_OUTPUT_CONTROL is not set
27971 # CONFIG_FB is not set
27972 @@ -542,6 +599,7 @@
27973 # CONFIG_USB_SUPPORT is not set
27974 # CONFIG_MMC is not set
27975 # CONFIG_NEW_LEDS is not set
27976 +# CONFIG_INFINIBAND is not set
27977 # CONFIG_EDAC is not set
27978 # CONFIG_RTC_CLASS is not set
27980 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/lite5200_defconfig powerpc.git/arch/powerpc/configs/lite5200_defconfig
27981 --- linux-2.6.24/arch/powerpc/configs/lite5200_defconfig 2008-01-24 23:58:37.000000000 +0100
27982 +++ powerpc.git/arch/powerpc/configs/lite5200_defconfig 1970-01-01 01:00:00.000000000 +0100
27985 -# Automatically generated make config: don't edit
27986 -# Linux kernel version: 2.6.24-rc4
27987 -# Thu Dec 6 16:48:24 2007
27989 -# CONFIG_PPC64 is not set
27992 -# Processor support
27995 -# CONFIG_PPC_85xx is not set
27996 -# CONFIG_PPC_8xx is not set
27997 -# CONFIG_40x is not set
27998 -# CONFIG_44x is not set
27999 -# CONFIG_E200 is not set
28001 -# CONFIG_ALTIVEC is not set
28002 -CONFIG_PPC_STD_MMU=y
28003 -CONFIG_PPC_STD_MMU_32=y
28004 -# CONFIG_PPC_MM_SLICES is not set
28005 -# CONFIG_SMP is not set
28007 -CONFIG_WORD_SIZE=32
28008 -CONFIG_PPC_MERGE=y
28010 -CONFIG_GENERIC_CMOS_UPDATE=y
28011 -CONFIG_GENERIC_TIME=y
28012 -CONFIG_GENERIC_TIME_VSYSCALL=y
28013 -CONFIG_GENERIC_CLOCKEVENTS=y
28014 -CONFIG_GENERIC_HARDIRQS=y
28015 -CONFIG_IRQ_PER_CPU=y
28016 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
28017 -CONFIG_ARCH_HAS_ILOG2_U32=y
28018 -CONFIG_GENERIC_HWEIGHT=y
28019 -CONFIG_GENERIC_CALIBRATE_DELAY=y
28020 -CONFIG_GENERIC_FIND_NEXT_BIT=y
28021 -# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
28023 -CONFIG_EARLY_PRINTK=y
28024 -CONFIG_GENERIC_NVRAM=y
28025 -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
28026 -CONFIG_ARCH_MAY_HAVE_PC_FDC=y
28029 -# CONFIG_PPC_UDBG_16550 is not set
28030 -# CONFIG_GENERIC_TBSYNC is not set
28031 -CONFIG_AUDIT_ARCH=y
28032 -CONFIG_GENERIC_BUG=y
28033 -# CONFIG_DEFAULT_UIMAGE is not set
28034 -# CONFIG_PPC_DCR_NATIVE is not set
28035 -# CONFIG_PPC_DCR_MMIO is not set
28036 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28041 -CONFIG_EXPERIMENTAL=y
28042 -CONFIG_BROKEN_ON_SMP=y
28043 -CONFIG_INIT_ENV_ARG_LIMIT=32
28044 -CONFIG_LOCALVERSION=""
28045 -CONFIG_LOCALVERSION_AUTO=y
28048 -CONFIG_SYSVIPC_SYSCTL=y
28049 -# CONFIG_POSIX_MQUEUE is not set
28050 -# CONFIG_BSD_PROCESS_ACCT is not set
28051 -# CONFIG_TASKSTATS is not set
28052 -# CONFIG_USER_NS is not set
28053 -# CONFIG_PID_NS is not set
28054 -# CONFIG_AUDIT is not set
28055 -# CONFIG_IKCONFIG is not set
28056 -CONFIG_LOG_BUF_SHIFT=14
28057 -# CONFIG_CGROUPS is not set
28058 -# CONFIG_FAIR_GROUP_SCHED is not set
28059 -CONFIG_SYSFS_DEPRECATED=y
28060 -# CONFIG_RELAY is not set
28061 -CONFIG_BLK_DEV_INITRD=y
28062 -CONFIG_INITRAMFS_SOURCE=""
28063 -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
28066 -# CONFIG_SYSCTL_SYSCALL is not set
28067 -# CONFIG_KALLSYMS is not set
28072 -CONFIG_BASE_FULL=y
28074 -CONFIG_ANON_INODES=y
28075 -# CONFIG_EPOLL is not set
28079 -CONFIG_VM_EVENT_COUNTERS=y
28080 -CONFIG_SLUB_DEBUG=y
28081 -# CONFIG_SLAB is not set
28083 -# CONFIG_SLOB is not set
28084 -CONFIG_RT_MUTEXES=y
28085 -# CONFIG_TINY_SHMEM is not set
28086 -CONFIG_BASE_SMALL=0
28088 -CONFIG_MODULE_UNLOAD=y
28089 -# CONFIG_MODULE_FORCE_UNLOAD is not set
28090 -# CONFIG_MODVERSIONS is not set
28091 -# CONFIG_MODULE_SRCVERSION_ALL is not set
28092 -# CONFIG_KMOD is not set
28094 -# CONFIG_LBD is not set
28095 -# CONFIG_BLK_DEV_IO_TRACE is not set
28096 -# CONFIG_LSF is not set
28097 -# CONFIG_BLK_DEV_BSG is not set
28102 -CONFIG_IOSCHED_NOOP=y
28103 -CONFIG_IOSCHED_AS=y
28104 -CONFIG_IOSCHED_DEADLINE=y
28105 -CONFIG_IOSCHED_CFQ=y
28106 -CONFIG_DEFAULT_AS=y
28107 -# CONFIG_DEFAULT_DEADLINE is not set
28108 -# CONFIG_DEFAULT_CFQ is not set
28109 -# CONFIG_DEFAULT_NOOP is not set
28110 -CONFIG_DEFAULT_IOSCHED="anticipatory"
28113 -# Platform support
28115 -CONFIG_PPC_MULTIPLATFORM=y
28116 -# CONFIG_PPC_82xx is not set
28117 -# CONFIG_PPC_83xx is not set
28118 -# CONFIG_PPC_86xx is not set
28119 -CONFIG_CLASSIC32=y
28120 -# CONFIG_PPC_CHRP is not set
28121 -CONFIG_PPC_MPC52xx=y
28122 -CONFIG_PPC_MPC5200=y
28123 -CONFIG_PPC_MPC5200_BUGFIX=y
28124 -# CONFIG_PPC_EFIKA is not set
28125 -CONFIG_PPC_LITE5200=y
28126 -# CONFIG_PPC_PMAC is not set
28127 -# CONFIG_PPC_CELL is not set
28128 -# CONFIG_PPC_CELL_NATIVE is not set
28129 -# CONFIG_PQ2ADS is not set
28130 -# CONFIG_EMBEDDED6xx is not set
28131 -# CONFIG_MPIC is not set
28132 -# CONFIG_MPIC_WEIRD is not set
28133 -# CONFIG_PPC_I8259 is not set
28134 -# CONFIG_PPC_RTAS is not set
28135 -# CONFIG_MMIO_NVRAM is not set
28136 -# CONFIG_PPC_MPC106 is not set
28137 -# CONFIG_PPC_970_NAP is not set
28138 -# CONFIG_PPC_INDIRECT_IO is not set
28139 -# CONFIG_GENERIC_IOMAP is not set
28140 -# CONFIG_CPU_FREQ is not set
28141 -# CONFIG_TAU is not set
28142 -# CONFIG_CPM2 is not set
28143 -# CONFIG_FSL_ULI1575 is not set
28144 -CONFIG_PPC_BESTCOMM=y
28145 -CONFIG_PPC_BESTCOMM_ATA=y
28146 -CONFIG_PPC_BESTCOMM_FEC=y
28147 -CONFIG_PPC_BESTCOMM_GEN_BD=y
28152 -# CONFIG_HIGHMEM is not set
28153 -CONFIG_TICK_ONESHOT=y
28155 -CONFIG_HIGH_RES_TIMERS=y
28156 -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
28157 -# CONFIG_HZ_100 is not set
28159 -# CONFIG_HZ_300 is not set
28160 -# CONFIG_HZ_1000 is not set
28162 -CONFIG_PREEMPT_NONE=y
28163 -# CONFIG_PREEMPT_VOLUNTARY is not set
28164 -# CONFIG_PREEMPT is not set
28165 -CONFIG_BINFMT_ELF=y
28166 -# CONFIG_BINFMT_MISC is not set
28167 -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
28168 -# CONFIG_KEXEC is not set
28169 -CONFIG_ARCH_FLATMEM_ENABLE=y
28170 -CONFIG_ARCH_POPULATES_NODE_MAP=y
28171 -CONFIG_SELECT_MEMORY_MODEL=y
28172 -CONFIG_FLATMEM_MANUAL=y
28173 -# CONFIG_DISCONTIGMEM_MANUAL is not set
28174 -# CONFIG_SPARSEMEM_MANUAL is not set
28176 -CONFIG_FLAT_NODE_MEM_MAP=y
28177 -# CONFIG_SPARSEMEM_STATIC is not set
28178 -# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
28179 -CONFIG_SPLIT_PTLOCK_CPUS=4
28180 -# CONFIG_RESOURCES_64BIT is not set
28181 -CONFIG_ZONE_DMA_FLAG=1
28183 -CONFIG_VIRT_TO_BUS=y
28184 -CONFIG_PROC_DEVICETREE=y
28185 -# CONFIG_CMDLINE_BOOL is not set
28187 -# CONFIG_PM_LEGACY is not set
28188 -# CONFIG_PM_DEBUG is not set
28190 -CONFIG_SUSPEND_UP_POSSIBLE=y
28192 -CONFIG_HIBERNATION_UP_POSSIBLE=y
28193 -# CONFIG_HIBERNATION is not set
28195 -CONFIG_WANT_DEVICE_TREE=y
28196 -CONFIG_DEVICE_TREE=""
28197 -CONFIG_ISA_DMA_API=y
28203 -CONFIG_GENERIC_ISA_DMA=y
28204 -# CONFIG_PPC_INDIRECT_PCI is not set
28207 -CONFIG_PCI_DOMAINS=y
28208 -CONFIG_PCI_SYSCALL=y
28209 -# CONFIG_PCIEPORTBUS is not set
28210 -CONFIG_ARCH_SUPPORTS_MSI=y
28211 -# CONFIG_PCI_MSI is not set
28212 -CONFIG_PCI_LEGACY=y
28213 -# CONFIG_PCI_DEBUG is not set
28214 -# CONFIG_PCCARD is not set
28215 -# CONFIG_HOTPLUG_PCI is not set
28220 -# CONFIG_ADVANCED_OPTIONS is not set
28223 -# Default settings for advanced configuration options are used
28225 -CONFIG_HIGHMEM_START=0xfe000000
28226 -CONFIG_LOWMEM_SIZE=0x30000000
28227 -CONFIG_KERNEL_START=0xc0000000
28228 -CONFIG_TASK_SIZE=0xc0000000
28229 -CONFIG_BOOT_LOAD=0x00800000
28237 -# Networking options
28240 -# CONFIG_PACKET_MMAP is not set
28243 -CONFIG_XFRM_USER=m
28244 -# CONFIG_XFRM_SUB_POLICY is not set
28245 -# CONFIG_XFRM_MIGRATE is not set
28246 -# CONFIG_NET_KEY is not set
28248 -CONFIG_IP_MULTICAST=y
28249 -# CONFIG_IP_ADVANCED_ROUTER is not set
28250 -CONFIG_IP_FIB_HASH=y
28252 -CONFIG_IP_PNP_DHCP=y
28253 -CONFIG_IP_PNP_BOOTP=y
28254 -# CONFIG_IP_PNP_RARP is not set
28255 -# CONFIG_NET_IPIP is not set
28256 -# CONFIG_NET_IPGRE is not set
28257 -# CONFIG_IP_MROUTE is not set
28258 -# CONFIG_ARPD is not set
28259 -CONFIG_SYN_COOKIES=y
28260 -# CONFIG_INET_AH is not set
28261 -# CONFIG_INET_ESP is not set
28262 -# CONFIG_INET_IPCOMP is not set
28263 -# CONFIG_INET_XFRM_TUNNEL is not set
28264 -# CONFIG_INET_TUNNEL is not set
28265 -CONFIG_INET_XFRM_MODE_TRANSPORT=y
28266 -CONFIG_INET_XFRM_MODE_TUNNEL=y
28267 -CONFIG_INET_XFRM_MODE_BEET=y
28268 -# CONFIG_INET_LRO is not set
28269 -CONFIG_INET_DIAG=y
28270 -CONFIG_INET_TCP_DIAG=y
28271 -# CONFIG_TCP_CONG_ADVANCED is not set
28272 -CONFIG_TCP_CONG_CUBIC=y
28273 -CONFIG_DEFAULT_TCP_CONG="cubic"
28274 -# CONFIG_TCP_MD5SIG is not set
28275 -# CONFIG_IPV6 is not set
28276 -# CONFIG_INET6_XFRM_TUNNEL is not set
28277 -# CONFIG_INET6_TUNNEL is not set
28278 -# CONFIG_NETWORK_SECMARK is not set
28279 -# CONFIG_NETFILTER is not set
28280 -# CONFIG_IP_DCCP is not set
28281 -# CONFIG_IP_SCTP is not set
28282 -# CONFIG_TIPC is not set
28283 -# CONFIG_ATM is not set
28284 -# CONFIG_BRIDGE is not set
28285 -# CONFIG_VLAN_8021Q is not set
28286 -# CONFIG_DECNET is not set
28287 -# CONFIG_LLC2 is not set
28288 -# CONFIG_IPX is not set
28289 -# CONFIG_ATALK is not set
28290 -# CONFIG_X25 is not set
28291 -# CONFIG_LAPB is not set
28292 -# CONFIG_ECONET is not set
28293 -# CONFIG_WAN_ROUTER is not set
28294 -# CONFIG_NET_SCHED is not set
28299 -# CONFIG_NET_PKTGEN is not set
28300 -# CONFIG_HAMRADIO is not set
28301 -# CONFIG_IRDA is not set
28302 -# CONFIG_BT is not set
28303 -# CONFIG_AF_RXRPC is not set
28308 -# CONFIG_CFG80211 is not set
28309 -# CONFIG_WIRELESS_EXT is not set
28310 -# CONFIG_MAC80211 is not set
28311 -# CONFIG_IEEE80211 is not set
28312 -# CONFIG_RFKILL is not set
28313 -# CONFIG_NET_9P is not set
28320 -# Generic Driver Options
28322 -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
28323 -CONFIG_STANDALONE=y
28324 -CONFIG_PREVENT_FIRMWARE_BUILD=y
28325 -# CONFIG_FW_LOADER is not set
28326 -# CONFIG_DEBUG_DRIVER is not set
28327 -# CONFIG_DEBUG_DEVRES is not set
28328 -# CONFIG_SYS_HYPERVISOR is not set
28329 -# CONFIG_CONNECTOR is not set
28330 -# CONFIG_MTD is not set
28331 -CONFIG_OF_DEVICE=y
28332 -# CONFIG_PARPORT is not set
28334 -# CONFIG_BLK_DEV_FD is not set
28335 -# CONFIG_BLK_CPQ_DA is not set
28336 -# CONFIG_BLK_CPQ_CISS_DA is not set
28337 -# CONFIG_BLK_DEV_DAC960 is not set
28338 -# CONFIG_BLK_DEV_UMEM is not set
28339 -# CONFIG_BLK_DEV_COW_COMMON is not set
28340 -CONFIG_BLK_DEV_LOOP=y
28341 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set
28342 -# CONFIG_BLK_DEV_NBD is not set
28343 -# CONFIG_BLK_DEV_SX8 is not set
28344 -CONFIG_BLK_DEV_RAM=y
28345 -CONFIG_BLK_DEV_RAM_COUNT=16
28346 -CONFIG_BLK_DEV_RAM_SIZE=32768
28347 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
28348 -# CONFIG_CDROM_PKTCDVD is not set
28349 -# CONFIG_ATA_OVER_ETH is not set
28350 -CONFIG_MISC_DEVICES=y
28351 -# CONFIG_PHANTOM is not set
28352 -# CONFIG_EEPROM_93CX6 is not set
28353 -# CONFIG_SGI_IOC4 is not set
28354 -# CONFIG_TIFM_CORE is not set
28355 -# CONFIG_IDE is not set
28358 -# SCSI device support
28360 -# CONFIG_RAID_ATTRS is not set
28363 -# CONFIG_SCSI_TGT is not set
28364 -# CONFIG_SCSI_NETLINK is not set
28365 -# CONFIG_SCSI_PROC_FS is not set
28368 -# SCSI support type (disk, tape, CD-ROM)
28370 -# CONFIG_BLK_DEV_SD is not set
28371 -# CONFIG_CHR_DEV_ST is not set
28372 -# CONFIG_CHR_DEV_OSST is not set
28373 -# CONFIG_BLK_DEV_SR is not set
28374 -# CONFIG_CHR_DEV_SG is not set
28375 -# CONFIG_CHR_DEV_SCH is not set
28378 -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
28380 -# CONFIG_SCSI_MULTI_LUN is not set
28381 -# CONFIG_SCSI_CONSTANTS is not set
28382 -# CONFIG_SCSI_LOGGING is not set
28383 -# CONFIG_SCSI_SCAN_ASYNC is not set
28384 -CONFIG_SCSI_WAIT_SCAN=m
28389 -# CONFIG_SCSI_SPI_ATTRS is not set
28390 -# CONFIG_SCSI_FC_ATTRS is not set
28391 -# CONFIG_SCSI_ISCSI_ATTRS is not set
28392 -# CONFIG_SCSI_SAS_LIBSAS is not set
28393 -# CONFIG_SCSI_SRP_ATTRS is not set
28394 -CONFIG_SCSI_LOWLEVEL=y
28395 -# CONFIG_ISCSI_TCP is not set
28396 -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
28397 -# CONFIG_SCSI_3W_9XXX is not set
28398 -# CONFIG_SCSI_ACARD is not set
28399 -# CONFIG_SCSI_AACRAID is not set
28400 -# CONFIG_SCSI_AIC7XXX is not set
28401 -# CONFIG_SCSI_AIC7XXX_OLD is not set
28402 -# CONFIG_SCSI_AIC79XX is not set
28403 -# CONFIG_SCSI_AIC94XX is not set
28404 -# CONFIG_SCSI_DPT_I2O is not set
28405 -# CONFIG_SCSI_ADVANSYS is not set
28406 -# CONFIG_SCSI_ARCMSR is not set
28407 -# CONFIG_MEGARAID_NEWGEN is not set
28408 -# CONFIG_MEGARAID_LEGACY is not set
28409 -# CONFIG_MEGARAID_SAS is not set
28410 -# CONFIG_SCSI_HPTIOP is not set
28411 -# CONFIG_SCSI_BUSLOGIC is not set
28412 -# CONFIG_SCSI_DMX3191D is not set
28413 -# CONFIG_SCSI_EATA is not set
28414 -# CONFIG_SCSI_FUTURE_DOMAIN is not set
28415 -# CONFIG_SCSI_GDTH is not set
28416 -# CONFIG_SCSI_IPS is not set
28417 -# CONFIG_SCSI_INITIO is not set
28418 -# CONFIG_SCSI_INIA100 is not set
28419 -# CONFIG_SCSI_STEX is not set
28420 -# CONFIG_SCSI_SYM53C8XX_2 is not set
28421 -# CONFIG_SCSI_IPR is not set
28422 -# CONFIG_SCSI_QLOGIC_1280 is not set
28423 -# CONFIG_SCSI_QLA_FC is not set
28424 -# CONFIG_SCSI_QLA_ISCSI is not set
28425 -# CONFIG_SCSI_LPFC is not set
28426 -# CONFIG_SCSI_DC395x is not set
28427 -# CONFIG_SCSI_DC390T is not set
28428 -# CONFIG_SCSI_NSP32 is not set
28429 -# CONFIG_SCSI_DEBUG is not set
28430 -# CONFIG_SCSI_SRP is not set
28432 -# CONFIG_ATA_NONSTANDARD is not set
28433 -# CONFIG_SATA_AHCI is not set
28434 -# CONFIG_SATA_SVW is not set
28435 -# CONFIG_ATA_PIIX is not set
28436 -# CONFIG_SATA_MV is not set
28437 -# CONFIG_SATA_NV is not set
28438 -# CONFIG_PDC_ADMA is not set
28439 -# CONFIG_SATA_QSTOR is not set
28440 -# CONFIG_SATA_PROMISE is not set
28441 -# CONFIG_SATA_SX4 is not set
28442 -# CONFIG_SATA_SIL is not set
28443 -# CONFIG_SATA_SIL24 is not set
28444 -# CONFIG_SATA_SIS is not set
28445 -# CONFIG_SATA_ULI is not set
28446 -# CONFIG_SATA_VIA is not set
28447 -# CONFIG_SATA_VITESSE is not set
28448 -# CONFIG_SATA_INIC162X is not set
28449 -# CONFIG_PATA_ALI is not set
28450 -# CONFIG_PATA_AMD is not set
28451 -# CONFIG_PATA_ARTOP is not set
28452 -# CONFIG_PATA_ATIIXP is not set
28453 -# CONFIG_PATA_CMD640_PCI is not set
28454 -# CONFIG_PATA_CMD64X is not set
28455 -# CONFIG_PATA_CS5520 is not set
28456 -# CONFIG_PATA_CS5530 is not set
28457 -# CONFIG_PATA_CYPRESS is not set
28458 -# CONFIG_PATA_EFAR is not set
28459 -# CONFIG_ATA_GENERIC is not set
28460 -# CONFIG_PATA_HPT366 is not set
28461 -# CONFIG_PATA_HPT37X is not set
28462 -# CONFIG_PATA_HPT3X2N is not set
28463 -# CONFIG_PATA_HPT3X3 is not set
28464 -# CONFIG_PATA_IT821X is not set
28465 -# CONFIG_PATA_IT8213 is not set
28466 -# CONFIG_PATA_JMICRON is not set
28467 -# CONFIG_PATA_TRIFLEX is not set
28468 -# CONFIG_PATA_MARVELL is not set
28469 -CONFIG_PATA_MPC52xx=y
28470 -# CONFIG_PATA_MPIIX is not set
28471 -# CONFIG_PATA_OLDPIIX is not set
28472 -# CONFIG_PATA_NETCELL is not set
28473 -# CONFIG_PATA_NS87410 is not set
28474 -# CONFIG_PATA_NS87415 is not set
28475 -# CONFIG_PATA_OPTI is not set
28476 -# CONFIG_PATA_OPTIDMA is not set
28477 -# CONFIG_PATA_PDC_OLD is not set
28478 -# CONFIG_PATA_RADISYS is not set
28479 -# CONFIG_PATA_RZ1000 is not set
28480 -# CONFIG_PATA_SC1200 is not set
28481 -# CONFIG_PATA_SERVERWORKS is not set
28482 -# CONFIG_PATA_PDC2027X is not set
28483 -# CONFIG_PATA_SIL680 is not set
28484 -# CONFIG_PATA_SIS is not set
28485 -# CONFIG_PATA_VIA is not set
28486 -# CONFIG_PATA_WINBOND is not set
28487 -# CONFIG_PATA_PLATFORM is not set
28488 -# CONFIG_MD is not set
28489 -# CONFIG_FUSION is not set
28492 -# IEEE 1394 (FireWire) support
28494 -# CONFIG_FIREWIRE is not set
28495 -# CONFIG_IEEE1394 is not set
28496 -# CONFIG_I2O is not set
28497 -# CONFIG_MACINTOSH_DRIVERS is not set
28498 -CONFIG_NETDEVICES=y
28499 -# CONFIG_NETDEVICES_MULTIQUEUE is not set
28500 -# CONFIG_DUMMY is not set
28501 -# CONFIG_BONDING is not set
28502 -# CONFIG_MACVLAN is not set
28503 -# CONFIG_EQUALIZER is not set
28504 -# CONFIG_TUN is not set
28505 -# CONFIG_VETH is not set
28506 -# CONFIG_IP1000 is not set
28507 -# CONFIG_ARCNET is not set
28508 -# CONFIG_NET_ETHERNET is not set
28509 -CONFIG_NETDEV_1000=y
28510 -# CONFIG_ACENIC is not set
28511 -# CONFIG_DL2K is not set
28512 -# CONFIG_E1000 is not set
28513 -# CONFIG_E1000E is not set
28514 -# CONFIG_NS83820 is not set
28515 -# CONFIG_HAMACHI is not set
28516 -# CONFIG_YELLOWFIN is not set
28517 -# CONFIG_R8169 is not set
28518 -# CONFIG_SIS190 is not set
28519 -# CONFIG_SKGE is not set
28520 -# CONFIG_SKY2 is not set
28521 -# CONFIG_SK98LIN is not set
28522 -# CONFIG_VIA_VELOCITY is not set
28523 -# CONFIG_TIGON3 is not set
28524 -# CONFIG_BNX2 is not set
28525 -# CONFIG_MV643XX_ETH is not set
28526 -# CONFIG_QLA3XXX is not set
28527 -# CONFIG_ATL1 is not set
28528 -CONFIG_NETDEV_10000=y
28529 -# CONFIG_CHELSIO_T1 is not set
28530 -# CONFIG_CHELSIO_T3 is not set
28531 -# CONFIG_IXGBE is not set
28532 -# CONFIG_IXGB is not set
28533 -# CONFIG_S2IO is not set
28534 -# CONFIG_MYRI10GE is not set
28535 -# CONFIG_NETXEN_NIC is not set
28536 -# CONFIG_NIU is not set
28537 -# CONFIG_MLX4_CORE is not set
28538 -# CONFIG_TEHUTI is not set
28539 -# CONFIG_TR is not set
28544 -# CONFIG_WLAN_PRE80211 is not set
28545 -# CONFIG_WLAN_80211 is not set
28546 -# CONFIG_WAN is not set
28547 -# CONFIG_FDDI is not set
28548 -# CONFIG_HIPPI is not set
28549 -# CONFIG_PPP is not set
28550 -# CONFIG_SLIP is not set
28551 -# CONFIG_NET_FC is not set
28552 -# CONFIG_SHAPER is not set
28553 -# CONFIG_NETCONSOLE is not set
28554 -# CONFIG_NETPOLL is not set
28555 -# CONFIG_NET_POLL_CONTROLLER is not set
28556 -# CONFIG_ISDN is not set
28557 -# CONFIG_PHONE is not set
28560 -# Input device support
28562 -# CONFIG_INPUT is not set
28565 -# Hardware I/O ports
28567 -# CONFIG_SERIO is not set
28568 -# CONFIG_GAMEPORT is not set
28571 -# Character devices
28573 -# CONFIG_VT is not set
28574 -# CONFIG_SERIAL_NONSTANDARD is not set
28579 -# CONFIG_SERIAL_8250 is not set
28582 -# Non-8250 serial port support
28584 -# CONFIG_SERIAL_UARTLITE is not set
28585 -CONFIG_SERIAL_CORE=y
28586 -CONFIG_SERIAL_CORE_CONSOLE=y
28587 -CONFIG_SERIAL_MPC52xx=y
28588 -CONFIG_SERIAL_MPC52xx_CONSOLE=y
28589 -CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=9600
28590 -# CONFIG_SERIAL_JSM is not set
28591 -CONFIG_UNIX98_PTYS=y
28592 -CONFIG_LEGACY_PTYS=y
28593 -CONFIG_LEGACY_PTY_COUNT=256
28594 -# CONFIG_IPMI_HANDLER is not set
28595 -# CONFIG_HW_RANDOM is not set
28596 -# CONFIG_NVRAM is not set
28597 -# CONFIG_GEN_RTC is not set
28598 -# CONFIG_R3964 is not set
28599 -# CONFIG_APPLICOM is not set
28600 -# CONFIG_RAW_DRIVER is not set
28601 -# CONFIG_TCG_TPM is not set
28603 -# CONFIG_I2C is not set
28608 -# CONFIG_SPI is not set
28609 -# CONFIG_SPI_MASTER is not set
28610 -# CONFIG_W1 is not set
28611 -# CONFIG_POWER_SUPPLY is not set
28612 -# CONFIG_HWMON is not set
28613 -# CONFIG_WATCHDOG is not set
28616 -# Sonics Silicon Backplane
28618 -CONFIG_SSB_POSSIBLE=y
28619 -# CONFIG_SSB is not set
28622 -# Multifunction device drivers
28624 -# CONFIG_MFD_SM501 is not set
28627 -# Multimedia devices
28629 -# CONFIG_VIDEO_DEV is not set
28630 -# CONFIG_DVB_CORE is not set
28631 -# CONFIG_DAB is not set
28634 -# Graphics support
28636 -# CONFIG_AGP is not set
28637 -# CONFIG_DRM is not set
28638 -# CONFIG_VGASTATE is not set
28639 -CONFIG_VIDEO_OUTPUT_CONTROL=m
28640 -# CONFIG_FB is not set
28641 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
28644 -# Display device support
28646 -# CONFIG_DISPLAY_SUPPORT is not set
28651 -# CONFIG_SOUND is not set
28652 -CONFIG_USB_SUPPORT=y
28653 -CONFIG_USB_ARCH_HAS_HCD=y
28654 -CONFIG_USB_ARCH_HAS_OHCI=y
28655 -CONFIG_USB_ARCH_HAS_EHCI=y
28656 -# CONFIG_USB is not set
28659 -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
28663 -# USB Gadget Support
28665 -# CONFIG_USB_GADGET is not set
28666 -# CONFIG_MMC is not set
28667 -# CONFIG_NEW_LEDS is not set
28668 -# CONFIG_INFINIBAND is not set
28669 -# CONFIG_EDAC is not set
28670 -# CONFIG_RTC_CLASS is not set
28675 -# CONFIG_UIO is not set
28681 -# CONFIG_EXT2_FS_XATTR is not set
28682 -# CONFIG_EXT2_FS_XIP is not set
28684 -CONFIG_EXT3_FS_XATTR=y
28685 -# CONFIG_EXT3_FS_POSIX_ACL is not set
28686 -# CONFIG_EXT3_FS_SECURITY is not set
28687 -# CONFIG_EXT4DEV_FS is not set
28689 -CONFIG_FS_MBCACHE=y
28690 -# CONFIG_REISERFS_FS is not set
28691 -# CONFIG_JFS_FS is not set
28692 -# CONFIG_FS_POSIX_ACL is not set
28693 -# CONFIG_XFS_FS is not set
28694 -# CONFIG_GFS2_FS is not set
28695 -# CONFIG_OCFS2_FS is not set
28696 -# CONFIG_MINIX_FS is not set
28697 -# CONFIG_ROMFS_FS is not set
28699 -CONFIG_INOTIFY_USER=y
28700 -# CONFIG_QUOTA is not set
28702 -# CONFIG_AUTOFS_FS is not set
28703 -# CONFIG_AUTOFS4_FS is not set
28704 -# CONFIG_FUSE_FS is not set
28707 -# CD-ROM/DVD Filesystems
28709 -# CONFIG_ISO9660_FS is not set
28710 -# CONFIG_UDF_FS is not set
28713 -# DOS/FAT/NT Filesystems
28715 -# CONFIG_MSDOS_FS is not set
28716 -# CONFIG_VFAT_FS is not set
28717 -# CONFIG_NTFS_FS is not set
28720 -# Pseudo filesystems
28723 -CONFIG_PROC_KCORE=y
28724 -CONFIG_PROC_SYSCTL=y
28727 -# CONFIG_TMPFS_POSIX_ACL is not set
28728 -# CONFIG_HUGETLB_PAGE is not set
28729 -# CONFIG_CONFIGFS_FS is not set
28732 -# Miscellaneous filesystems
28734 -# CONFIG_ADFS_FS is not set
28735 -# CONFIG_AFFS_FS is not set
28736 -# CONFIG_HFS_FS is not set
28737 -# CONFIG_HFSPLUS_FS is not set
28738 -# CONFIG_BEFS_FS is not set
28739 -# CONFIG_BFS_FS is not set
28740 -# CONFIG_EFS_FS is not set
28741 -# CONFIG_CRAMFS is not set
28742 -# CONFIG_VXFS_FS is not set
28743 -# CONFIG_HPFS_FS is not set
28744 -# CONFIG_QNX4FS_FS is not set
28745 -# CONFIG_SYSV_FS is not set
28746 -# CONFIG_UFS_FS is not set
28747 -CONFIG_NETWORK_FILESYSTEMS=y
28748 -# CONFIG_NFS_FS is not set
28749 -# CONFIG_NFSD is not set
28750 -# CONFIG_SMB_FS is not set
28751 -# CONFIG_CIFS is not set
28752 -# CONFIG_NCP_FS is not set
28753 -# CONFIG_CODA_FS is not set
28754 -# CONFIG_AFS_FS is not set
28759 -# CONFIG_PARTITION_ADVANCED is not set
28760 -CONFIG_MSDOS_PARTITION=y
28761 -# CONFIG_NLS is not set
28762 -# CONFIG_DLM is not set
28763 -# CONFIG_UCC_SLOW is not set
28766 -# Library routines
28768 -# CONFIG_CRC_CCITT is not set
28769 -# CONFIG_CRC16 is not set
28770 -# CONFIG_CRC_ITU_T is not set
28771 -# CONFIG_CRC32 is not set
28772 -# CONFIG_CRC7 is not set
28773 -# CONFIG_LIBCRC32C is not set
28775 -CONFIG_HAS_IOMEM=y
28776 -CONFIG_HAS_IOPORT=y
28778 -# CONFIG_INSTRUMENTATION is not set
28783 -CONFIG_PRINTK_TIME=y
28784 -CONFIG_ENABLE_WARN_DEPRECATED=y
28785 -CONFIG_ENABLE_MUST_CHECK=y
28786 -# CONFIG_MAGIC_SYSRQ is not set
28787 -# CONFIG_UNUSED_SYMBOLS is not set
28788 -# CONFIG_DEBUG_FS is not set
28789 -# CONFIG_HEADERS_CHECK is not set
28790 -CONFIG_DEBUG_KERNEL=y
28791 -# CONFIG_DEBUG_SHIRQ is not set
28792 -CONFIG_DETECT_SOFTLOCKUP=y
28793 -CONFIG_SCHED_DEBUG=y
28794 -# CONFIG_SCHEDSTATS is not set
28795 -# CONFIG_TIMER_STATS is not set
28796 -# CONFIG_SLUB_DEBUG_ON is not set
28797 -# CONFIG_DEBUG_RT_MUTEXES is not set
28798 -# CONFIG_RT_MUTEX_TESTER is not set
28799 -# CONFIG_DEBUG_SPINLOCK is not set
28800 -# CONFIG_DEBUG_MUTEXES is not set
28801 -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
28802 -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
28803 -# CONFIG_DEBUG_KOBJECT is not set
28804 -# CONFIG_DEBUG_BUGVERBOSE is not set
28805 -CONFIG_DEBUG_INFO=y
28806 -# CONFIG_DEBUG_VM is not set
28807 -# CONFIG_DEBUG_LIST is not set
28808 -# CONFIG_DEBUG_SG is not set
28809 -CONFIG_FORCED_INLINING=y
28810 -# CONFIG_BOOT_PRINTK_DELAY is not set
28811 -# CONFIG_RCU_TORTURE_TEST is not set
28812 -# CONFIG_FAULT_INJECTION is not set
28813 -# CONFIG_SAMPLES is not set
28814 -# CONFIG_DEBUG_STACKOVERFLOW is not set
28815 -# CONFIG_DEBUG_STACK_USAGE is not set
28816 -# CONFIG_DEBUG_PAGEALLOC is not set
28817 -# CONFIG_DEBUGGER is not set
28818 -# CONFIG_BDI_SWITCH is not set
28819 -# CONFIG_BOOTX_TEXT is not set
28820 -# CONFIG_PPC_EARLY_DEBUG is not set
28823 -# Security options
28825 -# CONFIG_KEYS is not set
28826 -# CONFIG_SECURITY is not set
28827 -# CONFIG_SECURITY_FILE_CAPABILITIES is not set
28828 -# CONFIG_CRYPTO is not set
28829 -CONFIG_PPC_CLOCK=y
28830 -CONFIG_PPC_LIB_RHEAP=y
28831 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/makalu_defconfig powerpc.git/arch/powerpc/configs/makalu_defconfig
28832 --- linux-2.6.24/arch/powerpc/configs/makalu_defconfig 1970-01-01 01:00:00.000000000 +0100
28833 +++ powerpc.git/arch/powerpc/configs/makalu_defconfig 2008-01-28 20:25:49.000000000 +0100
28836 +# Automatically generated make config: don't edit
28837 +# Linux kernel version: 2.6.24-rc6
28838 +# Mon Dec 24 11:18:32 2007
28840 +# CONFIG_PPC64 is not set
28843 +# Processor support
28845 +# CONFIG_6xx is not set
28846 +# CONFIG_PPC_85xx is not set
28847 +# CONFIG_PPC_8xx is not set
28849 +# CONFIG_44x is not set
28850 +# CONFIG_E200 is not set
28852 +# CONFIG_PPC_MM_SLICES is not set
28853 +CONFIG_NOT_COHERENT_CACHE=y
28855 +CONFIG_WORD_SIZE=32
28856 +CONFIG_PPC_MERGE=y
28858 +CONFIG_GENERIC_CMOS_UPDATE=y
28859 +CONFIG_GENERIC_TIME=y
28860 +CONFIG_GENERIC_TIME_VSYSCALL=y
28861 +CONFIG_GENERIC_CLOCKEVENTS=y
28862 +CONFIG_GENERIC_HARDIRQS=y
28863 +CONFIG_IRQ_PER_CPU=y
28864 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
28865 +CONFIG_ARCH_HAS_ILOG2_U32=y
28866 +CONFIG_GENERIC_HWEIGHT=y
28867 +CONFIG_GENERIC_CALIBRATE_DELAY=y
28868 +CONFIG_GENERIC_FIND_NEXT_BIT=y
28869 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
28871 +CONFIG_EARLY_PRINTK=y
28872 +CONFIG_GENERIC_NVRAM=y
28873 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
28874 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
28877 +CONFIG_PPC_UDBG_16550=y
28878 +# CONFIG_GENERIC_TBSYNC is not set
28879 +CONFIG_AUDIT_ARCH=y
28880 +CONFIG_GENERIC_BUG=y
28881 +# CONFIG_DEFAULT_UIMAGE is not set
28882 +CONFIG_PPC_DCR_NATIVE=y
28883 +# CONFIG_PPC_DCR_MMIO is not set
28885 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28890 +CONFIG_EXPERIMENTAL=y
28891 +CONFIG_BROKEN_ON_SMP=y
28892 +CONFIG_INIT_ENV_ARG_LIMIT=32
28893 +CONFIG_LOCALVERSION=""
28894 +CONFIG_LOCALVERSION_AUTO=y
28897 +CONFIG_SYSVIPC_SYSCTL=y
28898 +CONFIG_POSIX_MQUEUE=y
28899 +# CONFIG_BSD_PROCESS_ACCT is not set
28900 +# CONFIG_TASKSTATS is not set
28901 +# CONFIG_USER_NS is not set
28902 +# CONFIG_PID_NS is not set
28903 +# CONFIG_AUDIT is not set
28904 +# CONFIG_IKCONFIG is not set
28905 +CONFIG_LOG_BUF_SHIFT=14
28906 +# CONFIG_CGROUPS is not set
28907 +# CONFIG_FAIR_GROUP_SCHED is not set
28908 +CONFIG_SYSFS_DEPRECATED=y
28909 +# CONFIG_RELAY is not set
28910 +CONFIG_BLK_DEV_INITRD=y
28911 +CONFIG_INITRAMFS_SOURCE=""
28912 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
28915 +CONFIG_SYSCTL_SYSCALL=y
28917 +CONFIG_KALLSYMS_ALL=y
28918 +CONFIG_KALLSYMS_EXTRA_PASS=y
28923 +CONFIG_BASE_FULL=y
28925 +CONFIG_ANON_INODES=y
28930 +CONFIG_VM_EVENT_COUNTERS=y
28931 +CONFIG_SLUB_DEBUG=y
28932 +# CONFIG_SLAB is not set
28934 +# CONFIG_SLOB is not set
28935 +CONFIG_RT_MUTEXES=y
28936 +# CONFIG_TINY_SHMEM is not set
28937 +CONFIG_BASE_SMALL=0
28939 +CONFIG_MODULE_UNLOAD=y
28940 +# CONFIG_MODULE_FORCE_UNLOAD is not set
28941 +# CONFIG_MODVERSIONS is not set
28942 +# CONFIG_MODULE_SRCVERSION_ALL is not set
28946 +# CONFIG_BLK_DEV_IO_TRACE is not set
28947 +# CONFIG_LSF is not set
28948 +# CONFIG_BLK_DEV_BSG is not set
28953 +CONFIG_IOSCHED_NOOP=y
28954 +CONFIG_IOSCHED_AS=y
28955 +CONFIG_IOSCHED_DEADLINE=y
28956 +CONFIG_IOSCHED_CFQ=y
28957 +CONFIG_DEFAULT_AS=y
28958 +# CONFIG_DEFAULT_DEADLINE is not set
28959 +# CONFIG_DEFAULT_CFQ is not set
28960 +# CONFIG_DEFAULT_NOOP is not set
28961 +CONFIG_DEFAULT_IOSCHED="anticipatory"
28962 +CONFIG_PPC4xx_PCI_EXPRESS=y
28965 +# Platform support
28967 +# CONFIG_PPC_MPC52xx is not set
28968 +# CONFIG_PPC_MPC5200 is not set
28969 +# CONFIG_PPC_CELL is not set
28970 +# CONFIG_PPC_CELL_NATIVE is not set
28971 +# CONFIG_PQ2ADS is not set
28972 +# CONFIG_EP405 is not set
28973 +# CONFIG_KILAUEA is not set
28975 +# CONFIG_WALNUT is not set
28976 +# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
28978 +# CONFIG_MPIC is not set
28979 +# CONFIG_MPIC_WEIRD is not set
28980 +# CONFIG_PPC_I8259 is not set
28981 +# CONFIG_PPC_RTAS is not set
28982 +# CONFIG_MMIO_NVRAM is not set
28983 +# CONFIG_PPC_MPC106 is not set
28984 +# CONFIG_PPC_970_NAP is not set
28985 +# CONFIG_PPC_INDIRECT_IO is not set
28986 +# CONFIG_GENERIC_IOMAP is not set
28987 +# CONFIG_CPU_FREQ is not set
28988 +# CONFIG_CPM2 is not set
28989 +# CONFIG_FSL_ULI1575 is not set
28994 +# CONFIG_HIGHMEM is not set
28995 +# CONFIG_TICK_ONESHOT is not set
28996 +# CONFIG_NO_HZ is not set
28997 +# CONFIG_HIGH_RES_TIMERS is not set
28998 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
28999 +# CONFIG_HZ_100 is not set
29001 +# CONFIG_HZ_300 is not set
29002 +# CONFIG_HZ_1000 is not set
29004 +CONFIG_PREEMPT_NONE=y
29005 +# CONFIG_PREEMPT_VOLUNTARY is not set
29006 +# CONFIG_PREEMPT is not set
29007 +CONFIG_BINFMT_ELF=y
29008 +# CONFIG_BINFMT_MISC is not set
29009 +# CONFIG_MATH_EMULATION is not set
29010 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
29011 +CONFIG_ARCH_FLATMEM_ENABLE=y
29012 +CONFIG_ARCH_POPULATES_NODE_MAP=y
29013 +CONFIG_SELECT_MEMORY_MODEL=y
29014 +CONFIG_FLATMEM_MANUAL=y
29015 +# CONFIG_DISCONTIGMEM_MANUAL is not set
29016 +# CONFIG_SPARSEMEM_MANUAL is not set
29018 +CONFIG_FLAT_NODE_MEM_MAP=y
29019 +# CONFIG_SPARSEMEM_STATIC is not set
29020 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
29021 +CONFIG_SPLIT_PTLOCK_CPUS=4
29022 +# CONFIG_RESOURCES_64BIT is not set
29023 +CONFIG_ZONE_DMA_FLAG=1
29025 +CONFIG_VIRT_TO_BUS=y
29026 +CONFIG_PROC_DEVICETREE=y
29027 +# CONFIG_CMDLINE_BOOL is not set
29028 +# CONFIG_PM is not set
29029 +CONFIG_SUSPEND_UP_POSSIBLE=y
29030 +CONFIG_HIBERNATION_UP_POSSIBLE=y
29032 +CONFIG_WANT_DEVICE_TREE=y
29033 +CONFIG_DEVICE_TREE="kilauea.dts"
29034 +CONFIG_ISA_DMA_API=y
29040 +CONFIG_PPC_INDIRECT_PCI=y
29042 +CONFIG_PCI_DOMAINS=y
29043 +CONFIG_PCI_SYSCALL=y
29044 +# CONFIG_PCIEPORTBUS is not set
29045 +CONFIG_ARCH_SUPPORTS_MSI=y
29046 +# CONFIG_PCI_MSI is not set
29047 +CONFIG_PCI_LEGACY=y
29048 +# CONFIG_PCI_DEBUG is not set
29049 +# CONFIG_PCCARD is not set
29050 +# CONFIG_HOTPLUG_PCI is not set
29055 +# CONFIG_ADVANCED_OPTIONS is not set
29058 +# Default settings for advanced configuration options are used
29060 +CONFIG_HIGHMEM_START=0xfe000000
29061 +CONFIG_LOWMEM_SIZE=0x30000000
29062 +CONFIG_KERNEL_START=0xc0000000
29063 +CONFIG_TASK_SIZE=0xc0000000
29064 +CONFIG_CONSISTENT_START=0xff100000
29065 +CONFIG_CONSISTENT_SIZE=0x00200000
29066 +CONFIG_BOOT_LOAD=0x00400000
29074 +# Networking options
29077 +# CONFIG_PACKET_MMAP is not set
29079 +# CONFIG_NET_KEY is not set
29081 +# CONFIG_IP_MULTICAST is not set
29082 +# CONFIG_IP_ADVANCED_ROUTER is not set
29083 +CONFIG_IP_FIB_HASH=y
29085 +CONFIG_IP_PNP_DHCP=y
29086 +CONFIG_IP_PNP_BOOTP=y
29087 +# CONFIG_IP_PNP_RARP is not set
29088 +# CONFIG_NET_IPIP is not set
29089 +# CONFIG_NET_IPGRE is not set
29090 +# CONFIG_ARPD is not set
29091 +# CONFIG_SYN_COOKIES is not set
29092 +# CONFIG_INET_AH is not set
29093 +# CONFIG_INET_ESP is not set
29094 +# CONFIG_INET_IPCOMP is not set
29095 +# CONFIG_INET_XFRM_TUNNEL is not set
29096 +# CONFIG_INET_TUNNEL is not set
29097 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
29098 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
29099 +# CONFIG_INET_XFRM_MODE_BEET is not set
29100 +# CONFIG_INET_LRO is not set
29101 +CONFIG_INET_DIAG=y
29102 +CONFIG_INET_TCP_DIAG=y
29103 +# CONFIG_TCP_CONG_ADVANCED is not set
29104 +CONFIG_TCP_CONG_CUBIC=y
29105 +CONFIG_DEFAULT_TCP_CONG="cubic"
29106 +# CONFIG_TCP_MD5SIG is not set
29107 +# CONFIG_IPV6 is not set
29108 +# CONFIG_INET6_XFRM_TUNNEL is not set
29109 +# CONFIG_INET6_TUNNEL is not set
29110 +# CONFIG_NETWORK_SECMARK is not set
29111 +# CONFIG_NETFILTER is not set
29112 +# CONFIG_IP_DCCP is not set
29113 +# CONFIG_IP_SCTP is not set
29114 +# CONFIG_TIPC is not set
29115 +# CONFIG_ATM is not set
29116 +# CONFIG_BRIDGE is not set
29117 +# CONFIG_VLAN_8021Q is not set
29118 +# CONFIG_DECNET is not set
29119 +# CONFIG_LLC2 is not set
29120 +# CONFIG_IPX is not set
29121 +# CONFIG_ATALK is not set
29122 +# CONFIG_X25 is not set
29123 +# CONFIG_LAPB is not set
29124 +# CONFIG_ECONET is not set
29125 +# CONFIG_WAN_ROUTER is not set
29126 +# CONFIG_NET_SCHED is not set
29131 +# CONFIG_NET_PKTGEN is not set
29132 +# CONFIG_HAMRADIO is not set
29133 +# CONFIG_IRDA is not set
29134 +# CONFIG_BT is not set
29135 +# CONFIG_AF_RXRPC is not set
29140 +# CONFIG_CFG80211 is not set
29141 +# CONFIG_WIRELESS_EXT is not set
29142 +# CONFIG_MAC80211 is not set
29143 +# CONFIG_IEEE80211 is not set
29144 +# CONFIG_RFKILL is not set
29145 +# CONFIG_NET_9P is not set
29152 +# Generic Driver Options
29154 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
29155 +CONFIG_STANDALONE=y
29156 +CONFIG_PREVENT_FIRMWARE_BUILD=y
29157 +CONFIG_FW_LOADER=y
29158 +# CONFIG_DEBUG_DRIVER is not set
29159 +# CONFIG_DEBUG_DEVRES is not set
29160 +# CONFIG_SYS_HYPERVISOR is not set
29161 +CONFIG_CONNECTOR=y
29162 +CONFIG_PROC_EVENTS=y
29164 +# CONFIG_MTD_DEBUG is not set
29165 +# CONFIG_MTD_CONCAT is not set
29166 +CONFIG_MTD_PARTITIONS=y
29167 +# CONFIG_MTD_REDBOOT_PARTS is not set
29168 +CONFIG_MTD_CMDLINE_PARTS=y
29171 +# User Modules And Translation Layers
29174 +CONFIG_MTD_BLKDEVS=m
29175 +CONFIG_MTD_BLOCK=m
29176 +# CONFIG_MTD_BLOCK_RO is not set
29177 +# CONFIG_FTL is not set
29178 +# CONFIG_NFTL is not set
29179 +# CONFIG_INFTL is not set
29180 +# CONFIG_RFD_FTL is not set
29181 +# CONFIG_SSFDC is not set
29182 +# CONFIG_MTD_OOPS is not set
29185 +# RAM/ROM/Flash chip drivers
29188 +CONFIG_MTD_JEDECPROBE=y
29189 +CONFIG_MTD_GEN_PROBE=y
29190 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
29191 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
29192 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
29193 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
29194 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
29195 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
29196 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
29197 +CONFIG_MTD_CFI_I1=y
29198 +CONFIG_MTD_CFI_I2=y
29199 +# CONFIG_MTD_CFI_I4 is not set
29200 +# CONFIG_MTD_CFI_I8 is not set
29201 +# CONFIG_MTD_CFI_INTELEXT is not set
29202 +CONFIG_MTD_CFI_AMDSTD=y
29203 +# CONFIG_MTD_CFI_STAA is not set
29204 +CONFIG_MTD_CFI_UTIL=y
29205 +# CONFIG_MTD_RAM is not set
29206 +# CONFIG_MTD_ROM is not set
29207 +# CONFIG_MTD_ABSENT is not set
29210 +# Mapping drivers for chip access
29212 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
29213 +# CONFIG_MTD_PHYSMAP is not set
29214 +CONFIG_MTD_PHYSMAP_OF=y
29215 +# CONFIG_MTD_INTEL_VR_NOR is not set
29216 +# CONFIG_MTD_PLATRAM is not set
29219 +# Self-contained MTD device drivers
29221 +# CONFIG_MTD_PMC551 is not set
29222 +# CONFIG_MTD_SLRAM is not set
29223 +# CONFIG_MTD_PHRAM is not set
29224 +# CONFIG_MTD_MTDRAM is not set
29225 +# CONFIG_MTD_BLOCK2MTD is not set
29228 +# Disk-On-Chip Device Drivers
29230 +# CONFIG_MTD_DOC2000 is not set
29231 +# CONFIG_MTD_DOC2001 is not set
29232 +# CONFIG_MTD_DOC2001PLUS is not set
29233 +# CONFIG_MTD_NAND is not set
29234 +# CONFIG_MTD_ONENAND is not set
29237 +# UBI - Unsorted block images
29239 +# CONFIG_MTD_UBI is not set
29240 +CONFIG_OF_DEVICE=y
29241 +# CONFIG_PARPORT is not set
29243 +# CONFIG_BLK_DEV_FD is not set
29244 +# CONFIG_BLK_CPQ_DA is not set
29245 +# CONFIG_BLK_CPQ_CISS_DA is not set
29246 +# CONFIG_BLK_DEV_DAC960 is not set
29247 +# CONFIG_BLK_DEV_UMEM is not set
29248 +# CONFIG_BLK_DEV_COW_COMMON is not set
29249 +# CONFIG_BLK_DEV_LOOP is not set
29250 +# CONFIG_BLK_DEV_NBD is not set
29251 +# CONFIG_BLK_DEV_SX8 is not set
29252 +CONFIG_BLK_DEV_RAM=y
29253 +CONFIG_BLK_DEV_RAM_COUNT=16
29254 +CONFIG_BLK_DEV_RAM_SIZE=35000
29255 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
29256 +# CONFIG_CDROM_PKTCDVD is not set
29257 +# CONFIG_ATA_OVER_ETH is not set
29258 +# CONFIG_XILINX_SYSACE is not set
29259 +# CONFIG_MISC_DEVICES is not set
29260 +# CONFIG_IDE is not set
29263 +# SCSI device support
29265 +# CONFIG_RAID_ATTRS is not set
29266 +# CONFIG_SCSI is not set
29267 +# CONFIG_SCSI_DMA is not set
29268 +# CONFIG_SCSI_NETLINK is not set
29269 +# CONFIG_ATA is not set
29270 +# CONFIG_MD is not set
29271 +# CONFIG_FUSION is not set
29274 +# IEEE 1394 (FireWire) support
29276 +# CONFIG_FIREWIRE is not set
29277 +# CONFIG_IEEE1394 is not set
29278 +# CONFIG_I2O is not set
29279 +# CONFIG_MACINTOSH_DRIVERS is not set
29280 +CONFIG_NETDEVICES=y
29281 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
29282 +# CONFIG_DUMMY is not set
29283 +# CONFIG_BONDING is not set
29284 +# CONFIG_MACVLAN is not set
29285 +# CONFIG_EQUALIZER is not set
29286 +# CONFIG_TUN is not set
29287 +# CONFIG_VETH is not set
29288 +# CONFIG_IP1000 is not set
29289 +# CONFIG_ARCNET is not set
29290 +# CONFIG_PHYLIB is not set
29291 +CONFIG_NET_ETHERNET=y
29292 +# CONFIG_MII is not set
29293 +# CONFIG_HAPPYMEAL is not set
29294 +# CONFIG_SUNGEM is not set
29295 +# CONFIG_CASSINI is not set
29296 +# CONFIG_NET_VENDOR_3COM is not set
29297 +# CONFIG_NET_TULIP is not set
29298 +# CONFIG_HP100 is not set
29299 +CONFIG_IBM_NEW_EMAC=y
29300 +CONFIG_IBM_NEW_EMAC_RXB=256
29301 +CONFIG_IBM_NEW_EMAC_TXB=256
29302 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
29303 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
29304 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
29305 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
29306 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
29307 +CONFIG_IBM_NEW_EMAC_RGMII=y
29308 +# CONFIG_IBM_NEW_EMAC_TAH is not set
29309 +CONFIG_IBM_NEW_EMAC_EMAC4=y
29310 +# CONFIG_NET_PCI is not set
29311 +# CONFIG_B44 is not set
29312 +# CONFIG_NETDEV_1000 is not set
29313 +# CONFIG_NETDEV_10000 is not set
29314 +# CONFIG_TR is not set
29319 +# CONFIG_WLAN_PRE80211 is not set
29320 +# CONFIG_WLAN_80211 is not set
29321 +# CONFIG_WAN is not set
29322 +# CONFIG_FDDI is not set
29323 +# CONFIG_HIPPI is not set
29324 +# CONFIG_PPP is not set
29325 +# CONFIG_SLIP is not set
29326 +# CONFIG_SHAPER is not set
29327 +# CONFIG_NETCONSOLE is not set
29328 +# CONFIG_NETPOLL is not set
29329 +# CONFIG_NET_POLL_CONTROLLER is not set
29330 +# CONFIG_ISDN is not set
29331 +# CONFIG_PHONE is not set
29334 +# Input device support
29336 +# CONFIG_INPUT is not set
29339 +# Hardware I/O ports
29341 +# CONFIG_SERIO is not set
29342 +# CONFIG_GAMEPORT is not set
29345 +# Character devices
29347 +# CONFIG_VT is not set
29348 +# CONFIG_SERIAL_NONSTANDARD is not set
29353 +CONFIG_SERIAL_8250=y
29354 +CONFIG_SERIAL_8250_CONSOLE=y
29355 +CONFIG_SERIAL_8250_PCI=y
29356 +CONFIG_SERIAL_8250_NR_UARTS=4
29357 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
29358 +CONFIG_SERIAL_8250_EXTENDED=y
29359 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
29360 +CONFIG_SERIAL_8250_SHARE_IRQ=y
29361 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
29362 +# CONFIG_SERIAL_8250_RSA is not set
29365 +# Non-8250 serial port support
29367 +# CONFIG_SERIAL_UARTLITE is not set
29368 +CONFIG_SERIAL_CORE=y
29369 +CONFIG_SERIAL_CORE_CONSOLE=y
29370 +# CONFIG_SERIAL_JSM is not set
29371 +CONFIG_SERIAL_OF_PLATFORM=y
29372 +CONFIG_UNIX98_PTYS=y
29373 +CONFIG_LEGACY_PTYS=y
29374 +CONFIG_LEGACY_PTY_COUNT=256
29375 +# CONFIG_IPMI_HANDLER is not set
29376 +# CONFIG_HW_RANDOM is not set
29377 +# CONFIG_NVRAM is not set
29378 +# CONFIG_GEN_RTC is not set
29379 +# CONFIG_R3964 is not set
29380 +# CONFIG_APPLICOM is not set
29381 +# CONFIG_RAW_DRIVER is not set
29382 +# CONFIG_TCG_TPM is not set
29384 +# CONFIG_I2C is not set
29389 +# CONFIG_SPI is not set
29390 +# CONFIG_SPI_MASTER is not set
29391 +# CONFIG_W1 is not set
29392 +# CONFIG_POWER_SUPPLY is not set
29393 +# CONFIG_HWMON is not set
29394 +# CONFIG_WATCHDOG is not set
29397 +# Sonics Silicon Backplane
29399 +CONFIG_SSB_POSSIBLE=y
29400 +# CONFIG_SSB is not set
29403 +# Multifunction device drivers
29405 +# CONFIG_MFD_SM501 is not set
29408 +# Multimedia devices
29410 +# CONFIG_VIDEO_DEV is not set
29411 +# CONFIG_DVB_CORE is not set
29412 +# CONFIG_DAB is not set
29415 +# Graphics support
29417 +# CONFIG_AGP is not set
29418 +# CONFIG_DRM is not set
29419 +# CONFIG_VGASTATE is not set
29420 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
29421 +# CONFIG_FB is not set
29422 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
29425 +# Display device support
29427 +# CONFIG_DISPLAY_SUPPORT is not set
29432 +# CONFIG_SOUND is not set
29433 +# CONFIG_USB_SUPPORT is not set
29434 +# CONFIG_MMC is not set
29435 +# CONFIG_NEW_LEDS is not set
29436 +# CONFIG_INFINIBAND is not set
29437 +# CONFIG_EDAC is not set
29438 +# CONFIG_RTC_CLASS is not set
29443 +# CONFIG_UIO is not set
29449 +# CONFIG_EXT2_FS_XATTR is not set
29450 +# CONFIG_EXT2_FS_XIP is not set
29451 +# CONFIG_EXT3_FS is not set
29452 +# CONFIG_EXT4DEV_FS is not set
29453 +# CONFIG_REISERFS_FS is not set
29454 +# CONFIG_JFS_FS is not set
29455 +# CONFIG_FS_POSIX_ACL is not set
29456 +# CONFIG_XFS_FS is not set
29457 +# CONFIG_GFS2_FS is not set
29458 +# CONFIG_OCFS2_FS is not set
29459 +# CONFIG_MINIX_FS is not set
29460 +# CONFIG_ROMFS_FS is not set
29462 +CONFIG_INOTIFY_USER=y
29463 +# CONFIG_QUOTA is not set
29465 +# CONFIG_AUTOFS_FS is not set
29466 +# CONFIG_AUTOFS4_FS is not set
29467 +# CONFIG_FUSE_FS is not set
29470 +# CD-ROM/DVD Filesystems
29472 +# CONFIG_ISO9660_FS is not set
29473 +# CONFIG_UDF_FS is not set
29476 +# DOS/FAT/NT Filesystems
29478 +# CONFIG_MSDOS_FS is not set
29479 +# CONFIG_VFAT_FS is not set
29480 +# CONFIG_NTFS_FS is not set
29483 +# Pseudo filesystems
29486 +CONFIG_PROC_KCORE=y
29487 +CONFIG_PROC_SYSCTL=y
29490 +# CONFIG_TMPFS_POSIX_ACL is not set
29491 +# CONFIG_HUGETLB_PAGE is not set
29492 +# CONFIG_CONFIGFS_FS is not set
29495 +# Miscellaneous filesystems
29497 +# CONFIG_ADFS_FS is not set
29498 +# CONFIG_AFFS_FS is not set
29499 +# CONFIG_HFS_FS is not set
29500 +# CONFIG_HFSPLUS_FS is not set
29501 +# CONFIG_BEFS_FS is not set
29502 +# CONFIG_BFS_FS is not set
29503 +# CONFIG_EFS_FS is not set
29504 +# CONFIG_JFFS2_FS is not set
29506 +# CONFIG_VXFS_FS is not set
29507 +# CONFIG_HPFS_FS is not set
29508 +# CONFIG_QNX4FS_FS is not set
29509 +# CONFIG_SYSV_FS is not set
29510 +# CONFIG_UFS_FS is not set
29511 +CONFIG_NETWORK_FILESYSTEMS=y
29514 +# CONFIG_NFS_V3_ACL is not set
29515 +# CONFIG_NFS_V4 is not set
29516 +# CONFIG_NFS_DIRECTIO is not set
29517 +# CONFIG_NFSD is not set
29521 +CONFIG_NFS_COMMON=y
29523 +# CONFIG_SUNRPC_BIND34 is not set
29524 +# CONFIG_RPCSEC_GSS_KRB5 is not set
29525 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
29526 +# CONFIG_SMB_FS is not set
29527 +# CONFIG_CIFS is not set
29528 +# CONFIG_NCP_FS is not set
29529 +# CONFIG_CODA_FS is not set
29530 +# CONFIG_AFS_FS is not set
29535 +# CONFIG_PARTITION_ADVANCED is not set
29536 +CONFIG_MSDOS_PARTITION=y
29537 +# CONFIG_NLS is not set
29538 +# CONFIG_DLM is not set
29539 +# CONFIG_UCC_SLOW is not set
29542 +# Library routines
29544 +CONFIG_BITREVERSE=y
29545 +# CONFIG_CRC_CCITT is not set
29546 +# CONFIG_CRC16 is not set
29547 +# CONFIG_CRC_ITU_T is not set
29549 +# CONFIG_CRC7 is not set
29550 +# CONFIG_LIBCRC32C is not set
29551 +CONFIG_ZLIB_INFLATE=y
29553 +CONFIG_HAS_IOMEM=y
29554 +CONFIG_HAS_IOPORT=y
29556 +# CONFIG_INSTRUMENTATION is not set
29561 +# CONFIG_PRINTK_TIME is not set
29562 +CONFIG_ENABLE_WARN_DEPRECATED=y
29563 +CONFIG_ENABLE_MUST_CHECK=y
29564 +CONFIG_MAGIC_SYSRQ=y
29565 +# CONFIG_UNUSED_SYMBOLS is not set
29566 +# CONFIG_DEBUG_FS is not set
29567 +# CONFIG_HEADERS_CHECK is not set
29568 +CONFIG_DEBUG_KERNEL=y
29569 +# CONFIG_DEBUG_SHIRQ is not set
29570 +CONFIG_DETECT_SOFTLOCKUP=y
29571 +CONFIG_SCHED_DEBUG=y
29572 +# CONFIG_SCHEDSTATS is not set
29573 +# CONFIG_TIMER_STATS is not set
29574 +# CONFIG_SLUB_DEBUG_ON is not set
29575 +# CONFIG_DEBUG_RT_MUTEXES is not set
29576 +# CONFIG_RT_MUTEX_TESTER is not set
29577 +# CONFIG_DEBUG_SPINLOCK is not set
29578 +# CONFIG_DEBUG_MUTEXES is not set
29579 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
29580 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
29581 +# CONFIG_DEBUG_KOBJECT is not set
29582 +CONFIG_DEBUG_BUGVERBOSE=y
29583 +# CONFIG_DEBUG_INFO is not set
29584 +# CONFIG_DEBUG_VM is not set
29585 +# CONFIG_DEBUG_LIST is not set
29586 +# CONFIG_DEBUG_SG is not set
29587 +CONFIG_FORCED_INLINING=y
29588 +# CONFIG_BOOT_PRINTK_DELAY is not set
29589 +# CONFIG_RCU_TORTURE_TEST is not set
29590 +# CONFIG_FAULT_INJECTION is not set
29591 +# CONFIG_SAMPLES is not set
29592 +# CONFIG_DEBUG_STACKOVERFLOW is not set
29593 +# CONFIG_DEBUG_STACK_USAGE is not set
29594 +# CONFIG_DEBUG_PAGEALLOC is not set
29595 +# CONFIG_DEBUGGER is not set
29596 +# CONFIG_BDI_SWITCH is not set
29597 +# CONFIG_PPC_EARLY_DEBUG is not set
29600 +# Security options
29602 +# CONFIG_KEYS is not set
29603 +# CONFIG_SECURITY is not set
29604 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
29606 +CONFIG_CRYPTO_ALGAPI=y
29607 +CONFIG_CRYPTO_BLKCIPHER=y
29608 +CONFIG_CRYPTO_MANAGER=y
29609 +# CONFIG_CRYPTO_HMAC is not set
29610 +# CONFIG_CRYPTO_XCBC is not set
29611 +# CONFIG_CRYPTO_NULL is not set
29612 +# CONFIG_CRYPTO_MD4 is not set
29613 +CONFIG_CRYPTO_MD5=y
29614 +# CONFIG_CRYPTO_SHA1 is not set
29615 +# CONFIG_CRYPTO_SHA256 is not set
29616 +# CONFIG_CRYPTO_SHA512 is not set
29617 +# CONFIG_CRYPTO_WP512 is not set
29618 +# CONFIG_CRYPTO_TGR192 is not set
29619 +# CONFIG_CRYPTO_GF128MUL is not set
29620 +CONFIG_CRYPTO_ECB=y
29621 +CONFIG_CRYPTO_CBC=y
29622 +CONFIG_CRYPTO_PCBC=y
29623 +# CONFIG_CRYPTO_LRW is not set
29624 +# CONFIG_CRYPTO_XTS is not set
29625 +# CONFIG_CRYPTO_CRYPTD is not set
29626 +CONFIG_CRYPTO_DES=y
29627 +# CONFIG_CRYPTO_FCRYPT is not set
29628 +# CONFIG_CRYPTO_BLOWFISH is not set
29629 +# CONFIG_CRYPTO_TWOFISH is not set
29630 +# CONFIG_CRYPTO_SERPENT is not set
29631 +# CONFIG_CRYPTO_AES is not set
29632 +# CONFIG_CRYPTO_CAST5 is not set
29633 +# CONFIG_CRYPTO_CAST6 is not set
29634 +# CONFIG_CRYPTO_TEA is not set
29635 +# CONFIG_CRYPTO_ARC4 is not set
29636 +# CONFIG_CRYPTO_KHAZAD is not set
29637 +# CONFIG_CRYPTO_ANUBIS is not set
29638 +# CONFIG_CRYPTO_SEED is not set
29639 +# CONFIG_CRYPTO_DEFLATE is not set
29640 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
29641 +# CONFIG_CRYPTO_CRC32C is not set
29642 +# CONFIG_CRYPTO_CAMELLIA is not set
29643 +# CONFIG_CRYPTO_TEST is not set
29644 +# CONFIG_CRYPTO_AUTHENC is not set
29645 +CONFIG_CRYPTO_HW=y
29646 +# CONFIG_PPC_CLOCK is not set
29647 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/mpc5200_defconfig powerpc.git/arch/powerpc/configs/mpc5200_defconfig
29648 --- linux-2.6.24/arch/powerpc/configs/mpc5200_defconfig 1970-01-01 01:00:00.000000000 +0100
29649 +++ powerpc.git/arch/powerpc/configs/mpc5200_defconfig 2008-01-28 20:25:49.000000000 +0100
29652 +# Automatically generated make config: don't edit
29653 +# Linux kernel version: 2.6.24-rc6
29654 +# Fri Jan 18 14:19:54 2008
29656 +# CONFIG_PPC64 is not set
29659 +# Processor support
29662 +# CONFIG_PPC_85xx is not set
29663 +# CONFIG_PPC_8xx is not set
29664 +# CONFIG_40x is not set
29665 +# CONFIG_44x is not set
29666 +# CONFIG_E200 is not set
29668 +# CONFIG_ALTIVEC is not set
29669 +CONFIG_PPC_STD_MMU=y
29670 +CONFIG_PPC_STD_MMU_32=y
29671 +# CONFIG_PPC_MM_SLICES is not set
29672 +# CONFIG_SMP is not set
29674 +CONFIG_WORD_SIZE=32
29675 +CONFIG_PPC_MERGE=y
29677 +CONFIG_GENERIC_CMOS_UPDATE=y
29678 +CONFIG_GENERIC_TIME=y
29679 +CONFIG_GENERIC_TIME_VSYSCALL=y
29680 +CONFIG_GENERIC_CLOCKEVENTS=y
29681 +CONFIG_GENERIC_HARDIRQS=y
29682 +CONFIG_IRQ_PER_CPU=y
29683 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
29684 +CONFIG_ARCH_HAS_ILOG2_U32=y
29685 +CONFIG_GENERIC_HWEIGHT=y
29686 +CONFIG_GENERIC_CALIBRATE_DELAY=y
29687 +CONFIG_GENERIC_FIND_NEXT_BIT=y
29688 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
29690 +CONFIG_EARLY_PRINTK=y
29691 +CONFIG_GENERIC_NVRAM=y
29692 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
29693 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
29696 +# CONFIG_PPC_UDBG_16550 is not set
29697 +# CONFIG_GENERIC_TBSYNC is not set
29698 +CONFIG_AUDIT_ARCH=y
29699 +CONFIG_GENERIC_BUG=y
29700 +# CONFIG_DEFAULT_UIMAGE is not set
29701 +# CONFIG_PPC_DCR_NATIVE is not set
29702 +# CONFIG_PPC_DCR_MMIO is not set
29703 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29708 +CONFIG_EXPERIMENTAL=y
29709 +CONFIG_BROKEN_ON_SMP=y
29710 +CONFIG_INIT_ENV_ARG_LIMIT=32
29711 +CONFIG_LOCALVERSION=""
29712 +CONFIG_LOCALVERSION_AUTO=y
29715 +CONFIG_SYSVIPC_SYSCTL=y
29716 +# CONFIG_POSIX_MQUEUE is not set
29717 +# CONFIG_BSD_PROCESS_ACCT is not set
29718 +# CONFIG_TASKSTATS is not set
29719 +# CONFIG_USER_NS is not set
29720 +# CONFIG_PID_NS is not set
29721 +# CONFIG_AUDIT is not set
29722 +# CONFIG_IKCONFIG is not set
29723 +CONFIG_LOG_BUF_SHIFT=14
29724 +# CONFIG_CGROUPS is not set
29725 +CONFIG_FAIR_GROUP_SCHED=y
29726 +CONFIG_FAIR_USER_SCHED=y
29727 +# CONFIG_FAIR_CGROUP_SCHED is not set
29728 +CONFIG_SYSFS_DEPRECATED=y
29729 +# CONFIG_RELAY is not set
29730 +CONFIG_BLK_DEV_INITRD=y
29731 +CONFIG_INITRAMFS_SOURCE=""
29732 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
29735 +# CONFIG_SYSCTL_SYSCALL is not set
29736 +# CONFIG_KALLSYMS is not set
29741 +CONFIG_BASE_FULL=y
29743 +CONFIG_ANON_INODES=y
29744 +# CONFIG_EPOLL is not set
29748 +CONFIG_VM_EVENT_COUNTERS=y
29749 +CONFIG_SLUB_DEBUG=y
29750 +# CONFIG_SLAB is not set
29752 +# CONFIG_SLOB is not set
29753 +CONFIG_RT_MUTEXES=y
29754 +# CONFIG_TINY_SHMEM is not set
29755 +CONFIG_BASE_SMALL=0
29757 +CONFIG_MODULE_UNLOAD=y
29758 +# CONFIG_MODULE_FORCE_UNLOAD is not set
29759 +# CONFIG_MODVERSIONS is not set
29760 +# CONFIG_MODULE_SRCVERSION_ALL is not set
29761 +# CONFIG_KMOD is not set
29763 +# CONFIG_LBD is not set
29764 +# CONFIG_BLK_DEV_IO_TRACE is not set
29765 +# CONFIG_LSF is not set
29766 +# CONFIG_BLK_DEV_BSG is not set
29771 +CONFIG_IOSCHED_NOOP=y
29772 +CONFIG_IOSCHED_AS=y
29773 +CONFIG_IOSCHED_DEADLINE=y
29774 +CONFIG_IOSCHED_CFQ=y
29775 +CONFIG_DEFAULT_AS=y
29776 +# CONFIG_DEFAULT_DEADLINE is not set
29777 +# CONFIG_DEFAULT_CFQ is not set
29778 +# CONFIG_DEFAULT_NOOP is not set
29779 +CONFIG_DEFAULT_IOSCHED="anticipatory"
29782 +# Platform support
29784 +CONFIG_PPC_MULTIPLATFORM=y
29785 +# CONFIG_PPC_82xx is not set
29786 +# CONFIG_PPC_83xx is not set
29787 +# CONFIG_PPC_86xx is not set
29788 +CONFIG_CLASSIC32=y
29789 +# CONFIG_PPC_CHRP is not set
29790 +CONFIG_PPC_MPC52xx=y
29791 +CONFIG_PPC_MPC5200=y
29792 +CONFIG_PPC_MPC5200_BUGFIX=y
29793 +CONFIG_PPC_MPC5200_SIMPLE=y
29794 +CONFIG_PPC_EFIKA=y
29795 +CONFIG_PPC_LITE5200=y
29796 +# CONFIG_PPC_PMAC is not set
29797 +# CONFIG_PPC_CELL is not set
29798 +# CONFIG_PPC_CELL_NATIVE is not set
29799 +# CONFIG_PQ2ADS is not set
29800 +# CONFIG_EMBEDDED6xx is not set
29801 +CONFIG_PPC_NATIVE=y
29802 +# CONFIG_UDBG_RTAS_CONSOLE is not set
29803 +# CONFIG_MPIC is not set
29804 +# CONFIG_MPIC_WEIRD is not set
29805 +# CONFIG_PPC_I8259 is not set
29807 +# CONFIG_RTAS_ERROR_LOGGING is not set
29808 +CONFIG_RTAS_PROC=y
29809 +# CONFIG_MMIO_NVRAM is not set
29810 +# CONFIG_PPC_MPC106 is not set
29811 +# CONFIG_PPC_970_NAP is not set
29812 +# CONFIG_PPC_INDIRECT_IO is not set
29813 +# CONFIG_GENERIC_IOMAP is not set
29814 +# CONFIG_CPU_FREQ is not set
29815 +# CONFIG_TAU is not set
29816 +# CONFIG_CPM2 is not set
29817 +# CONFIG_FSL_ULI1575 is not set
29818 +CONFIG_PPC_BESTCOMM=y
29819 +CONFIG_PPC_BESTCOMM_ATA=y
29820 +CONFIG_PPC_BESTCOMM_FEC=y
29821 +CONFIG_PPC_BESTCOMM_GEN_BD=y
29826 +# CONFIG_HIGHMEM is not set
29827 +CONFIG_TICK_ONESHOT=y
29829 +CONFIG_HIGH_RES_TIMERS=y
29830 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
29831 +# CONFIG_HZ_100 is not set
29833 +# CONFIG_HZ_300 is not set
29834 +# CONFIG_HZ_1000 is not set
29836 +CONFIG_PREEMPT_NONE=y
29837 +# CONFIG_PREEMPT_VOLUNTARY is not set
29838 +# CONFIG_PREEMPT is not set
29839 +CONFIG_BINFMT_ELF=y
29840 +# CONFIG_BINFMT_MISC is not set
29841 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
29842 +# CONFIG_KEXEC is not set
29843 +CONFIG_ARCH_FLATMEM_ENABLE=y
29844 +CONFIG_ARCH_POPULATES_NODE_MAP=y
29845 +CONFIG_SELECT_MEMORY_MODEL=y
29846 +CONFIG_FLATMEM_MANUAL=y
29847 +# CONFIG_DISCONTIGMEM_MANUAL is not set
29848 +# CONFIG_SPARSEMEM_MANUAL is not set
29850 +CONFIG_FLAT_NODE_MEM_MAP=y
29851 +# CONFIG_SPARSEMEM_STATIC is not set
29852 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
29853 +CONFIG_SPLIT_PTLOCK_CPUS=4
29854 +# CONFIG_RESOURCES_64BIT is not set
29855 +CONFIG_ZONE_DMA_FLAG=1
29857 +CONFIG_VIRT_TO_BUS=y
29858 +CONFIG_PROC_DEVICETREE=y
29859 +# CONFIG_CMDLINE_BOOL is not set
29861 +# CONFIG_PM_LEGACY is not set
29862 +# CONFIG_PM_DEBUG is not set
29864 +CONFIG_SUSPEND_UP_POSSIBLE=y
29866 +CONFIG_HIBERNATION_UP_POSSIBLE=y
29867 +# CONFIG_HIBERNATION is not set
29869 +CONFIG_WANT_DEVICE_TREE=y
29870 +CONFIG_DEVICE_TREE=""
29871 +CONFIG_ISA_DMA_API=y
29877 +CONFIG_GENERIC_ISA_DMA=y
29878 +# CONFIG_PPC_INDIRECT_PCI is not set
29881 +CONFIG_PCI_DOMAINS=y
29882 +CONFIG_PCI_SYSCALL=y
29883 +# CONFIG_PCIEPORTBUS is not set
29884 +CONFIG_ARCH_SUPPORTS_MSI=y
29885 +# CONFIG_PCI_MSI is not set
29886 +CONFIG_PCI_LEGACY=y
29887 +# CONFIG_PCI_DEBUG is not set
29888 +# CONFIG_PCCARD is not set
29889 +# CONFIG_HOTPLUG_PCI is not set
29894 +# CONFIG_ADVANCED_OPTIONS is not set
29897 +# Default settings for advanced configuration options are used
29899 +CONFIG_HIGHMEM_START=0xfe000000
29900 +CONFIG_LOWMEM_SIZE=0x30000000
29901 +CONFIG_KERNEL_START=0xc0000000
29902 +CONFIG_TASK_SIZE=0xc0000000
29903 +CONFIG_BOOT_LOAD=0x00800000
29911 +# Networking options
29914 +# CONFIG_PACKET_MMAP is not set
29917 +CONFIG_XFRM_USER=m
29918 +# CONFIG_XFRM_SUB_POLICY is not set
29919 +# CONFIG_XFRM_MIGRATE is not set
29920 +# CONFIG_NET_KEY is not set
29922 +CONFIG_IP_MULTICAST=y
29923 +# CONFIG_IP_ADVANCED_ROUTER is not set
29924 +CONFIG_IP_FIB_HASH=y
29926 +CONFIG_IP_PNP_DHCP=y
29927 +CONFIG_IP_PNP_BOOTP=y
29928 +# CONFIG_IP_PNP_RARP is not set
29929 +# CONFIG_NET_IPIP is not set
29930 +# CONFIG_NET_IPGRE is not set
29931 +# CONFIG_IP_MROUTE is not set
29932 +# CONFIG_ARPD is not set
29933 +CONFIG_SYN_COOKIES=y
29934 +# CONFIG_INET_AH is not set
29935 +# CONFIG_INET_ESP is not set
29936 +# CONFIG_INET_IPCOMP is not set
29937 +# CONFIG_INET_XFRM_TUNNEL is not set
29938 +# CONFIG_INET_TUNNEL is not set
29939 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
29940 +CONFIG_INET_XFRM_MODE_TUNNEL=y
29941 +CONFIG_INET_XFRM_MODE_BEET=y
29942 +# CONFIG_INET_LRO is not set
29943 +CONFIG_INET_DIAG=y
29944 +CONFIG_INET_TCP_DIAG=y
29945 +# CONFIG_TCP_CONG_ADVANCED is not set
29946 +CONFIG_TCP_CONG_CUBIC=y
29947 +CONFIG_DEFAULT_TCP_CONG="cubic"
29948 +# CONFIG_TCP_MD5SIG is not set
29949 +# CONFIG_IPV6 is not set
29950 +# CONFIG_INET6_XFRM_TUNNEL is not set
29951 +# CONFIG_INET6_TUNNEL is not set
29952 +# CONFIG_NETWORK_SECMARK is not set
29953 +# CONFIG_NETFILTER is not set
29954 +# CONFIG_IP_DCCP is not set
29955 +# CONFIG_IP_SCTP is not set
29956 +# CONFIG_TIPC is not set
29957 +# CONFIG_ATM is not set
29958 +# CONFIG_BRIDGE is not set
29959 +# CONFIG_VLAN_8021Q is not set
29960 +# CONFIG_DECNET is not set
29961 +# CONFIG_LLC2 is not set
29962 +# CONFIG_IPX is not set
29963 +# CONFIG_ATALK is not set
29964 +# CONFIG_X25 is not set
29965 +# CONFIG_LAPB is not set
29966 +# CONFIG_ECONET is not set
29967 +# CONFIG_WAN_ROUTER is not set
29968 +# CONFIG_NET_SCHED is not set
29973 +# CONFIG_NET_PKTGEN is not set
29974 +# CONFIG_HAMRADIO is not set
29975 +# CONFIG_IRDA is not set
29976 +# CONFIG_BT is not set
29977 +# CONFIG_AF_RXRPC is not set
29982 +# CONFIG_CFG80211 is not set
29983 +# CONFIG_WIRELESS_EXT is not set
29984 +# CONFIG_MAC80211 is not set
29985 +# CONFIG_IEEE80211 is not set
29986 +# CONFIG_RFKILL is not set
29987 +# CONFIG_NET_9P is not set
29994 +# Generic Driver Options
29996 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
29997 +CONFIG_STANDALONE=y
29998 +CONFIG_PREVENT_FIRMWARE_BUILD=y
29999 +# CONFIG_FW_LOADER is not set
30000 +# CONFIG_DEBUG_DRIVER is not set
30001 +# CONFIG_DEBUG_DEVRES is not set
30002 +# CONFIG_SYS_HYPERVISOR is not set
30003 +# CONFIG_CONNECTOR is not set
30005 +# CONFIG_MTD_DEBUG is not set
30006 +CONFIG_MTD_CONCAT=y
30007 +CONFIG_MTD_PARTITIONS=y
30008 +# CONFIG_MTD_REDBOOT_PARTS is not set
30009 +CONFIG_MTD_CMDLINE_PARTS=y
30012 +# User Modules And Translation Layers
30015 +CONFIG_MTD_BLKDEVS=y
30016 +CONFIG_MTD_BLOCK=y
30017 +# CONFIG_FTL is not set
30018 +# CONFIG_NFTL is not set
30019 +# CONFIG_INFTL is not set
30020 +# CONFIG_RFD_FTL is not set
30021 +# CONFIG_SSFDC is not set
30022 +# CONFIG_MTD_OOPS is not set
30025 +# RAM/ROM/Flash chip drivers
30028 +# CONFIG_MTD_JEDECPROBE is not set
30029 +CONFIG_MTD_GEN_PROBE=y
30030 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
30031 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
30032 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
30033 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
30034 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
30035 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
30036 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
30037 +CONFIG_MTD_CFI_I1=y
30038 +CONFIG_MTD_CFI_I2=y
30039 +# CONFIG_MTD_CFI_I4 is not set
30040 +# CONFIG_MTD_CFI_I8 is not set
30041 +# CONFIG_MTD_CFI_INTELEXT is not set
30042 +CONFIG_MTD_CFI_AMDSTD=y
30043 +# CONFIG_MTD_CFI_STAA is not set
30044 +CONFIG_MTD_CFI_UTIL=y
30047 +# CONFIG_MTD_ABSENT is not set
30050 +# Mapping drivers for chip access
30052 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
30053 +# CONFIG_MTD_PHYSMAP is not set
30054 +CONFIG_MTD_PHYSMAP_OF=y
30055 +# CONFIG_MTD_INTEL_VR_NOR is not set
30056 +# CONFIG_MTD_PLATRAM is not set
30059 +# Self-contained MTD device drivers
30061 +# CONFIG_MTD_PMC551 is not set
30062 +# CONFIG_MTD_SLRAM is not set
30063 +# CONFIG_MTD_PHRAM is not set
30064 +# CONFIG_MTD_MTDRAM is not set
30065 +# CONFIG_MTD_BLOCK2MTD is not set
30068 +# Disk-On-Chip Device Drivers
30070 +# CONFIG_MTD_DOC2000 is not set
30071 +# CONFIG_MTD_DOC2001 is not set
30072 +# CONFIG_MTD_DOC2001PLUS is not set
30073 +# CONFIG_MTD_NAND is not set
30074 +# CONFIG_MTD_ONENAND is not set
30077 +# UBI - Unsorted block images
30079 +# CONFIG_MTD_UBI is not set
30080 +CONFIG_OF_DEVICE=y
30081 +# CONFIG_PARPORT is not set
30083 +# CONFIG_BLK_DEV_FD is not set
30084 +# CONFIG_BLK_CPQ_DA is not set
30085 +# CONFIG_BLK_CPQ_CISS_DA is not set
30086 +# CONFIG_BLK_DEV_DAC960 is not set
30087 +# CONFIG_BLK_DEV_UMEM is not set
30088 +# CONFIG_BLK_DEV_COW_COMMON is not set
30089 +CONFIG_BLK_DEV_LOOP=y
30090 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
30091 +# CONFIG_BLK_DEV_NBD is not set
30092 +# CONFIG_BLK_DEV_SX8 is not set
30093 +# CONFIG_BLK_DEV_UB is not set
30094 +CONFIG_BLK_DEV_RAM=y
30095 +CONFIG_BLK_DEV_RAM_COUNT=16
30096 +CONFIG_BLK_DEV_RAM_SIZE=32768
30097 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
30098 +# CONFIG_CDROM_PKTCDVD is not set
30099 +# CONFIG_ATA_OVER_ETH is not set
30100 +CONFIG_MISC_DEVICES=y
30101 +# CONFIG_PHANTOM is not set
30102 +# CONFIG_EEPROM_93CX6 is not set
30103 +# CONFIG_SGI_IOC4 is not set
30104 +# CONFIG_TIFM_CORE is not set
30105 +# CONFIG_IDE is not set
30108 +# SCSI device support
30110 +# CONFIG_RAID_ATTRS is not set
30114 +# CONFIG_SCSI_NETLINK is not set
30115 +CONFIG_SCSI_PROC_FS=y
30118 +# SCSI support type (disk, tape, CD-ROM)
30120 +CONFIG_BLK_DEV_SD=y
30121 +# CONFIG_CHR_DEV_ST is not set
30122 +# CONFIG_CHR_DEV_OSST is not set
30123 +# CONFIG_BLK_DEV_SR is not set
30124 +CONFIG_CHR_DEV_SG=y
30125 +# CONFIG_CHR_DEV_SCH is not set
30128 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
30130 +# CONFIG_SCSI_MULTI_LUN is not set
30131 +# CONFIG_SCSI_CONSTANTS is not set
30132 +# CONFIG_SCSI_LOGGING is not set
30133 +# CONFIG_SCSI_SCAN_ASYNC is not set
30134 +CONFIG_SCSI_WAIT_SCAN=m
30139 +# CONFIG_SCSI_SPI_ATTRS is not set
30140 +# CONFIG_SCSI_FC_ATTRS is not set
30141 +# CONFIG_SCSI_ISCSI_ATTRS is not set
30142 +# CONFIG_SCSI_SAS_LIBSAS is not set
30143 +# CONFIG_SCSI_SRP_ATTRS is not set
30144 +CONFIG_SCSI_LOWLEVEL=y
30145 +# CONFIG_ISCSI_TCP is not set
30146 +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
30147 +# CONFIG_SCSI_3W_9XXX is not set
30148 +# CONFIG_SCSI_ACARD is not set
30149 +# CONFIG_SCSI_AACRAID is not set
30150 +# CONFIG_SCSI_AIC7XXX is not set
30151 +# CONFIG_SCSI_AIC7XXX_OLD is not set
30152 +# CONFIG_SCSI_AIC79XX is not set
30153 +# CONFIG_SCSI_AIC94XX is not set
30154 +# CONFIG_SCSI_DPT_I2O is not set
30155 +# CONFIG_SCSI_ADVANSYS is not set
30156 +# CONFIG_SCSI_ARCMSR is not set
30157 +# CONFIG_MEGARAID_NEWGEN is not set
30158 +# CONFIG_MEGARAID_LEGACY is not set
30159 +# CONFIG_MEGARAID_SAS is not set
30160 +# CONFIG_SCSI_HPTIOP is not set
30161 +# CONFIG_SCSI_BUSLOGIC is not set
30162 +# CONFIG_SCSI_DMX3191D is not set
30163 +# CONFIG_SCSI_EATA is not set
30164 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
30165 +# CONFIG_SCSI_GDTH is not set
30166 +# CONFIG_SCSI_IPS is not set
30167 +# CONFIG_SCSI_INITIO is not set
30168 +# CONFIG_SCSI_INIA100 is not set
30169 +# CONFIG_SCSI_STEX is not set
30170 +# CONFIG_SCSI_SYM53C8XX_2 is not set
30171 +# CONFIG_SCSI_IPR is not set
30172 +# CONFIG_SCSI_QLOGIC_1280 is not set
30173 +# CONFIG_SCSI_QLA_FC is not set
30174 +# CONFIG_SCSI_QLA_ISCSI is not set
30175 +# CONFIG_SCSI_LPFC is not set
30176 +# CONFIG_SCSI_DC395x is not set
30177 +# CONFIG_SCSI_DC390T is not set
30178 +# CONFIG_SCSI_NSP32 is not set
30179 +# CONFIG_SCSI_DEBUG is not set
30180 +# CONFIG_SCSI_SRP is not set
30182 +# CONFIG_ATA_NONSTANDARD is not set
30183 +# CONFIG_SATA_AHCI is not set
30184 +# CONFIG_SATA_SVW is not set
30185 +# CONFIG_ATA_PIIX is not set
30186 +# CONFIG_SATA_MV is not set
30187 +# CONFIG_SATA_NV is not set
30188 +# CONFIG_PDC_ADMA is not set
30189 +# CONFIG_SATA_QSTOR is not set
30190 +# CONFIG_SATA_PROMISE is not set
30191 +# CONFIG_SATA_SX4 is not set
30192 +# CONFIG_SATA_SIL is not set
30193 +# CONFIG_SATA_SIL24 is not set
30194 +# CONFIG_SATA_SIS is not set
30195 +# CONFIG_SATA_ULI is not set
30196 +# CONFIG_SATA_VIA is not set
30197 +# CONFIG_SATA_VITESSE is not set
30198 +# CONFIG_SATA_INIC162X is not set
30199 +# CONFIG_PATA_ALI is not set
30200 +# CONFIG_PATA_AMD is not set
30201 +# CONFIG_PATA_ARTOP is not set
30202 +# CONFIG_PATA_ATIIXP is not set
30203 +# CONFIG_PATA_CMD640_PCI is not set
30204 +# CONFIG_PATA_CMD64X is not set
30205 +# CONFIG_PATA_CS5520 is not set
30206 +# CONFIG_PATA_CS5530 is not set
30207 +# CONFIG_PATA_CYPRESS is not set
30208 +# CONFIG_PATA_EFAR is not set
30209 +# CONFIG_ATA_GENERIC is not set
30210 +# CONFIG_PATA_HPT366 is not set
30211 +# CONFIG_PATA_HPT37X is not set
30212 +# CONFIG_PATA_HPT3X2N is not set
30213 +# CONFIG_PATA_HPT3X3 is not set
30214 +# CONFIG_PATA_IT821X is not set
30215 +# CONFIG_PATA_IT8213 is not set
30216 +# CONFIG_PATA_JMICRON is not set
30217 +# CONFIG_PATA_TRIFLEX is not set
30218 +# CONFIG_PATA_MARVELL is not set
30219 +CONFIG_PATA_MPC52xx=y
30220 +# CONFIG_PATA_MPIIX is not set
30221 +# CONFIG_PATA_OLDPIIX is not set
30222 +# CONFIG_PATA_NETCELL is not set
30223 +# CONFIG_PATA_NS87410 is not set
30224 +# CONFIG_PATA_NS87415 is not set
30225 +# CONFIG_PATA_OPTI is not set
30226 +# CONFIG_PATA_OPTIDMA is not set
30227 +# CONFIG_PATA_PDC_OLD is not set
30228 +# CONFIG_PATA_RADISYS is not set
30229 +# CONFIG_PATA_RZ1000 is not set
30230 +# CONFIG_PATA_SC1200 is not set
30231 +# CONFIG_PATA_SERVERWORKS is not set
30232 +# CONFIG_PATA_PDC2027X is not set
30233 +# CONFIG_PATA_SIL680 is not set
30234 +# CONFIG_PATA_SIS is not set
30235 +# CONFIG_PATA_VIA is not set
30236 +# CONFIG_PATA_WINBOND is not set
30237 +CONFIG_PATA_PLATFORM=y
30238 +# CONFIG_PATA_OF_PLATFORM is not set
30239 +# CONFIG_MD is not set
30240 +# CONFIG_FUSION is not set
30243 +# IEEE 1394 (FireWire) support
30245 +# CONFIG_FIREWIRE is not set
30246 +# CONFIG_IEEE1394 is not set
30247 +# CONFIG_I2O is not set
30248 +# CONFIG_MACINTOSH_DRIVERS is not set
30249 +CONFIG_NETDEVICES=y
30250 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
30251 +# CONFIG_DUMMY is not set
30252 +# CONFIG_BONDING is not set
30253 +# CONFIG_MACVLAN is not set
30254 +# CONFIG_EQUALIZER is not set
30255 +# CONFIG_TUN is not set
30256 +# CONFIG_VETH is not set
30257 +# CONFIG_IP1000 is not set
30258 +# CONFIG_ARCNET is not set
30262 +# MII PHY device drivers
30264 +# CONFIG_MARVELL_PHY is not set
30265 +# CONFIG_DAVICOM_PHY is not set
30266 +# CONFIG_QSEMI_PHY is not set
30267 +# CONFIG_LXT_PHY is not set
30268 +# CONFIG_CICADA_PHY is not set
30269 +# CONFIG_VITESSE_PHY is not set
30270 +# CONFIG_SMSC_PHY is not set
30271 +# CONFIG_BROADCOM_PHY is not set
30272 +# CONFIG_ICPLUS_PHY is not set
30273 +# CONFIG_FIXED_PHY is not set
30274 +# CONFIG_MDIO_BITBANG is not set
30275 +CONFIG_NET_ETHERNET=y
30276 +# CONFIG_MII is not set
30277 +# CONFIG_HAPPYMEAL is not set
30278 +# CONFIG_SUNGEM is not set
30279 +# CONFIG_CASSINI is not set
30280 +# CONFIG_NET_VENDOR_3COM is not set
30281 +# CONFIG_NET_TULIP is not set
30282 +# CONFIG_HP100 is not set
30283 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
30284 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
30285 +# CONFIG_IBM_NEW_EMAC_TAH is not set
30286 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
30287 +# CONFIG_NET_PCI is not set
30288 +# CONFIG_B44 is not set
30289 +CONFIG_FEC_MPC52xx=y
30290 +CONFIG_FEC_MPC52xx_MDIO=y
30291 +# CONFIG_NETDEV_1000 is not set
30292 +# CONFIG_NETDEV_10000 is not set
30293 +# CONFIG_TR is not set
30298 +# CONFIG_WLAN_PRE80211 is not set
30299 +# CONFIG_WLAN_80211 is not set
30302 +# USB Network Adapters
30304 +# CONFIG_USB_CATC is not set
30305 +# CONFIG_USB_KAWETH is not set
30306 +# CONFIG_USB_PEGASUS is not set
30307 +# CONFIG_USB_RTL8150 is not set
30308 +# CONFIG_USB_USBNET is not set
30309 +# CONFIG_WAN is not set
30310 +# CONFIG_FDDI is not set
30311 +# CONFIG_HIPPI is not set
30312 +# CONFIG_PPP is not set
30313 +# CONFIG_SLIP is not set
30314 +# CONFIG_NET_FC is not set
30315 +# CONFIG_SHAPER is not set
30316 +# CONFIG_NETCONSOLE is not set
30317 +# CONFIG_NETPOLL is not set
30318 +# CONFIG_NET_POLL_CONTROLLER is not set
30319 +# CONFIG_ISDN is not set
30320 +# CONFIG_PHONE is not set
30323 +# Input device support
30325 +# CONFIG_INPUT is not set
30328 +# Hardware I/O ports
30330 +# CONFIG_SERIO is not set
30331 +# CONFIG_GAMEPORT is not set
30334 +# Character devices
30336 +# CONFIG_VT is not set
30337 +# CONFIG_SERIAL_NONSTANDARD is not set
30342 +# CONFIG_SERIAL_8250 is not set
30345 +# Non-8250 serial port support
30347 +# CONFIG_SERIAL_UARTLITE is not set
30348 +CONFIG_SERIAL_CORE=y
30349 +CONFIG_SERIAL_CORE_CONSOLE=y
30350 +CONFIG_SERIAL_MPC52xx=y
30351 +CONFIG_SERIAL_MPC52xx_CONSOLE=y
30352 +CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
30353 +# CONFIG_SERIAL_JSM is not set
30354 +CONFIG_UNIX98_PTYS=y
30355 +CONFIG_LEGACY_PTYS=y
30356 +CONFIG_LEGACY_PTY_COUNT=256
30357 +# CONFIG_HVC_RTAS is not set
30358 +# CONFIG_IPMI_HANDLER is not set
30359 +# CONFIG_HW_RANDOM is not set
30360 +# CONFIG_NVRAM is not set
30362 +# CONFIG_GEN_RTC_X is not set
30363 +# CONFIG_R3964 is not set
30364 +# CONFIG_APPLICOM is not set
30365 +# CONFIG_RAW_DRIVER is not set
30366 +# CONFIG_TCG_TPM is not set
30369 +CONFIG_I2C_BOARDINFO=y
30370 +CONFIG_I2C_CHARDEV=y
30375 +# CONFIG_I2C_ALGOBIT is not set
30376 +# CONFIG_I2C_ALGOPCF is not set
30377 +# CONFIG_I2C_ALGOPCA is not set
30380 +# I2C Hardware Bus support
30382 +# CONFIG_I2C_ALI1535 is not set
30383 +# CONFIG_I2C_ALI1563 is not set
30384 +# CONFIG_I2C_ALI15X3 is not set
30385 +# CONFIG_I2C_AMD756 is not set
30386 +# CONFIG_I2C_AMD8111 is not set
30387 +# CONFIG_I2C_I801 is not set
30388 +# CONFIG_I2C_I810 is not set
30389 +# CONFIG_I2C_PIIX4 is not set
30391 +# CONFIG_I2C_NFORCE2 is not set
30392 +# CONFIG_I2C_OCORES is not set
30393 +# CONFIG_I2C_PARPORT_LIGHT is not set
30394 +# CONFIG_I2C_PROSAVAGE is not set
30395 +# CONFIG_I2C_SAVAGE4 is not set
30396 +# CONFIG_I2C_SIMTEC is not set
30397 +# CONFIG_I2C_SIS5595 is not set
30398 +# CONFIG_I2C_SIS630 is not set
30399 +# CONFIG_I2C_SIS96X is not set
30400 +# CONFIG_I2C_TAOS_EVM is not set
30401 +# CONFIG_I2C_STUB is not set
30402 +# CONFIG_I2C_TINY_USB is not set
30403 +# CONFIG_I2C_VIA is not set
30404 +# CONFIG_I2C_VIAPRO is not set
30405 +# CONFIG_I2C_VOODOO3 is not set
30408 +# Miscellaneous I2C Chip support
30410 +# CONFIG_SENSORS_DS1337 is not set
30411 +# CONFIG_SENSORS_DS1374 is not set
30412 +# CONFIG_DS1682 is not set
30413 +# CONFIG_SENSORS_EEPROM is not set
30414 +# CONFIG_SENSORS_PCF8574 is not set
30415 +# CONFIG_SENSORS_PCA9539 is not set
30416 +# CONFIG_SENSORS_PCF8591 is not set
30417 +# CONFIG_SENSORS_M41T00 is not set
30418 +# CONFIG_SENSORS_MAX6875 is not set
30419 +# CONFIG_SENSORS_TSL2550 is not set
30420 +# CONFIG_I2C_DEBUG_CORE is not set
30421 +# CONFIG_I2C_DEBUG_ALGO is not set
30422 +# CONFIG_I2C_DEBUG_BUS is not set
30423 +# CONFIG_I2C_DEBUG_CHIP is not set
30428 +# CONFIG_SPI is not set
30429 +# CONFIG_SPI_MASTER is not set
30430 +# CONFIG_W1 is not set
30431 +# CONFIG_POWER_SUPPLY is not set
30433 +# CONFIG_HWMON_VID is not set
30434 +# CONFIG_SENSORS_AD7418 is not set
30435 +# CONFIG_SENSORS_ADM1021 is not set
30436 +# CONFIG_SENSORS_ADM1025 is not set
30437 +# CONFIG_SENSORS_ADM1026 is not set
30438 +# CONFIG_SENSORS_ADM1029 is not set
30439 +# CONFIG_SENSORS_ADM1031 is not set
30440 +# CONFIG_SENSORS_ADM9240 is not set
30441 +# CONFIG_SENSORS_ADT7470 is not set
30442 +# CONFIG_SENSORS_ATXP1 is not set
30443 +# CONFIG_SENSORS_DS1621 is not set
30444 +# CONFIG_SENSORS_I5K_AMB is not set
30445 +# CONFIG_SENSORS_F71805F is not set
30446 +# CONFIG_SENSORS_F71882FG is not set
30447 +# CONFIG_SENSORS_F75375S is not set
30448 +# CONFIG_SENSORS_GL518SM is not set
30449 +# CONFIG_SENSORS_GL520SM is not set
30450 +# CONFIG_SENSORS_IT87 is not set
30451 +# CONFIG_SENSORS_LM63 is not set
30452 +# CONFIG_SENSORS_LM75 is not set
30453 +# CONFIG_SENSORS_LM77 is not set
30454 +# CONFIG_SENSORS_LM78 is not set
30455 +# CONFIG_SENSORS_LM80 is not set
30456 +# CONFIG_SENSORS_LM83 is not set
30457 +# CONFIG_SENSORS_LM85 is not set
30458 +# CONFIG_SENSORS_LM87 is not set
30459 +# CONFIG_SENSORS_LM90 is not set
30460 +# CONFIG_SENSORS_LM92 is not set
30461 +# CONFIG_SENSORS_LM93 is not set
30462 +# CONFIG_SENSORS_MAX1619 is not set
30463 +# CONFIG_SENSORS_MAX6650 is not set
30464 +# CONFIG_SENSORS_PC87360 is not set
30465 +# CONFIG_SENSORS_PC87427 is not set
30466 +# CONFIG_SENSORS_SIS5595 is not set
30467 +# CONFIG_SENSORS_DME1737 is not set
30468 +# CONFIG_SENSORS_SMSC47M1 is not set
30469 +# CONFIG_SENSORS_SMSC47M192 is not set
30470 +# CONFIG_SENSORS_SMSC47B397 is not set
30471 +# CONFIG_SENSORS_THMC50 is not set
30472 +# CONFIG_SENSORS_VIA686A is not set
30473 +# CONFIG_SENSORS_VT1211 is not set
30474 +# CONFIG_SENSORS_VT8231 is not set
30475 +# CONFIG_SENSORS_W83781D is not set
30476 +# CONFIG_SENSORS_W83791D is not set
30477 +# CONFIG_SENSORS_W83792D is not set
30478 +# CONFIG_SENSORS_W83793 is not set
30479 +# CONFIG_SENSORS_W83L785TS is not set
30480 +# CONFIG_SENSORS_W83627HF is not set
30481 +# CONFIG_SENSORS_W83627EHF is not set
30482 +# CONFIG_HWMON_DEBUG_CHIP is not set
30484 +# CONFIG_WATCHDOG_NOWAYOUT is not set
30487 +# Watchdog Device Drivers
30489 +# CONFIG_SOFT_WATCHDOG is not set
30490 +# CONFIG_MPC5200_WDT is not set
30491 +# CONFIG_WATCHDOG_RTAS is not set
30494 +# PCI-based Watchdog Cards
30496 +# CONFIG_PCIPCWATCHDOG is not set
30497 +# CONFIG_WDTPCI is not set
30500 +# USB-based Watchdog Cards
30502 +# CONFIG_USBPCWATCHDOG is not set
30505 +# Sonics Silicon Backplane
30507 +CONFIG_SSB_POSSIBLE=y
30508 +# CONFIG_SSB is not set
30511 +# Multifunction device drivers
30513 +# CONFIG_MFD_SM501 is not set
30516 +# Multimedia devices
30518 +# CONFIG_VIDEO_DEV is not set
30519 +# CONFIG_DVB_CORE is not set
30521 +# CONFIG_USB_DABUSB is not set
30524 +# Graphics support
30526 +# CONFIG_AGP is not set
30527 +# CONFIG_DRM is not set
30528 +# CONFIG_VGASTATE is not set
30529 +CONFIG_VIDEO_OUTPUT_CONTROL=m
30530 +# CONFIG_FB is not set
30531 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
30534 +# Display device support
30536 +# CONFIG_DISPLAY_SUPPORT is not set
30541 +# CONFIG_SOUND is not set
30542 +CONFIG_USB_SUPPORT=y
30543 +CONFIG_USB_ARCH_HAS_HCD=y
30544 +CONFIG_USB_ARCH_HAS_OHCI=y
30545 +CONFIG_USB_ARCH_HAS_EHCI=y
30547 +# CONFIG_USB_DEBUG is not set
30550 +# Miscellaneous USB options
30552 +CONFIG_USB_DEVICEFS=y
30553 +# CONFIG_USB_DEVICE_CLASS is not set
30554 +# CONFIG_USB_DYNAMIC_MINORS is not set
30555 +# CONFIG_USB_SUSPEND is not set
30556 +# CONFIG_USB_PERSIST is not set
30557 +# CONFIG_USB_OTG is not set
30560 +# USB Host Controller Drivers
30562 +# CONFIG_USB_EHCI_HCD is not set
30563 +# CONFIG_USB_ISP116X_HCD is not set
30564 +CONFIG_USB_OHCI_HCD=y
30565 +CONFIG_USB_OHCI_HCD_PPC_SOC=y
30566 +CONFIG_USB_OHCI_HCD_PPC_OF=y
30567 +CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
30568 +# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
30569 +CONFIG_USB_OHCI_HCD_PCI=y
30570 +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
30571 +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
30572 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
30573 +# CONFIG_USB_UHCI_HCD is not set
30574 +# CONFIG_USB_SL811_HCD is not set
30575 +# CONFIG_USB_R8A66597_HCD is not set
30578 +# USB Device Class drivers
30580 +# CONFIG_USB_ACM is not set
30581 +# CONFIG_USB_PRINTER is not set
30584 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
30588 +# may also be needed; see USB_STORAGE Help for more information
30590 +CONFIG_USB_STORAGE=y
30591 +# CONFIG_USB_STORAGE_DEBUG is not set
30592 +# CONFIG_USB_STORAGE_DATAFAB is not set
30593 +# CONFIG_USB_STORAGE_FREECOM is not set
30594 +# CONFIG_USB_STORAGE_ISD200 is not set
30595 +# CONFIG_USB_STORAGE_DPCM is not set
30596 +# CONFIG_USB_STORAGE_USBAT is not set
30597 +# CONFIG_USB_STORAGE_SDDR09 is not set
30598 +# CONFIG_USB_STORAGE_SDDR55 is not set
30599 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
30600 +# CONFIG_USB_STORAGE_ALAUDA is not set
30601 +# CONFIG_USB_STORAGE_KARMA is not set
30602 +# CONFIG_USB_LIBUSUAL is not set
30605 +# USB Imaging devices
30607 +# CONFIG_USB_MDC800 is not set
30608 +# CONFIG_USB_MICROTEK is not set
30612 +# USB port drivers
30616 +# USB Serial Converter support
30618 +# CONFIG_USB_SERIAL is not set
30621 +# USB Miscellaneous drivers
30623 +# CONFIG_USB_EMI62 is not set
30624 +# CONFIG_USB_EMI26 is not set
30625 +# CONFIG_USB_ADUTUX is not set
30626 +# CONFIG_USB_AUERSWALD is not set
30627 +# CONFIG_USB_RIO500 is not set
30628 +# CONFIG_USB_LEGOTOWER is not set
30629 +# CONFIG_USB_LCD is not set
30630 +# CONFIG_USB_BERRY_CHARGE is not set
30631 +# CONFIG_USB_LED is not set
30632 +# CONFIG_USB_CYPRESS_CY7C63 is not set
30633 +# CONFIG_USB_CYTHERM is not set
30634 +# CONFIG_USB_PHIDGET is not set
30635 +# CONFIG_USB_IDMOUSE is not set
30636 +# CONFIG_USB_FTDI_ELAN is not set
30637 +# CONFIG_USB_APPLEDISPLAY is not set
30638 +# CONFIG_USB_LD is not set
30639 +# CONFIG_USB_TRANCEVIBRATOR is not set
30640 +# CONFIG_USB_IOWARRIOR is not set
30641 +# CONFIG_USB_TEST is not set
30644 +# USB DSL modem support
30648 +# USB Gadget Support
30650 +# CONFIG_USB_GADGET is not set
30651 +# CONFIG_MMC is not set
30653 +CONFIG_LEDS_CLASS=y
30662 +CONFIG_LEDS_TRIGGERS=y
30663 +CONFIG_LEDS_TRIGGER_TIMER=y
30664 +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
30665 +# CONFIG_INFINIBAND is not set
30666 +# CONFIG_EDAC is not set
30667 +# CONFIG_RTC_CLASS is not set
30672 +# CONFIG_UIO is not set
30678 +# CONFIG_EXT2_FS_XATTR is not set
30679 +# CONFIG_EXT2_FS_XIP is not set
30681 +CONFIG_EXT3_FS_XATTR=y
30682 +# CONFIG_EXT3_FS_POSIX_ACL is not set
30683 +# CONFIG_EXT3_FS_SECURITY is not set
30684 +# CONFIG_EXT4DEV_FS is not set
30686 +CONFIG_FS_MBCACHE=y
30687 +# CONFIG_REISERFS_FS is not set
30688 +# CONFIG_JFS_FS is not set
30689 +# CONFIG_FS_POSIX_ACL is not set
30690 +# CONFIG_XFS_FS is not set
30691 +# CONFIG_GFS2_FS is not set
30692 +# CONFIG_OCFS2_FS is not set
30693 +# CONFIG_MINIX_FS is not set
30694 +# CONFIG_ROMFS_FS is not set
30696 +CONFIG_INOTIFY_USER=y
30697 +# CONFIG_QUOTA is not set
30699 +# CONFIG_AUTOFS_FS is not set
30700 +# CONFIG_AUTOFS4_FS is not set
30701 +# CONFIG_FUSE_FS is not set
30704 +# CD-ROM/DVD Filesystems
30706 +# CONFIG_ISO9660_FS is not set
30707 +# CONFIG_UDF_FS is not set
30710 +# DOS/FAT/NT Filesystems
30715 +CONFIG_FAT_DEFAULT_CODEPAGE=437
30716 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
30717 +# CONFIG_NTFS_FS is not set
30720 +# Pseudo filesystems
30723 +CONFIG_PROC_KCORE=y
30724 +CONFIG_PROC_SYSCTL=y
30727 +# CONFIG_TMPFS_POSIX_ACL is not set
30728 +# CONFIG_HUGETLB_PAGE is not set
30729 +# CONFIG_CONFIGFS_FS is not set
30732 +# Miscellaneous filesystems
30734 +# CONFIG_ADFS_FS is not set
30735 +# CONFIG_AFFS_FS is not set
30736 +# CONFIG_HFS_FS is not set
30737 +# CONFIG_HFSPLUS_FS is not set
30738 +# CONFIG_BEFS_FS is not set
30739 +# CONFIG_BFS_FS is not set
30740 +# CONFIG_EFS_FS is not set
30742 +CONFIG_JFFS2_FS_DEBUG=0
30743 +CONFIG_JFFS2_FS_WRITEBUFFER=y
30744 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
30745 +# CONFIG_JFFS2_SUMMARY is not set
30746 +# CONFIG_JFFS2_FS_XATTR is not set
30747 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
30748 +CONFIG_JFFS2_ZLIB=y
30749 +# CONFIG_JFFS2_LZO is not set
30750 +CONFIG_JFFS2_RTIME=y
30751 +# CONFIG_JFFS2_RUBIN is not set
30753 +# CONFIG_VXFS_FS is not set
30754 +# CONFIG_HPFS_FS is not set
30755 +# CONFIG_QNX4FS_FS is not set
30756 +# CONFIG_SYSV_FS is not set
30757 +# CONFIG_UFS_FS is not set
30758 +CONFIG_NETWORK_FILESYSTEMS=y
30761 +# CONFIG_NFS_V3_ACL is not set
30763 +# CONFIG_NFS_DIRECTIO is not set
30764 +# CONFIG_NFSD is not set
30768 +CONFIG_NFS_COMMON=y
30770 +CONFIG_SUNRPC_GSS=y
30771 +# CONFIG_SUNRPC_BIND34 is not set
30772 +CONFIG_RPCSEC_GSS_KRB5=y
30773 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
30774 +# CONFIG_SMB_FS is not set
30775 +# CONFIG_CIFS is not set
30776 +# CONFIG_NCP_FS is not set
30777 +# CONFIG_CODA_FS is not set
30778 +# CONFIG_AFS_FS is not set
30783 +# CONFIG_PARTITION_ADVANCED is not set
30784 +CONFIG_MSDOS_PARTITION=y
30786 +CONFIG_NLS_DEFAULT="iso8859-1"
30787 +CONFIG_NLS_CODEPAGE_437=y
30788 +# CONFIG_NLS_CODEPAGE_737 is not set
30789 +# CONFIG_NLS_CODEPAGE_775 is not set
30790 +# CONFIG_NLS_CODEPAGE_850 is not set
30791 +# CONFIG_NLS_CODEPAGE_852 is not set
30792 +# CONFIG_NLS_CODEPAGE_855 is not set
30793 +# CONFIG_NLS_CODEPAGE_857 is not set
30794 +# CONFIG_NLS_CODEPAGE_860 is not set
30795 +# CONFIG_NLS_CODEPAGE_861 is not set
30796 +# CONFIG_NLS_CODEPAGE_862 is not set
30797 +# CONFIG_NLS_CODEPAGE_863 is not set
30798 +# CONFIG_NLS_CODEPAGE_864 is not set
30799 +# CONFIG_NLS_CODEPAGE_865 is not set
30800 +# CONFIG_NLS_CODEPAGE_866 is not set
30801 +# CONFIG_NLS_CODEPAGE_869 is not set
30802 +# CONFIG_NLS_CODEPAGE_936 is not set
30803 +# CONFIG_NLS_CODEPAGE_950 is not set
30804 +# CONFIG_NLS_CODEPAGE_932 is not set
30805 +# CONFIG_NLS_CODEPAGE_949 is not set
30806 +# CONFIG_NLS_CODEPAGE_874 is not set
30807 +# CONFIG_NLS_ISO8859_8 is not set
30808 +# CONFIG_NLS_CODEPAGE_1250 is not set
30809 +# CONFIG_NLS_CODEPAGE_1251 is not set
30810 +# CONFIG_NLS_ASCII is not set
30811 +CONFIG_NLS_ISO8859_1=y
30812 +# CONFIG_NLS_ISO8859_2 is not set
30813 +# CONFIG_NLS_ISO8859_3 is not set
30814 +# CONFIG_NLS_ISO8859_4 is not set
30815 +# CONFIG_NLS_ISO8859_5 is not set
30816 +# CONFIG_NLS_ISO8859_6 is not set
30817 +# CONFIG_NLS_ISO8859_7 is not set
30818 +# CONFIG_NLS_ISO8859_9 is not set
30819 +# CONFIG_NLS_ISO8859_13 is not set
30820 +# CONFIG_NLS_ISO8859_14 is not set
30821 +# CONFIG_NLS_ISO8859_15 is not set
30822 +# CONFIG_NLS_KOI8_R is not set
30823 +# CONFIG_NLS_KOI8_U is not set
30824 +# CONFIG_NLS_UTF8 is not set
30825 +# CONFIG_DLM is not set
30826 +# CONFIG_UCC_SLOW is not set
30829 +# Library routines
30831 +CONFIG_BITREVERSE=y
30832 +# CONFIG_CRC_CCITT is not set
30833 +# CONFIG_CRC16 is not set
30834 +# CONFIG_CRC_ITU_T is not set
30836 +# CONFIG_CRC7 is not set
30837 +# CONFIG_LIBCRC32C is not set
30838 +CONFIG_ZLIB_INFLATE=y
30839 +CONFIG_ZLIB_DEFLATE=y
30841 +CONFIG_HAS_IOMEM=y
30842 +CONFIG_HAS_IOPORT=y
30844 +# CONFIG_INSTRUMENTATION is not set
30849 +CONFIG_PRINTK_TIME=y
30850 +CONFIG_ENABLE_WARN_DEPRECATED=y
30851 +CONFIG_ENABLE_MUST_CHECK=y
30852 +# CONFIG_MAGIC_SYSRQ is not set
30853 +# CONFIG_UNUSED_SYMBOLS is not set
30854 +# CONFIG_DEBUG_FS is not set
30855 +# CONFIG_HEADERS_CHECK is not set
30856 +CONFIG_DEBUG_KERNEL=y
30857 +# CONFIG_DEBUG_SHIRQ is not set
30858 +CONFIG_DETECT_SOFTLOCKUP=y
30859 +CONFIG_SCHED_DEBUG=y
30860 +# CONFIG_SCHEDSTATS is not set
30861 +# CONFIG_TIMER_STATS is not set
30862 +# CONFIG_SLUB_DEBUG_ON is not set
30863 +# CONFIG_DEBUG_RT_MUTEXES is not set
30864 +# CONFIG_RT_MUTEX_TESTER is not set
30865 +# CONFIG_DEBUG_SPINLOCK is not set
30866 +# CONFIG_DEBUG_MUTEXES is not set
30867 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
30868 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
30869 +# CONFIG_DEBUG_KOBJECT is not set
30870 +# CONFIG_DEBUG_BUGVERBOSE is not set
30871 +CONFIG_DEBUG_INFO=y
30872 +# CONFIG_DEBUG_VM is not set
30873 +# CONFIG_DEBUG_LIST is not set
30874 +# CONFIG_DEBUG_SG is not set
30875 +CONFIG_FORCED_INLINING=y
30876 +# CONFIG_BOOT_PRINTK_DELAY is not set
30877 +# CONFIG_RCU_TORTURE_TEST is not set
30878 +# CONFIG_FAULT_INJECTION is not set
30879 +# CONFIG_SAMPLES is not set
30880 +# CONFIG_DEBUG_STACKOVERFLOW is not set
30881 +# CONFIG_DEBUG_STACK_USAGE is not set
30882 +# CONFIG_DEBUG_PAGEALLOC is not set
30883 +# CONFIG_DEBUGGER is not set
30884 +# CONFIG_BDI_SWITCH is not set
30885 +# CONFIG_BOOTX_TEXT is not set
30886 +# CONFIG_PPC_EARLY_DEBUG is not set
30889 +# Security options
30891 +# CONFIG_KEYS is not set
30892 +# CONFIG_SECURITY is not set
30893 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
30895 +CONFIG_CRYPTO_ALGAPI=y
30896 +CONFIG_CRYPTO_BLKCIPHER=y
30897 +CONFIG_CRYPTO_MANAGER=y
30898 +# CONFIG_CRYPTO_HMAC is not set
30899 +# CONFIG_CRYPTO_XCBC is not set
30900 +# CONFIG_CRYPTO_NULL is not set
30901 +# CONFIG_CRYPTO_MD4 is not set
30902 +CONFIG_CRYPTO_MD5=y
30903 +# CONFIG_CRYPTO_SHA1 is not set
30904 +# CONFIG_CRYPTO_SHA256 is not set
30905 +# CONFIG_CRYPTO_SHA512 is not set
30906 +# CONFIG_CRYPTO_WP512 is not set
30907 +# CONFIG_CRYPTO_TGR192 is not set
30908 +# CONFIG_CRYPTO_GF128MUL is not set
30909 +# CONFIG_CRYPTO_ECB is not set
30910 +CONFIG_CRYPTO_CBC=y
30911 +# CONFIG_CRYPTO_PCBC is not set
30912 +# CONFIG_CRYPTO_LRW is not set
30913 +# CONFIG_CRYPTO_XTS is not set
30914 +# CONFIG_CRYPTO_CRYPTD is not set
30915 +CONFIG_CRYPTO_DES=y
30916 +# CONFIG_CRYPTO_FCRYPT is not set
30917 +# CONFIG_CRYPTO_BLOWFISH is not set
30918 +# CONFIG_CRYPTO_TWOFISH is not set
30919 +# CONFIG_CRYPTO_SERPENT is not set
30920 +# CONFIG_CRYPTO_AES is not set
30921 +# CONFIG_CRYPTO_CAST5 is not set
30922 +# CONFIG_CRYPTO_CAST6 is not set
30923 +# CONFIG_CRYPTO_TEA is not set
30924 +# CONFIG_CRYPTO_ARC4 is not set
30925 +# CONFIG_CRYPTO_KHAZAD is not set
30926 +# CONFIG_CRYPTO_ANUBIS is not set
30927 +# CONFIG_CRYPTO_SEED is not set
30928 +# CONFIG_CRYPTO_DEFLATE is not set
30929 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
30930 +# CONFIG_CRYPTO_CRC32C is not set
30931 +# CONFIG_CRYPTO_CAMELLIA is not set
30932 +# CONFIG_CRYPTO_TEST is not set
30933 +# CONFIG_CRYPTO_AUTHENC is not set
30934 +CONFIG_CRYPTO_HW=y
30935 +CONFIG_PPC_CLOCK=y
30936 +CONFIG_PPC_LIB_RHEAP=y
30937 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/mpc8313_rdb_defconfig powerpc.git/arch/powerpc/configs/mpc8313_rdb_defconfig
30938 --- linux-2.6.24/arch/powerpc/configs/mpc8313_rdb_defconfig 2008-01-24 23:58:37.000000000 +0100
30939 +++ powerpc.git/arch/powerpc/configs/mpc8313_rdb_defconfig 2008-01-28 20:25:49.000000000 +0100
30942 # Automatically generated make config: don't edit
30943 -# Linux kernel version: 2.6.24-rc4
30944 -# Thu Dec 6 16:48:31 2007
30945 +# Linux kernel version: 2.6.24-rc6
30946 +# Thu Jan 17 16:35:55 2008
30948 # CONFIG_PPC64 is not set
30950 @@ -144,6 +144,7 @@
30951 # CONFIG_MPC834x_MDS is not set
30952 # CONFIG_MPC834x_ITX is not set
30953 # CONFIG_MPC836x_MDS is not set
30954 +# CONFIG_MPC837x_MDS is not set
30955 CONFIG_PPC_MPC831x=y
30956 # CONFIG_MPIC is not set
30957 # CONFIG_MPIC_WEIRD is not set
30958 @@ -336,15 +337,16 @@
30960 # CONFIG_MTD_DEBUG is not set
30961 # CONFIG_MTD_CONCAT is not set
30962 -# CONFIG_MTD_PARTITIONS is not set
30963 +CONFIG_MTD_PARTITIONS=y
30964 +# CONFIG_MTD_REDBOOT_PARTS is not set
30965 +# CONFIG_MTD_CMDLINE_PARTS is not set
30968 # User Modules And Translation Layers
30971 -# CONFIG_MTD_BLKDEVS is not set
30972 -# CONFIG_MTD_BLOCK is not set
30973 -# CONFIG_MTD_BLOCK_RO is not set
30974 +CONFIG_MTD_BLKDEVS=y
30975 +CONFIG_MTD_BLOCK=y
30976 # CONFIG_FTL is not set
30977 # CONFIG_NFTL is not set
30978 # CONFIG_INFTL is not set
30979 @@ -381,11 +383,8 @@
30980 # Mapping drivers for chip access
30982 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
30983 -CONFIG_MTD_PHYSMAP=y
30984 -CONFIG_MTD_PHYSMAP_START=0xfe000000
30985 -CONFIG_MTD_PHYSMAP_LEN=0x1000000
30986 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2
30987 -# CONFIG_MTD_PHYSMAP_OF is not set
30988 +# CONFIG_MTD_PHYSMAP is not set
30989 +CONFIG_MTD_PHYSMAP_OF=y
30990 # CONFIG_MTD_INTEL_VR_NOR is not set
30991 # CONFIG_MTD_PLATRAM is not set
30993 @@ -406,7 +405,16 @@
30994 # CONFIG_MTD_DOC2000 is not set
30995 # CONFIG_MTD_DOC2001 is not set
30996 # CONFIG_MTD_DOC2001PLUS is not set
30997 -# CONFIG_MTD_NAND is not set
30999 +CONFIG_MTD_NAND_VERIFY_WRITE=y
31000 +# CONFIG_MTD_NAND_ECC_SMC is not set
31001 +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
31002 +CONFIG_MTD_NAND_IDS=y
31003 +# CONFIG_MTD_NAND_DISKONCHIP is not set
31004 +# CONFIG_MTD_NAND_CAFE is not set
31005 +# CONFIG_MTD_NAND_NANDSIM is not set
31006 +# CONFIG_MTD_NAND_PLATFORM is not set
31007 +# CONFIG_MTD_ALAUDA is not set
31008 # CONFIG_MTD_ONENAND is not set
31011 @@ -1178,7 +1186,17 @@
31012 # CONFIG_BEFS_FS is not set
31013 # CONFIG_BFS_FS is not set
31014 # CONFIG_EFS_FS is not set
31015 -# CONFIG_JFFS2_FS is not set
31017 +CONFIG_JFFS2_FS_DEBUG=0
31018 +CONFIG_JFFS2_FS_WRITEBUFFER=y
31019 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
31020 +# CONFIG_JFFS2_SUMMARY is not set
31021 +# CONFIG_JFFS2_FS_XATTR is not set
31022 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
31023 +CONFIG_JFFS2_ZLIB=y
31024 +# CONFIG_JFFS2_LZO is not set
31025 +CONFIG_JFFS2_RTIME=y
31026 +# CONFIG_JFFS2_RUBIN is not set
31027 # CONFIG_CRAMFS is not set
31028 # CONFIG_VXFS_FS is not set
31029 # CONFIG_HPFS_FS is not set
31030 @@ -1242,6 +1260,8 @@
31032 # CONFIG_CRC7 is not set
31033 # CONFIG_LIBCRC32C is not set
31034 +CONFIG_ZLIB_INFLATE=y
31035 +CONFIG_ZLIB_DEFLATE=y
31038 CONFIG_HAS_IOPORT=y
31039 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/mpc834x_itx_defconfig powerpc.git/arch/powerpc/configs/mpc834x_itx_defconfig
31040 --- linux-2.6.24/arch/powerpc/configs/mpc834x_itx_defconfig 2008-01-24 23:58:37.000000000 +0100
31041 +++ powerpc.git/arch/powerpc/configs/mpc834x_itx_defconfig 2008-01-28 20:25:49.000000000 +0100
31042 @@ -570,7 +570,8 @@
31043 # CONFIG_PATA_SIS is not set
31044 # CONFIG_PATA_VIA is not set
31045 # CONFIG_PATA_WINBOND is not set
31046 -# CONFIG_PATA_PLATFORM is not set
31047 +CONFIG_PATA_PLATFORM=y
31048 +CONFIG_PATA_OF_PLATFORM=y
31050 CONFIG_BLK_DEV_MD=y
31052 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/mpc837x_mds_defconfig powerpc.git/arch/powerpc/configs/mpc837x_mds_defconfig
31053 --- linux-2.6.24/arch/powerpc/configs/mpc837x_mds_defconfig 1970-01-01 01:00:00.000000000 +0100
31054 +++ powerpc.git/arch/powerpc/configs/mpc837x_mds_defconfig 2008-01-28 20:25:49.000000000 +0100
31057 +# Automatically generated make config: don't edit
31058 +# Linux kernel version: 2.6.23
31059 +# Wed Oct 10 16:31:39 2007
31061 +# CONFIG_PPC64 is not set
31064 +# Processor support
31067 +# CONFIG_PPC_85xx is not set
31068 +# CONFIG_PPC_8xx is not set
31069 +# CONFIG_40x is not set
31070 +# CONFIG_44x is not set
31071 +# CONFIG_E200 is not set
31074 +CONFIG_PPC_STD_MMU=y
31075 +CONFIG_PPC_STD_MMU_32=y
31076 +# CONFIG_PPC_MM_SLICES is not set
31077 +# CONFIG_SMP is not set
31079 +CONFIG_PPC_MERGE=y
31081 +CONFIG_GENERIC_HARDIRQS=y
31082 +CONFIG_IRQ_PER_CPU=y
31083 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
31084 +CONFIG_ARCH_HAS_ILOG2_U32=y
31085 +CONFIG_GENERIC_HWEIGHT=y
31086 +CONFIG_GENERIC_CALIBRATE_DELAY=y
31087 +CONFIG_GENERIC_FIND_NEXT_BIT=y
31088 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
31090 +CONFIG_EARLY_PRINTK=y
31091 +CONFIG_GENERIC_NVRAM=y
31092 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
31093 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
31096 +CONFIG_PPC_UDBG_16550=y
31097 +# CONFIG_GENERIC_TBSYNC is not set
31098 +CONFIG_AUDIT_ARCH=y
31099 +CONFIG_GENERIC_BUG=y
31100 +CONFIG_DEFAULT_UIMAGE=y
31101 +# CONFIG_PPC_DCR_NATIVE is not set
31102 +# CONFIG_PPC_DCR_MMIO is not set
31103 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
31108 +CONFIG_EXPERIMENTAL=y
31109 +CONFIG_BROKEN_ON_SMP=y
31110 +CONFIG_INIT_ENV_ARG_LIMIT=32
31111 +CONFIG_LOCALVERSION=""
31112 +CONFIG_LOCALVERSION_AUTO=y
31115 +CONFIG_SYSVIPC_SYSCTL=y
31116 +# CONFIG_POSIX_MQUEUE is not set
31117 +# CONFIG_BSD_PROCESS_ACCT is not set
31118 +# CONFIG_TASKSTATS is not set
31119 +# CONFIG_USER_NS is not set
31120 +# CONFIG_AUDIT is not set
31121 +# CONFIG_IKCONFIG is not set
31122 +CONFIG_LOG_BUF_SHIFT=14
31123 +CONFIG_SYSFS_DEPRECATED=y
31124 +# CONFIG_RELAY is not set
31125 +CONFIG_BLK_DEV_INITRD=y
31126 +CONFIG_INITRAMFS_SOURCE=""
31127 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
31130 +CONFIG_SYSCTL_SYSCALL=y
31132 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
31137 +CONFIG_BASE_FULL=y
31139 +CONFIG_ANON_INODES=y
31140 +# CONFIG_EPOLL is not set
31144 +CONFIG_VM_EVENT_COUNTERS=y
31146 +# CONFIG_SLUB is not set
31147 +# CONFIG_SLOB is not set
31148 +CONFIG_RT_MUTEXES=y
31149 +# CONFIG_TINY_SHMEM is not set
31150 +CONFIG_BASE_SMALL=0
31152 +CONFIG_MODULE_UNLOAD=y
31153 +# CONFIG_MODULE_FORCE_UNLOAD is not set
31154 +# CONFIG_MODVERSIONS is not set
31155 +# CONFIG_MODULE_SRCVERSION_ALL is not set
31156 +# CONFIG_KMOD is not set
31158 +# CONFIG_LBD is not set
31159 +# CONFIG_BLK_DEV_IO_TRACE is not set
31160 +# CONFIG_LSF is not set
31161 +# CONFIG_BLK_DEV_BSG is not set
31166 +CONFIG_IOSCHED_NOOP=y
31167 +CONFIG_IOSCHED_AS=y
31168 +CONFIG_IOSCHED_DEADLINE=y
31169 +CONFIG_IOSCHED_CFQ=y
31170 +CONFIG_DEFAULT_AS=y
31171 +# CONFIG_DEFAULT_DEADLINE is not set
31172 +# CONFIG_DEFAULT_CFQ is not set
31173 +# CONFIG_DEFAULT_NOOP is not set
31174 +CONFIG_DEFAULT_IOSCHED="anticipatory"
31177 +# Platform support
31179 +# CONFIG_PPC_MULTIPLATFORM is not set
31180 +# CONFIG_EMBEDDED6xx is not set
31181 +# CONFIG_PPC_82xx is not set
31183 +# CONFIG_PPC_86xx is not set
31184 +# CONFIG_PPC_MPC52xx is not set
31185 +# CONFIG_PPC_MPC5200 is not set
31186 +# CONFIG_PPC_CELL is not set
31187 +# CONFIG_PPC_CELL_NATIVE is not set
31188 +# CONFIG_PQ2ADS is not set
31189 +# CONFIG_MPC8313_RDB is not set
31190 +# CONFIG_MPC832x_MDS is not set
31191 +# CONFIG_MPC832x_RDB is not set
31192 +# CONFIG_MPC834x_MDS is not set
31193 +# CONFIG_MPC834x_ITX is not set
31194 +# CONFIG_MPC836x_MDS is not set
31195 +CONFIG_MPC837x_MDS=y
31196 +CONFIG_PPC_MPC837x=y
31197 +# CONFIG_MPIC is not set
31198 +# CONFIG_MPIC_WEIRD is not set
31199 +# CONFIG_PPC_I8259 is not set
31200 +# CONFIG_PPC_RTAS is not set
31201 +# CONFIG_MMIO_NVRAM is not set
31202 +# CONFIG_PPC_MPC106 is not set
31203 +# CONFIG_PPC_970_NAP is not set
31204 +# CONFIG_PPC_INDIRECT_IO is not set
31205 +# CONFIG_GENERIC_IOMAP is not set
31206 +# CONFIG_CPU_FREQ is not set
31207 +# CONFIG_CPM2 is not set
31208 +# CONFIG_FSL_ULI1575 is not set
31209 +CONFIG_FSL_SERDES=y
31214 +# CONFIG_HIGHMEM is not set
31215 +# CONFIG_HZ_100 is not set
31217 +# CONFIG_HZ_300 is not set
31218 +# CONFIG_HZ_1000 is not set
31220 +CONFIG_PREEMPT_NONE=y
31221 +# CONFIG_PREEMPT_VOLUNTARY is not set
31222 +# CONFIG_PREEMPT is not set
31223 +CONFIG_BINFMT_ELF=y
31224 +# CONFIG_BINFMT_MISC is not set
31225 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
31226 +CONFIG_ARCH_FLATMEM_ENABLE=y
31227 +CONFIG_ARCH_POPULATES_NODE_MAP=y
31228 +CONFIG_SELECT_MEMORY_MODEL=y
31229 +CONFIG_FLATMEM_MANUAL=y
31230 +# CONFIG_DISCONTIGMEM_MANUAL is not set
31231 +# CONFIG_SPARSEMEM_MANUAL is not set
31233 +CONFIG_FLAT_NODE_MEM_MAP=y
31234 +# CONFIG_SPARSEMEM_STATIC is not set
31235 +CONFIG_SPLIT_PTLOCK_CPUS=4
31236 +# CONFIG_RESOURCES_64BIT is not set
31237 +CONFIG_ZONE_DMA_FLAG=1
31239 +CONFIG_VIRT_TO_BUS=y
31240 +CONFIG_PROC_DEVICETREE=y
31241 +# CONFIG_CMDLINE_BOOL is not set
31242 +# CONFIG_PM is not set
31243 +CONFIG_SUSPEND_UP_POSSIBLE=y
31244 +CONFIG_HIBERNATION_UP_POSSIBLE=y
31246 +CONFIG_WANT_DEVICE_TREE=y
31247 +CONFIG_DEVICE_TREE=""
31248 +CONFIG_ISA_DMA_API=y
31254 +CONFIG_GENERIC_ISA_DMA=y
31255 +CONFIG_PPC_INDIRECT_PCI=y
31257 +# CONFIG_PCI is not set
31258 +# CONFIG_PCI_DOMAINS is not set
31259 +# CONFIG_PCI_SYSCALL is not set
31260 +# CONFIG_ARCH_SUPPORTS_MSI is not set
31263 +# PCCARD (PCMCIA/CardBus) support
31265 +# CONFIG_PCCARD is not set
31270 +# CONFIG_ADVANCED_OPTIONS is not set
31273 +# Default settings for advanced configuration options are used
31275 +CONFIG_HIGHMEM_START=0xfe000000
31276 +CONFIG_LOWMEM_SIZE=0x30000000
31277 +CONFIG_KERNEL_START=0xc0000000
31278 +CONFIG_TASK_SIZE=0x80000000
31279 +CONFIG_BOOT_LOAD=0x00800000
31287 +# Networking options
31290 +# CONFIG_PACKET_MMAP is not set
31293 +CONFIG_XFRM_USER=m
31294 +# CONFIG_XFRM_SUB_POLICY is not set
31295 +# CONFIG_XFRM_MIGRATE is not set
31296 +# CONFIG_NET_KEY is not set
31298 +CONFIG_IP_MULTICAST=y
31299 +# CONFIG_IP_ADVANCED_ROUTER is not set
31300 +CONFIG_IP_FIB_HASH=y
31302 +CONFIG_IP_PNP_DHCP=y
31303 +CONFIG_IP_PNP_BOOTP=y
31304 +# CONFIG_IP_PNP_RARP is not set
31305 +# CONFIG_NET_IPIP is not set
31306 +# CONFIG_NET_IPGRE is not set
31307 +# CONFIG_IP_MROUTE is not set
31308 +# CONFIG_ARPD is not set
31309 +CONFIG_SYN_COOKIES=y
31310 +# CONFIG_INET_AH is not set
31311 +# CONFIG_INET_ESP is not set
31312 +# CONFIG_INET_IPCOMP is not set
31313 +# CONFIG_INET_XFRM_TUNNEL is not set
31314 +# CONFIG_INET_TUNNEL is not set
31315 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
31316 +CONFIG_INET_XFRM_MODE_TUNNEL=y
31317 +CONFIG_INET_XFRM_MODE_BEET=y
31318 +CONFIG_INET_DIAG=y
31319 +CONFIG_INET_TCP_DIAG=y
31320 +# CONFIG_TCP_CONG_ADVANCED is not set
31321 +CONFIG_TCP_CONG_CUBIC=y
31322 +CONFIG_DEFAULT_TCP_CONG="cubic"
31323 +# CONFIG_TCP_MD5SIG is not set
31324 +# CONFIG_IPV6 is not set
31325 +# CONFIG_INET6_XFRM_TUNNEL is not set
31326 +# CONFIG_INET6_TUNNEL is not set
31327 +# CONFIG_NETWORK_SECMARK is not set
31328 +# CONFIG_NETFILTER is not set
31329 +# CONFIG_IP_DCCP is not set
31330 +# CONFIG_IP_SCTP is not set
31331 +# CONFIG_TIPC is not set
31332 +# CONFIG_ATM is not set
31333 +# CONFIG_BRIDGE is not set
31334 +# CONFIG_VLAN_8021Q is not set
31335 +# CONFIG_DECNET is not set
31336 +# CONFIG_LLC2 is not set
31337 +# CONFIG_IPX is not set
31338 +# CONFIG_ATALK is not set
31339 +# CONFIG_X25 is not set
31340 +# CONFIG_LAPB is not set
31341 +# CONFIG_ECONET is not set
31342 +# CONFIG_WAN_ROUTER is not set
31345 +# QoS and/or fair queueing
31347 +# CONFIG_NET_SCHED is not set
31352 +# CONFIG_NET_PKTGEN is not set
31353 +# CONFIG_HAMRADIO is not set
31354 +# CONFIG_IRDA is not set
31355 +# CONFIG_BT is not set
31356 +# CONFIG_AF_RXRPC is not set
31361 +# CONFIG_CFG80211 is not set
31362 +# CONFIG_WIRELESS_EXT is not set
31363 +# CONFIG_MAC80211 is not set
31364 +# CONFIG_IEEE80211 is not set
31365 +# CONFIG_RFKILL is not set
31366 +# CONFIG_NET_9P is not set
31373 +# Generic Driver Options
31375 +CONFIG_STANDALONE=y
31376 +CONFIG_PREVENT_FIRMWARE_BUILD=y
31377 +# CONFIG_FW_LOADER is not set
31378 +# CONFIG_SYS_HYPERVISOR is not set
31379 +# CONFIG_CONNECTOR is not set
31380 +# CONFIG_MTD is not set
31381 +CONFIG_OF_DEVICE=y
31382 +# CONFIG_PARPORT is not set
31384 +# CONFIG_BLK_DEV_FD is not set
31385 +# CONFIG_BLK_DEV_COW_COMMON is not set
31386 +CONFIG_BLK_DEV_LOOP=y
31387 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
31388 +# CONFIG_BLK_DEV_NBD is not set
31389 +CONFIG_BLK_DEV_RAM=y
31390 +CONFIG_BLK_DEV_RAM_COUNT=16
31391 +CONFIG_BLK_DEV_RAM_SIZE=32768
31392 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
31393 +# CONFIG_CDROM_PKTCDVD is not set
31394 +# CONFIG_ATA_OVER_ETH is not set
31395 +CONFIG_MISC_DEVICES=y
31396 +# CONFIG_EEPROM_93CX6 is not set
31397 +# CONFIG_IDE is not set
31400 +# SCSI device support
31402 +# CONFIG_RAID_ATTRS is not set
31405 +# CONFIG_SCSI_TGT is not set
31406 +# CONFIG_SCSI_NETLINK is not set
31407 +CONFIG_SCSI_PROC_FS=y
31410 +# SCSI support type (disk, tape, CD-ROM)
31412 +CONFIG_BLK_DEV_SD=y
31413 +# CONFIG_CHR_DEV_ST is not set
31414 +# CONFIG_CHR_DEV_OSST is not set
31415 +# CONFIG_BLK_DEV_SR is not set
31416 +CONFIG_CHR_DEV_SG=y
31417 +# CONFIG_CHR_DEV_SCH is not set
31420 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
31422 +# CONFIG_SCSI_MULTI_LUN is not set
31423 +# CONFIG_SCSI_CONSTANTS is not set
31424 +# CONFIG_SCSI_LOGGING is not set
31425 +# CONFIG_SCSI_SCAN_ASYNC is not set
31426 +CONFIG_SCSI_WAIT_SCAN=m
31431 +# CONFIG_SCSI_SPI_ATTRS is not set
31432 +# CONFIG_SCSI_FC_ATTRS is not set
31433 +# CONFIG_SCSI_ISCSI_ATTRS is not set
31434 +# CONFIG_SCSI_SAS_LIBSAS is not set
31435 +CONFIG_SCSI_LOWLEVEL=y
31436 +# CONFIG_ISCSI_TCP is not set
31437 +# CONFIG_SCSI_DEBUG is not set
31439 +# CONFIG_ATA_NONSTANDARD is not set
31441 +# CONFIG_PATA_PLATFORM is not set
31442 +# CONFIG_MD is not set
31443 +# CONFIG_MACINTOSH_DRIVERS is not set
31444 +CONFIG_NETDEVICES=y
31445 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
31446 +# CONFIG_DUMMY is not set
31447 +# CONFIG_BONDING is not set
31448 +# CONFIG_MACVLAN is not set
31449 +# CONFIG_EQUALIZER is not set
31450 +# CONFIG_TUN is not set
31454 +# MII PHY device drivers
31456 +CONFIG_MARVELL_PHY=y
31457 +# CONFIG_DAVICOM_PHY is not set
31458 +# CONFIG_QSEMI_PHY is not set
31459 +# CONFIG_LXT_PHY is not set
31460 +# CONFIG_CICADA_PHY is not set
31461 +# CONFIG_VITESSE_PHY is not set
31462 +# CONFIG_SMSC_PHY is not set
31463 +# CONFIG_BROADCOM_PHY is not set
31464 +# CONFIG_ICPLUS_PHY is not set
31465 +# CONFIG_FIXED_PHY is not set
31466 +CONFIG_NET_ETHERNET=y
31468 +CONFIG_NETDEV_1000=y
31470 +# CONFIG_GFAR_NAPI is not set
31471 +CONFIG_NETDEV_10000=y
31476 +# CONFIG_WLAN_PRE80211 is not set
31477 +# CONFIG_WLAN_80211 is not set
31478 +# CONFIG_WAN is not set
31479 +# CONFIG_PPP is not set
31480 +# CONFIG_SLIP is not set
31481 +# CONFIG_SHAPER is not set
31482 +# CONFIG_NETCONSOLE is not set
31483 +# CONFIG_NETPOLL is not set
31484 +# CONFIG_NET_POLL_CONTROLLER is not set
31485 +# CONFIG_ISDN is not set
31486 +# CONFIG_PHONE is not set
31489 +# Input device support
31492 +# CONFIG_INPUT_FF_MEMLESS is not set
31493 +# CONFIG_INPUT_POLLDEV is not set
31496 +# Userland interfaces
31498 +# CONFIG_INPUT_MOUSEDEV is not set
31499 +# CONFIG_INPUT_JOYDEV is not set
31500 +# CONFIG_INPUT_TSDEV is not set
31501 +# CONFIG_INPUT_EVDEV is not set
31502 +# CONFIG_INPUT_EVBUG is not set
31505 +# Input Device Drivers
31507 +# CONFIG_INPUT_KEYBOARD is not set
31508 +# CONFIG_INPUT_MOUSE is not set
31509 +# CONFIG_INPUT_JOYSTICK is not set
31510 +# CONFIG_INPUT_TABLET is not set
31511 +# CONFIG_INPUT_TOUCHSCREEN is not set
31512 +# CONFIG_INPUT_MISC is not set
31515 +# Hardware I/O ports
31517 +# CONFIG_SERIO is not set
31518 +# CONFIG_GAMEPORT is not set
31521 +# Character devices
31523 +# CONFIG_VT is not set
31524 +# CONFIG_SERIAL_NONSTANDARD is not set
31529 +CONFIG_SERIAL_8250=y
31530 +CONFIG_SERIAL_8250_CONSOLE=y
31531 +CONFIG_SERIAL_8250_NR_UARTS=4
31532 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
31533 +# CONFIG_SERIAL_8250_EXTENDED is not set
31536 +# Non-8250 serial port support
31538 +# CONFIG_SERIAL_UARTLITE is not set
31539 +CONFIG_SERIAL_CORE=y
31540 +CONFIG_SERIAL_CORE_CONSOLE=y
31541 +# CONFIG_SERIAL_OF_PLATFORM is not set
31542 +CONFIG_UNIX98_PTYS=y
31543 +CONFIG_LEGACY_PTYS=y
31544 +CONFIG_LEGACY_PTY_COUNT=256
31545 +# CONFIG_IPMI_HANDLER is not set
31547 +# CONFIG_WATCHDOG_NOWAYOUT is not set
31550 +# Watchdog Device Drivers
31552 +# CONFIG_SOFT_WATCHDOG is not set
31554 +# CONFIG_HW_RANDOM is not set
31555 +# CONFIG_NVRAM is not set
31557 +# CONFIG_GEN_RTC_X is not set
31558 +# CONFIG_R3964 is not set
31559 +# CONFIG_RAW_DRIVER is not set
31560 +# CONFIG_TCG_TPM is not set
31562 +CONFIG_I2C_BOARDINFO=y
31563 +CONFIG_I2C_CHARDEV=y
31568 +# CONFIG_I2C_ALGOBIT is not set
31569 +# CONFIG_I2C_ALGOPCF is not set
31570 +# CONFIG_I2C_ALGOPCA is not set
31573 +# I2C Hardware Bus support
31576 +# CONFIG_I2C_OCORES is not set
31577 +# CONFIG_I2C_PARPORT_LIGHT is not set
31578 +# CONFIG_I2C_SIMTEC is not set
31579 +# CONFIG_I2C_TAOS_EVM is not set
31580 +# CONFIG_I2C_STUB is not set
31583 +# Miscellaneous I2C Chip support
31585 +# CONFIG_SENSORS_DS1337 is not set
31586 +# CONFIG_SENSORS_DS1374 is not set
31587 +# CONFIG_DS1682 is not set
31588 +# CONFIG_SENSORS_EEPROM is not set
31589 +# CONFIG_SENSORS_PCF8574 is not set
31590 +# CONFIG_SENSORS_PCA9539 is not set
31591 +# CONFIG_SENSORS_PCF8591 is not set
31592 +# CONFIG_SENSORS_M41T00 is not set
31593 +# CONFIG_SENSORS_MAX6875 is not set
31594 +# CONFIG_SENSORS_TSL2550 is not set
31595 +# CONFIG_I2C_DEBUG_CORE is not set
31596 +# CONFIG_I2C_DEBUG_ALGO is not set
31597 +# CONFIG_I2C_DEBUG_BUS is not set
31598 +# CONFIG_I2C_DEBUG_CHIP is not set
31603 +# CONFIG_SPI is not set
31604 +# CONFIG_SPI_MASTER is not set
31605 +# CONFIG_W1 is not set
31606 +# CONFIG_POWER_SUPPLY is not set
31608 +# CONFIG_HWMON_VID is not set
31609 +# CONFIG_SENSORS_ABITUGURU is not set
31610 +# CONFIG_SENSORS_ABITUGURU3 is not set
31611 +# CONFIG_SENSORS_AD7418 is not set
31612 +# CONFIG_SENSORS_ADM1021 is not set
31613 +# CONFIG_SENSORS_ADM1025 is not set
31614 +# CONFIG_SENSORS_ADM1026 is not set
31615 +# CONFIG_SENSORS_ADM1029 is not set
31616 +# CONFIG_SENSORS_ADM1031 is not set
31617 +# CONFIG_SENSORS_ADM9240 is not set
31618 +# CONFIG_SENSORS_ASB100 is not set
31619 +# CONFIG_SENSORS_ATXP1 is not set
31620 +# CONFIG_SENSORS_DS1621 is not set
31621 +# CONFIG_SENSORS_F71805F is not set
31622 +# CONFIG_SENSORS_FSCHER is not set
31623 +# CONFIG_SENSORS_FSCPOS is not set
31624 +# CONFIG_SENSORS_GL518SM is not set
31625 +# CONFIG_SENSORS_GL520SM is not set
31626 +# CONFIG_SENSORS_IT87 is not set
31627 +# CONFIG_SENSORS_LM63 is not set
31628 +# CONFIG_SENSORS_LM75 is not set
31629 +# CONFIG_SENSORS_LM77 is not set
31630 +# CONFIG_SENSORS_LM78 is not set
31631 +# CONFIG_SENSORS_LM80 is not set
31632 +# CONFIG_SENSORS_LM83 is not set
31633 +# CONFIG_SENSORS_LM85 is not set
31634 +# CONFIG_SENSORS_LM87 is not set
31635 +# CONFIG_SENSORS_LM90 is not set
31636 +# CONFIG_SENSORS_LM92 is not set
31637 +# CONFIG_SENSORS_LM93 is not set
31638 +# CONFIG_SENSORS_MAX1619 is not set
31639 +# CONFIG_SENSORS_MAX6650 is not set
31640 +# CONFIG_SENSORS_PC87360 is not set
31641 +# CONFIG_SENSORS_PC87427 is not set
31642 +# CONFIG_SENSORS_DME1737 is not set
31643 +# CONFIG_SENSORS_SMSC47M1 is not set
31644 +# CONFIG_SENSORS_SMSC47M192 is not set
31645 +# CONFIG_SENSORS_SMSC47B397 is not set
31646 +# CONFIG_SENSORS_THMC50 is not set
31647 +# CONFIG_SENSORS_VT1211 is not set
31648 +# CONFIG_SENSORS_W83781D is not set
31649 +# CONFIG_SENSORS_W83791D is not set
31650 +# CONFIG_SENSORS_W83792D is not set
31651 +# CONFIG_SENSORS_W83793 is not set
31652 +# CONFIG_SENSORS_W83L785TS is not set
31653 +# CONFIG_SENSORS_W83627HF is not set
31654 +# CONFIG_SENSORS_W83627EHF is not set
31655 +# CONFIG_HWMON_DEBUG_CHIP is not set
31658 +# Multifunction device drivers
31660 +# CONFIG_MFD_SM501 is not set
31663 +# Multimedia devices
31665 +# CONFIG_VIDEO_DEV is not set
31666 +# CONFIG_DVB_CORE is not set
31670 +# Graphics support
31672 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
31675 +# Display device support
31677 +# CONFIG_DISPLAY_SUPPORT is not set
31678 +# CONFIG_VGASTATE is not set
31679 +CONFIG_VIDEO_OUTPUT_CONTROL=m
31680 +# CONFIG_FB is not set
31681 +# CONFIG_FB_IBM_GXT4500 is not set
31686 +# CONFIG_SOUND is not set
31687 +CONFIG_HID_SUPPORT=y
31689 +# CONFIG_HID_DEBUG is not set
31690 +CONFIG_USB_SUPPORT=y
31691 +CONFIG_USB_ARCH_HAS_HCD=y
31692 +# CONFIG_USB_ARCH_HAS_OHCI is not set
31693 +CONFIG_USB_ARCH_HAS_EHCI=y
31694 +# CONFIG_USB is not set
31697 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
31701 +# USB Gadget Support
31703 +# CONFIG_USB_GADGET is not set
31704 +# CONFIG_MMC is not set
31705 +# CONFIG_NEW_LEDS is not set
31706 +# CONFIG_EDAC is not set
31707 +# CONFIG_RTC_CLASS is not set
31710 +# DMA Engine support
31712 +# CONFIG_DMA_ENGINE is not set
31725 +# CONFIG_UIO is not set
31731 +# CONFIG_EXT2_FS_XATTR is not set
31732 +# CONFIG_EXT2_FS_XIP is not set
31734 +CONFIG_EXT3_FS_XATTR=y
31735 +# CONFIG_EXT3_FS_POSIX_ACL is not set
31736 +# CONFIG_EXT3_FS_SECURITY is not set
31737 +# CONFIG_EXT4DEV_FS is not set
31739 +# CONFIG_JBD_DEBUG is not set
31740 +CONFIG_FS_MBCACHE=y
31741 +# CONFIG_REISERFS_FS is not set
31742 +# CONFIG_JFS_FS is not set
31743 +# CONFIG_FS_POSIX_ACL is not set
31744 +# CONFIG_XFS_FS is not set
31745 +# CONFIG_GFS2_FS is not set
31746 +# CONFIG_OCFS2_FS is not set
31747 +# CONFIG_MINIX_FS is not set
31748 +# CONFIG_ROMFS_FS is not set
31750 +CONFIG_INOTIFY_USER=y
31751 +# CONFIG_QUOTA is not set
31753 +# CONFIG_AUTOFS_FS is not set
31754 +# CONFIG_AUTOFS4_FS is not set
31755 +# CONFIG_FUSE_FS is not set
31758 +# CD-ROM/DVD Filesystems
31760 +# CONFIG_ISO9660_FS is not set
31761 +# CONFIG_UDF_FS is not set
31764 +# DOS/FAT/NT Filesystems
31766 +# CONFIG_MSDOS_FS is not set
31767 +# CONFIG_VFAT_FS is not set
31768 +# CONFIG_NTFS_FS is not set
31771 +# Pseudo filesystems
31774 +CONFIG_PROC_KCORE=y
31775 +CONFIG_PROC_SYSCTL=y
31778 +# CONFIG_TMPFS_POSIX_ACL is not set
31779 +# CONFIG_HUGETLB_PAGE is not set
31781 +# CONFIG_CONFIGFS_FS is not set
31784 +# Miscellaneous filesystems
31786 +# CONFIG_ADFS_FS is not set
31787 +# CONFIG_AFFS_FS is not set
31788 +# CONFIG_HFS_FS is not set
31789 +# CONFIG_HFSPLUS_FS is not set
31790 +# CONFIG_BEFS_FS is not set
31791 +# CONFIG_BFS_FS is not set
31792 +# CONFIG_EFS_FS is not set
31793 +# CONFIG_CRAMFS is not set
31794 +# CONFIG_VXFS_FS is not set
31795 +# CONFIG_HPFS_FS is not set
31796 +# CONFIG_QNX4FS_FS is not set
31797 +# CONFIG_SYSV_FS is not set
31798 +# CONFIG_UFS_FS is not set
31801 +# Network File Systems
31805 +# CONFIG_NFS_V3_ACL is not set
31807 +# CONFIG_NFS_DIRECTIO is not set
31808 +# CONFIG_NFSD is not set
31812 +CONFIG_NFS_COMMON=y
31814 +CONFIG_SUNRPC_GSS=y
31815 +# CONFIG_SUNRPC_BIND34 is not set
31816 +CONFIG_RPCSEC_GSS_KRB5=y
31817 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
31818 +# CONFIG_SMB_FS is not set
31819 +# CONFIG_CIFS is not set
31820 +# CONFIG_NCP_FS is not set
31821 +# CONFIG_CODA_FS is not set
31822 +# CONFIG_AFS_FS is not set
31827 +CONFIG_PARTITION_ADVANCED=y
31828 +# CONFIG_ACORN_PARTITION is not set
31829 +# CONFIG_OSF_PARTITION is not set
31830 +# CONFIG_AMIGA_PARTITION is not set
31831 +# CONFIG_ATARI_PARTITION is not set
31832 +# CONFIG_MAC_PARTITION is not set
31833 +CONFIG_MSDOS_PARTITION=y
31834 +# CONFIG_BSD_DISKLABEL is not set
31835 +# CONFIG_MINIX_SUBPARTITION is not set
31836 +# CONFIG_SOLARIS_X86_PARTITION is not set
31837 +# CONFIG_UNIXWARE_DISKLABEL is not set
31838 +# CONFIG_LDM_PARTITION is not set
31839 +# CONFIG_SGI_PARTITION is not set
31840 +# CONFIG_ULTRIX_PARTITION is not set
31841 +# CONFIG_SUN_PARTITION is not set
31842 +# CONFIG_KARMA_PARTITION is not set
31843 +# CONFIG_EFI_PARTITION is not set
31844 +# CONFIG_SYSV68_PARTITION is not set
31847 +# Native Language Support
31849 +# CONFIG_NLS is not set
31852 +# Distributed Lock Manager
31854 +# CONFIG_DLM is not set
31855 +# CONFIG_UCC_SLOW is not set
31858 +# Library routines
31860 +CONFIG_BITREVERSE=y
31861 +# CONFIG_CRC_CCITT is not set
31862 +# CONFIG_CRC16 is not set
31863 +# CONFIG_CRC_ITU_T is not set
31865 +# CONFIG_CRC7 is not set
31866 +# CONFIG_LIBCRC32C is not set
31868 +CONFIG_HAS_IOMEM=y
31869 +CONFIG_HAS_IOPORT=y
31873 +# Instrumentation Support
31875 +# CONFIG_PROFILING is not set
31876 +# CONFIG_KPROBES is not set
31881 +# CONFIG_PRINTK_TIME is not set
31882 +CONFIG_ENABLE_MUST_CHECK=y
31883 +# CONFIG_MAGIC_SYSRQ is not set
31884 +# CONFIG_UNUSED_SYMBOLS is not set
31885 +# CONFIG_DEBUG_FS is not set
31886 +# CONFIG_HEADERS_CHECK is not set
31887 +# CONFIG_DEBUG_KERNEL is not set
31888 +# CONFIG_DEBUG_BUGVERBOSE is not set
31889 +# CONFIG_PPC_EARLY_DEBUG is not set
31892 +# Security options
31894 +# CONFIG_KEYS is not set
31895 +# CONFIG_SECURITY is not set
31897 +CONFIG_CRYPTO_ALGAPI=y
31898 +CONFIG_CRYPTO_BLKCIPHER=y
31899 +CONFIG_CRYPTO_MANAGER=y
31900 +# CONFIG_CRYPTO_HMAC is not set
31901 +# CONFIG_CRYPTO_XCBC is not set
31902 +# CONFIG_CRYPTO_NULL is not set
31903 +# CONFIG_CRYPTO_MD4 is not set
31904 +CONFIG_CRYPTO_MD5=y
31905 +# CONFIG_CRYPTO_SHA1 is not set
31906 +# CONFIG_CRYPTO_SHA256 is not set
31907 +# CONFIG_CRYPTO_SHA512 is not set
31908 +# CONFIG_CRYPTO_WP512 is not set
31909 +# CONFIG_CRYPTO_TGR192 is not set
31910 +# CONFIG_CRYPTO_GF128MUL is not set
31911 +CONFIG_CRYPTO_ECB=m
31912 +CONFIG_CRYPTO_CBC=y
31913 +CONFIG_CRYPTO_PCBC=m
31914 +# CONFIG_CRYPTO_LRW is not set
31915 +# CONFIG_CRYPTO_CRYPTD is not set
31916 +CONFIG_CRYPTO_DES=y
31917 +# CONFIG_CRYPTO_FCRYPT is not set
31918 +# CONFIG_CRYPTO_BLOWFISH is not set
31919 +# CONFIG_CRYPTO_TWOFISH is not set
31920 +# CONFIG_CRYPTO_SERPENT is not set
31921 +# CONFIG_CRYPTO_AES is not set
31922 +# CONFIG_CRYPTO_CAST5 is not set
31923 +# CONFIG_CRYPTO_CAST6 is not set
31924 +# CONFIG_CRYPTO_TEA is not set
31925 +# CONFIG_CRYPTO_ARC4 is not set
31926 +# CONFIG_CRYPTO_KHAZAD is not set
31927 +# CONFIG_CRYPTO_ANUBIS is not set
31928 +# CONFIG_CRYPTO_DEFLATE is not set
31929 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
31930 +# CONFIG_CRYPTO_CRC32C is not set
31931 +# CONFIG_CRYPTO_CAMELLIA is not set
31932 +# CONFIG_CRYPTO_TEST is not set
31933 +CONFIG_CRYPTO_HW=y
31934 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/mpc8610_hpcd_defconfig powerpc.git/arch/powerpc/configs/mpc8610_hpcd_defconfig
31935 --- linux-2.6.24/arch/powerpc/configs/mpc8610_hpcd_defconfig 2008-01-24 23:58:37.000000000 +0100
31936 +++ powerpc.git/arch/powerpc/configs/mpc8610_hpcd_defconfig 2008-01-28 20:25:49.000000000 +0100
31937 @@ -696,7 +696,7 @@
31938 CONFIG_SERIAL_CORE=y
31939 CONFIG_SERIAL_CORE_CONSOLE=y
31940 # CONFIG_SERIAL_JSM is not set
31941 -CONFIG_SERIAL_OF_PLATFORM=y
31942 +# CONFIG_SERIAL_OF_PLATFORM is not set
31943 CONFIG_UNIX98_PTYS=y
31944 # CONFIG_LEGACY_PTYS is not set
31945 # CONFIG_IPMI_HANDLER is not set
31946 @@ -708,7 +708,60 @@
31947 # CONFIG_RAW_DRIVER is not set
31948 # CONFIG_TCG_TPM is not set
31950 -# CONFIG_I2C is not set
31952 +CONFIG_I2C_BOARDINFO=y
31953 +# CONFIG_I2C_CHARDEV is not set
31958 +# CONFIG_I2C_ALGOBIT is not set
31959 +# CONFIG_I2C_ALGOPCF is not set
31960 +# CONFIG_I2C_ALGOPCA is not set
31963 +# I2C Hardware Bus support
31965 +# CONFIG_I2C_ALI1535 is not set
31966 +# CONFIG_I2C_ALI1563 is not set
31967 +# CONFIG_I2C_ALI15X3 is not set
31968 +# CONFIG_I2C_AMD756 is not set
31969 +# CONFIG_I2C_AMD8111 is not set
31970 +# CONFIG_I2C_I801 is not set
31971 +# CONFIG_I2C_I810 is not set
31972 +# CONFIG_I2C_PIIX4 is not set
31974 +# CONFIG_I2C_NFORCE2 is not set
31975 +# CONFIG_I2C_OCORES is not set
31976 +# CONFIG_I2C_PARPORT_LIGHT is not set
31977 +# CONFIG_I2C_PROSAVAGE is not set
31978 +# CONFIG_I2C_SAVAGE4 is not set
31979 +# CONFIG_I2C_SIMTEC is not set
31980 +# CONFIG_I2C_SIS5595 is not set
31981 +# CONFIG_I2C_SIS630 is not set
31982 +# CONFIG_I2C_SIS96X is not set
31983 +# CONFIG_I2C_TAOS_EVM is not set
31984 +# CONFIG_I2C_VIA is not set
31985 +# CONFIG_I2C_VIAPRO is not set
31986 +# CONFIG_I2C_VOODOO3 is not set
31989 +# Miscellaneous I2C Chip support
31991 +# CONFIG_SENSORS_DS1337 is not set
31992 +# CONFIG_SENSORS_DS1374 is not set
31993 +# CONFIG_DS1682 is not set
31994 +# CONFIG_SENSORS_EEPROM is not set
31995 +# CONFIG_SENSORS_PCF8574 is not set
31996 +# CONFIG_SENSORS_PCA9539 is not set
31997 +# CONFIG_SENSORS_PCF8591 is not set
31998 +# CONFIG_SENSORS_M41T00 is not set
31999 +# CONFIG_SENSORS_MAX6875 is not set
32000 +# CONFIG_SENSORS_TSL2550 is not set
32001 +# CONFIG_I2C_DEBUG_CORE is not set
32002 +# CONFIG_I2C_DEBUG_ALGO is not set
32003 +# CONFIG_I2C_DEBUG_BUS is not set
32004 +# CONFIG_I2C_DEBUG_CHIP is not set
32008 @@ -763,7 +816,119 @@
32012 -# CONFIG_SOUND is not set
32016 +# Advanced Linux Sound Architecture
32019 +CONFIG_SND_TIMER=y
32021 +# CONFIG_SND_SEQUENCER is not set
32022 +CONFIG_SND_OSSEMUL=y
32023 +CONFIG_SND_MIXER_OSS=y
32024 +CONFIG_SND_PCM_OSS=y
32025 +# CONFIG_SND_PCM_OSS_PLUGINS is not set
32026 +# CONFIG_SND_DYNAMIC_MINORS is not set
32027 +# CONFIG_SND_SUPPORT_OLD_API is not set
32028 +CONFIG_SND_VERBOSE_PROCFS=y
32029 +# CONFIG_SND_VERBOSE_PRINTK is not set
32030 +# CONFIG_SND_DEBUG is not set
32035 +# CONFIG_SND_DUMMY is not set
32036 +# CONFIG_SND_MTPAV is not set
32037 +# CONFIG_SND_SERIAL_U16550 is not set
32038 +# CONFIG_SND_MPU401 is not set
32043 +# CONFIG_SND_AD1889 is not set
32044 +# CONFIG_SND_ALS300 is not set
32045 +# CONFIG_SND_ALS4000 is not set
32046 +# CONFIG_SND_ALI5451 is not set
32047 +# CONFIG_SND_ATIIXP is not set
32048 +# CONFIG_SND_ATIIXP_MODEM is not set
32049 +# CONFIG_SND_AU8810 is not set
32050 +# CONFIG_SND_AU8820 is not set
32051 +# CONFIG_SND_AU8830 is not set
32052 +# CONFIG_SND_AZT3328 is not set
32053 +# CONFIG_SND_BT87X is not set
32054 +# CONFIG_SND_CA0106 is not set
32055 +# CONFIG_SND_CMIPCI is not set
32056 +# CONFIG_SND_CS4281 is not set
32057 +# CONFIG_SND_CS46XX is not set
32058 +# CONFIG_SND_CS5530 is not set
32059 +# CONFIG_SND_DARLA20 is not set
32060 +# CONFIG_SND_GINA20 is not set
32061 +# CONFIG_SND_LAYLA20 is not set
32062 +# CONFIG_SND_DARLA24 is not set
32063 +# CONFIG_SND_GINA24 is not set
32064 +# CONFIG_SND_LAYLA24 is not set
32065 +# CONFIG_SND_MONA is not set
32066 +# CONFIG_SND_MIA is not set
32067 +# CONFIG_SND_ECHO3G is not set
32068 +# CONFIG_SND_INDIGO is not set
32069 +# CONFIG_SND_INDIGOIO is not set
32070 +# CONFIG_SND_INDIGODJ is not set
32071 +# CONFIG_SND_EMU10K1 is not set
32072 +# CONFIG_SND_EMU10K1X is not set
32073 +# CONFIG_SND_ENS1370 is not set
32074 +# CONFIG_SND_ENS1371 is not set
32075 +# CONFIG_SND_ES1938 is not set
32076 +# CONFIG_SND_ES1968 is not set
32077 +# CONFIG_SND_FM801 is not set
32078 +# CONFIG_SND_HDA_INTEL is not set
32079 +# CONFIG_SND_HDSP is not set
32080 +# CONFIG_SND_HDSPM is not set
32081 +# CONFIG_SND_ICE1712 is not set
32082 +# CONFIG_SND_ICE1724 is not set
32083 +# CONFIG_SND_INTEL8X0 is not set
32084 +# CONFIG_SND_INTEL8X0M is not set
32085 +# CONFIG_SND_KORG1212 is not set
32086 +# CONFIG_SND_MAESTRO3 is not set
32087 +# CONFIG_SND_MIXART is not set
32088 +# CONFIG_SND_NM256 is not set
32089 +# CONFIG_SND_PCXHR is not set
32090 +# CONFIG_SND_RIPTIDE is not set
32091 +# CONFIG_SND_RME32 is not set
32092 +# CONFIG_SND_RME96 is not set
32093 +# CONFIG_SND_RME9652 is not set
32094 +# CONFIG_SND_SONICVIBES is not set
32095 +# CONFIG_SND_TRIDENT is not set
32096 +# CONFIG_SND_VIA82XX is not set
32097 +# CONFIG_SND_VIA82XX_MODEM is not set
32098 +# CONFIG_SND_VX222 is not set
32099 +# CONFIG_SND_YMFPCI is not set
32102 +# ALSA PowerMac devices
32106 +# ALSA PowerPC devices
32110 +# System on Chip audio support
32115 +# SoC Audio support for SuperH
32119 +# ALSA SoC audio for Freescale SOCs
32121 +CONFIG_SND_SOC_MPC8610=y
32122 +CONFIG_SND_SOC_MPC8610_HPCD=y
32123 +CONFIG_SND_SOC_CS4270=y
32124 +CONFIG_SND_SOC_CS4270_VD33_ERRATA=y
32126 CONFIG_HID_SUPPORT=y
32128 # CONFIG_HID_DEBUG is not set
32129 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/pasemi_defconfig powerpc.git/arch/powerpc/configs/pasemi_defconfig
32130 --- linux-2.6.24/arch/powerpc/configs/pasemi_defconfig 2008-01-24 23:58:37.000000000 +0100
32131 +++ powerpc.git/arch/powerpc/configs/pasemi_defconfig 2008-01-28 20:25:49.000000000 +0100
32134 # Automatically generated make config: don't edit
32135 -# Linux kernel version: 2.6.24-rc4
32136 -# Thu Dec 6 16:49:03 2007
32137 +# Linux kernel version: 2.6.24-rc6
32138 +# Tue Jan 15 10:26:10 2008
32142 @@ -152,7 +152,6 @@
32143 CONFIG_PPC_PASEMI_IOMMU=y
32144 # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set
32145 CONFIG_PPC_PASEMI_MDIO=y
32146 -CONFIG_ELECTRA_IDE=y
32147 # CONFIG_PPC_CELLEB is not set
32148 # CONFIG_PPC_PS3 is not set
32149 # CONFIG_PPC_CELL is not set
32150 @@ -256,7 +255,7 @@
32151 CONFIG_PCI_SYSCALL=y
32152 # CONFIG_PCIEPORTBUS is not set
32153 CONFIG_ARCH_SUPPORTS_MSI=y
32154 -# CONFIG_PCI_MSI is not set
32156 CONFIG_PCI_LEGACY=y
32157 # CONFIG_PCI_DEBUG is not set
32159 @@ -663,7 +662,26 @@
32160 # CONFIG_PATA_VIA is not set
32161 # CONFIG_PATA_WINBOND is not set
32162 CONFIG_PATA_PLATFORM=y
32163 -# CONFIG_MD is not set
32164 +CONFIG_PATA_OF_PLATFORM=y
32166 +CONFIG_BLK_DEV_MD=y
32167 +CONFIG_MD_LINEAR=y
32170 +CONFIG_MD_RAID10=y
32171 +CONFIG_MD_RAID456=y
32172 +CONFIG_MD_RAID5_RESHAPE=y
32173 +# CONFIG_MD_MULTIPATH is not set
32174 +# CONFIG_MD_FAULTY is not set
32175 +CONFIG_BLK_DEV_DM=y
32176 +# CONFIG_DM_DEBUG is not set
32178 +# CONFIG_DM_SNAPSHOT is not set
32179 +# CONFIG_DM_MIRROR is not set
32180 +# CONFIG_DM_ZERO is not set
32181 +# CONFIG_DM_MULTIPATH is not set
32182 +# CONFIG_DM_DELAY is not set
32183 +# CONFIG_DM_UEVENT is not set
32184 # CONFIG_FUSION is not set
32187 @@ -1686,6 +1704,10 @@
32188 # CONFIG_KEYS is not set
32189 # CONFIG_SECURITY is not set
32190 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
32191 +CONFIG_XOR_BLOCKS=y
32192 +CONFIG_ASYNC_CORE=y
32193 +CONFIG_ASYNC_MEMCPY=y
32194 +CONFIG_ASYNC_XOR=y
32196 CONFIG_CRYPTO_ALGAPI=y
32197 CONFIG_CRYPTO_BLKCIPHER=y
32198 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/ppc64_defconfig powerpc.git/arch/powerpc/configs/ppc64_defconfig
32199 --- linux-2.6.24/arch/powerpc/configs/ppc64_defconfig 2008-01-24 23:58:37.000000000 +0100
32200 +++ powerpc.git/arch/powerpc/configs/ppc64_defconfig 2008-01-28 20:25:49.000000000 +0100
32203 # Automatically generated make config: don't edit
32204 # Linux kernel version: 2.6.24-rc4
32205 -# Thu Dec 6 16:49:07 2007
32206 +# Fri Dec 21 14:47:29 2007
32210 @@ -211,7 +211,7 @@
32211 CONFIG_MPIC_U3_HT_IRQS=y
32212 CONFIG_MPIC_BROKEN_REGREAD=y
32214 -# CONFIG_IBMEBUS is not set
32216 # CONFIG_PPC_MPC106 is not set
32217 CONFIG_PPC_970_NAP=y
32218 CONFIG_PPC_INDIRECT_IO=y
32219 @@ -375,7 +375,7 @@
32220 CONFIG_INET_XFRM_MODE_TRANSPORT=y
32221 CONFIG_INET_XFRM_MODE_TUNNEL=y
32222 CONFIG_INET_XFRM_MODE_BEET=y
32223 -# CONFIG_INET_LRO is not set
32226 CONFIG_INET_TCP_DIAG=y
32227 # CONFIG_TCP_CONG_ADVANCED is not set
32228 @@ -929,6 +929,7 @@
32229 CONFIG_NETDEV_10000=y
32230 # CONFIG_CHELSIO_T1 is not set
32231 # CONFIG_CHELSIO_T3 is not set
32233 # CONFIG_IXGBE is not set
32235 # CONFIG_IXGB_NAPI is not set
32236 @@ -1558,6 +1559,7 @@
32237 CONFIG_INFINIBAND_MTHCA=m
32238 CONFIG_INFINIBAND_MTHCA_DEBUG=y
32239 # CONFIG_INFINIBAND_IPATH is not set
32240 +CONFIG_INFINIBAND_EHCA=m
32241 # CONFIG_INFINIBAND_AMSO1100 is not set
32242 # CONFIG_MLX4_INFINIBAND is not set
32243 CONFIG_INFINIBAND_IPOIB=m
32244 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/ps3_defconfig powerpc.git/arch/powerpc/configs/ps3_defconfig
32245 --- linux-2.6.24/arch/powerpc/configs/ps3_defconfig 2008-01-24 23:58:37.000000000 +0100
32246 +++ powerpc.git/arch/powerpc/configs/ps3_defconfig 2008-01-28 20:25:49.000000000 +0100
32249 # Automatically generated make config: don't edit
32250 -# Linux kernel version: 2.6.24-rc4
32251 -# Tue Dec 4 22:49:57 2007
32252 +# Linux kernel version: 2.6.24-rc8
32253 +# Wed Jan 16 14:31:21 2008
32257 @@ -103,6 +103,7 @@
32259 # CONFIG_SLUB is not set
32260 # CONFIG_SLOB is not set
32262 CONFIG_RT_MUTEXES=y
32263 # CONFIG_TINY_SHMEM is not set
32264 CONFIG_BASE_SMALL=0
32265 @@ -154,7 +155,6 @@
32266 # CONFIG_PS3_ADVANCED is not set
32267 CONFIG_PS3_HTAB_SIZE=20
32268 # CONFIG_PS3_DYNAMIC_DMA is not set
32269 -CONFIG_PS3_USE_LPAR_ADDR=y
32272 CONFIG_PS3_SYS_MANAGER=y
32273 @@ -162,6 +162,7 @@
32279 # CONFIG_PPC_CELL_NATIVE is not set
32280 # CONFIG_PPC_IBM_CELL_BLADE is not set
32281 @@ -225,7 +226,7 @@
32282 # CONFIG_SPARSEMEM_STATIC is not set
32283 CONFIG_SPARSEMEM_EXTREME=y
32284 CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
32285 -CONFIG_SPARSEMEM_VMEMMAP=y
32286 +# CONFIG_SPARSEMEM_VMEMMAP is not set
32287 CONFIG_MEMORY_HOTPLUG=y
32288 CONFIG_MEMORY_HOTPLUG_SPARSE=y
32289 CONFIG_SPLIT_PTLOCK_CPUS=4
32290 @@ -338,7 +339,26 @@
32291 # CONFIG_NET_PKTGEN is not set
32292 # CONFIG_HAMRADIO is not set
32293 # CONFIG_IRDA is not set
32294 -# CONFIG_BT is not set
32298 +CONFIG_BT_RFCOMM=m
32299 +CONFIG_BT_RFCOMM_TTY=y
32301 +CONFIG_BT_BNEP_MC_FILTER=y
32302 +CONFIG_BT_BNEP_PROTO_FILTER=y
32306 +# Bluetooth device drivers
32308 +CONFIG_BT_HCIUSB=m
32309 +CONFIG_BT_HCIUSB_SCO=y
32310 +# CONFIG_BT_HCIUART is not set
32311 +# CONFIG_BT_HCIBCM203X is not set
32312 +# CONFIG_BT_HCIBPA10X is not set
32313 +# CONFIG_BT_HCIBFUSB is not set
32314 +# CONFIG_BT_HCIVHCI is not set
32315 # CONFIG_AF_RXRPC is not set
32318 @@ -666,14 +686,14 @@
32326 # Advanced Linux Sound Architecture
32329 -CONFIG_SND_TIMER=y
32332 +CONFIG_SND_TIMER=m
32334 # CONFIG_SND_SEQUENCER is not set
32335 # CONFIG_SND_MIXER_OSS is not set
32336 # CONFIG_SND_PCM_OSS is not set
32337 @@ -702,7 +722,7 @@
32339 # ALSA PowerPC devices
32343 CONFIG_SND_PS3_DEFAULT_START_DELAY=2000
32346 @@ -747,7 +767,7 @@
32347 CONFIG_USB_ARCH_HAS_HCD=y
32348 CONFIG_USB_ARCH_HAS_OHCI=y
32349 CONFIG_USB_ARCH_HAS_EHCI=y
32352 # CONFIG_USB_DEBUG is not set
32355 @@ -761,13 +781,13 @@
32357 # USB Host Controller Drivers
32359 -CONFIG_USB_EHCI_HCD=y
32360 +CONFIG_USB_EHCI_HCD=m
32361 # CONFIG_USB_EHCI_SPLIT_ISO is not set
32362 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
32363 # CONFIG_USB_EHCI_TT_NEWSCHED is not set
32364 CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
32365 # CONFIG_USB_ISP116X_HCD is not set
32366 -CONFIG_USB_OHCI_HCD=y
32367 +CONFIG_USB_OHCI_HCD=m
32368 # CONFIG_USB_OHCI_HCD_PPC_OF is not set
32369 # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
32370 CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
32371 @@ -1033,7 +1053,8 @@
32372 CONFIG_HAS_IOPORT=y
32374 CONFIG_INSTRUMENTATION=y
32375 -# CONFIG_PROFILING is not set
32376 +CONFIG_PROFILING=y
32378 # CONFIG_KPROBES is not set
32379 # CONFIG_MARKERS is not set
32381 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/rainier_defconfig powerpc.git/arch/powerpc/configs/rainier_defconfig
32382 --- linux-2.6.24/arch/powerpc/configs/rainier_defconfig 1970-01-01 01:00:00.000000000 +0100
32383 +++ powerpc.git/arch/powerpc/configs/rainier_defconfig 2008-01-28 20:25:49.000000000 +0100
32386 +# Automatically generated make config: don't edit
32387 +# Linux kernel version: 2.6.24-rc6
32388 +# Mon Dec 24 11:22:40 2007
32390 +# CONFIG_PPC64 is not set
32393 +# Processor support
32395 +# CONFIG_6xx is not set
32396 +# CONFIG_PPC_85xx is not set
32397 +# CONFIG_PPC_8xx is not set
32398 +# CONFIG_40x is not set
32400 +# CONFIG_E200 is not set
32403 +CONFIG_PTE_64BIT=y
32404 +CONFIG_PHYS_64BIT=y
32405 +# CONFIG_PPC_MM_SLICES is not set
32406 +CONFIG_NOT_COHERENT_CACHE=y
32408 +CONFIG_WORD_SIZE=32
32409 +CONFIG_PPC_MERGE=y
32411 +CONFIG_GENERIC_CMOS_UPDATE=y
32412 +CONFIG_GENERIC_TIME=y
32413 +CONFIG_GENERIC_TIME_VSYSCALL=y
32414 +CONFIG_GENERIC_CLOCKEVENTS=y
32415 +CONFIG_GENERIC_HARDIRQS=y
32416 +CONFIG_IRQ_PER_CPU=y
32417 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32418 +CONFIG_ARCH_HAS_ILOG2_U32=y
32419 +CONFIG_GENERIC_HWEIGHT=y
32420 +CONFIG_GENERIC_CALIBRATE_DELAY=y
32421 +CONFIG_GENERIC_FIND_NEXT_BIT=y
32422 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
32424 +CONFIG_EARLY_PRINTK=y
32425 +CONFIG_GENERIC_NVRAM=y
32426 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
32427 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
32430 +CONFIG_PPC_UDBG_16550=y
32431 +# CONFIG_GENERIC_TBSYNC is not set
32432 +CONFIG_AUDIT_ARCH=y
32433 +CONFIG_GENERIC_BUG=y
32434 +# CONFIG_DEFAULT_UIMAGE is not set
32435 +CONFIG_PPC_DCR_NATIVE=y
32436 +# CONFIG_PPC_DCR_MMIO is not set
32438 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
32443 +CONFIG_EXPERIMENTAL=y
32444 +CONFIG_BROKEN_ON_SMP=y
32445 +CONFIG_INIT_ENV_ARG_LIMIT=32
32446 +CONFIG_LOCALVERSION=""
32447 +CONFIG_LOCALVERSION_AUTO=y
32450 +CONFIG_SYSVIPC_SYSCTL=y
32451 +CONFIG_POSIX_MQUEUE=y
32452 +# CONFIG_BSD_PROCESS_ACCT is not set
32453 +# CONFIG_TASKSTATS is not set
32454 +# CONFIG_USER_NS is not set
32455 +# CONFIG_PID_NS is not set
32456 +# CONFIG_AUDIT is not set
32457 +# CONFIG_IKCONFIG is not set
32458 +CONFIG_LOG_BUF_SHIFT=14
32459 +# CONFIG_CGROUPS is not set
32460 +CONFIG_FAIR_GROUP_SCHED=y
32461 +CONFIG_FAIR_USER_SCHED=y
32462 +# CONFIG_FAIR_CGROUP_SCHED is not set
32463 +CONFIG_SYSFS_DEPRECATED=y
32464 +# CONFIG_RELAY is not set
32465 +CONFIG_BLK_DEV_INITRD=y
32466 +CONFIG_INITRAMFS_SOURCE=""
32467 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
32470 +CONFIG_SYSCTL_SYSCALL=y
32472 +# CONFIG_KALLSYMS_ALL is not set
32473 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
32478 +CONFIG_BASE_FULL=y
32480 +CONFIG_ANON_INODES=y
32485 +CONFIG_VM_EVENT_COUNTERS=y
32486 +CONFIG_SLUB_DEBUG=y
32487 +# CONFIG_SLAB is not set
32489 +# CONFIG_SLOB is not set
32490 +CONFIG_RT_MUTEXES=y
32491 +# CONFIG_TINY_SHMEM is not set
32492 +CONFIG_BASE_SMALL=0
32494 +CONFIG_MODULE_UNLOAD=y
32495 +# CONFIG_MODULE_FORCE_UNLOAD is not set
32496 +# CONFIG_MODVERSIONS is not set
32497 +# CONFIG_MODULE_SRCVERSION_ALL is not set
32501 +# CONFIG_BLK_DEV_IO_TRACE is not set
32502 +# CONFIG_LSF is not set
32503 +# CONFIG_BLK_DEV_BSG is not set
32508 +CONFIG_IOSCHED_NOOP=y
32509 +CONFIG_IOSCHED_AS=y
32510 +CONFIG_IOSCHED_DEADLINE=y
32511 +CONFIG_IOSCHED_CFQ=y
32512 +CONFIG_DEFAULT_AS=y
32513 +# CONFIG_DEFAULT_DEADLINE is not set
32514 +# CONFIG_DEFAULT_CFQ is not set
32515 +# CONFIG_DEFAULT_NOOP is not set
32516 +CONFIG_DEFAULT_IOSCHED="anticipatory"
32517 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
32520 +# Platform support
32522 +# CONFIG_PPC_MPC52xx is not set
32523 +# CONFIG_PPC_MPC5200 is not set
32524 +# CONFIG_PPC_CELL is not set
32525 +# CONFIG_PPC_CELL_NATIVE is not set
32526 +# CONFIG_PQ2ADS is not set
32527 +# CONFIG_BAMBOO is not set
32528 +# CONFIG_EBONY is not set
32529 +# CONFIG_SEQUOIA is not set
32530 +# CONFIG_TAISHAN is not set
32531 +# CONFIG_KATMAI is not set
32534 +# CONFIG_MPIC is not set
32535 +# CONFIG_MPIC_WEIRD is not set
32536 +# CONFIG_PPC_I8259 is not set
32537 +# CONFIG_PPC_RTAS is not set
32538 +# CONFIG_MMIO_NVRAM is not set
32539 +# CONFIG_PPC_MPC106 is not set
32540 +# CONFIG_PPC_970_NAP is not set
32541 +# CONFIG_PPC_INDIRECT_IO is not set
32542 +# CONFIG_GENERIC_IOMAP is not set
32543 +# CONFIG_CPU_FREQ is not set
32544 +# CONFIG_CPM2 is not set
32545 +# CONFIG_FSL_ULI1575 is not set
32550 +# CONFIG_HIGHMEM is not set
32551 +# CONFIG_TICK_ONESHOT is not set
32552 +# CONFIG_NO_HZ is not set
32553 +# CONFIG_HIGH_RES_TIMERS is not set
32554 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
32555 +# CONFIG_HZ_100 is not set
32557 +# CONFIG_HZ_300 is not set
32558 +# CONFIG_HZ_1000 is not set
32560 +CONFIG_PREEMPT_NONE=y
32561 +# CONFIG_PREEMPT_VOLUNTARY is not set
32562 +# CONFIG_PREEMPT is not set
32563 +CONFIG_BINFMT_ELF=y
32564 +# CONFIG_BINFMT_MISC is not set
32565 +CONFIG_MATH_EMULATION=y
32566 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
32567 +CONFIG_ARCH_FLATMEM_ENABLE=y
32568 +CONFIG_ARCH_POPULATES_NODE_MAP=y
32569 +CONFIG_SELECT_MEMORY_MODEL=y
32570 +CONFIG_FLATMEM_MANUAL=y
32571 +# CONFIG_DISCONTIGMEM_MANUAL is not set
32572 +# CONFIG_SPARSEMEM_MANUAL is not set
32574 +CONFIG_FLAT_NODE_MEM_MAP=y
32575 +# CONFIG_SPARSEMEM_STATIC is not set
32576 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
32577 +CONFIG_SPLIT_PTLOCK_CPUS=4
32578 +CONFIG_RESOURCES_64BIT=y
32579 +CONFIG_ZONE_DMA_FLAG=1
32581 +CONFIG_VIRT_TO_BUS=y
32582 +CONFIG_PROC_DEVICETREE=y
32583 +CONFIG_CMDLINE_BOOL=y
32586 +CONFIG_WANT_DEVICE_TREE=y
32587 +CONFIG_DEVICE_TREE="rainier.dts"
32588 +CONFIG_ISA_DMA_API=y
32594 +CONFIG_PPC_INDIRECT_PCI=y
32596 +CONFIG_PCI_DOMAINS=y
32597 +CONFIG_PCI_SYSCALL=y
32598 +# CONFIG_PCIEPORTBUS is not set
32599 +CONFIG_ARCH_SUPPORTS_MSI=y
32600 +# CONFIG_PCI_MSI is not set
32601 +CONFIG_PCI_LEGACY=y
32602 +# CONFIG_PCI_DEBUG is not set
32603 +# CONFIG_PCCARD is not set
32604 +# CONFIG_HOTPLUG_PCI is not set
32609 +# CONFIG_ADVANCED_OPTIONS is not set
32612 +# Default settings for advanced configuration options are used
32614 +CONFIG_HIGHMEM_START=0xfe000000
32615 +CONFIG_LOWMEM_SIZE=0x30000000
32616 +CONFIG_KERNEL_START=0xc0000000
32617 +CONFIG_TASK_SIZE=0xc0000000
32618 +CONFIG_CONSISTENT_START=0xff100000
32619 +CONFIG_CONSISTENT_SIZE=0x00200000
32620 +CONFIG_BOOT_LOAD=0x01000000
32628 +# Networking options
32631 +# CONFIG_PACKET_MMAP is not set
32633 +# CONFIG_NET_KEY is not set
32635 +# CONFIG_IP_MULTICAST is not set
32636 +# CONFIG_IP_ADVANCED_ROUTER is not set
32637 +CONFIG_IP_FIB_HASH=y
32639 +CONFIG_IP_PNP_DHCP=y
32640 +CONFIG_IP_PNP_BOOTP=y
32641 +# CONFIG_IP_PNP_RARP is not set
32642 +# CONFIG_NET_IPIP is not set
32643 +# CONFIG_NET_IPGRE is not set
32644 +# CONFIG_ARPD is not set
32645 +# CONFIG_SYN_COOKIES is not set
32646 +# CONFIG_INET_AH is not set
32647 +# CONFIG_INET_ESP is not set
32648 +# CONFIG_INET_IPCOMP is not set
32649 +# CONFIG_INET_XFRM_TUNNEL is not set
32650 +# CONFIG_INET_TUNNEL is not set
32651 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
32652 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
32653 +# CONFIG_INET_XFRM_MODE_BEET is not set
32654 +# CONFIG_INET_LRO is not set
32655 +CONFIG_INET_DIAG=y
32656 +CONFIG_INET_TCP_DIAG=y
32657 +# CONFIG_TCP_CONG_ADVANCED is not set
32658 +CONFIG_TCP_CONG_CUBIC=y
32659 +CONFIG_DEFAULT_TCP_CONG="cubic"
32660 +# CONFIG_TCP_MD5SIG is not set
32661 +# CONFIG_IPV6 is not set
32662 +# CONFIG_INET6_XFRM_TUNNEL is not set
32663 +# CONFIG_INET6_TUNNEL is not set
32664 +# CONFIG_NETWORK_SECMARK is not set
32665 +# CONFIG_NETFILTER is not set
32666 +# CONFIG_IP_DCCP is not set
32667 +# CONFIG_IP_SCTP is not set
32668 +# CONFIG_TIPC is not set
32669 +# CONFIG_ATM is not set
32670 +# CONFIG_BRIDGE is not set
32671 +# CONFIG_VLAN_8021Q is not set
32672 +# CONFIG_DECNET is not set
32673 +# CONFIG_LLC2 is not set
32674 +# CONFIG_IPX is not set
32675 +# CONFIG_ATALK is not set
32676 +# CONFIG_X25 is not set
32677 +# CONFIG_LAPB is not set
32678 +# CONFIG_ECONET is not set
32679 +# CONFIG_WAN_ROUTER is not set
32680 +# CONFIG_NET_SCHED is not set
32685 +# CONFIG_NET_PKTGEN is not set
32686 +# CONFIG_HAMRADIO is not set
32687 +# CONFIG_IRDA is not set
32688 +# CONFIG_BT is not set
32689 +# CONFIG_AF_RXRPC is not set
32694 +# CONFIG_CFG80211 is not set
32695 +# CONFIG_WIRELESS_EXT is not set
32696 +# CONFIG_MAC80211 is not set
32697 +# CONFIG_IEEE80211 is not set
32698 +# CONFIG_RFKILL is not set
32699 +# CONFIG_NET_9P is not set
32706 +# Generic Driver Options
32708 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
32709 +CONFIG_STANDALONE=y
32710 +CONFIG_PREVENT_FIRMWARE_BUILD=y
32711 +CONFIG_FW_LOADER=y
32712 +# CONFIG_DEBUG_DRIVER is not set
32713 +# CONFIG_DEBUG_DEVRES is not set
32714 +# CONFIG_SYS_HYPERVISOR is not set
32715 +CONFIG_CONNECTOR=y
32716 +CONFIG_PROC_EVENTS=y
32718 +# CONFIG_MTD_DEBUG is not set
32719 +# CONFIG_MTD_CONCAT is not set
32720 +CONFIG_MTD_PARTITIONS=y
32721 +# CONFIG_MTD_REDBOOT_PARTS is not set
32722 +CONFIG_MTD_CMDLINE_PARTS=y
32725 +# User Modules And Translation Layers
32728 +# CONFIG_MTD_BLKDEVS is not set
32729 +# CONFIG_MTD_BLOCK is not set
32730 +# CONFIG_MTD_BLOCK_RO is not set
32731 +# CONFIG_FTL is not set
32732 +# CONFIG_NFTL is not set
32733 +# CONFIG_INFTL is not set
32734 +# CONFIG_RFD_FTL is not set
32735 +# CONFIG_SSFDC is not set
32736 +# CONFIG_MTD_OOPS is not set
32739 +# RAM/ROM/Flash chip drivers
32742 +CONFIG_MTD_JEDECPROBE=y
32743 +CONFIG_MTD_GEN_PROBE=y
32744 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
32745 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
32746 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
32747 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
32748 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
32749 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
32750 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
32751 +CONFIG_MTD_CFI_I1=y
32752 +CONFIG_MTD_CFI_I2=y
32753 +# CONFIG_MTD_CFI_I4 is not set
32754 +# CONFIG_MTD_CFI_I8 is not set
32755 +CONFIG_MTD_CFI_INTELEXT=y
32756 +CONFIG_MTD_CFI_AMDSTD=y
32757 +# CONFIG_MTD_CFI_STAA is not set
32758 +CONFIG_MTD_CFI_UTIL=y
32759 +# CONFIG_MTD_RAM is not set
32760 +# CONFIG_MTD_ROM is not set
32761 +# CONFIG_MTD_ABSENT is not set
32764 +# Mapping drivers for chip access
32766 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
32767 +# CONFIG_MTD_PHYSMAP is not set
32768 +CONFIG_MTD_PHYSMAP_OF=y
32769 +# CONFIG_MTD_INTEL_VR_NOR is not set
32770 +# CONFIG_MTD_PLATRAM is not set
32773 +# Self-contained MTD device drivers
32775 +# CONFIG_MTD_PMC551 is not set
32776 +# CONFIG_MTD_SLRAM is not set
32777 +# CONFIG_MTD_PHRAM is not set
32778 +# CONFIG_MTD_MTDRAM is not set
32779 +# CONFIG_MTD_BLOCK2MTD is not set
32782 +# Disk-On-Chip Device Drivers
32784 +# CONFIG_MTD_DOC2000 is not set
32785 +# CONFIG_MTD_DOC2001 is not set
32786 +# CONFIG_MTD_DOC2001PLUS is not set
32787 +# CONFIG_MTD_NAND is not set
32788 +# CONFIG_MTD_ONENAND is not set
32791 +# UBI - Unsorted block images
32793 +# CONFIG_MTD_UBI is not set
32794 +CONFIG_OF_DEVICE=y
32795 +# CONFIG_PARPORT is not set
32797 +# CONFIG_BLK_DEV_FD is not set
32798 +# CONFIG_BLK_CPQ_DA is not set
32799 +# CONFIG_BLK_CPQ_CISS_DA is not set
32800 +# CONFIG_BLK_DEV_DAC960 is not set
32801 +# CONFIG_BLK_DEV_UMEM is not set
32802 +# CONFIG_BLK_DEV_COW_COMMON is not set
32803 +# CONFIG_BLK_DEV_LOOP is not set
32804 +# CONFIG_BLK_DEV_NBD is not set
32805 +# CONFIG_BLK_DEV_SX8 is not set
32806 +CONFIG_BLK_DEV_RAM=y
32807 +CONFIG_BLK_DEV_RAM_COUNT=16
32808 +CONFIG_BLK_DEV_RAM_SIZE=35000
32809 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
32810 +# CONFIG_CDROM_PKTCDVD is not set
32811 +# CONFIG_ATA_OVER_ETH is not set
32812 +# CONFIG_XILINX_SYSACE is not set
32813 +CONFIG_MISC_DEVICES=y
32814 +# CONFIG_PHANTOM is not set
32815 +# CONFIG_EEPROM_93CX6 is not set
32816 +# CONFIG_SGI_IOC4 is not set
32817 +# CONFIG_TIFM_CORE is not set
32818 +# CONFIG_IDE is not set
32821 +# SCSI device support
32823 +# CONFIG_RAID_ATTRS is not set
32824 +# CONFIG_SCSI is not set
32825 +# CONFIG_SCSI_DMA is not set
32826 +# CONFIG_SCSI_NETLINK is not set
32827 +# CONFIG_ATA is not set
32828 +# CONFIG_MD is not set
32829 +# CONFIG_FUSION is not set
32832 +# IEEE 1394 (FireWire) support
32834 +# CONFIG_FIREWIRE is not set
32835 +# CONFIG_IEEE1394 is not set
32836 +# CONFIG_I2O is not set
32837 +CONFIG_MACINTOSH_DRIVERS=y
32838 +# CONFIG_MAC_EMUMOUSEBTN is not set
32839 +# CONFIG_WINDFARM is not set
32840 +CONFIG_NETDEVICES=y
32841 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
32842 +# CONFIG_DUMMY is not set
32843 +# CONFIG_BONDING is not set
32844 +# CONFIG_MACVLAN is not set
32845 +# CONFIG_EQUALIZER is not set
32846 +# CONFIG_TUN is not set
32847 +# CONFIG_VETH is not set
32848 +# CONFIG_IP1000 is not set
32849 +# CONFIG_ARCNET is not set
32850 +# CONFIG_NET_ETHERNET is not set
32851 +CONFIG_IBM_NEW_EMAC_ZMII=y
32852 +CONFIG_IBM_NEW_EMAC_RGMII=y
32853 +CONFIG_IBM_NEW_EMAC_EMAC4=y
32854 +CONFIG_NETDEV_1000=y
32855 +# CONFIG_ACENIC is not set
32856 +# CONFIG_DL2K is not set
32857 +# CONFIG_E1000 is not set
32858 +# CONFIG_E1000E is not set
32859 +# CONFIG_NS83820 is not set
32860 +# CONFIG_HAMACHI is not set
32861 +# CONFIG_YELLOWFIN is not set
32862 +# CONFIG_R8169 is not set
32863 +# CONFIG_SIS190 is not set
32864 +# CONFIG_SKGE is not set
32865 +# CONFIG_SKY2 is not set
32866 +# CONFIG_SK98LIN is not set
32867 +# CONFIG_VIA_VELOCITY is not set
32868 +# CONFIG_TIGON3 is not set
32869 +# CONFIG_BNX2 is not set
32870 +# CONFIG_QLA3XXX is not set
32871 +# CONFIG_ATL1 is not set
32872 +CONFIG_NETDEV_10000=y
32873 +# CONFIG_CHELSIO_T1 is not set
32874 +# CONFIG_CHELSIO_T3 is not set
32875 +# CONFIG_IXGBE is not set
32876 +# CONFIG_IXGB is not set
32877 +# CONFIG_S2IO is not set
32878 +# CONFIG_MYRI10GE is not set
32879 +# CONFIG_NETXEN_NIC is not set
32880 +# CONFIG_NIU is not set
32881 +# CONFIG_MLX4_CORE is not set
32882 +# CONFIG_TEHUTI is not set
32883 +# CONFIG_TR is not set
32888 +# CONFIG_WLAN_PRE80211 is not set
32889 +# CONFIG_WLAN_80211 is not set
32890 +# CONFIG_WAN is not set
32891 +# CONFIG_FDDI is not set
32892 +# CONFIG_HIPPI is not set
32893 +# CONFIG_PPP is not set
32894 +# CONFIG_SLIP is not set
32895 +# CONFIG_SHAPER is not set
32896 +# CONFIG_NETCONSOLE is not set
32897 +# CONFIG_NETPOLL is not set
32898 +# CONFIG_NET_POLL_CONTROLLER is not set
32899 +# CONFIG_ISDN is not set
32900 +# CONFIG_PHONE is not set
32903 +# Input device support
32905 +# CONFIG_INPUT is not set
32908 +# Hardware I/O ports
32910 +# CONFIG_SERIO is not set
32911 +# CONFIG_GAMEPORT is not set
32914 +# Character devices
32916 +# CONFIG_VT is not set
32917 +# CONFIG_SERIAL_NONSTANDARD is not set
32922 +CONFIG_SERIAL_8250=y
32923 +CONFIG_SERIAL_8250_CONSOLE=y
32924 +# CONFIG_SERIAL_8250_PCI is not set
32925 +CONFIG_SERIAL_8250_NR_UARTS=4
32926 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
32927 +CONFIG_SERIAL_8250_EXTENDED=y
32928 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
32929 +CONFIG_SERIAL_8250_SHARE_IRQ=y
32930 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
32931 +# CONFIG_SERIAL_8250_RSA is not set
32934 +# Non-8250 serial port support
32936 +# CONFIG_SERIAL_UARTLITE is not set
32937 +CONFIG_SERIAL_CORE=y
32938 +CONFIG_SERIAL_CORE_CONSOLE=y
32939 +# CONFIG_SERIAL_JSM is not set
32940 +CONFIG_SERIAL_OF_PLATFORM=y
32941 +CONFIG_UNIX98_PTYS=y
32942 +CONFIG_LEGACY_PTYS=y
32943 +CONFIG_LEGACY_PTY_COUNT=256
32944 +# CONFIG_IPMI_HANDLER is not set
32945 +# CONFIG_HW_RANDOM is not set
32946 +# CONFIG_NVRAM is not set
32947 +# CONFIG_GEN_RTC is not set
32948 +# CONFIG_R3964 is not set
32949 +# CONFIG_APPLICOM is not set
32950 +# CONFIG_RAW_DRIVER is not set
32951 +# CONFIG_TCG_TPM is not set
32953 +# CONFIG_I2C is not set
32958 +# CONFIG_SPI is not set
32959 +# CONFIG_SPI_MASTER is not set
32960 +# CONFIG_W1 is not set
32961 +# CONFIG_POWER_SUPPLY is not set
32962 +# CONFIG_HWMON is not set
32963 +# CONFIG_WATCHDOG is not set
32966 +# Sonics Silicon Backplane
32968 +CONFIG_SSB_POSSIBLE=y
32969 +# CONFIG_SSB is not set
32972 +# Multifunction device drivers
32974 +# CONFIG_MFD_SM501 is not set
32977 +# Multimedia devices
32979 +# CONFIG_VIDEO_DEV is not set
32980 +# CONFIG_DVB_CORE is not set
32984 +# Graphics support
32986 +# CONFIG_AGP is not set
32987 +# CONFIG_DRM is not set
32988 +# CONFIG_VGASTATE is not set
32989 +CONFIG_VIDEO_OUTPUT_CONTROL=m
32990 +# CONFIG_FB is not set
32991 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
32994 +# Display device support
32996 +# CONFIG_DISPLAY_SUPPORT is not set
33001 +# CONFIG_SOUND is not set
33002 +CONFIG_USB_SUPPORT=y
33003 +CONFIG_USB_ARCH_HAS_HCD=y
33004 +CONFIG_USB_ARCH_HAS_OHCI=y
33005 +CONFIG_USB_ARCH_HAS_EHCI=y
33006 +# CONFIG_USB is not set
33009 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
33013 +# USB Gadget Support
33015 +# CONFIG_USB_GADGET is not set
33016 +# CONFIG_MMC is not set
33017 +# CONFIG_NEW_LEDS is not set
33018 +# CONFIG_INFINIBAND is not set
33019 +# CONFIG_EDAC is not set
33020 +# CONFIG_RTC_CLASS is not set
33025 +# CONFIG_UIO is not set
33031 +# CONFIG_EXT2_FS_XATTR is not set
33032 +# CONFIG_EXT2_FS_XIP is not set
33033 +# CONFIG_EXT3_FS is not set
33034 +# CONFIG_EXT4DEV_FS is not set
33035 +# CONFIG_REISERFS_FS is not set
33036 +# CONFIG_JFS_FS is not set
33037 +# CONFIG_FS_POSIX_ACL is not set
33038 +# CONFIG_XFS_FS is not set
33039 +# CONFIG_GFS2_FS is not set
33040 +# CONFIG_OCFS2_FS is not set
33041 +# CONFIG_MINIX_FS is not set
33042 +# CONFIG_ROMFS_FS is not set
33044 +CONFIG_INOTIFY_USER=y
33045 +# CONFIG_QUOTA is not set
33047 +# CONFIG_AUTOFS_FS is not set
33048 +# CONFIG_AUTOFS4_FS is not set
33049 +# CONFIG_FUSE_FS is not set
33052 +# CD-ROM/DVD Filesystems
33054 +# CONFIG_ISO9660_FS is not set
33055 +# CONFIG_UDF_FS is not set
33058 +# DOS/FAT/NT Filesystems
33060 +# CONFIG_MSDOS_FS is not set
33061 +# CONFIG_VFAT_FS is not set
33062 +# CONFIG_NTFS_FS is not set
33065 +# Pseudo filesystems
33068 +CONFIG_PROC_KCORE=y
33069 +CONFIG_PROC_SYSCTL=y
33072 +# CONFIG_TMPFS_POSIX_ACL is not set
33073 +# CONFIG_HUGETLB_PAGE is not set
33074 +# CONFIG_CONFIGFS_FS is not set
33077 +# Miscellaneous filesystems
33079 +# CONFIG_ADFS_FS is not set
33080 +# CONFIG_AFFS_FS is not set
33081 +# CONFIG_HFS_FS is not set
33082 +# CONFIG_HFSPLUS_FS is not set
33083 +# CONFIG_BEFS_FS is not set
33084 +# CONFIG_BFS_FS is not set
33085 +# CONFIG_EFS_FS is not set
33087 +CONFIG_JFFS2_FS_DEBUG=0
33088 +CONFIG_JFFS2_FS_WRITEBUFFER=y
33089 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
33090 +# CONFIG_JFFS2_SUMMARY is not set
33091 +# CONFIG_JFFS2_FS_XATTR is not set
33092 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
33093 +CONFIG_JFFS2_ZLIB=y
33094 +# CONFIG_JFFS2_LZO is not set
33095 +CONFIG_JFFS2_RTIME=y
33096 +# CONFIG_JFFS2_RUBIN is not set
33098 +# CONFIG_VXFS_FS is not set
33099 +# CONFIG_HPFS_FS is not set
33100 +# CONFIG_QNX4FS_FS is not set
33101 +# CONFIG_SYSV_FS is not set
33102 +# CONFIG_UFS_FS is not set
33103 +CONFIG_NETWORK_FILESYSTEMS=y
33106 +# CONFIG_NFS_V3_ACL is not set
33107 +# CONFIG_NFS_V4 is not set
33108 +# CONFIG_NFS_DIRECTIO is not set
33109 +# CONFIG_NFSD is not set
33113 +CONFIG_NFS_COMMON=y
33115 +# CONFIG_SUNRPC_BIND34 is not set
33116 +# CONFIG_RPCSEC_GSS_KRB5 is not set
33117 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
33118 +# CONFIG_SMB_FS is not set
33119 +# CONFIG_CIFS is not set
33120 +# CONFIG_NCP_FS is not set
33121 +# CONFIG_CODA_FS is not set
33122 +# CONFIG_AFS_FS is not set
33127 +# CONFIG_PARTITION_ADVANCED is not set
33128 +CONFIG_MSDOS_PARTITION=y
33129 +# CONFIG_NLS is not set
33130 +# CONFIG_DLM is not set
33131 +# CONFIG_UCC_SLOW is not set
33134 +# Library routines
33136 +CONFIG_BITREVERSE=y
33137 +# CONFIG_CRC_CCITT is not set
33138 +# CONFIG_CRC16 is not set
33139 +# CONFIG_CRC_ITU_T is not set
33141 +# CONFIG_CRC7 is not set
33142 +# CONFIG_LIBCRC32C is not set
33143 +CONFIG_ZLIB_INFLATE=y
33144 +CONFIG_ZLIB_DEFLATE=y
33146 +CONFIG_HAS_IOMEM=y
33147 +CONFIG_HAS_IOPORT=y
33149 +CONFIG_INSTRUMENTATION=y
33150 +# CONFIG_PROFILING is not set
33151 +# CONFIG_KPROBES is not set
33152 +# CONFIG_MARKERS is not set
33157 +# CONFIG_PRINTK_TIME is not set
33158 +CONFIG_ENABLE_WARN_DEPRECATED=y
33159 +CONFIG_ENABLE_MUST_CHECK=y
33160 +CONFIG_MAGIC_SYSRQ=y
33161 +# CONFIG_UNUSED_SYMBOLS is not set
33162 +# CONFIG_DEBUG_FS is not set
33163 +# CONFIG_HEADERS_CHECK is not set
33164 +CONFIG_DEBUG_KERNEL=y
33165 +# CONFIG_DEBUG_SHIRQ is not set
33166 +CONFIG_DETECT_SOFTLOCKUP=y
33167 +CONFIG_SCHED_DEBUG=y
33168 +# CONFIG_SCHEDSTATS is not set
33169 +# CONFIG_TIMER_STATS is not set
33170 +# CONFIG_SLUB_DEBUG_ON is not set
33171 +# CONFIG_DEBUG_RT_MUTEXES is not set
33172 +# CONFIG_RT_MUTEX_TESTER is not set
33173 +# CONFIG_DEBUG_SPINLOCK is not set
33174 +# CONFIG_DEBUG_MUTEXES is not set
33175 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
33176 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
33177 +# CONFIG_DEBUG_KOBJECT is not set
33178 +# CONFIG_DEBUG_BUGVERBOSE is not set
33179 +# CONFIG_DEBUG_INFO is not set
33180 +# CONFIG_DEBUG_VM is not set
33181 +# CONFIG_DEBUG_LIST is not set
33182 +# CONFIG_DEBUG_SG is not set
33183 +CONFIG_FORCED_INLINING=y
33184 +# CONFIG_BOOT_PRINTK_DELAY is not set
33185 +# CONFIG_RCU_TORTURE_TEST is not set
33186 +# CONFIG_FAULT_INJECTION is not set
33187 +# CONFIG_SAMPLES is not set
33188 +# CONFIG_DEBUG_STACKOVERFLOW is not set
33189 +# CONFIG_DEBUG_STACK_USAGE is not set
33190 +# CONFIG_DEBUG_PAGEALLOC is not set
33192 +# CONFIG_KGDB is not set
33193 +# CONFIG_XMON is not set
33194 +# CONFIG_BDI_SWITCH is not set
33195 +CONFIG_PPC_EARLY_DEBUG=y
33196 +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
33197 +# CONFIG_PPC_EARLY_DEBUG_G5 is not set
33198 +# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
33199 +# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
33200 +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
33201 +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
33202 +# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
33203 +# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
33204 +CONFIG_PPC_EARLY_DEBUG_44x=y
33205 +# CONFIG_PPC_EARLY_DEBUG_40x is not set
33206 +# CONFIG_PPC_EARLY_DEBUG_CPM is not set
33207 +CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
33208 +CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x1
33211 +# Security options
33213 +# CONFIG_KEYS is not set
33214 +# CONFIG_SECURITY is not set
33215 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
33217 +CONFIG_CRYPTO_ALGAPI=y
33218 +CONFIG_CRYPTO_BLKCIPHER=y
33219 +CONFIG_CRYPTO_MANAGER=y
33220 +# CONFIG_CRYPTO_HMAC is not set
33221 +# CONFIG_CRYPTO_XCBC is not set
33222 +# CONFIG_CRYPTO_NULL is not set
33223 +# CONFIG_CRYPTO_MD4 is not set
33224 +CONFIG_CRYPTO_MD5=y
33225 +# CONFIG_CRYPTO_SHA1 is not set
33226 +# CONFIG_CRYPTO_SHA256 is not set
33227 +# CONFIG_CRYPTO_SHA512 is not set
33228 +# CONFIG_CRYPTO_WP512 is not set
33229 +# CONFIG_CRYPTO_TGR192 is not set
33230 +# CONFIG_CRYPTO_GF128MUL is not set
33231 +CONFIG_CRYPTO_ECB=y
33232 +CONFIG_CRYPTO_CBC=y
33233 +CONFIG_CRYPTO_PCBC=y
33234 +# CONFIG_CRYPTO_LRW is not set
33235 +# CONFIG_CRYPTO_XTS is not set
33236 +# CONFIG_CRYPTO_CRYPTD is not set
33237 +CONFIG_CRYPTO_DES=y
33238 +# CONFIG_CRYPTO_FCRYPT is not set
33239 +# CONFIG_CRYPTO_BLOWFISH is not set
33240 +# CONFIG_CRYPTO_TWOFISH is not set
33241 +# CONFIG_CRYPTO_SERPENT is not set
33242 +# CONFIG_CRYPTO_AES is not set
33243 +# CONFIG_CRYPTO_CAST5 is not set
33244 +# CONFIG_CRYPTO_CAST6 is not set
33245 +# CONFIG_CRYPTO_TEA is not set
33246 +# CONFIG_CRYPTO_ARC4 is not set
33247 +# CONFIG_CRYPTO_KHAZAD is not set
33248 +# CONFIG_CRYPTO_ANUBIS is not set
33249 +# CONFIG_CRYPTO_SEED is not set
33250 +# CONFIG_CRYPTO_DEFLATE is not set
33251 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
33252 +# CONFIG_CRYPTO_CRC32C is not set
33253 +# CONFIG_CRYPTO_CAMELLIA is not set
33254 +# CONFIG_CRYPTO_TEST is not set
33255 +# CONFIG_CRYPTO_AUTHENC is not set
33256 +CONFIG_CRYPTO_HW=y
33257 +# CONFIG_PPC_CLOCK is not set
33258 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/sequoia_defconfig powerpc.git/arch/powerpc/configs/sequoia_defconfig
33259 --- linux-2.6.24/arch/powerpc/configs/sequoia_defconfig 2008-01-24 23:58:37.000000000 +0100
33260 +++ powerpc.git/arch/powerpc/configs/sequoia_defconfig 2008-01-28 20:25:49.000000000 +0100
33263 # Automatically generated make config: don't edit
33264 -# Linux kernel version: 2.6.24-rc4
33265 -# Thu Dec 6 16:49:17 2007
33266 +# Linux kernel version: 2.6.24-rc6
33267 +# Mon Dec 24 11:23:22 2007
33269 # CONFIG_PPC64 is not set
33271 @@ -129,6 +129,7 @@
33272 # CONFIG_DEFAULT_CFQ is not set
33273 # CONFIG_DEFAULT_NOOP is not set
33274 CONFIG_DEFAULT_IOSCHED="anticipatory"
33275 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
33279 @@ -141,8 +142,10 @@
33280 # CONFIG_BAMBOO is not set
33281 # CONFIG_EBONY is not set
33283 +# CONFIG_TAISHAN is not set
33284 +# CONFIG_KATMAI is not set
33285 +# CONFIG_RAINIER is not set
33288 # CONFIG_MPIC is not set
33289 # CONFIG_MPIC_WEIRD is not set
33290 # CONFIG_PPC_I8259 is not set
33291 @@ -446,9 +449,7 @@
33292 # CONFIG_FIREWIRE is not set
33293 # CONFIG_IEEE1394 is not set
33294 # CONFIG_I2O is not set
33295 -CONFIG_MACINTOSH_DRIVERS=y
33296 -# CONFIG_MAC_EMUMOUSEBTN is not set
33297 -# CONFIG_WINDFARM is not set
33298 +# CONFIG_MACINTOSH_DRIVERS is not set
33299 CONFIG_NETDEVICES=y
33300 # CONFIG_NETDEVICES_MULTIQUEUE is not set
33301 # CONFIG_DUMMY is not set
33302 @@ -459,10 +460,28 @@
33303 # CONFIG_VETH is not set
33304 # CONFIG_IP1000 is not set
33305 # CONFIG_ARCNET is not set
33306 -# CONFIG_NET_ETHERNET is not set
33307 +# CONFIG_PHYLIB is not set
33308 +CONFIG_NET_ETHERNET=y
33309 +# CONFIG_MII is not set
33310 +# CONFIG_HAPPYMEAL is not set
33311 +# CONFIG_SUNGEM is not set
33312 +# CONFIG_CASSINI is not set
33313 +# CONFIG_NET_VENDOR_3COM is not set
33314 +# CONFIG_NET_TULIP is not set
33315 +# CONFIG_HP100 is not set
33316 +CONFIG_IBM_NEW_EMAC=y
33317 +CONFIG_IBM_NEW_EMAC_RXB=128
33318 +CONFIG_IBM_NEW_EMAC_TXB=64
33319 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
33320 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
33321 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
33322 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
33323 CONFIG_IBM_NEW_EMAC_ZMII=y
33324 CONFIG_IBM_NEW_EMAC_RGMII=y
33325 +# CONFIG_IBM_NEW_EMAC_TAH is not set
33326 CONFIG_IBM_NEW_EMAC_EMAC4=y
33327 +# CONFIG_NET_PCI is not set
33328 +# CONFIG_B44 is not set
33329 CONFIG_NETDEV_1000=y
33330 # CONFIG_ACENIC is not set
33331 # CONFIG_DL2K is not set
33332 @@ -811,6 +830,7 @@
33333 # CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
33334 # CONFIG_PPC_EARLY_DEBUG_BEAT is not set
33335 CONFIG_PPC_EARLY_DEBUG_44x=y
33336 +# CONFIG_PPC_EARLY_DEBUG_40x is not set
33337 # CONFIG_PPC_EARLY_DEBUG_CPM is not set
33338 CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
33339 CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x1
33340 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/storcenter_defconfig powerpc.git/arch/powerpc/configs/storcenter_defconfig
33341 --- linux-2.6.24/arch/powerpc/configs/storcenter_defconfig 1970-01-01 01:00:00.000000000 +0100
33342 +++ powerpc.git/arch/powerpc/configs/storcenter_defconfig 2008-01-28 20:25:49.000000000 +0100
33345 +# Automatically generated make config: don't edit
33346 +# Linux kernel version: 2.6.24-rc6
33347 +# Tue Jan 8 09:33:54 2008
33349 +# CONFIG_PPC64 is not set
33352 +# Processor support
33355 +# CONFIG_PPC_85xx is not set
33356 +# CONFIG_PPC_8xx is not set
33357 +# CONFIG_40x is not set
33358 +# CONFIG_44x is not set
33359 +# CONFIG_E200 is not set
33361 +# CONFIG_ALTIVEC is not set
33362 +CONFIG_PPC_STD_MMU=y
33363 +CONFIG_PPC_STD_MMU_32=y
33364 +# CONFIG_PPC_MM_SLICES is not set
33365 +# CONFIG_SMP is not set
33367 +CONFIG_WORD_SIZE=32
33368 +CONFIG_PPC_MERGE=y
33370 +CONFIG_GENERIC_CMOS_UPDATE=y
33371 +CONFIG_GENERIC_TIME=y
33372 +CONFIG_GENERIC_TIME_VSYSCALL=y
33373 +CONFIG_GENERIC_CLOCKEVENTS=y
33374 +CONFIG_GENERIC_HARDIRQS=y
33375 +CONFIG_IRQ_PER_CPU=y
33376 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
33377 +CONFIG_ARCH_HAS_ILOG2_U32=y
33378 +CONFIG_GENERIC_HWEIGHT=y
33379 +CONFIG_GENERIC_CALIBRATE_DELAY=y
33380 +CONFIG_GENERIC_FIND_NEXT_BIT=y
33381 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
33383 +CONFIG_EARLY_PRINTK=y
33384 +CONFIG_GENERIC_NVRAM=y
33385 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
33386 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
33389 +CONFIG_PPC_UDBG_16550=y
33390 +# CONFIG_GENERIC_TBSYNC is not set
33391 +CONFIG_AUDIT_ARCH=y
33392 +CONFIG_GENERIC_BUG=y
33393 +# CONFIG_DEFAULT_UIMAGE is not set
33394 +# CONFIG_PPC_DCR_NATIVE is not set
33395 +# CONFIG_PPC_DCR_MMIO is not set
33396 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33401 +CONFIG_EXPERIMENTAL=y
33402 +CONFIG_BROKEN_ON_SMP=y
33403 +CONFIG_INIT_ENV_ARG_LIMIT=32
33404 +CONFIG_LOCALVERSION=""
33405 +CONFIG_LOCALVERSION_AUTO=y
33408 +CONFIG_SYSVIPC_SYSCTL=y
33409 +# CONFIG_POSIX_MQUEUE is not set
33410 +# CONFIG_BSD_PROCESS_ACCT is not set
33411 +# CONFIG_TASKSTATS is not set
33412 +# CONFIG_USER_NS is not set
33413 +# CONFIG_PID_NS is not set
33414 +# CONFIG_AUDIT is not set
33415 +# CONFIG_IKCONFIG is not set
33416 +CONFIG_LOG_BUF_SHIFT=14
33417 +# CONFIG_CGROUPS is not set
33418 +CONFIG_FAIR_GROUP_SCHED=y
33419 +CONFIG_FAIR_USER_SCHED=y
33420 +# CONFIG_FAIR_CGROUP_SCHED is not set
33421 +CONFIG_SYSFS_DEPRECATED=y
33422 +# CONFIG_RELAY is not set
33423 +# CONFIG_BLK_DEV_INITRD is not set
33424 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
33427 +CONFIG_SYSCTL_SYSCALL=y
33428 +# CONFIG_KALLSYMS is not set
33433 +CONFIG_BASE_FULL=y
33435 +CONFIG_ANON_INODES=y
33440 +CONFIG_VM_EVENT_COUNTERS=y
33441 +CONFIG_SLUB_DEBUG=y
33442 +# CONFIG_SLAB is not set
33444 +# CONFIG_SLOB is not set
33445 +CONFIG_RT_MUTEXES=y
33446 +# CONFIG_TINY_SHMEM is not set
33447 +CONFIG_BASE_SMALL=0
33449 +CONFIG_MODULE_UNLOAD=y
33450 +# CONFIG_MODULE_FORCE_UNLOAD is not set
33451 +# CONFIG_MODVERSIONS is not set
33452 +# CONFIG_MODULE_SRCVERSION_ALL is not set
33456 +# CONFIG_BLK_DEV_IO_TRACE is not set
33457 +# CONFIG_LSF is not set
33458 +# CONFIG_BLK_DEV_BSG is not set
33463 +CONFIG_IOSCHED_NOOP=y
33464 +CONFIG_IOSCHED_AS=y
33465 +CONFIG_IOSCHED_DEADLINE=y
33466 +CONFIG_IOSCHED_CFQ=y
33467 +# CONFIG_DEFAULT_AS is not set
33468 +# CONFIG_DEFAULT_DEADLINE is not set
33469 +CONFIG_DEFAULT_CFQ=y
33470 +# CONFIG_DEFAULT_NOOP is not set
33471 +CONFIG_DEFAULT_IOSCHED="cfq"
33474 +# Platform support
33476 +CONFIG_PPC_MULTIPLATFORM=y
33477 +# CONFIG_PPC_82xx is not set
33478 +# CONFIG_PPC_83xx is not set
33479 +# CONFIG_PPC_86xx is not set
33480 +CONFIG_CLASSIC32=y
33481 +# CONFIG_PPC_CHRP is not set
33482 +# CONFIG_PPC_MPC52xx is not set
33483 +# CONFIG_PPC_MPC5200 is not set
33484 +# CONFIG_PPC_EFIKA is not set
33485 +# CONFIG_PPC_LITE5200 is not set
33486 +# CONFIG_PPC_PMAC is not set
33487 +# CONFIG_PPC_CELL is not set
33488 +# CONFIG_PPC_CELL_NATIVE is not set
33489 +# CONFIG_PQ2ADS is not set
33490 +CONFIG_EMBEDDED6xx=y
33491 +# CONFIG_LINKSTATION is not set
33492 +CONFIG_STORCENTER=y
33493 +# CONFIG_MPC7448HPC2 is not set
33494 +# CONFIG_PPC_HOLLY is not set
33495 +# CONFIG_PPC_PRPMC2800 is not set
33496 +CONFIG_MPC10X_BRIDGE=y
33497 +CONFIG_MPC10X_OPENPIC=y
33498 +# CONFIG_MPC10X_STORE_GATHERING is not set
33500 +# CONFIG_MPIC_WEIRD is not set
33501 +# CONFIG_PPC_I8259 is not set
33502 +# CONFIG_PPC_RTAS is not set
33503 +# CONFIG_MMIO_NVRAM is not set
33504 +# CONFIG_PPC_MPC106 is not set
33505 +# CONFIG_PPC_970_NAP is not set
33506 +# CONFIG_PPC_INDIRECT_IO is not set
33507 +# CONFIG_GENERIC_IOMAP is not set
33508 +# CONFIG_CPU_FREQ is not set
33509 +# CONFIG_TAU is not set
33510 +# CONFIG_CPM2 is not set
33511 +# CONFIG_FSL_ULI1575 is not set
33516 +# CONFIG_HIGHMEM is not set
33517 +# CONFIG_TICK_ONESHOT is not set
33518 +# CONFIG_NO_HZ is not set
33519 +# CONFIG_HIGH_RES_TIMERS is not set
33520 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
33522 +# CONFIG_HZ_250 is not set
33523 +# CONFIG_HZ_300 is not set
33524 +# CONFIG_HZ_1000 is not set
33526 +CONFIG_PREEMPT_NONE=y
33527 +# CONFIG_PREEMPT_VOLUNTARY is not set
33528 +# CONFIG_PREEMPT is not set
33529 +CONFIG_BINFMT_ELF=y
33530 +CONFIG_BINFMT_MISC=y
33531 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
33532 +# CONFIG_KEXEC is not set
33533 +CONFIG_ARCH_FLATMEM_ENABLE=y
33534 +CONFIG_ARCH_POPULATES_NODE_MAP=y
33535 +CONFIG_SELECT_MEMORY_MODEL=y
33536 +CONFIG_FLATMEM_MANUAL=y
33537 +# CONFIG_DISCONTIGMEM_MANUAL is not set
33538 +# CONFIG_SPARSEMEM_MANUAL is not set
33540 +CONFIG_FLAT_NODE_MEM_MAP=y
33541 +# CONFIG_SPARSEMEM_STATIC is not set
33542 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
33543 +CONFIG_SPLIT_PTLOCK_CPUS=4
33544 +# CONFIG_RESOURCES_64BIT is not set
33545 +CONFIG_ZONE_DMA_FLAG=1
33547 +CONFIG_VIRT_TO_BUS=y
33548 +CONFIG_PROC_DEVICETREE=y
33549 +CONFIG_CMDLINE_BOOL=y
33550 +CONFIG_CMDLINE="console=ttyS0,115200"
33551 +# CONFIG_PM is not set
33552 +CONFIG_SUSPEND_UP_POSSIBLE=y
33553 +CONFIG_HIBERNATION_UP_POSSIBLE=y
33554 +# CONFIG_SECCOMP is not set
33555 +CONFIG_WANT_DEVICE_TREE=y
33556 +CONFIG_DEVICE_TREE="storcenter.dts"
33557 +CONFIG_ISA_DMA_API=y
33563 +CONFIG_GENERIC_ISA_DMA=y
33564 +CONFIG_PPC_INDIRECT_PCI=y
33567 +CONFIG_PCI_DOMAINS=y
33568 +CONFIG_PCI_SYSCALL=y
33569 +# CONFIG_PCIEPORTBUS is not set
33570 +CONFIG_ARCH_SUPPORTS_MSI=y
33571 +# CONFIG_PCI_MSI is not set
33572 +CONFIG_PCI_LEGACY=y
33573 +# CONFIG_PCCARD is not set
33574 +# CONFIG_HOTPLUG_PCI is not set
33579 +# CONFIG_ADVANCED_OPTIONS is not set
33582 +# Default settings for advanced configuration options are used
33584 +CONFIG_HIGHMEM_START=0xfe000000
33585 +CONFIG_LOWMEM_SIZE=0x30000000
33586 +CONFIG_KERNEL_START=0xc0000000
33587 +CONFIG_TASK_SIZE=0xc0000000
33588 +CONFIG_BOOT_LOAD=0x00800000
33596 +# Networking options
33599 +# CONFIG_PACKET_MMAP is not set
33601 +# CONFIG_NET_KEY is not set
33603 +CONFIG_IP_MULTICAST=y
33604 +# CONFIG_IP_ADVANCED_ROUTER is not set
33605 +CONFIG_IP_FIB_HASH=y
33607 +CONFIG_IP_PNP_DHCP=y
33608 +# CONFIG_IP_PNP_BOOTP is not set
33609 +# CONFIG_IP_PNP_RARP is not set
33610 +# CONFIG_NET_IPIP is not set
33611 +# CONFIG_NET_IPGRE is not set
33612 +# CONFIG_IP_MROUTE is not set
33613 +# CONFIG_ARPD is not set
33614 +# CONFIG_SYN_COOKIES is not set
33615 +# CONFIG_INET_AH is not set
33616 +# CONFIG_INET_ESP is not set
33617 +# CONFIG_INET_IPCOMP is not set
33618 +# CONFIG_INET_XFRM_TUNNEL is not set
33619 +# CONFIG_INET_TUNNEL is not set
33620 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
33621 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
33622 +# CONFIG_INET_XFRM_MODE_BEET is not set
33623 +# CONFIG_INET_LRO is not set
33624 +CONFIG_INET_DIAG=y
33625 +CONFIG_INET_TCP_DIAG=y
33626 +# CONFIG_TCP_CONG_ADVANCED is not set
33627 +CONFIG_TCP_CONG_CUBIC=y
33628 +CONFIG_DEFAULT_TCP_CONG="cubic"
33629 +# CONFIG_TCP_MD5SIG is not set
33630 +# CONFIG_IPV6 is not set
33631 +# CONFIG_INET6_XFRM_TUNNEL is not set
33632 +# CONFIG_INET6_TUNNEL is not set
33633 +# CONFIG_NETWORK_SECMARK is not set
33634 +# CONFIG_NETFILTER is not set
33635 +# CONFIG_IP_DCCP is not set
33636 +# CONFIG_IP_SCTP is not set
33637 +# CONFIG_TIPC is not set
33638 +# CONFIG_ATM is not set
33639 +# CONFIG_BRIDGE is not set
33640 +# CONFIG_VLAN_8021Q is not set
33641 +# CONFIG_DECNET is not set
33642 +# CONFIG_LLC2 is not set
33643 +# CONFIG_IPX is not set
33644 +# CONFIG_ATALK is not set
33645 +# CONFIG_X25 is not set
33646 +# CONFIG_LAPB is not set
33647 +# CONFIG_ECONET is not set
33648 +# CONFIG_WAN_ROUTER is not set
33649 +# CONFIG_NET_SCHED is not set
33654 +# CONFIG_NET_PKTGEN is not set
33655 +# CONFIG_HAMRADIO is not set
33656 +# CONFIG_IRDA is not set
33657 +# CONFIG_BT is not set
33658 +# CONFIG_AF_RXRPC is not set
33663 +# CONFIG_CFG80211 is not set
33664 +# CONFIG_WIRELESS_EXT is not set
33665 +# CONFIG_MAC80211 is not set
33666 +# CONFIG_IEEE80211 is not set
33667 +# CONFIG_RFKILL is not set
33668 +# CONFIG_NET_9P is not set
33675 +# Generic Driver Options
33677 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
33678 +CONFIG_STANDALONE=y
33679 +CONFIG_PREVENT_FIRMWARE_BUILD=y
33680 +# CONFIG_FW_LOADER is not set
33681 +# CONFIG_SYS_HYPERVISOR is not set
33682 +# CONFIG_CONNECTOR is not set
33684 +# CONFIG_MTD_DEBUG is not set
33685 +# CONFIG_MTD_CONCAT is not set
33686 +CONFIG_MTD_PARTITIONS=y
33687 +# CONFIG_MTD_REDBOOT_PARTS is not set
33688 +# CONFIG_MTD_CMDLINE_PARTS is not set
33691 +# User Modules And Translation Layers
33694 +CONFIG_MTD_BLKDEVS=y
33695 +CONFIG_MTD_BLOCK=y
33699 +# CONFIG_INFTL is not set
33700 +# CONFIG_RFD_FTL is not set
33701 +# CONFIG_SSFDC is not set
33702 +# CONFIG_MTD_OOPS is not set
33705 +# RAM/ROM/Flash chip drivers
33708 +# CONFIG_MTD_JEDECPROBE is not set
33709 +CONFIG_MTD_GEN_PROBE=y
33710 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
33711 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
33712 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
33713 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
33714 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
33715 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
33716 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
33717 +CONFIG_MTD_CFI_I1=y
33718 +CONFIG_MTD_CFI_I2=y
33719 +# CONFIG_MTD_CFI_I4 is not set
33720 +# CONFIG_MTD_CFI_I8 is not set
33721 +# CONFIG_MTD_CFI_INTELEXT is not set
33722 +CONFIG_MTD_CFI_AMDSTD=y
33723 +# CONFIG_MTD_CFI_STAA is not set
33724 +CONFIG_MTD_CFI_UTIL=y
33725 +# CONFIG_MTD_RAM is not set
33726 +# CONFIG_MTD_ROM is not set
33727 +# CONFIG_MTD_ABSENT is not set
33730 +# Mapping drivers for chip access
33732 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
33733 +CONFIG_MTD_PHYSMAP=y
33734 +CONFIG_MTD_PHYSMAP_START=0xFF800000
33735 +CONFIG_MTD_PHYSMAP_LEN=0x00800000
33736 +CONFIG_MTD_PHYSMAP_BANKWIDTH=1
33737 +# CONFIG_MTD_PHYSMAP_OF is not set
33738 +# CONFIG_MTD_INTEL_VR_NOR is not set
33739 +# CONFIG_MTD_PLATRAM is not set
33742 +# Self-contained MTD device drivers
33744 +# CONFIG_MTD_PMC551 is not set
33745 +# CONFIG_MTD_SLRAM is not set
33746 +# CONFIG_MTD_PHRAM is not set
33747 +# CONFIG_MTD_MTDRAM is not set
33748 +# CONFIG_MTD_BLOCK2MTD is not set
33751 +# Disk-On-Chip Device Drivers
33753 +# CONFIG_MTD_DOC2000 is not set
33754 +# CONFIG_MTD_DOC2001 is not set
33755 +# CONFIG_MTD_DOC2001PLUS is not set
33756 +# CONFIG_MTD_NAND is not set
33757 +# CONFIG_MTD_ONENAND is not set
33760 +# UBI - Unsorted block images
33762 +# CONFIG_MTD_UBI is not set
33763 +CONFIG_OF_DEVICE=y
33764 +# CONFIG_PARPORT is not set
33766 +# CONFIG_BLK_DEV_FD is not set
33767 +# CONFIG_BLK_CPQ_DA is not set
33768 +# CONFIG_BLK_CPQ_CISS_DA is not set
33769 +# CONFIG_BLK_DEV_DAC960 is not set
33770 +# CONFIG_BLK_DEV_UMEM is not set
33771 +# CONFIG_BLK_DEV_COW_COMMON is not set
33772 +# CONFIG_BLK_DEV_LOOP is not set
33773 +# CONFIG_BLK_DEV_NBD is not set
33774 +# CONFIG_BLK_DEV_SX8 is not set
33775 +# CONFIG_BLK_DEV_UB is not set
33776 +# CONFIG_BLK_DEV_RAM is not set
33777 +# CONFIG_CDROM_PKTCDVD is not set
33778 +# CONFIG_ATA_OVER_ETH is not set
33779 +CONFIG_MISC_DEVICES=y
33780 +# CONFIG_PHANTOM is not set
33781 +# CONFIG_EEPROM_93CX6 is not set
33782 +# CONFIG_SGI_IOC4 is not set
33783 +# CONFIG_TIFM_CORE is not set
33785 +CONFIG_IDE_MAX_HWIFS=4
33786 +CONFIG_BLK_DEV_IDE=y
33789 +# Please see Documentation/ide.txt for help/info on IDE drives
33791 +# CONFIG_BLK_DEV_IDE_SATA is not set
33792 +CONFIG_BLK_DEV_IDEDISK=y
33793 +CONFIG_IDEDISK_MULTI_MODE=y
33794 +# CONFIG_BLK_DEV_IDECD is not set
33795 +# CONFIG_BLK_DEV_IDETAPE is not set
33796 +# CONFIG_BLK_DEV_IDEFLOPPY is not set
33797 +# CONFIG_BLK_DEV_IDESCSI is not set
33798 +# CONFIG_IDE_TASK_IOCTL is not set
33799 +CONFIG_IDE_PROC_FS=y
33802 +# IDE chipset support/bugfixes
33804 +CONFIG_IDE_GENERIC=y
33805 +# CONFIG_BLK_DEV_PLATFORM is not set
33808 +# PCI IDE chipsets support
33810 +CONFIG_BLK_DEV_IDEPCI=y
33811 +# CONFIG_IDEPCI_SHARE_IRQ is not set
33812 +CONFIG_IDEPCI_PCIBUS_ORDER=y
33813 +# CONFIG_BLK_DEV_GENERIC is not set
33814 +# CONFIG_BLK_DEV_OPTI621 is not set
33815 +CONFIG_BLK_DEV_IDEDMA_PCI=y
33816 +# CONFIG_BLK_DEV_AEC62XX is not set
33817 +# CONFIG_BLK_DEV_ALI15X3 is not set
33818 +# CONFIG_BLK_DEV_AMD74XX is not set
33819 +# CONFIG_BLK_DEV_CMD64X is not set
33820 +# CONFIG_BLK_DEV_TRIFLEX is not set
33821 +# CONFIG_BLK_DEV_CY82C693 is not set
33822 +# CONFIG_BLK_DEV_CS5520 is not set
33823 +# CONFIG_BLK_DEV_CS5530 is not set
33824 +# CONFIG_BLK_DEV_HPT34X is not set
33825 +# CONFIG_BLK_DEV_HPT366 is not set
33826 +# CONFIG_BLK_DEV_JMICRON is not set
33827 +# CONFIG_BLK_DEV_SC1200 is not set
33828 +# CONFIG_BLK_DEV_PIIX is not set
33829 +# CONFIG_BLK_DEV_IT8213 is not set
33830 +# CONFIG_BLK_DEV_IT821X is not set
33831 +# CONFIG_BLK_DEV_NS87415 is not set
33832 +# CONFIG_BLK_DEV_PDC202XX_OLD is not set
33833 +# CONFIG_BLK_DEV_PDC202XX_NEW is not set
33834 +# CONFIG_BLK_DEV_SVWKS is not set
33835 +# CONFIG_BLK_DEV_SIIMAGE is not set
33836 +# CONFIG_BLK_DEV_SL82C105 is not set
33837 +# CONFIG_BLK_DEV_SLC90E66 is not set
33838 +# CONFIG_BLK_DEV_TRM290 is not set
33839 +CONFIG_BLK_DEV_VIA82CXXX=y
33840 +# CONFIG_BLK_DEV_TC86C001 is not set
33841 +# CONFIG_IDE_ARM is not set
33842 +CONFIG_BLK_DEV_IDEDMA=y
33843 +CONFIG_IDE_ARCH_OBSOLETE_INIT=y
33844 +# CONFIG_BLK_DEV_HD is not set
33847 +# SCSI device support
33849 +# CONFIG_RAID_ATTRS is not set
33852 +# CONFIG_SCSI_TGT is not set
33853 +# CONFIG_SCSI_NETLINK is not set
33854 +CONFIG_SCSI_PROC_FS=y
33857 +# SCSI support type (disk, tape, CD-ROM)
33859 +CONFIG_BLK_DEV_SD=y
33860 +# CONFIG_CHR_DEV_ST is not set
33861 +# CONFIG_CHR_DEV_OSST is not set
33862 +CONFIG_BLK_DEV_SR=y
33863 +# CONFIG_BLK_DEV_SR_VENDOR is not set
33864 +# CONFIG_CHR_DEV_SG is not set
33865 +# CONFIG_CHR_DEV_SCH is not set
33868 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
33870 +# CONFIG_SCSI_MULTI_LUN is not set
33871 +# CONFIG_SCSI_CONSTANTS is not set
33872 +# CONFIG_SCSI_LOGGING is not set
33873 +# CONFIG_SCSI_SCAN_ASYNC is not set
33874 +CONFIG_SCSI_WAIT_SCAN=m
33879 +CONFIG_SCSI_SPI_ATTRS=y
33880 +# CONFIG_SCSI_FC_ATTRS is not set
33881 +# CONFIG_SCSI_ISCSI_ATTRS is not set
33882 +# CONFIG_SCSI_SAS_LIBSAS is not set
33883 +# CONFIG_SCSI_SRP_ATTRS is not set
33884 +CONFIG_SCSI_LOWLEVEL=y
33885 +# CONFIG_ISCSI_TCP is not set
33886 +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
33887 +# CONFIG_SCSI_3W_9XXX is not set
33888 +# CONFIG_SCSI_ACARD is not set
33889 +# CONFIG_SCSI_AACRAID is not set
33890 +# CONFIG_SCSI_AIC7XXX is not set
33891 +# CONFIG_SCSI_AIC7XXX_OLD is not set
33892 +# CONFIG_SCSI_AIC79XX is not set
33893 +# CONFIG_SCSI_AIC94XX is not set
33894 +# CONFIG_SCSI_DPT_I2O is not set
33895 +# CONFIG_SCSI_ADVANSYS is not set
33896 +# CONFIG_SCSI_ARCMSR is not set
33897 +# CONFIG_MEGARAID_NEWGEN is not set
33898 +# CONFIG_MEGARAID_LEGACY is not set
33899 +# CONFIG_MEGARAID_SAS is not set
33900 +# CONFIG_SCSI_HPTIOP is not set
33901 +# CONFIG_SCSI_BUSLOGIC is not set
33902 +# CONFIG_SCSI_DMX3191D is not set
33903 +# CONFIG_SCSI_EATA is not set
33904 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
33905 +# CONFIG_SCSI_GDTH is not set
33906 +# CONFIG_SCSI_IPS is not set
33907 +# CONFIG_SCSI_INITIO is not set
33908 +# CONFIG_SCSI_INIA100 is not set
33909 +# CONFIG_SCSI_STEX is not set
33910 +# CONFIG_SCSI_SYM53C8XX_2 is not set
33911 +# CONFIG_SCSI_QLOGIC_1280 is not set
33912 +# CONFIG_SCSI_QLA_FC is not set
33913 +# CONFIG_SCSI_QLA_ISCSI is not set
33914 +# CONFIG_SCSI_LPFC is not set
33915 +# CONFIG_SCSI_DC395x is not set
33916 +# CONFIG_SCSI_DC390T is not set
33917 +# CONFIG_SCSI_NSP32 is not set
33918 +# CONFIG_SCSI_DEBUG is not set
33919 +# CONFIG_SCSI_SRP is not set
33920 +# CONFIG_ATA is not set
33922 +CONFIG_BLK_DEV_MD=y
33923 +CONFIG_MD_LINEAR=y
33926 +# CONFIG_MD_RAID10 is not set
33927 +CONFIG_MD_RAID456=y
33928 +CONFIG_MD_RAID5_RESHAPE=y
33929 +# CONFIG_MD_MULTIPATH is not set
33930 +# CONFIG_MD_FAULTY is not set
33931 +# CONFIG_BLK_DEV_DM is not set
33932 +# CONFIG_FUSION is not set
33935 +# IEEE 1394 (FireWire) support
33937 +# CONFIG_FIREWIRE is not set
33938 +# CONFIG_IEEE1394 is not set
33939 +# CONFIG_I2O is not set
33940 +# CONFIG_MACINTOSH_DRIVERS is not set
33941 +CONFIG_NETDEVICES=y
33942 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
33944 +# CONFIG_BONDING is not set
33945 +# CONFIG_MACVLAN is not set
33946 +# CONFIG_EQUALIZER is not set
33947 +# CONFIG_TUN is not set
33948 +# CONFIG_VETH is not set
33949 +# CONFIG_IP1000 is not set
33950 +# CONFIG_ARCNET is not set
33951 +# CONFIG_NET_ETHERNET is not set
33952 +CONFIG_NETDEV_1000=y
33953 +# CONFIG_ACENIC is not set
33954 +# CONFIG_DL2K is not set
33955 +# CONFIG_E1000 is not set
33956 +# CONFIG_E1000E is not set
33957 +# CONFIG_NS83820 is not set
33958 +# CONFIG_HAMACHI is not set
33959 +# CONFIG_YELLOWFIN is not set
33961 +# CONFIG_R8169_NAPI is not set
33962 +# CONFIG_SIS190 is not set
33963 +# CONFIG_SKGE is not set
33964 +# CONFIG_SKY2 is not set
33965 +# CONFIG_SK98LIN is not set
33966 +# CONFIG_VIA_VELOCITY is not set
33967 +# CONFIG_TIGON3 is not set
33968 +# CONFIG_BNX2 is not set
33969 +# CONFIG_MV643XX_ETH is not set
33970 +# CONFIG_QLA3XXX is not set
33971 +# CONFIG_ATL1 is not set
33972 +# CONFIG_NETDEV_10000 is not set
33973 +# CONFIG_TR is not set
33978 +# CONFIG_WLAN_PRE80211 is not set
33979 +# CONFIG_WLAN_80211 is not set
33982 +# USB Network Adapters
33984 +# CONFIG_USB_CATC is not set
33985 +# CONFIG_USB_KAWETH is not set
33986 +# CONFIG_USB_PEGASUS is not set
33987 +# CONFIG_USB_RTL8150 is not set
33988 +# CONFIG_USB_USBNET is not set
33989 +# CONFIG_WAN is not set
33990 +# CONFIG_FDDI is not set
33991 +# CONFIG_HIPPI is not set
33992 +# CONFIG_PPP is not set
33993 +# CONFIG_SLIP is not set
33994 +# CONFIG_NET_FC is not set
33995 +# CONFIG_SHAPER is not set
33996 +# CONFIG_NETCONSOLE is not set
33997 +# CONFIG_NETPOLL is not set
33998 +# CONFIG_NET_POLL_CONTROLLER is not set
33999 +# CONFIG_ISDN is not set
34000 +# CONFIG_PHONE is not set
34003 +# Input device support
34005 +# CONFIG_INPUT is not set
34008 +# Hardware I/O ports
34010 +# CONFIG_SERIO is not set
34011 +# CONFIG_GAMEPORT is not set
34014 +# Character devices
34016 +# CONFIG_VT is not set
34017 +# CONFIG_SERIAL_NONSTANDARD is not set
34022 +CONFIG_SERIAL_8250=y
34023 +CONFIG_SERIAL_8250_CONSOLE=y
34024 +# CONFIG_SERIAL_8250_PCI is not set
34025 +CONFIG_SERIAL_8250_NR_UARTS=2
34026 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
34027 +# CONFIG_SERIAL_8250_EXTENDED is not set
34030 +# Non-8250 serial port support
34032 +# CONFIG_SERIAL_UARTLITE is not set
34033 +CONFIG_SERIAL_CORE=y
34034 +CONFIG_SERIAL_CORE_CONSOLE=y
34035 +# CONFIG_SERIAL_JSM is not set
34036 +# CONFIG_SERIAL_OF_PLATFORM is not set
34037 +CONFIG_UNIX98_PTYS=y
34038 +CONFIG_LEGACY_PTYS=y
34039 +CONFIG_LEGACY_PTY_COUNT=256
34040 +# CONFIG_IPMI_HANDLER is not set
34041 +CONFIG_HW_RANDOM=m
34044 +# CONFIG_GEN_RTC_X is not set
34045 +# CONFIG_R3964 is not set
34046 +# CONFIG_APPLICOM is not set
34047 +# CONFIG_RAW_DRIVER is not set
34048 +# CONFIG_TCG_TPM is not set
34051 +CONFIG_I2C_BOARDINFO=y
34052 +CONFIG_I2C_CHARDEV=y
34057 +# CONFIG_I2C_ALGOBIT is not set
34058 +# CONFIG_I2C_ALGOPCF is not set
34059 +# CONFIG_I2C_ALGOPCA is not set
34062 +# I2C Hardware Bus support
34064 +# CONFIG_I2C_ALI1535 is not set
34065 +# CONFIG_I2C_ALI1563 is not set
34066 +# CONFIG_I2C_ALI15X3 is not set
34067 +# CONFIG_I2C_AMD756 is not set
34068 +# CONFIG_I2C_AMD8111 is not set
34069 +# CONFIG_I2C_I801 is not set
34070 +# CONFIG_I2C_I810 is not set
34071 +# CONFIG_I2C_PIIX4 is not set
34073 +# CONFIG_I2C_NFORCE2 is not set
34074 +# CONFIG_I2C_OCORES is not set
34075 +# CONFIG_I2C_PARPORT_LIGHT is not set
34076 +# CONFIG_I2C_PROSAVAGE is not set
34077 +# CONFIG_I2C_SAVAGE4 is not set
34078 +# CONFIG_I2C_SIMTEC is not set
34079 +# CONFIG_I2C_SIS5595 is not set
34080 +# CONFIG_I2C_SIS630 is not set
34081 +# CONFIG_I2C_SIS96X is not set
34082 +# CONFIG_I2C_TAOS_EVM is not set
34083 +# CONFIG_I2C_STUB is not set
34084 +# CONFIG_I2C_TINY_USB is not set
34085 +# CONFIG_I2C_VIA is not set
34086 +# CONFIG_I2C_VIAPRO is not set
34087 +# CONFIG_I2C_VOODOO3 is not set
34090 +# Miscellaneous I2C Chip support
34092 +# CONFIG_SENSORS_DS1337 is not set
34093 +# CONFIG_SENSORS_DS1374 is not set
34094 +# CONFIG_DS1682 is not set
34095 +# CONFIG_SENSORS_EEPROM is not set
34096 +# CONFIG_SENSORS_PCF8574 is not set
34097 +# CONFIG_SENSORS_PCA9539 is not set
34098 +# CONFIG_SENSORS_PCF8591 is not set
34099 +# CONFIG_SENSORS_M41T00 is not set
34100 +# CONFIG_SENSORS_MAX6875 is not set
34101 +# CONFIG_SENSORS_TSL2550 is not set
34102 +# CONFIG_I2C_DEBUG_CORE is not set
34103 +# CONFIG_I2C_DEBUG_ALGO is not set
34104 +# CONFIG_I2C_DEBUG_BUS is not set
34105 +# CONFIG_I2C_DEBUG_CHIP is not set
34110 +# CONFIG_SPI is not set
34111 +# CONFIG_SPI_MASTER is not set
34112 +# CONFIG_W1 is not set
34113 +# CONFIG_POWER_SUPPLY is not set
34114 +# CONFIG_HWMON is not set
34115 +# CONFIG_WATCHDOG is not set
34118 +# Sonics Silicon Backplane
34120 +CONFIG_SSB_POSSIBLE=y
34121 +# CONFIG_SSB is not set
34124 +# Multifunction device drivers
34126 +# CONFIG_MFD_SM501 is not set
34129 +# Multimedia devices
34131 +# CONFIG_VIDEO_DEV is not set
34132 +# CONFIG_DVB_CORE is not set
34133 +# CONFIG_DAB is not set
34136 +# Graphics support
34138 +# CONFIG_AGP is not set
34139 +# CONFIG_DRM is not set
34140 +# CONFIG_VGASTATE is not set
34141 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
34142 +# CONFIG_FB is not set
34143 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
34146 +# Display device support
34148 +# CONFIG_DISPLAY_SUPPORT is not set
34153 +# CONFIG_SOUND is not set
34154 +CONFIG_USB_SUPPORT=y
34155 +CONFIG_USB_ARCH_HAS_HCD=y
34156 +CONFIG_USB_ARCH_HAS_OHCI=y
34157 +CONFIG_USB_ARCH_HAS_EHCI=y
34159 +# CONFIG_USB_DEBUG is not set
34162 +# Miscellaneous USB options
34164 +CONFIG_USB_DEVICEFS=y
34165 +CONFIG_USB_DEVICE_CLASS=y
34166 +# CONFIG_USB_DYNAMIC_MINORS is not set
34167 +# CONFIG_USB_OTG is not set
34170 +# USB Host Controller Drivers
34172 +CONFIG_USB_EHCI_HCD=y
34173 +# CONFIG_USB_EHCI_SPLIT_ISO is not set
34174 +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
34175 +# CONFIG_USB_EHCI_TT_NEWSCHED is not set
34176 +# CONFIG_USB_ISP116X_HCD is not set
34177 +CONFIG_USB_OHCI_HCD=y
34178 +# CONFIG_USB_OHCI_HCD_PPC_OF is not set
34179 +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
34180 +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
34181 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
34182 +# CONFIG_USB_UHCI_HCD is not set
34183 +# CONFIG_USB_SL811_HCD is not set
34184 +# CONFIG_USB_R8A66597_HCD is not set
34187 +# USB Device Class drivers
34189 +# CONFIG_USB_ACM is not set
34190 +# CONFIG_USB_PRINTER is not set
34193 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
34197 +# may also be needed; see USB_STORAGE Help for more information
34199 +CONFIG_USB_STORAGE=y
34200 +# CONFIG_USB_STORAGE_DEBUG is not set
34201 +# CONFIG_USB_STORAGE_DATAFAB is not set
34202 +# CONFIG_USB_STORAGE_FREECOM is not set
34203 +# CONFIG_USB_STORAGE_ISD200 is not set
34204 +# CONFIG_USB_STORAGE_DPCM is not set
34205 +# CONFIG_USB_STORAGE_USBAT is not set
34206 +# CONFIG_USB_STORAGE_SDDR09 is not set
34207 +# CONFIG_USB_STORAGE_SDDR55 is not set
34208 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
34209 +# CONFIG_USB_STORAGE_ALAUDA is not set
34210 +# CONFIG_USB_STORAGE_KARMA is not set
34211 +# CONFIG_USB_LIBUSUAL is not set
34214 +# USB Imaging devices
34216 +# CONFIG_USB_MDC800 is not set
34217 +# CONFIG_USB_MICROTEK is not set
34218 +# CONFIG_USB_MON is not set
34221 +# USB port drivers
34225 +# USB Serial Converter support
34227 +# CONFIG_USB_SERIAL is not set
34230 +# USB Miscellaneous drivers
34232 +# CONFIG_USB_EMI62 is not set
34233 +# CONFIG_USB_EMI26 is not set
34234 +# CONFIG_USB_ADUTUX is not set
34235 +# CONFIG_USB_AUERSWALD is not set
34236 +# CONFIG_USB_RIO500 is not set
34237 +# CONFIG_USB_LEGOTOWER is not set
34238 +# CONFIG_USB_LCD is not set
34239 +# CONFIG_USB_BERRY_CHARGE is not set
34240 +# CONFIG_USB_LED is not set
34241 +# CONFIG_USB_CYPRESS_CY7C63 is not set
34242 +# CONFIG_USB_CYTHERM is not set
34243 +# CONFIG_USB_PHIDGET is not set
34244 +# CONFIG_USB_IDMOUSE is not set
34245 +# CONFIG_USB_FTDI_ELAN is not set
34246 +# CONFIG_USB_APPLEDISPLAY is not set
34247 +# CONFIG_USB_SISUSBVGA is not set
34248 +# CONFIG_USB_LD is not set
34249 +# CONFIG_USB_TRANCEVIBRATOR is not set
34250 +# CONFIG_USB_IOWARRIOR is not set
34251 +# CONFIG_USB_TEST is not set
34254 +# USB DSL modem support
34258 +# USB Gadget Support
34260 +# CONFIG_USB_GADGET is not set
34261 +# CONFIG_MMC is not set
34262 +# CONFIG_NEW_LEDS is not set
34263 +# CONFIG_INFINIBAND is not set
34264 +# CONFIG_EDAC is not set
34266 +CONFIG_RTC_CLASS=y
34267 +CONFIG_RTC_HCTOSYS=y
34268 +CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
34269 +# CONFIG_RTC_DEBUG is not set
34274 +CONFIG_RTC_INTF_SYSFS=y
34275 +CONFIG_RTC_INTF_PROC=y
34276 +CONFIG_RTC_INTF_DEV=y
34277 +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
34278 +# CONFIG_RTC_DRV_TEST is not set
34283 +CONFIG_RTC_DRV_DS1307=y
34284 +# CONFIG_RTC_DRV_DS1374 is not set
34285 +# CONFIG_RTC_DRV_DS1672 is not set
34286 +# CONFIG_RTC_DRV_MAX6900 is not set
34287 +# CONFIG_RTC_DRV_RS5C372 is not set
34288 +# CONFIG_RTC_DRV_ISL1208 is not set
34289 +# CONFIG_RTC_DRV_X1205 is not set
34290 +# CONFIG_RTC_DRV_PCF8563 is not set
34291 +# CONFIG_RTC_DRV_PCF8583 is not set
34292 +# CONFIG_RTC_DRV_M41T80 is not set
34299 +# Platform RTC drivers
34301 +# CONFIG_RTC_DRV_CMOS is not set
34302 +# CONFIG_RTC_DRV_DS1553 is not set
34303 +# CONFIG_RTC_DRV_STK17TA8 is not set
34304 +# CONFIG_RTC_DRV_DS1742 is not set
34305 +# CONFIG_RTC_DRV_M48T86 is not set
34306 +# CONFIG_RTC_DRV_M48T59 is not set
34307 +# CONFIG_RTC_DRV_V3020 is not set
34310 +# on-CPU RTC drivers
34316 +# CONFIG_UIO is not set
34322 +# CONFIG_EXT2_FS_XATTR is not set
34323 +# CONFIG_EXT2_FS_XIP is not set
34325 +CONFIG_EXT3_FS_XATTR=y
34326 +# CONFIG_EXT3_FS_POSIX_ACL is not set
34327 +# CONFIG_EXT3_FS_SECURITY is not set
34328 +# CONFIG_EXT4DEV_FS is not set
34330 +CONFIG_FS_MBCACHE=y
34331 +# CONFIG_REISERFS_FS is not set
34332 +# CONFIG_JFS_FS is not set
34333 +# CONFIG_FS_POSIX_ACL is not set
34335 +# CONFIG_XFS_QUOTA is not set
34336 +# CONFIG_XFS_SECURITY is not set
34337 +# CONFIG_XFS_POSIX_ACL is not set
34338 +# CONFIG_XFS_RT is not set
34339 +# CONFIG_GFS2_FS is not set
34340 +# CONFIG_OCFS2_FS is not set
34341 +# CONFIG_MINIX_FS is not set
34342 +# CONFIG_ROMFS_FS is not set
34344 +CONFIG_INOTIFY_USER=y
34345 +# CONFIG_QUOTA is not set
34347 +# CONFIG_AUTOFS_FS is not set
34348 +# CONFIG_AUTOFS4_FS is not set
34349 +# CONFIG_FUSE_FS is not set
34352 +# CD-ROM/DVD Filesystems
34354 +# CONFIG_ISO9660_FS is not set
34355 +# CONFIG_UDF_FS is not set
34358 +# DOS/FAT/NT Filesystems
34360 +# CONFIG_MSDOS_FS is not set
34361 +# CONFIG_VFAT_FS is not set
34362 +# CONFIG_NTFS_FS is not set
34365 +# Pseudo filesystems
34368 +CONFIG_PROC_KCORE=y
34369 +CONFIG_PROC_SYSCTL=y
34372 +# CONFIG_TMPFS_POSIX_ACL is not set
34373 +# CONFIG_HUGETLB_PAGE is not set
34374 +# CONFIG_CONFIGFS_FS is not set
34377 +# Miscellaneous filesystems
34379 +# CONFIG_ADFS_FS is not set
34380 +# CONFIG_AFFS_FS is not set
34381 +# CONFIG_HFS_FS is not set
34382 +# CONFIG_HFSPLUS_FS is not set
34383 +# CONFIG_BEFS_FS is not set
34384 +# CONFIG_BFS_FS is not set
34385 +# CONFIG_EFS_FS is not set
34387 +CONFIG_JFFS2_FS_DEBUG=0
34388 +CONFIG_JFFS2_FS_WRITEBUFFER=y
34389 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
34390 +# CONFIG_JFFS2_SUMMARY is not set
34391 +# CONFIG_JFFS2_FS_XATTR is not set
34392 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
34393 +CONFIG_JFFS2_ZLIB=y
34394 +# CONFIG_JFFS2_LZO is not set
34395 +CONFIG_JFFS2_RTIME=y
34396 +# CONFIG_JFFS2_RUBIN is not set
34397 +# CONFIG_CRAMFS is not set
34398 +# CONFIG_VXFS_FS is not set
34399 +# CONFIG_HPFS_FS is not set
34400 +# CONFIG_QNX4FS_FS is not set
34401 +# CONFIG_SYSV_FS is not set
34402 +# CONFIG_UFS_FS is not set
34403 +# CONFIG_NETWORK_FILESYSTEMS is not set
34408 +CONFIG_PARTITION_ADVANCED=y
34409 +# CONFIG_ACORN_PARTITION is not set
34410 +# CONFIG_OSF_PARTITION is not set
34411 +# CONFIG_AMIGA_PARTITION is not set
34412 +# CONFIG_ATARI_PARTITION is not set
34413 +# CONFIG_MAC_PARTITION is not set
34414 +CONFIG_MSDOS_PARTITION=y
34415 +# CONFIG_BSD_DISKLABEL is not set
34416 +# CONFIG_MINIX_SUBPARTITION is not set
34417 +# CONFIG_SOLARIS_X86_PARTITION is not set
34418 +# CONFIG_UNIXWARE_DISKLABEL is not set
34419 +# CONFIG_LDM_PARTITION is not set
34420 +# CONFIG_SGI_PARTITION is not set
34421 +# CONFIG_ULTRIX_PARTITION is not set
34422 +# CONFIG_SUN_PARTITION is not set
34423 +# CONFIG_KARMA_PARTITION is not set
34424 +# CONFIG_EFI_PARTITION is not set
34425 +# CONFIG_SYSV68_PARTITION is not set
34427 +CONFIG_NLS_DEFAULT="utf8"
34428 +CONFIG_NLS_CODEPAGE_437=y
34429 +# CONFIG_NLS_CODEPAGE_737 is not set
34430 +# CONFIG_NLS_CODEPAGE_775 is not set
34431 +# CONFIG_NLS_CODEPAGE_850 is not set
34432 +# CONFIG_NLS_CODEPAGE_852 is not set
34433 +# CONFIG_NLS_CODEPAGE_855 is not set
34434 +# CONFIG_NLS_CODEPAGE_857 is not set
34435 +# CONFIG_NLS_CODEPAGE_860 is not set
34436 +# CONFIG_NLS_CODEPAGE_861 is not set
34437 +# CONFIG_NLS_CODEPAGE_862 is not set
34438 +# CONFIG_NLS_CODEPAGE_863 is not set
34439 +# CONFIG_NLS_CODEPAGE_864 is not set
34440 +# CONFIG_NLS_CODEPAGE_865 is not set
34441 +# CONFIG_NLS_CODEPAGE_866 is not set
34442 +# CONFIG_NLS_CODEPAGE_869 is not set
34443 +# CONFIG_NLS_CODEPAGE_936 is not set
34444 +# CONFIG_NLS_CODEPAGE_950 is not set
34445 +# CONFIG_NLS_CODEPAGE_932 is not set
34446 +# CONFIG_NLS_CODEPAGE_949 is not set
34447 +# CONFIG_NLS_CODEPAGE_874 is not set
34448 +# CONFIG_NLS_ISO8859_8 is not set
34449 +# CONFIG_NLS_CODEPAGE_1250 is not set
34450 +# CONFIG_NLS_CODEPAGE_1251 is not set
34451 +# CONFIG_NLS_ASCII is not set
34452 +CONFIG_NLS_ISO8859_1=y
34453 +# CONFIG_NLS_ISO8859_2 is not set
34454 +# CONFIG_NLS_ISO8859_3 is not set
34455 +# CONFIG_NLS_ISO8859_4 is not set
34456 +# CONFIG_NLS_ISO8859_5 is not set
34457 +# CONFIG_NLS_ISO8859_6 is not set
34458 +# CONFIG_NLS_ISO8859_7 is not set
34459 +# CONFIG_NLS_ISO8859_9 is not set
34460 +# CONFIG_NLS_ISO8859_13 is not set
34461 +# CONFIG_NLS_ISO8859_14 is not set
34462 +# CONFIG_NLS_ISO8859_15 is not set
34463 +# CONFIG_NLS_KOI8_R is not set
34464 +# CONFIG_NLS_KOI8_U is not set
34466 +# CONFIG_DLM is not set
34467 +# CONFIG_UCC_SLOW is not set
34470 +# Library routines
34472 +CONFIG_BITREVERSE=y
34473 +# CONFIG_CRC_CCITT is not set
34474 +# CONFIG_CRC16 is not set
34475 +# CONFIG_CRC_ITU_T is not set
34477 +# CONFIG_CRC7 is not set
34478 +# CONFIG_LIBCRC32C is not set
34479 +CONFIG_ZLIB_INFLATE=y
34480 +CONFIG_ZLIB_DEFLATE=y
34482 +CONFIG_HAS_IOMEM=y
34483 +CONFIG_HAS_IOPORT=y
34485 +CONFIG_INSTRUMENTATION=y
34486 +# CONFIG_PROFILING is not set
34487 +# CONFIG_MARKERS is not set
34492 +# CONFIG_PRINTK_TIME is not set
34493 +# CONFIG_ENABLE_WARN_DEPRECATED is not set
34494 +# CONFIG_ENABLE_MUST_CHECK is not set
34495 +# CONFIG_MAGIC_SYSRQ is not set
34496 +# CONFIG_UNUSED_SYMBOLS is not set
34497 +# CONFIG_DEBUG_FS is not set
34498 +# CONFIG_HEADERS_CHECK is not set
34499 +# CONFIG_DEBUG_KERNEL is not set
34500 +# CONFIG_SLUB_DEBUG_ON is not set
34501 +# CONFIG_DEBUG_BUGVERBOSE is not set
34502 +# CONFIG_SAMPLES is not set
34503 +# CONFIG_BOOTX_TEXT is not set
34504 +# CONFIG_PPC_EARLY_DEBUG is not set
34507 +# Security options
34509 +# CONFIG_KEYS is not set
34510 +# CONFIG_SECURITY is not set
34511 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
34512 +CONFIG_XOR_BLOCKS=y
34513 +CONFIG_ASYNC_CORE=y
34514 +CONFIG_ASYNC_MEMCPY=y
34515 +CONFIG_ASYNC_XOR=y
34516 +# CONFIG_CRYPTO is not set
34517 +# CONFIG_PPC_CLOCK is not set
34518 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/taishan_defconfig powerpc.git/arch/powerpc/configs/taishan_defconfig
34519 --- linux-2.6.24/arch/powerpc/configs/taishan_defconfig 1970-01-01 01:00:00.000000000 +0100
34520 +++ powerpc.git/arch/powerpc/configs/taishan_defconfig 2008-01-28 20:25:49.000000000 +0100
34523 +# Automatically generated make config: don't edit
34524 +# Linux kernel version: 2.6.24-rc6
34525 +# Mon Dec 24 11:23:39 2007
34527 +# CONFIG_PPC64 is not set
34530 +# Processor support
34532 +# CONFIG_6xx is not set
34533 +# CONFIG_PPC_85xx is not set
34534 +# CONFIG_PPC_8xx is not set
34535 +# CONFIG_40x is not set
34537 +# CONFIG_E200 is not set
34540 +CONFIG_PTE_64BIT=y
34541 +CONFIG_PHYS_64BIT=y
34542 +# CONFIG_PPC_MM_SLICES is not set
34543 +CONFIG_NOT_COHERENT_CACHE=y
34545 +CONFIG_WORD_SIZE=32
34546 +CONFIG_PPC_MERGE=y
34548 +CONFIG_GENERIC_CMOS_UPDATE=y
34549 +CONFIG_GENERIC_TIME=y
34550 +CONFIG_GENERIC_TIME_VSYSCALL=y
34551 +CONFIG_GENERIC_CLOCKEVENTS=y
34552 +CONFIG_GENERIC_HARDIRQS=y
34553 +CONFIG_IRQ_PER_CPU=y
34554 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34555 +CONFIG_ARCH_HAS_ILOG2_U32=y
34556 +CONFIG_GENERIC_HWEIGHT=y
34557 +CONFIG_GENERIC_CALIBRATE_DELAY=y
34558 +CONFIG_GENERIC_FIND_NEXT_BIT=y
34559 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
34561 +CONFIG_EARLY_PRINTK=y
34562 +CONFIG_GENERIC_NVRAM=y
34563 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
34564 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
34567 +CONFIG_PPC_UDBG_16550=y
34568 +# CONFIG_GENERIC_TBSYNC is not set
34569 +CONFIG_AUDIT_ARCH=y
34570 +CONFIG_GENERIC_BUG=y
34571 +# CONFIG_DEFAULT_UIMAGE is not set
34572 +CONFIG_PPC_DCR_NATIVE=y
34573 +# CONFIG_PPC_DCR_MMIO is not set
34575 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34580 +CONFIG_EXPERIMENTAL=y
34581 +CONFIG_BROKEN_ON_SMP=y
34582 +CONFIG_INIT_ENV_ARG_LIMIT=32
34583 +CONFIG_LOCALVERSION=""
34584 +CONFIG_LOCALVERSION_AUTO=y
34587 +CONFIG_SYSVIPC_SYSCTL=y
34588 +CONFIG_POSIX_MQUEUE=y
34589 +# CONFIG_BSD_PROCESS_ACCT is not set
34590 +# CONFIG_TASKSTATS is not set
34591 +# CONFIG_USER_NS is not set
34592 +# CONFIG_PID_NS is not set
34593 +# CONFIG_AUDIT is not set
34594 +# CONFIG_IKCONFIG is not set
34595 +CONFIG_LOG_BUF_SHIFT=14
34596 +# CONFIG_CGROUPS is not set
34597 +CONFIG_FAIR_GROUP_SCHED=y
34598 +CONFIG_FAIR_USER_SCHED=y
34599 +# CONFIG_FAIR_CGROUP_SCHED is not set
34600 +CONFIG_SYSFS_DEPRECATED=y
34601 +# CONFIG_RELAY is not set
34602 +CONFIG_BLK_DEV_INITRD=y
34603 +CONFIG_INITRAMFS_SOURCE=""
34604 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
34607 +CONFIG_SYSCTL_SYSCALL=y
34609 +# CONFIG_KALLSYMS_ALL is not set
34610 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
34615 +CONFIG_BASE_FULL=y
34617 +CONFIG_ANON_INODES=y
34622 +CONFIG_VM_EVENT_COUNTERS=y
34623 +CONFIG_SLUB_DEBUG=y
34624 +# CONFIG_SLAB is not set
34626 +# CONFIG_SLOB is not set
34627 +CONFIG_RT_MUTEXES=y
34628 +# CONFIG_TINY_SHMEM is not set
34629 +CONFIG_BASE_SMALL=0
34631 +CONFIG_MODULE_UNLOAD=y
34632 +# CONFIG_MODULE_FORCE_UNLOAD is not set
34633 +# CONFIG_MODVERSIONS is not set
34634 +# CONFIG_MODULE_SRCVERSION_ALL is not set
34638 +# CONFIG_BLK_DEV_IO_TRACE is not set
34639 +# CONFIG_LSF is not set
34640 +# CONFIG_BLK_DEV_BSG is not set
34645 +CONFIG_IOSCHED_NOOP=y
34646 +CONFIG_IOSCHED_AS=y
34647 +CONFIG_IOSCHED_DEADLINE=y
34648 +CONFIG_IOSCHED_CFQ=y
34649 +CONFIG_DEFAULT_AS=y
34650 +# CONFIG_DEFAULT_DEADLINE is not set
34651 +# CONFIG_DEFAULT_CFQ is not set
34652 +# CONFIG_DEFAULT_NOOP is not set
34653 +CONFIG_DEFAULT_IOSCHED="anticipatory"
34654 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
34657 +# Platform support
34659 +# CONFIG_PPC_MPC52xx is not set
34660 +# CONFIG_PPC_MPC5200 is not set
34661 +# CONFIG_PPC_CELL is not set
34662 +# CONFIG_PPC_CELL_NATIVE is not set
34663 +# CONFIG_PQ2ADS is not set
34664 +# CONFIG_BAMBOO is not set
34665 +# CONFIG_EBONY is not set
34666 +# CONFIG_SEQUOIA is not set
34668 +# CONFIG_KATMAI is not set
34669 +# CONFIG_RAINIER is not set
34671 +# CONFIG_MPIC is not set
34672 +# CONFIG_MPIC_WEIRD is not set
34673 +# CONFIG_PPC_I8259 is not set
34674 +# CONFIG_PPC_RTAS is not set
34675 +# CONFIG_MMIO_NVRAM is not set
34676 +# CONFIG_PPC_MPC106 is not set
34677 +# CONFIG_PPC_970_NAP is not set
34678 +# CONFIG_PPC_INDIRECT_IO is not set
34679 +# CONFIG_GENERIC_IOMAP is not set
34680 +# CONFIG_CPU_FREQ is not set
34681 +# CONFIG_CPM2 is not set
34682 +# CONFIG_FSL_ULI1575 is not set
34687 +# CONFIG_HIGHMEM is not set
34688 +# CONFIG_TICK_ONESHOT is not set
34689 +# CONFIG_NO_HZ is not set
34690 +# CONFIG_HIGH_RES_TIMERS is not set
34691 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
34692 +# CONFIG_HZ_100 is not set
34694 +# CONFIG_HZ_300 is not set
34695 +# CONFIG_HZ_1000 is not set
34697 +CONFIG_PREEMPT_NONE=y
34698 +# CONFIG_PREEMPT_VOLUNTARY is not set
34699 +# CONFIG_PREEMPT is not set
34700 +CONFIG_BINFMT_ELF=y
34701 +# CONFIG_BINFMT_MISC is not set
34702 +# CONFIG_MATH_EMULATION is not set
34703 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
34704 +CONFIG_ARCH_FLATMEM_ENABLE=y
34705 +CONFIG_ARCH_POPULATES_NODE_MAP=y
34706 +CONFIG_SELECT_MEMORY_MODEL=y
34707 +CONFIG_FLATMEM_MANUAL=y
34708 +# CONFIG_DISCONTIGMEM_MANUAL is not set
34709 +# CONFIG_SPARSEMEM_MANUAL is not set
34711 +CONFIG_FLAT_NODE_MEM_MAP=y
34712 +# CONFIG_SPARSEMEM_STATIC is not set
34713 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
34714 +CONFIG_SPLIT_PTLOCK_CPUS=4
34715 +CONFIG_RESOURCES_64BIT=y
34716 +CONFIG_ZONE_DMA_FLAG=1
34718 +CONFIG_VIRT_TO_BUS=y
34719 +CONFIG_PROC_DEVICETREE=y
34720 +CONFIG_CMDLINE_BOOL=y
34723 +CONFIG_WANT_DEVICE_TREE=y
34724 +CONFIG_DEVICE_TREE="taishan.dts"
34725 +CONFIG_ISA_DMA_API=y
34731 +CONFIG_PPC_INDIRECT_PCI=y
34733 +CONFIG_PCI_DOMAINS=y
34734 +CONFIG_PCI_SYSCALL=y
34735 +# CONFIG_PCIEPORTBUS is not set
34736 +CONFIG_ARCH_SUPPORTS_MSI=y
34737 +# CONFIG_PCI_MSI is not set
34738 +CONFIG_PCI_LEGACY=y
34739 +# CONFIG_PCI_DEBUG is not set
34740 +# CONFIG_PCCARD is not set
34741 +# CONFIG_HOTPLUG_PCI is not set
34746 +# CONFIG_ADVANCED_OPTIONS is not set
34749 +# Default settings for advanced configuration options are used
34751 +CONFIG_HIGHMEM_START=0xfe000000
34752 +CONFIG_LOWMEM_SIZE=0x30000000
34753 +CONFIG_KERNEL_START=0xc0000000
34754 +CONFIG_TASK_SIZE=0xc0000000
34755 +CONFIG_CONSISTENT_START=0xff100000
34756 +CONFIG_CONSISTENT_SIZE=0x00200000
34757 +CONFIG_BOOT_LOAD=0x01000000
34765 +# Networking options
34768 +# CONFIG_PACKET_MMAP is not set
34770 +# CONFIG_NET_KEY is not set
34772 +# CONFIG_IP_MULTICAST is not set
34773 +# CONFIG_IP_ADVANCED_ROUTER is not set
34774 +CONFIG_IP_FIB_HASH=y
34776 +CONFIG_IP_PNP_DHCP=y
34777 +CONFIG_IP_PNP_BOOTP=y
34778 +# CONFIG_IP_PNP_RARP is not set
34779 +# CONFIG_NET_IPIP is not set
34780 +# CONFIG_NET_IPGRE is not set
34781 +# CONFIG_ARPD is not set
34782 +# CONFIG_SYN_COOKIES is not set
34783 +# CONFIG_INET_AH is not set
34784 +# CONFIG_INET_ESP is not set
34785 +# CONFIG_INET_IPCOMP is not set
34786 +# CONFIG_INET_XFRM_TUNNEL is not set
34787 +# CONFIG_INET_TUNNEL is not set
34788 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
34789 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
34790 +# CONFIG_INET_XFRM_MODE_BEET is not set
34791 +# CONFIG_INET_LRO is not set
34792 +CONFIG_INET_DIAG=y
34793 +CONFIG_INET_TCP_DIAG=y
34794 +# CONFIG_TCP_CONG_ADVANCED is not set
34795 +CONFIG_TCP_CONG_CUBIC=y
34796 +CONFIG_DEFAULT_TCP_CONG="cubic"
34797 +# CONFIG_TCP_MD5SIG is not set
34798 +# CONFIG_IPV6 is not set
34799 +# CONFIG_INET6_XFRM_TUNNEL is not set
34800 +# CONFIG_INET6_TUNNEL is not set
34801 +# CONFIG_NETWORK_SECMARK is not set
34802 +# CONFIG_NETFILTER is not set
34803 +# CONFIG_IP_DCCP is not set
34804 +# CONFIG_IP_SCTP is not set
34805 +# CONFIG_TIPC is not set
34806 +# CONFIG_ATM is not set
34807 +# CONFIG_BRIDGE is not set
34808 +# CONFIG_VLAN_8021Q is not set
34809 +# CONFIG_DECNET is not set
34810 +# CONFIG_LLC2 is not set
34811 +# CONFIG_IPX is not set
34812 +# CONFIG_ATALK is not set
34813 +# CONFIG_X25 is not set
34814 +# CONFIG_LAPB is not set
34815 +# CONFIG_ECONET is not set
34816 +# CONFIG_WAN_ROUTER is not set
34817 +# CONFIG_NET_SCHED is not set
34822 +# CONFIG_NET_PKTGEN is not set
34823 +# CONFIG_HAMRADIO is not set
34824 +# CONFIG_IRDA is not set
34825 +# CONFIG_BT is not set
34826 +# CONFIG_AF_RXRPC is not set
34831 +# CONFIG_CFG80211 is not set
34832 +# CONFIG_WIRELESS_EXT is not set
34833 +# CONFIG_MAC80211 is not set
34834 +# CONFIG_IEEE80211 is not set
34835 +# CONFIG_RFKILL is not set
34836 +# CONFIG_NET_9P is not set
34843 +# Generic Driver Options
34845 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
34846 +CONFIG_STANDALONE=y
34847 +CONFIG_PREVENT_FIRMWARE_BUILD=y
34848 +CONFIG_FW_LOADER=y
34849 +# CONFIG_DEBUG_DRIVER is not set
34850 +# CONFIG_DEBUG_DEVRES is not set
34851 +# CONFIG_SYS_HYPERVISOR is not set
34852 +CONFIG_CONNECTOR=y
34853 +CONFIG_PROC_EVENTS=y
34854 +# CONFIG_MTD is not set
34855 +CONFIG_OF_DEVICE=y
34856 +# CONFIG_PARPORT is not set
34858 +# CONFIG_BLK_DEV_FD is not set
34859 +# CONFIG_BLK_CPQ_DA is not set
34860 +# CONFIG_BLK_CPQ_CISS_DA is not set
34861 +# CONFIG_BLK_DEV_DAC960 is not set
34862 +# CONFIG_BLK_DEV_UMEM is not set
34863 +# CONFIG_BLK_DEV_COW_COMMON is not set
34864 +# CONFIG_BLK_DEV_LOOP is not set
34865 +# CONFIG_BLK_DEV_NBD is not set
34866 +# CONFIG_BLK_DEV_SX8 is not set
34867 +CONFIG_BLK_DEV_RAM=y
34868 +CONFIG_BLK_DEV_RAM_COUNT=16
34869 +CONFIG_BLK_DEV_RAM_SIZE=35000
34870 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
34871 +# CONFIG_CDROM_PKTCDVD is not set
34872 +# CONFIG_ATA_OVER_ETH is not set
34873 +# CONFIG_XILINX_SYSACE is not set
34874 +CONFIG_MISC_DEVICES=y
34875 +# CONFIG_PHANTOM is not set
34876 +# CONFIG_EEPROM_93CX6 is not set
34877 +# CONFIG_SGI_IOC4 is not set
34878 +# CONFIG_TIFM_CORE is not set
34879 +# CONFIG_IDE is not set
34882 +# SCSI device support
34884 +# CONFIG_RAID_ATTRS is not set
34885 +# CONFIG_SCSI is not set
34886 +# CONFIG_SCSI_DMA is not set
34887 +# CONFIG_SCSI_NETLINK is not set
34888 +# CONFIG_ATA is not set
34889 +# CONFIG_MD is not set
34890 +# CONFIG_FUSION is not set
34893 +# IEEE 1394 (FireWire) support
34895 +# CONFIG_FIREWIRE is not set
34896 +# CONFIG_IEEE1394 is not set
34897 +# CONFIG_I2O is not set
34898 +CONFIG_MACINTOSH_DRIVERS=y
34899 +# CONFIG_MAC_EMUMOUSEBTN is not set
34900 +# CONFIG_WINDFARM is not set
34901 +CONFIG_NETDEVICES=y
34902 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
34903 +# CONFIG_DUMMY is not set
34904 +# CONFIG_BONDING is not set
34905 +# CONFIG_MACVLAN is not set
34906 +# CONFIG_EQUALIZER is not set
34907 +# CONFIG_TUN is not set
34908 +# CONFIG_VETH is not set
34909 +# CONFIG_IP1000 is not set
34910 +# CONFIG_ARCNET is not set
34911 +# CONFIG_PHYLIB is not set
34912 +CONFIG_NET_ETHERNET=y
34913 +# CONFIG_MII is not set
34914 +# CONFIG_HAPPYMEAL is not set
34915 +# CONFIG_SUNGEM is not set
34916 +# CONFIG_CASSINI is not set
34917 +# CONFIG_NET_VENDOR_3COM is not set
34918 +# CONFIG_NET_TULIP is not set
34919 +# CONFIG_HP100 is not set
34920 +CONFIG_IBM_NEW_EMAC=y
34921 +CONFIG_IBM_NEW_EMAC_RXB=128
34922 +CONFIG_IBM_NEW_EMAC_TXB=64
34923 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
34924 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
34925 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
34926 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
34927 +CONFIG_IBM_NEW_EMAC_ZMII=y
34928 +CONFIG_IBM_NEW_EMAC_RGMII=y
34929 +CONFIG_IBM_NEW_EMAC_TAH=y
34930 +CONFIG_IBM_NEW_EMAC_EMAC4=y
34931 +# CONFIG_NET_PCI is not set
34932 +# CONFIG_B44 is not set
34933 +CONFIG_NETDEV_1000=y
34934 +# CONFIG_ACENIC is not set
34935 +# CONFIG_DL2K is not set
34936 +# CONFIG_E1000 is not set
34937 +# CONFIG_E1000E is not set
34938 +# CONFIG_NS83820 is not set
34939 +# CONFIG_HAMACHI is not set
34940 +# CONFIG_YELLOWFIN is not set
34941 +# CONFIG_R8169 is not set
34942 +# CONFIG_SIS190 is not set
34943 +# CONFIG_SKGE is not set
34944 +# CONFIG_SKY2 is not set
34945 +# CONFIG_SK98LIN is not set
34946 +# CONFIG_VIA_VELOCITY is not set
34947 +# CONFIG_TIGON3 is not set
34948 +# CONFIG_BNX2 is not set
34949 +# CONFIG_QLA3XXX is not set
34950 +# CONFIG_ATL1 is not set
34951 +CONFIG_NETDEV_10000=y
34952 +# CONFIG_CHELSIO_T1 is not set
34953 +# CONFIG_CHELSIO_T3 is not set
34954 +# CONFIG_IXGBE is not set
34955 +# CONFIG_IXGB is not set
34956 +# CONFIG_S2IO is not set
34957 +# CONFIG_MYRI10GE is not set
34958 +# CONFIG_NETXEN_NIC is not set
34959 +# CONFIG_NIU is not set
34960 +# CONFIG_MLX4_CORE is not set
34961 +# CONFIG_TEHUTI is not set
34962 +# CONFIG_TR is not set
34967 +# CONFIG_WLAN_PRE80211 is not set
34968 +# CONFIG_WLAN_80211 is not set
34969 +# CONFIG_WAN is not set
34970 +# CONFIG_FDDI is not set
34971 +# CONFIG_HIPPI is not set
34972 +# CONFIG_PPP is not set
34973 +# CONFIG_SLIP is not set
34974 +# CONFIG_SHAPER is not set
34975 +# CONFIG_NETCONSOLE is not set
34976 +# CONFIG_NETPOLL is not set
34977 +# CONFIG_NET_POLL_CONTROLLER is not set
34978 +# CONFIG_ISDN is not set
34979 +# CONFIG_PHONE is not set
34982 +# Input device support
34984 +# CONFIG_INPUT is not set
34987 +# Hardware I/O ports
34989 +# CONFIG_SERIO is not set
34990 +# CONFIG_GAMEPORT is not set
34993 +# Character devices
34995 +# CONFIG_VT is not set
34996 +# CONFIG_SERIAL_NONSTANDARD is not set
35001 +CONFIG_SERIAL_8250=y
35002 +CONFIG_SERIAL_8250_CONSOLE=y
35003 +# CONFIG_SERIAL_8250_PCI is not set
35004 +CONFIG_SERIAL_8250_NR_UARTS=4
35005 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
35006 +CONFIG_SERIAL_8250_EXTENDED=y
35007 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
35008 +CONFIG_SERIAL_8250_SHARE_IRQ=y
35009 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
35010 +# CONFIG_SERIAL_8250_RSA is not set
35013 +# Non-8250 serial port support
35015 +# CONFIG_SERIAL_UARTLITE is not set
35016 +CONFIG_SERIAL_CORE=y
35017 +CONFIG_SERIAL_CORE_CONSOLE=y
35018 +# CONFIG_SERIAL_JSM is not set
35019 +CONFIG_SERIAL_OF_PLATFORM=y
35020 +CONFIG_UNIX98_PTYS=y
35021 +CONFIG_LEGACY_PTYS=y
35022 +CONFIG_LEGACY_PTY_COUNT=256
35023 +# CONFIG_IPMI_HANDLER is not set
35024 +# CONFIG_HW_RANDOM is not set
35025 +# CONFIG_NVRAM is not set
35026 +# CONFIG_GEN_RTC is not set
35027 +# CONFIG_R3964 is not set
35028 +# CONFIG_APPLICOM is not set
35029 +# CONFIG_RAW_DRIVER is not set
35030 +# CONFIG_TCG_TPM is not set
35032 +# CONFIG_I2C is not set
35037 +# CONFIG_SPI is not set
35038 +# CONFIG_SPI_MASTER is not set
35039 +# CONFIG_W1 is not set
35040 +# CONFIG_POWER_SUPPLY is not set
35041 +# CONFIG_HWMON is not set
35042 +# CONFIG_WATCHDOG is not set
35045 +# Sonics Silicon Backplane
35047 +CONFIG_SSB_POSSIBLE=y
35048 +# CONFIG_SSB is not set
35051 +# Multifunction device drivers
35053 +# CONFIG_MFD_SM501 is not set
35056 +# Multimedia devices
35058 +# CONFIG_VIDEO_DEV is not set
35059 +# CONFIG_DVB_CORE is not set
35063 +# Graphics support
35065 +# CONFIG_AGP is not set
35066 +# CONFIG_DRM is not set
35067 +# CONFIG_VGASTATE is not set
35068 +CONFIG_VIDEO_OUTPUT_CONTROL=m
35069 +# CONFIG_FB is not set
35070 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
35073 +# Display device support
35075 +# CONFIG_DISPLAY_SUPPORT is not set
35080 +# CONFIG_SOUND is not set
35081 +CONFIG_USB_SUPPORT=y
35082 +CONFIG_USB_ARCH_HAS_HCD=y
35083 +CONFIG_USB_ARCH_HAS_OHCI=y
35084 +CONFIG_USB_ARCH_HAS_EHCI=y
35085 +# CONFIG_USB is not set
35088 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
35092 +# USB Gadget Support
35094 +# CONFIG_USB_GADGET is not set
35095 +# CONFIG_MMC is not set
35096 +# CONFIG_NEW_LEDS is not set
35097 +# CONFIG_INFINIBAND is not set
35098 +# CONFIG_EDAC is not set
35099 +# CONFIG_RTC_CLASS is not set
35104 +# CONFIG_UIO is not set
35110 +# CONFIG_EXT2_FS_XATTR is not set
35111 +# CONFIG_EXT2_FS_XIP is not set
35112 +# CONFIG_EXT3_FS is not set
35113 +# CONFIG_EXT4DEV_FS is not set
35114 +# CONFIG_REISERFS_FS is not set
35115 +# CONFIG_JFS_FS is not set
35116 +# CONFIG_FS_POSIX_ACL is not set
35117 +# CONFIG_XFS_FS is not set
35118 +# CONFIG_GFS2_FS is not set
35119 +# CONFIG_OCFS2_FS is not set
35120 +# CONFIG_MINIX_FS is not set
35121 +# CONFIG_ROMFS_FS is not set
35123 +CONFIG_INOTIFY_USER=y
35124 +# CONFIG_QUOTA is not set
35126 +# CONFIG_AUTOFS_FS is not set
35127 +# CONFIG_AUTOFS4_FS is not set
35128 +# CONFIG_FUSE_FS is not set
35131 +# CD-ROM/DVD Filesystems
35133 +# CONFIG_ISO9660_FS is not set
35134 +# CONFIG_UDF_FS is not set
35137 +# DOS/FAT/NT Filesystems
35139 +# CONFIG_MSDOS_FS is not set
35140 +# CONFIG_VFAT_FS is not set
35141 +# CONFIG_NTFS_FS is not set
35144 +# Pseudo filesystems
35147 +CONFIG_PROC_KCORE=y
35148 +CONFIG_PROC_SYSCTL=y
35151 +# CONFIG_TMPFS_POSIX_ACL is not set
35152 +# CONFIG_HUGETLB_PAGE is not set
35153 +# CONFIG_CONFIGFS_FS is not set
35156 +# Miscellaneous filesystems
35158 +# CONFIG_ADFS_FS is not set
35159 +# CONFIG_AFFS_FS is not set
35160 +# CONFIG_HFS_FS is not set
35161 +# CONFIG_HFSPLUS_FS is not set
35162 +# CONFIG_BEFS_FS is not set
35163 +# CONFIG_BFS_FS is not set
35164 +# CONFIG_EFS_FS is not set
35166 +# CONFIG_VXFS_FS is not set
35167 +# CONFIG_HPFS_FS is not set
35168 +# CONFIG_QNX4FS_FS is not set
35169 +# CONFIG_SYSV_FS is not set
35170 +# CONFIG_UFS_FS is not set
35171 +CONFIG_NETWORK_FILESYSTEMS=y
35174 +# CONFIG_NFS_V3_ACL is not set
35175 +# CONFIG_NFS_V4 is not set
35176 +# CONFIG_NFS_DIRECTIO is not set
35177 +# CONFIG_NFSD is not set
35181 +CONFIG_NFS_COMMON=y
35183 +# CONFIG_SUNRPC_BIND34 is not set
35184 +# CONFIG_RPCSEC_GSS_KRB5 is not set
35185 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
35186 +# CONFIG_SMB_FS is not set
35187 +# CONFIG_CIFS is not set
35188 +# CONFIG_NCP_FS is not set
35189 +# CONFIG_CODA_FS is not set
35190 +# CONFIG_AFS_FS is not set
35195 +# CONFIG_PARTITION_ADVANCED is not set
35196 +CONFIG_MSDOS_PARTITION=y
35197 +# CONFIG_NLS is not set
35198 +# CONFIG_DLM is not set
35199 +# CONFIG_UCC_SLOW is not set
35202 +# Library routines
35204 +CONFIG_BITREVERSE=y
35205 +# CONFIG_CRC_CCITT is not set
35206 +# CONFIG_CRC16 is not set
35207 +# CONFIG_CRC_ITU_T is not set
35209 +# CONFIG_CRC7 is not set
35210 +# CONFIG_LIBCRC32C is not set
35211 +CONFIG_ZLIB_INFLATE=y
35213 +CONFIG_HAS_IOMEM=y
35214 +CONFIG_HAS_IOPORT=y
35216 +CONFIG_INSTRUMENTATION=y
35217 +# CONFIG_PROFILING is not set
35218 +# CONFIG_KPROBES is not set
35219 +# CONFIG_MARKERS is not set
35224 +# CONFIG_PRINTK_TIME is not set
35225 +CONFIG_ENABLE_WARN_DEPRECATED=y
35226 +CONFIG_ENABLE_MUST_CHECK=y
35227 +CONFIG_MAGIC_SYSRQ=y
35228 +# CONFIG_UNUSED_SYMBOLS is not set
35229 +# CONFIG_DEBUG_FS is not set
35230 +# CONFIG_HEADERS_CHECK is not set
35231 +CONFIG_DEBUG_KERNEL=y
35232 +# CONFIG_DEBUG_SHIRQ is not set
35233 +CONFIG_DETECT_SOFTLOCKUP=y
35234 +CONFIG_SCHED_DEBUG=y
35235 +# CONFIG_SCHEDSTATS is not set
35236 +# CONFIG_TIMER_STATS is not set
35237 +# CONFIG_SLUB_DEBUG_ON is not set
35238 +# CONFIG_DEBUG_RT_MUTEXES is not set
35239 +# CONFIG_RT_MUTEX_TESTER is not set
35240 +# CONFIG_DEBUG_SPINLOCK is not set
35241 +# CONFIG_DEBUG_MUTEXES is not set
35242 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
35243 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
35244 +# CONFIG_DEBUG_KOBJECT is not set
35245 +# CONFIG_DEBUG_BUGVERBOSE is not set
35246 +# CONFIG_DEBUG_INFO is not set
35247 +# CONFIG_DEBUG_VM is not set
35248 +# CONFIG_DEBUG_LIST is not set
35249 +# CONFIG_DEBUG_SG is not set
35250 +CONFIG_FORCED_INLINING=y
35251 +# CONFIG_BOOT_PRINTK_DELAY is not set
35252 +# CONFIG_RCU_TORTURE_TEST is not set
35253 +# CONFIG_FAULT_INJECTION is not set
35254 +# CONFIG_SAMPLES is not set
35255 +# CONFIG_DEBUG_STACKOVERFLOW is not set
35256 +# CONFIG_DEBUG_STACK_USAGE is not set
35257 +# CONFIG_DEBUG_PAGEALLOC is not set
35259 +# CONFIG_KGDB is not set
35260 +# CONFIG_XMON is not set
35261 +# CONFIG_BDI_SWITCH is not set
35262 +# CONFIG_PPC_EARLY_DEBUG is not set
35265 +# Security options
35267 +# CONFIG_KEYS is not set
35268 +# CONFIG_SECURITY is not set
35269 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
35271 +CONFIG_CRYPTO_ALGAPI=y
35272 +CONFIG_CRYPTO_BLKCIPHER=y
35273 +CONFIG_CRYPTO_MANAGER=y
35274 +# CONFIG_CRYPTO_HMAC is not set
35275 +# CONFIG_CRYPTO_XCBC is not set
35276 +# CONFIG_CRYPTO_NULL is not set
35277 +# CONFIG_CRYPTO_MD4 is not set
35278 +CONFIG_CRYPTO_MD5=y
35279 +# CONFIG_CRYPTO_SHA1 is not set
35280 +# CONFIG_CRYPTO_SHA256 is not set
35281 +# CONFIG_CRYPTO_SHA512 is not set
35282 +# CONFIG_CRYPTO_WP512 is not set
35283 +# CONFIG_CRYPTO_TGR192 is not set
35284 +# CONFIG_CRYPTO_GF128MUL is not set
35285 +CONFIG_CRYPTO_ECB=y
35286 +CONFIG_CRYPTO_CBC=y
35287 +CONFIG_CRYPTO_PCBC=y
35288 +# CONFIG_CRYPTO_LRW is not set
35289 +# CONFIG_CRYPTO_XTS is not set
35290 +# CONFIG_CRYPTO_CRYPTD is not set
35291 +CONFIG_CRYPTO_DES=y
35292 +# CONFIG_CRYPTO_FCRYPT is not set
35293 +# CONFIG_CRYPTO_BLOWFISH is not set
35294 +# CONFIG_CRYPTO_TWOFISH is not set
35295 +# CONFIG_CRYPTO_SERPENT is not set
35296 +# CONFIG_CRYPTO_AES is not set
35297 +# CONFIG_CRYPTO_CAST5 is not set
35298 +# CONFIG_CRYPTO_CAST6 is not set
35299 +# CONFIG_CRYPTO_TEA is not set
35300 +# CONFIG_CRYPTO_ARC4 is not set
35301 +# CONFIG_CRYPTO_KHAZAD is not set
35302 +# CONFIG_CRYPTO_ANUBIS is not set
35303 +# CONFIG_CRYPTO_SEED is not set
35304 +# CONFIG_CRYPTO_DEFLATE is not set
35305 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
35306 +# CONFIG_CRYPTO_CRC32C is not set
35307 +# CONFIG_CRYPTO_CAMELLIA is not set
35308 +# CONFIG_CRYPTO_TEST is not set
35309 +# CONFIG_CRYPTO_AUTHENC is not set
35310 +CONFIG_CRYPTO_HW=y
35311 +# CONFIG_PPC_CLOCK is not set
35312 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/walnut_defconfig powerpc.git/arch/powerpc/configs/walnut_defconfig
35313 --- linux-2.6.24/arch/powerpc/configs/walnut_defconfig 2008-01-24 23:58:37.000000000 +0100
35314 +++ powerpc.git/arch/powerpc/configs/walnut_defconfig 2008-01-28 20:25:49.000000000 +0100
35317 # Automatically generated make config: don't edit
35318 -# Linux kernel version: 2.6.24-rc4
35319 -# Thu Dec 6 16:49:33 2007
35320 +# Linux kernel version: 2.6.24-rc6
35321 +# Mon Dec 24 11:23:58 2007
35323 # CONFIG_PPC64 is not set
35326 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
35329 -# CONFIG_PPC_UDBG_16550 is not set
35330 +CONFIG_PPC_UDBG_16550=y
35331 # CONFIG_GENERIC_TBSYNC is not set
35332 CONFIG_AUDIT_ARCH=y
35333 CONFIG_GENERIC_BUG=y
35334 @@ -127,6 +127,7 @@
35335 # CONFIG_DEFAULT_CFQ is not set
35336 # CONFIG_DEFAULT_NOOP is not set
35337 CONFIG_DEFAULT_IOSCHED="anticipatory"
35338 +# CONFIG_PPC4xx_PCI_EXPRESS is not set
35342 @@ -136,7 +137,9 @@
35343 # CONFIG_PPC_CELL is not set
35344 # CONFIG_PPC_CELL_NATIVE is not set
35345 # CONFIG_PQ2ADS is not set
35346 +# CONFIG_EP405 is not set
35347 # CONFIG_KILAUEA is not set
35348 +# CONFIG_MAKALU is not set
35350 # CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
35352 @@ -204,11 +207,17 @@
35356 -# CONFIG_PCI is not set
35357 -# CONFIG_PCI_DOMAINS is not set
35358 -# CONFIG_PCI_SYSCALL is not set
35359 -# CONFIG_ARCH_SUPPORTS_MSI is not set
35360 +CONFIG_PPC_INDIRECT_PCI=y
35362 +CONFIG_PCI_DOMAINS=y
35363 +CONFIG_PCI_SYSCALL=y
35364 +# CONFIG_PCIEPORTBUS is not set
35365 +CONFIG_ARCH_SUPPORTS_MSI=y
35366 +# CONFIG_PCI_MSI is not set
35367 +# CONFIG_PCI_LEGACY is not set
35368 +# CONFIG_PCI_DEBUG is not set
35369 # CONFIG_PCCARD is not set
35370 +# CONFIG_HOTPLUG_PCI is not set
35374 @@ -373,11 +382,13 @@
35375 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
35376 # CONFIG_MTD_PHYSMAP is not set
35377 CONFIG_MTD_PHYSMAP_OF=y
35378 +# CONFIG_MTD_INTEL_VR_NOR is not set
35379 # CONFIG_MTD_PLATRAM is not set
35382 # Self-contained MTD device drivers
35384 +# CONFIG_MTD_PMC551 is not set
35385 # CONFIG_MTD_SLRAM is not set
35386 # CONFIG_MTD_PHRAM is not set
35387 # CONFIG_MTD_MTDRAM is not set
35388 @@ -400,9 +411,14 @@
35389 # CONFIG_PARPORT is not set
35391 # CONFIG_BLK_DEV_FD is not set
35392 +# CONFIG_BLK_CPQ_DA is not set
35393 +# CONFIG_BLK_CPQ_CISS_DA is not set
35394 +# CONFIG_BLK_DEV_DAC960 is not set
35395 +# CONFIG_BLK_DEV_UMEM is not set
35396 # CONFIG_BLK_DEV_COW_COMMON is not set
35397 # CONFIG_BLK_DEV_LOOP is not set
35398 # CONFIG_BLK_DEV_NBD is not set
35399 +# CONFIG_BLK_DEV_SX8 is not set
35400 CONFIG_BLK_DEV_RAM=y
35401 CONFIG_BLK_DEV_RAM_COUNT=16
35402 CONFIG_BLK_DEV_RAM_SIZE=35000
35403 @@ -411,7 +427,10 @@
35404 # CONFIG_ATA_OVER_ETH is not set
35405 # CONFIG_XILINX_SYSACE is not set
35406 CONFIG_MISC_DEVICES=y
35407 +# CONFIG_PHANTOM is not set
35408 # CONFIG_EEPROM_93CX6 is not set
35409 +# CONFIG_SGI_IOC4 is not set
35410 +# CONFIG_TIFM_CORE is not set
35411 # CONFIG_IDE is not set
35414 @@ -423,6 +442,14 @@
35415 # CONFIG_SCSI_NETLINK is not set
35416 # CONFIG_ATA is not set
35417 # CONFIG_MD is not set
35418 +# CONFIG_FUSION is not set
35421 +# IEEE 1394 (FireWire) support
35423 +# CONFIG_FIREWIRE is not set
35424 +# CONFIG_IEEE1394 is not set
35425 +# CONFIG_I2O is not set
35426 # CONFIG_MACINTOSH_DRIVERS is not set
35427 CONFIG_NETDEVICES=y
35428 # CONFIG_NETDEVICES_MULTIQUEUE is not set
35429 @@ -432,9 +459,17 @@
35430 # CONFIG_EQUALIZER is not set
35431 # CONFIG_TUN is not set
35432 # CONFIG_VETH is not set
35433 +# CONFIG_IP1000 is not set
35434 +# CONFIG_ARCNET is not set
35435 # CONFIG_PHYLIB is not set
35436 CONFIG_NET_ETHERNET=y
35437 # CONFIG_MII is not set
35438 +# CONFIG_HAPPYMEAL is not set
35439 +# CONFIG_SUNGEM is not set
35440 +# CONFIG_CASSINI is not set
35441 +# CONFIG_NET_VENDOR_3COM is not set
35442 +# CONFIG_NET_TULIP is not set
35443 +# CONFIG_HP100 is not set
35444 CONFIG_IBM_NEW_EMAC=y
35445 CONFIG_IBM_NEW_EMAC_RXB=128
35446 CONFIG_IBM_NEW_EMAC_TXB=64
35447 @@ -446,9 +481,38 @@
35448 # CONFIG_IBM_NEW_EMAC_RGMII is not set
35449 # CONFIG_IBM_NEW_EMAC_TAH is not set
35450 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
35451 +# CONFIG_NET_PCI is not set
35452 # CONFIG_B44 is not set
35453 CONFIG_NETDEV_1000=y
35454 +# CONFIG_ACENIC is not set
35455 +# CONFIG_DL2K is not set
35456 +# CONFIG_E1000 is not set
35457 +# CONFIG_E1000E is not set
35458 +# CONFIG_NS83820 is not set
35459 +# CONFIG_HAMACHI is not set
35460 +# CONFIG_YELLOWFIN is not set
35461 +# CONFIG_R8169 is not set
35462 +# CONFIG_SIS190 is not set
35463 +# CONFIG_SKGE is not set
35464 +# CONFIG_SKY2 is not set
35465 +# CONFIG_SK98LIN is not set
35466 +# CONFIG_VIA_VELOCITY is not set
35467 +# CONFIG_TIGON3 is not set
35468 +# CONFIG_BNX2 is not set
35469 +# CONFIG_QLA3XXX is not set
35470 +# CONFIG_ATL1 is not set
35471 CONFIG_NETDEV_10000=y
35472 +# CONFIG_CHELSIO_T1 is not set
35473 +# CONFIG_CHELSIO_T3 is not set
35474 +# CONFIG_IXGBE is not set
35475 +# CONFIG_IXGB is not set
35476 +# CONFIG_S2IO is not set
35477 +# CONFIG_MYRI10GE is not set
35478 +# CONFIG_NETXEN_NIC is not set
35479 +# CONFIG_NIU is not set
35480 +# CONFIG_MLX4_CORE is not set
35481 +# CONFIG_TEHUTI is not set
35482 +# CONFIG_TR is not set
35486 @@ -456,6 +520,8 @@
35487 # CONFIG_WLAN_PRE80211 is not set
35488 # CONFIG_WLAN_80211 is not set
35489 # CONFIG_WAN is not set
35490 +# CONFIG_FDDI is not set
35491 +# CONFIG_HIPPI is not set
35492 # CONFIG_PPP is not set
35493 # CONFIG_SLIP is not set
35494 # CONFIG_SHAPER is not set
35495 @@ -487,6 +553,7 @@
35497 CONFIG_SERIAL_8250=y
35498 CONFIG_SERIAL_8250_CONSOLE=y
35499 +CONFIG_SERIAL_8250_PCI=y
35500 CONFIG_SERIAL_8250_NR_UARTS=4
35501 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
35502 CONFIG_SERIAL_8250_EXTENDED=y
35503 @@ -501,6 +568,7 @@
35504 # CONFIG_SERIAL_UARTLITE is not set
35505 CONFIG_SERIAL_CORE=y
35506 CONFIG_SERIAL_CORE_CONSOLE=y
35507 +# CONFIG_SERIAL_JSM is not set
35508 CONFIG_SERIAL_OF_PLATFORM=y
35509 CONFIG_UNIX98_PTYS=y
35510 CONFIG_LEGACY_PTYS=y
35511 @@ -510,8 +578,10 @@
35512 # CONFIG_NVRAM is not set
35513 # CONFIG_GEN_RTC is not set
35514 # CONFIG_R3964 is not set
35515 +# CONFIG_APPLICOM is not set
35516 # CONFIG_RAW_DRIVER is not set
35517 # CONFIG_TCG_TPM is not set
35519 # CONFIG_I2C is not set
35522 @@ -545,6 +615,8 @@
35526 +# CONFIG_AGP is not set
35527 +# CONFIG_DRM is not set
35528 # CONFIG_VGASTATE is not set
35529 CONFIG_VIDEO_OUTPUT_CONTROL=m
35530 # CONFIG_FB is not set
35531 @@ -560,9 +632,10 @@
35533 # CONFIG_SOUND is not set
35534 CONFIG_USB_SUPPORT=y
35535 -# CONFIG_USB_ARCH_HAS_HCD is not set
35536 -# CONFIG_USB_ARCH_HAS_OHCI is not set
35537 -# CONFIG_USB_ARCH_HAS_EHCI is not set
35538 +CONFIG_USB_ARCH_HAS_HCD=y
35539 +CONFIG_USB_ARCH_HAS_OHCI=y
35540 +CONFIG_USB_ARCH_HAS_EHCI=y
35541 +# CONFIG_USB is not set
35544 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
35545 @@ -574,6 +647,7 @@
35546 # CONFIG_USB_GADGET is not set
35547 # CONFIG_MMC is not set
35548 # CONFIG_NEW_LEDS is not set
35549 +# CONFIG_INFINIBAND is not set
35550 # CONFIG_EDAC is not set
35551 # CONFIG_RTC_CLASS is not set
35553 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/configs/warp_defconfig powerpc.git/arch/powerpc/configs/warp_defconfig
35554 --- linux-2.6.24/arch/powerpc/configs/warp_defconfig 1970-01-01 01:00:00.000000000 +0100
35555 +++ powerpc.git/arch/powerpc/configs/warp_defconfig 2008-01-28 20:25:49.000000000 +0100
35558 +# Automatically generated make config: don't edit
35559 +# Linux kernel version: 2.6.24-rc6
35560 +# Tue Jan 8 12:23:23 2008
35562 +# CONFIG_PPC64 is not set
35565 +# Processor support
35567 +# CONFIG_6xx is not set
35568 +# CONFIG_PPC_85xx is not set
35569 +# CONFIG_PPC_8xx is not set
35570 +# CONFIG_40x is not set
35572 +# CONFIG_E200 is not set
35576 +CONFIG_PTE_64BIT=y
35577 +CONFIG_PHYS_64BIT=y
35578 +# CONFIG_PPC_MM_SLICES is not set
35579 +CONFIG_NOT_COHERENT_CACHE=y
35581 +CONFIG_WORD_SIZE=32
35582 +CONFIG_PPC_MERGE=y
35584 +CONFIG_GENERIC_CMOS_UPDATE=y
35585 +CONFIG_GENERIC_TIME=y
35586 +CONFIG_GENERIC_TIME_VSYSCALL=y
35587 +CONFIG_GENERIC_CLOCKEVENTS=y
35588 +CONFIG_GENERIC_HARDIRQS=y
35589 +CONFIG_IRQ_PER_CPU=y
35590 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35591 +CONFIG_ARCH_HAS_ILOG2_U32=y
35592 +CONFIG_GENERIC_HWEIGHT=y
35593 +CONFIG_GENERIC_CALIBRATE_DELAY=y
35594 +CONFIG_GENERIC_FIND_NEXT_BIT=y
35595 +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
35597 +CONFIG_EARLY_PRINTK=y
35598 +CONFIG_GENERIC_NVRAM=y
35599 +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
35600 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
35603 +CONFIG_PPC_UDBG_16550=y
35604 +# CONFIG_GENERIC_TBSYNC is not set
35605 +CONFIG_AUDIT_ARCH=y
35606 +CONFIG_GENERIC_BUG=y
35607 +# CONFIG_DEFAULT_UIMAGE is not set
35608 +CONFIG_PPC_DCR_NATIVE=y
35609 +# CONFIG_PPC_DCR_MMIO is not set
35611 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35616 +CONFIG_EXPERIMENTAL=y
35617 +CONFIG_BROKEN_ON_SMP=y
35618 +CONFIG_INIT_ENV_ARG_LIMIT=32
35619 +CONFIG_LOCALVERSION="-pika"
35620 +# CONFIG_LOCALVERSION_AUTO is not set
35623 +CONFIG_SYSVIPC_SYSCTL=y
35624 +# CONFIG_POSIX_MQUEUE is not set
35625 +# CONFIG_BSD_PROCESS_ACCT is not set
35626 +# CONFIG_TASKSTATS is not set
35627 +# CONFIG_USER_NS is not set
35628 +# CONFIG_PID_NS is not set
35629 +# CONFIG_AUDIT is not set
35630 +# CONFIG_IKCONFIG is not set
35631 +CONFIG_LOG_BUF_SHIFT=14
35632 +# CONFIG_CGROUPS is not set
35633 +CONFIG_FAIR_GROUP_SCHED=y
35634 +CONFIG_FAIR_USER_SCHED=y
35635 +# CONFIG_FAIR_CGROUP_SCHED is not set
35636 +CONFIG_SYSFS_DEPRECATED=y
35637 +# CONFIG_RELAY is not set
35638 +CONFIG_BLK_DEV_INITRD=y
35639 +CONFIG_INITRAMFS_SOURCE=""
35640 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
35643 +CONFIG_SYSCTL_SYSCALL=y
35645 +# CONFIG_KALLSYMS_ALL is not set
35646 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
35647 +# CONFIG_HOTPLUG is not set
35651 +CONFIG_BASE_FULL=y
35653 +CONFIG_ANON_INODES=y
35658 +CONFIG_VM_EVENT_COUNTERS=y
35660 +# CONFIG_SLUB is not set
35661 +# CONFIG_SLOB is not set
35662 +CONFIG_RT_MUTEXES=y
35663 +# CONFIG_TINY_SHMEM is not set
35664 +CONFIG_BASE_SMALL=0
35666 +CONFIG_MODULE_UNLOAD=y
35667 +# CONFIG_MODULE_FORCE_UNLOAD is not set
35668 +# CONFIG_MODVERSIONS is not set
35669 +# CONFIG_MODULE_SRCVERSION_ALL is not set
35672 +# CONFIG_LBD is not set
35673 +# CONFIG_BLK_DEV_IO_TRACE is not set
35674 +# CONFIG_LSF is not set
35675 +# CONFIG_BLK_DEV_BSG is not set
35680 +CONFIG_IOSCHED_NOOP=y
35681 +CONFIG_IOSCHED_AS=y
35682 +CONFIG_IOSCHED_DEADLINE=y
35683 +CONFIG_IOSCHED_CFQ=y
35684 +CONFIG_DEFAULT_AS=y
35685 +# CONFIG_DEFAULT_DEADLINE is not set
35686 +# CONFIG_DEFAULT_CFQ is not set
35687 +# CONFIG_DEFAULT_NOOP is not set
35688 +CONFIG_DEFAULT_IOSCHED="anticipatory"
35691 +# Platform support
35693 +# CONFIG_PPC_MPC52xx is not set
35694 +# CONFIG_PPC_MPC5200 is not set
35695 +# CONFIG_PPC_CELL is not set
35696 +# CONFIG_PPC_CELL_NATIVE is not set
35697 +# CONFIG_PQ2ADS is not set
35698 +# CONFIG_BAMBOO is not set
35699 +# CONFIG_EBONY is not set
35700 +# CONFIG_SEQUOIA is not set
35701 +# CONFIG_TAISHAN is not set
35702 +# CONFIG_KATMAI is not set
35703 +# CONFIG_RAINIER is not set
35706 +CONFIG_IBM440EP_ERR42=y
35707 +# CONFIG_MPIC is not set
35708 +# CONFIG_MPIC_WEIRD is not set
35709 +# CONFIG_PPC_I8259 is not set
35710 +# CONFIG_PPC_RTAS is not set
35711 +# CONFIG_MMIO_NVRAM is not set
35712 +# CONFIG_PPC_MPC106 is not set
35713 +# CONFIG_PPC_970_NAP is not set
35714 +# CONFIG_PPC_INDIRECT_IO is not set
35715 +# CONFIG_GENERIC_IOMAP is not set
35716 +# CONFIG_CPU_FREQ is not set
35717 +# CONFIG_CPM2 is not set
35718 +# CONFIG_FSL_ULI1575 is not set
35723 +# CONFIG_HIGHMEM is not set
35724 +# CONFIG_TICK_ONESHOT is not set
35725 +# CONFIG_NO_HZ is not set
35726 +# CONFIG_HIGH_RES_TIMERS is not set
35727 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
35728 +# CONFIG_HZ_100 is not set
35729 +# CONFIG_HZ_250 is not set
35730 +# CONFIG_HZ_300 is not set
35733 +CONFIG_PREEMPT_NONE=y
35734 +# CONFIG_PREEMPT_VOLUNTARY is not set
35735 +# CONFIG_PREEMPT is not set
35736 +CONFIG_BINFMT_ELF=y
35737 +# CONFIG_BINFMT_MISC is not set
35738 +# CONFIG_MATH_EMULATION is not set
35739 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
35740 +CONFIG_ARCH_FLATMEM_ENABLE=y
35741 +CONFIG_ARCH_POPULATES_NODE_MAP=y
35742 +CONFIG_SELECT_MEMORY_MODEL=y
35743 +CONFIG_FLATMEM_MANUAL=y
35744 +# CONFIG_DISCONTIGMEM_MANUAL is not set
35745 +# CONFIG_SPARSEMEM_MANUAL is not set
35747 +CONFIG_FLAT_NODE_MEM_MAP=y
35748 +# CONFIG_SPARSEMEM_STATIC is not set
35749 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
35750 +CONFIG_SPLIT_PTLOCK_CPUS=4
35751 +CONFIG_RESOURCES_64BIT=y
35752 +CONFIG_ZONE_DMA_FLAG=1
35754 +CONFIG_VIRT_TO_BUS=y
35755 +CONFIG_PROC_DEVICETREE=y
35756 +CONFIG_CMDLINE_BOOL=y
35757 +CONFIG_CMDLINE="ip=on"
35759 +CONFIG_WANT_DEVICE_TREE=y
35760 +CONFIG_DEVICE_TREE="warp.dts"
35761 +CONFIG_ISA_DMA_API=y
35767 +# CONFIG_PCI is not set
35768 +# CONFIG_PCI_DOMAINS is not set
35769 +# CONFIG_PCI_SYSCALL is not set
35770 +# CONFIG_ARCH_SUPPORTS_MSI is not set
35775 +# CONFIG_ADVANCED_OPTIONS is not set
35778 +# Default settings for advanced configuration options are used
35780 +CONFIG_HIGHMEM_START=0xfe000000
35781 +CONFIG_LOWMEM_SIZE=0x30000000
35782 +CONFIG_KERNEL_START=0xc0000000
35783 +CONFIG_TASK_SIZE=0xc0000000
35784 +CONFIG_CONSISTENT_START=0xff100000
35785 +CONFIG_CONSISTENT_SIZE=0x00200000
35786 +CONFIG_BOOT_LOAD=0x01000000
35794 +# Networking options
35797 +# CONFIG_PACKET_MMAP is not set
35800 +# CONFIG_XFRM_USER is not set
35801 +# CONFIG_XFRM_SUB_POLICY is not set
35802 +# CONFIG_XFRM_MIGRATE is not set
35803 +# CONFIG_NET_KEY is not set
35805 +# CONFIG_IP_MULTICAST is not set
35806 +# CONFIG_IP_ADVANCED_ROUTER is not set
35807 +CONFIG_IP_FIB_HASH=y
35809 +CONFIG_IP_PNP_DHCP=y
35810 +# CONFIG_IP_PNP_BOOTP is not set
35811 +# CONFIG_IP_PNP_RARP is not set
35812 +# CONFIG_NET_IPIP is not set
35813 +# CONFIG_NET_IPGRE is not set
35814 +# CONFIG_ARPD is not set
35815 +# CONFIG_SYN_COOKIES is not set
35816 +# CONFIG_INET_AH is not set
35817 +# CONFIG_INET_ESP is not set
35818 +# CONFIG_INET_IPCOMP is not set
35819 +# CONFIG_INET_XFRM_TUNNEL is not set
35820 +# CONFIG_INET_TUNNEL is not set
35821 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
35822 +CONFIG_INET_XFRM_MODE_TUNNEL=y
35823 +CONFIG_INET_XFRM_MODE_BEET=y
35824 +# CONFIG_INET_LRO is not set
35825 +CONFIG_INET_DIAG=y
35826 +CONFIG_INET_TCP_DIAG=y
35827 +# CONFIG_TCP_CONG_ADVANCED is not set
35828 +CONFIG_TCP_CONG_CUBIC=y
35829 +CONFIG_DEFAULT_TCP_CONG="cubic"
35830 +# CONFIG_TCP_MD5SIG is not set
35831 +# CONFIG_IP_VS is not set
35832 +# CONFIG_IPV6 is not set
35833 +# CONFIG_INET6_XFRM_TUNNEL is not set
35834 +# CONFIG_INET6_TUNNEL is not set
35835 +# CONFIG_NETWORK_SECMARK is not set
35836 +CONFIG_NETFILTER=y
35837 +# CONFIG_NETFILTER_DEBUG is not set
35840 +# Core Netfilter Configuration
35842 +# CONFIG_NETFILTER_NETLINK is not set
35843 +# CONFIG_NF_CONNTRACK_ENABLED is not set
35844 +# CONFIG_NF_CONNTRACK is not set
35845 +# CONFIG_NETFILTER_XTABLES is not set
35848 +# IP: Netfilter Configuration
35850 +# CONFIG_IP_NF_QUEUE is not set
35851 +# CONFIG_IP_NF_IPTABLES is not set
35852 +# CONFIG_IP_NF_ARPTABLES is not set
35853 +# CONFIG_IP_DCCP is not set
35854 +# CONFIG_IP_SCTP is not set
35855 +# CONFIG_TIPC is not set
35856 +# CONFIG_ATM is not set
35857 +# CONFIG_BRIDGE is not set
35858 +CONFIG_VLAN_8021Q=y
35859 +# CONFIG_DECNET is not set
35860 +# CONFIG_LLC2 is not set
35861 +# CONFIG_IPX is not set
35862 +# CONFIG_ATALK is not set
35863 +# CONFIG_X25 is not set
35864 +# CONFIG_LAPB is not set
35865 +# CONFIG_ECONET is not set
35866 +# CONFIG_WAN_ROUTER is not set
35867 +# CONFIG_NET_SCHED is not set
35872 +# CONFIG_NET_PKTGEN is not set
35873 +# CONFIG_HAMRADIO is not set
35874 +# CONFIG_IRDA is not set
35875 +# CONFIG_BT is not set
35876 +# CONFIG_AF_RXRPC is not set
35881 +# CONFIG_CFG80211 is not set
35882 +# CONFIG_WIRELESS_EXT is not set
35883 +# CONFIG_MAC80211 is not set
35884 +# CONFIG_IEEE80211 is not set
35885 +# CONFIG_RFKILL is not set
35886 +# CONFIG_NET_9P is not set
35893 +# Generic Driver Options
35895 +# CONFIG_STANDALONE is not set
35896 +CONFIG_PREVENT_FIRMWARE_BUILD=y
35897 +# CONFIG_DEBUG_DRIVER is not set
35898 +# CONFIG_DEBUG_DEVRES is not set
35899 +# CONFIG_SYS_HYPERVISOR is not set
35900 +# CONFIG_CONNECTOR is not set
35902 +# CONFIG_MTD_DEBUG is not set
35903 +# CONFIG_MTD_CONCAT is not set
35904 +CONFIG_MTD_PARTITIONS=y
35905 +# CONFIG_MTD_REDBOOT_PARTS is not set
35906 +# CONFIG_MTD_CMDLINE_PARTS is not set
35909 +# User Modules And Translation Layers
35912 +CONFIG_MTD_BLKDEVS=y
35913 +CONFIG_MTD_BLOCK=y
35914 +# CONFIG_FTL is not set
35915 +# CONFIG_NFTL is not set
35916 +# CONFIG_INFTL is not set
35917 +# CONFIG_RFD_FTL is not set
35918 +# CONFIG_SSFDC is not set
35922 +# RAM/ROM/Flash chip drivers
35925 +# CONFIG_MTD_JEDECPROBE is not set
35926 +CONFIG_MTD_GEN_PROBE=y
35927 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
35928 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
35929 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
35930 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
35931 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
35932 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
35933 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
35934 +CONFIG_MTD_CFI_I1=y
35935 +CONFIG_MTD_CFI_I2=y
35936 +# CONFIG_MTD_CFI_I4 is not set
35937 +# CONFIG_MTD_CFI_I8 is not set
35938 +# CONFIG_MTD_CFI_INTELEXT is not set
35939 +CONFIG_MTD_CFI_AMDSTD=y
35940 +# CONFIG_MTD_CFI_STAA is not set
35941 +CONFIG_MTD_CFI_UTIL=y
35942 +# CONFIG_MTD_RAM is not set
35943 +# CONFIG_MTD_ROM is not set
35944 +# CONFIG_MTD_ABSENT is not set
35947 +# Mapping drivers for chip access
35949 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
35950 +# CONFIG_MTD_PHYSMAP is not set
35951 +CONFIG_MTD_PHYSMAP_OF=y
35952 +# CONFIG_MTD_PLATRAM is not set
35955 +# Self-contained MTD device drivers
35957 +# CONFIG_MTD_SLRAM is not set
35958 +# CONFIG_MTD_PHRAM is not set
35959 +# CONFIG_MTD_MTDRAM is not set
35960 +# CONFIG_MTD_BLOCK2MTD is not set
35963 +# Disk-On-Chip Device Drivers
35965 +# CONFIG_MTD_DOC2000 is not set
35966 +# CONFIG_MTD_DOC2001 is not set
35967 +# CONFIG_MTD_DOC2001PLUS is not set
35969 +# CONFIG_MTD_NAND_VERIFY_WRITE is not set
35970 +CONFIG_MTD_NAND_ECC_SMC=y
35971 +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
35972 +CONFIG_MTD_NAND_IDS=y
35973 +CONFIG_MTD_NAND_NDFC=y
35974 +# CONFIG_MTD_NAND_DISKONCHIP is not set
35975 +# CONFIG_MTD_NAND_NANDSIM is not set
35976 +# CONFIG_MTD_NAND_PLATFORM is not set
35977 +# CONFIG_MTD_ALAUDA is not set
35978 +# CONFIG_MTD_ONENAND is not set
35981 +# UBI - Unsorted block images
35983 +# CONFIG_MTD_UBI is not set
35984 +CONFIG_OF_DEVICE=y
35985 +# CONFIG_PARPORT is not set
35987 +# CONFIG_BLK_DEV_FD is not set
35988 +# CONFIG_BLK_DEV_COW_COMMON is not set
35989 +# CONFIG_BLK_DEV_LOOP is not set
35990 +# CONFIG_BLK_DEV_NBD is not set
35991 +# CONFIG_BLK_DEV_UB is not set
35992 +CONFIG_BLK_DEV_RAM=y
35993 +CONFIG_BLK_DEV_RAM_COUNT=16
35994 +CONFIG_BLK_DEV_RAM_SIZE=4096
35995 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
35996 +# CONFIG_CDROM_PKTCDVD is not set
35997 +# CONFIG_ATA_OVER_ETH is not set
35998 +# CONFIG_XILINX_SYSACE is not set
35999 +CONFIG_MISC_DEVICES=y
36000 +# CONFIG_EEPROM_93CX6 is not set
36001 +# CONFIG_IDE is not set
36004 +# SCSI device support
36006 +# CONFIG_RAID_ATTRS is not set
36009 +# CONFIG_SCSI_TGT is not set
36010 +# CONFIG_SCSI_NETLINK is not set
36011 +CONFIG_SCSI_PROC_FS=y
36014 +# SCSI support type (disk, tape, CD-ROM)
36016 +CONFIG_BLK_DEV_SD=y
36017 +# CONFIG_CHR_DEV_ST is not set
36018 +# CONFIG_CHR_DEV_OSST is not set
36019 +# CONFIG_BLK_DEV_SR is not set
36020 +# CONFIG_CHR_DEV_SG is not set
36021 +# CONFIG_CHR_DEV_SCH is not set
36024 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
36026 +# CONFIG_SCSI_MULTI_LUN is not set
36027 +# CONFIG_SCSI_CONSTANTS is not set
36028 +# CONFIG_SCSI_LOGGING is not set
36029 +# CONFIG_SCSI_SCAN_ASYNC is not set
36030 +# CONFIG_SCSI_WAIT_SCAN is not set
36035 +CONFIG_SCSI_SPI_ATTRS=y
36036 +# CONFIG_SCSI_FC_ATTRS is not set
36037 +# CONFIG_SCSI_ISCSI_ATTRS is not set
36038 +# CONFIG_SCSI_SAS_LIBSAS is not set
36039 +# CONFIG_SCSI_SRP_ATTRS is not set
36040 +# CONFIG_SCSI_LOWLEVEL is not set
36041 +# CONFIG_ATA is not set
36042 +# CONFIG_MD is not set
36043 +# CONFIG_MACINTOSH_DRIVERS is not set
36044 +CONFIG_NETDEVICES=y
36045 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
36046 +# CONFIG_DUMMY is not set
36047 +# CONFIG_BONDING is not set
36048 +# CONFIG_MACVLAN is not set
36049 +# CONFIG_EQUALIZER is not set
36050 +# CONFIG_TUN is not set
36051 +# CONFIG_VETH is not set
36052 +# CONFIG_PHYLIB is not set
36053 +CONFIG_NET_ETHERNET=y
36055 +CONFIG_IBM_NEW_EMAC=y
36056 +CONFIG_IBM_NEW_EMAC_RXB=128
36057 +CONFIG_IBM_NEW_EMAC_TXB=64
36058 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
36059 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
36060 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
36061 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
36062 +CONFIG_IBM_NEW_EMAC_ZMII=y
36063 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
36064 +# CONFIG_IBM_NEW_EMAC_TAH is not set
36065 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
36066 +# CONFIG_B44 is not set
36067 +# CONFIG_NETDEV_1000 is not set
36068 +# CONFIG_NETDEV_10000 is not set
36073 +# CONFIG_WLAN_PRE80211 is not set
36074 +# CONFIG_WLAN_80211 is not set
36077 +# USB Network Adapters
36079 +# CONFIG_USB_CATC is not set
36080 +# CONFIG_USB_KAWETH is not set
36081 +# CONFIG_USB_PEGASUS is not set
36082 +# CONFIG_USB_RTL8150 is not set
36083 +# CONFIG_USB_USBNET is not set
36084 +# CONFIG_WAN is not set
36085 +# CONFIG_PPP is not set
36086 +# CONFIG_SLIP is not set
36087 +# CONFIG_SHAPER is not set
36088 +# CONFIG_NETCONSOLE is not set
36089 +# CONFIG_NETPOLL is not set
36090 +# CONFIG_NET_POLL_CONTROLLER is not set
36091 +# CONFIG_ISDN is not set
36092 +# CONFIG_PHONE is not set
36095 +# Input device support
36097 +# CONFIG_INPUT is not set
36100 +# Hardware I/O ports
36102 +# CONFIG_SERIO is not set
36103 +# CONFIG_GAMEPORT is not set
36106 +# Character devices
36108 +# CONFIG_VT is not set
36109 +# CONFIG_SERIAL_NONSTANDARD is not set
36114 +CONFIG_SERIAL_8250=y
36115 +CONFIG_SERIAL_8250_CONSOLE=y
36116 +CONFIG_SERIAL_8250_NR_UARTS=4
36117 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
36118 +CONFIG_SERIAL_8250_EXTENDED=y
36119 +# CONFIG_SERIAL_8250_MANY_PORTS is not set
36120 +CONFIG_SERIAL_8250_SHARE_IRQ=y
36121 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
36122 +# CONFIG_SERIAL_8250_RSA is not set
36125 +# Non-8250 serial port support
36127 +# CONFIG_SERIAL_UARTLITE is not set
36128 +CONFIG_SERIAL_CORE=y
36129 +CONFIG_SERIAL_CORE_CONSOLE=y
36130 +# CONFIG_SERIAL_OF_PLATFORM is not set
36131 +CONFIG_UNIX98_PTYS=y
36132 +CONFIG_LEGACY_PTYS=y
36133 +CONFIG_LEGACY_PTY_COUNT=256
36134 +# CONFIG_IPMI_HANDLER is not set
36135 +CONFIG_HW_RANDOM=y
36136 +# CONFIG_NVRAM is not set
36137 +# CONFIG_GEN_RTC is not set
36138 +# CONFIG_R3964 is not set
36139 +# CONFIG_RAW_DRIVER is not set
36140 +# CONFIG_TCG_TPM is not set
36142 +CONFIG_I2C_BOARDINFO=y
36143 +# CONFIG_I2C_CHARDEV is not set
36148 +# CONFIG_I2C_ALGOBIT is not set
36149 +# CONFIG_I2C_ALGOPCF is not set
36150 +# CONFIG_I2C_ALGOPCA is not set
36153 +# I2C Hardware Bus support
36155 +CONFIG_I2C_IBM_IIC=y
36156 +# CONFIG_I2C_MPC is not set
36157 +# CONFIG_I2C_OCORES is not set
36158 +# CONFIG_I2C_PARPORT_LIGHT is not set
36159 +# CONFIG_I2C_SIMTEC is not set
36160 +# CONFIG_I2C_TAOS_EVM is not set
36161 +# CONFIG_I2C_STUB is not set
36162 +# CONFIG_I2C_TINY_USB is not set
36165 +# Miscellaneous I2C Chip support
36167 +# CONFIG_SENSORS_DS1337 is not set
36168 +# CONFIG_SENSORS_DS1374 is not set
36169 +# CONFIG_DS1682 is not set
36170 +CONFIG_SENSORS_EEPROM=y
36171 +# CONFIG_SENSORS_PCF8574 is not set
36172 +# CONFIG_SENSORS_PCA9539 is not set
36173 +# CONFIG_SENSORS_PCF8591 is not set
36174 +# CONFIG_SENSORS_M41T00 is not set
36175 +# CONFIG_SENSORS_MAX6875 is not set
36176 +# CONFIG_SENSORS_TSL2550 is not set
36177 +# CONFIG_I2C_DEBUG_CORE is not set
36178 +# CONFIG_I2C_DEBUG_ALGO is not set
36179 +# CONFIG_I2C_DEBUG_BUS is not set
36180 +# CONFIG_I2C_DEBUG_CHIP is not set
36185 +# CONFIG_SPI is not set
36186 +# CONFIG_SPI_MASTER is not set
36187 +# CONFIG_W1 is not set
36188 +# CONFIG_POWER_SUPPLY is not set
36190 +# CONFIG_HWMON_VID is not set
36191 +CONFIG_SENSORS_AD7414=y
36192 +# CONFIG_SENSORS_AD7418 is not set
36193 +# CONFIG_SENSORS_ADM1021 is not set
36194 +# CONFIG_SENSORS_ADM1025 is not set
36195 +# CONFIG_SENSORS_ADM1026 is not set
36196 +# CONFIG_SENSORS_ADM1029 is not set
36197 +# CONFIG_SENSORS_ADM1031 is not set
36198 +# CONFIG_SENSORS_ADM9240 is not set
36199 +# CONFIG_SENSORS_ADT7470 is not set
36200 +# CONFIG_SENSORS_ATXP1 is not set
36201 +# CONFIG_SENSORS_DS1621 is not set
36202 +# CONFIG_SENSORS_F71805F is not set
36203 +# CONFIG_SENSORS_F71882FG is not set
36204 +# CONFIG_SENSORS_F75375S is not set
36205 +# CONFIG_SENSORS_GL518SM is not set
36206 +# CONFIG_SENSORS_GL520SM is not set
36207 +# CONFIG_SENSORS_IT87 is not set
36208 +# CONFIG_SENSORS_LM63 is not set
36209 +# CONFIG_SENSORS_LM75 is not set
36210 +# CONFIG_SENSORS_LM77 is not set
36211 +# CONFIG_SENSORS_LM78 is not set
36212 +# CONFIG_SENSORS_LM80 is not set
36213 +# CONFIG_SENSORS_LM83 is not set
36214 +# CONFIG_SENSORS_LM85 is not set
36215 +# CONFIG_SENSORS_LM87 is not set
36216 +# CONFIG_SENSORS_LM90 is not set
36217 +# CONFIG_SENSORS_LM92 is not set
36218 +# CONFIG_SENSORS_LM93 is not set
36219 +# CONFIG_SENSORS_MAX1619 is not set
36220 +# CONFIG_SENSORS_MAX6650 is not set
36221 +# CONFIG_SENSORS_PC87360 is not set
36222 +# CONFIG_SENSORS_PC87427 is not set
36223 +# CONFIG_SENSORS_DME1737 is not set
36224 +# CONFIG_SENSORS_SMSC47M1 is not set
36225 +# CONFIG_SENSORS_SMSC47M192 is not set
36226 +# CONFIG_SENSORS_SMSC47B397 is not set
36227 +# CONFIG_SENSORS_THMC50 is not set
36228 +# CONFIG_SENSORS_VT1211 is not set
36229 +# CONFIG_SENSORS_W83781D is not set
36230 +# CONFIG_SENSORS_W83791D is not set
36231 +# CONFIG_SENSORS_W83792D is not set
36232 +# CONFIG_SENSORS_W83793 is not set
36233 +# CONFIG_SENSORS_W83L785TS is not set
36234 +# CONFIG_SENSORS_W83627HF is not set
36235 +# CONFIG_SENSORS_W83627EHF is not set
36236 +# CONFIG_HWMON_DEBUG_CHIP is not set
36237 +# CONFIG_WATCHDOG is not set
36240 +# Sonics Silicon Backplane
36242 +CONFIG_SSB_POSSIBLE=y
36243 +# CONFIG_SSB is not set
36246 +# Multifunction device drivers
36248 +# CONFIG_MFD_SM501 is not set
36251 +# Multimedia devices
36253 +# CONFIG_VIDEO_DEV is not set
36254 +# CONFIG_DVB_CORE is not set
36255 +# CONFIG_DAB is not set
36258 +# Graphics support
36260 +# CONFIG_VGASTATE is not set
36261 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
36262 +# CONFIG_FB is not set
36263 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
36266 +# Display device support
36268 +# CONFIG_DISPLAY_SUPPORT is not set
36273 +# CONFIG_SOUND is not set
36274 +CONFIG_USB_SUPPORT=y
36275 +CONFIG_USB_ARCH_HAS_HCD=y
36276 +CONFIG_USB_ARCH_HAS_OHCI=y
36277 +# CONFIG_USB_ARCH_HAS_EHCI is not set
36279 +# CONFIG_USB_DEBUG is not set
36282 +# Miscellaneous USB options
36284 +# CONFIG_USB_DEVICEFS is not set
36285 +CONFIG_USB_DEVICE_CLASS=y
36286 +# CONFIG_USB_DYNAMIC_MINORS is not set
36287 +# CONFIG_USB_OTG is not set
36290 +# USB Host Controller Drivers
36292 +# CONFIG_USB_ISP116X_HCD is not set
36293 +CONFIG_USB_OHCI_HCD=y
36294 +CONFIG_USB_OHCI_HCD_PPC_OF=y
36295 +CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
36296 +# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
36297 +CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
36298 +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
36299 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
36300 +# CONFIG_USB_SL811_HCD is not set
36301 +# CONFIG_USB_R8A66597_HCD is not set
36304 +# USB Device Class drivers
36306 +# CONFIG_USB_ACM is not set
36307 +# CONFIG_USB_PRINTER is not set
36310 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
36314 +# may also be needed; see USB_STORAGE Help for more information
36316 +CONFIG_USB_STORAGE=y
36317 +# CONFIG_USB_STORAGE_DEBUG is not set
36318 +# CONFIG_USB_STORAGE_DATAFAB is not set
36319 +# CONFIG_USB_STORAGE_FREECOM is not set
36320 +# CONFIG_USB_STORAGE_ISD200 is not set
36321 +# CONFIG_USB_STORAGE_DPCM is not set
36322 +# CONFIG_USB_STORAGE_USBAT is not set
36323 +# CONFIG_USB_STORAGE_SDDR09 is not set
36324 +# CONFIG_USB_STORAGE_SDDR55 is not set
36325 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
36326 +# CONFIG_USB_STORAGE_ALAUDA is not set
36327 +# CONFIG_USB_STORAGE_KARMA is not set
36328 +# CONFIG_USB_LIBUSUAL is not set
36331 +# USB Imaging devices
36333 +# CONFIG_USB_MDC800 is not set
36334 +# CONFIG_USB_MICROTEK is not set
36338 +# USB port drivers
36342 +# USB Serial Converter support
36344 +# CONFIG_USB_SERIAL is not set
36347 +# USB Miscellaneous drivers
36349 +# CONFIG_USB_EMI62 is not set
36350 +# CONFIG_USB_EMI26 is not set
36351 +# CONFIG_USB_ADUTUX is not set
36352 +# CONFIG_USB_AUERSWALD is not set
36353 +# CONFIG_USB_RIO500 is not set
36354 +# CONFIG_USB_LEGOTOWER is not set
36355 +# CONFIG_USB_LCD is not set
36356 +# CONFIG_USB_BERRY_CHARGE is not set
36357 +# CONFIG_USB_LED is not set
36358 +# CONFIG_USB_CYPRESS_CY7C63 is not set
36359 +# CONFIG_USB_CYTHERM is not set
36360 +# CONFIG_USB_PHIDGET is not set
36361 +# CONFIG_USB_IDMOUSE is not set
36362 +# CONFIG_USB_FTDI_ELAN is not set
36363 +# CONFIG_USB_APPLEDISPLAY is not set
36364 +# CONFIG_USB_LD is not set
36365 +# CONFIG_USB_TRANCEVIBRATOR is not set
36366 +# CONFIG_USB_IOWARRIOR is not set
36369 +# USB DSL modem support
36373 +# USB Gadget Support
36375 +# CONFIG_USB_GADGET is not set
36377 +# CONFIG_MMC_DEBUG is not set
36378 +# CONFIG_MMC_UNSAFE_RESUME is not set
36381 +# MMC/SD Card Drivers
36383 +CONFIG_MMC_BLOCK=m
36384 +CONFIG_MMC_BLOCK_BOUNCE=y
36385 +# CONFIG_SDIO_UART is not set
36388 +# MMC/SD Host Controller Drivers
36390 +# CONFIG_MMC_WBSD is not set
36391 +# CONFIG_NEW_LEDS is not set
36392 +# CONFIG_EDAC is not set
36393 +# CONFIG_RTC_CLASS is not set
36398 +# CONFIG_UIO is not set
36404 +# CONFIG_EXT2_FS_XATTR is not set
36405 +# CONFIG_EXT2_FS_XIP is not set
36406 +# CONFIG_EXT3_FS is not set
36407 +# CONFIG_EXT4DEV_FS is not set
36408 +# CONFIG_REISERFS_FS is not set
36409 +# CONFIG_JFS_FS is not set
36410 +# CONFIG_FS_POSIX_ACL is not set
36411 +# CONFIG_XFS_FS is not set
36412 +# CONFIG_GFS2_FS is not set
36413 +# CONFIG_OCFS2_FS is not set
36414 +# CONFIG_MINIX_FS is not set
36415 +# CONFIG_ROMFS_FS is not set
36417 +CONFIG_INOTIFY_USER=y
36418 +# CONFIG_QUOTA is not set
36420 +# CONFIG_AUTOFS_FS is not set
36421 +# CONFIG_AUTOFS4_FS is not set
36422 +# CONFIG_FUSE_FS is not set
36425 +# CD-ROM/DVD Filesystems
36427 +# CONFIG_ISO9660_FS is not set
36428 +# CONFIG_UDF_FS is not set
36431 +# DOS/FAT/NT Filesystems
36436 +CONFIG_FAT_DEFAULT_CODEPAGE=437
36437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
36438 +# CONFIG_NTFS_FS is not set
36441 +# Pseudo filesystems
36444 +CONFIG_PROC_KCORE=y
36445 +CONFIG_PROC_SYSCTL=y
36447 +# CONFIG_TMPFS is not set
36448 +# CONFIG_HUGETLB_PAGE is not set
36449 +# CONFIG_CONFIGFS_FS is not set
36452 +# Miscellaneous filesystems
36454 +# CONFIG_ADFS_FS is not set
36455 +# CONFIG_AFFS_FS is not set
36456 +# CONFIG_HFS_FS is not set
36457 +# CONFIG_HFSPLUS_FS is not set
36458 +# CONFIG_BEFS_FS is not set
36459 +# CONFIG_BFS_FS is not set
36460 +# CONFIG_EFS_FS is not set
36462 +CONFIG_JFFS2_FS_DEBUG=0
36463 +CONFIG_JFFS2_FS_WRITEBUFFER=y
36464 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
36465 +# CONFIG_JFFS2_SUMMARY is not set
36466 +# CONFIG_JFFS2_FS_XATTR is not set
36467 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
36468 +CONFIG_JFFS2_ZLIB=y
36469 +# CONFIG_JFFS2_LZO is not set
36470 +CONFIG_JFFS2_RTIME=y
36471 +# CONFIG_JFFS2_RUBIN is not set
36473 +# CONFIG_VXFS_FS is not set
36474 +# CONFIG_HPFS_FS is not set
36475 +# CONFIG_QNX4FS_FS is not set
36476 +# CONFIG_SYSV_FS is not set
36477 +# CONFIG_UFS_FS is not set
36478 +CONFIG_NETWORK_FILESYSTEMS=y
36481 +# CONFIG_NFS_V3_ACL is not set
36482 +# CONFIG_NFS_V4 is not set
36483 +# CONFIG_NFS_DIRECTIO is not set
36484 +# CONFIG_NFSD is not set
36488 +CONFIG_NFS_COMMON=y
36490 +# CONFIG_SUNRPC_BIND34 is not set
36491 +# CONFIG_RPCSEC_GSS_KRB5 is not set
36492 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
36493 +# CONFIG_SMB_FS is not set
36494 +# CONFIG_CIFS is not set
36495 +# CONFIG_NCP_FS is not set
36496 +# CONFIG_CODA_FS is not set
36497 +# CONFIG_AFS_FS is not set
36502 +# CONFIG_PARTITION_ADVANCED is not set
36503 +CONFIG_MSDOS_PARTITION=y
36505 +CONFIG_NLS_DEFAULT="iso8859-1"
36506 +CONFIG_NLS_CODEPAGE_437=y
36507 +# CONFIG_NLS_CODEPAGE_737 is not set
36508 +# CONFIG_NLS_CODEPAGE_775 is not set
36509 +CONFIG_NLS_CODEPAGE_850=y
36510 +# CONFIG_NLS_CODEPAGE_852 is not set
36511 +# CONFIG_NLS_CODEPAGE_855 is not set
36512 +# CONFIG_NLS_CODEPAGE_857 is not set
36513 +# CONFIG_NLS_CODEPAGE_860 is not set
36514 +# CONFIG_NLS_CODEPAGE_861 is not set
36515 +# CONFIG_NLS_CODEPAGE_862 is not set
36516 +# CONFIG_NLS_CODEPAGE_863 is not set
36517 +# CONFIG_NLS_CODEPAGE_864 is not set
36518 +# CONFIG_NLS_CODEPAGE_865 is not set
36519 +# CONFIG_NLS_CODEPAGE_866 is not set
36520 +# CONFIG_NLS_CODEPAGE_869 is not set
36521 +# CONFIG_NLS_CODEPAGE_936 is not set
36522 +# CONFIG_NLS_CODEPAGE_950 is not set
36523 +# CONFIG_NLS_CODEPAGE_932 is not set
36524 +# CONFIG_NLS_CODEPAGE_949 is not set
36525 +# CONFIG_NLS_CODEPAGE_874 is not set
36526 +# CONFIG_NLS_ISO8859_8 is not set
36527 +# CONFIG_NLS_CODEPAGE_1250 is not set
36528 +# CONFIG_NLS_CODEPAGE_1251 is not set
36529 +CONFIG_NLS_ASCII=y
36530 +CONFIG_NLS_ISO8859_1=y
36531 +# CONFIG_NLS_ISO8859_2 is not set
36532 +# CONFIG_NLS_ISO8859_3 is not set
36533 +# CONFIG_NLS_ISO8859_4 is not set
36534 +# CONFIG_NLS_ISO8859_5 is not set
36535 +# CONFIG_NLS_ISO8859_6 is not set
36536 +# CONFIG_NLS_ISO8859_7 is not set
36537 +# CONFIG_NLS_ISO8859_9 is not set
36538 +# CONFIG_NLS_ISO8859_13 is not set
36539 +# CONFIG_NLS_ISO8859_14 is not set
36540 +CONFIG_NLS_ISO8859_15=y
36541 +# CONFIG_NLS_KOI8_R is not set
36542 +# CONFIG_NLS_KOI8_U is not set
36544 +# CONFIG_DLM is not set
36545 +# CONFIG_UCC_SLOW is not set
36548 +# Library routines
36550 +CONFIG_BITREVERSE=y
36551 +CONFIG_CRC_CCITT=y
36552 +# CONFIG_CRC16 is not set
36553 +# CONFIG_CRC_ITU_T is not set
36555 +# CONFIG_CRC7 is not set
36556 +# CONFIG_LIBCRC32C is not set
36557 +CONFIG_ZLIB_INFLATE=y
36558 +CONFIG_ZLIB_DEFLATE=y
36560 +CONFIG_HAS_IOMEM=y
36561 +CONFIG_HAS_IOPORT=y
36563 +# CONFIG_INSTRUMENTATION is not set
36568 +# CONFIG_PRINTK_TIME is not set
36569 +CONFIG_ENABLE_WARN_DEPRECATED=y
36570 +CONFIG_ENABLE_MUST_CHECK=y
36571 +CONFIG_MAGIC_SYSRQ=y
36572 +# CONFIG_UNUSED_SYMBOLS is not set
36573 +# CONFIG_DEBUG_FS is not set
36574 +# CONFIG_HEADERS_CHECK is not set
36575 +CONFIG_DEBUG_KERNEL=y
36576 +# CONFIG_DEBUG_SHIRQ is not set
36577 +CONFIG_DETECT_SOFTLOCKUP=y
36578 +# CONFIG_SCHED_DEBUG is not set
36579 +# CONFIG_SCHEDSTATS is not set
36580 +# CONFIG_TIMER_STATS is not set
36581 +# CONFIG_DEBUG_SLAB is not set
36582 +# CONFIG_DEBUG_RT_MUTEXES is not set
36583 +# CONFIG_RT_MUTEX_TESTER is not set
36584 +# CONFIG_DEBUG_SPINLOCK is not set
36585 +# CONFIG_DEBUG_MUTEXES is not set
36586 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
36587 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
36588 +# CONFIG_DEBUG_KOBJECT is not set
36589 +# CONFIG_DEBUG_BUGVERBOSE is not set
36590 +CONFIG_DEBUG_INFO=y
36591 +# CONFIG_DEBUG_VM is not set
36592 +# CONFIG_DEBUG_LIST is not set
36593 +# CONFIG_DEBUG_SG is not set
36594 +CONFIG_FORCED_INLINING=y
36595 +# CONFIG_BOOT_PRINTK_DELAY is not set
36596 +# CONFIG_RCU_TORTURE_TEST is not set
36597 +# CONFIG_FAULT_INJECTION is not set
36598 +# CONFIG_SAMPLES is not set
36599 +# CONFIG_DEBUG_STACKOVERFLOW is not set
36600 +# CONFIG_DEBUG_STACK_USAGE is not set
36601 +# CONFIG_DEBUG_PAGEALLOC is not set
36602 +# CONFIG_DEBUGGER is not set
36603 +CONFIG_BDI_SWITCH=y
36604 +# CONFIG_PPC_EARLY_DEBUG is not set
36607 +# Security options
36609 +# CONFIG_KEYS is not set
36610 +# CONFIG_SECURITY is not set
36611 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
36612 +# CONFIG_CRYPTO is not set
36613 +# CONFIG_PPC_CLOCK is not set
36614 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/Makefile powerpc.git/arch/powerpc/kernel/Makefile
36615 --- linux-2.6.24/arch/powerpc/kernel/Makefile 2008-01-24 23:58:37.000000000 +0100
36616 +++ powerpc.git/arch/powerpc/kernel/Makefile 2008-01-28 20:25:49.000000000 +0100
36620 ifeq ($(CONFIG_PPC64),y)
36621 -EXTRA_CFLAGS += -mno-minimal-toc
36622 +CFLAGS_prom_init.o += -mno-minimal-toc
36624 ifeq ($(CONFIG_PPC32),y)
36625 CFLAGS_prom_init.o += -fPIC
36627 obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \
36629 obj-$(CONFIG_PCI_MSI) += msi.o
36630 +obj-$(CONFIG_RAPIDIO) += rio.o
36631 obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \
36632 machine_kexec_$(CONFIG_WORD_SIZE).o
36633 obj-$(CONFIG_AUDIT) += audit.o
36636 extra-$(CONFIG_PPC_FPU) += fpu.o
36637 extra-$(CONFIG_PPC64) += entry_64.o
36639 +extra-y += systbl_chk.i
36640 +$(obj)/systbl.o: systbl_chk
36642 +quiet_cmd_systbl_chk = CALL $<
36643 + cmd_systbl_chk = $(CONFIG_SHELL) $< $(obj)/systbl_chk.i
36645 +PHONY += systbl_chk
36646 +systbl_chk: $(src)/systbl_chk.sh $(obj)/systbl_chk.i
36647 + $(call cmd,systbl_chk)
36648 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/btext.c powerpc.git/arch/powerpc/kernel/btext.c
36649 --- linux-2.6.24/arch/powerpc/kernel/btext.c 2008-01-24 23:58:37.000000000 +0100
36650 +++ powerpc.git/arch/powerpc/kernel/btext.c 2008-01-28 20:25:49.000000000 +0100
36651 @@ -236,7 +236,7 @@
36652 if (rc == 0 || !allow_nonstdout)
36655 - for (np = NULL; (np = of_find_node_by_type(np, "display"));) {
36656 + for_each_node_by_type(np, "display") {
36657 if (of_get_property(np, "linux,opened", NULL)) {
36658 printk("trying %s ...\n", np->full_name);
36659 rc = btext_initialize(np);
36660 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/cpu_setup_44x.S powerpc.git/arch/powerpc/kernel/cpu_setup_44x.S
36661 --- linux-2.6.24/arch/powerpc/kernel/cpu_setup_44x.S 2008-01-24 23:58:37.000000000 +0100
36662 +++ powerpc.git/arch/powerpc/kernel/cpu_setup_44x.S 2008-01-28 20:25:49.000000000 +0100
36663 @@ -23,11 +23,24 @@
36666 bl __plb_disable_wrp
36667 + bl __fixup_440A_mcheck
36670 _GLOBAL(__setup_cpu_440grx)
36671 - b __plb_disable_wrp
36673 + bl __plb_disable_wrp
36674 + bl __fixup_440A_mcheck
36677 +_GLOBAL(__setup_cpu_440gx)
36678 +_GLOBAL(__setup_cpu_440spe)
36679 + b __fixup_440A_mcheck
36681 + /* Temporary fixup for arch/ppc until we kill the whole thing */
36682 +#ifndef CONFIG_PPC_MERGE
36683 +_GLOBAL(__fixup_440A_mcheck)
36687 /* enable APU between CPU and FPU */
36688 _GLOBAL(__init_fpu_44x)
36689 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/cputable.c powerpc.git/arch/powerpc/kernel/cputable.c
36690 --- linux-2.6.24/arch/powerpc/kernel/cputable.c 2008-01-24 23:58:37.000000000 +0100
36691 +++ powerpc.git/arch/powerpc/kernel/cputable.c 2008-01-28 20:25:49.000000000 +0100
36693 #ifdef CONFIG_PPC32
36694 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
36695 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
36696 +extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
36697 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
36698 +extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
36699 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
36700 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
36701 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
36703 .pmc_type = PPC_PMC_IBM,
36704 .oprofile_cpu_type = "ppc64/power3",
36705 .oprofile_type = PPC_OPROFILE_RS64,
36706 + .machine_check = machine_check_generic,
36707 .platform = "power3",
36711 .pmc_type = PPC_PMC_IBM,
36712 .oprofile_cpu_type = "ppc64/power3",
36713 .oprofile_type = PPC_OPROFILE_RS64,
36714 + .machine_check = machine_check_generic,
36715 .platform = "power3",
36718 @@ -113,6 +117,7 @@
36719 .pmc_type = PPC_PMC_IBM,
36720 .oprofile_cpu_type = "ppc64/rs64",
36721 .oprofile_type = PPC_OPROFILE_RS64,
36722 + .machine_check = machine_check_generic,
36723 .platform = "rs64",
36726 @@ -127,6 +132,7 @@
36727 .pmc_type = PPC_PMC_IBM,
36728 .oprofile_cpu_type = "ppc64/rs64",
36729 .oprofile_type = PPC_OPROFILE_RS64,
36730 + .machine_check = machine_check_generic,
36731 .platform = "rs64",
36734 @@ -141,6 +147,7 @@
36735 .pmc_type = PPC_PMC_IBM,
36736 .oprofile_cpu_type = "ppc64/rs64",
36737 .oprofile_type = PPC_OPROFILE_RS64,
36738 + .machine_check = machine_check_generic,
36739 .platform = "rs64",
36742 @@ -155,6 +162,7 @@
36743 .pmc_type = PPC_PMC_IBM,
36744 .oprofile_cpu_type = "ppc64/rs64",
36745 .oprofile_type = PPC_OPROFILE_RS64,
36746 + .machine_check = machine_check_generic,
36747 .platform = "rs64",
36750 @@ -169,6 +177,7 @@
36751 .pmc_type = PPC_PMC_IBM,
36752 .oprofile_cpu_type = "ppc64/power4",
36753 .oprofile_type = PPC_OPROFILE_POWER4,
36754 + .machine_check = machine_check_generic,
36755 .platform = "power4",
36758 @@ -183,6 +192,7 @@
36759 .pmc_type = PPC_PMC_IBM,
36760 .oprofile_cpu_type = "ppc64/power4",
36761 .oprofile_type = PPC_OPROFILE_POWER4,
36762 + .machine_check = machine_check_generic,
36763 .platform = "power4",
36766 @@ -200,6 +210,7 @@
36767 .cpu_restore = __restore_cpu_ppc970,
36768 .oprofile_cpu_type = "ppc64/970",
36769 .oprofile_type = PPC_OPROFILE_POWER4,
36770 + .machine_check = machine_check_generic,
36771 .platform = "ppc970",
36774 @@ -217,6 +228,7 @@
36775 .cpu_restore = __restore_cpu_ppc970,
36776 .oprofile_cpu_type = "ppc64/970",
36777 .oprofile_type = PPC_OPROFILE_POWER4,
36778 + .machine_check = machine_check_generic,
36779 .platform = "ppc970",
36781 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
36782 @@ -234,6 +246,7 @@
36783 .cpu_restore = __restore_cpu_ppc970,
36784 .oprofile_cpu_type = "ppc64/970MP",
36785 .oprofile_type = PPC_OPROFILE_POWER4,
36786 + .machine_check = machine_check_generic,
36787 .platform = "ppc970",
36790 @@ -251,6 +264,7 @@
36791 .cpu_restore = __restore_cpu_ppc970,
36792 .oprofile_cpu_type = "ppc64/970MP",
36793 .oprofile_type = PPC_OPROFILE_POWER4,
36794 + .machine_check = machine_check_generic,
36795 .platform = "ppc970",
36798 @@ -267,6 +281,7 @@
36799 .cpu_setup = __setup_cpu_ppc970,
36800 .oprofile_cpu_type = "ppc64/970",
36801 .oprofile_type = PPC_OPROFILE_POWER4,
36802 + .machine_check = machine_check_generic,
36803 .platform = "ppc970",
36806 @@ -286,6 +301,7 @@
36808 .oprofile_mmcra_sihv = MMCRA_SIHV,
36809 .oprofile_mmcra_sipr = MMCRA_SIPR,
36810 + .machine_check = machine_check_generic,
36811 .platform = "power5",
36814 @@ -301,6 +317,7 @@
36815 .oprofile_type = PPC_OPROFILE_POWER4,
36816 .oprofile_mmcra_sihv = MMCRA_SIHV,
36817 .oprofile_mmcra_sipr = MMCRA_SIPR,
36818 + .machine_check = machine_check_generic,
36819 .platform = "power5+",
36822 @@ -317,6 +334,7 @@
36823 .oprofile_type = PPC_OPROFILE_POWER4,
36824 .oprofile_mmcra_sihv = MMCRA_SIHV,
36825 .oprofile_mmcra_sipr = MMCRA_SIPR,
36826 + .machine_check = machine_check_generic,
36827 .platform = "power5+",
36829 { /* POWER6 in P5+ mode; 2.04-compliant processor */
36830 @@ -327,6 +345,7 @@
36831 .cpu_user_features = COMMON_USER_POWER5_PLUS,
36832 .icache_bsize = 128,
36833 .dcache_bsize = 128,
36834 + .machine_check = machine_check_generic,
36835 .platform = "power5+",
36838 @@ -346,6 +365,7 @@
36839 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
36840 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
36841 POWER6_MMCRA_OTHER,
36842 + .machine_check = machine_check_generic,
36843 .platform = "power6x",
36845 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
36846 @@ -356,6 +376,7 @@
36847 .cpu_user_features = COMMON_USER_POWER6,
36848 .icache_bsize = 128,
36849 .dcache_bsize = 128,
36850 + .machine_check = machine_check_generic,
36851 .platform = "power6",
36853 { /* Cell Broadband Engine */
36854 @@ -372,6 +393,7 @@
36855 .pmc_type = PPC_PMC_IBM,
36856 .oprofile_cpu_type = "ppc64/cell-be",
36857 .oprofile_type = PPC_OPROFILE_CELL,
36858 + .machine_check = machine_check_generic,
36859 .platform = "ppc-cell-be",
36861 { /* PA Semi PA6T */
36862 @@ -388,6 +410,7 @@
36863 .cpu_restore = __restore_cpu_pa6t,
36864 .oprofile_cpu_type = "ppc64/pa6t",
36865 .oprofile_type = PPC_OPROFILE_PA6T,
36866 + .machine_check = machine_check_generic,
36867 .platform = "pa6t",
36869 { /* default match */
36870 @@ -400,6 +423,7 @@
36871 .dcache_bsize = 128,
36873 .pmc_type = PPC_PMC_IBM,
36874 + .machine_check = machine_check_generic,
36875 .platform = "power4",
36877 #endif /* CONFIG_PPC64 */
36878 @@ -414,6 +438,7 @@
36879 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
36880 .icache_bsize = 32,
36881 .dcache_bsize = 32,
36882 + .machine_check = machine_check_generic,
36883 .platform = "ppc601",
36886 @@ -425,6 +450,7 @@
36887 .icache_bsize = 32,
36888 .dcache_bsize = 32,
36889 .cpu_setup = __setup_cpu_603,
36890 + .machine_check = machine_check_generic,
36891 .platform = "ppc603",
36894 @@ -436,6 +462,7 @@
36895 .icache_bsize = 32,
36896 .dcache_bsize = 32,
36897 .cpu_setup = __setup_cpu_603,
36898 + .machine_check = machine_check_generic,
36899 .platform = "ppc603",
36902 @@ -447,6 +474,7 @@
36903 .icache_bsize = 32,
36904 .dcache_bsize = 32,
36905 .cpu_setup = __setup_cpu_603,
36906 + .machine_check = machine_check_generic,
36907 .platform = "ppc603",
36910 @@ -459,6 +487,7 @@
36911 .dcache_bsize = 32,
36913 .cpu_setup = __setup_cpu_604,
36914 + .machine_check = machine_check_generic,
36915 .platform = "ppc604",
36918 @@ -471,6 +500,7 @@
36919 .dcache_bsize = 32,
36921 .cpu_setup = __setup_cpu_604,
36922 + .machine_check = machine_check_generic,
36923 .platform = "ppc604",
36926 @@ -483,6 +513,7 @@
36927 .dcache_bsize = 32,
36929 .cpu_setup = __setup_cpu_604,
36930 + .machine_check = machine_check_generic,
36931 .platform = "ppc604",
36934 @@ -495,6 +526,7 @@
36935 .dcache_bsize = 32,
36937 .cpu_setup = __setup_cpu_604,
36938 + .machine_check = machine_check_generic,
36939 .platform = "ppc604",
36941 { /* 740/750 (0x4202, don't support TAU ?) */
36942 @@ -507,6 +539,7 @@
36943 .dcache_bsize = 32,
36945 .cpu_setup = __setup_cpu_750,
36946 + .machine_check = machine_check_generic,
36947 .platform = "ppc750",
36949 { /* 750CX (80100 and 8010x?) */
36950 @@ -519,6 +552,7 @@
36951 .dcache_bsize = 32,
36953 .cpu_setup = __setup_cpu_750cx,
36954 + .machine_check = machine_check_generic,
36955 .platform = "ppc750",
36957 { /* 750CX (82201 and 82202) */
36958 @@ -531,6 +565,7 @@
36959 .dcache_bsize = 32,
36961 .cpu_setup = __setup_cpu_750cx,
36962 + .machine_check = machine_check_generic,
36963 .platform = "ppc750",
36965 { /* 750CXe (82214) */
36966 @@ -543,6 +578,7 @@
36967 .dcache_bsize = 32,
36969 .cpu_setup = __setup_cpu_750cx,
36970 + .machine_check = machine_check_generic,
36971 .platform = "ppc750",
36973 { /* 750CXe "Gekko" (83214) */
36974 @@ -555,6 +591,7 @@
36975 .dcache_bsize = 32,
36977 .cpu_setup = __setup_cpu_750cx,
36978 + .machine_check = machine_check_generic,
36979 .platform = "ppc750",
36982 @@ -567,6 +604,7 @@
36983 .dcache_bsize = 32,
36985 .cpu_setup = __setup_cpu_750,
36986 + .machine_check = machine_check_generic,
36987 .platform = "ppc750",
36990 @@ -579,6 +617,7 @@
36991 .dcache_bsize = 32,
36993 .cpu_setup = __setup_cpu_750,
36994 + .machine_check = machine_check_generic,
36995 .platform = "ppc750",
36997 { /* 750FX rev 1.x */
36998 @@ -591,6 +630,7 @@
36999 .dcache_bsize = 32,
37001 .cpu_setup = __setup_cpu_750,
37002 + .machine_check = machine_check_generic,
37003 .platform = "ppc750",
37005 { /* 750FX rev 2.0 must disable HID0[DPM] */
37006 @@ -603,6 +643,7 @@
37007 .dcache_bsize = 32,
37009 .cpu_setup = __setup_cpu_750,
37010 + .machine_check = machine_check_generic,
37011 .platform = "ppc750",
37013 { /* 750FX (All revs except 2.0) */
37014 @@ -615,6 +656,7 @@
37015 .dcache_bsize = 32,
37017 .cpu_setup = __setup_cpu_750fx,
37018 + .machine_check = machine_check_generic,
37019 .platform = "ppc750",
37022 @@ -627,6 +669,7 @@
37023 .dcache_bsize = 32,
37025 .cpu_setup = __setup_cpu_750fx,
37026 + .machine_check = machine_check_generic,
37027 .platform = "ppc750",
37029 { /* 740/750 (L2CR bit need fixup for 740) */
37030 @@ -639,6 +682,7 @@
37031 .dcache_bsize = 32,
37033 .cpu_setup = __setup_cpu_750,
37034 + .machine_check = machine_check_generic,
37035 .platform = "ppc750",
37037 { /* 7400 rev 1.1 ? (no TAU) */
37038 @@ -652,6 +696,7 @@
37039 .dcache_bsize = 32,
37041 .cpu_setup = __setup_cpu_7400,
37042 + .machine_check = machine_check_generic,
37043 .platform = "ppc7400",
37046 @@ -665,6 +710,7 @@
37047 .dcache_bsize = 32,
37049 .cpu_setup = __setup_cpu_7400,
37050 + .machine_check = machine_check_generic,
37051 .platform = "ppc7400",
37054 @@ -678,6 +724,7 @@
37055 .dcache_bsize = 32,
37057 .cpu_setup = __setup_cpu_7410,
37058 + .machine_check = machine_check_generic,
37059 .platform = "ppc7400",
37061 { /* 7450 2.0 - no doze/nap */
37062 @@ -693,6 +740,7 @@
37063 .cpu_setup = __setup_cpu_745x,
37064 .oprofile_cpu_type = "ppc/7450",
37065 .oprofile_type = PPC_OPROFILE_G4,
37066 + .machine_check = machine_check_generic,
37067 .platform = "ppc7450",
37070 @@ -708,6 +756,7 @@
37071 .cpu_setup = __setup_cpu_745x,
37072 .oprofile_cpu_type = "ppc/7450",
37073 .oprofile_type = PPC_OPROFILE_G4,
37074 + .machine_check = machine_check_generic,
37075 .platform = "ppc7450",
37077 { /* 7450 2.3 and newer */
37078 @@ -723,6 +772,7 @@
37079 .cpu_setup = __setup_cpu_745x,
37080 .oprofile_cpu_type = "ppc/7450",
37081 .oprofile_type = PPC_OPROFILE_G4,
37082 + .machine_check = machine_check_generic,
37083 .platform = "ppc7450",
37085 { /* 7455 rev 1.x */
37086 @@ -738,6 +788,7 @@
37087 .cpu_setup = __setup_cpu_745x,
37088 .oprofile_cpu_type = "ppc/7450",
37089 .oprofile_type = PPC_OPROFILE_G4,
37090 + .machine_check = machine_check_generic,
37091 .platform = "ppc7450",
37093 { /* 7455 rev 2.0 */
37094 @@ -753,6 +804,7 @@
37095 .cpu_setup = __setup_cpu_745x,
37096 .oprofile_cpu_type = "ppc/7450",
37097 .oprofile_type = PPC_OPROFILE_G4,
37098 + .machine_check = machine_check_generic,
37099 .platform = "ppc7450",
37101 { /* 7455 others */
37102 @@ -768,6 +820,7 @@
37103 .cpu_setup = __setup_cpu_745x,
37104 .oprofile_cpu_type = "ppc/7450",
37105 .oprofile_type = PPC_OPROFILE_G4,
37106 + .machine_check = machine_check_generic,
37107 .platform = "ppc7450",
37109 { /* 7447/7457 Rev 1.0 */
37110 @@ -783,6 +836,7 @@
37111 .cpu_setup = __setup_cpu_745x,
37112 .oprofile_cpu_type = "ppc/7450",
37113 .oprofile_type = PPC_OPROFILE_G4,
37114 + .machine_check = machine_check_generic,
37115 .platform = "ppc7450",
37117 { /* 7447/7457 Rev 1.1 */
37118 @@ -798,6 +852,7 @@
37119 .cpu_setup = __setup_cpu_745x,
37120 .oprofile_cpu_type = "ppc/7450",
37121 .oprofile_type = PPC_OPROFILE_G4,
37122 + .machine_check = machine_check_generic,
37123 .platform = "ppc7450",
37125 { /* 7447/7457 Rev 1.2 and later */
37126 @@ -812,6 +867,7 @@
37127 .cpu_setup = __setup_cpu_745x,
37128 .oprofile_cpu_type = "ppc/7450",
37129 .oprofile_type = PPC_OPROFILE_G4,
37130 + .machine_check = machine_check_generic,
37131 .platform = "ppc7450",
37134 @@ -827,6 +883,7 @@
37135 .cpu_setup = __setup_cpu_745x,
37136 .oprofile_cpu_type = "ppc/7450",
37137 .oprofile_type = PPC_OPROFILE_G4,
37138 + .machine_check = machine_check_generic,
37139 .platform = "ppc7450",
37142 @@ -842,6 +899,7 @@
37143 .cpu_setup = __setup_cpu_745x,
37144 .oprofile_cpu_type = "ppc/7450",
37145 .oprofile_type = PPC_OPROFILE_G4,
37146 + .machine_check = machine_check_generic,
37147 .platform = "ppc7450",
37149 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
37150 @@ -853,6 +911,7 @@
37151 .icache_bsize = 32,
37152 .dcache_bsize = 32,
37153 .cpu_setup = __setup_cpu_603,
37154 + .machine_check = machine_check_generic,
37155 .platform = "ppc603",
37157 { /* All G2_LE (603e core, plus some) have the same pvr */
37158 @@ -864,6 +923,7 @@
37159 .icache_bsize = 32,
37160 .dcache_bsize = 32,
37161 .cpu_setup = __setup_cpu_603,
37162 + .machine_check = machine_check_generic,
37163 .platform = "ppc603",
37165 { /* e300c1 (a 603e core, plus some) on 83xx */
37166 @@ -875,6 +935,7 @@
37167 .icache_bsize = 32,
37168 .dcache_bsize = 32,
37169 .cpu_setup = __setup_cpu_603,
37170 + .machine_check = machine_check_generic,
37171 .platform = "ppc603",
37173 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
37174 @@ -886,9 +947,10 @@
37175 .icache_bsize = 32,
37176 .dcache_bsize = 32,
37177 .cpu_setup = __setup_cpu_603,
37178 + .machine_check = machine_check_generic,
37179 .platform = "ppc603",
37181 - { /* e300c3 on 83xx */
37182 + { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
37183 .pvr_mask = 0x7fff0000,
37184 .pvr_value = 0x00850000,
37185 .cpu_name = "e300c3",
37186 @@ -899,6 +961,18 @@
37187 .cpu_setup = __setup_cpu_603,
37188 .platform = "ppc603",
37190 + { /* e300c4 (e300c1, plus one IU) */
37191 + .pvr_mask = 0x7fff0000,
37192 + .pvr_value = 0x00860000,
37193 + .cpu_name = "e300c4",
37194 + .cpu_features = CPU_FTRS_E300,
37195 + .cpu_user_features = COMMON_USER,
37196 + .icache_bsize = 32,
37197 + .dcache_bsize = 32,
37198 + .cpu_setup = __setup_cpu_603,
37199 + .machine_check = machine_check_generic,
37200 + .platform = "ppc603",
37202 { /* default match, we assume split I/D cache & TB (non-601)... */
37203 .pvr_mask = 0x00000000,
37204 .pvr_value = 0x00000000,
37205 @@ -907,6 +981,7 @@
37206 .cpu_user_features = COMMON_USER,
37207 .icache_bsize = 32,
37208 .dcache_bsize = 32,
37209 + .machine_check = machine_check_generic,
37210 .platform = "ppc603",
37212 #endif /* CLASSIC_PPC */
37213 @@ -933,6 +1008,7 @@
37214 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
37215 .icache_bsize = 16,
37216 .dcache_bsize = 16,
37217 + .machine_check = machine_check_4xx,
37218 .platform = "ppc403",
37221 @@ -944,6 +1020,7 @@
37222 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
37223 .icache_bsize = 16,
37224 .dcache_bsize = 16,
37225 + .machine_check = machine_check_4xx,
37226 .platform = "ppc403",
37229 @@ -954,6 +1031,7 @@
37230 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
37231 .icache_bsize = 16,
37232 .dcache_bsize = 16,
37233 + .machine_check = machine_check_4xx,
37234 .platform = "ppc403",
37237 @@ -965,6 +1043,7 @@
37238 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37239 .icache_bsize = 32,
37240 .dcache_bsize = 32,
37241 + .machine_check = machine_check_4xx,
37242 .platform = "ppc405",
37245 @@ -976,6 +1055,7 @@
37246 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37247 .icache_bsize = 32,
37248 .dcache_bsize = 32,
37249 + .machine_check = machine_check_4xx,
37250 .platform = "ppc405",
37253 @@ -987,6 +1067,7 @@
37254 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37255 .icache_bsize = 32,
37256 .dcache_bsize = 32,
37257 + .machine_check = machine_check_4xx,
37258 .platform = "ppc405",
37261 @@ -998,6 +1079,7 @@
37262 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37263 .icache_bsize = 32,
37264 .dcache_bsize = 32,
37265 + .machine_check = machine_check_4xx,
37266 .platform = "ppc405",
37269 @@ -1009,6 +1091,7 @@
37270 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37271 .icache_bsize = 32,
37272 .dcache_bsize = 32,
37273 + .machine_check = machine_check_4xx,
37274 .platform = "ppc405",
37277 @@ -1020,6 +1103,7 @@
37278 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37279 .icache_bsize = 32,
37280 .dcache_bsize = 32,
37281 + .machine_check = machine_check_4xx,
37282 .platform = "ppc405",
37285 @@ -1031,6 +1115,7 @@
37286 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37287 .icache_bsize = 32,
37288 .dcache_bsize = 32,
37289 + .machine_check = machine_check_4xx,
37290 .platform = "ppc405",
37293 @@ -1042,6 +1127,7 @@
37294 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37295 .icache_bsize = 32,
37296 .dcache_bsize = 32,
37297 + .machine_check = machine_check_4xx,
37298 .platform = "ppc405",
37301 @@ -1052,6 +1138,7 @@
37302 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
37303 .icache_bsize = 32,
37304 .dcache_bsize = 32,
37305 + .machine_check = machine_check_4xx,
37306 .platform = "ppc405",
37308 { /* Xilinx Virtex-II Pro */
37309 @@ -1063,6 +1150,7 @@
37310 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37311 .icache_bsize = 32,
37312 .dcache_bsize = 32,
37313 + .machine_check = machine_check_4xx,
37314 .platform = "ppc405",
37316 { /* Xilinx Virtex-4 FX */
37317 @@ -1074,6 +1162,7 @@
37318 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37319 .icache_bsize = 32,
37320 .dcache_bsize = 32,
37321 + .machine_check = machine_check_4xx,
37322 .platform = "ppc405",
37325 @@ -1085,17 +1174,31 @@
37326 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37327 .icache_bsize = 32,
37328 .dcache_bsize = 32,
37329 + .machine_check = machine_check_4xx,
37330 .platform = "ppc405",
37333 - .pvr_mask = 0xffff0000,
37334 - .pvr_value = 0x12910000,
37335 + .pvr_mask = 0xffff0004,
37336 + .pvr_value = 0x12910004,
37337 .cpu_name = "405EX",
37338 .cpu_features = CPU_FTRS_40X,
37339 .cpu_user_features = PPC_FEATURE_32 |
37340 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37341 .icache_bsize = 32,
37342 .dcache_bsize = 32,
37343 + .machine_check = machine_check_4xx,
37344 + .platform = "ppc405",
37347 + .pvr_mask = 0xffff0004,
37348 + .pvr_value = 0x12910000,
37349 + .cpu_name = "405EXr",
37350 + .cpu_features = CPU_FTRS_40X,
37351 + .cpu_user_features = PPC_FEATURE_32 |
37352 + PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
37353 + .icache_bsize = 32,
37354 + .dcache_bsize = 32,
37355 + .machine_check = machine_check_4xx,
37356 .platform = "ppc405",
37359 @@ -1109,6 +1212,7 @@
37360 .cpu_user_features = COMMON_USER_BOOKE,
37361 .icache_bsize = 32,
37362 .dcache_bsize = 32,
37363 + .machine_check = machine_check_4xx,
37364 .platform = "ppc440",
37366 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
37367 @@ -1120,6 +1224,7 @@
37368 .icache_bsize = 32,
37369 .dcache_bsize = 32,
37370 .cpu_setup = __setup_cpu_440ep,
37371 + .machine_check = machine_check_4xx,
37372 .platform = "ppc440",
37375 @@ -1130,6 +1235,19 @@
37376 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
37377 .icache_bsize = 32,
37378 .dcache_bsize = 32,
37379 + .machine_check = machine_check_4xx,
37380 + .platform = "ppc440",
37382 + { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
37383 + .pvr_mask = 0xf0000ff7,
37384 + .pvr_value = 0x400008d4,
37385 + .cpu_name = "440EP Rev. C",
37386 + .cpu_features = CPU_FTRS_44X,
37387 + .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
37388 + .icache_bsize = 32,
37389 + .dcache_bsize = 32,
37390 + .cpu_setup = __setup_cpu_440ep,
37391 + .machine_check = machine_check_4xx,
37392 .platform = "ppc440",
37394 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
37395 @@ -1141,6 +1259,7 @@
37396 .icache_bsize = 32,
37397 .dcache_bsize = 32,
37398 .cpu_setup = __setup_cpu_440ep,
37399 + .machine_check = machine_check_4xx,
37400 .platform = "ppc440",
37403 @@ -1152,6 +1271,7 @@
37404 .icache_bsize = 32,
37405 .dcache_bsize = 32,
37406 .cpu_setup = __setup_cpu_440grx,
37407 + .machine_check = machine_check_440A,
37408 .platform = "ppc440",
37410 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
37411 @@ -1163,6 +1283,7 @@
37412 .icache_bsize = 32,
37413 .dcache_bsize = 32,
37414 .cpu_setup = __setup_cpu_440epx,
37415 + .machine_check = machine_check_440A,
37416 .platform = "ppc440",
37418 { /* 440GP Rev. B */
37419 @@ -1173,6 +1294,7 @@
37420 .cpu_user_features = COMMON_USER_BOOKE,
37421 .icache_bsize = 32,
37422 .dcache_bsize = 32,
37423 + .machine_check = machine_check_4xx,
37424 .platform = "ppc440gp",
37426 { /* 440GP Rev. C */
37427 @@ -1183,6 +1305,7 @@
37428 .cpu_user_features = COMMON_USER_BOOKE,
37429 .icache_bsize = 32,
37430 .dcache_bsize = 32,
37431 + .machine_check = machine_check_4xx,
37432 .platform = "ppc440gp",
37434 { /* 440GX Rev. A */
37435 @@ -1193,6 +1316,8 @@
37436 .cpu_user_features = COMMON_USER_BOOKE,
37437 .icache_bsize = 32,
37438 .dcache_bsize = 32,
37439 + .cpu_setup = __setup_cpu_440gx,
37440 + .machine_check = machine_check_440A,
37441 .platform = "ppc440",
37443 { /* 440GX Rev. B */
37444 @@ -1203,6 +1328,8 @@
37445 .cpu_user_features = COMMON_USER_BOOKE,
37446 .icache_bsize = 32,
37447 .dcache_bsize = 32,
37448 + .cpu_setup = __setup_cpu_440gx,
37449 + .machine_check = machine_check_440A,
37450 .platform = "ppc440",
37452 { /* 440GX Rev. C */
37453 @@ -1213,6 +1340,8 @@
37454 .cpu_user_features = COMMON_USER_BOOKE,
37455 .icache_bsize = 32,
37456 .dcache_bsize = 32,
37457 + .cpu_setup = __setup_cpu_440gx,
37458 + .machine_check = machine_check_440A,
37459 .platform = "ppc440",
37461 { /* 440GX Rev. F */
37462 @@ -1223,6 +1352,8 @@
37463 .cpu_user_features = COMMON_USER_BOOKE,
37464 .icache_bsize = 32,
37465 .dcache_bsize = 32,
37466 + .cpu_setup = __setup_cpu_440gx,
37467 + .machine_check = machine_check_440A,
37468 .platform = "ppc440",
37470 { /* 440SP Rev. A */
37471 @@ -1233,6 +1364,7 @@
37472 .cpu_user_features = COMMON_USER_BOOKE,
37473 .icache_bsize = 32,
37474 .dcache_bsize = 32,
37475 + .machine_check = machine_check_4xx,
37476 .platform = "ppc440",
37478 { /* 440SPe Rev. A */
37479 @@ -1243,6 +1375,8 @@
37480 .cpu_user_features = COMMON_USER_BOOKE,
37481 .icache_bsize = 32,
37482 .dcache_bsize = 32,
37483 + .cpu_setup = __setup_cpu_440spe,
37484 + .machine_check = machine_check_440A,
37485 .platform = "ppc440",
37487 { /* 440SPe Rev. B */
37488 @@ -1253,10 +1387,13 @@
37489 .cpu_user_features = COMMON_USER_BOOKE,
37490 .icache_bsize = 32,
37491 .dcache_bsize = 32,
37492 + .cpu_setup = __setup_cpu_440spe,
37493 + .machine_check = machine_check_440A,
37494 .platform = "ppc440",
37496 #endif /* CONFIG_44x */
37497 #ifdef CONFIG_FSL_BOOKE
37498 +#ifdef CONFIG_E200
37500 .pvr_mask = 0xfff00000,
37501 .pvr_value = 0x81000000,
37502 @@ -1267,6 +1404,7 @@
37503 PPC_FEATURE_HAS_EFP_SINGLE |
37504 PPC_FEATURE_UNIFIED_CACHE,
37505 .dcache_bsize = 32,
37506 + .machine_check = machine_check_e200,
37507 .platform = "ppc5554",
37510 @@ -1280,8 +1418,10 @@
37511 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
37512 PPC_FEATURE_UNIFIED_CACHE,
37513 .dcache_bsize = 32,
37514 + .machine_check = machine_check_e200,
37515 .platform = "ppc5554",
37517 +#elif defined(CONFIG_E500)
37519 .pvr_mask = 0xffff0000,
37520 .pvr_value = 0x80200000,
37521 @@ -1296,6 +1436,7 @@
37523 .oprofile_cpu_type = "ppc/e500",
37524 .oprofile_type = PPC_OPROFILE_BOOKE,
37525 + .machine_check = machine_check_e500,
37526 .platform = "ppc8540",
37529 @@ -1313,9 +1454,11 @@
37531 .oprofile_cpu_type = "ppc/e500",
37532 .oprofile_type = PPC_OPROFILE_BOOKE,
37533 + .machine_check = machine_check_e500,
37534 .platform = "ppc8548",
37539 { /* default match */
37540 .pvr_mask = 0x00000000,
37541 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/crash.c powerpc.git/arch/powerpc/kernel/crash.c
37542 --- linux-2.6.24/arch/powerpc/kernel/crash.c 2008-01-24 23:58:37.000000000 +0100
37543 +++ powerpc.git/arch/powerpc/kernel/crash.c 2008-01-28 20:25:49.000000000 +0100
37545 #include <asm/lmb.h>
37546 #include <asm/firmware.h>
37547 #include <asm/smp.h>
37548 +#include <asm/system.h>
37549 +#include <asm/setjmp.h>
37552 #include <asm/udbg.h>
37554 static cpumask_t cpus_in_crash = CPU_MASK_NONE;
37555 cpumask_t cpus_in_sr = CPU_MASK_NONE;
37557 +#define CRASH_HANDLER_MAX 1
37558 +/* NULL terminated list of shutdown handles */
37559 +static crash_shutdown_t crash_shutdown_handles[CRASH_HANDLER_MAX+1];
37560 +static DEFINE_SPINLOCK(crash_handlers_lock);
37563 static atomic_t enter_on_soft_reset = ATOMIC_INIT(0);
37565 @@ -285,9 +292,72 @@
37567 #endif /* CONFIG_SPU_BASE */
37570 + * Register a function to be called on shutdown. Only use this if you
37571 + * can't reset your device in the second kernel.
37573 +int crash_shutdown_register(crash_shutdown_t handler)
37575 + unsigned int i, rc;
37577 + spin_lock(&crash_handlers_lock);
37578 + for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
37579 + if (!crash_shutdown_handles[i]) {
37580 + /* Insert handle at first empty entry */
37581 + crash_shutdown_handles[i] = handler;
37586 + if (i == CRASH_HANDLER_MAX) {
37587 + printk(KERN_ERR "Crash shutdown handles full, "
37588 + "not registered.\n");
37592 + spin_unlock(&crash_handlers_lock);
37595 +EXPORT_SYMBOL(crash_shutdown_register);
37597 +int crash_shutdown_unregister(crash_shutdown_t handler)
37599 + unsigned int i, rc;
37601 + spin_lock(&crash_handlers_lock);
37602 + for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
37603 + if (crash_shutdown_handles[i] == handler)
37606 + if (i == CRASH_HANDLER_MAX) {
37607 + printk(KERN_ERR "Crash shutdown handle not found\n");
37610 + /* Shift handles down */
37611 + for (; crash_shutdown_handles[i]; i++)
37612 + crash_shutdown_handles[i] =
37613 + crash_shutdown_handles[i+1];
37617 + spin_unlock(&crash_handlers_lock);
37620 +EXPORT_SYMBOL(crash_shutdown_unregister);
37622 +static unsigned long crash_shutdown_buf[JMP_BUF_LEN];
37624 +static int handle_fault(struct pt_regs *regs)
37626 + longjmp(crash_shutdown_buf, 1);
37630 void default_machine_crash_shutdown(struct pt_regs *regs)
37632 - unsigned int irq;
37634 + int (*old_handler)(struct pt_regs *regs);
37638 * This function is only called after the system
37639 @@ -301,15 +371,36 @@
37641 hard_irq_disable();
37643 - for_each_irq(irq) {
37644 - struct irq_desc *desc = irq_desc + irq;
37645 + for_each_irq(i) {
37646 + struct irq_desc *desc = irq_desc + i;
37648 if (desc->status & IRQ_INPROGRESS)
37649 - desc->chip->eoi(irq);
37650 + desc->chip->eoi(i);
37652 if (!(desc->status & IRQ_DISABLED))
37653 - desc->chip->disable(irq);
37654 + desc->chip->disable(i);
37658 + * Call registered shutdown routines savely. Swap out
37659 + * __debugger_fault_handler, and replace on exit.
37661 + old_handler = __debugger_fault_handler;
37662 + __debugger_fault_handler = handle_fault;
37663 + for (i = 0; crash_shutdown_handles[i]; i++) {
37664 + if (setjmp(crash_shutdown_buf) == 0) {
37666 + * Insert syncs and delay to ensure
37667 + * instructions in the dangerous region don't
37668 + * leak away from this protected region.
37670 + asm volatile("sync; isync");
37671 + /* dangerous region */
37672 + crash_shutdown_handles[i]();
37673 + asm volatile("sync; isync");
37676 + __debugger_fault_handler = old_handler;
37679 * Make a note of crashing cpu. Will be used in machine_kexec
37680 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/dma_64.c powerpc.git/arch/powerpc/kernel/dma_64.c
37681 --- linux-2.6.24/arch/powerpc/kernel/dma_64.c 2008-01-24 23:58:37.000000000 +0100
37682 +++ powerpc.git/arch/powerpc/kernel/dma_64.c 2008-01-28 20:25:49.000000000 +0100
37683 @@ -112,10 +112,16 @@
37685 * Generic direct DMA implementation
37687 - * This implementation supports a global offset that can be applied if
37688 - * the address at which memory is visible to devices is not 0.
37689 + * This implementation supports a per-device offset that can be applied if
37690 + * the address at which memory is visible to devices is not 0. Platform code
37691 + * can set archdata.dma_data to an unsigned long holding the offset. By
37692 + * default the offset is zero.
37694 -unsigned long dma_direct_offset;
37696 +static unsigned long get_dma_direct_offset(struct device *dev)
37698 + return (unsigned long)dev->archdata.dma_data;
37701 static void *dma_direct_alloc_coherent(struct device *dev, size_t size,
37702 dma_addr_t *dma_handle, gfp_t flag)
37703 @@ -124,13 +130,12 @@
37705 int node = dev->archdata.numa_node;
37707 - /* TODO: Maybe use the numa node here too ? */
37708 page = alloc_pages_node(node, flag, get_order(size));
37711 ret = page_address(page);
37712 memset(ret, 0, size);
37713 - *dma_handle = virt_to_abs(ret) | dma_direct_offset;
37714 + *dma_handle = virt_to_abs(ret) + get_dma_direct_offset(dev);
37718 @@ -145,7 +150,7 @@
37720 enum dma_data_direction direction)
37722 - return virt_to_abs(ptr) | dma_direct_offset;
37723 + return virt_to_abs(ptr) + get_dma_direct_offset(dev);
37726 static void dma_direct_unmap_single(struct device *dev, dma_addr_t dma_addr,
37727 @@ -161,7 +166,7 @@
37730 for_each_sg(sgl, sg, nents, i) {
37731 - sg->dma_address = sg_phys(sg) | dma_direct_offset;
37732 + sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev);
37733 sg->dma_length = sg->length;
37736 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/head_44x.S powerpc.git/arch/powerpc/kernel/head_44x.S
37737 --- linux-2.6.24/arch/powerpc/kernel/head_44x.S 2008-01-24 23:58:37.000000000 +0100
37738 +++ powerpc.git/arch/powerpc/kernel/head_44x.S 2008-01-28 20:25:49.000000000 +0100
37739 @@ -289,11 +289,8 @@
37740 CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception)
37742 /* Machine Check Interrupt */
37743 -#ifdef CONFIG_440A
37744 - MCHECK_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
37746 CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
37748 + MCHECK_EXCEPTION(0x0210, MachineCheckA, machine_check_exception)
37750 /* Data Storage Interrupt */
37751 START_EXCEPTION(DataStorage)
37752 @@ -674,6 +671,15 @@
37756 + * Adjust the machine check IVOR on 440A cores
37758 +_GLOBAL(__fixup_440A_mcheck)
37759 + li r3,MachineCheckA@l
37760 + mtspr SPRN_IVOR1,r3
37765 * extern void giveup_altivec(struct task_struct *prev)
37767 * The 44x core does not have an AltiVec unit.
37768 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/head_booke.h powerpc.git/arch/powerpc/kernel/head_booke.h
37769 --- linux-2.6.24/arch/powerpc/kernel/head_booke.h 2008-01-24 23:58:37.000000000 +0100
37770 +++ powerpc.git/arch/powerpc/kernel/head_booke.h 2008-01-28 20:25:49.000000000 +0100
37771 @@ -166,7 +166,7 @@
37772 mfspr r5,SPRN_ESR; \
37773 stw r5,_ESR(r11); \
37774 addi r3,r1,STACK_FRAME_OVERHEAD; \
37775 - EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
37776 + EXC_XFER_TEMPLATE(hdlr, n+4, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
37777 NOCOPY, mcheck_transfer_to_handler, \
37778 ret_from_mcheck_exc)
37780 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/head_fsl_booke.S powerpc.git/arch/powerpc/kernel/head_fsl_booke.S
37781 --- linux-2.6.24/arch/powerpc/kernel/head_fsl_booke.S 2008-01-24 23:58:37.000000000 +0100
37782 +++ powerpc.git/arch/powerpc/kernel/head_fsl_booke.S 2008-01-28 20:25:49.000000000 +0100
37784 /* We try to not make any assumptions about how the boot loader
37785 * setup or used the TLBs. We invalidate all mappings from the
37786 * boot loader and load a single entry in TLB1[0] to map the
37787 - * first 16M of kernel memory. Any boot info passed from the
37788 - * bootloader needs to live in this first 16M.
37789 + * first 64M of kernel memory. Any boot info passed from the
37790 + * bootloader needs to live in this first 64M.
37792 * Requirement on bootloader:
37793 * - The page we're executing in needs to reside in TLB1 and
37794 @@ -167,7 +167,7 @@
37798 - /* Just modify the entry ID and EPN for the temp mapping */
37799 + /* Just modify the entry ID, EPN and RPN for the temp mapping */
37800 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
37801 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
37803 @@ -177,9 +177,12 @@
37804 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_4K))@l
37807 - li r7,0 /* temp EPN = 0 */
37808 + lis r7,PHYSICAL_START@h
37809 rlwimi r7,r6,0,20,31
37811 + mfspr r6,SPRN_MAS3
37812 + rlwimi r7,r6,0,20,31
37813 + mtspr SPRN_MAS3,r7
37817 @@ -222,11 +225,11 @@
37818 lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */
37820 lis r6,(MAS1_VALID|MAS1_IPROT)@h
37821 - ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_16M))@l
37822 + ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_64M))@l
37825 - lis r6,KERNELBASE@h
37826 - ori r6,r6,KERNELBASE@l
37827 + lis r6,PAGE_OFFSET@h
37828 + ori r6,r6,PAGE_OFFSET@l
37829 rlwimi r6,r7,0,20,31
37831 li r7,(MAS3_SX|MAS3_SW|MAS3_SR)
37832 @@ -234,6 +237,9 @@
37835 /* 7. Jump to KERNELBASE mapping */
37836 + lis r6,KERNELBASE@h
37837 + ori r6,r6,KERNELBASE@l
37838 + rlwimi r6,r7,0,20,31
37839 lis r7,MSR_KERNEL@h
37840 ori r7,r7,MSR_KERNEL@l
37841 bl 1f /* Find our address */
37842 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/ibmebus.c powerpc.git/arch/powerpc/kernel/ibmebus.c
37843 --- linux-2.6.24/arch/powerpc/kernel/ibmebus.c 2008-01-24 23:58:37.000000000 +0100
37844 +++ powerpc.git/arch/powerpc/kernel/ibmebus.c 2008-01-28 20:25:49.000000000 +0100
37846 #include <linux/kobject.h>
37847 #include <linux/dma-mapping.h>
37848 #include <linux/interrupt.h>
37849 +#include <linux/of.h>
37850 #include <linux/of_platform.h>
37851 #include <asm/ibmebus.h>
37852 #include <asm/abs_addr.h>
37854 struct bus_type ibmebus_bus_type;
37856 /* These devices will automatically be added to the bus during init */
37857 -static struct of_device_id builtin_matches[] = {
37858 +static struct of_device_id __initdata builtin_matches[] = {
37859 { .compatible = "IBM,lhca" },
37860 { .compatible = "IBM,lhea" },
37862 @@ -171,7 +172,7 @@
37864 root = of_find_node_by_path("/");
37866 - for (child = NULL; (child = of_get_next_child(root, child)); ) {
37867 + for_each_child_of_node(root, child) {
37868 if (!of_match_node(matches, child))
37871 @@ -197,16 +198,13 @@
37872 /* If the driver uses devices that ibmebus doesn't know, add them */
37873 ibmebus_create_devices(drv->match_table);
37875 - drv->driver.name = drv->name;
37876 - drv->driver.bus = &ibmebus_bus_type;
37878 - return driver_register(&drv->driver);
37879 + return of_register_driver(drv, &ibmebus_bus_type);
37881 EXPORT_SYMBOL(ibmebus_register_driver);
37883 void ibmebus_unregister_driver(struct of_platform_driver *drv)
37885 - driver_unregister(&drv->driver);
37886 + of_unregister_driver(drv);
37888 EXPORT_SYMBOL(ibmebus_unregister_driver);
37890 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/iommu.c powerpc.git/arch/powerpc/kernel/iommu.c
37891 --- linux-2.6.24/arch/powerpc/kernel/iommu.c 2008-01-24 23:58:37.000000000 +0100
37892 +++ powerpc.git/arch/powerpc/kernel/iommu.c 2008-01-28 20:25:49.000000000 +0100
37893 @@ -532,16 +532,14 @@
37897 -void iommu_free_table(struct device_node *dn)
37898 +void iommu_free_table(struct iommu_table *tbl, const char *node_name)
37900 - struct pci_dn *pdn = dn->data;
37901 - struct iommu_table *tbl = pdn->iommu_table;
37902 unsigned long bitmap_sz, i;
37903 unsigned int order;
37905 if (!tbl || !tbl->it_map) {
37906 printk(KERN_ERR "%s: expected TCE map for %s\n", __FUNCTION__,
37912 @@ -550,7 +548,7 @@
37913 for (i = 0; i < (tbl->it_size/64); i++) {
37914 if (tbl->it_map[i] != 0) {
37915 printk(KERN_WARNING "%s: Unexpected TCEs for %s\n",
37916 - __FUNCTION__, dn->full_name);
37917 + __FUNCTION__, node_name);
37921 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/isa-bridge.c powerpc.git/arch/powerpc/kernel/isa-bridge.c
37922 --- linux-2.6.24/arch/powerpc/kernel/isa-bridge.c 2008-01-24 23:58:37.000000000 +0100
37923 +++ powerpc.git/arch/powerpc/kernel/isa-bridge.c 2008-01-28 20:25:49.000000000 +0100
37924 @@ -108,7 +108,7 @@
37925 if (size > 0x10000)
37928 - printk(KERN_ERR "no ISA IO ranges or unexpected isa range,"
37929 + printk(KERN_ERR "no ISA IO ranges or unexpected isa range, "
37932 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
37933 @@ -116,7 +116,7 @@
37937 - printk(KERN_ERR "no ISA IO ranges or unexpected isa range,"
37938 + printk(KERN_ERR "no ISA IO ranges or unexpected isa range, "
37940 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
37941 0x10000, _PAGE_NO_CACHE|_PAGE_GUARDED);
37942 @@ -145,7 +145,7 @@
37943 for_each_node_by_type(np, "isa") {
37944 /* Look for our hose being a parent */
37945 for (parent = of_get_parent(np); parent;) {
37946 - if (parent == hose->arch_data) {
37947 + if (parent == hose->dn) {
37948 of_node_put(parent);
37951 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/legacy_serial.c powerpc.git/arch/powerpc/kernel/legacy_serial.c
37952 --- linux-2.6.24/arch/powerpc/kernel/legacy_serial.c 2008-01-24 23:58:37.000000000 +0100
37953 +++ powerpc.git/arch/powerpc/kernel/legacy_serial.c 2008-01-28 20:25:49.000000000 +0100
37954 @@ -307,7 +307,7 @@
37957 /* First fill our array with SOC ports */
37958 - for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) {
37959 + for_each_compatible_node(np, "serial", "ns16550") {
37960 struct device_node *soc = of_get_parent(np);
37961 if (soc && !strcmp(soc->type, "soc")) {
37962 index = add_legacy_soc_port(np, np);
37963 @@ -318,7 +318,7 @@
37966 /* First fill our array with ISA ports */
37967 - for (np = NULL; (np = of_find_node_by_type(np, "serial"));) {
37968 + for_each_node_by_type(np, "serial") {
37969 struct device_node *isa = of_get_parent(np);
37970 if (isa && !strcmp(isa->name, "isa")) {
37971 index = add_legacy_isa_port(np, isa);
37972 @@ -329,7 +329,7 @@
37975 /* First fill our array with tsi-bridge ports */
37976 - for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) {
37977 + for_each_compatible_node(np, "serial", "ns16550") {
37978 struct device_node *tsi = of_get_parent(np);
37979 if (tsi && !strcmp(tsi->type, "tsi-bridge")) {
37980 index = add_legacy_soc_port(np, np);
37981 @@ -340,7 +340,7 @@
37984 /* First fill our array with opb bus ports */
37985 - for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) {
37986 + for_each_compatible_node(np, "serial", "ns16550") {
37987 struct device_node *opb = of_get_parent(np);
37988 if (opb && (!strcmp(opb->type, "opb") ||
37989 of_device_is_compatible(opb, "ibm,opb"))) {
37990 @@ -474,7 +474,7 @@
37993 * Before we register the platfrom serial devices, we need
37994 - * to fixup their interrutps and their IO ports.
37995 + * to fixup their interrupts and their IO ports.
37997 DBG("Fixing serial ports interrupts and IO ports ...\n");
37999 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/lparcfg.c powerpc.git/arch/powerpc/kernel/lparcfg.c
38000 --- linux-2.6.24/arch/powerpc/kernel/lparcfg.c 2008-01-24 23:58:37.000000000 +0100
38001 +++ powerpc.git/arch/powerpc/kernel/lparcfg.c 2008-01-28 20:25:49.000000000 +0100
38003 /* #define LPARCFG_DEBUG */
38005 static struct proc_dir_entry *proc_ppc64_lparcfg;
38006 -#define LPARCFG_BUFF_SIZE 4096
38009 * Track sum of all purrs across all processors. This is used to further
38010 @@ -595,13 +594,6 @@
38011 ent = create_proc_entry("ppc64/lparcfg", mode, NULL);
38013 ent->proc_fops = &lparcfg_fops;
38014 - ent->data = kmalloc(LPARCFG_BUFF_SIZE, GFP_KERNEL);
38015 - if (!ent->data) {
38017 - "Failed to allocate buffer for lparcfg\n");
38018 - remove_proc_entry("lparcfg", ent->parent);
38022 printk(KERN_ERR "Failed to create ppc64/lparcfg\n");
38024 @@ -613,10 +605,8 @@
38026 void __exit lparcfg_cleanup(void)
38028 - if (proc_ppc64_lparcfg) {
38029 - kfree(proc_ppc64_lparcfg->data);
38030 + if (proc_ppc64_lparcfg)
38031 remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent);
38035 module_init(lparcfg_init);
38036 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/misc.S powerpc.git/arch/powerpc/kernel/misc.S
38037 --- linux-2.6.24/arch/powerpc/kernel/misc.S 2008-01-24 23:58:37.000000000 +0100
38038 +++ powerpc.git/arch/powerpc/kernel/misc.S 2008-01-28 20:25:49.000000000 +0100
38040 * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
38041 * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
38043 + * setjmp/longjmp code by Paul Mackerras.
38045 * This program is free software; you can redistribute it and/or
38046 * modify it under the terms of the GNU General Public License
38047 * as published by the Free Software Foundation; either version
38048 * 2 of the License, or (at your option) any later version.
38050 #include <asm/ppc_asm.h>
38051 +#include <asm/unistd.h>
38052 +#include <asm/asm-compat.h>
38053 +#include <asm/asm-offsets.h>
38062 +_GLOBAL(kernel_execve)
38063 + li r0,__NR_execve
38072 + PPC_STL r1,SZL(r3)
38073 + PPC_STL r2,2*SZL(r3)
38075 + PPC_STL r0,3*SZL(r3)
38076 + PPC_STL r13,4*SZL(r3)
38077 + PPC_STL r14,5*SZL(r3)
38078 + PPC_STL r15,6*SZL(r3)
38079 + PPC_STL r16,7*SZL(r3)
38080 + PPC_STL r17,8*SZL(r3)
38081 + PPC_STL r18,9*SZL(r3)
38082 + PPC_STL r19,10*SZL(r3)
38083 + PPC_STL r20,11*SZL(r3)
38084 + PPC_STL r21,12*SZL(r3)
38085 + PPC_STL r22,13*SZL(r3)
38086 + PPC_STL r23,14*SZL(r3)
38087 + PPC_STL r24,15*SZL(r3)
38088 + PPC_STL r25,16*SZL(r3)
38089 + PPC_STL r26,17*SZL(r3)
38090 + PPC_STL r27,18*SZL(r3)
38091 + PPC_STL r28,19*SZL(r3)
38092 + PPC_STL r29,20*SZL(r3)
38093 + PPC_STL r30,21*SZL(r3)
38094 + PPC_STL r31,22*SZL(r3)
38102 +1: PPC_LL r13,4*SZL(r3)
38103 + PPC_LL r14,5*SZL(r3)
38104 + PPC_LL r15,6*SZL(r3)
38105 + PPC_LL r16,7*SZL(r3)
38106 + PPC_LL r17,8*SZL(r3)
38107 + PPC_LL r18,9*SZL(r3)
38108 + PPC_LL r19,10*SZL(r3)
38109 + PPC_LL r20,11*SZL(r3)
38110 + PPC_LL r21,12*SZL(r3)
38111 + PPC_LL r22,13*SZL(r3)
38112 + PPC_LL r23,14*SZL(r3)
38113 + PPC_LL r24,15*SZL(r3)
38114 + PPC_LL r25,16*SZL(r3)
38115 + PPC_LL r26,17*SZL(r3)
38116 + PPC_LL r27,18*SZL(r3)
38117 + PPC_LL r28,19*SZL(r3)
38118 + PPC_LL r29,20*SZL(r3)
38119 + PPC_LL r30,21*SZL(r3)
38120 + PPC_LL r31,22*SZL(r3)
38121 + PPC_LL r0,3*SZL(r3)
38124 + PPC_LL r1,SZL(r3)
38125 + PPC_LL r2,2*SZL(r3)
38129 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/misc_32.S powerpc.git/arch/powerpc/kernel/misc_32.S
38130 --- linux-2.6.24/arch/powerpc/kernel/misc_32.S 2008-01-24 23:58:37.000000000 +0100
38131 +++ powerpc.git/arch/powerpc/kernel/misc_32.S 2008-01-28 20:25:49.000000000 +0100
38132 @@ -206,6 +206,45 @@
38139 + * Do an IO access in real mode
38141 +_GLOBAL(real_readb)
38144 + xori r0,r0,MSR_DR
38157 + * Do an IO access in real mode
38159 +_GLOBAL(real_writeb)
38162 + xori r0,r0,MSR_DR
38174 +#endif /* CONFIG_40x */
38178 @@ -793,13 +832,6 @@
38182 -_GLOBAL(kernel_execve)
38183 - li r0,__NR_execve
38190 * This routine is just here to keep GCC happy - sigh...
38192 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/misc_64.S powerpc.git/arch/powerpc/kernel/misc_64.S
38193 --- linux-2.6.24/arch/powerpc/kernel/misc_64.S 2008-01-24 23:58:37.000000000 +0100
38194 +++ powerpc.git/arch/powerpc/kernel/misc_64.S 2008-01-28 20:25:49.000000000 +0100
38195 @@ -518,13 +518,6 @@
38197 #endif /* CONFIG_ALTIVEC */
38199 -_GLOBAL(kernel_execve)
38200 - li r0,__NR_execve
38206 /* kexec_wait(phys_cpu)
38208 * wait for the flag to change, indicating this kernel is going away but
38209 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/module_32.c powerpc.git/arch/powerpc/kernel/module_32.c
38210 --- linux-2.6.24/arch/powerpc/kernel/module_32.c 2008-01-24 23:58:37.000000000 +0100
38211 +++ powerpc.git/arch/powerpc/kernel/module_32.c 2008-01-28 20:25:49.000000000 +0100
38213 #include <linux/kernel.h>
38214 #include <linux/cache.h>
38215 #include <linux/bug.h>
38216 +#include <linux/sort.h>
38220 @@ -54,22 +55,60 @@
38222 static unsigned int count_relocs(const Elf32_Rela *rela, unsigned int num)
38224 - unsigned int i, j, ret = 0;
38225 + unsigned int i, r_info, r_addend, _count_relocs;
38227 - /* Sure, this is order(n^2), but it's usually short, and not
38229 - for (i = 0; i < num; i++) {
38230 - for (j = 0; j < i; j++) {
38231 - /* If this addend appeared before, it's
38232 - already been counted */
38233 - if (ELF32_R_SYM(rela[i].r_info)
38234 - == ELF32_R_SYM(rela[j].r_info)
38235 - && rela[i].r_addend == rela[j].r_addend)
38237 + _count_relocs = 0;
38240 + for (i = 0; i < num; i++)
38241 + /* Only count 24-bit relocs, others don't need stubs */
38242 + if (ELF32_R_TYPE(rela[i].r_info) == R_PPC_REL24 &&
38243 + (r_info != ELF32_R_SYM(rela[i].r_info) ||
38244 + r_addend != rela[i].r_addend)) {
38246 + r_info = ELF32_R_SYM(rela[i].r_info);
38247 + r_addend = rela[i].r_addend;
38249 - if (j == i) ret++;
38251 + return _count_relocs;
38254 +static int relacmp(const void *_x, const void *_y)
38256 + const Elf32_Rela *x, *y;
38258 + y = (Elf32_Rela *)_x;
38259 + x = (Elf32_Rela *)_y;
38261 + /* Compare the entire r_info (as opposed to ELF32_R_SYM(r_info) only) to
38262 + * make the comparison cheaper/faster. It won't affect the sorting or
38263 + * the counting algorithms' performance
38265 + if (x->r_info < y->r_info)
38267 + else if (x->r_info > y->r_info)
38269 + else if (x->r_addend < y->r_addend)
38271 + else if (x->r_addend > y->r_addend)
38277 +static void relaswap(void *_x, void *_y, int size)
38279 + uint32_t *x, *y, tmp;
38282 + y = (uint32_t *)_x;
38283 + x = (uint32_t *)_y;
38285 + for (i = 0; i < sizeof(Elf32_Rela) / sizeof(uint32_t); i++) {
38293 /* Get the potential trampolines size required of the init and
38294 @@ -100,6 +139,16 @@
38295 DEBUGP("Ptr: %p. Number: %u\n",
38296 (void *)hdr + sechdrs[i].sh_offset,
38297 sechdrs[i].sh_size / sizeof(Elf32_Rela));
38299 + /* Sort the relocation information based on a symbol and
38300 + * addend key. This is a stable O(n*log n) complexity
38301 + * alogrithm but it will reduce the complexity of
38302 + * count_relocs() to linear complexity O(n)
38304 + sort((void *)hdr + sechdrs[i].sh_offset,
38305 + sechdrs[i].sh_size / sizeof(Elf32_Rela),
38306 + sizeof(Elf32_Rela), relacmp, relaswap);
38308 ret += count_relocs((void *)hdr
38309 + sechdrs[i].sh_offset,
38311 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/module_64.c powerpc.git/arch/powerpc/kernel/module_64.c
38312 --- linux-2.6.24/arch/powerpc/kernel/module_64.c 2008-01-24 23:58:37.000000000 +0100
38313 +++ powerpc.git/arch/powerpc/kernel/module_64.c 2008-01-28 20:25:49.000000000 +0100
38315 #include <asm/module.h>
38316 #include <asm/uaccess.h>
38317 #include <asm/firmware.h>
38318 +#include <linux/sort.h>
38322 @@ -81,25 +82,23 @@
38323 different addend) */
38324 static unsigned int count_relocs(const Elf64_Rela *rela, unsigned int num)
38326 - unsigned int i, j, ret = 0;
38327 + unsigned int i, r_info, r_addend, _count_relocs;
38329 /* FIXME: Only count external ones --RR */
38330 - /* Sure, this is order(n^2), but it's usually short, and not
38332 - for (i = 0; i < num; i++) {
38333 + _count_relocs = 0;
38336 + for (i = 0; i < num; i++)
38337 /* Only count 24-bit relocs, others don't need stubs */
38338 - if (ELF64_R_TYPE(rela[i].r_info) != R_PPC_REL24)
38340 - for (j = 0; j < i; j++) {
38341 - /* If this addend appeared before, it's
38342 - already been counted */
38343 - if (rela[i].r_info == rela[j].r_info
38344 - && rela[i].r_addend == rela[j].r_addend)
38346 + if (ELF64_R_TYPE(rela[i].r_info) == R_PPC_REL24 &&
38347 + (r_info != ELF64_R_SYM(rela[i].r_info) ||
38348 + r_addend != rela[i].r_addend)) {
38350 + r_info = ELF64_R_SYM(rela[i].r_info);
38351 + r_addend = rela[i].r_addend;
38353 - if (j == i) ret++;
38357 + return _count_relocs;
38360 void *module_alloc(unsigned long size)
38361 @@ -118,6 +117,44 @@
38365 +static int relacmp(const void *_x, const void *_y)
38367 + const Elf64_Rela *x, *y;
38369 + y = (Elf64_Rela *)_x;
38370 + x = (Elf64_Rela *)_y;
38372 + /* Compare the entire r_info (as opposed to ELF64_R_SYM(r_info) only) to
38373 + * make the comparison cheaper/faster. It won't affect the sorting or
38374 + * the counting algorithms' performance
38376 + if (x->r_info < y->r_info)
38378 + else if (x->r_info > y->r_info)
38380 + else if (x->r_addend < y->r_addend)
38382 + else if (x->r_addend > y->r_addend)
38388 +static void relaswap(void *_x, void *_y, int size)
38390 + uint64_t *x, *y, tmp;
38393 + y = (uint64_t *)_x;
38394 + x = (uint64_t *)_y;
38396 + for (i = 0; i < sizeof(Elf64_Rela) / sizeof(uint64_t); i++) {
38403 /* Get size of potential trampolines required. */
38404 static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
38405 const Elf64_Shdr *sechdrs)
38406 @@ -133,6 +170,16 @@
38407 DEBUGP("Ptr: %p. Number: %lu\n",
38408 (void *)sechdrs[i].sh_addr,
38409 sechdrs[i].sh_size / sizeof(Elf64_Rela));
38411 + /* Sort the relocation information based on a symbol and
38412 + * addend key. This is a stable O(n*log n) complexity
38413 + * alogrithm but it will reduce the complexity of
38414 + * count_relocs() to linear complexity O(n)
38416 + sort((void *)sechdrs[i].sh_addr,
38417 + sechdrs[i].sh_size / sizeof(Elf64_Rela),
38418 + sizeof(Elf64_Rela), relacmp, relaswap);
38420 relocs += count_relocs((void *)sechdrs[i].sh_addr,
38422 / sizeof(Elf64_Rela));
38423 @@ -343,7 +390,7 @@
38424 /* Simply set it */
38425 *(u32 *)location = value;
38429 case R_PPC64_ADDR64:
38430 /* Simply set it */
38431 *(unsigned long *)location = value;
38432 @@ -399,7 +446,7 @@
38435 /* Only replace bits 2 through 26 */
38436 - *(uint32_t *)location
38437 + *(uint32_t *)location
38438 = (*(uint32_t *)location & ~0x03fffffc)
38439 | (value & 0x03fffffc);
38441 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/of_device.c powerpc.git/arch/powerpc/kernel/of_device.c
38442 --- linux-2.6.24/arch/powerpc/kernel/of_device.c 2008-01-24 23:58:37.000000000 +0100
38443 +++ powerpc.git/arch/powerpc/kernel/of_device.c 2008-01-28 20:25:49.000000000 +0100
38445 #include <linux/module.h>
38446 #include <linux/mod_devicetable.h>
38447 #include <linux/slab.h>
38448 +#include <linux/of_device.h>
38450 #include <asm/errno.h>
38451 #include <asm/dcr.h>
38452 -#include <asm/of_device.h>
38454 static void of_device_make_bus_id(struct of_device *dev)
38456 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/of_platform.c powerpc.git/arch/powerpc/kernel/of_platform.c
38457 --- linux-2.6.24/arch/powerpc/kernel/of_platform.c 2008-01-24 23:58:37.000000000 +0100
38458 +++ powerpc.git/arch/powerpc/kernel/of_platform.c 2008-01-28 20:25:49.000000000 +0100
38460 #include <linux/mod_devicetable.h>
38461 #include <linux/slab.h>
38462 #include <linux/pci.h>
38463 +#include <linux/of.h>
38464 #include <linux/of_device.h>
38465 #include <linux/of_platform.h>
38468 * a bus type in the list
38471 -static struct of_device_id of_default_bus_ids[] = {
38472 +static const struct of_device_id of_default_bus_ids[] = {
38473 { .type = "soc", },
38474 { .compatible = "soc", },
38475 { .type = "spider", },
38478 postcore_initcall(of_bus_driver_init);
38480 -int of_register_platform_driver(struct of_platform_driver *drv)
38482 - /* initialize common driver fields */
38483 - if (!drv->driver.name)
38484 - drv->driver.name = drv->name;
38485 - if (!drv->driver.owner)
38486 - drv->driver.owner = drv->owner;
38487 - drv->driver.bus = &of_platform_bus_type;
38489 - /* register with core */
38490 - return driver_register(&drv->driver);
38492 -EXPORT_SYMBOL(of_register_platform_driver);
38494 -void of_unregister_platform_driver(struct of_platform_driver *drv)
38496 - driver_unregister(&drv->driver);
38498 -EXPORT_SYMBOL(of_unregister_platform_driver);
38500 struct of_device* of_platform_device_create(struct device_node *np,
38501 const char *bus_id,
38502 struct device *parent)
38503 @@ -120,15 +101,15 @@
38504 * @matches: match table, NULL to use the default, OF_NO_DEEP_PROBE to
38505 * disallow recursive creation of child busses
38507 -static int of_platform_bus_create(struct device_node *bus,
38508 - struct of_device_id *matches,
38509 +static int of_platform_bus_create(const struct device_node *bus,
38510 + const struct of_device_id *matches,
38511 struct device *parent)
38513 struct device_node *child;
38514 struct of_device *dev;
38517 - for (child = NULL; (child = of_get_next_child(bus, child)); ) {
38518 + for_each_child_of_node(bus, child) {
38519 pr_debug(" create child: %s\n", child->full_name);
38520 dev = of_platform_device_create(child, NULL, parent);
38522 @@ -157,7 +138,7 @@
38525 int of_platform_bus_probe(struct device_node *root,
38526 - struct of_device_id *matches,
38527 + const struct of_device_id *matches,
38528 struct device *parent)
38530 struct device_node *child;
38531 @@ -190,7 +171,7 @@
38532 rc = of_platform_bus_create(root, matches, &dev->dev);
38535 - for (child = NULL; (child = of_get_next_child(root, child)); ) {
38536 + for_each_child_of_node(root, child) {
38537 if (!of_match_node(matches, child))
38540 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/pci-common.c powerpc.git/arch/powerpc/kernel/pci-common.c
38541 --- linux-2.6.24/arch/powerpc/kernel/pci-common.c 2008-01-24 23:58:37.000000000 +0100
38542 +++ powerpc.git/arch/powerpc/kernel/pci-common.c 2008-01-28 20:25:49.000000000 +0100
38543 @@ -48,32 +48,26 @@
38544 static DEFINE_SPINLOCK(hose_spinlock);
38546 /* XXX kill that some day ... */
38547 -int global_phb_number; /* Global phb counter */
38548 +static int global_phb_number; /* Global phb counter */
38550 -extern struct list_head hose_list;
38551 +/* ISA Memory physical address */
38552 +resource_size_t isa_mem_base;
38555 - * pci_controller(phb) initialized common variables.
38557 -static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
38559 - memset(hose, 0, sizeof(struct pci_controller));
38561 - spin_lock(&hose_spinlock);
38562 - hose->global_number = global_phb_number++;
38563 - list_add_tail(&hose->list_node, &hose_list);
38564 - spin_unlock(&hose_spinlock);
38566 +/* Default PCI flags is 0 */
38567 +unsigned int ppc_pci_flags;
38569 -struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
38570 +struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
38572 struct pci_controller *phb;
38574 - phb = alloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
38575 + phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
38578 - pci_setup_pci_controller(phb);
38579 - phb->arch_data = dev;
38580 + spin_lock(&hose_spinlock);
38581 + phb->global_number = global_phb_number++;
38582 + list_add_tail(&phb->list_node, &hose_list);
38583 + spin_unlock(&hose_spinlock);
38585 phb->is_dynamic = mem_init_done;
38586 #ifdef CONFIG_PPC64
38588 @@ -126,15 +120,10 @@
38590 int pci_domain_nr(struct pci_bus *bus)
38592 - if (firmware_has_feature(FW_FEATURE_ISERIES))
38595 - struct pci_controller *hose = pci_bus_to_host(bus);
38596 + struct pci_controller *hose = pci_bus_to_host(bus);
38598 - return hose->global_number;
38600 + return hose->global_number;
38603 EXPORT_SYMBOL(pci_domain_nr);
38605 #ifdef CONFIG_PPC_OF
38606 @@ -153,7 +142,7 @@
38608 struct pci_controller *hose, *tmp;
38609 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
38610 - if (hose->arch_data == node)
38611 + if (hose->dn == node)
38613 node = node->parent;
38615 @@ -201,6 +190,20 @@
38616 struct of_irq oirq;
38619 + /* The current device-tree that iSeries generates from the HV
38620 + * PCI informations doesn't contain proper interrupt routing,
38621 + * and all the fallback would do is print out crap, so we
38622 + * don't attempt to resolve the interrupts here at all, some
38623 + * iSeries specific fixup does it.
38625 + * In the long run, we will hopefully fix the generated device-tree
38628 +#ifdef CONFIG_PPC_ISERIES
38629 + if (firmware_has_feature(FW_FEATURE_ISERIES))
38633 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
38636 @@ -222,10 +225,11 @@
38639 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
38641 + line == 0xff || line == 0) {
38644 - DBG(" -> no map ! Using irq line %d from PCI config\n", line);
38645 + DBG(" -> no map ! Using line %d (pin %d) from PCI config\n",
38648 virq = irq_create_mapping(NULL, line);
38649 if (virq != NO_IRQ)
38650 @@ -475,3 +479,717 @@
38651 *start = rsrc->start - offset;
38652 *end = rsrc->end - offset;
38656 + * pci_process_bridge_OF_ranges - Parse PCI bridge resources from device tree
38657 + * @hose: newly allocated pci_controller to be setup
38658 + * @dev: device node of the host bridge
38659 + * @primary: set if primary bus (32 bits only, soon to be deprecated)
38661 + * This function will parse the "ranges" property of a PCI host bridge device
38662 + * node and setup the resource mapping of a pci controller based on its
38665 + * Life would be boring if it wasn't for a few issues that we have to deal
38668 + * - We can only cope with one IO space range and up to 3 Memory space
38669 + * ranges. However, some machines (thanks Apple !) tend to split their
38670 + * space into lots of small contiguous ranges. So we have to coalesce.
38672 + * - We can only cope with all memory ranges having the same offset
38673 + * between CPU addresses and PCI addresses. Unfortunately, some bridges
38674 + * are setup for a large 1:1 mapping along with a small "window" which
38675 + * maps PCI address 0 to some arbitrary high address of the CPU space in
38676 + * order to give access to the ISA memory hole.
38677 + * The way out of here that I've chosen for now is to always set the
38678 + * offset based on the first resource found, then override it if we
38679 + * have a different offset and the previous was set by an ISA hole.
38681 + * - Some busses have IO space not starting at 0, which causes trouble with
38682 + * the way we do our IO resource renumbering. The code somewhat deals with
38683 + * it for 64 bits but I would expect problems on 32 bits.
38685 + * - Some 32 bits platforms such as 4xx can have physical space larger than
38686 + * 32 bits so we need to use 64 bits values for the parsing
38688 +void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
38689 + struct device_node *dev,
38692 + const u32 *ranges;
38694 + int pna = of_n_addr_cells(dev);
38695 + int np = pna + 5;
38696 + int memno = 0, isa_hole = -1;
38698 + unsigned long long pci_addr, cpu_addr, pci_next, cpu_next, size;
38699 + unsigned long long isa_mb = 0;
38700 + struct resource *res;
38702 + printk(KERN_INFO "PCI host bridge %s %s ranges:\n",
38703 + dev->full_name, primary ? "(primary)" : "");
38705 + /* Get ranges property */
38706 + ranges = of_get_property(dev, "ranges", &rlen);
38707 + if (ranges == NULL)
38711 + while ((rlen -= np * 4) >= 0) {
38712 + /* Read next ranges element */
38713 + pci_space = ranges[0];
38714 + pci_addr = of_read_number(ranges + 1, 2);
38715 + cpu_addr = of_translate_address(dev, ranges + 3);
38716 + size = of_read_number(ranges + pna + 3, 2);
38718 + if (cpu_addr == OF_BAD_ADDR || size == 0)
38721 + /* Now consume following elements while they are contiguous */
38722 + for (; rlen >= np * sizeof(u32);
38723 + ranges += np, rlen -= np * 4) {
38724 + if (ranges[0] != pci_space)
38726 + pci_next = of_read_number(ranges + 1, 2);
38727 + cpu_next = of_translate_address(dev, ranges + 3);
38728 + if (pci_next != pci_addr + size ||
38729 + cpu_next != cpu_addr + size)
38731 + size += of_read_number(ranges + pna + 3, 2);
38734 + /* Act based on address space type */
38736 + switch ((pci_space >> 24) & 0x3) {
38737 + case 1: /* PCI IO space */
38739 + " IO 0x%016llx..0x%016llx -> 0x%016llx\n",
38740 + cpu_addr, cpu_addr + size - 1, pci_addr);
38742 + /* We support only one IO range */
38743 + if (hose->pci_io_size) {
38745 + " \\--> Skipped (too many) !\n");
38748 +#ifdef CONFIG_PPC32
38749 + /* On 32 bits, limit I/O space to 16MB */
38750 + if (size > 0x01000000)
38751 + size = 0x01000000;
38753 + /* 32 bits needs to map IOs here */
38754 + hose->io_base_virt = ioremap(cpu_addr, size);
38756 + /* Expect trouble if pci_addr is not 0 */
38759 + (unsigned long)hose->io_base_virt;
38760 +#endif /* CONFIG_PPC32 */
38761 + /* pci_io_size and io_base_phys always represent IO
38762 + * space starting at 0 so we factor in pci_addr
38764 + hose->pci_io_size = pci_addr + size;
38765 + hose->io_base_phys = cpu_addr - pci_addr;
38767 + /* Build resource */
38768 + res = &hose->io_resource;
38769 + res->flags = IORESOURCE_IO;
38770 + res->start = pci_addr;
38772 + case 2: /* PCI Memory space */
38774 + " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n",
38775 + cpu_addr, cpu_addr + size - 1, pci_addr,
38776 + (pci_space & 0x40000000) ? "Prefetch" : "");
38778 + /* We support only 3 memory ranges */
38779 + if (memno >= 3) {
38781 + " \\--> Skipped (too many) !\n");
38784 + /* Handles ISA memory hole space here */
38785 + if (pci_addr == 0) {
38786 + isa_mb = cpu_addr;
38787 + isa_hole = memno;
38788 + if (primary || isa_mem_base == 0)
38789 + isa_mem_base = cpu_addr;
38792 + /* We get the PCI/Mem offset from the first range or
38793 + * the, current one if the offset came from an ISA
38794 + * hole. If they don't match, bugger.
38796 + if (memno == 0 ||
38797 + (isa_hole >= 0 && pci_addr != 0 &&
38798 + hose->pci_mem_offset == isa_mb))
38799 + hose->pci_mem_offset = cpu_addr - pci_addr;
38800 + else if (pci_addr != 0 &&
38801 + hose->pci_mem_offset != cpu_addr - pci_addr) {
38803 + " \\--> Skipped (offset mismatch) !\n");
38807 + /* Build resource */
38808 + res = &hose->mem_resources[memno++];
38809 + res->flags = IORESOURCE_MEM;
38810 + if (pci_space & 0x40000000)
38811 + res->flags |= IORESOURCE_PREFETCH;
38812 + res->start = cpu_addr;
38815 + if (res != NULL) {
38816 + res->name = dev->full_name;
38817 + res->end = res->start + size - 1;
38818 + res->parent = NULL;
38819 + res->sibling = NULL;
38820 + res->child = NULL;
38824 + /* Out of paranoia, let's put the ISA hole last if any */
38825 + if (isa_hole >= 0 && memno > 0 && isa_hole != (memno-1)) {
38826 + struct resource tmp = hose->mem_resources[isa_hole];
38827 + hose->mem_resources[isa_hole] = hose->mem_resources[memno-1];
38828 + hose->mem_resources[memno-1] = tmp;
38832 +/* Decide whether to display the domain number in /proc */
38833 +int pci_proc_domain(struct pci_bus *bus)
38835 + struct pci_controller *hose = pci_bus_to_host(bus);
38836 +#ifdef CONFIG_PPC64
38837 + return hose->buid != 0;
38839 + if (!(ppc_pci_flags & PPC_PCI_ENABLE_PROC_DOMAINS))
38841 + if (ppc_pci_flags & PPC_PCI_COMPAT_DOMAIN_0)
38842 + return hose->global_number != 0;
38847 +void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
38848 + struct resource *res)
38850 + resource_size_t offset = 0, mask = (resource_size_t)-1;
38851 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38855 + if (res->flags & IORESOURCE_IO) {
38856 + offset = (unsigned long)hose->io_base_virt - _IO_BASE;
38857 + mask = 0xffffffffu;
38858 + } else if (res->flags & IORESOURCE_MEM)
38859 + offset = hose->pci_mem_offset;
38861 + region->start = (res->start - offset) & mask;
38862 + region->end = (res->end - offset) & mask;
38864 +EXPORT_SYMBOL(pcibios_resource_to_bus);
38866 +void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
38867 + struct pci_bus_region *region)
38869 + resource_size_t offset = 0, mask = (resource_size_t)-1;
38870 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38874 + if (res->flags & IORESOURCE_IO) {
38875 + offset = (unsigned long)hose->io_base_virt - _IO_BASE;
38876 + mask = 0xffffffffu;
38877 + } else if (res->flags & IORESOURCE_MEM)
38878 + offset = hose->pci_mem_offset;
38879 + res->start = (region->start + offset) & mask;
38880 + res->end = (region->end + offset) & mask;
38882 +EXPORT_SYMBOL(pcibios_bus_to_resource);
38884 +/* Fixup a bus resource into a linux resource */
38885 +static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
38887 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38888 + resource_size_t offset = 0, mask = (resource_size_t)-1;
38890 + if (res->flags & IORESOURCE_IO) {
38891 + offset = (unsigned long)hose->io_base_virt - _IO_BASE;
38892 + mask = 0xffffffffu;
38893 + } else if (res->flags & IORESOURCE_MEM)
38894 + offset = hose->pci_mem_offset;
38896 + res->start = (res->start + offset) & mask;
38897 + res->end = (res->end + offset) & mask;
38899 + pr_debug("PCI:%s %016llx-%016llx\n",
38901 + (unsigned long long)res->start,
38902 + (unsigned long long)res->end);
38906 +/* This header fixup will do the resource fixup for all devices as they are
38907 + * probed, but not for bridge ranges
38909 +static void __devinit pcibios_fixup_resources(struct pci_dev *dev)
38911 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38915 + printk(KERN_ERR "No host bridge for PCI dev %s !\n",
38919 + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
38920 + struct resource *res = dev->resource + i;
38923 + if (res->end == 0xffffffff) {
38924 + pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] is unassigned\n",
38925 + pci_name(dev), i,
38926 + (unsigned long long)res->start,
38927 + (unsigned long long)res->end,
38928 + (unsigned int)res->flags);
38929 + res->end -= res->start;
38931 + res->flags |= IORESOURCE_UNSET;
38935 + pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] fixup...\n",
38936 + pci_name(dev), i,
38937 + (unsigned long long)res->start,\
38938 + (unsigned long long)res->end,
38939 + (unsigned int)res->flags);
38941 + fixup_resource(res, dev);
38944 + /* Call machine specific resource fixup */
38945 + if (ppc_md.pcibios_fixup_resources)
38946 + ppc_md.pcibios_fixup_resources(dev);
38948 +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
38950 +static void __devinit __pcibios_fixup_bus(struct pci_bus *bus)
38952 + struct pci_controller *hose = pci_bus_to_host(bus);
38953 + struct pci_dev *dev = bus->self;
38955 + pr_debug("PCI: Fixup bus %d (%s)\n", bus->number, dev ? pci_name(dev) : "PHB");
38957 + /* Fixup PCI<->PCI bridges. Host bridges are handled separately, for
38958 + * now differently between 32 and 64 bits.
38960 + if (dev != NULL) {
38961 + struct resource *res;
38964 + for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
38965 + if ((res = bus->resource[i]) == NULL)
38969 + if (i >= 3 && bus->self->transparent)
38971 + /* On PowerMac, Apple leaves bridge windows open over
38972 + * an inaccessible region of memory space (0...fffff)
38973 + * which is somewhat bogus, but that's what they think
38974 + * means disabled...
38976 + * We clear those to force them to be reallocated later
38978 + * We detect such regions by the fact that the base is
38979 + * equal to the pci_mem_offset of the host bridge and
38980 + * their size is smaller than 1M.
38982 + if (res->flags & IORESOURCE_MEM &&
38983 + res->start == hose->pci_mem_offset &&
38984 + res->end < 0x100000) {
38986 + "PCI: Closing bogus Apple Firmware"
38987 + " region %d on bus 0x%02x\n",
38993 + pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
38994 + pci_name(dev), i,
38995 + (unsigned long long)res->start,\
38996 + (unsigned long long)res->end,
38997 + (unsigned int)res->flags);
38999 + fixup_resource(res, dev);
39003 + /* Additional setup that is different between 32 and 64 bits for now */
39004 + pcibios_do_bus_setup(bus);
39006 + /* Platform specific bus fixups */
39007 + if (ppc_md.pcibios_fixup_bus)
39008 + ppc_md.pcibios_fixup_bus(bus);
39010 + /* Read default IRQs and fixup if necessary */
39011 + list_for_each_entry(dev, &bus->devices, bus_list) {
39012 + pci_read_irq_line(dev);
39013 + if (ppc_md.pci_irq_fixup)
39014 + ppc_md.pci_irq_fixup(dev);
39018 +void __devinit pcibios_fixup_bus(struct pci_bus *bus)
39020 + /* When called from the generic PCI probe, read PCI<->PCI bridge
39021 + * bases before proceeding
39023 + if (bus->self != NULL)
39024 + pci_read_bridge_bases(bus);
39025 + __pcibios_fixup_bus(bus);
39027 +EXPORT_SYMBOL(pcibios_fixup_bus);
39029 +/* When building a bus from the OF tree rather than probing, we need a
39030 + * slightly different version of the fixup which doesn't read the
39031 + * bridge bases using config space accesses
39033 +void __devinit pcibios_fixup_of_probed_bus(struct pci_bus *bus)
39035 + __pcibios_fixup_bus(bus);
39038 +static int skip_isa_ioresource_align(struct pci_dev *dev)
39040 + if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) &&
39041 + !(dev->bus->bridge_ctl & PCI_BRIDGE_CTL_ISA))
39047 + * We need to avoid collisions with `mirrored' VGA ports
39048 + * and other strange ISA hardware, so we always want the
39049 + * addresses to be allocated in the 0x000-0x0ff region
39052 + * Why? Because some silly external IO cards only decode
39053 + * the low 10 bits of the IO address. The 0x00-0xff region
39054 + * is reserved for motherboard devices that decode all 16
39055 + * bits, so it's ok to allocate at, say, 0x2800-0x28ff,
39056 + * but we want to try to avoid allocating at 0x2900-0x2bff
39057 + * which might have be mirrored at 0x0100-0x03ff..
39059 +void pcibios_align_resource(void *data, struct resource *res,
39060 + resource_size_t size, resource_size_t align)
39062 + struct pci_dev *dev = data;
39064 + if (res->flags & IORESOURCE_IO) {
39065 + resource_size_t start = res->start;
39067 + if (skip_isa_ioresource_align(dev))
39069 + if (start & 0x300) {
39070 + start = (start + 0x3ff) & ~0x3ff;
39071 + res->start = start;
39075 +EXPORT_SYMBOL(pcibios_align_resource);
39078 + * Reparent resource children of pr that conflict with res
39079 + * under res, and make res replace those children.
39081 +static int __init reparent_resources(struct resource *parent,
39082 + struct resource *res)
39084 + struct resource *p, **pp;
39085 + struct resource **firstpp = NULL;
39087 + for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
39088 + if (p->end < res->start)
39090 + if (res->end < p->start)
39092 + if (p->start < res->start || p->end > res->end)
39093 + return -1; /* not completely contained */
39094 + if (firstpp == NULL)
39097 + if (firstpp == NULL)
39098 + return -1; /* didn't find any conflicting entries? */
39099 + res->parent = parent;
39100 + res->child = *firstpp;
39101 + res->sibling = *pp;
39104 + for (p = res->child; p != NULL; p = p->sibling) {
39106 + DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
39108 + (unsigned long long)p->start,
39109 + (unsigned long long)p->end, res->name);
39115 + * Handle resources of PCI devices. If the world were perfect, we could
39116 + * just allocate all the resource regions and do nothing more. It isn't.
39117 + * On the other hand, we cannot just re-allocate all devices, as it would
39118 + * require us to know lots of host bridge internals. So we attempt to
39119 + * keep as much of the original configuration as possible, but tweak it
39120 + * when it's found to be wrong.
39122 + * Known BIOS problems we have to work around:
39123 + * - I/O or memory regions not configured
39124 + * - regions configured, but not enabled in the command register
39125 + * - bogus I/O addresses above 64K used
39126 + * - expansion ROMs left enabled (this may sound harmless, but given
39127 + * the fact the PCI specs explicitly allow address decoders to be
39128 + * shared between expansion ROMs and other resource regions, it's
39129 + * at least dangerous)
39132 + * (1) Allocate resources for all buses behind PCI-to-PCI bridges.
39133 + * This gives us fixed barriers on where we can allocate.
39134 + * (2) Allocate resources for all enabled devices. If there is
39135 + * a collision, just mark the resource as unallocated. Also
39136 + * disable expansion ROMs during this step.
39137 + * (3) Try to allocate resources for disabled devices. If the
39138 + * resources were assigned correctly, everything goes well,
39139 + * if they weren't, they won't disturb allocation of other
39141 + * (4) Assign new addresses to resources which were either
39142 + * not configured at all or misconfigured. If explicitly
39143 + * requested by the user, configure expansion ROM address
39147 +static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
39149 + struct pci_bus *bus;
39151 + struct resource *res, *pr;
39153 + /* Depth-First Search on bus tree */
39154 + list_for_each_entry(bus, bus_list, node) {
39155 + for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
39156 + if ((res = bus->resource[i]) == NULL || !res->flags
39157 + || res->start > res->end)
39159 + if (bus->parent == NULL)
39160 + pr = (res->flags & IORESOURCE_IO) ?
39161 + &ioport_resource : &iomem_resource;
39163 + /* Don't bother with non-root busses when
39164 + * re-assigning all resources. We clear the
39165 + * resource flags as if they were colliding
39166 + * and as such ensure proper re-allocation
39169 + if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)
39170 + goto clear_resource;
39171 + pr = pci_find_parent_resource(bus->self, res);
39173 + /* this happens when the generic PCI
39174 + * code (wrongly) decides that this
39175 + * bridge is transparent -- paulus
39181 + DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
39182 + "[0x%x], parent %p (%s)\n",
39183 + bus->self ? pci_name(bus->self) : "PHB",
39185 + (unsigned long long)res->start,
39186 + (unsigned long long)res->end,
39187 + (unsigned int)res->flags,
39188 + pr, (pr && pr->name) ? pr->name : "nil");
39190 + if (pr && !(pr->flags & IORESOURCE_UNSET)) {
39191 + if (request_resource(pr, res) == 0)
39194 + * Must be a conflict with an existing entry.
39195 + * Move that entry (or entries) under the
39196 + * bridge resource and try again.
39198 + if (reparent_resources(pr, res) == 0)
39201 + printk(KERN_WARNING
39202 + "PCI: Cannot allocate resource region "
39203 + "%d of PCI bridge %d, will remap\n",
39208 + pcibios_allocate_bus_resources(&bus->children);
39212 +static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
39214 + struct resource *pr, *r = &dev->resource[idx];
39216 + DBG("PCI: Allocating %s: Resource %d: %016llx..%016llx [%x]\n",
39217 + pci_name(dev), idx,
39218 + (unsigned long long)r->start,
39219 + (unsigned long long)r->end,
39220 + (unsigned int)r->flags);
39222 + pr = pci_find_parent_resource(dev, r);
39223 + if (!pr || (pr->flags & IORESOURCE_UNSET) ||
39224 + request_resource(pr, r) < 0) {
39225 + printk(KERN_WARNING "PCI: Cannot allocate resource region %d"
39226 + " of device %s, will remap\n", idx, pci_name(dev));
39228 + DBG("PCI: parent is %p: %016llx-%016llx [%x]\n", pr,
39229 + (unsigned long long)pr->start,
39230 + (unsigned long long)pr->end,
39231 + (unsigned int)pr->flags);
39232 + /* We'll assign a new address later */
39233 + r->flags |= IORESOURCE_UNSET;
39234 + r->end -= r->start;
39239 +static void __init pcibios_allocate_resources(int pass)
39241 + struct pci_dev *dev = NULL;
39242 + int idx, disabled;
39244 + struct resource *r;
39246 + for_each_pci_dev(dev) {
39247 + pci_read_config_word(dev, PCI_COMMAND, &command);
39248 + for (idx = 0; idx < 6; idx++) {
39249 + r = &dev->resource[idx];
39250 + if (r->parent) /* Already allocated */
39252 + if (!r->flags || (r->flags & IORESOURCE_UNSET))
39253 + continue; /* Not assigned at all */
39254 + if (r->flags & IORESOURCE_IO)
39255 + disabled = !(command & PCI_COMMAND_IO);
39257 + disabled = !(command & PCI_COMMAND_MEMORY);
39258 + if (pass == disabled)
39259 + alloc_resource(dev, idx);
39263 + r = &dev->resource[PCI_ROM_RESOURCE];
39264 + if (r->flags & IORESOURCE_ROM_ENABLE) {
39265 + /* Turn the ROM off, leave the resource region,
39266 + * but keep it unregistered.
39269 + DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
39270 + r->flags &= ~IORESOURCE_ROM_ENABLE;
39271 + pci_read_config_dword(dev, dev->rom_base_reg, ®);
39272 + pci_write_config_dword(dev, dev->rom_base_reg,
39273 + reg & ~PCI_ROM_ADDRESS_ENABLE);
39278 +void __init pcibios_resource_survey(void)
39280 + /* Allocate and assign resources. If we re-assign everything, then
39281 + * we skip the allocate phase
39283 + pcibios_allocate_bus_resources(&pci_root_buses);
39285 + if (!(ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)) {
39286 + pcibios_allocate_resources(0);
39287 + pcibios_allocate_resources(1);
39290 + if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) {
39291 + DBG("PCI: Assigning unassigned resouces...\n");
39292 + pci_assign_unassigned_resources();
39295 + /* Call machine dependent fixup */
39296 + if (ppc_md.pcibios_fixup)
39297 + ppc_md.pcibios_fixup();
39300 +#ifdef CONFIG_HOTPLUG
39301 +/* This is used by the pSeries hotplug driver to allocate resource
39302 + * of newly plugged busses. We can try to consolidate with the
39303 + * rest of the code later, for now, keep it as-is
39305 +void __devinit pcibios_claim_one_bus(struct pci_bus *bus)
39307 + struct pci_dev *dev;
39308 + struct pci_bus *child_bus;
39310 + list_for_each_entry(dev, &bus->devices, bus_list) {
39313 + for (i = 0; i < PCI_NUM_RESOURCES; i++) {
39314 + struct resource *r = &dev->resource[i];
39316 + if (r->parent || !r->start || !r->flags)
39318 + pci_claim_resource(dev, i);
39322 + list_for_each_entry(child_bus, &bus->children, node)
39323 + pcibios_claim_one_bus(child_bus);
39325 +EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
39326 +#endif /* CONFIG_HOTPLUG */
39328 +int pcibios_enable_device(struct pci_dev *dev, int mask)
39330 + u16 cmd, old_cmd;
39332 + struct resource *r;
39334 + if (ppc_md.pcibios_enable_device_hook)
39335 + if (ppc_md.pcibios_enable_device_hook(dev))
39338 + pci_read_config_word(dev, PCI_COMMAND, &cmd);
39340 + for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
39341 + /* Only set up the requested stuff */
39342 + if (!(mask & (1 << idx)))
39344 + r = &dev->resource[idx];
39345 + if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
39347 + if ((idx == PCI_ROM_RESOURCE) &&
39348 + (!(r->flags & IORESOURCE_ROM_ENABLE)))
39350 + if (r->parent == NULL) {
39351 + printk(KERN_ERR "PCI: Device %s not available because"
39352 + " of resource collisions\n", pci_name(dev));
39355 + if (r->flags & IORESOURCE_IO)
39356 + cmd |= PCI_COMMAND_IO;
39357 + if (r->flags & IORESOURCE_MEM)
39358 + cmd |= PCI_COMMAND_MEMORY;
39360 + if (cmd != old_cmd) {
39361 + printk("PCI: Enabling device %s (%04x -> %04x)\n",
39362 + pci_name(dev), old_cmd, cmd);
39363 + pci_write_config_word(dev, PCI_COMMAND, cmd);
39368 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/pci_32.c powerpc.git/arch/powerpc/kernel/pci_32.c
39369 --- linux-2.6.24/arch/powerpc/kernel/pci_32.c 2008-01-24 23:58:37.000000000 +0100
39370 +++ powerpc.git/arch/powerpc/kernel/pci_32.c 2008-01-28 20:25:49.000000000 +0100
39372 #include <linux/bootmem.h>
39373 #include <linux/irq.h>
39374 #include <linux/list.h>
39375 +#include <linux/of.h>
39377 #include <asm/processor.h>
39378 #include <asm/io.h>
39379 @@ -32,19 +33,12 @@
39382 unsigned long isa_io_base = 0;
39383 -unsigned long isa_mem_base = 0;
39384 unsigned long pci_dram_offset = 0;
39385 int pcibios_assign_bus_offset = 1;
39387 void pcibios_make_OF_bus_map(void);
39389 -static int pci_relocate_bridge_resource(struct pci_bus *bus, int i);
39390 -static int probe_resource(struct pci_bus *parent, struct resource *pr,
39391 - struct resource *res, struct resource **conflict);
39392 -static void update_bridge_base(struct pci_bus *bus, int i);
39393 -static void pcibios_fixup_resources(struct pci_dev* dev);
39394 static void fixup_broken_pcnet32(struct pci_dev* dev);
39395 -static int reparent_resources(struct resource *parent, struct resource *res);
39396 static void fixup_cpc710_pci64(struct pci_dev* dev);
39397 #ifdef CONFIG_PPC_OF
39398 static u8* pci_to_OF_bus_map;
39400 /* By default, we don't re-assign bus numbers. We do this only on
39403 -int pci_assign_all_buses;
39404 +static int pci_assign_all_buses;
39406 LIST_HEAD(hose_list);
39408 @@ -100,505 +94,6 @@
39410 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64);
39413 -pcibios_fixup_resources(struct pci_dev *dev)
39415 - struct pci_controller* hose = (struct pci_controller *)dev->sysdata;
39417 - unsigned long offset;
39420 - printk(KERN_ERR "No hose for PCI dev %s!\n", pci_name(dev));
39423 - for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
39424 - struct resource *res = dev->resource + i;
39427 - if (res->end == 0xffffffff) {
39428 - DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n",
39429 - pci_name(dev), i, (u64)res->start, (u64)res->end);
39430 - res->end -= res->start;
39432 - res->flags |= IORESOURCE_UNSET;
39436 - if (res->flags & IORESOURCE_MEM) {
39437 - offset = hose->pci_mem_offset;
39438 - } else if (res->flags & IORESOURCE_IO) {
39439 - offset = (unsigned long) hose->io_base_virt
39442 - if (offset != 0) {
39443 - res->start += offset;
39444 - res->end += offset;
39445 - DBG("Fixup res %d (%lx) of dev %s: %llx -> %llx\n",
39446 - i, res->flags, pci_name(dev),
39447 - (u64)res->start - offset, (u64)res->start);
39451 - /* Call machine specific resource fixup */
39452 - if (ppc_md.pcibios_fixup_resources)
39453 - ppc_md.pcibios_fixup_resources(dev);
39455 -DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
39457 -void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
39458 - struct resource *res)
39460 - unsigned long offset = 0;
39461 - struct pci_controller *hose = dev->sysdata;
39463 - if (hose && res->flags & IORESOURCE_IO)
39464 - offset = (unsigned long)hose->io_base_virt - isa_io_base;
39465 - else if (hose && res->flags & IORESOURCE_MEM)
39466 - offset = hose->pci_mem_offset;
39467 - region->start = res->start - offset;
39468 - region->end = res->end - offset;
39470 -EXPORT_SYMBOL(pcibios_resource_to_bus);
39472 -void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
39473 - struct pci_bus_region *region)
39475 - unsigned long offset = 0;
39476 - struct pci_controller *hose = dev->sysdata;
39478 - if (hose && res->flags & IORESOURCE_IO)
39479 - offset = (unsigned long)hose->io_base_virt - isa_io_base;
39480 - else if (hose && res->flags & IORESOURCE_MEM)
39481 - offset = hose->pci_mem_offset;
39482 - res->start = region->start + offset;
39483 - res->end = region->end + offset;
39485 -EXPORT_SYMBOL(pcibios_bus_to_resource);
39488 - * We need to avoid collisions with `mirrored' VGA ports
39489 - * and other strange ISA hardware, so we always want the
39490 - * addresses to be allocated in the 0x000-0x0ff region
39493 - * Why? Because some silly external IO cards only decode
39494 - * the low 10 bits of the IO address. The 0x00-0xff region
39495 - * is reserved for motherboard devices that decode all 16
39496 - * bits, so it's ok to allocate at, say, 0x2800-0x28ff,
39497 - * but we want to try to avoid allocating at 0x2900-0x2bff
39498 - * which might have be mirrored at 0x0100-0x03ff..
39500 -void pcibios_align_resource(void *data, struct resource *res,
39501 - resource_size_t size, resource_size_t align)
39503 - struct pci_dev *dev = data;
39505 - if (res->flags & IORESOURCE_IO) {
39506 - resource_size_t start = res->start;
39508 - if (size > 0x100) {
39509 - printk(KERN_ERR "PCI: I/O Region %s/%d too large"
39510 - " (%lld bytes)\n", pci_name(dev),
39511 - dev->resource - res, (unsigned long long)size);
39514 - if (start & 0x300) {
39515 - start = (start + 0x3ff) & ~0x3ff;
39516 - res->start = start;
39520 -EXPORT_SYMBOL(pcibios_align_resource);
39523 - * Handle resources of PCI devices. If the world were perfect, we could
39524 - * just allocate all the resource regions and do nothing more. It isn't.
39525 - * On the other hand, we cannot just re-allocate all devices, as it would
39526 - * require us to know lots of host bridge internals. So we attempt to
39527 - * keep as much of the original configuration as possible, but tweak it
39528 - * when it's found to be wrong.
39530 - * Known BIOS problems we have to work around:
39531 - * - I/O or memory regions not configured
39532 - * - regions configured, but not enabled in the command register
39533 - * - bogus I/O addresses above 64K used
39534 - * - expansion ROMs left enabled (this may sound harmless, but given
39535 - * the fact the PCI specs explicitly allow address decoders to be
39536 - * shared between expansion ROMs and other resource regions, it's
39537 - * at least dangerous)
39540 - * (1) Allocate resources for all buses behind PCI-to-PCI bridges.
39541 - * This gives us fixed barriers on where we can allocate.
39542 - * (2) Allocate resources for all enabled devices. If there is
39543 - * a collision, just mark the resource as unallocated. Also
39544 - * disable expansion ROMs during this step.
39545 - * (3) Try to allocate resources for disabled devices. If the
39546 - * resources were assigned correctly, everything goes well,
39547 - * if they weren't, they won't disturb allocation of other
39549 - * (4) Assign new addresses to resources which were either
39550 - * not configured at all or misconfigured. If explicitly
39551 - * requested by the user, configure expansion ROM address
39555 -static void __init
39556 -pcibios_allocate_bus_resources(struct list_head *bus_list)
39558 - struct pci_bus *bus;
39560 - struct resource *res, *pr;
39562 - /* Depth-First Search on bus tree */
39563 - list_for_each_entry(bus, bus_list, node) {
39564 - for (i = 0; i < 4; ++i) {
39565 - if ((res = bus->resource[i]) == NULL || !res->flags
39566 - || res->start > res->end)
39568 - if (bus->parent == NULL)
39569 - pr = (res->flags & IORESOURCE_IO)?
39570 - &ioport_resource: &iomem_resource;
39572 - pr = pci_find_parent_resource(bus->self, res);
39574 - /* this happens when the generic PCI
39575 - * code (wrongly) decides that this
39576 - * bridge is transparent -- paulus
39582 - DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
39583 - (u64)res->start, (u64)res->end, res->flags, pr);
39585 - if (request_resource(pr, res) == 0)
39588 - * Must be a conflict with an existing entry.
39589 - * Move that entry (or entries) under the
39590 - * bridge resource and try again.
39592 - if (reparent_resources(pr, res) == 0)
39595 - printk(KERN_ERR "PCI: Cannot allocate resource region "
39596 - "%d of PCI bridge %d\n", i, bus->number);
39597 - if (pci_relocate_bridge_resource(bus, i))
39598 - bus->resource[i] = NULL;
39600 - pcibios_allocate_bus_resources(&bus->children);
39605 - * Reparent resource children of pr that conflict with res
39606 - * under res, and make res replace those children.
39609 -reparent_resources(struct resource *parent, struct resource *res)
39611 - struct resource *p, **pp;
39612 - struct resource **firstpp = NULL;
39614 - for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
39615 - if (p->end < res->start)
39617 - if (res->end < p->start)
39619 - if (p->start < res->start || p->end > res->end)
39620 - return -1; /* not completely contained */
39621 - if (firstpp == NULL)
39624 - if (firstpp == NULL)
39625 - return -1; /* didn't find any conflicting entries? */
39626 - res->parent = parent;
39627 - res->child = *firstpp;
39628 - res->sibling = *pp;
39631 - for (p = res->child; p != NULL; p = p->sibling) {
39633 - DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
39634 - p->name, (u64)p->start, (u64)p->end, res->name);
39640 - * A bridge has been allocated a range which is outside the range
39641 - * of its parent bridge, so it needs to be moved.
39644 -pci_relocate_bridge_resource(struct pci_bus *bus, int i)
39646 - struct resource *res, *pr, *conflict;
39647 - unsigned long try, size;
39649 - struct pci_bus *parent = bus->parent;
39651 - if (parent == NULL) {
39652 - /* shouldn't ever happen */
39653 - printk(KERN_ERR "PCI: can't move host bridge resource\n");
39656 - res = bus->resource[i];
39660 - for (j = 0; j < 4; j++) {
39661 - struct resource *r = parent->resource[j];
39664 - if ((res->flags ^ r->flags) & (IORESOURCE_IO | IORESOURCE_MEM))
39666 - if (!((res->flags ^ r->flags) & IORESOURCE_PREFETCH)) {
39670 - if (res->flags & IORESOURCE_PREFETCH)
39675 - size = res->end - res->start;
39676 - if (pr->start > pr->end || size > pr->end - pr->start)
39680 - res->start = try - size;
39682 - if (probe_resource(bus->parent, pr, res, &conflict) == 0)
39684 - if (conflict->start <= pr->start + size)
39686 - try = conflict->start - 1;
39688 - if (request_resource(pr, res)) {
39689 - DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
39690 - (u64)res->start, (u64)res->end);
39691 - return -1; /* "can't happen" */
39693 - update_bridge_base(bus, i);
39694 - printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n",
39695 - bus->number, i, (unsigned long long)res->start,
39696 - (unsigned long long)res->end);
39701 -probe_resource(struct pci_bus *parent, struct resource *pr,
39702 - struct resource *res, struct resource **conflict)
39704 - struct pci_bus *bus;
39705 - struct pci_dev *dev;
39706 - struct resource *r;
39709 - for (r = pr->child; r != NULL; r = r->sibling) {
39710 - if (r->end >= res->start && res->end >= r->start) {
39715 - list_for_each_entry(bus, &parent->children, node) {
39716 - for (i = 0; i < 4; ++i) {
39717 - if ((r = bus->resource[i]) == NULL)
39719 - if (!r->flags || r->start > r->end || r == res)
39721 - if (pci_find_parent_resource(bus->self, r) != pr)
39723 - if (r->end >= res->start && res->end >= r->start) {
39729 - list_for_each_entry(dev, &parent->devices, bus_list) {
39730 - for (i = 0; i < 6; ++i) {
39731 - r = &dev->resource[i];
39732 - if (!r->flags || (r->flags & IORESOURCE_UNSET))
39734 - if (pci_find_parent_resource(dev, r) != pr)
39736 - if (r->end >= res->start && res->end >= r->start) {
39746 -update_bridge_resource(struct pci_dev *dev, struct resource *res)
39748 - u8 io_base_lo, io_limit_lo;
39749 - u16 mem_base, mem_limit;
39751 - unsigned long start, end, off;
39752 - struct pci_controller *hose = dev->sysdata;
39755 - printk("update_bridge_base: no hose?\n");
39758 - pci_read_config_word(dev, PCI_COMMAND, &cmd);
39759 - pci_write_config_word(dev, PCI_COMMAND,
39760 - cmd & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY));
39761 - if (res->flags & IORESOURCE_IO) {
39762 - off = (unsigned long) hose->io_base_virt - isa_io_base;
39763 - start = res->start - off;
39764 - end = res->end - off;
39765 - io_base_lo = (start >> 8) & PCI_IO_RANGE_MASK;
39766 - io_limit_lo = (end >> 8) & PCI_IO_RANGE_MASK;
39767 - if (end > 0xffff)
39768 - io_base_lo |= PCI_IO_RANGE_TYPE_32;
39770 - io_base_lo |= PCI_IO_RANGE_TYPE_16;
39771 - pci_write_config_word(dev, PCI_IO_BASE_UPPER16,
39773 - pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16,
39775 - pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo);
39776 - pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo);
39778 - } else if ((res->flags & (IORESOURCE_MEM | IORESOURCE_PREFETCH))
39779 - == IORESOURCE_MEM) {
39780 - off = hose->pci_mem_offset;
39781 - mem_base = ((res->start - off) >> 16) & PCI_MEMORY_RANGE_MASK;
39782 - mem_limit = ((res->end - off) >> 16) & PCI_MEMORY_RANGE_MASK;
39783 - pci_write_config_word(dev, PCI_MEMORY_BASE, mem_base);
39784 - pci_write_config_word(dev, PCI_MEMORY_LIMIT, mem_limit);
39786 - } else if ((res->flags & (IORESOURCE_MEM | IORESOURCE_PREFETCH))
39787 - == (IORESOURCE_MEM | IORESOURCE_PREFETCH)) {
39788 - off = hose->pci_mem_offset;
39789 - mem_base = ((res->start - off) >> 16) & PCI_PREF_RANGE_MASK;
39790 - mem_limit = ((res->end - off) >> 16) & PCI_PREF_RANGE_MASK;
39791 - pci_write_config_word(dev, PCI_PREF_MEMORY_BASE, mem_base);
39792 - pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, mem_limit);
39795 - DBG(KERN_ERR "PCI: ugh, bridge %s res has flags=%lx\n",
39796 - pci_name(dev), res->flags);
39798 - pci_write_config_word(dev, PCI_COMMAND, cmd);
39801 -static void __init
39802 -update_bridge_base(struct pci_bus *bus, int i)
39804 - struct resource *res = bus->resource[i];
39805 - struct pci_dev *dev = bus->self;
39806 - update_bridge_resource(dev, res);
39809 -static inline void alloc_resource(struct pci_dev *dev, int idx)
39811 - struct resource *pr, *r = &dev->resource[idx];
39813 - DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
39814 - pci_name(dev), idx, (u64)r->start, (u64)r->end, r->flags);
39815 - pr = pci_find_parent_resource(dev, r);
39816 - if (!pr || request_resource(pr, r) < 0) {
39817 - printk(KERN_ERR "PCI: Cannot allocate resource region %d"
39818 - " of device %s\n", idx, pci_name(dev));
39820 - DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
39821 - pr, (u64)pr->start, (u64)pr->end, pr->flags);
39822 - /* We'll assign a new address later */
39823 - r->flags |= IORESOURCE_UNSET;
39824 - r->end -= r->start;
39829 -static void __init
39830 -pcibios_allocate_resources(int pass)
39832 - struct pci_dev *dev = NULL;
39833 - int idx, disabled;
39835 - struct resource *r;
39837 - for_each_pci_dev(dev) {
39838 - pci_read_config_word(dev, PCI_COMMAND, &command);
39839 - for (idx = 0; idx < 6; idx++) {
39840 - r = &dev->resource[idx];
39841 - if (r->parent) /* Already allocated */
39843 - if (!r->flags || (r->flags & IORESOURCE_UNSET))
39844 - continue; /* Not assigned at all */
39845 - if (r->flags & IORESOURCE_IO)
39846 - disabled = !(command & PCI_COMMAND_IO);
39848 - disabled = !(command & PCI_COMMAND_MEMORY);
39849 - if (pass == disabled)
39850 - alloc_resource(dev, idx);
39854 - r = &dev->resource[PCI_ROM_RESOURCE];
39855 - if (r->flags & IORESOURCE_ROM_ENABLE) {
39856 - /* Turn the ROM off, leave the resource region, but keep it unregistered. */
39858 - DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
39859 - r->flags &= ~IORESOURCE_ROM_ENABLE;
39860 - pci_read_config_dword(dev, dev->rom_base_reg, ®);
39861 - pci_write_config_dword(dev, dev->rom_base_reg,
39862 - reg & ~PCI_ROM_ADDRESS_ENABLE);
39867 -static void __init
39868 -pcibios_assign_resources(void)
39870 - struct pci_dev *dev = NULL;
39872 - struct resource *r;
39874 - for_each_pci_dev(dev) {
39875 - int class = dev->class >> 8;
39877 - /* Don't touch classless devices and host bridges */
39878 - if (!class || class == PCI_CLASS_BRIDGE_HOST)
39881 - for (idx = 0; idx < 6; idx++) {
39882 - r = &dev->resource[idx];
39885 - * We shall assign a new address to this resource,
39886 - * either because the BIOS (sic) forgot to do so
39887 - * or because we have decided the old address was
39888 - * unusable for some reason.
39890 - if ((r->flags & IORESOURCE_UNSET) && r->end &&
39891 - (!ppc_md.pcibios_enable_device_hook ||
39892 - !ppc_md.pcibios_enable_device_hook(dev, 1))) {
39895 - r->flags &= ~IORESOURCE_UNSET;
39896 - rc = pci_assign_resource(dev, idx);
39901 -#if 0 /* don't assign ROMs */
39902 - r = &dev->resource[PCI_ROM_RESOURCE];
39903 - r->end -= r->start;
39906 - pci_assign_resource(dev, PCI_ROM_RESOURCE);
39911 #ifdef CONFIG_PPC_OF
39913 * Functions below are used on OpenFirmware machines.
39914 @@ -619,7 +114,7 @@
39916 pci_to_OF_bus_map[pci_bus] = bus_range[0];
39918 - for (node=node->child; node != 0;node = node->sibling) {
39919 + for_each_child_of_node(node, node) {
39920 struct pci_dev* dev;
39921 const unsigned int *class_code, *reg;
39923 @@ -662,8 +157,8 @@
39925 /* For each hose, we begin searching bridges */
39926 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
39927 - struct device_node* node;
39928 - node = (struct device_node *)hose->arch_data;
39929 + struct device_node* node = hose->dn;
39933 make_one_node_map(node, hose->first_busno);
39934 @@ -688,15 +183,18 @@
39935 typedef int (*pci_OF_scan_iterator)(struct device_node* node, void* data);
39937 static struct device_node*
39938 -scan_OF_pci_childs(struct device_node* node, pci_OF_scan_iterator filter, void* data)
39939 +scan_OF_pci_childs(struct device_node *parent, pci_OF_scan_iterator filter, void* data)
39941 + struct device_node *node;
39942 struct device_node* sub_node;
39944 - for (; node != 0;node = node->sibling) {
39945 + for_each_child_of_node(parent, node) {
39946 const unsigned int *class_code;
39948 - if (filter(node, data))
39949 + if (filter(node, data)) {
39950 + of_node_put(node);
39954 /* For PCI<->PCI bridges or CardBus bridges, we go down
39955 * Note: some OFs create a parent node "multifunc-device" as
39956 @@ -708,9 +206,11 @@
39957 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) &&
39958 strcmp(node->name, "multifunc-device"))
39960 - sub_node = scan_OF_pci_childs(node->child, filter, data);
39962 + sub_node = scan_OF_pci_childs(node, filter, data);
39964 + of_node_put(node);
39970 @@ -718,11 +218,11 @@
39971 static struct device_node *scan_OF_for_pci_dev(struct device_node *parent,
39972 unsigned int devfn)
39974 - struct device_node *np = NULL;
39975 + struct device_node *np;
39977 unsigned int psize;
39979 - while ((np = of_get_next_child(parent, np)) != NULL) {
39980 + for_each_child_of_node(parent, np) {
39981 reg = of_get_property(np, "reg", &psize);
39982 if (reg == NULL || psize < 4)
39984 @@ -742,7 +242,7 @@
39985 struct pci_controller *hose = pci_bus_to_host(bus);
39988 - return of_node_get(hose->arch_data);
39989 + return of_node_get(hose->dn);
39992 /* not a root bus, we need to get our parent */
39993 @@ -812,9 +312,9 @@
39995 /* Make sure it's really a PCI device */
39996 hose = pci_find_hose_for_OF_device(node);
39997 - if (!hose || !hose->arch_data)
39998 + if (!hose || !hose->dn)
40000 - if (!scan_OF_pci_childs(((struct device_node*)hose->arch_data)->child,
40001 + if (!scan_OF_pci_childs(hose->dn,
40002 find_OF_pci_device_filter, (void *)node))
40004 reg = of_get_property(node, "reg", NULL);
40005 @@ -843,120 +343,6 @@
40007 EXPORT_SYMBOL(pci_device_from_OF_node);
40010 -pci_process_bridge_OF_ranges(struct pci_controller *hose,
40011 - struct device_node *dev, int primary)
40013 - static unsigned int static_lc_ranges[256] __initdata;
40014 - const unsigned int *dt_ranges;
40015 - unsigned int *lc_ranges, *ranges, *prev, size;
40016 - int rlen = 0, orig_rlen;
40018 - struct resource *res;
40019 - int np, na = of_n_addr_cells(dev);
40022 - /* First we try to merge ranges to fix a problem with some pmacs
40023 - * that can have more than 3 ranges, fortunately using contiguous
40024 - * addresses -- BenH
40026 - dt_ranges = of_get_property(dev, "ranges", &rlen);
40029 - /* Sanity check, though hopefully that never happens */
40030 - if (rlen > sizeof(static_lc_ranges)) {
40031 - printk(KERN_WARNING "OF ranges property too large !\n");
40032 - rlen = sizeof(static_lc_ranges);
40034 - lc_ranges = static_lc_ranges;
40035 - memcpy(lc_ranges, dt_ranges, rlen);
40036 - orig_rlen = rlen;
40038 - /* Let's work on a copy of the "ranges" property instead of damaging
40039 - * the device-tree image in memory
40041 - ranges = lc_ranges;
40043 - while ((rlen -= np * sizeof(unsigned int)) >= 0) {
40045 - if (prev[0] == ranges[0] && prev[1] == ranges[1] &&
40046 - (prev[2] + prev[na+4]) == ranges[2] &&
40047 - (prev[na+2] + prev[na+4]) == ranges[na+2]) {
40048 - prev[na+4] += ranges[na+4];
40059 - * The ranges property is laid out as an array of elements,
40060 - * each of which comprises:
40061 - * cells 0 - 2: a PCI address
40062 - * cells 3 or 3+4: a CPU physical address
40063 - * (size depending on dev->n_addr_cells)
40064 - * cells 4+5 or 5+6: the size of the range
40066 - ranges = lc_ranges;
40067 - rlen = orig_rlen;
40068 - while (ranges && (rlen -= np * sizeof(unsigned int)) >= 0) {
40070 - size = ranges[na+4];
40071 - switch ((ranges[0] >> 24) & 0x3) {
40072 - case 1: /* I/O space */
40073 - if (ranges[2] != 0)
40075 - hose->io_base_phys = ranges[na+2];
40076 - /* limit I/O space to 16MB */
40077 - if (size > 0x01000000)
40078 - size = 0x01000000;
40079 - hose->io_base_virt = ioremap(ranges[na+2], size);
40081 - isa_io_base = (unsigned long) hose->io_base_virt;
40082 - res = &hose->io_resource;
40083 - res->flags = IORESOURCE_IO;
40084 - res->start = ranges[2];
40085 - DBG("PCI: IO 0x%llx -> 0x%llx\n",
40086 - (u64)res->start, (u64)res->start + size - 1);
40088 - case 2: /* memory space */
40090 - if (ranges[1] == 0 && ranges[2] == 0
40091 - && ranges[na+4] <= (16 << 20)) {
40092 - /* 1st 16MB, i.e. ISA memory area */
40094 - isa_mem_base = ranges[na+2];
40097 - while (memno < 3 && hose->mem_resources[memno].flags)
40100 - hose->pci_mem_offset = ranges[na+2] - ranges[2];
40102 - res = &hose->mem_resources[memno];
40103 - res->flags = IORESOURCE_MEM;
40104 - if(ranges[0] & 0x40000000)
40105 - res->flags |= IORESOURCE_PREFETCH;
40106 - res->start = ranges[na+2];
40107 - DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno,
40108 - (u64)res->start, (u64)res->start + size - 1);
40112 - if (res != NULL) {
40113 - res->name = dev->full_name;
40114 - res->end = res->start + size - 1;
40115 - res->parent = NULL;
40116 - res->sibling = NULL;
40117 - res->child = NULL;
40123 /* We create the "pci-OF-bus-map" property now so it appears in the
40124 * /proc device tree
40126 @@ -986,219 +372,7 @@
40128 #endif /* CONFIG_PPC_OF */
40130 -#ifdef CONFIG_PPC_PMAC
40132 - * This set of routines checks for PCI<->PCI bridges that have closed
40133 - * IO resources and have child devices. It tries to re-open an IO
40134 - * window on them.
40136 - * This is a _temporary_ fix to workaround a problem with Apple's OF
40137 - * closing IO windows on P2P bridges when the OF drivers of cards
40138 - * below this bridge don't claim any IO range (typically ATI or
40141 - * A more complete fix would be to use drivers/pci/setup-bus.c, which
40142 - * involves a working pcibios_fixup_pbus_ranges(), some more care about
40143 - * ordering when creating the host bus resources, and maybe a few more
40147 -/* Initialize bridges with base/limit values we have collected */
40148 -static void __init
40149 -do_update_p2p_io_resource(struct pci_bus *bus, int enable_vga)
40151 - struct pci_dev *bridge = bus->self;
40152 - struct pci_controller* hose = (struct pci_controller *)bridge->sysdata;
40155 - struct resource res;
40157 - if (bus->resource[0] == NULL)
40159 - res = *(bus->resource[0]);
40161 - DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge));
40162 - res.start -= ((unsigned long) hose->io_base_virt - isa_io_base);
40163 - res.end -= ((unsigned long) hose->io_base_virt - isa_io_base);
40164 - DBG(" IO window: %016llx-%016llx\n", res.start, res.end);
40166 - /* Set up the top and bottom of the PCI I/O segment for this bus. */
40167 - pci_read_config_dword(bridge, PCI_IO_BASE, &l);
40169 - l |= (res.start >> 8) & 0x00f0;
40170 - l |= res.end & 0xf000;
40171 - pci_write_config_dword(bridge, PCI_IO_BASE, l);
40173 - if ((l & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32) {
40174 - l = (res.start >> 16) | (res.end & 0xffff0000);
40175 - pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, l);
40178 - pci_read_config_word(bridge, PCI_COMMAND, &w);
40179 - w |= PCI_COMMAND_IO;
40180 - pci_write_config_word(bridge, PCI_COMMAND, w);
40182 -#if 0 /* Enabling this causes XFree 4.2.0 to hang during PCI probe */
40183 - if (enable_vga) {
40184 - pci_read_config_word(bridge, PCI_BRIDGE_CONTROL, &w);
40185 - w |= PCI_BRIDGE_CTL_VGA;
40186 - pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, w);
40191 -/* This function is pretty basic and actually quite broken for the
40192 - * general case, it's enough for us right now though. It's supposed
40193 - * to tell us if we need to open an IO range at all or not and what
40197 -check_for_io_childs(struct pci_bus *bus, struct resource* res, int *found_vga)
40199 - struct pci_dev *dev;
40203 -#define push_end(res, mask) do { \
40204 - BUG_ON((mask+1) & mask); \
40205 - res->end = (res->end + mask) | mask; \
40208 - list_for_each_entry(dev, &bus->devices, bus_list) {
40209 - u16 class = dev->class >> 8;
40211 - if (class == PCI_CLASS_DISPLAY_VGA ||
40212 - class == PCI_CLASS_NOT_DEFINED_VGA)
40214 - if (class >> 8 == PCI_BASE_CLASS_BRIDGE && dev->subordinate)
40215 - rc |= check_for_io_childs(dev->subordinate, res, found_vga);
40216 - if (class == PCI_CLASS_BRIDGE_CARDBUS)
40217 - push_end(res, 0xfff);
40219 - for (i=0; i<PCI_NUM_RESOURCES; i++) {
40220 - struct resource *r;
40221 - unsigned long r_size;
40223 - if (dev->class >> 8 == PCI_CLASS_BRIDGE_PCI
40224 - && i >= PCI_BRIDGE_RESOURCES)
40226 - r = &dev->resource[i];
40227 - r_size = r->end - r->start;
40228 - if (r_size < 0xfff)
40230 - if (r->flags & IORESOURCE_IO && (r_size) != 0) {
40232 - push_end(res, r_size);
40240 -/* Here we scan all P2P bridges of a given level that have a closed
40241 - * IO window. Note that the test for the presence of a VGA card should
40242 - * be improved to take into account already configured P2P bridges,
40243 - * currently, we don't see them and might end up configuring 2 bridges
40244 - * with VGA pass through enabled
40246 -static void __init
40247 -do_fixup_p2p_level(struct pci_bus *bus)
40249 - struct pci_bus *b;
40250 - int i, parent_io;
40253 - for (parent_io=0; parent_io<4; parent_io++)
40254 - if (bus->resource[parent_io]
40255 - && bus->resource[parent_io]->flags & IORESOURCE_IO)
40257 - if (parent_io >= 4)
40260 - list_for_each_entry(b, &bus->children, node) {
40261 - struct pci_dev *d = b->self;
40262 - struct pci_controller* hose = (struct pci_controller *)d->sysdata;
40263 - struct resource *res = b->resource[0];
40264 - struct resource tmp_res;
40265 - unsigned long max;
40266 - int found_vga = 0;
40268 - memset(&tmp_res, 0, sizeof(tmp_res));
40269 - tmp_res.start = bus->resource[parent_io]->start;
40271 - /* We don't let low addresses go through that closed P2P bridge, well,
40272 - * that may not be necessary but I feel safer that way
40274 - if (tmp_res.start == 0)
40275 - tmp_res.start = 0x1000;
40277 - if (!list_empty(&b->devices) && res && res->flags == 0 &&
40278 - res != bus->resource[parent_io] &&
40279 - (d->class >> 8) == PCI_CLASS_BRIDGE_PCI &&
40280 - check_for_io_childs(b, &tmp_res, &found_vga)) {
40283 - printk(KERN_INFO "Fixing up IO bus %s\n", b->name);
40287 - printk(KERN_WARNING "Skipping VGA, already active"
40288 - " on bus segment\n");
40293 - pci_read_config_byte(d, PCI_IO_BASE, &io_base_lo);
40295 - if ((io_base_lo & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32)
40296 - max = ((unsigned long) hose->io_base_virt
40297 - - isa_io_base) + 0xffffffff;
40299 - max = ((unsigned long) hose->io_base_virt
40300 - - isa_io_base) + 0xffff;
40303 - res->flags = IORESOURCE_IO;
40304 - res->name = b->name;
40306 - /* Find a resource in the parent where we can allocate */
40307 - for (i = 0 ; i < 4; i++) {
40308 - struct resource *r = bus->resource[i];
40311 - if ((r->flags & IORESOURCE_IO) == 0)
40313 - DBG("Trying to allocate from %016llx, size %016llx from parent"
40314 - " res %d: %016llx -> %016llx\n",
40315 - res->start, res->end, i, r->start, r->end);
40317 - if (allocate_resource(r, res, res->end + 1, res->start, max,
40318 - res->end + 1, NULL, NULL) < 0) {
40319 - DBG("Failed !\n");
40322 - do_update_p2p_io_resource(b, found_vga);
40326 - do_fixup_p2p_level(b);
40331 -pcibios_fixup_p2p_bridges(void)
40333 - struct pci_bus *b;
40335 - list_for_each_entry(b, &pci_root_buses, node)
40336 - do_fixup_p2p_level(b);
40339 -#endif /* CONFIG_PPC_PMAC */
40342 -pcibios_init(void)
40343 +static int __init pcibios_init(void)
40345 struct pci_controller *hose, *tmp;
40346 struct pci_bus *bus;
40347 @@ -1206,6 +380,9 @@
40349 printk(KERN_INFO "PCI: Probing PCI hardware\n");
40351 + if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS)
40352 + pci_assign_all_buses = 1;
40354 /* Scan all of the recorded PCI controllers. */
40355 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
40356 if (pci_assign_all_buses)
40357 @@ -1213,9 +390,10 @@
40358 hose->last_busno = 0xff;
40359 bus = pci_scan_bus_parented(hose->parent, hose->first_busno,
40363 pci_bus_add_devices(bus);
40364 - hose->last_busno = bus->subordinate;
40365 + hose->last_busno = bus->subordinate;
40367 if (pci_assign_all_buses || next_busno <= hose->last_busno)
40368 next_busno = hose->last_busno + pcibios_assign_bus_offset;
40370 @@ -1228,18 +406,8 @@
40371 if (pci_assign_all_buses && have_of)
40372 pcibios_make_OF_bus_map();
40374 - /* Call machine dependent fixup */
40375 - if (ppc_md.pcibios_fixup)
40376 - ppc_md.pcibios_fixup();
40378 - /* Allocate and assign resources */
40379 - pcibios_allocate_bus_resources(&pci_root_buses);
40380 - pcibios_allocate_resources(0);
40381 - pcibios_allocate_resources(1);
40382 -#ifdef CONFIG_PPC_PMAC
40383 - pcibios_fixup_p2p_bridges();
40384 -#endif /* CONFIG_PPC_PMAC */
40385 - pcibios_assign_resources();
40386 + /* Call common code to handle resource allocation */
40387 + pcibios_resource_survey();
40389 /* Call machine dependent post-init code */
40390 if (ppc_md.pcibios_after_init)
40391 @@ -1250,14 +418,14 @@
40393 subsys_initcall(pcibios_init);
40395 -void pcibios_fixup_bus(struct pci_bus *bus)
40396 +void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
40398 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
40399 unsigned long io_offset;
40400 struct resource *res;
40401 - struct pci_dev *dev;
40404 + /* Hookup PHB resources */
40405 io_offset = (unsigned long)hose->io_base_virt - isa_io_base;
40406 if (bus->parent == NULL) {
40407 /* This is a host bridge - fill in its resources */
40408 @@ -1272,8 +440,8 @@
40409 res->end = IO_SPACE_LIMIT;
40410 res->flags = IORESOURCE_IO;
40412 - res->start += io_offset;
40413 - res->end += io_offset;
40414 + res->start = (res->start + io_offset) & 0xffffffffu;
40415 + res->end = (res->end + io_offset) & 0xffffffffu;
40417 for (i = 0; i < 3; ++i) {
40418 res = &hose->mem_resources[i];
40419 @@ -1288,35 +456,6 @@
40421 bus->resource[i+1] = res;
40424 - /* This is a subordinate bridge */
40425 - pci_read_bridge_bases(bus);
40427 - for (i = 0; i < 4; ++i) {
40428 - if ((res = bus->resource[i]) == NULL)
40430 - if (!res->flags || bus->self->transparent)
40432 - if (io_offset && (res->flags & IORESOURCE_IO)) {
40433 - res->start += io_offset;
40434 - res->end += io_offset;
40435 - } else if (hose->pci_mem_offset
40436 - && (res->flags & IORESOURCE_MEM)) {
40437 - res->start += hose->pci_mem_offset;
40438 - res->end += hose->pci_mem_offset;
40443 - /* Platform specific bus fixups */
40444 - if (ppc_md.pcibios_fixup_bus)
40445 - ppc_md.pcibios_fixup_bus(bus);
40447 - /* Read default IRQs and fixup if necessary */
40448 - list_for_each_entry(dev, &bus->devices, bus_list) {
40449 - pci_read_irq_line(dev);
40450 - if (ppc_md.pci_irq_fixup)
40451 - ppc_md.pci_irq_fixup(dev);
40455 @@ -1328,37 +467,6 @@
40456 /* XXX FIXME - update OF device tree node interrupt property */
40459 -int pcibios_enable_device(struct pci_dev *dev, int mask)
40461 - u16 cmd, old_cmd;
40463 - struct resource *r;
40465 - if (ppc_md.pcibios_enable_device_hook)
40466 - if (ppc_md.pcibios_enable_device_hook(dev, 0))
40469 - pci_read_config_word(dev, PCI_COMMAND, &cmd);
40471 - for (idx=0; idx<6; idx++) {
40472 - r = &dev->resource[idx];
40473 - if (r->flags & IORESOURCE_UNSET) {
40474 - printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
40477 - if (r->flags & IORESOURCE_IO)
40478 - cmd |= PCI_COMMAND_IO;
40479 - if (r->flags & IORESOURCE_MEM)
40480 - cmd |= PCI_COMMAND_MEMORY;
40482 - if (cmd != old_cmd) {
40483 - printk("PCI: Enabling device %s (%04x -> %04x)\n",
40484 - pci_name(dev), old_cmd, cmd);
40485 - pci_write_config_word(dev, PCI_COMMAND, cmd);
40490 static struct pci_controller*
40491 pci_bus_to_hose(int bus)
40493 @@ -1381,17 +489,6 @@
40494 struct pci_controller* hose;
40495 long result = -EOPNOTSUPP;
40497 - /* Argh ! Please forgive me for that hack, but that's the
40498 - * simplest way to get existing XFree to not lockup on some
40499 - * G5 machines... So when something asks for bus 0 io base
40500 - * (bus 0 is HT root), we return the AGP one instead.
40502 -#ifdef CONFIG_PPC_PMAC
40503 - if (machine_is(powermac) && machine_is_compatible("MacRISC4"))
40506 -#endif /* CONFIG_PPC_PMAC */
40508 hose = pci_bus_to_hose(bus);
40511 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/pci_64.c powerpc.git/arch/powerpc/kernel/pci_64.c
40512 --- linux-2.6.24/arch/powerpc/kernel/pci_64.c 2008-01-24 23:58:37.000000000 +0100
40513 +++ powerpc.git/arch/powerpc/kernel/pci_64.c 2008-01-28 20:25:49.000000000 +0100
40515 #include <asm/byteorder.h>
40516 #include <asm/machdep.h>
40517 #include <asm/ppc-pci.h>
40518 -#include <asm/firmware.h>
40521 #include <asm/udbg.h>
40525 unsigned long pci_probe_only = 1;
40526 -int pci_assign_all_buses = 0;
40528 -static void fixup_resource(struct resource *res, struct pci_dev *dev);
40529 -static void do_bus_setup(struct pci_bus *bus);
40531 /* pci_io_base -- the base address from which io bars are offsets.
40532 * This is the lowest I/O base address (so bar values are always positive),
40533 @@ -70,139 +65,31 @@
40535 EXPORT_SYMBOL(get_pci_dma_ops);
40537 -static void fixup_broken_pcnet32(struct pci_dev* dev)
40539 - if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
40540 - dev->vendor = PCI_VENDOR_ID_AMD;
40541 - pci_write_config_word(dev, PCI_VENDOR_ID, PCI_VENDOR_ID_AMD);
40544 -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32);
40546 -void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
40547 - struct resource *res)
40549 - unsigned long offset = 0;
40550 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
40555 - if (res->flags & IORESOURCE_IO)
40556 - offset = (unsigned long)hose->io_base_virt - _IO_BASE;
40558 - if (res->flags & IORESOURCE_MEM)
40559 - offset = hose->pci_mem_offset;
40561 - region->start = res->start - offset;
40562 - region->end = res->end - offset;
40565 -void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
40566 - struct pci_bus_region *region)
40567 +int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
40569 - unsigned long offset = 0;
40570 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
40575 - if (res->flags & IORESOURCE_IO)
40576 - offset = (unsigned long)hose->io_base_virt - _IO_BASE;
40578 - if (res->flags & IORESOURCE_MEM)
40579 - offset = hose->pci_mem_offset;
40581 - res->start = region->start + offset;
40582 - res->end = region->end + offset;
40583 + return dma_set_mask(&dev->dev, mask);
40586 -#ifdef CONFIG_HOTPLUG
40587 -EXPORT_SYMBOL(pcibios_resource_to_bus);
40588 -EXPORT_SYMBOL(pcibios_bus_to_resource);
40592 - * We need to avoid collisions with `mirrored' VGA ports
40593 - * and other strange ISA hardware, so we always want the
40594 - * addresses to be allocated in the 0x000-0x0ff region
40597 - * Why? Because some silly external IO cards only decode
40598 - * the low 10 bits of the IO address. The 0x00-0xff region
40599 - * is reserved for motherboard devices that decode all 16
40600 - * bits, so it's ok to allocate at, say, 0x2800-0x28ff,
40601 - * but we want to try to avoid allocating at 0x2900-0x2bff
40602 - * which might have be mirrored at 0x0100-0x03ff..
40604 -void pcibios_align_resource(void *data, struct resource *res,
40605 - resource_size_t size, resource_size_t align)
40606 +int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
40608 - struct pci_dev *dev = data;
40609 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
40610 - resource_size_t start = res->start;
40611 - unsigned long alignto;
40613 - if (res->flags & IORESOURCE_IO) {
40614 - unsigned long offset = (unsigned long)hose->io_base_virt -
40616 - /* Make sure we start at our min on all hoses */
40617 - if (start - offset < PCIBIOS_MIN_IO)
40618 - start = PCIBIOS_MIN_IO + offset;
40621 - * Put everything into 0x00-0xff region modulo 0x400
40623 - if (start & 0x300)
40624 - start = (start + 0x3ff) & ~0x3ff;
40627 - } else if (res->flags & IORESOURCE_MEM) {
40628 - /* Make sure we start at our min on all hoses */
40629 - if (start - hose->pci_mem_offset < PCIBIOS_MIN_MEM)
40630 - start = PCIBIOS_MIN_MEM + hose->pci_mem_offset;
40631 + rc = dma_set_mask(&dev->dev, mask);
40632 + dev->dev.coherent_dma_mask = dev->dma_mask;
40634 - /* Align to multiple of size of minimum base. */
40635 - alignto = max(0x1000UL, align);
40636 - start = ALIGN(start, alignto);
40639 - res->start = start;
40643 -void __devinit pcibios_claim_one_bus(struct pci_bus *b)
40644 +static void fixup_broken_pcnet32(struct pci_dev* dev)
40646 - struct pci_dev *dev;
40647 - struct pci_bus *child_bus;
40649 - list_for_each_entry(dev, &b->devices, bus_list) {
40652 - for (i = 0; i < PCI_NUM_RESOURCES; i++) {
40653 - struct resource *r = &dev->resource[i];
40655 - if (r->parent || !r->start || !r->flags)
40657 - pci_claim_resource(dev, i);
40659 + if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
40660 + dev->vendor = PCI_VENDOR_ID_AMD;
40661 + pci_write_config_word(dev, PCI_VENDOR_ID, PCI_VENDOR_ID_AMD);
40664 - list_for_each_entry(child_bus, &b->children, node)
40665 - pcibios_claim_one_bus(child_bus);
40667 -#ifdef CONFIG_HOTPLUG
40668 -EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
40671 -static void __init pcibios_claim_of_setup(void)
40673 - struct pci_bus *b;
40675 - if (firmware_has_feature(FW_FEATURE_ISERIES))
40677 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32);
40679 - list_for_each_entry(b, &pci_root_buses, node)
40680 - pcibios_claim_one_bus(b);
40683 static u32 get_int_prop(struct device_node *np, const char *name, u32 def)
40685 @@ -270,7 +157,6 @@
40686 res->end = base + size - 1;
40687 res->flags = flags;
40688 res->name = pci_name(dev);
40689 - fixup_resource(res, dev);
40693 @@ -339,16 +225,17 @@
40694 EXPORT_SYMBOL(of_create_pci_dev);
40696 void __devinit of_scan_bus(struct device_node *node,
40697 - struct pci_bus *bus)
40698 + struct pci_bus *bus)
40700 - struct device_node *child = NULL;
40701 + struct device_node *child;
40704 struct pci_dev *dev;
40706 DBG("of_scan_bus(%s) bus no %d... \n", node->full_name, bus->number);
40708 - while ((child = of_get_next_child(node, child)) != NULL) {
40709 + /* Scan direct children */
40710 + for_each_child_of_node(node, child) {
40711 DBG(" * %s\n", child->full_name);
40712 reg = of_get_property(child, "reg", ®len);
40713 if (reg == NULL || reglen < 20)
40714 @@ -359,19 +246,26 @@
40715 dev = of_create_pci_dev(child, bus, devfn);
40718 - DBG("dev header type: %x\n", dev->hdr_type);
40719 + DBG(" dev header type: %x\n", dev->hdr_type);
40722 + /* Ally all fixups */
40723 + pcibios_fixup_of_probed_bus(bus);
40725 + /* Now scan child busses */
40726 + list_for_each_entry(dev, &bus->devices, bus_list) {
40727 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
40728 - dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
40729 - of_scan_pci_bridge(child, dev);
40730 + dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
40731 + struct device_node *child = pci_device_to_OF_node(dev);
40733 + of_scan_pci_bridge(child, dev);
40737 - do_bus_setup(bus);
40739 EXPORT_SYMBOL(of_scan_bus);
40741 void __devinit of_scan_pci_bridge(struct device_node *node,
40742 - struct pci_dev *dev)
40743 + struct pci_dev *dev)
40745 struct pci_bus *bus;
40746 const u32 *busrange, *ranges;
40747 @@ -441,7 +335,6 @@
40748 res->start = of_read_number(&ranges[1], 2);
40749 res->end = res->start + size - 1;
40750 res->flags = flags;
40751 - fixup_resource(res, dev);
40753 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
40755 @@ -462,12 +355,12 @@
40756 void __devinit scan_phb(struct pci_controller *hose)
40758 struct pci_bus *bus;
40759 - struct device_node *node = hose->arch_data;
40760 + struct device_node *node = hose->dn;
40762 - struct resource *res;
40764 - DBG("Scanning PHB %s\n", node ? node->full_name : "<NO NAME>");
40765 + DBG("PCI: Scanning PHB %s\n", node ? node->full_name : "<NO NAME>");
40767 + /* Create an empty bus for the toplevel */
40768 bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node);
40770 printk(KERN_ERR "Failed to create bus for PCI domain %04x\n",
40771 @@ -477,27 +370,27 @@
40772 bus->secondary = hose->first_busno;
40775 - if (!firmware_has_feature(FW_FEATURE_ISERIES))
40776 - pcibios_map_io_space(bus);
40778 - bus->resource[0] = res = &hose->io_resource;
40779 - if (res->flags && request_resource(&ioport_resource, res)) {
40780 - printk(KERN_ERR "Failed to request PCI IO region "
40781 - "on PCI domain %04x\n", hose->global_number);
40782 - DBG("res->start = 0x%016lx, res->end = 0x%016lx\n",
40783 - res->start, res->end);
40785 + /* Get some IO space for the new PHB */
40786 + pcibios_map_io_space(bus);
40788 + /* Wire up PHB bus resources */
40789 + DBG("PCI: PHB IO resource = %016lx-%016lx [%lx]\n",
40790 + hose->io_resource.start, hose->io_resource.end,
40791 + hose->io_resource.flags);
40792 + bus->resource[0] = &hose->io_resource;
40793 for (i = 0; i < 3; ++i) {
40794 - res = &hose->mem_resources[i];
40795 - bus->resource[i+1] = res;
40796 - if (res->flags && request_resource(&iomem_resource, res))
40797 - printk(KERN_ERR "Failed to request PCI memory region "
40798 - "on PCI domain %04x\n", hose->global_number);
40800 + DBG("PCI: PHB MEM resource %d = %016lx-%016lx [%lx]\n", i,
40801 + hose->mem_resources[i].start,
40802 + hose->mem_resources[i].end,
40803 + hose->mem_resources[i].flags);
40804 + bus->resource[i+1] = &hose->mem_resources[i];
40806 + DBG("PCI: PHB MEM offset = %016lx\n", hose->pci_mem_offset);
40807 + DBG("PCI: PHB IO offset = %08lx\n",
40808 + (unsigned long)hose->io_base_virt - _IO_BASE);
40810 + /* Get probe mode and perform scan */
40811 mode = PCI_PROBE_NORMAL;
40813 if (node && ppc_md.pci_probe_mode)
40814 mode = ppc_md.pci_probe_mode(bus);
40815 DBG(" probe mode: %d\n", mode);
40816 @@ -514,15 +407,15 @@
40818 struct pci_controller *hose, *tmp;
40820 + printk(KERN_INFO "PCI: Probing PCI hardware\n");
40822 /* For now, override phys_mem_access_prot. If we need it,
40823 * later, we may move that initialization to each ppc_md
40825 ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot;
40827 - if (firmware_has_feature(FW_FEATURE_ISERIES))
40828 - iSeries_pcibios_init();
40830 - printk(KERN_DEBUG "PCI: Probing PCI hardware\n");
40831 + if (pci_probe_only)
40832 + ppc_pci_flags |= PPC_PCI_PROBE_ONLY;
40834 /* Scan all of the recorded PCI controllers. */
40835 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
40836 @@ -530,19 +423,8 @@
40837 pci_bus_add_devices(hose->bus);
40840 - if (!firmware_has_feature(FW_FEATURE_ISERIES)) {
40841 - if (pci_probe_only)
40842 - pcibios_claim_of_setup();
40844 - /* FIXME: `else' will be removed when
40845 - pci_assign_unassigned_resources() is able to work
40846 - correctly with [partially] allocated PCI tree. */
40847 - pci_assign_unassigned_resources();
40850 - /* Call machine dependent final fixup */
40851 - if (ppc_md.pcibios_fixup)
40852 - ppc_md.pcibios_fixup();
40853 + /* Call common code to handle resource allocation */
40854 + pcibios_resource_survey();
40856 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n");
40858 @@ -551,141 +433,6 @@
40860 subsys_initcall(pcibios_init);
40862 -int pcibios_enable_device(struct pci_dev *dev, int mask)
40867 - pci_read_config_word(dev, PCI_COMMAND, &cmd);
40870 - for (i = 0; i < PCI_NUM_RESOURCES; i++) {
40871 - struct resource *res = &dev->resource[i];
40873 - /* Only set up the requested stuff */
40874 - if (!(mask & (1<<i)))
40877 - if (res->flags & IORESOURCE_IO)
40878 - cmd |= PCI_COMMAND_IO;
40879 - if (res->flags & IORESOURCE_MEM)
40880 - cmd |= PCI_COMMAND_MEMORY;
40883 - if (cmd != oldcmd) {
40884 - printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n",
40885 - pci_name(dev), cmd);
40886 - /* Enable the appropriate bits in the PCI command register. */
40887 - pci_write_config_word(dev, PCI_COMMAND, cmd);
40892 -/* Decide whether to display the domain number in /proc */
40893 -int pci_proc_domain(struct pci_bus *bus)
40895 - if (firmware_has_feature(FW_FEATURE_ISERIES))
40898 - struct pci_controller *hose = pci_bus_to_host(bus);
40899 - return hose->buid != 0;
40903 -void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
40904 - struct device_node *dev, int prim)
40906 - const unsigned int *ranges;
40907 - unsigned int pci_space;
40908 - unsigned long size;
40911 - struct resource *res;
40912 - int np, na = of_n_addr_cells(dev);
40913 - unsigned long pci_addr, cpu_phys_addr;
40917 - /* From "PCI Binding to 1275"
40918 - * The ranges property is laid out as an array of elements,
40919 - * each of which comprises:
40920 - * cells 0 - 2: a PCI address
40921 - * cells 3 or 3+4: a CPU physical address
40922 - * (size depending on dev->n_addr_cells)
40923 - * cells 4+5 or 5+6: the size of the range
40925 - ranges = of_get_property(dev, "ranges", &rlen);
40926 - if (ranges == NULL)
40928 - hose->io_base_phys = 0;
40929 - while ((rlen -= np * sizeof(unsigned int)) >= 0) {
40931 - pci_space = ranges[0];
40932 - pci_addr = ((unsigned long)ranges[1] << 32) | ranges[2];
40933 - cpu_phys_addr = of_translate_address(dev, &ranges[3]);
40934 - size = ((unsigned long)ranges[na+3] << 32) | ranges[na+4];
40939 - /* Now consume following elements while they are contiguous */
40940 - while (rlen >= np * sizeof(unsigned int)) {
40941 - unsigned long addr, phys;
40943 - if (ranges[0] != pci_space)
40945 - addr = ((unsigned long)ranges[1] << 32) | ranges[2];
40946 - phys = ranges[3];
40948 - phys = (phys << 32) | ranges[4];
40949 - if (addr != pci_addr + size ||
40950 - phys != cpu_phys_addr + size)
40953 - size += ((unsigned long)ranges[na+3] << 32)
40956 - rlen -= np * sizeof(unsigned int);
40959 - switch ((pci_space >> 24) & 0x3) {
40960 - case 1: /* I/O space */
40961 - hose->io_base_phys = cpu_phys_addr - pci_addr;
40962 - /* handle from 0 to top of I/O window */
40963 - hose->pci_io_size = pci_addr + size;
40965 - res = &hose->io_resource;
40966 - res->flags = IORESOURCE_IO;
40967 - res->start = pci_addr;
40968 - DBG("phb%d: IO 0x%lx -> 0x%lx\n", hose->global_number,
40969 - res->start, res->start + size - 1);
40971 - case 2: /* memory space */
40973 - while (memno < 3 && hose->mem_resources[memno].flags)
40977 - hose->pci_mem_offset = cpu_phys_addr - pci_addr;
40979 - res = &hose->mem_resources[memno];
40980 - res->flags = IORESOURCE_MEM;
40981 - res->start = cpu_phys_addr;
40982 - DBG("phb%d: MEM 0x%lx -> 0x%lx\n", hose->global_number,
40983 - res->start, res->start + size - 1);
40987 - if (res != NULL) {
40988 - res->name = dev->full_name;
40989 - res->end = res->start + size - 1;
40990 - res->parent = NULL;
40991 - res->sibling = NULL;
40992 - res->child = NULL;
40997 #ifdef CONFIG_HOTPLUG
40999 int pcibios_unmap_io_space(struct pci_bus *bus)
41000 @@ -719,8 +466,7 @@
41001 if (hose->io_base_alloc == 0)
41004 - DBG("IO unmapping for PHB %s\n",
41005 - ((struct device_node *)hose->arch_data)->full_name);
41006 + DBG("IO unmapping for PHB %s\n", hose->dn->full_name);
41007 DBG(" alloc=0x%p\n", hose->io_base_alloc);
41009 /* This is a PHB, we fully unmap the IO area */
41010 @@ -779,8 +525,7 @@
41011 hose->io_base_virt = (void __iomem *)(area->addr +
41012 hose->io_base_phys - phys_page);
41014 - DBG("IO mapping for PHB %s\n",
41015 - ((struct device_node *)hose->arch_data)->full_name);
41016 + DBG("IO mapping for PHB %s\n", hose->dn->full_name);
41017 DBG(" phys=0x%016lx, virt=0x%p (alloc=0x%p)\n",
41018 hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc);
41019 DBG(" size=0x%016lx (alloc=0x%016lx)\n",
41020 @@ -803,51 +548,13 @@
41022 EXPORT_SYMBOL_GPL(pcibios_map_io_space);
41024 -static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
41026 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
41027 - unsigned long offset;
41029 - if (res->flags & IORESOURCE_IO) {
41030 - offset = (unsigned long)hose->io_base_virt - _IO_BASE;
41031 - res->start += offset;
41032 - res->end += offset;
41033 - } else if (res->flags & IORESOURCE_MEM) {
41034 - res->start += hose->pci_mem_offset;
41035 - res->end += hose->pci_mem_offset;
41039 -void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
41040 - struct pci_bus *bus)
41042 - /* Update device resources. */
41045 - DBG("%s: Fixup resources:\n", pci_name(dev));
41046 - for (i = 0; i < PCI_NUM_RESOURCES; i++) {
41047 - struct resource *res = &dev->resource[i];
41051 - DBG(" 0x%02x < %08lx:0x%016lx...0x%016lx\n",
41052 - i, res->flags, res->start, res->end);
41054 - fixup_resource(res, dev);
41056 - DBG(" > %08lx:0x%016lx...0x%016lx\n",
41057 - res->flags, res->start, res->end);
41060 -EXPORT_SYMBOL(pcibios_fixup_device_resources);
41062 void __devinit pcibios_setup_new_device(struct pci_dev *dev)
41064 struct dev_archdata *sd = &dev->dev.archdata;
41066 sd->of_node = pci_device_to_OF_node(dev);
41068 - DBG("PCI device %s OF node: %s\n", pci_name(dev),
41069 + DBG("PCI: device %s OF node: %s\n", pci_name(dev),
41070 sd->of_node ? sd->of_node->full_name : "<none>");
41072 sd->dma_ops = pci_dma_ops;
41073 @@ -861,7 +568,7 @@
41075 EXPORT_SYMBOL(pcibios_setup_new_device);
41077 -static void __devinit do_bus_setup(struct pci_bus *bus)
41078 +void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
41080 struct pci_dev *dev;
41082 @@ -870,42 +577,7 @@
41084 list_for_each_entry(dev, &bus->devices, bus_list)
41085 pcibios_setup_new_device(dev);
41087 - /* Read default IRQs and fixup if necessary */
41088 - list_for_each_entry(dev, &bus->devices, bus_list) {
41089 - pci_read_irq_line(dev);
41090 - if (ppc_md.pci_irq_fixup)
41091 - ppc_md.pci_irq_fixup(dev);
41095 -void __devinit pcibios_fixup_bus(struct pci_bus *bus)
41097 - struct pci_dev *dev = bus->self;
41098 - struct device_node *np;
41100 - np = pci_bus_to_OF_node(bus);
41102 - DBG("pcibios_fixup_bus(%s)\n", np ? np->full_name : "<???>");
41104 - if (dev && pci_probe_only &&
41105 - (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
41106 - /* This is a subordinate bridge */
41108 - pci_read_bridge_bases(bus);
41109 - pcibios_fixup_device_resources(dev, bus);
41112 - do_bus_setup(bus);
41114 - if (!pci_probe_only)
41117 - list_for_each_entry(dev, &bus->devices, bus_list)
41118 - if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
41119 - pcibios_fixup_device_resources(dev, bus);
41121 -EXPORT_SYMBOL(pcibios_fixup_bus);
41123 unsigned long pci_address_to_pio(phys_addr_t address)
41125 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/pci_dn.c powerpc.git/arch/powerpc/kernel/pci_dn.c
41126 --- linux-2.6.24/arch/powerpc/kernel/pci_dn.c 2008-01-24 23:58:37.000000000 +0100
41127 +++ powerpc.git/arch/powerpc/kernel/pci_dn.c 2008-01-28 20:25:49.000000000 +0100
41129 pdn->busno = (regs[0] >> 16) & 0xff;
41130 pdn->devfn = (regs[0] >> 8) & 0xff;
41132 - if (firmware_has_feature(FW_FEATURE_ISERIES)) {
41133 - const u32 *busp = of_get_property(dn, "linux,subbus", NULL);
41135 - pdn->bussubno = *busp;
41138 pdn->pci_ext_config_space = (type && *type == 1);
41140 @@ -133,7 +128,7 @@
41142 void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb)
41144 - struct device_node * dn = (struct device_node *) phb->arch_data;
41145 + struct device_node *dn = phb->dn;
41146 struct pci_dn *pdn;
41148 /* PHB nodes themselves must not match */
41149 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/ppc_ksyms.c powerpc.git/arch/powerpc/kernel/ppc_ksyms.c
41150 --- linux-2.6.24/arch/powerpc/kernel/ppc_ksyms.c 2008-01-24 23:58:37.000000000 +0100
41151 +++ powerpc.git/arch/powerpc/kernel/ppc_ksyms.c 2008-01-28 20:25:49.000000000 +0100
41153 extern int sys_sigreturn(struct pt_regs *regs);
41155 EXPORT_SYMBOL(clear_pages);
41156 +EXPORT_SYMBOL(copy_page);
41157 EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
41158 EXPORT_SYMBOL(DMA_MODE_READ);
41159 EXPORT_SYMBOL(DMA_MODE_WRITE);
41160 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/prom.c powerpc.git/arch/powerpc/kernel/prom.c
41161 --- linux-2.6.24/arch/powerpc/kernel/prom.c 2008-01-24 23:58:37.000000000 +0100
41162 +++ powerpc.git/arch/powerpc/kernel/prom.c 2008-01-28 20:25:49.000000000 +0100
41163 @@ -583,6 +583,20 @@
41164 ibm_pa_features, ARRAY_SIZE(ibm_pa_features));
41167 +#ifdef CONFIG_PPC64
41168 +static void __init check_cpu_slb_size(unsigned long node)
41170 + u32 *slb_size_ptr;
41172 + slb_size_ptr = of_get_flat_dt_prop(node, "ibm,slb-size", NULL);
41173 + if (slb_size_ptr != NULL) {
41174 + mmu_slb_size = *slb_size_ptr;
41178 +#define check_cpu_slb_size(node) do { } while(0)
41181 static struct feature_property {
41184 @@ -600,6 +614,29 @@
41185 #endif /* CONFIG_PPC64 */
41188 +#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU)
41189 +static inline void identical_pvr_fixup(unsigned long node)
41191 + unsigned int pvr;
41192 + char *model = of_get_flat_dt_prop(node, "model", NULL);
41195 + * Since 440GR(x)/440EP(x) processors have the same pvr,
41196 + * we check the node path and set bit 28 in the cur_cpu_spec
41197 + * pvr for EP(x) processor version. This bit is always 0 in
41198 + * the "real" pvr. Then we call identify_cpu again with
41199 + * the new logical pvr to enable FPU support.
41201 + if (model && strstr(model, "440EP")) {
41202 + pvr = cur_cpu_spec->pvr_value | 0x8;
41203 + identify_cpu(0, pvr);
41204 + DBG("Using logical pvr %x for %s\n", pvr, model);
41208 +#define identical_pvr_fixup(node) do { } while(0)
41211 static void __init check_cpu_feature_properties(unsigned long node)
41214 @@ -697,22 +734,13 @@
41215 prop = of_get_flat_dt_prop(node, "cpu-version", NULL);
41216 if (prop && (*prop & 0xff000000) == 0x0f000000)
41217 identify_cpu(0, *prop);
41218 -#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU)
41220 - * Since 440GR(x)/440EP(x) processors have the same pvr,
41221 - * we check the node path and set bit 28 in the cur_cpu_spec
41222 - * pvr for EP(x) processor version. This bit is always 0 in
41223 - * the "real" pvr. Then we call identify_cpu again with
41224 - * the new logical pvr to enable FPU support.
41226 - if (strstr(uname, "440EP")) {
41227 - identify_cpu(0, cur_cpu_spec->pvr_value | 0x8);
41231 + identical_pvr_fixup(node);
41234 check_cpu_feature_properties(node);
41235 check_cpu_pa_features(node);
41236 + check_cpu_slb_size(node);
41238 #ifdef CONFIG_PPC_PSERIES
41240 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/prom_parse.c powerpc.git/arch/powerpc/kernel/prom_parse.c
41241 --- linux-2.6.24/arch/powerpc/kernel/prom_parse.c 2008-01-24 23:58:37.000000000 +0100
41242 +++ powerpc.git/arch/powerpc/kernel/prom_parse.c 2008-01-28 20:25:49.000000000 +0100
41243 @@ -273,7 +273,7 @@
41245 struct pci_controller *host;
41246 host = pci_bus_to_host(pdev->bus);
41247 - ppnode = host ? host->arch_data : NULL;
41248 + ppnode = host ? host->dn : NULL;
41250 /* No node for host bridge ? give up */
41251 if (ppnode == NULL)
41252 @@ -419,7 +419,7 @@
41254 static int of_translate_one(struct device_node *parent, struct of_bus *bus,
41255 struct of_bus *pbus, u32 *addr,
41256 - int na, int ns, int pna)
41257 + int na, int ns, int pna, const char *rprop)
41261 @@ -438,7 +438,7 @@
41262 * to translate addresses that aren't supposed to be translated in
41263 * the first place. --BenH.
41265 - ranges = of_get_property(parent, "ranges", &rlen);
41266 + ranges = of_get_property(parent, rprop, &rlen);
41267 if (ranges == NULL || rlen == 0) {
41268 offset = of_read_number(addr, na);
41269 memset(addr, 0, pna * 4);
41270 @@ -481,7 +481,8 @@
41271 * that can be mapped to a cpu physical address). This is not really specified
41272 * that way, but this is traditionally the way IBM at least do things
41274 -u64 of_translate_address(struct device_node *dev, const u32 *in_addr)
41275 +u64 __of_translate_address(struct device_node *dev, const u32 *in_addr,
41276 + const char *rprop)
41278 struct device_node *parent = NULL;
41279 struct of_bus *bus, *pbus;
41280 @@ -540,7 +541,7 @@
41281 pbus->name, pna, pns, parent->full_name);
41283 /* Apply bus translation */
41284 - if (of_translate_one(dev, bus, pbus, addr, na, ns, pna))
41285 + if (of_translate_one(dev, bus, pbus, addr, na, ns, pna, rprop))
41288 /* Complete the move up one level */
41289 @@ -556,8 +557,19 @@
41294 +u64 of_translate_address(struct device_node *dev, const u32 *in_addr)
41296 + return __of_translate_address(dev, in_addr, "ranges");
41298 EXPORT_SYMBOL(of_translate_address);
41300 +u64 of_translate_dma_address(struct device_node *dev, const u32 *in_addr)
41302 + return __of_translate_address(dev, in_addr, "dma-ranges");
41304 +EXPORT_SYMBOL(of_translate_dma_address);
41306 const u32 *of_get_address(struct device_node *dev, int index, u64 *size,
41307 unsigned int *flags)
41309 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/rio.c powerpc.git/arch/powerpc/kernel/rio.c
41310 --- linux-2.6.24/arch/powerpc/kernel/rio.c 1970-01-01 01:00:00.000000000 +0100
41311 +++ powerpc.git/arch/powerpc/kernel/rio.c 2008-01-28 20:25:49.000000000 +0100
41314 + * RapidIO PPC32 support
41316 + * Copyright 2005 MontaVista Software, Inc.
41317 + * Matt Porter <mporter@kernel.crashing.org>
41319 + * This program is free software; you can redistribute it and/or modify it
41320 + * under the terms of the GNU General Public License as published by the
41321 + * Free Software Foundation; either version 2 of the License, or (at your
41322 + * option) any later version.
41325 +#include <linux/init.h>
41326 +#include <linux/kernel.h>
41327 +#include <linux/rio.h>
41329 +#include <asm/rio.h>
41332 + * platform_rio_init - Do platform specific RIO init
41334 + * Any platform specific initialization of RapdIO
41335 + * hardware is done here as well as registration
41336 + * of any active master ports in the system.
41338 +void __attribute__ ((weak))
41339 + platform_rio_init(void)
41341 + printk(KERN_WARNING "RIO: No platform_rio_init() present\n");
41345 + * ppc_rio_init - Do PPC32 RIO init
41347 + * Calls platform-specific RIO init code and then calls
41348 + * rio_init_mports() to initialize any master ports that
41349 + * have been registered with the RIO subsystem.
41351 +static int __init ppc_rio_init(void)
41353 + printk(KERN_INFO "RIO: RapidIO init\n");
41355 + /* Platform specific initialization */
41356 + platform_rio_init();
41358 + /* Enumerate all registered ports */
41359 + rio_init_mports();
41364 +subsys_initcall(ppc_rio_init);
41365 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/rtas_pci.c powerpc.git/arch/powerpc/kernel/rtas_pci.c
41366 --- linux-2.6.24/arch/powerpc/kernel/rtas_pci.c 2008-01-24 23:58:37.000000000 +0100
41367 +++ powerpc.git/arch/powerpc/kernel/rtas_pci.c 2008-01-28 20:25:49.000000000 +0100
41368 @@ -260,7 +260,7 @@
41370 int __devinit rtas_setup_phb(struct pci_controller *phb)
41372 - struct device_node *dev = phb->arch_data;
41373 + struct device_node *dev = phb->dn;
41375 if (is_python(dev))
41376 python_countermeasures(dev);
41377 @@ -280,10 +280,7 @@
41378 struct pci_controller *phb;
41379 struct device_node *root = of_find_node_by_path("/");
41381 - for (node = of_get_next_child(root, NULL);
41383 - node = of_get_next_child(root, node)) {
41385 + for_each_child_of_node(root, node) {
41386 if (node->type == NULL || (strcmp(node->type, "pci") != 0 &&
41387 strcmp(node->type, "pciex") != 0))
41389 @@ -311,10 +308,12 @@
41391 pci_probe_only = *prop;
41393 +#ifdef CONFIG_PPC32 /* Will be made generic soon */
41394 prop = of_get_property(of_chosen,
41395 "linux,pci-assign-all-buses", NULL);
41397 - pci_assign_all_buses = *prop;
41398 + if (prop && *prop)
41399 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
41400 +#endif /* CONFIG_PPC32 */
41404 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/setup-common.c powerpc.git/arch/powerpc/kernel/setup-common.c
41405 --- linux-2.6.24/arch/powerpc/kernel/setup-common.c 2008-01-24 23:58:37.000000000 +0100
41406 +++ powerpc.git/arch/powerpc/kernel/setup-common.c 2008-01-28 20:25:49.000000000 +0100
41408 #include <linux/serial.h>
41409 #include <linux/serial_8250.h>
41410 #include <linux/debugfs.h>
41411 +#include <linux/percpu.h>
41412 #include <asm/io.h>
41413 #include <asm/prom.h>
41414 #include <asm/processor.h>
41416 #include <asm/mmu.h>
41417 #include <asm/lmb.h>
41418 #include <asm/xmon.h>
41419 +#include <asm/cputhreads.h>
41423 @@ -327,6 +329,31 @@
41427 +int threads_per_core, threads_shift;
41428 +cpumask_t threads_core_mask;
41430 +static void __init cpu_init_thread_core_maps(int tpc)
41434 + threads_per_core = tpc;
41435 + threads_core_mask = CPU_MASK_NONE;
41437 + /* This implementation only supports power of 2 number of threads
41438 + * for simplicity and performance
41440 + threads_shift = ilog2(tpc);
41441 + BUG_ON(tpc != (1 << threads_shift));
41443 + for (i = 0; i < tpc; i++)
41444 + cpu_set(i, threads_core_mask);
41446 + printk(KERN_INFO "CPU maps initialized for %d thread%s per core\n",
41447 + tpc, tpc > 1 ? "s" : "");
41448 + printk(KERN_DEBUG " (thread shift is %d)\n", threads_shift);
41453 * setup_cpu_maps - initialize the following cpu maps:
41455 @@ -350,22 +377,32 @@
41457 struct device_node *dn = NULL;
41459 + int nthreads = 1;
41461 + DBG("smp_setup_cpu_maps()\n");
41463 while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) {
41464 const int *intserv;
41465 - int j, len = sizeof(u32), nthreads = 1;
41468 + DBG(" * %s...\n", dn->full_name);
41470 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
41474 nthreads = len / sizeof(int);
41476 + DBG(" ibm,ppc-interrupt-server#s -> %d threads\n",
41479 + DBG(" no ibm,ppc-interrupt-server#s -> 1 thread\n");
41480 intserv = of_get_property(dn, "reg", NULL);
41482 intserv = &cpu; /* assume logical == phys */
41485 for (j = 0; j < nthreads && cpu < NR_CPUS; j++) {
41486 + DBG(" thread %d -> cpu %d (hard id %d)\n",
41487 + j, cpu, intserv[j]);
41488 cpu_set(cpu, cpu_present_map);
41489 set_hard_smp_processor_id(cpu, intserv[j]);
41490 cpu_set(cpu, cpu_possible_map);
41491 @@ -373,6 +410,12 @@
41495 + /* If no SMT supported, nthreads is forced to 1 */
41496 + if (!cpu_has_feature(CPU_FTR_SMT)) {
41497 + DBG(" SMT disabled ! nthreads forced to 1\n");
41501 #ifdef CONFIG_PPC64
41503 * On pSeries LPAR, we need to know how many cpus
41504 @@ -395,7 +438,7 @@
41506 /* Double maxcpus for processors which have SMT capability */
41507 if (cpu_has_feature(CPU_FTR_SMT))
41509 + maxcpus *= nthreads;
41511 if (maxcpus > NR_CPUS) {
41512 printk(KERN_WARNING
41513 @@ -412,9 +455,16 @@
41518 vdso_data->processorCount = num_present_cpus();
41519 #endif /* CONFIG_PPC64 */
41521 + /* Initialize CPU <=> thread mapping/
41523 + * WARNING: We assume that the number of threads is the same for
41524 + * every CPU in the system. If that is not the case, then some code
41525 + * here will have to be reworked
41527 + cpu_init_thread_core_maps(nthreads);
41531 @@ -424,17 +474,19 @@
41533 void __init smp_setup_cpu_sibling_map(void)
41535 -#if defined(CONFIG_PPC64)
41537 +#ifdef CONFIG_PPC64
41538 + int i, cpu, base;
41541 - * Do the sibling map; assume only two threads per processor.
41543 for_each_possible_cpu(cpu) {
41544 - cpu_set(cpu, per_cpu(cpu_sibling_map, cpu));
41545 - if (cpu_has_feature(CPU_FTR_SMT))
41546 - cpu_set(cpu ^ 0x1, per_cpu(cpu_sibling_map, cpu));
41547 + DBG("Sibling map for CPU %d:", cpu);
41548 + base = cpu_first_thread_in_core(cpu);
41549 + for (i = 0; i < threads_per_core; i++) {
41550 + cpu_set(base + i, per_cpu(cpu_sibling_map, cpu));
41551 + DBG(" %d", base + i);
41556 #endif /* CONFIG_PPC64 */
41558 #endif /* CONFIG_SMP */
41559 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/signal_32.c powerpc.git/arch/powerpc/kernel/signal_32.c
41560 --- linux-2.6.24/arch/powerpc/kernel/signal_32.c 2008-01-24 23:58:37.000000000 +0100
41561 +++ powerpc.git/arch/powerpc/kernel/signal_32.c 2008-01-28 20:25:49.000000000 +0100
41562 @@ -24,13 +24,12 @@
41563 #include <linux/signal.h>
41564 #include <linux/errno.h>
41565 #include <linux/elf.h>
41566 +#include <linux/ptrace.h>
41567 #ifdef CONFIG_PPC64
41568 #include <linux/syscalls.h>
41569 #include <linux/compat.h>
41570 -#include <linux/ptrace.h>
41572 #include <linux/wait.h>
41573 -#include <linux/ptrace.h>
41574 #include <linux/unistd.h>
41575 #include <linux/stddef.h>
41576 #include <linux/tty.h>
41577 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/smp.c powerpc.git/arch/powerpc/kernel/smp.c
41578 --- linux-2.6.24/arch/powerpc/kernel/smp.c 2008-01-24 23:58:37.000000000 +0100
41579 +++ powerpc.git/arch/powerpc/kernel/smp.c 2008-01-28 20:25:49.000000000 +0100
41582 int smt_enabled_at_boot = 1;
41584 +static int ipi_fail_ok;
41586 static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
41588 #ifdef CONFIG_PPC64
41589 @@ -181,12 +183,13 @@
41590 * <wait> If true, wait (atomically) until function has completed on other CPUs.
41591 * [RETURNS] 0 on success, else a negative status code. Does not return until
41592 * remote CPUs are nearly ready to execute <<func>> or are or have executed.
41593 + * <map> is a cpu map of the cpus to send IPI to.
41595 * You must not call this function with disabled interrupts or from a
41596 * hardware interrupt handler or from a bottom half handler.
41598 -int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
41599 - int wait, cpumask_t map)
41600 +static int __smp_call_function_map(void (*func) (void *info), void *info,
41601 + int nonatomic, int wait, cpumask_t map)
41603 struct call_data_struct data;
41604 int ret = -1, num_cpus;
41605 @@ -203,8 +206,6 @@
41607 atomic_set(&data.finished, 0);
41609 - spin_lock(&call_lock);
41611 /* remove 'self' from the map */
41612 if (cpu_isset(smp_processor_id(), map))
41613 cpu_clear(smp_processor_id(), map);
41614 @@ -231,7 +232,8 @@
41615 printk("smp_call_function on cpu %d: other cpus not "
41616 "responding (%d)\n", smp_processor_id(),
41617 atomic_read(&data.started));
41619 + if (!ipi_fail_ok)
41624 @@ -258,14 +260,18 @@
41628 - spin_unlock(&call_lock);
41632 static int __smp_call_function(void (*func)(void *info), void *info,
41633 int nonatomic, int wait)
41635 - return smp_call_function_map(func,info,nonatomic,wait,cpu_online_map);
41637 + spin_lock(&call_lock);
41638 + ret =__smp_call_function_map(func, info, nonatomic, wait,
41640 + spin_unlock(&call_lock);
41644 int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
41645 @@ -278,8 +284,8 @@
41647 EXPORT_SYMBOL(smp_call_function);
41649 -int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int nonatomic,
41651 +int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
41652 + int nonatomic, int wait)
41654 cpumask_t map = CPU_MASK_NONE;
41656 @@ -291,9 +297,11 @@
41660 - if (cpu != get_cpu())
41661 - ret = smp_call_function_map(func,info,nonatomic,wait,map);
41663 + if (cpu != get_cpu()) {
41664 + spin_lock(&call_lock);
41665 + ret = __smp_call_function_map(func, info, nonatomic, wait, map);
41666 + spin_unlock(&call_lock);
41668 local_irq_disable();
41670 local_irq_enable();
41671 @@ -305,7 +313,22 @@
41673 void smp_send_stop(void)
41675 - __smp_call_function(stop_this_cpu, NULL, 1, 0);
41678 + /* It's OK to fail sending the IPI, since the alternative is to
41679 + * be stuck forever waiting on the other CPU to take the interrupt.
41681 + * It's better to at least continue and go through reboot, since this
41682 + * function is usually called at panic or reboot time in the first
41687 + /* Don't deadlock in case we got called through panic */
41688 + nolock = !spin_trylock(&call_lock);
41689 + __smp_call_function_map(stop_this_cpu, NULL, 1, 0, cpu_online_map);
41691 + spin_unlock(&call_lock);
41694 void smp_call_function_interrupt(void)
41695 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/systbl_chk.c powerpc.git/arch/powerpc/kernel/systbl_chk.c
41696 --- linux-2.6.24/arch/powerpc/kernel/systbl_chk.c 1970-01-01 01:00:00.000000000 +0100
41697 +++ powerpc.git/arch/powerpc/kernel/systbl_chk.c 2008-01-28 20:25:49.000000000 +0100
41700 + * This file, when run through CPP produces a list of syscall numbers
41701 + * in the order of systbl.h. That way we can check for gaps and syscalls
41702 + * that are out of order.
41704 + * Unfortunately, we cannot check for the correct ordering of entries
41707 + * Copyright © IBM Corporation
41709 + * This program is free software; you can redistribute it and/or
41710 + * modify it under the terms of the GNU General Public License
41711 + * as published by the Free Software Foundation; either version
41712 + * 2 of the License, or (at your option) any later version.
41714 +#include <asm/unistd.h>
41716 +#define SYSCALL(func) __NR_##func
41717 +#define COMPAT_SYS(func) __NR_##func
41718 +#define PPC_SYS(func) __NR_##func
41719 +#ifdef CONFIG_PPC64
41720 +#define OLDSYS(func) -1
41721 +#define SYS32ONLY(func) -1
41723 +#define OLDSYS(func) __NR_old##func
41724 +#define SYS32ONLY(func) __NR_##func
41726 +#define SYSX(f, f3264, f32) -1
41728 +#define SYSCALL_SPU(func) SYSCALL(func)
41729 +#define COMPAT_SYS_SPU(func) COMPAT_SYS(func)
41730 +#define PPC_SYS_SPU(func) PPC_SYS(func)
41731 +#define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32)
41733 +/* Just insert a marker for ni_syscalls */
41734 +#define __NR_ni_syscall -1
41737 + * These are the known exceptions.
41738 + * Hopefully, there will be no more.
41740 +#define __NR_llseek __NR__llseek
41741 +#undef __NR_umount
41742 +#define __NR_umount __NR_umount2
41743 +#define __NR_old_getrlimit __NR_getrlimit
41744 +#define __NR_newstat __NR_stat
41745 +#define __NR_newlstat __NR_lstat
41746 +#define __NR_newfstat __NR_fstat
41747 +#define __NR_newuname __NR_uname
41748 +#define __NR_sysctl __NR__sysctl
41749 +#define __NR_olddebug_setcontext __NR_sys_debug_setcontext
41751 +/* We call sys_ugetrlimit for syscall number __NR_getrlimit */
41752 +#define getrlimit ugetrlimit
41755 +#include <asm/systbl.h>
41756 +END_TABLE __NR_syscalls
41757 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/systbl_chk.sh powerpc.git/arch/powerpc/kernel/systbl_chk.sh
41758 --- linux-2.6.24/arch/powerpc/kernel/systbl_chk.sh 1970-01-01 01:00:00.000000000 +0100
41759 +++ powerpc.git/arch/powerpc/kernel/systbl_chk.sh 2008-01-28 20:25:49.000000000 +0100
41763 +# Just process the CPP output from systbl_chk.c and complain
41764 +# if anything is out of order.
41766 +# Copyright © 2008 IBM Corporation
41768 +# This program is free software; you can redistribute it and/or
41769 +# modify it under the terms of the GNU General Public License
41770 +# as published by the Free Software Foundation; either version
41771 +# 2 of the License, or (at your option) any later version.
41773 +awk 'BEGIN { num = -1; } # Ignore the beginning of the file
41775 + /^[ \t]*$/ { next; }
41776 + /^START_TABLE/ { num = 0; next; }
41779 + printf "__NR_syscalls (%s) is not one more than the last syscall (%s)\n",
41783 + num = -1; # Ignore the rest of the file
41786 + if (num == -1) next;
41787 + if (($1 != -1) && ($1 != num)) {
41788 + printf "Syscall %s out of order (expected %s)\n",
41794 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/time.c powerpc.git/arch/powerpc/kernel/time.c
41795 --- linux-2.6.24/arch/powerpc/kernel/time.c 2008-01-24 23:58:37.000000000 +0100
41796 +++ powerpc.git/arch/powerpc/kernel/time.c 2008-01-28 20:25:49.000000000 +0100
41797 @@ -116,9 +116,12 @@
41798 .features = CLOCK_EVT_FEAT_ONESHOT,
41801 -static DEFINE_PER_CPU(struct clock_event_device, decrementers);
41802 -void init_decrementer_clockevent(void);
41803 -static DEFINE_PER_CPU(u64, decrementer_next_tb);
41804 +struct decrementer_clock {
41805 + struct clock_event_device event;
41809 +static DEFINE_PER_CPU(struct decrementer_clock, decrementers);
41811 #ifdef CONFIG_PPC_ISERIES
41812 static unsigned long __initdata iSeries_recal_titan;
41813 @@ -216,7 +219,11 @@
41815 static u64 read_spurr(u64 purr)
41817 - if (cpu_has_feature(CPU_FTR_SPURR))
41819 + * cpus without PURR won't have a SPURR
41820 + * We already know the former when we use this, so tell gcc
41822 + if (cpu_has_feature(CPU_FTR_PURR) && cpu_has_feature(CPU_FTR_SPURR))
41823 return mfspr(SPRN_SPURR);
41826 @@ -227,29 +234,30 @@
41828 void account_system_vtime(struct task_struct *tsk)
41830 - u64 now, nowscaled, delta, deltascaled;
41831 + u64 now, nowscaled, delta, deltascaled, sys_time;
41832 unsigned long flags;
41834 local_irq_save(flags);
41836 - delta = now - get_paca()->startpurr;
41837 - get_paca()->startpurr = now;
41838 nowscaled = read_spurr(now);
41839 + delta = now - get_paca()->startpurr;
41840 deltascaled = nowscaled - get_paca()->startspurr;
41841 + get_paca()->startpurr = now;
41842 get_paca()->startspurr = nowscaled;
41843 if (!in_interrupt()) {
41844 /* deltascaled includes both user and system time.
41845 * Hence scale it based on the purr ratio to estimate
41846 * the system time */
41847 + sys_time = get_paca()->system_time;
41848 if (get_paca()->user_time)
41849 - deltascaled = deltascaled * get_paca()->system_time /
41850 - (get_paca()->system_time + get_paca()->user_time);
41851 - delta += get_paca()->system_time;
41852 + deltascaled = deltascaled * sys_time /
41853 + (sys_time + get_paca()->user_time);
41854 + delta += sys_time;
41855 get_paca()->system_time = 0;
41857 account_system_time(tsk, 0, delta);
41858 - get_paca()->purrdelta = delta;
41859 account_system_time_scaled(tsk, deltascaled);
41860 + get_paca()->purrdelta = delta;
41861 get_paca()->spurrdelta = deltascaled;
41862 local_irq_restore(flags);
41864 @@ -326,11 +334,9 @@
41866 struct cpu_purr_data *pme;
41868 - if (!cpu_has_feature(CPU_FTR_PURR))
41870 - pme = &per_cpu(cpu_purr_data, smp_processor_id());
41871 + pme = &__get_cpu_var(cpu_purr_data);
41872 if (!pme->initialized)
41873 - return; /* this can happen in early boot */
41874 + return; /* !CPU_FTR_PURR or early in early boot */
41876 purr = mfspr(SPRN_PURR);
41877 stolen = (tb - pme->tb) - (purr - pme->purr);
41878 @@ -353,7 +359,7 @@
41879 if (!cpu_has_feature(CPU_FTR_PURR))
41881 local_irq_save(flags);
41882 - pme = &per_cpu(cpu_purr_data, smp_processor_id());
41883 + pme = &__get_cpu_var(cpu_purr_data);
41885 pme->purr = mfspr(SPRN_PURR);
41886 pme->initialized = 1;
41887 @@ -556,8 +562,8 @@
41888 void timer_interrupt(struct pt_regs * regs)
41890 struct pt_regs *old_regs;
41891 - int cpu = smp_processor_id();
41892 - struct clock_event_device *evt = &per_cpu(decrementers, cpu);
41893 + struct decrementer_clock *decrementer = &__get_cpu_var(decrementers);
41894 + struct clock_event_device *evt = &decrementer->event;
41897 /* Ensure a positive value is written to the decrementer, or else
41898 @@ -570,9 +576,9 @@
41901 now = get_tb_or_rtc();
41902 - if (now < per_cpu(decrementer_next_tb, cpu)) {
41903 + if (now < decrementer->next_tb) {
41904 /* not time for this event yet */
41905 - now = per_cpu(decrementer_next_tb, cpu) - now;
41906 + now = decrementer->next_tb - now;
41907 if (now <= DECREMENTER_MAX)
41910 @@ -623,6 +629,45 @@
41914 +#ifdef CONFIG_SUSPEND
41915 +void generic_suspend_disable_irqs(void)
41917 + preempt_disable();
41919 + /* Disable the decrementer, so that it doesn't interfere
41920 + * with suspending.
41923 + set_dec(0x7fffffff);
41924 + local_irq_disable();
41925 + set_dec(0x7fffffff);
41928 +void generic_suspend_enable_irqs(void)
41930 + wakeup_decrementer();
41932 + local_irq_enable();
41933 + preempt_enable();
41936 +/* Overrides the weak version in kernel/power/main.c */
41937 +void arch_suspend_disable_irqs(void)
41939 + if (ppc_md.suspend_disable_irqs)
41940 + ppc_md.suspend_disable_irqs();
41941 + generic_suspend_disable_irqs();
41944 +/* Overrides the weak version in kernel/power/main.c */
41945 +void arch_suspend_enable_irqs(void)
41947 + generic_suspend_enable_irqs();
41948 + if (ppc_md.suspend_enable_irqs)
41949 + ppc_md.suspend_enable_irqs();
41954 void __init smp_space_timers(unsigned int max_cpus)
41956 @@ -811,7 +856,7 @@
41957 static int decrementer_set_next_event(unsigned long evt,
41958 struct clock_event_device *dev)
41960 - __get_cpu_var(decrementer_next_tb) = get_tb_or_rtc() + evt;
41961 + __get_cpu_var(decrementers).next_tb = get_tb_or_rtc() + evt;
41965 @@ -825,7 +870,7 @@
41967 static void register_decrementer_clockevent(int cpu)
41969 - struct clock_event_device *dec = &per_cpu(decrementers, cpu);
41970 + struct clock_event_device *dec = &per_cpu(decrementers, cpu).event;
41972 *dec = decrementer_clockevent;
41973 dec->cpumask = cpumask_of_cpu(cpu);
41974 @@ -836,7 +881,7 @@
41975 clockevents_register_device(dec);
41978 -void init_decrementer_clockevent(void)
41979 +static void __init init_decrementer_clockevent(void)
41981 int cpu = smp_processor_id();
41983 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/traps.c powerpc.git/arch/powerpc/kernel/traps.c
41984 --- linux-2.6.24/arch/powerpc/kernel/traps.c 2008-01-24 23:58:37.000000000 +0100
41985 +++ powerpc.git/arch/powerpc/kernel/traps.c 2008-01-28 20:25:49.000000000 +0100
41986 @@ -334,18 +334,25 @@
41987 #define clear_single_step(regs) ((regs)->msr &= ~MSR_SE)
41990 -static int generic_machine_check_exception(struct pt_regs *regs)
41991 +#if defined(CONFIG_4xx)
41992 +int machine_check_4xx(struct pt_regs *regs)
41994 unsigned long reason = get_mc_reason(regs);
41996 -#if defined(CONFIG_4xx) && !defined(CONFIG_440A)
41997 if (reason & ESR_IMCP) {
41998 printk("Instruction");
41999 mtspr(SPRN_ESR, reason & ~ESR_IMCP);
42002 printk(" machine check in kernel mode.\n");
42003 -#elif defined(CONFIG_440A)
42008 +int machine_check_440A(struct pt_regs *regs)
42010 + unsigned long reason = get_mc_reason(regs);
42012 printk("Machine check in kernel mode.\n");
42013 if (reason & ESR_IMCP){
42014 printk("Instruction Synchronous Machine Check exception\n");
42015 @@ -375,7 +382,13 @@
42017 mtspr(SPRN_MCSR, mcsr);
42019 -#elif defined (CONFIG_E500)
42022 +#elif defined(CONFIG_E500)
42023 +int machine_check_e500(struct pt_regs *regs)
42025 + unsigned long reason = get_mc_reason(regs);
42027 printk("Machine check in kernel mode.\n");
42028 printk("Caused by (from MCSR=%lx): ", reason);
42030 @@ -403,7 +416,14 @@
42031 printk("Bus - Instruction Parity Error\n");
42032 if (reason & MCSR_BUS_RPERR)
42033 printk("Bus - Read Parity Error\n");
42034 -#elif defined (CONFIG_E200)
42038 +#elif defined(CONFIG_E200)
42039 +int machine_check_e200(struct pt_regs *regs)
42041 + unsigned long reason = get_mc_reason(regs);
42043 printk("Machine check in kernel mode.\n");
42044 printk("Caused by (from MCSR=%lx): ", reason);
42046 @@ -421,7 +441,14 @@
42047 printk("Bus - Read Bus Error on data load\n");
42048 if (reason & MCSR_BUS_WRERR)
42049 printk("Bus - Write Bus Error on buffered store or cache line push\n");
42050 -#else /* !CONFIG_4xx && !CONFIG_E500 && !CONFIG_E200 */
42055 +int machine_check_generic(struct pt_regs *regs)
42057 + unsigned long reason = get_mc_reason(regs);
42059 printk("Machine check in kernel mode.\n");
42060 printk("Caused by (from SRR1=%lx): ", reason);
42061 switch (reason & 0x601F0000) {
42062 @@ -451,22 +478,26 @@
42064 printk("Unknown values in msr\n");
42066 -#endif /* CONFIG_4xx */
42070 +#endif /* everything else */
42072 void machine_check_exception(struct pt_regs *regs)
42076 - /* See if any machine dependent calls */
42077 + /* See if any machine dependent calls. In theory, we would want
42078 + * to call the CPU first, and call the ppc_md. one if the CPU
42079 + * one returns a positive number. However there is existing code
42080 + * that assumes the board gets a first chance, so let's keep it
42081 + * that way for now and fix things later. --BenH.
42083 if (ppc_md.machine_check_exception)
42084 recover = ppc_md.machine_check_exception(regs);
42086 - recover = generic_machine_check_exception(regs);
42087 + else if (cur_cpu_spec->machine_check)
42088 + recover = cur_cpu_spec->machine_check(regs);
42094 if (user_mode(regs)) {
42095 @@ -476,7 +507,12 @@
42098 #if defined(CONFIG_8xx) && defined(CONFIG_PCI)
42099 - /* the qspan pci read routines can cause machine checks -- Cort */
42100 + /* the qspan pci read routines can cause machine checks -- Cort
42102 + * yuck !!! that totally needs to go away ! There are better ways
42103 + * to deal with that than having a wart in the mcheck handler.
42106 bad_page_fault(regs, regs->dar, SIGBUS);
42109 @@ -622,6 +658,9 @@
42110 #define INST_POPCNTB 0x7c0000f4
42111 #define INST_POPCNTB_MASK 0xfc0007fe
42113 +#define INST_ISEL 0x7c00001e
42114 +#define INST_ISEL_MASK 0xfc00003e
42116 static int emulate_string_inst(struct pt_regs *regs, u32 instword)
42118 u8 rT = (instword >> 21) & 0x1f;
42119 @@ -707,6 +746,23 @@
42123 +static int emulate_isel(struct pt_regs *regs, u32 instword)
42125 + u8 rT = (instword >> 21) & 0x1f;
42126 + u8 rA = (instword >> 16) & 0x1f;
42127 + u8 rB = (instword >> 11) & 0x1f;
42128 + u8 BC = (instword >> 6) & 0x1f;
42130 + unsigned long tmp;
42132 + tmp = (rA == 0) ? 0 : regs->gpr[rA];
42133 + bit = (regs->ccr >> (31 - BC)) & 0x1;
42135 + regs->gpr[rT] = bit ? tmp : regs->gpr[rB];
42140 static int emulate_instruction(struct pt_regs *regs)
42143 @@ -749,6 +805,11 @@
42144 return emulate_popcntb_inst(regs, instword);
42147 + /* Emulate isel (Integer Select) instruction */
42148 + if ((instword & INST_ISEL_MASK) == INST_ISEL) {
42149 + return emulate_isel(regs, instword);
42155 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/udbg.c powerpc.git/arch/powerpc/kernel/udbg.c
42156 --- linux-2.6.24/arch/powerpc/kernel/udbg.c 2008-01-24 23:58:37.000000000 +0100
42157 +++ powerpc.git/arch/powerpc/kernel/udbg.c 2008-01-28 20:25:49.000000000 +0100
42159 #elif defined(CONFIG_PPC_EARLY_DEBUG_44x)
42161 udbg_init_44x_as1();
42162 +#elif defined(CONFIG_PPC_EARLY_DEBUG_40x)
42163 + /* PPC40x debug */
42164 + udbg_init_40x_realmode();
42165 #elif defined(CONFIG_PPC_EARLY_DEBUG_CPM)
42169 +#ifdef CONFIG_PPC_EARLY_DEBUG
42170 + console_loglevel = 10;
42174 /* udbg library, used by xmon et al */
42175 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/kernel/udbg_16550.c powerpc.git/arch/powerpc/kernel/udbg_16550.c
42176 --- linux-2.6.24/arch/powerpc/kernel/udbg_16550.c 2008-01-24 23:58:37.000000000 +0100
42177 +++ powerpc.git/arch/powerpc/kernel/udbg_16550.c 2008-01-28 20:25:49.000000000 +0100
42180 #define LCR_DLAB 0x80
42182 -static volatile struct NS16550 __iomem *udbg_comport;
42183 +static struct NS16550 __iomem *udbg_comport;
42185 static void udbg_550_putc(char c)
42187 @@ -117,7 +117,7 @@
42189 unsigned int dll, dlm, divisor, prescaler, speed;
42191 - volatile struct NS16550 __iomem *port = comport;
42192 + struct NS16550 __iomem *port = comport;
42194 old_lcr = in_8(&port->lcr);
42196 @@ -162,7 +162,7 @@
42198 void __init udbg_init_maple_realmode(void)
42200 - udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8;
42201 + udbg_comport = (struct NS16550 __iomem *)0xf40003f8;
42203 udbg_putc = udbg_maple_real_putc;
42205 @@ -184,7 +184,7 @@
42207 void udbg_init_pas_realmode(void)
42209 - udbg_comport = (volatile struct NS16550 __iomem *)0xfcff03f8UL;
42210 + udbg_comport = (struct NS16550 __iomem *)0xfcff03f8UL;
42212 udbg_putc = udbg_pas_real_putc;
42214 @@ -219,9 +219,42 @@
42215 void __init udbg_init_44x_as1(void)
42218 - (volatile struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
42219 + (struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
42221 udbg_putc = udbg_44x_as1_putc;
42222 udbg_getc = udbg_44x_as1_getc;
42224 #endif /* CONFIG_PPC_EARLY_DEBUG_44x */
42226 +#ifdef CONFIG_PPC_EARLY_DEBUG_40x
42227 +static void udbg_40x_real_putc(char c)
42229 + if (udbg_comport) {
42230 + while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
42231 + /* wait for idle */;
42232 + real_writeb(c, &udbg_comport->thr); eieio();
42234 + udbg_40x_real_putc('\r');
42238 +static int udbg_40x_real_getc(void)
42240 + if (udbg_comport) {
42241 + while ((real_readb(&udbg_comport->lsr) & LSR_DR) == 0)
42242 + ; /* wait for char */
42243 + return real_readb(&udbg_comport->rbr);
42248 +void __init udbg_init_40x_realmode(void)
42250 + udbg_comport = (struct NS16550 __iomem *)
42251 + CONFIG_PPC_EARLY_DEBUG_40x_PHYSADDR;
42253 + udbg_putc = udbg_40x_real_putc;
42254 + udbg_getc = udbg_40x_real_getc;
42255 + udbg_getc_poll = NULL;
42257 +#endif /* CONFIG_PPC_EARLY_DEBUG_40x */
42258 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/math-emu/op-4.h powerpc.git/arch/powerpc/math-emu/op-4.h
42259 --- linux-2.6.24/arch/powerpc/math-emu/op-4.h 2008-01-24 23:58:37.000000000 +0100
42260 +++ powerpc.git/arch/powerpc/math-emu/op-4.h 2008-01-28 20:25:49.000000000 +0100
42261 @@ -194,19 +194,39 @@
42262 (X##_f[3] = I3, X##_f[2] = I2, X##_f[1] = I1, X##_f[0] = I0)
42264 #ifndef __FP_FRAC_ADD_4
42265 -#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
42267 - r1 = x1 + y1 + (r0 < x0), \
42268 - r2 = x2 + y2 + (r1 < x1), \
42269 - r3 = x3 + y3 + (r2 < x2))
42270 +#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
42272 + int _c1, _c2, _c3; \
42278 + _c2 |= r1 < _c1; \
42282 + _c3 |= r2 < _c2; \
42283 + r3 = x3 + y3 + _c3; \
42287 #ifndef __FP_FRAC_SUB_4
42288 -#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
42290 - r1 = x1 - y1 - (r0 > x0), \
42291 - r2 = x2 - y2 - (r1 > x1), \
42292 - r3 = x3 - y3 - (r2 > x2))
42293 +#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
42295 + int _c1, _c2, _c3; \
42301 + _c2 |= r1 > _c1; \
42305 + _c3 |= r2 > _c2; \
42306 + r3 = x3 - y3 - _c3; \
42310 #ifndef __FP_FRAC_ADDI_4
42311 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/mm/fault.c powerpc.git/arch/powerpc/mm/fault.c
42312 --- linux-2.6.24/arch/powerpc/mm/fault.c 2008-01-24 23:58:37.000000000 +0100
42313 +++ powerpc.git/arch/powerpc/mm/fault.c 2008-01-28 20:25:49.000000000 +0100
42314 @@ -167,10 +167,8 @@
42315 if (notify_page_fault(regs))
42318 - if (trap == 0x300) {
42319 - if (debugger_fault_handler(regs))
42322 + if (unlikely(debugger_fault_handler(regs)))
42325 /* On a kernel SLB miss we can only check for a valid exception entry */
42326 if (!user_mode(regs) && (address >= TASK_SIZE))
42327 @@ -189,7 +187,7 @@
42329 /* in_atomic() in user mode is really bad,
42330 as is current->mm == NULL. */
42331 - printk(KERN_EMERG "Page fault in user mode with"
42332 + printk(KERN_EMERG "Page fault in user mode with "
42333 "in_atomic() = %d mm = %p\n", in_atomic(), mm);
42334 printk(KERN_EMERG "NIP = %lx MSR = %lx\n",
42335 regs->nip, regs->msr);
42336 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/mm/fsl_booke_mmu.c powerpc.git/arch/powerpc/mm/fsl_booke_mmu.c
42337 --- linux-2.6.24/arch/powerpc/mm/fsl_booke_mmu.c 2008-01-24 23:58:37.000000000 +0100
42338 +++ powerpc.git/arch/powerpc/mm/fsl_booke_mmu.c 2008-01-28 20:25:49.000000000 +0100
42339 @@ -165,15 +165,15 @@
42340 void __init cam_mapin_ram(unsigned long cam0, unsigned long cam1,
42341 unsigned long cam2)
42343 - settlbcam(0, KERNELBASE, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0);
42344 + settlbcam(0, PAGE_OFFSET, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0);
42348 - settlbcam(1, KERNELBASE+cam0, PPC_MEMSTART+cam0, cam1, _PAGE_KERNEL, 0);
42349 + settlbcam(1, PAGE_OFFSET+cam0, PPC_MEMSTART+cam0, cam1, _PAGE_KERNEL, 0);
42353 - settlbcam(2, KERNELBASE+cam0+cam1, PPC_MEMSTART+cam0+cam1, cam2, _PAGE_KERNEL, 0);
42354 + settlbcam(2, PAGE_OFFSET+cam0+cam1, PPC_MEMSTART+cam0+cam1, cam2, _PAGE_KERNEL, 0);
42358 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/mm/hash_utils_64.c powerpc.git/arch/powerpc/mm/hash_utils_64.c
42359 --- linux-2.6.24/arch/powerpc/mm/hash_utils_64.c 2008-01-24 23:58:37.000000000 +0100
42360 +++ powerpc.git/arch/powerpc/mm/hash_utils_64.c 2008-01-28 21:37:04.000000000 +0100
42362 int mmu_io_psize = MMU_PAGE_4K;
42363 int mmu_kernel_ssize = MMU_SEGSIZE_256M;
42364 int mmu_highuser_ssize = MMU_SEGSIZE_256M;
42365 +u16 mmu_slb_size = 64;
42366 #ifdef CONFIG_HUGETLB_PAGE
42367 int mmu_huge_psize = MMU_PAGE_16M;
42368 unsigned int HPAGE_SHIFT;
42369 @@ -368,18 +369,11 @@
42370 * on what is available
42372 if (mmu_psize_defs[MMU_PAGE_16M].shift)
42373 - mmu_huge_psize = MMU_PAGE_16M;
42374 + set_huge_psize(MMU_PAGE_16M);
42375 /* With 4k/4level pagetables, we can't (for now) cope with a
42376 * huge page size < PMD_SIZE */
42377 else if (mmu_psize_defs[MMU_PAGE_1M].shift)
42378 - mmu_huge_psize = MMU_PAGE_1M;
42380 - /* Calculate HPAGE_SHIFT and sanity check it */
42381 - if (mmu_psize_defs[mmu_huge_psize].shift > MIN_HUGEPTE_SHIFT &&
42382 - mmu_psize_defs[mmu_huge_psize].shift < SID_SHIFT)
42383 - HPAGE_SHIFT = mmu_psize_defs[mmu_huge_psize].shift;
42385 - HPAGE_SHIFT = 0; /* No huge pages dude ! */
42386 + set_huge_psize(MMU_PAGE_1M);
42387 #endif /* CONFIG_HUGETLB_PAGE */
42390 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/mm/hugetlbpage.c powerpc.git/arch/powerpc/mm/hugetlbpage.c
42391 --- linux-2.6.24/arch/powerpc/mm/hugetlbpage.c 2008-01-24 23:58:37.000000000 +0100
42392 +++ powerpc.git/arch/powerpc/mm/hugetlbpage.c 2008-01-28 20:25:49.000000000 +0100
42393 @@ -24,18 +24,17 @@
42394 #include <asm/cputable.h>
42395 #include <asm/spu.h>
42397 +#define HPAGE_SHIFT_64K 16
42398 +#define HPAGE_SHIFT_16M 24
42400 #define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT)
42401 #define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT)
42403 -#ifdef CONFIG_PPC_64K_PAGES
42404 -#define HUGEPTE_INDEX_SIZE (PMD_SHIFT-HPAGE_SHIFT)
42406 -#define HUGEPTE_INDEX_SIZE (PUD_SHIFT-HPAGE_SHIFT)
42408 -#define PTRS_PER_HUGEPTE (1 << HUGEPTE_INDEX_SIZE)
42409 -#define HUGEPTE_TABLE_SIZE (sizeof(pte_t) << HUGEPTE_INDEX_SIZE)
42410 +unsigned int hugepte_shift;
42411 +#define PTRS_PER_HUGEPTE (1 << hugepte_shift)
42412 +#define HUGEPTE_TABLE_SIZE (sizeof(pte_t) << hugepte_shift)
42414 -#define HUGEPD_SHIFT (HPAGE_SHIFT + HUGEPTE_INDEX_SIZE)
42415 +#define HUGEPD_SHIFT (HPAGE_SHIFT + hugepte_shift)
42416 #define HUGEPD_SIZE (1UL << HUGEPD_SHIFT)
42417 #define HUGEPD_MASK (~(HUGEPD_SIZE-1))
42419 @@ -82,11 +81,35 @@
42423 +/* Base page size affects how we walk hugetlb page tables */
42424 +#ifdef CONFIG_PPC_64K_PAGES
42425 +#define hpmd_offset(pud, addr) pmd_offset(pud, addr)
42426 +#define hpmd_alloc(mm, pud, addr) pmd_alloc(mm, pud, addr)
42429 +pmd_t *hpmd_offset(pud_t *pud, unsigned long addr)
42431 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
42432 + return pmd_offset(pud, addr);
42434 + return (pmd_t *) pud;
42437 +pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr)
42439 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
42440 + return pmd_alloc(mm, pud, addr);
42442 + return (pmd_t *) pud;
42446 /* Modelled after find_linux_pte() */
42447 pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
42453 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
42455 @@ -96,14 +119,9 @@
42456 if (!pgd_none(*pg)) {
42457 pu = pud_offset(pg, addr);
42458 if (!pud_none(*pu)) {
42459 -#ifdef CONFIG_PPC_64K_PAGES
42461 - pm = pmd_offset(pu, addr);
42462 + pm = hpmd_offset(pu, addr);
42463 if (!pmd_none(*pm))
42464 return hugepte_offset((hugepd_t *)pm, addr);
42466 - return hugepte_offset((hugepd_t *)pu, addr);
42471 @@ -114,6 +132,7 @@
42476 hugepd_t *hpdp = NULL;
42478 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
42479 @@ -124,14 +143,9 @@
42480 pu = pud_alloc(mm, pg, addr);
42483 -#ifdef CONFIG_PPC_64K_PAGES
42485 - pm = pmd_alloc(mm, pu, addr);
42486 + pm = hpmd_alloc(mm, pu, addr);
42488 hpdp = (hugepd_t *)pm;
42490 - hpdp = (hugepd_t *)pu;
42495 @@ -158,7 +172,6 @@
42496 PGF_CACHENUM_MASK));
42499 -#ifdef CONFIG_PPC_64K_PAGES
42500 static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
42501 unsigned long addr, unsigned long end,
42502 unsigned long floor, unsigned long ceiling)
42503 @@ -191,7 +204,6 @@
42505 pmd_free_tlb(tlb, pmd);
42509 static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
42510 unsigned long addr, unsigned long end,
42511 @@ -210,9 +222,15 @@
42513 hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
42515 - if (pud_none(*pud))
42517 - free_hugepte_range(tlb, (hugepd_t *)pud);
42518 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K) {
42519 + if (pud_none_or_clear_bad(pud))
42521 + hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
42523 + if (pud_none(*pud))
42525 + free_hugepte_range(tlb, (hugepd_t *)pud);
42528 } while (pud++, addr = next, addr != end);
42530 @@ -526,6 +544,57 @@
42534 +void set_huge_psize(int psize)
42536 + /* Check that it is a page size supported by the hardware and
42537 + * that it fits within pagetable limits. */
42538 + if (mmu_psize_defs[psize].shift && mmu_psize_defs[psize].shift < SID_SHIFT &&
42539 + (mmu_psize_defs[psize].shift > MIN_HUGEPTE_SHIFT ||
42540 + mmu_psize_defs[psize].shift == HPAGE_SHIFT_64K)) {
42541 + HPAGE_SHIFT = mmu_psize_defs[psize].shift;
42542 + mmu_huge_psize = psize;
42543 +#ifdef CONFIG_PPC_64K_PAGES
42544 + hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
42546 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
42547 + hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
42549 + hugepte_shift = (PUD_SHIFT-HPAGE_SHIFT);
42556 +static int __init hugepage_setup_sz(char *str)
42558 + unsigned long long size;
42559 + int mmu_psize = -1;
42562 + size = memparse(str, &str);
42564 + shift = __ffs(size);
42566 +#ifndef CONFIG_PPC_64K_PAGES
42567 + case HPAGE_SHIFT_64K:
42568 + mmu_psize = MMU_PAGE_64K;
42571 + case HPAGE_SHIFT_16M:
42572 + mmu_psize = MMU_PAGE_16M;
42576 + if (mmu_psize >=0 && mmu_psize_defs[mmu_psize].shift)
42577 + set_huge_psize(mmu_psize);
42579 + printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size);
42583 +__setup("hugepagesz=", hugepage_setup_sz);
42585 static void zero_ctor(struct kmem_cache *cache, void *addr)
42587 memset(addr, 0, kmem_cache_size(cache));
42588 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/mm/lmb.c powerpc.git/arch/powerpc/mm/lmb.c
42589 --- linux-2.6.24/arch/powerpc/mm/lmb.c 2008-01-24 23:58:37.000000000 +0100
42590 +++ powerpc.git/arch/powerpc/mm/lmb.c 2008-01-28 20:25:49.000000000 +0100
42591 @@ -342,3 +342,16 @@
42596 +int __init lmb_is_reserved(unsigned long addr)
42600 + for (i = 0; i < lmb.reserved.cnt; i++) {
42601 + unsigned long upper = lmb.reserved.region[i].base +
42602 + lmb.reserved.region[i].size - 1;
42603 + if ((addr >= lmb.reserved.region[i].base) && (addr <= upper))
42608 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/mm/mem.c powerpc.git/arch/powerpc/mm/mem.c
42609 --- linux-2.6.24/arch/powerpc/mm/mem.c 2008-01-24 23:58:37.000000000 +0100
42610 +++ powerpc.git/arch/powerpc/mm/mem.c 2008-01-28 20:25:49.000000000 +0100
42611 @@ -213,15 +213,30 @@
42613 #ifdef CONFIG_HIGHMEM
42614 free_bootmem_with_active_regions(0, total_lowmem >> PAGE_SHIFT);
42616 + /* reserve the sections we're already using */
42617 + for (i = 0; i < lmb.reserved.cnt; i++) {
42618 + unsigned long addr = lmb.reserved.region[i].base +
42619 + lmb_size_bytes(&lmb.reserved, i) - 1;
42620 + if (addr < total_lowmem)
42621 + reserve_bootmem(lmb.reserved.region[i].base,
42622 + lmb_size_bytes(&lmb.reserved, i));
42623 + else if (lmb.reserved.region[i].base < total_lowmem) {
42624 + unsigned long adjusted_size = total_lowmem -
42625 + lmb.reserved.region[i].base;
42626 + reserve_bootmem(lmb.reserved.region[i].base,
42631 free_bootmem_with_active_regions(0, max_pfn);
42634 /* reserve the sections we're already using */
42635 for (i = 0; i < lmb.reserved.cnt; i++)
42636 reserve_bootmem(lmb.reserved.region[i].base,
42637 lmb_size_bytes(&lmb.reserved, i));
42640 /* XXX need to clip this if using highmem? */
42641 sparse_memory_present_with_active_regions(0);
42643 @@ -334,11 +349,13 @@
42644 highmem_mapnr = total_lowmem >> PAGE_SHIFT;
42645 for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) {
42646 struct page *page = pfn_to_page(pfn);
42648 + if (lmb_is_reserved(pfn << PAGE_SHIFT))
42650 ClearPageReserved(page);
42651 init_page_count(page);
42656 totalram_pages += totalhigh_pages;
42657 printk(KERN_DEBUG "High memory: %luk\n",
42658 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/mm/slb.c powerpc.git/arch/powerpc/mm/slb.c
42659 --- linux-2.6.24/arch/powerpc/mm/slb.c 2008-01-24 23:58:37.000000000 +0100
42660 +++ powerpc.git/arch/powerpc/mm/slb.c 2008-01-28 20:25:49.000000000 +0100
42661 @@ -256,6 +256,7 @@
42662 static int slb_encoding_inited;
42663 extern unsigned int *slb_miss_kernel_load_linear;
42664 extern unsigned int *slb_miss_kernel_load_io;
42665 + extern unsigned int *slb_compare_rr_to_size;
42667 /* Prepare our SLB miss handler based on our page size */
42668 linear_llp = mmu_psize_defs[mmu_linear_psize].sllp;
42669 @@ -269,6 +270,8 @@
42670 SLB_VSID_KERNEL | linear_llp);
42671 patch_slb_encoding(slb_miss_kernel_load_io,
42672 SLB_VSID_KERNEL | io_llp);
42673 + patch_slb_encoding(slb_compare_rr_to_size,
42676 DBG("SLB: linear LLP = %04x\n", linear_llp);
42677 DBG("SLB: io LLP = %04x\n", io_llp);
42678 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/mm/slb_low.S powerpc.git/arch/powerpc/mm/slb_low.S
42679 --- linux-2.6.24/arch/powerpc/mm/slb_low.S 2008-01-24 23:58:37.000000000 +0100
42680 +++ powerpc.git/arch/powerpc/mm/slb_low.S 2008-01-28 20:25:49.000000000 +0100
42681 @@ -227,8 +227,9 @@
42683 7: ld r10,PACASTABRR(r13)
42685 - /* use a cpu feature mask if we ever change our slb size */
42686 - cmpldi r10,SLB_NUM_ENTRIES
42687 + /* This gets soft patched on boot. */
42688 +_GLOBAL(slb_compare_rr_to_size)
42692 li r10,SLB_NUM_BOLTED
42693 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/oprofile/op_model_cell.c powerpc.git/arch/powerpc/oprofile/op_model_cell.c
42694 --- linux-2.6.24/arch/powerpc/oprofile/op_model_cell.c 2008-01-24 23:58:37.000000000 +0100
42695 +++ powerpc.git/arch/powerpc/oprofile/op_model_cell.c 2008-01-28 20:25:49.000000000 +0100
42697 #define NUM_THREADS 2 /* number of physical threads in
42698 * physical processor
42700 -#define NUM_TRACE_BUS_WORDS 4
42701 +#define NUM_DEBUG_BUS_WORDS 4
42702 #define NUM_INPUT_BUS_WORDS 2
42704 #define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */
42705 @@ -169,7 +169,6 @@
42707 static u32 ctr_enabled;
42709 -static unsigned char trace_bus[NUM_TRACE_BUS_WORDS];
42710 static unsigned char input_bus[NUM_INPUT_BUS_WORDS];
42713 @@ -298,7 +297,7 @@
42715 p->signal_group = event / 100;
42716 p->bus_word = bus_word;
42717 - p->sub_unit = (unit_mask & 0x0000f000) >> 12;
42718 + p->sub_unit = GET_SUB_UNIT(unit_mask);
42720 pm_regs.pm07_cntrl[ctr] = 0;
42721 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_COUNT_CYCLES(count_cycles);
42722 @@ -334,16 +333,16 @@
42723 p->bit = signal_bit;
42726 - for (i = 0; i < NUM_TRACE_BUS_WORDS; i++) {
42727 + for (i = 0; i < NUM_DEBUG_BUS_WORDS; i++) {
42728 if (bus_word & (1 << i)) {
42729 pm_regs.debug_bus_control |=
42730 - (bus_type << (31 - (2 * i) + 1));
42731 + (bus_type << (30 - (2 * i)));
42733 for (j = 0; j < NUM_INPUT_BUS_WORDS; j++) {
42734 if (input_bus[j] == 0xff) {
42736 pm_regs.group_control |=
42738 + (i << (30 - (2 * j)));
42742 @@ -450,6 +449,12 @@
42743 hdw_thread = 1 ^ hdw_thread;
42744 next_hdw_thread = hdw_thread;
42746 + pm_regs.group_control = 0;
42747 + pm_regs.debug_bus_control = 0;
42749 + for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
42750 + input_bus[i] = 0xff;
42753 * There are some per thread events. Must do the
42754 * set event, for the thread that is being started
42755 @@ -619,9 +624,6 @@
42756 pmc_cntrl[1][i].vcntr = i;
42759 - for (i = 0; i < NUM_TRACE_BUS_WORDS; i++)
42760 - trace_bus[i] = 0xff;
42762 for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
42763 input_bus[i] = 0xff;
42765 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/40x/Kconfig powerpc.git/arch/powerpc/platforms/40x/Kconfig
42766 --- linux-2.6.24/arch/powerpc/platforms/40x/Kconfig 2008-01-24 23:58:37.000000000 +0100
42767 +++ powerpc.git/arch/powerpc/platforms/40x/Kconfig 2008-01-28 20:25:49.000000000 +0100
42768 @@ -14,28 +14,34 @@
42770 # This option enables support for the CPCI405 board.
42773 -# bool "EP405/EP405PC"
42778 -# This option enables support for the EP405/EP405PC boards.
42781 -# bool "EP405PC Support"
42782 -# depends on EP405
42785 -# This option enables support for the extra features of the EP405PC board.
42787 + bool "EP405/EP405PC"
42793 + This option enables support for the EP405/EP405PC boards.
42800 + select PPC4xx_PCI_EXPRESS
42802 This option enables support for the AMCC PPC405EX evaluation board.
42810 + select PPC4xx_PCI_EXPRESS
42812 + This option enables support for the AMCC PPC405EX board.
42823 This option enables support for the IBM PPC405GP evaluation board.
42825 @@ -105,6 +112,11 @@
42831 + select IBM_NEW_EMAC_EMAC4
42832 + select IBM_NEW_EMAC_RGMII
42837 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/40x/Makefile powerpc.git/arch/powerpc/platforms/40x/Makefile
42838 --- linux-2.6.24/arch/powerpc/platforms/40x/Makefile 2008-01-24 23:58:37.000000000 +0100
42839 +++ powerpc.git/arch/powerpc/platforms/40x/Makefile 2008-01-28 20:25:49.000000000 +0100
42841 obj-$(CONFIG_KILAUEA) += kilauea.o
42842 +obj-$(CONFIG_MAKALU) += makalu.o
42843 obj-$(CONFIG_WALNUT) += walnut.o
42844 obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o
42845 +obj-$(CONFIG_EP405) += ep405.o
42846 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/40x/ep405.c powerpc.git/arch/powerpc/platforms/40x/ep405.c
42847 --- linux-2.6.24/arch/powerpc/platforms/40x/ep405.c 1970-01-01 01:00:00.000000000 +0100
42848 +++ powerpc.git/arch/powerpc/platforms/40x/ep405.c 2008-01-28 20:25:49.000000000 +0100
42851 + * Architecture- / platform-specific boot-time initialization code for
42852 + * IBM PowerPC 4xx based boards. Adapted from original
42853 + * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
42854 + * <dan@net4x.com>.
42856 + * Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
42858 + * Rewritten and ported to the merged powerpc tree:
42859 + * Copyright 2007 IBM Corporation
42860 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
42862 + * Adapted to EP405 by Ben. Herrenschmidt <benh@kernel.crashing.org>
42864 + * TODO: Wire up the PCI IRQ mux and the southbridge interrupts
42866 + * 2002 (c) MontaVista, Software, Inc. This file is licensed under
42867 + * the terms of the GNU General Public License version 2. This program
42868 + * is licensed "as is" without any warranty of any kind, whether express
42872 +#include <linux/init.h>
42873 +#include <linux/of_platform.h>
42875 +#include <asm/machdep.h>
42876 +#include <asm/prom.h>
42877 +#include <asm/udbg.h>
42878 +#include <asm/time.h>
42879 +#include <asm/uic.h>
42880 +#include <asm/pci-bridge.h>
42882 +static struct device_node *bcsr_node;
42883 +static void __iomem *bcsr_regs;
42885 +/* BCSR registers */
42887 +#define BCSR_PCI_CTRL 1
42888 +#define BCSR_FLASH_NV_POR_CTRL 2
42889 +#define BCSR_FENET_UART_CTRL 3
42890 +#define BCSR_PCI_IRQ 4
42891 +#define BCSR_XIRQ_SELECT 5
42892 +#define BCSR_XIRQ_ROUTING 6
42893 +#define BCSR_XIRQ_STATUS 7
42894 +#define BCSR_XIRQ_STATUS2 8
42895 +#define BCSR_SW_STAT_LED_CTRL 9
42896 +#define BCSR_GPIO_IRQ_PAR_CTRL 10
42897 +/* there's more, can't be bothered typing them tho */
42900 +static __initdata struct of_device_id ep405_of_bus[] = {
42901 + { .compatible = "ibm,plb3", },
42902 + { .compatible = "ibm,opb", },
42903 + { .compatible = "ibm,ebc", },
42907 +static int __init ep405_device_probe(void)
42909 + of_platform_bus_probe(NULL, ep405_of_bus, NULL);
42913 +machine_device_initcall(ep405, ep405_device_probe);
42915 +static void __init ep405_init_bcsr(void)
42917 + const u8 *irq_routing;
42920 + /* Find the bloody thing & map it */
42921 + bcsr_node = of_find_compatible_node(NULL, NULL, "ep405-bcsr");
42922 + if (bcsr_node == NULL) {
42923 + printk(KERN_ERR "EP405 BCSR not found !\n");
42926 + bcsr_regs = of_iomap(bcsr_node, 0);
42927 + if (bcsr_regs == NULL) {
42928 + printk(KERN_ERR "EP405 BCSR failed to map !\n");
42932 + /* Get the irq-routing property and apply the routing to the CPLD */
42933 + irq_routing = of_get_property(bcsr_node, "irq-routing", NULL);
42934 + if (irq_routing == NULL)
42936 + for (i = 0; i < 16; i++) {
42937 + u8 irq = irq_routing[i];
42938 + out_8(bcsr_regs + BCSR_XIRQ_SELECT, i);
42939 + out_8(bcsr_regs + BCSR_XIRQ_ROUTING, irq);
42941 + in_8(bcsr_regs + BCSR_XIRQ_SELECT);
42943 + out_8(bcsr_regs + BCSR_GPIO_IRQ_PAR_CTRL, 0xfe);
42946 +static void __init ep405_setup_arch(void)
42948 + /* Find & init the BCSR CPLD */
42949 + ep405_init_bcsr();
42951 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
42954 +static int __init ep405_probe(void)
42956 + unsigned long root = of_get_flat_dt_root();
42958 + if (!of_flat_dt_is_compatible(root, "ep405"))
42964 +define_machine(ep405) {
42966 + .probe = ep405_probe,
42967 + .setup_arch = ep405_setup_arch,
42968 + .progress = udbg_progress,
42969 + .init_IRQ = uic_init_tree,
42970 + .get_irq = uic_get_irq,
42971 + .calibrate_decr = generic_calibrate_decr,
42973 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/40x/kilauea.c powerpc.git/arch/powerpc/platforms/40x/kilauea.c
42974 --- linux-2.6.24/arch/powerpc/platforms/40x/kilauea.c 2008-01-24 23:58:37.000000000 +0100
42975 +++ powerpc.git/arch/powerpc/platforms/40x/kilauea.c 2008-01-28 20:25:49.000000000 +0100
42977 #include <asm/udbg.h>
42978 #include <asm/time.h>
42979 #include <asm/uic.h>
42980 +#include <asm/pci-bridge.h>
42982 -static struct of_device_id kilauea_of_bus[] = {
42983 +static __initdata struct of_device_id kilauea_of_bus[] = {
42984 { .compatible = "ibm,plb4", },
42985 { .compatible = "ibm,opb", },
42986 { .compatible = "ibm,ebc", },
42987 @@ -29,14 +30,11 @@
42989 static int __init kilauea_device_probe(void)
42991 - if (!machine_is(kilauea))
42994 of_platform_bus_probe(NULL, kilauea_of_bus, NULL);
42998 -device_initcall(kilauea_device_probe);
42999 +machine_device_initcall(kilauea, kilauea_device_probe);
43001 static int __init kilauea_probe(void)
43004 if (!of_flat_dt_is_compatible(root, "amcc,kilauea"))
43007 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43012 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/40x/makalu.c powerpc.git/arch/powerpc/platforms/40x/makalu.c
43013 --- linux-2.6.24/arch/powerpc/platforms/40x/makalu.c 1970-01-01 01:00:00.000000000 +0100
43014 +++ powerpc.git/arch/powerpc/platforms/40x/makalu.c 2008-01-28 20:25:49.000000000 +0100
43017 + * Makalu board specific routines
43019 + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
43021 + * Based on the Walnut code by
43022 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
43023 + * Copyright 2007 IBM Corporation
43025 + * This program is free software; you can redistribute it and/or modify it
43026 + * under the terms of the GNU General Public License as published by the
43027 + * Free Software Foundation; either version 2 of the License, or (at your
43028 + * option) any later version.
43030 +#include <linux/init.h>
43031 +#include <linux/of_platform.h>
43032 +#include <asm/machdep.h>
43033 +#include <asm/prom.h>
43034 +#include <asm/udbg.h>
43035 +#include <asm/time.h>
43036 +#include <asm/uic.h>
43037 +#include <asm/pci-bridge.h>
43039 +static __initdata struct of_device_id makalu_of_bus[] = {
43040 + { .compatible = "ibm,plb4", },
43041 + { .compatible = "ibm,opb", },
43042 + { .compatible = "ibm,ebc", },
43046 +static int __init makalu_device_probe(void)
43048 + of_platform_bus_probe(NULL, makalu_of_bus, NULL);
43052 +machine_device_initcall(makalu, makalu_device_probe);
43054 +static int __init makalu_probe(void)
43056 + unsigned long root = of_get_flat_dt_root();
43058 + if (!of_flat_dt_is_compatible(root, "amcc,makalu"))
43061 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43066 +define_machine(makalu) {
43067 + .name = "Makalu",
43068 + .probe = makalu_probe,
43069 + .progress = udbg_progress,
43070 + .init_IRQ = uic_init_tree,
43071 + .get_irq = uic_get_irq,
43072 + .calibrate_decr = generic_calibrate_decr,
43074 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/40x/virtex.c powerpc.git/arch/powerpc/platforms/40x/virtex.c
43075 --- linux-2.6.24/arch/powerpc/platforms/40x/virtex.c 2008-01-24 23:58:37.000000000 +0100
43076 +++ powerpc.git/arch/powerpc/platforms/40x/virtex.c 2008-01-28 20:25:49.000000000 +0100
43077 @@ -15,16 +15,23 @@
43078 #include <asm/time.h>
43079 #include <asm/xilinx_intc.h>
43081 +static struct of_device_id xilinx_of_bus_ids[] __initdata = {
43082 + { .compatible = "xlnx,plb-v46-1.00.a", },
43083 + { .compatible = "xlnx,plb-v34-1.01.a", },
43084 + { .compatible = "xlnx,plb-v34-1.02.a", },
43085 + { .compatible = "xlnx,opb-v20-1.10.c", },
43086 + { .compatible = "xlnx,dcr-v29-1.00.a", },
43087 + { .compatible = "xlnx,compound", },
43091 static int __init virtex_device_probe(void)
43093 - if (!machine_is(virtex))
43096 - of_platform_bus_probe(NULL, NULL, NULL);
43097 + of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL);
43101 -device_initcall(virtex_device_probe);
43102 +machine_device_initcall(virtex, virtex_device_probe);
43104 static int __init virtex_probe(void)
43106 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/40x/walnut.c powerpc.git/arch/powerpc/platforms/40x/walnut.c
43107 --- linux-2.6.24/arch/powerpc/platforms/40x/walnut.c 2008-01-24 23:58:37.000000000 +0100
43108 +++ powerpc.git/arch/powerpc/platforms/40x/walnut.c 2008-01-28 20:25:49.000000000 +0100
43110 #include <asm/udbg.h>
43111 #include <asm/time.h>
43112 #include <asm/uic.h>
43113 +#include <asm/pci-bridge.h>
43115 -static struct of_device_id walnut_of_bus[] = {
43116 +static __initdata struct of_device_id walnut_of_bus[] = {
43117 { .compatible = "ibm,plb3", },
43118 { .compatible = "ibm,opb", },
43119 { .compatible = "ibm,ebc", },
43120 @@ -34,15 +35,12 @@
43122 static int __init walnut_device_probe(void)
43124 - if (!machine_is(walnut))
43127 - /* FIXME: do bus probe here */
43128 of_platform_bus_probe(NULL, walnut_of_bus, NULL);
43129 + of_instantiate_rtc();
43133 -device_initcall(walnut_device_probe);
43134 +machine_device_initcall(walnut, walnut_device_probe);
43136 static int __init walnut_probe(void)
43139 if (!of_flat_dt_is_compatible(root, "ibm,walnut"))
43142 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43147 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/44x/Kconfig powerpc.git/arch/powerpc/platforms/44x/Kconfig
43148 --- linux-2.6.24/arch/powerpc/platforms/44x/Kconfig 2008-01-24 23:58:37.000000000 +0100
43149 +++ powerpc.git/arch/powerpc/platforms/44x/Kconfig 2008-01-28 20:25:49.000000000 +0100
43156 This option enables support for the IBM PPC440EP evaluation board.
43165 This option enables support for the IBM PPC440GP evaluation board.
43169 This option enables support for the AMCC PPC440EPX evaluation board.
43178 + This option enables support for the AMCC PPC440GX "Taishan"
43179 + evaluation board.
43187 + select PPC4xx_PCI_EXPRESS
43189 + This option enables support for the AMCC PPC440SPe evaluation board.
43198 + This option enables support for the AMCC PPC440GRX evaluation board.
43206 + This option enables support for the PIKA Warp(tm) Appliance. The Warp
43207 + is a small computer replacement with up to 9 ports of FXO/FXS plus VOIP
43208 + stations and trunks.
43210 + See http://www.pikatechnologies.com/ and follow the "PIKA for Computer
43211 + Telephony Developers" link for more information.
43218 select IBM440EP_ERR42
43219 select IBM_NEW_EMAC_ZMII
43220 + select USB_ARCH_HAS_OHCI
43224 @@ -52,20 +98,29 @@
43225 select IBM_NEW_EMAC_RGMII
43226 select IBM_NEW_EMAC_ZMII
43230 + select IBM_NEW_EMAC_EMAC4
43231 + select IBM_NEW_EMAC_RGMII
43232 + select IBM_NEW_EMAC_ZMII
43236 select IBM_NEW_EMAC_ZMII
43240 + select IBM_NEW_EMAC_EMAC4
43241 + select IBM_NEW_EMAC_RGMII
43242 + select IBM_NEW_EMAC_ZMII #test only
43243 + select IBM_NEW_EMAC_TAH #test only
43250 + select IBM_NEW_EMAC_EMAC4
43252 - depends on 440GX || 440EPX
43255 # 44x errata/workaround config symbols, selected by the CPU models above
43256 config IBM440EP_ERR42
43257 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/44x/Makefile powerpc.git/arch/powerpc/platforms/44x/Makefile
43258 --- linux-2.6.24/arch/powerpc/platforms/44x/Makefile 2008-01-24 23:58:37.000000000 +0100
43259 +++ powerpc.git/arch/powerpc/platforms/44x/Makefile 2008-01-28 20:25:49.000000000 +0100
43261 obj-$(CONFIG_44x) := misc_44x.o
43262 obj-$(CONFIG_EBONY) += ebony.o
43263 -obj-$(CONFIG_BAMBOO) += bamboo.o
43264 +obj-$(CONFIG_TAISHAN) += taishan.o
43265 +obj-$(CONFIG_BAMBOO) += bamboo.o
43266 obj-$(CONFIG_SEQUOIA) += sequoia.o
43267 +obj-$(CONFIG_KATMAI) += katmai.o
43268 +obj-$(CONFIG_RAINIER) += rainier.o
43269 +obj-$(CONFIG_WARP) += warp.o
43270 +obj-$(CONFIG_WARP) += warp-nand.o
43271 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/44x/bamboo.c powerpc.git/arch/powerpc/platforms/44x/bamboo.c
43272 --- linux-2.6.24/arch/powerpc/platforms/44x/bamboo.c 2008-01-24 23:58:37.000000000 +0100
43273 +++ powerpc.git/arch/powerpc/platforms/44x/bamboo.c 2008-01-28 20:25:49.000000000 +0100
43275 #include <asm/udbg.h>
43276 #include <asm/time.h>
43277 #include <asm/uic.h>
43278 +#include <asm/pci-bridge.h>
43282 -static struct of_device_id bamboo_of_bus[] = {
43283 +static __initdata struct of_device_id bamboo_of_bus[] = {
43284 { .compatible = "ibm,plb4", },
43285 { .compatible = "ibm,opb", },
43286 { .compatible = "ibm,ebc", },
43287 @@ -32,14 +34,11 @@
43289 static int __init bamboo_device_probe(void)
43291 - if (!machine_is(bamboo))
43294 of_platform_bus_probe(NULL, bamboo_of_bus, NULL);
43298 -device_initcall(bamboo_device_probe);
43299 +machine_device_initcall(bamboo, bamboo_device_probe);
43301 static int __init bamboo_probe(void)
43304 if (!of_flat_dt_is_compatible(root, "amcc,bamboo"))
43307 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43312 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/44x/ebony.c powerpc.git/arch/powerpc/platforms/44x/ebony.c
43313 --- linux-2.6.24/arch/powerpc/platforms/44x/ebony.c 2008-01-24 23:58:37.000000000 +0100
43314 +++ powerpc.git/arch/powerpc/platforms/44x/ebony.c 2008-01-28 20:25:49.000000000 +0100
43315 @@ -18,16 +18,18 @@
43317 #include <linux/init.h>
43318 #include <linux/of_platform.h>
43319 +#include <linux/rtc.h>
43321 #include <asm/machdep.h>
43322 #include <asm/prom.h>
43323 #include <asm/udbg.h>
43324 #include <asm/time.h>
43325 #include <asm/uic.h>
43326 +#include <asm/pci-bridge.h>
43330 -static struct of_device_id ebony_of_bus[] = {
43331 +static __initdata struct of_device_id ebony_of_bus[] = {
43332 { .compatible = "ibm,plb4", },
43333 { .compatible = "ibm,opb", },
43334 { .compatible = "ibm,ebc", },
43335 @@ -36,14 +38,12 @@
43337 static int __init ebony_device_probe(void)
43339 - if (!machine_is(ebony))
43342 of_platform_bus_probe(NULL, ebony_of_bus, NULL);
43343 + of_instantiate_rtc();
43347 -device_initcall(ebony_device_probe);
43348 +machine_device_initcall(ebony, ebony_device_probe);
43351 * Called very early, MMU is off, device-tree isn't unflattened
43353 if (!of_flat_dt_is_compatible(root, "ibm,ebony"))
43356 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43361 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/44x/katmai.c powerpc.git/arch/powerpc/platforms/44x/katmai.c
43362 --- linux-2.6.24/arch/powerpc/platforms/44x/katmai.c 1970-01-01 01:00:00.000000000 +0100
43363 +++ powerpc.git/arch/powerpc/platforms/44x/katmai.c 2008-01-28 20:25:49.000000000 +0100
43366 + * Katmai board specific routines
43368 + * Benjamin Herrenschmidt <benh@kernel.crashing.org>
43369 + * Copyright 2007 IBM Corp.
43371 + * Based on the Bamboo code by
43372 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
43373 + * Copyright 2007 IBM Corporation
43375 + * This program is free software; you can redistribute it and/or modify it
43376 + * under the terms of the GNU General Public License as published by the
43377 + * Free Software Foundation; either version 2 of the License, or (at your
43378 + * option) any later version.
43380 +#include <linux/init.h>
43381 +#include <linux/of_platform.h>
43383 +#include <asm/machdep.h>
43384 +#include <asm/prom.h>
43385 +#include <asm/udbg.h>
43386 +#include <asm/time.h>
43387 +#include <asm/uic.h>
43388 +#include <asm/pci-bridge.h>
43392 +static __initdata struct of_device_id katmai_of_bus[] = {
43393 + { .compatible = "ibm,plb4", },
43394 + { .compatible = "ibm,opb", },
43395 + { .compatible = "ibm,ebc", },
43399 +static int __init katmai_device_probe(void)
43401 + of_platform_bus_probe(NULL, katmai_of_bus, NULL);
43405 +machine_device_initcall(katmai, katmai_device_probe);
43407 +static int __init katmai_probe(void)
43409 + unsigned long root = of_get_flat_dt_root();
43411 + if (!of_flat_dt_is_compatible(root, "amcc,katmai"))
43414 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43419 +define_machine(katmai) {
43420 + .name = "Katmai",
43421 + .probe = katmai_probe,
43422 + .progress = udbg_progress,
43423 + .init_IRQ = uic_init_tree,
43424 + .get_irq = uic_get_irq,
43425 + .restart = ppc44x_reset_system,
43426 + .calibrate_decr = generic_calibrate_decr,
43428 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/44x/rainier.c powerpc.git/arch/powerpc/platforms/44x/rainier.c
43429 --- linux-2.6.24/arch/powerpc/platforms/44x/rainier.c 1970-01-01 01:00:00.000000000 +0100
43430 +++ powerpc.git/arch/powerpc/platforms/44x/rainier.c 2008-01-28 20:25:49.000000000 +0100
43433 + * Rainier board specific routines
43435 + * Valentine Barshak <vbarshak@ru.mvista.com>
43436 + * Copyright 2007 MontaVista Software Inc.
43438 + * Based on the Bamboo code by
43439 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
43440 + * Copyright 2007 IBM Corporation
43442 + * This program is free software; you can redistribute it and/or modify it
43443 + * under the terms of the GNU General Public License as published by the
43444 + * Free Software Foundation; either version 2 of the License, or (at your
43445 + * option) any later version.
43447 +#include <linux/init.h>
43448 +#include <linux/of_platform.h>
43450 +#include <asm/machdep.h>
43451 +#include <asm/prom.h>
43452 +#include <asm/udbg.h>
43453 +#include <asm/time.h>
43454 +#include <asm/uic.h>
43455 +#include <asm/pci-bridge.h>
43458 +static __initdata struct of_device_id rainier_of_bus[] = {
43459 + { .compatible = "ibm,plb4", },
43460 + { .compatible = "ibm,opb", },
43461 + { .compatible = "ibm,ebc", },
43465 +static int __init rainier_device_probe(void)
43467 + of_platform_bus_probe(NULL, rainier_of_bus, NULL);
43471 +machine_device_initcall(rainier, rainier_device_probe);
43473 +static int __init rainier_probe(void)
43475 + unsigned long root = of_get_flat_dt_root();
43477 + if (!of_flat_dt_is_compatible(root, "amcc,rainier"))
43480 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43485 +define_machine(rainier) {
43486 + .name = "Rainier",
43487 + .probe = rainier_probe,
43488 + .progress = udbg_progress,
43489 + .init_IRQ = uic_init_tree,
43490 + .get_irq = uic_get_irq,
43491 + .restart = ppc44x_reset_system,
43492 + .calibrate_decr = generic_calibrate_decr,
43494 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/44x/sequoia.c powerpc.git/arch/powerpc/platforms/44x/sequoia.c
43495 --- linux-2.6.24/arch/powerpc/platforms/44x/sequoia.c 2008-01-24 23:58:37.000000000 +0100
43496 +++ powerpc.git/arch/powerpc/platforms/44x/sequoia.c 2008-01-28 20:25:49.000000000 +0100
43498 #include <asm/udbg.h>
43499 #include <asm/time.h>
43500 #include <asm/uic.h>
43501 +#include <asm/pci-bridge.h>
43505 -static struct of_device_id sequoia_of_bus[] = {
43506 +static __initdata struct of_device_id sequoia_of_bus[] = {
43507 { .compatible = "ibm,plb4", },
43508 { .compatible = "ibm,opb", },
43509 { .compatible = "ibm,ebc", },
43510 @@ -32,14 +34,11 @@
43512 static int __init sequoia_device_probe(void)
43514 - if (!machine_is(sequoia))
43517 of_platform_bus_probe(NULL, sequoia_of_bus, NULL);
43521 -device_initcall(sequoia_device_probe);
43522 +machine_device_initcall(sequoia, sequoia_device_probe);
43524 static int __init sequoia_probe(void)
43527 if (!of_flat_dt_is_compatible(root, "amcc,sequoia"))
43530 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43535 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/44x/taishan.c powerpc.git/arch/powerpc/platforms/44x/taishan.c
43536 --- linux-2.6.24/arch/powerpc/platforms/44x/taishan.c 1970-01-01 01:00:00.000000000 +0100
43537 +++ powerpc.git/arch/powerpc/platforms/44x/taishan.c 2008-01-28 20:25:49.000000000 +0100
43540 + * Taishan board specific routines based off ebony.c code
43541 + * original copyrights below
43543 + * Matt Porter <mporter@kernel.crashing.org>
43544 + * Copyright 2002-2005 MontaVista Software Inc.
43546 + * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
43547 + * Copyright (c) 2003-2005 Zultys Technologies
43549 + * Rewritten and ported to the merged powerpc tree:
43550 + * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
43552 + * Modified from ebony.c for taishan:
43553 + * Copyright 2007 Hugh Blemings <hugh@au.ibm.com>, IBM Corporation.
43555 + * This program is free software; you can redistribute it and/or modify it
43556 + * under the terms of the GNU General Public License as published by the
43557 + * Free Software Foundation; either version 2 of the License, or (at your
43558 + * option) any later version.
43561 +#include <linux/init.h>
43562 +#include <linux/of_platform.h>
43564 +#include <asm/machdep.h>
43565 +#include <asm/prom.h>
43566 +#include <asm/udbg.h>
43567 +#include <asm/time.h>
43568 +#include <asm/uic.h>
43569 +#include <asm/pci-bridge.h>
43573 +static __initdata struct of_device_id taishan_of_bus[] = {
43574 + { .compatible = "ibm,plb4", },
43575 + { .compatible = "ibm,opb", },
43576 + { .compatible = "ibm,ebc", },
43580 +static int __init taishan_device_probe(void)
43582 + of_platform_bus_probe(NULL, taishan_of_bus, NULL);
43586 +machine_device_initcall(taishan, taishan_device_probe);
43589 + * Called very early, MMU is off, device-tree isn't unflattened
43591 +static int __init taishan_probe(void)
43593 + unsigned long root = of_get_flat_dt_root();
43595 + if (!of_flat_dt_is_compatible(root, "amcc,taishan"))
43598 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43603 +define_machine(taishan) {
43604 + .name = "Taishan",
43605 + .probe = taishan_probe,
43606 + .progress = udbg_progress,
43607 + .init_IRQ = uic_init_tree,
43608 + .get_irq = uic_get_irq,
43609 + .restart = ppc44x_reset_system,
43610 + .calibrate_decr = generic_calibrate_decr,
43612 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/44x/warp-nand.c powerpc.git/arch/powerpc/platforms/44x/warp-nand.c
43613 --- linux-2.6.24/arch/powerpc/platforms/44x/warp-nand.c 1970-01-01 01:00:00.000000000 +0100
43614 +++ powerpc.git/arch/powerpc/platforms/44x/warp-nand.c 2008-01-28 20:25:49.000000000 +0100
43617 + * PIKA Warp(tm) NAND flash specific routines
43619 + * Copyright (c) 2008 PIKA Technologies
43620 + * Sean MacLennan <smaclennan@pikatech.com>
43623 +#include <linux/platform_device.h>
43624 +#include <linux/mtd/mtd.h>
43625 +#include <linux/mtd/map.h>
43626 +#include <linux/mtd/partitions.h>
43627 +#include <linux/mtd/nand.h>
43628 +#include <linux/mtd/ndfc.h>
43630 +#ifdef CONFIG_MTD_NAND_NDFC
43632 +#define CS_NAND_0 1 /* use chip select 1 for NAND device 0 */
43634 +#define WARP_NAND_FLASH_REG_ADDR 0xD0000000UL
43635 +#define WARP_NAND_FLASH_REG_SIZE 0x2000
43637 +static struct resource warp_ndfc = {
43638 + .start = WARP_NAND_FLASH_REG_ADDR,
43639 + .end = WARP_NAND_FLASH_REG_ADDR + WARP_NAND_FLASH_REG_SIZE,
43640 + .flags = IORESOURCE_MEM,
43643 +static struct mtd_partition nand_parts[] = {
43645 + .name = "kernel",
43647 + .size = 0x0200000
43651 + .offset = 0x0200000,
43652 + .size = 0x3400000
43656 + .offset = 0x3600000,
43657 + .size = 0x0A00000
43661 +struct ndfc_controller_settings warp_ndfc_settings = {
43662 + .ccr_settings = (NDFC_CCR_BS(CS_NAND_0) | NDFC_CCR_ARAC1),
43666 +static struct ndfc_chip_settings warp_chip0_settings = {
43667 + .bank_settings = 0x80002222,
43670 +struct platform_nand_ctrl warp_nand_ctrl = {
43671 + .priv = &warp_ndfc_settings,
43674 +static struct platform_device warp_ndfc_device = {
43675 + .name = "ndfc-nand",
43678 + .platform_data = &warp_nand_ctrl,
43680 + .num_resources = 1,
43681 + .resource = &warp_ndfc,
43684 +static struct nand_ecclayout nand_oob_16 = {
43686 + .eccpos = { 0, 1, 2, 3, 6, 7 },
43687 + .oobfree = { {.offset = 8, .length = 16} }
43690 +static struct platform_nand_chip warp_nand_chip0 = {
43692 + .chip_offset = CS_NAND_0,
43693 + .nr_partitions = ARRAY_SIZE(nand_parts),
43694 + .partitions = nand_parts,
43695 + .chip_delay = 50,
43696 + .ecclayout = &nand_oob_16,
43697 + .priv = &warp_chip0_settings,
43700 +static struct platform_device warp_nand_device = {
43701 + .name = "ndfc-chip",
43703 + .num_resources = 1,
43704 + .resource = &warp_ndfc,
43706 + .platform_data = &warp_nand_chip0,
43707 + .parent = &warp_ndfc_device.dev,
43711 +static int warp_setup_nand_flash(void)
43713 + platform_device_register(&warp_ndfc_device);
43714 + platform_device_register(&warp_nand_device);
43718 +device_initcall(warp_setup_nand_flash);
43721 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/44x/warp.c powerpc.git/arch/powerpc/platforms/44x/warp.c
43722 --- linux-2.6.24/arch/powerpc/platforms/44x/warp.c 1970-01-01 01:00:00.000000000 +0100
43723 +++ powerpc.git/arch/powerpc/platforms/44x/warp.c 2008-01-28 20:25:49.000000000 +0100
43726 + * PIKA Warp(tm) board specific routines
43728 + * Copyright (c) 2008 PIKA Technologies
43729 + * Sean MacLennan <smaclennan@pikatech.com>
43731 + * This program is free software; you can redistribute it and/or modify it
43732 + * under the terms of the GNU General Public License as published by the
43733 + * Free Software Foundation; either version 2 of the License, or (at your
43734 + * option) any later version.
43736 +#include <linux/init.h>
43737 +#include <linux/of_platform.h>
43738 +#include <linux/kthread.h>
43740 +#include <asm/machdep.h>
43741 +#include <asm/prom.h>
43742 +#include <asm/udbg.h>
43743 +#include <asm/time.h>
43744 +#include <asm/uic.h>
43749 +static __initdata struct of_device_id warp_of_bus[] = {
43750 + { .compatible = "ibm,plb4", },
43751 + { .compatible = "ibm,opb", },
43752 + { .compatible = "ibm,ebc", },
43756 +static int __init warp_device_probe(void)
43758 + of_platform_bus_probe(NULL, warp_of_bus, NULL);
43761 +machine_device_initcall(warp, warp_device_probe);
43763 +static int __init warp_probe(void)
43765 + unsigned long root = of_get_flat_dt_root();
43767 + return of_flat_dt_is_compatible(root, "pika,warp");
43770 +define_machine(warp) {
43772 + .probe = warp_probe,
43773 + .progress = udbg_progress,
43774 + .init_IRQ = uic_init_tree,
43775 + .get_irq = uic_get_irq,
43776 + .restart = ppc44x_reset_system,
43777 + .calibrate_decr = generic_calibrate_decr,
43781 +#define LED_GREEN (0x80000000 >> 0)
43782 +#define LED_RED (0x80000000 >> 1)
43785 +/* This is for the power LEDs 1 = on, 0 = off, -1 = leave alone */
43786 +void warp_set_power_leds(int green, int red)
43788 + static void __iomem *gpio_base = NULL;
43791 + if (gpio_base == NULL) {
43792 + struct device_node *np;
43794 + /* Power LEDS are on the second GPIO controller */
43795 + np = of_find_compatible_node(NULL, NULL, "ibm,gpio-440EP");
43797 + np = of_find_compatible_node(np, NULL, "ibm,gpio-440EP");
43798 + if (np == NULL) {
43799 + printk(KERN_ERR __FILE__ ": Unable to find gpio\n");
43803 + gpio_base = of_iomap(np, 0);
43805 + if (gpio_base == NULL) {
43806 + printk(KERN_ERR __FILE__ ": Unable to map gpio");
43811 + leds = in_be32(gpio_base);
43814 + case 0: leds &= ~LED_GREEN; break;
43815 + case 1: leds |= LED_GREEN; break;
43818 + case 0: leds &= ~LED_RED; break;
43819 + case 1: leds |= LED_RED; break;
43822 + out_be32(gpio_base, leds);
43824 +EXPORT_SYMBOL(warp_set_power_leds);
43827 +#ifdef CONFIG_SENSORS_AD7414
43828 +static int pika_dtm_thread(void __iomem *fpga)
43830 + extern int ad7414_get_temp(int index);
43832 + while (!kthread_should_stop()) {
43833 + int temp = ad7414_get_temp(0);
43835 + out_be32(fpga, temp);
43837 + set_current_state(TASK_INTERRUPTIBLE);
43838 + schedule_timeout(HZ);
43844 +static int __init pika_dtm_start(void)
43846 + struct task_struct *dtm_thread;
43847 + struct device_node *np;
43848 + struct resource res;
43849 + void __iomem *fpga;
43851 + np = of_find_compatible_node(NULL, NULL, "pika,fpga");
43855 + /* We do not call of_iomap here since it would map in the entire
43856 + * fpga space, which is over 8k.
43858 + if (of_address_to_resource(np, 0, &res)) {
43864 + fpga = ioremap(res.start + 0x20, 4);
43865 + if (fpga == NULL)
43868 + dtm_thread = kthread_run(pika_dtm_thread, fpga + 0x20, "pika-dtm");
43869 + if (IS_ERR(dtm_thread)) {
43871 + return PTR_ERR(dtm_thread);
43876 +device_initcall(pika_dtm_start);
43878 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/52xx/Kconfig powerpc.git/arch/powerpc/platforms/52xx/Kconfig
43879 --- linux-2.6.24/arch/powerpc/platforms/52xx/Kconfig 2008-01-24 23:58:37.000000000 +0100
43880 +++ powerpc.git/arch/powerpc/platforms/52xx/Kconfig 2008-01-28 20:25:49.000000000 +0100
43883 It is safe to say 'Y' here
43885 +config PPC_MPC5200_SIMPLE
43886 + bool "Generic support for simple MPC5200 based boards"
43887 + depends on PPC_MULTIPLATFORM && PPC32
43888 + select PPC_MPC5200
43889 + select DEFAULT_UIMAGE
43890 + select WANT_DEVICE_TREE
43893 + This option enables support for a simple MPC52xx based boards which
43894 + do not need a custom platform specific setup. Such boards are
43895 + supported assuming the following:
43897 + - GPIO pins are configured by the firmware,
43898 + - CDM configuration (clocking) is setup correctly by firmware,
43899 + - if the 'fsl,has-wdt' property is present in one of the
43900 + gpt nodes, then it is safe to use such gpt to reset the board,
43901 + - PCI is supported if enabled in the kernel configuration
43902 + and if there is a PCI bus node defined in the device tree.
43904 + Boards that are compatible with this generic platform support
43905 + are: 'tqc,tqm5200', 'promess,motionpro', 'schindler,cm5200'.
43908 bool "bPlan Efika 5k2. MPC5200B based computer"
43909 depends on PPC_MULTIPLATFORM && PPC32
43911 config PPC_LITE5200
43912 bool "Freescale Lite5200 Eval Board"
43913 depends on PPC_MULTIPLATFORM && PPC32
43914 - select WANT_DEVICE_TREE
43916 + select DEFAULT_UIMAGE
43917 + select WANT_DEVICE_TREE
43921 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/52xx/Makefile powerpc.git/arch/powerpc/platforms/52xx/Makefile
43922 --- linux-2.6.24/arch/powerpc/platforms/52xx/Makefile 2008-01-24 23:58:37.000000000 +0100
43923 +++ powerpc.git/arch/powerpc/platforms/52xx/Makefile 2008-01-28 20:25:49.000000000 +0100
43925 obj-$(CONFIG_PCI) += mpc52xx_pci.o
43928 +obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o
43929 obj-$(CONFIG_PPC_EFIKA) += efika.o
43930 obj-$(CONFIG_PPC_LITE5200) += lite5200.o
43932 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/52xx/lite5200.c powerpc.git/arch/powerpc/platforms/52xx/lite5200.c
43933 --- linux-2.6.24/arch/powerpc/platforms/52xx/lite5200.c 2008-01-24 23:58:37.000000000 +0100
43934 +++ powerpc.git/arch/powerpc/platforms/52xx/lite5200.c 2008-01-28 20:25:49.000000000 +0100
43935 @@ -42,10 +42,13 @@
43937 lite5200_fix_clock_config(void)
43939 + struct device_node *np;
43940 struct mpc52xx_cdm __iomem *cdm;
43943 - cdm = mpc52xx_find_and_map("mpc5200-cdm");
43944 + np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm");
43945 + cdm = of_iomap(np, 0);
43948 printk(KERN_ERR "%s() failed; expect abnormal behaviour\n",
43950 @@ -74,10 +77,13 @@
43952 lite5200_fix_port_config(void)
43954 + struct device_node *np;
43955 struct mpc52xx_gpio __iomem *gpio;
43958 - gpio = mpc52xx_find_and_map("mpc5200-gpio");
43959 + np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio");
43960 + gpio = of_iomap(np, 0);
43963 printk(KERN_ERR "%s() failed. expect abnormal behavior\n",
43965 @@ -131,10 +137,6 @@
43967 static void __init lite5200_setup_arch(void)
43970 - struct device_node *np;
43973 if (ppc_md.progress)
43974 ppc_md.progress("lite5200_setup_arch()", 0);
43976 @@ -154,13 +156,7 @@
43977 lite5200_pm_init();
43981 - np = of_find_node_by_type(NULL, "pci");
43983 - mpc52xx_add_bridge(np);
43987 + mpc52xx_setup_pci();
43991 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/52xx/lite5200_pm.c powerpc.git/arch/powerpc/platforms/52xx/lite5200_pm.c
43992 --- linux-2.6.24/arch/powerpc/platforms/52xx/lite5200_pm.c 2008-01-24 23:58:37.000000000 +0100
43993 +++ powerpc.git/arch/powerpc/platforms/52xx/lite5200_pm.c 2008-01-28 20:25:49.000000000 +0100
43996 static int lite5200_pm_prepare(void)
43998 + struct device_node *np;
44000 /* deep sleep? let mpc52xx code handle that */
44001 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY)
44002 return mpc52xx_pm_prepare();
44006 /* map registers */
44007 - mbar = mpc52xx_find_and_map("mpc5200");
44008 + np = of_find_compatible_node(NULL, NULL, "mpc5200");
44009 + mbar = of_iomap(np, 0);
44012 printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
44014 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/52xx/mpc5200_simple.c powerpc.git/arch/powerpc/platforms/52xx/mpc5200_simple.c
44015 --- linux-2.6.24/arch/powerpc/platforms/52xx/mpc5200_simple.c 1970-01-01 01:00:00.000000000 +0100
44016 +++ powerpc.git/arch/powerpc/platforms/52xx/mpc5200_simple.c 2008-01-28 20:25:49.000000000 +0100
44019 + * Support for 'mpc5200-simple-platform' compatible boards.
44021 + * Written by Marian Balakowicz <m8@semihalf.com>
44022 + * Copyright (C) 2007 Semihalf
44024 + * This program is free software; you can redistribute it and/or modify it
44025 + * under the terms of the GNU General Public License as published by the
44026 + * Free Software Foundation; either version 2 of the License, or (at your
44027 + * option) any later version.
44030 + * This code implements support for a simple MPC52xx based boards which
44031 + * do not need a custom platform specific setup. Such boards are
44032 + * supported assuming the following:
44034 + * - GPIO pins are configured by the firmware,
44035 + * - CDM configuration (clocking) is setup correctly by firmware,
44036 + * - if the 'fsl,has-wdt' property is present in one of the
44037 + * gpt nodes, then it is safe to use such gpt to reset the board,
44038 + * - PCI is supported if enabled in the kernel configuration
44039 + * and if there is a PCI bus node defined in the device tree.
44041 + * Boards that are compatible with this generic platform support
44042 + * are listed in a 'board' table.
44046 +#include <asm/time.h>
44047 +#include <asm/prom.h>
44048 +#include <asm/machdep.h>
44049 +#include <asm/mpc52xx.h>
44052 + * Setup the architecture
44054 +static void __init mpc5200_simple_setup_arch(void)
44056 + if (ppc_md.progress)
44057 + ppc_md.progress("mpc5200_simple_setup_arch()", 0);
44059 + /* Some mpc5200 & mpc5200b related configuration */
44060 + mpc5200_setup_xlb_arbiter();
44062 + /* Map wdt for mpc52xx_restart() */
44063 + mpc52xx_map_wdt();
44065 + mpc52xx_setup_pci();
44068 +/* list of the supported boards */
44069 +static char *board[] __initdata = {
44070 + "promess,motionpro",
44071 + "schindler,cm5200",
44077 + * Called very early, MMU is off, device-tree isn't unflattened
44079 +static int __init mpc5200_simple_probe(void)
44081 + unsigned long node = of_get_flat_dt_root();
44084 + while (board[i]) {
44085 + if (of_flat_dt_is_compatible(node, board[i]))
44090 + return (board[i] != NULL);
44093 +define_machine(mpc5200_simple_platform) {
44094 + .name = "mpc5200-simple-platform",
44095 + .probe = mpc5200_simple_probe,
44096 + .setup_arch = mpc5200_simple_setup_arch,
44097 + .init = mpc52xx_declare_of_platform_devices,
44098 + .init_IRQ = mpc52xx_init_irq,
44099 + .get_irq = mpc52xx_get_irq,
44100 + .restart = mpc52xx_restart,
44101 + .calibrate_decr = generic_calibrate_decr,
44103 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/52xx/mpc52xx_common.c powerpc.git/arch/powerpc/platforms/52xx/mpc52xx_common.c
44104 --- linux-2.6.24/arch/powerpc/platforms/52xx/mpc52xx_common.c 2008-01-24 23:58:37.000000000 +0100
44105 +++ powerpc.git/arch/powerpc/platforms/52xx/mpc52xx_common.c 2008-01-28 20:25:49.000000000 +0100
44108 static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL;
44110 -static void __iomem *
44111 -mpc52xx_map_node(struct device_node *ofn)
44113 - const u32 *regaddr_p;
44114 - u64 regaddr64, size64;
44119 - regaddr_p = of_get_address(ofn, 0, &size64, NULL);
44120 - if (!regaddr_p) {
44121 - of_node_put(ofn);
44125 - regaddr64 = of_translate_address(ofn, regaddr_p);
44127 - of_node_put(ofn);
44129 - return ioremap((u32)regaddr64, (u32)size64);
44133 -mpc52xx_find_and_map(const char *compatible)
44135 - return mpc52xx_map_node(
44136 - of_find_compatible_node(NULL, NULL, compatible));
44139 -EXPORT_SYMBOL(mpc52xx_find_and_map);
44142 -mpc52xx_find_and_map_path(const char *path)
44144 - return mpc52xx_map_node(of_find_node_by_path(path));
44147 -EXPORT_SYMBOL(mpc52xx_find_and_map_path);
44150 * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
44151 * @node: device node
44152 @@ -101,9 +62,12 @@
44154 mpc5200_setup_xlb_arbiter(void)
44156 + struct device_node *np;
44157 struct mpc52xx_xlb __iomem *xlb;
44159 - xlb = mpc52xx_find_and_map("mpc5200-xlb");
44160 + np = of_find_compatible_node(NULL, NULL, "mpc5200-xlb");
44161 + xlb = of_iomap(np, 0);
44164 printk(KERN_ERR __FILE__ ": "
44165 "Error mapping XLB in mpc52xx_setup_cpu(). "
44166 @@ -124,11 +88,21 @@
44170 +static struct of_device_id mpc52xx_bus_ids[] __initdata= {
44171 + { .compatible = "fsl,mpc5200-immr", },
44172 + { .compatible = "fsl,lpb", },
44174 + /* depreciated matches; shouldn't be used in new device trees */
44175 + { .type = "builtin", .compatible = "mpc5200", }, /* efika */
44176 + { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
44181 mpc52xx_declare_of_platform_devices(void)
44183 /* Find every child of the SOC node and add it to of_platform */
44184 - if (of_platform_bus_probe(NULL, NULL, NULL))
44185 + if (of_platform_bus_probe(NULL, mpc52xx_bus_ids, NULL))
44186 printk(KERN_ERR __FILE__ ": "
44187 "Error while probing of_platform bus\n");
44189 @@ -146,16 +120,19 @@
44190 for_each_compatible_node(np, NULL, "fsl,mpc5200-gpt") {
44191 has_wdt = of_get_property(np, "fsl,has-wdt", NULL);
44193 - mpc52xx_wdt = mpc52xx_map_node(np);
44194 + mpc52xx_wdt = of_iomap(np, 0);
44199 for_each_compatible_node(np, NULL, "mpc5200-gpt") {
44200 has_wdt = of_get_property(np, "has-wdt", NULL);
44202 - mpc52xx_wdt = mpc52xx_map_node(np);
44203 + mpc52xx_wdt = of_iomap(np, 0);
44211 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/52xx/mpc52xx_pci.c powerpc.git/arch/powerpc/platforms/52xx/mpc52xx_pci.c
44212 --- linux-2.6.24/arch/powerpc/platforms/52xx/mpc52xx_pci.c 2008-01-24 23:58:37.000000000 +0100
44213 +++ powerpc.git/arch/powerpc/platforms/52xx/mpc52xx_pci.c 2008-01-28 20:25:49.000000000 +0100
44214 @@ -363,7 +363,7 @@
44216 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name);
44218 - pci_assign_all_buses = 1;
44219 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
44221 if (of_address_to_resource(node, 0, &rsrc) != 0) {
44222 printk(KERN_ERR "Can't get %s resources\n", node->full_name);
44223 @@ -406,3 +406,17 @@
44228 +void __init mpc52xx_setup_pci(void)
44230 + struct device_node *pci;
44232 + pci = of_find_compatible_node(NULL, NULL, "fsl,mpc5200-pci");
44234 + pci = of_find_compatible_node(NULL, NULL, "mpc5200-pci");
44238 + mpc52xx_add_bridge(pci);
44239 + of_node_put(pci);
44241 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/52xx/mpc52xx_pic.c powerpc.git/arch/powerpc/platforms/52xx/mpc52xx_pic.c
44242 --- linux-2.6.24/arch/powerpc/platforms/52xx/mpc52xx_pic.c 2008-01-24 23:58:37.000000000 +0100
44243 +++ powerpc.git/arch/powerpc/platforms/52xx/mpc52xx_pic.c 2008-01-28 20:25:49.000000000 +0100
44244 @@ -364,16 +364,18 @@
44247 struct device_node *picnode;
44248 + struct device_node *np;
44250 /* Remap the necessary zones */
44251 picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic");
44253 - intr = mpc52xx_find_and_map("mpc5200-pic");
44254 + intr = of_iomap(picnode, 0);
44256 panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. "
44259 - sdma = mpc52xx_find_and_map("mpc5200-bestcomm");
44260 + np = of_find_compatible_node(NULL, NULL, "mpc5200-bestcomm");
44261 + sdma = of_iomap(np, 0);
44264 panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. "
44266 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/52xx/mpc52xx_pm.c powerpc.git/arch/powerpc/platforms/52xx/mpc52xx_pm.c
44267 --- linux-2.6.24/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2008-01-24 23:58:37.000000000 +0100
44268 +++ powerpc.git/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2008-01-28 20:25:49.000000000 +0100
44269 @@ -59,10 +59,14 @@
44271 int mpc52xx_pm_prepare(void)
44273 + struct device_node *np;
44275 /* map the whole register space */
44276 - mbar = mpc52xx_find_and_map("mpc5200");
44277 + np = of_find_compatible_node(NULL, NULL, "mpc5200");
44278 + mbar = of_iomap(np, 0);
44281 - printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
44282 + pr_err("mpc52xx_pm_prepare(): could not map registers\n");
44285 /* these offsets are from mpc5200 users manual */
44286 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/82xx/Kconfig powerpc.git/arch/powerpc/platforms/82xx/Kconfig
44287 --- linux-2.6.24/arch/powerpc/platforms/82xx/Kconfig 2008-01-24 23:58:37.000000000 +0100
44288 +++ powerpc.git/arch/powerpc/platforms/82xx/Kconfig 2008-01-28 20:25:49.000000000 +0100
44291 This option enables support for the PQ2FADS board
44294 + bool "Embedded Planet EP8248E (a.k.a. CWH-PPC-8248N-VE)"
44298 + select PPC_CPM_NEW_BINDING
44299 + select MDIO_BITBANG
44301 + This enables support for the Embedded Planet EP8248E board.
44303 + This board is also resold by Freescale as the QUICCStart
44304 + MPC8248 Evaluation System and/or the CWH-PPC-8248N-VE.
44309 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/82xx/Makefile powerpc.git/arch/powerpc/platforms/82xx/Makefile
44310 --- linux-2.6.24/arch/powerpc/platforms/82xx/Makefile 2008-01-24 23:58:37.000000000 +0100
44311 +++ powerpc.git/arch/powerpc/platforms/82xx/Makefile 2008-01-28 20:25:49.000000000 +0100
44313 obj-$(CONFIG_CPM2) += pq2.o
44314 obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o
44315 obj-$(CONFIG_PQ2FADS) += pq2fads.o
44316 +obj-$(CONFIG_EP8248E) += ep8248e.o
44317 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/82xx/ep8248e.c powerpc.git/arch/powerpc/platforms/82xx/ep8248e.c
44318 --- linux-2.6.24/arch/powerpc/platforms/82xx/ep8248e.c 1970-01-01 01:00:00.000000000 +0100
44319 +++ powerpc.git/arch/powerpc/platforms/82xx/ep8248e.c 2008-01-28 20:25:49.000000000 +0100
44322 + * Embedded Planet EP8248E support
44324 + * Copyright 2007 Freescale Semiconductor, Inc.
44325 + * Author: Scott Wood <scottwood@freescale.com>
44327 + * This program is free software; you can redistribute it and/or modify it
44328 + * under the terms of the GNU General Public License as published by the
44329 + * Free Software Foundation; either version 2 of the License, or (at your
44330 + * option) any later version.
44333 +#include <linux/init.h>
44334 +#include <linux/interrupt.h>
44335 +#include <linux/fsl_devices.h>
44336 +#include <linux/mdio-bitbang.h>
44337 +#include <linux/of_platform.h>
44339 +#include <asm/io.h>
44340 +#include <asm/cpm2.h>
44341 +#include <asm/udbg.h>
44342 +#include <asm/machdep.h>
44343 +#include <asm/time.h>
44344 +#include <asm/mpc8260.h>
44345 +#include <asm/prom.h>
44347 +#include <sysdev/fsl_soc.h>
44348 +#include <sysdev/cpm2_pic.h>
44352 +static u8 __iomem *ep8248e_bcsr;
44353 +static struct device_node *ep8248e_bcsr_node;
44355 +#define BCSR7_SCC2_ENABLE 0x10
44357 +#define BCSR8_PHY1_ENABLE 0x80
44358 +#define BCSR8_PHY1_POWER 0x40
44359 +#define BCSR8_PHY2_ENABLE 0x20
44360 +#define BCSR8_PHY2_POWER 0x10
44361 +#define BCSR8_MDIO_READ 0x04
44362 +#define BCSR8_MDIO_CLOCK 0x02
44363 +#define BCSR8_MDIO_DATA 0x01
44365 +#define BCSR9_USB_ENABLE 0x80
44366 +#define BCSR9_USB_POWER 0x40
44367 +#define BCSR9_USB_HOST 0x20
44368 +#define BCSR9_USB_FULL_SPEED_TARGET 0x10
44370 +static void __init ep8248e_pic_init(void)
44372 + struct device_node *np = of_find_compatible_node(NULL, NULL, "fsl,pq2-pic");
44374 + printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
44378 + cpm2_pic_init(np);
44382 +static void ep8248e_set_mdc(struct mdiobb_ctrl *ctrl, int level)
44385 + setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_CLOCK);
44387 + clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_CLOCK);
44389 + /* Read back to flush the write. */
44390 + in_8(&ep8248e_bcsr[8]);
44393 +static void ep8248e_set_mdio_dir(struct mdiobb_ctrl *ctrl, int output)
44396 + clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_READ);
44398 + setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_READ);
44400 + /* Read back to flush the write. */
44401 + in_8(&ep8248e_bcsr[8]);
44404 +static void ep8248e_set_mdio_data(struct mdiobb_ctrl *ctrl, int data)
44407 + setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_DATA);
44409 + clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_DATA);
44411 + /* Read back to flush the write. */
44412 + in_8(&ep8248e_bcsr[8]);
44415 +static int ep8248e_get_mdio_data(struct mdiobb_ctrl *ctrl)
44417 + return in_8(&ep8248e_bcsr[8]) & BCSR8_MDIO_DATA;
44420 +static const struct mdiobb_ops ep8248e_mdio_ops = {
44421 + .set_mdc = ep8248e_set_mdc,
44422 + .set_mdio_dir = ep8248e_set_mdio_dir,
44423 + .set_mdio_data = ep8248e_set_mdio_data,
44424 + .get_mdio_data = ep8248e_get_mdio_data,
44425 + .owner = THIS_MODULE,
44428 +static struct mdiobb_ctrl ep8248e_mdio_ctrl = {
44429 + .ops = &ep8248e_mdio_ops,
44432 +static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
44433 + const struct of_device_id *match)
44435 + struct mii_bus *bus;
44436 + struct resource res;
44437 + struct device_node *node;
44440 + node = of_get_parent(ofdev->node);
44441 + of_node_put(node);
44442 + if (node != ep8248e_bcsr_node)
44445 + ret = of_address_to_resource(ofdev->node, 0, &res);
44449 + bus = alloc_mdio_bitbang(&ep8248e_mdio_ctrl);
44453 + bus->phy_mask = 0;
44454 + bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
44456 + for (i = 0; i < PHY_MAX_ADDR; i++)
44457 + bus->irq[i] = -1;
44459 + bus->name = "ep8248e-mdio-bitbang";
44460 + bus->dev = &ofdev->dev;
44461 + bus->id = res.start;
44463 + return mdiobus_register(bus);
44466 +static int ep8248e_mdio_remove(struct of_device *ofdev)
44472 +static const struct of_device_id ep8248e_mdio_match[] = {
44474 + .compatible = "fsl,ep8248e-mdio-bitbang",
44479 +static struct of_platform_driver ep8248e_mdio_driver = {
44481 + .name = "ep8248e-mdio-bitbang",
44483 + .match_table = ep8248e_mdio_match,
44484 + .probe = ep8248e_mdio_probe,
44485 + .remove = ep8248e_mdio_remove,
44489 + int port, pin, flags;
44492 +static __initdata struct cpm_pin ep8248e_pins[] = {
44494 + {2, 4, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44495 + {2, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44498 + {2, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44499 + {2, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44500 + {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44501 + {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
44502 + {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44505 + {0, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44506 + {0, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44507 + {0, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44508 + {0, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44509 + {0, 18, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44510 + {0, 19, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44511 + {0, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44512 + {0, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44513 + {0, 26, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44514 + {0, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44515 + {0, 28, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
44516 + {0, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
44517 + {0, 30, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44518 + {0, 31, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44519 + {2, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44520 + {2, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44523 + {1, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44524 + {1, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44525 + {1, 20, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44526 + {1, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44527 + {1, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44528 + {1, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44529 + {1, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44530 + {1, 25, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44531 + {1, 26, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44532 + {1, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44533 + {1, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44534 + {1, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
44535 + {1, 30, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44536 + {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44537 + {2, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44538 + {2, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44541 + {4, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44542 + {4, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44545 + {2, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44546 + {2, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44547 + {2, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44548 + {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44549 + {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44550 + {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44551 + {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44554 +static void __init init_ioports(void)
44558 + for (i = 0; i < ARRAY_SIZE(ep8248e_pins); i++) {
44559 + const struct cpm_pin *pin = &ep8248e_pins[i];
44560 + cpm2_set_pin(pin->port, pin->pin, pin->flags);
44563 + cpm2_smc_clk_setup(CPM_CLK_SMC1, CPM_BRG7);
44564 + cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX);
44565 + cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX);
44566 + cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_TX); /* USB */
44567 + cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK11, CPM_CLK_RX);
44568 + cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_TX);
44569 + cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX);
44570 + cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX);
44573 +static void __init ep8248e_setup_arch(void)
44575 + if (ppc_md.progress)
44576 + ppc_md.progress("ep8248e_setup_arch()", 0);
44580 + /* When this is set, snooping CPM DMA from RAM causes
44581 + * machine checks. See erratum SIU18.
44583 + clrbits32(&cpm2_immr->im_siu_conf.siu_82xx.sc_bcr, MPC82XX_BCR_PLDP);
44585 + ep8248e_bcsr_node =
44586 + of_find_compatible_node(NULL, NULL, "fsl,ep8248e-bcsr");
44587 + if (!ep8248e_bcsr_node) {
44588 + printk(KERN_ERR "No bcsr in device tree\n");
44592 + ep8248e_bcsr = of_iomap(ep8248e_bcsr_node, 0);
44593 + if (!ep8248e_bcsr) {
44594 + printk(KERN_ERR "Cannot map BCSR registers\n");
44595 + of_node_put(ep8248e_bcsr_node);
44596 + ep8248e_bcsr_node = NULL;
44600 + setbits8(&ep8248e_bcsr[7], BCSR7_SCC2_ENABLE);
44601 + setbits8(&ep8248e_bcsr[8], BCSR8_PHY1_ENABLE | BCSR8_PHY1_POWER |
44602 + BCSR8_PHY2_ENABLE | BCSR8_PHY2_POWER);
44606 + if (ppc_md.progress)
44607 + ppc_md.progress("ep8248e_setup_arch(), finish", 0);
44610 +static __initdata struct of_device_id of_bus_ids[] = {
44611 + { .compatible = "simple-bus", },
44612 + { .compatible = "fsl,ep8248e-bcsr", },
44616 +static int __init declare_of_platform_devices(void)
44618 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
44619 + of_register_platform_driver(&ep8248e_mdio_driver);
44623 +machine_device_initcall(ep8248e, declare_of_platform_devices);
44626 + * Called very early, device-tree isn't unflattened
44628 +static int __init ep8248e_probe(void)
44630 + unsigned long root = of_get_flat_dt_root();
44631 + return of_flat_dt_is_compatible(root, "fsl,ep8248e");
44634 +define_machine(ep8248e)
44636 + .name = "Embedded Planet EP8248E",
44637 + .probe = ep8248e_probe,
44638 + .setup_arch = ep8248e_setup_arch,
44639 + .init_IRQ = ep8248e_pic_init,
44640 + .get_irq = cpm2_get_irq,
44641 + .calibrate_decr = generic_calibrate_decr,
44642 + .restart = pq2_restart,
44643 + .progress = udbg_progress,
44645 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/82xx/pq2.c powerpc.git/arch/powerpc/platforms/82xx/pq2.c
44646 --- linux-2.6.24/arch/powerpc/platforms/82xx/pq2.c 2008-01-24 23:58:37.000000000 +0100
44647 +++ powerpc.git/arch/powerpc/platforms/82xx/pq2.c 2008-01-28 20:25:49.000000000 +0100
44648 @@ -53,13 +53,13 @@
44649 if (of_address_to_resource(np, 0, &r) || r.end - r.start < 0x10b)
44652 - pci_assign_all_buses = 1;
44653 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
44655 hose = pcibios_alloc_controller(np);
44659 - hose->arch_data = np;
44662 setup_indirect_pci(hose, r.start + 0x100, r.start + 0x104, 0);
44663 pci_process_bridge_OF_ranges(hose, np, 1);
44664 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/82xx/pq2fads.c powerpc.git/arch/powerpc/platforms/82xx/pq2fads.c
44665 --- linux-2.6.24/arch/powerpc/platforms/82xx/pq2fads.c 2008-01-24 23:58:37.000000000 +0100
44666 +++ powerpc.git/arch/powerpc/platforms/82xx/pq2fads.c 2008-01-28 20:25:49.000000000 +0100
44667 @@ -15,12 +15,12 @@
44668 #include <linux/init.h>
44669 #include <linux/interrupt.h>
44670 #include <linux/fsl_devices.h>
44671 +#include <linux/of_platform.h>
44673 #include <asm/io.h>
44674 #include <asm/cpm2.h>
44675 #include <asm/udbg.h>
44676 #include <asm/machdep.h>
44677 -#include <asm/of_platform.h>
44678 #include <asm/time.h>
44680 #include <sysdev/fsl_soc.h>
44681 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/Kconfig powerpc.git/arch/powerpc/platforms/83xx/Kconfig
44682 --- linux-2.6.24/arch/powerpc/platforms/83xx/Kconfig 2008-01-24 23:58:37.000000000 +0100
44683 +++ powerpc.git/arch/powerpc/platforms/83xx/Kconfig 2008-01-28 20:25:49.000000000 +0100
44686 This option enables support for the MPC836x MDS Processor Board.
44688 +config MPC837x_MDS
44689 + bool "Freescale MPC837x MDS"
44690 + select DEFAULT_UIMAGE
44692 + This option enables support for the MPC837x MDS Processor Board.
44697 select PPC_UDBG_16550
44698 select PPC_INDIRECT_PCI
44699 default y if MPC836x_MDS
44701 +config PPC_MPC837x
44703 + select PPC_UDBG_16550
44704 + select PPC_INDIRECT_PCI
44705 + default y if MPC837x_MDS
44706 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/Makefile powerpc.git/arch/powerpc/platforms/83xx/Makefile
44707 --- linux-2.6.24/arch/powerpc/platforms/83xx/Makefile 2008-01-24 23:58:37.000000000 +0100
44708 +++ powerpc.git/arch/powerpc/platforms/83xx/Makefile 2008-01-28 20:25:49.000000000 +0100
44710 obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o
44711 obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o
44712 obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o
44713 +obj-$(CONFIG_MPC837x_MDS) += mpc837x_mds.o
44714 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/mpc8313_rdb.c powerpc.git/arch/powerpc/platforms/83xx/mpc8313_rdb.c
44715 --- linux-2.6.24/arch/powerpc/platforms/83xx/mpc8313_rdb.c 2008-01-24 23:58:37.000000000 +0100
44716 +++ powerpc.git/arch/powerpc/platforms/83xx/mpc8313_rdb.c 2008-01-28 20:25:49.000000000 +0100
44720 #include <linux/pci.h>
44721 +#include <linux/of_platform.h>
44723 #include <asm/time.h>
44724 #include <asm/ipic.h>
44725 @@ -70,11 +71,23 @@
44727 static int __init mpc8313_rdb_probe(void)
44729 - unsigned long root = of_get_flat_dt_root();
44730 + unsigned long root = of_get_flat_dt_root();
44732 - return of_flat_dt_is_compatible(root, "MPC8313ERDB");
44733 + return of_flat_dt_is_compatible(root, "MPC8313ERDB");
44736 +static struct of_device_id __initdata of_bus_ids[] = {
44737 + { .compatible = "simple-bus" },
44741 +static int __init declare_of_platform_devices(void)
44743 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
44746 +machine_device_initcall(mpc8313_rdb, declare_of_platform_devices);
44748 define_machine(mpc8313_rdb) {
44749 .name = "MPC8313 RDB",
44750 .probe = mpc8313_rdb_probe,
44751 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/mpc832x_mds.c powerpc.git/arch/powerpc/platforms/83xx/mpc832x_mds.c
44752 --- linux-2.6.24/arch/powerpc/platforms/83xx/mpc832x_mds.c 2008-01-24 23:58:37.000000000 +0100
44753 +++ powerpc.git/arch/powerpc/platforms/83xx/mpc832x_mds.c 2008-01-28 20:25:49.000000000 +0100
44755 #include <linux/seq_file.h>
44756 #include <linux/root_dev.h>
44757 #include <linux/initrd.h>
44758 +#include <linux/of_platform.h>
44759 +#include <linux/of_device.h>
44761 -#include <asm/of_device.h>
44762 -#include <asm/of_platform.h>
44763 #include <asm/system.h>
44764 #include <asm/atomic.h>
44765 #include <asm/time.h>
44766 @@ -110,15 +110,12 @@
44768 static int __init mpc832x_declare_of_platform_devices(void)
44770 - if (!machine_is(mpc832x_mds))
44773 /* Publish the QE devices */
44774 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
44778 -device_initcall(mpc832x_declare_of_platform_devices);
44779 +machine_device_initcall(mpc832x_mds, mpc832x_declare_of_platform_devices);
44781 static void __init mpc832x_sys_init_IRQ(void)
44783 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/mpc832x_rdb.c powerpc.git/arch/powerpc/platforms/83xx/mpc832x_rdb.c
44784 --- linux-2.6.24/arch/powerpc/platforms/83xx/mpc832x_rdb.c 2008-01-24 23:58:37.000000000 +0100
44785 +++ powerpc.git/arch/powerpc/platforms/83xx/mpc832x_rdb.c 2008-01-28 20:25:49.000000000 +0100
44787 #include <linux/spi/spi.h>
44788 #include <linux/spi/mmc_spi.h>
44789 #include <linux/mmc/host.h>
44790 +#include <linux/of_platform.h>
44792 -#include <asm/of_platform.h>
44793 #include <asm/time.h>
44794 #include <asm/ipic.h>
44795 #include <asm/udbg.h>
44798 static int __init mpc832x_spi_init(void)
44800 - if (!machine_is(mpc832x_rdb))
44803 par_io_config_pin(3, 0, 3, 0, 1, 0); /* SPI1 MOSI, I/O */
44804 par_io_config_pin(3, 1, 3, 0, 1, 0); /* SPI1 MISO, I/O */
44805 par_io_config_pin(3, 2, 3, 0, 1, 0); /* SPI1 CLK, I/O */
44807 mpc83xx_spi_deactivate_cs);
44810 -device_initcall(mpc832x_spi_init);
44811 +machine_device_initcall(mpc832x_rdb, mpc832x_spi_init);
44813 /* ************************************************************************
44815 @@ -123,15 +120,12 @@
44817 static int __init mpc832x_declare_of_platform_devices(void)
44819 - if (!machine_is(mpc832x_rdb))
44822 /* Publish the QE devices */
44823 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
44827 -device_initcall(mpc832x_declare_of_platform_devices);
44828 +machine_device_initcall(mpc832x_rdb, mpc832x_declare_of_platform_devices);
44830 void __init mpc832x_rdb_init_IRQ(void)
44832 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/mpc834x_itx.c powerpc.git/arch/powerpc/platforms/83xx/mpc834x_itx.c
44833 --- linux-2.6.24/arch/powerpc/platforms/83xx/mpc834x_itx.c 2008-01-24 23:58:37.000000000 +0100
44834 +++ powerpc.git/arch/powerpc/platforms/83xx/mpc834x_itx.c 2008-01-28 20:25:49.000000000 +0100
44836 #include <linux/delay.h>
44837 #include <linux/seq_file.h>
44838 #include <linux/root_dev.h>
44839 +#include <linux/of_platform.h>
44841 #include <asm/system.h>
44842 #include <asm/atomic.h>
44845 #include "mpc83xx.h"
44847 +static struct of_device_id __initdata mpc834x_itx_ids[] = {
44848 + { .compatible = "fsl,pq2pro-localbus", },
44852 +static int __init mpc834x_itx_declare_of_platform_devices(void)
44854 + return of_platform_bus_probe(NULL, mpc834x_itx_ids, NULL);
44856 +machine_device_initcall(mpc834x_itx, mpc834x_itx_declare_of_platform_devices);
44858 /* ************************************************************************
44860 * Setup the architecture
44861 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/mpc834x_mds.c powerpc.git/arch/powerpc/platforms/83xx/mpc834x_mds.c
44862 --- linux-2.6.24/arch/powerpc/platforms/83xx/mpc834x_mds.c 2008-01-24 23:58:37.000000000 +0100
44863 +++ powerpc.git/arch/powerpc/platforms/83xx/mpc834x_mds.c 2008-01-28 20:25:49.000000000 +0100
44865 #include <linux/delay.h>
44866 #include <linux/seq_file.h>
44867 #include <linux/root_dev.h>
44868 +#include <linux/of_platform.h>
44870 #include <asm/system.h>
44871 #include <asm/atomic.h>
44872 @@ -106,14 +107,27 @@
44873 ipic_set_default_priority();
44876 +static struct of_device_id mpc834x_ids[] = {
44877 + { .type = "soc", },
44878 + { .compatible = "soc", },
44882 +static int __init mpc834x_declare_of_platform_devices(void)
44884 + of_platform_bus_probe(NULL, mpc834x_ids, NULL);
44887 +machine_device_initcall(mpc834x_mds, mpc834x_declare_of_platform_devices);
44890 * Called very early, MMU is off, device-tree isn't unflattened
44892 static int __init mpc834x_mds_probe(void)
44894 - unsigned long root = of_get_flat_dt_root();
44895 + unsigned long root = of_get_flat_dt_root();
44897 - return of_flat_dt_is_compatible(root, "MPC834xMDS");
44898 + return of_flat_dt_is_compatible(root, "MPC834xMDS");
44901 define_machine(mpc834x_mds) {
44902 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/mpc836x_mds.c powerpc.git/arch/powerpc/platforms/83xx/mpc836x_mds.c
44903 --- linux-2.6.24/arch/powerpc/platforms/83xx/mpc836x_mds.c 2008-01-24 23:58:37.000000000 +0100
44904 +++ powerpc.git/arch/powerpc/platforms/83xx/mpc836x_mds.c 2008-01-28 20:25:49.000000000 +0100
44906 #include <linux/seq_file.h>
44907 #include <linux/root_dev.h>
44908 #include <linux/initrd.h>
44909 +#include <linux/of_platform.h>
44910 +#include <linux/of_device.h>
44912 -#include <asm/of_device.h>
44913 -#include <asm/of_platform.h>
44914 #include <asm/system.h>
44915 #include <asm/atomic.h>
44916 #include <asm/time.h>
44917 @@ -141,15 +141,12 @@
44919 static int __init mpc836x_declare_of_platform_devices(void)
44921 - if (!machine_is(mpc836x_mds))
44924 /* Publish the QE devices */
44925 of_platform_bus_probe(NULL, mpc836x_ids, NULL);
44929 -device_initcall(mpc836x_declare_of_platform_devices);
44930 +machine_device_initcall(mpc836x_mds, mpc836x_declare_of_platform_devices);
44932 static void __init mpc836x_mds_init_IRQ(void)
44934 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/mpc837x_mds.c powerpc.git/arch/powerpc/platforms/83xx/mpc837x_mds.c
44935 --- linux-2.6.24/arch/powerpc/platforms/83xx/mpc837x_mds.c 1970-01-01 01:00:00.000000000 +0100
44936 +++ powerpc.git/arch/powerpc/platforms/83xx/mpc837x_mds.c 2008-01-28 20:25:49.000000000 +0100
44939 + * arch/powerpc/platforms/83xx/mpc837x_mds.c
44941 + * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
44943 + * MPC837x MDS board specific routines
44945 + * This program is free software; you can redistribute it and/or modify it
44946 + * under the terms of the GNU General Public License as published by the
44947 + * Free Software Foundation; either version 2 of the License, or (at your
44948 + * option) any later version.
44951 +#include <linux/pci.h>
44952 +#include <linux/of.h>
44953 +#include <linux/of_platform.h>
44955 +#include <asm/time.h>
44956 +#include <asm/ipic.h>
44957 +#include <asm/udbg.h>
44958 +#include <asm/prom.h>
44960 +#include "mpc83xx.h"
44962 +#define BCSR12_USB_SER_MASK 0x8a
44963 +#define BCSR12_USB_SER_PIN 0x80
44964 +#define BCSR12_USB_SER_DEVICE 0x02
44965 +extern int mpc837x_usb_cfg(void);
44967 +static int mpc837xmds_usb_cfg(void)
44969 + struct device_node *np;
44970 + const void *phy_type, *mode;
44971 + void __iomem *bcsr_regs = NULL;
44975 + ret = mpc837x_usb_cfg();
44978 + /* Map BCSR area */
44979 + np = of_find_node_by_name(NULL, "bcsr");
44981 + struct resource res;
44983 + of_address_to_resource(np, 0, &res);
44984 + bcsr_regs = ioremap(res.start, res.end - res.start + 1);
44990 + np = of_find_node_by_name(NULL, "usb");
44993 + phy_type = of_get_property(np, "phy_type", NULL);
44994 + if (phy_type && !strcmp(phy_type, "ulpi")) {
44995 + clrbits8(bcsr_regs + 12, BCSR12_USB_SER_PIN);
44996 + } else if (phy_type && !strcmp(phy_type, "serial")) {
44997 + mode = of_get_property(np, "dr_mode", NULL);
44998 + bcsr12 = in_8(bcsr_regs + 12) & ~BCSR12_USB_SER_MASK;
44999 + bcsr12 |= BCSR12_USB_SER_PIN;
45000 + if (mode && !strcmp(mode, "peripheral"))
45001 + bcsr12 |= BCSR12_USB_SER_DEVICE;
45002 + out_8(bcsr_regs + 12, bcsr12);
45004 + printk(KERN_ERR "USB DR: unsupported PHY\n");
45008 + iounmap(bcsr_regs);
45012 +/* ************************************************************************
45014 + * Setup the architecture
45017 +static void __init mpc837x_mds_setup_arch(void)
45020 + struct device_node *np;
45023 + if (ppc_md.progress)
45024 + ppc_md.progress("mpc837x_mds_setup_arch()", 0);
45027 + for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
45028 + mpc83xx_add_bridge(np);
45030 + mpc837xmds_usb_cfg();
45033 +static struct of_device_id mpc837x_ids[] = {
45034 + { .type = "soc", },
45035 + { .compatible = "soc", },
45039 +static int __init mpc837x_declare_of_platform_devices(void)
45041 + /* Publish of_device */
45042 + of_platform_bus_probe(NULL, mpc837x_ids, NULL);
45046 +machine_device_initcall(mpc837x_mds, mpc837x_declare_of_platform_devices);
45048 +static void __init mpc837x_mds_init_IRQ(void)
45050 + struct device_node *np;
45052 + np = of_find_compatible_node(NULL, NULL, "fsl,ipic");
45056 + ipic_init(np, 0);
45058 + /* Initialize the default interrupt mapping priorities,
45059 + * in case the boot rom changed something on us.
45061 + ipic_set_default_priority();
45065 + * Called very early, MMU is off, device-tree isn't unflattened
45067 +static int __init mpc837x_mds_probe(void)
45069 + unsigned long root = of_get_flat_dt_root();
45071 + return of_flat_dt_is_compatible(root, "fsl,mpc837xmds");
45074 +define_machine(mpc837x_mds) {
45075 + .name = "MPC837x MDS",
45076 + .probe = mpc837x_mds_probe,
45077 + .setup_arch = mpc837x_mds_setup_arch,
45078 + .init_IRQ = mpc837x_mds_init_IRQ,
45079 + .get_irq = ipic_get_irq,
45080 + .restart = mpc83xx_restart,
45081 + .time_init = mpc83xx_time_init,
45082 + .calibrate_decr = generic_calibrate_decr,
45083 + .progress = udbg_progress,
45085 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/mpc83xx.h powerpc.git/arch/powerpc/platforms/83xx/mpc83xx.h
45086 --- linux-2.6.24/arch/powerpc/platforms/83xx/mpc83xx.h 2008-01-24 23:58:37.000000000 +0100
45087 +++ powerpc.git/arch/powerpc/platforms/83xx/mpc83xx.h 2008-01-28 20:25:49.000000000 +0100
45089 #define MPC83XX_SCCR_USB_DRCM_11 0x00300000
45090 #define MPC83XX_SCCR_USB_DRCM_01 0x00100000
45091 #define MPC83XX_SCCR_USB_DRCM_10 0x00200000
45092 +#define MPC837X_SCCR_USB_DRCM_11 0x00c00000
45094 /* system i/o configuration register low */
45095 #define MPC83XX_SICRL_OFFS 0x114
45097 #define MPC834X_SICRL_USB1 0x20000000
45098 #define MPC831X_SICRL_USB_MASK 0x00000c00
45099 #define MPC831X_SICRL_USB_ULPI 0x00000800
45100 +#define MPC837X_SICRL_USB_MASK 0xf0000000
45101 +#define MPC837X_SICRL_USB_ULPI 0x50000000
45103 /* system i/o configuration register high */
45104 #define MPC83XX_SICRH_OFFS 0x118
45105 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/pci.c powerpc.git/arch/powerpc/platforms/83xx/pci.c
45106 --- linux-2.6.24/arch/powerpc/platforms/83xx/pci.c 2008-01-24 23:58:37.000000000 +0100
45107 +++ powerpc.git/arch/powerpc/platforms/83xx/pci.c 2008-01-28 20:25:49.000000000 +0100
45109 " bus 0\n", dev->full_name);
45112 - pci_assign_all_buses = 1;
45113 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
45114 hose = pcibios_alloc_controller(dev);
45117 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/83xx/usb.c powerpc.git/arch/powerpc/platforms/83xx/usb.c
45118 --- linux-2.6.24/arch/powerpc/platforms/83xx/usb.c 2008-01-24 23:58:37.000000000 +0100
45119 +++ powerpc.git/arch/powerpc/platforms/83xx/usb.c 2008-01-28 20:25:49.000000000 +0100
45121 sicrl = in_be32(immap + MPC83XX_SICRL_OFFS) & ~MPC834X_SICRL_USB_MASK;
45122 sicrh = in_be32(immap + MPC83XX_SICRH_OFFS) & ~MPC834X_SICRH_USB_UTMI;
45124 - np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
45125 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
45127 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
45133 - np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph");
45134 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-mph");
45136 sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
45138 @@ -111,7 +111,7 @@
45139 const void *dr_mode;
45142 - np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
45143 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
45146 prop = of_get_property(np, "phy_type", NULL);
45147 @@ -179,3 +179,43 @@
45150 #endif /* CONFIG_PPC_MPC831x */
45152 +#ifdef CONFIG_PPC_MPC837x
45153 +int mpc837x_usb_cfg(void)
45155 + void __iomem *immap;
45156 + struct device_node *np = NULL;
45157 + const void *prop;
45160 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
45163 + prop = of_get_property(np, "phy_type", NULL);
45165 + if (!prop || (strcmp(prop, "ulpi") && strcmp(prop, "serial"))) {
45166 + printk(KERN_WARNING "837x USB PHY type not supported\n");
45171 + /* Map IMMR space for pin and clock settings */
45172 + immap = ioremap(get_immrbase(), 0x1000);
45178 + /* Configure clock */
45179 + clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, MPC837X_SCCR_USB_DRCM_11,
45180 + MPC837X_SCCR_USB_DRCM_11);
45182 + /* Configure pin mux for ULPI/serial */
45183 + clrsetbits_be32(immap + MPC83XX_SICRL_OFFS, MPC837X_SICRL_USB_MASK,
45184 + MPC837X_SICRL_USB_ULPI);
45190 +#endif /* CONFIG_PPC_MPC837x */
45191 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/85xx/mpc85xx_ads.c powerpc.git/arch/powerpc/platforms/85xx/mpc85xx_ads.c
45192 --- linux-2.6.24/arch/powerpc/platforms/85xx/mpc85xx_ads.c 2008-01-24 23:58:37.000000000 +0100
45193 +++ powerpc.git/arch/powerpc/platforms/85xx/mpc85xx_ads.c 2008-01-28 20:25:49.000000000 +0100
45198 - while ((cascade_irq = cpm2_get_irq()) >= 0) {
45199 + while ((cascade_irq = cpm2_get_irq()) >= 0)
45200 generic_handle_irq(cascade_irq);
45203 desc->chip->eoi(irq);
45206 @@ -70,13 +70,12 @@
45209 np = of_find_node_by_type(np, "open-pic");
45211 - if (np == NULL) {
45213 printk(KERN_ERR "Could not find open-pic node\n");
45217 - if(of_address_to_resource(np, 0, &r)) {
45218 + if (of_address_to_resource(np, 0, &r)) {
45219 printk(KERN_ERR "Could not map mpic register space\n");
45223 irq = irq_of_parse_and_map(np, 0);
45227 set_irq_chained_handler(irq, cpm2_cascade);
45230 @@ -112,7 +112,7 @@
45231 int port, pin, flags;
45234 -static struct cpm_pin mpc8560_ads_pins[] = {
45235 +static const struct cpm_pin mpc8560_ads_pins[] = {
45237 {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
45238 {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45239 @@ -233,13 +233,11 @@
45241 static int __init declare_of_platform_devices(void)
45243 - if (!machine_is(mpc85xx_ads))
45246 of_platform_bus_probe(NULL, of_bus_ids, NULL);
45250 -device_initcall(declare_of_platform_devices);
45251 +machine_device_initcall(mpc85xx_ads, declare_of_platform_devices);
45254 * Called very early, device-tree isn't unflattened
45255 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/85xx/mpc85xx_cds.c powerpc.git/arch/powerpc/platforms/85xx/mpc85xx_cds.c
45256 --- linux-2.6.24/arch/powerpc/platforms/85xx/mpc85xx_cds.c 2008-01-24 23:58:37.000000000 +0100
45257 +++ powerpc.git/arch/powerpc/platforms/85xx/mpc85xx_cds.c 2008-01-28 20:25:49.000000000 +0100
45258 @@ -222,9 +222,6 @@
45259 struct device_node *cascade_node = NULL;
45262 - if (!machine_is(mpc85xx_cds))
45265 /* Initialize the i8259 controller */
45266 for_each_node_by_type(np, "interrupt-controller")
45267 if (of_device_is_compatible(np, "chrp,iic")) {
45268 @@ -262,8 +259,7 @@
45273 -device_initcall(mpc85xx_cds_8259_attach);
45274 +machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
45276 #endif /* CONFIG_PPC_I8259 */
45278 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/85xx/mpc85xx_ds.c powerpc.git/arch/powerpc/platforms/85xx/mpc85xx_ds.c
45279 --- linux-2.6.24/arch/powerpc/platforms/85xx/mpc85xx_ds.c 2008-01-24 23:58:37.000000000 +0100
45280 +++ powerpc.git/arch/powerpc/platforms/85xx/mpc85xx_ds.c 2008-01-28 20:25:49.000000000 +0100
45281 @@ -123,7 +123,7 @@
45282 struct device_node* node;
45283 struct resource rsrc;
45285 - node = (struct device_node *)hose->arch_data;
45287 of_address_to_resource(node, 0, &rsrc);
45289 if ((rsrc.start & 0xfffff) == primary_phb_addr) {
45290 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/85xx/mpc85xx_mds.c powerpc.git/arch/powerpc/platforms/85xx/mpc85xx_mds.c
45291 --- linux-2.6.24/arch/powerpc/platforms/85xx/mpc85xx_mds.c 2008-01-24 23:58:37.000000000 +0100
45292 +++ powerpc.git/arch/powerpc/platforms/85xx/mpc85xx_mds.c 2008-01-28 20:25:49.000000000 +0100
45294 #include <linux/initrd.h>
45295 #include <linux/module.h>
45296 #include <linux/fsl_devices.h>
45297 +#include <linux/of_platform.h>
45298 +#include <linux/of_device.h>
45300 -#include <asm/of_device.h>
45301 -#include <asm/of_platform.h>
45302 #include <asm/system.h>
45303 #include <asm/atomic.h>
45304 #include <asm/time.h>
45305 @@ -144,15 +144,12 @@
45307 static int __init mpc85xx_publish_devices(void)
45309 - if (!machine_is(mpc85xx_mds))
45312 /* Publish the QE devices */
45313 - of_platform_bus_probe(NULL,mpc85xx_ids,NULL);
45314 + of_platform_bus_probe(NULL, mpc85xx_ids, NULL);
45318 -device_initcall(mpc85xx_publish_devices);
45319 +machine_device_initcall(mpc85xx_mds, mpc85xx_publish_devices);
45321 static void __init mpc85xx_mds_pic_init(void)
45323 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/86xx/mpc8610_hpcd.c powerpc.git/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
45324 --- linux-2.6.24/arch/powerpc/platforms/86xx/mpc8610_hpcd.c 2008-01-24 23:58:37.000000000 +0100
45325 +++ powerpc.git/arch/powerpc/platforms/86xx/mpc8610_hpcd.c 2008-01-28 20:25:49.000000000 +0100
45328 #include <asm/mpic.h>
45330 +#include <linux/of_platform.h>
45331 #include <sysdev/fsl_pci.h>
45332 #include <sysdev/fsl_soc.h>
45334 +static struct of_device_id __initdata mpc8610_ids[] = {
45335 + { .compatible = "fsl,mpc8610-immr", },
45339 +static int __init mpc8610_declare_of_platform_devices(void)
45341 + /* Without this call, the SSI device driver won't get probed. */
45342 + of_platform_bus_probe(NULL, mpc8610_ids, NULL);
45346 +machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices);
45349 mpc86xx_hpcd_init_irq(void)
45351 @@ -124,7 +139,7 @@
45352 static void __devinit final_uli5288(struct pci_dev *dev)
45354 struct pci_controller *hose = pci_bus_to_host(dev->bus);
45355 - struct device_node *hosenode = hose ? hose->arch_data : NULL;
45356 + struct device_node *hosenode = hose ? hose->dn : NULL;
45357 struct of_irq oirq;
45360 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c powerpc.git/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
45361 --- linux-2.6.24/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c 2008-01-24 23:58:37.000000000 +0100
45362 +++ powerpc.git/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c 2008-01-28 20:25:49.000000000 +0100
45364 #include <linux/kdev_t.h>
45365 #include <linux/delay.h>
45366 #include <linux/seq_file.h>
45367 +#include <linux/of_platform.h>
45369 #include <asm/system.h>
45370 #include <asm/time.h>
45371 @@ -116,7 +117,7 @@
45372 struct device_node* node;
45373 struct resource rsrc;
45375 - node = (struct device_node *)hose->arch_data;
45377 of_address_to_resource(node, 0, &rsrc);
45379 if ((rsrc.start & 0xfffff) == 0x8000) {
45380 @@ -212,6 +213,19 @@
45384 +static __initdata struct of_device_id of_bus_ids[] = {
45385 + { .compatible = "simple-bus", },
45389 +static int __init declare_of_platform_devices(void)
45391 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45395 +machine_device_initcall(mpc86xx_hpcn, declare_of_platform_devices);
45397 define_machine(mpc86xx_hpcn) {
45398 .name = "MPC86xx HPCN",
45399 .probe = mpc86xx_hpcn_probe,
45400 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/8xx/Kconfig powerpc.git/arch/powerpc/platforms/8xx/Kconfig
45401 --- linux-2.6.24/arch/powerpc/platforms/8xx/Kconfig 2008-01-24 23:58:37.000000000 +0100
45402 +++ powerpc.git/arch/powerpc/platforms/8xx/Kconfig 2008-01-28 20:25:49.000000000 +0100
45407 + select PPC_CPM_NEW_BINDING
45409 MPC86x Application Development System by Freescale Semiconductor.
45410 The MPC86xADS is meant to serve as a platform for s/w and h/w
45412 This board is also resold by Freescale as the QUICCStart
45413 MPC885 Evaluation System and/or the CWH-PPC-885XN-VE.
45415 +config PPC_ADDER875
45416 + bool "Analogue & Micro Adder 875"
45418 + select PPC_CPM_NEW_BINDING
45421 + This enables support for the Analogue & Micro Adder 875
45426 menu "Freescale Ethernet driver platform-specific options"
45427 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/8xx/Makefile powerpc.git/arch/powerpc/platforms/8xx/Makefile
45428 --- linux-2.6.24/arch/powerpc/platforms/8xx/Makefile 2008-01-24 23:58:37.000000000 +0100
45429 +++ powerpc.git/arch/powerpc/platforms/8xx/Makefile 2008-01-28 20:25:49.000000000 +0100
45431 obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o
45432 obj-$(CONFIG_MPC86XADS) += mpc86xads_setup.o
45433 obj-$(CONFIG_PPC_EP88XC) += ep88xc.o
45434 +obj-$(CONFIG_PPC_ADDER875) += adder875.o
45435 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/8xx/adder875.c powerpc.git/arch/powerpc/platforms/8xx/adder875.c
45436 --- linux-2.6.24/arch/powerpc/platforms/8xx/adder875.c 1970-01-01 01:00:00.000000000 +0100
45437 +++ powerpc.git/arch/powerpc/platforms/8xx/adder875.c 2008-01-28 20:25:49.000000000 +0100
45439 +/* Analogue & Micro Adder MPC875 board support
45441 + * Author: Scott Wood <scottwood@freescale.com>
45443 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
45445 + * This program is free software; you can redistribute it and/or modify
45446 + * it under the terms of the GNU General Public License, version 2, as
45447 + * published by the Free Software Foundation.
45450 +#include <linux/init.h>
45451 +#include <linux/fs_enet_pd.h>
45452 +#include <linux/of_platform.h>
45454 +#include <asm/time.h>
45455 +#include <asm/machdep.h>
45456 +#include <asm/commproc.h>
45457 +#include <asm/fs_pd.h>
45458 +#include <asm/udbg.h>
45459 +#include <asm/prom.h>
45461 +#include <sysdev/commproc.h>
45464 + int port, pin, flags;
45467 +static __initdata struct cpm_pin adder875_pins[] = {
45469 + {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */
45470 + {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
45473 + {CPM_PORTA, 0, CPM_PIN_INPUT},
45474 + {CPM_PORTA, 1, CPM_PIN_INPUT},
45475 + {CPM_PORTA, 2, CPM_PIN_INPUT},
45476 + {CPM_PORTA, 3, CPM_PIN_INPUT},
45477 + {CPM_PORTA, 4, CPM_PIN_OUTPUT},
45478 + {CPM_PORTA, 10, CPM_PIN_OUTPUT},
45479 + {CPM_PORTA, 11, CPM_PIN_OUTPUT},
45480 + {CPM_PORTB, 19, CPM_PIN_INPUT},
45481 + {CPM_PORTB, 31, CPM_PIN_INPUT},
45482 + {CPM_PORTC, 12, CPM_PIN_INPUT},
45483 + {CPM_PORTC, 13, CPM_PIN_INPUT},
45484 + {CPM_PORTE, 30, CPM_PIN_OUTPUT},
45485 + {CPM_PORTE, 31, CPM_PIN_OUTPUT},
45488 + {CPM_PORTE, 14, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45489 + {CPM_PORTE, 15, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45490 + {CPM_PORTE, 16, CPM_PIN_OUTPUT},
45491 + {CPM_PORTE, 17, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45492 + {CPM_PORTE, 18, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45493 + {CPM_PORTE, 19, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45494 + {CPM_PORTE, 20, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45495 + {CPM_PORTE, 21, CPM_PIN_OUTPUT},
45496 + {CPM_PORTE, 22, CPM_PIN_OUTPUT},
45497 + {CPM_PORTE, 23, CPM_PIN_OUTPUT},
45498 + {CPM_PORTE, 24, CPM_PIN_OUTPUT},
45499 + {CPM_PORTE, 25, CPM_PIN_OUTPUT},
45500 + {CPM_PORTE, 26, CPM_PIN_OUTPUT},
45501 + {CPM_PORTE, 27, CPM_PIN_OUTPUT},
45502 + {CPM_PORTE, 28, CPM_PIN_OUTPUT},
45503 + {CPM_PORTE, 29, CPM_PIN_OUTPUT},
45506 +static void __init init_ioports(void)
45510 + for (i = 0; i < ARRAY_SIZE(adder875_pins); i++) {
45511 + const struct cpm_pin *pin = &adder875_pins[i];
45512 + cpm1_set_pin(pin->port, pin->pin, pin->flags);
45515 + cpm1_clk_setup(CPM_CLK_SMC1, CPM_BRG1, CPM_CLK_RTX);
45517 + /* Set FEC1 and FEC2 to MII mode */
45518 + clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180);
45521 +static void __init adder875_setup(void)
45527 +static int __init adder875_probe(void)
45529 + unsigned long root = of_get_flat_dt_root();
45530 + return of_flat_dt_is_compatible(root, "analogue-and-micro,adder875");
45533 +static __initdata struct of_device_id of_bus_ids[] = {
45534 + { .compatible = "simple-bus", },
45538 +static int __init declare_of_platform_devices(void)
45540 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45543 +machine_device_initcall(adder875, declare_of_platform_devices);
45545 +define_machine(adder875) {
45546 + .name = "Adder MPC875",
45547 + .probe = adder875_probe,
45548 + .setup_arch = adder875_setup,
45549 + .init_IRQ = m8xx_pic_init,
45550 + .get_irq = mpc8xx_get_irq,
45551 + .restart = mpc8xx_restart,
45552 + .calibrate_decr = generic_calibrate_decr,
45553 + .set_rtc_time = mpc8xx_set_rtc_time,
45554 + .get_rtc_time = mpc8xx_get_rtc_time,
45555 + .progress = udbg_progress,
45557 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/8xx/ep88xc.c powerpc.git/arch/powerpc/platforms/8xx/ep88xc.c
45558 --- linux-2.6.24/arch/powerpc/platforms/8xx/ep88xc.c 2008-01-24 23:58:37.000000000 +0100
45559 +++ powerpc.git/arch/powerpc/platforms/8xx/ep88xc.c 2008-01-28 20:25:49.000000000 +0100
45560 @@ -155,12 +155,11 @@
45561 static int __init declare_of_platform_devices(void)
45563 /* Publish the QE devices */
45564 - if (machine_is(ep88xc))
45565 - of_platform_bus_probe(NULL, of_bus_ids, NULL);
45566 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45570 -device_initcall(declare_of_platform_devices);
45571 +machine_device_initcall(ep88xc, declare_of_platform_devices);
45573 define_machine(ep88xc) {
45574 .name = "Embedded Planet EP88xC",
45575 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/8xx/m8xx_setup.c powerpc.git/arch/powerpc/platforms/8xx/m8xx_setup.c
45576 --- linux-2.6.24/arch/powerpc/platforms/8xx/m8xx_setup.c 2008-01-24 23:58:37.000000000 +0100
45577 +++ powerpc.git/arch/powerpc/platforms/8xx/m8xx_setup.c 2008-01-28 20:25:49.000000000 +0100
45578 @@ -120,7 +120,7 @@
45580 ppc_proc_freq = 50000000;
45581 if (!get_freq("clock-frequency", &ppc_proc_freq))
45582 - printk(KERN_ERR "WARNING: Estimating processor frequency"
45583 + printk(KERN_ERR "WARNING: Estimating processor frequency "
45586 printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq);
45587 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/8xx/mpc86xads.h powerpc.git/arch/powerpc/platforms/8xx/mpc86xads.h
45588 --- linux-2.6.24/arch/powerpc/platforms/8xx/mpc86xads.h 2008-01-24 23:58:37.000000000 +0100
45589 +++ powerpc.git/arch/powerpc/platforms/8xx/mpc86xads.h 2008-01-28 20:25:49.000000000 +0100
45591 #ifndef __ASM_MPC86XADS_H__
45592 #define __ASM_MPC86XADS_H__
45594 -#include <sysdev/fsl_soc.h>
45596 -/* U-Boot maps BCSR to 0xff080000 */
45597 -#define BCSR_ADDR ((uint)0xff080000)
45598 -#define BCSR_SIZE ((uint)32)
45599 -#define BCSR0 ((uint)(BCSR_ADDR + 0x00))
45600 -#define BCSR1 ((uint)(BCSR_ADDR + 0x04))
45601 -#define BCSR2 ((uint)(BCSR_ADDR + 0x08))
45602 -#define BCSR3 ((uint)(BCSR_ADDR + 0x0c))
45603 -#define BCSR4 ((uint)(BCSR_ADDR + 0x10))
45605 -#define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
45606 -#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
45608 -#define MPC8xx_CPM_OFFSET (0x9c0)
45609 -#define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET)
45610 -#define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver
45612 -#define PCMCIA_MEM_ADDR ((uint)0xff020000)
45613 -#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
45615 /* Bits of interest in the BCSRs.
45617 #define BCSR1_ETHEN ((uint)0x20000000)
45619 #define BCSR5_MII1_EN 0x02
45620 #define BCSR5_MII1_RST 0x01
45622 -/* Interrupt level assignments */
45623 -#define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */
45624 -#define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */
45625 -#define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */
45627 -/* We don't use the 8259 */
45628 -#define NR_8259_INTS 0
45630 -/* CPM Ethernet through SCC1 */
45631 -#define PA_ENET_RXD ((ushort)0x0001)
45632 -#define PA_ENET_TXD ((ushort)0x0002)
45633 -#define PA_ENET_TCLK ((ushort)0x0100)
45634 -#define PA_ENET_RCLK ((ushort)0x0200)
45635 -#define PB_ENET_TENA ((uint)0x00001000)
45636 -#define PC_ENET_CLSN ((ushort)0x0010)
45637 -#define PC_ENET_RENA ((ushort)0x0020)
45639 -/* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to
45640 - * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
45642 -#define SICR_ENET_MASK ((uint)0x000000ff)
45643 -#define SICR_ENET_CLKRT ((uint)0x0000002c)
45645 #endif /* __ASM_MPC86XADS_H__ */
45646 #endif /* __KERNEL__ */
45647 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/8xx/mpc86xads_setup.c powerpc.git/arch/powerpc/platforms/8xx/mpc86xads_setup.c
45648 --- linux-2.6.24/arch/powerpc/platforms/8xx/mpc86xads_setup.c 2008-01-24 23:58:37.000000000 +0100
45649 +++ powerpc.git/arch/powerpc/platforms/8xx/mpc86xads_setup.c 2008-01-28 20:25:49.000000000 +0100
45650 @@ -6,264 +6,133 @@
45652 * Copyright 2005 MontaVista Software Inc.
45654 + * Heavily modified by Scott Wood <scottwood@freescale.com>
45655 + * Copyright 2007 Freescale Semiconductor, Inc.
45657 * This file is licensed under the terms of the GNU General Public License
45658 * version 2. This program is licensed "as is" without any warranty of any
45659 * kind, whether express or implied.
45662 #include <linux/init.h>
45663 -#include <linux/module.h>
45664 -#include <linux/param.h>
45665 -#include <linux/string.h>
45666 -#include <linux/ioport.h>
45667 -#include <linux/device.h>
45668 -#include <linux/delay.h>
45669 -#include <linux/root_dev.h>
45671 -#include <linux/fs_enet_pd.h>
45672 -#include <linux/fs_uart_pd.h>
45673 -#include <linux/mii.h>
45674 +#include <linux/of_platform.h>
45676 -#include <asm/delay.h>
45677 #include <asm/io.h>
45678 #include <asm/machdep.h>
45679 -#include <asm/page.h>
45680 -#include <asm/processor.h>
45681 #include <asm/system.h>
45682 #include <asm/time.h>
45683 #include <asm/mpc8xx.h>
45684 #include <asm/8xx_immap.h>
45685 #include <asm/commproc.h>
45686 #include <asm/fs_pd.h>
45687 -#include <asm/prom.h>
45688 +#include <asm/udbg.h>
45690 #include <sysdev/commproc.h>
45692 -static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi);
45693 -static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi);
45694 -static void init_scc1_ioports(struct fs_platform_info* ptr);
45696 -void __init mpc86xads_board_setup(void)
45699 - unsigned int *bcsr_io;
45702 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
45703 - cp = (cpm8xx_t *)immr_map(im_cpm);
45704 +#include "mpc86xads.h"
45706 - if (bcsr_io == NULL) {
45707 - printk(KERN_CRIT "Could not remap BCSR\n");
45710 -#ifdef CONFIG_SERIAL_CPM_SMC1
45711 - clrbits32(bcsr_io, BCSR1_RS232EN_1);
45712 - clrbits32(&cp->cp_simode, 0xe0000000 >> 17); /* brg1 */
45713 - tmpval8 = in_8(&(cp->cp_smc[0].smc_smcm)) | (SMCM_RX | SMCM_TX);
45714 - out_8(&(cp->cp_smc[0].smc_smcm), tmpval8);
45715 - clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN);
45717 - setbits32(bcsr_io,BCSR1_RS232EN_1);
45718 - out_be16(&cp->cp_smc[0].smc_smcmr, 0);
45719 - out_8(&cp->cp_smc[0].smc_smce, 0);
45722 -#ifdef CONFIG_SERIAL_CPM_SMC2
45723 - clrbits32(bcsr_io,BCSR1_RS232EN_2);
45724 - clrbits32(&cp->cp_simode, 0xe0000000 >> 1);
45725 - setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */
45726 - tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX);
45727 - out_8(&(cp->cp_smc[1].smc_smcm), tmpval8);
45728 - clrbits16(&cp->cp_smc[1].smc_smcmr, SMCMR_REN | SMCMR_TEN);
45730 - init_smc2_uart_ioports(0);
45732 - setbits32(bcsr_io,BCSR1_RS232EN_2);
45733 - out_be16(&cp->cp_smc[1].smc_smcmr, 0);
45734 - out_8(&cp->cp_smc[1].smc_smce, 0);
45737 - iounmap(bcsr_io);
45740 + int port, pin, flags;
45743 +static struct cpm_pin mpc866ads_pins[] = {
45745 + {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */
45746 + {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
45749 + {CPM_PORTB, 21, CPM_PIN_INPUT}, /* RX */
45750 + {CPM_PORTB, 20, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
45753 + {CPM_PORTA, 6, CPM_PIN_INPUT}, /* CLK1 */
45754 + {CPM_PORTA, 7, CPM_PIN_INPUT}, /* CLK2 */
45755 + {CPM_PORTA, 14, CPM_PIN_INPUT}, /* TX */
45756 + {CPM_PORTA, 15, CPM_PIN_INPUT}, /* RX */
45757 + {CPM_PORTB, 19, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TENA */
45758 + {CPM_PORTC, 10, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* RENA */
45759 + {CPM_PORTC, 11, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* CLSN */
45762 + {CPM_PORTD, 3, CPM_PIN_OUTPUT},
45763 + {CPM_PORTD, 4, CPM_PIN_OUTPUT},
45764 + {CPM_PORTD, 5, CPM_PIN_OUTPUT},
45765 + {CPM_PORTD, 6, CPM_PIN_OUTPUT},
45766 + {CPM_PORTD, 7, CPM_PIN_OUTPUT},
45767 + {CPM_PORTD, 8, CPM_PIN_OUTPUT},
45768 + {CPM_PORTD, 9, CPM_PIN_OUTPUT},
45769 + {CPM_PORTD, 10, CPM_PIN_OUTPUT},
45770 + {CPM_PORTD, 11, CPM_PIN_OUTPUT},
45771 + {CPM_PORTD, 12, CPM_PIN_OUTPUT},
45772 + {CPM_PORTD, 13, CPM_PIN_OUTPUT},
45773 + {CPM_PORTD, 14, CPM_PIN_OUTPUT},
45774 + {CPM_PORTD, 15, CPM_PIN_OUTPUT},
45777 -static void init_fec1_ioports(struct fs_platform_info* ptr)
45778 +static void __init init_ioports(void)
45780 - iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport);
45783 - /* configure FEC1 pins */
45784 + for (i = 0; i < ARRAY_SIZE(mpc866ads_pins); i++) {
45785 + struct cpm_pin *pin = &mpc866ads_pins[i];
45786 + cpm1_set_pin(pin->port, pin->pin, pin->flags);
45789 - setbits16(&io_port->iop_pdpar, 0x1fff);
45790 - setbits16(&io_port->iop_pddir, 0x1fff);
45791 + cpm1_clk_setup(CPM_CLK_SMC1, CPM_BRG1, CPM_CLK_RTX);
45792 + cpm1_clk_setup(CPM_CLK_SMC2, CPM_BRG2, CPM_CLK_RTX);
45793 + cpm1_clk_setup(CPM_CLK_SCC1, CPM_CLK1, CPM_CLK_TX);
45794 + cpm1_clk_setup(CPM_CLK_SCC1, CPM_CLK2, CPM_CLK_RX);
45796 - immr_unmap(io_port);
45797 + /* Set FEC1 and FEC2 to MII mode */
45798 + clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180);
45801 -void init_fec_ioports(struct fs_platform_info *fpi)
45802 +static void __init mpc86xads_setup_arch(void)
45804 - int fec_no = fs_get_fec_index(fpi->fs_no);
45805 + struct device_node *np;
45806 + u32 __iomem *bcsr_io;
45811 - switch (fec_no) {
45813 - init_fec1_ioports(fpi);
45816 - printk(KERN_ERR "init_fec_ioports: invalid FEC number\n");
45817 + np = of_find_compatible_node(NULL, NULL, "fsl,mpc866ads-bcsr");
45819 + printk(KERN_CRIT "Could not find fsl,mpc866ads-bcsr node\n");
45824 -static void init_scc1_ioports(struct fs_platform_info* fpi)
45826 - unsigned *bcsr_io;
45827 - iop8xx_t *io_port;
45830 - bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE);
45831 - io_port = (iop8xx_t *)immr_map(im_ioport);
45832 - cp = (cpm8xx_t *)immr_map(im_cpm);
45833 + bcsr_io = of_iomap(np, 0);
45836 if (bcsr_io == NULL) {
45837 printk(KERN_CRIT "Could not remap BCSR\n");
45841 - /* Configure port A pins for Txd and Rxd.
45843 - setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD);
45844 - clrbits16(&io_port->iop_padir, PA_ENET_RXD | PA_ENET_TXD);
45845 - clrbits16(&io_port->iop_paodr, PA_ENET_TXD);
45847 - /* Configure port C pins to enable CLSN and RENA.
45849 - clrbits16(&io_port->iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA);
45850 - clrbits16(&io_port->iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA);
45851 - setbits16(&io_port->iop_pcso, PC_ENET_CLSN | PC_ENET_RENA);
45853 - /* Configure port A for TCLK and RCLK.
45855 - setbits16(&io_port->iop_papar, PA_ENET_TCLK | PA_ENET_RCLK);
45856 - clrbits16(&io_port->iop_padir, PA_ENET_TCLK | PA_ENET_RCLK);
45857 - clrbits32(&cp->cp_pbpar, PB_ENET_TENA);
45858 - clrbits32(&cp->cp_pbdir, PB_ENET_TENA);
45860 - /* Configure Serial Interface clock routing.
45861 - * First, clear all SCC bits to zero, then set the ones we want.
45863 - clrbits32(&cp->cp_sicr, SICR_ENET_MASK);
45864 - setbits32(&cp->cp_sicr, SICR_ENET_CLKRT);
45866 - /* In the original SCC enet driver the following code is placed at
45867 - the end of the initialization */
45868 - setbits32(&cp->cp_pbpar, PB_ENET_TENA);
45869 - setbits32(&cp->cp_pbdir, PB_ENET_TENA);
45871 - clrbits32(bcsr_io+1, BCSR1_ETHEN);
45872 + clrbits32(bcsr_io, BCSR1_RS232EN_1 | BCSR1_RS232EN_2 | BCSR1_ETHEN);
45875 - immr_unmap(io_port);
45878 -void init_scc_ioports(struct fs_platform_info *fpi)
45880 - int scc_no = fs_get_scc_index(fpi->fs_no);
45882 - switch (scc_no) {
45884 - init_scc1_ioports(fpi);
45887 - printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
45894 -static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr)
45895 +static int __init mpc86xads_probe(void)
45897 - unsigned *bcsr_io;
45898 - cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
45900 - setbits32(&cp->cp_pbpar, 0x000000c0);
45901 - clrbits32(&cp->cp_pbdir, 0x000000c0);
45902 - clrbits16(&cp->cp_pbodr, 0x00c0);
45905 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
45907 - if (bcsr_io == NULL) {
45908 - printk(KERN_CRIT "Could not remap BCSR1\n");
45911 - clrbits32(bcsr_io,BCSR1_RS232EN_1);
45912 - iounmap(bcsr_io);
45913 + unsigned long root = of_get_flat_dt_root();
45914 + return of_flat_dt_is_compatible(root, "fsl,mpc866ads");
45917 -static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi)
45919 - unsigned *bcsr_io;
45920 - cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
45922 - setbits32(&cp->cp_pbpar, 0x00000c00);
45923 - clrbits32(&cp->cp_pbdir, 0x00000c00);
45924 - clrbits16(&cp->cp_pbodr, 0x0c00);
45927 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
45929 - if (bcsr_io == NULL) {
45930 - printk(KERN_CRIT "Could not remap BCSR1\n");
45933 - clrbits32(bcsr_io,BCSR1_RS232EN_2);
45934 - iounmap(bcsr_io);
45936 +static struct of_device_id __initdata of_bus_ids[] = {
45937 + { .name = "soc", },
45938 + { .name = "cpm", },
45939 + { .name = "localbus", },
45943 -void init_smc_ioports(struct fs_uart_platform_info *data)
45944 +static int __init declare_of_platform_devices(void)
45946 - int smc_no = fs_uart_id_fsid2smc(data->fs_no);
45948 - switch (smc_no) {
45950 - init_smc1_uart_ioports(data);
45951 - data->brg = data->clk_rx;
45954 - init_smc2_uart_ioports(data);
45955 - data->brg = data->clk_rx;
45958 - printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
45962 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45964 -int platform_device_skip(const char *model, int id)
45969 -static void __init mpc86xads_setup_arch(void)
45973 - mpc86xads_board_setup();
45975 - ROOT_DEV = Root_NFS;
45978 -static int __init mpc86xads_probe(void)
45980 - char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
45982 - if (model == NULL)
45984 - if (strcmp(model, "MPC866ADS"))
45989 +machine_device_initcall(mpc86x_ads, declare_of_platform_devices);
45991 define_machine(mpc86x_ads) {
45992 .name = "MPC86x ADS",
45993 @@ -275,4 +144,5 @@
45994 .calibrate_decr = mpc8xx_calibrate_decr,
45995 .set_rtc_time = mpc8xx_set_rtc_time,
45996 .get_rtc_time = mpc8xx_get_rtc_time,
45997 + .progress = udbg_progress,
45999 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/8xx/mpc885ads_setup.c powerpc.git/arch/powerpc/platforms/8xx/mpc885ads_setup.c
46000 --- linux-2.6.24/arch/powerpc/platforms/8xx/mpc885ads_setup.c 2008-01-24 23:58:37.000000000 +0100
46001 +++ powerpc.git/arch/powerpc/platforms/8xx/mpc885ads_setup.c 2008-01-28 20:25:49.000000000 +0100
46002 @@ -264,12 +264,11 @@
46003 static int __init declare_of_platform_devices(void)
46005 /* Publish the QE devices */
46006 - if (machine_is(mpc885_ads))
46007 - of_platform_bus_probe(NULL, of_bus_ids, NULL);
46008 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
46012 -device_initcall(declare_of_platform_devices);
46013 +machine_device_initcall(mpc885_ads, declare_of_platform_devices);
46015 define_machine(mpc885_ads) {
46016 .name = "Freescale MPC885 ADS",
46017 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/Kconfig powerpc.git/arch/powerpc/platforms/Kconfig
46018 --- linux-2.6.24/arch/powerpc/platforms/Kconfig 2008-01-24 23:58:37.000000000 +0100
46019 +++ powerpc.git/arch/powerpc/platforms/Kconfig 2008-01-28 20:25:49.000000000 +0100
46025 select WANT_DEVICE_TREE
46039 @@ -265,6 +270,7 @@
46040 config QUICC_ENGINE
46042 select PPC_LIB_RHEAP
46045 The QUICC Engine (QE) is a new generation of communications
46046 coprocessors on Freescale embedded CPUs (akin to CPM in older chips).
46047 @@ -315,6 +321,12 @@
46054 + Uses information from the OF or flattened device tree to instatiate
46055 + platform devices for direct mapped RTC chips like the DS1742 or DS1743.
46057 source "arch/powerpc/sysdev/bestcomm/Kconfig"
46060 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/Kconfig.cputype powerpc.git/arch/powerpc/platforms/Kconfig.cputype
46061 --- linux-2.6.24/arch/powerpc/platforms/Kconfig.cputype 2008-01-24 23:58:37.000000000 +0100
46062 +++ powerpc.git/arch/powerpc/platforms/Kconfig.cputype 2008-01-28 20:25:49.000000000 +0100
46065 select PPC_DCR_NATIVE
46066 select WANT_DEVICE_TREE
46067 + select PPC_UDBG_16550
46071 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/Makefile powerpc.git/arch/powerpc/platforms/cell/Makefile
46072 --- linux-2.6.24/arch/powerpc/platforms/cell/Makefile 2008-01-24 23:58:37.000000000 +0100
46073 +++ powerpc.git/arch/powerpc/platforms/cell/Makefile 2008-01-28 20:25:49.000000000 +0100
46076 obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
46079 + spu_syscalls.o spu_fault.o \
46083 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/cbe_cpufreq.c powerpc.git/arch/powerpc/platforms/cell/cbe_cpufreq.c
46084 --- linux-2.6.24/arch/powerpc/platforms/cell/cbe_cpufreq.c 2008-01-24 23:58:37.000000000 +0100
46085 +++ powerpc.git/arch/powerpc/platforms/cell/cbe_cpufreq.c 2008-01-28 20:25:49.000000000 +0100
46089 #include <linux/cpufreq.h>
46090 +#include <linux/of_platform.h>
46092 #include <asm/machdep.h>
46093 -#include <asm/of_platform.h>
46094 #include <asm/prom.h>
46095 #include <asm/cell-regs.h>
46096 #include "cbe_cpufreq.h"
46097 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c powerpc.git/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
46098 --- linux-2.6.24/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c 2008-01-24 23:58:37.000000000 +0100
46099 +++ powerpc.git/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c 2008-01-28 20:25:49.000000000 +0100
46101 #include <linux/kernel.h>
46102 #include <linux/types.h>
46103 #include <linux/timer.h>
46104 -#include <asm/of_platform.h>
46105 +#include <linux/of_platform.h>
46107 #include <asm/processor.h>
46108 #include <asm/prom.h>
46109 #include <asm/pmi.h>
46110 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/cbe_regs.c powerpc.git/arch/powerpc/platforms/cell/cbe_regs.c
46111 --- linux-2.6.24/arch/powerpc/platforms/cell/cbe_regs.c 2008-01-24 23:58:37.000000000 +0100
46112 +++ powerpc.git/arch/powerpc/platforms/cell/cbe_regs.c 2008-01-28 20:25:49.000000000 +0100
46114 #include <linux/percpu.h>
46115 #include <linux/types.h>
46116 #include <linux/module.h>
46117 +#include <linux/of_device.h>
46118 +#include <linux/of_platform.h>
46120 #include <asm/io.h>
46121 #include <asm/pgtable.h>
46122 #include <asm/prom.h>
46123 #include <asm/ptrace.h>
46124 -#include <asm/of_device.h>
46125 -#include <asm/of_platform.h>
46126 #include <asm/cell-regs.h>
46129 @@ -256,6 +256,7 @@
46130 printk(KERN_ERR "cbe_regs: More BE chips than supported"
46132 cbe_regs_map_count--;
46133 + of_node_put(cpu);
46136 map->cpu_node = cpu;
46137 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/io-workarounds.c powerpc.git/arch/powerpc/platforms/cell/io-workarounds.c
46138 --- linux-2.6.24/arch/powerpc/platforms/cell/io-workarounds.c 2008-01-24 23:58:37.000000000 +0100
46139 +++ powerpc.git/arch/powerpc/platforms/cell/io-workarounds.c 2008-01-28 20:25:49.000000000 +0100
46140 @@ -238,7 +238,7 @@
46141 static void __init spider_pci_add_one(struct pci_controller *phb)
46143 struct spider_pci_bus *bus = &spider_pci_busses[spider_pci_count];
46144 - struct device_node *np = phb->arch_data;
46145 + struct device_node *np = phb->dn;
46146 struct resource rsrc;
46147 void __iomem *regs;
46149 @@ -309,15 +309,12 @@
46151 struct pci_controller *phb;
46153 - if (!machine_is(cell))
46156 /* Find spider bridges. We assume they have been all probed
46157 * in setup_arch(). If that was to change, we would need to
46158 * update this code to cope with dynamically added busses
46160 list_for_each_entry(phb, &hose_list, list_node) {
46161 - struct device_node *np = phb->arch_data;
46162 + struct device_node *np = phb->dn;
46163 const char *model = of_get_property(np, "model", NULL);
46165 /* If no model property or name isn't exactly "pci", skip */
46166 @@ -343,4 +340,4 @@
46170 -arch_initcall(spider_pci_workaround_init);
46171 +machine_arch_initcall(cell, spider_pci_workaround_init);
46172 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/iommu.c powerpc.git/arch/powerpc/platforms/cell/iommu.c
46173 --- linux-2.6.24/arch/powerpc/platforms/cell/iommu.c 2008-01-24 23:58:37.000000000 +0100
46174 +++ powerpc.git/arch/powerpc/platforms/cell/iommu.c 2008-01-28 20:25:49.000000000 +0100
46175 @@ -26,14 +26,15 @@
46176 #include <linux/init.h>
46177 #include <linux/interrupt.h>
46178 #include <linux/notifier.h>
46179 +#include <linux/of_platform.h>
46181 #include <asm/prom.h>
46182 #include <asm/iommu.h>
46183 #include <asm/machdep.h>
46184 #include <asm/pci-bridge.h>
46185 #include <asm/udbg.h>
46186 -#include <asm/of_platform.h>
46187 #include <asm/lmb.h>
46188 +#include <asm/firmware.h>
46189 #include <asm/cell-regs.h>
46191 #include "interrupt.h"
46192 @@ -309,8 +310,8 @@
46196 - unsigned long reg, segments, pages_per_segment, ptab_size, n_pte_pages;
46197 - unsigned long xlate_base;
46198 + unsigned long reg, segments, pages_per_segment, ptab_size, stab_size,
46199 + n_pte_pages, xlate_base;
46202 if (cell_iommu_find_ioc(iommu->nid, &xlate_base))
46203 @@ -327,7 +328,8 @@
46204 __FUNCTION__, iommu->nid, segments, pages_per_segment);
46206 /* set up the segment table */
46207 - page = alloc_pages_node(iommu->nid, GFP_KERNEL, 0);
46208 + stab_size = segments * sizeof(unsigned long);
46209 + page = alloc_pages_node(iommu->nid, GFP_KERNEL, get_order(stab_size));
46211 iommu->stab = page_address(page);
46212 clear_page(iommu->stab);
46213 @@ -489,15 +491,18 @@
46217 +static unsigned long cell_dma_direct_offset;
46219 static void cell_dma_dev_setup(struct device *dev)
46221 struct iommu_window *window;
46222 struct cbe_iommu *iommu;
46223 struct dev_archdata *archdata = &dev->archdata;
46225 - /* If we run without iommu, no need to do anything */
46226 - if (get_pci_dma_ops() == &dma_direct_ops)
46227 + if (get_pci_dma_ops() == &dma_direct_ops) {
46228 + archdata->dma_data = (void *)cell_dma_direct_offset;
46232 /* Current implementation uses the first window available in that
46233 * node's iommu. We -might- do something smarter later though it may
46234 @@ -653,7 +658,7 @@
46236 /* If we have no Axon, we set up the spider DMA magic offset */
46237 if (of_find_node_by_name(NULL, "axon") == NULL)
46238 - dma_direct_offset = SPIDER_DMA_OFFSET;
46239 + cell_dma_direct_offset = SPIDER_DMA_OFFSET;
46241 /* Now we need to check to see where the memory is mapped
46242 * in PCI space. We assume that all busses use the same dma
46243 @@ -687,10 +692,13 @@
46247 - dma_direct_offset += base;
46248 + cell_dma_direct_offset += base;
46250 + if (cell_dma_direct_offset != 0)
46251 + ppc_md.pci_dma_dev_setup = cell_pci_dma_dev_setup;
46253 printk("iommu: disabled, direct DMA offset is 0x%lx\n",
46254 - dma_direct_offset);
46255 + cell_dma_direct_offset);
46259 @@ -699,9 +707,6 @@
46261 struct device_node *np;
46263 - if (!machine_is(cell))
46266 /* If IOMMU is disabled or we have little enough RAM to not need
46267 * to enable it, we setup a direct mapping.
46269 @@ -744,5 +749,6 @@
46273 -arch_initcall(cell_iommu_init);
46274 +machine_arch_initcall(cell, cell_iommu_init);
46275 +machine_arch_initcall(celleb_native, cell_iommu_init);
46277 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/pmu.c powerpc.git/arch/powerpc/platforms/cell/pmu.c
46278 --- linux-2.6.24/arch/powerpc/platforms/cell/pmu.c 2008-01-24 23:58:37.000000000 +0100
46279 +++ powerpc.git/arch/powerpc/platforms/cell/pmu.c 2008-01-28 20:25:49.000000000 +0100
46280 @@ -213,7 +213,7 @@
46284 - READ_SHADOW_REG(val, pm_interval);
46285 + READ_MMIO_UPPER32(val, pm_interval);
46288 case pm_start_stop:
46289 @@ -381,9 +381,6 @@
46293 - if (!machine_is(cell))
46296 for_each_node(node) {
46297 irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI |
46298 (node << IIC_IRQ_NODE_SHIFT));
46299 @@ -404,7 +401,7 @@
46303 -arch_initcall(cbe_init_pm_irq);
46304 +machine_arch_initcall(cell, cbe_init_pm_irq);
46306 void cbe_sync_irq(int node)
46308 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/setup.c powerpc.git/arch/powerpc/platforms/cell/setup.c
46309 --- linux-2.6.24/arch/powerpc/platforms/cell/setup.c 2008-01-24 23:58:37.000000000 +0100
46310 +++ powerpc.git/arch/powerpc/platforms/cell/setup.c 2008-01-28 20:25:49.000000000 +0100
46312 #include <linux/console.h>
46313 #include <linux/mutex.h>
46314 #include <linux/memory_hotplug.h>
46315 +#include <linux/of_platform.h>
46317 #include <asm/mmu.h>
46318 #include <asm/processor.h>
46320 #include <asm/spu_priv1.h>
46321 #include <asm/udbg.h>
46322 #include <asm/mpic.h>
46323 -#include <asm/of_platform.h>
46324 #include <asm/cell-regs.h>
46326 #include "interrupt.h"
46331 - if (!machine_is(cell))
46334 /* Publish OF platform devices for southbridge IOs */
46335 of_platform_bus_probe(NULL, NULL, NULL);
46341 -device_initcall(cell_publish_devices);
46342 +machine_device_initcall(cell, cell_publish_devices);
46344 static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc)
46346 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/smp.c powerpc.git/arch/powerpc/platforms/cell/smp.c
46347 --- linux-2.6.24/arch/powerpc/platforms/cell/smp.c 2008-01-24 23:58:37.000000000 +0100
46348 +++ powerpc.git/arch/powerpc/platforms/cell/smp.c 2008-01-28 20:25:49.000000000 +0100
46350 #include <asm/firmware.h>
46351 #include <asm/system.h>
46352 #include <asm/rtas.h>
46353 +#include <asm/cputhreads.h>
46355 #include "interrupt.h"
46356 #include <asm/udbg.h>
46357 @@ -182,7 +183,7 @@
46359 if (system_state < SYSTEM_RUNNING &&
46360 cpu_has_feature(CPU_FTR_SMT) &&
46361 - !smt_enabled_at_boot && nr % 2 != 0)
46362 + !smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
46366 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spu_base.c powerpc.git/arch/powerpc/platforms/cell/spu_base.c
46367 --- linux-2.6.24/arch/powerpc/platforms/cell/spu_base.c 2008-01-24 23:58:37.000000000 +0100
46368 +++ powerpc.git/arch/powerpc/platforms/cell/spu_base.c 2008-01-28 20:25:49.000000000 +0100
46370 #include <linux/linux_logo.h>
46371 #include <asm/spu.h>
46372 #include <asm/spu_priv1.h>
46373 +#include <asm/spu_csa.h>
46374 #include <asm/xmon.h>
46375 #include <asm/prom.h>
46378 EXPORT_SYMBOL_GPL(cbe_spu_info);
46381 + * The spufs fault-handling code needs to call force_sig_info to raise signals
46382 + * on DMA errors. Export it here to avoid general kernel-wide access to this
46385 +EXPORT_SYMBOL_GPL(force_sig_info);
46388 * Protects cbe_spu_info and spu->number.
46390 static DEFINE_SPINLOCK(spu_lock);
46392 static DEFINE_SPINLOCK(spu_full_list_lock);
46393 static DEFINE_MUTEX(spu_full_list_mutex);
46399 void spu_invalidate_slbs(struct spu *spu)
46401 struct spu_priv2 __iomem *priv2 = spu->priv2;
46402 @@ -114,40 +126,36 @@
46404 EXPORT_SYMBOL_GPL(spu_associate_mm);
46406 -static int __spu_trap_invalid_dma(struct spu *spu)
46407 +int spu_64k_pages_available(void)
46409 - pr_debug("%s\n", __FUNCTION__);
46410 - spu->dma_callback(spu, SPE_EVENT_INVALID_DMA);
46412 + return mmu_psize_defs[MMU_PAGE_64K].shift != 0;
46414 +EXPORT_SYMBOL_GPL(spu_64k_pages_available);
46416 -static int __spu_trap_dma_align(struct spu *spu)
46417 +static void spu_restart_dma(struct spu *spu)
46419 - pr_debug("%s\n", __FUNCTION__);
46420 - spu->dma_callback(spu, SPE_EVENT_DMA_ALIGNMENT);
46423 + struct spu_priv2 __iomem *priv2 = spu->priv2;
46425 -static int __spu_trap_error(struct spu *spu)
46427 - pr_debug("%s\n", __FUNCTION__);
46428 - spu->dma_callback(spu, SPE_EVENT_SPE_ERROR);
46430 + if (!test_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags))
46431 + out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESTART_DMA_COMMAND);
46434 -static void spu_restart_dma(struct spu *spu)
46435 +static inline void spu_load_slb(struct spu *spu, int slbe, struct spu_slb *slb)
46437 struct spu_priv2 __iomem *priv2 = spu->priv2;
46439 - if (!test_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags))
46440 - out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESTART_DMA_COMMAND);
46441 + pr_debug("%s: adding SLB[%d] 0x%016lx 0x%016lx\n",
46442 + __func__, slbe, slb->vsid, slb->esid);
46444 + out_be64(&priv2->slb_index_W, slbe);
46445 + out_be64(&priv2->slb_vsid_RW, slb->vsid);
46446 + out_be64(&priv2->slb_esid_RW, slb->esid);
46449 static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
46451 - struct spu_priv2 __iomem *priv2 = spu->priv2;
46452 struct mm_struct *mm = spu->mm;
46453 - u64 esid, vsid, llp;
46454 + struct spu_slb slb;
46457 pr_debug("%s\n", __FUNCTION__);
46458 @@ -159,7 +167,7 @@
46459 printk("%s: invalid access during switch!\n", __func__);
46462 - esid = (ea & ESID_MASK) | SLB_ESID_V;
46463 + slb.esid = (ea & ESID_MASK) | SLB_ESID_V;
46465 switch(REGION_ID(ea)) {
46466 case USER_REGION_ID:
46467 @@ -168,21 +176,21 @@
46469 psize = mm->context.user_psize;
46471 - vsid = (get_vsid(mm->context.id, ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46473 + slb.vsid = (get_vsid(mm->context.id, ea, MMU_SEGSIZE_256M)
46474 + << SLB_VSID_SHIFT) | SLB_VSID_USER;
46476 case VMALLOC_REGION_ID:
46477 if (ea < VMALLOC_END)
46478 psize = mmu_vmalloc_psize;
46480 psize = mmu_io_psize;
46481 - vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46483 + slb.vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M)
46484 + << SLB_VSID_SHIFT) | SLB_VSID_KERNEL;
46486 case KERNEL_REGION_ID:
46487 psize = mmu_linear_psize;
46488 - vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46490 + slb.vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M)
46491 + << SLB_VSID_SHIFT) | SLB_VSID_KERNEL;
46494 /* Future: support kernel segments so that drivers
46495 @@ -191,11 +199,9 @@
46496 pr_debug("invalid region access at %016lx\n", ea);
46499 - llp = mmu_psize_defs[psize].sllp;
46500 + slb.vsid |= mmu_psize_defs[psize].sllp;
46502 - out_be64(&priv2->slb_index_W, spu->slb_replace);
46503 - out_be64(&priv2->slb_vsid_RW, vsid | llp);
46504 - out_be64(&priv2->slb_esid_RW, esid);
46505 + spu_load_slb(spu, spu->slb_replace, &slb);
46507 spu->slb_replace++;
46508 if (spu->slb_replace >= 8)
46509 @@ -225,13 +231,83 @@
46513 + spu->class_0_pending = 0;
46515 spu->dsisr = dsisr;
46518 spu->stop_callback(spu);
46523 +static void __spu_kernel_slb(void *addr, struct spu_slb *slb)
46525 + unsigned long ea = (unsigned long)addr;
46528 + if (REGION_ID(ea) == KERNEL_REGION_ID)
46529 + llp = mmu_psize_defs[mmu_linear_psize].sllp;
46531 + llp = mmu_psize_defs[mmu_virtual_psize].sllp;
46533 + slb->vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46534 + SLB_VSID_KERNEL | llp;
46535 + slb->esid = (ea & ESID_MASK) | SLB_ESID_V;
46539 + * Given an array of @nr_slbs SLB entries, @slbs, return non-zero if the
46540 + * address @new_addr is present.
46542 +static inline int __slb_present(struct spu_slb *slbs, int nr_slbs,
46545 + unsigned long ea = (unsigned long)new_addr;
46548 + for (i = 0; i < nr_slbs; i++)
46549 + if (!((slbs[i].esid ^ ea) & ESID_MASK))
46556 + * Setup the SPU kernel SLBs, in preparation for a context save/restore. We
46557 + * need to map both the context save area, and the save/restore code.
46559 + * Because the lscsa and code may cross segment boundaires, we check to see
46560 + * if mappings are required for the start and end of each range. We currently
46561 + * assume that the mappings are smaller that one segment - if not, something
46562 + * is seriously wrong.
46564 +void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
46565 + void *code, int code_size)
46567 + struct spu_slb slbs[4];
46568 + int i, nr_slbs = 0;
46569 + /* start and end addresses of both mappings */
46570 + void *addrs[] = {
46571 + lscsa, (void *)lscsa + sizeof(*lscsa) - 1,
46572 + code, code + code_size - 1
46575 + /* check the set of addresses, and create a new entry in the slbs array
46576 + * if there isn't already a SLB for that address */
46577 + for (i = 0; i < ARRAY_SIZE(addrs); i++) {
46578 + if (__slb_present(slbs, nr_slbs, addrs[i]))
46581 + __spu_kernel_slb(addrs[i], &slbs[nr_slbs]);
46585 + /* Add the set of SLBs */
46586 + for (i = 0; i < nr_slbs; i++)
46587 + spu_load_slb(spu, i, &slbs[i]);
46589 +EXPORT_SYMBOL_GPL(spu_setup_kernel_slbs);
46592 spu_irq_class_0(int irq, void *data)
46594 @@ -240,12 +316,13 @@
46598 + spin_lock(&spu->register_lock);
46599 mask = spu_int_mask_get(spu, 0);
46600 - stat = spu_int_stat_get(spu, 0);
46602 + stat = spu_int_stat_get(spu, 0) & mask;
46604 - spin_lock(&spu->register_lock);
46605 spu->class_0_pending |= stat;
46606 + spu->dsisr = spu_mfc_dsisr_get(spu);
46607 + spu->dar = spu_mfc_dar_get(spu);
46608 spin_unlock(&spu->register_lock);
46610 spu->stop_callback(spu);
46611 @@ -255,31 +332,6 @@
46612 return IRQ_HANDLED;
46616 -spu_irq_class_0_bottom(struct spu *spu)
46618 - unsigned long flags;
46619 - unsigned long stat;
46621 - spin_lock_irqsave(&spu->register_lock, flags);
46622 - stat = spu->class_0_pending;
46623 - spu->class_0_pending = 0;
46625 - if (stat & 1) /* invalid DMA alignment */
46626 - __spu_trap_dma_align(spu);
46628 - if (stat & 2) /* invalid MFC DMA */
46629 - __spu_trap_invalid_dma(spu);
46631 - if (stat & 4) /* error on SPU */
46632 - __spu_trap_error(spu);
46634 - spin_unlock_irqrestore(&spu->register_lock, flags);
46636 - return (stat & 0x7) ? -EIO : 0;
46638 -EXPORT_SYMBOL_GPL(spu_irq_class_0_bottom);
46641 spu_irq_class_1(int irq, void *data)
46643 @@ -294,24 +346,23 @@
46644 stat = spu_int_stat_get(spu, 1) & mask;
46645 dar = spu_mfc_dar_get(spu);
46646 dsisr = spu_mfc_dsisr_get(spu);
46647 - if (stat & 2) /* mapping fault */
46648 + if (stat & CLASS1_STORAGE_FAULT_INTR)
46649 spu_mfc_dsisr_set(spu, 0ul);
46650 spu_int_stat_clear(spu, 1, stat);
46651 spin_unlock(&spu->register_lock);
46652 pr_debug("%s: %lx %lx %lx %lx\n", __FUNCTION__, mask, stat,
46655 - if (stat & 1) /* segment fault */
46656 + if (stat & CLASS1_SEGMENT_FAULT_INTR)
46657 __spu_trap_data_seg(spu, dar);
46659 - if (stat & 2) { /* mapping fault */
46660 + if (stat & CLASS1_STORAGE_FAULT_INTR)
46661 __spu_trap_data_map(spu, dar, dsisr);
46664 - if (stat & 4) /* ls compare & suspend on get */
46665 + if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_GET_INTR)
46668 - if (stat & 8) /* ls compare & suspend on put */
46669 + if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_PUT_INTR)
46672 return stat ? IRQ_HANDLED : IRQ_NONE;
46673 @@ -323,6 +374,8 @@
46675 unsigned long stat;
46676 unsigned long mask;
46677 + const int mailbox_intrs =
46678 + CLASS2_MAILBOX_THRESHOLD_INTR | CLASS2_MAILBOX_INTR;
46681 spin_lock(&spu->register_lock);
46682 @@ -330,31 +383,30 @@
46683 mask = spu_int_mask_get(spu, 2);
46684 /* ignore interrupts we're not waiting for */
46687 - * mailbox interrupts (0x1 and 0x10) are level triggered.
46688 - * mask them now before acknowledging.
46691 - spu_int_mask_and(spu, 2, ~(stat & 0x11));
46693 + /* mailbox interrupts are level triggered. mask them now before
46694 + * acknowledging */
46695 + if (stat & mailbox_intrs)
46696 + spu_int_mask_and(spu, 2, ~(stat & mailbox_intrs));
46697 /* acknowledge all interrupts before the callbacks */
46698 spu_int_stat_clear(spu, 2, stat);
46699 spin_unlock(&spu->register_lock);
46701 pr_debug("class 2 interrupt %d, %lx, %lx\n", irq, stat, mask);
46703 - if (stat & 1) /* PPC core mailbox */
46704 + if (stat & CLASS2_MAILBOX_INTR)
46705 spu->ibox_callback(spu);
46707 - if (stat & 2) /* SPU stop-and-signal */
46708 + if (stat & CLASS2_SPU_STOP_INTR)
46709 spu->stop_callback(spu);
46711 - if (stat & 4) /* SPU halted */
46712 + if (stat & CLASS2_SPU_HALT_INTR)
46713 spu->stop_callback(spu);
46715 - if (stat & 8) /* DMA tag group complete */
46716 + if (stat & CLASS2_SPU_DMA_TAG_GROUP_COMPLETE_INTR)
46717 spu->mfc_callback(spu);
46719 - if (stat & 0x10) /* SPU mailbox threshold */
46720 + if (stat & CLASS2_MAILBOX_THRESHOLD_INTR)
46721 spu->wbox_callback(spu);
46723 spu->stats.class2_intr++;
46724 @@ -479,13 +531,27 @@
46725 int spu_add_sysdev_attr_group(struct attribute_group *attrs)
46730 mutex_lock(&spu_full_list_mutex);
46731 - list_for_each_entry(spu, &spu_full_list, full_list)
46732 - sysfs_create_group(&spu->sysdev.kobj, attrs);
46733 + list_for_each_entry(spu, &spu_full_list, full_list) {
46734 + rc = sysfs_create_group(&spu->sysdev.kobj, attrs);
46736 + /* we're in trouble here, but try unwinding anyway */
46738 + printk(KERN_ERR "%s: can't create sysfs group '%s'\n",
46739 + __func__, attrs->name);
46741 + list_for_each_entry_continue_reverse(spu,
46742 + &spu_full_list, full_list)
46743 + sysfs_remove_group(&spu->sysdev.kobj, attrs);
46748 mutex_unlock(&spu_full_list_mutex);
46753 EXPORT_SYMBOL_GPL(spu_add_sysdev_attr_group);
46755 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spu_fault.c powerpc.git/arch/powerpc/platforms/cell/spu_fault.c
46756 --- linux-2.6.24/arch/powerpc/platforms/cell/spu_fault.c 1970-01-01 01:00:00.000000000 +0100
46757 +++ powerpc.git/arch/powerpc/platforms/cell/spu_fault.c 2008-01-28 20:25:49.000000000 +0100
46760 + * SPU mm fault handler
46762 + * (C) Copyright IBM Deutschland Entwicklung GmbH 2007
46764 + * Author: Arnd Bergmann <arndb@de.ibm.com>
46765 + * Author: Jeremy Kerr <jk@ozlabs.org>
46767 + * This program is free software; you can redistribute it and/or modify
46768 + * it under the terms of the GNU General Public License as published by
46769 + * the Free Software Foundation; either version 2, or (at your option)
46770 + * any later version.
46772 + * This program is distributed in the hope that it will be useful,
46773 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
46774 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46775 + * GNU General Public License for more details.
46777 + * You should have received a copy of the GNU General Public License
46778 + * along with this program; if not, write to the Free Software
46779 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
46781 +#include <linux/sched.h>
46782 +#include <linux/mm.h>
46783 +#include <linux/module.h>
46785 +#include <asm/spu.h>
46786 +#include <asm/spu_csa.h>
46789 + * This ought to be kept in sync with the powerpc specific do_page_fault
46790 + * function. Currently, there are a few corner cases that we haven't had
46791 + * to handle fortunately.
46793 +int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
46794 + unsigned long dsisr, unsigned *flt)
46796 + struct vm_area_struct *vma;
46797 + unsigned long is_write;
46801 + if (!IS_VALID_EA(ea)) {
46805 + if (mm == NULL) {
46808 + if (mm->pgd == NULL) {
46812 + down_read(&mm->mmap_sem);
46813 + vma = find_vma(mm, ea);
46816 + if (vma->vm_start <= ea)
46818 + if (!(vma->vm_flags & VM_GROWSDOWN))
46820 + if (expand_stack(vma, ea))
46823 + is_write = dsisr & MFC_DSISR_ACCESS_PUT;
46825 + if (!(vma->vm_flags & VM_WRITE))
46828 + if (dsisr & MFC_DSISR_ACCESS_DENIED)
46830 + if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
46834 + *flt = handle_mm_fault(mm, vma, ea, is_write);
46835 + if (unlikely(*flt & VM_FAULT_ERROR)) {
46836 + if (*flt & VM_FAULT_OOM) {
46839 + } else if (*flt & VM_FAULT_SIGBUS) {
46845 + if (*flt & VM_FAULT_MAJOR)
46846 + current->maj_flt++;
46848 + current->min_flt++;
46849 + up_read(&mm->mmap_sem);
46853 + up_read(&mm->mmap_sem);
46856 +EXPORT_SYMBOL_GPL(spu_handle_mm_fault);
46857 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spu_manage.c powerpc.git/arch/powerpc/platforms/cell/spu_manage.c
46858 --- linux-2.6.24/arch/powerpc/platforms/cell/spu_manage.c 2008-01-24 23:58:37.000000000 +0100
46859 +++ powerpc.git/arch/powerpc/platforms/cell/spu_manage.c 2008-01-28 20:25:49.000000000 +0100
46861 #include <asm/firmware.h>
46862 #include <asm/prom.h>
46864 +#include "spufs/spufs.h"
46865 #include "interrupt.h"
46867 struct device_node *spu_devnode(struct spu *spu)
46868 @@ -345,7 +346,7 @@
46870 ret = spu_map_interrupts_old(spu, spe);
46872 - printk(KERN_ERR "%s: could not map interrupts",
46873 + printk(KERN_ERR "%s: could not map interrupts\n",
46877 @@ -369,6 +370,16 @@
46881 +static void enable_spu_by_master_run(struct spu_context *ctx)
46883 + ctx->ops->master_start(ctx);
46886 +static void disable_spu_by_master_run(struct spu_context *ctx)
46888 + ctx->ops->master_stop(ctx);
46891 /* Hardcoded affinity idxs for qs20 */
46892 #define QS20_SPES_PER_BE 8
46893 static int qs20_reg_idxs[QS20_SPES_PER_BE] = { 0, 2, 4, 6, 7, 5, 3, 1 };
46894 @@ -411,10 +422,15 @@
46896 static int of_has_vicinity(void)
46899 + struct device_node *dn;
46901 - spu = list_first_entry(&cbe_spu_info[0].spus, struct spu, cbe_list);
46902 - return of_find_property(spu_devnode(spu), "vicinity", NULL) != NULL;
46903 + for_each_node_by_type(dn, "spe") {
46904 + if (of_find_property(dn, "vicinity", NULL)) {
46912 static struct spu *devnode_spu(int cbe, struct device_node *dn)
46913 @@ -525,7 +541,7 @@
46914 if (of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))
46915 init_affinity_qs20_harcoded();
46917 - printk("No affinity configuration found");
46918 + printk("No affinity configuration found\n");
46922 @@ -535,5 +551,7 @@
46923 .enumerate_spus = of_enumerate_spus,
46924 .create_spu = of_create_spu,
46925 .destroy_spu = of_destroy_spu,
46926 + .enable_spu = enable_spu_by_master_run,
46927 + .disable_spu = disable_spu_by_master_run,
46928 .init_affinity = init_affinity,
46930 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/Makefile powerpc.git/arch/powerpc/platforms/cell/spufs/Makefile
46931 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/Makefile 2008-01-24 23:58:37.000000000 +0100
46932 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/Makefile 2008-01-28 20:25:49.000000000 +0100
46934 -obj-y += switch.o fault.o lscsa_alloc.o
46936 obj-$(CONFIG_SPU_FS) += spufs.o
46937 spufs-y += inode.o file.o context.o syscalls.o coredump.o
46938 spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o
46939 +spufs-y += switch.o fault.o lscsa_alloc.o
46941 # Rules to build switch.o with the help of SPU tool chain
46943 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/backing_ops.c powerpc.git/arch/powerpc/platforms/cell/spufs/backing_ops.c
46944 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/backing_ops.c 2008-01-24 23:58:37.000000000 +0100
46945 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/backing_ops.c 2008-01-28 20:25:49.000000000 +0100
46946 @@ -106,16 +106,20 @@
46947 if (stat & 0xff0000)
46948 ret |= POLLIN | POLLRDNORM;
46950 - ctx->csa.priv1.int_stat_class0_RW &= ~0x1;
46951 - ctx->csa.priv1.int_mask_class2_RW |= 0x1;
46952 + ctx->csa.priv1.int_stat_class2_RW &=
46953 + ~CLASS2_MAILBOX_INTR;
46954 + ctx->csa.priv1.int_mask_class2_RW |=
46955 + CLASS2_ENABLE_MAILBOX_INTR;
46958 if (events & (POLLOUT | POLLWRNORM)) {
46959 if (stat & 0x00ff00)
46960 ret = POLLOUT | POLLWRNORM;
46962 - ctx->csa.priv1.int_stat_class0_RW &= ~0x10;
46963 - ctx->csa.priv1.int_mask_class2_RW |= 0x10;
46964 + ctx->csa.priv1.int_stat_class2_RW &=
46965 + ~CLASS2_MAILBOX_THRESHOLD_INTR;
46966 + ctx->csa.priv1.int_mask_class2_RW |=
46967 + CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR;
46970 spin_unlock_irq(&ctx->csa.register_lock);
46971 @@ -139,7 +143,7 @@
46974 /* make sure we get woken up by the interrupt */
46975 - ctx->csa.priv1.int_mask_class2_RW |= 0x1UL;
46976 + ctx->csa.priv1.int_mask_class2_RW |= CLASS2_ENABLE_MAILBOX_INTR;
46979 spin_unlock(&ctx->csa.register_lock);
46980 @@ -169,7 +173,8 @@
46982 /* make sure we get woken up by the interrupt when space
46983 becomes available */
46984 - ctx->csa.priv1.int_mask_class2_RW |= 0x10;
46985 + ctx->csa.priv1.int_mask_class2_RW |=
46986 + CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR;
46989 spin_unlock(&ctx->csa.register_lock);
46990 @@ -268,6 +273,11 @@
46991 return ctx->csa.lscsa->ls;
46994 +static void spu_backing_privcntl_write(struct spu_context *ctx, u64 val)
46996 + ctx->csa.priv2.spu_privcntl_RW = val;
46999 static u32 spu_backing_runcntl_read(struct spu_context *ctx)
47001 return ctx->csa.prob.spu_runcntl_RW;
47002 @@ -285,6 +295,11 @@
47003 spin_unlock(&ctx->csa.register_lock);
47006 +static void spu_backing_runcntl_stop(struct spu_context *ctx)
47008 + spu_backing_runcntl_write(ctx, SPU_RUNCNTL_STOP);
47011 static void spu_backing_master_start(struct spu_context *ctx)
47013 struct spu_state *csa = &ctx->csa;
47014 @@ -358,7 +373,7 @@
47016 static void spu_backing_restart_dma(struct spu_context *ctx)
47018 - /* nothing to do here */
47019 + ctx->csa.priv2.mfc_control_RW |= MFC_CNTL_RESTART_DMA_COMMAND;
47022 struct spu_context_ops spu_backing_ops = {
47023 @@ -379,8 +394,10 @@
47024 .npc_write = spu_backing_npc_write,
47025 .status_read = spu_backing_status_read,
47026 .get_ls = spu_backing_get_ls,
47027 + .privcntl_write = spu_backing_privcntl_write,
47028 .runcntl_read = spu_backing_runcntl_read,
47029 .runcntl_write = spu_backing_runcntl_write,
47030 + .runcntl_stop = spu_backing_runcntl_stop,
47031 .master_start = spu_backing_master_start,
47032 .master_stop = spu_backing_master_stop,
47033 .set_mfc_query = spu_backing_set_mfc_query,
47034 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/context.c powerpc.git/arch/powerpc/platforms/cell/spufs/context.c
47035 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/context.c 2008-01-24 23:58:37.000000000 +0100
47036 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/context.c 2008-01-28 20:25:49.000000000 +0100
47038 init_waitqueue_head(&ctx->wbox_wq);
47039 init_waitqueue_head(&ctx->stop_wq);
47040 init_waitqueue_head(&ctx->mfc_wq);
47041 + init_waitqueue_head(&ctx->run_wq);
47042 ctx->state = SPU_STATE_SAVED;
47043 ctx->ops = &spu_backing_ops;
47044 ctx->owner = get_task_mm(current);
47045 @@ -105,7 +106,17 @@
47046 void spu_forget(struct spu_context *ctx)
47048 struct mm_struct *mm;
47049 - spu_acquire_saved(ctx);
47052 + * This is basically an open-coded spu_acquire_saved, except that
47053 + * we don't acquire the state mutex interruptible.
47055 + mutex_lock(&ctx->state_mutex);
47056 + if (ctx->state != SPU_STATE_SAVED) {
47057 + set_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags);
47058 + spu_deactivate(ctx);
47064 @@ -133,47 +144,23 @@
47068 - * spu_acquire_runnable - lock spu contex and make sure it is in runnable state
47069 + * spu_acquire_saved - lock spu contex and make sure it is in saved state
47070 * @ctx: spu contex to lock
47073 - * Returns 0 and with the context locked on success
47074 - * Returns negative error and with the context _unlocked_ on failure.
47076 -int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags)
47077 +int spu_acquire_saved(struct spu_context *ctx)
47079 - int ret = -EINVAL;
47082 - spu_acquire(ctx);
47083 - if (ctx->state == SPU_STATE_SAVED) {
47085 - * Context is about to be freed, so we can't acquire it anymore.
47089 - ret = spu_activate(ctx, flags);
47095 + ret = spu_acquire(ctx);
47100 - spu_release(ctx);
47105 - * spu_acquire_saved - lock spu contex and make sure it is in saved state
47106 - * @ctx: spu contex to lock
47108 -void spu_acquire_saved(struct spu_context *ctx)
47110 - spu_acquire(ctx);
47111 if (ctx->state != SPU_STATE_SAVED) {
47112 set_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags);
47113 spu_deactivate(ctx);
47120 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/coredump.c powerpc.git/arch/powerpc/platforms/cell/spufs/coredump.c
47121 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/coredump.c 2008-01-24 23:58:37.000000000 +0100
47122 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/coredump.c 2008-01-28 20:25:49.000000000 +0100
47123 @@ -148,7 +148,9 @@
47126 while ((ctx = coredump_next_context(&fd)) != NULL) {
47127 - spu_acquire_saved(ctx);
47128 + rc = spu_acquire_saved(ctx);
47131 rc = spufs_ctx_note_size(ctx, fd);
47132 spu_release_saved(ctx);
47134 @@ -224,7 +226,9 @@
47137 while ((ctx = coredump_next_context(&fd)) != NULL) {
47138 - spu_acquire_saved(ctx);
47139 + rc = spu_acquire_saved(ctx);
47143 for (j = 0; spufs_coredump_read[j].name != NULL; j++) {
47144 rc = spufs_arch_write_note(ctx, j, file, fd, foffset);
47145 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/fault.c powerpc.git/arch/powerpc/platforms/cell/spufs/fault.c
47146 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/fault.c 2008-01-24 23:58:37.000000000 +0100
47147 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/fault.c 2008-01-28 20:25:49.000000000 +0100
47148 @@ -28,117 +28,71 @@
47153 - * This ought to be kept in sync with the powerpc specific do_page_fault
47154 - * function. Currently, there are a few corner cases that we haven't had
47155 - * to handle fortunately.
47157 + * Handle an SPE event, depending on context SPU_CREATE_EVENTS_ENABLED flag.
47159 + * If the context was created with events, we just set the return event.
47160 + * Otherwise, send an appropriate signal to the process.
47162 -static int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
47163 - unsigned long dsisr, unsigned *flt)
47165 - struct vm_area_struct *vma;
47166 - unsigned long is_write;
47170 - if (!IS_VALID_EA(ea)) {
47174 - if (mm == NULL) {
47177 - if (mm->pgd == NULL) {
47181 - down_read(&mm->mmap_sem);
47182 - vma = find_vma(mm, ea);
47185 - if (vma->vm_start <= ea)
47187 - if (!(vma->vm_flags & VM_GROWSDOWN))
47189 - if (expand_stack(vma, ea))
47192 - is_write = dsisr & MFC_DSISR_ACCESS_PUT;
47194 - if (!(vma->vm_flags & VM_WRITE))
47197 - if (dsisr & MFC_DSISR_ACCESS_DENIED)
47199 - if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
47203 - *flt = handle_mm_fault(mm, vma, ea, is_write);
47204 - if (unlikely(*flt & VM_FAULT_ERROR)) {
47205 - if (*flt & VM_FAULT_OOM) {
47208 - } else if (*flt & VM_FAULT_SIGBUS) {
47214 - if (*flt & VM_FAULT_MAJOR)
47215 - current->maj_flt++;
47217 - current->min_flt++;
47218 - up_read(&mm->mmap_sem);
47222 - up_read(&mm->mmap_sem);
47226 -static void spufs_handle_dma_error(struct spu_context *ctx,
47227 +static void spufs_handle_event(struct spu_context *ctx,
47228 unsigned long ea, int type)
47232 if (ctx->flags & SPU_CREATE_EVENTS_ENABLED) {
47233 ctx->event_return |= type;
47234 wake_up_all(&ctx->stop_wq);
47237 - memset(&info, 0, sizeof(info));
47240 - case SPE_EVENT_INVALID_DMA:
47241 - info.si_signo = SIGBUS;
47242 - info.si_code = BUS_OBJERR;
47244 - case SPE_EVENT_SPE_DATA_STORAGE:
47245 - info.si_signo = SIGBUS;
47246 - info.si_addr = (void __user *)ea;
47247 - info.si_code = BUS_ADRERR;
47249 - case SPE_EVENT_DMA_ALIGNMENT:
47250 - info.si_signo = SIGBUS;
47251 - /* DAR isn't set for an alignment fault :( */
47252 - info.si_code = BUS_ADRALN;
47254 - case SPE_EVENT_SPE_ERROR:
47255 - info.si_signo = SIGILL;
47256 - info.si_addr = (void __user *)(unsigned long)
47257 - ctx->ops->npc_read(ctx) - 4;
47258 - info.si_code = ILL_ILLOPC;
47261 - if (info.si_signo)
47262 - force_sig_info(info.si_signo, &info, current);
47266 + memset(&info, 0, sizeof(info));
47269 + case SPE_EVENT_INVALID_DMA:
47270 + info.si_signo = SIGBUS;
47271 + info.si_code = BUS_OBJERR;
47273 + case SPE_EVENT_SPE_DATA_STORAGE:
47274 + info.si_signo = SIGSEGV;
47275 + info.si_addr = (void __user *)ea;
47276 + info.si_code = SEGV_ACCERR;
47277 + ctx->ops->restart_dma(ctx);
47279 + case SPE_EVENT_DMA_ALIGNMENT:
47280 + info.si_signo = SIGBUS;
47281 + /* DAR isn't set for an alignment fault :( */
47282 + info.si_code = BUS_ADRALN;
47284 + case SPE_EVENT_SPE_ERROR:
47285 + info.si_signo = SIGILL;
47286 + info.si_addr = (void __user *)(unsigned long)
47287 + ctx->ops->npc_read(ctx) - 4;
47288 + info.si_code = ILL_ILLOPC;
47292 + if (info.si_signo)
47293 + force_sig_info(info.si_signo, &info, current);
47296 -void spufs_dma_callback(struct spu *spu, int type)
47297 +int spufs_handle_class0(struct spu_context *ctx)
47299 - spufs_handle_dma_error(spu->ctx, spu->dar, type);
47300 + unsigned long stat = ctx->csa.class_0_pending & CLASS0_INTR_MASK;
47302 + if (likely(!stat))
47305 + if (stat & CLASS0_DMA_ALIGNMENT_INTR)
47306 + spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_DMA_ALIGNMENT);
47308 + if (stat & CLASS0_INVALID_DMA_COMMAND_INTR)
47309 + spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_INVALID_DMA);
47311 + if (stat & CLASS0_SPU_ERROR_INTR)
47312 + spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_SPE_ERROR);
47316 -EXPORT_SYMBOL_GPL(spufs_dma_callback);
47319 * bottom half handler for page faults, we can't do this from
47320 @@ -154,7 +108,7 @@
47321 u64 ea, dsisr, access;
47322 unsigned long flags;
47328 * dar and dsisr get passed from the registers
47329 @@ -165,16 +119,8 @@
47330 * in time, we can still expect to get the same fault
47331 * the immediately after the context restore.
47333 - if (ctx->state == SPU_STATE_RUNNABLE) {
47334 - ea = ctx->spu->dar;
47335 - dsisr = ctx->spu->dsisr;
47336 - ctx->spu->dar= ctx->spu->dsisr = 0;
47338 - ea = ctx->csa.priv1.mfc_dar_RW;
47339 - dsisr = ctx->csa.priv1.mfc_dsisr_RW;
47340 - ctx->csa.priv1.mfc_dar_RW = 0;
47341 - ctx->csa.priv1.mfc_dsisr_RW = 0;
47343 + ea = ctx->csa.dar;
47344 + dsisr = ctx->csa.dsisr;
47346 if (!(dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED)))
47348 @@ -201,7 +147,22 @@
47350 ret = spu_handle_mm_fault(current->mm, ea, dsisr, &flt);
47352 - spu_acquire(ctx);
47354 + * If spu_acquire fails due to a pending signal we just want to return
47355 + * EINTR to userspace even if that means missing the dma restart or
47356 + * updating the page fault statistics.
47358 + ret2 = spu_acquire(ctx);
47363 + * Clear dsisr under ctxt lock after handling the fault, so that
47364 + * time slicing will not preempt the context while the page fault
47365 + * handler is running. Context switch code removes mappings.
47367 + ctx->csa.dar = ctx->csa.dsisr = 0;
47370 * If we handled the fault successfully and are in runnable
47371 * state, restart the DMA.
47372 @@ -222,9 +183,9 @@
47374 ctx->ops->restart_dma(ctx);
47376 - spufs_handle_dma_error(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE);
47377 + spufs_handle_event(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE);
47380 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
47383 -EXPORT_SYMBOL_GPL(spufs_handle_class1);
47384 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/file.c powerpc.git/arch/powerpc/platforms/cell/spufs/file.c
47385 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/file.c 2008-01-24 23:58:37.000000000 +0100
47386 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/file.c 2008-01-28 20:25:49.000000000 +0100
47387 @@ -40,6 +40,120 @@
47389 #define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000)
47391 +/* Simple attribute files */
47392 +struct spufs_attr {
47393 + int (*get)(void *, u64 *);
47394 + int (*set)(void *, u64);
47395 + char get_buf[24]; /* enough to store a u64 and "\n\0" */
47396 + char set_buf[24];
47398 + const char *fmt; /* format for read operation */
47399 + struct mutex mutex; /* protects access to these buffers */
47402 +static int spufs_attr_open(struct inode *inode, struct file *file,
47403 + int (*get)(void *, u64 *), int (*set)(void *, u64),
47406 + struct spufs_attr *attr;
47408 + attr = kmalloc(sizeof(*attr), GFP_KERNEL);
47414 + attr->data = inode->i_private;
47416 + mutex_init(&attr->mutex);
47417 + file->private_data = attr;
47419 + return nonseekable_open(inode, file);
47422 +static int spufs_attr_release(struct inode *inode, struct file *file)
47424 + kfree(file->private_data);
47428 +static ssize_t spufs_attr_read(struct file *file, char __user *buf,
47429 + size_t len, loff_t *ppos)
47431 + struct spufs_attr *attr;
47435 + attr = file->private_data;
47439 + ret = mutex_lock_interruptible(&attr->mutex);
47443 + if (*ppos) { /* continued read */
47444 + size = strlen(attr->get_buf);
47445 + } else { /* first read */
47447 + ret = attr->get(attr->data, &val);
47451 + size = scnprintf(attr->get_buf, sizeof(attr->get_buf),
47452 + attr->fmt, (unsigned long long)val);
47455 + ret = simple_read_from_buffer(buf, len, ppos, attr->get_buf, size);
47457 + mutex_unlock(&attr->mutex);
47461 +static ssize_t spufs_attr_write(struct file *file, const char __user *buf,
47462 + size_t len, loff_t *ppos)
47464 + struct spufs_attr *attr;
47469 + attr = file->private_data;
47473 + ret = mutex_lock_interruptible(&attr->mutex);
47478 + size = min(sizeof(attr->set_buf) - 1, len);
47479 + if (copy_from_user(attr->set_buf, buf, size))
47482 + ret = len; /* claim we got the whole input */
47483 + attr->set_buf[size] = '\0';
47484 + val = simple_strtol(attr->set_buf, NULL, 0);
47485 + attr->set(attr->data, val);
47487 + mutex_unlock(&attr->mutex);
47491 +#define DEFINE_SPUFS_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \
47492 +static int __fops ## _open(struct inode *inode, struct file *file) \
47494 + __simple_attr_check_format(__fmt, 0ull); \
47495 + return spufs_attr_open(inode, file, __get, __set, __fmt); \
47497 +static struct file_operations __fops = { \
47498 + .owner = THIS_MODULE, \
47499 + .open = __fops ## _open, \
47500 + .release = spufs_attr_release, \
47501 + .read = spufs_attr_read, \
47502 + .write = spufs_attr_write, \
47507 spufs_mem_open(struct inode *inode, struct file *file)
47508 @@ -84,9 +198,12 @@
47509 struct spu_context *ctx = file->private_data;
47512 - spu_acquire(ctx);
47513 + ret = spu_acquire(ctx);
47516 ret = __spufs_mem_read(ctx, buffer, size, pos);
47522 @@ -106,7 +223,10 @@
47523 if (size > LS_SIZE - pos)
47524 size = LS_SIZE - pos;
47526 - spu_acquire(ctx);
47527 + ret = spu_acquire(ctx);
47531 local_store = ctx->ops->get_ls(ctx);
47532 ret = copy_from_user(local_store + pos, buffer, size);
47534 @@ -146,7 +266,8 @@
47535 pr_debug("spufs_mem_mmap_nopfn address=0x%lx -> 0x%lx, offset=0x%lx\n",
47536 addr0, address, offset);
47538 - spu_acquire(ctx);
47539 + if (spu_acquire(ctx))
47540 + return NOPFN_REFAULT;
47542 if (ctx->state == SPU_STATE_SAVED) {
47543 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
47544 @@ -236,23 +357,32 @@
47546 struct spu_context *ctx = vma->vm_file->private_data;
47547 unsigned long area, offset = address - vma->vm_start;
47550 offset += vma->vm_pgoff << PAGE_SHIFT;
47551 if (offset >= ps_size)
47552 return NOPFN_SIGBUS;
47554 - /* error here usually means a signal.. we might want to test
47555 - * the error code more precisely though
47557 + * We have to wait for context to be loaded before we have
47558 + * pages to hand out to the user, but we don't want to wait
47559 + * with the mmap_sem held.
47560 + * It is possible to drop the mmap_sem here, but then we need
47561 + * to return NOPFN_REFAULT because the mappings may have
47564 - ret = spu_acquire_runnable(ctx, 0);
47566 + if (spu_acquire(ctx))
47567 return NOPFN_REFAULT;
47569 - area = ctx->spu->problem_phys + ps_offs;
47570 - vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT);
47571 - spu_release(ctx);
47572 + if (ctx->state == SPU_STATE_SAVED) {
47573 + up_read(¤t->mm->mmap_sem);
47574 + spufs_wait(ctx->run_wq, ctx->state == SPU_STATE_RUNNABLE);
47575 + down_read(¤t->mm->mmap_sem);
47577 + area = ctx->spu->problem_phys + ps_offs;
47578 + vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT);
47581 + spu_release(ctx);
47582 return NOPFN_REFAULT;
47585 @@ -286,25 +416,32 @@
47586 #define spufs_cntl_mmap NULL
47587 #endif /* !SPUFS_MMAP_4K */
47589 -static u64 spufs_cntl_get(void *data)
47590 +static int spufs_cntl_get(void *data, u64 *val)
47592 struct spu_context *ctx = data;
47596 - spu_acquire(ctx);
47597 - val = ctx->ops->status_read(ctx);
47598 + ret = spu_acquire(ctx);
47601 + *val = ctx->ops->status_read(ctx);
47608 -static void spufs_cntl_set(void *data, u64 val)
47609 +static int spufs_cntl_set(void *data, u64 val)
47611 struct spu_context *ctx = data;
47614 - spu_acquire(ctx);
47615 + ret = spu_acquire(ctx);
47618 ctx->ops->runcntl_write(ctx, val);
47624 static int spufs_cntl_open(struct inode *inode, struct file *file)
47625 @@ -317,7 +454,7 @@
47626 if (!i->i_openers++)
47627 ctx->cntl = inode->i_mapping;
47628 mutex_unlock(&ctx->mapping_lock);
47629 - return simple_attr_open(inode, file, spufs_cntl_get,
47630 + return spufs_attr_open(inode, file, spufs_cntl_get,
47631 spufs_cntl_set, "0x%08lx");
47634 @@ -327,7 +464,7 @@
47635 struct spufs_inode_info *i = SPUFS_I(inode);
47636 struct spu_context *ctx = i->i_ctx;
47638 - simple_attr_close(inode, file);
47639 + spufs_attr_release(inode, file);
47641 mutex_lock(&ctx->mapping_lock);
47642 if (!--i->i_openers)
47643 @@ -339,8 +476,8 @@
47644 static const struct file_operations spufs_cntl_fops = {
47645 .open = spufs_cntl_open,
47646 .release = spufs_cntl_release,
47647 - .read = simple_attr_read,
47648 - .write = simple_attr_write,
47649 + .read = spufs_attr_read,
47650 + .write = spufs_attr_write,
47651 .mmap = spufs_cntl_mmap,
47654 @@ -368,7 +505,9 @@
47656 struct spu_context *ctx = file->private_data;
47658 - spu_acquire_saved(ctx);
47659 + ret = spu_acquire_saved(ctx);
47662 ret = __spufs_regs_read(ctx, buffer, size, pos);
47663 spu_release_saved(ctx);
47665 @@ -387,7 +526,9 @@
47669 - spu_acquire_saved(ctx);
47670 + ret = spu_acquire_saved(ctx);
47674 ret = copy_from_user(lscsa->gprs + *pos - size,
47675 buffer, size) ? -EFAULT : size;
47676 @@ -419,7 +560,9 @@
47678 struct spu_context *ctx = file->private_data;
47680 - spu_acquire_saved(ctx);
47681 + ret = spu_acquire_saved(ctx);
47684 ret = __spufs_fpcr_read(ctx, buffer, size, pos);
47685 spu_release_saved(ctx);
47687 @@ -436,10 +579,12 @@
47688 size = min_t(ssize_t, sizeof(lscsa->fpcr) - *pos, size);
47693 - spu_acquire_saved(ctx);
47694 + ret = spu_acquire_saved(ctx);
47699 ret = copy_from_user((char *)&lscsa->fpcr + *pos - size,
47700 buffer, size) ? -EFAULT : size;
47702 @@ -486,7 +631,10 @@
47704 udata = (void __user *)buf;
47706 - spu_acquire(ctx);
47707 + count = spu_acquire(ctx);
47711 for (count = 0; (count + 4) <= len; count += 4, udata++) {
47713 ret = ctx->ops->mbox_read(ctx, &mbox_data);
47714 @@ -522,12 +670,15 @@
47715 size_t len, loff_t *pos)
47717 struct spu_context *ctx = file->private_data;
47724 - spu_acquire(ctx);
47725 + ret = spu_acquire(ctx);
47729 mbox_stat = ctx->ops->mbox_stat_read(ctx) & 0xff;
47731 @@ -562,6 +713,9 @@
47733 struct spu_context *ctx = spu->ctx;
47738 wake_up_all(&ctx->ibox_wq);
47739 kill_fasync(&ctx->ibox_fasync, SIGIO, POLLIN);
47741 @@ -593,7 +747,9 @@
47743 udata = (void __user *)buf;
47745 - spu_acquire(ctx);
47746 + count = spu_acquire(ctx);
47750 /* wait only for the first element */
47752 @@ -639,7 +795,11 @@
47754 poll_wait(file, &ctx->ibox_wq, wait);
47756 - spu_acquire(ctx);
47758 + * For now keep this uninterruptible and also ignore the rule
47759 + * that poll should not sleep. Will be fixed later.
47761 + mutex_lock(&ctx->state_mutex);
47762 mask = ctx->ops->mbox_stat_poll(ctx, POLLIN | POLLRDNORM);
47765 @@ -657,12 +817,15 @@
47766 size_t len, loff_t *pos)
47768 struct spu_context *ctx = file->private_data;
47775 - spu_acquire(ctx);
47776 + ret = spu_acquire(ctx);
47779 ibox_stat = (ctx->ops->mbox_stat_read(ctx) >> 16) & 0xff;
47782 @@ -698,6 +861,9 @@
47784 struct spu_context *ctx = spu->ctx;
47789 wake_up_all(&ctx->wbox_wq);
47790 kill_fasync(&ctx->wbox_fasync, SIGIO, POLLOUT);
47792 @@ -731,7 +897,9 @@
47793 if (__get_user(wbox_data, udata))
47796 - spu_acquire(ctx);
47797 + count = spu_acquire(ctx);
47802 * make sure we can at least write one element, by waiting
47803 @@ -772,7 +940,11 @@
47805 poll_wait(file, &ctx->wbox_wq, wait);
47807 - spu_acquire(ctx);
47809 + * For now keep this uninterruptible and also ignore the rule
47810 + * that poll should not sleep. Will be fixed later.
47812 + mutex_lock(&ctx->state_mutex);
47813 mask = ctx->ops->mbox_stat_poll(ctx, POLLOUT | POLLWRNORM);
47816 @@ -790,12 +962,15 @@
47817 size_t len, loff_t *pos)
47819 struct spu_context *ctx = file->private_data;
47826 - spu_acquire(ctx);
47827 + ret = spu_acquire(ctx);
47830 wbox_stat = (ctx->ops->mbox_stat_read(ctx) >> 8) & 0xff;
47833 @@ -866,7 +1041,9 @@
47835 struct spu_context *ctx = file->private_data;
47837 - spu_acquire_saved(ctx);
47838 + ret = spu_acquire_saved(ctx);
47841 ret = __spufs_signal1_read(ctx, buf, len, pos);
47842 spu_release_saved(ctx);
47844 @@ -877,6 +1054,7 @@
47845 size_t len, loff_t *pos)
47847 struct spu_context *ctx;
47851 ctx = file->private_data;
47852 @@ -887,7 +1065,9 @@
47853 if (copy_from_user(&data, buf, 4))
47856 - spu_acquire(ctx);
47857 + ret = spu_acquire(ctx);
47860 ctx->ops->signal1_write(ctx, data);
47863 @@ -997,7 +1177,9 @@
47864 struct spu_context *ctx = file->private_data;
47867 - spu_acquire_saved(ctx);
47868 + ret = spu_acquire_saved(ctx);
47871 ret = __spufs_signal2_read(ctx, buf, len, pos);
47872 spu_release_saved(ctx);
47874 @@ -1008,6 +1190,7 @@
47875 size_t len, loff_t *pos)
47877 struct spu_context *ctx;
47881 ctx = file->private_data;
47882 @@ -1018,7 +1201,9 @@
47883 if (copy_from_user(&data, buf, 4))
47886 - spu_acquire(ctx);
47887 + ret = spu_acquire(ctx);
47890 ctx->ops->signal2_write(ctx, data);
47893 @@ -1086,33 +1271,42 @@
47894 #define SPU_ATTR_ACQUIRE_SAVED 2
47896 #define DEFINE_SPUFS_ATTRIBUTE(__name, __get, __set, __fmt, __acquire) \
47897 -static u64 __##__get(void *data) \
47898 +static int __##__get(void *data, u64 *val) \
47900 struct spu_context *ctx = data; \
47904 if (__acquire == SPU_ATTR_ACQUIRE) { \
47905 - spu_acquire(ctx); \
47906 - ret = __get(ctx); \
47907 + ret = spu_acquire(ctx); \
47910 + *val = __get(ctx); \
47911 spu_release(ctx); \
47912 } else if (__acquire == SPU_ATTR_ACQUIRE_SAVED) { \
47913 - spu_acquire_saved(ctx); \
47914 - ret = __get(ctx); \
47915 + ret = spu_acquire_saved(ctx); \
47918 + *val = __get(ctx); \
47919 spu_release_saved(ctx); \
47921 - ret = __get(ctx); \
47922 + *val = __get(ctx); \
47927 -DEFINE_SIMPLE_ATTRIBUTE(__name, __##__get, __set, __fmt);
47928 +DEFINE_SPUFS_SIMPLE_ATTRIBUTE(__name, __##__get, __set, __fmt);
47930 -static void spufs_signal1_type_set(void *data, u64 val)
47931 +static int spufs_signal1_type_set(void *data, u64 val)
47933 struct spu_context *ctx = data;
47936 - spu_acquire(ctx);
47937 + ret = spu_acquire(ctx);
47940 ctx->ops->signal1_type_set(ctx, val);
47946 static u64 spufs_signal1_type_get(struct spu_context *ctx)
47947 @@ -1123,13 +1317,18 @@
47948 spufs_signal1_type_set, "%llu", SPU_ATTR_ACQUIRE);
47951 -static void spufs_signal2_type_set(void *data, u64 val)
47952 +static int spufs_signal2_type_set(void *data, u64 val)
47954 struct spu_context *ctx = data;
47957 - spu_acquire(ctx);
47958 + ret = spu_acquire(ctx);
47961 ctx->ops->signal2_type_set(ctx, val);
47967 static u64 spufs_signal2_type_get(struct spu_context *ctx)
47968 @@ -1329,6 +1528,9 @@
47970 struct spu_context *ctx = spu->ctx;
47975 wake_up_all(&ctx->mfc_wq);
47977 pr_debug("%s %s\n", __FUNCTION__, spu->name);
47978 @@ -1375,12 +1577,17 @@
47982 - spu_acquire(ctx);
47983 + ret = spu_acquire(ctx);
47988 if (file->f_flags & O_NONBLOCK) {
47989 status = ctx->ops->read_mfc_tagstatus(ctx);
47990 if (!(status & ctx->tagwait))
47993 + /* XXX(hch): shouldn't we clear ret here? */
47994 ctx->tagwait &= ~status;
47996 ret = spufs_wait(ctx->mfc_wq,
47997 @@ -1505,7 +1712,11 @@
48001 - ret = spu_acquire_runnable(ctx, 0);
48002 + ret = spu_acquire(ctx);
48006 + ret = spufs_wait(ctx->run_wq, ctx->state == SPU_STATE_RUNNABLE);
48010 @@ -1539,7 +1750,11 @@
48012 poll_wait(file, &ctx->mfc_wq, wait);
48014 - spu_acquire(ctx);
48016 + * For now keep this uninterruptible and also ignore the rule
48017 + * that poll should not sleep. Will be fixed later.
48019 + mutex_lock(&ctx->state_mutex);
48020 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2);
48021 free_elements = ctx->ops->get_mfc_free_elements(ctx);
48022 tagstatus = ctx->ops->read_mfc_tagstatus(ctx);
48023 @@ -1562,7 +1777,9 @@
48024 struct spu_context *ctx = file->private_data;
48027 - spu_acquire(ctx);
48028 + ret = spu_acquire(ctx);
48032 /* this currently hangs */
48033 ret = spufs_wait(ctx->mfc_wq,
48034 @@ -1605,12 +1822,18 @@
48035 .mmap = spufs_mfc_mmap,
48038 -static void spufs_npc_set(void *data, u64 val)
48039 +static int spufs_npc_set(void *data, u64 val)
48041 struct spu_context *ctx = data;
48042 - spu_acquire(ctx);
48045 + ret = spu_acquire(ctx);
48048 ctx->ops->npc_write(ctx, val);
48054 static u64 spufs_npc_get(struct spu_context *ctx)
48055 @@ -1620,13 +1843,19 @@
48056 DEFINE_SPUFS_ATTRIBUTE(spufs_npc_ops, spufs_npc_get, spufs_npc_set,
48057 "0x%llx\n", SPU_ATTR_ACQUIRE);
48059 -static void spufs_decr_set(void *data, u64 val)
48060 +static int spufs_decr_set(void *data, u64 val)
48062 struct spu_context *ctx = data;
48063 struct spu_lscsa *lscsa = ctx->csa.lscsa;
48064 - spu_acquire_saved(ctx);
48067 + ret = spu_acquire_saved(ctx);
48070 lscsa->decr.slot[0] = (u32) val;
48071 spu_release_saved(ctx);
48076 static u64 spufs_decr_get(struct spu_context *ctx)
48077 @@ -1637,15 +1866,21 @@
48078 DEFINE_SPUFS_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set,
48079 "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED);
48081 -static void spufs_decr_status_set(void *data, u64 val)
48082 +static int spufs_decr_status_set(void *data, u64 val)
48084 struct spu_context *ctx = data;
48085 - spu_acquire_saved(ctx);
48088 + ret = spu_acquire_saved(ctx);
48092 ctx->csa.priv2.mfc_control_RW |= MFC_CNTL_DECREMENTER_RUNNING;
48094 ctx->csa.priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING;
48095 spu_release_saved(ctx);
48100 static u64 spufs_decr_status_get(struct spu_context *ctx)
48101 @@ -1659,13 +1894,19 @@
48102 spufs_decr_status_set, "0x%llx\n",
48103 SPU_ATTR_ACQUIRE_SAVED);
48105 -static void spufs_event_mask_set(void *data, u64 val)
48106 +static int spufs_event_mask_set(void *data, u64 val)
48108 struct spu_context *ctx = data;
48109 struct spu_lscsa *lscsa = ctx->csa.lscsa;
48110 - spu_acquire_saved(ctx);
48113 + ret = spu_acquire_saved(ctx);
48116 lscsa->event_mask.slot[0] = (u32) val;
48117 spu_release_saved(ctx);
48122 static u64 spufs_event_mask_get(struct spu_context *ctx)
48123 @@ -1690,13 +1931,19 @@
48124 DEFINE_SPUFS_ATTRIBUTE(spufs_event_status_ops, spufs_event_status_get,
48125 NULL, "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED)
48127 -static void spufs_srr0_set(void *data, u64 val)
48128 +static int spufs_srr0_set(void *data, u64 val)
48130 struct spu_context *ctx = data;
48131 struct spu_lscsa *lscsa = ctx->csa.lscsa;
48132 - spu_acquire_saved(ctx);
48135 + ret = spu_acquire_saved(ctx);
48138 lscsa->srr0.slot[0] = (u32) val;
48139 spu_release_saved(ctx);
48144 static u64 spufs_srr0_get(struct spu_context *ctx)
48145 @@ -1727,10 +1974,12 @@
48146 return ctx->object_id;
48149 -static void spufs_object_id_set(void *data, u64 id)
48150 +static int spufs_object_id_set(void *data, u64 id)
48152 struct spu_context *ctx = data;
48153 ctx->object_id = id;
48158 DEFINE_SPUFS_ATTRIBUTE(spufs_object_id_ops, spufs_object_id_get,
48159 @@ -1777,13 +2026,13 @@
48160 static ssize_t __spufs_mbox_info_read(struct spu_context *ctx,
48161 char __user *buf, size_t len, loff_t *pos)
48166 - mbox_stat = ctx->csa.prob.mb_stat_R;
48167 - if (mbox_stat & 0x0000ff) {
48168 - data = ctx->csa.prob.pu_mb_R;
48170 + /* EOF if there's no entry in the mbox */
48171 + if (!(ctx->csa.prob.mb_stat_R & 0x0000ff))
48174 + data = ctx->csa.prob.pu_mb_R;
48176 return simple_read_from_buffer(buf, len, pos, &data, sizeof data);
48178 @@ -1797,7 +2046,9 @@
48179 if (!access_ok(VERIFY_WRITE, buf, len))
48182 - spu_acquire_saved(ctx);
48183 + ret = spu_acquire_saved(ctx);
48186 spin_lock(&ctx->csa.register_lock);
48187 ret = __spufs_mbox_info_read(ctx, buf, len, pos);
48188 spin_unlock(&ctx->csa.register_lock);
48189 @@ -1815,13 +2066,13 @@
48190 static ssize_t __spufs_ibox_info_read(struct spu_context *ctx,
48191 char __user *buf, size_t len, loff_t *pos)
48196 - ibox_stat = ctx->csa.prob.mb_stat_R;
48197 - if (ibox_stat & 0xff0000) {
48198 - data = ctx->csa.priv2.puint_mb_R;
48200 + /* EOF if there's no entry in the ibox */
48201 + if (!(ctx->csa.prob.mb_stat_R & 0xff0000))
48204 + data = ctx->csa.priv2.puint_mb_R;
48206 return simple_read_from_buffer(buf, len, pos, &data, sizeof data);
48208 @@ -1835,7 +2086,9 @@
48209 if (!access_ok(VERIFY_WRITE, buf, len))
48212 - spu_acquire_saved(ctx);
48213 + ret = spu_acquire_saved(ctx);
48216 spin_lock(&ctx->csa.register_lock);
48217 ret = __spufs_ibox_info_read(ctx, buf, len, pos);
48218 spin_unlock(&ctx->csa.register_lock);
48219 @@ -1876,7 +2129,9 @@
48220 if (!access_ok(VERIFY_WRITE, buf, len))
48223 - spu_acquire_saved(ctx);
48224 + ret = spu_acquire_saved(ctx);
48227 spin_lock(&ctx->csa.register_lock);
48228 ret = __spufs_wbox_info_read(ctx, buf, len, pos);
48229 spin_unlock(&ctx->csa.register_lock);
48230 @@ -1926,7 +2181,9 @@
48231 if (!access_ok(VERIFY_WRITE, buf, len))
48234 - spu_acquire_saved(ctx);
48235 + ret = spu_acquire_saved(ctx);
48238 spin_lock(&ctx->csa.register_lock);
48239 ret = __spufs_dma_info_read(ctx, buf, len, pos);
48240 spin_unlock(&ctx->csa.register_lock);
48241 @@ -1977,7 +2234,9 @@
48242 struct spu_context *ctx = file->private_data;
48245 - spu_acquire_saved(ctx);
48246 + ret = spu_acquire_saved(ctx);
48249 spin_lock(&ctx->csa.register_lock);
48250 ret = __spufs_proxydma_info_read(ctx, buf, len, pos);
48251 spin_unlock(&ctx->csa.register_lock);
48252 @@ -2066,8 +2325,12 @@
48253 static int spufs_show_stat(struct seq_file *s, void *private)
48255 struct spu_context *ctx = s->private;
48258 + ret = spu_acquire(ctx);
48262 - spu_acquire(ctx);
48263 seq_printf(s, "%s %llu %llu %llu %llu "
48264 "%llu %llu %llu %llu %llu %llu %llu %llu\n",
48265 ctx_state_names[ctx->stats.util_state],
48266 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/hw_ops.c powerpc.git/arch/powerpc/platforms/cell/spufs/hw_ops.c
48267 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/hw_ops.c 2008-01-24 23:58:37.000000000 +0100
48268 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/hw_ops.c 2008-01-28 20:25:49.000000000 +0100
48269 @@ -76,16 +76,18 @@
48270 if (stat & 0xff0000)
48271 ret |= POLLIN | POLLRDNORM;
48273 - spu_int_stat_clear(spu, 2, 0x1);
48274 - spu_int_mask_or(spu, 2, 0x1);
48275 + spu_int_stat_clear(spu, 2, CLASS2_MAILBOX_INTR);
48276 + spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_INTR);
48279 if (events & (POLLOUT | POLLWRNORM)) {
48280 if (stat & 0x00ff00)
48281 ret = POLLOUT | POLLWRNORM;
48283 - spu_int_stat_clear(spu, 2, 0x10);
48284 - spu_int_mask_or(spu, 2, 0x10);
48285 + spu_int_stat_clear(spu, 2,
48286 + CLASS2_MAILBOX_THRESHOLD_INTR);
48287 + spu_int_mask_or(spu, 2,
48288 + CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR);
48291 spin_unlock_irq(&spu->register_lock);
48292 @@ -106,7 +108,7 @@
48295 /* make sure we get woken up by the interrupt */
48296 - spu_int_mask_or(spu, 2, 0x1);
48297 + spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_INTR);
48300 spin_unlock_irq(&spu->register_lock);
48301 @@ -127,7 +129,7 @@
48303 /* make sure we get woken up by the interrupt when space
48304 becomes available */
48305 - spu_int_mask_or(spu, 2, 0x10);
48306 + spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR);
48309 spin_unlock_irq(&spu->register_lock);
48310 @@ -206,6 +208,11 @@
48311 return ctx->spu->local_store;
48314 +static void spu_hw_privcntl_write(struct spu_context *ctx, u64 val)
48316 + out_be64(&ctx->spu->priv2->spu_privcntl_RW, val);
48319 static u32 spu_hw_runcntl_read(struct spu_context *ctx)
48321 return in_be32(&ctx->spu->problem->spu_runcntl_RW);
48322 @@ -215,11 +222,21 @@
48324 spin_lock_irq(&ctx->spu->register_lock);
48325 if (val & SPU_RUNCNTL_ISOLATE)
48326 - out_be64(&ctx->spu->priv2->spu_privcntl_RW, 4LL);
48327 + spu_hw_privcntl_write(ctx,
48328 + SPU_PRIVCNT_LOAD_REQUEST_ENABLE_MASK);
48329 out_be32(&ctx->spu->problem->spu_runcntl_RW, val);
48330 spin_unlock_irq(&ctx->spu->register_lock);
48333 +static void spu_hw_runcntl_stop(struct spu_context *ctx)
48335 + spin_lock_irq(&ctx->spu->register_lock);
48336 + out_be32(&ctx->spu->problem->spu_runcntl_RW, SPU_RUNCNTL_STOP);
48337 + while (in_be32(&ctx->spu->problem->spu_status_R) & SPU_STATUS_RUNNING)
48339 + spin_unlock_irq(&ctx->spu->register_lock);
48342 static void spu_hw_master_start(struct spu_context *ctx)
48344 struct spu *spu = ctx->spu;
48345 @@ -319,8 +336,10 @@
48346 .npc_write = spu_hw_npc_write,
48347 .status_read = spu_hw_status_read,
48348 .get_ls = spu_hw_get_ls,
48349 + .privcntl_write = spu_hw_privcntl_write,
48350 .runcntl_read = spu_hw_runcntl_read,
48351 .runcntl_write = spu_hw_runcntl_write,
48352 + .runcntl_stop = spu_hw_runcntl_stop,
48353 .master_start = spu_hw_master_start,
48354 .master_stop = spu_hw_master_stop,
48355 .set_mfc_query = spu_hw_set_mfc_query,
48356 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c powerpc.git/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
48357 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c 2008-01-24 23:58:37.000000000 +0100
48358 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c 2008-01-28 20:25:49.000000000 +0100
48360 #include <asm/spu_csa.h>
48361 #include <asm/mmu.h>
48363 +#include "spufs.h"
48365 static int spu_alloc_lscsa_std(struct spu_state *csa)
48367 struct spu_lscsa *lscsa;
48371 /* Check availability of 64K pages */
48372 - if (mmu_psize_defs[MMU_PAGE_64K].shift == 0)
48373 + if (!spu_64k_pages_available())
48376 csa->use_big_pages = 1;
48377 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/run.c powerpc.git/arch/powerpc/platforms/cell/spufs/run.c
48378 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/run.c 2008-01-24 23:58:37.000000000 +0100
48379 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/run.c 2008-01-28 20:25:49.000000000 +0100
48380 @@ -15,24 +15,55 @@
48382 struct spu_context *ctx = spu->ctx;
48384 - wake_up_all(&ctx->stop_wq);
48386 + * It should be impossible to preempt a context while an exception
48387 + * is being processed, since the context switch code is specially
48388 + * coded to deal with interrupts ... But, just in case, sanity check
48389 + * the context pointer. It is OK to return doing nothing since
48390 + * the exception will be regenerated when the context is resumed.
48393 + /* Copy exception arguments into module specific structure */
48394 + ctx->csa.class_0_pending = spu->class_0_pending;
48395 + ctx->csa.dsisr = spu->dsisr;
48396 + ctx->csa.dar = spu->dar;
48398 + /* ensure that the exception status has hit memory before a
48399 + * thread waiting on the context's stop queue is woken */
48402 + wake_up_all(&ctx->stop_wq);
48405 + /* Clear callback arguments from spu structure */
48406 + spu->class_0_pending = 0;
48411 -static inline int spu_stopped(struct spu_context *ctx, u32 *stat)
48412 +int spu_stopped(struct spu_context *ctx, u32 *stat)
48419 *stat = ctx->ops->status_read(ctx);
48422 - if (ctx->state != SPU_STATE_RUNNABLE ||
48423 - test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
48424 + if (test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
48427 + stopped = SPU_STATUS_INVALID_INSTR | SPU_STATUS_SINGLE_STEP |
48428 + SPU_STATUS_STOPPED_BY_HALT | SPU_STATUS_STOPPED_BY_STOP;
48429 + if (*stat & stopped)
48432 + dsisr = ctx->csa.dsisr;
48433 + if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))
48435 - pte_fault = spu->dsisr &
48436 - (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED);
48437 - return (!(*stat & SPU_STATUS_RUNNING) || pte_fault || spu->class_0_pending) ?
48440 + if (ctx->csa.class_0_pending)
48446 static int spu_setup_isolated(struct spu_context *ctx)
48447 @@ -128,34 +159,66 @@
48449 static int spu_run_init(struct spu_context *ctx, u32 *npc)
48451 + unsigned long runcntl = SPU_RUNCNTL_RUNNABLE;
48454 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
48456 - if (ctx->flags & SPU_CREATE_ISOLATE) {
48457 - unsigned long runcntl;
48459 + * NOSCHED is synchronous scheduling with respect to the caller.
48460 + * The caller waits for the context to be loaded.
48462 + if (ctx->flags & SPU_CREATE_NOSCHED) {
48463 + if (ctx->state == SPU_STATE_SAVED) {
48464 + ret = spu_activate(ctx, 0);
48471 + * Apply special setup as required.
48473 + if (ctx->flags & SPU_CREATE_ISOLATE) {
48474 if (!(ctx->ops->status_read(ctx) & SPU_STATUS_ISOLATED_STATE)) {
48475 - int ret = spu_setup_isolated(ctx);
48476 + ret = spu_setup_isolated(ctx);
48481 - /* if userspace has set the runcntrl register (eg, to issue an
48482 - * isolated exit), we need to re-set it here */
48484 + * If userspace has set the runcntrl register (eg, to
48485 + * issue an isolated exit), we need to re-set it here
48487 runcntl = ctx->ops->runcntl_read(ctx) &
48488 (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE);
48490 runcntl = SPU_RUNCNTL_RUNNABLE;
48493 + if (ctx->flags & SPU_CREATE_NOSCHED) {
48494 + spuctx_switch_state(ctx, SPU_UTIL_USER);
48495 ctx->ops->runcntl_write(ctx, runcntl);
48497 - unsigned long mode = SPU_PRIVCNTL_MODE_NORMAL;
48498 - ctx->ops->npc_write(ctx, *npc);
48499 + unsigned long privcntl;
48501 if (test_thread_flag(TIF_SINGLESTEP))
48502 - mode = SPU_PRIVCNTL_MODE_SINGLE_STEP;
48503 - out_be64(&ctx->spu->priv2->spu_privcntl_RW, mode);
48504 - ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE);
48506 + privcntl = SPU_PRIVCNTL_MODE_SINGLE_STEP;
48508 + privcntl = SPU_PRIVCNTL_MODE_NORMAL;
48510 - spuctx_switch_state(ctx, SPU_UTIL_USER);
48511 + ctx->ops->npc_write(ctx, *npc);
48512 + ctx->ops->privcntl_write(ctx, privcntl);
48513 + ctx->ops->runcntl_write(ctx, runcntl);
48515 + if (ctx->state == SPU_STATE_SAVED) {
48516 + ret = spu_activate(ctx, 0);
48520 + spuctx_switch_state(ctx, SPU_UTIL_USER);
48526 @@ -165,6 +228,8 @@
48530 + spu_del_from_rq(ctx);
48532 *status = ctx->ops->status_read(ctx);
48533 *npc = ctx->ops->npc_read(ctx);
48535 @@ -177,26 +242,6 @@
48539 -static int spu_reacquire_runnable(struct spu_context *ctx, u32 *npc,
48544 - ret = spu_run_fini(ctx, npc, status);
48548 - if (*status & (SPU_STATUS_STOPPED_BY_STOP | SPU_STATUS_STOPPED_BY_HALT))
48551 - ret = spu_acquire_runnable(ctx, 0);
48555 - spuctx_switch_state(ctx, SPU_UTIL_USER);
48560 * SPU syscall restarting is tricky because we violate the basic
48561 * assumption that the signal handler is running on the interrupted
48562 @@ -247,7 +292,7 @@
48563 u32 ls_pointer, npc;
48569 /* get syscall block from local store */
48570 npc = ctx->ops->npc_read(ctx) & ~3;
48571 @@ -269,9 +314,11 @@
48572 if (spu_ret <= -ERESTARTSYS) {
48573 ret = spu_handle_restartsys(ctx, &spu_ret, &npc);
48575 - spu_acquire(ctx);
48576 + ret2 = spu_acquire(ctx);
48577 if (ret == -ERESTARTSYS)
48583 /* write result, jump over indirect pointer */
48584 @@ -281,18 +328,6 @@
48588 -static inline int spu_process_events(struct spu_context *ctx)
48590 - struct spu *spu = ctx->spu;
48593 - if (spu->class_0_pending)
48594 - ret = spu_irq_class_0_bottom(spu);
48595 - if (!ret && signal_pending(current))
48596 - ret = -ERESTARTSYS;
48600 long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
48603 @@ -302,29 +337,14 @@
48604 if (mutex_lock_interruptible(&ctx->run_mutex))
48605 return -ERESTARTSYS;
48607 - ctx->ops->master_start(ctx);
48608 + spu_enable_spu(ctx);
48609 ctx->event_return = 0;
48611 - spu_acquire(ctx);
48612 - if (ctx->state == SPU_STATE_SAVED) {
48613 - __spu_update_sched_info(ctx);
48614 - spu_set_timeslice(ctx);
48616 - ret = spu_activate(ctx, 0);
48618 - spu_release(ctx);
48623 - * We have to update the scheduling priority under active_mutex
48624 - * to protect against find_victim().
48626 - * No need to update the timeslice ASAP, it will get updated
48627 - * once the current one has expired.
48629 - spu_update_sched_info(ctx);
48631 + ret = spu_acquire(ctx);
48635 + spu_update_sched_info(ctx);
48637 ret = spu_run_init(ctx, npc);
48639 @@ -358,14 +378,12 @@
48643 - if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) {
48644 - ret = spu_reacquire_runnable(ctx, npc, &status);
48649 - ret = spu_process_events(ctx);
48650 + ret = spufs_handle_class0(ctx);
48654 + if (signal_pending(current))
48655 + ret = -ERESTARTSYS;
48656 } while (!ret && !(status & (SPU_STATUS_STOPPED_BY_STOP |
48657 SPU_STATUS_STOPPED_BY_HALT |
48658 SPU_STATUS_SINGLE_STEP)));
48659 @@ -376,11 +394,10 @@
48660 ctx->stats.libassist++;
48663 - ctx->ops->master_stop(ctx);
48664 + spu_disable_spu(ctx);
48665 ret = spu_run_fini(ctx, npc, &status);
48670 ((ret == -ERESTARTSYS) &&
48671 ((status & SPU_STATUS_STOPPED_BY_HALT) ||
48672 @@ -401,6 +418,7 @@
48675 *event = ctx->event_return;
48677 mutex_unlock(&ctx->run_mutex);
48680 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/sched.c powerpc.git/arch/powerpc/platforms/cell/spufs/sched.c
48681 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/sched.c 2008-01-24 23:58:37.000000000 +0100
48682 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/sched.c 2008-01-28 20:25:49.000000000 +0100
48684 static struct spu_prio_array *spu_prio;
48685 static struct task_struct *spusched_task;
48686 static struct timer_list spusched_timer;
48687 +static struct timer_list spuloadavg_timer;
48690 * Priority of a normal, non-rt, non-niced'd process (aka nice level 0).
48691 @@ -105,15 +106,21 @@
48692 void __spu_update_sched_info(struct spu_context *ctx)
48695 - * 32-Bit assignment are atomic on powerpc, and we don't care about
48696 - * memory ordering here because retriving the controlling thread is
48697 - * per defintion racy.
48698 + * assert that the context is not on the runqueue, so it is safe
48699 + * to change its scheduling parameters.
48701 + BUG_ON(!list_empty(&ctx->rq));
48704 + * 32-Bit assignments are atomic on powerpc, and we don't care about
48705 + * memory ordering here because retrieving the controlling thread is
48706 + * per definition racy.
48708 ctx->tid = current->pid;
48711 * We do our own priority calculations, so we normally want
48712 - * ->static_prio to start with. Unfortunately thies field
48713 + * ->static_prio to start with. Unfortunately this field
48714 * contains junk for threads with a realtime scheduling
48715 * policy so we have to look at ->prio in this case.
48717 @@ -124,23 +131,32 @@
48718 ctx->policy = current->policy;
48721 - * A lot of places that don't hold list_mutex poke into
48722 - * cpus_allowed, including grab_runnable_context which
48723 - * already holds the runq_lock. So abuse runq_lock
48724 - * to protect this field aswell.
48725 + * TO DO: the context may be loaded, so we may need to activate
48726 + * it again on a different node. But it shouldn't hurt anything
48727 + * to update its parameters, because we know that the scheduler
48728 + * is not actively looking at this field, since it is not on the
48729 + * runqueue. The context will be rescheduled on the proper node
48730 + * if it is timesliced or preempted.
48732 - spin_lock(&spu_prio->runq_lock);
48733 ctx->cpus_allowed = current->cpus_allowed;
48734 - spin_unlock(&spu_prio->runq_lock);
48737 void spu_update_sched_info(struct spu_context *ctx)
48739 - int node = ctx->spu->node;
48742 - mutex_lock(&cbe_spu_info[node].list_mutex);
48743 - __spu_update_sched_info(ctx);
48744 - mutex_unlock(&cbe_spu_info[node].list_mutex);
48745 + if (ctx->state == SPU_STATE_RUNNABLE) {
48746 + node = ctx->spu->node;
48749 + * Take list_mutex to sync with find_victim().
48751 + mutex_lock(&cbe_spu_info[node].list_mutex);
48752 + __spu_update_sched_info(ctx);
48753 + mutex_unlock(&cbe_spu_info[node].list_mutex);
48755 + __spu_update_sched_info(ctx);
48759 static int __node_allowed(struct spu_context *ctx, int node)
48760 @@ -174,7 +190,7 @@
48761 * Wake up the active spu_contexts.
48763 * When the awakened processes see their "notify_active" flag is set,
48764 - * they will call spu_switch_notify();
48765 + * they will call spu_switch_notify().
48767 for_each_online_node(node) {
48769 @@ -221,7 +237,6 @@
48770 spu->wbox_callback = spufs_wbox_callback;
48771 spu->stop_callback = spufs_stop_callback;
48772 spu->mfc_callback = spufs_mfc_callback;
48773 - spu->dma_callback = spufs_dma_callback;
48775 spu_unmap_mappings(ctx);
48776 spu_restore(&ctx->csa, spu);
48777 @@ -409,7 +424,6 @@
48778 spu->wbox_callback = NULL;
48779 spu->stop_callback = NULL;
48780 spu->mfc_callback = NULL;
48781 - spu->dma_callback = NULL;
48782 spu_associate_mm(spu, NULL);
48785 @@ -454,6 +468,13 @@
48789 +static void spu_add_to_rq(struct spu_context *ctx)
48791 + spin_lock(&spu_prio->runq_lock);
48792 + __spu_add_to_rq(ctx);
48793 + spin_unlock(&spu_prio->runq_lock);
48796 static void __spu_del_from_rq(struct spu_context *ctx)
48798 int prio = ctx->prio;
48799 @@ -468,10 +489,24 @@
48803 +void spu_del_from_rq(struct spu_context *ctx)
48805 + spin_lock(&spu_prio->runq_lock);
48806 + __spu_del_from_rq(ctx);
48807 + spin_unlock(&spu_prio->runq_lock);
48810 static void spu_prio_wait(struct spu_context *ctx)
48815 + * The caller must explicitly wait for a context to be loaded
48816 + * if the nosched flag is set. If NOSCHED is not set, the caller
48817 + * queues the context and waits for an spu event or error.
48819 + BUG_ON(!(ctx->flags & SPU_CREATE_NOSCHED));
48821 spin_lock(&spu_prio->runq_lock);
48822 prepare_to_wait_exclusive(&ctx->stop_wq, &wait, TASK_INTERRUPTIBLE);
48823 if (!signal_pending(current)) {
48824 @@ -555,7 +590,7 @@
48826 * Look for a possible preemption candidate on the local node first.
48827 * If there is no candidate look at the other nodes. This isn't
48828 - * exactly fair, but so far the whole spu schedule tries to keep
48829 + * exactly fair, but so far the whole spu scheduler tries to keep
48830 * a strong node affinity. We might want to fine-tune this in
48833 @@ -571,6 +606,7 @@
48834 struct spu_context *tmp = spu->ctx;
48836 if (tmp && tmp->prio > ctx->prio &&
48837 + !(tmp->flags & SPU_CREATE_NOSCHED) &&
48838 (!victim || tmp->prio > victim->prio))
48841 @@ -582,6 +618,10 @@
48842 * higher priority contexts before lower priority
48843 * ones, so this is safe until we introduce
48844 * priority inheritance schemes.
48846 + * XXX if the highest priority context is locked,
48847 + * this can loop a long time. Might be better to
48848 + * look at another context or give up after X retries.
48850 if (!mutex_trylock(&victim->state_mutex)) {
48852 @@ -589,10 +629,10 @@
48857 + if (!spu || victim->prio <= ctx->prio) {
48859 * This race can happen because we've dropped
48860 - * the active list mutex. No a problem, just
48861 + * the active list mutex. Not a problem, just
48862 * restart the search.
48864 mutex_unlock(&victim->state_mutex);
48865 @@ -607,13 +647,10 @@
48867 victim->stats.invol_ctx_switch++;
48868 spu->stats.invol_ctx_switch++;
48869 + spu_add_to_rq(victim);
48871 mutex_unlock(&victim->state_mutex);
48873 - * We need to break out of the wait loop in spu_run
48874 - * manually to ensure this context gets put on the
48875 - * runqueue again ASAP.
48877 - wake_up(&victim->stop_wq);
48882 @@ -621,6 +658,50 @@
48886 +static void __spu_schedule(struct spu *spu, struct spu_context *ctx)
48888 + int node = spu->node;
48891 + spu_set_timeslice(ctx);
48893 + mutex_lock(&cbe_spu_info[node].list_mutex);
48894 + if (spu->ctx == NULL) {
48895 + spu_bind_context(spu, ctx);
48896 + cbe_spu_info[node].nr_active++;
48897 + spu->alloc_state = SPU_USED;
48900 + mutex_unlock(&cbe_spu_info[node].list_mutex);
48903 + wake_up_all(&ctx->run_wq);
48905 + spu_add_to_rq(ctx);
48908 +static void spu_schedule(struct spu *spu, struct spu_context *ctx)
48910 + /* not a candidate for interruptible because it's called either
48911 + from the scheduler thread or from spu_deactivate */
48912 + mutex_lock(&ctx->state_mutex);
48913 + __spu_schedule(spu, ctx);
48914 + spu_release(ctx);
48917 +static void spu_unschedule(struct spu *spu, struct spu_context *ctx)
48919 + int node = spu->node;
48921 + mutex_lock(&cbe_spu_info[node].list_mutex);
48922 + cbe_spu_info[node].nr_active--;
48923 + spu->alloc_state = SPU_FREE;
48924 + spu_unbind_context(spu, ctx);
48925 + ctx->stats.invol_ctx_switch++;
48926 + spu->stats.invol_ctx_switch++;
48927 + mutex_unlock(&cbe_spu_info[node].list_mutex);
48931 * spu_activate - find a free spu for a context and execute it
48932 * @ctx: spu context to schedule
48933 @@ -632,39 +713,47 @@
48935 int spu_activate(struct spu_context *ctx, unsigned long flags)
48942 - * If there are multiple threads waiting for a single context
48943 - * only one actually binds the context while the others will
48944 - * only be able to acquire the state_mutex once the context
48945 - * already is in runnable state.
48950 + * If there are multiple threads waiting for a single context
48951 + * only one actually binds the context while the others will
48952 + * only be able to acquire the state_mutex once the context
48953 + * already is in runnable state.
48958 - spu = spu_get_idle(ctx);
48960 - * If this is a realtime thread we try to get it running by
48961 - * preempting a lower priority thread.
48963 - if (!spu && rt_prio(ctx->prio))
48964 - spu = find_victim(ctx);
48966 - int node = spu->node;
48968 + if (signal_pending(current))
48969 + return -ERESTARTSYS;
48971 - mutex_lock(&cbe_spu_info[node].list_mutex);
48972 - spu_bind_context(spu, ctx);
48973 - cbe_spu_info[node].nr_active++;
48974 - mutex_unlock(&cbe_spu_info[node].list_mutex);
48977 + spu = spu_get_idle(ctx);
48979 + * If this is a realtime thread we try to get it running by
48980 + * preempting a lower priority thread.
48982 + if (!spu && rt_prio(ctx->prio))
48983 + spu = find_victim(ctx);
48985 + unsigned long runcntl;
48987 + runcntl = ctx->ops->runcntl_read(ctx);
48988 + __spu_schedule(spu, ctx);
48989 + if (runcntl & SPU_RUNCNTL_RUNNABLE)
48990 + spuctx_switch_state(ctx, SPU_UTIL_USER);
48995 + if (ctx->flags & SPU_CREATE_NOSCHED) {
48996 spu_prio_wait(ctx);
48997 - } while (!signal_pending(current));
48998 + goto spu_activate_top;
49001 + spu_add_to_rq(ctx);
49003 - return -ERESTARTSYS;
49008 @@ -706,21 +795,19 @@
49010 new = grab_runnable_context(max_prio, spu->node);
49011 if (new || force) {
49012 - int node = spu->node;
49014 - mutex_lock(&cbe_spu_info[node].list_mutex);
49015 - spu_unbind_context(spu, ctx);
49016 - spu->alloc_state = SPU_FREE;
49017 - cbe_spu_info[node].nr_active--;
49018 - mutex_unlock(&cbe_spu_info[node].list_mutex);
49020 - ctx->stats.vol_ctx_switch++;
49021 - spu->stats.vol_ctx_switch++;
49024 - wake_up(&new->stop_wq);
49025 + spu_unschedule(spu, ctx);
49027 + if (new->flags & SPU_CREATE_NOSCHED)
49028 + wake_up(&new->stop_wq);
49030 + spu_release(ctx);
49031 + spu_schedule(spu, new);
49032 + /* this one can't easily be made
49034 + mutex_lock(&ctx->state_mutex);
49041 return new != NULL;
49042 @@ -757,43 +844,38 @@
49044 static noinline void spusched_tick(struct spu_context *ctx)
49046 + struct spu_context *new = NULL;
49047 + struct spu *spu = NULL;
49050 + if (spu_acquire(ctx))
49051 + BUG(); /* a kernel thread never has signals pending */
49053 + if (ctx->state != SPU_STATE_RUNNABLE)
49055 + if (spu_stopped(ctx, &status))
49057 if (ctx->flags & SPU_CREATE_NOSCHED)
49060 if (ctx->policy == SCHED_FIFO)
49064 if (--ctx->time_slice)
49068 - * Unfortunately list_mutex ranks outside of state_mutex, so
49069 - * we have to trylock here. If we fail give the context another
49070 - * tick and try again.
49072 - if (mutex_trylock(&ctx->state_mutex)) {
49073 - struct spu *spu = ctx->spu;
49074 - struct spu_context *new;
49077 - new = grab_runnable_context(ctx->prio + 1, spu->node);
49079 - spu_unbind_context(spu, ctx);
49080 - ctx->stats.invol_ctx_switch++;
49081 - spu->stats.invol_ctx_switch++;
49082 - spu->alloc_state = SPU_FREE;
49083 - cbe_spu_info[spu->node].nr_active--;
49084 - wake_up(&new->stop_wq);
49086 - * We need to break out of the wait loop in
49087 - * spu_run manually to ensure this context
49088 - * gets put on the runqueue again ASAP.
49090 - wake_up(&ctx->stop_wq);
49092 - spu_set_timeslice(ctx);
49093 - mutex_unlock(&ctx->state_mutex);
49095 + new = grab_runnable_context(ctx->prio + 1, spu->node);
49097 + spu_unschedule(spu, ctx);
49098 + spu_add_to_rq(ctx);
49103 + spu_release(ctx);
49106 + spu_schedule(spu, new);
49110 @@ -817,35 +899,31 @@
49114 - * spu_calc_load - given tick count, update the avenrun load estimates.
49115 - * @tick: tick count
49116 + * spu_calc_load - update the avenrun load estimates.
49118 * No locking against reading these values from userspace, as for
49119 * the CPU loadavg code.
49121 -static void spu_calc_load(unsigned long ticks)
49122 +static void spu_calc_load(void)
49124 unsigned long active_tasks; /* fixed-point */
49125 - static int count = LOAD_FREQ;
49129 - if (unlikely(count < 0)) {
49130 - active_tasks = count_active_contexts() * FIXED_1;
49132 - CALC_LOAD(spu_avenrun[0], EXP_1, active_tasks);
49133 - CALC_LOAD(spu_avenrun[1], EXP_5, active_tasks);
49134 - CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks);
49135 - count += LOAD_FREQ;
49136 - } while (count < 0);
49138 + active_tasks = count_active_contexts() * FIXED_1;
49139 + CALC_LOAD(spu_avenrun[0], EXP_1, active_tasks);
49140 + CALC_LOAD(spu_avenrun[1], EXP_5, active_tasks);
49141 + CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks);
49144 static void spusched_wake(unsigned long data)
49146 mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
49147 wake_up_process(spusched_task);
49148 - spu_calc_load(SPUSCHED_TICK);
49151 +static void spuloadavg_wake(unsigned long data)
49153 + mod_timer(&spuloadavg_timer, jiffies + LOAD_FREQ);
49157 static int spusched_thread(void *unused)
49158 @@ -857,17 +935,58 @@
49159 set_current_state(TASK_INTERRUPTIBLE);
49161 for (node = 0; node < MAX_NUMNODES; node++) {
49162 - mutex_lock(&cbe_spu_info[node].list_mutex);
49163 - list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list)
49165 - spusched_tick(spu->ctx);
49166 - mutex_unlock(&cbe_spu_info[node].list_mutex);
49167 + struct mutex *mtx = &cbe_spu_info[node].list_mutex;
49170 + list_for_each_entry(spu, &cbe_spu_info[node].spus,
49172 + struct spu_context *ctx = spu->ctx;
49175 + mutex_unlock(mtx);
49176 + spusched_tick(ctx);
49180 + mutex_unlock(mtx);
49187 +void spuctx_switch_state(struct spu_context *ctx,
49188 + enum spu_utilization_state new_state)
49190 + unsigned long long curtime;
49191 + signed long long delta;
49192 + struct timespec ts;
49194 + enum spu_utilization_state old_state;
49196 + ktime_get_ts(&ts);
49197 + curtime = timespec_to_ns(&ts);
49198 + delta = curtime - ctx->stats.tstamp;
49200 + WARN_ON(!mutex_is_locked(&ctx->state_mutex));
49201 + WARN_ON(delta < 0);
49204 + old_state = ctx->stats.util_state;
49205 + ctx->stats.util_state = new_state;
49206 + ctx->stats.tstamp = curtime;
49209 + * Update the physical SPU utilization statistics.
49212 + ctx->stats.times[old_state] += delta;
49213 + spu->stats.times[old_state] += delta;
49214 + spu->stats.util_state = new_state;
49215 + spu->stats.tstamp = curtime;
49219 #define LOAD_INT(x) ((x) >> FSHIFT)
49220 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
49222 @@ -881,7 +1000,7 @@
49225 * Note that last_pid doesn't really make much sense for the
49226 - * SPU loadavg (it even seems very odd on the CPU side..),
49227 + * SPU loadavg (it even seems very odd on the CPU side...),
49228 * but we include it here to have a 100% compatible interface.
49230 seq_printf(s, "%d.%02d %d.%02d %d.%02d %ld/%d %d\n",
49231 @@ -922,6 +1041,7 @@
49232 spin_lock_init(&spu_prio->runq_lock);
49234 setup_timer(&spusched_timer, spusched_wake, 0);
49235 + setup_timer(&spuloadavg_timer, spuloadavg_wake, 0);
49237 spusched_task = kthread_run(spusched_thread, NULL, "spusched");
49238 if (IS_ERR(spusched_task)) {
49239 @@ -929,6 +1049,8 @@
49240 goto out_free_spu_prio;
49243 + mod_timer(&spuloadavg_timer, 0);
49245 entry = create_proc_entry("spu_loadavg", 0, NULL);
49247 goto out_stop_kthread;
49248 @@ -954,6 +1076,7 @@
49249 remove_proc_entry("spu_loadavg", NULL);
49251 del_timer_sync(&spusched_timer);
49252 + del_timer_sync(&spuloadavg_timer);
49253 kthread_stop(spusched_task);
49255 for (node = 0; node < MAX_NUMNODES; node++) {
49256 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/spufs.h powerpc.git/arch/powerpc/platforms/cell/spufs/spufs.h
49257 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/spufs.h 2008-01-24 23:58:37.000000000 +0100
49258 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/spufs.h 2008-01-28 20:25:49.000000000 +0100
49260 wait_queue_head_t wbox_wq;
49261 wait_queue_head_t stop_wq;
49262 wait_queue_head_t mfc_wq;
49263 + wait_queue_head_t run_wq;
49264 struct fasync_struct *ibox_fasync;
49265 struct fasync_struct *wbox_fasync;
49266 struct fasync_struct *mfc_fasync;
49267 @@ -168,8 +169,10 @@
49268 void (*npc_write) (struct spu_context * ctx, u32 data);
49269 u32(*status_read) (struct spu_context * ctx);
49270 char*(*get_ls) (struct spu_context * ctx);
49271 + void (*privcntl_write) (struct spu_context *ctx, u64 data);
49272 u32 (*runcntl_read) (struct spu_context * ctx);
49273 void (*runcntl_write) (struct spu_context * ctx, u32 data);
49274 + void (*runcntl_stop) (struct spu_context * ctx);
49275 void (*master_start) (struct spu_context * ctx);
49276 void (*master_stop) (struct spu_context * ctx);
49277 int (*set_mfc_query)(struct spu_context * ctx, u32 mask, u32 mode);
49278 @@ -219,15 +222,16 @@
49280 /* fault handling */
49281 int spufs_handle_class1(struct spu_context *ctx);
49282 +int spufs_handle_class0(struct spu_context *ctx);
49285 struct spu *affinity_check(struct spu_context *ctx);
49287 /* context management */
49288 extern atomic_t nr_spu_contexts;
49289 -static inline void spu_acquire(struct spu_context *ctx)
49290 +static inline int __must_check spu_acquire(struct spu_context *ctx)
49292 - mutex_lock(&ctx->state_mutex);
49293 + return mutex_lock_interruptible(&ctx->state_mutex);
49296 static inline void spu_release(struct spu_context *ctx)
49297 @@ -242,10 +246,11 @@
49298 void spu_unmap_mappings(struct spu_context *ctx);
49300 void spu_forget(struct spu_context *ctx);
49301 -int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags);
49302 -void spu_acquire_saved(struct spu_context *ctx);
49303 +int __must_check spu_acquire_saved(struct spu_context *ctx);
49304 void spu_release_saved(struct spu_context *ctx);
49306 +int spu_stopped(struct spu_context *ctx, u32 * stat);
49307 +void spu_del_from_rq(struct spu_context *ctx);
49308 int spu_activate(struct spu_context *ctx, unsigned long flags);
49309 void spu_deactivate(struct spu_context *ctx);
49310 void spu_yield(struct spu_context *ctx);
49311 @@ -279,7 +284,9 @@
49313 spu_release(ctx); \
49315 - spu_acquire(ctx); \
49316 + __ret = spu_acquire(ctx); \
49320 finish_wait(&(wq), &__wait); \
49322 @@ -306,41 +313,16 @@
49323 extern struct spufs_coredump_reader spufs_coredump_read[];
49324 extern int spufs_coredump_num_notes;
49327 - * This function is a little bit too large for an inline, but
49328 - * as fault.c is built into the kernel we can't move it out of
49331 -static inline void spuctx_switch_state(struct spu_context *ctx,
49332 - enum spu_utilization_state new_state)
49334 - unsigned long long curtime;
49335 - signed long long delta;
49336 - struct timespec ts;
49338 - enum spu_utilization_state old_state;
49340 - ktime_get_ts(&ts);
49341 - curtime = timespec_to_ns(&ts);
49342 - delta = curtime - ctx->stats.tstamp;
49344 - WARN_ON(!mutex_is_locked(&ctx->state_mutex));
49345 - WARN_ON(delta < 0);
49348 - old_state = ctx->stats.util_state;
49349 - ctx->stats.util_state = new_state;
49350 - ctx->stats.tstamp = curtime;
49353 - * Update the physical SPU utilization statistics.
49356 - ctx->stats.times[old_state] += delta;
49357 - spu->stats.times[old_state] += delta;
49358 - spu->stats.util_state = new_state;
49359 - spu->stats.tstamp = curtime;
49362 +extern int spu_init_csa(struct spu_state *csa);
49363 +extern void spu_fini_csa(struct spu_state *csa);
49364 +extern int spu_save(struct spu_state *prev, struct spu *spu);
49365 +extern int spu_restore(struct spu_state *new, struct spu *spu);
49366 +extern int spu_switch(struct spu_state *prev, struct spu_state *new,
49367 + struct spu *spu);
49368 +extern int spu_alloc_lscsa(struct spu_state *csa);
49369 +extern void spu_free_lscsa(struct spu_state *csa);
49371 +extern void spuctx_switch_state(struct spu_context *ctx,
49372 + enum spu_utilization_state new_state);
49375 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/cell/spufs/switch.c powerpc.git/arch/powerpc/platforms/cell/spufs/switch.c
49376 --- linux-2.6.24/arch/powerpc/platforms/cell/spufs/switch.c 2008-01-24 23:58:37.000000000 +0100
49377 +++ powerpc.git/arch/powerpc/platforms/cell/spufs/switch.c 2008-01-28 20:25:49.000000000 +0100
49379 #include <asm/spu_csa.h>
49380 #include <asm/mmu_context.h>
49382 +#include "spufs.h"
49384 #include "spu_save_dump.h"
49385 #include "spu_restore_dump.h"
49387 @@ -691,35 +693,9 @@
49388 out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESUME_DMA_QUEUE);
49391 -static inline void get_kernel_slb(u64 ea, u64 slb[2])
49392 +static inline void setup_mfc_slbs(struct spu_state *csa, struct spu *spu,
49393 + unsigned int *code, int code_size)
49397 - if (REGION_ID(ea) == KERNEL_REGION_ID)
49398 - llp = mmu_psize_defs[mmu_linear_psize].sllp;
49400 - llp = mmu_psize_defs[mmu_virtual_psize].sllp;
49401 - slb[0] = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
49402 - SLB_VSID_KERNEL | llp;
49403 - slb[1] = (ea & ESID_MASK) | SLB_ESID_V;
49406 -static inline void load_mfc_slb(struct spu *spu, u64 slb[2], int slbe)
49408 - struct spu_priv2 __iomem *priv2 = spu->priv2;
49410 - out_be64(&priv2->slb_index_W, slbe);
49412 - out_be64(&priv2->slb_vsid_RW, slb[0]);
49413 - out_be64(&priv2->slb_esid_RW, slb[1]);
49417 -static inline void setup_mfc_slbs(struct spu_state *csa, struct spu *spu)
49420 - u64 lscsa_slb[2];
49423 * Restore, Step 30.
49424 * If MFC_SR1[R]=1, write 0 to SLB_Invalidate_All
49425 @@ -735,11 +711,7 @@
49426 * translation is desired by OS environment).
49428 spu_invalidate_slbs(spu);
49429 - get_kernel_slb((unsigned long)&spu_save_code[0], code_slb);
49430 - get_kernel_slb((unsigned long)csa->lscsa, lscsa_slb);
49431 - load_mfc_slb(spu, code_slb, 0);
49432 - if ((lscsa_slb[0] != code_slb[0]) || (lscsa_slb[1] != code_slb[1]))
49433 - load_mfc_slb(spu, lscsa_slb, 1);
49434 + spu_setup_kernel_slbs(spu, csa->lscsa, code, code_size);
49437 static inline void set_switch_active(struct spu_state *csa, struct spu *spu)
49438 @@ -768,9 +740,9 @@
49439 * (translation) interrupts.
49441 spin_lock_irq(&spu->register_lock);
49442 - spu_int_stat_clear(spu, 0, ~0ul);
49443 - spu_int_stat_clear(spu, 1, ~0ul);
49444 - spu_int_stat_clear(spu, 2, ~0ul);
49445 + spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
49446 + spu_int_stat_clear(spu, 1, CLASS1_INTR_MASK);
49447 + spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
49448 spu_int_mask_set(spu, 0, 0ul);
49449 spu_int_mask_set(spu, 1, class1_mask);
49450 spu_int_mask_set(spu, 2, 0ul);
49451 @@ -927,8 +899,8 @@
49452 POLL_WHILE_FALSE(in_be32(&prob->dma_tagstatus_R) & mask);
49454 local_irq_save(flags);
49455 - spu_int_stat_clear(spu, 0, ~(0ul));
49456 - spu_int_stat_clear(spu, 2, ~(0ul));
49457 + spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
49458 + spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
49459 local_irq_restore(flags);
49462 @@ -946,8 +918,8 @@
49463 POLL_WHILE_TRUE(in_be32(&prob->spu_status_R) & SPU_STATUS_RUNNING);
49465 local_irq_save(flags);
49466 - spu_int_stat_clear(spu, 0, ~(0ul));
49467 - spu_int_stat_clear(spu, 2, ~(0ul));
49468 + spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
49469 + spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
49470 local_irq_restore(flags);
49473 @@ -1423,9 +1395,9 @@
49474 spu_int_mask_set(spu, 0, 0ul);
49475 spu_int_mask_set(spu, 1, 0ul);
49476 spu_int_mask_set(spu, 2, 0ul);
49477 - spu_int_stat_clear(spu, 0, ~0ul);
49478 - spu_int_stat_clear(spu, 1, ~0ul);
49479 - spu_int_stat_clear(spu, 2, ~0ul);
49480 + spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
49481 + spu_int_stat_clear(spu, 1, CLASS1_INTR_MASK);
49482 + spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
49483 spin_unlock_irq(&spu->register_lock);
49486 @@ -1866,7 +1838,8 @@
49489 resume_mfc_queue(prev, spu); /* Step 46. */
49490 - setup_mfc_slbs(prev, spu); /* Step 47. */
49492 + setup_mfc_slbs(prev, spu, spu_save_code, sizeof(spu_save_code));
49493 set_switch_active(prev, spu); /* Step 48. */
49494 enable_interrupts(prev, spu); /* Step 49. */
49495 save_ls_16kb(prev, spu); /* Step 50. */
49496 @@ -1971,7 +1944,8 @@
49497 setup_spu_status_part1(next, spu); /* Step 27. */
49498 setup_spu_status_part2(next, spu); /* Step 28. */
49499 restore_mfc_rag(next, spu); /* Step 29. */
49500 - setup_mfc_slbs(next, spu); /* Step 30. */
49502 + setup_mfc_slbs(next, spu, spu_restore_code, sizeof(spu_restore_code));
49503 set_spu_npc(next, spu); /* Step 31. */
49504 set_signot1(next, spu); /* Step 32. */
49505 set_signot2(next, spu); /* Step 33. */
49506 @@ -2103,10 +2077,6 @@
49509 acquire_spu_lock(spu); /* Step 1. */
49510 - prev->dar = spu->dar;
49511 - prev->dsisr = spu->dsisr;
49514 rc = __do_spu_save(prev, spu); /* Steps 2-53. */
49515 release_spu_lock(spu);
49516 if (rc != 0 && rc != 2 && rc != 6) {
49517 @@ -2133,9 +2103,6 @@
49518 acquire_spu_lock(spu);
49519 harvest(NULL, spu);
49520 spu->slb_replace = 0;
49523 - spu->class_0_pending = 0;
49524 rc = __do_spu_restore(new, spu);
49525 release_spu_lock(spu);
49527 @@ -2215,10 +2182,8 @@
49531 -EXPORT_SYMBOL_GPL(spu_init_csa);
49533 void spu_fini_csa(struct spu_state *csa)
49535 spu_free_lscsa(csa);
49537 -EXPORT_SYMBOL_GPL(spu_fini_csa);
49538 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/celleb/Kconfig powerpc.git/arch/powerpc/platforms/celleb/Kconfig
49539 --- linux-2.6.24/arch/powerpc/platforms/celleb/Kconfig 2008-01-24 23:58:37.000000000 +0100
49540 +++ powerpc.git/arch/powerpc/platforms/celleb/Kconfig 2008-01-28 20:25:49.000000000 +0100
49542 bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
49543 depends on PPC_MULTIPLATFORM && PPC64
49545 + select PPC_CELL_NATIVE
49547 select PPC_INDIRECT_IO
49548 select PPC_OF_PLATFORM_PCI
49549 select HAS_TXX9_SERIAL
49550 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/celleb/io-workarounds.c powerpc.git/arch/powerpc/platforms/celleb/io-workarounds.c
49551 --- linux-2.6.24/arch/powerpc/platforms/celleb/io-workarounds.c 2008-01-24 23:58:37.000000000 +0100
49552 +++ powerpc.git/arch/powerpc/platforms/celleb/io-workarounds.c 2008-01-28 20:25:49.000000000 +0100
49557 +#include <linux/of.h>
49558 #include <linux/of_device.h>
49559 #include <linux/irq.h>
49561 @@ -222,7 +223,7 @@
49562 void (*dummy_read)(struct pci_controller *))
49564 struct celleb_pci_bus *bus = &celleb_pci_busses[celleb_pci_count];
49565 - struct device_node *np = phb->arch_data;
49566 + struct device_node *np = phb->dn;
49568 if (celleb_pci_count >= MAX_CELLEB_PCI_BUS) {
49569 printk(KERN_ERR "Too many pci bridges, workarounds"
49570 @@ -256,13 +257,13 @@
49572 celleb_dummy_page_va = kmalloc(PAGE_SIZE, GFP_KERNEL);
49573 if (!celleb_dummy_page_va) {
49574 - printk(KERN_ERR "Celleb: dummy read disabled."
49575 + printk(KERN_ERR "Celleb: dummy read disabled. "
49576 "Alloc celleb_dummy_page_va failed\n");
49580 list_for_each_entry(phb, &hose_list, list_node) {
49581 - node = phb->arch_data;
49583 match = of_match_node(celleb_pci_workaround_match, node);
49586 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/celleb/iommu.c powerpc.git/arch/powerpc/platforms/celleb/iommu.c
49587 --- linux-2.6.24/arch/powerpc/platforms/celleb/iommu.c 2008-01-24 23:58:37.000000000 +0100
49588 +++ powerpc.git/arch/powerpc/platforms/celleb/iommu.c 2008-01-28 20:25:49.000000000 +0100
49590 #include <linux/init.h>
49591 #include <linux/dma-mapping.h>
49592 #include <linux/pci.h>
49593 +#include <linux/of_platform.h>
49595 -#include <asm/of_platform.h>
49596 +#include <asm/machdep.h>
49598 #include "beat_wrapper.h"
49604 +static unsigned long celleb_dma_direct_offset;
49606 static void __init celleb_init_direct_mapping(void)
49608 u64 lpar_addr, io_addr;
49613 - dma_direct_offset = dma_base;
49614 + celleb_dma_direct_offset = dma_base;
49617 +static void celleb_dma_dev_setup(struct device *dev)
49619 + dev->archdata.dma_ops = get_pci_dma_ops();
49620 + dev->archdata.dma_data = (void *)celleb_dma_direct_offset;
49623 +static void celleb_pci_dma_dev_setup(struct pci_dev *pdev)
49625 + celleb_dma_dev_setup(&pdev->dev);
49628 static int celleb_of_bus_notify(struct notifier_block *nb,
49630 if (action != BUS_NOTIFY_ADD_DEVICE)
49633 - dev->archdata.dma_ops = get_pci_dma_ops();
49634 + celleb_dma_dev_setup(dev);
49638 @@ -91,14 +105,12 @@
49640 static int __init celleb_init_iommu(void)
49642 - if (!machine_is(celleb))
49645 celleb_init_direct_mapping();
49646 set_pci_dma_ops(&dma_direct_ops);
49647 + ppc_md.pci_dma_dev_setup = celleb_pci_dma_dev_setup;
49648 bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);
49653 -arch_initcall(celleb_init_iommu);
49654 +machine_arch_initcall(celleb_beat, celleb_init_iommu);
49655 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/celleb/pci.c powerpc.git/arch/powerpc/platforms/celleb/pci.c
49656 --- linux-2.6.24/arch/powerpc/platforms/celleb/pci.c 2008-01-24 23:58:37.000000000 +0100
49657 +++ powerpc.git/arch/powerpc/platforms/celleb/pci.c 2008-01-28 20:25:49.000000000 +0100
49659 #include <linux/init.h>
49660 #include <linux/bootmem.h>
49661 #include <linux/pci_regs.h>
49662 +#include <linux/of.h>
49663 #include <linux/of_device.h>
49665 #include <asm/io.h>
49666 @@ -138,8 +139,6 @@
49667 *val = celleb_fake_config_readl(p);
49674 static void celleb_config_write_fake(unsigned char *config, int where,
49675 @@ -158,7 +157,6 @@
49676 celleb_fake_config_writel(val, p);
49682 static int celleb_fake_pci_read_config(struct pci_bus *bus,
49683 @@ -351,6 +349,10 @@
49684 wi1 = of_get_property(node, "vendor-id", NULL);
49685 wi2 = of_get_property(node, "class-code", NULL);
49686 wi3 = of_get_property(node, "revision-id", NULL);
49687 + if (!wi0 || !wi1 || !wi2 || !wi3) {
49688 + printk(KERN_ERR "PCI: Missing device tree properties.\n");
49692 celleb_config_write_fake(*config, PCI_DEVICE_ID, 2, wi0[0] & 0xffff);
49693 celleb_config_write_fake(*config, PCI_VENDOR_ID, 2, wi1[0] & 0xffff);
49694 @@ -372,6 +374,10 @@
49695 celleb_setup_pci_base_addrs(hose, devno, fn, num_base_addr);
49697 li = of_get_property(node, "interrupts", &rlen);
49699 + printk(KERN_ERR "PCI: interrupts not found.\n");
49703 celleb_config_write_fake(*config, PCI_INTERRUPT_PIN, 1, 1);
49704 celleb_config_write_fake(*config, PCI_INTERRUPT_LINE, 1, val);
49705 @@ -475,7 +481,7 @@
49707 int __init celleb_setup_phb(struct pci_controller *phb)
49709 - struct device_node *dev = phb->arch_data;
49710 + struct device_node *dev = phb->dn;
49711 const struct of_device_id *match;
49712 int (*setup_func)(struct device_node *, struct pci_controller *);
49714 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/celleb/scc_epci.c powerpc.git/arch/powerpc/platforms/celleb/scc_epci.c
49715 --- linux-2.6.24/arch/powerpc/platforms/celleb/scc_epci.c 2008-01-24 23:58:37.000000000 +0100
49716 +++ powerpc.git/arch/powerpc/platforms/celleb/scc_epci.c 2008-01-28 20:25:49.000000000 +0100
49718 private->dummy_page_da = dma_map_single(hose->parent,
49719 celleb_dummy_page_va, PAGE_SIZE, DMA_FROM_DEVICE);
49720 if (private->dummy_page_da == DMA_ERROR_CODE) {
49721 - printk(KERN_ERR "EPCI: dummy read disabled."
49722 + printk(KERN_ERR "EPCI: dummy read disabled. "
49723 "Map dummy page failed.\n");
49726 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/celleb/scc_uhc.c powerpc.git/arch/powerpc/platforms/celleb/scc_uhc.c
49727 --- linux-2.6.24/arch/powerpc/platforms/celleb/scc_uhc.c 2008-01-24 23:58:37.000000000 +0100
49728 +++ powerpc.git/arch/powerpc/platforms/celleb/scc_uhc.c 2008-01-28 20:25:49.000000000 +0100
49733 - if (!machine_is(celleb))
49734 + if (!machine_is(celleb_beat) &&
49735 + !machine_is(celleb_native))
49738 uhc_base = ioremap(pci_resource_start(dev, 0),
49739 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/celleb/setup.c powerpc.git/arch/powerpc/platforms/celleb/setup.c
49740 --- linux-2.6.24/arch/powerpc/platforms/celleb/setup.c 2008-01-24 23:58:37.000000000 +0100
49741 +++ powerpc.git/arch/powerpc/platforms/celleb/setup.c 2008-01-28 20:25:49.000000000 +0100
49743 #include <linux/seq_file.h>
49744 #include <linux/root_dev.h>
49745 #include <linux/console.h>
49746 +#include <linux/of_platform.h>
49748 #include <asm/mmu.h>
49749 #include <asm/processor.h>
49750 @@ -52,12 +53,16 @@
49751 #include <asm/time.h>
49752 #include <asm/spu_priv1.h>
49753 #include <asm/firmware.h>
49754 -#include <asm/of_platform.h>
49755 +#include <asm/rtas.h>
49756 +#include <asm/cell-regs.h>
49758 #include "interrupt.h"
49759 #include "beat_wrapper.h"
49762 +#include "../cell/interrupt.h"
49763 +#include "../cell/pervasive.h"
49764 +#include "../cell/ras.h"
49766 static char celleb_machine_type[128] = "Celleb";
49768 @@ -88,61 +93,122 @@
49769 printk("*** %04x : %s\n", hex, s ? s : "");
49772 -static void __init celleb_setup_arch(void)
49773 +static void __init celleb_setup_arch_common(void)
49775 + /* init to some ~sane value until calibrate_delay() runs */
49776 + loops_per_jiffy = 50000000;
49778 +#ifdef CONFIG_DUMMY_CONSOLE
49779 + conswitchp = &dummy_con;
49783 +static struct of_device_id celleb_bus_ids[] __initdata = {
49784 + { .type = "scc", },
49785 + { .type = "ioif", }, /* old style */
49789 +static int __init celleb_publish_devices(void)
49791 + /* Publish OF platform devices for southbridge IOs */
49792 + of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
49794 + celleb_pci_workaround_init();
49798 +machine_device_initcall(celleb_beat, celleb_publish_devices);
49799 +machine_device_initcall(celleb_native, celleb_publish_devices);
49803 + * functions for Celleb-Beat
49805 +static void __init celleb_setup_arch_beat(void)
49807 #ifdef CONFIG_SPU_BASE
49808 - spu_priv1_ops = &spu_priv1_beat_ops;
49809 - spu_management_ops = &spu_management_of_ops;
49810 + spu_priv1_ops = &spu_priv1_beat_ops;
49811 + spu_management_ops = &spu_management_of_ops;
49818 - /* init to some ~sane value until calibrate_delay() runs */
49819 - loops_per_jiffy = 50000000;
49821 -#ifdef CONFIG_DUMMY_CONSOLE
49822 - conswitchp = &dummy_con;
49824 + celleb_setup_arch_common();
49827 -static int __init celleb_probe(void)
49828 +static int __init celleb_probe_beat(void)
49830 unsigned long root = of_get_flat_dt_root();
49832 if (!of_flat_dt_is_compatible(root, "Beat"))
49835 - powerpc_firmware_features |= FW_FEATURE_CELLEB_POSSIBLE;
49836 + powerpc_firmware_features |= FW_FEATURE_CELLEB_ALWAYS
49837 + | FW_FEATURE_BEAT | FW_FEATURE_LPAR;
49838 hpte_init_beat_v3();
49843 -static struct of_device_id celleb_bus_ids[] __initdata = {
49844 - { .type = "scc", },
49845 - { .type = "ioif", }, /* old style */
49849 -static int __init celleb_publish_devices(void)
49851 + * functions for Celleb-native
49853 +static void __init celleb_init_IRQ_native(void)
49855 - if (!machine_is(celleb))
49858 + spider_init_IRQ();
49861 - /* Publish OF platform devices for southbridge IOs */
49862 - of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
49863 +static void __init celleb_setup_arch_native(void)
49865 +#ifdef CONFIG_SPU_BASE
49866 + spu_priv1_ops = &spu_priv1_mmio_ops;
49867 + spu_management_ops = &spu_management_of_ops;
49870 - celleb_pci_workaround_init();
49874 +#ifdef CONFIG_CBE_RAS
49882 + cbe_pervasive_init();
49884 + /* XXX: nvram initialization should be added */
49886 + celleb_setup_arch_common();
49889 +static int __init celleb_probe_native(void)
49891 + unsigned long root = of_get_flat_dt_root();
49893 + if (of_flat_dt_is_compatible(root, "Beat") ||
49894 + !of_flat_dt_is_compatible(root, "TOSHIBA,Celleb"))
49897 + powerpc_firmware_features |= FW_FEATURE_CELLEB_ALWAYS;
49898 + hpte_init_native();
49902 -device_initcall(celleb_publish_devices);
49904 -define_machine(celleb) {
49905 - .name = "Cell Reference Set",
49906 - .probe = celleb_probe,
49907 - .setup_arch = celleb_setup_arch,
49910 + * machine definitions
49912 +define_machine(celleb_beat) {
49913 + .name = "Cell Reference Set (Beat)",
49914 + .probe = celleb_probe_beat,
49915 + .setup_arch = celleb_setup_arch_beat,
49916 .show_cpuinfo = celleb_show_cpuinfo,
49917 .restart = beat_restart,
49918 .power_off = beat_power_off,
49919 @@ -167,3 +233,26 @@
49920 .machine_crash_shutdown = default_machine_crash_shutdown,
49924 +define_machine(celleb_native) {
49925 + .name = "Cell Reference Set (native)",
49926 + .probe = celleb_probe_native,
49927 + .setup_arch = celleb_setup_arch_native,
49928 + .show_cpuinfo = celleb_show_cpuinfo,
49929 + .restart = rtas_restart,
49930 + .power_off = rtas_power_off,
49931 + .halt = rtas_halt,
49932 + .get_boot_time = rtas_get_boot_time,
49933 + .get_rtc_time = rtas_get_rtc_time,
49934 + .set_rtc_time = rtas_set_rtc_time,
49935 + .calibrate_decr = generic_calibrate_decr,
49936 + .progress = celleb_progress,
49937 + .pci_probe_mode = celleb_pci_probe_mode,
49938 + .pci_setup_phb = celleb_setup_phb,
49939 + .init_IRQ = celleb_init_IRQ_native,
49940 +#ifdef CONFIG_KEXEC
49941 + .machine_kexec = default_machine_kexec,
49942 + .machine_kexec_prepare = default_machine_kexec_prepare,
49943 + .machine_crash_shutdown = default_machine_crash_shutdown,
49946 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/chrp/pci.c powerpc.git/arch/powerpc/platforms/chrp/pci.c
49947 --- linux-2.6.24/arch/powerpc/platforms/chrp/pci.c 2008-01-24 23:58:37.000000000 +0100
49948 +++ powerpc.git/arch/powerpc/platforms/chrp/pci.c 2008-01-28 20:25:49.000000000 +0100
49949 @@ -198,7 +198,7 @@
49950 printk ("RTAS supporting Pegasos OF not found, please upgrade"
49951 " your firmware\n");
49953 - pci_assign_all_buses = 1;
49954 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
49955 /* keep the reference to the root node */
49958 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/chrp/setup.c powerpc.git/arch/powerpc/platforms/chrp/setup.c
49959 --- linux-2.6.24/arch/powerpc/platforms/chrp/setup.c 2008-01-24 23:58:37.000000000 +0100
49960 +++ powerpc.git/arch/powerpc/platforms/chrp/setup.c 2008-01-28 20:25:49.000000000 +0100
49961 @@ -115,7 +115,7 @@
49962 seq_printf(m, "machine\t\t: CHRP %s\n", model);
49964 /* longtrail (goldengate) stuff */
49965 - if (!strncmp(model, "IBM,LongTrail", 13)) {
49966 + if (model && !strncmp(model, "IBM,LongTrail", 13)) {
49967 /* VLSI VAS96011/12 `Golden Gate 2' */
49969 sdramen = (in_le32(gg2_pci_config_base + GG2_PCI_DRAM_CTRL)
49970 @@ -203,15 +203,20 @@
49971 static void __init sio_init(void)
49973 struct device_node *root;
49974 + const char *model;
49976 - if ((root = of_find_node_by_path("/")) &&
49977 - !strncmp(of_get_property(root, "model", NULL),
49978 - "IBM,LongTrail", 13)) {
49979 + root = of_find_node_by_path("/");
49983 + model = of_get_property(root, "model", NULL);
49984 + if (model && !strncmp(model, "IBM,LongTrail", 13)) {
49985 /* logical device 0 (KBC/Keyboard) */
49986 sio_fixup_irq("keyboard", 0, 1, 2);
49987 /* select logical device 1 (KBC/Mouse) */
49988 sio_fixup_irq("mouse", 1, 12, 2);
49994 @@ -251,6 +256,57 @@
49999 + * Per default, input/output-device points to the keyboard/screen
50000 + * If no card is installed, the built-in serial port is used as a fallback.
50001 + * But unfortunately, the firmware does not connect /chosen/{stdin,stdout}
50002 + * the the built-in serial node. Instead, a /failsafe node is created.
50004 +static void chrp_init_early(void)
50006 + struct device_node *node;
50007 + const char *property;
50009 + if (strstr(cmd_line, "console="))
50011 + /* find the boot console from /chosen/stdout */
50014 + node = of_find_node_by_path("/");
50017 + property = of_get_property(node, "model", NULL);
50020 + if (strcmp(property, "Pegasos2"))
50022 + /* this is a Pegasos2 */
50023 + property = of_get_property(of_chosen, "linux,stdout-path", NULL);
50026 + of_node_put(node);
50027 + node = of_find_node_by_path(property);
50030 + property = of_get_property(node, "device_type", NULL);
50033 + if (strcmp(property, "serial"))
50036 + * The 9pin connector is either /failsafe
50037 + * or /pci@80000000/isa@C/serial@i2F8
50038 + * The optional graphics card has also type 'serial' in VGA mode.
50040 + property = of_get_property(node, "name", NULL);
50043 + if (!strcmp(property, "failsafe") || !strcmp(property, "serial"))
50044 + add_preferred_console("ttyS", 0, NULL);
50046 + of_node_put(node);
50049 void __init chrp_setup_arch(void)
50051 struct device_node *root = of_find_node_by_path("/");
50052 @@ -594,6 +650,7 @@
50053 .probe = chrp_probe,
50054 .setup_arch = chrp_setup_arch,
50055 .init = chrp_init2,
50056 + .init_early = chrp_init_early,
50057 .show_cpuinfo = chrp_show_cpuinfo,
50058 .init_IRQ = chrp_init_IRQ,
50059 .restart = rtas_restart,
50060 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/embedded6xx/Kconfig powerpc.git/arch/powerpc/platforms/embedded6xx/Kconfig
50061 --- linux-2.6.24/arch/powerpc/platforms/embedded6xx/Kconfig 2008-01-24 23:58:37.000000000 +0100
50062 +++ powerpc.git/arch/powerpc/platforms/embedded6xx/Kconfig 2008-01-28 20:25:49.000000000 +0100
50065 select PPC_UDBG_16550 if SERIAL_8250
50066 select DEFAULT_UIMAGE
50067 + select MPC10X_OPENPIC
50068 + select MPC10X_BRIDGE
50070 Select LINKSTATION if configuring for one of PPC- (MPC8241)
50071 based NAS systems from Buffalo Technology. So far only
50073 Linkstation-I HD-HLAN and HD-HGLAN versions, and PPC-based
50074 Terastation systems should be supported too.
50077 + bool "IOMEGA StorCenter"
50078 + depends on EMBEDDED6xx
50081 + select PPC_UDBG_16550 if SERIAL_8250
50082 + select WANT_DEVICE_TREE
50083 + select MPC10X_OPENPIC
50084 + select MPC10X_BRIDGE
50086 + Select STORCENTER if configuring for the iomega StorCenter
50087 + with an 8241 CPU in it.
50090 bool "Freescale MPC7448HPC2(Taiga)"
50091 depends on EMBEDDED6xx
50093 select DEFAULT_UIMAGE
50094 select PPC_UDBG_16550
50095 select WANT_DEVICE_TREE
50096 + select TSI108_BRIDGE
50098 Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga)
50101 select TSI108_BRIDGE
50102 select PPC_UDBG_16550
50103 select WANT_DEVICE_TREE
50104 + select TSI108_BRIDGE
50106 Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval
50107 Board with TSI108/9 bridge (Hickory/Holly)
50108 @@ -48,17 +65,13 @@
50110 config TSI108_BRIDGE
50112 - depends on MPC7448HPC2 || PPC_HOLLY
50118 config MPC10X_BRIDGE
50120 - depends on LINKSTATION
50121 select PPC_INDIRECT_PCI
50128 config MPC10X_OPENPIC
50130 - depends on LINKSTATION
50133 config MPC10X_STORE_GATHERING
50134 bool "Enable MPC10x store gathering"
50135 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/embedded6xx/Makefile powerpc.git/arch/powerpc/platforms/embedded6xx/Makefile
50136 --- linux-2.6.24/arch/powerpc/platforms/embedded6xx/Makefile 2008-01-24 23:58:37.000000000 +0100
50137 +++ powerpc.git/arch/powerpc/platforms/embedded6xx/Makefile 2008-01-28 20:25:49.000000000 +0100
50140 obj-$(CONFIG_MPC7448HPC2) += mpc7448_hpc2.o
50141 obj-$(CONFIG_LINKSTATION) += linkstation.o ls_uart.o
50142 +obj-$(CONFIG_STORCENTER) += storcenter.o
50143 obj-$(CONFIG_PPC_HOLLY) += holly.o
50144 obj-$(CONFIG_PPC_PRPMC2800) += prpmc2800.o
50145 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/embedded6xx/holly.c powerpc.git/arch/powerpc/platforms/embedded6xx/holly.c
50146 --- linux-2.6.24/arch/powerpc/platforms/embedded6xx/holly.c 2008-01-24 23:58:37.000000000 +0100
50147 +++ powerpc.git/arch/powerpc/platforms/embedded6xx/holly.c 2008-01-28 20:25:49.000000000 +0100
50148 @@ -20,12 +20,12 @@
50149 #include <linux/console.h>
50150 #include <linux/delay.h>
50151 #include <linux/irq.h>
50152 -#include <linux/ide.h>
50153 #include <linux/seq_file.h>
50154 #include <linux/root_dev.h>
50155 #include <linux/serial.h>
50156 #include <linux/tty.h>
50157 #include <linux/serial_core.h>
50158 +#include <linux/of_platform.h>
50160 #include <asm/system.h>
50161 #include <asm/time.h>
50163 #include <asm/tsi108_irq.h>
50164 #include <asm/tsi108_pci.h>
50165 #include <asm/mpic.h>
50166 -#include <asm/of_platform.h>
50170 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c powerpc.git/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
50171 --- linux-2.6.24/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c 2008-01-24 23:58:37.000000000 +0100
50172 +++ powerpc.git/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c 2008-01-28 20:25:49.000000000 +0100
50175 #define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000
50177 -extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
50179 int mpc7448_hpc2_exclude_device(struct pci_controller *hose,
50180 u_char bus, u_char devfn)
50182 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/embedded6xx/storcenter.c powerpc.git/arch/powerpc/platforms/embedded6xx/storcenter.c
50183 --- linux-2.6.24/arch/powerpc/platforms/embedded6xx/storcenter.c 1970-01-01 01:00:00.000000000 +0100
50184 +++ powerpc.git/arch/powerpc/platforms/embedded6xx/storcenter.c 2008-01-28 20:25:49.000000000 +0100
50187 + * Board setup routines for the storcenter
50189 + * Copyright 2007 (C) Oyvind Repvik (nail@nslu2-linux.org)
50190 + * Copyright 2007 Andy Wilcox, Jon Loeliger
50192 + * Based on linkstation.c by G. Liakhovetski
50194 + * This file is licensed under the terms of the GNU General Public License
50195 + * version 2. This program is licensed "as is" without any warranty of
50196 + * any kind, whether express or implied.
50199 +#include <linux/kernel.h>
50200 +#include <linux/pci.h>
50201 +#include <linux/initrd.h>
50202 +#include <linux/mtd/physmap.h>
50203 +#include <linux/of_platform.h>
50205 +#include <asm/system.h>
50206 +#include <asm/time.h>
50207 +#include <asm/prom.h>
50208 +#include <asm/mpic.h>
50209 +#include <asm/pci-bridge.h>
50211 +#include "mpc10x.h"
50214 +#ifdef CONFIG_MTD_PHYSMAP
50215 +static struct mtd_partition storcenter_physmap_partitions[] = {
50217 + .name = "kernel",
50218 + .offset = 0x000000,
50219 + .size = 0x170000,
50222 + .name = "rootfs",
50223 + .offset = 0x170000,
50224 + .size = 0x590000,
50228 + .offset = 0x700000,
50229 + .size = 0x040000,
50232 + .name = "config",
50233 + .offset = 0x740000,
50234 + .size = 0x0c0000,
50240 +static __initdata struct of_device_id storcenter_of_bus[] = {
50241 + { .name = "soc", },
50245 +static int __init storcenter_device_probe(void)
50247 + of_platform_bus_probe(NULL, storcenter_of_bus, NULL);
50250 +machine_device_initcall(storcenter, storcenter_device_probe);
50253 +static int __init storcenter_add_bridge(struct device_node *dev)
50257 + struct pci_controller *hose;
50258 + const int *bus_range;
50260 + printk("Adding PCI host bridge %s\n", dev->full_name);
50262 + hose = pcibios_alloc_controller(dev);
50263 + if (hose == NULL)
50266 + bus_range = of_get_property(dev, "bus-range", &len);
50267 + hose->first_busno = bus_range ? bus_range[0] : 0;
50268 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
50270 + setup_indirect_pci(hose, MPC10X_MAPB_CNFG_ADDR, MPC10X_MAPB_CNFG_DATA, 0);
50272 + /* Interpret the "ranges" property */
50273 + /* This also maps the I/O region and sets isa_io/mem_base */
50274 + pci_process_bridge_OF_ranges(hose, dev, 1);
50280 +static void __init storcenter_setup_arch(void)
50282 + struct device_node *np;
50284 +#ifdef CONFIG_MTD_PHYSMAP
50285 + physmap_set_partitions(storcenter_physmap_partitions,
50286 + ARRAY_SIZE(storcenter_physmap_partitions));
50289 + /* Lookup PCI host bridges */
50290 + for_each_compatible_node(np, "pci", "mpc10x-pci")
50291 + storcenter_add_bridge(np);
50293 + printk(KERN_INFO "IOMEGA StorCenter\n");
50297 + * Interrupt setup and service. Interrrupts on the turbostation come
50298 + * from the four PCI slots plus onboard 8241 devices: I2C, DUART.
50300 +static void __init storcenter_init_IRQ(void)
50302 + struct mpic *mpic;
50303 + struct device_node *dnp;
50304 + const void *prop;
50306 + phys_addr_t paddr;
50308 + dnp = of_find_node_by_type(NULL, "open-pic");
50312 + prop = of_get_property(dnp, "reg", &size);
50313 + if (prop == NULL) {
50314 + of_node_put(dnp);
50318 + paddr = (phys_addr_t)of_translate_address(dnp, prop);
50319 + mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET,
50320 + 4, 32, " EPIC ");
50322 + of_node_put(dnp);
50324 + BUG_ON(mpic == NULL);
50329 + * openpic_set_sources(0, 5, OpenPIC_Addr + 0x10200);
50330 + * openpic_set_sources(5, 2, OpenPIC_Addr + 0x11120);
50331 + * first_irq, num_irqs, __iomem first_ISR
50332 + * o_ss: i, src: 0, fdf50200
50333 + * o_ss: i, src: 1, fdf50220
50334 + * o_ss: i, src: 2, fdf50240
50335 + * o_ss: i, src: 3, fdf50260
50336 + * o_ss: i, src: 4, fdf50280
50337 + * o_ss: i, src: 5, fdf51120
50338 + * o_ss: i, src: 6, fdf51140
50340 + mpic_assign_isu(mpic, 0, paddr + 0x10200);
50341 + mpic_assign_isu(mpic, 1, paddr + 0x10220);
50342 + mpic_assign_isu(mpic, 2, paddr + 0x10240);
50343 + mpic_assign_isu(mpic, 3, paddr + 0x10260);
50344 + mpic_assign_isu(mpic, 4, paddr + 0x10280);
50345 + mpic_assign_isu(mpic, 5, paddr + 0x11120);
50346 + mpic_assign_isu(mpic, 6, paddr + 0x11140);
50351 +static void storcenter_restart(char *cmd)
50353 + local_irq_disable();
50355 + /* Set exception prefix high - to the firmware */
50356 + _nmask_and_or_msr(0, MSR_IP);
50358 + /* Wait for reset to happen */
50362 +static int __init storcenter_probe(void)
50364 + unsigned long root = of_get_flat_dt_root();
50366 + return of_flat_dt_is_compatible(root, "storcenter");
50369 +define_machine(storcenter){
50370 + .name = "IOMEGA StorCenter",
50371 + .probe = storcenter_probe,
50372 + .setup_arch = storcenter_setup_arch,
50373 + .init_IRQ = storcenter_init_IRQ,
50374 + .get_irq = mpic_get_irq,
50375 + .restart = storcenter_restart,
50376 + .calibrate_decr = generic_calibrate_decr,
50378 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/iseries/Makefile powerpc.git/arch/powerpc/platforms/iseries/Makefile
50379 --- linux-2.6.24/arch/powerpc/platforms/iseries/Makefile 2008-01-24 23:58:37.000000000 +0100
50380 +++ powerpc.git/arch/powerpc/platforms/iseries/Makefile 2008-01-28 20:25:49.000000000 +0100
50382 obj-y += exception.o
50383 obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt_mod.o mf.o lpevents.o \
50384 hvcall.o proc.o htab.o iommu.o misc.o irq.o
50385 -obj-$(CONFIG_PCI) += pci.o vpdinfo.o
50386 +obj-$(CONFIG_PCI) += pci.o
50387 obj-$(CONFIG_SMP) += smp.o
50388 obj-$(CONFIG_VIOPATH) += viopath.o vio.o
50389 obj-$(CONFIG_MODULES) += ksyms.o
50390 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/iseries/iommu.c powerpc.git/arch/powerpc/platforms/iseries/iommu.c
50391 --- linux-2.6.24/arch/powerpc/platforms/iseries/iommu.c 2008-01-24 23:58:37.000000000 +0100
50392 +++ powerpc.git/arch/powerpc/platforms/iseries/iommu.c 2008-01-28 20:25:49.000000000 +0100
50393 @@ -163,8 +163,10 @@
50394 (it->it_type == TCE_PCI) &&
50395 (it->it_offset == tbl->it_offset) &&
50396 (it->it_index == tbl->it_index) &&
50397 - (it->it_size == tbl->it_size))
50398 + (it->it_size == tbl->it_size)) {
50399 + of_node_put(node);
50405 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/iseries/lpevents.c powerpc.git/arch/powerpc/platforms/iseries/lpevents.c
50406 --- linux-2.6.24/arch/powerpc/platforms/iseries/lpevents.c 2008-01-24 23:58:37.000000000 +0100
50407 +++ powerpc.git/arch/powerpc/platforms/iseries/lpevents.c 2008-01-28 20:25:49.000000000 +0100
50408 @@ -239,7 +239,7 @@
50409 * other CPUs, and that the deleted handler isn't
50410 * still running on another CPU when we return.
50412 - synchronize_rcu();
50413 + synchronize_sched();
50417 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/iseries/pci.c powerpc.git/arch/powerpc/platforms/iseries/pci.c
50418 --- linux-2.6.24/arch/powerpc/platforms/iseries/pci.c 2008-01-24 23:58:37.000000000 +0100
50419 +++ powerpc.git/arch/powerpc/platforms/iseries/pci.c 2008-01-28 20:25:49.000000000 +0100
50422 * Copyright (C) 2001 Allan Trautman, IBM Corporation
50423 + * Copyright (C) 2005,2007 Stephen Rothwell, IBM Corp
50425 * iSeries specific routines for PCI.
50427 @@ -19,13 +20,18 @@
50428 * along with this program; if not, write to the Free Software
50429 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
50434 #include <linux/kernel.h>
50435 #include <linux/list.h>
50436 #include <linux/string.h>
50437 #include <linux/init.h>
50438 #include <linux/module.h>
50439 #include <linux/pci.h>
50440 +#include <linux/of.h>
50442 +#include <asm/types.h>
50443 #include <asm/io.h>
50444 #include <asm/irq.h>
50445 #include <asm/prom.h>
50447 #include <asm/abs_addr.h>
50448 #include <asm/firmware.h>
50450 +#include <asm/iseries/hv_types.h>
50451 #include <asm/iseries/hv_call_xm.h>
50452 #include <asm/iseries/mf.h>
50453 #include <asm/iseries/iommu.h>
50456 #include "call_pci.h"
50459 - * Forward declares of prototypes.
50461 -static struct device_node *find_Device_Node(int bus, int devfn);
50463 -static int Pci_Retry_Max = 3; /* Only retry 3 times */
50464 -static int Pci_Error_Flag = 1; /* Set Retry Error on. */
50466 -static struct pci_ops iSeries_pci_ops;
50467 +#define PCI_RETRY_MAX 3
50468 +static int limit_pci_retries = 1; /* Set Retry Error on. */
50473 #define IOMM_TABLE_MAX_ENTRIES 1024
50474 #define IOMM_TABLE_ENTRY_SIZE 0x0000000000400000UL
50475 #define BASE_IO_MEMORY 0xE000000000000000UL
50476 +#define END_IO_MEMORY 0xEFFFFFFFFFFFFFFFUL
50478 static unsigned long max_io_memory = BASE_IO_MEMORY;
50479 static long current_iomm_table_entry;
50480 @@ -70,12 +71,237 @@
50483 static struct device_node *iomm_table[IOMM_TABLE_MAX_ENTRIES];
50484 -static u8 iobar_table[IOMM_TABLE_MAX_ENTRIES];
50485 +static u64 ds_addr_table[IOMM_TABLE_MAX_ENTRIES];
50487 -static const char pci_io_text[] = "iSeries PCI I/O";
50488 static DEFINE_SPINLOCK(iomm_table_lock);
50491 + * Generate a Direct Select Address for the Hypervisor
50493 +static inline u64 iseries_ds_addr(struct device_node *node)
50495 + struct pci_dn *pdn = PCI_DN(node);
50496 + const u32 *sbp = of_get_property(node, "linux,subbus", NULL);
50498 + return ((u64)pdn->busno << 48) + ((u64)(sbp ? *sbp : 0) << 40)
50499 + + ((u64)0x10 << 32);
50503 + * Size of Bus VPD data
50505 +#define BUS_VPDSIZE 1024
50510 +#define VPD_END_OF_AREA 0x79
50511 +#define VPD_ID_STRING 0x82
50512 +#define VPD_VENDOR_AREA 0x84
50517 +#define VPD_FRU_FRAME_ID 0x4649 /* "FI" */
50518 +#define VPD_SLOT_MAP_FORMAT 0x4D46 /* "MF" */
50519 +#define VPD_SLOT_MAP 0x534D /* "SM" */
50522 + * Structures of the areas
50524 +struct mfg_vpd_area {
50530 +#define MFG_ENTRY_SIZE 3
50534 + u8 secondary_agent;
50536 + char card_location[3];
50538 + char reserved[2];
50540 +#define SLOT_ENTRY_SIZE 16
50543 + * Parse the Slot Area
50545 +static void __init iseries_parse_slot_area(struct slot_map *map, int len,
50546 + HvAgentId agent, u8 *phb, char card[4])
50549 + * Parse Slot label until we find the one requested
50551 + while (len > 0) {
50552 + if (map->agent == agent) {
50554 + * If Phb wasn't found, grab the entry first one found.
50556 + if (*phb == 0xff)
50558 + /* Found it, extract the data. */
50559 + if (map->phb == *phb) {
50560 + memcpy(card, &map->card_location, 3);
50565 + /* Point to the next Slot */
50566 + map = (struct slot_map *)((char *)map + SLOT_ENTRY_SIZE);
50567 + len -= SLOT_ENTRY_SIZE;
50572 + * Parse the Mfg Area
50574 +static void __init iseries_parse_mfg_area(struct mfg_vpd_area *area, int len,
50575 + HvAgentId agent, u8 *phb, u8 *frame, char card[4])
50577 + u16 slot_map_fmt = 0;
50579 + /* Parse Mfg Data */
50580 + while (len > 0) {
50581 + int mfg_tag_len = area->length;
50582 + /* Frame ID (FI 4649020310 ) */
50583 + if (area->tag == VPD_FRU_FRAME_ID)
50584 + *frame = area->data1;
50585 + /* Slot Map Format (MF 4D46020004 ) */
50586 + else if (area->tag == VPD_SLOT_MAP_FORMAT)
50587 + slot_map_fmt = (area->data1 * 256)
50589 + /* Slot Map (SM 534D90 */
50590 + else if (area->tag == VPD_SLOT_MAP) {
50591 + struct slot_map *slot_map;
50593 + if (slot_map_fmt == 0x1004)
50594 + slot_map = (struct slot_map *)((char *)area
50595 + + MFG_ENTRY_SIZE + 1);
50597 + slot_map = (struct slot_map *)((char *)area
50598 + + MFG_ENTRY_SIZE);
50599 + iseries_parse_slot_area(slot_map, mfg_tag_len,
50600 + agent, phb, card);
50603 + * Point to the next Mfg Area
50604 + * Use defined size, sizeof give wrong answer
50606 + area = (struct mfg_vpd_area *)((char *)area + mfg_tag_len
50607 + + MFG_ENTRY_SIZE);
50608 + len -= (mfg_tag_len + MFG_ENTRY_SIZE);
50613 + * Look for "BUS".. Data is not Null terminated.
50614 + * PHBID of 0xFF indicates PHB was not found in VPD Data.
50616 +static u8 __init iseries_parse_phbid(u8 *area, int len)
50618 + while (len > 0) {
50619 + if ((*area == 'B') && (*(area + 1) == 'U')
50620 + && (*(area + 2) == 'S')) {
50622 + while (*area == ' ')
50624 + return *area & 0x0F;
50633 + * Parse out the VPD Areas
50635 +static void __init iseries_parse_vpd(u8 *data, int data_len,
50636 + HvAgentId agent, u8 *frame, char card[4])
50640 + while (data_len > 0) {
50644 + if (tag == VPD_END_OF_AREA)
50646 + len = *(data + 1) + (*(data + 2) * 256);
50649 + if (tag == VPD_ID_STRING)
50650 + phb = iseries_parse_phbid(data, len);
50651 + else if (tag == VPD_VENDOR_AREA)
50652 + iseries_parse_mfg_area((struct mfg_vpd_area *)data, len,
50653 + agent, &phb, frame, card);
50654 + /* Point to next Area. */
50660 +static int __init iseries_get_location_code(u16 bus, HvAgentId agent,
50661 + u8 *frame, char card[4])
50664 + int bus_vpd_len = 0;
50665 + u8 *bus_vpd = kmalloc(BUS_VPDSIZE, GFP_KERNEL);
50667 + if (bus_vpd == NULL) {
50668 + printk("PCI: Bus VPD Buffer allocation failure.\n");
50671 + bus_vpd_len = HvCallPci_getBusVpd(bus, iseries_hv_addr(bus_vpd),
50673 + if (bus_vpd_len == 0) {
50674 + printk("PCI: Bus VPD Buffer zero length.\n");
50677 + /* printk("PCI: bus_vpd: %p, %d\n",bus_vpd, bus_vpd_len); */
50678 + /* Make sure this is what I think it is */
50679 + if (*bus_vpd != VPD_ID_STRING) {
50680 + printk("PCI: Bus VPD Buffer missing starting tag.\n");
50683 + iseries_parse_vpd(bus_vpd, bus_vpd_len, agent, frame, card);
50691 + * Prints the device information.
50692 + * - Pass in pci_dev* pointer to the device.
50693 + * - Pass in the device count
50696 + * PCI: Bus 0, Device 26, Vendor 0x12AE Frame 1, Card C10 Ethernet
50699 +static void __init iseries_device_information(struct pci_dev *pdev,
50700 + u16 bus, HvSubBusNumber subbus)
50706 + agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus),
50707 + ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus));
50709 + if (iseries_get_location_code(bus, agent, &frame, card)) {
50710 + printk(KERN_INFO "PCI: %s, Vendor %04X Frame%3d, "
50711 + "Card %4s 0x%04X\n", pci_name(pdev), pdev->vendor,
50712 + frame, card, (int)(pdev->class >> 8));
50717 * iomm_table_allocate_entry
50719 * Adds pci_dev entry in address translation table
50721 * - CurrentIndex is incremented to keep track of the last entry.
50722 * - Builds the resource entry for allocated BARs.
50724 -static void iomm_table_allocate_entry(struct pci_dev *dev, int bar_num)
50725 +static void __init iomm_table_allocate_entry(struct pci_dev *dev, int bar_num)
50727 struct resource *bar_res = &dev->resource[bar_num];
50728 long bar_size = pci_resource_len(dev, bar_num);
50729 @@ -101,7 +327,6 @@
50730 * Set Resource values.
50732 spin_lock(&iomm_table_lock);
50733 - bar_res->name = pci_io_text;
50734 bar_res->start = BASE_IO_MEMORY +
50735 IOMM_TABLE_ENTRY_SIZE * current_iomm_table_entry;
50736 bar_res->end = bar_res->start + bar_size - 1;
50737 @@ -110,7 +335,8 @@
50739 while (bar_size > 0 ) {
50740 iomm_table[current_iomm_table_entry] = dev->sysdata;
50741 - iobar_table[current_iomm_table_entry] = bar_num;
50742 + ds_addr_table[current_iomm_table_entry] =
50743 + iseries_ds_addr(dev->sysdata) | (bar_num << 24);
50744 bar_size -= IOMM_TABLE_ENTRY_SIZE;
50745 ++current_iomm_table_entry;
50747 @@ -130,7 +356,7 @@
50748 * - Loops through The Bar resources(0 - 5) including the ROM
50751 -static void allocate_device_bars(struct pci_dev *dev)
50752 +static void __init allocate_device_bars(struct pci_dev *dev)
50756 @@ -145,79 +371,19 @@
50757 * PCI: Read Vendor Failed 0x18.58.10 Rc: 0x00xx
50758 * PCI: Connect Bus Unit Failed 0x18.58.10 Rc: 0x00xx
50760 -static void pci_Log_Error(char *Error_Text, int Bus, int SubBus,
50761 - int AgentId, int HvRc)
50762 +static void pci_log_error(char *error, int bus, int subbus,
50763 + int agent, int hv_res)
50765 - if (HvRc == 0x0302)
50766 + if (hv_res == 0x0302)
50768 printk(KERN_ERR "PCI: %s Failed: 0x%02X.%02X.%02X Rc: 0x%04X",
50769 - Error_Text, Bus, SubBus, AgentId, HvRc);
50773 - * iSeries_pci_final_fixup(void)
50775 -void __init iSeries_pci_final_fixup(void)
50777 - struct pci_dev *pdev = NULL;
50778 - struct device_node *node;
50779 - int DeviceCount = 0;
50781 - /* Fix up at the device node and pci_dev relationship */
50782 - mf_display_src(0xC9000100);
50784 - printk("pcibios_final_fixup\n");
50785 - for_each_pci_dev(pdev) {
50786 - node = find_Device_Node(pdev->bus->number, pdev->devfn);
50787 - printk("pci dev %p (%x.%x), node %p\n", pdev,
50788 - pdev->bus->number, pdev->devfn, node);
50790 - if (node != NULL) {
50791 - struct pci_dn *pdn = PCI_DN(node);
50792 - const u32 *agent;
50794 - agent = of_get_property(node, "linux,agent-id", NULL);
50795 - if ((pdn != NULL) && (agent != NULL)) {
50796 - u8 irq = iSeries_allocate_IRQ(pdn->busno, 0,
50800 - err = HvCallXm_connectBusUnit(pdn->busno, pdn->bussubno,
50803 - pci_Log_Error("Connect Bus Unit",
50804 - pdn->busno, pdn->bussubno, *agent, err);
50806 - err = HvCallPci_configStore8(pdn->busno, pdn->bussubno,
50808 - PCI_INTERRUPT_LINE,
50811 - pci_Log_Error("PciCfgStore Irq Failed!",
50812 - pdn->busno, pdn->bussubno, *agent, err);
50819 - pdev->sysdata = (void *)node;
50820 - PCI_DN(node)->pcidev = pdev;
50821 - allocate_device_bars(pdev);
50822 - iSeries_Device_Information(pdev, DeviceCount);
50823 - iommu_devnode_init_iSeries(pdev, node);
50825 - printk("PCI: Device Tree not found for 0x%016lX\n",
50826 - (unsigned long)pdev);
50828 - iSeries_activate_IRQs();
50829 - mf_display_src(0xC9000200);
50830 + error, bus, subbus, agent, hv_res);
50834 * Look down the chain to find the matching Device Device
50836 -static struct device_node *find_Device_Node(int bus, int devfn)
50837 +static struct device_node *find_device_node(int bus, int devfn)
50839 struct device_node *node;
50841 @@ -230,22 +396,66 @@
50847 - * Returns the device node for the passed pci_dev
50848 - * Sanity Check Node PciDev to passed pci_dev
50849 - * If none is found, returns a NULL which the client must handle.
50850 + * iSeries_pcibios_fixup_resources
50852 + * Fixes up all resources for devices
50854 -static struct device_node *get_Device_Node(struct pci_dev *pdev)
50855 +void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev)
50857 + const u32 *agent;
50858 + const u32 *sub_bus;
50859 + unsigned char bus = pdev->bus->number;
50860 struct device_node *node;
50863 + node = find_device_node(bus, pdev->devfn);
50864 + pr_debug("PCI: iSeries %s, pdev %p, node %p\n",
50865 + pci_name(pdev), pdev, node);
50867 + printk("PCI: %s disabled, device tree entry not found !\n",
50869 + for (i = 0; i <= PCI_ROM_RESOURCE; i++)
50870 + pdev->resource[i].flags = 0;
50873 + sub_bus = of_get_property(node, "linux,subbus", NULL);
50874 + agent = of_get_property(node, "linux,agent-id", NULL);
50875 + if (agent && sub_bus) {
50876 + u8 irq = iSeries_allocate_IRQ(bus, 0, *sub_bus);
50879 + err = HvCallXm_connectBusUnit(bus, *sub_bus, *agent, irq);
50881 + pci_log_error("Connect Bus Unit",
50882 + bus, *sub_bus, *agent, err);
50884 + err = HvCallPci_configStore8(bus, *sub_bus,
50885 + *agent, PCI_INTERRUPT_LINE, irq);
50887 + pci_log_error("PciCfgStore Irq Failed!",
50888 + bus, *sub_bus, *agent, err);
50894 - node = pdev->sysdata;
50895 - if (node == NULL || PCI_DN(node)->pcidev != pdev)
50896 - node = find_Device_Node(pdev->bus->number, pdev->devfn);
50898 + pdev->sysdata = node;
50899 + allocate_device_bars(pdev);
50900 + iseries_device_information(pdev, bus, *sub_bus);
50901 + iommu_devnode_init_iSeries(pdev, node);
50905 + * iSeries_pci_final_fixup(void)
50907 +void __init iSeries_pci_final_fixup(void)
50909 + /* Fix up at the device node and pci_dev relationship */
50910 + mf_display_src(0xC9000100);
50911 + iSeries_activate_IRQs();
50912 + mf_display_src(0xC9000200);
50917 * Config space read and write functions.
50918 @@ -269,7 +479,7 @@
50919 static int iSeries_pci_read_config(struct pci_bus *bus, unsigned int devfn,
50920 int offset, int size, u32 *val)
50922 - struct device_node *node = find_Device_Node(bus->number, devfn);
50923 + struct device_node *node = find_device_node(bus->number, devfn);
50925 struct HvCallPci_LoadReturn ret;
50927 @@ -299,7 +509,7 @@
50928 static int iSeries_pci_write_config(struct pci_bus *bus, unsigned int devfn,
50929 int offset, int size, u32 val)
50931 - struct device_node *node = find_Device_Node(bus->number, devfn);
50932 + struct device_node *node = find_device_node(bus->number, devfn);
50936 @@ -331,22 +541,22 @@
50937 * PCI: Device 23.90 ReadL Retry( 1)
50938 * PCI: Device 23.90 ReadL Retry Successful(1)
50940 -static int CheckReturnCode(char *TextHdr, struct device_node *DevNode,
50941 +static int check_return_code(char *type, struct device_node *dn,
50942 int *retry, u64 ret)
50945 - struct pci_dn *pdn = PCI_DN(DevNode);
50946 + struct pci_dn *pdn = PCI_DN(dn);
50949 printk("PCI: %s: Device 0x%04X:%02X I/O Error(%2d): 0x%04X\n",
50950 - TextHdr, pdn->busno, pdn->devfn,
50951 + type, pdn->busno, pdn->devfn,
50954 * Bump the retry and check for retry count exceeded.
50955 * If, Exceeded, panic the system.
50957 - if (((*retry) > Pci_Retry_Max) &&
50958 - (Pci_Error_Flag > 0)) {
50959 + if (((*retry) > PCI_RETRY_MAX) &&
50960 + (limit_pci_retries > 0)) {
50961 mf_display_src(0xB6000103);
50963 panic("PCI: Hardware I/O Error, SRC B6000103, "
50964 @@ -363,28 +573,39 @@
50965 * the exposure of being device global.
50967 static inline struct device_node *xlate_iomm_address(
50968 - const volatile void __iomem *IoAddress,
50969 - u64 *dsaptr, u64 *BarOffsetPtr)
50970 + const volatile void __iomem *addr,
50971 + u64 *dsaptr, u64 *bar_offset, const char *func)
50973 - unsigned long OrigIoAddr;
50974 - unsigned long BaseIoAddr;
50975 - unsigned long TableIndex;
50976 - struct device_node *DevNode;
50977 + unsigned long orig_addr;
50978 + unsigned long base_addr;
50979 + unsigned long ind;
50980 + struct device_node *dn;
50982 - OrigIoAddr = (unsigned long __force)IoAddress;
50983 - if ((OrigIoAddr < BASE_IO_MEMORY) || (OrigIoAddr >= max_io_memory))
50984 + orig_addr = (unsigned long __force)addr;
50985 + if ((orig_addr < BASE_IO_MEMORY) || (orig_addr >= max_io_memory)) {
50986 + static unsigned long last_jiffies;
50987 + static int num_printed;
50989 + if ((jiffies - last_jiffies) > 60 * HZ) {
50990 + last_jiffies = jiffies;
50993 + if (num_printed++ < 10)
50995 + "iSeries_%s: invalid access at IO address %p\n",
50998 - BaseIoAddr = OrigIoAddr - BASE_IO_MEMORY;
50999 - TableIndex = BaseIoAddr / IOMM_TABLE_ENTRY_SIZE;
51000 - DevNode = iomm_table[TableIndex];
51002 - if (DevNode != NULL) {
51003 - int barnum = iobar_table[TableIndex];
51004 - *dsaptr = iseries_ds_addr(DevNode) | (barnum << 24);
51005 - *BarOffsetPtr = BaseIoAddr % IOMM_TABLE_ENTRY_SIZE;
51007 + base_addr = orig_addr - BASE_IO_MEMORY;
51008 + ind = base_addr / IOMM_TABLE_ENTRY_SIZE;
51009 + dn = iomm_table[ind];
51011 + if (dn != NULL) {
51012 + *dsaptr = ds_addr_table[ind];
51013 + *bar_offset = base_addr % IOMM_TABLE_ENTRY_SIZE;
51015 - panic("PCI: Invalid PCI IoAddress detected!\n");
51017 + panic("PCI: Invalid PCI IO address detected!\n");
51022 @@ -392,91 +613,58 @@
51023 * On MM I/O error, all ones are returned and iSeries_pci_IoError is cal
51024 * else, data is returned in Big Endian format.
51026 -static u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress)
51027 +static u8 iseries_readb(const volatile void __iomem *addr)
51033 struct HvCallPci_LoadReturn ret;
51034 - struct device_node *DevNode =
51035 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
51037 - if (DevNode == NULL) {
51038 - static unsigned long last_jiffies;
51039 - static int num_printed;
51040 + struct device_node *dn =
51041 + xlate_iomm_address(addr, &dsa, &bar_offset, "read_byte");
51043 - if ((jiffies - last_jiffies) > 60 * HZ) {
51044 - last_jiffies = jiffies;
51047 - if (num_printed++ < 10)
51048 - printk(KERN_ERR "iSeries_Read_Byte: invalid access at IO address %p\n",
51054 - HvCall3Ret16(HvCallPciBarLoad8, &ret, dsa, BarOffset, 0);
51055 - } while (CheckReturnCode("RDB", DevNode, &retry, ret.rc) != 0);
51056 + HvCall3Ret16(HvCallPciBarLoad8, &ret, dsa, bar_offset, 0);
51057 + } while (check_return_code("RDB", dn, &retry, ret.rc) != 0);
51062 -static u16 iSeries_Read_Word(const volatile void __iomem *IoAddress)
51063 +static u16 iseries_readw_be(const volatile void __iomem *addr)
51069 struct HvCallPci_LoadReturn ret;
51070 - struct device_node *DevNode =
51071 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
51073 - if (DevNode == NULL) {
51074 - static unsigned long last_jiffies;
51075 - static int num_printed;
51076 + struct device_node *dn =
51077 + xlate_iomm_address(addr, &dsa, &bar_offset, "read_word");
51079 - if ((jiffies - last_jiffies) > 60 * HZ) {
51080 - last_jiffies = jiffies;
51083 - if (num_printed++ < 10)
51084 - printk(KERN_ERR "iSeries_Read_Word: invalid access at IO address %p\n",
51090 HvCall3Ret16(HvCallPciBarLoad16, &ret, dsa,
51092 - } while (CheckReturnCode("RDW", DevNode, &retry, ret.rc) != 0);
51094 + } while (check_return_code("RDW", dn, &retry, ret.rc) != 0);
51099 -static u32 iSeries_Read_Long(const volatile void __iomem *IoAddress)
51100 +static u32 iseries_readl_be(const volatile void __iomem *addr)
51106 struct HvCallPci_LoadReturn ret;
51107 - struct device_node *DevNode =
51108 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
51109 + struct device_node *dn =
51110 + xlate_iomm_address(addr, &dsa, &bar_offset, "read_long");
51112 - if (DevNode == NULL) {
51113 - static unsigned long last_jiffies;
51114 - static int num_printed;
51116 - if ((jiffies - last_jiffies) > 60 * HZ) {
51117 - last_jiffies = jiffies;
51120 - if (num_printed++ < 10)
51121 - printk(KERN_ERR "iSeries_Read_Long: invalid access at IO address %p\n",
51127 HvCall3Ret16(HvCallPciBarLoad32, &ret, dsa,
51129 - } while (CheckReturnCode("RDL", DevNode, &retry, ret.rc) != 0);
51131 + } while (check_return_code("RDL", dn, &retry, ret.rc) != 0);
51135 @@ -485,134 +673,72 @@
51136 * Write MM I/O Instructions for the iSeries
51139 -static void iSeries_Write_Byte(u8 data, volatile void __iomem *IoAddress)
51140 +static void iseries_writeb(u8 data, volatile void __iomem *addr)
51147 - struct device_node *DevNode =
51148 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
51150 - if (DevNode == NULL) {
51151 - static unsigned long last_jiffies;
51152 - static int num_printed;
51153 + struct device_node *dn =
51154 + xlate_iomm_address(addr, &dsa, &bar_offset, "write_byte");
51156 - if ((jiffies - last_jiffies) > 60 * HZ) {
51157 - last_jiffies = jiffies;
51160 - if (num_printed++ < 10)
51161 - printk(KERN_ERR "iSeries_Write_Byte: invalid access at IO address %p\n", IoAddress);
51166 - rc = HvCall4(HvCallPciBarStore8, dsa, BarOffset, data, 0);
51167 - } while (CheckReturnCode("WWB", DevNode, &retry, rc) != 0);
51168 + rc = HvCall4(HvCallPciBarStore8, dsa, bar_offset, data, 0);
51169 + } while (check_return_code("WWB", dn, &retry, rc) != 0);
51172 -static void iSeries_Write_Word(u16 data, volatile void __iomem *IoAddress)
51173 +static void iseries_writew_be(u16 data, volatile void __iomem *addr)
51180 - struct device_node *DevNode =
51181 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
51182 + struct device_node *dn =
51183 + xlate_iomm_address(addr, &dsa, &bar_offset, "write_word");
51185 - if (DevNode == NULL) {
51186 - static unsigned long last_jiffies;
51187 - static int num_printed;
51189 - if ((jiffies - last_jiffies) > 60 * HZ) {
51190 - last_jiffies = jiffies;
51193 - if (num_printed++ < 10)
51194 - printk(KERN_ERR "iSeries_Write_Word: invalid access at IO address %p\n",
51200 - rc = HvCall4(HvCallPciBarStore16, dsa, BarOffset, data, 0);
51201 - } while (CheckReturnCode("WWW", DevNode, &retry, rc) != 0);
51202 + rc = HvCall4(HvCallPciBarStore16, dsa, bar_offset, data, 0);
51203 + } while (check_return_code("WWW", dn, &retry, rc) != 0);
51206 -static void iSeries_Write_Long(u32 data, volatile void __iomem *IoAddress)
51207 +static void iseries_writel_be(u32 data, volatile void __iomem *addr)
51214 - struct device_node *DevNode =
51215 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
51217 - if (DevNode == NULL) {
51218 - static unsigned long last_jiffies;
51219 - static int num_printed;
51220 + struct device_node *dn =
51221 + xlate_iomm_address(addr, &dsa, &bar_offset, "write_long");
51223 - if ((jiffies - last_jiffies) > 60 * HZ) {
51224 - last_jiffies = jiffies;
51227 - if (num_printed++ < 10)
51228 - printk(KERN_ERR "iSeries_Write_Long: invalid access at IO address %p\n",
51234 - rc = HvCall4(HvCallPciBarStore32, dsa, BarOffset, data, 0);
51235 - } while (CheckReturnCode("WWL", DevNode, &retry, rc) != 0);
51238 -static u8 iseries_readb(const volatile void __iomem *addr)
51240 - return iSeries_Read_Byte(addr);
51241 + rc = HvCall4(HvCallPciBarStore32, dsa, bar_offset, data, 0);
51242 + } while (check_return_code("WWL", dn, &retry, rc) != 0);
51245 static u16 iseries_readw(const volatile void __iomem *addr)
51247 - return le16_to_cpu(iSeries_Read_Word(addr));
51248 + return le16_to_cpu(iseries_readw_be(addr));
51251 static u32 iseries_readl(const volatile void __iomem *addr)
51253 - return le32_to_cpu(iSeries_Read_Long(addr));
51256 -static u16 iseries_readw_be(const volatile void __iomem *addr)
51258 - return iSeries_Read_Word(addr);
51261 -static u32 iseries_readl_be(const volatile void __iomem *addr)
51263 - return iSeries_Read_Long(addr);
51266 -static void iseries_writeb(u8 data, volatile void __iomem *addr)
51268 - iSeries_Write_Byte(data, addr);
51269 + return le32_to_cpu(iseries_readl_be(addr));
51272 static void iseries_writew(u16 data, volatile void __iomem *addr)
51274 - iSeries_Write_Word(cpu_to_le16(data), addr);
51275 + iseries_writew_be(cpu_to_le16(data), addr);
51278 static void iseries_writel(u32 data, volatile void __iomem *addr)
51280 - iSeries_Write_Long(cpu_to_le32(data), addr);
51283 -static void iseries_writew_be(u16 data, volatile void __iomem *addr)
51285 - iSeries_Write_Word(data, addr);
51288 -static void iseries_writel_be(u32 data, volatile void __iomem *addr)
51290 - iSeries_Write_Long(data, addr);
51291 + iseries_writel(cpu_to_le32(data), addr);
51294 static void iseries_readsb(const volatile void __iomem *addr, void *buf,
51295 @@ -620,7 +746,7 @@
51299 - *(dst++) = iSeries_Read_Byte(addr);
51300 + *(dst++) = iseries_readb(addr);
51303 static void iseries_readsw(const volatile void __iomem *addr, void *buf,
51304 @@ -628,7 +754,7 @@
51308 - *(dst++) = iSeries_Read_Word(addr);
51309 + *(dst++) = iseries_readw_be(addr);
51312 static void iseries_readsl(const volatile void __iomem *addr, void *buf,
51313 @@ -636,7 +762,7 @@
51317 - *(dst++) = iSeries_Read_Long(addr);
51318 + *(dst++) = iseries_readl_be(addr);
51321 static void iseries_writesb(volatile void __iomem *addr, const void *buf,
51322 @@ -644,7 +770,7 @@
51324 const u8 *src = buf;
51326 - iSeries_Write_Byte(*(src++), addr);
51327 + iseries_writeb(*(src++), addr);
51330 static void iseries_writesw(volatile void __iomem *addr, const void *buf,
51331 @@ -652,7 +778,7 @@
51333 const u16 *src = buf;
51335 - iSeries_Write_Word(*(src++), addr);
51336 + iseries_writew_be(*(src++), addr);
51339 static void iseries_writesl(volatile void __iomem *addr, const void *buf,
51340 @@ -660,7 +786,7 @@
51342 const u32 *src = buf;
51344 - iSeries_Write_Long(*(src++), addr);
51345 + iseries_writel_be(*(src++), addr);
51348 static void iseries_memset_io(volatile void __iomem *addr, int c,
51349 @@ -669,7 +795,7 @@
51350 volatile char __iomem *d = addr;
51353 - iSeries_Write_Byte(c, d++);
51354 + iseries_writeb(c, d++);
51357 static void iseries_memcpy_fromio(void *dest, const volatile void __iomem *src,
51358 @@ -679,7 +805,7 @@
51359 const volatile char __iomem *s = src;
51362 - *d++ = iSeries_Read_Byte(s++);
51363 + *d++ = iseries_readb(s++);
51366 static void iseries_memcpy_toio(volatile void __iomem *dest, const void *src,
51367 @@ -689,7 +815,7 @@
51368 volatile char __iomem *d = dest;
51371 - iSeries_Write_Byte(*s++, d++);
51372 + iseries_writeb(*s++, d++);
51375 /* We only set MMIO ops. The default PIO ops will be default
51376 @@ -742,6 +868,8 @@
51377 /* Install IO hooks */
51378 ppc_pci_io = iseries_pci_io;
51380 + pci_probe_only = 1;
51382 /* iSeries has no IO space in the common sense, it needs to set
51385 @@ -767,11 +895,21 @@
51386 phb = pcibios_alloc_controller(node);
51389 + /* All legacy iSeries PHBs are in domain zero */
51390 + phb->global_number = 0;
51392 - phb->pci_mem_offset = bus;
51393 phb->first_busno = bus;
51394 phb->last_busno = bus;
51395 phb->ops = &iSeries_pci_ops;
51396 + phb->io_base_virt = (void __iomem *)_IO_BASE;
51397 + phb->io_resource.flags = IORESOURCE_IO;
51398 + phb->io_resource.start = BASE_IO_MEMORY;
51399 + phb->io_resource.end = END_IO_MEMORY;
51400 + phb->io_resource.name = "iSeries PCI IO";
51401 + phb->mem_resources[0].flags = IORESOURCE_MEM;
51402 + phb->mem_resources[0].start = BASE_IO_MEMORY;
51403 + phb->mem_resources[0].end = END_IO_MEMORY;
51404 + phb->mem_resources[0].name = "Series PCI MEM";
51408 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/iseries/pci.h powerpc.git/arch/powerpc/platforms/iseries/pci.h
51409 --- linux-2.6.24/arch/powerpc/platforms/iseries/pci.h 2008-01-24 23:58:37.000000000 +0100
51410 +++ powerpc.git/arch/powerpc/platforms/iseries/pci.h 2008-01-28 20:25:49.000000000 +0100
51412 * End Change Activity
51415 -#include <asm/pci-bridge.h>
51417 -struct pci_dev; /* For Forward Reference */
51420 * Decodes Linux DevFn to iSeries DevFn, bridge device, or function.
51421 * For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h
51422 @@ -47,17 +43,16 @@
51423 #define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus) ((subbus >> 5) & 0x7)
51424 #define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7)
51427 - * Generate a Direct Select Address for the Hypervisor
51429 -static inline u64 iseries_ds_addr(struct device_node *node)
51431 - struct pci_dn *pdn = PCI_DN(node);
51433 - return ((u64)pdn->busno << 48) + ((u64)pdn->bussubno << 40)
51434 - + ((u64)0x10 << 32);
51438 -extern void iSeries_Device_Information(struct pci_dev*, int);
51440 +extern void iSeries_pcibios_init(void);
51441 +extern void iSeries_pci_final_fixup(void);
51442 +extern void iSeries_pcibios_fixup_resources(struct pci_dev *dev);
51444 +static inline void iSeries_pcibios_init(void) { }
51445 +static inline void iSeries_pci_final_fixup(void) { }
51446 +static inline void iSeries_pcibios_fixup_resources(struct pci_dev *dev) {}
51449 #endif /* _PLATFORMS_ISERIES_PCI_H */
51450 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/iseries/setup.c powerpc.git/arch/powerpc/platforms/iseries/setup.c
51451 --- linux-2.6.24/arch/powerpc/platforms/iseries/setup.c 2008-01-24 23:58:37.000000000 +0100
51452 +++ powerpc.git/arch/powerpc/platforms/iseries/setup.c 2008-01-28 20:25:49.000000000 +0100
51454 #include "main_store.h"
51455 #include "call_sm.h"
51456 #include "call_hpt.h"
51460 #define DBG(fmt...) udbg_printf(fmt)
51462 static unsigned long build_iSeries_Memory_Map(void);
51463 static void iseries_shared_idle(void);
51464 static void iseries_dedicated_idle(void);
51466 -extern void iSeries_pci_final_fixup(void);
51468 -static void iSeries_pci_final_fixup(void) { }
51472 struct MemoryBlock {
51473 @@ -112,13 +108,13 @@
51476 mb_array[0].logicalStart = 0;
51477 - mb_array[0].logicalEnd = 0x100000000;
51478 + mb_array[0].logicalEnd = 0x100000000UL;
51479 mb_array[0].absStart = 0;
51480 - mb_array[0].absEnd = 0x100000000;
51481 + mb_array[0].absEnd = 0x100000000UL;
51484 numMemoryBlocks = 2;
51485 - holeStart = holeStart & 0x000fffffffffffff;
51486 + holeStart = holeStart & 0x000fffffffffffffUL;
51487 holeStart = addr_to_chunk(holeStart);
51488 holeFirstChunk = holeStart;
51489 holeSize = addr_to_chunk(holeSize);
51490 @@ -128,9 +124,9 @@
51491 mb_array[0].logicalEnd = holeFirstChunk;
51492 mb_array[0].absEnd = holeFirstChunk;
51493 mb_array[1].logicalStart = holeFirstChunk;
51494 - mb_array[1].logicalEnd = 0x100000000 - holeSizeChunks;
51495 + mb_array[1].logicalEnd = 0x100000000UL - holeSizeChunks;
51496 mb_array[1].absStart = holeFirstChunk + holeSizeChunks;
51497 - mb_array[1].absEnd = 0x100000000;
51498 + mb_array[1].absEnd = 0x100000000UL;
51500 return numMemoryBlocks;
51502 @@ -234,9 +230,9 @@
51503 mb_array[i].logicalEnd,
51504 mb_array[i].absStart, mb_array[i].absEnd);
51505 mb_array[i].absStart = addr_to_chunk(mb_array[i].absStart &
51506 - 0x000fffffffffffff);
51507 + 0x000fffffffffffffUL);
51508 mb_array[i].absEnd = addr_to_chunk(mb_array[i].absEnd &
51509 - 0x000fffffffffffff);
51510 + 0x000fffffffffffffUL);
51511 mb_array[i].logicalStart =
51512 addr_to_chunk(mb_array[i].logicalStart);
51513 mb_array[i].logicalEnd = addr_to_chunk(mb_array[i].logicalEnd);
51514 @@ -320,7 +316,7 @@
51516 EXPORT_SYMBOL(mschunks_map);
51518 -void mschunks_alloc(unsigned long num_chunks)
51519 +static void mschunks_alloc(unsigned long num_chunks)
51521 klimit = _ALIGN(klimit, sizeof(u32));
51522 mschunks_map.mapping = (u32 *)klimit;
51523 @@ -499,6 +495,8 @@
51524 itVpdAreas.xSlicMaxLogicalProcs);
51525 printk("Max physical processors = %d\n",
51526 itVpdAreas.xSlicMaxPhysicalProcs);
51528 + iSeries_pcibios_init();
51531 static void iSeries_show_cpuinfo(struct seq_file *m)
51532 @@ -641,24 +639,25 @@
51535 define_machine(iseries) {
51536 - .name = "iSeries",
51537 - .setup_arch = iSeries_setup_arch,
51538 - .show_cpuinfo = iSeries_show_cpuinfo,
51539 - .init_IRQ = iSeries_init_IRQ,
51540 - .get_irq = iSeries_get_irq,
51541 - .init_early = iSeries_init_early,
51542 - .pcibios_fixup = iSeries_pci_final_fixup,
51543 - .restart = mf_reboot,
51544 - .power_off = mf_power_off,
51545 - .halt = mf_power_off,
51546 - .get_boot_time = iSeries_get_boot_time,
51547 - .set_rtc_time = iSeries_set_rtc_time,
51548 - .get_rtc_time = iSeries_get_rtc_time,
51549 - .calibrate_decr = generic_calibrate_decr,
51550 - .progress = iSeries_progress,
51551 - .probe = iseries_probe,
51552 - .ioremap = iseries_ioremap,
51553 - .iounmap = iseries_iounmap,
51554 + .name = "iSeries",
51555 + .setup_arch = iSeries_setup_arch,
51556 + .show_cpuinfo = iSeries_show_cpuinfo,
51557 + .init_IRQ = iSeries_init_IRQ,
51558 + .get_irq = iSeries_get_irq,
51559 + .init_early = iSeries_init_early,
51560 + .pcibios_fixup = iSeries_pci_final_fixup,
51561 + .pcibios_fixup_resources= iSeries_pcibios_fixup_resources,
51562 + .restart = mf_reboot,
51563 + .power_off = mf_power_off,
51564 + .halt = mf_power_off,
51565 + .get_boot_time = iSeries_get_boot_time,
51566 + .set_rtc_time = iSeries_set_rtc_time,
51567 + .get_rtc_time = iSeries_get_rtc_time,
51568 + .calibrate_decr = generic_calibrate_decr,
51569 + .progress = iSeries_progress,
51570 + .probe = iseries_probe,
51571 + .ioremap = iseries_ioremap,
51572 + .iounmap = iseries_iounmap,
51573 /* XXX Implement enable_pmcs for iSeries */
51576 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/iseries/setup.h powerpc.git/arch/powerpc/platforms/iseries/setup.h
51577 --- linux-2.6.24/arch/powerpc/platforms/iseries/setup.h 2008-01-24 23:58:37.000000000 +0100
51578 +++ powerpc.git/arch/powerpc/platforms/iseries/setup.h 2008-01-28 20:25:49.000000000 +0100
51580 #ifndef __ISERIES_SETUP_H__
51581 #define __ISERIES_SETUP_H__
51583 +extern void *iSeries_early_setup(void);
51584 extern unsigned long iSeries_get_boot_time(void);
51585 extern int iSeries_set_rtc_time(struct rtc_time *tm);
51586 extern void iSeries_get_rtc_time(struct rtc_time *tm);
51587 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/iseries/vpdinfo.c powerpc.git/arch/powerpc/platforms/iseries/vpdinfo.c
51588 --- linux-2.6.24/arch/powerpc/platforms/iseries/vpdinfo.c 2008-01-24 23:58:37.000000000 +0100
51589 +++ powerpc.git/arch/powerpc/platforms/iseries/vpdinfo.c 1970-01-01 01:00:00.000000000 +0100
51592 - * This code gets the card location of the hardware
51593 - * Copyright (C) 2001 <Allan H Trautman> <IBM Corp>
51594 - * Copyright (C) 2005 Stephen Rothwel, IBM Corp
51596 - * This program is free software; you can redistribute it and/or modify
51597 - * it under the terms of the GNU General Public License as published by
51598 - * the Free Software Foundation; either version 2 of the License, or
51599 - * (at your option) any later version.
51601 - * This program is distributed in the hope that it will be useful,
51602 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
51603 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51604 - * GNU General Public License for more details.
51606 - * You should have received a copy of the GNU General Public License
51607 - * along with this program; if not, write to the:
51608 - * Free Software Foundation, Inc.,
51609 - * 59 Temple Place, Suite 330,
51610 - * Boston, MA 02111-1307 USA
51612 - * Change Activity:
51613 - * Created, Feb 2, 2001
51614 - * Ported to ppc64, August 20, 2001
51615 - * End Change Activity
51617 -#include <linux/init.h>
51618 -#include <linux/module.h>
51619 -#include <linux/pci.h>
51621 -#include <asm/types.h>
51622 -#include <asm/resource.h>
51623 -#include <asm/abs_addr.h>
51624 -#include <asm/pci-bridge.h>
51625 -#include <asm/iseries/hv_types.h>
51628 -#include "call_pci.h"
51631 - * Size of Bus VPD data
51633 -#define BUS_VPDSIZE 1024
51638 -#define VpdEndOfAreaTag 0x79
51639 -#define VpdIdStringTag 0x82
51640 -#define VpdVendorAreaTag 0x84
51645 -#define VpdFruFrameId 0x4649 // "FI"
51646 -#define VpdSlotMapFormat 0x4D46 // "MF"
51647 -#define VpdSlotMap 0x534D // "SM"
51650 - * Structures of the areas
51652 -struct MfgVpdAreaStruct {
51658 -typedef struct MfgVpdAreaStruct MfgArea;
51659 -#define MFG_ENTRY_SIZE 3
51661 -struct SlotMapStruct {
51663 - u8 SecondaryAgentId;
51665 - char CardLocation[3];
51667 - char Reserved[2];
51669 -typedef struct SlotMapStruct SlotMap;
51670 -#define SLOT_ENTRY_SIZE 16
51673 - * Parse the Slot Area
51675 -static void __init iSeries_Parse_SlotArea(SlotMap *MapPtr, int MapLen,
51676 - HvAgentId agent, u8 *PhbId, char card[4])
51678 - int SlotMapLen = MapLen;
51679 - SlotMap *SlotMapPtr = MapPtr;
51682 - * Parse Slot label until we find the one requested
51684 - while (SlotMapLen > 0) {
51685 - if (SlotMapPtr->AgentId == agent) {
51687 - * If Phb wasn't found, grab the entry first one found.
51689 - if (*PhbId == 0xff)
51690 - *PhbId = SlotMapPtr->PhbId;
51691 - /* Found it, extract the data. */
51692 - if (SlotMapPtr->PhbId == *PhbId) {
51693 - memcpy(card, &SlotMapPtr->CardLocation, 3);
51698 - /* Point to the next Slot */
51699 - SlotMapPtr = (SlotMap *)((char *)SlotMapPtr + SLOT_ENTRY_SIZE);
51700 - SlotMapLen -= SLOT_ENTRY_SIZE;
51705 - * Parse the Mfg Area
51707 -static void __init iSeries_Parse_MfgArea(u8 *AreaData, int AreaLen,
51708 - HvAgentId agent, u8 *PhbId,
51709 - u8 *frame, char card[4])
51711 - MfgArea *MfgAreaPtr = (MfgArea *)AreaData;
51712 - int MfgAreaLen = AreaLen;
51713 - u16 SlotMapFmt = 0;
51715 - /* Parse Mfg Data */
51716 - while (MfgAreaLen > 0) {
51717 - int MfgTagLen = MfgAreaPtr->TagLength;
51718 - /* Frame ID (FI 4649020310 ) */
51719 - if (MfgAreaPtr->Tag == VpdFruFrameId) /* FI */
51720 - *frame = MfgAreaPtr->AreaData1;
51721 - /* Slot Map Format (MF 4D46020004 ) */
51722 - else if (MfgAreaPtr->Tag == VpdSlotMapFormat) /* MF */
51723 - SlotMapFmt = (MfgAreaPtr->AreaData1 * 256)
51724 - + MfgAreaPtr->AreaData2;
51725 - /* Slot Map (SM 534D90 */
51726 - else if (MfgAreaPtr->Tag == VpdSlotMap) { /* SM */
51727 - SlotMap *SlotMapPtr;
51729 - if (SlotMapFmt == 0x1004)
51730 - SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr
51731 - + MFG_ENTRY_SIZE + 1);
51733 - SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr
51734 - + MFG_ENTRY_SIZE);
51735 - iSeries_Parse_SlotArea(SlotMapPtr, MfgTagLen,
51736 - agent, PhbId, card);
51739 - * Point to the next Mfg Area
51740 - * Use defined size, sizeof give wrong answer
51742 - MfgAreaPtr = (MfgArea *)((char *)MfgAreaPtr + MfgTagLen
51743 - + MFG_ENTRY_SIZE);
51744 - MfgAreaLen -= (MfgTagLen + MFG_ENTRY_SIZE);
51749 - * Look for "BUS".. Data is not Null terminated.
51750 - * PHBID of 0xFF indicates PHB was not found in VPD Data.
51752 -static int __init iSeries_Parse_PhbId(u8 *AreaPtr, int AreaLength)
51754 - u8 *PhbPtr = AreaPtr;
51755 - int DataLen = AreaLength;
51756 - char PhbId = 0xFF;
51758 - while (DataLen > 0) {
51759 - if ((*PhbPtr == 'B') && (*(PhbPtr + 1) == 'U')
51760 - && (*(PhbPtr + 2) == 'S')) {
51762 - while (*PhbPtr == ' ')
51764 - PhbId = (*PhbPtr & 0x0F);
51774 - * Parse out the VPD Areas
51776 -static void __init iSeries_Parse_Vpd(u8 *VpdData, int VpdDataLen,
51777 - HvAgentId agent, u8 *frame, char card[4])
51779 - u8 *TagPtr = VpdData;
51780 - int DataLen = VpdDataLen - 3;
51783 - while ((*TagPtr != VpdEndOfAreaTag) && (DataLen > 0)) {
51784 - int AreaLen = *(TagPtr + 1) + (*(TagPtr + 2) * 256);
51785 - u8 *AreaData = TagPtr + 3;
51787 - if (*TagPtr == VpdIdStringTag)
51788 - PhbId = iSeries_Parse_PhbId(AreaData, AreaLen);
51789 - else if (*TagPtr == VpdVendorAreaTag)
51790 - iSeries_Parse_MfgArea(AreaData, AreaLen,
51791 - agent, &PhbId, frame, card);
51792 - /* Point to next Area. */
51793 - TagPtr = AreaData + AreaLen;
51794 - DataLen -= AreaLen;
51798 -static int __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent,
51799 - u8 *frame, char card[4])
51802 - int BusVpdLen = 0;
51803 - u8 *BusVpdPtr = kmalloc(BUS_VPDSIZE, GFP_KERNEL);
51805 - if (BusVpdPtr == NULL) {
51806 - printk("PCI: Bus VPD Buffer allocation failure.\n");
51809 - BusVpdLen = HvCallPci_getBusVpd(bus, iseries_hv_addr(BusVpdPtr),
51811 - if (BusVpdLen == 0) {
51812 - printk("PCI: Bus VPD Buffer zero length.\n");
51815 - /* printk("PCI: BusVpdPtr: %p, %d\n",BusVpdPtr, BusVpdLen); */
51816 - /* Make sure this is what I think it is */
51817 - if (*BusVpdPtr != VpdIdStringTag) { /* 0x82 */
51818 - printk("PCI: Bus VPD Buffer missing starting tag.\n");
51821 - iSeries_Parse_Vpd(BusVpdPtr, BusVpdLen, agent, frame, card);
51824 - kfree(BusVpdPtr);
51829 - * Prints the device information.
51830 - * - Pass in pci_dev* pointer to the device.
51831 - * - Pass in the device count
51834 - * PCI: Bus 0, Device 26, Vendor 0x12AE Frame 1, Card C10 Ethernet
51837 -void __init iSeries_Device_Information(struct pci_dev *PciDev, int count)
51839 - struct device_node *DevNode = PciDev->sysdata;
51840 - struct pci_dn *pdn;
51844 - HvSubBusNumber subbus;
51847 - if (DevNode == NULL) {
51848 - printk("%d. PCI: iSeries_Device_Information DevNode is NULL\n",
51853 - pdn = PCI_DN(DevNode);
51854 - bus = pdn->busno;
51855 - subbus = pdn->bussubno;
51856 - agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus),
51857 - ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus));
51859 - if (iSeries_Get_Location_Code(bus, agent, &frame, card)) {
51860 - printk("%d. PCI: Bus%3d, Device%3d, Vendor %04X Frame%3d, "
51861 - "Card %4s 0x%04X\n", count, bus,
51862 - PCI_SLOT(PciDev->devfn), PciDev->vendor, frame,
51863 - card, (int)(PciDev->class >> 8));
51866 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/maple/Kconfig powerpc.git/arch/powerpc/platforms/maple/Kconfig
51867 --- linux-2.6.24/arch/powerpc/platforms/maple/Kconfig 2008-01-24 23:58:37.000000000 +0100
51868 +++ powerpc.git/arch/powerpc/platforms/maple/Kconfig 2008-01-28 20:25:49.000000000 +0100
51871 depends on PPC_MULTIPLATFORM && PPC64
51872 bool "Maple 970FX Evaluation Board"
51876 select MPIC_U3_HT_IRQS
51877 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/maple/pci.c powerpc.git/arch/powerpc/platforms/maple/pci.c
51878 --- linux-2.6.24/arch/powerpc/platforms/maple/pci.c 2008-01-24 23:58:37.000000000 +0100
51879 +++ powerpc.git/arch/powerpc/platforms/maple/pci.c 2008-01-28 20:25:49.000000000 +0100
51880 @@ -558,7 +558,7 @@
51881 * safe assumptions hopefully.
51884 - struct device_node *np = u3_agp->arch_data;
51885 + struct device_node *np = u3_agp->dn;
51886 PCI_DN(np)->busno = 0xf0;
51887 for (np = np->child; np; np = np->sibling)
51888 PCI_DN(np)->busno = 0xf0;
51889 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/maple/setup.c powerpc.git/arch/powerpc/platforms/maple/setup.c
51890 --- linux-2.6.24/arch/powerpc/platforms/maple/setup.c 2008-01-24 23:58:37.000000000 +0100
51891 +++ powerpc.git/arch/powerpc/platforms/maple/setup.c 2008-01-28 20:25:49.000000000 +0100
51893 #include <linux/serial.h>
51894 #include <linux/smp.h>
51895 #include <linux/bitops.h>
51896 +#include <linux/of_device.h>
51898 #include <asm/processor.h>
51899 #include <asm/sections.h>
51901 #include <asm/dma.h>
51902 #include <asm/cputable.h>
51903 #include <asm/time.h>
51904 -#include <asm/of_device.h>
51905 #include <asm/lmb.h>
51906 #include <asm/mpic.h>
51907 #include <asm/rtas.h>
51908 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pasemi/Kconfig powerpc.git/arch/powerpc/platforms/pasemi/Kconfig
51909 --- linux-2.6.24/arch/powerpc/platforms/pasemi/Kconfig 2008-01-24 23:58:37.000000000 +0100
51910 +++ powerpc.git/arch/powerpc/platforms/pasemi/Kconfig 2008-01-28 20:25:49.000000000 +0100
51912 bool "PA Semi SoC-based platforms"
51916 select PPC_UDBG_16550
51918 select MPIC_BROKEN_REGREAD
51920 bool "PA Semi IOMMU support"
51921 depends on PPC_PASEMI
51923 - IOMMU support for PA6T-1682M
51924 + IOMMU support for PA Semi PWRficient
51926 config PPC_PASEMI_IOMMU_DMA_FORCE
51927 bool "Force DMA engine to use IOMMU"
51930 Driver for MDIO via GPIO on PWRficient platforms
51932 -config ELECTRA_IDE
51933 - tristate "Electra IDE driver"
51935 - depends on PPC_PASEMI && ATA
51936 - select PATA_PLATFORM
51938 - This includes driver support for the Electra on-board IDE
51942 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pasemi/Makefile powerpc.git/arch/powerpc/platforms/pasemi/Makefile
51943 --- linux-2.6.24/arch/powerpc/platforms/pasemi/Makefile 2008-01-24 23:58:37.000000000 +0100
51944 +++ powerpc.git/arch/powerpc/platforms/pasemi/Makefile 2008-01-28 20:25:49.000000000 +0100
51946 obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o
51947 obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o
51948 -obj-$(CONFIG_ELECTRA_IDE) += electra_ide.o
51949 obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o
51950 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pasemi/cpufreq.c powerpc.git/arch/powerpc/platforms/pasemi/cpufreq.c
51951 --- linux-2.6.24/arch/powerpc/platforms/pasemi/cpufreq.c 2008-01-24 23:58:37.000000000 +0100
51952 +++ powerpc.git/arch/powerpc/platforms/pasemi/cpufreq.c 2008-01-28 20:25:49.000000000 +0100
51954 #include <asm/io.h>
51955 #include <asm/prom.h>
51956 #include <asm/time.h>
51957 +#include <asm/smp.h>
51959 #define SDCASR_REG 0x0100
51960 #define SDCASR_REG_STRIDE 0x1000
51961 @@ -124,6 +125,11 @@
51962 local_irq_restore(flags);
51965 +int check_astate(void)
51967 + return get_cur_astate(hard_smp_processor_id());
51970 void restore_astate(int cpu)
51972 set_astate(cpu, current_astate);
51973 @@ -147,7 +153,10 @@
51977 - dn = of_find_compatible_node(NULL, "sdc", "1682m-sdc");
51978 + dn = of_find_compatible_node(NULL, NULL, "1682m-sdc");
51980 + dn = of_find_compatible_node(NULL, NULL,
51981 + "pasemi,pwrficient-sdc");
51984 err = of_address_to_resource(dn, 0, &res);
51985 @@ -160,7 +169,10 @@
51989 - dn = of_find_compatible_node(NULL, "gizmo", "1682m-gizmo");
51990 + dn = of_find_compatible_node(NULL, NULL, "1682m-gizmo");
51992 + dn = of_find_compatible_node(NULL, NULL,
51993 + "pasemi,pwrficient-gizmo");
51996 goto out_unmap_sdcasr;
51997 @@ -292,7 +304,8 @@
51999 static int __init pas_cpufreq_init(void)
52001 - if (!machine_is_compatible("PA6T-1682M"))
52002 + if (!machine_is_compatible("PA6T-1682M") &&
52003 + !machine_is_compatible("pasemi,pwrficient"))
52006 return cpufreq_register_driver(&pas_cpufreq_driver);
52007 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pasemi/electra_ide.c powerpc.git/arch/powerpc/platforms/pasemi/electra_ide.c
52008 --- linux-2.6.24/arch/powerpc/platforms/pasemi/electra_ide.c 2008-01-24 23:58:37.000000000 +0100
52009 +++ powerpc.git/arch/powerpc/platforms/pasemi/electra_ide.c 1970-01-01 01:00:00.000000000 +0100
52012 - * Copyright (C) 2007 PA Semi, Inc
52014 - * Maintained by: Olof Johansson <olof@lixom.net>
52016 - * This program is free software; you can redistribute it and/or modify
52017 - * it under the terms of the GNU General Public License version 2 as
52018 - * published by the Free Software Foundation.
52020 - * This program is distributed in the hope that it will be useful,
52021 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
52022 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52023 - * GNU General Public License for more details.
52025 - * You should have received a copy of the GNU General Public License
52026 - * along with this program; if not, write to the Free Software
52027 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
52030 -#include <linux/platform_device.h>
52032 -#include <asm/prom.h>
52033 -#include <asm/system.h>
52035 -/* The electra IDE interface is incredibly simple: Just a device on the localbus
52036 - * with interrupts hooked up to one of the GPIOs. The device tree contains the
52037 - * address window and interrupt mappings already, and the pata_platform driver handles
52038 - * the rest. We just need to hook the two up.
52041 -#define MAX_IFS 4 /* really, we have only one */
52043 -static struct platform_device *pdevs[MAX_IFS];
52045 -static int __devinit electra_ide_init(void)
52047 - struct device_node *np;
52048 - struct resource r[3];
52052 - np = of_find_compatible_node(NULL, "ide", "electra-ide");
52055 - while (np && i < MAX_IFS) {
52056 - memset(r, 0, sizeof(r));
52058 - /* pata_platform wants two address ranges: one for the base registers,
52059 - * another for the control (altstatus). It's located at offset 0x3f6 in
52060 - * the window, but the device tree only has one large register window
52061 - * that covers both ranges. So we need to split it up by hand here:
52064 - ret = of_address_to_resource(np, 0, &r[0]);
52067 - ret = of_address_to_resource(np, 0, &r[1]);
52071 - r[1].start += 0x3f6;
52072 - r[0].end = r[1].start-1;
52074 - r[2].start = irq_of_parse_and_map(np, 0);
52075 - r[2].end = irq_of_parse_and_map(np, 0);
52076 - r[2].flags = IORESOURCE_IRQ;
52078 - pr_debug("registering platform device at 0x%lx/0x%lx, irq is %ld\n",
52079 - r[0].start, r[1].start, r[2].start);
52080 - pdevs[i] = platform_device_register_simple("pata_platform", i, r, 3);
52081 - if (IS_ERR(pdevs[i])) {
52082 - ret = PTR_ERR(pdevs[i]);
52086 - np = of_find_compatible_node(np, "ide", "electra-ide");
52091 -module_init(electra_ide_init);
52093 -static void __devexit electra_ide_exit(void)
52097 - for (i = 0; i < MAX_IFS; i++)
52099 - platform_device_unregister(pdevs[i]);
52101 -module_exit(electra_ide_exit);
52104 -MODULE_LICENSE("GPL");
52105 -MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>");
52106 -MODULE_DESCRIPTION("PA Semi Electra IDE driver");
52107 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pasemi/gpio_mdio.c powerpc.git/arch/powerpc/platforms/pasemi/gpio_mdio.c
52108 --- linux-2.6.24/arch/powerpc/platforms/pasemi/gpio_mdio.c 2008-01-24 23:58:37.000000000 +0100
52109 +++ powerpc.git/arch/powerpc/platforms/pasemi/gpio_mdio.c 2008-01-28 20:25:49.000000000 +0100
52111 #include <linux/interrupt.h>
52112 #include <linux/phy.h>
52113 #include <linux/platform_device.h>
52114 -#include <asm/of_platform.h>
52115 +#include <linux/of_platform.h>
52119 @@ -218,45 +218,27 @@
52120 const struct of_device_id *match)
52122 struct device *dev = &ofdev->dev;
52123 - struct device_node *np = ofdev->node;
52124 - struct device_node *gpio_np;
52125 + struct device_node *phy_dn, *np = ofdev->node;
52126 struct mii_bus *new_bus;
52127 - struct resource res;
52128 struct gpio_priv *priv;
52129 const unsigned int *prop;
52134 - gpio_np = of_find_compatible_node(NULL, "gpio", "1682m-gpio");
52139 - err = of_address_to_resource(gpio_np, 0, &res);
52140 - of_node_put(gpio_np);
52146 - gpio_regs = ioremap(res.start, 0x100);
52152 priv = kzalloc(sizeof(struct gpio_priv), GFP_KERNEL);
52153 - if (priv == NULL)
52158 new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
52160 - if (new_bus == NULL)
52163 + goto out_free_priv;
52165 - new_bus->name = "pasemi gpio mdio bus",
52166 - new_bus->read = &gpio_mdio_read,
52167 - new_bus->write = &gpio_mdio_write,
52168 - new_bus->reset = &gpio_mdio_reset,
52169 + new_bus->name = "pasemi gpio mdio bus";
52170 + new_bus->read = &gpio_mdio_read;
52171 + new_bus->write = &gpio_mdio_write;
52172 + new_bus->reset = &gpio_mdio_reset;
52174 prop = of_get_property(np, "reg", NULL);
52175 new_bus->id = *prop;
52176 @@ -265,9 +247,24 @@
52177 new_bus->phy_mask = 0;
52179 new_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
52180 - for(i = 0; i < PHY_MAX_ADDR; ++i)
52181 - new_bus->irq[i] = irq_create_mapping(NULL, 10);
52183 + if (!new_bus->irq)
52184 + goto out_free_bus;
52186 + for (i = 0; i < PHY_MAX_ADDR; i++)
52187 + new_bus->irq[i] = NO_IRQ;
52189 + for (phy_dn = of_get_next_child(np, NULL);
52191 + phy_dn = of_get_next_child(np, phy_dn)) {
52192 + const unsigned int *ip, *regp;
52194 + ip = of_get_property(phy_dn, "interrupts", NULL);
52195 + regp = of_get_property(phy_dn, "reg", NULL);
52196 + if (!ip || !regp || *regp >= PHY_MAX_ADDR)
52198 + new_bus->irq[*regp] = irq_create_mapping(NULL, *ip);
52201 prop = of_get_property(np, "mdc-pin", NULL);
52202 priv->mdc_pin = *prop;
52203 @@ -280,17 +277,21 @@
52205 err = mdiobus_register(new_bus);
52209 printk(KERN_ERR "%s: Cannot register as MDIO bus, err %d\n",
52210 new_bus->name, err);
52211 - goto bus_register_fail;
52212 + goto out_free_irq;
52217 -bus_register_fail:
52219 + kfree(new_bus->irq);
52229 @@ -317,6 +318,7 @@
52233 +MODULE_DEVICE_TABLE(of, gpio_mdio_match);
52235 static struct of_platform_driver gpio_mdio_driver =
52237 @@ -330,12 +332,32 @@
52239 int gpio_mdio_init(void)
52241 + struct device_node *np;
52243 + np = of_find_compatible_node(NULL, NULL, "1682m-gpio");
52245 + np = of_find_compatible_node(NULL, NULL,
52246 + "pasemi,pwrficient-gpio");
52249 + gpio_regs = of_iomap(np, 0);
52255 return of_register_platform_driver(&gpio_mdio_driver);
52257 +module_init(gpio_mdio_init);
52259 void gpio_mdio_exit(void)
52261 of_unregister_platform_driver(&gpio_mdio_driver);
52263 + iounmap(gpio_regs);
52265 -device_initcall(gpio_mdio_init);
52266 +module_exit(gpio_mdio_exit);
52268 +MODULE_LICENSE("GPL");
52269 +MODULE_AUTHOR("Olof Johansson <olof@lixom.net>");
52270 +MODULE_DESCRIPTION("Driver for MDIO over GPIO on PA Semi PWRficient-based boards");
52271 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pasemi/idle.c powerpc.git/arch/powerpc/platforms/pasemi/idle.c
52272 --- linux-2.6.24/arch/powerpc/platforms/pasemi/idle.c 2008-01-24 23:58:37.000000000 +0100
52273 +++ powerpc.git/arch/powerpc/platforms/pasemi/idle.c 2008-01-28 20:25:49.000000000 +0100
52276 static int __init pasemi_idle_init(void)
52278 - if (!machine_is(pasemi))
52281 #ifndef CONFIG_PPC_PASEMI_CPUFREQ
52282 printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n");
52288 -late_initcall(pasemi_idle_init);
52289 +machine_late_initcall(pasemi, pasemi_idle_init);
52291 static int __init idle_param(char *p)
52293 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pasemi/pasemi.h powerpc.git/arch/powerpc/platforms/pasemi/pasemi.h
52294 --- linux-2.6.24/arch/powerpc/platforms/pasemi/pasemi.h 2008-01-24 23:58:37.000000000 +0100
52295 +++ powerpc.git/arch/powerpc/platforms/pasemi/pasemi.h 2008-01-28 20:25:49.000000000 +0100
52298 /* Restore astate to last set */
52299 #ifdef CONFIG_PPC_PASEMI_CPUFREQ
52300 +extern int check_astate(void);
52301 extern void restore_astate(int cpu);
52303 +static inline int check_astate(void)
52305 + /* Always return >0 so we never power save */
52308 static inline void restore_astate(int cpu)
52311 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pasemi/powersave.S powerpc.git/arch/powerpc/platforms/pasemi/powersave.S
52312 --- linux-2.6.24/arch/powerpc/platforms/pasemi/powersave.S 2008-01-24 23:58:37.000000000 +0100
52313 +++ powerpc.git/arch/powerpc/platforms/pasemi/powersave.S 2008-01-28 20:25:49.000000000 +0100
52318 +#ifdef CONFIG_PPC_PASEMI_CPUFREQ
52321 + /* Only do power savings when in astate 0 */
52328 LOAD_REG_IMMEDIATE(r6,MSR_DR|MSR_IR|MSR_ME|MSR_EE)
52340 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pasemi/setup.c powerpc.git/arch/powerpc/platforms/pasemi/setup.c
52341 --- linux-2.6.24/arch/powerpc/platforms/pasemi/setup.c 2008-01-24 23:58:37.000000000 +0100
52342 +++ powerpc.git/arch/powerpc/platforms/pasemi/setup.c 2008-01-28 20:25:49.000000000 +0100
52344 #include <linux/delay.h>
52345 #include <linux/console.h>
52346 #include <linux/pci.h>
52347 +#include <linux/of_platform.h>
52349 #include <asm/prom.h>
52350 #include <asm/system.h>
52352 #include <asm/mpic.h>
52353 #include <asm/smp.h>
52354 #include <asm/time.h>
52355 -#include <asm/of_platform.h>
52356 +#include <asm/mmu.h>
52358 #include <pcmcia/ss.h>
52359 #include <pcmcia/cistpl.h>
52362 #include "pasemi.h"
52364 +#if !defined(CONFIG_SMP)
52365 +static void smp_send_stop(void) {}
52368 /* SDC reset register, must be pre-mapped at reset time */
52369 static void __iomem *reset_reg;
52371 @@ -56,10 +61,14 @@
52373 static struct mce_regs mce_regs[MAX_MCE_REGS];
52374 static int num_mce_regs;
52375 +static int nmi_virq = NO_IRQ;
52378 static void pas_restart(char *cmd)
52380 + /* Need to put others cpu in hold loop so they're not sleeping */
52383 printk("Restarting...\n");
52385 out_le32(reset_reg, 0x6000000);
52386 @@ -126,9 +135,6 @@
52387 struct pci_dev *dev;
52390 - if (!machine_is(pasemi))
52393 /* Remap various SoC status registers for use by the MCE handler */
52396 @@ -172,7 +178,7 @@
52400 -device_initcall(pas_setup_mce_regs);
52401 +machine_device_initcall(pasemi, pas_setup_mce_regs);
52403 static __init void pas_init_IRQ(void)
52405 @@ -181,6 +187,8 @@
52406 unsigned long openpic_addr;
52407 const unsigned int *opprop;
52410 + const unsigned int *nmiprop;
52414 @@ -213,13 +221,26 @@
52415 openpic_addr = of_read_number(opprop, naddr);
52416 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
52418 + mpic_flags = MPIC_PRIMARY | MPIC_LARGE_VECTORS | MPIC_NO_BIAS;
52420 + nmiprop = of_get_property(mpic_node, "nmi-source", NULL);
52422 + mpic_flags |= MPIC_ENABLE_MCK;
52424 mpic = mpic_alloc(mpic_node, openpic_addr,
52425 - MPIC_PRIMARY|MPIC_LARGE_VECTORS,
52426 - 0, 0, " PAS-OPIC ");
52427 + mpic_flags, 0, 0, "PASEMI-OPIC");
52430 mpic_assign_isu(mpic, 0, openpic_addr + 0x10000);
52432 + /* The NMI/MCK source needs to be prio 15 */
52434 + nmi_virq = irq_create_mapping(NULL, *nmiprop);
52435 + mpic_irq_set_priority(nmi_virq, 15);
52436 + set_irq_type(nmi_virq, IRQ_TYPE_EDGE_RISING);
52437 + mpic_unmask_irq(nmi_virq);
52440 of_node_put(mpic_node);
52443 @@ -239,6 +260,14 @@
52448 + if (nmi_virq != NO_IRQ && mpic_get_mcirq() == nmi_virq) {
52449 + printk(KERN_ERR "NMI delivered\n");
52451 + mpic_end_irq(nmi_virq);
52455 dsisr = mfspr(SPRN_DSISR);
52456 printk(KERN_ERR "Machine Check on CPU %d\n", cpu);
52457 printk(KERN_ERR "SRR0 0x%016lx SRR1 0x%016lx\n", srr0, srr1);
52458 @@ -295,14 +324,14 @@
52461 printk(KERN_ERR "slb contents:\n");
52462 - for (i = 0; i < SLB_NUM_ENTRIES; i++) {
52463 + for (i = 0; i < mmu_slb_size; i++) {
52464 asm volatile("slbmfee %0,%1" : "=r" (e) : "r" (i));
52465 asm volatile("slbmfev %0,%1" : "=r" (v) : "r" (i));
52466 printk(KERN_ERR "%02d %016lx %016lx\n", i, e, v);
52472 /* SRR1[62] is from MSR[62] if recoverable, so pass that back */
52473 return !!(srr1 & 0x2);
52475 @@ -362,16 +391,17 @@
52478 static struct of_device_id pasemi_bus_ids[] = {
52479 + /* Unfortunately needed for legacy firmwares */
52480 { .type = "localbus", },
52481 { .type = "sdc", },
52482 + /* These are the proper entries, which newer firmware uses */
52483 + { .compatible = "pasemi,localbus", },
52484 + { .compatible = "pasemi,sdc", },
52488 static int __init pasemi_publish_devices(void)
52490 - if (!machine_is(pasemi))
52493 pasemi_pcmcia_init();
52495 /* Publish OF platform devices for SDC and other non-PCI devices */
52496 @@ -379,7 +409,7 @@
52500 -device_initcall(pasemi_publish_devices);
52501 +machine_device_initcall(pasemi, pasemi_publish_devices);
52505 @@ -389,7 +419,8 @@
52507 unsigned long root = of_get_flat_dt_root();
52509 - if (!of_flat_dt_is_compatible(root, "PA6T-1682M"))
52510 + if (!of_flat_dt_is_compatible(root, "PA6T-1682M") &&
52511 + !of_flat_dt_is_compatible(root, "pasemi,pwrficient"))
52514 hpte_init_native();
52515 @@ -400,7 +431,7 @@
52518 define_machine(pasemi) {
52519 - .name = "PA Semi PA6T-1682M",
52520 + .name = "PA Semi PWRficient",
52521 .probe = pas_probe,
52522 .setup_arch = pas_setup_arch,
52523 .init_early = pas_init_early,
52524 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/powermac/low_i2c.c powerpc.git/arch/powerpc/platforms/powermac/low_i2c.c
52525 --- linux-2.6.24/arch/powerpc/platforms/powermac/low_i2c.c 2008-01-24 23:58:37.000000000 +0100
52526 +++ powerpc.git/arch/powerpc/platforms/powermac/low_i2c.c 2008-01-28 20:25:49.000000000 +0100
52527 @@ -585,8 +585,7 @@
52528 struct device_node *np, *child, *parent;
52530 /* Probe keywest-i2c busses */
52532 - (np = of_find_compatible_node(np, "i2c","keywest-i2c")) != NULL;){
52533 + for_each_compatible_node(np, "i2c","keywest-i2c") {
52534 struct pmac_i2c_host_kw *host;
52535 int multibus, chans, i;
52537 @@ -1462,9 +1461,6 @@
52541 - if (!machine_is(powermac))
52544 /* Probe keywest-i2c busses */
52547 @@ -1483,7 +1479,7 @@
52551 -arch_initcall(pmac_i2c_init);
52552 +machine_arch_initcall(powermac, pmac_i2c_init);
52554 /* Since pmac_i2c_init can be called too early for the platform device
52555 * registration, we need to do it at a later time. In our case, subsys
52556 @@ -1515,4 +1511,4 @@
52560 -subsys_initcall(pmac_i2c_create_platform_devices);
52561 +machine_subsys_initcall(powermac, pmac_i2c_create_platform_devices);
52562 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/powermac/pci.c powerpc.git/arch/powerpc/platforms/powermac/pci.c
52563 --- linux-2.6.24/arch/powerpc/platforms/powermac/pci.c 2008-01-24 23:58:37.000000000 +0100
52564 +++ powerpc.git/arch/powerpc/platforms/powermac/pci.c 2008-01-28 20:25:49.000000000 +0100
52566 static int has_uninorth;
52567 #ifdef CONFIG_PPC64
52568 static struct pci_controller *u3_agp;
52569 -static struct pci_controller *u4_pcie;
52570 -static struct pci_controller *u3_ht;
52572 static int has_second_ohare;
52573 #endif /* CONFIG_PPC64 */
52574 @@ -314,12 +312,15 @@
52576 /* We only allow config cycles to devices that are in OF device-tree
52577 * as we are apparently having some weird things going on with some
52578 - * revs of K2 on recent G5s
52579 + * revs of K2 on recent G5s, except for the host bridge itself, which
52580 + * is missing from the tree but we know we can probe.
52583 busdn = pci_device_to_OF_node(bus->self);
52584 + else if (devfn == 0)
52587 - busdn = hose->arch_data;
52588 + busdn = hose->dn;
52589 for (dn = busdn->child; dn; dn = dn->sibling)
52590 if (PCI_DN(dn) && PCI_DN(dn)->devfn == devfn)
52592 @@ -344,14 +345,15 @@
52593 + (((unsigned int)bus) << 16) \
52596 -static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose,
52597 - u8 bus, u8 devfn, u8 offset)
52598 +static void __iomem *u3_ht_cfg_access(struct pci_controller *hose, u8 bus,
52599 + u8 devfn, u8 offset, int *swap)
52602 if (bus == hose->first_busno) {
52603 - /* For now, we don't self probe U3 HT bridge */
52604 - if (PCI_SLOT(devfn) == 0)
52606 - return hose->cfg_data + U3_HT_CFA0(devfn, offset);
52608 + return hose->cfg_data + U3_HT_CFA0(devfn, offset);
52610 + return ((void __iomem *)hose->cfg_addr) + (offset << 2);
52612 return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset);
52614 @@ -360,14 +362,15 @@
52615 int offset, int len, u32 *val)
52617 struct pci_controller *hose;
52618 - volatile void __iomem *addr;
52619 + void __iomem *addr;
52622 hose = pci_bus_to_host(bus);
52624 return PCIBIOS_DEVICE_NOT_FOUND;
52625 if (offset >= 0x100)
52626 return PCIBIOS_BAD_REGISTER_NUMBER;
52627 - addr = u3_ht_cfg_access(hose, bus->number, devfn, offset);
52628 + addr = u3_ht_cfg_access(hose, bus->number, devfn, offset, &swap);
52630 return PCIBIOS_DEVICE_NOT_FOUND;
52632 @@ -397,10 +400,10 @@
52636 - *val = in_le16(addr);
52637 + *val = swap ? in_le16(addr) : in_be16(addr);
52640 - *val = in_le32(addr);
52641 + *val = swap ? in_le32(addr) : in_be32(addr);
52644 return PCIBIOS_SUCCESSFUL;
52645 @@ -410,14 +413,15 @@
52646 int offset, int len, u32 val)
52648 struct pci_controller *hose;
52649 - volatile void __iomem *addr;
52650 + void __iomem *addr;
52653 hose = pci_bus_to_host(bus);
52655 return PCIBIOS_DEVICE_NOT_FOUND;
52656 if (offset >= 0x100)
52657 return PCIBIOS_BAD_REGISTER_NUMBER;
52658 - addr = u3_ht_cfg_access(hose, bus->number, devfn, offset);
52659 + addr = u3_ht_cfg_access(hose, bus->number, devfn, offset, &swap);
52661 return PCIBIOS_DEVICE_NOT_FOUND;
52663 @@ -439,10 +443,10 @@
52667 - out_le16(addr, val);
52668 + swap ? out_le16(addr, val) : out_be16(addr, val);
52671 - out_le32((u32 __iomem *)addr, val);
52672 + swap ? out_le32(addr, val) : out_be32(addr, val);
52675 return PCIBIOS_SUCCESSFUL;
52676 @@ -725,7 +729,7 @@
52677 static int __init setup_uninorth(struct pci_controller *hose,
52678 struct resource *addr)
52680 - pci_assign_all_buses = 1;
52681 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
52683 hose->ops = ¯isc_pci_ops;
52684 hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000);
52685 @@ -773,31 +777,72 @@
52687 hose->first_busno = 0x00;
52688 hose->last_busno = 0xff;
52692 -static void __init setup_u3_ht(struct pci_controller* hose)
52693 +static void __init parse_region_decode(struct pci_controller *hose,
52696 - struct device_node *np = (struct device_node *)hose->arch_data;
52697 - struct pci_controller *other = NULL;
52699 + unsigned long base, end, next = -1;
52702 + /* Iterate through all bits. We ignore the last bit as this region is
52703 + * reserved for the ROM among other niceties
52705 + for (i = 0; i < 31; i++) {
52706 + if ((decode & (0x80000000 >> i)) == 0)
52709 + base = 0xf0000000 | (((u32)i) << 24);
52710 + end = base + 0x00ffffff;
52712 + base = ((u32)i-16) << 28;
52713 + end = base + 0x0fffffff;
52715 + if (base != next) {
52716 + if (++cur >= 3) {
52717 + printk(KERN_WARNING "PCI: Too many ranges !\n");
52720 + hose->mem_resources[cur].flags = IORESOURCE_MEM;
52721 + hose->mem_resources[cur].name = hose->dn->full_name;
52722 + hose->mem_resources[cur].start = base;
52723 + hose->mem_resources[cur].end = end;
52724 + DBG(" %d: 0x%08lx-0x%08lx\n", cur, base, end);
52726 + DBG(" : -0x%08lx\n", end);
52727 + hose->mem_resources[cur].end = end;
52733 +static void __init setup_u3_ht(struct pci_controller* hose)
52735 + struct device_node *np = hose->dn;
52736 + struct resource cfg_res, self_res;
52739 hose->ops = &u3_ht_pci_ops;
52741 - /* We hard code the address because of the different size of
52742 - * the reg address cell, we shall fix that by killing struct
52743 - * reg_property and using some accessor functions instead
52744 + /* Get base addresses from OF tree
52746 - hose->cfg_data = ioremap(0xf2000000, 0x02000000);
52747 + if (of_address_to_resource(np, 0, &cfg_res) ||
52748 + of_address_to_resource(np, 1, &self_res)) {
52749 + printk(KERN_ERR "PCI: Failed to get U3/U4 HT resources !\n");
52753 + /* Map external cfg space access into cfg_data and self registers
52756 + hose->cfg_data = ioremap(cfg_res.start, 0x02000000);
52757 + hose->cfg_addr = ioremap(self_res.start,
52758 + self_res.end - self_res.start + 1);
52761 - * /ht node doesn't expose a "ranges" property, so we "remove"
52762 - * regions that have been allocated to AGP. So far, this version of
52763 - * the code doesn't assign any of the 0xfxxxxxxx "fine" memory regions
52764 - * to /ht. We need to fix that sooner or later by either parsing all
52765 - * child "ranges" properties or figuring out the U3 address space
52766 - * decoding logic and then read its configuration register (if any).
52767 + * /ht node doesn't expose a "ranges" property, we read the register
52768 + * that controls the decoding logic and use that for memory regions.
52769 + * The IO region is hard coded since it is fixed in HW as well.
52771 hose->io_base_phys = 0xf4000000;
52772 hose->pci_io_size = 0x00400000;
52773 @@ -808,76 +853,33 @@
52774 hose->pci_mem_offset = 0;
52775 hose->first_busno = 0;
52776 hose->last_busno = 0xef;
52777 - hose->mem_resources[0].name = np->full_name;
52778 - hose->mem_resources[0].start = 0x80000000;
52779 - hose->mem_resources[0].end = 0xefffffff;
52780 - hose->mem_resources[0].flags = IORESOURCE_MEM;
52784 - if (u3_agp != NULL)
52786 - else if (u4_pcie != NULL)
52789 - if (other == NULL) {
52790 - DBG("U3/4 has no AGP/PCIE, using full resource range\n");
52793 + /* Note: fix offset when cfg_addr becomes a void * */
52794 + decode = in_be32(hose->cfg_addr + 0x80);
52796 - /* Fixup bus range vs. PCIE */
52798 - hose->last_busno = u4_pcie->first_busno - 1;
52800 - /* We "remove" the AGP resources from the resources allocated to HT,
52801 - * that is we create "holes". However, that code does assumptions
52802 - * that so far happen to be true (cross fingers...), typically that
52803 - * resources in the AGP node are properly ordered
52806 - for (i=0; i<3; i++) {
52807 - struct resource *res = &other->mem_resources[i];
52808 - if (res->flags != IORESOURCE_MEM)
52810 - /* We don't care about "fine" resources */
52811 - if (res->start >= 0xf0000000)
52813 - /* Check if it's just a matter of "shrinking" us in one
52816 - if (hose->mem_resources[cur].start == res->start) {
52817 - DBG("U3/HT: shrink start of %d, %08lx -> %08lx\n",
52818 - cur, hose->mem_resources[cur].start,
52820 - hose->mem_resources[cur].start = res->end + 1;
52823 - if (hose->mem_resources[cur].end == res->end) {
52824 - DBG("U3/HT: shrink end of %d, %08lx -> %08lx\n",
52825 - cur, hose->mem_resources[cur].end,
52827 - hose->mem_resources[cur].end = res->start - 1;
52830 - /* No, it's not the case, we need a hole */
52832 - /* not enough resources for a hole, we drop part
52835 - printk(KERN_WARNING "Running out of resources"
52836 - " for /ht host !\n");
52837 - hose->mem_resources[cur].end = res->start - 1;
52841 - DBG("U3/HT: hole, %d end at %08lx, %d start at %08lx\n",
52842 - cur-1, res->start - 1, cur, res->end + 1);
52843 - hose->mem_resources[cur].name = np->full_name;
52844 - hose->mem_resources[cur].flags = IORESOURCE_MEM;
52845 - hose->mem_resources[cur].start = res->end + 1;
52846 - hose->mem_resources[cur].end = hose->mem_resources[cur-1].end;
52847 - hose->mem_resources[cur-1].end = res->start - 1;
52849 + DBG("PCI: Apple HT bridge decode register: 0x%08x\n", decode);
52851 + /* NOTE: The decode register setup is a bit weird... region
52852 + * 0xf8000000 for example is marked as enabled in there while it's
52853 + & actually the memory controller registers.
52854 + * That means that we are incorrectly attributing it to HT.
52856 + * In a similar vein, region 0xf4000000 is actually the HT IO space but
52857 + * also marked as enabled in here and 0xf9000000 is used by some other
52858 + * internal bits of the northbridge.
52860 + * Unfortunately, we can't just mask out those bit as we would end
52861 + * up with more regions than we can cope (linux can only cope with
52862 + * 3 memory regions for a PHB at this stage).
52864 + * So for now, we just do a little hack. We happen to -know- that
52865 + * Apple firmware doesn't assign things below 0xfa000000 for that
52866 + * bridge anyway so we mask out all bits we don't want.
52868 + decode &= 0x003fffff;
52870 + /* Now parse the resulting bits and build resources */
52871 + parse_region_decode(hose, decode);
52873 #endif /* CONFIG_PPC64 */
52875 @@ -994,6 +996,8 @@
52876 struct device_node *np, *root;
52877 struct device_node *ht = NULL;
52879 + ppc_pci_flags = PPC_PCI_CAN_SKIP_ISA_ALIGN;
52881 root = of_find_node_by_path("/");
52882 if (root == NULL) {
52883 printk(KERN_CRIT "pmac_pci_init: can't find root "
52884 @@ -1032,15 +1036,15 @@
52888 - struct device_node *np = u3_agp->arch_data;
52889 + struct device_node *np = u3_agp->dn;
52890 PCI_DN(np)->busno = 0xf0;
52891 for (np = np->child; np; np = np->sibling)
52892 PCI_DN(np)->busno = 0xf0;
52894 /* pmac_check_ht_link(); */
52896 - /* Tell pci.c to not use the common resource allocation mechanism */
52897 - pci_probe_only = 1;
52898 + /* We can allocate missing resources if any */
52899 + pci_probe_only = 0;
52901 #else /* CONFIG_PPC64 */
52903 @@ -1051,13 +1055,13 @@
52904 * some offset between bus number and domains for now when we
52905 * assign all busses should help for now
52907 - if (pci_assign_all_buses)
52908 + if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS)
52909 pcibios_assign_bus_offset = 0x10;
52914 -pmac_pci_enable_device_hook(struct pci_dev *dev, int initial)
52915 +#ifdef CONFIG_PPC32
52916 +int pmac_pci_enable_device_hook(struct pci_dev *dev)
52918 struct device_node* node;
52920 @@ -1099,24 +1103,21 @@
52925 + * Fixup various header fields on 32 bits. We don't do that on
52926 + * 64 bits as some of these have strange values behind the HT
52927 + * bridge and we must not, for example, enable MWI or set the
52928 + * cache line size on them.
52934 - * Make sure PCI is correctly configured
52936 - * We use old pci_bios versions of the function since, by
52937 - * default, gmac is not powered up, and so will be absent
52938 - * from the kernel initial PCI lookup.
52940 - * Should be replaced by 2.4 new PCI mechanisms and really
52941 - * register the device.
52943 pci_read_config_word(dev, PCI_COMMAND, &cmd);
52944 cmd |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER
52945 | PCI_COMMAND_INVALIDATE;
52946 pci_write_config_word(dev, PCI_COMMAND, cmd);
52947 pci_write_config_byte(dev, PCI_LATENCY_TIMER, 16);
52949 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
52950 L1_CACHE_BYTES >> 2);
52952 @@ -1124,6 +1125,18 @@
52956 +void __devinit pmac_pci_fixup_ohci(struct pci_dev *dev)
52958 + struct device_node *node = pci_device_to_OF_node(dev);
52960 + /* We don't want to assign resources to USB controllers
52961 + * absent from the OF tree (iBook second controller)
52963 + if (dev->class == PCI_CLASS_SERIAL_USB_OHCI && !node)
52964 + dev->resource[0].flags = 0;
52966 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, PCI_ANY_ID, pmac_pci_fixup_ohci);
52968 /* We power down some devices after they have been probed. They'll
52969 * be powered back on later on
52971 @@ -1171,7 +1184,6 @@
52975 -#ifdef CONFIG_PPC32
52976 void pmac_pci_fixup_cardbus(struct pci_dev* dev)
52978 if (!machine_is(powermac))
52979 @@ -1259,7 +1271,7 @@
52982 DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata);
52984 +#endif /* CONFIG_PPC32 */
52987 * Disable second function on K2-SATA, it's broken
52988 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/powermac/pfunc_base.c powerpc.git/arch/powerpc/platforms/powermac/pfunc_base.c
52989 --- linux-2.6.24/arch/powerpc/platforms/powermac/pfunc_base.c 2008-01-24 23:58:37.000000000 +0100
52990 +++ powerpc.git/arch/powerpc/platforms/powermac/pfunc_base.c 2008-01-28 20:25:49.000000000 +0100
52991 @@ -363,8 +363,7 @@
52996 -arch_initcall(pmac_pfunc_base_install);
52997 +machine_arch_initcall(powermac, pmac_pfunc_base_install);
53001 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/powermac/pic.c powerpc.git/arch/powerpc/platforms/powermac/pic.c
53002 --- linux-2.6.24/arch/powerpc/platforms/powermac/pic.c 2008-01-24 23:58:37.000000000 +0100
53003 +++ powerpc.git/arch/powerpc/platforms/powermac/pic.c 2008-01-28 20:25:49.000000000 +0100
53004 @@ -690,6 +690,5 @@
53005 sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic);
53009 -subsys_initcall(init_pmacpic_sysfs);
53010 +machine_subsys_initcall(powermac, init_pmacpic_sysfs);
53012 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/powermac/pmac.h powerpc.git/arch/powerpc/platforms/powermac/pmac.h
53013 --- linux-2.6.24/arch/powerpc/platforms/powermac/pmac.h 2008-01-24 23:58:37.000000000 +0100
53014 +++ powerpc.git/arch/powerpc/platforms/powermac/pmac.h 2008-01-28 20:25:49.000000000 +0100
53016 extern void pmac_nvram_update(void);
53017 extern unsigned char pmac_nvram_read_byte(int addr);
53018 extern void pmac_nvram_write_byte(int addr, unsigned char val);
53019 -extern int pmac_pci_enable_device_hook(struct pci_dev *dev, int initial);
53020 +extern int pmac_pci_enable_device_hook(struct pci_dev *dev);
53021 extern void pmac_pcibios_after_init(void);
53022 extern int of_show_percpuinfo(struct seq_file *m, int i);
53024 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/powermac/setup.c powerpc.git/arch/powerpc/platforms/powermac/setup.c
53025 --- linux-2.6.24/arch/powerpc/platforms/powermac/setup.c 2008-01-24 23:58:37.000000000 +0100
53026 +++ powerpc.git/arch/powerpc/platforms/powermac/setup.c 2008-01-28 20:25:49.000000000 +0100
53028 #include <linux/root_dev.h>
53029 #include <linux/bitops.h>
53030 #include <linux/suspend.h>
53031 +#include <linux/of_device.h>
53032 +#include <linux/of_platform.h>
53034 #include <asm/reg.h>
53035 #include <asm/sections.h>
53037 #include <asm/btext.h>
53038 #include <asm/pmac_feature.h>
53039 #include <asm/time.h>
53040 -#include <asm/of_device.h>
53041 -#include <asm/of_platform.h>
53042 #include <asm/mmu_context.h>
53043 #include <asm/iommu.h>
53044 #include <asm/smu.h>
53046 #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
53048 #ifdef CONFIG_PPC64
53049 -#include <asm/udbg.h>
53053 @@ -398,17 +397,13 @@
53055 static int pmac_late_init(void)
53057 - if (!machine_is(powermac))
53061 /* this is udbg (which is __init) and we can later use it during
53062 * cpu hotplug (in smp_core99_kick_cpu) */
53063 ppc_md.progress = NULL;
53067 -late_initcall(pmac_late_init);
53068 +machine_late_initcall(powermac, pmac_late_init);
53071 * This is __init_refok because we check for "initializing" before
53072 @@ -535,9 +530,6 @@
53073 if (machine_is(chrp))
53076 - if (!machine_is(powermac))
53079 np = of_find_node_by_name(NULL, "valkyrie");
53081 of_platform_device_create(np, "valkyrie", NULL);
53082 @@ -552,8 +544,7 @@
53087 -device_initcall(pmac_declare_of_platform_devices);
53088 +machine_device_initcall(powermac, pmac_declare_of_platform_devices);
53091 * Called very early, MMU is off, device-tree isn't unflattened
53092 @@ -613,9 +604,11 @@
53094 /* We need to use normal PCI probing for the AGP bus,
53095 * since the device for the AGP bridge isn't in the tree.
53096 + * Same for the PCIe host on U4 and the HT host bridge.
53098 if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") ||
53099 - of_device_is_compatible(node, "u4-pcie")))
53100 + of_device_is_compatible(node, "u4-pcie") ||
53101 + of_device_is_compatible(node, "u3-ht")))
53102 return PCI_PROBE_NORMAL;
53103 return PCI_PROBE_DEVTREE;
53105 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/powermac/time.c powerpc.git/arch/powerpc/platforms/powermac/time.c
53106 --- linux-2.6.24/arch/powerpc/platforms/powermac/time.c 2008-01-24 23:58:37.000000000 +0100
53107 +++ powerpc.git/arch/powerpc/platforms/powermac/time.c 2008-01-28 20:25:49.000000000 +0100
53108 @@ -84,12 +84,14 @@
53112 +#if defined(CONFIG_ADB_CUDA) || defined(CONFIG_ADB_PMU)
53113 static void to_rtc_time(unsigned long now, struct rtc_time *tm)
53116 tm->tm_year -= 1900;
53121 static unsigned long from_rtc_time(struct rtc_time *tm)
53123 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/ps3/Kconfig powerpc.git/arch/powerpc/platforms/ps3/Kconfig
53124 --- linux-2.6.24/arch/powerpc/platforms/ps3/Kconfig 2008-01-24 23:58:37.000000000 +0100
53125 +++ powerpc.git/arch/powerpc/platforms/ps3/Kconfig 2008-01-28 20:25:49.000000000 +0100
53127 This support is mainly for Linux kernel development. If unsure,
53130 -config PS3_USE_LPAR_ADDR
53131 - depends on PPC_PS3 && EXPERIMENTAL
53132 - bool "PS3 use lpar address space"
53135 - This option is solely for experimentation by experts. Disables
53136 - translation of lpar addresses. SPE support currently won't work
53137 - without this set to y.
53139 - If you have any doubt, choose the default y.
53144 @@ -138,4 +127,17 @@
53145 be disabled on the kernel command line using "ps3flash=off", to
53146 not allocate this fixed buffer.
53149 + tristate "PS3 Logical Performance Monitor support"
53150 + depends on PPC_PS3
53152 + Include support for the PS3 Logical Performance Monitor.
53154 + This support is required to use the logical performance monitor
53155 + of the PS3's LV1 hypervisor.
53157 + If you intend to use the advanced performance monitoring and
53158 + profiling support of the Cell processor with programs like
53159 + oprofile and perfmon2, then say Y or M, otherwise say N.
53162 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/ps3/device-init.c powerpc.git/arch/powerpc/platforms/ps3/device-init.c
53163 --- linux-2.6.24/arch/powerpc/platforms/ps3/device-init.c 2008-01-24 23:58:37.000000000 +0100
53164 +++ powerpc.git/arch/powerpc/platforms/ps3/device-init.c 2008-01-28 20:25:49.000000000 +0100
53166 #include <linux/kernel.h>
53167 #include <linux/kthread.h>
53168 #include <linux/init.h>
53169 +#include <linux/reboot.h>
53171 #include <asm/firmware.h>
53172 #include <asm/lv1call.h>
53175 #include "platform.h"
53177 +static int __init ps3_register_lpm_devices(void)
53182 + struct ps3_system_bus_device *dev;
53184 + pr_debug(" -> %s:%d\n", __func__, __LINE__);
53186 + dev = kzalloc(sizeof(*dev), GFP_KERNEL);
53190 + dev->match_id = PS3_MATCH_ID_LPM;
53191 + dev->dev_type = PS3_DEVICE_TYPE_LPM;
53193 + /* The current lpm driver only supports a single BE processor. */
53195 + result = ps3_repository_read_be_node_id(0, &dev->lpm.node_id);
53198 + pr_debug("%s:%d: ps3_repository_read_be_node_id failed \n",
53199 + __func__, __LINE__);
53200 + goto fail_read_repo;
53203 + result = ps3_repository_read_lpm_privileges(dev->lpm.node_id, &tmp1,
53204 + &dev->lpm.rights);
53207 + pr_debug("%s:%d: ps3_repository_read_lpm_privleges failed \n",
53208 + __func__, __LINE__);
53209 + goto fail_read_repo;
53212 + lv1_get_logical_partition_id(&tmp2);
53214 + if (tmp1 != tmp2) {
53215 + pr_debug("%s:%d: wrong lpar\n",
53216 + __func__, __LINE__);
53217 + result = -ENODEV;
53218 + goto fail_rights;
53221 + if (!(dev->lpm.rights & PS3_LPM_RIGHTS_USE_LPM)) {
53222 + pr_debug("%s:%d: don't have rights to use lpm\n",
53223 + __func__, __LINE__);
53225 + goto fail_rights;
53228 + pr_debug("%s:%d: pu_id %lu, rights %lu(%lxh)\n",
53229 + __func__, __LINE__, dev->lpm.pu_id, dev->lpm.rights,
53230 + dev->lpm.rights);
53232 + result = ps3_repository_read_pu_id(0, &dev->lpm.pu_id);
53235 + pr_debug("%s:%d: ps3_repository_read_pu_id failed \n",
53236 + __func__, __LINE__);
53237 + goto fail_read_repo;
53240 + result = ps3_system_bus_device_register(dev);
53243 + pr_debug("%s:%d ps3_system_bus_device_register failed\n",
53244 + __func__, __LINE__);
53245 + goto fail_register;
53248 + pr_debug(" <- %s:%d\n", __func__, __LINE__);
53256 + pr_debug(" <- %s:%d: failed\n", __func__, __LINE__);
53261 * ps3_setup_gelic_device - Setup and register a gelic device instance.
53263 @@ -238,166 +322,6 @@
53267 -static int ps3stor_wait_for_completion(u64 dev_id, u64 tag,
53268 - unsigned int timeout)
53271 - unsigned int retries = 0;
53274 - for (retries = 0; retries < timeout; retries++) {
53275 - result = lv1_storage_check_async_status(dev_id, tag, &status);
53283 - pr_debug("%s:%u: check_async_status: %s, status %lx\n",
53284 - __func__, __LINE__, ps3_result(result), status);
53290 - * ps3_storage_wait_for_device - Wait for a storage device to become ready.
53291 - * @repo: The repository device to wait for.
53293 - * Uses the hypervisor's storage device notification mechanism to wait until
53294 - * a storage device is ready. The device notification mechanism uses a
53295 - * psuedo device (id = -1) to asynchronously notify the guest when storage
53296 - * devices become ready. The notification device has a block size of 512
53300 -static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)
53302 - int error = -ENODEV;
53304 - const u64 notification_dev_id = (u64)-1LL;
53305 - const unsigned int timeout = HZ;
53309 - enum ps3_notify_type {
53310 - notify_device_ready = 0,
53311 - notify_region_probe = 1,
53312 - notify_region_update = 2,
53315 - u64 operation_code; /* must be zero */
53316 - u64 event_mask; /* OR of 1UL << enum ps3_notify_type */
53319 - u64 event_type; /* enum ps3_notify_type */
53326 - pr_debug(" -> %s:%u: (%u:%u:%u)\n", __func__, __LINE__, repo->bus_id,
53327 - repo->dev_id, repo->dev_type);
53329 - buf = kzalloc(512, GFP_KERNEL);
53333 - lpar = ps3_mm_phys_to_lpar(__pa(buf));
53334 - notify_cmd = buf;
53335 - notify_event = buf;
53337 - result = lv1_open_device(repo->bus_id, notification_dev_id, 0);
53339 - printk(KERN_ERR "%s:%u: lv1_open_device %s\n", __func__,
53340 - __LINE__, ps3_result(result));
53344 - /* Setup and write the request for device notification. */
53346 - notify_cmd->operation_code = 0; /* must be zero */
53347 - notify_cmd->event_mask = 1UL << notify_region_probe;
53349 - result = lv1_storage_write(notification_dev_id, 0, 0, 1, 0, lpar,
53352 - printk(KERN_ERR "%s:%u: write failed %s\n", __func__, __LINE__,
53353 - ps3_result(result));
53357 - /* Wait for the write completion */
53359 - result = ps3stor_wait_for_completion(notification_dev_id, tag,
53362 - printk(KERN_ERR "%s:%u: write not completed %s\n", __func__,
53363 - __LINE__, ps3_result(result));
53367 - /* Loop here processing the requested notification events. */
53370 - memset(notify_event, 0, sizeof(*notify_event));
53372 - result = lv1_storage_read(notification_dev_id, 0, 0, 1, 0,
53375 - printk(KERN_ERR "%s:%u: write failed %s\n", __func__,
53376 - __LINE__, ps3_result(result));
53380 - result = ps3stor_wait_for_completion(notification_dev_id, tag,
53383 - printk(KERN_ERR "%s:%u: read not completed %s\n",
53384 - __func__, __LINE__, ps3_result(result));
53388 - pr_debug("%s:%d: notify event (%u:%u:%u): event_type 0x%lx, "
53389 - "port %lu\n", __func__, __LINE__, repo->bus_index,
53390 - repo->dev_index, repo->dev_type,
53391 - notify_event->event_type, notify_event->dev_port);
53393 - if (notify_event->event_type != notify_region_probe ||
53394 - notify_event->bus_id != repo->bus_id) {
53395 - pr_debug("%s:%u: bad notify_event: event %lu, "
53396 - "dev_id %lu, dev_type %lu\n",
53397 - __func__, __LINE__, notify_event->event_type,
53398 - notify_event->dev_id, notify_event->dev_type);
53402 - if (notify_event->dev_id == repo->dev_id &&
53403 - notify_event->dev_type == repo->dev_type) {
53404 - pr_debug("%s:%u: device ready (%u:%u:%u)\n", __func__,
53405 - __LINE__, repo->bus_index, repo->dev_index,
53411 - if (notify_event->dev_id == repo->dev_id &&
53412 - notify_event->dev_type == PS3_DEV_TYPE_NOACCESS) {
53413 - pr_debug("%s:%u: no access: dev_id %u\n", __func__,
53414 - __LINE__, repo->dev_id);
53420 - lv1_close_device(repo->bus_id, notification_dev_id);
53423 - pr_debug(" <- %s:%u\n", __func__, __LINE__);
53427 static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
53428 enum ps3_match_id match_id)
53430 @@ -449,16 +373,6 @@
53431 goto fail_find_interrupt;
53434 - /* FIXME: Arrange to only do this on a 'cold' boot */
53436 - result = ps3_storage_wait_for_device(repo);
53438 - printk(KERN_ERR "%s:%u: storage_notification failed %d\n",
53439 - __func__, __LINE__, result);
53440 - result = -ENODEV;
53441 - goto fail_probe_notification;
53444 for (i = 0; i < num_regions; i++) {
53447 @@ -494,7 +408,6 @@
53449 fail_device_register:
53451 -fail_probe_notification:
53452 fail_find_interrupt:
53455 @@ -659,62 +572,268 @@
53459 +static void ps3_find_and_add_device(u64 bus_id, u64 dev_id)
53461 + struct ps3_repository_device repo;
53463 + unsigned int retries;
53464 + unsigned long rem;
53467 + * On some firmware versions (e.g. 1.90), the device may not show up
53468 + * in the repository immediately
53470 + for (retries = 0; retries < 10; retries++) {
53471 + res = ps3_repository_find_device_by_id(&repo, bus_id, dev_id);
53475 + rem = msleep_interruptible(100);
53479 + pr_warning("%s:%u: device %lu:%lu not found\n", __func__, __LINE__,
53485 + pr_debug("%s:%u: device %lu:%lu found after %u retries\n",
53486 + __func__, __LINE__, bus_id, dev_id, retries);
53488 + ps3_register_repository_device(&repo);
53492 +#define PS3_NOTIFICATION_DEV_ID ULONG_MAX
53493 +#define PS3_NOTIFICATION_INTERRUPT_ID 0
53495 +struct ps3_notification_device {
53496 + struct ps3_system_bus_device sbd;
53500 + struct completion done;
53503 +enum ps3_notify_type {
53504 + notify_device_ready = 0,
53505 + notify_region_probe = 1,
53506 + notify_region_update = 2,
53509 +struct ps3_notify_cmd {
53510 + u64 operation_code; /* must be zero */
53511 + u64 event_mask; /* OR of 1UL << enum ps3_notify_type */
53514 +struct ps3_notify_event {
53515 + u64 event_type; /* enum ps3_notify_type */
53522 +static irqreturn_t ps3_notification_interrupt(int irq, void *data)
53524 + struct ps3_notification_device *dev = data;
53528 + spin_lock(&dev->lock);
53529 + res = lv1_storage_get_async_status(PS3_NOTIFICATION_DEV_ID, &tag,
53531 + if (tag != dev->tag)
53532 + pr_err("%s:%u: tag mismatch, got %lx, expected %lx\n",
53533 + __func__, __LINE__, tag, dev->tag);
53536 + pr_err("%s:%u: res %d status 0x%lx\n", __func__, __LINE__, res,
53539 + pr_debug("%s:%u: completed, status 0x%lx\n", __func__,
53540 + __LINE__, status);
53541 + dev->lv1_status = status;
53542 + complete(&dev->done);
53544 + spin_unlock(&dev->lock);
53545 + return IRQ_HANDLED;
53548 +static int ps3_notification_read_write(struct ps3_notification_device *dev,
53549 + u64 lpar, int write)
53551 + const char *op = write ? "write" : "read";
53552 + unsigned long flags;
53555 + init_completion(&dev->done);
53556 + spin_lock_irqsave(&dev->lock, flags);
53557 + res = write ? lv1_storage_write(dev->sbd.dev_id, 0, 0, 1, 0, lpar,
53559 + : lv1_storage_read(dev->sbd.dev_id, 0, 0, 1, 0, lpar,
53561 + spin_unlock_irqrestore(&dev->lock, flags);
53563 + pr_err("%s:%u: %s failed %d\n", __func__, __LINE__, op, res);
53566 + pr_debug("%s:%u: notification %s issued\n", __func__, __LINE__, op);
53568 + res = wait_event_interruptible(dev->done.wait,
53569 + dev->done.done || kthread_should_stop());
53570 + if (kthread_should_stop())
53573 + pr_debug("%s:%u: interrupted %s\n", __func__, __LINE__, op);
53577 + if (dev->lv1_status) {
53578 + pr_err("%s:%u: %s not completed, status 0x%lx\n", __func__,
53579 + __LINE__, op, dev->lv1_status);
53582 + pr_debug("%s:%u: notification %s completed\n", __func__, __LINE__, op);
53587 +static struct task_struct *probe_task;
53590 * ps3_probe_thread - Background repository probing at system startup.
53592 * This implementation only supports background probing on a single bus.
53593 + * It uses the hypervisor's storage device notification mechanism to wait until
53594 + * a storage device is ready. The device notification mechanism uses a
53595 + * pseudo device to asynchronously notify the guest when storage devices become
53596 + * ready. The notification device has a block size of 512 bytes.
53599 static int ps3_probe_thread(void *data)
53601 - struct ps3_repository_device *repo = data;
53603 - unsigned int ms = 250;
53604 + struct ps3_notification_device dev;
53606 + unsigned int irq;
53609 + struct ps3_notify_cmd *notify_cmd;
53610 + struct ps3_notify_event *notify_event;
53612 pr_debug(" -> %s:%u: kthread started\n", __func__, __LINE__);
53616 + buf = kzalloc(512, GFP_KERNEL);
53620 - pr_debug("%s:%u: probing...\n", __func__, __LINE__);
53621 + lpar = ps3_mm_phys_to_lpar(__pa(buf));
53622 + notify_cmd = buf;
53623 + notify_event = buf;
53625 + /* dummy system bus device */
53626 + dev.sbd.bus_id = (u64)data;
53627 + dev.sbd.dev_id = PS3_NOTIFICATION_DEV_ID;
53628 + dev.sbd.interrupt_id = PS3_NOTIFICATION_INTERRUPT_ID;
53630 + res = lv1_open_device(dev.sbd.bus_id, dev.sbd.dev_id, 0);
53632 + pr_err("%s:%u: lv1_open_device failed %s\n", __func__,
53633 + __LINE__, ps3_result(res));
53637 + res = ps3_sb_event_receive_port_setup(&dev.sbd, PS3_BINDING_CPU_ANY,
53640 + pr_err("%s:%u: ps3_sb_event_receive_port_setup failed %d\n",
53641 + __func__, __LINE__, res);
53642 + goto fail_close_device;
53645 + spin_lock_init(&dev.lock);
53647 + res = request_irq(irq, ps3_notification_interrupt, IRQF_DISABLED,
53648 + "ps3_notification", &dev);
53650 + pr_err("%s:%u: request_irq failed %d\n", __func__, __LINE__,
53652 + goto fail_sb_event_receive_port_destroy;
53655 + /* Setup and write the request for device notification. */
53656 + notify_cmd->operation_code = 0; /* must be zero */
53657 + notify_cmd->event_mask = 1UL << notify_region_probe;
53660 - result = ps3_repository_find_device(repo);
53661 + res = ps3_notification_read_write(&dev, lpar, 1);
53663 + goto fail_free_irq;
53665 - if (result == -ENODEV)
53666 - pr_debug("%s:%u: nothing new\n", __func__,
53669 - pr_debug("%s:%u: find device error.\n",
53670 - __func__, __LINE__);
53672 - pr_debug("%s:%u: found device (%u:%u:%u)\n",
53673 - __func__, __LINE__, repo->bus_index,
53674 - repo->dev_index, repo->dev_type);
53675 - ps3_register_repository_device(repo);
53676 - ps3_repository_bump_device(repo);
53679 - } while (!result);
53680 + /* Loop here processing the requested notification events. */
53684 - pr_debug("%s:%u: ms %u\n", __func__, __LINE__, ms);
53685 + memset(notify_event, 0, sizeof(*notify_event));
53688 + res = ps3_notification_read_write(&dev, lpar, 0);
53692 - msleep_interruptible(ms);
53693 + pr_debug("%s:%u: notify event type 0x%lx bus id %lu dev id %lu"
53694 + " type %lu port %lu\n", __func__, __LINE__,
53695 + notify_event->event_type, notify_event->bus_id,
53696 + notify_event->dev_id, notify_event->dev_type,
53697 + notify_event->dev_port);
53699 + if (notify_event->event_type != notify_region_probe ||
53700 + notify_event->bus_id != dev.sbd.bus_id) {
53701 + pr_warning("%s:%u: bad notify_event: event %lu, "
53702 + "dev_id %lu, dev_type %lu\n",
53703 + __func__, __LINE__, notify_event->event_type,
53704 + notify_event->dev_id,
53705 + notify_event->dev_type);
53709 - /* An exponential backoff. */
53711 + ps3_find_and_add_device(dev.sbd.bus_id, notify_event->dev_id);
53713 } while (!kthread_should_stop());
53716 + free_irq(irq, &dev);
53717 +fail_sb_event_receive_port_destroy:
53718 + ps3_sb_event_receive_port_destroy(&dev.sbd, irq);
53719 +fail_close_device:
53720 + lv1_close_device(dev.sbd.bus_id, dev.sbd.dev_id);
53724 + probe_task = NULL;
53726 pr_debug(" <- %s:%u: kthread finished\n", __func__, __LINE__);
53732 + * ps3_stop_probe_thread - Stops the background probe thread.
53736 +static int ps3_stop_probe_thread(struct notifier_block *nb, unsigned long code,
53740 + kthread_stop(probe_task);
53744 +static struct notifier_block nb = {
53745 + .notifier_call = ps3_stop_probe_thread
53749 * ps3_start_probe_thread - Starts the background probe thread.
53752 @@ -723,7 +842,7 @@
53755 struct task_struct *task;
53756 - static struct ps3_repository_device repo; /* must be static */
53757 + struct ps3_repository_device repo;
53759 pr_debug(" -> %s:%d\n", __func__, __LINE__);
53761 @@ -746,7 +865,8 @@
53765 - task = kthread_run(ps3_probe_thread, &repo, "ps3-probe-%u", bus_type);
53766 + task = kthread_run(ps3_probe_thread, (void *)repo.bus_id,
53767 + "ps3-probe-%u", bus_type);
53769 if (IS_ERR(task)) {
53770 result = PTR_ERR(task);
53771 @@ -755,6 +875,9 @@
53775 + probe_task = task;
53776 + register_reboot_notifier(&nb);
53778 pr_debug(" <- %s:%d\n", __func__, __LINE__);
53781 @@ -787,6 +910,8 @@
53783 ps3_register_sound_devices();
53785 + ps3_register_lpm_devices();
53787 pr_debug(" <- %s:%d\n", __func__, __LINE__);
53790 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/ps3/mm.c powerpc.git/arch/powerpc/platforms/ps3/mm.c
53791 --- linux-2.6.24/arch/powerpc/platforms/ps3/mm.c 2008-01-24 23:58:37.000000000 +0100
53792 +++ powerpc.git/arch/powerpc/platforms/ps3/mm.c 2008-01-28 20:25:49.000000000 +0100
53797 -#if defined(CONFIG_PS3_USE_LPAR_ADDR)
53798 - USE_LPAR_ADDR = 1,
53800 - USE_LPAR_ADDR = 0,
53802 #if defined(CONFIG_PS3_DYNAMIC_DMA)
53803 USE_DYNAMIC_DMA = 1,
53805 @@ -137,11 +132,8 @@
53806 unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr)
53808 BUG_ON(is_kernel_addr(phys_addr));
53809 - if (USE_LPAR_ADDR)
53810 - return phys_addr;
53812 - return (phys_addr < map.rm.size || phys_addr >= map.total)
53813 - ? phys_addr : phys_addr + map.r1.offset;
53814 + return (phys_addr < map.rm.size || phys_addr >= map.total)
53815 + ? phys_addr : phys_addr + map.r1.offset;
53818 EXPORT_SYMBOL(ps3_mm_phys_to_lpar);
53819 @@ -309,7 +301,7 @@
53821 BUG_ON(!mem_init_done);
53823 - start_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size;
53824 + start_addr = map.rm.size;
53825 start_pfn = start_addr >> PAGE_SHIFT;
53826 nr_pages = (map.r1.size + PAGE_SIZE - 1) >> PAGE_SHIFT;
53828 @@ -359,7 +351,7 @@
53829 static void __maybe_unused _dma_dump_region(const struct ps3_dma_region *r,
53830 const char *func, int line)
53832 - DBG("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id,
53833 + DBG("%s:%d: dev %lu:%lu\n", func, line, r->dev->bus_id,
53835 DBG("%s:%d: page_size %u\n", func, line, r->page_size);
53836 DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
53837 @@ -394,7 +386,7 @@
53838 static void _dma_dump_chunk (const struct dma_chunk* c, const char* func,
53841 - DBG("%s:%d: r.dev %u:%u\n", func, line,
53842 + DBG("%s:%d: r.dev %lu:%lu\n", func, line,
53843 c->region->dev->bus_id, c->region->dev->dev_id);
53844 DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr);
53845 DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size);
53846 @@ -658,7 +650,7 @@
53849 if (!r->dev->bus_id) {
53850 - pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__,
53851 + pr_info("%s:%d: %lu:%lu no dma\n", __func__, __LINE__,
53852 r->dev->bus_id, r->dev->dev_id);
53855 @@ -724,7 +716,7 @@
53858 if (!r->dev->bus_id) {
53859 - pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__,
53860 + pr_info("%s:%d: %lu:%lu no dma\n", __func__, __LINE__,
53861 r->dev->bus_id, r->dev->dev_id);
53864 @@ -1007,7 +999,7 @@
53866 if (r->offset + r->len > map.rm.size) {
53867 /* Map (part of) 2nd RAM chunk */
53868 - virt_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size;
53869 + virt_addr = map.rm.size;
53871 if (r->offset >= map.rm.size)
53872 virt_addr += r->offset - map.rm.size;
53873 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/ps3/platform.h powerpc.git/arch/powerpc/platforms/ps3/platform.h
53874 --- linux-2.6.24/arch/powerpc/platforms/ps3/platform.h 2008-01-24 23:58:37.000000000 +0100
53875 +++ powerpc.git/arch/powerpc/platforms/ps3/platform.h 2008-01-28 20:25:49.000000000 +0100
53876 @@ -89,13 +89,11 @@
53877 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
53878 PS3_DEV_TYPE_SB_GPIO = 6,
53879 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
53880 - PS3_DEV_TYPE_STOR_DUMMY = 32,
53881 - PS3_DEV_TYPE_NOACCESS = 255,
53884 int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
53886 -int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id);
53887 +int ps3_repository_read_bus_id(unsigned int bus_index, u64 *bus_id);
53888 int ps3_repository_read_bus_type(unsigned int bus_index,
53889 enum ps3_bus_type *bus_type);
53890 int ps3_repository_read_bus_num_dev(unsigned int bus_index,
53891 @@ -119,7 +117,7 @@
53892 int ps3_repository_read_dev_str(unsigned int bus_index,
53893 unsigned int dev_index, const char *dev_str, u64 *value);
53894 int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
53895 - unsigned int *dev_id);
53897 int ps3_repository_read_dev_type(unsigned int bus_index,
53898 unsigned int dev_index, enum ps3_dev_type *dev_type);
53899 int ps3_repository_read_dev_intr(unsigned int bus_index,
53900 @@ -138,21 +136,17 @@
53901 /* repository bus enumerators */
53903 struct ps3_repository_device {
53904 - enum ps3_bus_type bus_type;
53905 unsigned int bus_index;
53906 - unsigned int bus_id;
53907 - enum ps3_dev_type dev_type;
53908 unsigned int dev_index;
53909 - unsigned int dev_id;
53910 + enum ps3_bus_type bus_type;
53911 + enum ps3_dev_type dev_type;
53916 -static inline struct ps3_repository_device *ps3_repository_bump_device(
53917 - struct ps3_repository_device *repo)
53919 - repo->dev_index++;
53922 int ps3_repository_find_device(struct ps3_repository_device *repo);
53923 +int ps3_repository_find_device_by_id(struct ps3_repository_device *repo,
53924 + u64 bus_id, u64 dev_id);
53925 int ps3_repository_find_devices(enum ps3_bus_type bus_type,
53926 int (*callback)(const struct ps3_repository_device *repo));
53927 int ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from,
53928 @@ -186,10 +180,10 @@
53929 unsigned int dev_index, unsigned int region_index,
53930 unsigned int *region_id, u64 *region_start, u64 *region_size);
53932 -/* repository pu and memory info */
53933 +/* repository logical pu and memory info */
53935 -int ps3_repository_read_num_pu(unsigned int *num_pu);
53936 -int ps3_repository_read_ppe_id(unsigned int *pu_index, unsigned int *ppe_id);
53937 +int ps3_repository_read_num_pu(u64 *num_pu);
53938 +int ps3_repository_read_pu_id(unsigned int pu_index, u64 *pu_id);
53939 int ps3_repository_read_rm_base(unsigned int ppe_id, u64 *rm_base);
53940 int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size);
53941 int ps3_repository_read_region_total(u64 *region_total);
53942 @@ -200,9 +194,15 @@
53944 int ps3_repository_read_num_be(unsigned int *num_be);
53945 int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id);
53946 +int ps3_repository_read_be_id(u64 node_id, u64 *be_id);
53947 int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq);
53948 int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq);
53950 +/* repository performance monitor info */
53952 +int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar,
53955 /* repository 'Other OS' area */
53957 int ps3_repository_read_boot_dat_addr(u64 *lpar_addr);
53958 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/ps3/repository.c powerpc.git/arch/powerpc/platforms/ps3/repository.c
53959 --- linux-2.6.24/arch/powerpc/platforms/ps3/repository.c 2008-01-24 23:58:37.000000000 +0100
53960 +++ powerpc.git/arch/powerpc/platforms/ps3/repository.c 2008-01-28 20:25:49.000000000 +0100
53964 #define dump_field(_a, _b) _dump_field(_a, _b, __func__, __LINE__)
53965 -static void _dump_field(const char *hdr, u64 n, const char* func, int line)
53966 +static void _dump_field(const char *hdr, u64 n, const char *func, int line)
53972 #define dump_node_name(_a, _b, _c, _d, _e) \
53973 _dump_node_name(_a, _b, _c, _d, _e, __func__, __LINE__)
53974 -static void _dump_node_name (unsigned int lpar_id, u64 n1, u64 n2, u64 n3,
53975 - u64 n4, const char* func, int line)
53976 +static void _dump_node_name(unsigned int lpar_id, u64 n1, u64 n2, u64 n3,
53977 + u64 n4, const char *func, int line)
53979 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id);
53980 _dump_field("n1: ", n1, func, line);
53982 #define dump_node(_a, _b, _c, _d, _e, _f, _g) \
53983 _dump_node(_a, _b, _c, _d, _e, _f, _g, __func__, __LINE__)
53984 static void _dump_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4,
53985 - u64 v1, u64 v2, const char* func, int line)
53986 + u64 v1, u64 v2, const char *func, int line)
53988 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id);
53989 _dump_field("n1: ", n1, func, line);
53990 @@ -165,21 +165,18 @@
53991 make_first_field("bus", bus_index),
53992 make_field(bus_str, 0),
53998 -int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id)
53999 +int ps3_repository_read_bus_id(unsigned int bus_index, u64 *bus_id)
54003 - u64 v2; /* unused */
54005 result = read_node(PS3_LPAR_ID_PME,
54006 make_first_field("bus", bus_index),
54007 make_field("id", 0),
54015 @@ -193,7 +190,7 @@
54016 make_first_field("bus", bus_index),
54017 make_field("type", 0),
54024 @@ -208,7 +205,7 @@
54025 make_first_field("bus", bus_index),
54026 make_field("num_dev", 0),
54033 @@ -221,22 +218,20 @@
54034 make_field("dev", dev_index),
54035 make_field(dev_str, 0),
54041 int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
54042 - unsigned int *dev_id)
54048 result = read_node(PS3_LPAR_ID_PME,
54049 make_first_field("bus", bus_index),
54050 make_field("dev", dev_index),
54051 make_field("id", 0),
54059 @@ -251,14 +246,14 @@
54060 make_field("dev", dev_index),
54061 make_field("type", 0),
54069 int ps3_repository_read_dev_intr(unsigned int bus_index,
54070 unsigned int dev_index, unsigned int intr_index,
54071 - enum ps3_interrupt_type *intr_type, unsigned int* interrupt_id)
54072 + enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id)
54076 @@ -287,7 +282,7 @@
54077 make_field("dev", dev_index),
54078 make_field("reg", reg_index),
54079 make_field("type", 0),
54085 @@ -332,7 +327,7 @@
54089 - pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %u, num_dev %u\n",
54090 + pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %lu, num_dev %u\n",
54091 __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id,
54094 @@ -349,47 +344,95 @@
54098 - if (tmp.bus_type == PS3_BUS_TYPE_STORAGE) {
54100 - * A storage device may show up in the repository before the
54101 - * hypervisor has finished probing its type and regions
54103 - unsigned int num_regions;
54105 - if (tmp.dev_type == PS3_DEV_TYPE_STOR_DUMMY) {
54106 - pr_debug("%s:%u storage device not ready\n", __func__,
54110 + result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
54113 - result = ps3_repository_read_stor_dev_num_regions(tmp.bus_index,
54117 + pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__,
54122 + pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %lu\n",
54123 + __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id);
54129 +int ps3_repository_find_device_by_id(struct ps3_repository_device *repo,
54130 + u64 bus_id, u64 dev_id)
54132 + int result = -ENODEV;
54133 + struct ps3_repository_device tmp;
54134 + unsigned int num_dev;
54136 + pr_debug(" -> %s:%u: find device by id %lu:%lu\n", __func__, __LINE__,
54139 + for (tmp.bus_index = 0; tmp.bus_index < 10; tmp.bus_index++) {
54140 + result = ps3_repository_read_bus_id(tmp.bus_index,
54143 - pr_debug("%s:%d read_stor_dev_num_regions failed\n",
54144 - __func__, __LINE__);
54145 + pr_debug("%s:%u read_bus_id(%u) failed\n", __func__,
54146 + __LINE__, tmp.bus_index);
54150 - if (!num_regions) {
54151 - pr_debug("%s:%u storage device has no regions yet\n",
54152 - __func__, __LINE__);
54155 + if (tmp.bus_id == bus_id)
54158 + pr_debug("%s:%u: skip, bus_id %lu\n", __func__, __LINE__,
54161 + pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__);
54164 - result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
54167 + result = ps3_repository_read_bus_type(tmp.bus_index, &tmp.bus_type);
54169 + pr_debug("%s:%u read_bus_type(%u) failed\n", __func__,
54170 + __LINE__, tmp.bus_index);
54174 + result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev);
54176 - pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__,
54178 + pr_debug("%s:%u read_bus_num_dev failed\n", __func__,
54183 - pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %u\n",
54184 - __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id);
54185 + for (tmp.dev_index = 0; tmp.dev_index < num_dev; tmp.dev_index++) {
54186 + result = ps3_repository_read_dev_id(tmp.bus_index,
54190 + pr_debug("%s:%u read_dev_id(%u:%u) failed\n", __func__,
54191 + __LINE__, tmp.bus_index, tmp.dev_index);
54195 + if (tmp.dev_id == dev_id)
54198 + pr_debug("%s:%u: skip, dev_id %lu\n", __func__, __LINE__,
54201 + pr_debug(" <- %s:%u: dev not found\n", __func__, __LINE__);
54205 + result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index,
54208 + pr_debug("%s:%u read_dev_type failed\n", __func__, __LINE__);
54212 + pr_debug(" <- %s:%u: found: type (%u:%u) index (%u:%u) id (%lu:%lu)\n",
54213 + __func__, __LINE__, tmp.bus_type, tmp.dev_type, tmp.bus_index,
54214 + tmp.dev_index, tmp.bus_id, tmp.dev_id);
54218 @@ -402,50 +445,34 @@
54220 pr_debug(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type);
54222 - for (repo.bus_index = 0; repo.bus_index < 10; repo.bus_index++) {
54223 + repo.bus_type = bus_type;
54224 + result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index);
54226 + pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__);
54230 - result = ps3_repository_read_bus_type(repo.bus_index,
54232 + result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id);
54234 + pr_debug("%s:%d read_bus_id(%u) failed\n", __func__, __LINE__,
54240 - pr_debug("%s:%d read_bus_type(%u) failed\n",
54241 - __func__, __LINE__, repo.bus_index);
54242 + for (repo.dev_index = 0; ; repo.dev_index++) {
54243 + result = ps3_repository_find_device(&repo);
54244 + if (result == -ENODEV) {
54247 + } else if (result)
54251 - if (repo.bus_type != bus_type) {
54252 - pr_debug("%s:%d: skip, bus_type %u\n", __func__,
54253 - __LINE__, repo.bus_type);
54257 - result = ps3_repository_read_bus_id(repo.bus_index,
54260 + result = callback(&repo);
54262 - pr_debug("%s:%d read_bus_id(%u) failed\n",
54263 - __func__, __LINE__, repo.bus_index);
54267 - for (repo.dev_index = 0; ; repo.dev_index++) {
54268 - result = ps3_repository_find_device(&repo);
54270 - if (result == -ENODEV) {
54273 - } else if (result)
54276 - result = callback(&repo);
54279 - pr_debug("%s:%d: abort at callback\n", __func__,
54283 + pr_debug("%s:%d: abort at callback\n", __func__,
54290 pr_debug(" <- %s:%d\n", __func__, __LINE__);
54291 @@ -561,7 +588,7 @@
54292 make_first_field("bus", bus_index),
54293 make_field("dev", dev_index),
54294 make_field("port", 0),
54299 int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index,
54300 @@ -571,7 +598,7 @@
54301 make_first_field("bus", bus_index),
54302 make_field("dev", dev_index),
54303 make_field("blk_size", 0),
54305 + 0, blk_size, NULL);
54308 int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index,
54309 @@ -581,7 +608,7 @@
54310 make_first_field("bus", bus_index),
54311 make_field("dev", dev_index),
54312 make_field("n_blocks", 0),
54313 - 0, num_blocks, 0);
54314 + 0, num_blocks, NULL);
54317 int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index,
54318 @@ -594,7 +621,7 @@
54319 make_first_field("bus", bus_index),
54320 make_field("dev", dev_index),
54321 make_field("n_regs", 0),
54327 @@ -611,7 +638,7 @@
54328 make_field("dev", dev_index),
54329 make_field("region", region_index),
54330 make_field("id", 0),
54336 @@ -624,7 +651,7 @@
54337 make_field("dev", dev_index),
54338 make_field("region", region_index),
54339 make_field("size", 0),
54341 + region_size, NULL);
54344 int ps3_repository_read_stor_dev_region_start(unsigned int bus_index,
54345 @@ -635,7 +662,7 @@
54346 make_field("dev", dev_index),
54347 make_field("region", region_index),
54348 make_field("start", 0),
54349 - region_start, 0);
54350 + region_start, NULL);
54353 int ps3_repository_read_stor_dev_info(unsigned int bus_index,
54354 @@ -684,6 +711,35 @@
54359 + * ps3_repository_read_num_pu - Number of logical PU processors for this lpar.
54362 +int ps3_repository_read_num_pu(u64 *num_pu)
54365 + return read_node(PS3_LPAR_ID_CURRENT,
54366 + make_first_field("bi", 0),
54367 + make_field("pun", 0),
54373 + * ps3_repository_read_pu_id - Read the logical PU id.
54374 + * @pu_index: Zero based index.
54375 + * @pu_id: The logical PU id.
54378 +int ps3_repository_read_pu_id(unsigned int pu_index, u64 *pu_id)
54380 + return read_node(PS3_LPAR_ID_CURRENT,
54381 + make_first_field("bi", 0),
54382 + make_field("pu", pu_index),
54387 int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size)
54389 return read_node(PS3_LPAR_ID_CURRENT,
54390 @@ -691,7 +747,7 @@
54391 make_field("pu", 0),
54393 make_field("rm_size", 0),
54398 int ps3_repository_read_region_total(u64 *region_total)
54399 @@ -700,7 +756,7 @@
54400 make_first_field("bi", 0),
54401 make_field("rgntotal", 0),
54403 - region_total, 0);
54404 + region_total, NULL);
54408 @@ -736,7 +792,7 @@
54409 make_first_field("bi", 0),
54410 make_field("spun", 0),
54414 *num_spu_reserved = v1;
54417 @@ -755,7 +811,7 @@
54418 make_first_field("bi", 0),
54419 make_field("spursvn", 0),
54423 *num_resource_id = v1;
54426 @@ -768,7 +824,7 @@
54429 int ps3_repository_read_spu_resource_id(unsigned int res_index,
54430 - enum ps3_spu_resource_type* resource_type, unsigned int *resource_id)
54431 + enum ps3_spu_resource_type *resource_type, unsigned int *resource_id)
54435 @@ -785,14 +841,14 @@
54439 -int ps3_repository_read_boot_dat_address(u64 *address)
54440 +static int ps3_repository_read_boot_dat_address(u64 *address)
54442 return read_node(PS3_LPAR_ID_CURRENT,
54443 make_first_field("bi", 0),
54444 make_field("boot_dat", 0),
54445 make_field("address", 0),
54451 int ps3_repository_read_boot_dat_size(unsigned int *size)
54452 @@ -805,7 +861,7 @@
54453 make_field("boot_dat", 0),
54454 make_field("size", 0),
54461 @@ -820,7 +876,7 @@
54462 make_field("vir_uart", 0),
54463 make_field("port", 0),
54464 make_field("avset", 0),
54470 @@ -835,7 +891,7 @@
54471 make_field("vir_uart", 0),
54472 make_field("port", 0),
54473 make_field("sysmgr", 0),
54479 @@ -856,6 +912,10 @@
54480 : ps3_repository_read_boot_dat_size(size);
54484 + * ps3_repository_read_num_be - Number of physical BE processors in the system.
54487 int ps3_repository_read_num_be(unsigned int *num_be)
54490 @@ -866,11 +926,17 @@
54501 + * ps3_repository_read_be_node_id - Read the physical BE processor node id.
54502 + * @be_index: Zero based index.
54503 + * @node_id: The BE processor node id.
54506 int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id)
54508 return read_node(PS3_LPAR_ID_PME,
54509 @@ -878,7 +944,23 @@
54518 + * ps3_repository_read_be_id - Read the physical BE processor id.
54519 + * @node_id: The BE processor node id.
54520 + * @be_id: The BE processor id.
54523 +int ps3_repository_read_be_id(u64 node_id, u64 *be_id)
54525 + return read_node(PS3_LPAR_ID_PME,
54526 + make_first_field("be", 0),
54533 int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq)
54534 @@ -888,7 +970,7 @@
54536 make_field("clock", 0),
54542 int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq)
54543 @@ -897,11 +979,29 @@
54547 - result = ps3_repository_read_be_node_id(0, &node_id);
54548 + result = ps3_repository_read_be_node_id(be_index, &node_id);
54549 return result ? result
54550 : ps3_repository_read_tb_freq(node_id, tb_freq);
54553 +int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar,
54561 + result = ps3_repository_read_be_node_id(be_index, &node_id);
54562 + return result ? result
54563 + : read_node(PS3_LPAR_ID_PME,
54564 + make_first_field("be", 0),
54566 + make_field("lpm", 0),
54567 + make_field("priv", 0),
54573 int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
54574 @@ -1034,7 +1134,7 @@
54578 - pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %u\n", __func__,
54579 + pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %lu\n", __func__,
54580 __LINE__, repo->bus_index, repo->dev_index,
54581 repo->dev_type, repo->dev_id);
54583 @@ -1091,7 +1191,7 @@
54587 - pr_debug("%s:%d bus_%u: bus_type %u, bus_id %u, num_dev %u\n",
54588 + pr_debug("%s:%d bus_%u: bus_type %u, bus_id %lu, num_dev %u\n",
54589 __func__, __LINE__, repo.bus_index, repo.bus_type,
54590 repo.bus_id, num_dev);
54592 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/ps3/spu.c powerpc.git/arch/powerpc/platforms/ps3/spu.c
54593 --- linux-2.6.24/arch/powerpc/platforms/ps3/spu.c 2008-01-24 23:58:37.000000000 +0100
54594 +++ powerpc.git/arch/powerpc/platforms/ps3/spu.c 2008-01-28 20:25:49.000000000 +0100
54596 #include <asm/spu_priv1.h>
54597 #include <asm/lv1call.h>
54599 +#include "../cell/spufs/spufs.h"
54600 #include "platform.h"
54602 /* spu_management_ops */
54603 @@ -419,10 +420,34 @@
54608 + * ps3_enable_spu - Enable SPU run control.
54610 + * An outstanding enhancement for the PS3 would be to add a guard to check
54611 + * for incorrect access to the spu problem state when the spu context is
54612 + * disabled. This check could be implemented with a flag added to the spu
54613 + * context that would inhibit mapping problem state pages, and a routine
54614 + * to unmap spu problem state pages. When the spu is enabled with
54615 + * ps3_enable_spu() the flag would be set allowing pages to be mapped,
54616 + * and when the spu is disabled with ps3_disable_spu() the flag would be
54617 + * cleared and the mapped problem state pages would be unmapped.
54620 +static void ps3_enable_spu(struct spu_context *ctx)
54624 +static void ps3_disable_spu(struct spu_context *ctx)
54626 + ctx->ops->runcntl_stop(ctx);
54629 const struct spu_management_ops spu_management_ps3_ops = {
54630 .enumerate_spus = ps3_enumerate_spus,
54631 .create_spu = ps3_create_spu,
54632 .destroy_spu = ps3_destroy_spu,
54633 + .enable_spu = ps3_enable_spu,
54634 + .disable_spu = ps3_disable_spu,
54635 .init_affinity = ps3_init_affinity,
54638 @@ -505,8 +530,6 @@
54639 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK
54640 | MFC_STATE1_PROBLEM_STATE_MASK);
54642 - sr1 |= MFC_STATE1_MASTER_RUN_CONTROL_MASK;
54644 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed));
54646 spu_pdata(spu)->cache.sr1 = sr1;
54647 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/ps3/system-bus.c powerpc.git/arch/powerpc/platforms/ps3/system-bus.c
54648 --- linux-2.6.24/arch/powerpc/platforms/ps3/system-bus.c 2008-01-24 23:58:37.000000000 +0100
54649 +++ powerpc.git/arch/powerpc/platforms/ps3/system-bus.c 2008-01-28 20:25:49.000000000 +0100
54652 } static usage_hack;
54654 -static int ps3_is_device(struct ps3_system_bus_device *dev,
54655 - unsigned int bus_id, unsigned int dev_id)
54656 +static int ps3_is_device(struct ps3_system_bus_device *dev, u64 bus_id,
54659 return dev->bus_id == bus_id && dev->dev_id == dev_id;
54661 @@ -182,8 +182,8 @@
54662 case PS3_MATCH_ID_SYSTEM_MANAGER:
54663 pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
54664 __LINE__, dev->match_id);
54665 - pr_debug("%s:%d: bus_id: %u\n", __func__,
54666 - __LINE__, dev->bus_id);
54667 + pr_debug("%s:%d: bus_id: %lu\n", __func__, __LINE__,
54672 @@ -220,8 +220,8 @@
54673 case PS3_MATCH_ID_SYSTEM_MANAGER:
54674 pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
54675 __LINE__, dev->match_id);
54676 - pr_debug("%s:%d: bus_id: %u\n", __func__,
54677 - __LINE__, dev->bus_id);
54678 + pr_debug("%s:%d: bus_id: %lu\n", __func__, __LINE__,
54683 @@ -240,7 +240,7 @@
54684 static void _dump_mmio_region(const struct ps3_mmio_region* r,
54685 const char* func, int line)
54687 - pr_debug("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id,
54688 + pr_debug("%s:%d: dev %lu:%lu\n", func, line, r->dev->bus_id,
54690 pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
54691 pr_debug("%s:%d: len %lxh\n", func, line, r->len);
54692 @@ -715,6 +715,7 @@
54693 static unsigned int dev_ioc0_count;
54694 static unsigned int dev_sb_count;
54695 static unsigned int dev_vuart_count;
54696 + static unsigned int dev_lpm_count;
54698 if (!dev->core.parent)
54699 dev->core.parent = &ps3_system_bus;
54700 @@ -737,6 +738,10 @@
54701 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
54702 "vuart_%02x", ++dev_vuart_count);
54704 + case PS3_DEVICE_TYPE_LPM:
54705 + snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
54706 + "lpm_%02x", ++dev_lpm_count);
54711 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pseries/eeh.c powerpc.git/arch/powerpc/platforms/pseries/eeh.c
54712 --- linux-2.6.24/arch/powerpc/platforms/pseries/eeh.c 2008-01-24 23:58:37.000000000 +0100
54713 +++ powerpc.git/arch/powerpc/platforms/pseries/eeh.c 2008-01-28 20:25:49.000000000 +0100
54715 #include <linux/rbtree.h>
54716 #include <linux/seq_file.h>
54717 #include <linux/spinlock.h>
54718 +#include <linux/of.h>
54720 #include <asm/atomic.h>
54721 #include <asm/eeh.h>
54722 #include <asm/eeh_event.h>
54723 @@ -169,7 +171,6 @@
54725 static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len)
54727 - struct device_node *dn;
54728 struct pci_dev *dev = pdn->pcidev;
54731 @@ -243,12 +244,12 @@
54733 /* Gather status on devices under the bridge */
54734 if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) {
54735 - dn = pdn->node->child;
54737 + struct device_node *dn;
54739 + for_each_child_of_node(pdn->node, dn) {
54742 n += gather_pci_data(pdn, buf+n, len-n);
54743 - dn = dn->sibling;
54747 @@ -372,7 +373,7 @@
54751 -/** Mark all devices that are peers of this device as failed.
54752 +/** Mark all devices that are children of this device as failed.
54753 * Mark the device driver too, so that it can see the failure
54754 * immediately; this is critical, since some drivers poll
54755 * status registers in interrupts ... If a driver is polling,
54756 @@ -380,9 +381,11 @@
54757 * an interrupt context, which is bad.
54760 -static void __eeh_mark_slot (struct device_node *dn, int mode_flag)
54761 +static void __eeh_mark_slot(struct device_node *parent, int mode_flag)
54764 + struct device_node *dn;
54766 + for_each_child_of_node(parent, dn) {
54768 /* Mark the pci device driver too */
54769 struct pci_dev *dev = PCI_DN(dn)->pcidev;
54770 @@ -392,10 +395,8 @@
54771 if (dev && dev->driver)
54772 dev->error_state = pci_channel_io_frozen;
54775 - __eeh_mark_slot (dn->child, mode_flag);
54776 + __eeh_mark_slot(dn, mode_flag);
54778 - dn = dn->sibling;
54782 @@ -415,19 +416,19 @@
54784 dev->error_state = pci_channel_io_frozen;
54786 - __eeh_mark_slot (dn->child, mode_flag);
54787 + __eeh_mark_slot(dn, mode_flag);
54790 -static void __eeh_clear_slot (struct device_node *dn, int mode_flag)
54791 +static void __eeh_clear_slot(struct device_node *parent, int mode_flag)
54794 + struct device_node *dn;
54796 + for_each_child_of_node(parent, dn) {
54798 PCI_DN(dn)->eeh_mode &= ~mode_flag;
54799 PCI_DN(dn)->eeh_check_count = 0;
54801 - __eeh_clear_slot (dn->child, mode_flag);
54802 + __eeh_clear_slot(dn, mode_flag);
54804 - dn = dn->sibling;
54808 @@ -444,7 +445,7 @@
54810 PCI_DN(dn)->eeh_mode &= ~mode_flag;
54811 PCI_DN(dn)->eeh_check_count = 0;
54812 - __eeh_clear_slot (dn->child, mode_flag);
54813 + __eeh_clear_slot(dn, mode_flag);
54814 spin_unlock_irqrestore(&confirm_error_lock, flags);
54817 @@ -480,6 +481,7 @@
54821 + dn = find_device_pe(dn);
54824 /* Access to IO BARs might get this far and still not want checking. */
54825 @@ -545,7 +547,7 @@
54827 /* Note that config-io to empty slots may fail;
54828 * they are empty when they don't have children. */
54829 - if ((rets[0] == 5) && (dn->child == NULL)) {
54830 + if ((rets[0] == 5) && (rets[2] == 0) && (dn->child == NULL)) {
54832 pdn->eeh_false_positives ++;
54834 @@ -848,11 +850,8 @@
54835 if ((pdn->eeh_mode & EEH_MODE_SUPPORTED) && !IS_BRIDGE(pdn->class_code))
54836 __restore_bars (pdn);
54838 - dn = pdn->node->child;
54840 + for_each_child_of_node(pdn->node, dn)
54841 eeh_restore_bars (PCI_DN(dn));
54842 - dn = dn->sibling;
54847 @@ -1130,7 +1129,8 @@
54848 void eeh_add_device_tree_early(struct device_node *dn)
54850 struct device_node *sib;
54851 - for (sib = dn->child; sib; sib = sib->sibling)
54853 + for_each_child_of_node(dn, sib)
54854 eeh_add_device_tree_early(sib);
54855 eeh_add_device_early(dn);
54857 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pseries/eeh_driver.c powerpc.git/arch/powerpc/platforms/pseries/eeh_driver.c
54858 --- linux-2.6.24/arch/powerpc/platforms/pseries/eeh_driver.c 2008-01-24 23:58:37.000000000 +0100
54859 +++ powerpc.git/arch/powerpc/platforms/pseries/eeh_driver.c 2008-01-28 20:25:49.000000000 +0100
54860 @@ -310,8 +310,6 @@
54861 const char *location, *pci_str, *drv_str;
54863 frozen_dn = find_device_pe(event->dn);
54864 - frozen_bus = pcibios_find_pci_bus(frozen_dn);
54868 location = of_get_property(event->dn, "ibm,loc-code", NULL);
54869 @@ -321,6 +319,8 @@
54870 location, pci_name(event->dev));
54874 + frozen_bus = pcibios_find_pci_bus(frozen_dn);
54875 location = of_get_property(frozen_dn, "ibm,loc-code", NULL);
54876 location = location ? location : "unknown";
54878 @@ -354,13 +354,6 @@
54879 if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
54880 goto excess_failures;
54882 - /* Get the current PCI slot state. */
54883 - rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
54885 - printk(KERN_WARNING "EEH: Permanent failure\n");
54889 printk(KERN_WARNING
54890 "EEH: This PCI device has failed %d times in the last hour:\n",
54891 frozen_pdn->eeh_freeze_count);
54892 @@ -376,6 +369,14 @@
54894 pci_walk_bus(frozen_bus, eeh_report_error, &result);
54896 + /* Get the current PCI slot state. This can take a long time,
54897 + * sometimes over 3 seconds for certain systems. */
54898 + rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
54900 + printk(KERN_WARNING "EEH: Permanent failure\n");
54904 /* Since rtas may enable MMIO when posting the error log,
54905 * don't post the error log until after all dev drivers
54906 * have been informed.
54907 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pseries/iommu.c powerpc.git/arch/powerpc/platforms/pseries/iommu.c
54908 --- linux-2.6.24/arch/powerpc/platforms/pseries/iommu.c 2008-01-24 23:58:37.000000000 +0100
54909 +++ powerpc.git/arch/powerpc/platforms/pseries/iommu.c 2008-01-28 20:25:49.000000000 +0100
54910 @@ -251,7 +251,7 @@
54911 const unsigned long *basep;
54914 - node = (struct device_node *)phb->arch_data;
54917 basep = of_get_property(node, "linux,tce-base", NULL);
54918 sizep = of_get_property(node, "linux,tce-size", NULL);
54919 @@ -296,11 +296,12 @@
54920 static void iommu_table_setparms_lpar(struct pci_controller *phb,
54921 struct device_node *dn,
54922 struct iommu_table *tbl,
54923 - const void *dma_window)
54924 + const void *dma_window,
54927 unsigned long offset, size;
54929 - tbl->it_busno = PCI_DN(dn)->bussubno;
54930 + tbl->it_busno = bussubno;
54931 of_parse_dma_window(dn, dma_window, &tbl->it_index, &offset, &size);
54934 @@ -420,17 +421,10 @@
54935 pdn->full_name, ppci->iommu_table);
54937 if (!ppci->iommu_table) {
54938 - /* Bussubno hasn't been copied yet.
54939 - * Do it now because iommu_table_setparms_lpar needs it.
54942 - ppci->bussubno = bus->number;
54944 tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL,
54947 - iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window);
54949 + iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window,
54951 ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node);
54952 DBG(" created table: %p\n", ppci->iommu_table);
54954 @@ -523,14 +517,10 @@
54957 if (!pci->iommu_table) {
54958 - /* iommu_table_setparms_lpar needs bussubno. */
54959 - pci->bussubno = pci->phb->bus->number;
54961 tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL,
54964 - iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window);
54966 + iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window,
54967 + pci->phb->bus->number);
54968 pci->iommu_table = iommu_init_table(tbl, pci->phb->node);
54969 DBG(" created table: %p\n", pci->iommu_table);
54971 @@ -556,7 +546,7 @@
54972 case PSERIES_RECONFIG_REMOVE:
54973 if (pci && pci->iommu_table &&
54974 of_get_property(np, "ibm,dma-window", NULL))
54975 - iommu_free_table(np);
54976 + iommu_free_table(pci->iommu_table, np->full_name);
54980 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pseries/pci_dlpar.c powerpc.git/arch/powerpc/platforms/pseries/pci_dlpar.c
54981 --- linux-2.6.24/arch/powerpc/platforms/pseries/pci_dlpar.c 2008-01-24 23:58:37.000000000 +0100
54982 +++ powerpc.git/arch/powerpc/platforms/pseries/pci_dlpar.c 2008-01-28 20:25:49.000000000 +0100
54985 /* Must be called before pci_bus_add_devices */
54987 -pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus)
54988 +pcibios_fixup_new_pci_devices(struct pci_bus *bus)
54990 struct pci_dev *dev;
54993 /* Fill device archdata and setup iommu table */
54994 pcibios_setup_new_device(dev);
54997 - pcibios_fixup_device_resources(dev, bus);
54998 pci_read_irq_line(dev);
54999 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
55000 struct resource *r = &dev->resource[i];
55001 @@ -132,8 +130,8 @@
55003 pci_scan_child_bus(child_bus);
55005 - /* Fixup new pci devices without touching bus struct */
55006 - pcibios_fixup_new_pci_devices(child_bus, 0);
55007 + /* Fixup new pci devices */
55008 + pcibios_fixup_new_pci_devices(child_bus);
55010 /* Make the discovered devices available */
55011 pci_bus_add_devices(child_bus);
55012 @@ -169,7 +167,7 @@
55013 /* use ofdt-based probe */
55014 of_scan_bus(dn, bus);
55015 if (!list_empty(&bus->devices)) {
55016 - pcibios_fixup_new_pci_devices(bus, 0);
55017 + pcibios_fixup_new_pci_devices(bus);
55018 pci_bus_add_devices(bus);
55019 eeh_add_device_tree_late(bus);
55021 @@ -178,7 +176,7 @@
55022 slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
55023 num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
55025 - pcibios_fixup_new_pci_devices(bus, 1);
55026 + pcibios_fixup_new_pci_devices(bus);
55027 pci_bus_add_devices(bus);
55028 eeh_add_device_tree_late(bus);
55030 @@ -208,7 +206,7 @@
55031 eeh_add_device_tree_early(dn);
55034 - pcibios_fixup_new_pci_devices(phb->bus, 0);
55035 + pcibios_fixup_new_pci_devices(phb->bus);
55036 pci_bus_add_devices(phb->bus);
55037 eeh_add_device_tree_late(phb->bus);
55039 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pseries/plpar_wrappers.h powerpc.git/arch/powerpc/platforms/pseries/plpar_wrappers.h
55040 --- linux-2.6.24/arch/powerpc/platforms/pseries/plpar_wrappers.h 2008-01-24 23:58:37.000000000 +0100
55041 +++ powerpc.git/arch/powerpc/platforms/pseries/plpar_wrappers.h 2008-01-28 20:25:49.000000000 +0100
55043 return plpar_hcall_norets(H_POLL_PENDING);
55046 -static inline long prod_processor(void)
55048 - return plpar_hcall_norets(H_PROD);
55051 static inline long cede_processor(void)
55053 return plpar_hcall_norets(H_CEDE);
55054 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pseries/smp.c powerpc.git/arch/powerpc/platforms/pseries/smp.c
55055 --- linux-2.6.24/arch/powerpc/platforms/pseries/smp.c 2008-01-24 23:58:37.000000000 +0100
55056 +++ powerpc.git/arch/powerpc/platforms/pseries/smp.c 2008-01-28 20:25:49.000000000 +0100
55058 #include <asm/pSeries_reconfig.h>
55059 #include <asm/mpic.h>
55060 #include <asm/vdso_datapage.h>
55061 +#include <asm/cputhreads.h>
55063 #include "plpar_wrappers.h"
55064 #include "pseries.h"
55065 @@ -202,7 +203,7 @@
55067 if (system_state < SYSTEM_RUNNING &&
55068 cpu_has_feature(CPU_FTR_SMT) &&
55069 - !smt_enabled_at_boot && nr % 2 != 0)
55070 + !smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
55074 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pseries/xics.c powerpc.git/arch/powerpc/platforms/pseries/xics.c
55075 --- linux-2.6.24/arch/powerpc/platforms/pseries/xics.c 2008-01-24 23:58:37.000000000 +0100
55076 +++ powerpc.git/arch/powerpc/platforms/pseries/xics.c 2008-01-28 20:25:49.000000000 +0100
55077 @@ -87,19 +87,25 @@
55078 /* Direct HW low level accessors */
55081 -static inline unsigned int direct_xirr_info_get(int n_cpu)
55082 +static inline unsigned int direct_xirr_info_get(void)
55084 - return in_be32(&xics_per_cpu[n_cpu]->xirr.word);
55085 + int cpu = smp_processor_id();
55087 + return in_be32(&xics_per_cpu[cpu]->xirr.word);
55090 -static inline void direct_xirr_info_set(int n_cpu, int value)
55091 +static inline void direct_xirr_info_set(int value)
55093 - out_be32(&xics_per_cpu[n_cpu]->xirr.word, value);
55094 + int cpu = smp_processor_id();
55096 + out_be32(&xics_per_cpu[cpu]->xirr.word, value);
55099 -static inline void direct_cppr_info(int n_cpu, u8 value)
55100 +static inline void direct_cppr_info(u8 value)
55102 - out_8(&xics_per_cpu[n_cpu]->xirr.bytes[0], value);
55103 + int cpu = smp_processor_id();
55105 + out_8(&xics_per_cpu[cpu]->xirr.bytes[0], value);
55108 static inline void direct_qirr_info(int n_cpu, u8 value)
55109 @@ -111,7 +117,7 @@
55110 /* LPAR low level accessors */
55113 -static inline unsigned int lpar_xirr_info_get(int n_cpu)
55114 +static inline unsigned int lpar_xirr_info_get(void)
55116 unsigned long lpar_rc;
55117 unsigned long return_value;
55118 @@ -122,7 +128,7 @@
55119 return (unsigned int)return_value;
55122 -static inline void lpar_xirr_info_set(int n_cpu, int value)
55123 +static inline void lpar_xirr_info_set(int value)
55125 unsigned long lpar_rc;
55126 unsigned long val64 = value & 0xffffffff;
55127 @@ -133,7 +139,7 @@
55131 -static inline void lpar_cppr_info(int n_cpu, u8 value)
55132 +static inline void lpar_cppr_info(u8 value)
55134 unsigned long lpar_rc;
55136 @@ -275,21 +281,19 @@
55138 static void xics_eoi_direct(unsigned int virq)
55140 - int cpu = smp_processor_id();
55141 unsigned int irq = (unsigned int)irq_map[virq].hwirq;
55144 - direct_xirr_info_set(cpu, (0xff << 24) | irq);
55145 + direct_xirr_info_set((0xff << 24) | irq);
55149 static void xics_eoi_lpar(unsigned int virq)
55151 - int cpu = smp_processor_id();
55152 unsigned int irq = (unsigned int)irq_map[virq].hwirq;
55155 - lpar_xirr_info_set(cpu, (0xff << 24) | irq);
55156 + lpar_xirr_info_set((0xff << 24) | irq);
55159 static inline unsigned int xics_remap_irq(unsigned int vec)
55160 @@ -312,16 +316,12 @@
55162 static unsigned int xics_get_irq_direct(void)
55164 - unsigned int cpu = smp_processor_id();
55166 - return xics_remap_irq(direct_xirr_info_get(cpu));
55167 + return xics_remap_irq(direct_xirr_info_get());
55170 static unsigned int xics_get_irq_lpar(void)
55172 - unsigned int cpu = smp_processor_id();
55174 - return xics_remap_irq(lpar_xirr_info_get(cpu));
55175 + return xics_remap_irq(lpar_xirr_info_get());
55179 @@ -387,12 +387,12 @@
55181 #endif /* CONFIG_SMP */
55183 -static void xics_set_cpu_priority(int cpu, unsigned char cppr)
55184 +static void xics_set_cpu_priority(unsigned char cppr)
55186 if (firmware_has_feature(FW_FEATURE_LPAR))
55187 - lpar_cppr_info(cpu, cppr);
55188 + lpar_cppr_info(cppr);
55190 - direct_cppr_info(cpu, cppr);
55191 + direct_cppr_info(cppr);
55195 @@ -440,9 +440,7 @@
55197 void xics_setup_cpu(void)
55199 - int cpu = smp_processor_id();
55201 - xics_set_cpu_priority(cpu, 0xff);
55202 + xics_set_cpu_priority(0xff);
55205 * Put the calling processor into the GIQ. This is really only
55206 @@ -783,7 +781,7 @@
55208 struct irq_desc *desc;
55210 - xics_set_cpu_priority(cpu, 0);
55211 + xics_set_cpu_priority(0);
55215 @@ -824,10 +822,11 @@
55216 void xics_migrate_irqs_away(void)
55219 - unsigned int irq, virq, cpu = smp_processor_id();
55220 + int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id();
55221 + unsigned int irq, virq;
55223 /* Reject any interrupt that was queued to us... */
55224 - xics_set_cpu_priority(cpu, 0);
55225 + xics_set_cpu_priority(0);
55227 /* remove ourselves from the global interrupt queue */
55228 status = rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE,
55229 @@ -835,7 +834,7 @@
55230 WARN_ON(status < 0);
55232 /* Allow IPIs again... */
55233 - xics_set_cpu_priority(cpu, DEFAULT_PRIORITY);
55234 + xics_set_cpu_priority(DEFAULT_PRIORITY);
55236 for_each_irq(virq) {
55237 struct irq_desc *desc;
55238 @@ -874,7 +873,7 @@
55239 * The irq has to be migrated only in the single cpu
55242 - if (xics_status[0] != get_hard_smp_processor_id(cpu))
55243 + if (xics_status[0] != hw_cpu)
55246 printk(KERN_WARNING "IRQ %u affinity broken off cpu %u\n",
55247 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/platforms/pseries/xics.h powerpc.git/arch/powerpc/platforms/pseries/xics.h
55248 --- linux-2.6.24/arch/powerpc/platforms/pseries/xics.h 2008-01-24 23:58:37.000000000 +0100
55249 +++ powerpc.git/arch/powerpc/platforms/pseries/xics.h 2008-01-28 20:25:49.000000000 +0100
55251 extern void xics_request_IPIs(void);
55252 extern void xics_migrate_irqs_away(void);
55254 -/* first argument is ignored for now*/
55255 -void pSeriesLP_cppr_info(int n_cpu, u8 value);
55257 struct xics_ipi_struct {
55258 volatile unsigned long value;
55259 } ____cacheline_aligned;
55260 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/Kconfig powerpc.git/arch/powerpc/sysdev/Kconfig
55261 --- linux-2.6.24/arch/powerpc/sysdev/Kconfig 1970-01-01 01:00:00.000000000 +0100
55262 +++ powerpc.git/arch/powerpc/sysdev/Kconfig 2008-01-28 20:25:49.000000000 +0100
55264 +# For a description of the syntax of this configuration file,
55265 +# see Documentation/kbuild/kconfig-language.txt.
55268 +config PPC4xx_PCI_EXPRESS
55270 + depends on PCI && 4xx
55272 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/Makefile powerpc.git/arch/powerpc/sysdev/Makefile
55273 --- linux-2.6.24/arch/powerpc/sysdev/Makefile 2008-01-24 23:58:37.000000000 +0100
55274 +++ powerpc.git/arch/powerpc/sysdev/Makefile 2008-01-28 20:25:49.000000000 +0100
55276 EXTRA_CFLAGS += -mno-minimal-toc
55279 -mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o
55280 +mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o mpic_pasemi_msi.o
55281 obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-obj-y)
55283 obj-$(CONFIG_PPC_MPC106) += grackle.o
55285 obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
55286 obj-$(CONFIG_FSL_SOC) += fsl_soc.o
55287 obj-$(CONFIG_FSL_PCI) += fsl_pci.o
55288 +obj-$(CONFIG_RAPIDIO) += fsl_rio.o
55289 obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
55290 obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
55291 obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/
55293 ifeq ($(CONFIG_PPC_MERGE),y)
55294 obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
55295 obj-$(CONFIG_PPC_I8259) += i8259.o
55296 -obj-$(CONFIG_PPC_83xx) += ipic.o
55297 +obj-$(CONFIG_IPIC) += ipic.o
55298 obj-$(CONFIG_4xx) += uic.o
55299 obj-$(CONFIG_XILINX_VIRTEX) += xilinx_intc.o
55300 +obj-$(CONFIG_OF_RTC) += of_rtc.o
55301 +ifeq ($(CONFIG_PCI),y)
55302 +obj-$(CONFIG_4xx) += ppc4xx_pci.o
55306 # Temporary hack until we have migrated to asm-powerpc
55307 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/axonram.c powerpc.git/arch/powerpc/sysdev/axonram.c
55308 --- linux-2.6.24/arch/powerpc/sysdev/axonram.c 2008-01-24 23:58:37.000000000 +0100
55309 +++ powerpc.git/arch/powerpc/sysdev/axonram.c 2008-01-28 20:25:49.000000000 +0100
55311 #include <linux/slab.h>
55312 #include <linux/string.h>
55313 #include <linux/types.h>
55314 -#include <asm/of_device.h>
55315 -#include <asm/of_platform.h>
55316 +#include <linux/of_device.h>
55317 +#include <linux/of_platform.h>
55319 #include <asm/page.h>
55320 #include <asm/prom.h>
55322 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/bestcomm/bestcomm.h powerpc.git/arch/powerpc/sysdev/bestcomm/bestcomm.h
55323 --- linux-2.6.24/arch/powerpc/sysdev/bestcomm/bestcomm.h 2008-01-24 23:58:37.000000000 +0100
55324 +++ powerpc.git/arch/powerpc/sysdev/bestcomm/bestcomm.h 2008-01-28 20:25:49.000000000 +0100
55328 /* ======================================================================== */
55329 -/* Generic task managment */
55330 +/* Generic task management */
55331 /* ======================================================================== */
55334 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/commproc.c powerpc.git/arch/powerpc/sysdev/commproc.c
55335 --- linux-2.6.24/arch/powerpc/sysdev/commproc.c 2008-01-24 23:58:37.000000000 +0100
55336 +++ powerpc.git/arch/powerpc/sysdev/commproc.c 2008-01-28 20:25:49.000000000 +0100
55337 @@ -240,6 +240,34 @@
55341 +static DEFINE_SPINLOCK(cmd_lock);
55343 +#define MAX_CR_CMD_LOOPS 10000
55345 +int cpm_command(u32 command, u8 opcode)
55348 + unsigned long flags;
55350 + if (command & 0xffffff0f)
55353 + spin_lock_irqsave(&cmd_lock, flags);
55356 + out_be16(&cpmp->cp_cpcr, command | CPM_CR_FLG | (opcode << 8));
55357 + for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
55358 + if ((in_be16(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0)
55361 + printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__);
55364 + spin_unlock_irqrestore(&cmd_lock, flags);
55367 +EXPORT_SYMBOL(cpm_command);
55369 /* We used to do this earlier, but have to postpone as long as possible
55370 * to ensure the kernel VM is now running.
55372 @@ -408,7 +436,7 @@
55373 #endif /* !CONFIG_PPC_CPM_NEW_BINDING */
55375 struct cpm_ioport16 {
55376 - __be16 dir, par, sor, dat, intr;
55377 + __be16 dir, par, odr_sor, dat, intr;
55381 @@ -438,6 +466,13 @@
55383 clrbits32(&iop->par, pin);
55385 + if (port == CPM_PORTB) {
55386 + if (flags & CPM_PIN_OPENDRAIN)
55387 + setbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
55389 + clrbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
55392 if (port == CPM_PORTE) {
55393 if (flags & CPM_PIN_SECONDARY)
55394 setbits32(&iop->sor, pin);
55395 @@ -471,11 +506,17 @@
55397 clrbits16(&iop->par, pin);
55399 + if (port == CPM_PORTA) {
55400 + if (flags & CPM_PIN_OPENDRAIN)
55401 + setbits16(&iop->odr_sor, pin);
55403 + clrbits16(&iop->odr_sor, pin);
55405 if (port == CPM_PORTC) {
55406 if (flags & CPM_PIN_SECONDARY)
55407 - setbits16(&iop->sor, pin);
55408 + setbits16(&iop->odr_sor, pin);
55410 - clrbits16(&iop->sor, pin);
55411 + clrbits16(&iop->odr_sor, pin);
55415 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/cpm2_common.c powerpc.git/arch/powerpc/sysdev/cpm2_common.c
55416 --- linux-2.6.24/arch/powerpc/sysdev/cpm2_common.c 2008-01-24 23:58:37.000000000 +0100
55417 +++ powerpc.git/arch/powerpc/sysdev/cpm2_common.c 2008-01-28 20:25:49.000000000 +0100
55419 cpmp = &cpm2_immr->im_cpm;
55422 +static DEFINE_SPINLOCK(cmd_lock);
55424 +#define MAX_CR_CMD_LOOPS 10000
55426 +int cpm_command(u32 command, u8 opcode)
55429 + unsigned long flags;
55431 + spin_lock_irqsave(&cmd_lock, flags);
55434 + out_be32(&cpmp->cp_cpcr, command | opcode | CPM_CR_FLG);
55435 + for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
55436 + if ((in_be32(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0)
55439 + printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__);
55442 + spin_unlock_irqrestore(&cmd_lock, flags);
55445 +EXPORT_SYMBOL(cpm_command);
55447 /* Set a baud rate generator. This needs lots of work. There are
55448 * eight BRGs, which can be connected to the CPM channels or output
55449 * as clocks. The BRGs are in two different block of internal
55450 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/fsl_pci.c powerpc.git/arch/powerpc/sysdev/fsl_pci.c
55451 --- linux-2.6.24/arch/powerpc/sysdev/fsl_pci.c 2008-01-24 23:58:37.000000000 +0100
55452 +++ powerpc.git/arch/powerpc/sysdev/fsl_pci.c 2008-01-28 20:25:49.000000000 +0100
55454 struct ccsr_pci __iomem *pci;
55457 - pr_debug("PCI memory map start 0x%x, size 0x%x\n", rsrc->start,
55458 - rsrc->end - rsrc->start + 1);
55459 + pr_debug("PCI memory map start 0x%016llx, size 0x%016llx\n",
55460 + (u64)rsrc->start, (u64)rsrc->end - (u64)rsrc->start + 1);
55461 pci = ioremap(rsrc->start, rsrc->end - rsrc->start + 1);
55463 /* Disable all windows (except powar0 since its ignored) */
55464 @@ -46,17 +46,17 @@
55465 /* Setup outbound MEM window */
55466 for(i = 0; i < 3; i++)
55467 if (hose->mem_resources[i].flags & IORESOURCE_MEM){
55468 - pr_debug("PCI MEM resource start 0x%08x, size 0x%08x.\n",
55469 - hose->mem_resources[i].start,
55470 - hose->mem_resources[i].end
55471 - - hose->mem_resources[i].start + 1);
55472 - out_be32(&pci->pow[i+1].potar,
55473 - (hose->mem_resources[i].start >> 12)
55475 + resource_size_t pci_addr_start =
55476 + hose->mem_resources[i].start -
55477 + hose->pci_mem_offset;
55478 + pr_debug("PCI MEM resource start 0x%016llx, size 0x%016llx.\n",
55479 + (u64)hose->mem_resources[i].start,
55480 + (u64)hose->mem_resources[i].end
55481 + - (u64)hose->mem_resources[i].start + 1);
55482 + out_be32(&pci->pow[i+1].potar, (pci_addr_start >> 12));
55483 out_be32(&pci->pow[i+1].potear, 0);
55484 out_be32(&pci->pow[i+1].powbar,
55485 - (hose->mem_resources[i].start >> 12)
55487 + (hose->mem_resources[i].start >> 12));
55488 /* Enable, Mem R/W */
55489 out_be32(&pci->pow[i+1].powar, 0x80044000
55490 | (__ilog2(hose->mem_resources[i].end
55491 @@ -65,15 +65,14 @@
55493 /* Setup outbound IO window */
55494 if (hose->io_resource.flags & IORESOURCE_IO){
55495 - pr_debug("PCI IO resource start 0x%08x, size 0x%08x, phy base 0x%08x.\n",
55496 - hose->io_resource.start,
55497 - hose->io_resource.end - hose->io_resource.start + 1,
55498 - hose->io_base_phys);
55499 - out_be32(&pci->pow[i+1].potar, (hose->io_resource.start >> 12)
55501 + pr_debug("PCI IO resource start 0x%016llx, size 0x%016llx, "
55502 + "phy base 0x%016llx.\n",
55503 + (u64)hose->io_resource.start,
55504 + (u64)hose->io_resource.end - (u64)hose->io_resource.start + 1,
55505 + (u64)hose->io_base_phys);
55506 + out_be32(&pci->pow[i+1].potar, (hose->io_resource.start >> 12));
55507 out_be32(&pci->pow[i+1].potear, 0);
55508 - out_be32(&pci->pow[i+1].powbar, (hose->io_base_phys >> 12)
55510 + out_be32(&pci->pow[i+1].powbar, (hose->io_base_phys >> 12));
55511 /* Enable, IO R/W */
55512 out_be32(&pci->pow[i+1].powar, 0x80088000
55513 | (__ilog2(hose->io_resource.end
55514 @@ -107,55 +106,17 @@
55518 -static void __init quirk_fsl_pcie_transparent(struct pci_dev *dev)
55520 - struct resource *res;
55521 - int i, res_idx = PCI_BRIDGE_RESOURCES;
55522 - struct pci_controller *hose;
55523 +static int fsl_pcie_bus_fixup;
55525 +static void __init quirk_fsl_pcie_header(struct pci_dev *dev)
55527 /* if we aren't a PCIe don't bother */
55528 if (!pci_find_capability(dev, PCI_CAP_ID_EXP))
55532 - * Make the bridge be transparent.
55534 - dev->transparent = 1;
55536 - hose = pci_bus_to_host(dev->bus);
55538 - printk(KERN_ERR "Can't find hose for bus %d\n",
55539 - dev->bus->number);
55543 - /* Clear out any of the virtual P2P bridge registers */
55544 - pci_write_config_word(dev, PCI_IO_BASE_UPPER16, 0);
55545 - pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, 0);
55546 - pci_write_config_byte(dev, PCI_IO_BASE, 0x10);
55547 - pci_write_config_byte(dev, PCI_IO_LIMIT, 0);
55548 - pci_write_config_word(dev, PCI_MEMORY_BASE, 0x10);
55549 - pci_write_config_word(dev, PCI_MEMORY_LIMIT, 0);
55550 - pci_write_config_word(dev, PCI_PREF_BASE_UPPER32, 0x0);
55551 - pci_write_config_word(dev, PCI_PREF_LIMIT_UPPER32, 0x0);
55552 - pci_write_config_word(dev, PCI_PREF_MEMORY_BASE, 0x10);
55553 - pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, 0);
55555 - if (hose->io_resource.flags) {
55556 - res = &dev->resource[res_idx++];
55557 - res->start = hose->io_resource.start;
55558 - res->end = hose->io_resource.end;
55559 - res->flags = hose->io_resource.flags;
55560 - update_bridge_resource(dev, res);
55563 - for (i = 0; i < 3; i++) {
55564 - res = &dev->resource[res_idx + i];
55565 - res->start = hose->mem_resources[i].start;
55566 - res->end = hose->mem_resources[i].end;
55567 - res->flags = hose->mem_resources[i].flags;
55568 - update_bridge_resource(dev, res);
55570 + dev->class = PCI_CLASS_BRIDGE_PCI << 8;
55571 + fsl_pcie_bus_fixup = 1;
55575 int __init fsl_pcie_check_link(struct pci_controller *hose)
55576 @@ -172,11 +133,24 @@
55577 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
55580 - /* deal with bogus pci_bus when we don't have anything connected on PCIe */
55581 - if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
55582 - if (bus->parent) {
55583 - for (i = 0; i < 4; ++i)
55584 - bus->resource[i] = bus->parent->resource[i];
55585 + if ((bus->parent == hose->bus) &&
55586 + ((fsl_pcie_bus_fixup &&
55587 + early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) ||
55588 + (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK)))
55590 + for (i = 0; i < 4; ++i) {
55591 + struct resource *res = bus->resource[i];
55592 + struct resource *par = bus->parent->resource[i];
55598 + if (res && par) {
55599 + res->start = par->start;
55600 + res->end = par->end;
55601 + res->flags = par->flags;
55606 @@ -202,7 +176,7 @@
55607 printk(KERN_WARNING "Can't get bus-range for %s, assume"
55608 " bus 0\n", dev->full_name);
55610 - pci_assign_all_buses = 1;
55611 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
55612 hose = pcibios_alloc_controller(dev);
55615 @@ -222,7 +196,7 @@
55616 hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
55619 - printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx."
55620 + printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. "
55621 "Firmware bus number: %d->%d\n",
55622 (unsigned long long)rsrc.start, hose->first_busno,
55624 @@ -240,23 +214,23 @@
55628 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8548E, quirk_fsl_pcie_transparent);
55629 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8548, quirk_fsl_pcie_transparent);
55630 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8543E, quirk_fsl_pcie_transparent);
55631 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8543, quirk_fsl_pcie_transparent);
55632 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8547E, quirk_fsl_pcie_transparent);
55633 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8545E, quirk_fsl_pcie_transparent);
55634 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8545, quirk_fsl_pcie_transparent);
55635 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8568E, quirk_fsl_pcie_transparent);
55636 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8568, quirk_fsl_pcie_transparent);
55637 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8567E, quirk_fsl_pcie_transparent);
55638 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8567, quirk_fsl_pcie_transparent);
55639 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533E, quirk_fsl_pcie_transparent);
55640 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_transparent);
55641 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_transparent);
55642 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_transparent);
55643 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_transparent);
55644 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_transparent);
55645 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_transparent);
55646 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_transparent);
55647 -DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_transparent);
55648 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8548E, quirk_fsl_pcie_header);
55649 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8548, quirk_fsl_pcie_header);
55650 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8543E, quirk_fsl_pcie_header);
55651 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8543, quirk_fsl_pcie_header);
55652 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8547E, quirk_fsl_pcie_header);
55653 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8545E, quirk_fsl_pcie_header);
55654 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8545, quirk_fsl_pcie_header);
55655 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8568E, quirk_fsl_pcie_header);
55656 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8568, quirk_fsl_pcie_header);
55657 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8567E, quirk_fsl_pcie_header);
55658 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8567, quirk_fsl_pcie_header);
55659 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8533E, quirk_fsl_pcie_header);
55660 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_header);
55661 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_header);
55662 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_header);
55663 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_header);
55664 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_header);
55665 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_header);
55666 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header);
55667 +DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
55668 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/fsl_rio.c powerpc.git/arch/powerpc/sysdev/fsl_rio.c
55669 --- linux-2.6.24/arch/powerpc/sysdev/fsl_rio.c 1970-01-01 01:00:00.000000000 +0100
55670 +++ powerpc.git/arch/powerpc/sysdev/fsl_rio.c 2008-01-28 20:25:49.000000000 +0100
55673 + * MPC85xx RapidIO support
55675 + * Copyright 2005 MontaVista Software, Inc.
55676 + * Matt Porter <mporter@kernel.crashing.org>
55678 + * This program is free software; you can redistribute it and/or modify it
55679 + * under the terms of the GNU General Public License as published by the
55680 + * Free Software Foundation; either version 2 of the License, or (at your
55681 + * option) any later version.
55684 +#include <linux/init.h>
55685 +#include <linux/module.h>
55686 +#include <linux/types.h>
55687 +#include <linux/dma-mapping.h>
55688 +#include <linux/interrupt.h>
55689 +#include <linux/rio.h>
55690 +#include <linux/rio_drv.h>
55692 +#include <asm/io.h>
55694 +#define RIO_REGS_BASE (CCSRBAR + 0xc0000)
55695 +#define RIO_ATMU_REGS_OFFSET 0x10c00
55696 +#define RIO_MSG_REGS_OFFSET 0x11000
55697 +#define RIO_MAINT_WIN_SIZE 0x400000
55698 +#define RIO_DBELL_WIN_SIZE 0x1000
55700 +#define RIO_MSG_OMR_MUI 0x00000002
55701 +#define RIO_MSG_OSR_TE 0x00000080
55702 +#define RIO_MSG_OSR_QOI 0x00000020
55703 +#define RIO_MSG_OSR_QFI 0x00000010
55704 +#define RIO_MSG_OSR_MUB 0x00000004
55705 +#define RIO_MSG_OSR_EOMI 0x00000002
55706 +#define RIO_MSG_OSR_QEI 0x00000001
55708 +#define RIO_MSG_IMR_MI 0x00000002
55709 +#define RIO_MSG_ISR_TE 0x00000080
55710 +#define RIO_MSG_ISR_QFI 0x00000010
55711 +#define RIO_MSG_ISR_DIQI 0x00000001
55713 +#define RIO_MSG_DESC_SIZE 32
55714 +#define RIO_MSG_BUFFER_SIZE 4096
55715 +#define RIO_MIN_TX_RING_SIZE 2
55716 +#define RIO_MAX_TX_RING_SIZE 2048
55717 +#define RIO_MIN_RX_RING_SIZE 2
55718 +#define RIO_MAX_RX_RING_SIZE 2048
55720 +#define DOORBELL_DMR_DI 0x00000002
55721 +#define DOORBELL_DSR_TE 0x00000080
55722 +#define DOORBELL_DSR_QFI 0x00000010
55723 +#define DOORBELL_DSR_DIQI 0x00000001
55724 +#define DOORBELL_TID_OFFSET 0x03
55725 +#define DOORBELL_SID_OFFSET 0x05
55726 +#define DOORBELL_INFO_OFFSET 0x06
55728 +#define DOORBELL_MESSAGE_SIZE 0x08
55729 +#define DBELL_SID(x) (*(u8 *)(x + DOORBELL_SID_OFFSET))
55730 +#define DBELL_TID(x) (*(u8 *)(x + DOORBELL_TID_OFFSET))
55731 +#define DBELL_INF(x) (*(u16 *)(x + DOORBELL_INFO_OFFSET))
55733 +struct rio_atmu_regs {
55742 +struct rio_msg_regs {
55775 +struct rio_tx_desc {
55786 +static u32 regs_win;
55787 +static struct rio_atmu_regs *atmu_regs;
55788 +static struct rio_atmu_regs *maint_atmu_regs;
55789 +static struct rio_atmu_regs *dbell_atmu_regs;
55790 +static u32 dbell_win;
55791 +static u32 maint_win;
55792 +static struct rio_msg_regs *msg_regs;
55794 +static struct rio_dbell_ring {
55799 +static struct rio_msg_tx_ring {
55802 + void *virt_buffer[RIO_MAX_TX_RING_SIZE];
55803 + dma_addr_t phys_buffer[RIO_MAX_TX_RING_SIZE];
55809 +static struct rio_msg_rx_ring {
55812 + void *virt_buffer[RIO_MAX_RX_RING_SIZE];
55819 + * mpc85xx_rio_doorbell_send - Send a MPC85xx doorbell message
55820 + * @index: ID of RapidIO interface
55821 + * @destid: Destination ID of target device
55822 + * @data: 16-bit info field of RapidIO doorbell message
55824 + * Sends a MPC85xx doorbell message. Returns %0 on success or
55825 + * %-EINVAL on failure.
55827 +static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data)
55829 + pr_debug("mpc85xx_doorbell_send: index %d destid %4.4x data %4.4x\n",
55830 + index, destid, data);
55831 + out_be32((void *)&dbell_atmu_regs->rowtar, destid << 22);
55832 + out_be16((void *)(dbell_win), data);
55838 + * mpc85xx_local_config_read - Generate a MPC85xx local config space read
55839 + * @index: ID of RapdiIO interface
55840 + * @offset: Offset into configuration space
55841 + * @len: Length (in bytes) of the maintenance transaction
55842 + * @data: Value to be read into
55844 + * Generates a MPC85xx local configuration space read. Returns %0 on
55845 + * success or %-EINVAL on failure.
55847 +static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data)
55849 + pr_debug("mpc85xx_local_config_read: index %d offset %8.8x\n", index,
55851 + *data = in_be32((void *)(regs_win + offset));
55857 + * mpc85xx_local_config_write - Generate a MPC85xx local config space write
55858 + * @index: ID of RapdiIO interface
55859 + * @offset: Offset into configuration space
55860 + * @len: Length (in bytes) of the maintenance transaction
55861 + * @data: Value to be written
55863 + * Generates a MPC85xx local configuration space write. Returns %0 on
55864 + * success or %-EINVAL on failure.
55866 +static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data)
55869 + ("mpc85xx_local_config_write: index %d offset %8.8x data %8.8x\n",
55870 + index, offset, data);
55871 + out_be32((void *)(regs_win + offset), data);
55877 + * mpc85xx_rio_config_read - Generate a MPC85xx read maintenance transaction
55878 + * @index: ID of RapdiIO interface
55879 + * @destid: Destination ID of transaction
55880 + * @hopcount: Number of hops to target device
55881 + * @offset: Offset into configuration space
55882 + * @len: Length (in bytes) of the maintenance transaction
55883 + * @val: Location to be read into
55885 + * Generates a MPC85xx read maintenance transaction. Returns %0 on
55886 + * success or %-EINVAL on failure.
55889 +mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len,
55895 + ("mpc85xx_rio_config_read: index %d destid %d hopcount %d offset %8.8x len %d\n",
55896 + index, destid, hopcount, offset, len);
55897 + out_be32((void *)&maint_atmu_regs->rowtar,
55898 + (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9));
55900 + data = (u8 *) maint_win + offset;
55903 + *val = in_8((u8 *) data);
55906 + *val = in_be16((u16 *) data);
55909 + *val = in_be32((u32 *) data);
55917 + * mpc85xx_rio_config_write - Generate a MPC85xx write maintenance transaction
55918 + * @index: ID of RapdiIO interface
55919 + * @destid: Destination ID of transaction
55920 + * @hopcount: Number of hops to target device
55921 + * @offset: Offset into configuration space
55922 + * @len: Length (in bytes) of the maintenance transaction
55923 + * @val: Value to be written
55925 + * Generates an MPC85xx write maintenance transaction. Returns %0 on
55926 + * success or %-EINVAL on failure.
55929 +mpc85xx_rio_config_write(int index, u16 destid, u8 hopcount, u32 offset,
55930 + int len, u32 val)
55934 + ("mpc85xx_rio_config_write: index %d destid %d hopcount %d offset %8.8x len %d val %8.8x\n",
55935 + index, destid, hopcount, offset, len, val);
55936 + out_be32((void *)&maint_atmu_regs->rowtar,
55937 + (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9));
55939 + data = (u8 *) maint_win + offset;
55942 + out_8((u8 *) data, val);
55945 + out_be16((u16 *) data, val);
55948 + out_be32((u32 *) data, val);
55956 + * rio_hw_add_outb_message - Add message to the MPC85xx outbound message queue
55957 + * @mport: Master port with outbound message queue
55958 + * @rdev: Target of outbound message
55959 + * @mbox: Outbound mailbox
55960 + * @buffer: Message to add to outbound queue
55961 + * @len: Length of message
55963 + * Adds the @buffer message to the MPC85xx outbound message queue. Returns
55964 + * %0 on success or %-EINVAL on failure.
55967 +rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox,
55968 + void *buffer, size_t len)
55971 + struct rio_tx_desc *desc =
55972 + (struct rio_tx_desc *)msg_tx_ring.virt + msg_tx_ring.tx_slot;
55976 + ("RIO: rio_hw_add_outb_message(): destid %4.4x mbox %d buffer %8.8x len %8.8x\n",
55977 + rdev->destid, mbox, (int)buffer, len);
55979 + if ((len < 8) || (len > RIO_MAX_MSG_SIZE)) {
55984 + /* Copy and clear rest of buffer */
55985 + memcpy(msg_tx_ring.virt_buffer[msg_tx_ring.tx_slot], buffer, len);
55986 + if (len < (RIO_MAX_MSG_SIZE - 4))
55987 + memset((void *)((u32) msg_tx_ring.
55988 + virt_buffer[msg_tx_ring.tx_slot] + len), 0,
55989 + RIO_MAX_MSG_SIZE - len);
55991 + /* Set mbox field for message */
55992 + desc->dport = mbox & 0x3;
55994 + /* Enable EOMI interrupt, set priority, and set destid */
55995 + desc->dattr = 0x28000000 | (rdev->destid << 2);
55997 + /* Set transfer size aligned to next power of 2 (in double words) */
55998 + desc->dwcnt = is_power_of_2(len) ? len : 1 << get_bitmask_order(len);
56000 + /* Set snooping and source buffer address */
56001 + desc->saddr = 0x00000004 | msg_tx_ring.phys_buffer[msg_tx_ring.tx_slot];
56003 + /* Increment enqueue pointer */
56004 + omr = in_be32((void *)&msg_regs->omr);
56005 + out_be32((void *)&msg_regs->omr, omr | RIO_MSG_OMR_MUI);
56007 + /* Go to next descriptor */
56008 + if (++msg_tx_ring.tx_slot == msg_tx_ring.size)
56009 + msg_tx_ring.tx_slot = 0;
56015 +EXPORT_SYMBOL_GPL(rio_hw_add_outb_message);
56018 + * mpc85xx_rio_tx_handler - MPC85xx outbound message interrupt handler
56019 + * @irq: Linux interrupt number
56020 + * @dev_instance: Pointer to interrupt-specific data
56022 + * Handles outbound message interrupts. Executes a register outbound
56023 + * mailbox event handler and acks the interrupt occurrence.
56025 +static irqreturn_t
56026 +mpc85xx_rio_tx_handler(int irq, void *dev_instance)
56029 + struct rio_mport *port = (struct rio_mport *)dev_instance;
56031 + osr = in_be32((void *)&msg_regs->osr);
56033 + if (osr & RIO_MSG_OSR_TE) {
56034 + pr_info("RIO: outbound message transmission error\n");
56035 + out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_TE);
56039 + if (osr & RIO_MSG_OSR_QOI) {
56040 + pr_info("RIO: outbound message queue overflow\n");
56041 + out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_QOI);
56045 + if (osr & RIO_MSG_OSR_EOMI) {
56046 + u32 dqp = in_be32((void *)&msg_regs->odqdpar);
56047 + int slot = (dqp - msg_tx_ring.phys) >> 5;
56048 + port->outb_msg[0].mcback(port, msg_tx_ring.dev_id, -1, slot);
56050 + /* Ack the end-of-message interrupt */
56051 + out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_EOMI);
56055 + return IRQ_HANDLED;
56059 + * rio_open_outb_mbox - Initialize MPC85xx outbound mailbox
56060 + * @mport: Master port implementing the outbound message unit
56061 + * @dev_id: Device specific pointer to pass on event
56062 + * @mbox: Mailbox to open
56063 + * @entries: Number of entries in the outbound mailbox ring
56065 + * Initializes buffer ring, request the outbound message interrupt,
56066 + * and enables the outbound message unit. Returns %0 on success and
56067 + * %-EINVAL or %-ENOMEM on failure.
56069 +int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
56071 + int i, j, rc = 0;
56073 + if ((entries < RIO_MIN_TX_RING_SIZE) ||
56074 + (entries > RIO_MAX_TX_RING_SIZE) || (!is_power_of_2(entries))) {
56079 + /* Initialize shadow copy ring */
56080 + msg_tx_ring.dev_id = dev_id;
56081 + msg_tx_ring.size = entries;
56083 + for (i = 0; i < msg_tx_ring.size; i++) {
56085 + (msg_tx_ring.virt_buffer[i] =
56086 + dma_alloc_coherent(NULL, RIO_MSG_BUFFER_SIZE,
56087 + &msg_tx_ring.phys_buffer[i],
56090 + for (j = 0; j < msg_tx_ring.size; j++)
56091 + if (msg_tx_ring.virt_buffer[j])
56092 + dma_free_coherent(NULL,
56093 + RIO_MSG_BUFFER_SIZE,
56102 + /* Initialize outbound message descriptor ring */
56103 + if (!(msg_tx_ring.virt = dma_alloc_coherent(NULL,
56104 + msg_tx_ring.size *
56105 + RIO_MSG_DESC_SIZE,
56106 + &msg_tx_ring.phys,
56111 + memset(msg_tx_ring.virt, 0, msg_tx_ring.size * RIO_MSG_DESC_SIZE);
56112 + msg_tx_ring.tx_slot = 0;
56114 + /* Point dequeue/enqueue pointers at first entry in ring */
56115 + out_be32((void *)&msg_regs->odqdpar, msg_tx_ring.phys);
56116 + out_be32((void *)&msg_regs->odqepar, msg_tx_ring.phys);
56118 + /* Configure for snooping */
56119 + out_be32((void *)&msg_regs->osar, 0x00000004);
56121 + /* Clear interrupt status */
56122 + out_be32((void *)&msg_regs->osr, 0x000000b3);
56124 + /* Hook up outbound message handler */
56126 + request_irq(MPC85xx_IRQ_RIO_TX, mpc85xx_rio_tx_handler, 0,
56127 + "msg_tx", (void *)mport)) < 0)
56131 + * Configure outbound message unit
56133 + * Interrupts (all enabled, except QEIE)
56137 + out_be32((void *)&msg_regs->omr, 0x00100220);
56139 + /* Set number of entries */
56140 + out_be32((void *)&msg_regs->omr,
56141 + in_be32((void *)&msg_regs->omr) |
56142 + ((get_bitmask_order(entries) - 2) << 12));
56144 + /* Now enable the unit */
56145 + out_be32((void *)&msg_regs->omr, in_be32((void *)&msg_regs->omr) | 0x1);
56151 + dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
56152 + msg_tx_ring.virt, msg_tx_ring.phys);
56155 + for (i = 0; i < msg_tx_ring.size; i++)
56156 + dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE,
56157 + msg_tx_ring.virt_buffer[i],
56158 + msg_tx_ring.phys_buffer[i]);
56164 + * rio_close_outb_mbox - Shut down MPC85xx outbound mailbox
56165 + * @mport: Master port implementing the outbound message unit
56166 + * @mbox: Mailbox to close
56168 + * Disables the outbound message unit, free all buffers, and
56169 + * frees the outbound message interrupt.
56171 +void rio_close_outb_mbox(struct rio_mport *mport, int mbox)
56173 + /* Disable inbound message unit */
56174 + out_be32((void *)&msg_regs->omr, 0);
56177 + dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
56178 + msg_tx_ring.virt, msg_tx_ring.phys);
56180 + /* Free interrupt */
56181 + free_irq(MPC85xx_IRQ_RIO_TX, (void *)mport);
56185 + * mpc85xx_rio_rx_handler - MPC85xx inbound message interrupt handler
56186 + * @irq: Linux interrupt number
56187 + * @dev_instance: Pointer to interrupt-specific data
56189 + * Handles inbound message interrupts. Executes a registered inbound
56190 + * mailbox event handler and acks the interrupt occurrence.
56192 +static irqreturn_t
56193 +mpc85xx_rio_rx_handler(int irq, void *dev_instance)
56196 + struct rio_mport *port = (struct rio_mport *)dev_instance;
56198 + isr = in_be32((void *)&msg_regs->isr);
56200 + if (isr & RIO_MSG_ISR_TE) {
56201 + pr_info("RIO: inbound message reception error\n");
56202 + out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_TE);
56206 + /* XXX Need to check/dispatch until queue empty */
56207 + if (isr & RIO_MSG_ISR_DIQI) {
56209 + * We implement *only* mailbox 0, but can receive messages
56210 + * for any mailbox/letter to that mailbox destination. So,
56211 + * make the callback with an unknown/invalid mailbox number
56214 + port->inb_msg[0].mcback(port, msg_rx_ring.dev_id, -1, -1);
56216 + /* Ack the queueing interrupt */
56217 + out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_DIQI);
56221 + return IRQ_HANDLED;
56225 + * rio_open_inb_mbox - Initialize MPC85xx inbound mailbox
56226 + * @mport: Master port implementing the inbound message unit
56227 + * @dev_id: Device specific pointer to pass on event
56228 + * @mbox: Mailbox to open
56229 + * @entries: Number of entries in the inbound mailbox ring
56231 + * Initializes buffer ring, request the inbound message interrupt,
56232 + * and enables the inbound message unit. Returns %0 on success
56233 + * and %-EINVAL or %-ENOMEM on failure.
56235 +int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
56239 + if ((entries < RIO_MIN_RX_RING_SIZE) ||
56240 + (entries > RIO_MAX_RX_RING_SIZE) || (!is_power_of_2(entries))) {
56245 + /* Initialize client buffer ring */
56246 + msg_rx_ring.dev_id = dev_id;
56247 + msg_rx_ring.size = entries;
56248 + msg_rx_ring.rx_slot = 0;
56249 + for (i = 0; i < msg_rx_ring.size; i++)
56250 + msg_rx_ring.virt_buffer[i] = NULL;
56252 + /* Initialize inbound message ring */
56253 + if (!(msg_rx_ring.virt = dma_alloc_coherent(NULL,
56254 + msg_rx_ring.size *
56255 + RIO_MAX_MSG_SIZE,
56256 + &msg_rx_ring.phys,
56262 + /* Point dequeue/enqueue pointers at first entry in ring */
56263 + out_be32((void *)&msg_regs->ifqdpar, (u32) msg_rx_ring.phys);
56264 + out_be32((void *)&msg_regs->ifqepar, (u32) msg_rx_ring.phys);
56266 + /* Clear interrupt status */
56267 + out_be32((void *)&msg_regs->isr, 0x00000091);
56269 + /* Hook up inbound message handler */
56271 + request_irq(MPC85xx_IRQ_RIO_RX, mpc85xx_rio_rx_handler, 0,
56272 + "msg_rx", (void *)mport)) < 0) {
56273 + dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE,
56274 + msg_tx_ring.virt_buffer[i],
56275 + msg_tx_ring.phys_buffer[i]);
56280 + * Configure inbound message unit:
56282 + * 4KB max message size
56283 + * Unmask all interrupt sources
56286 + out_be32((void *)&msg_regs->imr, 0x001b0060);
56288 + /* Set number of queue entries */
56289 + out_be32((void *)&msg_regs->imr,
56290 + in_be32((void *)&msg_regs->imr) |
56291 + ((get_bitmask_order(entries) - 2) << 12));
56293 + /* Now enable the unit */
56294 + out_be32((void *)&msg_regs->imr, in_be32((void *)&msg_regs->imr) | 0x1);
56301 + * rio_close_inb_mbox - Shut down MPC85xx inbound mailbox
56302 + * @mport: Master port implementing the inbound message unit
56303 + * @mbox: Mailbox to close
56305 + * Disables the inbound message unit, free all buffers, and
56306 + * frees the inbound message interrupt.
56308 +void rio_close_inb_mbox(struct rio_mport *mport, int mbox)
56310 + /* Disable inbound message unit */
56311 + out_be32((void *)&msg_regs->imr, 0);
56314 + dma_free_coherent(NULL, msg_rx_ring.size * RIO_MAX_MSG_SIZE,
56315 + msg_rx_ring.virt, msg_rx_ring.phys);
56317 + /* Free interrupt */
56318 + free_irq(MPC85xx_IRQ_RIO_RX, (void *)mport);
56322 + * rio_hw_add_inb_buffer - Add buffer to the MPC85xx inbound message queue
56323 + * @mport: Master port implementing the inbound message unit
56324 + * @mbox: Inbound mailbox number
56325 + * @buf: Buffer to add to inbound queue
56327 + * Adds the @buf buffer to the MPC85xx inbound message queue. Returns
56328 + * %0 on success or %-EINVAL on failure.
56330 +int rio_hw_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf)
56334 + pr_debug("RIO: rio_hw_add_inb_buffer(), msg_rx_ring.rx_slot %d\n",
56335 + msg_rx_ring.rx_slot);
56337 + if (msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot]) {
56339 + "RIO: error adding inbound buffer %d, buffer exists\n",
56340 + msg_rx_ring.rx_slot);
56345 + msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot] = buf;
56346 + if (++msg_rx_ring.rx_slot == msg_rx_ring.size)
56347 + msg_rx_ring.rx_slot = 0;
56353 +EXPORT_SYMBOL_GPL(rio_hw_add_inb_buffer);
56356 + * rio_hw_get_inb_message - Fetch inbound message from the MPC85xx message unit
56357 + * @mport: Master port implementing the inbound message unit
56358 + * @mbox: Inbound mailbox number
56360 + * Gets the next available inbound message from the inbound message queue.
56361 + * A pointer to the message is returned on success or NULL on failure.
56363 +void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox)
56366 + u32 phys_buf, virt_buf;
56367 + void *buf = NULL;
56370 + phys_buf = in_be32((void *)&msg_regs->ifqdpar);
56372 + /* If no more messages, then bail out */
56373 + if (phys_buf == in_be32((void *)&msg_regs->ifqepar))
56376 + virt_buf = (u32) msg_rx_ring.virt + (phys_buf - msg_rx_ring.phys);
56377 + buf_idx = (phys_buf - msg_rx_ring.phys) / RIO_MAX_MSG_SIZE;
56378 + buf = msg_rx_ring.virt_buffer[buf_idx];
56382 + "RIO: inbound message copy failed, no buffers\n");
56386 + /* Copy max message size, caller is expected to allocate that big */
56387 + memcpy(buf, (void *)virt_buf, RIO_MAX_MSG_SIZE);
56389 + /* Clear the available buffer */
56390 + msg_rx_ring.virt_buffer[buf_idx] = NULL;
56393 + imr = in_be32((void *)&msg_regs->imr);
56394 + out_be32((void *)&msg_regs->imr, imr | RIO_MSG_IMR_MI);
56400 +EXPORT_SYMBOL_GPL(rio_hw_get_inb_message);
56403 + * mpc85xx_rio_dbell_handler - MPC85xx doorbell interrupt handler
56404 + * @irq: Linux interrupt number
56405 + * @dev_instance: Pointer to interrupt-specific data
56407 + * Handles doorbell interrupts. Parses a list of registered
56408 + * doorbell event handlers and executes a matching event handler.
56410 +static irqreturn_t
56411 +mpc85xx_rio_dbell_handler(int irq, void *dev_instance)
56414 + struct rio_mport *port = (struct rio_mport *)dev_instance;
56416 + dsr = in_be32((void *)&msg_regs->dsr);
56418 + if (dsr & DOORBELL_DSR_TE) {
56419 + pr_info("RIO: doorbell reception error\n");
56420 + out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_TE);
56424 + if (dsr & DOORBELL_DSR_QFI) {
56425 + pr_info("RIO: doorbell queue full\n");
56426 + out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_QFI);
56430 + /* XXX Need to check/dispatch until queue empty */
56431 + if (dsr & DOORBELL_DSR_DIQI) {
56433 + (u32) dbell_ring.virt +
56434 + (in_be32((void *)&msg_regs->dqdpar) & 0xfff);
56436 + struct rio_dbell *dbell;
56440 + ("RIO: processing doorbell, sid %2.2x tid %2.2x info %4.4x\n",
56441 + DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
56443 + list_for_each_entry(dbell, &port->dbells, node) {
56444 + if ((dbell->res->start <= DBELL_INF(dmsg)) &&
56445 + (dbell->res->end >= DBELL_INF(dmsg))) {
56451 + dbell->dinb(port, dbell->dev_id, DBELL_SID(dmsg), DBELL_TID(dmsg),
56452 + DBELL_INF(dmsg));
56455 + ("RIO: spurious doorbell, sid %2.2x tid %2.2x info %4.4x\n",
56456 + DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
56458 + dmr = in_be32((void *)&msg_regs->dmr);
56459 + out_be32((void *)&msg_regs->dmr, dmr | DOORBELL_DMR_DI);
56460 + out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_DIQI);
56464 + return IRQ_HANDLED;
56468 + * mpc85xx_rio_doorbell_init - MPC85xx doorbell interface init
56469 + * @mport: Master port implementing the inbound doorbell unit
56471 + * Initializes doorbell unit hardware and inbound DMA buffer
56472 + * ring. Called from mpc85xx_rio_setup(). Returns %0 on success
56473 + * or %-ENOMEM on failure.
56475 +static int mpc85xx_rio_doorbell_init(struct rio_mport *mport)
56479 + /* Map outbound doorbell window immediately after maintenance window */
56480 + if (!(dbell_win =
56481 + (u32) ioremap(mport->iores.start + RIO_MAINT_WIN_SIZE,
56482 + RIO_DBELL_WIN_SIZE))) {
56484 + "RIO: unable to map outbound doorbell window\n");
56489 + /* Initialize inbound doorbells */
56490 + if (!(dbell_ring.virt = dma_alloc_coherent(NULL,
56491 + 512 * DOORBELL_MESSAGE_SIZE,
56492 + &dbell_ring.phys,
56494 + printk(KERN_ERR "RIO: unable allocate inbound doorbell ring\n");
56496 + iounmap((void *)dbell_win);
56500 + /* Point dequeue/enqueue pointers at first entry in ring */
56501 + out_be32((void *)&msg_regs->dqdpar, (u32) dbell_ring.phys);
56502 + out_be32((void *)&msg_regs->dqepar, (u32) dbell_ring.phys);
56504 + /* Clear interrupt status */
56505 + out_be32((void *)&msg_regs->dsr, 0x00000091);
56507 + /* Hook up doorbell handler */
56509 + request_irq(MPC85xx_IRQ_RIO_BELL, mpc85xx_rio_dbell_handler, 0,
56510 + "dbell_rx", (void *)mport) < 0)) {
56511 + iounmap((void *)dbell_win);
56512 + dma_free_coherent(NULL, 512 * DOORBELL_MESSAGE_SIZE,
56513 + dbell_ring.virt, dbell_ring.phys);
56515 + "MPC85xx RIO: unable to request inbound doorbell irq");
56519 + /* Configure doorbells for snooping, 512 entries, and enable */
56520 + out_be32((void *)&msg_regs->dmr, 0x00108161);
56526 +static char *cmdline = NULL;
56528 +static int mpc85xx_rio_get_hdid(int index)
56530 + /* XXX Need to parse multiple entries in some format */
56534 + return simple_strtol(cmdline, NULL, 0);
56537 +static int mpc85xx_rio_get_cmdline(char *s)
56546 +__setup("riohdid=", mpc85xx_rio_get_cmdline);
56549 + * mpc85xx_rio_setup - Setup MPC85xx RapidIO interface
56550 + * @law_start: Starting physical address of RapidIO LAW
56551 + * @law_size: Size of RapidIO LAW
56553 + * Initializes MPC85xx RapidIO hardware interface, configures
56554 + * master port with system-specific info, and registers the
56555 + * master port with the RapidIO subsystem.
56557 +void mpc85xx_rio_setup(int law_start, int law_size)
56559 + struct rio_ops *ops;
56560 + struct rio_mport *port;
56562 + ops = kmalloc(sizeof(struct rio_ops), GFP_KERNEL);
56563 + ops->lcread = mpc85xx_local_config_read;
56564 + ops->lcwrite = mpc85xx_local_config_write;
56565 + ops->cread = mpc85xx_rio_config_read;
56566 + ops->cwrite = mpc85xx_rio_config_write;
56567 + ops->dsend = mpc85xx_rio_doorbell_send;
56569 + port = kmalloc(sizeof(struct rio_mport), GFP_KERNEL);
56572 + INIT_LIST_HEAD(&port->dbells);
56573 + port->iores.start = law_start;
56574 + port->iores.end = law_start + law_size;
56575 + port->iores.flags = IORESOURCE_MEM;
56577 + rio_init_dbell_res(&port->riores[RIO_DOORBELL_RESOURCE], 0, 0xffff);
56578 + rio_init_mbox_res(&port->riores[RIO_INB_MBOX_RESOURCE], 0, 0);
56579 + rio_init_mbox_res(&port->riores[RIO_OUTB_MBOX_RESOURCE], 0, 0);
56580 + strcpy(port->name, "RIO0 mport");
56583 + port->host_deviceid = mpc85xx_rio_get_hdid(port->id);
56585 + rio_register_mport(port);
56587 + regs_win = (u32) ioremap(RIO_REGS_BASE, 0x20000);
56588 + atmu_regs = (struct rio_atmu_regs *)(regs_win + RIO_ATMU_REGS_OFFSET);
56589 + maint_atmu_regs = atmu_regs + 1;
56590 + dbell_atmu_regs = atmu_regs + 2;
56591 + msg_regs = (struct rio_msg_regs *)(regs_win + RIO_MSG_REGS_OFFSET);
56593 + /* Configure maintenance transaction window */
56594 + out_be32((void *)&maint_atmu_regs->rowbar, 0x000c0000);
56595 + out_be32((void *)&maint_atmu_regs->rowar, 0x80077015);
56597 + maint_win = (u32) ioremap(law_start, RIO_MAINT_WIN_SIZE);
56599 + /* Configure outbound doorbell window */
56600 + out_be32((void *)&dbell_atmu_regs->rowbar, 0x000c0400);
56601 + out_be32((void *)&dbell_atmu_regs->rowar, 0x8004200b);
56602 + mpc85xx_rio_doorbell_init(port);
56604 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/fsl_rio.h powerpc.git/arch/powerpc/sysdev/fsl_rio.h
56605 --- linux-2.6.24/arch/powerpc/sysdev/fsl_rio.h 1970-01-01 01:00:00.000000000 +0100
56606 +++ powerpc.git/arch/powerpc/sysdev/fsl_rio.h 2008-01-28 20:25:49.000000000 +0100
56609 + * MPC85xx RapidIO definitions
56611 + * Copyright 2005 MontaVista Software, Inc.
56612 + * Matt Porter <mporter@kernel.crashing.org>
56614 + * This program is free software; you can redistribute it and/or modify it
56615 + * under the terms of the GNU General Public License as published by the
56616 + * Free Software Foundation; either version 2 of the License, or (at your
56617 + * option) any later version.
56620 +#ifndef __PPC_SYSLIB_PPC85XX_RIO_H
56621 +#define __PPC_SYSLIB_PPC85XX_RIO_H
56623 +#include <linux/init.h>
56625 +extern void mpc85xx_rio_setup(int law_start, int law_size);
56627 +#endif /* __PPC_SYSLIB_PPC85XX_RIO_H */
56628 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/fsl_soc.c powerpc.git/arch/powerpc/sysdev/fsl_soc.c
56629 --- linux-2.6.24/arch/powerpc/sysdev/fsl_soc.c 2008-01-24 23:58:37.000000000 +0100
56630 +++ powerpc.git/arch/powerpc/sysdev/fsl_soc.c 2008-01-28 20:25:49.000000000 +0100
56632 #include <linux/platform_device.h>
56633 #include <linux/of_platform.h>
56634 #include <linux/phy.h>
56635 +#include <linux/phy_fixed.h>
56636 #include <linux/spi/spi.h>
56637 #include <linux/fsl_devices.h>
56638 #include <linux/fs_enet_pd.h>
56639 @@ -54,10 +55,18 @@
56640 soc = of_find_node_by_type(NULL, "soc");
56643 - const void *prop = of_get_property(soc, "reg", &size);
56645 + const u32 *prop = of_get_property(soc, "#address-cells", &size);
56647 + if (prop && size == 4)
56652 + prop = of_get_property(soc, "ranges", &size);
56654 - immrbase = of_translate_address(soc, prop);
56655 + immrbase = of_translate_address(soc, prop + naddr);
56660 @@ -130,17 +139,51 @@
56661 EXPORT_SYMBOL(get_baudrate);
56662 #endif /* CONFIG_CPM2 */
56664 -static int __init gfar_mdio_of_init(void)
56665 +#ifdef CONFIG_FIXED_PHY
56666 +static int __init of_add_fixed_phys(void)
56669 struct device_node *np;
56672 + struct fixed_phy_status status = {};
56674 + for_each_node_by_name(np, "ethernet") {
56675 + fixed_link = (u32 *)of_get_property(np, "fixed-link", NULL);
56680 + status.duplex = fixed_link[1];
56681 + status.speed = fixed_link[2];
56682 + status.pause = fixed_link[3];
56683 + status.asym_pause = fixed_link[4];
56685 + ret = fixed_phy_add(PHY_POLL, fixed_link[0], &status);
56694 +arch_initcall(of_add_fixed_phys);
56695 +#endif /* CONFIG_FIXED_PHY */
56697 +static int __init gfar_mdio_of_init(void)
56699 + struct device_node *np = NULL;
56700 struct platform_device *mdio_dev;
56701 struct resource res;
56704 - for (np = NULL, i = 0;
56705 - (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL;
56707 + np = of_find_compatible_node(np, NULL, "fsl,gianfar-mdio");
56709 + /* try the deprecated version */
56711 + np = of_find_compatible_node(np, "mdio", "gianfar");
56715 struct device_node *child = NULL;
56716 struct gianfar_mdio_data mdio_data;
56717 @@ -179,11 +222,13 @@
56725 platform_device_unregister(mdio_dev);
56731 @@ -193,7 +238,6 @@
56732 static const char *gfar_rx_intr = "rx";
56733 static const char *gfar_err_intr = "error";
56736 static int __init gfar_of_init(void)
56738 struct device_node *np;
56739 @@ -277,29 +321,43 @@
56740 gfar_data.interface = PHY_INTERFACE_MODE_MII;
56742 ph = of_get_property(np, "phy-handle", NULL);
56743 - phy = of_find_node_by_phandle(*ph);
56744 + if (ph == NULL) {
56747 - if (phy == NULL) {
56751 + fixed_link = (u32 *)of_get_property(np, "fixed-link",
56753 + if (!fixed_link) {
56758 - mdio = of_get_parent(phy);
56759 + gfar_data.bus_id = 0;
56760 + gfar_data.phy_id = fixed_link[0];
56762 + phy = of_find_node_by_phandle(*ph);
56764 + if (phy == NULL) {
56769 + mdio = of_get_parent(phy);
56771 + id = of_get_property(phy, "reg", NULL);
56772 + ret = of_address_to_resource(mdio, 0, &res);
56774 + of_node_put(phy);
56775 + of_node_put(mdio);
56779 + gfar_data.phy_id = *id;
56780 + gfar_data.bus_id = res.start;
56782 - id = of_get_property(phy, "reg", NULL);
56783 - ret = of_address_to_resource(mdio, 0, &res);
56790 - gfar_data.phy_id = *id;
56791 - gfar_data.bus_id = res.start;
56793 - of_node_put(phy);
56794 - of_node_put(mdio);
56797 platform_device_add_data(gfar_dev, &gfar_data,
56799 @@ -390,13 +448,11 @@
56800 static int __init fsl_i2c_of_init(void)
56802 struct device_node *np;
56804 + unsigned int i = 0;
56805 struct platform_device *i2c_dev;
56808 - for (np = NULL, i = 0;
56809 - (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL;
56811 + for_each_compatible_node(np, NULL, "fsl-i2c") {
56812 struct resource r[2];
56813 struct fsl_i2c_platform_data i2c_data;
56814 const unsigned char *flags = NULL;
56815 @@ -432,7 +488,7 @@
56819 - of_register_i2c_devices(np, i);
56820 + of_register_i2c_devices(np, i++);
56824 @@ -528,14 +584,12 @@
56825 static int __init fsl_usb_of_init(void)
56827 struct device_node *np;
56829 + unsigned int i = 0;
56830 struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL,
56831 *usb_dev_dr_client = NULL;
56834 - for (np = NULL, i = 0;
56835 - (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL;
56837 + for_each_compatible_node(np, NULL, "fsl-usb2-mph") {
56838 struct resource r[2];
56839 struct fsl_usb2_platform_data usb_data;
56840 const unsigned char *prop = NULL;
56841 @@ -578,11 +632,10 @@
56842 fsl_usb2_platform_data));
56849 - (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL;
56851 + for_each_compatible_node(np, NULL, "fsl-usb2-dr") {
56852 struct resource r[2];
56853 struct fsl_usb2_platform_data usb_data;
56854 const unsigned char *prop = NULL;
56855 @@ -654,6 +707,7 @@
56856 fsl_usb2_platform_data))))
56863 @@ -1125,13 +1179,12 @@
56865 static int __init fsl_pcmcia_of_init(void)
56867 - struct device_node *np = NULL;
56868 + struct device_node *np;
56870 * Register all the devices which type is "pcmcia"
56872 - while ((np = of_find_compatible_node(np,
56873 - "pcmcia", "fsl,pq-pcmcia")) != NULL)
56874 - of_platform_device_create(np, "m8xx-pcmcia", NULL);
56875 + for_each_compatible_node(np, "pcmcia", "fsl,pq-pcmcia")
56876 + of_platform_device_create(np, "m8xx-pcmcia", NULL);
56880 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/grackle.c powerpc.git/arch/powerpc/sysdev/grackle.c
56881 --- linux-2.6.24/arch/powerpc/sysdev/grackle.c 2008-01-24 23:58:37.000000000 +0100
56882 +++ powerpc.git/arch/powerpc/sysdev/grackle.c 2008-01-28 20:25:49.000000000 +0100
56885 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0);
56886 if (machine_is_compatible("PowerMac1,1"))
56887 - pci_assign_all_buses = 1;
56888 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
56889 if (machine_is_compatible("AAPL,PowerBook1998"))
56890 grackle_set_loop_snoop(hose, 1);
56891 #if 0 /* Disabled for now, HW problems ??? */
56892 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/ipic.c powerpc.git/arch/powerpc/sysdev/ipic.c
56893 --- linux-2.6.24/arch/powerpc/sysdev/ipic.c 2008-01-24 23:58:37.000000000 +0100
56894 +++ powerpc.git/arch/powerpc/sysdev/ipic.c 2008-01-28 20:25:49.000000000 +0100
56895 @@ -30,11 +30,67 @@
56898 static struct ipic * primary_ipic;
56899 +static struct irq_chip ipic_level_irq_chip, ipic_edge_irq_chip;
56900 static DEFINE_SPINLOCK(ipic_lock);
56902 static struct ipic_info ipic_info[] = {
56904 + .mask = IPIC_SIMSR_H,
56905 + .prio = IPIC_SIPRR_C,
56906 + .force = IPIC_SIFCR_H,
56911 + .mask = IPIC_SIMSR_H,
56912 + .prio = IPIC_SIPRR_C,
56913 + .force = IPIC_SIFCR_H,
56918 + .mask = IPIC_SIMSR_H,
56919 + .prio = IPIC_SIPRR_C,
56920 + .force = IPIC_SIFCR_H,
56925 + .mask = IPIC_SIMSR_H,
56926 + .prio = IPIC_SIPRR_C,
56927 + .force = IPIC_SIFCR_H,
56932 + .mask = IPIC_SIMSR_H,
56933 + .prio = IPIC_SIPRR_C,
56934 + .force = IPIC_SIFCR_H,
56939 + .mask = IPIC_SIMSR_H,
56940 + .prio = IPIC_SIPRR_C,
56941 + .force = IPIC_SIFCR_H,
56946 + .mask = IPIC_SIMSR_H,
56947 + .prio = IPIC_SIPRR_C,
56948 + .force = IPIC_SIFCR_H,
56953 + .mask = IPIC_SIMSR_H,
56954 + .prio = IPIC_SIPRR_C,
56955 + .force = IPIC_SIFCR_H,
56960 - .pend = IPIC_SIPNR_H,
56961 .mask = IPIC_SIMSR_H,
56962 .prio = IPIC_SIPRR_D,
56963 .force = IPIC_SIFCR_H,
56968 - .pend = IPIC_SIPNR_H,
56969 .mask = IPIC_SIMSR_H,
56970 .prio = IPIC_SIPRR_D,
56971 .force = IPIC_SIFCR_H,
56972 @@ -50,15 +105,27 @@
56976 - .pend = IPIC_SIPNR_H,
56977 .mask = IPIC_SIMSR_H,
56978 .prio = IPIC_SIPRR_D,
56979 .force = IPIC_SIFCR_H,
56984 + .mask = IPIC_SIMSR_H,
56985 + .prio = IPIC_SIPRR_D,
56986 + .force = IPIC_SIFCR_H,
56991 + .mask = IPIC_SIMSR_H,
56992 + .prio = IPIC_SIPRR_D,
56993 + .force = IPIC_SIFCR_H,
56998 - .pend = IPIC_SIPNR_H,
56999 .mask = IPIC_SIMSR_H,
57000 .prio = IPIC_SIPRR_D,
57001 .force = IPIC_SIFCR_H,
57006 - .pend = IPIC_SIPNR_H,
57007 .mask = IPIC_SIMSR_H,
57008 .prio = IPIC_SIPRR_D,
57009 .force = IPIC_SIFCR_H,
57014 - .pend = IPIC_SIPNR_H,
57015 .mask = IPIC_SIMSR_H,
57016 .prio = IPIC_SIPRR_D,
57017 .force = IPIC_SIFCR_H,
57022 - .pend = IPIC_SEPNR,
57023 + .ack = IPIC_SEPNR,
57024 .mask = IPIC_SEMSR,
57025 .prio = IPIC_SMPRR_A,
57026 .force = IPIC_SEFCR,
57031 - .pend = IPIC_SEPNR,
57032 + .ack = IPIC_SEPNR,
57033 .mask = IPIC_SEMSR,
57034 .prio = IPIC_SMPRR_A,
57035 .force = IPIC_SEFCR,
57040 - .pend = IPIC_SEPNR,
57041 + .ack = IPIC_SEPNR,
57042 .mask = IPIC_SEMSR,
57043 .prio = IPIC_SMPRR_A,
57044 .force = IPIC_SEFCR,
57045 @@ -106,7 +171,7 @@
57049 - .pend = IPIC_SEPNR,
57050 + .ack = IPIC_SEPNR,
57051 .mask = IPIC_SEMSR,
57052 .prio = IPIC_SMPRR_B,
57053 .force = IPIC_SEFCR,
57054 @@ -114,7 +179,7 @@
57058 - .pend = IPIC_SEPNR,
57059 + .ack = IPIC_SEPNR,
57060 .mask = IPIC_SEMSR,
57061 .prio = IPIC_SMPRR_B,
57062 .force = IPIC_SEFCR,
57063 @@ -122,7 +187,7 @@
57067 - .pend = IPIC_SEPNR,
57068 + .ack = IPIC_SEPNR,
57069 .mask = IPIC_SEMSR,
57070 .prio = IPIC_SMPRR_B,
57071 .force = IPIC_SEFCR,
57072 @@ -130,7 +195,7 @@
57076 - .pend = IPIC_SEPNR,
57077 + .ack = IPIC_SEPNR,
57078 .mask = IPIC_SEMSR,
57079 .prio = IPIC_SMPRR_B,
57080 .force = IPIC_SEFCR,
57081 @@ -138,7 +203,6 @@
57085 - .pend = IPIC_SIPNR_H,
57086 .mask = IPIC_SIMSR_H,
57087 .prio = IPIC_SIPRR_A,
57088 .force = IPIC_SIFCR_H,
57089 @@ -146,7 +210,6 @@
57093 - .pend = IPIC_SIPNR_H,
57094 .mask = IPIC_SIMSR_H,
57095 .prio = IPIC_SIPRR_A,
57096 .force = IPIC_SIFCR_H,
57097 @@ -154,7 +217,6 @@
57101 - .pend = IPIC_SIPNR_H,
57102 .mask = IPIC_SIMSR_H,
57103 .prio = IPIC_SIPRR_A,
57104 .force = IPIC_SIFCR_H,
57105 @@ -162,7 +224,6 @@
57109 - .pend = IPIC_SIPNR_H,
57110 .mask = IPIC_SIMSR_H,
57111 .prio = IPIC_SIPRR_A,
57112 .force = IPIC_SIFCR_H,
57113 @@ -170,7 +231,6 @@
57117 - .pend = IPIC_SIPNR_H,
57118 .mask = IPIC_SIMSR_H,
57119 .prio = IPIC_SIPRR_A,
57120 .force = IPIC_SIFCR_H,
57121 @@ -178,7 +238,6 @@
57125 - .pend = IPIC_SIPNR_H,
57126 .mask = IPIC_SIMSR_H,
57127 .prio = IPIC_SIPRR_A,
57128 .force = IPIC_SIFCR_H,
57129 @@ -186,7 +245,6 @@
57133 - .pend = IPIC_SIPNR_H,
57134 .mask = IPIC_SIMSR_H,
57135 .prio = IPIC_SIPRR_A,
57136 .force = IPIC_SIFCR_H,
57137 @@ -194,15 +252,69 @@
57141 - .pend = IPIC_SIPNR_H,
57142 .mask = IPIC_SIMSR_H,
57143 .prio = IPIC_SIPRR_A,
57144 .force = IPIC_SIFCR_H,
57149 + .mask = IPIC_SIMSR_H,
57150 + .prio = IPIC_SIPRR_B,
57151 + .force = IPIC_SIFCR_H,
57156 + .mask = IPIC_SIMSR_H,
57157 + .prio = IPIC_SIPRR_B,
57158 + .force = IPIC_SIFCR_H,
57163 + .mask = IPIC_SIMSR_H,
57164 + .prio = IPIC_SIPRR_B,
57165 + .force = IPIC_SIFCR_H,
57170 + .mask = IPIC_SIMSR_H,
57171 + .prio = IPIC_SIPRR_B,
57172 + .force = IPIC_SIFCR_H,
57177 + .mask = IPIC_SIMSR_H,
57178 + .prio = IPIC_SIPRR_B,
57179 + .force = IPIC_SIFCR_H,
57184 + .mask = IPIC_SIMSR_H,
57185 + .prio = IPIC_SIPRR_B,
57186 + .force = IPIC_SIFCR_H,
57191 + .mask = IPIC_SIMSR_H,
57192 + .prio = IPIC_SIPRR_B,
57193 + .force = IPIC_SIFCR_H,
57198 + .mask = IPIC_SIMSR_H,
57199 + .prio = IPIC_SIPRR_B,
57200 + .force = IPIC_SIFCR_H,
57205 - .pend = IPIC_SEPNR,
57206 .mask = IPIC_SEMSR,
57207 .prio = IPIC_SMPRR_A,
57208 .force = IPIC_SEFCR,
57209 @@ -210,7 +322,6 @@
57213 - .pend = IPIC_SIPNR_L,
57214 .mask = IPIC_SIMSR_L,
57215 .prio = IPIC_SMPRR_A,
57216 .force = IPIC_SIFCR_L,
57217 @@ -218,7 +329,6 @@
57221 - .pend = IPIC_SIPNR_L,
57222 .mask = IPIC_SIMSR_L,
57223 .prio = IPIC_SMPRR_A,
57224 .force = IPIC_SIFCR_L,
57225 @@ -226,7 +336,6 @@
57229 - .pend = IPIC_SIPNR_L,
57230 .mask = IPIC_SIMSR_L,
57231 .prio = IPIC_SMPRR_A,
57232 .force = IPIC_SIFCR_L,
57233 @@ -234,7 +343,6 @@
57237 - .pend = IPIC_SIPNR_L,
57238 .mask = IPIC_SIMSR_L,
57239 .prio = IPIC_SMPRR_A,
57240 .force = IPIC_SIFCR_L,
57241 @@ -242,7 +350,6 @@
57245 - .pend = IPIC_SIPNR_L,
57246 .mask = IPIC_SIMSR_L,
57247 .prio = IPIC_SMPRR_B,
57248 .force = IPIC_SIFCR_L,
57249 @@ -250,7 +357,6 @@
57253 - .pend = IPIC_SIPNR_L,
57254 .mask = IPIC_SIMSR_L,
57255 .prio = IPIC_SMPRR_B,
57256 .force = IPIC_SIFCR_L,
57257 @@ -258,7 +364,6 @@
57261 - .pend = IPIC_SIPNR_L,
57262 .mask = IPIC_SIMSR_L,
57263 .prio = IPIC_SMPRR_B,
57264 .force = IPIC_SIFCR_L,
57265 @@ -266,7 +371,6 @@
57269 - .pend = IPIC_SIPNR_L,
57270 .mask = IPIC_SIMSR_L,
57271 .prio = IPIC_SMPRR_B,
57272 .force = IPIC_SIFCR_L,
57273 @@ -274,91 +378,120 @@
57277 - .pend = IPIC_SIPNR_L,
57278 .mask = IPIC_SIMSR_L,
57280 .force = IPIC_SIFCR_L,
57284 - .pend = IPIC_SIPNR_L,
57285 .mask = IPIC_SIMSR_L,
57287 .force = IPIC_SIFCR_L,
57291 - .pend = IPIC_SIPNR_L,
57292 .mask = IPIC_SIMSR_L,
57294 .force = IPIC_SIFCR_L,
57298 - .pend = IPIC_SIPNR_L,
57299 .mask = IPIC_SIMSR_L,
57301 .force = IPIC_SIFCR_L,
57305 - .pend = IPIC_SIPNR_L,
57306 .mask = IPIC_SIMSR_L,
57308 .force = IPIC_SIFCR_L,
57312 - .pend = IPIC_SIPNR_L,
57313 .mask = IPIC_SIMSR_L,
57315 .force = IPIC_SIFCR_L,
57319 - .pend = IPIC_SIPNR_L,
57320 .mask = IPIC_SIMSR_L,
57322 .force = IPIC_SIFCR_L,
57326 - .pend = IPIC_SIPNR_L,
57327 .mask = IPIC_SIMSR_L,
57329 .force = IPIC_SIFCR_L,
57333 - .pend = IPIC_SIPNR_L,
57334 .mask = IPIC_SIMSR_L,
57336 .force = IPIC_SIFCR_L,
57340 + .mask = IPIC_SIMSR_L,
57342 + .force = IPIC_SIFCR_L,
57346 + .mask = IPIC_SIMSR_L,
57348 + .force = IPIC_SIFCR_L,
57352 + .mask = IPIC_SIMSR_L,
57354 + .force = IPIC_SIFCR_L,
57358 - .pend = IPIC_SIPNR_L,
57359 .mask = IPIC_SIMSR_L,
57361 .force = IPIC_SIFCR_L,
57365 - .pend = IPIC_SIPNR_L,
57366 .mask = IPIC_SIMSR_L,
57368 .force = IPIC_SIFCR_L,
57372 + .mask = IPIC_SIMSR_L,
57374 + .force = IPIC_SIFCR_L,
57378 + .mask = IPIC_SIMSR_L,
57380 + .force = IPIC_SIFCR_L,
57384 + .mask = IPIC_SIMSR_L,
57386 + .force = IPIC_SIFCR_L,
57390 + .mask = IPIC_SIMSR_L,
57392 + .force = IPIC_SIFCR_L,
57396 - .pend = IPIC_SIPNR_L,
57397 .mask = IPIC_SIMSR_L,
57399 .force = IPIC_SIFCR_L,
57403 - .pend = IPIC_SIPNR_L,
57404 .mask = IPIC_SIMSR_L,
57406 .force = IPIC_SIFCR_L,
57407 @@ -412,6 +545,10 @@
57408 temp &= ~(1 << (31 - ipic_info[src].bit));
57409 ipic_write(ipic->regs, ipic_info[src].mask, temp);
57411 + /* mb() can't guarantee that masking is finished. But it does finish
57412 + * for nearly all cases. */
57415 spin_unlock_irqrestore(&ipic_lock, flags);
57418 @@ -424,9 +561,13 @@
57420 spin_lock_irqsave(&ipic_lock, flags);
57422 - temp = ipic_read(ipic->regs, ipic_info[src].pend);
57423 + temp = ipic_read(ipic->regs, ipic_info[src].ack);
57424 temp |= (1 << (31 - ipic_info[src].bit));
57425 - ipic_write(ipic->regs, ipic_info[src].pend, temp);
57426 + ipic_write(ipic->regs, ipic_info[src].ack, temp);
57428 + /* mb() can't guarantee that ack is finished. But it does finish
57429 + * for nearly all cases. */
57432 spin_unlock_irqrestore(&ipic_lock, flags);
57434 @@ -444,9 +585,13 @@
57435 temp &= ~(1 << (31 - ipic_info[src].bit));
57436 ipic_write(ipic->regs, ipic_info[src].mask, temp);
57438 - temp = ipic_read(ipic->regs, ipic_info[src].pend);
57439 + temp = ipic_read(ipic->regs, ipic_info[src].ack);
57440 temp |= (1 << (31 - ipic_info[src].bit));
57441 - ipic_write(ipic->regs, ipic_info[src].pend, temp);
57442 + ipic_write(ipic->regs, ipic_info[src].ack, temp);
57444 + /* mb() can't guarantee that ack is finished. But it does finish
57445 + * for nearly all cases. */
57448 spin_unlock_irqrestore(&ipic_lock, flags);
57450 @@ -468,14 +613,22 @@
57454 + /* ipic supports only edge mode on external interrupts */
57455 + if ((flow_type & IRQ_TYPE_EDGE_FALLING) && !ipic_info[src].ack) {
57456 + printk(KERN_ERR "ipic: edge sense not supported on internal "
57461 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
57462 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
57463 if (flow_type & IRQ_TYPE_LEVEL_LOW) {
57464 desc->status |= IRQ_LEVEL;
57465 desc->handle_irq = handle_level_irq;
57466 + desc->chip = &ipic_level_irq_chip;
57468 desc->handle_irq = handle_edge_irq;
57469 + desc->chip = &ipic_edge_irq_chip;
57472 /* only EXT IRQ senses are programmable on ipic
57473 @@ -500,7 +653,16 @@
57477 -static struct irq_chip ipic_irq_chip = {
57478 +/* level interrupts and edge interrupts have different ack operations */
57479 +static struct irq_chip ipic_level_irq_chip = {
57480 + .typename = " IPIC ",
57481 + .unmask = ipic_unmask_irq,
57482 + .mask = ipic_mask_irq,
57483 + .mask_ack = ipic_mask_irq,
57484 + .set_type = ipic_set_irq_type,
57487 +static struct irq_chip ipic_edge_irq_chip = {
57488 .typename = " IPIC ",
57489 .unmask = ipic_unmask_irq,
57490 .mask = ipic_mask_irq,
57491 @@ -519,13 +681,9 @@
57492 irq_hw_number_t hw)
57494 struct ipic *ipic = h->host_data;
57495 - struct irq_chip *chip;
57497 - /* Default chip */
57498 - chip = &ipic->hc_irq;
57500 set_irq_chip_data(virq, ipic);
57501 - set_irq_chip_and_handler(virq, chip, handle_level_irq);
57502 + set_irq_chip_and_handler(virq, &ipic_level_irq_chip, handle_level_irq);
57504 /* Set default irq type */
57505 set_irq_type(virq, IRQ_TYPE_NONE);
57506 @@ -584,7 +742,6 @@
57507 ipic->regs = ioremap(res.start, res.end - res.start + 1);
57509 ipic->irqhost->host_data = ipic;
57510 - ipic->hc_irq = ipic_irq_chip;
57513 ipic_write(ipic->regs, IPIC_SICNR, 0x0);
57514 @@ -593,6 +750,10 @@
57515 * configure SICFR accordingly */
57516 if (flags & IPIC_SPREADMODE_GRP_A)
57517 temp |= SICFR_IPSA;
57518 + if (flags & IPIC_SPREADMODE_GRP_B)
57519 + temp |= SICFR_IPSB;
57520 + if (flags & IPIC_SPREADMODE_GRP_C)
57521 + temp |= SICFR_IPSC;
57522 if (flags & IPIC_SPREADMODE_GRP_D)
57523 temp |= SICFR_IPSD;
57524 if (flags & IPIC_SPREADMODE_MIX_A)
57525 @@ -600,7 +761,7 @@
57526 if (flags & IPIC_SPREADMODE_MIX_B)
57527 temp |= SICFR_MPSB;
57529 - ipic_write(ipic->regs, IPIC_SICNR, temp);
57530 + ipic_write(ipic->regs, IPIC_SICFR, temp);
57532 /* handle MCP route */
57534 @@ -672,10 +833,12 @@
57536 void ipic_set_default_priority(void)
57538 - ipic_write(primary_ipic->regs, IPIC_SIPRR_A, IPIC_SIPRR_A_DEFAULT);
57539 - ipic_write(primary_ipic->regs, IPIC_SIPRR_D, IPIC_SIPRR_D_DEFAULT);
57540 - ipic_write(primary_ipic->regs, IPIC_SMPRR_A, IPIC_SMPRR_A_DEFAULT);
57541 - ipic_write(primary_ipic->regs, IPIC_SMPRR_B, IPIC_SMPRR_B_DEFAULT);
57542 + ipic_write(primary_ipic->regs, IPIC_SIPRR_A, IPIC_PRIORITY_DEFAULT);
57543 + ipic_write(primary_ipic->regs, IPIC_SIPRR_B, IPIC_PRIORITY_DEFAULT);
57544 + ipic_write(primary_ipic->regs, IPIC_SIPRR_C, IPIC_PRIORITY_DEFAULT);
57545 + ipic_write(primary_ipic->regs, IPIC_SIPRR_D, IPIC_PRIORITY_DEFAULT);
57546 + ipic_write(primary_ipic->regs, IPIC_SMPRR_A, IPIC_PRIORITY_DEFAULT);
57547 + ipic_write(primary_ipic->regs, IPIC_SMPRR_B, IPIC_PRIORITY_DEFAULT);
57550 void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq)
57551 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/ipic.h powerpc.git/arch/powerpc/sysdev/ipic.h
57552 --- linux-2.6.24/arch/powerpc/sysdev/ipic.h 2008-01-24 23:58:37.000000000 +0100
57553 +++ powerpc.git/arch/powerpc/sysdev/ipic.h 2008-01-28 20:25:49.000000000 +0100
57554 @@ -23,13 +23,12 @@
57555 #define IPIC_IRQ_EXT7 23
57557 /* Default Priority Registers */
57558 -#define IPIC_SIPRR_A_DEFAULT 0x05309770
57559 -#define IPIC_SIPRR_D_DEFAULT 0x05309770
57560 -#define IPIC_SMPRR_A_DEFAULT 0x05309770
57561 -#define IPIC_SMPRR_B_DEFAULT 0x05309770
57562 +#define IPIC_PRIORITY_DEFAULT 0x05309770
57564 /* System Global Interrupt Configuration Register */
57565 #define SICFR_IPSA 0x00010000
57566 +#define SICFR_IPSB 0x00020000
57567 +#define SICFR_IPSC 0x00040000
57568 #define SICFR_IPSD 0x00080000
57569 #define SICFR_MPSA 0x00200000
57570 #define SICFR_MPSB 0x00400000
57571 @@ -45,13 +44,11 @@
57573 /* The remapper for this IPIC */
57574 struct irq_host *irqhost;
57576 - /* The "linux" controller struct */
57577 - struct irq_chip hc_irq;
57581 - u8 pend; /* pending register offset from base */
57582 + u8 ack; /* pending register offset from base if the irq
57583 + supports ack operation */
57584 u8 mask; /* mask register offset from base */
57585 u8 prio; /* priority register offset from base */
57586 u8 force; /* force register offset from base */
57587 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/mmio_nvram.c powerpc.git/arch/powerpc/sysdev/mmio_nvram.c
57588 --- linux-2.6.24/arch/powerpc/sysdev/mmio_nvram.c 2008-01-24 23:58:37.000000000 +0100
57589 +++ powerpc.git/arch/powerpc/sysdev/mmio_nvram.c 2008-01-28 20:25:49.000000000 +0100
57591 nvram_addr = r.start;
57592 mmio_nvram_len = r.end - r.start + 1;
57593 if ( (!mmio_nvram_len) || (!nvram_addr) ) {
57594 - printk(KERN_WARNING "nvram: address or lenght is 0\n");
57595 + printk(KERN_WARNING "nvram: address or length is 0\n");
57599 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/mpic.c powerpc.git/arch/powerpc/sysdev/mpic.c
57600 --- linux-2.6.24/arch/powerpc/sysdev/mpic.c 2008-01-24 23:58:37.000000000 +0100
57601 +++ powerpc.git/arch/powerpc/sysdev/mpic.c 2008-01-28 20:25:49.000000000 +0100
57610 @@ -121,6 +122,7 @@
57614 + TSI108_CPU_MCACK,
57618 @@ -265,7 +267,7 @@
57622 -static void _mpic_map_mmio(struct mpic *mpic, unsigned long phys_addr,
57623 +static void _mpic_map_mmio(struct mpic *mpic, phys_addr_t phys_addr,
57624 struct mpic_reg_bank *rb, unsigned int offset,
57627 @@ -285,7 +287,7 @@
57628 BUG_ON(!DCR_MAP_OK(rb->dhost));
57631 -static inline void mpic_map(struct mpic *mpic, unsigned long phys_addr,
57632 +static inline void mpic_map(struct mpic *mpic, phys_addr_t phys_addr,
57633 struct mpic_reg_bank *rb, unsigned int offset,
57636 @@ -612,12 +614,11 @@
57640 -static irqreturn_t mpic_ipi_action(int irq, void *dev_id)
57641 +static irqreturn_t mpic_ipi_action(int irq, void *data)
57643 - struct mpic *mpic;
57644 + long ipi = (long)data;
57646 - mpic = mpic_find(irq, NULL);
57647 - smp_message_recv(mpic_irq_to_hw(irq) - mpic->ipi_vecs[0]);
57648 + smp_message_recv(ipi);
57650 return IRQ_HANDLED;
57652 @@ -842,6 +843,24 @@
57656 +void mpic_set_vector(unsigned int virq, unsigned int vector)
57658 + struct mpic *mpic = mpic_from_irq(virq);
57659 + unsigned int src = mpic_irq_to_hw(virq);
57660 + unsigned int vecpri;
57662 + DBG("mpic: set_vector(mpic:@%p,virq:%d,src:%d,vector:0x%x)\n",
57663 + mpic, virq, src, vector);
57665 + if (src >= mpic->irq_count)
57668 + vecpri = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
57669 + vecpri = vecpri & ~MPIC_INFO(VECPRI_VECTOR_MASK);
57670 + vecpri |= vector;
57671 + mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
57674 static struct irq_chip mpic_irq_chip = {
57675 .mask = mpic_mask_irq,
57676 .unmask = mpic_unmask_irq,
57677 @@ -1109,6 +1128,11 @@
57681 + if (flags & MPIC_ENABLE_MCK)
57682 + mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
57683 + mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
57684 + | MPIC_GREG_GCONF_MCK);
57686 /* Read feature register, calculate num CPUs and, for non-ISU
57687 * MPICs, num sources as well. On ISU MPICs, sources are counted
57688 * as ISUs are added
57689 @@ -1230,6 +1254,8 @@
57690 mpic_u3msi_init(mpic);
57693 + mpic_pasemi_msi_init(mpic);
57695 for (i = 0; i < mpic->num_sources; i++) {
57696 /* start with vector = source number, and masked */
57697 u32 vecpri = MPIC_VECPRI_MASK | i |
57698 @@ -1253,6 +1279,11 @@
57699 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
57700 | MPIC_GREG_GCONF_8259_PTHROU_DIS);
57702 + if (mpic->flags & MPIC_NO_BIAS)
57703 + mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
57704 + mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
57705 + | MPIC_GREG_GCONF_NO_BIAS);
57707 /* Set current processor priority to 0 */
57708 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0);
57710 @@ -1419,13 +1450,13 @@
57711 mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0]));
57714 -unsigned int mpic_get_one_irq(struct mpic *mpic)
57715 +static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)
57719 - src = mpic_cpu_read(MPIC_INFO(CPU_INTACK)) & MPIC_INFO(VECPRI_VECTOR_MASK);
57720 + src = mpic_cpu_read(reg) & MPIC_INFO(VECPRI_VECTOR_MASK);
57722 - DBG("%s: get_one_irq(): %d\n", mpic->name, src);
57723 + DBG("%s: get_one_irq(reg 0x%x): %d\n", mpic->name, reg, src);
57725 if (unlikely(src == mpic->spurious_vec)) {
57726 if (mpic->flags & MPIC_SPV_EOI)
57727 @@ -1443,6 +1474,11 @@
57728 return irq_linear_revmap(mpic->irqhost, src);
57731 +unsigned int mpic_get_one_irq(struct mpic *mpic)
57733 + return _mpic_get_one_irq(mpic, MPIC_INFO(CPU_INTACK));
57736 unsigned int mpic_get_irq(void)
57738 struct mpic *mpic = mpic_primary;
57739 @@ -1452,12 +1488,20 @@
57740 return mpic_get_one_irq(mpic);
57743 +unsigned int mpic_get_mcirq(void)
57745 + struct mpic *mpic = mpic_primary;
57747 + BUG_ON(mpic == NULL);
57749 + return _mpic_get_one_irq(mpic, MPIC_INFO(CPU_MCACK));
57753 void mpic_request_ipis(void)
57755 struct mpic *mpic = mpic_primary;
57758 static char *ipi_names[] = {
57759 "IPI0 (call function)",
57760 "IPI1 (reschedule)",
57761 @@ -1472,14 +1516,14 @@
57762 unsigned int vipi = irq_create_mapping(mpic->irqhost,
57763 mpic->ipi_vecs[0] + i);
57764 if (vipi == NO_IRQ) {
57765 - printk(KERN_ERR "Failed to map IPI %d\n", i);
57766 + printk(KERN_ERR "Failed to map IPI %ld\n", i);
57769 err = request_irq(vipi, mpic_ipi_action,
57770 IRQF_DISABLED|IRQF_PERCPU,
57771 - ipi_names[i], mpic);
57772 + ipi_names[i], (void *)i);
57774 - printk(KERN_ERR "Request of irq %d for IPI %d failed\n",
57775 + printk(KERN_ERR "Request of irq %d for IPI %ld failed\n",
57779 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/mpic.h powerpc.git/arch/powerpc/sysdev/mpic.h
57780 --- linux-2.6.24/arch/powerpc/sysdev/mpic.h 2008-01-24 23:58:37.000000000 +0100
57781 +++ powerpc.git/arch/powerpc/sysdev/mpic.h 2008-01-28 20:25:49.000000000 +0100
57783 extern irq_hw_number_t mpic_msi_alloc_hwirqs(struct mpic *mpic, int num);
57784 extern void mpic_msi_free_hwirqs(struct mpic *mpic, int offset, int num);
57785 extern int mpic_u3msi_init(struct mpic *mpic);
57786 +extern int mpic_pasemi_msi_init(struct mpic *mpic);
57788 static inline void mpic_msi_reserve_hwirq(struct mpic *mpic,
57789 irq_hw_number_t hwirq)
57790 @@ -28,12 +29,15 @@
57795 +static inline int mpic_pasemi_msi_init(struct mpic *mpic)
57801 extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type);
57802 -extern void mpic_end_irq(unsigned int irq);
57803 -extern void mpic_mask_irq(unsigned int irq);
57804 -extern void mpic_unmask_irq(unsigned int irq);
57805 +extern void mpic_set_vector(unsigned int virq, unsigned int vector);
57806 extern void mpic_set_affinity(unsigned int irq, cpumask_t cpumask);
57808 #endif /* _POWERPC_SYSDEV_MPIC_H */
57809 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/mpic_pasemi_msi.c powerpc.git/arch/powerpc/sysdev/mpic_pasemi_msi.c
57810 --- linux-2.6.24/arch/powerpc/sysdev/mpic_pasemi_msi.c 1970-01-01 01:00:00.000000000 +0100
57811 +++ powerpc.git/arch/powerpc/sysdev/mpic_pasemi_msi.c 2008-01-28 20:25:49.000000000 +0100
57814 + * Copyright 2007, Olof Johansson, PA Semi
57816 + * Based on arch/powerpc/sysdev/mpic_u3msi.c:
57818 + * Copyright 2006, Segher Boessenkool, IBM Corporation.
57819 + * Copyright 2006-2007, Michael Ellerman, IBM Corporation.
57821 + * This program is free software; you can redistribute it and/or
57822 + * modify it under the terms of the GNU General Public License
57823 + * as published by the Free Software Foundation; version 2 of the
57830 +#include <linux/irq.h>
57831 +#include <linux/bootmem.h>
57832 +#include <linux/msi.h>
57833 +#include <asm/mpic.h>
57834 +#include <asm/prom.h>
57835 +#include <asm/hw_irq.h>
57836 +#include <asm/ppc-pci.h>
57840 +/* Allocate 16 interrupts per device, to give an alignment of 16,
57841 + * since that's the size of the grouping w.r.t. affinity. If someone
57842 + * needs more than 32 MSI's down the road we'll have to rethink this,
57843 + * but it should be OK for now.
57845 +#define ALLOC_CHUNK 16
57847 +#define PASEMI_MSI_ADDR 0xfc080000
57849 +/* A bit ugly, can we get this from the pci_dev somehow? */
57850 +static struct mpic *msi_mpic;
57853 +static void mpic_pasemi_msi_mask_irq(unsigned int irq)
57855 + pr_debug("mpic_pasemi_msi_mask_irq %d\n", irq);
57856 + mask_msi_irq(irq);
57857 + mpic_mask_irq(irq);
57860 +static void mpic_pasemi_msi_unmask_irq(unsigned int irq)
57862 + pr_debug("mpic_pasemi_msi_unmask_irq %d\n", irq);
57863 + mpic_unmask_irq(irq);
57864 + unmask_msi_irq(irq);
57867 +static struct irq_chip mpic_pasemi_msi_chip = {
57868 + .shutdown = mpic_pasemi_msi_mask_irq,
57869 + .mask = mpic_pasemi_msi_mask_irq,
57870 + .unmask = mpic_pasemi_msi_unmask_irq,
57871 + .eoi = mpic_end_irq,
57872 + .set_type = mpic_set_irq_type,
57873 + .set_affinity = mpic_set_affinity,
57874 + .typename = "PASEMI-MSI ",
57877 +static int pasemi_msi_check_device(struct pci_dev *pdev, int nvec, int type)
57879 + if (type == PCI_CAP_ID_MSIX)
57880 + pr_debug("pasemi_msi: MSI-X untested, trying anyway\n");
57885 +static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev)
57887 + struct msi_desc *entry;
57889 + pr_debug("pasemi_msi_teardown_msi_irqs, pdev %p\n", pdev);
57891 + list_for_each_entry(entry, &pdev->msi_list, list) {
57892 + if (entry->irq == NO_IRQ)
57895 + set_irq_msi(entry->irq, NULL);
57896 + mpic_msi_free_hwirqs(msi_mpic, virq_to_hw(entry->irq),
57898 + irq_dispose_mapping(entry->irq);
57904 +static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
57906 + irq_hw_number_t hwirq;
57907 + unsigned int virq;
57908 + struct msi_desc *entry;
57909 + struct msi_msg msg;
57912 + pr_debug("pasemi_msi_setup_msi_irqs, pdev %p nvec %d type %d\n",
57913 + pdev, nvec, type);
57915 + msg.address_hi = 0;
57916 + msg.address_lo = PASEMI_MSI_ADDR;
57918 + list_for_each_entry(entry, &pdev->msi_list, list) {
57919 + /* Allocate 16 interrupts for now, since that's the grouping for
57920 + * affinity. This can be changed later if it turns out 32 is too
57921 + * few MSIs for someone, but restrictions will apply to how the
57922 + * sources can be changed independently.
57924 + hwirq = mpic_msi_alloc_hwirqs(msi_mpic, ALLOC_CHUNK);
57926 + pr_debug("pasemi_msi: failed allocating hwirq\n");
57930 + virq = irq_create_mapping(msi_mpic->irqhost, hwirq);
57931 + if (virq == NO_IRQ) {
57932 + pr_debug("pasemi_msi: failed mapping hwirq 0x%lx\n", hwirq);
57933 + mpic_msi_free_hwirqs(msi_mpic, hwirq, ALLOC_CHUNK);
57937 + /* Vector on MSI is really an offset, the hardware adds
57938 + * it to the value written at the magic address. So set
57939 + * it to 0 to remain sane.
57941 + mpic_set_vector(virq, 0);
57943 + set_irq_msi(virq, entry);
57944 + set_irq_chip(virq, &mpic_pasemi_msi_chip);
57945 + set_irq_type(virq, IRQ_TYPE_EDGE_RISING);
57947 + pr_debug("pasemi_msi: allocated virq 0x%x (hw 0x%lx) addr 0x%lx\n",
57948 + virq, hwirq, addr);
57950 + /* Likewise, the device writes [0...511] into the target
57951 + * register to generate MSI [512...1023]
57953 + msg.data = hwirq-0x200;
57954 + write_msi_msg(virq, &msg);
57960 +int mpic_pasemi_msi_init(struct mpic *mpic)
57964 + if (!mpic->irqhost->of_node ||
57965 + !of_device_is_compatible(mpic->irqhost->of_node,
57966 + "pasemi,pwrficient-openpic"))
57969 + rc = mpic_msi_init_allocator(mpic);
57971 + pr_debug("pasemi_msi: Error allocating bitmap!\n");
57975 + pr_debug("pasemi_msi: Registering PA Semi MPIC MSI callbacks\n");
57978 + WARN_ON(ppc_md.setup_msi_irqs);
57979 + ppc_md.setup_msi_irqs = pasemi_msi_setup_msi_irqs;
57980 + ppc_md.teardown_msi_irqs = pasemi_msi_teardown_msi_irqs;
57981 + ppc_md.msi_check_device = pasemi_msi_check_device;
57985 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/mv64x60_dev.c powerpc.git/arch/powerpc/sysdev/mv64x60_dev.c
57986 --- linux-2.6.24/arch/powerpc/sysdev/mv64x60_dev.c 2008-01-24 23:58:37.000000000 +0100
57987 +++ powerpc.git/arch/powerpc/sysdev/mv64x60_dev.c 2008-01-28 20:25:49.000000000 +0100
57988 @@ -241,7 +241,7 @@
57990 /* only register the shared platform device the first time through */
57991 if (id == 0 && (err = eth_register_shared_pdev(np)))
57995 memset(r, 0, sizeof(r));
57996 of_irq_to_resource(np, 0, &r[0]);
57997 @@ -451,22 +451,19 @@
58002 - (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); id++)
58003 - if ((err = mv64x60_mpsc_device_setup(np, id)))
58005 + for_each_compatible_node(np, "serial", "marvell,mpsc")
58006 + if ((err = mv64x60_mpsc_device_setup(np, id++)))
58010 - (np = of_find_compatible_node(np, "network",
58011 - "marvell,mv64x60-eth"));
58013 - if ((err = mv64x60_eth_device_setup(np, id)))
58015 + for_each_compatible_node(np, "network", "marvell,mv64x60-eth")
58016 + if ((err = mv64x60_eth_device_setup(np, id++)))
58020 - (np = of_find_compatible_node(np, "i2c", "marvell,mv64x60-i2c"));
58022 - if ((err = mv64x60_i2c_device_setup(np, id)))
58024 + for_each_compatible_node(np, "i2c", "marvell,mv64x60-i2c")
58025 + if ((err = mv64x60_i2c_device_setup(np, id++)))
58028 /* support up to one watchdog timer */
58029 @@ -477,7 +474,6 @@
58037 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/mv64x60_pci.c powerpc.git/arch/powerpc/sysdev/mv64x60_pci.c
58038 --- linux-2.6.24/arch/powerpc/sysdev/mv64x60_pci.c 2008-01-24 23:58:37.000000000 +0100
58039 +++ powerpc.git/arch/powerpc/sysdev/mv64x60_pci.c 2008-01-28 20:25:49.000000000 +0100
58040 @@ -164,8 +164,8 @@
58042 void __init mv64x60_pci_init(void)
58044 - struct device_node *np = NULL;
58045 + struct device_node *np;
58047 - while ((np = of_find_compatible_node(np, "pci", "marvell,mv64x60-pci")))
58048 + for_each_compatible_node(np, "pci", "marvell,mv64x60-pci")
58049 mv64x60_add_bridge(np);
58051 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/mv64x60_udbg.c powerpc.git/arch/powerpc/sysdev/mv64x60_udbg.c
58052 --- linux-2.6.24/arch/powerpc/sysdev/mv64x60_udbg.c 2008-01-24 23:58:37.000000000 +0100
58053 +++ powerpc.git/arch/powerpc/sysdev/mv64x60_udbg.c 2008-01-28 20:25:49.000000000 +0100
58054 @@ -85,10 +85,10 @@
58059 - (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); )
58060 + for_each_compatible_node(np, "serial", "marvell,mpsc") {
58065 of_node_put(stdout);
58067 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/of_rtc.c powerpc.git/arch/powerpc/sysdev/of_rtc.c
58068 --- linux-2.6.24/arch/powerpc/sysdev/of_rtc.c 1970-01-01 01:00:00.000000000 +0100
58069 +++ powerpc.git/arch/powerpc/sysdev/of_rtc.c 2008-01-28 20:25:49.000000000 +0100
58072 + * Instantiate mmio-mapped RTC chips based on device tree information
58074 + * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
58076 + * This program is free software; you can redistribute it and/or modify it
58077 + * under the terms of the GNU General Public License as published by the
58078 + * Free Software Foundation; either version 2 of the License, or (at your
58079 + * option) any later version.
58081 +#include <linux/kernel.h>
58082 +#include <linux/of.h>
58083 +#include <linux/init.h>
58084 +#include <linux/of_platform.h>
58086 +static __initdata struct {
58087 + const char *compatible;
58089 +} of_rtc_table[] = {
58090 + { "ds1743-nvram", "rtc-ds1742" },
58093 +void __init of_instantiate_rtc(void)
58095 + struct device_node *node;
58099 + for (i = 0; i < ARRAY_SIZE(of_rtc_table); i++) {
58100 + char *plat_name = of_rtc_table[i].plat_name;
58102 + for_each_compatible_node(node, NULL,
58103 + of_rtc_table[i].compatible) {
58104 + struct resource *res;
58106 + res = kmalloc(sizeof(*res), GFP_KERNEL);
58108 + printk(KERN_ERR "OF RTC: Out of memory "
58109 + "allocating resource structure for %s\n",
58110 + node->full_name);
58114 + err = of_address_to_resource(node, 0, res);
58116 + printk(KERN_ERR "OF RTC: Error "
58117 + "translating resources for %s\n",
58118 + node->full_name);
58122 + printk(KERN_INFO "OF_RTC: %s is a %s @ 0x%llx-0x%llx\n",
58123 + node->full_name, plat_name,
58124 + (unsigned long long)res->start,
58125 + (unsigned long long)res->end);
58126 + platform_device_register_simple(plat_name, -1, res, 1);
58130 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/pmi.c powerpc.git/arch/powerpc/sysdev/pmi.c
58131 --- linux-2.6.24/arch/powerpc/sysdev/pmi.c 2008-01-24 23:58:37.000000000 +0100
58132 +++ powerpc.git/arch/powerpc/sysdev/pmi.c 2008-01-28 20:25:49.000000000 +0100
58134 #include <linux/completion.h>
58135 #include <linux/spinlock.h>
58136 #include <linux/workqueue.h>
58137 +#include <linux/of_device.h>
58138 +#include <linux/of_platform.h>
58140 -#include <asm/of_device.h>
58141 -#include <asm/of_platform.h>
58142 #include <asm/io.h>
58143 #include <asm/pmi.h>
58144 #include <asm/prom.h>
58145 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/ppc4xx_pci.c powerpc.git/arch/powerpc/sysdev/ppc4xx_pci.c
58146 --- linux-2.6.24/arch/powerpc/sysdev/ppc4xx_pci.c 1970-01-01 01:00:00.000000000 +0100
58147 +++ powerpc.git/arch/powerpc/sysdev/ppc4xx_pci.c 2008-01-28 20:25:49.000000000 +0100
58150 + * PCI / PCI-X / PCI-Express support for 4xx parts
58152 + * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
58154 + * Most PCI Express code is coming from Stefan Roese implementation for
58155 + * arch/ppc in the Denx tree, slightly reworked by me.
58157 + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
58159 + * Some of that comes itself from a previous implementation for 440SPE only
58160 + * by Roland Dreier:
58162 + * Copyright (c) 2005 Cisco Systems. All rights reserved.
58163 + * Roland Dreier <rolandd@cisco.com>
58169 +#include <linux/kernel.h>
58170 +#include <linux/pci.h>
58171 +#include <linux/init.h>
58172 +#include <linux/of.h>
58173 +#include <linux/bootmem.h>
58174 +#include <linux/delay.h>
58176 +#include <asm/io.h>
58177 +#include <asm/pci-bridge.h>
58178 +#include <asm/machdep.h>
58179 +#include <asm/dcr.h>
58180 +#include <asm/dcr-regs.h>
58182 +#include "ppc4xx_pci.h"
58184 +static int dma_offset_set;
58186 +/* Move that to a useable header */
58187 +extern unsigned long total_memory;
58189 +#define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL))
58190 +#define U64_TO_U32_HIGH(val) ((u32)((val) >> 32))
58192 +#ifdef CONFIG_RESOURCES_64BIT
58193 +#define RES_TO_U32_LOW(val) U64_TO_U32_LOW(val)
58194 +#define RES_TO_U32_HIGH(val) U64_TO_U32_HIGH(val)
58196 +#define RES_TO_U32_LOW(val) (val)
58197 +#define RES_TO_U32_HIGH(val) (0)
58200 +static inline int ppc440spe_revA(void)
58202 + /* Catch both 440SPe variants, with and without RAID6 support */
58203 + if ((mfspr(SPRN_PVR) & 0xffefffff) == 0x53421890)
58209 +static void fixup_ppc4xx_pci_bridge(struct pci_dev *dev)
58211 + struct pci_controller *hose;
58214 + if (dev->devfn != 0 || dev->bus->self != NULL)
58217 + hose = pci_bus_to_host(dev->bus);
58218 + if (hose == NULL)
58221 + if (!of_device_is_compatible(hose->dn, "ibm,plb-pciex") &&
58222 + !of_device_is_compatible(hose->dn, "ibm,plb-pcix") &&
58223 + !of_device_is_compatible(hose->dn, "ibm,plb-pci"))
58226 + /* Hide the PCI host BARs from the kernel as their content doesn't
58227 + * fit well in the resource management
58229 + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
58230 + dev->resource[i].start = dev->resource[i].end = 0;
58231 + dev->resource[i].flags = 0;
58234 + printk(KERN_INFO "PCI: Hiding 4xx host bridge resources %s\n",
58237 +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, fixup_ppc4xx_pci_bridge);
58239 +static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose,
58240 + void __iomem *reg,
58241 + struct resource *res)
58244 + const u32 *ranges;
58246 + int pna = of_n_addr_cells(hose->dn);
58247 + int np = pna + 5;
58251 + res->end = size = 0x80000000;
58252 + res->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
58254 + /* Get dma-ranges property */
58255 + ranges = of_get_property(hose->dn, "dma-ranges", &rlen);
58256 + if (ranges == NULL)
58260 + while ((rlen -= np * 4) >= 0) {
58261 + u32 pci_space = ranges[0];
58262 + u64 pci_addr = of_read_number(ranges + 1, 2);
58263 + u64 cpu_addr = of_translate_dma_address(hose->dn, ranges + 3);
58264 + size = of_read_number(ranges + pna + 3, 2);
58266 + if (cpu_addr == OF_BAD_ADDR || size == 0)
58269 + /* We only care about memory */
58270 + if ((pci_space & 0x03000000) != 0x02000000)
58273 + /* We currently only support memory at 0, and pci_addr
58274 + * within 32 bits space
58276 + if (cpu_addr != 0 || pci_addr > 0xffffffff) {
58277 + printk(KERN_WARNING "%s: Ignored unsupported dma range"
58278 + " 0x%016llx...0x%016llx -> 0x%016llx\n",
58279 + hose->dn->full_name,
58280 + pci_addr, pci_addr + size - 1, cpu_addr);
58284 + /* Check if not prefetchable */
58285 + if (!(pci_space & 0x40000000))
58286 + res->flags &= ~IORESOURCE_PREFETCH;
58290 + res->start = pci_addr;
58291 +#ifndef CONFIG_RESOURCES_64BIT
58292 + /* Beware of 32 bits resources */
58293 + if ((pci_addr + size) > 0x100000000ull)
58294 + res->end = 0xffffffff;
58297 + res->end = res->start + size - 1;
58301 + /* We only support one global DMA offset */
58302 + if (dma_offset_set && pci_dram_offset != res->start) {
58303 + printk(KERN_ERR "%s: dma-ranges(s) mismatch\n",
58304 + hose->dn->full_name);
58308 + /* Check that we can fit all of memory as we don't support
58309 + * DMA bounce buffers
58311 + if (size < total_memory) {
58312 + printk(KERN_ERR "%s: dma-ranges too small "
58313 + "(size=%llx total_memory=%lx)\n",
58314 + hose->dn->full_name, size, total_memory);
58318 + /* Check we are a power of 2 size and that base is a multiple of size*/
58319 + if (!is_power_of_2(size) ||
58320 + (res->start & (size - 1)) != 0) {
58321 + printk(KERN_ERR "%s: dma-ranges unaligned\n",
58322 + hose->dn->full_name);
58326 + /* Check that we are fully contained within 32 bits space */
58327 + if (res->end > 0xffffffff) {
58328 + printk(KERN_ERR "%s: dma-ranges outside of 32 bits space\n",
58329 + hose->dn->full_name);
58333 + dma_offset_set = 1;
58334 + pci_dram_offset = res->start;
58336 + printk(KERN_INFO "4xx PCI DMA offset set to 0x%08lx\n",
58337 + pci_dram_offset);
58342 + * 4xx PCI 2.x part
58345 +static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose,
58346 + void __iomem *reg)
58348 + u32 la, ma, pcila, pciha;
58351 + /* Setup outbound memory windows */
58352 + for (i = j = 0; i < 3; i++) {
58353 + struct resource *res = &hose->mem_resources[i];
58355 + /* we only care about memory windows */
58356 + if (!(res->flags & IORESOURCE_MEM))
58359 + printk(KERN_WARNING "%s: Too many ranges\n",
58360 + hose->dn->full_name);
58364 + /* Calculate register values */
58366 + pciha = RES_TO_U32_HIGH(res->start - hose->pci_mem_offset);
58367 + pcila = RES_TO_U32_LOW(res->start - hose->pci_mem_offset);
58369 + ma = res->end + 1 - res->start;
58370 + if (!is_power_of_2(ma) || ma < 0x1000 || ma > 0xffffffffu) {
58371 + printk(KERN_WARNING "%s: Resource out of range\n",
58372 + hose->dn->full_name);
58375 + ma = (0xffffffffu << ilog2(ma)) | 0x1;
58376 + if (res->flags & IORESOURCE_PREFETCH)
58379 + /* Program register values */
58380 + writel(la, reg + PCIL0_PMM0LA + (0x10 * j));
58381 + writel(pcila, reg + PCIL0_PMM0PCILA + (0x10 * j));
58382 + writel(pciha, reg + PCIL0_PMM0PCIHA + (0x10 * j));
58383 + writel(ma, reg + PCIL0_PMM0MA + (0x10 * j));
58388 +static void __init ppc4xx_configure_pci_PTMs(struct pci_controller *hose,
58389 + void __iomem *reg,
58390 + const struct resource *res)
58392 + resource_size_t size = res->end - res->start + 1;
58395 + /* Calculate window size */
58396 + sa = (0xffffffffu << ilog2(size)) | 1;
58399 + /* RAM is always at 0 local for now */
58400 + writel(0, reg + PCIL0_PTM1LA);
58401 + writel(sa, reg + PCIL0_PTM1MS);
58403 + /* Map on PCI side */
58404 + early_write_config_dword(hose, hose->first_busno, 0,
58405 + PCI_BASE_ADDRESS_1, res->start);
58406 + early_write_config_dword(hose, hose->first_busno, 0,
58407 + PCI_BASE_ADDRESS_2, 0x00000000);
58408 + early_write_config_word(hose, hose->first_busno, 0,
58409 + PCI_COMMAND, 0x0006);
58412 +static void __init ppc4xx_probe_pci_bridge(struct device_node *np)
58415 + struct resource rsrc_cfg;
58416 + struct resource rsrc_reg;
58417 + struct resource dma_window;
58418 + struct pci_controller *hose = NULL;
58419 + void __iomem *reg = NULL;
58420 + const int *bus_range;
58423 + /* Fetch config space registers address */
58424 + if (of_address_to_resource(np, 0, &rsrc_cfg)) {
58425 + printk(KERN_ERR "%s:Can't get PCI config register base !",
58429 + /* Fetch host bridge internal registers address */
58430 + if (of_address_to_resource(np, 3, &rsrc_reg)) {
58431 + printk(KERN_ERR "%s: Can't get PCI internal register base !",
58436 + /* Check if primary bridge */
58437 + if (of_get_property(np, "primary", NULL))
58440 + /* Get bus range if any */
58441 + bus_range = of_get_property(np, "bus-range", NULL);
58443 + /* Map registers */
58444 + reg = ioremap(rsrc_reg.start, rsrc_reg.end + 1 - rsrc_reg.start);
58445 + if (reg == NULL) {
58446 + printk(KERN_ERR "%s: Can't map registers !", np->full_name);
58450 + /* Allocate the host controller data structure */
58451 + hose = pcibios_alloc_controller(np);
58455 + hose->first_busno = bus_range ? bus_range[0] : 0x0;
58456 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
58458 + /* Setup config space */
58459 + setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 0x4, 0);
58461 + /* Disable all windows */
58462 + writel(0, reg + PCIL0_PMM0MA);
58463 + writel(0, reg + PCIL0_PMM1MA);
58464 + writel(0, reg + PCIL0_PMM2MA);
58465 + writel(0, reg + PCIL0_PTM1MS);
58466 + writel(0, reg + PCIL0_PTM2MS);
58468 + /* Parse outbound mapping resources */
58469 + pci_process_bridge_OF_ranges(hose, np, primary);
58471 + /* Parse inbound mapping resources */
58472 + if (ppc4xx_parse_dma_ranges(hose, reg, &dma_window) != 0)
58475 + /* Configure outbound ranges POMs */
58476 + ppc4xx_configure_pci_PMMs(hose, reg);
58478 + /* Configure inbound ranges PIMs */
58479 + ppc4xx_configure_pci_PTMs(hose, reg, &dma_window);
58481 + /* We don't need the registers anymore */
58487 + pcibios_free_controller(hose);
58496 +static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose,
58497 + void __iomem *reg)
58499 + u32 lah, lal, pciah, pcial, sa;
58502 + /* Setup outbound memory windows */
58503 + for (i = j = 0; i < 3; i++) {
58504 + struct resource *res = &hose->mem_resources[i];
58506 + /* we only care about memory windows */
58507 + if (!(res->flags & IORESOURCE_MEM))
58510 + printk(KERN_WARNING "%s: Too many ranges\n",
58511 + hose->dn->full_name);
58515 + /* Calculate register values */
58516 + lah = RES_TO_U32_HIGH(res->start);
58517 + lal = RES_TO_U32_LOW(res->start);
58518 + pciah = RES_TO_U32_HIGH(res->start - hose->pci_mem_offset);
58519 + pcial = RES_TO_U32_LOW(res->start - hose->pci_mem_offset);
58520 + sa = res->end + 1 - res->start;
58521 + if (!is_power_of_2(sa) || sa < 0x100000 ||
58522 + sa > 0xffffffffu) {
58523 + printk(KERN_WARNING "%s: Resource out of range\n",
58524 + hose->dn->full_name);
58527 + sa = (0xffffffffu << ilog2(sa)) | 0x1;
58529 + /* Program register values */
58531 + writel(lah, reg + PCIX0_POM0LAH);
58532 + writel(lal, reg + PCIX0_POM0LAL);
58533 + writel(pciah, reg + PCIX0_POM0PCIAH);
58534 + writel(pcial, reg + PCIX0_POM0PCIAL);
58535 + writel(sa, reg + PCIX0_POM0SA);
58537 + writel(lah, reg + PCIX0_POM1LAH);
58538 + writel(lal, reg + PCIX0_POM1LAL);
58539 + writel(pciah, reg + PCIX0_POM1PCIAH);
58540 + writel(pcial, reg + PCIX0_POM1PCIAL);
58541 + writel(sa, reg + PCIX0_POM1SA);
58547 +static void __init ppc4xx_configure_pcix_PIMs(struct pci_controller *hose,
58548 + void __iomem *reg,
58549 + const struct resource *res,
58551 + int enable_msi_hole)
58553 + resource_size_t size = res->end - res->start + 1;
58556 + /* RAM is always at 0 */
58557 + writel(0x00000000, reg + PCIX0_PIM0LAH);
58558 + writel(0x00000000, reg + PCIX0_PIM0LAL);
58560 + /* Calculate window size */
58561 + sa = (0xffffffffu << ilog2(size)) | 1;
58563 + if (res->flags & IORESOURCE_PREFETCH)
58565 + if (enable_msi_hole)
58567 + writel(sa, reg + PCIX0_PIM0SA);
58569 + writel(0xffffffff, reg + PCIX0_PIM0SAH);
58571 + /* Map on PCI side */
58572 + writel(0x00000000, reg + PCIX0_BAR0H);
58573 + writel(res->start, reg + PCIX0_BAR0L);
58574 + writew(0x0006, reg + PCIX0_COMMAND);
58577 +static void __init ppc4xx_probe_pcix_bridge(struct device_node *np)
58579 + struct resource rsrc_cfg;
58580 + struct resource rsrc_reg;
58581 + struct resource dma_window;
58582 + struct pci_controller *hose = NULL;
58583 + void __iomem *reg = NULL;
58584 + const int *bus_range;
58585 + int big_pim = 0, msi = 0, primary = 0;
58587 + /* Fetch config space registers address */
58588 + if (of_address_to_resource(np, 0, &rsrc_cfg)) {
58589 + printk(KERN_ERR "%s:Can't get PCI-X config register base !",
58593 + /* Fetch host bridge internal registers address */
58594 + if (of_address_to_resource(np, 3, &rsrc_reg)) {
58595 + printk(KERN_ERR "%s: Can't get PCI-X internal register base !",
58600 + /* Check if it supports large PIMs (440GX) */
58601 + if (of_get_property(np, "large-inbound-windows", NULL))
58604 + /* Check if we should enable MSIs inbound hole */
58605 + if (of_get_property(np, "enable-msi-hole", NULL))
58608 + /* Check if primary bridge */
58609 + if (of_get_property(np, "primary", NULL))
58612 + /* Get bus range if any */
58613 + bus_range = of_get_property(np, "bus-range", NULL);
58615 + /* Map registers */
58616 + reg = ioremap(rsrc_reg.start, rsrc_reg.end + 1 - rsrc_reg.start);
58617 + if (reg == NULL) {
58618 + printk(KERN_ERR "%s: Can't map registers !", np->full_name);
58622 + /* Allocate the host controller data structure */
58623 + hose = pcibios_alloc_controller(np);
58627 + hose->first_busno = bus_range ? bus_range[0] : 0x0;
58628 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
58630 + /* Setup config space */
58631 + setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 0x4, 0);
58633 + /* Disable all windows */
58634 + writel(0, reg + PCIX0_POM0SA);
58635 + writel(0, reg + PCIX0_POM1SA);
58636 + writel(0, reg + PCIX0_POM2SA);
58637 + writel(0, reg + PCIX0_PIM0SA);
58638 + writel(0, reg + PCIX0_PIM1SA);
58639 + writel(0, reg + PCIX0_PIM2SA);
58641 + writel(0, reg + PCIX0_PIM0SAH);
58642 + writel(0, reg + PCIX0_PIM2SAH);
58645 + /* Parse outbound mapping resources */
58646 + pci_process_bridge_OF_ranges(hose, np, primary);
58648 + /* Parse inbound mapping resources */
58649 + if (ppc4xx_parse_dma_ranges(hose, reg, &dma_window) != 0)
58652 + /* Configure outbound ranges POMs */
58653 + ppc4xx_configure_pcix_POMs(hose, reg);
58655 + /* Configure inbound ranges PIMs */
58656 + ppc4xx_configure_pcix_PIMs(hose, reg, &dma_window, big_pim, msi);
58658 + /* We don't need the registers anymore */
58664 + pcibios_free_controller(hose);
58669 +#ifdef CONFIG_PPC4xx_PCI_EXPRESS
58672 + * 4xx PCI-Express part
58674 + * We support 3 parts currently based on the compatible property:
58676 + * ibm,plb-pciex-440spe
58677 + * ibm,plb-pciex-405ex
58679 + * Anything else will be rejected for now as they are all subtly
58680 + * different unfortunately.
58684 +#define MAX_PCIE_BUS_MAPPED 0x40
58686 +struct ppc4xx_pciex_port
58688 + struct pci_controller *hose;
58689 + struct device_node *node;
58690 + unsigned int index;
58694 + unsigned int sdr_base;
58696 + struct resource cfg_space;
58697 + struct resource utl_regs;
58698 + void __iomem *utl_base;
58701 +static struct ppc4xx_pciex_port *ppc4xx_pciex_ports;
58702 +static unsigned int ppc4xx_pciex_port_count;
58704 +struct ppc4xx_pciex_hwops
58706 + int (*core_init)(struct device_node *np);
58707 + int (*port_init_hw)(struct ppc4xx_pciex_port *port);
58708 + int (*setup_utl)(struct ppc4xx_pciex_port *port);
58711 +static struct ppc4xx_pciex_hwops *ppc4xx_pciex_hwops;
58715 +/* Check various reset bits of the 440SPe PCIe core */
58716 +static int __init ppc440spe_pciex_check_reset(struct device_node *np)
58718 + u32 valPE0, valPE1, valPE2;
58721 + /* SDR0_PEGPLLLCT1 reset */
58722 + if (!(mfdcri(SDR0, PESDR0_PLLLCT1) & 0x01000000)) {
58724 + * the PCIe core was probably already initialised
58725 + * by firmware - let's re-reset RCSSET regs
58727 + * -- Shouldn't we also re-reset the whole thing ? -- BenH
58729 + pr_debug("PCIE: SDR0_PLLLCT1 already reset.\n");
58730 + mtdcri(SDR0, PESDR0_440SPE_RCSSET, 0x01010000);
58731 + mtdcri(SDR0, PESDR1_440SPE_RCSSET, 0x01010000);
58732 + mtdcri(SDR0, PESDR2_440SPE_RCSSET, 0x01010000);
58735 + valPE0 = mfdcri(SDR0, PESDR0_440SPE_RCSSET);
58736 + valPE1 = mfdcri(SDR0, PESDR1_440SPE_RCSSET);
58737 + valPE2 = mfdcri(SDR0, PESDR2_440SPE_RCSSET);
58739 + /* SDR0_PExRCSSET rstgu */
58740 + if (!(valPE0 & 0x01000000) ||
58741 + !(valPE1 & 0x01000000) ||
58742 + !(valPE2 & 0x01000000)) {
58743 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstgu error\n");
58747 + /* SDR0_PExRCSSET rstdl */
58748 + if (!(valPE0 & 0x00010000) ||
58749 + !(valPE1 & 0x00010000) ||
58750 + !(valPE2 & 0x00010000)) {
58751 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstdl error\n");
58755 + /* SDR0_PExRCSSET rstpyn */
58756 + if ((valPE0 & 0x00001000) ||
58757 + (valPE1 & 0x00001000) ||
58758 + (valPE2 & 0x00001000)) {
58759 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstpyn error\n");
58763 + /* SDR0_PExRCSSET hldplb */
58764 + if ((valPE0 & 0x10000000) ||
58765 + (valPE1 & 0x10000000) ||
58766 + (valPE2 & 0x10000000)) {
58767 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET hldplb error\n");
58771 + /* SDR0_PExRCSSET rdy */
58772 + if ((valPE0 & 0x00100000) ||
58773 + (valPE1 & 0x00100000) ||
58774 + (valPE2 & 0x00100000)) {
58775 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rdy error\n");
58779 + /* SDR0_PExRCSSET shutdown */
58780 + if ((valPE0 & 0x00000100) ||
58781 + (valPE1 & 0x00000100) ||
58782 + (valPE2 & 0x00000100)) {
58783 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET shutdown error\n");
58790 +/* Global PCIe core initializations for 440SPe core */
58791 +static int __init ppc440spe_pciex_core_init(struct device_node *np)
58793 + int time_out = 20;
58795 + /* Set PLL clock receiver to LVPECL */
58796 + mtdcri(SDR0, PESDR0_PLLLCT1, mfdcri(SDR0, PESDR0_PLLLCT1) | 1 << 28);
58798 + /* Shouldn't we do all the calibration stuff etc... here ? */
58799 + if (ppc440spe_pciex_check_reset(np))
58802 + if (!(mfdcri(SDR0, PESDR0_PLLLCT2) & 0x10000)) {
58803 + printk(KERN_INFO "PCIE: PESDR_PLLCT2 resistance calibration "
58804 + "failed (0x%08x)\n",
58805 + mfdcri(SDR0, PESDR0_PLLLCT2));
58809 + /* De-assert reset of PCIe PLL, wait for lock */
58810 + mtdcri(SDR0, PESDR0_PLLLCT1,
58811 + mfdcri(SDR0, PESDR0_PLLLCT1) & ~(1 << 24));
58814 + while (time_out) {
58815 + if (!(mfdcri(SDR0, PESDR0_PLLLCT3) & 0x10000000)) {
58822 + printk(KERN_INFO "PCIE: VCO output not locked\n");
58826 + pr_debug("PCIE initialization OK\n");
58831 +static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58833 + u32 val = 1 << 24;
58835 + if (port->endpoint)
58836 + val = PTYPE_LEGACY_ENDPOINT << 20;
58838 + val = PTYPE_ROOT_PORT << 20;
58840 + if (port->index == 0)
58841 + val |= LNKW_X8 << 12;
58843 + val |= LNKW_X4 << 12;
58845 + mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET, val);
58846 + mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET1, 0x20222222);
58847 + if (ppc440spe_revA())
58848 + mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x11000000);
58849 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL0SET1, 0x35000000);
58850 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL1SET1, 0x35000000);
58851 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL2SET1, 0x35000000);
58852 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL3SET1, 0x35000000);
58853 + if (port->index == 0) {
58854 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL4SET1,
58856 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL5SET1,
58858 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL6SET1,
58860 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL7SET1,
58863 + val = mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET);
58864 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
58865 + (val & ~(1 << 24 | 1 << 16)) | 1 << 12);
58870 +static int ppc440speA_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58872 + return ppc440spe_pciex_init_port_hw(port);
58875 +static int ppc440speB_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58877 + int rc = ppc440spe_pciex_init_port_hw(port);
58879 + port->has_ibpre = 1;
58884 +static int ppc440speA_pciex_init_utl(struct ppc4xx_pciex_port *port)
58886 + /* XXX Check what that value means... I hate magic */
58887 + dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x68782800);
58890 + * Set buffer allocations and then assert VRB and TXE.
58892 + out_be32(port->utl_base + PEUTL_OUTTR, 0x08000000);
58893 + out_be32(port->utl_base + PEUTL_INTR, 0x02000000);
58894 + out_be32(port->utl_base + PEUTL_OPDBSZ, 0x10000000);
58895 + out_be32(port->utl_base + PEUTL_PBBSZ, 0x53000000);
58896 + out_be32(port->utl_base + PEUTL_IPHBSZ, 0x08000000);
58897 + out_be32(port->utl_base + PEUTL_IPDBSZ, 0x10000000);
58898 + out_be32(port->utl_base + PEUTL_RCIRQEN, 0x00f00000);
58899 + out_be32(port->utl_base + PEUTL_PCTL, 0x80800066);
58904 +static int ppc440speB_pciex_init_utl(struct ppc4xx_pciex_port *port)
58906 + /* Report CRS to the operating system */
58907 + out_be32(port->utl_base + PEUTL_PBCTL, 0x08000000);
58912 +static struct ppc4xx_pciex_hwops ppc440speA_pcie_hwops __initdata =
58914 + .core_init = ppc440spe_pciex_core_init,
58915 + .port_init_hw = ppc440speA_pciex_init_port_hw,
58916 + .setup_utl = ppc440speA_pciex_init_utl,
58919 +static struct ppc4xx_pciex_hwops ppc440speB_pcie_hwops __initdata =
58921 + .core_init = ppc440spe_pciex_core_init,
58922 + .port_init_hw = ppc440speB_pciex_init_port_hw,
58923 + .setup_utl = ppc440speB_pciex_init_utl,
58926 +#endif /* CONFIG_44x */
58930 +static int __init ppc405ex_pciex_core_init(struct device_node *np)
58932 + /* Nothing to do, return 2 ports */
58936 +static void ppc405ex_pcie_phy_reset(struct ppc4xx_pciex_port *port)
58938 + /* Assert the PE0_PHY reset */
58939 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01010000);
58942 + /* deassert the PE0_hotreset */
58943 + if (port->endpoint)
58944 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01111000);
58946 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01101000);
58948 + /* poll for phy !reset */
58949 + /* XXX FIXME add timeout */
58950 + while (!(mfdcri(SDR0, port->sdr_base + PESDRn_405EX_PHYSTA) & 0x00001000))
58953 + /* deassert the PE0_gpl_utl_reset */
58954 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x00101000);
58957 +static int ppc405ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58961 + if (port->endpoint)
58962 + val = PTYPE_LEGACY_ENDPOINT;
58964 + val = PTYPE_ROOT_PORT;
58966 + mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET,
58967 + 1 << 24 | val << 20 | LNKW_X1 << 12);
58969 + mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET1, 0x00000000);
58970 + mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x01010000);
58971 + mtdcri(SDR0, port->sdr_base + PESDRn_405EX_PHYSET1, 0x720F0000);
58972 + mtdcri(SDR0, port->sdr_base + PESDRn_405EX_PHYSET2, 0x70600003);
58975 + * Only reset the PHY when no link is currently established.
58976 + * This is for the Atheros PCIe board which has problems to establish
58977 + * the link (again) after this PHY reset. All other currently tested
58978 + * PCIe boards don't show this problem.
58979 + * This has to be re-tested and fixed in a later release!
58981 +#if 0 /* XXX FIXME: Not resetting the PHY will leave all resources
58982 + * configured as done previously by U-Boot. Then Linux will currently
58983 + * not reassign them. So the PHY reset is now done always. This will
58984 + * lead to problems with the Atheros PCIe board again.
58986 + val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP);
58987 + if (!(val & 0x00001000))
58988 + ppc405ex_pcie_phy_reset(port);
58990 + ppc405ex_pcie_phy_reset(port);
58993 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, 0x10000000); /* guarded on */
58995 + port->has_ibpre = 1;
59000 +static int ppc405ex_pciex_init_utl(struct ppc4xx_pciex_port *port)
59002 + dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x0);
59005 + * Set buffer allocations and then assert VRB and TXE.
59007 + out_be32(port->utl_base + PEUTL_OUTTR, 0x02000000);
59008 + out_be32(port->utl_base + PEUTL_INTR, 0x02000000);
59009 + out_be32(port->utl_base + PEUTL_OPDBSZ, 0x04000000);
59010 + out_be32(port->utl_base + PEUTL_PBBSZ, 0x21000000);
59011 + out_be32(port->utl_base + PEUTL_IPHBSZ, 0x02000000);
59012 + out_be32(port->utl_base + PEUTL_IPDBSZ, 0x04000000);
59013 + out_be32(port->utl_base + PEUTL_RCIRQEN, 0x00f00000);
59014 + out_be32(port->utl_base + PEUTL_PCTL, 0x80800066);
59016 + out_be32(port->utl_base + PEUTL_PBCTL, 0x08000000);
59021 +static struct ppc4xx_pciex_hwops ppc405ex_pcie_hwops __initdata =
59023 + .core_init = ppc405ex_pciex_core_init,
59024 + .port_init_hw = ppc405ex_pciex_init_port_hw,
59025 + .setup_utl = ppc405ex_pciex_init_utl,
59028 +#endif /* CONFIG_40x */
59031 +/* Check that the core has been initied and if not, do it */
59032 +static int __init ppc4xx_pciex_check_core_init(struct device_node *np)
59034 + static int core_init;
59035 + int count = -ENODEV;
59041 + if (of_device_is_compatible(np, "ibm,plb-pciex-440spe")) {
59042 + if (ppc440spe_revA())
59043 + ppc4xx_pciex_hwops = &ppc440speA_pcie_hwops;
59045 + ppc4xx_pciex_hwops = &ppc440speB_pcie_hwops;
59047 +#endif /* CONFIG_44x */
59049 + if (of_device_is_compatible(np, "ibm,plb-pciex-405ex"))
59050 + ppc4xx_pciex_hwops = &ppc405ex_pcie_hwops;
59052 + if (ppc4xx_pciex_hwops == NULL) {
59053 + printk(KERN_WARNING "PCIE: unknown host type %s\n",
59058 + count = ppc4xx_pciex_hwops->core_init(np);
59060 + ppc4xx_pciex_ports =
59061 + kzalloc(count * sizeof(struct ppc4xx_pciex_port),
59063 + if (ppc4xx_pciex_ports) {
59064 + ppc4xx_pciex_port_count = count;
59067 + printk(KERN_WARNING "PCIE: failed to allocate ports array\n");
59073 +static void __init ppc4xx_pciex_port_init_mapping(struct ppc4xx_pciex_port *port)
59075 + /* We map PCI Express configuration based on the reg property */
59076 + dcr_write(port->dcrs, DCRO_PEGPL_CFGBAH,
59077 + RES_TO_U32_HIGH(port->cfg_space.start));
59078 + dcr_write(port->dcrs, DCRO_PEGPL_CFGBAL,
59079 + RES_TO_U32_LOW(port->cfg_space.start));
59081 + /* XXX FIXME: Use size from reg property. For now, map 512M */
59082 + dcr_write(port->dcrs, DCRO_PEGPL_CFGMSK, 0xe0000001);
59084 + /* We map UTL registers based on the reg property */
59085 + dcr_write(port->dcrs, DCRO_PEGPL_REGBAH,
59086 + RES_TO_U32_HIGH(port->utl_regs.start));
59087 + dcr_write(port->dcrs, DCRO_PEGPL_REGBAL,
59088 + RES_TO_U32_LOW(port->utl_regs.start));
59090 + /* XXX FIXME: Use size from reg property */
59091 + dcr_write(port->dcrs, DCRO_PEGPL_REGMSK, 0x00007001);
59093 + /* Disable all other outbound windows */
59094 + dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL, 0);
59095 + dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKL, 0);
59096 + dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKL, 0);
59097 + dcr_write(port->dcrs, DCRO_PEGPL_MSGMSK, 0);
59100 +static int __init ppc4xx_pciex_wait_on_sdr(struct ppc4xx_pciex_port *port,
59101 + unsigned int sdr_offset,
59102 + unsigned int mask,
59103 + unsigned int value,
59108 + while(timeout_ms--) {
59109 + val = mfdcri(SDR0, port->sdr_base + sdr_offset);
59110 + if ((val & mask) == value) {
59111 + pr_debug("PCIE%d: Wait on SDR %x success with tm %d (%08x)\n",
59112 + port->index, sdr_offset, timeout_ms, val);
59120 +static int __init ppc4xx_pciex_port_init(struct ppc4xx_pciex_port *port)
59125 + if (ppc4xx_pciex_hwops->port_init_hw)
59126 + rc = ppc4xx_pciex_hwops->port_init_hw(port);
59130 + printk(KERN_INFO "PCIE%d: Checking link...\n",
59133 + /* Wait for reset to complete */
59134 + if (ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS, 1 << 20, 0, 10)) {
59135 + printk(KERN_WARNING "PCIE%d: PGRST failed\n",
59140 + /* Check for card presence detect if supported, if not, just wait for
59141 + * link unconditionally.
59143 + * note that we don't fail if there is no link, we just filter out
59144 + * config space accesses. That way, it will be easier to implement
59145 + * hotplug later on.
59147 + if (!port->has_ibpre ||
59148 + !ppc4xx_pciex_wait_on_sdr(port, PESDRn_LOOP,
59149 + 1 << 28, 1 << 28, 100)) {
59151 + "PCIE%d: Device detected, waiting for link...\n",
59153 + if (ppc4xx_pciex_wait_on_sdr(port, PESDRn_LOOP,
59154 + 0x1000, 0x1000, 2000))
59155 + printk(KERN_WARNING
59156 + "PCIE%d: Link up failed\n", port->index);
59159 + "PCIE%d: link is up !\n", port->index);
59163 + printk(KERN_INFO "PCIE%d: No device detected.\n", port->index);
59166 + * Initialize mapping: disable all regions and configure
59167 + * CFG and REG regions based on resources in the device tree
59169 + ppc4xx_pciex_port_init_mapping(port);
59174 + port->utl_base = ioremap(port->utl_regs.start, 0x100);
59175 + BUG_ON(port->utl_base == NULL);
59178 + * Setup UTL registers --BenH.
59180 + if (ppc4xx_pciex_hwops->setup_utl)
59181 + ppc4xx_pciex_hwops->setup_utl(port);
59184 + * Check for VC0 active and assert RDY.
59186 + if (port->link &&
59187 + ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS,
59188 + 1 << 16, 1 << 16, 5000)) {
59189 + printk(KERN_INFO "PCIE%d: VC0 not active\n", port->index);
59193 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
59194 + mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) | 1 << 20);
59200 +static int ppc4xx_pciex_validate_bdf(struct ppc4xx_pciex_port *port,
59201 + struct pci_bus *bus,
59202 + unsigned int devfn)
59204 + static int message;
59206 + /* Endpoint can not generate upstream(remote) config cycles */
59207 + if (port->endpoint && bus->number != port->hose->first_busno)
59208 + return PCIBIOS_DEVICE_NOT_FOUND;
59210 + /* Check we are within the mapped range */
59211 + if (bus->number > port->hose->last_busno) {
59213 + printk(KERN_WARNING "Warning! Probing bus %u"
59214 + " out of range !\n", bus->number);
59217 + return PCIBIOS_DEVICE_NOT_FOUND;
59220 + /* The root complex has only one device / function */
59221 + if (bus->number == port->hose->first_busno && devfn != 0)
59222 + return PCIBIOS_DEVICE_NOT_FOUND;
59224 + /* The other side of the RC has only one device as well */
59225 + if (bus->number == (port->hose->first_busno + 1) &&
59226 + PCI_SLOT(devfn) != 0)
59227 + return PCIBIOS_DEVICE_NOT_FOUND;
59229 + /* Check if we have a link */
59230 + if ((bus->number != port->hose->first_busno) && !port->link)
59231 + return PCIBIOS_DEVICE_NOT_FOUND;
59236 +static void __iomem *ppc4xx_pciex_get_config_base(struct ppc4xx_pciex_port *port,
59237 + struct pci_bus *bus,
59238 + unsigned int devfn)
59242 + /* Remove the casts when we finally remove the stupid volatile
59243 + * in struct pci_controller
59245 + if (bus->number == port->hose->first_busno)
59246 + return (void __iomem *)port->hose->cfg_addr;
59248 + relbus = bus->number - (port->hose->first_busno + 1);
59249 + return (void __iomem *)port->hose->cfg_data +
59250 + ((relbus << 20) | (devfn << 12));
59253 +static int ppc4xx_pciex_read_config(struct pci_bus *bus, unsigned int devfn,
59254 + int offset, int len, u32 *val)
59256 + struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
59257 + struct ppc4xx_pciex_port *port =
59258 + &ppc4xx_pciex_ports[hose->indirect_type];
59259 + void __iomem *addr;
59262 + BUG_ON(hose != port->hose);
59264 + if (ppc4xx_pciex_validate_bdf(port, bus, devfn) != 0)
59265 + return PCIBIOS_DEVICE_NOT_FOUND;
59267 + addr = ppc4xx_pciex_get_config_base(port, bus, devfn);
59270 + * Reading from configuration space of non-existing device can
59271 + * generate transaction errors. For the read duration we suppress
59272 + * assertion of machine check exceptions to avoid those.
59274 + gpl_cfg = dcr_read(port->dcrs, DCRO_PEGPL_CFG);
59275 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg | GPL_DMER_MASK_DISA);
59277 + /* Make sure no CRS is recorded */
59278 + out_be32(port->utl_base + PEUTL_RCSTA, 0x00040000);
59282 + *val = in_8((u8 *)(addr + offset));
59285 + *val = in_le16((u16 *)(addr + offset));
59288 + *val = in_le32((u32 *)(addr + offset));
59292 + pr_debug("pcie-config-read: bus=%3d [%3d..%3d] devfn=0x%04x"
59293 + " offset=0x%04x len=%d, addr=0x%p val=0x%08x\n",
59294 + bus->number, hose->first_busno, hose->last_busno,
59295 + devfn, offset, len, addr + offset, *val);
59297 + /* Check for CRS (440SPe rev B does that for us but heh ..) */
59298 + if (in_be32(port->utl_base + PEUTL_RCSTA) & 0x00040000) {
59299 + pr_debug("Got CRS !\n");
59300 + if (len != 4 || offset != 0)
59301 + return PCIBIOS_DEVICE_NOT_FOUND;
59302 + *val = 0xffff0001;
59305 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg);
59307 + return PCIBIOS_SUCCESSFUL;
59310 +static int ppc4xx_pciex_write_config(struct pci_bus *bus, unsigned int devfn,
59311 + int offset, int len, u32 val)
59313 + struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
59314 + struct ppc4xx_pciex_port *port =
59315 + &ppc4xx_pciex_ports[hose->indirect_type];
59316 + void __iomem *addr;
59319 + if (ppc4xx_pciex_validate_bdf(port, bus, devfn) != 0)
59320 + return PCIBIOS_DEVICE_NOT_FOUND;
59322 + addr = ppc4xx_pciex_get_config_base(port, bus, devfn);
59325 + * Reading from configuration space of non-existing device can
59326 + * generate transaction errors. For the read duration we suppress
59327 + * assertion of machine check exceptions to avoid those.
59329 + gpl_cfg = dcr_read(port->dcrs, DCRO_PEGPL_CFG);
59330 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg | GPL_DMER_MASK_DISA);
59332 + pr_debug("pcie-config-write: bus=%3d [%3d..%3d] devfn=0x%04x"
59333 + " offset=0x%04x len=%d, addr=0x%p val=0x%08x\n",
59334 + bus->number, hose->first_busno, hose->last_busno,
59335 + devfn, offset, len, addr + offset, val);
59339 + out_8((u8 *)(addr + offset), val);
59342 + out_le16((u16 *)(addr + offset), val);
59345 + out_le32((u32 *)(addr + offset), val);
59349 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg);
59351 + return PCIBIOS_SUCCESSFUL;
59354 +static struct pci_ops ppc4xx_pciex_pci_ops =
59356 + .read = ppc4xx_pciex_read_config,
59357 + .write = ppc4xx_pciex_write_config,
59360 +static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port,
59361 + struct pci_controller *hose,
59362 + void __iomem *mbase)
59364 + u32 lah, lal, pciah, pcial, sa;
59367 + /* Setup outbound memory windows */
59368 + for (i = j = 0; i < 3; i++) {
59369 + struct resource *res = &hose->mem_resources[i];
59371 + /* we only care about memory windows */
59372 + if (!(res->flags & IORESOURCE_MEM))
59375 + printk(KERN_WARNING "%s: Too many ranges\n",
59376 + port->node->full_name);
59380 + /* Calculate register values */
59381 + lah = RES_TO_U32_HIGH(res->start);
59382 + lal = RES_TO_U32_LOW(res->start);
59383 + pciah = RES_TO_U32_HIGH(res->start - hose->pci_mem_offset);
59384 + pcial = RES_TO_U32_LOW(res->start - hose->pci_mem_offset);
59385 + sa = res->end + 1 - res->start;
59386 + if (!is_power_of_2(sa) || sa < 0x100000 ||
59387 + sa > 0xffffffffu) {
59388 + printk(KERN_WARNING "%s: Resource out of range\n",
59389 + port->node->full_name);
59392 + sa = (0xffffffffu << ilog2(sa)) | 0x1;
59394 + /* Program register values */
59397 + out_le32(mbase + PECFG_POM0LAH, pciah);
59398 + out_le32(mbase + PECFG_POM0LAL, pcial);
59399 + dcr_write(port->dcrs, DCRO_PEGPL_OMR1BAH, lah);
59400 + dcr_write(port->dcrs, DCRO_PEGPL_OMR1BAL, lal);
59401 + dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKH, 0x7fffffff);
59402 + dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL, sa | 3);
59405 + out_le32(mbase + PECFG_POM1LAH, pciah);
59406 + out_le32(mbase + PECFG_POM1LAL, pcial);
59407 + dcr_write(port->dcrs, DCRO_PEGPL_OMR2BAH, lah);
59408 + dcr_write(port->dcrs, DCRO_PEGPL_OMR2BAL, lal);
59409 + dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKH, 0x7fffffff);
59410 + dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKL, sa | 3);
59416 + /* Configure IO, always 64K starting at 0 */
59417 + if (hose->io_resource.flags & IORESOURCE_IO) {
59418 + lah = RES_TO_U32_HIGH(hose->io_base_phys);
59419 + lal = RES_TO_U32_LOW(hose->io_base_phys);
59420 + out_le32(mbase + PECFG_POM2LAH, 0);
59421 + out_le32(mbase + PECFG_POM2LAL, 0);
59422 + dcr_write(port->dcrs, DCRO_PEGPL_OMR3BAH, lah);
59423 + dcr_write(port->dcrs, DCRO_PEGPL_OMR3BAL, lal);
59424 + dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKH, 0x7fffffff);
59425 + dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKL, 0xffff0000 | 3);
59429 +static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port,
59430 + struct pci_controller *hose,
59431 + void __iomem *mbase,
59432 + struct resource *res)
59434 + resource_size_t size = res->end - res->start + 1;
59437 + /* Calculate window size */
59438 + sa = (0xffffffffffffffffull << ilog2(size));;
59439 + if (res->flags & IORESOURCE_PREFETCH)
59442 + out_le32(mbase + PECFG_BAR0HMPA, RES_TO_U32_HIGH(sa));
59443 + out_le32(mbase + PECFG_BAR0LMPA, RES_TO_U32_LOW(sa));
59445 + /* The setup of the split looks weird to me ... let's see if it works */
59446 + out_le32(mbase + PECFG_PIM0LAL, 0x00000000);
59447 + out_le32(mbase + PECFG_PIM0LAH, 0x00000000);
59448 + out_le32(mbase + PECFG_PIM1LAL, 0x00000000);
59449 + out_le32(mbase + PECFG_PIM1LAH, 0x00000000);
59450 + out_le32(mbase + PECFG_PIM01SAH, 0xffff0000);
59451 + out_le32(mbase + PECFG_PIM01SAL, 0x00000000);
59453 + /* Enable inbound mapping */
59454 + out_le32(mbase + PECFG_PIMEN, 0x1);
59456 + out_le32(mbase + PCI_BASE_ADDRESS_0, RES_TO_U32_LOW(res->start));
59457 + out_le32(mbase + PCI_BASE_ADDRESS_1, RES_TO_U32_HIGH(res->start));
59459 + /* Enable I/O, Mem, and Busmaster cycles */
59460 + out_le16(mbase + PCI_COMMAND,
59461 + in_le16(mbase + PCI_COMMAND) |
59462 + PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
59465 +static void __init ppc4xx_pciex_port_setup_hose(struct ppc4xx_pciex_port *port)
59467 + struct resource dma_window;
59468 + struct pci_controller *hose = NULL;
59469 + const int *bus_range;
59470 + int primary = 0, busses;
59471 + void __iomem *mbase = NULL, *cfg_data = NULL;
59473 + /* XXX FIXME: Handle endpoint mode properly */
59474 + if (port->endpoint) {
59475 + printk(KERN_WARNING "PCIE%d: Port in endpoint mode !\n",
59480 + /* Check if primary bridge */
59481 + if (of_get_property(port->node, "primary", NULL))
59484 + /* Get bus range if any */
59485 + bus_range = of_get_property(port->node, "bus-range", NULL);
59487 + /* Allocate the host controller data structure */
59488 + hose = pcibios_alloc_controller(port->node);
59492 + /* We stick the port number in "indirect_type" so the config space
59493 + * ops can retrieve the port data structure easily
59495 + hose->indirect_type = port->index;
59497 + /* Get bus range */
59498 + hose->first_busno = bus_range ? bus_range[0] : 0x0;
59499 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
59501 + /* Because of how big mapping the config space is (1M per bus), we
59502 + * limit how many busses we support. In the long run, we could replace
59503 + * that with something akin to kmap_atomic instead. We set aside 1 bus
59504 + * for the host itself too.
59506 + busses = hose->last_busno - hose->first_busno; /* This is off by 1 */
59507 + if (busses > MAX_PCIE_BUS_MAPPED) {
59508 + busses = MAX_PCIE_BUS_MAPPED;
59509 + hose->last_busno = hose->first_busno + busses;
59512 + /* We map the external config space in cfg_data and the host config
59513 + * space in cfg_addr. External space is 1M per bus, internal space
59516 + cfg_data = ioremap(port->cfg_space.start +
59517 + (hose->first_busno + 1) * 0x100000,
59518 + busses * 0x100000);
59519 + mbase = ioremap(port->cfg_space.start + 0x10000000, 0x1000);
59520 + if (cfg_data == NULL || mbase == NULL) {
59521 + printk(KERN_ERR "%s: Can't map config space !",
59522 + port->node->full_name);
59526 + hose->cfg_data = cfg_data;
59527 + hose->cfg_addr = mbase;
59529 + pr_debug("PCIE %s, bus %d..%d\n", port->node->full_name,
59530 + hose->first_busno, hose->last_busno);
59531 + pr_debug(" config space mapped at: root @0x%p, other @0x%p\n",
59532 + hose->cfg_addr, hose->cfg_data);
59534 + /* Setup config space */
59535 + hose->ops = &ppc4xx_pciex_pci_ops;
59536 + port->hose = hose;
59537 + mbase = (void __iomem *)hose->cfg_addr;
59540 + * Set bus numbers on our root port
59542 + out_8(mbase + PCI_PRIMARY_BUS, hose->first_busno);
59543 + out_8(mbase + PCI_SECONDARY_BUS, hose->first_busno + 1);
59544 + out_8(mbase + PCI_SUBORDINATE_BUS, hose->last_busno);
59547 + * OMRs are already reset, also disable PIMs
59549 + out_le32(mbase + PECFG_PIMEN, 0);
59551 + /* Parse outbound mapping resources */
59552 + pci_process_bridge_OF_ranges(hose, port->node, primary);
59554 + /* Parse inbound mapping resources */
59555 + if (ppc4xx_parse_dma_ranges(hose, mbase, &dma_window) != 0)
59558 + /* Configure outbound ranges POMs */
59559 + ppc4xx_configure_pciex_POMs(port, hose, mbase);
59561 + /* Configure inbound ranges PIMs */
59562 + ppc4xx_configure_pciex_PIMs(port, hose, mbase, &dma_window);
59564 + /* The root complex doesn't show up if we don't set some vendor
59565 + * and device IDs into it. Those are the same bogus one that the
59566 + * initial code in arch/ppc add. We might want to change that.
59568 + out_le16(mbase + 0x200, 0xaaa0 + port->index);
59569 + out_le16(mbase + 0x202, 0xbed0 + port->index);
59571 + /* Set Class Code to PCI-PCI bridge and Revision Id to 1 */
59572 + out_le32(mbase + 0x208, 0x06040001);
59574 + printk(KERN_INFO "PCIE%d: successfully set as root-complex\n",
59579 + pcibios_free_controller(hose);
59581 + iounmap(cfg_data);
59586 +static void __init ppc4xx_probe_pciex_bridge(struct device_node *np)
59588 + struct ppc4xx_pciex_port *port;
59591 + unsigned int dcrs;
59593 + /* First, proceed to core initialization as we assume there's
59594 + * only one PCIe core in the system
59596 + if (ppc4xx_pciex_check_core_init(np))
59599 + /* Get the port number from the device-tree */
59600 + pval = of_get_property(np, "port", NULL);
59601 + if (pval == NULL) {
59602 + printk(KERN_ERR "PCIE: Can't find port number for %s\n",
59607 + if (portno >= ppc4xx_pciex_port_count) {
59608 + printk(KERN_ERR "PCIE: port number out of range for %s\n",
59612 + port = &ppc4xx_pciex_ports[portno];
59613 + port->index = portno;
59614 + port->node = of_node_get(np);
59615 + pval = of_get_property(np, "sdr-base", NULL);
59616 + if (pval == NULL) {
59617 + printk(KERN_ERR "PCIE: missing sdr-base for %s\n",
59621 + port->sdr_base = *pval;
59623 + /* XXX Currently, we only support root complex mode */
59624 + port->endpoint = 0;
59626 + /* Fetch config space registers address */
59627 + if (of_address_to_resource(np, 0, &port->cfg_space)) {
59628 + printk(KERN_ERR "%s: Can't get PCI-E config space !",
59632 + /* Fetch host bridge internal registers address */
59633 + if (of_address_to_resource(np, 1, &port->utl_regs)) {
59634 + printk(KERN_ERR "%s: Can't get UTL register base !",
59640 + dcrs = dcr_resource_start(np, 0);
59642 + printk(KERN_ERR "%s: Can't get DCR register base !",
59646 + port->dcrs = dcr_map(np, dcrs, dcr_resource_len(np, 0));
59648 + /* Initialize the port specific registers */
59649 + if (ppc4xx_pciex_port_init(port)) {
59650 + printk(KERN_WARNING "PCIE%d: Port init failed\n", port->index);
59654 + /* Setup the linux hose data structure */
59655 + ppc4xx_pciex_port_setup_hose(port);
59658 +#endif /* CONFIG_PPC4xx_PCI_EXPRESS */
59660 +static int __init ppc4xx_pci_find_bridges(void)
59662 + struct device_node *np;
59664 +#ifdef CONFIG_PPC4xx_PCI_EXPRESS
59665 + for_each_compatible_node(np, NULL, "ibm,plb-pciex")
59666 + ppc4xx_probe_pciex_bridge(np);
59668 + for_each_compatible_node(np, NULL, "ibm,plb-pcix")
59669 + ppc4xx_probe_pcix_bridge(np);
59670 + for_each_compatible_node(np, NULL, "ibm,plb-pci")
59671 + ppc4xx_probe_pci_bridge(np);
59675 +arch_initcall(ppc4xx_pci_find_bridges);
59677 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/ppc4xx_pci.h powerpc.git/arch/powerpc/sysdev/ppc4xx_pci.h
59678 --- linux-2.6.24/arch/powerpc/sysdev/ppc4xx_pci.h 1970-01-01 01:00:00.000000000 +0100
59679 +++ powerpc.git/arch/powerpc/sysdev/ppc4xx_pci.h 2008-01-28 20:25:49.000000000 +0100
59682 + * PCI / PCI-X / PCI-Express support for 4xx parts
59684 + * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
59686 + * Bits and pieces extracted from arch/ppc support by
59688 + * Matt Porter <mporter@kernel.crashing.org>
59690 + * Copyright 2002-2005 MontaVista Software Inc.
59692 +#ifndef __PPC4XX_PCI_H__
59693 +#define __PPC4XX_PCI_H__
59696 + * 4xx PCI-X bridge register definitions
59698 +#define PCIX0_VENDID 0x000
59699 +#define PCIX0_DEVID 0x002
59700 +#define PCIX0_COMMAND 0x004
59701 +#define PCIX0_STATUS 0x006
59702 +#define PCIX0_REVID 0x008
59703 +#define PCIX0_CLS 0x009
59704 +#define PCIX0_CACHELS 0x00c
59705 +#define PCIX0_LATTIM 0x00d
59706 +#define PCIX0_HDTYPE 0x00e
59707 +#define PCIX0_BIST 0x00f
59708 +#define PCIX0_BAR0L 0x010
59709 +#define PCIX0_BAR0H 0x014
59710 +#define PCIX0_BAR1 0x018
59711 +#define PCIX0_BAR2L 0x01c
59712 +#define PCIX0_BAR2H 0x020
59713 +#define PCIX0_BAR3 0x024
59714 +#define PCIX0_CISPTR 0x028
59715 +#define PCIX0_SBSYSVID 0x02c
59716 +#define PCIX0_SBSYSID 0x02e
59717 +#define PCIX0_EROMBA 0x030
59718 +#define PCIX0_CAP 0x034
59719 +#define PCIX0_RES0 0x035
59720 +#define PCIX0_RES1 0x036
59721 +#define PCIX0_RES2 0x038
59722 +#define PCIX0_INTLN 0x03c
59723 +#define PCIX0_INTPN 0x03d
59724 +#define PCIX0_MINGNT 0x03e
59725 +#define PCIX0_MAXLTNCY 0x03f
59726 +#define PCIX0_BRDGOPT1 0x040
59727 +#define PCIX0_BRDGOPT2 0x044
59728 +#define PCIX0_ERREN 0x050
59729 +#define PCIX0_ERRSTS 0x054
59730 +#define PCIX0_PLBBESR 0x058
59731 +#define PCIX0_PLBBEARL 0x05c
59732 +#define PCIX0_PLBBEARH 0x060
59733 +#define PCIX0_POM0LAL 0x068
59734 +#define PCIX0_POM0LAH 0x06c
59735 +#define PCIX0_POM0SA 0x070
59736 +#define PCIX0_POM0PCIAL 0x074
59737 +#define PCIX0_POM0PCIAH 0x078
59738 +#define PCIX0_POM1LAL 0x07c
59739 +#define PCIX0_POM1LAH 0x080
59740 +#define PCIX0_POM1SA 0x084
59741 +#define PCIX0_POM1PCIAL 0x088
59742 +#define PCIX0_POM1PCIAH 0x08c
59743 +#define PCIX0_POM2SA 0x090
59744 +#define PCIX0_PIM0SAL 0x098
59745 +#define PCIX0_PIM0SA PCIX0_PIM0SAL
59746 +#define PCIX0_PIM0LAL 0x09c
59747 +#define PCIX0_PIM0LAH 0x0a0
59748 +#define PCIX0_PIM1SA 0x0a4
59749 +#define PCIX0_PIM1LAL 0x0a8
59750 +#define PCIX0_PIM1LAH 0x0ac
59751 +#define PCIX0_PIM2SAL 0x0b0
59752 +#define PCIX0_PIM2SA PCIX0_PIM2SAL
59753 +#define PCIX0_PIM2LAL 0x0b4
59754 +#define PCIX0_PIM2LAH 0x0b8
59755 +#define PCIX0_OMCAPID 0x0c0
59756 +#define PCIX0_OMNIPTR 0x0c1
59757 +#define PCIX0_OMMC 0x0c2
59758 +#define PCIX0_OMMA 0x0c4
59759 +#define PCIX0_OMMUA 0x0c8
59760 +#define PCIX0_OMMDATA 0x0cc
59761 +#define PCIX0_OMMEOI 0x0ce
59762 +#define PCIX0_PMCAPID 0x0d0
59763 +#define PCIX0_PMNIPTR 0x0d1
59764 +#define PCIX0_PMC 0x0d2
59765 +#define PCIX0_PMCSR 0x0d4
59766 +#define PCIX0_PMCSRBSE 0x0d6
59767 +#define PCIX0_PMDATA 0x0d7
59768 +#define PCIX0_PMSCRR 0x0d8
59769 +#define PCIX0_CAPID 0x0dc
59770 +#define PCIX0_NIPTR 0x0dd
59771 +#define PCIX0_CMD 0x0de
59772 +#define PCIX0_STS 0x0e0
59773 +#define PCIX0_IDR 0x0e4
59774 +#define PCIX0_CID 0x0e8
59775 +#define PCIX0_RID 0x0ec
59776 +#define PCIX0_PIM0SAH 0x0f8
59777 +#define PCIX0_PIM2SAH 0x0fc
59778 +#define PCIX0_MSGIL 0x100
59779 +#define PCIX0_MSGIH 0x104
59780 +#define PCIX0_MSGOL 0x108
59781 +#define PCIX0_MSGOH 0x10c
59782 +#define PCIX0_IM 0x1f8
59785 + * 4xx PCI bridge register definitions
59787 +#define PCIL0_PMM0LA 0x00
59788 +#define PCIL0_PMM0MA 0x04
59789 +#define PCIL0_PMM0PCILA 0x08
59790 +#define PCIL0_PMM0PCIHA 0x0c
59791 +#define PCIL0_PMM1LA 0x10
59792 +#define PCIL0_PMM1MA 0x14
59793 +#define PCIL0_PMM1PCILA 0x18
59794 +#define PCIL0_PMM1PCIHA 0x1c
59795 +#define PCIL0_PMM2LA 0x20
59796 +#define PCIL0_PMM2MA 0x24
59797 +#define PCIL0_PMM2PCILA 0x28
59798 +#define PCIL0_PMM2PCIHA 0x2c
59799 +#define PCIL0_PTM1MS 0x30
59800 +#define PCIL0_PTM1LA 0x34
59801 +#define PCIL0_PTM2MS 0x38
59802 +#define PCIL0_PTM2LA 0x3c
59805 + * 4xx PCIe bridge register definitions
59809 +#define DCRO_PEGPL_CFGBAH 0x00
59810 +#define DCRO_PEGPL_CFGBAL 0x01
59811 +#define DCRO_PEGPL_CFGMSK 0x02
59812 +#define DCRO_PEGPL_MSGBAH 0x03
59813 +#define DCRO_PEGPL_MSGBAL 0x04
59814 +#define DCRO_PEGPL_MSGMSK 0x05
59815 +#define DCRO_PEGPL_OMR1BAH 0x06
59816 +#define DCRO_PEGPL_OMR1BAL 0x07
59817 +#define DCRO_PEGPL_OMR1MSKH 0x08
59818 +#define DCRO_PEGPL_OMR1MSKL 0x09
59819 +#define DCRO_PEGPL_OMR2BAH 0x0a
59820 +#define DCRO_PEGPL_OMR2BAL 0x0b
59821 +#define DCRO_PEGPL_OMR2MSKH 0x0c
59822 +#define DCRO_PEGPL_OMR2MSKL 0x0d
59823 +#define DCRO_PEGPL_OMR3BAH 0x0e
59824 +#define DCRO_PEGPL_OMR3BAL 0x0f
59825 +#define DCRO_PEGPL_OMR3MSKH 0x10
59826 +#define DCRO_PEGPL_OMR3MSKL 0x11
59827 +#define DCRO_PEGPL_REGBAH 0x12
59828 +#define DCRO_PEGPL_REGBAL 0x13
59829 +#define DCRO_PEGPL_REGMSK 0x14
59830 +#define DCRO_PEGPL_SPECIAL 0x15
59831 +#define DCRO_PEGPL_CFG 0x16
59832 +#define DCRO_PEGPL_ESR 0x17
59833 +#define DCRO_PEGPL_EARH 0x18
59834 +#define DCRO_PEGPL_EARL 0x19
59835 +#define DCRO_PEGPL_EATR 0x1a
59838 +#define GPL_DMER_MASK_DISA 0x02000000
59841 + * System DCRs (SDRs)
59843 +#define PESDR0_PLLLCT1 0x03a0
59844 +#define PESDR0_PLLLCT2 0x03a1
59845 +#define PESDR0_PLLLCT3 0x03a2
59848 + * 440SPe additional DCRs
59850 +#define PESDR0_440SPE_UTLSET1 0x0300
59851 +#define PESDR0_440SPE_UTLSET2 0x0301
59852 +#define PESDR0_440SPE_DLPSET 0x0302
59853 +#define PESDR0_440SPE_LOOP 0x0303
59854 +#define PESDR0_440SPE_RCSSET 0x0304
59855 +#define PESDR0_440SPE_RCSSTS 0x0305
59856 +#define PESDR0_440SPE_HSSL0SET1 0x0306
59857 +#define PESDR0_440SPE_HSSL0SET2 0x0307
59858 +#define PESDR0_440SPE_HSSL0STS 0x0308
59859 +#define PESDR0_440SPE_HSSL1SET1 0x0309
59860 +#define PESDR0_440SPE_HSSL1SET2 0x030a
59861 +#define PESDR0_440SPE_HSSL1STS 0x030b
59862 +#define PESDR0_440SPE_HSSL2SET1 0x030c
59863 +#define PESDR0_440SPE_HSSL2SET2 0x030d
59864 +#define PESDR0_440SPE_HSSL2STS 0x030e
59865 +#define PESDR0_440SPE_HSSL3SET1 0x030f
59866 +#define PESDR0_440SPE_HSSL3SET2 0x0310
59867 +#define PESDR0_440SPE_HSSL3STS 0x0311
59868 +#define PESDR0_440SPE_HSSL4SET1 0x0312
59869 +#define PESDR0_440SPE_HSSL4SET2 0x0313
59870 +#define PESDR0_440SPE_HSSL4STS 0x0314
59871 +#define PESDR0_440SPE_HSSL5SET1 0x0315
59872 +#define PESDR0_440SPE_HSSL5SET2 0x0316
59873 +#define PESDR0_440SPE_HSSL5STS 0x0317
59874 +#define PESDR0_440SPE_HSSL6SET1 0x0318
59875 +#define PESDR0_440SPE_HSSL6SET2 0x0319
59876 +#define PESDR0_440SPE_HSSL6STS 0x031a
59877 +#define PESDR0_440SPE_HSSL7SET1 0x031b
59878 +#define PESDR0_440SPE_HSSL7SET2 0x031c
59879 +#define PESDR0_440SPE_HSSL7STS 0x031d
59880 +#define PESDR0_440SPE_HSSCTLSET 0x031e
59881 +#define PESDR0_440SPE_LANE_ABCD 0x031f
59882 +#define PESDR0_440SPE_LANE_EFGH 0x0320
59884 +#define PESDR1_440SPE_UTLSET1 0x0340
59885 +#define PESDR1_440SPE_UTLSET2 0x0341
59886 +#define PESDR1_440SPE_DLPSET 0x0342
59887 +#define PESDR1_440SPE_LOOP 0x0343
59888 +#define PESDR1_440SPE_RCSSET 0x0344
59889 +#define PESDR1_440SPE_RCSSTS 0x0345
59890 +#define PESDR1_440SPE_HSSL0SET1 0x0346
59891 +#define PESDR1_440SPE_HSSL0SET2 0x0347
59892 +#define PESDR1_440SPE_HSSL0STS 0x0348
59893 +#define PESDR1_440SPE_HSSL1SET1 0x0349
59894 +#define PESDR1_440SPE_HSSL1SET2 0x034a
59895 +#define PESDR1_440SPE_HSSL1STS 0x034b
59896 +#define PESDR1_440SPE_HSSL2SET1 0x034c
59897 +#define PESDR1_440SPE_HSSL2SET2 0x034d
59898 +#define PESDR1_440SPE_HSSL2STS 0x034e
59899 +#define PESDR1_440SPE_HSSL3SET1 0x034f
59900 +#define PESDR1_440SPE_HSSL3SET2 0x0350
59901 +#define PESDR1_440SPE_HSSL3STS 0x0351
59902 +#define PESDR1_440SPE_HSSCTLSET 0x0352
59903 +#define PESDR1_440SPE_LANE_ABCD 0x0353
59905 +#define PESDR2_440SPE_UTLSET1 0x0370
59906 +#define PESDR2_440SPE_UTLSET2 0x0371
59907 +#define PESDR2_440SPE_DLPSET 0x0372
59908 +#define PESDR2_440SPE_LOOP 0x0373
59909 +#define PESDR2_440SPE_RCSSET 0x0374
59910 +#define PESDR2_440SPE_RCSSTS 0x0375
59911 +#define PESDR2_440SPE_HSSL0SET1 0x0376
59912 +#define PESDR2_440SPE_HSSL0SET2 0x0377
59913 +#define PESDR2_440SPE_HSSL0STS 0x0378
59914 +#define PESDR2_440SPE_HSSL1SET1 0x0379
59915 +#define PESDR2_440SPE_HSSL1SET2 0x037a
59916 +#define PESDR2_440SPE_HSSL1STS 0x037b
59917 +#define PESDR2_440SPE_HSSL2SET1 0x037c
59918 +#define PESDR2_440SPE_HSSL2SET2 0x037d
59919 +#define PESDR2_440SPE_HSSL2STS 0x037e
59920 +#define PESDR2_440SPE_HSSL3SET1 0x037f
59921 +#define PESDR2_440SPE_HSSL3SET2 0x0380
59922 +#define PESDR2_440SPE_HSSL3STS 0x0381
59923 +#define PESDR2_440SPE_HSSCTLSET 0x0382
59924 +#define PESDR2_440SPE_LANE_ABCD 0x0383
59927 + * 405EX additional DCRs
59929 +#define PESDR0_405EX_UTLSET1 0x0400
59930 +#define PESDR0_405EX_UTLSET2 0x0401
59931 +#define PESDR0_405EX_DLPSET 0x0402
59932 +#define PESDR0_405EX_LOOP 0x0403
59933 +#define PESDR0_405EX_RCSSET 0x0404
59934 +#define PESDR0_405EX_RCSSTS 0x0405
59935 +#define PESDR0_405EX_PHYSET1 0x0406
59936 +#define PESDR0_405EX_PHYSET2 0x0407
59937 +#define PESDR0_405EX_BIST 0x0408
59938 +#define PESDR0_405EX_LPB 0x040B
59939 +#define PESDR0_405EX_PHYSTA 0x040C
59941 +#define PESDR1_405EX_UTLSET1 0x0440
59942 +#define PESDR1_405EX_UTLSET2 0x0441
59943 +#define PESDR1_405EX_DLPSET 0x0442
59944 +#define PESDR1_405EX_LOOP 0x0443
59945 +#define PESDR1_405EX_RCSSET 0x0444
59946 +#define PESDR1_405EX_RCSSTS 0x0445
59947 +#define PESDR1_405EX_PHYSET1 0x0446
59948 +#define PESDR1_405EX_PHYSET2 0x0447
59949 +#define PESDR1_405EX_BIST 0x0448
59950 +#define PESDR1_405EX_LPB 0x044B
59951 +#define PESDR1_405EX_PHYSTA 0x044C
59954 + * Of the above, some are common offsets from the base
59956 +#define PESDRn_UTLSET1 0x00
59957 +#define PESDRn_UTLSET2 0x01
59958 +#define PESDRn_DLPSET 0x02
59959 +#define PESDRn_LOOP 0x03
59960 +#define PESDRn_RCSSET 0x04
59961 +#define PESDRn_RCSSTS 0x05
59964 +#define PESDRn_440SPE_HSSL0SET1 0x06
59965 +#define PESDRn_440SPE_HSSL0SET2 0x07
59966 +#define PESDRn_440SPE_HSSL0STS 0x08
59967 +#define PESDRn_440SPE_HSSL1SET1 0x09
59968 +#define PESDRn_440SPE_HSSL1SET2 0x0a
59969 +#define PESDRn_440SPE_HSSL1STS 0x0b
59970 +#define PESDRn_440SPE_HSSL2SET1 0x0c
59971 +#define PESDRn_440SPE_HSSL2SET2 0x0d
59972 +#define PESDRn_440SPE_HSSL2STS 0x0e
59973 +#define PESDRn_440SPE_HSSL3SET1 0x0f
59974 +#define PESDRn_440SPE_HSSL3SET2 0x10
59975 +#define PESDRn_440SPE_HSSL3STS 0x11
59977 +/* 440spe port 0 only */
59978 +#define PESDRn_440SPE_HSSL4SET1 0x12
59979 +#define PESDRn_440SPE_HSSL4SET2 0x13
59980 +#define PESDRn_440SPE_HSSL4STS 0x14
59981 +#define PESDRn_440SPE_HSSL5SET1 0x15
59982 +#define PESDRn_440SPE_HSSL5SET2 0x16
59983 +#define PESDRn_440SPE_HSSL5STS 0x17
59984 +#define PESDRn_440SPE_HSSL6SET1 0x18
59985 +#define PESDRn_440SPE_HSSL6SET2 0x19
59986 +#define PESDRn_440SPE_HSSL6STS 0x1a
59987 +#define PESDRn_440SPE_HSSL7SET1 0x1b
59988 +#define PESDRn_440SPE_HSSL7SET2 0x1c
59989 +#define PESDRn_440SPE_HSSL7STS 0x1d
59992 +#define PESDRn_405EX_PHYSET1 0x06
59993 +#define PESDRn_405EX_PHYSET2 0x07
59994 +#define PESDRn_405EX_PHYSTA 0x0c
59997 + * UTL register offsets
59999 +#define PEUTL_PBCTL 0x00
60000 +#define PEUTL_PBBSZ 0x20
60001 +#define PEUTL_OPDBSZ 0x68
60002 +#define PEUTL_IPHBSZ 0x70
60003 +#define PEUTL_IPDBSZ 0x78
60004 +#define PEUTL_OUTTR 0x90
60005 +#define PEUTL_INTR 0x98
60006 +#define PEUTL_PCTL 0xa0
60007 +#define PEUTL_RCSTA 0xB0
60008 +#define PEUTL_RCIRQEN 0xb8
60011 + * Config space register offsets
60013 +#define PECFG_ECRTCTL 0x074
60015 +#define PECFG_BAR0LMPA 0x210
60016 +#define PECFG_BAR0HMPA 0x214
60017 +#define PECFG_BAR1MPA 0x218
60018 +#define PECFG_BAR2LMPA 0x220
60019 +#define PECFG_BAR2HMPA 0x224
60021 +#define PECFG_PIMEN 0x33c
60022 +#define PECFG_PIM0LAL 0x340
60023 +#define PECFG_PIM0LAH 0x344
60024 +#define PECFG_PIM1LAL 0x348
60025 +#define PECFG_PIM1LAH 0x34c
60026 +#define PECFG_PIM01SAL 0x350
60027 +#define PECFG_PIM01SAH 0x354
60029 +#define PECFG_POM0LAL 0x380
60030 +#define PECFG_POM0LAH 0x384
60031 +#define PECFG_POM1LAL 0x388
60032 +#define PECFG_POM1LAH 0x38c
60033 +#define PECFG_POM2LAL 0x390
60034 +#define PECFG_POM2LAH 0x394
60039 + PTYPE_ENDPOINT = 0x0,
60040 + PTYPE_LEGACY_ENDPOINT = 0x1,
60041 + PTYPE_ROOT_PORT = 0x4,
60049 +#endif /* __PPC4XX_PCI_H__ */
60050 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/qe_lib/Kconfig powerpc.git/arch/powerpc/sysdev/qe_lib/Kconfig
60051 --- linux-2.6.24/arch/powerpc/sysdev/qe_lib/Kconfig 2008-01-24 23:58:37.000000000 +0100
60052 +++ powerpc.git/arch/powerpc/sysdev/qe_lib/Kconfig 2008-01-28 20:25:49.000000000 +0100
60058 + default y if SERIAL_QE
60060 This option provides qe_lib support to UCC slow
60061 protocols: UART, BISYNC, QMC
60062 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/qe_lib/qe.c powerpc.git/arch/powerpc/sysdev/qe_lib/qe.c
60063 --- linux-2.6.24/arch/powerpc/sysdev/qe_lib/qe.c 2008-01-24 23:58:37.000000000 +0100
60064 +++ powerpc.git/arch/powerpc/sysdev/qe_lib/qe.c 2008-01-28 20:25:49.000000000 +0100
60066 #include <linux/module.h>
60067 #include <linux/delay.h>
60068 #include <linux/ioport.h>
60069 +#include <linux/crc32.h>
60070 #include <asm/irq.h>
60071 #include <asm/page.h>
60072 #include <asm/pgtable.h>
60073 @@ -167,19 +168,20 @@
60075 /* Program the BRG to the given sampling rate and multiplier
60077 - * @brg: the BRG, 1-16
60078 + * @brg: the BRG, QE_BRG1 - QE_BRG16
60079 * @rate: the desired sampling rate
60080 * @multiplier: corresponds to the value programmed in GUMR_L[RDCR] or
60081 * GUMR_L[TDCR]. E.g., if this BRG is the RX clock, and GUMR_L[RDCR]=01,
60082 * then 'multiplier' should be 8.
60084 - * Also note that the value programmed into the BRGC register must be even.
60086 -void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier)
60087 +int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier)
60089 u32 divisor, tempval;
60092 + if ((brg < QE_BRG1) || (brg > QE_BRG16))
60095 divisor = get_brg_clk() / (rate * multiplier);
60097 if (divisor > QE_BRGC_DIVISOR_MAX + 1) {
60098 @@ -196,8 +198,43 @@
60099 tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) |
60100 QE_BRGC_ENABLE | div16;
60102 - out_be32(&qe_immr->brg.brgc[brg - 1], tempval);
60103 + out_be32(&qe_immr->brg.brgc[brg - QE_BRG1], tempval);
60107 +EXPORT_SYMBOL(qe_setbrg);
60109 +/* Convert a string to a QE clock source enum
60111 + * This function takes a string, typically from a property in the device
60112 + * tree, and returns the corresponding "enum qe_clock" value.
60114 +enum qe_clock qe_clock_source(const char *source)
60118 + if (strcasecmp(source, "none") == 0)
60119 + return QE_CLK_NONE;
60121 + if (strncasecmp(source, "brg", 3) == 0) {
60122 + i = simple_strtoul(source + 3, NULL, 10);
60123 + if ((i >= 1) && (i <= 16))
60124 + return (QE_BRG1 - 1) + i;
60126 + return QE_CLK_DUMMY;
60129 + if (strncasecmp(source, "clk", 3) == 0) {
60130 + i = simple_strtoul(source + 3, NULL, 10);
60131 + if ((i >= 1) && (i <= 24))
60132 + return (QE_CLK1 - 1) + i;
60134 + return QE_CLK_DUMMY;
60137 + return QE_CLK_DUMMY;
60139 +EXPORT_SYMBOL(qe_clock_source);
60141 /* Initialize SNUMs (thread serial numbers) according to
60142 * QE Module Control chapter, SNUM table
60143 @@ -358,3 +395,249 @@
60144 return (void *)&qe_immr->muram[offset];
60146 EXPORT_SYMBOL(qe_muram_addr);
60148 +/* The maximum number of RISCs we support */
60149 +#define MAX_QE_RISC 2
60151 +/* Firmware information stored here for qe_get_firmware_info() */
60152 +static struct qe_firmware_info qe_firmware_info;
60155 + * Set to 1 if QE firmware has been uploaded, and therefore
60156 + * qe_firmware_info contains valid data.
60158 +static int qe_firmware_uploaded;
60161 + * Upload a QE microcode
60163 + * This function is a worker function for qe_upload_firmware(). It does
60164 + * the actual uploading of the microcode.
60166 +static void qe_upload_microcode(const void *base,
60167 + const struct qe_microcode *ucode)
60169 + const __be32 *code = base + be32_to_cpu(ucode->code_offset);
60172 + if (ucode->major || ucode->minor || ucode->revision)
60173 + printk(KERN_INFO "qe-firmware: "
60174 + "uploading microcode '%s' version %u.%u.%u\n",
60175 + ucode->id, ucode->major, ucode->minor, ucode->revision);
60177 + printk(KERN_INFO "qe-firmware: "
60178 + "uploading microcode '%s'\n", ucode->id);
60180 + /* Use auto-increment */
60181 + out_be32(&qe_immr->iram.iadd, be32_to_cpu(ucode->iram_offset) |
60182 + QE_IRAM_IADD_AIE | QE_IRAM_IADD_BADDR);
60184 + for (i = 0; i < be32_to_cpu(ucode->count); i++)
60185 + out_be32(&qe_immr->iram.idata, be32_to_cpu(code[i]));
60189 + * Upload a microcode to the I-RAM at a specific address.
60191 + * See Documentation/powerpc/qe-firmware.txt for information on QE microcode
60194 + * Currently, only version 1 is supported, so the 'version' field must be
60197 + * The SOC model and revision are not validated, they are only displayed for
60198 + * informational purposes.
60200 + * 'calc_size' is the calculated size, in bytes, of the firmware structure and
60201 + * all of the microcode structures, minus the CRC.
60203 + * 'length' is the size that the structure says it is, including the CRC.
60205 +int qe_upload_firmware(const struct qe_firmware *firmware)
60210 + size_t calc_size = sizeof(struct qe_firmware);
60212 + const struct qe_header *hdr;
60215 + printk(KERN_ERR "qe-firmware: invalid pointer\n");
60219 + hdr = &firmware->header;
60220 + length = be32_to_cpu(hdr->length);
60222 + /* Check the magic */
60223 + if ((hdr->magic[0] != 'Q') || (hdr->magic[1] != 'E') ||
60224 + (hdr->magic[2] != 'F')) {
60225 + printk(KERN_ERR "qe-firmware: not a microcode\n");
60229 + /* Check the version */
60230 + if (hdr->version != 1) {
60231 + printk(KERN_ERR "qe-firmware: unsupported version\n");
60235 + /* Validate some of the fields */
60236 + if ((firmware->count < 1) || (firmware->count >= MAX_QE_RISC)) {
60237 + printk(KERN_ERR "qe-firmware: invalid data\n");
60241 + /* Validate the length and check if there's a CRC */
60242 + calc_size += (firmware->count - 1) * sizeof(struct qe_microcode);
60244 + for (i = 0; i < firmware->count; i++)
60246 + * For situations where the second RISC uses the same microcode
60247 + * as the first, the 'code_offset' and 'count' fields will be
60248 + * zero, so it's okay to add those.
60250 + calc_size += sizeof(__be32) *
60251 + be32_to_cpu(firmware->microcode[i].count);
60253 + /* Validate the length */
60254 + if (length != calc_size + sizeof(__be32)) {
60255 + printk(KERN_ERR "qe-firmware: invalid length\n");
60259 + /* Validate the CRC */
60260 + crc = be32_to_cpu(*(__be32 *)((void *)firmware + calc_size));
60261 + if (crc != crc32(0, firmware, calc_size)) {
60262 + printk(KERN_ERR "qe-firmware: firmware CRC is invalid\n");
60267 + * If the microcode calls for it, split the I-RAM.
60269 + if (!firmware->split)
60270 + setbits16(&qe_immr->cp.cercr, QE_CP_CERCR_CIR);
60272 + if (firmware->soc.model)
60274 + "qe-firmware: firmware '%s' for %u V%u.%u\n",
60275 + firmware->id, be16_to_cpu(firmware->soc.model),
60276 + firmware->soc.major, firmware->soc.minor);
60278 + printk(KERN_INFO "qe-firmware: firmware '%s'\n",
60282 + * The QE only supports one microcode per RISC, so clear out all the
60283 + * saved microcode information and put in the new.
60285 + memset(&qe_firmware_info, 0, sizeof(qe_firmware_info));
60286 + strcpy(qe_firmware_info.id, firmware->id);
60287 + qe_firmware_info.extended_modes = firmware->extended_modes;
60288 + memcpy(qe_firmware_info.vtraps, firmware->vtraps,
60289 + sizeof(firmware->vtraps));
60291 + /* Loop through each microcode. */
60292 + for (i = 0; i < firmware->count; i++) {
60293 + const struct qe_microcode *ucode = &firmware->microcode[i];
60295 + /* Upload a microcode if it's present */
60296 + if (ucode->code_offset)
60297 + qe_upload_microcode(firmware, ucode);
60299 + /* Program the traps for this processor */
60300 + for (j = 0; j < 16; j++) {
60301 + u32 trap = be32_to_cpu(ucode->traps[j]);
60304 + out_be32(&qe_immr->rsp[i].tibcr[j], trap);
60307 + /* Enable traps */
60308 + out_be32(&qe_immr->rsp[i].eccr, be32_to_cpu(ucode->eccr));
60311 + qe_firmware_uploaded = 1;
60315 +EXPORT_SYMBOL(qe_upload_firmware);
60318 + * Get info on the currently-loaded firmware
60320 + * This function also checks the device tree to see if the boot loader has
60321 + * uploaded a firmware already.
60323 +struct qe_firmware_info *qe_get_firmware_info(void)
60325 + static int initialized;
60326 + struct property *prop;
60327 + struct device_node *qe;
60328 + struct device_node *fw = NULL;
60329 + const char *sprop;
60333 + * If we haven't checked yet, and a driver hasn't uploaded a firmware
60334 + * yet, then check the device tree for information.
60336 + if (initialized || qe_firmware_uploaded)
60342 + * Newer device trees have an "fsl,qe" compatible property for the QE
60343 + * node, but we still need to support older device trees.
60345 + qe = of_find_compatible_node(NULL, NULL, "fsl,qe");
60347 + qe = of_find_node_by_type(NULL, "qe");
60352 + /* Find the 'firmware' child node */
60353 + for_each_child_of_node(qe, fw) {
60354 + if (strcmp(fw->name, "firmware") == 0)
60360 + /* Did we find the 'firmware' node? */
60364 + qe_firmware_uploaded = 1;
60366 + /* Copy the data into qe_firmware_info*/
60367 + sprop = of_get_property(fw, "id", NULL);
60369 + strncpy(qe_firmware_info.id, sprop,
60370 + sizeof(qe_firmware_info.id) - 1);
60372 + prop = of_find_property(fw, "extended-modes", NULL);
60373 + if (prop && (prop->length == sizeof(u64))) {
60374 + const u64 *iprop = prop->value;
60376 + qe_firmware_info.extended_modes = *iprop;
60379 + prop = of_find_property(fw, "virtual-traps", NULL);
60380 + if (prop && (prop->length == 32)) {
60381 + const u32 *iprop = prop->value;
60383 + for (i = 0; i < ARRAY_SIZE(qe_firmware_info.vtraps); i++)
60384 + qe_firmware_info.vtraps[i] = iprop[i];
60389 + return &qe_firmware_info;
60391 +EXPORT_SYMBOL(qe_get_firmware_info);
60393 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/qe_lib/ucc_slow.c powerpc.git/arch/powerpc/sysdev/qe_lib/ucc_slow.c
60394 --- linux-2.6.24/arch/powerpc/sysdev/qe_lib/ucc_slow.c 2008-01-24 23:58:37.000000000 +0100
60395 +++ powerpc.git/arch/powerpc/sysdev/qe_lib/ucc_slow.c 2008-01-28 20:25:49.000000000 +0100
60397 #include <linux/stddef.h>
60398 #include <linux/interrupt.h>
60399 #include <linux/err.h>
60400 +#include <linux/module.h>
60402 #include <asm/io.h>
60403 #include <asm/immap_qe.h>
60405 default: return QE_CR_SUBBLOCK_INVALID;
60408 +EXPORT_SYMBOL(ucc_slow_get_qe_cr_subblock);
60410 void ucc_slow_poll_transmitter_now(struct ucc_slow_private * uccs)
60413 qe_issue_cmd(QE_GRACEFUL_STOP_TX, id,
60414 QE_CR_PROTOCOL_UNSPECIFIED, 0);
60416 +EXPORT_SYMBOL(ucc_slow_graceful_stop_tx);
60418 void ucc_slow_stop_tx(struct ucc_slow_private * uccs)
60421 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
60422 qe_issue_cmd(QE_STOP_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
60424 +EXPORT_SYMBOL(ucc_slow_stop_tx);
60426 void ucc_slow_restart_tx(struct ucc_slow_private * uccs)
60429 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
60430 qe_issue_cmd(QE_RESTART_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
60432 +EXPORT_SYMBOL(ucc_slow_restart_tx);
60434 void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode)
60438 out_be32(&us_regs->gumr_l, gumr_l);
60440 +EXPORT_SYMBOL(ucc_slow_enable);
60442 void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
60444 @@ -114,6 +120,7 @@
60446 out_be32(&us_regs->gumr_l, gumr_l);
60448 +EXPORT_SYMBOL(ucc_slow_disable);
60450 /* Initialize the UCC for Slow operations
60452 @@ -347,6 +354,7 @@
60456 +EXPORT_SYMBOL(ucc_slow_init);
60458 void ucc_slow_free(struct ucc_slow_private * uccs)
60460 @@ -366,5 +374,5 @@
60465 +EXPORT_SYMBOL(ucc_slow_free);
60467 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/tsi108_dev.c powerpc.git/arch/powerpc/sysdev/tsi108_dev.c
60468 --- linux-2.6.24/arch/powerpc/sysdev/tsi108_dev.c 2008-01-24 23:58:37.000000000 +0100
60469 +++ powerpc.git/arch/powerpc/sysdev/tsi108_dev.c 2008-01-28 20:25:49.000000000 +0100
60470 @@ -66,14 +66,12 @@
60471 static int __init tsi108_eth_of_init(void)
60473 struct device_node *np;
60475 + unsigned int i = 0;
60476 struct platform_device *tsi_eth_dev;
60477 struct resource res;
60480 - for (np = NULL, i = 0;
60481 - (np = of_find_compatible_node(np, "network", "tsi108-ethernet")) != NULL;
60483 + for_each_compatible_node(np, "network", "tsi108-ethernet") {
60484 struct resource r[2];
60485 struct device_node *phy, *mdio;
60486 hw_info tsi_eth_data;
60488 __FUNCTION__,r[1].name, r[1].start, r[1].end);
60491 - platform_device_register_simple("tsi-ethernet", i, &r[0],
60492 + platform_device_register_simple("tsi-ethernet", i++, &r[0],
60495 if (IS_ERR(tsi_eth_dev)) {
60496 @@ -154,6 +152,7 @@
60498 platform_device_unregister(tsi_eth_dev);
60504 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/uic.c powerpc.git/arch/powerpc/sysdev/uic.c
60505 --- linux-2.6.24/arch/powerpc/sysdev/uic.c 2008-01-24 23:58:37.000000000 +0100
60506 +++ powerpc.git/arch/powerpc/sysdev/uic.c 2008-01-28 20:25:49.000000000 +0100
60507 @@ -53,21 +53,23 @@
60509 /* The remapper for this UIC */
60510 struct irq_host *irqhost;
60512 - /* For secondary UICs, the cascade interrupt's irqaction */
60513 - struct irqaction cascade;
60516 static void uic_unmask_irq(unsigned int virq)
60518 + struct irq_desc *desc = get_irq_desc(virq);
60519 struct uic *uic = get_irq_chip_data(virq);
60520 unsigned int src = uic_irq_to_hw(virq);
60521 unsigned long flags;
60525 + sr = 1 << (31-src);
60526 spin_lock_irqsave(&uic->lock, flags);
60527 + /* ack level-triggered interrupts here */
60528 + if (desc->status & IRQ_LEVEL)
60529 + mtdcr(uic->dcrbase + UIC_SR, sr);
60530 er = mfdcr(uic->dcrbase + UIC_ER);
60531 - er |= 1 << (31 - src);
60533 mtdcr(uic->dcrbase + UIC_ER, er);
60534 spin_unlock_irqrestore(&uic->lock, flags);
60538 static void uic_mask_ack_irq(unsigned int virq)
60540 + struct irq_desc *desc = get_irq_desc(virq);
60541 struct uic *uic = get_irq_chip_data(virq);
60542 unsigned int src = uic_irq_to_hw(virq);
60543 unsigned long flags;
60544 @@ -109,7 +112,16 @@
60545 er = mfdcr(uic->dcrbase + UIC_ER);
60547 mtdcr(uic->dcrbase + UIC_ER, er);
60548 - mtdcr(uic->dcrbase + UIC_SR, sr);
60549 + /* On the UIC, acking (i.e. clearing the SR bit)
60550 + * a level irq will have no effect if the interrupt
60551 + * is still asserted by the device, even if
60552 + * the interrupt is already masked. Therefore
60553 + * we only ack the egde interrupts here, while
60554 + * level interrupts are ack'ed after the actual
60555 + * isr call in the uic_unmask_irq()
60557 + if (!(desc->status & IRQ_LEVEL))
60558 + mtdcr(uic->dcrbase + UIC_SR, sr);
60559 spin_unlock_irqrestore(&uic->lock, flags);
60562 @@ -173,64 +185,6 @@
60563 .set_type = uic_set_irq_type,
60567 - * handle_uic_irq - irq flow handler for UIC
60568 - * @irq: the interrupt number
60569 - * @desc: the interrupt description structure for this irq
60571 - * This is modified version of the generic handle_level_irq() suitable
60572 - * for the UIC. On the UIC, acking (i.e. clearing the SR bit) a level
60573 - * irq will have no effect if the interrupt is still asserted by the
60574 - * device, even if the interrupt is already masked. Therefore, unlike
60575 - * the standard handle_level_irq(), we must ack the interrupt *after*
60576 - * invoking the ISR (which should have de-asserted the interrupt in
60577 - * the external source). For edge interrupts we ack at the beginning
60578 - * instead of the end, to keep the window in which we can miss an
60579 - * interrupt as small as possible.
60581 -void fastcall handle_uic_irq(unsigned int irq, struct irq_desc *desc)
60583 - unsigned int cpu = smp_processor_id();
60584 - struct irqaction *action;
60585 - irqreturn_t action_ret;
60587 - spin_lock(&desc->lock);
60588 - if (desc->status & IRQ_LEVEL)
60589 - desc->chip->mask(irq);
60591 - desc->chip->mask_ack(irq);
60593 - if (unlikely(desc->status & IRQ_INPROGRESS))
60595 - desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
60596 - kstat_cpu(cpu).irqs[irq]++;
60599 - * If its disabled or no action available
60600 - * keep it masked and get out of here
60602 - action = desc->action;
60603 - if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
60604 - desc->status |= IRQ_PENDING;
60608 - desc->status |= IRQ_INPROGRESS;
60609 - desc->status &= ~IRQ_PENDING;
60610 - spin_unlock(&desc->lock);
60612 - action_ret = handle_IRQ_event(irq, action);
60614 - spin_lock(&desc->lock);
60615 - desc->status &= ~IRQ_INPROGRESS;
60616 - if (desc->status & IRQ_LEVEL)
60617 - desc->chip->ack(irq);
60618 - if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
60619 - desc->chip->unmask(irq);
60621 - spin_unlock(&desc->lock);
60624 static int uic_host_map(struct irq_host *h, unsigned int virq,
60625 irq_hw_number_t hw)
60627 @@ -239,7 +193,7 @@
60628 set_irq_chip_data(virq, uic);
60629 /* Despite the name, handle_level_irq() works for both level
60630 * and edge irqs on UIC. FIXME: check this is correct */
60631 - set_irq_chip_and_handler(virq, &uic_irq_chip, handle_uic_irq);
60632 + set_irq_chip_and_handler(virq, &uic_irq_chip, handle_level_irq);
60634 /* Set default irq type */
60635 set_irq_type(virq, IRQ_TYPE_NONE);
60636 @@ -264,23 +218,36 @@
60637 .xlate = uic_host_xlate,
60640 -irqreturn_t uic_cascade(int virq, void *data)
60641 +void uic_irq_cascade(unsigned int virq, struct irq_desc *desc)
60643 - struct uic *uic = data;
60644 + struct uic *uic = get_irq_data(virq);
60649 + spin_lock(&desc->lock);
60650 + if (desc->status & IRQ_LEVEL)
60651 + desc->chip->mask(virq);
60653 + desc->chip->mask_ack(virq);
60654 + spin_unlock(&desc->lock);
60656 msr = mfdcr(uic->dcrbase + UIC_MSR);
60657 if (!msr) /* spurious interrupt */
60658 - return IRQ_HANDLED;
60659 + goto uic_irq_ret;
60661 src = 32 - ffs(msr);
60663 subvirq = irq_linear_revmap(uic->irqhost, src);
60664 generic_handle_irq(subvirq);
60666 - return IRQ_HANDLED;
60668 + spin_lock(&desc->lock);
60669 + if (desc->status & IRQ_LEVEL)
60670 + desc->chip->ack(virq);
60671 + if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
60672 + desc->chip->unmask(virq);
60673 + spin_unlock(&desc->lock);
60676 static struct uic * __init uic_init_one(struct device_node *node)
60677 @@ -342,33 +309,27 @@
60678 const u32 *interrupts;
60680 /* First locate and initialize the top-level UIC */
60682 - np = of_find_compatible_node(NULL, NULL, "ibm,uic");
60684 + for_each_compatible_node(np, NULL, "ibm,uic") {
60685 interrupts = of_get_property(np, "interrupts", NULL);
60686 - if (! interrupts)
60690 - np = of_find_compatible_node(np, NULL, "ibm,uic");
60693 BUG_ON(!np); /* uic_init_tree() assumes there's a UIC as the
60694 * top-level interrupt controller */
60695 primary_uic = uic_init_one(np);
60696 - if (! primary_uic)
60697 + if (!primary_uic)
60698 panic("Unable to initialize primary UIC %s\n", np->full_name);
60700 irq_set_default_host(primary_uic->irqhost);
60703 /* The scan again for cascaded UICs */
60704 - np = of_find_compatible_node(NULL, NULL, "ibm,uic");
60706 + for_each_compatible_node(np, NULL, "ibm,uic") {
60707 interrupts = of_get_property(np, "interrupts", NULL);
60709 /* Secondary UIC */
60713 uic = uic_init_one(np);
60715 @@ -377,20 +338,11 @@
60717 cascade_virq = irq_of_parse_and_map(np, 0);
60719 - uic->cascade.handler = uic_cascade;
60720 - uic->cascade.name = "UIC cascade";
60721 - uic->cascade.dev_id = uic;
60723 - ret = setup_irq(cascade_virq, &uic->cascade);
60725 - printk(KERN_ERR "Failed to setup_irq(%d) for "
60726 - "UIC%d cascade\n", cascade_virq,
60728 + set_irq_data(cascade_virq, uic);
60729 + set_irq_chained_handler(cascade_virq, uic_irq_cascade);
60731 /* FIXME: setup critical cascade?? */
60734 - np = of_find_compatible_node(np, NULL, "ibm,uic");
60738 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/sysdev/xilinx_intc.c powerpc.git/arch/powerpc/sysdev/xilinx_intc.c
60739 --- linux-2.6.24/arch/powerpc/sysdev/xilinx_intc.c 2008-01-24 23:58:37.000000000 +0100
60740 +++ powerpc.git/arch/powerpc/sysdev/xilinx_intc.c 2008-01-28 20:25:49.000000000 +0100
60741 @@ -135,10 +135,16 @@
60742 struct device_node *np;
60744 /* find top level interrupt controller */
60745 - for_each_compatible_node(np, NULL, "xilinx,intc") {
60746 + for_each_compatible_node(np, NULL, "xlnx,opb-intc-1.00.c") {
60747 if (!of_get_property(np, "interrupts", NULL))
60751 + for_each_compatible_node(np, NULL, "xlnx,xps-intc-1.00.a") {
60752 + if (!of_get_property(np, "interrupts", NULL))
60757 /* xilinx interrupt controller needs to be top level */
60759 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/xmon/setjmp.S powerpc.git/arch/powerpc/xmon/setjmp.S
60760 --- linux-2.6.24/arch/powerpc/xmon/setjmp.S 2008-01-24 23:58:37.000000000 +0100
60761 +++ powerpc.git/arch/powerpc/xmon/setjmp.S 2008-01-28 20:25:49.000000000 +0100
60763 #include <asm/ppc_asm.h>
60764 #include <asm/asm-offsets.h>
60766 -_GLOBAL(xmon_setjmp)
60769 - PPC_STL r1,SZL(r3)
60770 - PPC_STL r2,2*SZL(r3)
60772 - PPC_STL r0,3*SZL(r3)
60773 - PPC_STL r13,4*SZL(r3)
60774 - PPC_STL r14,5*SZL(r3)
60775 - PPC_STL r15,6*SZL(r3)
60776 - PPC_STL r16,7*SZL(r3)
60777 - PPC_STL r17,8*SZL(r3)
60778 - PPC_STL r18,9*SZL(r3)
60779 - PPC_STL r19,10*SZL(r3)
60780 - PPC_STL r20,11*SZL(r3)
60781 - PPC_STL r21,12*SZL(r3)
60782 - PPC_STL r22,13*SZL(r3)
60783 - PPC_STL r23,14*SZL(r3)
60784 - PPC_STL r24,15*SZL(r3)
60785 - PPC_STL r25,16*SZL(r3)
60786 - PPC_STL r26,17*SZL(r3)
60787 - PPC_STL r27,18*SZL(r3)
60788 - PPC_STL r28,19*SZL(r3)
60789 - PPC_STL r29,20*SZL(r3)
60790 - PPC_STL r30,21*SZL(r3)
60791 - PPC_STL r31,22*SZL(r3)
60795 -_GLOBAL(xmon_longjmp)
60799 -1: PPC_LL r13,4*SZL(r3)
60800 - PPC_LL r14,5*SZL(r3)
60801 - PPC_LL r15,6*SZL(r3)
60802 - PPC_LL r16,7*SZL(r3)
60803 - PPC_LL r17,8*SZL(r3)
60804 - PPC_LL r18,9*SZL(r3)
60805 - PPC_LL r19,10*SZL(r3)
60806 - PPC_LL r20,11*SZL(r3)
60807 - PPC_LL r21,12*SZL(r3)
60808 - PPC_LL r22,13*SZL(r3)
60809 - PPC_LL r23,14*SZL(r3)
60810 - PPC_LL r24,15*SZL(r3)
60811 - PPC_LL r25,16*SZL(r3)
60812 - PPC_LL r26,17*SZL(r3)
60813 - PPC_LL r27,18*SZL(r3)
60814 - PPC_LL r28,19*SZL(r3)
60815 - PPC_LL r29,20*SZL(r3)
60816 - PPC_LL r30,21*SZL(r3)
60817 - PPC_LL r31,22*SZL(r3)
60818 - PPC_LL r0,3*SZL(r3)
60821 - PPC_LL r1,SZL(r3)
60822 - PPC_LL r2,2*SZL(r3)
60828 * Grab the register values as they are now.
60829 * This won't do a particularily good job because we really
60830 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/powerpc/xmon/xmon.c powerpc.git/arch/powerpc/xmon/xmon.c
60831 --- linux-2.6.24/arch/powerpc/xmon/xmon.c 2008-01-24 23:58:37.000000000 +0100
60832 +++ powerpc.git/arch/powerpc/xmon/xmon.c 2008-01-28 20:25:49.000000000 +0100
60834 #include <asm/spu.h>
60835 #include <asm/spu_priv1.h>
60836 #include <asm/firmware.h>
60837 +#include <asm/setjmp.h>
60839 #ifdef CONFIG_PPC64
60840 #include <asm/hvcall.h>
60843 static char tmpstr[128];
60845 -#define JMP_BUF_LEN 23
60846 static long bus_error_jmp[JMP_BUF_LEN];
60847 static int catch_memory_errors;
60848 static long *xmon_fault_jmp[NR_CPUS];
60849 -#define setjmp xmon_setjmp
60850 -#define longjmp xmon_longjmp
60852 /* Breakpoint stuff */
60854 @@ -153,13 +151,15 @@
60856 static int do_spu_cmd(void);
60859 +static void dump_tlb_44x(void);
60862 int xmon_no_auto_backtrace;
60864 extern void xmon_enter(void);
60865 extern void xmon_leave(void);
60867 -extern long setjmp(long *);
60868 -extern void longjmp(long *, long);
60869 extern void xmon_save_regs(struct pt_regs *);
60871 #ifdef CONFIG_PPC64
60872 @@ -231,6 +231,9 @@
60873 #ifdef CONFIG_PPC_STD_MMU_32
60874 " u dump segment registers\n"
60882 @@ -856,6 +859,11 @@
60892 printf("Unrecognized command: ");
60894 @@ -2527,16 +2535,33 @@
60895 static void dump_slb(void)
60898 - unsigned long tmp;
60899 + unsigned long esid,vsid,valid;
60900 + unsigned long llp;
60902 printf("SLB contents of cpu %x\n", smp_processor_id());
60904 - for (i = 0; i < SLB_NUM_ENTRIES; i++) {
60905 - asm volatile("slbmfee %0,%1" : "=r" (tmp) : "r" (i));
60906 - printf("%02d %016lx ", i, tmp);
60908 - asm volatile("slbmfev %0,%1" : "=r" (tmp) : "r" (i));
60909 - printf("%016lx\n", tmp);
60910 + for (i = 0; i < mmu_slb_size; i++) {
60911 + asm volatile("slbmfee %0,%1" : "=r" (esid) : "r" (i));
60912 + asm volatile("slbmfev %0,%1" : "=r" (vsid) : "r" (i));
60913 + valid = (esid & SLB_ESID_V);
60914 + if (valid | esid | vsid) {
60915 + printf("%02d %016lx %016lx", i, esid, vsid);
60917 + llp = vsid & SLB_VSID_LLP;
60918 + if (vsid & SLB_VSID_B_1T) {
60919 + printf(" 1T ESID=%9lx VSID=%13lx LLP:%3lx \n",
60920 + GET_ESID_1T(esid),
60921 + (vsid & ~SLB_VSID_B) >> SLB_VSID_SHIFT_1T,
60924 + printf(" 256M ESID=%9lx VSID=%13lx LLP:%3lx \n",
60926 + (vsid & ~SLB_VSID_B) >> SLB_VSID_SHIFT,
60935 @@ -2581,6 +2606,32 @@
60940 +static void dump_tlb_44x(void)
60944 + for (i = 0; i < PPC44x_TLB_SIZE; i++) {
60945 + unsigned long w0,w1,w2;
60946 + asm volatile("tlbre %0,%1,0" : "=r" (w0) : "r" (i));
60947 + asm volatile("tlbre %0,%1,1" : "=r" (w1) : "r" (i));
60948 + asm volatile("tlbre %0,%1,2" : "=r" (w2) : "r" (i));
60949 + printf("[%02x] %08x %08x %08x ", i, w0, w1, w2);
60950 + if (w0 & PPC44x_TLB_VALID) {
60951 + printf("V %08x -> %01x%08x %c%c%c%c%c",
60952 + w0 & PPC44x_TLB_EPN_MASK,
60953 + w1 & PPC44x_TLB_ERPN_MASK,
60954 + w1 & PPC44x_TLB_RPN_MASK,
60955 + (w2 & PPC44x_TLB_W) ? 'W' : 'w',
60956 + (w2 & PPC44x_TLB_I) ? 'I' : 'i',
60957 + (w2 & PPC44x_TLB_M) ? 'M' : 'm',
60958 + (w2 & PPC44x_TLB_G) ? 'G' : 'g',
60959 + (w2 & PPC44x_TLB_E) ? 'E' : 'e');
60964 +#endif /* CONFIG_44x */
60965 void xmon_init(int enable)
60967 #ifdef CONFIG_PPC_ISERIES
60968 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/kernel/Makefile powerpc.git/arch/ppc/kernel/Makefile
60969 --- linux-2.6.24/arch/ppc/kernel/Makefile 2008-01-24 23:58:37.000000000 +0100
60970 +++ powerpc.git/arch/ppc/kernel/Makefile 2008-01-28 20:25:50.000000000 +0100
60973 obj-$(CONFIG_MODULES) += ppc_ksyms.o
60974 obj-$(CONFIG_PCI) += pci.o
60975 -obj-$(CONFIG_RAPIDIO) += rio.o
60976 obj-$(CONFIG_KGDB) += ppc-stub.o
60977 obj-$(CONFIG_SMP) += smp.o smp-tbsync.o
60978 obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
60979 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/kernel/head_44x.S powerpc.git/arch/ppc/kernel/head_44x.S
60980 --- linux-2.6.24/arch/ppc/kernel/head_44x.S 2008-01-24 23:58:37.000000000 +0100
60981 +++ powerpc.git/arch/ppc/kernel/head_44x.S 2008-01-28 20:25:50.000000000 +0100
60982 @@ -195,7 +195,7 @@
60984 ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_I | PPC44x_TLB_G)
60986 - li r0,0 /* TLB slot 0 */
60987 + li r0,62 /* TLB slot 62 */
60989 tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */
60990 tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */
60991 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/kernel/rio.c powerpc.git/arch/ppc/kernel/rio.c
60992 --- linux-2.6.24/arch/ppc/kernel/rio.c 2008-01-24 23:58:37.000000000 +0100
60993 +++ powerpc.git/arch/ppc/kernel/rio.c 1970-01-01 01:00:00.000000000 +0100
60996 - * RapidIO PPC32 support
60998 - * Copyright 2005 MontaVista Software, Inc.
60999 - * Matt Porter <mporter@kernel.crashing.org>
61001 - * This program is free software; you can redistribute it and/or modify it
61002 - * under the terms of the GNU General Public License as published by the
61003 - * Free Software Foundation; either version 2 of the License, or (at your
61004 - * option) any later version.
61007 -#include <linux/init.h>
61008 -#include <linux/kernel.h>
61009 -#include <linux/rio.h>
61011 -#include <asm/rio.h>
61014 - * platform_rio_init - Do platform specific RIO init
61016 - * Any platform specific initialization of RapdIO
61017 - * hardware is done here as well as registration
61018 - * of any active master ports in the system.
61020 -void __attribute__ ((weak))
61021 - platform_rio_init(void)
61023 - printk(KERN_WARNING "RIO: No platform_rio_init() present\n");
61027 - * ppc_rio_init - Do PPC32 RIO init
61029 - * Calls platform-specific RIO init code and then calls
61030 - * rio_init_mports() to initialize any master ports that
61031 - * have been registered with the RIO subsystem.
61033 -static int __init ppc_rio_init(void)
61035 - printk(KERN_INFO "RIO: RapidIO init\n");
61037 - /* Platform specific initialization */
61038 - platform_rio_init();
61040 - /* Enumerate all registered ports */
61041 - rio_init_mports();
61046 -subsys_initcall(ppc_rio_init);
61047 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/kernel/setup.c powerpc.git/arch/ppc/kernel/setup.c
61048 --- linux-2.6.24/arch/ppc/kernel/setup.c 2008-01-24 23:58:37.000000000 +0100
61049 +++ powerpc.git/arch/ppc/kernel/setup.c 2008-01-28 20:25:50.000000000 +0100
61051 #include <asm/nvram.h>
61052 #include <asm/xmon.h>
61053 #include <asm/ocp.h>
61054 -#include <asm/prom.h>
61056 #define USES_PPC_SYS (defined(CONFIG_85xx) || defined(CONFIG_83xx) || \
61057 defined(CONFIG_MPC10X_BRIDGE) || defined(CONFIG_8260) || \
61058 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/kernel/traps.c powerpc.git/arch/ppc/kernel/traps.c
61059 --- linux-2.6.24/arch/ppc/kernel/traps.c 2008-01-24 23:58:37.000000000 +0100
61060 +++ powerpc.git/arch/ppc/kernel/traps.c 2008-01-28 20:25:50.000000000 +0100
61061 @@ -231,39 +231,25 @@
61065 -void machine_check_exception(struct pt_regs *regs)
61066 +#if defined(CONFIG_4xx)
61067 +int machine_check_4xx(struct pt_regs *regs)
61069 unsigned long reason = get_mc_reason(regs);
61071 - if (user_mode(regs)) {
61072 - regs->msr |= MSR_RI;
61073 - _exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
61077 -#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
61078 - /* the qspan pci read routines can cause machine checks -- Cort */
61079 - bad_page_fault(regs, regs->dar, SIGBUS);
61083 - if (debugger_fault_handler) {
61084 - debugger_fault_handler(regs);
61085 - regs->msr |= MSR_RI;
61089 - if (check_io_access(regs))
61092 -#if defined(CONFIG_4xx) && !defined(CONFIG_440A)
61093 if (reason & ESR_IMCP) {
61094 printk("Instruction");
61095 mtspr(SPRN_ESR, reason & ~ESR_IMCP);
61098 printk(" machine check in kernel mode.\n");
61099 -#elif defined(CONFIG_440A)
61104 +int machine_check_440A(struct pt_regs *regs)
61106 + unsigned long reason = get_mc_reason(regs);
61108 printk("Machine check in kernel mode.\n");
61109 if (reason & ESR_IMCP){
61110 printk("Instruction Synchronous Machine Check exception\n");
61111 @@ -293,7 +279,13 @@
61113 mtspr(SPRN_MCSR, mcsr);
61115 -#elif defined (CONFIG_E500)
61118 +#elif defined(CONFIG_E500)
61119 +int machine_check_e500(struct pt_regs *regs)
61121 + unsigned long reason = get_mc_reason(regs);
61123 printk("Machine check in kernel mode.\n");
61124 printk("Caused by (from MCSR=%lx): ", reason);
61126 @@ -305,8 +297,6 @@
61127 printk("Data Cache Push Parity Error\n");
61128 if (reason & MCSR_DCPERR)
61129 printk("Data Cache Parity Error\n");
61130 - if (reason & MCSR_GL_CI)
61131 - printk("Guarded Load or Cache-Inhibited stwcx.\n");
61132 if (reason & MCSR_BUS_IAERR)
61133 printk("Bus - Instruction Address Error\n");
61134 if (reason & MCSR_BUS_RAERR)
61135 @@ -318,12 +308,19 @@
61136 if (reason & MCSR_BUS_RBERR)
61137 printk("Bus - Read Data Bus Error\n");
61138 if (reason & MCSR_BUS_WBERR)
61139 - printk("Bus - Write Data Bus Error\n");
61140 + printk("Bus - Read Data Bus Error\n");
61141 if (reason & MCSR_BUS_IPERR)
61142 printk("Bus - Instruction Parity Error\n");
61143 if (reason & MCSR_BUS_RPERR)
61144 printk("Bus - Read Parity Error\n");
61145 -#elif defined (CONFIG_E200)
61149 +#elif defined(CONFIG_E200)
61150 +int machine_check_e200(struct pt_regs *regs)
61152 + unsigned long reason = get_mc_reason(regs);
61154 printk("Machine check in kernel mode.\n");
61155 printk("Caused by (from MCSR=%lx): ", reason);
61157 @@ -341,7 +338,14 @@
61158 printk("Bus - Read Bus Error on data load\n");
61159 if (reason & MCSR_BUS_WRERR)
61160 printk("Bus - Write Bus Error on buffered store or cache line push\n");
61161 -#else /* !CONFIG_4xx && !CONFIG_E500 && !CONFIG_E200 */
61166 +int machine_check_generic(struct pt_regs *regs)
61168 + unsigned long reason = get_mc_reason(regs);
61170 printk("Machine check in kernel mode.\n");
61171 printk("Caused by (from SRR1=%lx): ", reason);
61172 switch (reason & 0x601F0000) {
61173 @@ -371,7 +375,39 @@
61175 printk("Unknown values in msr\n");
61177 -#endif /* CONFIG_4xx */
61180 +#endif /* everything else */
61182 +void machine_check_exception(struct pt_regs *regs)
61186 + if (cur_cpu_spec->machine_check)
61187 + recover = cur_cpu_spec->machine_check(regs);
61191 + if (user_mode(regs)) {
61192 + regs->msr |= MSR_RI;
61193 + _exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
61197 +#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
61198 + /* the qspan pci read routines can cause machine checks -- Cort */
61199 + bad_page_fault(regs, regs->dar, SIGBUS);
61203 + if (debugger_fault_handler) {
61204 + debugger_fault_handler(regs);
61205 + regs->msr |= MSR_RI;
61209 + if (check_io_access(regs))
61213 * Optional platform-provided routine to print out
61214 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/mm/44x_mmu.c powerpc.git/arch/ppc/mm/44x_mmu.c
61215 --- linux-2.6.24/arch/ppc/mm/44x_mmu.c 2008-01-24 23:58:37.000000000 +0100
61216 +++ powerpc.git/arch/ppc/mm/44x_mmu.c 2008-01-28 20:25:51.000000000 +0100
61217 @@ -60,38 +60,28 @@
61218 * Just needed it declared someplace.
61220 unsigned int tlb_44x_index = 0;
61221 -unsigned int tlb_44x_hwater = 62;
61222 +unsigned int tlb_44x_hwater = PPC4XX_TLB_SIZE - 1 - PPC44x_EARLY_TLBS;
61223 int icache_44x_need_flush;
61226 * "Pins" a 256MB TLB entry in AS0 for kernel lowmem
61228 -static void __init
61229 -ppc44x_pin_tlb(int slot, unsigned int virt, unsigned int phys)
61230 +static void __init ppc44x_pin_tlb(unsigned int virt, unsigned int phys)
61232 - unsigned long attrib = 0;
61234 - __asm__ __volatile__("\
61235 - clrrwi %2,%2,10\n\
61237 - clrrwi %1,%1,10\n\
61240 - tlbwe %2,%3,%6\n\
61241 - tlbwe %1,%3,%7\n\
61243 + __asm__ __volatile__(
61244 + "tlbwe %2,%3,%4\n"
61245 + "tlbwe %1,%3,%5\n"
61246 + "tlbwe %0,%3,%6\n"
61248 - : "r" (attrib), "r" (phys), "r" (virt), "r" (slot),
61249 - "i" (PPC44x_TLB_VALID | PPC44x_TLB_256M),
61250 - "i" (PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G),
61251 + : "r" (PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G),
61253 + "r" (virt | PPC44x_TLB_VALID | PPC44x_TLB_256M),
61254 + "r" (tlb_44x_hwater--), /* slot for this TLB entry */
61255 "i" (PPC44x_TLB_PAGEID),
61256 "i" (PPC44x_TLB_XLAT),
61257 "i" (PPC44x_TLB_ATTRIB));
61261 - * MMU_init_hw does the chip-specific initialization of the MMU hardware.
61263 void __init MMU_init_hw(void)
61265 flush_instruction_cache();
61266 @@ -99,22 +89,13 @@
61268 unsigned long __init mmu_mapin_ram(void)
61270 - unsigned int pinned_tlbs = 1;
61273 - /* Determine number of entries necessary to cover lowmem */
61274 - pinned_tlbs = (unsigned int)
61275 - (_ALIGN(total_lowmem, PPC_PIN_SIZE) >> PPC44x_PIN_SHIFT);
61277 - /* Write upper watermark to save location */
61278 - tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs;
61279 + unsigned long addr;
61281 - /* If necessary, set additional pinned TLBs */
61282 - if (pinned_tlbs > 1)
61283 - for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) {
61284 - unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC_PIN_SIZE;
61285 - ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr);
61287 + /* Pin in enough TLBs to cover any lowmem not covered by the
61288 + * initial 256M mapping established in head_44x.S */
61289 + for (addr = PPC_PIN_SIZE; addr < total_lowmem;
61290 + addr += PPC_PIN_SIZE)
61291 + ppc44x_pin_tlb(addr + PAGE_OFFSET, addr);
61293 return total_lowmem;
61295 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/platforms/85xx/mpc85xx_ads_common.c powerpc.git/arch/ppc/platforms/85xx/mpc85xx_ads_common.c
61296 --- linux-2.6.24/arch/ppc/platforms/85xx/mpc85xx_ads_common.c 2008-01-24 23:58:37.000000000 +0100
61297 +++ powerpc.git/arch/ppc/platforms/85xx/mpc85xx_ads_common.c 2008-01-28 20:25:51.000000000 +0100
61300 #include <mm/mmu_decl.h>
61302 -#include <syslib/ppc85xx_rio.h>
61304 #include <platforms/85xx/mpc85xx_ads_common.h>
61307 @@ -190,6 +188,7 @@
61308 #endif /* CONFIG_PCI */
61310 #ifdef CONFIG_RAPIDIO
61311 +extern void mpc85xx_rio_setup(int law_start, int law_size);
61312 void platform_rio_init(void)
61314 /* 512MB RIO LAW at 0xc0000000 */
61315 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/platforms/85xx/stx_gp3.c powerpc.git/arch/ppc/platforms/85xx/stx_gp3.c
61316 --- linux-2.6.24/arch/ppc/platforms/85xx/stx_gp3.c 2008-01-24 23:58:37.000000000 +0100
61317 +++ powerpc.git/arch/ppc/platforms/85xx/stx_gp3.c 2008-01-28 20:25:51.000000000 +0100
61318 @@ -50,12 +50,10 @@
61319 #include <asm/irq.h>
61320 #include <asm/immap_85xx.h>
61321 #include <asm/cpm2.h>
61322 -#include <asm/mpc85xx.h>
61323 #include <asm/ppc_sys.h>
61325 #include <syslib/cpm2_pic.h>
61326 #include <syslib/ppc85xx_common.h>
61327 -#include <syslib/ppc85xx_rio.h>
61330 unsigned char __res[sizeof(bd_t)];
61331 @@ -271,6 +269,7 @@
61332 #endif /* CONFIG_PCI */
61334 #ifdef CONFIG_RAPIDIO
61335 +extern void mpc85xx_rio_setup(int law_start, int law_size);
61337 platform_rio_init(void)
61339 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/platforms/85xx/tqm85xx.c powerpc.git/arch/ppc/platforms/85xx/tqm85xx.c
61340 --- linux-2.6.24/arch/ppc/platforms/85xx/tqm85xx.c 2008-01-24 23:58:37.000000000 +0100
61341 +++ powerpc.git/arch/ppc/platforms/85xx/tqm85xx.c 2008-01-28 20:25:51.000000000 +0100
61343 #include <syslib/ppc85xx_setup.h>
61344 #include <syslib/cpm2_pic.h>
61345 #include <syslib/ppc85xx_common.h>
61346 -#include <syslib/ppc85xx_rio.h>
61349 unsigned long isa_io_base = 0;
61350 @@ -309,6 +308,7 @@
61351 #endif /* CONFIG_PCI */
61353 #ifdef CONFIG_RAPIDIO
61354 +extern void mpc85xx_rio_setup(int law_start, int law_size);
61355 void platform_rio_init(void)
61357 /* 512MB RIO LAW at 0xc0000000 */
61358 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/platforms/ev64260.c powerpc.git/arch/ppc/platforms/ev64260.c
61359 --- linux-2.6.24/arch/ppc/platforms/ev64260.c 2008-01-24 23:58:37.000000000 +0100
61360 +++ powerpc.git/arch/ppc/platforms/ev64260.c 2008-01-28 20:25:51.000000000 +0100
61361 @@ -336,7 +336,7 @@
61364 if (early_serial_setup(&port) != 0)
61365 - printk(KERN_WARNING "Early serial init of port 0"
61366 + printk(KERN_WARNING "Early serial init of port 0 "
61370 @@ -388,7 +388,7 @@
61371 ev64260_early_serial_map();
61374 - printk(KERN_INFO "%s %s port (C) 2001 MontaVista Software, Inc."
61375 + printk(KERN_INFO "%s %s port (C) 2001 MontaVista Software, Inc. "
61376 "(source@mvista.com)\n", BOARD_VENDOR, BOARD_MACHINE);
61378 if (ppc_md.progress)
61379 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/platforms/prep_pci.c powerpc.git/arch/ppc/platforms/prep_pci.c
61380 --- linux-2.6.24/arch/ppc/platforms/prep_pci.c 2008-01-24 23:58:37.000000000 +0100
61381 +++ powerpc.git/arch/ppc/platforms/prep_pci.c 2008-01-28 20:25:52.000000000 +0100
61382 @@ -1099,7 +1099,6 @@
61383 pci_write_config_byte(dev, 0x43, reg);
61386 - pci_dev_put(dev);
61389 if ((dev = pci_get_device(PCI_VENDOR_ID_WINBOND,
61390 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/syslib/Makefile powerpc.git/arch/ppc/syslib/Makefile
61391 --- linux-2.6.24/arch/ppc/syslib/Makefile 2008-01-24 23:58:37.000000000 +0100
61392 +++ powerpc.git/arch/ppc/syslib/Makefile 2008-01-28 20:25:52.000000000 +0100
61394 ifeq ($(CONFIG_85xx),y)
61395 obj-$(CONFIG_PCI) += pci_auto.o
61397 -obj-$(CONFIG_RAPIDIO) += ppc85xx_rio.o
61398 obj-$(CONFIG_83xx) += ppc83xx_setup.o ppc_sys.o \
61399 mpc83xx_sys.o mpc83xx_devices.o ipic.o
61400 ifeq ($(CONFIG_83xx),y)
61401 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/syslib/gt64260_pic.c powerpc.git/arch/ppc/syslib/gt64260_pic.c
61402 --- linux-2.6.24/arch/ppc/syslib/gt64260_pic.c 2008-01-24 23:58:37.000000000 +0100
61403 +++ powerpc.git/arch/ppc/syslib/gt64260_pic.c 2008-01-28 20:25:52.000000000 +0100
61405 #include <linux/interrupt.h>
61406 #include <linux/sched.h>
61407 #include <linux/signal.h>
61408 -#include <linux/stddef.h>
61409 #include <linux/delay.h>
61410 #include <linux/irq.h>
61412 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/syslib/mpc52xx_pic.c powerpc.git/arch/ppc/syslib/mpc52xx_pic.c
61413 --- linux-2.6.24/arch/ppc/syslib/mpc52xx_pic.c 2008-01-24 23:58:37.000000000 +0100
61414 +++ powerpc.git/arch/ppc/syslib/mpc52xx_pic.c 2008-01-28 20:25:52.000000000 +0100
61416 #include <linux/init.h>
61417 #include <linux/sched.h>
61418 #include <linux/signal.h>
61419 -#include <linux/stddef.h>
61420 #include <linux/delay.h>
61421 #include <linux/irq.h>
61423 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/syslib/mv64360_pic.c powerpc.git/arch/ppc/syslib/mv64360_pic.c
61424 --- linux-2.6.24/arch/ppc/syslib/mv64360_pic.c 2008-01-24 23:58:37.000000000 +0100
61425 +++ powerpc.git/arch/ppc/syslib/mv64360_pic.c 2008-01-28 20:25:52.000000000 +0100
61427 #include <linux/init.h>
61428 #include <linux/sched.h>
61429 #include <linux/signal.h>
61430 -#include <linux/stddef.h>
61431 #include <linux/delay.h>
61432 #include <linux/irq.h>
61433 #include <linux/interrupt.h>
61434 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/syslib/ocp.c powerpc.git/arch/ppc/syslib/ocp.c
61435 --- linux-2.6.24/arch/ppc/syslib/ocp.c 2008-01-24 23:58:37.000000000 +0100
61436 +++ powerpc.git/arch/ppc/syslib/ocp.c 2008-01-28 20:25:52.000000000 +0100
61437 @@ -376,7 +376,7 @@
61439 down_write(&ocp_devices_sem);
61440 dev = __ocp_find_device(vendor, function, index);
61441 - list_del((struct list_head *)dev);
61442 + list_del(&dev->link);
61443 up_write(&ocp_devices_sem);
61445 DBG(("ocp: ocp_remove_one_device(vendor: %x, function: %x, index: %d)... done.\n", vendor, function, index));
61446 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/syslib/ppc83xx_setup.c powerpc.git/arch/ppc/syslib/ppc83xx_setup.c
61447 --- linux-2.6.24/arch/ppc/syslib/ppc83xx_setup.c 2008-01-24 23:58:37.000000000 +0100
61448 +++ powerpc.git/arch/ppc/syslib/ppc83xx_setup.c 2008-01-28 20:25:52.000000000 +0100
61451 #include <syslib/ppc83xx_setup.h>
61452 #if defined(CONFIG_PCI)
61453 -#include <asm/delay.h>
61454 #include <syslib/ppc83xx_pci.h>
61457 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/syslib/ppc85xx_rio.c powerpc.git/arch/ppc/syslib/ppc85xx_rio.c
61458 --- linux-2.6.24/arch/ppc/syslib/ppc85xx_rio.c 2008-01-24 23:58:37.000000000 +0100
61459 +++ powerpc.git/arch/ppc/syslib/ppc85xx_rio.c 1970-01-01 01:00:00.000000000 +0100
61462 - * MPC85xx RapidIO support
61464 - * Copyright 2005 MontaVista Software, Inc.
61465 - * Matt Porter <mporter@kernel.crashing.org>
61467 - * This program is free software; you can redistribute it and/or modify it
61468 - * under the terms of the GNU General Public License as published by the
61469 - * Free Software Foundation; either version 2 of the License, or (at your
61470 - * option) any later version.
61473 -#include <linux/init.h>
61474 -#include <linux/module.h>
61475 -#include <linux/types.h>
61476 -#include <linux/dma-mapping.h>
61477 -#include <linux/interrupt.h>
61478 -#include <linux/rio.h>
61479 -#include <linux/rio_drv.h>
61481 -#include <asm/io.h>
61483 -#define RIO_REGS_BASE (CCSRBAR + 0xc0000)
61484 -#define RIO_ATMU_REGS_OFFSET 0x10c00
61485 -#define RIO_MSG_REGS_OFFSET 0x11000
61486 -#define RIO_MAINT_WIN_SIZE 0x400000
61487 -#define RIO_DBELL_WIN_SIZE 0x1000
61489 -#define RIO_MSG_OMR_MUI 0x00000002
61490 -#define RIO_MSG_OSR_TE 0x00000080
61491 -#define RIO_MSG_OSR_QOI 0x00000020
61492 -#define RIO_MSG_OSR_QFI 0x00000010
61493 -#define RIO_MSG_OSR_MUB 0x00000004
61494 -#define RIO_MSG_OSR_EOMI 0x00000002
61495 -#define RIO_MSG_OSR_QEI 0x00000001
61497 -#define RIO_MSG_IMR_MI 0x00000002
61498 -#define RIO_MSG_ISR_TE 0x00000080
61499 -#define RIO_MSG_ISR_QFI 0x00000010
61500 -#define RIO_MSG_ISR_DIQI 0x00000001
61502 -#define RIO_MSG_DESC_SIZE 32
61503 -#define RIO_MSG_BUFFER_SIZE 4096
61504 -#define RIO_MIN_TX_RING_SIZE 2
61505 -#define RIO_MAX_TX_RING_SIZE 2048
61506 -#define RIO_MIN_RX_RING_SIZE 2
61507 -#define RIO_MAX_RX_RING_SIZE 2048
61509 -#define DOORBELL_DMR_DI 0x00000002
61510 -#define DOORBELL_DSR_TE 0x00000080
61511 -#define DOORBELL_DSR_QFI 0x00000010
61512 -#define DOORBELL_DSR_DIQI 0x00000001
61513 -#define DOORBELL_TID_OFFSET 0x03
61514 -#define DOORBELL_SID_OFFSET 0x05
61515 -#define DOORBELL_INFO_OFFSET 0x06
61517 -#define DOORBELL_MESSAGE_SIZE 0x08
61518 -#define DBELL_SID(x) (*(u8 *)(x + DOORBELL_SID_OFFSET))
61519 -#define DBELL_TID(x) (*(u8 *)(x + DOORBELL_TID_OFFSET))
61520 -#define DBELL_INF(x) (*(u16 *)(x + DOORBELL_INFO_OFFSET))
61522 -struct rio_atmu_regs {
61531 -struct rio_msg_regs {
61564 -struct rio_tx_desc {
61575 -static u32 regs_win;
61576 -static struct rio_atmu_regs *atmu_regs;
61577 -static struct rio_atmu_regs *maint_atmu_regs;
61578 -static struct rio_atmu_regs *dbell_atmu_regs;
61579 -static u32 dbell_win;
61580 -static u32 maint_win;
61581 -static struct rio_msg_regs *msg_regs;
61583 -static struct rio_dbell_ring {
61588 -static struct rio_msg_tx_ring {
61591 - void *virt_buffer[RIO_MAX_TX_RING_SIZE];
61592 - dma_addr_t phys_buffer[RIO_MAX_TX_RING_SIZE];
61598 -static struct rio_msg_rx_ring {
61601 - void *virt_buffer[RIO_MAX_RX_RING_SIZE];
61608 - * mpc85xx_rio_doorbell_send - Send a MPC85xx doorbell message
61609 - * @index: ID of RapidIO interface
61610 - * @destid: Destination ID of target device
61611 - * @data: 16-bit info field of RapidIO doorbell message
61613 - * Sends a MPC85xx doorbell message. Returns %0 on success or
61614 - * %-EINVAL on failure.
61616 -static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data)
61618 - pr_debug("mpc85xx_doorbell_send: index %d destid %4.4x data %4.4x\n",
61619 - index, destid, data);
61620 - out_be32((void *)&dbell_atmu_regs->rowtar, destid << 22);
61621 - out_be16((void *)(dbell_win), data);
61627 - * mpc85xx_local_config_read - Generate a MPC85xx local config space read
61628 - * @index: ID of RapdiIO interface
61629 - * @offset: Offset into configuration space
61630 - * @len: Length (in bytes) of the maintenance transaction
61631 - * @data: Value to be read into
61633 - * Generates a MPC85xx local configuration space read. Returns %0 on
61634 - * success or %-EINVAL on failure.
61636 -static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data)
61638 - pr_debug("mpc85xx_local_config_read: index %d offset %8.8x\n", index,
61640 - *data = in_be32((void *)(regs_win + offset));
61646 - * mpc85xx_local_config_write - Generate a MPC85xx local config space write
61647 - * @index: ID of RapdiIO interface
61648 - * @offset: Offset into configuration space
61649 - * @len: Length (in bytes) of the maintenance transaction
61650 - * @data: Value to be written
61652 - * Generates a MPC85xx local configuration space write. Returns %0 on
61653 - * success or %-EINVAL on failure.
61655 -static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data)
61658 - ("mpc85xx_local_config_write: index %d offset %8.8x data %8.8x\n",
61659 - index, offset, data);
61660 - out_be32((void *)(regs_win + offset), data);
61666 - * mpc85xx_rio_config_read - Generate a MPC85xx read maintenance transaction
61667 - * @index: ID of RapdiIO interface
61668 - * @destid: Destination ID of transaction
61669 - * @hopcount: Number of hops to target device
61670 - * @offset: Offset into configuration space
61671 - * @len: Length (in bytes) of the maintenance transaction
61672 - * @val: Location to be read into
61674 - * Generates a MPC85xx read maintenance transaction. Returns %0 on
61675 - * success or %-EINVAL on failure.
61678 -mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len,
61684 - ("mpc85xx_rio_config_read: index %d destid %d hopcount %d offset %8.8x len %d\n",
61685 - index, destid, hopcount, offset, len);
61686 - out_be32((void *)&maint_atmu_regs->rowtar,
61687 - (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9));
61689 - data = (u8 *) maint_win + offset;
61692 - *val = in_8((u8 *) data);
61695 - *val = in_be16((u16 *) data);
61698 - *val = in_be32((u32 *) data);
61706 - * mpc85xx_rio_config_write - Generate a MPC85xx write maintenance transaction
61707 - * @index: ID of RapdiIO interface
61708 - * @destid: Destination ID of transaction
61709 - * @hopcount: Number of hops to target device
61710 - * @offset: Offset into configuration space
61711 - * @len: Length (in bytes) of the maintenance transaction
61712 - * @val: Value to be written
61714 - * Generates an MPC85xx write maintenance transaction. Returns %0 on
61715 - * success or %-EINVAL on failure.
61718 -mpc85xx_rio_config_write(int index, u16 destid, u8 hopcount, u32 offset,
61719 - int len, u32 val)
61723 - ("mpc85xx_rio_config_write: index %d destid %d hopcount %d offset %8.8x len %d val %8.8x\n",
61724 - index, destid, hopcount, offset, len, val);
61725 - out_be32((void *)&maint_atmu_regs->rowtar,
61726 - (destid << 22) | (hopcount << 12) | ((offset & ~0x3) >> 9));
61728 - data = (u8 *) maint_win + offset;
61731 - out_8((u8 *) data, val);
61734 - out_be16((u16 *) data, val);
61737 - out_be32((u32 *) data, val);
61745 - * rio_hw_add_outb_message - Add message to the MPC85xx outbound message queue
61746 - * @mport: Master port with outbound message queue
61747 - * @rdev: Target of outbound message
61748 - * @mbox: Outbound mailbox
61749 - * @buffer: Message to add to outbound queue
61750 - * @len: Length of message
61752 - * Adds the @buffer message to the MPC85xx outbound message queue. Returns
61753 - * %0 on success or %-EINVAL on failure.
61756 -rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox,
61757 - void *buffer, size_t len)
61760 - struct rio_tx_desc *desc =
61761 - (struct rio_tx_desc *)msg_tx_ring.virt + msg_tx_ring.tx_slot;
61765 - ("RIO: rio_hw_add_outb_message(): destid %4.4x mbox %d buffer %8.8x len %8.8x\n",
61766 - rdev->destid, mbox, (int)buffer, len);
61768 - if ((len < 8) || (len > RIO_MAX_MSG_SIZE)) {
61773 - /* Copy and clear rest of buffer */
61774 - memcpy(msg_tx_ring.virt_buffer[msg_tx_ring.tx_slot], buffer, len);
61775 - if (len < (RIO_MAX_MSG_SIZE - 4))
61776 - memset((void *)((u32) msg_tx_ring.
61777 - virt_buffer[msg_tx_ring.tx_slot] + len), 0,
61778 - RIO_MAX_MSG_SIZE - len);
61780 - /* Set mbox field for message */
61781 - desc->dport = mbox & 0x3;
61783 - /* Enable EOMI interrupt, set priority, and set destid */
61784 - desc->dattr = 0x28000000 | (rdev->destid << 2);
61786 - /* Set transfer size aligned to next power of 2 (in double words) */
61787 - desc->dwcnt = is_power_of_2(len) ? len : 1 << get_bitmask_order(len);
61789 - /* Set snooping and source buffer address */
61790 - desc->saddr = 0x00000004 | msg_tx_ring.phys_buffer[msg_tx_ring.tx_slot];
61792 - /* Increment enqueue pointer */
61793 - omr = in_be32((void *)&msg_regs->omr);
61794 - out_be32((void *)&msg_regs->omr, omr | RIO_MSG_OMR_MUI);
61796 - /* Go to next descriptor */
61797 - if (++msg_tx_ring.tx_slot == msg_tx_ring.size)
61798 - msg_tx_ring.tx_slot = 0;
61804 -EXPORT_SYMBOL_GPL(rio_hw_add_outb_message);
61807 - * mpc85xx_rio_tx_handler - MPC85xx outbound message interrupt handler
61808 - * @irq: Linux interrupt number
61809 - * @dev_instance: Pointer to interrupt-specific data
61811 - * Handles outbound message interrupts. Executes a register outbound
61812 - * mailbox event handler and acks the interrupt occurrence.
61814 -static irqreturn_t
61815 -mpc85xx_rio_tx_handler(int irq, void *dev_instance)
61818 - struct rio_mport *port = (struct rio_mport *)dev_instance;
61820 - osr = in_be32((void *)&msg_regs->osr);
61822 - if (osr & RIO_MSG_OSR_TE) {
61823 - pr_info("RIO: outbound message transmission error\n");
61824 - out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_TE);
61828 - if (osr & RIO_MSG_OSR_QOI) {
61829 - pr_info("RIO: outbound message queue overflow\n");
61830 - out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_QOI);
61834 - if (osr & RIO_MSG_OSR_EOMI) {
61835 - u32 dqp = in_be32((void *)&msg_regs->odqdpar);
61836 - int slot = (dqp - msg_tx_ring.phys) >> 5;
61837 - port->outb_msg[0].mcback(port, msg_tx_ring.dev_id, -1, slot);
61839 - /* Ack the end-of-message interrupt */
61840 - out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_EOMI);
61844 - return IRQ_HANDLED;
61848 - * rio_open_outb_mbox - Initialize MPC85xx outbound mailbox
61849 - * @mport: Master port implementing the outbound message unit
61850 - * @dev_id: Device specific pointer to pass on event
61851 - * @mbox: Mailbox to open
61852 - * @entries: Number of entries in the outbound mailbox ring
61854 - * Initializes buffer ring, request the outbound message interrupt,
61855 - * and enables the outbound message unit. Returns %0 on success and
61856 - * %-EINVAL or %-ENOMEM on failure.
61858 -int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
61860 - int i, j, rc = 0;
61862 - if ((entries < RIO_MIN_TX_RING_SIZE) ||
61863 - (entries > RIO_MAX_TX_RING_SIZE) || (!is_power_of_2(entries))) {
61868 - /* Initialize shadow copy ring */
61869 - msg_tx_ring.dev_id = dev_id;
61870 - msg_tx_ring.size = entries;
61872 - for (i = 0; i < msg_tx_ring.size; i++) {
61874 - (msg_tx_ring.virt_buffer[i] =
61875 - dma_alloc_coherent(NULL, RIO_MSG_BUFFER_SIZE,
61876 - &msg_tx_ring.phys_buffer[i],
61879 - for (j = 0; j < msg_tx_ring.size; j++)
61880 - if (msg_tx_ring.virt_buffer[j])
61881 - dma_free_coherent(NULL,
61882 - RIO_MSG_BUFFER_SIZE,
61891 - /* Initialize outbound message descriptor ring */
61892 - if (!(msg_tx_ring.virt = dma_alloc_coherent(NULL,
61893 - msg_tx_ring.size *
61894 - RIO_MSG_DESC_SIZE,
61895 - &msg_tx_ring.phys,
61900 - memset(msg_tx_ring.virt, 0, msg_tx_ring.size * RIO_MSG_DESC_SIZE);
61901 - msg_tx_ring.tx_slot = 0;
61903 - /* Point dequeue/enqueue pointers at first entry in ring */
61904 - out_be32((void *)&msg_regs->odqdpar, msg_tx_ring.phys);
61905 - out_be32((void *)&msg_regs->odqepar, msg_tx_ring.phys);
61907 - /* Configure for snooping */
61908 - out_be32((void *)&msg_regs->osar, 0x00000004);
61910 - /* Clear interrupt status */
61911 - out_be32((void *)&msg_regs->osr, 0x000000b3);
61913 - /* Hook up outbound message handler */
61915 - request_irq(MPC85xx_IRQ_RIO_TX, mpc85xx_rio_tx_handler, 0,
61916 - "msg_tx", (void *)mport)) < 0)
61920 - * Configure outbound message unit
61922 - * Interrupts (all enabled, except QEIE)
61926 - out_be32((void *)&msg_regs->omr, 0x00100220);
61928 - /* Set number of entries */
61929 - out_be32((void *)&msg_regs->omr,
61930 - in_be32((void *)&msg_regs->omr) |
61931 - ((get_bitmask_order(entries) - 2) << 12));
61933 - /* Now enable the unit */
61934 - out_be32((void *)&msg_regs->omr, in_be32((void *)&msg_regs->omr) | 0x1);
61940 - dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
61941 - msg_tx_ring.virt, msg_tx_ring.phys);
61944 - for (i = 0; i < msg_tx_ring.size; i++)
61945 - dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE,
61946 - msg_tx_ring.virt_buffer[i],
61947 - msg_tx_ring.phys_buffer[i]);
61953 - * rio_close_outb_mbox - Shut down MPC85xx outbound mailbox
61954 - * @mport: Master port implementing the outbound message unit
61955 - * @mbox: Mailbox to close
61957 - * Disables the outbound message unit, free all buffers, and
61958 - * frees the outbound message interrupt.
61960 -void rio_close_outb_mbox(struct rio_mport *mport, int mbox)
61962 - /* Disable inbound message unit */
61963 - out_be32((void *)&msg_regs->omr, 0);
61966 - dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
61967 - msg_tx_ring.virt, msg_tx_ring.phys);
61969 - /* Free interrupt */
61970 - free_irq(MPC85xx_IRQ_RIO_TX, (void *)mport);
61974 - * mpc85xx_rio_rx_handler - MPC85xx inbound message interrupt handler
61975 - * @irq: Linux interrupt number
61976 - * @dev_instance: Pointer to interrupt-specific data
61978 - * Handles inbound message interrupts. Executes a registered inbound
61979 - * mailbox event handler and acks the interrupt occurrence.
61981 -static irqreturn_t
61982 -mpc85xx_rio_rx_handler(int irq, void *dev_instance)
61985 - struct rio_mport *port = (struct rio_mport *)dev_instance;
61987 - isr = in_be32((void *)&msg_regs->isr);
61989 - if (isr & RIO_MSG_ISR_TE) {
61990 - pr_info("RIO: inbound message reception error\n");
61991 - out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_TE);
61995 - /* XXX Need to check/dispatch until queue empty */
61996 - if (isr & RIO_MSG_ISR_DIQI) {
61998 - * We implement *only* mailbox 0, but can receive messages
61999 - * for any mailbox/letter to that mailbox destination. So,
62000 - * make the callback with an unknown/invalid mailbox number
62003 - port->inb_msg[0].mcback(port, msg_rx_ring.dev_id, -1, -1);
62005 - /* Ack the queueing interrupt */
62006 - out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_DIQI);
62010 - return IRQ_HANDLED;
62014 - * rio_open_inb_mbox - Initialize MPC85xx inbound mailbox
62015 - * @mport: Master port implementing the inbound message unit
62016 - * @dev_id: Device specific pointer to pass on event
62017 - * @mbox: Mailbox to open
62018 - * @entries: Number of entries in the inbound mailbox ring
62020 - * Initializes buffer ring, request the inbound message interrupt,
62021 - * and enables the inbound message unit. Returns %0 on success
62022 - * and %-EINVAL or %-ENOMEM on failure.
62024 -int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
62028 - if ((entries < RIO_MIN_RX_RING_SIZE) ||
62029 - (entries > RIO_MAX_RX_RING_SIZE) || (!is_power_of_2(entries))) {
62034 - /* Initialize client buffer ring */
62035 - msg_rx_ring.dev_id = dev_id;
62036 - msg_rx_ring.size = entries;
62037 - msg_rx_ring.rx_slot = 0;
62038 - for (i = 0; i < msg_rx_ring.size; i++)
62039 - msg_rx_ring.virt_buffer[i] = NULL;
62041 - /* Initialize inbound message ring */
62042 - if (!(msg_rx_ring.virt = dma_alloc_coherent(NULL,
62043 - msg_rx_ring.size *
62044 - RIO_MAX_MSG_SIZE,
62045 - &msg_rx_ring.phys,
62051 - /* Point dequeue/enqueue pointers at first entry in ring */
62052 - out_be32((void *)&msg_regs->ifqdpar, (u32) msg_rx_ring.phys);
62053 - out_be32((void *)&msg_regs->ifqepar, (u32) msg_rx_ring.phys);
62055 - /* Clear interrupt status */
62056 - out_be32((void *)&msg_regs->isr, 0x00000091);
62058 - /* Hook up inbound message handler */
62060 - request_irq(MPC85xx_IRQ_RIO_RX, mpc85xx_rio_rx_handler, 0,
62061 - "msg_rx", (void *)mport)) < 0) {
62062 - dma_free_coherent(NULL, RIO_MSG_BUFFER_SIZE,
62063 - msg_tx_ring.virt_buffer[i],
62064 - msg_tx_ring.phys_buffer[i]);
62069 - * Configure inbound message unit:
62071 - * 4KB max message size
62072 - * Unmask all interrupt sources
62075 - out_be32((void *)&msg_regs->imr, 0x001b0060);
62077 - /* Set number of queue entries */
62078 - out_be32((void *)&msg_regs->imr,
62079 - in_be32((void *)&msg_regs->imr) |
62080 - ((get_bitmask_order(entries) - 2) << 12));
62082 - /* Now enable the unit */
62083 - out_be32((void *)&msg_regs->imr, in_be32((void *)&msg_regs->imr) | 0x1);
62090 - * rio_close_inb_mbox - Shut down MPC85xx inbound mailbox
62091 - * @mport: Master port implementing the inbound message unit
62092 - * @mbox: Mailbox to close
62094 - * Disables the inbound message unit, free all buffers, and
62095 - * frees the inbound message interrupt.
62097 -void rio_close_inb_mbox(struct rio_mport *mport, int mbox)
62099 - /* Disable inbound message unit */
62100 - out_be32((void *)&msg_regs->imr, 0);
62103 - dma_free_coherent(NULL, msg_rx_ring.size * RIO_MAX_MSG_SIZE,
62104 - msg_rx_ring.virt, msg_rx_ring.phys);
62106 - /* Free interrupt */
62107 - free_irq(MPC85xx_IRQ_RIO_RX, (void *)mport);
62111 - * rio_hw_add_inb_buffer - Add buffer to the MPC85xx inbound message queue
62112 - * @mport: Master port implementing the inbound message unit
62113 - * @mbox: Inbound mailbox number
62114 - * @buf: Buffer to add to inbound queue
62116 - * Adds the @buf buffer to the MPC85xx inbound message queue. Returns
62117 - * %0 on success or %-EINVAL on failure.
62119 -int rio_hw_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf)
62123 - pr_debug("RIO: rio_hw_add_inb_buffer(), msg_rx_ring.rx_slot %d\n",
62124 - msg_rx_ring.rx_slot);
62126 - if (msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot]) {
62128 - "RIO: error adding inbound buffer %d, buffer exists\n",
62129 - msg_rx_ring.rx_slot);
62134 - msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot] = buf;
62135 - if (++msg_rx_ring.rx_slot == msg_rx_ring.size)
62136 - msg_rx_ring.rx_slot = 0;
62142 -EXPORT_SYMBOL_GPL(rio_hw_add_inb_buffer);
62145 - * rio_hw_get_inb_message - Fetch inbound message from the MPC85xx message unit
62146 - * @mport: Master port implementing the inbound message unit
62147 - * @mbox: Inbound mailbox number
62149 - * Gets the next available inbound message from the inbound message queue.
62150 - * A pointer to the message is returned on success or NULL on failure.
62152 -void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox)
62155 - u32 phys_buf, virt_buf;
62156 - void *buf = NULL;
62159 - phys_buf = in_be32((void *)&msg_regs->ifqdpar);
62161 - /* If no more messages, then bail out */
62162 - if (phys_buf == in_be32((void *)&msg_regs->ifqepar))
62165 - virt_buf = (u32) msg_rx_ring.virt + (phys_buf - msg_rx_ring.phys);
62166 - buf_idx = (phys_buf - msg_rx_ring.phys) / RIO_MAX_MSG_SIZE;
62167 - buf = msg_rx_ring.virt_buffer[buf_idx];
62171 - "RIO: inbound message copy failed, no buffers\n");
62175 - /* Copy max message size, caller is expected to allocate that big */
62176 - memcpy(buf, (void *)virt_buf, RIO_MAX_MSG_SIZE);
62178 - /* Clear the available buffer */
62179 - msg_rx_ring.virt_buffer[buf_idx] = NULL;
62182 - imr = in_be32((void *)&msg_regs->imr);
62183 - out_be32((void *)&msg_regs->imr, imr | RIO_MSG_IMR_MI);
62189 -EXPORT_SYMBOL_GPL(rio_hw_get_inb_message);
62192 - * mpc85xx_rio_dbell_handler - MPC85xx doorbell interrupt handler
62193 - * @irq: Linux interrupt number
62194 - * @dev_instance: Pointer to interrupt-specific data
62196 - * Handles doorbell interrupts. Parses a list of registered
62197 - * doorbell event handlers and executes a matching event handler.
62199 -static irqreturn_t
62200 -mpc85xx_rio_dbell_handler(int irq, void *dev_instance)
62203 - struct rio_mport *port = (struct rio_mport *)dev_instance;
62205 - dsr = in_be32((void *)&msg_regs->dsr);
62207 - if (dsr & DOORBELL_DSR_TE) {
62208 - pr_info("RIO: doorbell reception error\n");
62209 - out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_TE);
62213 - if (dsr & DOORBELL_DSR_QFI) {
62214 - pr_info("RIO: doorbell queue full\n");
62215 - out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_QFI);
62219 - /* XXX Need to check/dispatch until queue empty */
62220 - if (dsr & DOORBELL_DSR_DIQI) {
62222 - (u32) dbell_ring.virt +
62223 - (in_be32((void *)&msg_regs->dqdpar) & 0xfff);
62225 - struct rio_dbell *dbell;
62229 - ("RIO: processing doorbell, sid %2.2x tid %2.2x info %4.4x\n",
62230 - DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
62232 - list_for_each_entry(dbell, &port->dbells, node) {
62233 - if ((dbell->res->start <= DBELL_INF(dmsg)) &&
62234 - (dbell->res->end >= DBELL_INF(dmsg))) {
62240 - dbell->dinb(port, dbell->dev_id, DBELL_SID(dmsg), DBELL_TID(dmsg),
62241 - DBELL_INF(dmsg));
62244 - ("RIO: spurious doorbell, sid %2.2x tid %2.2x info %4.4x\n",
62245 - DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
62247 - dmr = in_be32((void *)&msg_regs->dmr);
62248 - out_be32((void *)&msg_regs->dmr, dmr | DOORBELL_DMR_DI);
62249 - out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_DIQI);
62253 - return IRQ_HANDLED;
62257 - * mpc85xx_rio_doorbell_init - MPC85xx doorbell interface init
62258 - * @mport: Master port implementing the inbound doorbell unit
62260 - * Initializes doorbell unit hardware and inbound DMA buffer
62261 - * ring. Called from mpc85xx_rio_setup(). Returns %0 on success
62262 - * or %-ENOMEM on failure.
62264 -static int mpc85xx_rio_doorbell_init(struct rio_mport *mport)
62268 - /* Map outbound doorbell window immediately after maintenance window */
62269 - if (!(dbell_win =
62270 - (u32) ioremap(mport->iores.start + RIO_MAINT_WIN_SIZE,
62271 - RIO_DBELL_WIN_SIZE))) {
62273 - "RIO: unable to map outbound doorbell window\n");
62278 - /* Initialize inbound doorbells */
62279 - if (!(dbell_ring.virt = dma_alloc_coherent(NULL,
62280 - 512 * DOORBELL_MESSAGE_SIZE,
62281 - &dbell_ring.phys,
62283 - printk(KERN_ERR "RIO: unable allocate inbound doorbell ring\n");
62285 - iounmap((void *)dbell_win);
62289 - /* Point dequeue/enqueue pointers at first entry in ring */
62290 - out_be32((void *)&msg_regs->dqdpar, (u32) dbell_ring.phys);
62291 - out_be32((void *)&msg_regs->dqepar, (u32) dbell_ring.phys);
62293 - /* Clear interrupt status */
62294 - out_be32((void *)&msg_regs->dsr, 0x00000091);
62296 - /* Hook up doorbell handler */
62298 - request_irq(MPC85xx_IRQ_RIO_BELL, mpc85xx_rio_dbell_handler, 0,
62299 - "dbell_rx", (void *)mport) < 0)) {
62300 - iounmap((void *)dbell_win);
62301 - dma_free_coherent(NULL, 512 * DOORBELL_MESSAGE_SIZE,
62302 - dbell_ring.virt, dbell_ring.phys);
62304 - "MPC85xx RIO: unable to request inbound doorbell irq");
62308 - /* Configure doorbells for snooping, 512 entries, and enable */
62309 - out_be32((void *)&msg_regs->dmr, 0x00108161);
62315 -static char *cmdline = NULL;
62317 -static int mpc85xx_rio_get_hdid(int index)
62319 - /* XXX Need to parse multiple entries in some format */
62323 - return simple_strtol(cmdline, NULL, 0);
62326 -static int mpc85xx_rio_get_cmdline(char *s)
62335 -__setup("riohdid=", mpc85xx_rio_get_cmdline);
62338 - * mpc85xx_rio_setup - Setup MPC85xx RapidIO interface
62339 - * @law_start: Starting physical address of RapidIO LAW
62340 - * @law_size: Size of RapidIO LAW
62342 - * Initializes MPC85xx RapidIO hardware interface, configures
62343 - * master port with system-specific info, and registers the
62344 - * master port with the RapidIO subsystem.
62346 -void mpc85xx_rio_setup(int law_start, int law_size)
62348 - struct rio_ops *ops;
62349 - struct rio_mport *port;
62351 - ops = kmalloc(sizeof(struct rio_ops), GFP_KERNEL);
62352 - ops->lcread = mpc85xx_local_config_read;
62353 - ops->lcwrite = mpc85xx_local_config_write;
62354 - ops->cread = mpc85xx_rio_config_read;
62355 - ops->cwrite = mpc85xx_rio_config_write;
62356 - ops->dsend = mpc85xx_rio_doorbell_send;
62358 - port = kmalloc(sizeof(struct rio_mport), GFP_KERNEL);
62361 - INIT_LIST_HEAD(&port->dbells);
62362 - port->iores.start = law_start;
62363 - port->iores.end = law_start + law_size;
62364 - port->iores.flags = IORESOURCE_MEM;
62366 - rio_init_dbell_res(&port->riores[RIO_DOORBELL_RESOURCE], 0, 0xffff);
62367 - rio_init_mbox_res(&port->riores[RIO_INB_MBOX_RESOURCE], 0, 0);
62368 - rio_init_mbox_res(&port->riores[RIO_OUTB_MBOX_RESOURCE], 0, 0);
62369 - strcpy(port->name, "RIO0 mport");
62372 - port->host_deviceid = mpc85xx_rio_get_hdid(port->id);
62374 - rio_register_mport(port);
62376 - regs_win = (u32) ioremap(RIO_REGS_BASE, 0x20000);
62377 - atmu_regs = (struct rio_atmu_regs *)(regs_win + RIO_ATMU_REGS_OFFSET);
62378 - maint_atmu_regs = atmu_regs + 1;
62379 - dbell_atmu_regs = atmu_regs + 2;
62380 - msg_regs = (struct rio_msg_regs *)(regs_win + RIO_MSG_REGS_OFFSET);
62382 - /* Configure maintenance transaction window */
62383 - out_be32((void *)&maint_atmu_regs->rowbar, 0x000c0000);
62384 - out_be32((void *)&maint_atmu_regs->rowar, 0x80077015);
62386 - maint_win = (u32) ioremap(law_start, RIO_MAINT_WIN_SIZE);
62388 - /* Configure outbound doorbell window */
62389 - out_be32((void *)&dbell_atmu_regs->rowbar, 0x000c0400);
62390 - out_be32((void *)&dbell_atmu_regs->rowar, 0x8004200b);
62391 - mpc85xx_rio_doorbell_init(port);
62393 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/syslib/ppc85xx_rio.h powerpc.git/arch/ppc/syslib/ppc85xx_rio.h
62394 --- linux-2.6.24/arch/ppc/syslib/ppc85xx_rio.h 2008-01-24 23:58:37.000000000 +0100
62395 +++ powerpc.git/arch/ppc/syslib/ppc85xx_rio.h 1970-01-01 01:00:00.000000000 +0100
62398 - * MPC85xx RapidIO definitions
62400 - * Copyright 2005 MontaVista Software, Inc.
62401 - * Matt Porter <mporter@kernel.crashing.org>
62403 - * This program is free software; you can redistribute it and/or modify it
62404 - * under the terms of the GNU General Public License as published by the
62405 - * Free Software Foundation; either version 2 of the License, or (at your
62406 - * option) any later version.
62409 -#ifndef __PPC_SYSLIB_PPC85XX_RIO_H
62410 -#define __PPC_SYSLIB_PPC85XX_RIO_H
62412 -#include <linux/init.h>
62414 -extern void mpc85xx_rio_setup(int law_start, int law_size);
62416 -#endif /* __PPC_SYSLIB_PPC85XX_RIO_H */
62417 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/syslib/ppc8xx_pic.c powerpc.git/arch/ppc/syslib/ppc8xx_pic.c
62418 --- linux-2.6.24/arch/ppc/syslib/ppc8xx_pic.c 2008-01-24 23:58:37.000000000 +0100
62419 +++ powerpc.git/arch/ppc/syslib/ppc8xx_pic.c 2008-01-28 20:25:52.000000000 +0100
62421 * the only interrupt controller. Some boards, like the MBX and
62422 * Sandpoint have the 8259 as a secondary controller. Depending
62423 * upon the processor type, the internal controller can have as
62424 - * few as 16 interrups or as many as 64. We could use the
62425 + * few as 16 interrupts or as many as 64. We could use the
62426 * "clear_bit()" and "set_bit()" functions like other platforms,
62427 * but they are overkill for us.
62429 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/syslib/ppc_sys.c powerpc.git/arch/ppc/syslib/ppc_sys.c
62430 --- linux-2.6.24/arch/ppc/syslib/ppc_sys.c 2008-01-24 23:58:37.000000000 +0100
62431 +++ powerpc.git/arch/ppc/syslib/ppc_sys.c 2008-01-28 20:25:52.000000000 +0100
62432 @@ -185,7 +185,7 @@
62436 - Here we'll replace .name pointers with fixed-lenght strings
62437 + Here we'll replace .name pointers with fixed-length strings
62438 Hereby, this should be called *before* any func stuff triggeded.
62440 void ppc_sys_device_initfunc(void)
62441 diff -x .git -x .gitignore -Nur linux-2.6.24/arch/ppc/xmon/start.c powerpc.git/arch/ppc/xmon/start.c
62442 --- linux-2.6.24/arch/ppc/xmon/start.c 2008-01-24 23:58:37.000000000 +0100
62443 +++ powerpc.git/arch/ppc/xmon/start.c 2008-01-28 20:25:52.000000000 +0100
62445 #include <linux/sysrq.h>
62446 #include <linux/bitops.h>
62447 #include <asm/xmon.h>
62448 -#include <asm/machdep.h>
62449 #include <asm/errno.h>
62450 #include <asm/processor.h>
62451 #include <asm/delay.h>
62452 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/ata/Kconfig powerpc.git/drivers/ata/Kconfig
62453 --- linux-2.6.24/drivers/ata/Kconfig 2008-01-24 23:58:37.000000000 +0100
62454 +++ powerpc.git/drivers/ata/Kconfig 2008-01-28 20:25:59.000000000 +0100
62455 @@ -607,13 +607,23 @@
62457 config PATA_PLATFORM
62458 tristate "Generic platform device PATA support"
62459 - depends on EMBEDDED || ARCH_RPC
62460 + depends on EMBEDDED || ARCH_RPC || PPC
62462 This option enables support for generic directly connected ATA
62463 devices commonly found on embedded systems.
62467 +config PATA_OF_PLATFORM
62468 + tristate "OpenFirmware platform device PATA support"
62469 + depends on PATA_PLATFORM && PPC_OF
62471 + This option enables support for generic directly connected ATA
62472 + devices commonly found on embedded systems with OpenFirmware
62475 + If unsure, say N.
62478 tristate "Acorn ICS PATA support"
62479 depends on ARM && ARCH_ACORN
62480 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/ata/Makefile powerpc.git/drivers/ata/Makefile
62481 --- linux-2.6.24/drivers/ata/Makefile 2008-01-24 23:58:37.000000000 +0100
62482 +++ powerpc.git/drivers/ata/Makefile 2008-01-28 20:25:59.000000000 +0100
62484 obj-$(CONFIG_PATA_SCC) += pata_scc.o
62485 obj-$(CONFIG_PATA_BF54X) += pata_bf54x.o
62486 obj-$(CONFIG_PATA_PLATFORM) += pata_platform.o
62487 +obj-$(CONFIG_PATA_OF_PLATFORM) += pata_of_platform.o
62488 obj-$(CONFIG_PATA_ICSIDE) += pata_icside.o
62489 # Should be last but two libata driver
62490 obj-$(CONFIG_PATA_ACPI) += pata_acpi.o
62491 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/ata/pata_of_platform.c powerpc.git/drivers/ata/pata_of_platform.c
62492 --- linux-2.6.24/drivers/ata/pata_of_platform.c 1970-01-01 01:00:00.000000000 +0100
62493 +++ powerpc.git/drivers/ata/pata_of_platform.c 2008-01-28 20:25:59.000000000 +0100
62496 + * OF-platform PATA driver
62498 + * Copyright (c) 2007 MontaVista Software, Inc.
62499 + * Anton Vorontsov <avorontsov@ru.mvista.com>
62501 + * This program is free software; you can redistribute it and/or modify
62502 + * it under the terms of the GNU General Public License (Version 2) as
62503 + * published by the Free Software Foundation.
62506 +#include <linux/kernel.h>
62507 +#include <linux/module.h>
62508 +#include <linux/of_platform.h>
62509 +#include <linux/pata_platform.h>
62511 +static int __devinit pata_of_platform_probe(struct of_device *ofdev,
62512 + const struct of_device_id *match)
62515 + struct device_node *dn = ofdev->node;
62516 + struct resource io_res;
62517 + struct resource ctl_res;
62518 + struct resource irq_res;
62519 + unsigned int reg_shift = 0;
62520 + int pio_mode = 0;
62524 + ret = of_address_to_resource(dn, 0, &io_res);
62526 + dev_err(&ofdev->dev, "can't get IO address from "
62527 + "device tree\n");
62531 + if (of_device_is_compatible(dn, "electra-ide")) {
62532 + /* Altstatus is really at offset 0x3f6 from the primary window
62533 + * on electra-ide. Adjust ctl_res and io_res accordingly.
62535 + ctl_res = io_res;
62536 + ctl_res.start = ctl_res.start+0x3f6;
62537 + io_res.end = ctl_res.start-1;
62539 + ret = of_address_to_resource(dn, 1, &ctl_res);
62541 + dev_err(&ofdev->dev, "can't get CTL address from "
62542 + "device tree\n");
62547 + ret = of_irq_to_resource(dn, 0, &irq_res);
62548 + if (ret == NO_IRQ)
62549 + irq_res.start = irq_res.end = -1;
62551 + irq_res.flags = 0;
62553 + prop = of_get_property(dn, "reg-shift", NULL);
62555 + reg_shift = *prop;
62557 + prop = of_get_property(dn, "pio-mode", NULL);
62559 + pio_mode = *prop;
62560 + if (pio_mode > 6) {
62561 + dev_err(&ofdev->dev, "invalid pio-mode\n");
62565 + dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
62568 + pio_mask = 1 << pio_mode;
62569 + pio_mask |= (1 << pio_mode) - 1;
62571 + return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, &irq_res,
62572 + reg_shift, pio_mask);
62575 +static int __devexit pata_of_platform_remove(struct of_device *ofdev)
62577 + return __pata_platform_remove(&ofdev->dev);
62580 +static struct of_device_id pata_of_platform_match[] = {
62581 + { .compatible = "ata-generic", },
62582 + { .compatible = "electra-ide", },
62585 +MODULE_DEVICE_TABLE(of, pata_of_platform_match);
62587 +static struct of_platform_driver pata_of_platform_driver = {
62588 + .name = "pata_of_platform",
62589 + .match_table = pata_of_platform_match,
62590 + .probe = pata_of_platform_probe,
62591 + .remove = __devexit_p(pata_of_platform_remove),
62594 +static int __init pata_of_platform_init(void)
62596 + return of_register_platform_driver(&pata_of_platform_driver);
62598 +module_init(pata_of_platform_init);
62600 +static void __exit pata_of_platform_exit(void)
62602 + of_unregister_platform_driver(&pata_of_platform_driver);
62604 +module_exit(pata_of_platform_exit);
62606 +MODULE_DESCRIPTION("OF-platform PATA driver");
62607 +MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
62608 +MODULE_LICENSE("GPL");
62609 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/ata/pata_platform.c powerpc.git/drivers/ata/pata_platform.c
62610 --- linux-2.6.24/drivers/ata/pata_platform.c 2008-01-24 23:58:37.000000000 +0100
62611 +++ powerpc.git/drivers/ata/pata_platform.c 2008-01-28 20:25:59.000000000 +0100
62615 static void pata_platform_setup_port(struct ata_ioports *ioaddr,
62616 - struct pata_platform_info *info)
62617 + unsigned int shift)
62619 - unsigned int shift = 0;
62621 /* Fixup the port shift for platforms that need it */
62622 - if (info && info->ioport_shift)
62623 - shift = info->ioport_shift;
62625 ioaddr->data_addr = ioaddr->cmd_addr + (ATA_REG_DATA << shift);
62626 ioaddr->error_addr = ioaddr->cmd_addr + (ATA_REG_ERR << shift);
62627 ioaddr->feature_addr = ioaddr->cmd_addr + (ATA_REG_FEATURE << shift);
62628 @@ -114,8 +109,13 @@
62632 - * pata_platform_probe - attach a platform interface
62633 - * @pdev: platform device
62634 + * __pata_platform_probe - attach a platform interface
62636 + * @io_res: Resource representing I/O base
62637 + * @ctl_res: Resource representing CTL base
62638 + * @irq_res: Resource representing IRQ and its flags
62639 + * @ioport_shift: I/O port shift
62640 + * @__pio_mask: PIO mask
62642 * Register a platform bus IDE interface. Such interfaces are PIO and we
62643 * assume do not support IRQ sharing.
62644 @@ -135,42 +135,18 @@
62646 * If no IRQ resource is present, PIO polling mode is used instead.
62648 -static int __devinit pata_platform_probe(struct platform_device *pdev)
62649 +int __devinit __pata_platform_probe(struct device *dev,
62650 + struct resource *io_res,
62651 + struct resource *ctl_res,
62652 + struct resource *irq_res,
62653 + unsigned int ioport_shift,
62656 - struct resource *io_res, *ctl_res;
62657 struct ata_host *host;
62658 struct ata_port *ap;
62659 - struct pata_platform_info *pp_info;
62664 - * Simple resource validation ..
62666 - if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
62667 - dev_err(&pdev->dev, "invalid number of resources\n");
62672 - * Get the I/O base first
62674 - io_res = platform_get_resource(pdev, IORESOURCE_IO, 0);
62675 - if (io_res == NULL) {
62676 - io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
62677 - if (unlikely(io_res == NULL))
62682 - * Then the CTL base
62684 - ctl_res = platform_get_resource(pdev, IORESOURCE_IO, 1);
62685 - if (ctl_res == NULL) {
62686 - ctl_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
62687 - if (unlikely(ctl_res == NULL))
62691 + int irq_flags = 0;
62695 @@ -181,20 +157,21 @@
62699 - irq = platform_get_irq(pdev, 0);
62701 - irq = 0; /* no irq */
62702 + if (irq_res && irq_res->start > 0) {
62703 + irq = irq_res->start;
62704 + irq_flags = irq_res->flags;
62708 * Now that that's out of the way, wire up the port..
62710 - host = ata_host_alloc(&pdev->dev, 1);
62711 + host = ata_host_alloc(dev, 1);
62714 ap = host->ports[0];
62716 ap->ops = &pata_platform_port_ops;
62717 - ap->pio_mask = pio_mask;
62718 + ap->pio_mask = __pio_mask;
62719 ap->flags |= ATA_FLAG_SLAVE_POSS;
62722 @@ -209,25 +186,24 @@
62723 * Handle the MMIO case
62726 - ap->ioaddr.cmd_addr = devm_ioremap(&pdev->dev, io_res->start,
62727 + ap->ioaddr.cmd_addr = devm_ioremap(dev, io_res->start,
62728 io_res->end - io_res->start + 1);
62729 - ap->ioaddr.ctl_addr = devm_ioremap(&pdev->dev, ctl_res->start,
62730 + ap->ioaddr.ctl_addr = devm_ioremap(dev, ctl_res->start,
62731 ctl_res->end - ctl_res->start + 1);
62733 - ap->ioaddr.cmd_addr = devm_ioport_map(&pdev->dev, io_res->start,
62734 + ap->ioaddr.cmd_addr = devm_ioport_map(dev, io_res->start,
62735 io_res->end - io_res->start + 1);
62736 - ap->ioaddr.ctl_addr = devm_ioport_map(&pdev->dev, ctl_res->start,
62737 + ap->ioaddr.ctl_addr = devm_ioport_map(dev, ctl_res->start,
62738 ctl_res->end - ctl_res->start + 1);
62740 if (!ap->ioaddr.cmd_addr || !ap->ioaddr.ctl_addr) {
62741 - dev_err(&pdev->dev, "failed to map IO/CTL base\n");
62742 + dev_err(dev, "failed to map IO/CTL base\n");
62746 ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
62748 - pp_info = pdev->dev.platform_data;
62749 - pata_platform_setup_port(&ap->ioaddr, pp_info);
62750 + pata_platform_setup_port(&ap->ioaddr, ioport_shift);
62752 ata_port_desc(ap, "%s cmd 0x%llx ctl 0x%llx", mmio ? "mmio" : "ioport",
62753 (unsigned long long)io_res->start,
62754 @@ -235,26 +211,78 @@
62757 return ata_host_activate(host, irq, irq ? ata_interrupt : NULL,
62758 - pp_info ? pp_info->irq_flags : 0,
62759 - &pata_platform_sht);
62760 + irq_flags, &pata_platform_sht);
62762 +EXPORT_SYMBOL_GPL(__pata_platform_probe);
62765 - * pata_platform_remove - unplug a platform interface
62766 - * @pdev: platform device
62767 + * __pata_platform_remove - unplug a platform interface
62770 * A platform bus ATA device has been unplugged. Perform the needed
62771 * cleanup. Also called on module unload for any active devices.
62773 -static int __devexit pata_platform_remove(struct platform_device *pdev)
62774 +int __devexit __pata_platform_remove(struct device *dev)
62776 - struct device *dev = &pdev->dev;
62777 struct ata_host *host = dev_get_drvdata(dev);
62779 ata_host_detach(host);
62783 +EXPORT_SYMBOL_GPL(__pata_platform_remove);
62785 +static int __devinit pata_platform_probe(struct platform_device *pdev)
62787 + struct resource *io_res;
62788 + struct resource *ctl_res;
62789 + struct resource *irq_res;
62790 + struct pata_platform_info *pp_info = pdev->dev.platform_data;
62793 + * Simple resource validation ..
62795 + if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
62796 + dev_err(&pdev->dev, "invalid number of resources\n");
62801 + * Get the I/O base first
62803 + io_res = platform_get_resource(pdev, IORESOURCE_IO, 0);
62804 + if (io_res == NULL) {
62805 + io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
62806 + if (unlikely(io_res == NULL))
62811 + * Then the CTL base
62813 + ctl_res = platform_get_resource(pdev, IORESOURCE_IO, 1);
62814 + if (ctl_res == NULL) {
62815 + ctl_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
62816 + if (unlikely(ctl_res == NULL))
62823 + irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
62825 + irq_res->flags = pp_info ? pp_info->irq_flags : 0;
62827 + return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res,
62828 + pp_info ? pp_info->ioport_shift : 0,
62832 +static int __devexit pata_platform_remove(struct platform_device *pdev)
62834 + return __pata_platform_remove(&pdev->dev);
62837 static struct platform_driver pata_platform_driver = {
62838 .probe = pata_platform_probe,
62839 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/char/hw_random/Kconfig powerpc.git/drivers/char/hw_random/Kconfig
62840 --- linux-2.6.24/drivers/char/hw_random/Kconfig 2008-01-24 23:58:37.000000000 +0100
62841 +++ powerpc.git/drivers/char/hw_random/Kconfig 2008-01-28 20:25:59.000000000 +0100
62845 This driver provides kernel-side support for the Random Number
62846 - Generator hardware found on PA6T-1682M processor.
62847 + Generator hardware found on PA Semi PWRficient SoCs.
62849 To compile this driver as a module, choose M here: the
62850 module will be called pasemi-rng.
62851 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/char/hw_random/pasemi-rng.c powerpc.git/drivers/char/hw_random/pasemi-rng.c
62852 --- linux-2.6.24/drivers/char/hw_random/pasemi-rng.c 2008-01-24 23:58:37.000000000 +0100
62853 +++ powerpc.git/drivers/char/hw_random/pasemi-rng.c 2008-01-28 20:25:59.000000000 +0100
62854 @@ -126,10 +126,9 @@
62857 static struct of_device_id rng_match[] = {
62859 - .compatible = "1682m-rng",
62862 + { .compatible = "1682m-rng", },
62863 + { .compatible = "pasemi,pwrficient-rng", },
62867 static struct of_platform_driver rng_driver = {
62868 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/edac/pasemi_edac.c powerpc.git/drivers/edac/pasemi_edac.c
62869 --- linux-2.6.24/drivers/edac/pasemi_edac.c 2008-01-24 23:58:37.000000000 +0100
62870 +++ powerpc.git/drivers/edac/pasemi_edac.c 2008-01-28 20:26:00.000000000 +0100
62871 @@ -225,7 +225,7 @@
62873 mci->mod_name = MODULE_NAME;
62874 mci->dev_name = pci_name(pdev);
62875 - mci->ctl_name = "pasemi,1682m-mc";
62876 + mci->ctl_name = "pasemi,pwrficient-mc";
62877 mci->edac_check = pasemi_edac_check;
62878 mci->ctl_page_to_phys = NULL;
62879 pci_read_config_dword(pdev, MCCFG_SCRUB, &scrub);
62880 @@ -297,4 +297,4 @@
62882 MODULE_LICENSE("GPL");
62883 MODULE_AUTHOR("Egor Martovetsky <egor@pasemi.com>");
62884 -MODULE_DESCRIPTION("MC support for PA Semi PA6T-1682M memory controller");
62885 +MODULE_DESCRIPTION("MC support for PA Semi PWRficient memory controller");
62886 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/macintosh/adb.c powerpc.git/drivers/macintosh/adb.c
62887 --- linux-2.6.24/drivers/macintosh/adb.c 2008-01-24 23:58:37.000000000 +0100
62888 +++ powerpc.git/drivers/macintosh/adb.c 2008-01-28 20:26:08.000000000 +0100
62890 #include <linux/spinlock.h>
62891 #include <linux/completion.h>
62892 #include <linux/device.h>
62893 +#include <linux/kthread.h>
62895 #include <asm/uaccess.h>
62896 #include <asm/semaphore.h>
62897 @@ -82,21 +83,11 @@
62898 BLOCKING_NOTIFIER_HEAD(adb_client_list);
62899 static int adb_got_sleep;
62900 static int adb_inited;
62901 -static pid_t adb_probe_task_pid;
62902 static DECLARE_MUTEX(adb_probe_mutex);
62903 -static struct completion adb_probe_task_comp;
62904 static int sleepy_trackpad;
62905 static int autopoll_devs;
62906 int __adb_probe_sync;
62908 -#ifdef CONFIG_PM_SLEEP
62909 -static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when);
62910 -static struct pmu_sleep_notifier adb_sleep_notifier = {
62911 - adb_notify_sleep,
62916 static int adb_scan_bus(void);
62917 static int do_adb_reset_bus(void);
62918 static void adbdev_init(void);
62919 @@ -134,16 +125,6 @@
62924 -static __inline__ void adb_wait_ms(unsigned int ms)
62926 - if (current->pid && adb_probe_task_pid &&
62927 - adb_probe_task_pid == current->pid)
62933 static int adb_scan_bus(void)
62935 int i, highFree=0, noMovement;
62936 @@ -248,13 +229,10 @@
62938 adb_probe_task(void *x)
62940 - strcpy(current->comm, "kadbprobe");
62942 printk(KERN_INFO "adb: starting probe task...\n");
62943 do_adb_reset_bus();
62944 printk(KERN_INFO "adb: finished probe task...\n");
62946 - adb_probe_task_pid = 0;
62947 up(&adb_probe_mutex);
62950 @@ -263,7 +241,7 @@
62952 __adb_probe_task(struct work_struct *bullshit)
62954 - adb_probe_task_pid = kernel_thread(adb_probe_task, NULL, SIGCHLD | CLONE_KERNEL);
62955 + kthread_run(adb_probe_task, NULL, "kadbprobe");
62958 static DECLARE_WORK(adb_reset_work, __adb_probe_task);
62959 @@ -281,6 +259,36 @@
62965 + * notify clients before sleep
62967 +static int adb_suspend(struct platform_device *dev, pm_message_t state)
62969 + adb_got_sleep = 1;
62970 + /* We need to get a lock on the probe thread */
62971 + down(&adb_probe_mutex);
62972 + /* Stop autopoll */
62973 + if (adb_controller->autopoll)
62974 + adb_controller->autopoll(0);
62975 + blocking_notifier_call_chain(&adb_client_list, ADB_MSG_POWERDOWN, NULL);
62981 + * reset bus after sleep
62983 +static int adb_resume(struct platform_device *dev)
62985 + adb_got_sleep = 0;
62986 + up(&adb_probe_mutex);
62991 +#endif /* CONFIG_PM */
62993 int __init adb_init(void)
62995 struct adb_driver *driver;
62996 @@ -313,15 +321,12 @@
62997 printk(KERN_WARNING "Warning: no ADB interface detected\n");
62998 adb_controller = NULL;
63000 -#ifdef CONFIG_PM_SLEEP
63001 - pmu_register_sleep_notifier(&adb_sleep_notifier);
63002 -#endif /* CONFIG_PM */
63004 if (machine_is_compatible("AAPL,PowerBook1998") ||
63005 machine_is_compatible("PowerBook1,1"))
63006 sleepy_trackpad = 1;
63007 #endif /* CONFIG_PPC */
63008 - init_completion(&adb_probe_task_comp);
63013 @@ -330,33 +335,6 @@
63015 __initcall(adb_init);
63019 - * notify clients before sleep and reset bus afterwards
63022 -adb_notify_sleep(struct pmu_sleep_notifier *self, int when)
63025 - case PBOOK_SLEEP_REQUEST:
63026 - adb_got_sleep = 1;
63027 - /* We need to get a lock on the probe thread */
63028 - down(&adb_probe_mutex);
63029 - /* Stop autopoll */
63030 - if (adb_controller->autopoll)
63031 - adb_controller->autopoll(0);
63032 - blocking_notifier_call_chain(&adb_client_list,
63033 - ADB_MSG_POWERDOWN, NULL);
63036 - adb_got_sleep = 0;
63037 - up(&adb_probe_mutex);
63042 -#endif /* CONFIG_PM */
63045 do_adb_reset_bus(void)
63047 @@ -373,7 +351,7 @@
63049 if (sleepy_trackpad) {
63050 /* Let the trackpad settle down */
63051 - adb_wait_ms(500);
63055 down(&adb_handler_sem);
63056 @@ -389,7 +367,7 @@
63058 if (sleepy_trackpad) {
63059 /* Let the trackpad settle down */
63060 - adb_wait_ms(1500);
63065 @@ -413,41 +391,27 @@
63066 adb_controller->poll();
63070 -adb_probe_wakeup(struct adb_request *req)
63071 +static void adb_sync_req_done(struct adb_request *req)
63073 - complete(&adb_probe_task_comp);
63075 + struct completion *comp = req->arg;
63077 -/* Static request used during probe */
63078 -static struct adb_request adb_sreq;
63079 -static unsigned long adb_sreq_lock; // Use semaphore ! */
63084 adb_request(struct adb_request *req, void (*done)(struct adb_request *),
63085 int flags, int nbytes, ...)
63091 + struct completion comp;
63093 if ((adb_controller == NULL) || (adb_controller->send_request == NULL))
63097 - if (req == NULL && (flags & ADBREQ_NOSEND))
63100 - if (req == NULL) {
63101 - if (test_and_set_bit(0,&adb_sreq_lock)) {
63102 - printk("adb.c: Warning: contention on static request !\n");
63106 - flags |= ADBREQ_SYNC;
63111 req->nbytes = nbytes+1;
63113 req->reply_expected = flags & ADBREQ_REPLY;
63114 @@ -460,25 +424,18 @@
63115 if (flags & ADBREQ_NOSEND)
63118 - /* Synchronous requests send from the probe thread cause it to
63119 - * block. Beware that the "done" callback will be overriden !
63121 - if ((flags & ADBREQ_SYNC) &&
63122 - (current->pid && adb_probe_task_pid &&
63123 - adb_probe_task_pid == current->pid)) {
63124 - req->done = adb_probe_wakeup;
63125 - rc = adb_controller->send_request(req, 0);
63126 - if (rc || req->complete)
63128 - wait_for_completion(&adb_probe_task_comp);
63133 - rc = adb_controller->send_request(req, flags & ADBREQ_SYNC);
63136 - clear_bit(0, &adb_sreq_lock);
63137 + /* Synchronous requests block using an on-stack completion */
63138 + if (flags & ADBREQ_SYNC) {
63140 + req->done = adb_sync_req_done;
63141 + req->arg = ∁
63142 + init_completion(&comp);
63145 + rc = adb_controller->send_request(req, 0);
63147 + if ((flags & ADBREQ_SYNC) && !rc && !req->complete)
63148 + wait_for_completion(&comp);
63152 @@ -864,7 +821,29 @@
63153 .release = adb_release,
63157 +static struct platform_driver adb_pfdrv = {
63162 + .suspend = adb_suspend,
63163 + .resume = adb_resume,
63167 +static struct platform_device adb_pfdev = {
63172 +adb_dummy_probe(struct platform_device *dev)
63174 + if (dev == &adb_pfdev)
63179 +static void __init
63182 if (register_chrdev(ADB_MAJOR, "adb", &adb_fops)) {
63183 @@ -876,4 +855,7 @@
63184 if (IS_ERR(adb_dev_class))
63186 class_device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb");
63188 + platform_device_register(&adb_pfdev);
63189 + platform_driver_probe(&adb_pfdrv, adb_dummy_probe);
63191 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/macintosh/mediabay.c powerpc.git/drivers/macintosh/mediabay.c
63192 --- linux-2.6.24/drivers/macintosh/mediabay.c 2008-01-24 23:58:37.000000000 +0100
63193 +++ powerpc.git/drivers/macintosh/mediabay.c 2008-01-28 20:26:08.000000000 +0100
63195 #include <linux/stddef.h>
63196 #include <linux/init.h>
63197 #include <linux/ide.h>
63198 +#include <linux/kthread.h>
63199 #include <asm/prom.h>
63200 #include <asm/pgtable.h>
63201 #include <asm/io.h>
63206 -#define MB_IGNORE_SIGNALS
63209 #define MBDBG(fmt, arg...) printk(KERN_INFO fmt , ## arg)
63210 @@ -622,12 +622,7 @@
63214 - strcpy(current->comm, "media-bay");
63215 -#ifdef MB_IGNORE_SIGNALS
63216 - sigfillset(¤t->blocked);
63220 + while (!kthread_should_stop()) {
63221 for (i = 0; i < media_bay_count; ++i) {
63222 down(&media_bays[i].lock);
63223 if (!media_bays[i].sleeping)
63224 @@ -636,9 +631,8 @@
63227 msleep_interruptible(MB_POLL_DELAY);
63228 - if (signal_pending(current))
63234 static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_device_id *match)
63235 @@ -699,7 +693,7 @@
63237 /* Startup kernel thread */
63239 - kernel_thread(media_bay_task, NULL, CLONE_KERNEL);
63240 + kthread_run(media_bay_task, NULL, "media-bay");
63244 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/macintosh/therm_adt746x.c powerpc.git/drivers/macintosh/therm_adt746x.c
63245 --- linux-2.6.24/drivers/macintosh/therm_adt746x.c 2008-01-24 23:58:37.000000000 +0100
63246 +++ powerpc.git/drivers/macintosh/therm_adt746x.c 2008-01-28 20:26:08.000000000 +0100
63247 @@ -553,6 +553,7 @@
63248 struct device_node* np;
63250 int i = 0, offset = 0;
63253 np = of_find_node_by_name(NULL, "fan");
63255 @@ -612,17 +613,20 @@
63259 - device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature);
63260 - device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature);
63261 - device_create_file(&of_dev->dev, &dev_attr_sensor1_limit);
63262 - device_create_file(&of_dev->dev, &dev_attr_sensor2_limit);
63263 - device_create_file(&of_dev->dev, &dev_attr_sensor1_location);
63264 - device_create_file(&of_dev->dev, &dev_attr_sensor2_location);
63265 - device_create_file(&of_dev->dev, &dev_attr_limit_adjust);
63266 - device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed);
63267 - device_create_file(&of_dev->dev, &dev_attr_sensor1_fan_speed);
63268 + err = device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature);
63269 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature);
63270 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_limit);
63271 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_limit);
63272 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_location);
63273 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_location);
63274 + err |= device_create_file(&of_dev->dev, &dev_attr_limit_adjust);
63275 + err |= device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed);
63276 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_fan_speed);
63277 if(therm_type == ADT7460)
63278 - device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed);
63279 + err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed);
63281 + printk(KERN_WARNING
63282 + "Failed to create tempertaure attribute file(s).\n");
63284 #ifndef CONFIG_I2C_POWERMAC
63285 request_module("i2c-powermac");
63286 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/macintosh/therm_pm72.c powerpc.git/drivers/macintosh/therm_pm72.c
63287 --- linux-2.6.24/drivers/macintosh/therm_pm72.c 2008-01-24 23:58:37.000000000 +0100
63288 +++ powerpc.git/drivers/macintosh/therm_pm72.c 2008-01-28 20:26:08.000000000 +0100
63289 @@ -121,6 +121,7 @@
63290 #include <linux/reboot.h>
63291 #include <linux/kmod.h>
63292 #include <linux/i2c.h>
63293 +#include <linux/kthread.h>
63294 #include <asm/prom.h>
63295 #include <asm/machdep.h>
63296 #include <asm/io.h>
63297 @@ -161,7 +162,7 @@
63299 static int cpu_count;
63300 static int cpu_pid_type;
63301 -static pid_t ctrl_task;
63302 +static struct task_struct *ctrl_task;
63303 static struct completion ctrl_complete;
63304 static int critical_state;
63305 static int rackmac;
63306 @@ -1156,6 +1157,8 @@
63308 static int init_cpu_state(struct cpu_pid_state *state, int index)
63312 state->index = index;
63314 state->rpm = (cpu_pid_type == CPU_PID_TYPE_RACKMAC) ? 4000 : 1000;
63315 @@ -1181,18 +1184,21 @@
63316 DBG("CPU %d Using %d power history entries\n", index, state->count_power);
63319 - device_create_file(&of_dev->dev, &dev_attr_cpu0_temperature);
63320 - device_create_file(&of_dev->dev, &dev_attr_cpu0_voltage);
63321 - device_create_file(&of_dev->dev, &dev_attr_cpu0_current);
63322 - device_create_file(&of_dev->dev, &dev_attr_cpu0_exhaust_fan_rpm);
63323 - device_create_file(&of_dev->dev, &dev_attr_cpu0_intake_fan_rpm);
63324 + err = device_create_file(&of_dev->dev, &dev_attr_cpu0_temperature);
63325 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu0_voltage);
63326 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu0_current);
63327 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu0_exhaust_fan_rpm);
63328 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu0_intake_fan_rpm);
63330 - device_create_file(&of_dev->dev, &dev_attr_cpu1_temperature);
63331 - device_create_file(&of_dev->dev, &dev_attr_cpu1_voltage);
63332 - device_create_file(&of_dev->dev, &dev_attr_cpu1_current);
63333 - device_create_file(&of_dev->dev, &dev_attr_cpu1_exhaust_fan_rpm);
63334 - device_create_file(&of_dev->dev, &dev_attr_cpu1_intake_fan_rpm);
63336 + err = device_create_file(&of_dev->dev, &dev_attr_cpu1_temperature);
63337 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_voltage);
63338 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_current);
63339 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_exhaust_fan_rpm);
63340 + err |= device_create_file(&of_dev->dev, &dev_attr_cpu1_intake_fan_rpm);
63343 + printk(KERN_WARNING "Failed to create some of the atribute"
63344 + "files for CPU %d\n", index);
63348 @@ -1328,6 +1334,7 @@
63350 struct device_node *u3;
63351 int u3h = 1; /* conservative by default */
63355 * There are different PID params for machines with U3 and machines
63356 @@ -1379,8 +1386,11 @@
63357 if (state->monitor == NULL)
63360 - device_create_file(&of_dev->dev, &dev_attr_backside_temperature);
63361 - device_create_file(&of_dev->dev, &dev_attr_backside_fan_pwm);
63362 + err = device_create_file(&of_dev->dev, &dev_attr_backside_temperature);
63363 + err |= device_create_file(&of_dev->dev, &dev_attr_backside_fan_pwm);
63365 + printk(KERN_WARNING "Failed to create attribute file(s)"
63366 + " for backside fan\n");
63370 @@ -1491,6 +1501,8 @@
63372 static int init_drives_state(struct drives_pid_state *state)
63379 @@ -1499,8 +1511,11 @@
63380 if (state->monitor == NULL)
63383 - device_create_file(&of_dev->dev, &dev_attr_drives_temperature);
63384 - device_create_file(&of_dev->dev, &dev_attr_drives_fan_rpm);
63385 + err = device_create_file(&of_dev->dev, &dev_attr_drives_temperature);
63386 + err |= device_create_file(&of_dev->dev, &dev_attr_drives_fan_rpm);
63388 + printk(KERN_WARNING "Failed to create attribute file(s)"
63389 + " for drives bay fan\n");
63393 @@ -1621,7 +1636,9 @@
63394 if (state->monitor == NULL)
63397 - device_create_file(&of_dev->dev, &dev_attr_dimms_temperature);
63398 + if (device_create_file(&of_dev->dev, &dev_attr_dimms_temperature))
63399 + printk(KERN_WARNING "Failed to create attribute file"
63400 + " for DIMM temperature\n");
63404 @@ -1731,6 +1748,8 @@
63406 static int init_slots_state(struct slots_pid_state *state)
63413 @@ -1739,8 +1758,11 @@
63414 if (state->monitor == NULL)
63417 - device_create_file(&of_dev->dev, &dev_attr_slots_temperature);
63418 - device_create_file(&of_dev->dev, &dev_attr_slots_fan_pwm);
63419 + err = device_create_file(&of_dev->dev, &dev_attr_slots_temperature);
63420 + err |= device_create_file(&of_dev->dev, &dev_attr_slots_fan_pwm);
63422 + printk(KERN_WARNING "Failed to create attribute file(s)"
63423 + " for slots bay fan\n");
63427 @@ -1779,8 +1801,6 @@
63429 static int main_control_loop(void *x)
63431 - daemonize("kfand");
63433 DBG("main_control_loop started\n");
63435 down(&driver_lock);
63436 @@ -1956,7 +1976,7 @@
63438 init_completion(&ctrl_complete);
63440 - ctrl_task = kernel_thread(main_control_loop, NULL, SIGCHLD | CLONE_KERNEL);
63441 + ctrl_task = kthread_run(main_control_loop, NULL, "kfand");
63445 @@ -1964,7 +1984,7 @@
63447 static void stop_control_loops(void)
63449 - if (ctrl_task != 0)
63451 wait_for_completion(&ctrl_complete);
63454 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/macintosh/therm_windtunnel.c powerpc.git/drivers/macintosh/therm_windtunnel.c
63455 --- linux-2.6.24/drivers/macintosh/therm_windtunnel.c 2008-01-24 23:58:37.000000000 +0100
63456 +++ powerpc.git/drivers/macintosh/therm_windtunnel.c 2008-01-28 20:26:08.000000000 +0100
63458 #include <linux/i2c.h>
63459 #include <linux/slab.h>
63460 #include <linux/init.h>
63461 +#include <linux/kthread.h>
63463 #include <asm/prom.h>
63464 #include <asm/machdep.h>
63468 volatile int running;
63469 - struct completion completion;
63471 + struct task_struct *poll_task;
63473 struct semaphore lock;
63474 struct of_device *of_dev;
63475 @@ -223,6 +223,7 @@
63476 setup_hardware( void )
63481 /* save registers (if we unload the module) */
63482 x.r0 = read_reg( x.fan, 0x00, 1 );
63483 @@ -265,8 +266,11 @@
63485 /* tune_fan( fan_up_table[x.upind].fan_setting ); */
63487 - device_create_file( &x.of_dev->dev, &dev_attr_cpu_temperature );
63488 - device_create_file( &x.of_dev->dev, &dev_attr_case_temperature );
63489 + err = device_create_file( &x.of_dev->dev, &dev_attr_cpu_temperature );
63490 + err |= device_create_file( &x.of_dev->dev, &dev_attr_case_temperature );
63492 + printk(KERN_WARNING
63493 + "Failed to create temperature attribute file(s).\n");
63497 @@ -282,27 +286,27 @@
63498 write_reg( x.fan, 0x00, x.r0, 1 );
63502 -control_loop( void *dummy )
63503 +static int control_loop(void *dummy)
63505 - daemonize("g4fand");
63512 - while( x.running ) {
63516 msleep_interruptible(8000);
63519 + if (kthread_should_stop())
63532 - complete_and_exit( &x.completion, 0 );
63537 @@ -322,8 +326,7 @@
63538 ret = i2c_probe( adapter, &addr_data, &do_probe );
63539 if( x.thermostat && x.fan ) {
63541 - init_completion( &x.completion );
63542 - x.poll_task = kernel_thread( control_loop, NULL, SIGCHLD | CLONE_KERNEL );
63543 + x.poll_task = kthread_run(control_loop, NULL, "g4fand");
63547 @@ -339,7 +342,8 @@
63551 - wait_for_completion( &x.completion );
63552 + kthread_stop(x.poll_task);
63553 + x.poll_task = NULL;
63555 if( client == x.thermostat )
63556 x.thermostat = NULL;
63557 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/macintosh/via-pmu-backlight.c powerpc.git/drivers/macintosh/via-pmu-backlight.c
63558 --- linux-2.6.24/drivers/macintosh/via-pmu-backlight.c 2008-01-24 23:58:37.000000000 +0100
63559 +++ powerpc.git/drivers/macintosh/via-pmu-backlight.c 2008-01-28 20:26:08.000000000 +0100
63562 static void pmu_backlight_init_curve(u8 off, u8 min, u8 max)
63564 - unsigned int i, flat, count, range = (max - min);
63565 + int i, flat, count, range = (max - min);
63569 @@ -68,17 +68,11 @@
63573 -static int pmu_backlight_update_status(struct backlight_device *bd)
63574 +static int __pmu_backlight_update_status(struct backlight_device *bd)
63576 struct adb_request req;
63577 - unsigned long flags;
63578 int level = bd->props.brightness;
63580 - spin_lock_irqsave(&pmu_backlight_lock, flags);
63582 - /* Don't update brightness when sleeping */
63586 if (bd->props.power != FB_BLANK_UNBLANK ||
63587 bd->props.fb_blank != FB_BLANK_UNBLANK)
63588 @@ -99,12 +93,23 @@
63589 pmu_wait_complete(&req);
63593 - spin_unlock_irqrestore(&pmu_backlight_lock, flags);
63598 +static int pmu_backlight_update_status(struct backlight_device *bd)
63600 + unsigned long flags;
63603 + spin_lock_irqsave(&pmu_backlight_lock, flags);
63604 + /* Don't update brightness when sleeping */
63606 + rc = __pmu_backlight_update_status(bd);
63607 + spin_unlock_irqrestore(&pmu_backlight_lock, flags);
63612 static int pmu_backlight_get_brightness(struct backlight_device *bd)
63614 return bd->props.brightness;
63615 @@ -123,6 +128,16 @@
63617 spin_lock_irqsave(&pmu_backlight_lock, flags);
63619 + if (pmac_backlight) {
63621 + struct adb_request req;
63623 + pmu_request(&req, NULL, 2, PMU_POWER_CTRL,
63624 + PMU_POW_BACKLIGHT | PMU_POW_OFF);
63625 + pmu_wait_complete(&req);
63627 + __pmu_backlight_update_status(pmac_backlight);
63629 spin_unlock_irqrestore(&pmu_backlight_lock, flags);
63631 #endif /* CONFIG_PM */
63632 @@ -148,8 +163,8 @@
63634 bd = backlight_device_register(name, NULL, NULL, &pmu_backlight_data);
63636 - printk("pmubl: Backlight registration failed\n");
63638 + printk(KERN_ERR "PMU Backlight registration failed\n");
63641 bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1;
63642 pmu_backlight_init_curve(0x7F, 0x46, 0x0E);
63643 @@ -171,10 +186,5 @@
63644 bd->props.power = FB_BLANK_UNBLANK;
63645 backlight_update_status(bd);
63647 - printk("pmubl: Backlight initialized (%s)\n", name);
63653 + printk(KERN_INFO "PMU Backlight initialized (%s)\n", name);
63655 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/macintosh/via-pmu.c powerpc.git/drivers/macintosh/via-pmu.c
63656 --- linux-2.6.24/drivers/macintosh/via-pmu.c 2008-01-24 23:58:37.000000000 +0100
63657 +++ powerpc.git/drivers/macintosh/via-pmu.c 2008-01-28 20:26:08.000000000 +0100
63658 @@ -10,13 +10,11 @@
63660 * Copyright (C) 1998 Paul Mackerras and Fabio Riccardi.
63661 * Copyright (C) 2001-2002 Benjamin Herrenschmidt
63662 + * Copyright (C) 2006-2007 Johannes Berg
63664 * THIS DRIVER IS BECOMING A TOTAL MESS !
63665 * - Cleanup atomically disabling reply to PMU events after
63666 * a sleep or a freq. switch
63667 - * - Move sleep code out of here to pmac_pm, merge into new
63668 - * common PM infrastructure
63669 - * - Save/Restore PCI space properly
63672 #include <stdarg.h>
63674 #include <linux/adb.h>
63675 #include <linux/pmu.h>
63676 #include <linux/cuda.h>
63677 -#include <linux/smp_lock.h>
63678 #include <linux/module.h>
63679 #include <linux/spinlock.h>
63680 #include <linux/pm.h>
63682 #include "via-pmu-event.h"
63684 /* Some compile options */
63685 -#undef SUSPEND_USES_PMU
63686 -#define DEBUG_SLEEP
63687 -#undef HACKED_PCI_SAVE
63688 +#undef DEBUG_SLEEP
63690 /* Misc minor number allocated for /dev/pmu */
63691 #define PMU_MINOR 154
63692 @@ -152,12 +147,9 @@
63693 static u8 pmu_intr_mask;
63694 static int pmu_version;
63695 static int drop_interrupts;
63696 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
63697 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
63698 static int option_lid_wakeup = 1;
63699 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
63700 -#if (defined(CONFIG_PM_SLEEP)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT_LEGACY)
63701 -static int sleep_in_progress;
63703 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
63704 static unsigned long async_req_locks;
63705 static unsigned int pmu_irq_stats[11];
63707 @@ -177,7 +169,6 @@
63711 -BLOCKING_NOTIFIER_HEAD(sleep_notifier_list);
63714 static int adb_dev_map;
63715 @@ -224,7 +215,7 @@
63718 int pmu_polled_request(struct adb_request *req);
63719 -int pmu_wink(struct adb_request *req);
63720 +void pmu_blink(int n);
63724 @@ -875,7 +866,7 @@
63728 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
63729 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
63730 if (pmu_kind == PMU_KEYLARGO_BASED &&
63731 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0)
63732 p += sprintf(p, "lid_wakeup=%d\n", option_lid_wakeup);
63733 @@ -916,7 +907,7 @@
63737 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
63738 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
63739 if (pmu_kind == PMU_KEYLARGO_BASED &&
63740 pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0)
63741 if (!strcmp(label, "lid_wakeup"))
63742 @@ -1256,9 +1247,7 @@
63745 unsigned long flags;
63746 -#ifdef SUSPEND_USES_PMU
63747 - struct adb_request *req;
63753 @@ -1276,17 +1265,10 @@
63754 via_pmu_interrupt(0, NULL);
63755 spin_lock_irqsave(&pmu_lock, flags);
63756 if (!adb_int_pending && pmu_state == idle && !req_awaiting_reply) {
63757 -#ifdef SUSPEND_USES_PMU
63758 - pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, 0);
63759 - spin_unlock_irqrestore(&pmu_lock, flags);
63760 - while(!req.complete)
63762 -#else /* SUSPEND_USES_PMU */
63764 disable_irq_nosync(gpio_irq);
63765 out_8(&via[IER], CB1_INT | IER_CLR);
63766 spin_unlock_irqrestore(&pmu_lock, flags);
63767 -#endif /* SUSPEND_USES_PMU */
63771 @@ -1307,18 +1289,11 @@
63774 adb_int_pending = 1;
63775 -#ifdef SUSPEND_USES_PMU
63776 - pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask);
63777 - spin_unlock_irqrestore(&pmu_lock, flags);
63778 - while(!req.complete)
63780 -#else /* SUSPEND_USES_PMU */
63782 enable_irq(gpio_irq);
63783 out_8(&via[IER], CB1_INT | IER_SET);
63784 spin_unlock_irqrestore(&pmu_lock, flags);
63786 -#endif /* SUSPEND_USES_PMU */
63789 /* Interrupt data could be the result data from an ADB cmd */
63790 @@ -1738,228 +1713,7 @@
63794 -#ifdef CONFIG_PM_SLEEP
63796 -static LIST_HEAD(sleep_notifiers);
63799 -pmu_register_sleep_notifier(struct pmu_sleep_notifier *n)
63801 - struct list_head *list;
63802 - struct pmu_sleep_notifier *notifier;
63804 - for (list = sleep_notifiers.next; list != &sleep_notifiers;
63805 - list = list->next) {
63806 - notifier = list_entry(list, struct pmu_sleep_notifier, list);
63807 - if (n->priority > notifier->priority)
63810 - __list_add(&n->list, list->prev, list);
63813 -EXPORT_SYMBOL(pmu_register_sleep_notifier);
63816 -pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* n)
63818 - if (n->list.next == 0)
63820 - list_del(&n->list);
63821 - n->list.next = NULL;
63824 -EXPORT_SYMBOL(pmu_unregister_sleep_notifier);
63825 -#endif /* CONFIG_PM_SLEEP */
63827 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
63829 -/* Sleep is broadcast last-to-first */
63830 -static void broadcast_sleep(int when)
63832 - struct list_head *list;
63833 - struct pmu_sleep_notifier *notifier;
63835 - for (list = sleep_notifiers.prev; list != &sleep_notifiers;
63836 - list = list->prev) {
63837 - notifier = list_entry(list, struct pmu_sleep_notifier, list);
63838 - notifier->notifier_call(notifier, when);
63842 -/* Wake is broadcast first-to-last */
63843 -static void broadcast_wake(void)
63845 - struct list_head *list;
63846 - struct pmu_sleep_notifier *notifier;
63848 - for (list = sleep_notifiers.next; list != &sleep_notifiers;
63849 - list = list->next) {
63850 - notifier = list_entry(list, struct pmu_sleep_notifier, list);
63851 - notifier->notifier_call(notifier, PBOOK_WAKE);
63856 - * This struct is used to store config register values for
63857 - * PCI devices which may get powered off when we sleep.
63859 -static struct pci_save {
63860 -#ifndef HACKED_PCI_SAVE
63868 -} *pbook_pci_saves;
63869 -static int pbook_npci_saves;
63872 -pbook_alloc_pci_save(void)
63875 - struct pci_dev *pd = NULL;
63878 - while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
63883 - pbook_pci_saves = (struct pci_save *)
63884 - kmalloc(npci * sizeof(struct pci_save), GFP_KERNEL);
63885 - pbook_npci_saves = npci;
63889 -pbook_free_pci_save(void)
63891 - if (pbook_pci_saves == NULL)
63893 - kfree(pbook_pci_saves);
63894 - pbook_pci_saves = NULL;
63895 - pbook_npci_saves = 0;
63899 -pbook_pci_save(void)
63901 - struct pci_save *ps = pbook_pci_saves;
63902 - struct pci_dev *pd = NULL;
63903 - int npci = pbook_npci_saves;
63908 - while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
63909 - if (npci-- == 0) {
63913 -#ifndef HACKED_PCI_SAVE
63914 - pci_read_config_word(pd, PCI_COMMAND, &ps->command);
63915 - pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
63916 - pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr);
63917 - pci_read_config_dword(pd, PCI_ROM_ADDRESS, &ps->rom_address);
63920 - for (i=1;i<16;i++)
63921 - pci_read_config_dword(pd, i<<4, &ps->config[i]);
63927 -/* For this to work, we must take care of a few things: If gmac was enabled
63928 - * during boot, it will be in the pci dev list. If it's disabled at this point
63929 - * (and it will probably be), then you can't access it's config space.
63932 -pbook_pci_restore(void)
63935 - struct pci_save *ps = pbook_pci_saves - 1;
63936 - struct pci_dev *pd = NULL;
63937 - int npci = pbook_npci_saves;
63940 - while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
63941 -#ifdef HACKED_PCI_SAVE
63943 - if (npci-- == 0) {
63948 - for (i=2;i<16;i++)
63949 - pci_write_config_dword(pd, i<<4, ps->config[i]);
63950 - pci_write_config_dword(pd, 4, ps->config[1]);
63955 - if (ps->command == 0)
63957 - pci_read_config_word(pd, PCI_COMMAND, &cmd);
63958 - if ((ps->command & ~cmd) == 0)
63960 - switch (pd->hdr_type) {
63961 - case PCI_HEADER_TYPE_NORMAL:
63962 - for (j = 0; j < 6; ++j)
63963 - pci_write_config_dword(pd,
63964 - PCI_BASE_ADDRESS_0 + j*4,
63965 - pd->resource[j].start);
63966 - pci_write_config_dword(pd, PCI_ROM_ADDRESS,
63967 - ps->rom_address);
63968 - pci_write_config_word(pd, PCI_CACHE_LINE_SIZE,
63970 - pci_write_config_word(pd, PCI_INTERRUPT_LINE,
63972 - pci_write_config_word(pd, PCI_COMMAND, ps->command);
63979 -#ifdef DEBUG_SLEEP
63980 -/* N.B. This doesn't work on the 3400 */
63984 - struct adb_request req;
63986 - memset(&req, 0, sizeof(req));
63988 - for (; n > 0; --n) {
63991 - req.data[0] = 0xee;
63995 - req.reply[0] = ADB_RET_OK;
63996 - req.reply_len = 1;
63997 - req.reply_expected = 0;
63998 - pmu_polled_request(&req);
64002 - req.data[0] = 0xee;
64006 - req.reply[0] = ADB_RET_OK;
64007 - req.reply_len = 1;
64008 - req.reply_expected = 0;
64009 - pmu_polled_request(&req);
64016 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64018 * Put the powerbook to sleep.
64020 @@ -1994,134 +1748,6 @@
64021 out_8(&via[IER], IER_SET | SR_INT | CB1_INT);
64024 -extern void pmu_backlight_set_sleep(int sleep);
64027 -pmac_suspend_devices(void)
64031 - pm_prepare_console();
64033 - /* Notify old-style device drivers */
64034 - broadcast_sleep(PBOOK_SLEEP_REQUEST);
64036 - /* Sync the disks. */
64037 - /* XXX It would be nice to have some way to ensure that
64038 - * nobody is dirtying any new buffers while we wait. That
64039 - * could be achieved using the refrigerator for processes
64040 - * that swsusp uses
64044 - broadcast_sleep(PBOOK_SLEEP_NOW);
64046 - /* Send suspend call to devices, hold the device core's dpm_sem */
64047 - ret = device_suspend(PMSG_SUSPEND);
64049 - broadcast_wake();
64050 - printk(KERN_ERR "Driver sleep failed\n");
64054 -#ifdef CONFIG_PMAC_BACKLIGHT
64055 - /* Tell backlight code not to muck around with the chip anymore */
64056 - pmu_backlight_set_sleep(1);
64059 - /* Call platform functions marked "on sleep" */
64060 - pmac_pfunc_i2c_suspend();
64061 - pmac_pfunc_base_suspend();
64063 - /* Stop preemption */
64064 - preempt_disable();
64066 - /* Make sure the decrementer won't interrupt us */
64067 - asm volatile("mtdec %0" : : "r" (0x7fffffff));
64068 - /* Make sure any pending DEC interrupt occurring while we did
64069 - * the above didn't re-enable the DEC */
64071 - asm volatile("mtdec %0" : : "r" (0x7fffffff));
64073 - /* We can now disable MSR_EE. This code of course works properly only
64074 - * on UP machines... For SMP, if we ever implement sleep, we'll have to
64075 - * stop the "other" CPUs way before we do all that stuff.
64077 - local_irq_disable();
64079 - /* Broadcast power down irq
64080 - * This isn't that useful in most cases (only directly wired devices can
64081 - * use this but still... This will take care of sysdev's as well, so
64082 - * we exit from here with local irqs disabled and PIC off.
64084 - ret = device_power_down(PMSG_SUSPEND);
64086 - wakeup_decrementer();
64087 - local_irq_enable();
64088 - preempt_enable();
64090 - broadcast_wake();
64091 - printk(KERN_ERR "Driver powerdown failed\n");
64095 - /* Wait for completion of async requests */
64096 - while (!batt_req.complete)
64099 - /* Giveup the lazy FPU & vec so we don't have to back them
64100 - * up from the low level code
64102 - enable_kernel_fp();
64104 -#ifdef CONFIG_ALTIVEC
64105 - if (cpu_has_feature(CPU_FTR_ALTIVEC))
64106 - enable_kernel_altivec();
64107 -#endif /* CONFIG_ALTIVEC */
64113 -pmac_wakeup_devices(void)
64117 -#ifdef CONFIG_PMAC_BACKLIGHT
64118 - /* Tell backlight code it can use the chip again */
64119 - pmu_backlight_set_sleep(0);
64122 - /* Power back up system devices (including the PIC) */
64123 - device_power_up();
64125 - /* Force a poll of ADB interrupts */
64126 - adb_int_pending = 1;
64127 - via_pmu_interrupt(0, NULL);
64129 - /* Restart jiffies & scheduling */
64130 - wakeup_decrementer();
64132 - /* Re-enable local CPU interrupts */
64133 - local_irq_enable();
64135 - preempt_enable();
64137 - /* Call platform functions marked "on wake" */
64138 - pmac_pfunc_base_resume();
64139 - pmac_pfunc_i2c_resume();
64141 - /* Resume devices */
64144 - /* Notify old style drivers */
64145 - broadcast_wake();
64147 - pm_restore_console();
64152 #define GRACKLE_PM (1<<7)
64153 #define GRACKLE_DOZE (1<<5)
64154 #define GRACKLE_NAP (1<<4)
64155 @@ -2132,19 +1758,12 @@
64156 unsigned long save_l2cr;
64157 unsigned short pmcr1;
64158 struct adb_request req;
64160 struct pci_dev *grackle;
64162 grackle = pci_get_bus_and_slot(0, 0);
64166 - ret = pmac_suspend_devices();
64168 - printk(KERN_ERR "Sleep rejected by devices\n");
64172 /* Turn off various things. Darwin does some retry tests here... */
64173 pmu_request(&req, NULL, 2, PMU_POWER_CTRL0, PMU_POW0_OFF|PMU_POW0_HARD_DRIVE);
64174 pmu_wait_complete(&req);
64175 @@ -2207,8 +1826,6 @@
64176 PMU_POW_ON|PMU_POW_BACKLIGHT|PMU_POW_CHARGER|PMU_POW_IRLED|PMU_POW_MEDIABAY);
64177 pmu_wait_complete(&req);
64179 - pmac_wakeup_devices();
64184 @@ -2218,7 +1835,6 @@
64185 unsigned long save_l2cr;
64186 unsigned long save_l3cr;
64187 struct adb_request req;
64190 if (pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) < 0) {
64191 printk(KERN_ERR "Sleep mode not supported on this machine\n");
64192 @@ -2228,12 +1844,6 @@
64193 if (num_online_cpus() > 1 || cpu_is_offline(0))
64196 - ret = pmac_suspend_devices();
64198 - printk(KERN_ERR "Sleep rejected by devices\n");
64202 /* Stop environment and ADB interrupts */
64203 pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, 0);
64204 pmu_wait_complete(&req);
64205 @@ -2304,45 +1914,33 @@
64206 /* Restore LPJ, cpufreq will adjust the cpu frequency */
64207 loops_per_jiffy /= 2;
64209 - pmac_wakeup_devices();
64214 #define PB3400_MEM_CTRL 0xf8000000
64215 #define PB3400_MEM_CTRL_SLEEP 0x70
64218 -powerbook_sleep_3400(void)
64219 +static void __iomem *pb3400_mem_ctrl;
64221 +static void powerbook_sleep_init_3400(void)
64224 + /* map in the memory controller registers */
64225 + pb3400_mem_ctrl = ioremap(PB3400_MEM_CTRL, 0x100);
64226 + if (pb3400_mem_ctrl == NULL)
64227 + printk(KERN_WARNING "ioremap failed: sleep won't be possible");
64230 +static int powerbook_sleep_3400(void)
64235 + unsigned long msr;
64236 struct adb_request sleep_req;
64237 - void __iomem *mem_ctrl;
64238 unsigned int __iomem *mem_ctrl_sleep;
64240 - /* first map in the memory controller registers */
64241 - mem_ctrl = ioremap(PB3400_MEM_CTRL, 0x100);
64242 - if (mem_ctrl == NULL) {
64243 - printk("powerbook_sleep_3400: ioremap failed\n");
64244 + if (pb3400_mem_ctrl == NULL)
64247 - mem_ctrl_sleep = mem_ctrl + PB3400_MEM_CTRL_SLEEP;
64249 - /* Allocate room for PCI save */
64250 - pbook_alloc_pci_save();
64252 - ret = pmac_suspend_devices();
64254 - pbook_free_pci_save();
64255 - iounmap(mem_ctrl);
64256 - printk(KERN_ERR "Sleep rejected by devices\n");
64260 - /* Save the state of PCI config space for some slots */
64261 - pbook_pci_save();
64262 + mem_ctrl_sleep = pb3400_mem_ctrl + PB3400_MEM_CTRL_SLEEP;
64264 /* Set the memory controller to keep the memory refreshed
64265 while we're asleep */
64266 @@ -2357,41 +1955,34 @@
64268 /* Ask the PMU to put us to sleep */
64269 pmu_request(&sleep_req, NULL, 5, PMU_SLEEP, 'M', 'A', 'T', 'T');
64270 - while (!sleep_req.complete)
64272 + pmu_wait_complete(&sleep_req);
64275 - pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,1);
64276 + pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, 1);
64278 - /* displacement-flush the L2 cache - necessary? */
64279 - for (p = KERNELBASE; p < KERNELBASE + 0x100000; p += 0x1000)
64280 - i = *(volatile int *)p;
64283 /* Put the CPU into sleep mode */
64284 hid0 = mfspr(SPRN_HID0);
64285 hid0 = (hid0 & ~(HID0_NAP | HID0_DOZE)) | HID0_SLEEP;
64286 mtspr(SPRN_HID0, hid0);
64287 - mtmsr(mfmsr() | MSR_POW | MSR_EE);
64289 + local_irq_enable();
64290 + msr = mfmsr() | MSR_POW;
64296 + local_irq_disable();
64298 /* OK, we're awake again, start restoring things */
64299 out_be32(mem_ctrl_sleep, 0x3f);
64300 - pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,0);
64301 - pbook_pci_restore();
64304 - /* wait for the PMU interrupt sequence to complete */
64308 - pmac_wakeup_devices();
64309 - pbook_free_pci_save();
64310 - iounmap(mem_ctrl);
64311 + pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, 0);
64316 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64317 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
64320 * Support for /dev/pmu device
64321 @@ -2548,7 +2139,6 @@
64322 struct pmu_private *pp = file->private_data;
64323 unsigned long flags;
64327 file->private_data = NULL;
64328 spin_lock_irqsave(&all_pvt_lock, flags);
64329 @@ -2562,10 +2152,96 @@
64337 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64338 +static void pmac_suspend_disable_irqs(void)
64340 + /* Call platform functions marked "on sleep" */
64341 + pmac_pfunc_i2c_suspend();
64342 + pmac_pfunc_base_suspend();
64345 +static int powerbook_sleep(suspend_state_t state)
64349 + /* Wait for completion of async requests */
64350 + while (!batt_req.complete)
64353 + /* Giveup the lazy FPU & vec so we don't have to back them
64354 + * up from the low level code
64356 + enable_kernel_fp();
64358 +#ifdef CONFIG_ALTIVEC
64359 + if (cpu_has_feature(CPU_FTR_ALTIVEC))
64360 + enable_kernel_altivec();
64361 +#endif /* CONFIG_ALTIVEC */
64363 + switch (pmu_kind) {
64364 + case PMU_OHARE_BASED:
64365 + error = powerbook_sleep_3400();
64367 + case PMU_HEATHROW_BASED:
64368 + case PMU_PADDINGTON_BASED:
64369 + error = powerbook_sleep_grackle();
64371 + case PMU_KEYLARGO_BASED:
64372 + error = powerbook_sleep_Core99();
64386 +static void pmac_suspend_enable_irqs(void)
64388 + /* Force a poll of ADB interrupts */
64389 + adb_int_pending = 1;
64390 + via_pmu_interrupt(0, NULL);
64394 + /* Call platform functions marked "on wake" */
64395 + pmac_pfunc_base_resume();
64396 + pmac_pfunc_i2c_resume();
64399 +static int pmu_sleep_valid(suspend_state_t state)
64401 + return state == PM_SUSPEND_MEM
64402 + && (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) >= 0);
64405 +static struct platform_suspend_ops pmu_pm_ops = {
64406 + .enter = powerbook_sleep,
64407 + .valid = pmu_sleep_valid,
64410 +static int register_pmu_pm_ops(void)
64412 + if (pmu_kind == PMU_OHARE_BASED)
64413 + powerbook_sleep_init_3400();
64414 + ppc_md.suspend_disable_irqs = pmac_suspend_disable_irqs;
64415 + ppc_md.suspend_enable_irqs = pmac_suspend_enable_irqs;
64416 + suspend_set_ops(&pmu_pm_ops);
64421 +device_initcall(register_pmu_pm_ops);
64425 pmu_ioctl(struct inode * inode, struct file *filp,
64426 u_int cmd, u_long arg)
64427 @@ -2574,35 +2250,15 @@
64428 int error = -EINVAL;
64431 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
64432 case PMU_IOC_SLEEP:
64433 if (!capable(CAP_SYS_ADMIN))
64435 - if (sleep_in_progress)
64437 - sleep_in_progress = 1;
64438 - switch (pmu_kind) {
64439 - case PMU_OHARE_BASED:
64440 - error = powerbook_sleep_3400();
64442 - case PMU_HEATHROW_BASED:
64443 - case PMU_PADDINGTON_BASED:
64444 - error = powerbook_sleep_grackle();
64446 - case PMU_KEYLARGO_BASED:
64447 - error = powerbook_sleep_Core99();
64452 - sleep_in_progress = 0;
64454 + return pm_suspend(PM_SUSPEND_MEM);
64455 case PMU_IOC_CAN_SLEEP:
64456 - if (pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) < 0)
64457 + if (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) < 0)
64458 return put_user(0, argp);
64460 return put_user(1, argp);
64461 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64463 #ifdef CONFIG_PMAC_BACKLIGHT_LEGACY
64464 /* Compatibility ioctl's for backlight */
64465 @@ -2610,9 +2266,6 @@
64469 - if (sleep_in_progress)
64472 brightness = pmac_backlight_get_legacy_brightness();
64473 if (brightness < 0)
64475 @@ -2624,9 +2277,6 @@
64479 - if (sleep_in_progress)
64482 error = get_user(brightness, argp);
64485 @@ -2751,15 +2401,43 @@
64486 local_irq_restore(flags);
64489 -#endif /* DEBUG_SLEEP */
64491 +/* N.B. This doesn't work on the 3400 */
64492 +void pmu_blink(int n)
64494 + struct adb_request req;
64496 -/* FIXME: This is a temporary set of callbacks to enable us
64497 - * to do suspend-to-disk.
64499 + memset(&req, 0, sizeof(req));
64501 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
64502 + for (; n > 0; --n) {
64505 + req.data[0] = 0xee;
64509 + req.reply[0] = ADB_RET_OK;
64510 + req.reply_len = 1;
64511 + req.reply_expected = 0;
64512 + pmu_polled_request(&req);
64516 + req.data[0] = 0xee;
64520 + req.reply[0] = ADB_RET_OK;
64521 + req.reply_len = 1;
64522 + req.reply_expected = 0;
64523 + pmu_polled_request(&req);
64528 +#endif /* DEBUG_SLEEP */
64530 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64531 int pmu_sys_suspended;
64533 static int pmu_sys_suspend(struct sys_device *sysdev, pm_message_t state)
64534 @@ -2767,10 +2445,15 @@
64535 if (state.event != PM_EVENT_SUSPEND || pmu_sys_suspended)
64538 - /* Suspend PMU event interrupts */
64539 + /* Suspend PMU event interrupts */\
64542 pmu_sys_suspended = 1;
64544 +#ifdef CONFIG_PMAC_BACKLIGHT
64545 + /* Tell backlight code not to muck around with the chip anymore */
64546 + pmu_backlight_set_sleep(1);
64552 @@ -2785,15 +2468,18 @@
64553 pmu_request(&req, NULL, 2, PMU_SYSTEM_READY, 2);
64554 pmu_wait_complete(&req);
64556 +#ifdef CONFIG_PMAC_BACKLIGHT
64557 + /* Tell backlight code it can use the chip again */
64558 + pmu_backlight_set_sleep(0);
64560 /* Resume PMU event interrupts */
64563 pmu_sys_suspended = 0;
64568 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64569 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
64571 static struct sysdev_class pmu_sysclass = {
64572 set_kset_name("pmu"),
64573 @@ -2804,10 +2490,10 @@
64576 static struct sysdev_driver driver_pmu = {
64577 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
64578 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64579 .suspend = &pmu_sys_suspend,
64580 .resume = &pmu_sys_resume,
64581 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64582 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
64585 static int __init init_pmu_sysfs(void)
64586 @@ -2842,10 +2528,10 @@
64587 EXPORT_SYMBOL(pmu_suspend);
64588 EXPORT_SYMBOL(pmu_resume);
64589 EXPORT_SYMBOL(pmu_unlock);
64590 -#if defined(CONFIG_PPC32)
64591 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64592 EXPORT_SYMBOL(pmu_enable_irled);
64593 EXPORT_SYMBOL(pmu_battery_count);
64594 EXPORT_SYMBOL(pmu_batteries);
64595 EXPORT_SYMBOL(pmu_power_flags);
64596 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64597 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
64599 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/net/fs_enet/fs_enet-main.c powerpc.git/drivers/net/fs_enet/fs_enet-main.c
64600 --- linux-2.6.24/drivers/net/fs_enet/fs_enet-main.c 2008-01-24 23:58:37.000000000 +0100
64601 +++ powerpc.git/drivers/net/fs_enet/fs_enet-main.c 2008-01-28 20:26:12.000000000 +0100
64602 @@ -1178,8 +1178,15 @@
64603 struct device_node *phynode, *mdionode;
64604 struct resource res;
64608 + data = of_get_property(np, "fixed-link", NULL);
64610 + snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data);
64614 - const u32 *data = of_get_property(np, "phy-handle", &len);
64615 + data = of_get_property(np, "phy-handle", &len);
64616 if (!data || len != 4)
64619 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/net/fs_enet/mac-fcc.c powerpc.git/drivers/net/fs_enet/mac-fcc.c
64620 --- linux-2.6.24/drivers/net/fs_enet/mac-fcc.c 2008-01-24 23:58:37.000000000 +0100
64621 +++ powerpc.git/drivers/net/fs_enet/mac-fcc.c 2008-01-28 20:26:12.000000000 +0100
64623 static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 op)
64625 const struct fs_platform_info *fpi = fep->fpi;
64628 - W32(cpmp, cp_cpcr, fpi->cp_command | op | CPM_CR_FLG);
64629 - for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
64630 - if ((R32(cpmp, cp_cpcr) & CPM_CR_FLG) == 0)
64633 - printk(KERN_ERR "%s(): Not able to issue CPM command\n",
64636 + return cpm_command(fpi->cp_command, op);
64639 static int do_pd_setup(struct fs_enet_private *fep)
64640 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/net/fs_enet/mac-scc.c powerpc.git/drivers/net/fs_enet/mac-scc.c
64641 --- linux-2.6.24/drivers/net/fs_enet/mac-scc.c 2008-01-24 23:58:37.000000000 +0100
64642 +++ powerpc.git/drivers/net/fs_enet/mac-scc.c 2008-01-28 20:26:12.000000000 +0100
64643 @@ -89,21 +89,12 @@
64644 * Delay to wait for SCC reset command to complete (in us)
64646 #define SCC_RESET_DELAY 50
64647 -#define MAX_CR_CMD_LOOPS 10000
64649 static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op)
64651 const struct fs_platform_info *fpi = fep->fpi;
64654 - W16(cpmp, cp_cpcr, fpi->cp_command | CPM_CR_FLG | (op << 8));
64655 - for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
64656 - if ((R16(cpmp, cp_cpcr) & CPM_CR_FLG) == 0)
64659 - printk(KERN_ERR "%s(): Not able to issue CPM command\n",
64662 + return cpm_command(fpi->cp_command, op);
64665 static int do_pd_setup(struct fs_enet_private *fep)
64666 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/net/ibm_newemac/core.c powerpc.git/drivers/net/ibm_newemac/core.c
64667 --- linux-2.6.24/drivers/net/ibm_newemac/core.c 2008-01-24 23:58:37.000000000 +0100
64668 +++ powerpc.git/drivers/net/ibm_newemac/core.c 2008-01-28 20:26:12.000000000 +0100
64670 #include <linux/mii.h>
64671 #include <linux/bitops.h>
64672 #include <linux/workqueue.h>
64673 +#include <linux/of.h>
64675 #include <asm/processor.h>
64676 #include <asm/io.h>
64677 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/net/phy/Kconfig powerpc.git/drivers/net/phy/Kconfig
64678 --- linux-2.6.24/drivers/net/phy/Kconfig 2008-01-24 23:58:37.000000000 +0100
64679 +++ powerpc.git/drivers/net/phy/Kconfig 2008-01-28 20:26:14.000000000 +0100
64680 @@ -61,34 +61,12 @@
64681 Currently supports the IP175C PHY.
64684 - tristate "Drivers for PHY emulation on fixed speed/link"
64685 + bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs"
64687 - Adds the driver to PHY layer to cover the boards that do not have any PHY bound,
64688 - but with the ability to manipulate the speed/link in software. The relevant MII
64689 - speed/duplex parameters could be effectively handled in a user-specified function.
64690 - Currently tested with mpc866ads.
64691 + Adds the platform "fixed" MDIO Bus to cover the boards that use
64692 + PHYs that are not connected to the real MDIO bus.
64694 -config FIXED_MII_10_FDX
64695 - bool "Emulation for 10M Fdx fixed PHY behavior"
64696 - depends on FIXED_PHY
64698 -config FIXED_MII_100_FDX
64699 - bool "Emulation for 100M Fdx fixed PHY behavior"
64700 - depends on FIXED_PHY
64702 -config FIXED_MII_1000_FDX
64703 - bool "Emulation for 1000M Fdx fixed PHY behavior"
64704 - depends on FIXED_PHY
64706 -config FIXED_MII_AMNT
64707 - int "Number of emulated PHYs to allocate "
64708 - depends on FIXED_PHY
64711 - Sometimes it is required to have several independent emulated
64712 - PHYs on the bus (in case of multi-eth but phy-less HW for instance).
64713 - This control will have specified number allocated for each fixed
64714 - PHY type enabled.
64715 + Currently tested with mpc866ads and mpc8349e-mitx.
64717 config MDIO_BITBANG
64718 tristate "Support for bitbanged MDIO buses"
64719 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/net/phy/fixed.c powerpc.git/drivers/net/phy/fixed.c
64720 --- linux-2.6.24/drivers/net/phy/fixed.c 2008-01-24 23:58:37.000000000 +0100
64721 +++ powerpc.git/drivers/net/phy/fixed.c 2008-01-28 20:26:14.000000000 +0100
64722 @@ -1,362 +1,253 @@
64724 - * drivers/net/phy/fixed.c
64725 + * Fixed MDIO bus (MDIO bus emulation with fixed PHYs)
64727 - * Driver for fixed PHYs, when transceiver is able to operate in one fixed mode.
64728 + * Author: Vitaly Bordug <vbordug@ru.mvista.com>
64729 + * Anton Vorontsov <avorontsov@ru.mvista.com>
64731 - * Author: Vitaly Bordug
64733 - * Copyright (c) 2006 MontaVista Software, Inc.
64734 + * Copyright (c) 2006-2007 MontaVista Software, Inc.
64736 * This program is free software; you can redistribute it and/or modify it
64737 * under the terms of the GNU General Public License as published by the
64738 * Free Software Foundation; either version 2 of the License, or (at your
64739 * option) any later version.
64743 #include <linux/kernel.h>
64744 -#include <linux/string.h>
64745 -#include <linux/errno.h>
64746 -#include <linux/unistd.h>
64747 -#include <linux/slab.h>
64748 -#include <linux/interrupt.h>
64749 -#include <linux/init.h>
64750 -#include <linux/delay.h>
64751 -#include <linux/netdevice.h>
64752 -#include <linux/etherdevice.h>
64753 -#include <linux/skbuff.h>
64754 -#include <linux/spinlock.h>
64755 -#include <linux/mm.h>
64756 #include <linux/module.h>
64757 +#include <linux/platform_device.h>
64758 +#include <linux/list.h>
64759 #include <linux/mii.h>
64760 -#include <linux/ethtool.h>
64761 #include <linux/phy.h>
64762 #include <linux/phy_fixed.h>
64764 -#include <asm/io.h>
64765 -#include <asm/irq.h>
64766 -#include <asm/uaccess.h>
64768 -/* we need to track the allocated pointers in order to free them on exit */
64769 -static struct fixed_info *fixed_phy_ptrs[CONFIG_FIXED_MII_AMNT*MAX_PHY_AMNT];
64771 -/*-----------------------------------------------------------------------------
64772 - * If something weird is required to be done with link/speed,
64773 - * network driver is able to assign a function to implement this.
64774 - * May be useful for PHY's that need to be software-driven.
64775 - *-----------------------------------------------------------------------------*/
64776 -int fixed_mdio_set_link_update(struct phy_device *phydev,
64777 - int (*link_update) (struct net_device *,
64778 - struct fixed_phy_status *))
64780 - struct fixed_info *fixed;
64782 - if (link_update == NULL)
64784 +#define MII_REGS_NUM 29
64787 - if (phydev->bus) {
64788 - fixed = phydev->bus->priv;
64789 - fixed->link_update = link_update;
64796 -EXPORT_SYMBOL(fixed_mdio_set_link_update);
64797 +struct fixed_mdio_bus {
64798 + int irqs[PHY_MAX_ADDR];
64799 + struct mii_bus mii_bus;
64800 + struct list_head phys;
64803 -struct fixed_info *fixed_mdio_get_phydev (int phydev_ind)
64805 - if (phydev_ind >= MAX_PHY_AMNT)
64807 - return fixed_phy_ptrs[phydev_ind];
64809 +struct fixed_phy {
64811 + u16 regs[MII_REGS_NUM];
64812 + struct phy_device *phydev;
64813 + struct fixed_phy_status status;
64814 + int (*link_update)(struct net_device *, struct fixed_phy_status *);
64815 + struct list_head node;
64818 -EXPORT_SYMBOL(fixed_mdio_get_phydev);
64819 +static struct platform_device *pdev;
64820 +static struct fixed_mdio_bus platform_fmb = {
64821 + .phys = LIST_HEAD_INIT(platform_fmb.phys),
64824 -/*-----------------------------------------------------------------------------
64825 - * This is used for updating internal mii regs from the status
64826 - *-----------------------------------------------------------------------------*/
64827 -#if defined(CONFIG_FIXED_MII_100_FDX) || defined(CONFIG_FIXED_MII_10_FDX) || defined(CONFIG_FIXED_MII_1000_FDX)
64828 -static int fixed_mdio_update_regs(struct fixed_info *fixed)
64829 +static int fixed_phy_update_regs(struct fixed_phy *fp)
64831 - u16 *regs = fixed->regs;
64833 + u16 bmsr = BMSR_ANEGCAPABLE;
64839 - printk(KERN_ERR "%s: regs not set up", __FUNCTION__);
64843 - if (fixed->phy_status.link)
64844 - bmsr |= BMSR_LSTATUS;
64846 - if (fixed->phy_status.duplex) {
64847 + if (fp->status.duplex) {
64848 bmcr |= BMCR_FULLDPLX;
64850 - switch (fixed->phy_status.speed) {
64851 + switch (fp->status.speed) {
64853 + bmsr |= BMSR_ESTATEN;
64854 + bmcr |= BMCR_SPEED1000;
64855 + lpagb |= LPA_1000FULL;
64858 bmsr |= BMSR_100FULL;
64859 bmcr |= BMCR_SPEED100;
64860 + lpa |= LPA_100FULL;
64864 bmsr |= BMSR_10FULL;
64865 + lpa |= LPA_10FULL;
64868 + printk(KERN_WARNING "fixed phy: unknown speed\n");
64872 - switch (fixed->phy_status.speed) {
64873 + switch (fp->status.speed) {
64875 + bmsr |= BMSR_ESTATEN;
64876 + bmcr |= BMCR_SPEED1000;
64877 + lpagb |= LPA_1000HALF;
64880 bmsr |= BMSR_100HALF;
64881 bmcr |= BMCR_SPEED100;
64882 + lpa |= LPA_100HALF;
64886 - bmsr |= BMSR_100HALF;
64887 + bmsr |= BMSR_10HALF;
64888 + lpa |= LPA_10HALF;
64891 + printk(KERN_WARNING "fixed phy: unknown speed\n");
64896 - regs[MII_BMCR] = bmcr;
64897 - regs[MII_BMSR] = bmsr | 0x800; /*we are always capable of 10 hdx */
64898 + if (fp->status.link)
64899 + bmsr |= BMSR_LSTATUS | BMSR_ANEGCOMPLETE;
64901 + if (fp->status.pause)
64902 + lpa |= LPA_PAUSE_CAP;
64904 + if (fp->status.asym_pause)
64905 + lpa |= LPA_PAUSE_ASYM;
64907 + fp->regs[MII_PHYSID1] = fp->id >> 16;
64908 + fp->regs[MII_PHYSID2] = fp->id;
64910 + fp->regs[MII_BMSR] = bmsr;
64911 + fp->regs[MII_BMCR] = bmcr;
64912 + fp->regs[MII_LPA] = lpa;
64913 + fp->regs[MII_STAT1000] = lpagb;
64918 -static int fixed_mii_read(struct mii_bus *bus, int phy_id, int location)
64919 +static int fixed_mdio_read(struct mii_bus *bus, int phy_id, int reg_num)
64921 - struct fixed_info *fixed = bus->priv;
64922 + struct fixed_mdio_bus *fmb = container_of(bus, struct fixed_mdio_bus,
64924 + struct fixed_phy *fp;
64926 - /* if user has registered link update callback, use it */
64927 - if (fixed->phydev)
64928 - if (fixed->phydev->attached_dev) {
64929 - if (fixed->link_update) {
64930 - fixed->link_update(fixed->phydev->attached_dev,
64931 - &fixed->phy_status);
64932 - fixed_mdio_update_regs(fixed);
64933 + if (reg_num >= MII_REGS_NUM)
64936 + list_for_each_entry(fp, &fmb->phys, node) {
64937 + if (fp->id == phy_id) {
64938 + /* Issue callback if user registered it. */
64939 + if (fp->link_update) {
64940 + fp->link_update(fp->phydev->attached_dev,
64942 + fixed_phy_update_regs(fp);
64944 + return fp->regs[reg_num];
64948 - if ((unsigned int)location >= fixed->regs_num)
64950 - return fixed->regs[location];
64954 -static int fixed_mii_write(struct mii_bus *bus, int phy_id, int location,
64956 +static int fixed_mdio_write(struct mii_bus *bus, int phy_id, int reg_num,
64959 - /* do nothing for now */
64963 -static int fixed_mii_reset(struct mii_bus *bus)
64965 + * If something weird is required to be done with link/speed,
64966 + * network driver is able to assign a function to implement this.
64967 + * May be useful for PHY's that need to be software-driven.
64969 +int fixed_phy_set_link_update(struct phy_device *phydev,
64970 + int (*link_update)(struct net_device *,
64971 + struct fixed_phy_status *))
64973 - /*nothing here - no way/need to reset it */
64977 + struct fixed_mdio_bus *fmb = &platform_fmb;
64978 + struct fixed_phy *fp;
64980 -static int fixed_config_aneg(struct phy_device *phydev)
64982 - /* :TODO:03/13/2006 09:45:37 PM::
64983 - The full autoneg funcionality can be emulated,
64984 - but no need to have anything here for now
64988 + if (!link_update || !phydev || !phydev->bus)
64991 -/*-----------------------------------------------------------------------------
64992 - * the manual bind will do the magic - with phy_id_mask == 0
64993 - * match will never return true...
64994 - *-----------------------------------------------------------------------------*/
64995 -static struct phy_driver fixed_mdio_driver = {
64996 - .name = "Fixed PHY",
64997 -#ifdef CONFIG_FIXED_MII_1000_FDX
64998 - .features = PHY_GBIT_FEATURES,
65000 - .features = PHY_BASIC_FEATURES,
65002 - .config_aneg = fixed_config_aneg,
65003 - .read_status = genphy_read_status,
65004 - .driver = { .owner = THIS_MODULE, },
65006 + list_for_each_entry(fp, &fmb->phys, node) {
65007 + if (fp->id == phydev->phy_id) {
65008 + fp->link_update = link_update;
65009 + fp->phydev = phydev;
65014 -static void fixed_mdio_release(struct device *dev)
65016 - struct phy_device *phydev = container_of(dev, struct phy_device, dev);
65017 - struct mii_bus *bus = phydev->bus;
65018 - struct fixed_info *fixed = bus->priv;
65023 - kfree(fixed->regs);
65027 +EXPORT_SYMBOL_GPL(fixed_phy_set_link_update);
65029 -/*-----------------------------------------------------------------------------
65030 - * This func is used to create all the necessary stuff, bind
65031 - * the fixed phy driver and register all it on the mdio_bus_type.
65032 - * speed is either 10 or 100 or 1000, duplex is boolean.
65033 - * number is used to create multiple fixed PHYs, so that several devices can
65034 - * utilize them simultaneously.
65036 - * The device on mdio bus will look like [bus_id]:[phy_id],
65037 - * bus_id = number
65038 - * phy_id = speed+duplex.
65039 - *-----------------------------------------------------------------------------*/
65040 -#if defined(CONFIG_FIXED_MII_100_FDX) || defined(CONFIG_FIXED_MII_10_FDX) || defined(CONFIG_FIXED_MII_1000_FDX)
65041 -struct fixed_info *fixed_mdio_register_device(
65042 - int bus_id, int speed, int duplex, u8 phy_id)
65043 +int fixed_phy_add(unsigned int irq, int phy_id,
65044 + struct fixed_phy_status *status)
65046 - struct mii_bus *new_bus;
65047 - struct fixed_info *fixed;
65048 - struct phy_device *phydev;
65051 + struct fixed_mdio_bus *fmb = &platform_fmb;
65052 + struct fixed_phy *fp;
65054 - struct device *dev = kzalloc(sizeof(struct device), GFP_KERNEL);
65055 + fp = kzalloc(sizeof(*fp), GFP_KERNEL);
65060 - goto err_dev_alloc;
65061 + memset(fp->regs, 0xFF, sizeof(fp->regs[0]) * MII_REGS_NUM);
65063 - new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
65064 + fmb->irqs[phy_id] = irq;
65066 - if (new_bus == NULL)
65067 - goto err_bus_alloc;
65069 - fixed = kzalloc(sizeof(struct fixed_info), GFP_KERNEL);
65071 - if (fixed == NULL)
65072 - goto err_fixed_alloc;
65074 - fixed->regs = kzalloc(MII_REGS_NUM * sizeof(int), GFP_KERNEL);
65075 - if (NULL == fixed->regs)
65076 - goto err_fixed_regs_alloc;
65078 - fixed->regs_num = MII_REGS_NUM;
65079 - fixed->phy_status.speed = speed;
65080 - fixed->phy_status.duplex = duplex;
65081 - fixed->phy_status.link = 1;
65083 - new_bus->name = "Fixed MII Bus";
65084 - new_bus->read = &fixed_mii_read;
65085 - new_bus->write = &fixed_mii_write;
65086 - new_bus->reset = &fixed_mii_reset;
65087 - /*set up workspace */
65088 - fixed_mdio_update_regs(fixed);
65089 - new_bus->priv = fixed;
65091 - new_bus->dev = dev;
65092 - dev_set_drvdata(dev, new_bus);
65094 - /* create phy_device and register it on the mdio bus */
65095 - phydev = phy_device_create(new_bus, 0, 0);
65096 - if (phydev == NULL)
65097 - goto err_phy_dev_create;
65100 - * Put the phydev pointer into the fixed pack so that bus read/write
65101 - * code could be able to access for instance attached netdev. Well it
65102 - * doesn't have to do so, only in case of utilizing user-specified
65106 - fixed->phydev = phydev;
65107 - phydev->speed = speed;
65108 - phydev->duplex = duplex;
65110 - phydev->irq = PHY_IGNORE_INTERRUPT;
65111 - phydev->dev.bus = &mdio_bus_type;
65113 - snprintf(phydev->dev.bus_id, BUS_ID_SIZE,
65114 - PHY_ID_FMT, bus_id, phy_id);
65116 - phydev->bus = new_bus;
65118 - phydev->dev.driver = &fixed_mdio_driver.driver;
65119 - phydev->dev.release = fixed_mdio_release;
65120 - err = phydev->dev.driver->probe(&phydev->dev);
65122 - printk(KERN_ERR "Phy %s: problems with fixed driver\n",
65123 - phydev->dev.bus_id);
65126 - err = device_register(&phydev->dev);
65128 - printk(KERN_ERR "Phy %s failed to register\n",
65129 - phydev->dev.bus_id);
65132 - //phydev->state = PHY_RUNNING; /* make phy go up quick, but in 10Mbit/HDX
65135 + fp->status = *status;
65139 -err_phy_dev_create:
65140 - kfree(fixed->regs);
65141 -err_fixed_regs_alloc:
65148 + ret = fixed_phy_update_regs(fp);
65153 + list_add_tail(&fp->node, &fmb->phys);
65159 -MODULE_DESCRIPTION("Fixed PHY device & driver for PAL");
65160 -MODULE_AUTHOR("Vitaly Bordug");
65161 -MODULE_LICENSE("GPL");
65166 +EXPORT_SYMBOL_GPL(fixed_phy_add);
65168 -static int __init fixed_init(void)
65169 +static int __init fixed_mdio_bus_init(void)
65173 -/* register on the bus... Not expected to be matched
65174 - * with anything there...
65177 - phy_driver_register(&fixed_mdio_driver);
65178 + struct fixed_mdio_bus *fmb = &platform_fmb;
65181 -/* We will create several mdio devices here, and will bound the upper
65182 - * driver to them.
65184 - * Then the external software can lookup the phy bus by searching
65185 - * for 0:101, to be connected to the virtual 100M Fdx phy.
65187 - * In case several virtual PHYs required, the bus_id will be in form
65188 - * [num]:[duplex]+[speed], which make it able even to define
65189 - * driver-specific link control callback, if for instance PHY is
65190 - * completely SW-driven.
65192 - for (i=1; i <= CONFIG_FIXED_MII_AMNT; i++) {
65193 -#ifdef CONFIG_FIXED_MII_1000_FDX
65194 - fixed_phy_ptrs[cnt++] = fixed_mdio_register_device(0, 1000, 1, i);
65196 -#ifdef CONFIG_FIXED_MII_100_FDX
65197 - fixed_phy_ptrs[cnt++] = fixed_mdio_register_device(1, 100, 1, i);
65199 -#ifdef CONFIG_FIXED_MII_10_FDX
65200 - fixed_phy_ptrs[cnt++] = fixed_mdio_register_device(2, 10, 1, i);
65202 + pdev = platform_device_register_simple("Fixed MDIO bus", 0, NULL, 0);
65208 + fmb->mii_bus.id = 0;
65209 + fmb->mii_bus.name = "Fixed MDIO Bus";
65210 + fmb->mii_bus.dev = &pdev->dev;
65211 + fmb->mii_bus.read = &fixed_mdio_read;
65212 + fmb->mii_bus.write = &fixed_mdio_write;
65213 + fmb->mii_bus.irq = fmb->irqs;
65215 + ret = mdiobus_register(&fmb->mii_bus);
65217 + goto err_mdiobus_reg;
65222 + platform_device_unregister(pdev);
65226 +module_init(fixed_mdio_bus_init);
65228 -static void __exit fixed_exit(void)
65229 +static void __exit fixed_mdio_bus_exit(void)
65232 + struct fixed_mdio_bus *fmb = &platform_fmb;
65233 + struct fixed_phy *fp;
65235 - phy_driver_unregister(&fixed_mdio_driver);
65236 - for (i=0; i < MAX_PHY_AMNT; i++)
65237 - if ( fixed_phy_ptrs[i] )
65238 - device_unregister(&fixed_phy_ptrs[i]->phydev->dev);
65239 + mdiobus_unregister(&fmb->mii_bus);
65240 + platform_device_unregister(pdev);
65242 + list_for_each_entry(fp, &fmb->phys, node) {
65243 + list_del(&fp->node);
65247 +module_exit(fixed_mdio_bus_exit);
65249 -module_init(fixed_init);
65250 -module_exit(fixed_exit);
65251 +MODULE_DESCRIPTION("Fixed MDIO bus (MDIO bus emulation with fixed PHYs)");
65252 +MODULE_AUTHOR("Vitaly Bordug");
65253 +MODULE_LICENSE("GPL");
65254 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/net/ps3_gelic_net.c powerpc.git/drivers/net/ps3_gelic_net.c
65255 --- linux-2.6.24/drivers/net/ps3_gelic_net.c 2008-01-24 23:58:37.000000000 +0100
65256 +++ powerpc.git/drivers/net/ps3_gelic_net.c 2008-01-28 20:26:14.000000000 +0100
65257 @@ -58,11 +58,11 @@
65259 return &card->dev->core;
65261 -static inline unsigned int bus_id(struct gelic_net_card *card)
65262 +static inline u64 bus_id(struct gelic_net_card *card)
65264 return card->dev->bus_id;
65266 -static inline unsigned int dev_id(struct gelic_net_card *card)
65267 +static inline u64 dev_id(struct gelic_net_card *card)
65269 return card->dev->dev_id;
65271 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/net/ucc_geth.c powerpc.git/drivers/net/ucc_geth.c
65272 --- linux-2.6.24/drivers/net/ucc_geth.c 2008-01-24 23:58:37.000000000 +0100
65273 +++ powerpc.git/drivers/net/ucc_geth.c 2008-01-28 20:26:14.000000000 +0100
65274 @@ -3822,6 +3822,7 @@
65275 int err, ucc_num, max_speed = 0;
65277 const unsigned int *prop;
65278 + const char *sprop;
65279 const void *mac_addr;
65280 phy_interface_t phy_interface;
65281 static const int enet_to_speed[] = {
65282 @@ -3854,10 +3855,56 @@
65284 ug_info->uf_info.ucc_num = ucc_num;
65286 - prop = of_get_property(np, "rx-clock", NULL);
65287 - ug_info->uf_info.rx_clock = *prop;
65288 - prop = of_get_property(np, "tx-clock", NULL);
65289 - ug_info->uf_info.tx_clock = *prop;
65290 + sprop = of_get_property(np, "rx-clock-name", NULL);
65292 + ug_info->uf_info.rx_clock = qe_clock_source(sprop);
65293 + if ((ug_info->uf_info.rx_clock < QE_CLK_NONE) ||
65294 + (ug_info->uf_info.rx_clock > QE_CLK24)) {
65296 + "ucc_geth: invalid rx-clock-name property\n");
65300 + prop = of_get_property(np, "rx-clock", NULL);
65302 + /* If both rx-clock-name and rx-clock are missing,
65303 + we want to tell people to use rx-clock-name. */
65305 + "ucc_geth: missing rx-clock-name property\n");
65308 + if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
65310 + "ucc_geth: invalid rx-clock propperty\n");
65313 + ug_info->uf_info.rx_clock = *prop;
65316 + sprop = of_get_property(np, "tx-clock-name", NULL);
65318 + ug_info->uf_info.tx_clock = qe_clock_source(sprop);
65319 + if ((ug_info->uf_info.tx_clock < QE_CLK_NONE) ||
65320 + (ug_info->uf_info.tx_clock > QE_CLK24)) {
65322 + "ucc_geth: invalid tx-clock-name property\n");
65326 + prop = of_get_property(np, "rx-clock", NULL);
65329 + "ucc_geth: mising tx-clock-name property\n");
65332 + if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
65334 + "ucc_geth: invalid tx-clock property\n");
65337 + ug_info->uf_info.tx_clock = *prop;
65340 err = of_address_to_resource(np, 0, &res);
65343 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/of/base.c powerpc.git/drivers/of/base.c
65344 --- linux-2.6.24/drivers/of/base.c 2008-01-24 23:58:37.000000000 +0100
65345 +++ powerpc.git/drivers/of/base.c 2008-01-28 20:26:17.000000000 +0100
65346 @@ -273,3 +273,61 @@
65349 EXPORT_SYMBOL(of_find_compatible_node);
65352 + * of_match_node - Tell if an device_node has a matching of_match structure
65353 + * @matches: array of of device match structures to search in
65354 + * @node: the of device structure to match against
65356 + * Low level utility function used by device matching.
65358 +const struct of_device_id *of_match_node(const struct of_device_id *matches,
65359 + const struct device_node *node)
65361 + while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
65363 + if (matches->name[0])
65364 + match &= node->name
65365 + && !strcmp(matches->name, node->name);
65366 + if (matches->type[0])
65367 + match &= node->type
65368 + && !strcmp(matches->type, node->type);
65369 + if (matches->compatible[0])
65370 + match &= of_device_is_compatible(node,
65371 + matches->compatible);
65378 +EXPORT_SYMBOL(of_match_node);
65381 + * of_find_matching_node - Find a node based on an of_device_id match
65383 + * @from: The node to start searching from or NULL, the node
65384 + * you pass will not be searched, only the next one
65385 + * will; typically, you pass what the previous call
65386 + * returned. of_node_put() will be called on it
65387 + * @matches: array of of device match structures to search in
65389 + * Returns a node pointer with refcount incremented, use
65390 + * of_node_put() on it when done.
65392 +struct device_node *of_find_matching_node(struct device_node *from,
65393 + const struct of_device_id *matches)
65395 + struct device_node *np;
65397 + read_lock(&devtree_lock);
65398 + np = from ? from->allnext : allnodes;
65399 + for (; np; np = np->allnext) {
65400 + if (of_match_node(matches, np) && of_node_get(np))
65403 + of_node_put(from);
65404 + read_unlock(&devtree_lock);
65407 +EXPORT_SYMBOL(of_find_matching_node);
65408 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/of/device.c powerpc.git/drivers/of/device.c
65409 --- linux-2.6.24/drivers/of/device.c 2008-01-24 23:58:37.000000000 +0100
65410 +++ powerpc.git/drivers/of/device.c 2008-01-28 20:26:17.000000000 +0100
65412 #include <asm/errno.h>
65415 - * of_match_node - Tell if an device_node has a matching of_match structure
65416 - * @ids: array of of device match structures to search in
65417 - * @node: the of device structure to match against
65419 - * Low level utility function used by device matching.
65421 -const struct of_device_id *of_match_node(const struct of_device_id *matches,
65422 - const struct device_node *node)
65424 - while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
65426 - if (matches->name[0])
65427 - match &= node->name
65428 - && !strcmp(matches->name, node->name);
65429 - if (matches->type[0])
65430 - match &= node->type
65431 - && !strcmp(matches->type, node->type);
65432 - if (matches->compatible[0])
65433 - match &= of_device_is_compatible(node,
65434 - matches->compatible);
65441 -EXPORT_SYMBOL(of_match_node);
65444 * of_match_device - Tell if an of_device structure has a matching
65445 * of_match structure
65446 * @ids: array of of device match structures to search in
65447 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/ps3/Makefile powerpc.git/drivers/ps3/Makefile
65448 --- linux-2.6.24/drivers/ps3/Makefile 2008-01-24 23:58:37.000000000 +0100
65449 +++ powerpc.git/drivers/ps3/Makefile 2008-01-28 20:26:18.000000000 +0100
65451 obj-$(CONFIG_PPC_PS3) += sys-manager-core.o
65452 obj-$(CONFIG_PS3_SYS_MANAGER) += ps3-sys-manager.o
65453 obj-$(CONFIG_PS3_STORAGE) += ps3stor_lib.o
65454 +obj-$(CONFIG_PS3_LPM) += ps3-lpm.o
65455 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/ps3/ps3-lpm.c powerpc.git/drivers/ps3/ps3-lpm.c
65456 --- linux-2.6.24/drivers/ps3/ps3-lpm.c 1970-01-01 01:00:00.000000000 +0100
65457 +++ powerpc.git/drivers/ps3/ps3-lpm.c 2008-01-28 20:26:18.000000000 +0100
65460 + * PS3 Logical Performance Monitor.
65462 + * Copyright (C) 2007 Sony Computer Entertainment Inc.
65463 + * Copyright 2007 Sony Corp.
65465 + * This program is free software; you can redistribute it and/or modify
65466 + * it under the terms of the GNU General Public License as published by
65467 + * the Free Software Foundation; version 2 of the License.
65469 + * This program is distributed in the hope that it will be useful,
65470 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
65471 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
65472 + * GNU General Public License for more details.
65474 + * You should have received a copy of the GNU General Public License
65475 + * along with this program; if not, write to the Free Software
65476 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
65479 +#include <linux/kernel.h>
65480 +#include <linux/module.h>
65481 +#include <linux/interrupt.h>
65482 +#include <linux/uaccess.h>
65483 +#include <asm/ps3.h>
65484 +#include <asm/lv1call.h>
65485 +#include <asm/cell-pmu.h>
65488 +/* BOOKMARK tag macros */
65489 +#define PS3_PM_BOOKMARK_START 0x8000000000000000ULL
65490 +#define PS3_PM_BOOKMARK_STOP 0x4000000000000000ULL
65491 +#define PS3_PM_BOOKMARK_TAG_KERNEL 0x1000000000000000ULL
65492 +#define PS3_PM_BOOKMARK_TAG_USER 0x3000000000000000ULL
65493 +#define PS3_PM_BOOKMARK_TAG_MASK_HI 0xF000000000000000ULL
65494 +#define PS3_PM_BOOKMARK_TAG_MASK_LO 0x0F00000000000000ULL
65496 +/* CBE PM CONTROL register macros */
65497 +#define PS3_PM_CONTROL_PPU_TH0_BOOKMARK 0x00001000
65498 +#define PS3_PM_CONTROL_PPU_TH1_BOOKMARK 0x00000800
65499 +#define PS3_PM_CONTROL_PPU_COUNT_MODE_MASK 0x000C0000
65500 +#define PS3_PM_CONTROL_PPU_COUNT_MODE_PROBLEM 0x00080000
65501 +#define PS3_WRITE_PM_MASK 0xFFFFFFFFFFFFFFFFULL
65503 +/* CBE PM START STOP register macros */
65504 +#define PS3_PM_START_STOP_PPU_TH0_BOOKMARK_START 0x02000000
65505 +#define PS3_PM_START_STOP_PPU_TH1_BOOKMARK_START 0x01000000
65506 +#define PS3_PM_START_STOP_PPU_TH0_BOOKMARK_STOP 0x00020000
65507 +#define PS3_PM_START_STOP_PPU_TH1_BOOKMARK_STOP 0x00010000
65508 +#define PS3_PM_START_STOP_START_MASK 0xFF000000
65509 +#define PS3_PM_START_STOP_STOP_MASK 0x00FF0000
65511 +/* CBE PM COUNTER register macres */
65512 +#define PS3_PM_COUNTER_MASK_HI 0xFFFFFFFF00000000ULL
65513 +#define PS3_PM_COUNTER_MASK_LO 0x00000000FFFFFFFFULL
65515 +/* BASE SIGNAL GROUP NUMBER macros */
65516 +#define PM_ISLAND2_BASE_SIGNAL_GROUP_NUMBER 0
65517 +#define PM_ISLAND2_SIGNAL_GROUP_NUMBER1 6
65518 +#define PM_ISLAND2_SIGNAL_GROUP_NUMBER2 7
65519 +#define PM_ISLAND3_BASE_SIGNAL_GROUP_NUMBER 7
65520 +#define PM_ISLAND4_BASE_SIGNAL_GROUP_NUMBER 15
65521 +#define PM_SPU_TRIGGER_SIGNAL_GROUP_NUMBER 17
65522 +#define PM_SPU_EVENT_SIGNAL_GROUP_NUMBER 18
65523 +#define PM_ISLAND5_BASE_SIGNAL_GROUP_NUMBER 18
65524 +#define PM_ISLAND6_BASE_SIGNAL_GROUP_NUMBER 24
65525 +#define PM_ISLAND7_BASE_SIGNAL_GROUP_NUMBER 49
65526 +#define PM_ISLAND8_BASE_SIGNAL_GROUP_NUMBER 52
65527 +#define PM_SIG_GROUP_SPU 41
65528 +#define PM_SIG_GROUP_SPU_TRIGGER 42
65529 +#define PM_SIG_GROUP_SPU_EVENT 43
65530 +#define PM_SIG_GROUP_MFC_MAX 60
65533 + * struct ps3_lpm_shadow_regs - Performance monitor shadow registers.
65535 + * @pm_control: Shadow of the processor's pm_control register.
65536 + * @pm_start_stop: Shadow of the processor's pm_start_stop register.
65537 + * @pm_interval: Shadow of the processor's pm_interval register.
65538 + * @group_control: Shadow of the processor's group_control register.
65539 + * @debug_bus_control: Shadow of the processor's debug_bus_control register.
65541 + * The logical performance monitor provides a write-only interface to
65542 + * these processor registers. These shadow variables cache the processor
65543 + * register values for reading.
65545 + * The initial value of the shadow registers at lpm creation is
65546 + * PS3_LPM_SHADOW_REG_INIT.
65549 +struct ps3_lpm_shadow_regs {
65551 + u64 pm_start_stop;
65553 + u64 group_control;
65554 + u64 debug_bus_control;
65557 +#define PS3_LPM_SHADOW_REG_INIT 0xFFFFFFFF00000000ULL
65560 + * struct ps3_lpm_priv - Private lpm device data.
65562 + * @open: An atomic variable indicating the lpm driver has been opened.
65563 + * @rights: The lpm rigths granted by the system policy module. A logical
65564 + * OR of enum ps3_lpm_rights.
65565 + * @node_id: The node id of a BE prosessor whose performance monitor this
65566 + * lpar has the right to use.
65567 + * @pu_id: The lv1 id of the logical PU.
65568 + * @lpm_id: The lv1 id of this lpm instance.
65569 + * @outlet_id: The outlet created by lv1 for this lpm instance.
65570 + * @tb_count: The number of bytes of data held in the lv1 trace buffer.
65571 + * @tb_cache: Kernel buffer to receive the data from the lv1 trace buffer.
65572 + * Must be 128 byte aligned.
65573 + * @tb_cache_size: Size of the kernel @tb_cache buffer. Must be 128 byte
65575 + * @tb_cache_internal: An unaligned buffer allocated by this driver to be
65576 + * used for the trace buffer cache when ps3_lpm_open() is called with a
65577 + * NULL tb_cache argument. Otherwise unused.
65578 + * @shadow: Processor register shadow of type struct ps3_lpm_shadow_regs.
65579 + * @sbd: The struct ps3_system_bus_device attached to this driver.
65581 + * The trace buffer is a buffer allocated and used internally to the lv1
65582 + * hypervisor to collect trace data. The trace buffer cache is a guest
65583 + * buffer that accepts the trace data from the trace buffer.
65586 +struct ps3_lpm_priv {
65595 + u64 tb_cache_size;
65596 + void *tb_cache_internal;
65597 + struct ps3_lpm_shadow_regs shadow;
65598 + struct ps3_system_bus_device *sbd;
65602 + PS3_LPM_DEFAULT_TB_CACHE_SIZE = 0x4000,
65606 + * lpm_priv - Static instance of the lpm data.
65608 + * Since the exported routines don't support the notion of a device
65609 + * instance we need to hold the instance in this static variable
65610 + * and then only allow at most one instance at a time to be created.
65613 +static struct ps3_lpm_priv *lpm_priv;
65615 +static struct device *sbd_core(void)
65617 + BUG_ON(!lpm_priv || !lpm_priv->sbd);
65618 + return &lpm_priv->sbd->core;
65622 + * use_start_stop_bookmark - Enable the PPU bookmark trace.
65624 + * And it enables PPU bookmark triggers ONLY if the other triggers are not set.
65625 + * The start/stop bookmarks are inserted at ps3_enable_pm() and ps3_disable_pm()
65626 + * to start/stop LPM.
65628 + * Used to get good quality of the performance counter.
65631 +enum {use_start_stop_bookmark = 1,};
65633 +void ps3_set_bookmark(u64 bookmark)
65636 + * As per the PPE book IV, to avoid bookmark loss there must
65637 + * not be a traced branch within 10 cycles of setting the
65638 + * SPRN_BKMK register. The actual text is unclear if 'within'
65639 + * includes cycles before the call.
65642 + asm volatile("or 29, 29, 29;"); /* db10cyc */
65643 + mtspr(SPRN_BKMK, bookmark);
65644 + asm volatile("or 29, 29, 29;"); /* db10cyc */
65646 +EXPORT_SYMBOL_GPL(ps3_set_bookmark);
65648 +void ps3_set_pm_bookmark(u64 tag, u64 incident, u64 th_id)
65652 + bookmark = (get_tb() & 0x00000000FFFFFFFFULL) |
65653 + PS3_PM_BOOKMARK_TAG_KERNEL;
65654 + bookmark = ((tag << 56) & PS3_PM_BOOKMARK_TAG_MASK_LO) |
65655 + (incident << 48) | (th_id << 32) | bookmark;
65656 + ps3_set_bookmark(bookmark);
65658 +EXPORT_SYMBOL_GPL(ps3_set_pm_bookmark);
65661 + * ps3_read_phys_ctr - Read physical counter registers.
65663 + * Each physical counter can act as one 32 bit counter or as two 16 bit
65667 +u32 ps3_read_phys_ctr(u32 cpu, u32 phys_ctr)
65673 + if (phys_ctr >= NR_PHYS_CTRS) {
65674 + dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__,
65675 + __LINE__, phys_ctr);
65679 + result = lv1_set_lpm_counter(lpm_priv->lpm_id, 0, 0, 0, 0, &counter0415,
65682 + dev_err(sbd_core(), "%s:%u: lv1_set_lpm_counter failed: "
65683 + "phys_ctr %u, %s\n", __func__, __LINE__, phys_ctr,
65684 + ps3_result(result));
65688 + switch (phys_ctr) {
65690 + return counter0415 >> 32;
65692 + return counter0415 & PS3_PM_COUNTER_MASK_LO;
65694 + return counter2637 >> 32;
65696 + return counter2637 & PS3_PM_COUNTER_MASK_LO;
65702 +EXPORT_SYMBOL_GPL(ps3_read_phys_ctr);
65705 + * ps3_write_phys_ctr - Write physical counter registers.
65707 + * Each physical counter can act as one 32 bit counter or as two 16 bit
65711 +void ps3_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val)
65714 + u64 counter0415_mask;
65716 + u64 counter2637_mask;
65719 + if (phys_ctr >= NR_PHYS_CTRS) {
65720 + dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__,
65721 + __LINE__, phys_ctr);
65725 + switch (phys_ctr) {
65727 + counter0415 = (u64)val << 32;
65728 + counter0415_mask = PS3_PM_COUNTER_MASK_HI;
65729 + counter2637 = 0x0;
65730 + counter2637_mask = 0x0;
65733 + counter0415 = (u64)val;
65734 + counter0415_mask = PS3_PM_COUNTER_MASK_LO;
65735 + counter2637 = 0x0;
65736 + counter2637_mask = 0x0;
65739 + counter0415 = 0x0;
65740 + counter0415_mask = 0x0;
65741 + counter2637 = (u64)val << 32;
65742 + counter2637_mask = PS3_PM_COUNTER_MASK_HI;
65745 + counter0415 = 0x0;
65746 + counter0415_mask = 0x0;
65747 + counter2637 = (u64)val;
65748 + counter2637_mask = PS3_PM_COUNTER_MASK_LO;
65754 + result = lv1_set_lpm_counter(lpm_priv->lpm_id,
65755 + counter0415, counter0415_mask,
65756 + counter2637, counter2637_mask,
65757 + &counter0415, &counter2637);
65759 + dev_err(sbd_core(), "%s:%u: lv1_set_lpm_counter failed: "
65760 + "phys_ctr %u, val %u, %s\n", __func__, __LINE__,
65761 + phys_ctr, val, ps3_result(result));
65763 +EXPORT_SYMBOL_GPL(ps3_write_phys_ctr);
65766 + * ps3_read_ctr - Read counter.
65768 + * Read 16 or 32 bits depending on the current size of the counter.
65769 + * Counters 4, 5, 6 & 7 are always 16 bit.
65772 +u32 ps3_read_ctr(u32 cpu, u32 ctr)
65775 + u32 phys_ctr = ctr & (NR_PHYS_CTRS - 1);
65777 + val = ps3_read_phys_ctr(cpu, phys_ctr);
65779 + if (ps3_get_ctr_size(cpu, phys_ctr) == 16)
65780 + val = (ctr < NR_PHYS_CTRS) ? (val >> 16) : (val & 0xffff);
65784 +EXPORT_SYMBOL_GPL(ps3_read_ctr);
65787 + * ps3_write_ctr - Write counter.
65789 + * Write 16 or 32 bits depending on the current size of the counter.
65790 + * Counters 4, 5, 6 & 7 are always 16 bit.
65793 +void ps3_write_ctr(u32 cpu, u32 ctr, u32 val)
65798 + phys_ctr = ctr & (NR_PHYS_CTRS - 1);
65800 + if (ps3_get_ctr_size(cpu, phys_ctr) == 16) {
65801 + phys_val = ps3_read_phys_ctr(cpu, phys_ctr);
65803 + if (ctr < NR_PHYS_CTRS)
65804 + val = (val << 16) | (phys_val & 0xffff);
65806 + val = (val & 0xffff) | (phys_val & 0xffff0000);
65809 + ps3_write_phys_ctr(cpu, phys_ctr, val);
65811 +EXPORT_SYMBOL_GPL(ps3_write_ctr);
65814 + * ps3_read_pm07_control - Read counter control registers.
65816 + * Each logical counter has a corresponding control register.
65819 +u32 ps3_read_pm07_control(u32 cpu, u32 ctr)
65823 +EXPORT_SYMBOL_GPL(ps3_read_pm07_control);
65826 + * ps3_write_pm07_control - Write counter control registers.
65828 + * Each logical counter has a corresponding control register.
65831 +void ps3_write_pm07_control(u32 cpu, u32 ctr, u32 val)
65834 + static const u64 mask = 0xFFFFFFFFFFFFFFFFULL;
65837 + if (ctr >= NR_CTRS) {
65838 + dev_dbg(sbd_core(), "%s:%u: ctr too big: %u\n", __func__,
65843 + result = lv1_set_lpm_counter_control(lpm_priv->lpm_id, ctr, val, mask,
65846 + dev_err(sbd_core(), "%s:%u: lv1_set_lpm_counter_control "
65847 + "failed: ctr %u, %s\n", __func__, __LINE__, ctr,
65848 + ps3_result(result));
65850 +EXPORT_SYMBOL_GPL(ps3_write_pm07_control);
65853 + * ps3_read_pm - Read Other LPM control registers.
65856 +u32 ps3_read_pm(u32 cpu, enum pm_reg_name reg)
65863 + return lpm_priv->shadow.pm_control;
65864 + case trace_address:
65865 + return CBE_PM_TRACE_BUF_EMPTY;
65866 + case pm_start_stop:
65867 + return lpm_priv->shadow.pm_start_stop;
65868 + case pm_interval:
65869 + return lpm_priv->shadow.pm_interval;
65870 + case group_control:
65871 + return lpm_priv->shadow.group_control;
65872 + case debug_bus_control:
65873 + return lpm_priv->shadow.debug_bus_control;
65875 + result = lv1_get_lpm_interrupt_status(lpm_priv->lpm_id,
65879 + dev_dbg(sbd_core(), "%s:%u: lv1 get_lpm_status failed: "
65880 + "reg %u, %s\n", __func__, __LINE__, reg,
65881 + ps3_result(result));
65884 + case ext_tr_timer:
65887 + dev_dbg(sbd_core(), "%s:%u: unknown reg: %d\n", __func__,
65895 +EXPORT_SYMBOL_GPL(ps3_read_pm);
65898 + * ps3_write_pm - Write Other LPM control registers.
65901 +void ps3_write_pm(u32 cpu, enum pm_reg_name reg, u32 val)
65907 + case group_control:
65908 + if (val != lpm_priv->shadow.group_control)
65909 + result = lv1_set_lpm_group_control(lpm_priv->lpm_id,
65911 + PS3_WRITE_PM_MASK,
65913 + lpm_priv->shadow.group_control = val;
65915 + case debug_bus_control:
65916 + if (val != lpm_priv->shadow.debug_bus_control)
65917 + result = lv1_set_lpm_debug_bus_control(lpm_priv->lpm_id,
65919 + PS3_WRITE_PM_MASK,
65921 + lpm_priv->shadow.debug_bus_control = val;
65924 + if (use_start_stop_bookmark)
65925 + val |= (PS3_PM_CONTROL_PPU_TH0_BOOKMARK |
65926 + PS3_PM_CONTROL_PPU_TH1_BOOKMARK);
65927 + if (val != lpm_priv->shadow.pm_control)
65928 + result = lv1_set_lpm_general_control(lpm_priv->lpm_id,
65930 + PS3_WRITE_PM_MASK,
65933 + lpm_priv->shadow.pm_control = val;
65935 + case pm_interval:
65936 + if (val != lpm_priv->shadow.pm_interval)
65937 + result = lv1_set_lpm_interval(lpm_priv->lpm_id, val,
65938 + PS3_WRITE_PM_MASK, &dummy);
65939 + lpm_priv->shadow.pm_interval = val;
65941 + case pm_start_stop:
65942 + if (val != lpm_priv->shadow.pm_start_stop)
65943 + result = lv1_set_lpm_trigger_control(lpm_priv->lpm_id,
65945 + PS3_WRITE_PM_MASK,
65947 + lpm_priv->shadow.pm_start_stop = val;
65949 + case trace_address:
65950 + case ext_tr_timer:
65954 + dev_dbg(sbd_core(), "%s:%u: unknown reg: %d\n", __func__,
65961 + dev_err(sbd_core(), "%s:%u: lv1 set_control failed: "
65962 + "reg %u, %s\n", __func__, __LINE__, reg,
65963 + ps3_result(result));
65965 +EXPORT_SYMBOL_GPL(ps3_write_pm);
65968 + * ps3_get_ctr_size - Get the size of a physical counter.
65970 + * Returns either 16 or 32.
65973 +u32 ps3_get_ctr_size(u32 cpu, u32 phys_ctr)
65977 + if (phys_ctr >= NR_PHYS_CTRS) {
65978 + dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__,
65979 + __LINE__, phys_ctr);
65983 + pm_ctrl = ps3_read_pm(cpu, pm_control);
65984 + return (pm_ctrl & CBE_PM_16BIT_CTR(phys_ctr)) ? 16 : 32;
65986 +EXPORT_SYMBOL_GPL(ps3_get_ctr_size);
65989 + * ps3_set_ctr_size - Set the size of a physical counter to 16 or 32 bits.
65992 +void ps3_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size)
65996 + if (phys_ctr >= NR_PHYS_CTRS) {
65997 + dev_dbg(sbd_core(), "%s:%u: phys_ctr too big: %u\n", __func__,
65998 + __LINE__, phys_ctr);
66002 + pm_ctrl = ps3_read_pm(cpu, pm_control);
66004 + switch (ctr_size) {
66006 + pm_ctrl |= CBE_PM_16BIT_CTR(phys_ctr);
66007 + ps3_write_pm(cpu, pm_control, pm_ctrl);
66011 + pm_ctrl &= ~CBE_PM_16BIT_CTR(phys_ctr);
66012 + ps3_write_pm(cpu, pm_control, pm_ctrl);
66018 +EXPORT_SYMBOL_GPL(ps3_set_ctr_size);
66020 +static u64 pm_translate_signal_group_number_on_island2(u64 subgroup)
66023 + if (subgroup == 2)
66026 + if (subgroup <= 6)
66027 + return PM_ISLAND2_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66028 + else if (subgroup == 7)
66029 + return PM_ISLAND2_SIGNAL_GROUP_NUMBER1;
66031 + return PM_ISLAND2_SIGNAL_GROUP_NUMBER2;
66034 +static u64 pm_translate_signal_group_number_on_island3(u64 subgroup)
66037 + switch (subgroup) {
66049 + return PM_ISLAND3_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66052 +static u64 pm_translate_signal_group_number_on_island4(u64 subgroup)
66054 + return PM_ISLAND4_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66057 +static u64 pm_translate_signal_group_number_on_island5(u64 subgroup)
66060 + switch (subgroup) {
66070 + return PM_ISLAND5_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66073 +static u64 pm_translate_signal_group_number_on_island6(u64 subgroup,
66076 + switch (subgroup) {
66086 + switch (subsubgroup) {
66090 + subsubgroup += 2;
66096 + subsubgroup += 4;
66101 + subsubgroup += 5;
66107 + if (subgroup <= 5)
66108 + return (PM_ISLAND6_BASE_SIGNAL_GROUP_NUMBER + subgroup);
66110 + return (PM_ISLAND6_BASE_SIGNAL_GROUP_NUMBER + subgroup
66111 + + subsubgroup - 1);
66114 +static u64 pm_translate_signal_group_number_on_island7(u64 subgroup)
66116 + return PM_ISLAND7_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66119 +static u64 pm_translate_signal_group_number_on_island8(u64 subgroup)
66121 + return PM_ISLAND8_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66124 +static u64 pm_signal_group_to_ps3_lv1_signal_group(u64 group)
66133 + if (group < 1000) {
66134 + if (group < 100) {
66135 + if (20 <= group && group < 30) {
66137 + subgroup = group - 20;
66138 + } else if (30 <= group && group < 40) {
66140 + subgroup = group - 30;
66141 + } else if (40 <= group && group < 50) {
66143 + subgroup = group - 40;
66144 + } else if (50 <= group && group < 60) {
66146 + subgroup = group - 50;
66147 + } else if (60 <= group && group < 70) {
66149 + subgroup = group - 60;
66150 + } else if (70 <= group && group < 80) {
66152 + subgroup = group - 70;
66153 + } else if (80 <= group && group < 90) {
66155 + subgroup = group - 80;
66157 + } else if (200 <= group && group < 300) {
66159 + subgroup = group - 200;
66160 + } else if (600 <= group && group < 700) {
66163 + subsubgroup = group - 650;
66165 + } else if (6000 <= group && group < 7000) {
66168 + subsubgroup = group - 6500;
66171 + switch (island) {
66173 + return pm_translate_signal_group_number_on_island2(subgroup);
66175 + return pm_translate_signal_group_number_on_island3(subgroup);
66177 + return pm_translate_signal_group_number_on_island4(subgroup);
66179 + return pm_translate_signal_group_number_on_island5(subgroup);
66181 + return pm_translate_signal_group_number_on_island6(subgroup,
66184 + return pm_translate_signal_group_number_on_island7(subgroup);
66186 + return pm_translate_signal_group_number_on_island8(subgroup);
66188 + dev_dbg(sbd_core(), "%s:%u: island not found: %lu\n", __func__,
66189 + __LINE__, group);
66196 +static u64 pm_bus_word_to_ps3_lv1_bus_word(u8 word)
66212 +static int __ps3_set_signal(u64 lv1_signal_group, u64 bus_select,
66213 + u64 signal_select, u64 attr1, u64 attr2, u64 attr3)
66217 + ret = lv1_set_lpm_signal(lpm_priv->lpm_id, lv1_signal_group, bus_select,
66218 + signal_select, attr1, attr2, attr3);
66220 + dev_err(sbd_core(),
66221 + "%s:%u: error:%d 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx\n",
66222 + __func__, __LINE__, ret, lv1_signal_group, bus_select,
66223 + signal_select, attr1, attr2, attr3);
66228 +int ps3_set_signal(u64 signal_group, u8 signal_bit, u16 sub_unit,
66232 + u64 lv1_signal_group;
66234 + u64 signal_select;
66235 + u64 attr1, attr2, attr3;
66237 + if (signal_group == 0)
66238 + return __ps3_set_signal(0, 0, 0, 0, 0, 0);
66240 + lv1_signal_group =
66241 + pm_signal_group_to_ps3_lv1_signal_group(signal_group);
66242 + bus_select = pm_bus_word_to_ps3_lv1_bus_word(bus_word);
66244 + switch (signal_group) {
66245 + case PM_SIG_GROUP_SPU_TRIGGER:
66246 + signal_select = 1;
66247 + signal_select = signal_select << (63 - signal_bit);
66249 + case PM_SIG_GROUP_SPU_EVENT:
66250 + signal_select = 1;
66251 + signal_select = (signal_select << (63 - signal_bit)) | 0x3;
66254 + signal_select = 0;
66259 + * 0: physical object.
66260 + * 1: logical object.
66261 + * This parameter is only used for the PPE and SPE signals.
66266 + * This parameter is used to specify the target physical/logical
66267 + * PPE/SPE object.
66269 + if (PM_SIG_GROUP_SPU <= signal_group &&
66270 + signal_group < PM_SIG_GROUP_MFC_MAX)
66271 + attr2 = sub_unit;
66273 + attr2 = lpm_priv->pu_id;
66276 + * This parameter is only used for setting the SPE signal.
66280 + ret = __ps3_set_signal(lv1_signal_group, bus_select, signal_select,
66281 + attr1, attr2, attr3);
66283 + dev_err(sbd_core(), "%s:%u: __ps3_set_signal failed: %d\n",
66284 + __func__, __LINE__, ret);
66288 +EXPORT_SYMBOL_GPL(ps3_set_signal);
66290 +u32 ps3_get_hw_thread_id(int cpu)
66292 + return get_hard_smp_processor_id(cpu);
66294 +EXPORT_SYMBOL_GPL(ps3_get_hw_thread_id);
66297 + * ps3_enable_pm - Enable the entire performance monitoring unit.
66299 + * When we enable the LPM, all pending writes to counters get committed.
66302 +void ps3_enable_pm(u32 cpu)
66306 + int insert_bookmark = 0;
66308 + lpm_priv->tb_count = 0;
66310 + if (use_start_stop_bookmark) {
66311 + if (!(lpm_priv->shadow.pm_start_stop &
66312 + (PS3_PM_START_STOP_START_MASK
66313 + | PS3_PM_START_STOP_STOP_MASK))) {
66314 + result = lv1_set_lpm_trigger_control(lpm_priv->lpm_id,
66315 + (PS3_PM_START_STOP_PPU_TH0_BOOKMARK_START |
66316 + PS3_PM_START_STOP_PPU_TH1_BOOKMARK_START |
66317 + PS3_PM_START_STOP_PPU_TH0_BOOKMARK_STOP |
66318 + PS3_PM_START_STOP_PPU_TH1_BOOKMARK_STOP),
66319 + 0xFFFFFFFFFFFFFFFFULL, &tmp);
66322 + dev_err(sbd_core(), "%s:%u: "
66323 + "lv1_set_lpm_trigger_control failed: "
66324 + "%s\n", __func__, __LINE__,
66325 + ps3_result(result));
66327 + insert_bookmark = !result;
66331 + result = lv1_start_lpm(lpm_priv->lpm_id);
66334 + dev_err(sbd_core(), "%s:%u: lv1_start_lpm failed: %s\n",
66335 + __func__, __LINE__, ps3_result(result));
66337 + if (use_start_stop_bookmark && !result && insert_bookmark)
66338 + ps3_set_bookmark(get_tb() | PS3_PM_BOOKMARK_START);
66340 +EXPORT_SYMBOL_GPL(ps3_enable_pm);
66343 + * ps3_disable_pm - Disable the entire performance monitoring unit.
66346 +void ps3_disable_pm(u32 cpu)
66351 + ps3_set_bookmark(get_tb() | PS3_PM_BOOKMARK_STOP);
66353 + result = lv1_stop_lpm(lpm_priv->lpm_id, &tmp);
66356 + if(result != LV1_WRONG_STATE)
66357 + dev_err(sbd_core(), "%s:%u: lv1_stop_lpm failed: %s\n",
66358 + __func__, __LINE__, ps3_result(result));
66362 + lpm_priv->tb_count = tmp;
66364 + dev_dbg(sbd_core(), "%s:%u: tb_count %lu (%lxh)\n", __func__, __LINE__,
66365 + lpm_priv->tb_count, lpm_priv->tb_count);
66367 +EXPORT_SYMBOL_GPL(ps3_disable_pm);
66370 + * ps3_lpm_copy_tb - Copy data from the trace buffer to a kernel buffer.
66371 + * @offset: Offset in bytes from the start of the trace buffer.
66372 + * @buf: Copy destination.
66373 + * @count: Maximum count of bytes to copy.
66374 + * @bytes_copied: Pointer to a variable that will recieve the number of
66375 + * bytes copied to @buf.
66377 + * On error @buf will contain any successfully copied trace buffer data
66378 + * and bytes_copied will be set to the number of bytes successfully copied.
66381 +int ps3_lpm_copy_tb(unsigned long offset, void *buf, unsigned long count,
66382 + unsigned long *bytes_copied)
66386 + *bytes_copied = 0;
66388 + if (!lpm_priv->tb_cache)
66391 + if (offset >= lpm_priv->tb_count)
66394 + count = min(count, lpm_priv->tb_count - offset);
66396 + while (*bytes_copied < count) {
66397 + const unsigned long request = count - *bytes_copied;
66400 + result = lv1_copy_lpm_trace_buffer(lpm_priv->lpm_id, offset,
66403 + dev_dbg(sbd_core(), "%s:%u: 0x%lx bytes at 0x%lx\n",
66404 + __func__, __LINE__, request, offset);
66406 + dev_err(sbd_core(), "%s:%u: lv1_copy_lpm_trace_buffer "
66407 + "failed: %s\n", __func__, __LINE__,
66408 + ps3_result(result));
66409 + return result == LV1_WRONG_STATE ? -EBUSY : -EINVAL;
66412 + memcpy(buf, lpm_priv->tb_cache, tmp);
66414 + *bytes_copied += tmp;
66417 + dev_dbg(sbd_core(), "%s:%u: copied %lxh bytes\n", __func__, __LINE__,
66422 +EXPORT_SYMBOL_GPL(ps3_lpm_copy_tb);
66425 + * ps3_lpm_copy_tb_to_user - Copy data from the trace buffer to a user buffer.
66426 + * @offset: Offset in bytes from the start of the trace buffer.
66427 + * @buf: A __user copy destination.
66428 + * @count: Maximum count of bytes to copy.
66429 + * @bytes_copied: Pointer to a variable that will recieve the number of
66430 + * bytes copied to @buf.
66432 + * On error @buf will contain any successfully copied trace buffer data
66433 + * and bytes_copied will be set to the number of bytes successfully copied.
66436 +int ps3_lpm_copy_tb_to_user(unsigned long offset, void __user *buf,
66437 + unsigned long count, unsigned long *bytes_copied)
66441 + *bytes_copied = 0;
66443 + if (!lpm_priv->tb_cache)
66446 + if (offset >= lpm_priv->tb_count)
66449 + count = min(count, lpm_priv->tb_count - offset);
66451 + while (*bytes_copied < count) {
66452 + const unsigned long request = count - *bytes_copied;
66455 + result = lv1_copy_lpm_trace_buffer(lpm_priv->lpm_id, offset,
66458 + dev_dbg(sbd_core(), "%s:%u: 0x%lx bytes at 0x%lx\n",
66459 + __func__, __LINE__, request, offset);
66460 + dev_err(sbd_core(), "%s:%u: lv1_copy_lpm_trace_buffer "
66461 + "failed: %s\n", __func__, __LINE__,
66462 + ps3_result(result));
66463 + return result == LV1_WRONG_STATE ? -EBUSY : -EINVAL;
66466 + result = copy_to_user(buf, lpm_priv->tb_cache, tmp);
66469 + dev_dbg(sbd_core(), "%s:%u: 0x%lx bytes at 0x%p\n",
66470 + __func__, __LINE__, tmp, buf);
66471 + dev_err(sbd_core(), "%s:%u: copy_to_user failed: %d\n",
66472 + __func__, __LINE__, result);
66477 + *bytes_copied += tmp;
66480 + dev_dbg(sbd_core(), "%s:%u: copied %lxh bytes\n", __func__, __LINE__,
66485 +EXPORT_SYMBOL_GPL(ps3_lpm_copy_tb_to_user);
66488 + * ps3_get_and_clear_pm_interrupts -
66490 + * Clearing interrupts for the entire performance monitoring unit.
66491 + * Reading pm_status clears the interrupt bits.
66494 +u32 ps3_get_and_clear_pm_interrupts(u32 cpu)
66496 + return ps3_read_pm(cpu, pm_status);
66498 +EXPORT_SYMBOL_GPL(ps3_get_and_clear_pm_interrupts);
66501 + * ps3_enable_pm_interrupts -
66503 + * Enabling interrupts for the entire performance monitoring unit.
66504 + * Enables the interrupt bits in the pm_status register.
66507 +void ps3_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask)
66510 + ps3_write_pm(cpu, pm_status, mask);
66512 +EXPORT_SYMBOL_GPL(ps3_enable_pm_interrupts);
66515 + * ps3_enable_pm_interrupts -
66517 + * Disabling interrupts for the entire performance monitoring unit.
66520 +void ps3_disable_pm_interrupts(u32 cpu)
66522 + ps3_get_and_clear_pm_interrupts(cpu);
66523 + ps3_write_pm(cpu, pm_status, 0);
66525 +EXPORT_SYMBOL_GPL(ps3_disable_pm_interrupts);
66528 + * ps3_lpm_open - Open the logical performance monitor device.
66529 + * @tb_type: Specifies the type of trace buffer lv1 sould use for this lpm
66530 + * instance, specified by one of enum ps3_lpm_tb_type.
66531 + * @tb_cache: Optional user supplied buffer to use as the trace buffer cache.
66532 + * If NULL, the driver will allocate and manage an internal buffer.
66533 + * Unused when when @tb_type is PS3_LPM_TB_TYPE_NONE.
66534 + * @tb_cache_size: The size in bytes of the user supplied @tb_cache buffer.
66535 + * Unused when @tb_cache is NULL or @tb_type is PS3_LPM_TB_TYPE_NONE.
66538 +int ps3_lpm_open(enum ps3_lpm_tb_type tb_type, void *tb_cache,
66539 + u64 tb_cache_size)
66544 + BUG_ON(!lpm_priv);
66545 + BUG_ON(tb_type != PS3_LPM_TB_TYPE_NONE
66546 + && tb_type != PS3_LPM_TB_TYPE_INTERNAL);
66548 + if (tb_type == PS3_LPM_TB_TYPE_NONE && tb_cache)
66549 + dev_dbg(sbd_core(), "%s:%u: bad in vals\n", __func__, __LINE__);
66551 + if (!atomic_add_unless(&lpm_priv->open, 1, 1)) {
66552 + dev_dbg(sbd_core(), "%s:%u: busy\n", __func__, __LINE__);
66556 + /* Note tb_cache needs 128 byte alignment. */
66558 + if (tb_type == PS3_LPM_TB_TYPE_NONE) {
66559 + lpm_priv->tb_cache_size = 0;
66560 + lpm_priv->tb_cache_internal = NULL;
66561 + lpm_priv->tb_cache = NULL;
66562 + } else if (tb_cache) {
66563 + if (tb_cache != (void *)_ALIGN_UP((unsigned long)tb_cache, 128)
66564 + || tb_cache_size != _ALIGN_UP(tb_cache_size, 128)) {
66565 + dev_err(sbd_core(), "%s:%u: unaligned tb_cache\n",
66566 + __func__, __LINE__);
66567 + result = -EINVAL;
66570 + lpm_priv->tb_cache_size = tb_cache_size;
66571 + lpm_priv->tb_cache_internal = NULL;
66572 + lpm_priv->tb_cache = tb_cache;
66574 + lpm_priv->tb_cache_size = PS3_LPM_DEFAULT_TB_CACHE_SIZE;
66575 + lpm_priv->tb_cache_internal = kzalloc(
66576 + lpm_priv->tb_cache_size + 127, GFP_KERNEL);
66577 + if (!lpm_priv->tb_cache_internal) {
66578 + dev_err(sbd_core(), "%s:%u: alloc internal tb_cache "
66579 + "failed\n", __func__, __LINE__);
66580 + result = -ENOMEM;
66581 + goto fail_malloc;
66583 + lpm_priv->tb_cache = (void *)_ALIGN_UP(
66584 + (unsigned long)lpm_priv->tb_cache_internal, 128);
66587 + result = lv1_construct_lpm(lpm_priv->node_id, tb_type, 0, 0,
66588 + ps3_mm_phys_to_lpar(__pa(lpm_priv->tb_cache)),
66589 + lpm_priv->tb_cache_size, &lpm_priv->lpm_id,
66590 + &lpm_priv->outlet_id, &tb_size);
66593 + dev_err(sbd_core(), "%s:%u: lv1_construct_lpm failed: %s\n",
66594 + __func__, __LINE__, ps3_result(result));
66595 + result = -EINVAL;
66596 + goto fail_construct;
66599 + lpm_priv->shadow.pm_control = PS3_LPM_SHADOW_REG_INIT;
66600 + lpm_priv->shadow.pm_start_stop = PS3_LPM_SHADOW_REG_INIT;
66601 + lpm_priv->shadow.pm_interval = PS3_LPM_SHADOW_REG_INIT;
66602 + lpm_priv->shadow.group_control = PS3_LPM_SHADOW_REG_INIT;
66603 + lpm_priv->shadow.debug_bus_control = PS3_LPM_SHADOW_REG_INIT;
66605 + dev_dbg(sbd_core(), "%s:%u: lpm_id 0x%lx, outlet_id 0x%lx, "
66606 + "tb_size 0x%lx\n", __func__, __LINE__, lpm_priv->lpm_id,
66607 + lpm_priv->outlet_id, tb_size);
66612 + kfree(lpm_priv->tb_cache_internal);
66613 + lpm_priv->tb_cache_internal = NULL;
66616 + atomic_dec(&lpm_priv->open);
66619 +EXPORT_SYMBOL_GPL(ps3_lpm_open);
66622 + * ps3_lpm_close - Close the lpm device.
66626 +int ps3_lpm_close(void)
66628 + dev_dbg(sbd_core(), "%s:%u\n", __func__, __LINE__);
66630 + lv1_destruct_lpm(lpm_priv->lpm_id);
66631 + lpm_priv->lpm_id = 0;
66633 + kfree(lpm_priv->tb_cache_internal);
66634 + lpm_priv->tb_cache_internal = NULL;
66636 + atomic_dec(&lpm_priv->open);
66639 +EXPORT_SYMBOL_GPL(ps3_lpm_close);
66641 +static int __devinit ps3_lpm_probe(struct ps3_system_bus_device *dev)
66643 + dev_dbg(&dev->core, " -> %s:%u\n", __func__, __LINE__);
66646 + dev_info(&dev->core, "%s:%u: called twice\n",
66647 + __func__, __LINE__);
66651 + lpm_priv = kzalloc(sizeof(*lpm_priv), GFP_KERNEL);
66656 + lpm_priv->sbd = dev;
66657 + lpm_priv->node_id = dev->lpm.node_id;
66658 + lpm_priv->pu_id = dev->lpm.pu_id;
66659 + lpm_priv->rights = dev->lpm.rights;
66661 + dev_info(&dev->core, " <- %s:%u:\n", __func__, __LINE__);
66666 +static int ps3_lpm_remove(struct ps3_system_bus_device *dev)
66668 + dev_dbg(&dev->core, " -> %s:%u:\n", __func__, __LINE__);
66675 + dev_info(&dev->core, " <- %s:%u:\n", __func__, __LINE__);
66679 +static struct ps3_system_bus_driver ps3_lpm_driver = {
66680 + .match_id = PS3_MATCH_ID_LPM,
66681 + .core.name = "ps3-lpm",
66682 + .core.owner = THIS_MODULE,
66683 + .probe = ps3_lpm_probe,
66684 + .remove = ps3_lpm_remove,
66685 + .shutdown = ps3_lpm_remove,
66688 +static int __init ps3_lpm_init(void)
66690 + pr_debug("%s:%d:\n", __func__, __LINE__);
66691 + return ps3_system_bus_driver_register(&ps3_lpm_driver);
66694 +static void __exit ps3_lpm_exit(void)
66696 + pr_debug("%s:%d:\n", __func__, __LINE__);
66697 + ps3_system_bus_driver_unregister(&ps3_lpm_driver);
66700 +module_init(ps3_lpm_init);
66701 +module_exit(ps3_lpm_exit);
66703 +MODULE_LICENSE("GPL v2");
66704 +MODULE_DESCRIPTION("PS3 Logical Performance Monitor Driver");
66705 +MODULE_AUTHOR("Sony Corporation");
66706 +MODULE_ALIAS(PS3_MODULE_ALIAS_LPM);
66707 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/ps3/ps3-sys-manager.c powerpc.git/drivers/ps3/ps3-sys-manager.c
66708 --- linux-2.6.24/drivers/ps3/ps3-sys-manager.c 2008-01-24 23:58:37.000000000 +0100
66709 +++ powerpc.git/drivers/ps3/ps3-sys-manager.c 2008-01-28 20:26:18.000000000 +0100
66710 @@ -452,7 +452,7 @@
66711 case PS3_SM_EVENT_THERMAL_ALERT:
66712 dev_dbg(&dev->core, "%s:%d: THERMAL_ALERT (zone %u)\n",
66713 __func__, __LINE__, event.value);
66714 - printk(KERN_INFO "PS3 Thermal Alert Zone %u\n", event.value);
66715 + pr_info("PS3 Thermal Alert Zone %u\n", event.value);
66717 case PS3_SM_EVENT_THERMAL_CLEARED:
66718 dev_dbg(&dev->core, "%s:%d: THERMAL_CLEARED (zone %u)\n",
66719 @@ -488,7 +488,7 @@
66720 result = ps3_vuart_read(dev, &cmd, sizeof(cmd));
66721 BUG_ON(result && "need to retry here");
66727 if (cmd.version != 1) {
66728 @@ -521,7 +521,7 @@
66729 result = ps3_vuart_read(dev, &header,
66730 sizeof(struct ps3_sys_manager_header));
66736 if (header.version != 1) {
66737 @@ -589,9 +589,9 @@
66738 PS3_SM_WAKE_DEFAULT);
66739 ps3_sys_manager_send_request_shutdown(dev);
66741 - printk(KERN_EMERG "System Halted, OK to turn off power\n");
66742 + pr_emerg("System Halted, OK to turn off power\n");
66746 ps3_sys_manager_handle_msg(dev);
66749 @@ -626,9 +626,9 @@
66750 PS3_SM_WAKE_DEFAULT);
66751 ps3_sys_manager_send_request_shutdown(dev);
66753 - printk(KERN_EMERG "System Halted, OK to turn off power\n");
66754 + pr_emerg("System Halted, OK to turn off power\n");
66758 ps3_sys_manager_handle_msg(dev);
66761 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/ps3/ps3-vuart.c powerpc.git/drivers/ps3/ps3-vuart.c
66762 --- linux-2.6.24/drivers/ps3/ps3-vuart.c 2008-01-24 23:58:37.000000000 +0100
66763 +++ powerpc.git/drivers/ps3/ps3-vuart.c 2008-01-28 20:26:18.000000000 +0100
66764 @@ -108,18 +108,18 @@
66768 -} __attribute__ ((aligned (32)));
66769 +} __attribute__((aligned(32)));
66771 #define dump_ports_bmp(_b) _dump_ports_bmp(_b, __func__, __LINE__)
66772 static void __maybe_unused _dump_ports_bmp(
66773 - const struct ports_bmp* bmp, const char* func, int line)
66774 + const struct ports_bmp *bmp, const char *func, int line)
66776 pr_debug("%s:%d: ports_bmp: %016lxh\n", func, line, bmp->status);
66779 #define dump_port_params(_b) _dump_port_params(_b, __func__, __LINE__)
66780 static void __maybe_unused _dump_port_params(unsigned int port_number,
66781 - const char* func, int line)
66782 + const char *func, int line)
66785 static const char *strings[] = {
66786 @@ -363,7 +363,7 @@
66789 static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev,
66790 - const void* buf, unsigned int bytes, unsigned long *bytes_written)
66791 + const void *buf, unsigned int bytes, unsigned long *bytes_written)
66794 struct ps3_vuart_port_priv *priv = to_port_priv(dev);
66795 @@ -431,7 +431,7 @@
66797 struct ps3_vuart_port_priv *priv = to_port_priv(dev);
66802 result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes_waiting);
66804 @@ -526,9 +526,8 @@
66806 lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_KERNEL);
66813 memcpy(lb->data, buf, bytes);
66814 lb->head = lb->data;
66815 @@ -878,7 +877,7 @@
66816 struct vuart_bus_priv {
66817 struct ports_bmp *bmp;
66819 - struct semaphore probe_mutex;
66820 + struct mutex probe_mutex;
66822 struct ps3_system_bus_device *devices[PORT_COUNT];
66823 } static vuart_bus_priv;
66824 @@ -926,9 +925,8 @@
66826 BUG_ON(vuart_bus_priv.use_count > 2);
66828 - if (vuart_bus_priv.use_count != 1) {
66829 + if (vuart_bus_priv.use_count != 1)
66833 BUG_ON(vuart_bus_priv.bmp);
66835 @@ -1017,7 +1015,7 @@
66839 - down(&vuart_bus_priv.probe_mutex);
66840 + mutex_lock(&vuart_bus_priv.probe_mutex);
66842 result = ps3_vuart_bus_interrupt_get();
66844 @@ -1077,7 +1075,7 @@
66848 - up(&vuart_bus_priv.probe_mutex);
66849 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66853 @@ -1090,7 +1088,7 @@
66855 ps3_vuart_bus_interrupt_put();
66856 fail_setup_interrupt:
66857 - up(&vuart_bus_priv.probe_mutex);
66858 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66859 dev_dbg(&dev->core, "%s:%d: failed\n", __func__, __LINE__);
66862 @@ -1129,7 +1127,7 @@
66866 - down(&vuart_bus_priv.probe_mutex);
66867 + mutex_lock(&vuart_bus_priv.probe_mutex);
66869 dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__,
66871 @@ -1137,7 +1135,7 @@
66872 if (!dev->core.driver) {
66873 dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__,
66875 - up(&vuart_bus_priv.probe_mutex);
66876 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66880 @@ -1160,7 +1158,7 @@
66883 dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);
66884 - up(&vuart_bus_priv.probe_mutex);
66885 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66889 @@ -1180,7 +1178,7 @@
66893 - down(&vuart_bus_priv.probe_mutex);
66894 + mutex_lock(&vuart_bus_priv.probe_mutex);
66896 dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__,
66898 @@ -1188,7 +1186,7 @@
66899 if (!dev->core.driver) {
66900 dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__,
66902 - up(&vuart_bus_priv.probe_mutex);
66903 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66907 @@ -1212,7 +1210,7 @@
66909 dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);
66911 - up(&vuart_bus_priv.probe_mutex);
66912 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66916 @@ -1223,7 +1221,7 @@
66917 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
66920 - init_MUTEX(&vuart_bus_priv.probe_mutex);
66921 + mutex_init(&vuart_bus_priv.probe_mutex);
66925 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/serial/Kconfig powerpc.git/drivers/serial/Kconfig
66926 --- linux-2.6.24/drivers/serial/Kconfig 2008-01-24 23:58:37.000000000 +0100
66927 +++ powerpc.git/drivers/serial/Kconfig 2008-01-28 20:26:19.000000000 +0100
66928 @@ -1284,4 +1284,14 @@
66929 Currently, only 8250 compatible ports are supported, but
66930 others can easily be added.
66933 + tristate "Freescale QUICC Engine serial port support"
66934 + depends on QUICC_ENGINE
66935 + select SERIAL_CORE
66939 + This driver supports the QE serial ports on Freescale embedded
66940 + PowerPC that contain a QUICC Engine.
66943 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/serial/Makefile powerpc.git/drivers/serial/Makefile
66944 --- linux-2.6.24/drivers/serial/Makefile 2008-01-24 23:58:37.000000000 +0100
66945 +++ powerpc.git/drivers/serial/Makefile 2008-01-28 20:26:19.000000000 +0100
66947 obj-$(CONFIG_SERIAL_NETX) += netx-serial.o
66948 obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o
66949 obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o
66950 +obj-$(CONFIG_SERIAL_QE) += ucc_uart.o
66951 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/serial/cpm_uart/cpm_uart_cpm1.c powerpc.git/drivers/serial/cpm_uart/cpm_uart_cpm1.c
66952 --- linux-2.6.24/drivers/serial/cpm_uart/cpm_uart_cpm1.c 2008-01-24 23:58:37.000000000 +0100
66953 +++ powerpc.git/drivers/serial/cpm_uart/cpm_uart_cpm1.c 2008-01-28 20:26:19.000000000 +0100
66955 #ifdef CONFIG_PPC_CPM_NEW_BINDING
66956 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
66958 - u16 __iomem *cpcr = &cpmp->cp_cpcr;
66960 - out_be16(cpcr, port->command | (cmd << 8) | CPM_CR_FLG);
66961 - while (in_be16(cpcr) & CPM_CR_FLG)
66963 + cpm_command(port->command, cmd);
66966 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
66967 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/serial/cpm_uart/cpm_uart_cpm2.c powerpc.git/drivers/serial/cpm_uart/cpm_uart_cpm2.c
66968 --- linux-2.6.24/drivers/serial/cpm_uart/cpm_uart_cpm2.c 2008-01-24 23:58:37.000000000 +0100
66969 +++ powerpc.git/drivers/serial/cpm_uart/cpm_uart_cpm2.c 2008-01-28 20:26:19.000000000 +0100
66971 #ifdef CONFIG_PPC_CPM_NEW_BINDING
66972 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
66974 - cpm_cpm2_t __iomem *cp = cpm2_map(im_cpm);
66976 - out_be32(&cp->cp_cpcr, port->command | cmd | CPM_CR_FLG);
66977 - while (in_be32(&cp->cp_cpcr) & CPM_CR_FLG)
66981 + cpm_command(port->command, cmd);
66984 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
66985 @@ -171,9 +165,9 @@
66986 * really has to get out of the driver so boards can
66987 * be supported in a sane fashion.
66989 + volatile cpmux_t *cpmux = cpm2_map(im_cpmux);
66990 #ifndef CONFIG_STX_GP3
66991 volatile iop_cpm2_t *io = cpm2_map(im_ioport);
66992 - volatile cpmux_t *cpmux = cpm2_map(im_cpmux);
66994 io->iop_pparb |= 0x008b0000;
66995 io->iop_pdirb |= 0x00880000;
66996 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/serial/mpc52xx_uart.c powerpc.git/drivers/serial/mpc52xx_uart.c
66997 --- linux-2.6.24/drivers/serial/mpc52xx_uart.c 2008-01-24 23:58:37.000000000 +0100
66998 +++ powerpc.git/drivers/serial/mpc52xx_uart.c 2008-01-28 20:26:19.000000000 +0100
67000 * DCD. However, the pin multiplexing aren't changed and should be set either
67001 * by the bootloader or in the platform init code.
67003 - * The idx field must be equal to the PSC index ( e.g. 0 for PSC1, 1 for PSC2,
67004 + * The idx field must be equal to the PSC index (e.g. 0 for PSC1, 1 for PSC2,
67005 * and so on). So the PSC1 is mapped to /dev/ttyPSC0, PSC2 to /dev/ttyPSC1 and
67006 * so on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly
67007 * fpr the console code : without this 1:1 mapping, at early boot time, when we
67008 @@ -68,11 +68,12 @@
67009 #include <linux/sysrq.h>
67010 #include <linux/console.h>
67012 -#include <asm/delay.h>
67013 -#include <asm/io.h>
67014 +#include <linux/delay.h>
67015 +#include <linux/io.h>
67017 #if defined(CONFIG_PPC_MERGE)
67018 -#include <asm/of_platform.h>
67019 +#include <linux/of.h>
67020 +#include <linux/of_platform.h>
67022 #include <linux/platform_device.h>
67024 @@ -111,16 +112,18 @@
67027 #define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase))
67028 +#define FIFO(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1))
67031 /* Forward declaration of the interruption handling routine */
67032 -static irqreturn_t mpc52xx_uart_int(int irq,void *dev_id);
67033 +static irqreturn_t mpc52xx_uart_int(int irq, void *dev_id);
67036 /* Simple macro to test if a port is console or not. This one is taken
67037 * for serial_core.c and maybe should be moved to serial_core.h ? */
67038 #ifdef CONFIG_SERIAL_CORE_CONSOLE
67039 -#define uart_console(port) ((port)->cons && (port)->cons->index == (port)->line)
67040 +#define uart_console(port) \
67041 + ((port)->cons && (port)->cons->index == (port)->line)
67043 #define uart_console(port) (0)
67045 @@ -162,7 +165,7 @@
67047 /* port->lock taken by caller */
67048 port->read_status_mask &= ~MPC52xx_PSC_IMR_TXRDY;
67049 - out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
67050 + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
67054 @@ -170,7 +173,7 @@
67056 /* port->lock taken by caller */
67057 port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY;
67058 - out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
67059 + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
67063 @@ -184,7 +187,7 @@
67064 /* Make sure tx interrupts are on */
67065 /* Truly necessary ??? They should be anyway */
67066 port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY;
67067 - out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
67068 + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
67071 spin_unlock_irqrestore(&port->lock, flags);
67072 @@ -195,7 +198,7 @@
67074 /* port->lock taken by caller */
67075 port->read_status_mask &= ~MPC52xx_PSC_IMR_RXRDY;
67076 - out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
67077 + out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
67081 @@ -210,10 +213,10 @@
67082 unsigned long flags;
67083 spin_lock_irqsave(&port->lock, flags);
67086 - out_8(&PSC(port)->command,MPC52xx_PSC_START_BRK);
67088 + out_8(&PSC(port)->command, MPC52xx_PSC_START_BRK);
67090 - out_8(&PSC(port)->command,MPC52xx_PSC_STOP_BRK);
67091 + out_8(&PSC(port)->command, MPC52xx_PSC_STOP_BRK);
67093 spin_unlock_irqrestore(&port->lock, flags);
67095 @@ -222,6 +225,7 @@
67096 mpc52xx_uart_startup(struct uart_port *port)
67098 struct mpc52xx_psc __iomem *psc = PSC(port);
67099 + struct mpc52xx_psc_fifo __iomem *fifo = FIFO(port);
67103 @@ -231,23 +235,23 @@
67106 /* Reset/activate the port, clear and enable interrupts */
67107 - out_8(&psc->command,MPC52xx_PSC_RST_RX);
67108 - out_8(&psc->command,MPC52xx_PSC_RST_TX);
67109 + out_8(&psc->command, MPC52xx_PSC_RST_RX);
67110 + out_8(&psc->command, MPC52xx_PSC_RST_TX);
67112 - out_be32(&psc->sicr,0); /* UART mode DCD ignored */
67113 + out_be32(&psc->sicr, 0); /* UART mode DCD ignored */
67115 out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00); /* /16 prescaler on */
67117 - out_8(&psc->rfcntl, 0x00);
67118 - out_be16(&psc->rfalarm, 0x1ff);
67119 - out_8(&psc->tfcntl, 0x07);
67120 - out_be16(&psc->tfalarm, 0x80);
67121 + out_8(&fifo->rfcntl, 0x00);
67122 + out_be16(&fifo->rfalarm, 0x1ff);
67123 + out_8(&fifo->tfcntl, 0x07);
67124 + out_be16(&fifo->tfalarm, 0x80);
67126 port->read_status_mask |= MPC52xx_PSC_IMR_RXRDY | MPC52xx_PSC_IMR_TXRDY;
67127 - out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);
67128 + out_be16(&psc->mpc52xx_psc_imr, port->read_status_mask);
67130 - out_8(&psc->command,MPC52xx_PSC_TX_ENABLE);
67131 - out_8(&psc->command,MPC52xx_PSC_RX_ENABLE);
67132 + out_8(&psc->command, MPC52xx_PSC_TX_ENABLE);
67133 + out_8(&psc->command, MPC52xx_PSC_RX_ENABLE);
67137 @@ -258,12 +262,12 @@
67138 struct mpc52xx_psc __iomem *psc = PSC(port);
67140 /* Shut down the port. Leave TX active if on a console port */
67141 - out_8(&psc->command,MPC52xx_PSC_RST_RX);
67142 + out_8(&psc->command, MPC52xx_PSC_RST_RX);
67143 if (!uart_console(port))
67144 - out_8(&psc->command,MPC52xx_PSC_RST_TX);
67145 + out_8(&psc->command, MPC52xx_PSC_RST_TX);
67147 port->read_status_mask = 0;
67148 - out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);
67149 + out_be16(&psc->mpc52xx_psc_imr, port->read_status_mask);
67151 /* Release interrupt */
67152 free_irq(port->irq, port);
67153 @@ -271,7 +275,7 @@
67156 mpc52xx_uart_set_termios(struct uart_port *port, struct ktermios *new,
67157 - struct ktermios *old)
67158 + struct ktermios *old)
67160 struct mpc52xx_psc __iomem *psc = PSC(port);
67161 unsigned long flags;
67162 @@ -283,14 +287,14 @@
67165 switch (new->c_cflag & CSIZE) {
67166 - case CS5: mr1 |= MPC52xx_PSC_MODE_5_BITS;
67168 - case CS6: mr1 |= MPC52xx_PSC_MODE_6_BITS;
67170 - case CS7: mr1 |= MPC52xx_PSC_MODE_7_BITS;
67173 - default: mr1 |= MPC52xx_PSC_MODE_8_BITS;
67174 + case CS5: mr1 |= MPC52xx_PSC_MODE_5_BITS;
67176 + case CS6: mr1 |= MPC52xx_PSC_MODE_6_BITS;
67178 + case CS7: mr1 |= MPC52xx_PSC_MODE_7_BITS;
67181 + default: mr1 |= MPC52xx_PSC_MODE_8_BITS;
67184 if (new->c_cflag & PARENB) {
67185 @@ -332,24 +336,24 @@
67189 - printk( KERN_ERR "mpc52xx_uart.c: "
67190 + printk(KERN_ERR "mpc52xx_uart.c: "
67191 "Unable to flush RX & TX fifos in-time in set_termios."
67192 - "Some chars may have been lost.\n" );
67193 + "Some chars may have been lost.\n");
67195 /* Reset the TX & RX */
67196 - out_8(&psc->command,MPC52xx_PSC_RST_RX);
67197 - out_8(&psc->command,MPC52xx_PSC_RST_TX);
67198 + out_8(&psc->command, MPC52xx_PSC_RST_RX);
67199 + out_8(&psc->command, MPC52xx_PSC_RST_TX);
67201 /* Send new mode settings */
67202 - out_8(&psc->command,MPC52xx_PSC_SEL_MODE_REG_1);
67203 - out_8(&psc->mode,mr1);
67204 - out_8(&psc->mode,mr2);
67205 - out_8(&psc->ctur,ctr >> 8);
67206 - out_8(&psc->ctlr,ctr & 0xff);
67207 + out_8(&psc->command, MPC52xx_PSC_SEL_MODE_REG_1);
67208 + out_8(&psc->mode, mr1);
67209 + out_8(&psc->mode, mr2);
67210 + out_8(&psc->ctur, ctr >> 8);
67211 + out_8(&psc->ctlr, ctr & 0xff);
67213 /* Reenable TX & RX */
67214 - out_8(&psc->command,MPC52xx_PSC_TX_ENABLE);
67215 - out_8(&psc->command,MPC52xx_PSC_RX_ENABLE);
67216 + out_8(&psc->command, MPC52xx_PSC_TX_ENABLE);
67217 + out_8(&psc->command, MPC52xx_PSC_RX_ENABLE);
67219 /* We're all set, release the lock */
67220 spin_unlock_irqrestore(&port->lock, flags);
67221 @@ -364,7 +368,8 @@
67223 mpc52xx_uart_release_port(struct uart_port *port)
67225 - if (port->flags & UPF_IOREMAP) { /* remapped by us ? */
67226 + /* remapped by us ? */
67227 + if (port->flags & UPF_IOREMAP) {
67228 iounmap(port->membase);
67229 port->membase = NULL;
67231 @@ -379,7 +384,7 @@
67233 if (port->flags & UPF_IOREMAP) /* Need to remap ? */
67234 port->membase = ioremap(port->mapbase,
67235 - sizeof(struct mpc52xx_psc));
67236 + sizeof(struct mpc52xx_psc));
67238 if (!port->membase)
67240 @@ -398,22 +403,22 @@
67242 mpc52xx_uart_config_port(struct uart_port *port, int flags)
67244 - if ( (flags & UART_CONFIG_TYPE) &&
67245 - (mpc52xx_uart_request_port(port) == 0) )
67246 - port->type = PORT_MPC52xx;
67247 + if ((flags & UART_CONFIG_TYPE)
67248 + && (mpc52xx_uart_request_port(port) == 0))
67249 + port->type = PORT_MPC52xx;
67253 mpc52xx_uart_verify_port(struct uart_port *port, struct serial_struct *ser)
67255 - if ( ser->type != PORT_UNKNOWN && ser->type != PORT_MPC52xx )
67256 + if (ser->type != PORT_UNKNOWN && ser->type != PORT_MPC52xx)
67259 - if ( (ser->irq != port->irq) ||
67260 - (ser->io_type != SERIAL_IO_MEM) ||
67261 - (ser->baud_base != port->uartclk) ||
67262 - (ser->iomem_base != (void*)port->mapbase) ||
67263 - (ser->hub6 != 0 ) )
67264 + if ((ser->irq != port->irq) ||
67265 + (ser->io_type != SERIAL_IO_MEM) ||
67266 + (ser->baud_base != port->uartclk) ||
67267 + (ser->iomem_base != (void *)port->mapbase) ||
67268 + (ser->hub6 != 0))
67272 @@ -455,8 +460,8 @@
67273 unsigned short status;
67275 /* While we can read, do so ! */
67276 - while ( (status = in_be16(&PSC(port)->mpc52xx_psc_status)) &
67277 - MPC52xx_PSC_SR_RXRDY) {
67278 + while ((status = in_be16(&PSC(port)->mpc52xx_psc_status)) &
67279 + MPC52xx_PSC_SR_RXRDY) {
67282 ch = in_8(&PSC(port)->mpc52xx_psc_buffer_8);
67283 @@ -474,9 +479,9 @@
67287 - if ( status & (MPC52xx_PSC_SR_PE |
67288 - MPC52xx_PSC_SR_FE |
67289 - MPC52xx_PSC_SR_RB) ) {
67290 + if (status & (MPC52xx_PSC_SR_PE |
67291 + MPC52xx_PSC_SR_FE |
67292 + MPC52xx_PSC_SR_RB)) {
67294 if (status & MPC52xx_PSC_SR_RB) {
67296 @@ -487,7 +492,7 @@
67299 /* Clear error condition */
67300 - out_8(&PSC(port)->command,MPC52xx_PSC_RST_ERR_STAT);
67301 + out_8(&PSC(port)->command, MPC52xx_PSC_RST_ERR_STAT);
67304 tty_insert_flip_char(tty, ch, flag);
67305 @@ -568,16 +573,16 @@
67307 /* Do we need to receive chars ? */
67308 /* For this RX interrupts must be on and some chars waiting */
67309 - if ( status & MPC52xx_PSC_IMR_RXRDY )
67310 + if (status & MPC52xx_PSC_IMR_RXRDY)
67311 keepgoing |= mpc52xx_uart_int_rx_chars(port);
67313 /* Do we need to send chars ? */
67314 /* For this, TX must be ready and TX interrupt enabled */
67315 - if ( status & MPC52xx_PSC_IMR_TXRDY )
67316 + if (status & MPC52xx_PSC_IMR_TXRDY)
67317 keepgoing |= mpc52xx_uart_int_tx_chars(port);
67319 /* Limit number of iteration */
67324 } while (keepgoing);
67325 @@ -596,7 +601,7 @@
67328 mpc52xx_console_get_options(struct uart_port *port,
67329 - int *baud, int *parity, int *bits, int *flow)
67330 + int *baud, int *parity, int *bits, int *flow)
67332 struct mpc52xx_psc __iomem *psc = PSC(port);
67334 @@ -604,7 +609,7 @@
67335 pr_debug("mpc52xx_console_get_options(port=%p)\n", port);
67337 /* Read the mode registers */
67338 - out_8(&psc->command,MPC52xx_PSC_SEL_MODE_REG_1);
67339 + out_8(&psc->command, MPC52xx_PSC_SEL_MODE_REG_1);
67340 mr1 = in_8(&psc->mode);
67342 /* CT{U,L}R are write-only ! */
67343 @@ -616,11 +621,18 @@
67346 switch (mr1 & MPC52xx_PSC_MODE_BITS_MASK) {
67347 - case MPC52xx_PSC_MODE_5_BITS: *bits = 5; break;
67348 - case MPC52xx_PSC_MODE_6_BITS: *bits = 6; break;
67349 - case MPC52xx_PSC_MODE_7_BITS: *bits = 7; break;
67350 - case MPC52xx_PSC_MODE_8_BITS:
67351 - default: *bits = 8;
67352 + case MPC52xx_PSC_MODE_5_BITS:
67355 + case MPC52xx_PSC_MODE_6_BITS:
67358 + case MPC52xx_PSC_MODE_7_BITS:
67361 + case MPC52xx_PSC_MODE_8_BITS:
67366 if (mr1 & MPC52xx_PSC_MODE_PARNONE)
67367 @@ -657,7 +669,7 @@
67368 /* Wait the TX buffer to be empty */
67369 j = 20000; /* Maximum wait */
67370 while (!(in_be16(&psc->mpc52xx_psc_status) &
67371 - MPC52xx_PSC_SR_TXEMP) && --j)
67372 + MPC52xx_PSC_SR_TXEMP) && --j)
67376 @@ -730,16 +742,18 @@
67379 pr_debug("Console on ttyPSC%x is %s\n",
67380 - co->index, mpc52xx_uart_nodes[co->index]->full_name);
67381 + co->index, mpc52xx_uart_nodes[co->index]->full_name);
67383 /* Fetch register locations */
67384 - if ((ret = of_address_to_resource(np, 0, &res)) != 0) {
67385 + ret = of_address_to_resource(np, 0, &res);
67387 pr_debug("Could not get resources for PSC%x\n", co->index);
67391 /* Search for bus-frequency property in this node or a parent */
67392 - if ((ipb_freq = mpc52xx_find_ipb_freq(np)) == 0) {
67393 + ipb_freq = mpc52xx_find_ipb_freq(np);
67394 + if (ipb_freq == 0) {
67395 pr_debug("Could not find IPB bus frequency!\n");
67398 @@ -757,7 +771,8 @@
67401 pr_debug("mpc52xx-psc uart at %p, mapped to %p, irq=%x, freq=%i\n",
67402 - (void*)port->mapbase, port->membase, port->irq, port->uartclk);
67403 + (void *)port->mapbase, port->membase,
67404 + port->irq, port->uartclk);
67406 /* Setup the port parameters accoding to options */
67408 @@ -766,7 +781,7 @@
67409 mpc52xx_console_get_options(port, &baud, &parity, &bits, &flow);
67411 pr_debug("Setting console parameters: %i %i%c1 flow=%c\n",
67412 - baud, bits, parity, flow);
67413 + baud, bits, parity, flow);
67415 return uart_set_options(port, co, baud, parity, bits, flow);
67417 @@ -781,7 +796,7 @@
67418 .device = uart_console_device,
67419 .setup = mpc52xx_console_setup,
67420 .flags = CON_PRINTBUFFER,
67421 - .index = -1, /* Specified on the cmdline (e.g. console=ttyPSC0 ) */
67422 + .index = -1, /* Specified on the cmdline (e.g. console=ttyPSC0) */
67423 .data = &mpc52xx_uart_driver,
67426 @@ -809,7 +824,6 @@
67427 /* ======================================================================== */
67429 static struct uart_driver mpc52xx_uart_driver = {
67430 - .owner = THIS_MODULE,
67431 .driver_name = "mpc52xx_psc_uart",
67432 .dev_name = "ttyPSC",
67433 .major = SERIAL_PSC_MAJOR,
67434 @@ -837,7 +851,7 @@
67435 if (idx < 0 || idx >= MPC52xx_PSC_MAXNUM)
67438 - if (!mpc52xx_match_psc_function(idx,"uart"))
67439 + if (!mpc52xx_match_psc_function(idx, "uart"))
67442 /* Init the port structure */
67443 @@ -848,13 +862,13 @@
67444 port->fifosize = 512;
67445 port->iotype = UPIO_MEM;
67446 port->flags = UPF_BOOT_AUTOCONF |
67447 - ( uart_console(port) ? 0 : UPF_IOREMAP );
67448 + (uart_console(port) ? 0 : UPF_IOREMAP);
67450 port->ops = &mpc52xx_uart_ops;
67451 port->dev = &dev->dev;
67453 /* Search for IRQ and mapbase */
67454 - for (i=0 ; i<dev->num_resources ; i++, res++) {
67455 + for (i = 0 ; i < dev->num_resources ; i++, res++) {
67456 if (res->flags & IORESOURCE_MEM)
67457 port->mapbase = res->start;
67458 else if (res->flags & IORESOURCE_IRQ)
67459 @@ -866,7 +880,7 @@
67460 /* Add the port to the uart sub-system */
67461 ret = uart_add_one_port(&mpc52xx_uart_driver, port);
67463 - platform_set_drvdata(dev, (void*)port);
67464 + platform_set_drvdata(dev, (void *)port);
67468 @@ -917,6 +931,7 @@
67469 .resume = mpc52xx_uart_resume,
67472 + .owner = THIS_MODULE,
67473 .name = "mpc52xx-psc",
67476 @@ -946,10 +961,11 @@
67477 if (idx >= MPC52xx_PSC_MAXNUM)
67479 pr_debug("Found %s assigned to ttyPSC%x\n",
67480 - mpc52xx_uart_nodes[idx]->full_name, idx);
67481 + mpc52xx_uart_nodes[idx]->full_name, idx);
67483 /* Search for bus-frequency property in this node or a parent */
67484 - if ((ipb_freq = mpc52xx_find_ipb_freq(op->node)) == 0) {
67485 + ipb_freq = mpc52xx_find_ipb_freq(op->node);
67486 + if (ipb_freq == 0) {
67487 dev_dbg(&op->dev, "Could not find IPB bus frequency!\n");
67490 @@ -962,22 +978,23 @@
67491 port->fifosize = 512;
67492 port->iotype = UPIO_MEM;
67493 port->flags = UPF_BOOT_AUTOCONF |
67494 - ( uart_console(port) ? 0 : UPF_IOREMAP );
67495 + (uart_console(port) ? 0 : UPF_IOREMAP);
67497 port->ops = &mpc52xx_uart_ops;
67498 port->dev = &op->dev;
67500 /* Search for IRQ and mapbase */
67501 - if ((ret = of_address_to_resource(op->node, 0, &res)) != 0)
67502 + ret = of_address_to_resource(op->node, 0, &res);
67506 port->mapbase = res.start;
67507 port->irq = irq_of_parse_and_map(op->node, 0);
67509 dev_dbg(&op->dev, "mpc52xx-psc uart at %p, irq=%x, freq=%i\n",
67510 - (void*)port->mapbase, port->irq, port->uartclk);
67511 + (void *)port->mapbase, port->irq, port->uartclk);
67513 - if ((port->irq==NO_IRQ) || !port->mapbase) {
67514 + if ((port->irq == NO_IRQ) || !port->mapbase) {
67515 printk(KERN_ERR "Could not allocate resources for PSC\n");
67518 @@ -985,7 +1002,7 @@
67519 /* Add the port to the uart sub-system */
67520 ret = uart_add_one_port(&mpc52xx_uart_driver, port);
67522 - dev_set_drvdata(&op->dev, (void*)port);
67523 + dev_set_drvdata(&op->dev, (void *)port);
67527 @@ -1048,6 +1065,7 @@
67529 return; /* No free slot; abort */
67532 /* If the slot is already occupied, then swap slots */
67533 if (mpc52xx_uart_nodes[idx] && (free_idx != -1))
67534 mpc52xx_uart_nodes[free_idx] = mpc52xx_uart_nodes[idx];
67535 @@ -1057,7 +1075,7 @@
67537 mpc52xx_uart_of_enumerate(void)
67539 - static int enum_done = 0;
67540 + static int enum_done;
67541 struct device_node *np;
67542 const unsigned int *devno;
67544 @@ -1071,7 +1089,7 @@
67546 /* Is a particular device number requested? */
67547 devno = of_get_property(np, "port-number", NULL);
67548 - mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1);
67549 + mpc52xx_uart_of_assign(np, devno ? *devno : -1);
67553 @@ -1079,15 +1097,13 @@
67554 for (i = 0; i < MPC52xx_PSC_MAXNUM; i++) {
67555 if (mpc52xx_uart_nodes[i])
67556 pr_debug("%s assigned to ttyPSC%x\n",
67557 - mpc52xx_uart_nodes[i]->full_name, i);
67558 + mpc52xx_uart_nodes[i]->full_name, i);
67562 MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match);
67564 static struct of_platform_driver mpc52xx_uart_of_driver = {
67565 - .owner = THIS_MODULE,
67566 - .name = "mpc52xx-psc-uart",
67567 .match_table = mpc52xx_uart_of_match,
67568 .probe = mpc52xx_uart_of_probe,
67569 .remove = mpc52xx_uart_of_remove,
67570 @@ -1113,7 +1129,8 @@
67572 printk(KERN_INFO "Serial: MPC52xx PSC UART driver\n");
67574 - if ((ret = uart_register_driver(&mpc52xx_uart_driver)) != 0) {
67575 + ret = uart_register_driver(&mpc52xx_uart_driver);
67577 printk(KERN_ERR "%s: uart_register_driver failed (%i)\n",
67580 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/serial/uartlite.c powerpc.git/drivers/serial/uartlite.c
67581 --- linux-2.6.24/drivers/serial/uartlite.c 2008-01-24 23:58:37.000000000 +0100
67582 +++ powerpc.git/drivers/serial/uartlite.c 2008-01-28 20:26:19.000000000 +0100
67583 @@ -539,7 +539,7 @@
67585 * @dev: pointer to device structure
67587 -static int __devinit ulite_release(struct device *dev)
67588 +static int __devexit ulite_release(struct device *dev)
67590 struct uart_port *port = dev_get_drvdata(dev);
67592 @@ -572,14 +572,14 @@
67593 return ulite_assign(&pdev->dev, pdev->id, res->start, res2->start);
67596 -static int ulite_remove(struct platform_device *pdev)
67597 +static int __devexit ulite_remove(struct platform_device *pdev)
67599 return ulite_release(&pdev->dev);
67602 static struct platform_driver ulite_platform_driver = {
67603 .probe = ulite_probe,
67604 - .remove = ulite_remove,
67605 + .remove = __devexit_p(ulite_remove),
67607 .owner = THIS_MODULE,
67608 .name = "uartlite",
67609 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/serial/ucc_uart.c powerpc.git/drivers/serial/ucc_uart.c
67610 --- linux-2.6.24/drivers/serial/ucc_uart.c 1970-01-01 01:00:00.000000000 +0100
67611 +++ powerpc.git/drivers/serial/ucc_uart.c 2008-01-28 20:26:20.000000000 +0100
67614 + * Freescale QUICC Engine UART device driver
67616 + * Author: Timur Tabi <timur@freescale.com>
67618 + * Copyright 2007 Freescale Semiconductor, Inc. This file is licensed under
67619 + * the terms of the GNU General Public License version 2. This program
67620 + * is licensed "as is" without any warranty of any kind, whether express
67623 + * This driver adds support for UART devices via Freescale's QUICC Engine
67624 + * found on some Freescale SOCs.
67626 + * If Soft-UART support is needed but not already present, then this driver
67627 + * will request and upload the "Soft-UART" microcode upon probe. The
67628 + * filename of the microcode should be fsl_qe_ucode_uart_X_YZ.bin, where "X"
67629 + * is the name of the SOC (e.g. 8323), and YZ is the revision of the SOC,
67630 + * (e.g. "11" for 1.1).
67633 +#include <linux/module.h>
67634 +#include <linux/serial.h>
67635 +#include <linux/serial_core.h>
67636 +#include <linux/io.h>
67637 +#include <linux/of_platform.h>
67638 +#include <linux/dma-mapping.h>
67640 +#include <linux/fs_uart_pd.h>
67641 +#include <asm/ucc_slow.h>
67643 +#include <linux/firmware.h>
67644 +#include <asm/reg.h>
67647 + * The GUMR flag for Soft UART. This would normally be defined in qe.h,
67648 + * but Soft-UART is a hack and we want to keep everything related to it in
67651 +#define UCC_SLOW_GUMR_H_SUART 0x00004000 /* Soft-UART */
67654 + * soft_uart is 1 if we need to use Soft-UART mode
67656 +static int soft_uart;
67658 + * firmware_loaded is 1 if the firmware has been loaded, 0 otherwise.
67660 +static int firmware_loaded;
67662 +/* Enable this macro to configure all serial ports in internal loopback
67664 +/* #define LOOPBACK */
67666 +/* The major and minor device numbers are defined in
67667 + * http://www.lanana.org/docs/device-list/devices-2.6+.txt. For the QE
67668 + * UART, we have major number 204 and minor numbers 46 - 49, which are the
67669 + * same as for the CPM2. This decision was made because no Freescale part
67670 + * has both a CPM and a QE.
67672 +#define SERIAL_QE_MAJOR 204
67673 +#define SERIAL_QE_MINOR 46
67675 +/* Since we only have minor numbers 46 - 49, there is a hard limit of 4 ports */
67676 +#define UCC_MAX_UART 4
67678 +/* The number of buffer descriptors for receiving characters. */
67679 +#define RX_NUM_FIFO 4
67681 +/* The number of buffer descriptors for transmitting characters. */
67682 +#define TX_NUM_FIFO 4
67684 +/* The maximum size of the character buffer for a single RX BD. */
67685 +#define RX_BUF_SIZE 32
67687 +/* The maximum size of the character buffer for a single TX BD. */
67688 +#define TX_BUF_SIZE 32
67691 + * The number of jiffies to wait after receiving a close command before the
67692 + * device is actually closed. This allows the last few characters to be
67693 + * sent over the wire.
67695 +#define UCC_WAIT_CLOSING 100
67697 +struct ucc_uart_pram {
67698 + struct ucc_slow_pram common;
67699 + u8 res1[8]; /* reserved */
67700 + __be16 maxidl; /* Maximum idle chars */
67701 + __be16 idlc; /* temp idle counter */
67702 + __be16 brkcr; /* Break count register */
67703 + __be16 parec; /* receive parity error counter */
67704 + __be16 frmec; /* receive framing error counter */
67705 + __be16 nosec; /* receive noise counter */
67706 + __be16 brkec; /* receive break condition counter */
67707 + __be16 brkln; /* last received break length */
67708 + __be16 uaddr[2]; /* UART address character 1 & 2 */
67709 + __be16 rtemp; /* Temp storage */
67710 + __be16 toseq; /* Transmit out of sequence char */
67711 + __be16 cchars[8]; /* control characters 1-8 */
67712 + __be16 rccm; /* receive control character mask */
67713 + __be16 rccr; /* receive control character register */
67714 + __be16 rlbc; /* receive last break character */
67715 + __be16 res2; /* reserved */
67716 + __be32 res3; /* reserved, should be cleared */
67717 + u8 res4; /* reserved, should be cleared */
67718 + u8 res5[3]; /* reserved, should be cleared */
67719 + __be32 res6; /* reserved, should be cleared */
67720 + __be32 res7; /* reserved, should be cleared */
67721 + __be32 res8; /* reserved, should be cleared */
67722 + __be32 res9; /* reserved, should be cleared */
67723 + __be32 res10; /* reserved, should be cleared */
67724 + __be32 res11; /* reserved, should be cleared */
67725 + __be32 res12; /* reserved, should be cleared */
67726 + __be32 res13; /* reserved, should be cleared */
67727 +/* The rest is for Soft-UART only */
67728 + __be16 supsmr; /* 0x90, Shadow UPSMR */
67729 + __be16 res92; /* 0x92, reserved, initialize to 0 */
67730 + __be32 rx_state; /* 0x94, RX state, initialize to 0 */
67731 + __be32 rx_cnt; /* 0x98, RX count, initialize to 0 */
67732 + u8 rx_length; /* 0x9C, Char length, set to 1+CL+PEN+1+SL */
67733 + u8 rx_bitmark; /* 0x9D, reserved, initialize to 0 */
67734 + u8 rx_temp_dlst_qe; /* 0x9E, reserved, initialize to 0 */
67735 + u8 res14[0xBC - 0x9F]; /* reserved */
67736 + __be32 dump_ptr; /* 0xBC, Dump pointer */
67737 + __be32 rx_frame_rem; /* 0xC0, reserved, initialize to 0 */
67738 + u8 rx_frame_rem_size; /* 0xC4, reserved, initialize to 0 */
67739 + u8 tx_mode; /* 0xC5, mode, 0=AHDLC, 1=UART */
67740 + __be16 tx_state; /* 0xC6, TX state */
67741 + u8 res15[0xD0 - 0xC8]; /* reserved */
67742 + __be32 resD0; /* 0xD0, reserved, initialize to 0 */
67743 + u8 resD4; /* 0xD4, reserved, initialize to 0 */
67744 + __be16 resD5; /* 0xD5, reserved, initialize to 0 */
67745 +} __attribute__ ((packed));
67747 +/* SUPSMR definitions, for Soft-UART only */
67748 +#define UCC_UART_SUPSMR_SL 0x8000
67749 +#define UCC_UART_SUPSMR_RPM_MASK 0x6000
67750 +#define UCC_UART_SUPSMR_RPM_ODD 0x0000
67751 +#define UCC_UART_SUPSMR_RPM_LOW 0x2000
67752 +#define UCC_UART_SUPSMR_RPM_EVEN 0x4000
67753 +#define UCC_UART_SUPSMR_RPM_HIGH 0x6000
67754 +#define UCC_UART_SUPSMR_PEN 0x1000
67755 +#define UCC_UART_SUPSMR_TPM_MASK 0x0C00
67756 +#define UCC_UART_SUPSMR_TPM_ODD 0x0000
67757 +#define UCC_UART_SUPSMR_TPM_LOW 0x0400
67758 +#define UCC_UART_SUPSMR_TPM_EVEN 0x0800
67759 +#define UCC_UART_SUPSMR_TPM_HIGH 0x0C00
67760 +#define UCC_UART_SUPSMR_FRZ 0x0100
67761 +#define UCC_UART_SUPSMR_UM_MASK 0x00c0
67762 +#define UCC_UART_SUPSMR_UM_NORMAL 0x0000
67763 +#define UCC_UART_SUPSMR_UM_MAN_MULTI 0x0040
67764 +#define UCC_UART_SUPSMR_UM_AUTO_MULTI 0x00c0
67765 +#define UCC_UART_SUPSMR_CL_MASK 0x0030
67766 +#define UCC_UART_SUPSMR_CL_8 0x0030
67767 +#define UCC_UART_SUPSMR_CL_7 0x0020
67768 +#define UCC_UART_SUPSMR_CL_6 0x0010
67769 +#define UCC_UART_SUPSMR_CL_5 0x0000
67771 +#define UCC_UART_TX_STATE_AHDLC 0x00
67772 +#define UCC_UART_TX_STATE_UART 0x01
67773 +#define UCC_UART_TX_STATE_X1 0x00
67774 +#define UCC_UART_TX_STATE_X16 0x80
67776 +#define UCC_UART_PRAM_ALIGNMENT 0x100
67778 +#define UCC_UART_SIZE_OF_BD UCC_SLOW_SIZE_OF_BD
67779 +#define NUM_CONTROL_CHARS 8
67781 +/* Private per-port data structure */
67782 +struct uart_qe_port {
67783 + struct uart_port port;
67784 + struct ucc_slow __iomem *uccp;
67785 + struct ucc_uart_pram __iomem *uccup;
67786 + struct ucc_slow_info us_info;
67787 + struct ucc_slow_private *us_private;
67788 + struct device_node *np;
67789 + unsigned int ucc_num; /* First ucc is 0, not 1 */
67795 + int wait_closing;
67797 + struct qe_bd *rx_bd_base;
67798 + struct qe_bd *rx_cur;
67799 + struct qe_bd *tx_bd_base;
67800 + struct qe_bd *tx_cur;
67801 + unsigned char *tx_buf;
67802 + unsigned char *rx_buf;
67803 + void *bd_virt; /* virtual address of the BD buffers */
67804 + dma_addr_t bd_dma_addr; /* bus address of the BD buffers */
67805 + unsigned int bd_size; /* size of BD buffer space */
67808 +static struct uart_driver ucc_uart_driver = {
67809 + .owner = THIS_MODULE,
67810 + .driver_name = "serial",
67811 + .dev_name = "ttyQE",
67812 + .major = SERIAL_QE_MAJOR,
67813 + .minor = SERIAL_QE_MINOR,
67814 + .nr = UCC_MAX_UART,
67818 + * Virtual to physical address translation.
67820 + * Given the virtual address for a character buffer, this function returns
67821 + * the physical (DMA) equivalent.
67823 +static inline dma_addr_t cpu2qe_addr(void *addr, struct uart_qe_port *qe_port)
67825 + if (likely((addr >= qe_port->bd_virt)) &&
67826 + (addr < (qe_port->bd_virt + qe_port->bd_size)))
67827 + return qe_port->bd_dma_addr + (addr - qe_port->bd_virt);
67829 + /* something nasty happened */
67830 + printk(KERN_ERR "%s: addr=%p\n", __FUNCTION__, addr);
67836 + * Physical to virtual address translation.
67838 + * Given the physical (DMA) address for a character buffer, this function
67839 + * returns the virtual equivalent.
67841 +static inline void *qe2cpu_addr(dma_addr_t addr, struct uart_qe_port *qe_port)
67843 + /* sanity check */
67844 + if (likely((addr >= qe_port->bd_dma_addr) &&
67845 + (addr < (qe_port->bd_dma_addr + qe_port->bd_size))))
67846 + return qe_port->bd_virt + (addr - qe_port->bd_dma_addr);
67848 + /* something nasty happened */
67849 + printk(KERN_ERR "%s: addr=%x\n", __FUNCTION__, addr);
67855 + * Return 1 if the QE is done transmitting all buffers for this port
67857 + * This function scans each BD in sequence. If we find a BD that is not
67858 + * ready (READY=1), then we return 0 indicating that the QE is still sending
67859 + * data. If we reach the last BD (WRAP=1), then we know we've scanned
67860 + * the entire list, and all BDs are done.
67862 +static unsigned int qe_uart_tx_empty(struct uart_port *port)
67864 + struct uart_qe_port *qe_port =
67865 + container_of(port, struct uart_qe_port, port);
67866 + struct qe_bd *bdp = qe_port->tx_bd_base;
67869 + if (in_be16(&bdp->status) & BD_SC_READY)
67870 + /* This BD is not done, so return "not done" */
67873 + if (in_be16(&bdp->status) & BD_SC_WRAP)
67875 + * This BD is done and it's the last one, so return
67885 + * Set the modem control lines
67887 + * Although the QE can control the modem control lines (e.g. CTS), we
67888 + * don't need that support. This function must exist, however, otherwise
67889 + * the kernel will panic.
67891 +void qe_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
67896 + * Get the current modem control line status
67898 + * Although the QE can control the modem control lines (e.g. CTS), this
67899 + * driver currently doesn't support that, so we always return Carrier
67900 + * Detect, Data Set Ready, and Clear To Send.
67902 +static unsigned int qe_uart_get_mctrl(struct uart_port *port)
67904 + return TIOCM_CAR | TIOCM_DSR | TIOCM_CTS;
67908 + * Disable the transmit interrupt.
67910 + * Although this function is called "stop_tx", it does not actually stop
67911 + * transmission of data. Instead, it tells the QE to not generate an
67912 + * interrupt when the UCC is finished sending characters.
67914 +static void qe_uart_stop_tx(struct uart_port *port)
67916 + struct uart_qe_port *qe_port =
67917 + container_of(port, struct uart_qe_port, port);
67919 + clrbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_TX);
67923 + * Transmit as many characters to the HW as possible.
67925 + * This function will attempt to stuff of all the characters from the
67926 + * kernel's transmit buffer into TX BDs.
67928 + * A return value of non-zero indicates that it sucessfully stuffed all
67929 + * characters from the kernel buffer.
67931 + * A return value of zero indicates that there are still characters in the
67932 + * kernel's buffer that have not been transmitted, but there are no more BDs
67933 + * available. This function should be called again after a BD has been made
67936 +static int qe_uart_tx_pump(struct uart_qe_port *qe_port)
67938 + struct qe_bd *bdp;
67939 + unsigned char *p;
67940 + unsigned int count;
67941 + struct uart_port *port = &qe_port->port;
67942 + struct circ_buf *xmit = &port->info->xmit;
67944 + bdp = qe_port->rx_cur;
67946 + /* Handle xon/xoff */
67947 + if (port->x_char) {
67948 + /* Pick next descriptor and fill from buffer */
67949 + bdp = qe_port->tx_cur;
67951 + p = qe2cpu_addr(bdp->buf, qe_port);
67953 + *p++ = port->x_char;
67954 + out_be16(&bdp->length, 1);
67955 + setbits16(&bdp->status, BD_SC_READY);
67956 + /* Get next BD. */
67957 + if (in_be16(&bdp->status) & BD_SC_WRAP)
67958 + bdp = qe_port->tx_bd_base;
67961 + qe_port->tx_cur = bdp;
67963 + port->icount.tx++;
67964 + port->x_char = 0;
67968 + if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
67969 + qe_uart_stop_tx(port);
67973 + /* Pick next descriptor and fill from buffer */
67974 + bdp = qe_port->tx_cur;
67976 + while (!(in_be16(&bdp->status) & BD_SC_READY) &&
67977 + (xmit->tail != xmit->head)) {
67979 + p = qe2cpu_addr(bdp->buf, qe_port);
67980 + while (count < qe_port->tx_fifosize) {
67981 + *p++ = xmit->buf[xmit->tail];
67982 + xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
67983 + port->icount.tx++;
67985 + if (xmit->head == xmit->tail)
67989 + out_be16(&bdp->length, count);
67990 + setbits16(&bdp->status, BD_SC_READY);
67992 + /* Get next BD. */
67993 + if (in_be16(&bdp->status) & BD_SC_WRAP)
67994 + bdp = qe_port->tx_bd_base;
67998 + qe_port->tx_cur = bdp;
68000 + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
68001 + uart_write_wakeup(port);
68003 + if (uart_circ_empty(xmit)) {
68004 + /* The kernel buffer is empty, so turn off TX interrupts. We
68005 + don't need to be told when the QE is finished transmitting
68007 + qe_uart_stop_tx(port);
68015 + * Start transmitting data
68017 + * This function will start transmitting any available data, if the port
68018 + * isn't already transmitting data.
68020 +static void qe_uart_start_tx(struct uart_port *port)
68022 + struct uart_qe_port *qe_port =
68023 + container_of(port, struct uart_qe_port, port);
68025 + /* If we currently are transmitting, then just return */
68026 + if (in_be16(&qe_port->uccp->uccm) & UCC_UART_UCCE_TX)
68029 + /* Otherwise, pump the port and start transmission */
68030 + if (qe_uart_tx_pump(qe_port))
68031 + setbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_TX);
68035 + * Stop transmitting data
68037 +static void qe_uart_stop_rx(struct uart_port *port)
68039 + struct uart_qe_port *qe_port =
68040 + container_of(port, struct uart_qe_port, port);
68042 + clrbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_RX);
68046 + * Enable status change interrupts
68048 + * We don't support status change interrupts, but we need to define this
68049 + * function otherwise the kernel will panic.
68051 +static void qe_uart_enable_ms(struct uart_port *port)
68055 +/* Start or stop sending break signal
68057 + * This function controls the sending of a break signal. If break_state=1,
68058 + * then we start sending a break signal. If break_state=0, then we stop
68059 + * sending the break signal.
68061 +static void qe_uart_break_ctl(struct uart_port *port, int break_state)
68063 + struct uart_qe_port *qe_port =
68064 + container_of(port, struct uart_qe_port, port);
68067 + ucc_slow_stop_tx(qe_port->us_private);
68069 + ucc_slow_restart_tx(qe_port->us_private);
68072 +/* ISR helper function for receiving character.
68074 + * This function is called by the ISR to handling receiving characters
68076 +static void qe_uart_int_rx(struct uart_qe_port *qe_port)
68079 + unsigned char ch, *cp;
68080 + struct uart_port *port = &qe_port->port;
68081 + struct tty_struct *tty = port->info->tty;
68082 + struct qe_bd *bdp;
68084 + unsigned int flg;
68086 + /* Just loop through the closed BDs and copy the characters into
68089 + bdp = qe_port->rx_cur;
68091 + status = in_be16(&bdp->status);
68093 + /* If this one is empty, then we assume we've read them all */
68094 + if (status & BD_SC_EMPTY)
68097 + /* get number of characters, and check space in RX buffer */
68098 + i = in_be16(&bdp->length);
68100 + /* If we don't have enough room in RX buffer for the entire BD,
68101 + * then we try later, which will be the next RX interrupt.
68103 + if (tty_buffer_request_room(tty, i) < i) {
68104 + dev_dbg(port->dev, "ucc-uart: no room in RX buffer\n");
68108 + /* get pointer */
68109 + cp = qe2cpu_addr(bdp->buf, qe_port);
68111 + /* loop through the buffer */
68112 + while (i-- > 0) {
68114 + port->icount.rx++;
68115 + flg = TTY_NORMAL;
68117 + if (!i && status &
68118 + (BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV))
68119 + goto handle_error;
68120 + if (uart_handle_sysrq_char(port, ch))
68124 + tty_insert_flip_char(tty, ch, flg);
68128 + /* This BD is ready to be used again. Clear status. get next */
68129 + clrsetbits_be16(&bdp->status, BD_SC_BR | BD_SC_FR | BD_SC_PR |
68130 + BD_SC_OV | BD_SC_ID, BD_SC_EMPTY);
68131 + if (in_be16(&bdp->status) & BD_SC_WRAP)
68132 + bdp = qe_port->rx_bd_base;
68138 + /* Write back buffer pointer */
68139 + qe_port->rx_cur = bdp;
68141 + /* Activate BH processing */
68142 + tty_flip_buffer_push(tty);
68146 + /* Error processing */
68150 + if (status & BD_SC_BR)
68151 + port->icount.brk++;
68152 + if (status & BD_SC_PR)
68153 + port->icount.parity++;
68154 + if (status & BD_SC_FR)
68155 + port->icount.frame++;
68156 + if (status & BD_SC_OV)
68157 + port->icount.overrun++;
68159 + /* Mask out ignored conditions */
68160 + status &= port->read_status_mask;
68162 + /* Handle the remaining ones */
68163 + if (status & BD_SC_BR)
68165 + else if (status & BD_SC_PR)
68166 + flg = TTY_PARITY;
68167 + else if (status & BD_SC_FR)
68170 + /* Overrun does not affect the current character ! */
68171 + if (status & BD_SC_OV)
68172 + tty_insert_flip_char(tty, 0, TTY_OVERRUN);
68173 +#ifdef SUPPORT_SYSRQ
68176 + goto error_return;
68179 +/* Interrupt handler
68181 + * This interrupt handler is called after a BD is processed.
68183 +static irqreturn_t qe_uart_int(int irq, void *data)
68185 + struct uart_qe_port *qe_port = (struct uart_qe_port *) data;
68186 + struct ucc_slow __iomem *uccp = qe_port->uccp;
68189 + /* Clear the interrupts */
68190 + events = in_be16(&uccp->ucce);
68191 + out_be16(&uccp->ucce, events);
68193 + if (events & UCC_UART_UCCE_BRKE)
68194 + uart_handle_break(&qe_port->port);
68196 + if (events & UCC_UART_UCCE_RX)
68197 + qe_uart_int_rx(qe_port);
68199 + if (events & UCC_UART_UCCE_TX)
68200 + qe_uart_tx_pump(qe_port);
68202 + return events ? IRQ_HANDLED : IRQ_NONE;
68205 +/* Initialize buffer descriptors
68207 + * This function initializes all of the RX and TX buffer descriptors.
68209 +static void qe_uart_initbd(struct uart_qe_port *qe_port)
68213 + struct qe_bd *bdp;
68215 + /* Set the physical address of the host memory buffers in the buffer
68216 + * descriptors, and the virtual address for us to work with.
68218 + bd_virt = qe_port->bd_virt;
68219 + bdp = qe_port->rx_bd_base;
68220 + qe_port->rx_cur = qe_port->rx_bd_base;
68221 + for (i = 0; i < (qe_port->rx_nrfifos - 1); i++) {
68222 + out_be16(&bdp->status, BD_SC_EMPTY | BD_SC_INTRPT);
68223 + out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
68224 + out_be16(&bdp->length, 0);
68225 + bd_virt += qe_port->rx_fifosize;
68230 + out_be16(&bdp->status, BD_SC_WRAP | BD_SC_EMPTY | BD_SC_INTRPT);
68231 + out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
68232 + out_be16(&bdp->length, 0);
68234 + /* Set the physical address of the host memory
68235 + * buffers in the buffer descriptors, and the
68236 + * virtual address for us to work with.
68238 + bd_virt = qe_port->bd_virt +
68239 + L1_CACHE_ALIGN(qe_port->rx_nrfifos * qe_port->rx_fifosize);
68240 + qe_port->tx_cur = qe_port->tx_bd_base;
68241 + bdp = qe_port->tx_bd_base;
68242 + for (i = 0; i < (qe_port->tx_nrfifos - 1); i++) {
68243 + out_be16(&bdp->status, BD_SC_INTRPT);
68244 + out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
68245 + out_be16(&bdp->length, 0);
68246 + bd_virt += qe_port->tx_fifosize;
68250 + /* Loopback requires the preamble bit to be set on the first TX BD */
68252 + setbits16(&qe_port->tx_cur->status, BD_SC_P);
68255 + out_be16(&bdp->status, BD_SC_WRAP | BD_SC_INTRPT);
68256 + out_be32(&bdp->buf, cpu2qe_addr(bd_virt, qe_port));
68257 + out_be16(&bdp->length, 0);
68261 + * Initialize a UCC for UART.
68263 + * This function configures a given UCC to be used as a UART device. Basic
68264 + * UCC initialization is handled in qe_uart_request_port(). This function
68265 + * does all the UART-specific stuff.
68267 +static void qe_uart_init_ucc(struct uart_qe_port *qe_port)
68269 + u32 cecr_subblock;
68270 + struct ucc_slow __iomem *uccp = qe_port->uccp;
68271 + struct ucc_uart_pram *uccup = qe_port->uccup;
68275 + /* First, disable TX and RX in the UCC */
68276 + ucc_slow_disable(qe_port->us_private, COMM_DIR_RX_AND_TX);
68278 + /* Program the UCC UART parameter RAM */
68279 + out_8(&uccup->common.rbmr, UCC_BMR_GBL | UCC_BMR_BO_BE);
68280 + out_8(&uccup->common.tbmr, UCC_BMR_GBL | UCC_BMR_BO_BE);
68281 + out_be16(&uccup->common.mrblr, qe_port->rx_fifosize);
68282 + out_be16(&uccup->maxidl, 0x10);
68283 + out_be16(&uccup->brkcr, 1);
68284 + out_be16(&uccup->parec, 0);
68285 + out_be16(&uccup->frmec, 0);
68286 + out_be16(&uccup->nosec, 0);
68287 + out_be16(&uccup->brkec, 0);
68288 + out_be16(&uccup->uaddr[0], 0);
68289 + out_be16(&uccup->uaddr[1], 0);
68290 + out_be16(&uccup->toseq, 0);
68291 + for (i = 0; i < 8; i++)
68292 + out_be16(&uccup->cchars[i], 0xC000);
68293 + out_be16(&uccup->rccm, 0xc0ff);
68295 + /* Configure the GUMR registers for UART */
68297 + /* Soft-UART requires a 1X multiplier for TX */
68298 + clrsetbits_be32(&uccp->gumr_l,
68299 + UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK |
68300 + UCC_SLOW_GUMR_L_RDCR_MASK,
68301 + UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_1 |
68302 + UCC_SLOW_GUMR_L_RDCR_16);
68304 + clrsetbits_be32(&uccp->gumr_l,
68305 + UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK |
68306 + UCC_SLOW_GUMR_L_RDCR_MASK,
68307 + UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_16 |
68308 + UCC_SLOW_GUMR_L_RDCR_16);
68310 + clrsetbits_be32(&uccp->gumr_h, UCC_SLOW_GUMR_H_RFW,
68311 + UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX);
68314 + clrsetbits_be32(&uccp->gumr_l, UCC_SLOW_GUMR_L_DIAG_MASK,
68315 + UCC_SLOW_GUMR_L_DIAG_LOOP);
68316 + clrsetbits_be32(&uccp->gumr_h,
68317 + UCC_SLOW_GUMR_H_CTSP | UCC_SLOW_GUMR_H_RSYN,
68318 + UCC_SLOW_GUMR_H_CDS);
68321 + /* Enable rx interrupts and clear all pending events. */
68322 + out_be16(&uccp->uccm, 0);
68323 + out_be16(&uccp->ucce, 0xffff);
68324 + out_be16(&uccp->udsr, 0x7e7e);
68326 + /* Initialize UPSMR */
68327 + out_be16(&uccp->upsmr, 0);
68330 + out_be16(&uccup->supsmr, 0x30);
68331 + out_be16(&uccup->res92, 0);
68332 + out_be32(&uccup->rx_state, 0);
68333 + out_be32(&uccup->rx_cnt, 0);
68334 + out_8(&uccup->rx_bitmark, 0);
68335 + out_8(&uccup->rx_length, 10);
68336 + out_be32(&uccup->dump_ptr, 0x4000);
68337 + out_8(&uccup->rx_temp_dlst_qe, 0);
68338 + out_be32(&uccup->rx_frame_rem, 0);
68339 + out_8(&uccup->rx_frame_rem_size, 0);
68340 + /* Soft-UART requires TX to be 1X */
68341 + out_8(&uccup->tx_mode,
68342 + UCC_UART_TX_STATE_UART | UCC_UART_TX_STATE_X1);
68343 + out_be16(&uccup->tx_state, 0);
68344 + out_8(&uccup->resD4, 0);
68345 + out_be16(&uccup->resD5, 0);
68347 + /* Set UART mode.
68348 + * Enable receive and transmit.
68351 + /* From the microcode errata:
68352 + * 1.GUMR_L register, set mode=0010 (QMC).
68353 + * 2.Set GUMR_H[17] bit. (UART/AHDLC mode).
68354 + * 3.Set GUMR_H[19:20] (Transparent mode)
68355 + * 4.Clear GUMR_H[26] (RFW)
68357 + * 6.Receiver must use 16x over sampling
68359 + clrsetbits_be32(&uccp->gumr_l,
68360 + UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK |
68361 + UCC_SLOW_GUMR_L_RDCR_MASK,
68362 + UCC_SLOW_GUMR_L_MODE_QMC | UCC_SLOW_GUMR_L_TDCR_16 |
68363 + UCC_SLOW_GUMR_L_RDCR_16);
68365 + clrsetbits_be32(&uccp->gumr_h,
68366 + UCC_SLOW_GUMR_H_RFW | UCC_SLOW_GUMR_H_RSYN,
68367 + UCC_SLOW_GUMR_H_SUART | UCC_SLOW_GUMR_H_TRX |
68368 + UCC_SLOW_GUMR_H_TTX | UCC_SLOW_GUMR_H_TFL);
68371 + clrsetbits_be32(&uccp->gumr_l, UCC_SLOW_GUMR_L_DIAG_MASK,
68372 + UCC_SLOW_GUMR_L_DIAG_LOOP);
68373 + clrbits32(&uccp->gumr_h, UCC_SLOW_GUMR_H_CTSP |
68374 + UCC_SLOW_GUMR_H_CDS);
68377 + cecr_subblock = ucc_slow_get_qe_cr_subblock(qe_port->ucc_num);
68378 + qe_issue_cmd(QE_INIT_TX_RX, cecr_subblock,
68379 + QE_CR_PROTOCOL_UNSPECIFIED, 0);
68384 + * Initialize the port.
68386 +static int qe_uart_startup(struct uart_port *port)
68388 + struct uart_qe_port *qe_port =
68389 + container_of(port, struct uart_qe_port, port);
68393 + * If we're using Soft-UART mode, then we need to make sure the
68394 + * firmware has been uploaded first.
68396 + if (soft_uart && !firmware_loaded) {
68397 + dev_err(port->dev, "Soft-UART firmware not uploaded\n");
68401 + qe_uart_initbd(qe_port);
68402 + qe_uart_init_ucc(qe_port);
68404 + /* Install interrupt handler. */
68405 + ret = request_irq(port->irq, qe_uart_int, IRQF_SHARED, "ucc-uart",
68408 + dev_err(port->dev, "could not claim IRQ %u\n", port->irq);
68412 + /* Startup rx-int */
68413 + setbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_RX);
68414 + ucc_slow_enable(qe_port->us_private, COMM_DIR_RX_AND_TX);
68420 + * Shutdown the port.
68422 +static void qe_uart_shutdown(struct uart_port *port)
68424 + struct uart_qe_port *qe_port =
68425 + container_of(port, struct uart_qe_port, port);
68426 + struct ucc_slow __iomem *uccp = qe_port->uccp;
68427 + unsigned int timeout = 20;
68429 + /* Disable RX and TX */
68431 + /* Wait for all the BDs marked sent */
68432 + while (!qe_uart_tx_empty(port)) {
68433 + if (!--timeout) {
68434 + dev_warn(port->dev, "shutdown timeout\n");
68437 + set_current_state(TASK_UNINTERRUPTIBLE);
68438 + schedule_timeout(2);
68441 + if (qe_port->wait_closing) {
68442 + /* Wait a bit longer */
68443 + set_current_state(TASK_UNINTERRUPTIBLE);
68444 + schedule_timeout(qe_port->wait_closing);
68448 + ucc_slow_disable(qe_port->us_private, COMM_DIR_RX_AND_TX);
68449 + clrbits16(&uccp->uccm, UCC_UART_UCCE_TX | UCC_UART_UCCE_RX);
68451 + /* Shut them really down and reinit buffer descriptors */
68452 + ucc_slow_graceful_stop_tx(qe_port->us_private);
68453 + qe_uart_initbd(qe_port);
68455 + free_irq(port->irq, qe_port);
68459 + * Set the serial port parameters.
68461 +static void qe_uart_set_termios(struct uart_port *port,
68462 + struct ktermios *termios, struct ktermios *old)
68464 + struct uart_qe_port *qe_port =
68465 + container_of(port, struct uart_qe_port, port);
68466 + struct ucc_slow __iomem *uccp = qe_port->uccp;
68467 + unsigned int baud;
68468 + unsigned long flags;
68469 + u16 upsmr = in_be16(&uccp->upsmr);
68470 + struct ucc_uart_pram __iomem *uccup = qe_port->uccup;
68471 + u16 supsmr = in_be16(&uccup->supsmr);
68472 + u8 char_length = 2; /* 1 + CL + PEN + 1 + SL */
68474 + /* Character length programmed into the mode register is the
68475 + * sum of: 1 start bit, number of data bits, 0 or 1 parity bit,
68476 + * 1 or 2 stop bits, minus 1.
68477 + * The value 'bits' counts this for us.
68481 + upsmr &= UCC_UART_UPSMR_CL_MASK;
68482 + supsmr &= UCC_UART_SUPSMR_CL_MASK;
68484 + switch (termios->c_cflag & CSIZE) {
68486 + upsmr |= UCC_UART_UPSMR_CL_5;
68487 + supsmr |= UCC_UART_SUPSMR_CL_5;
68488 + char_length += 5;
68491 + upsmr |= UCC_UART_UPSMR_CL_6;
68492 + supsmr |= UCC_UART_SUPSMR_CL_6;
68493 + char_length += 6;
68496 + upsmr |= UCC_UART_UPSMR_CL_7;
68497 + supsmr |= UCC_UART_SUPSMR_CL_7;
68498 + char_length += 7;
68500 + default: /* case CS8 */
68501 + upsmr |= UCC_UART_UPSMR_CL_8;
68502 + supsmr |= UCC_UART_SUPSMR_CL_8;
68503 + char_length += 8;
68507 + /* If CSTOPB is set, we want two stop bits */
68508 + if (termios->c_cflag & CSTOPB) {
68509 + upsmr |= UCC_UART_UPSMR_SL;
68510 + supsmr |= UCC_UART_SUPSMR_SL;
68511 + char_length++; /* + SL */
68514 + if (termios->c_cflag & PARENB) {
68515 + upsmr |= UCC_UART_UPSMR_PEN;
68516 + supsmr |= UCC_UART_SUPSMR_PEN;
68517 + char_length++; /* + PEN */
68519 + if (!(termios->c_cflag & PARODD)) {
68520 + upsmr &= ~(UCC_UART_UPSMR_RPM_MASK |
68521 + UCC_UART_UPSMR_TPM_MASK);
68522 + upsmr |= UCC_UART_UPSMR_RPM_EVEN |
68523 + UCC_UART_UPSMR_TPM_EVEN;
68524 + supsmr &= ~(UCC_UART_SUPSMR_RPM_MASK |
68525 + UCC_UART_SUPSMR_TPM_MASK);
68526 + supsmr |= UCC_UART_SUPSMR_RPM_EVEN |
68527 + UCC_UART_SUPSMR_TPM_EVEN;
68532 + * Set up parity check flag
68534 + port->read_status_mask = BD_SC_EMPTY | BD_SC_OV;
68535 + if (termios->c_iflag & INPCK)
68536 + port->read_status_mask |= BD_SC_FR | BD_SC_PR;
68537 + if (termios->c_iflag & (BRKINT | PARMRK))
68538 + port->read_status_mask |= BD_SC_BR;
68541 + * Characters to ignore
68543 + port->ignore_status_mask = 0;
68544 + if (termios->c_iflag & IGNPAR)
68545 + port->ignore_status_mask |= BD_SC_PR | BD_SC_FR;
68546 + if (termios->c_iflag & IGNBRK) {
68547 + port->ignore_status_mask |= BD_SC_BR;
68549 + * If we're ignore parity and break indicators, ignore
68550 + * overruns too. (For real raw support).
68552 + if (termios->c_iflag & IGNPAR)
68553 + port->ignore_status_mask |= BD_SC_OV;
68556 + * !!! ignore all characters if CREAD is not set
68558 + if ((termios->c_cflag & CREAD) == 0)
68559 + port->read_status_mask &= ~BD_SC_EMPTY;
68561 + baud = uart_get_baud_rate(port, termios, old, 0, 115200);
68563 + /* Do we really need a spinlock here? */
68564 + spin_lock_irqsave(&port->lock, flags);
68566 + out_be16(&uccp->upsmr, upsmr);
68568 + out_be16(&uccup->supsmr, supsmr);
68569 + out_8(&uccup->rx_length, char_length);
68571 + /* Soft-UART requires a 1X multiplier for TX */
68572 + qe_setbrg(qe_port->us_info.rx_clock, baud, 16);
68573 + qe_setbrg(qe_port->us_info.tx_clock, baud, 1);
68575 + qe_setbrg(qe_port->us_info.rx_clock, baud, 16);
68576 + qe_setbrg(qe_port->us_info.tx_clock, baud, 16);
68579 + spin_unlock_irqrestore(&port->lock, flags);
68583 + * Return a pointer to a string that describes what kind of port this is.
68585 +static const char *qe_uart_type(struct uart_port *port)
68591 + * Allocate any memory and I/O resources required by the port.
68593 +static int qe_uart_request_port(struct uart_port *port)
68596 + struct uart_qe_port *qe_port =
68597 + container_of(port, struct uart_qe_port, port);
68598 + struct ucc_slow_info *us_info = &qe_port->us_info;
68599 + struct ucc_slow_private *uccs;
68600 + unsigned int rx_size, tx_size;
68602 + dma_addr_t bd_dma_addr = 0;
68604 + ret = ucc_slow_init(us_info, &uccs);
68606 + dev_err(port->dev, "could not initialize UCC%u\n",
68607 + qe_port->ucc_num);
68611 + qe_port->us_private = uccs;
68612 + qe_port->uccp = uccs->us_regs;
68613 + qe_port->uccup = (struct ucc_uart_pram *) uccs->us_pram;
68614 + qe_port->rx_bd_base = uccs->rx_bd;
68615 + qe_port->tx_bd_base = uccs->tx_bd;
68618 + * Allocate the transmit and receive data buffers.
68621 + rx_size = L1_CACHE_ALIGN(qe_port->rx_nrfifos * qe_port->rx_fifosize);
68622 + tx_size = L1_CACHE_ALIGN(qe_port->tx_nrfifos * qe_port->tx_fifosize);
68624 + bd_virt = dma_alloc_coherent(NULL, rx_size + tx_size, &bd_dma_addr,
68627 + dev_err(port->dev, "could not allocate buffer descriptors\n");
68631 + qe_port->bd_virt = bd_virt;
68632 + qe_port->bd_dma_addr = bd_dma_addr;
68633 + qe_port->bd_size = rx_size + tx_size;
68635 + qe_port->rx_buf = bd_virt;
68636 + qe_port->tx_buf = qe_port->rx_buf + rx_size;
68642 + * Configure the port.
68644 + * We say we're a CPM-type port because that's mostly true. Once the device
68645 + * is configured, this driver operates almost identically to the CPM serial
68648 +static void qe_uart_config_port(struct uart_port *port, int flags)
68650 + if (flags & UART_CONFIG_TYPE) {
68651 + port->type = PORT_CPM;
68652 + qe_uart_request_port(port);
68657 + * Release any memory and I/O resources that were allocated in
68658 + * qe_uart_request_port().
68660 +static void qe_uart_release_port(struct uart_port *port)
68662 + struct uart_qe_port *qe_port =
68663 + container_of(port, struct uart_qe_port, port);
68664 + struct ucc_slow_private *uccs = qe_port->us_private;
68666 + dma_free_coherent(NULL, qe_port->bd_size, qe_port->bd_virt,
68667 + qe_port->bd_dma_addr);
68669 + ucc_slow_free(uccs);
68673 + * Verify that the data in serial_struct is suitable for this device.
68675 +static int qe_uart_verify_port(struct uart_port *port,
68676 + struct serial_struct *ser)
68678 + if (ser->type != PORT_UNKNOWN && ser->type != PORT_CPM)
68681 + if (ser->irq < 0 || ser->irq >= NR_IRQS)
68684 + if (ser->baud_base < 9600)
68689 +/* UART operations
68691 + * Details on these functions can be found in Documentation/serial/driver
68693 +static struct uart_ops qe_uart_pops = {
68694 + .tx_empty = qe_uart_tx_empty,
68695 + .set_mctrl = qe_uart_set_mctrl,
68696 + .get_mctrl = qe_uart_get_mctrl,
68697 + .stop_tx = qe_uart_stop_tx,
68698 + .start_tx = qe_uart_start_tx,
68699 + .stop_rx = qe_uart_stop_rx,
68700 + .enable_ms = qe_uart_enable_ms,
68701 + .break_ctl = qe_uart_break_ctl,
68702 + .startup = qe_uart_startup,
68703 + .shutdown = qe_uart_shutdown,
68704 + .set_termios = qe_uart_set_termios,
68705 + .type = qe_uart_type,
68706 + .release_port = qe_uart_release_port,
68707 + .request_port = qe_uart_request_port,
68708 + .config_port = qe_uart_config_port,
68709 + .verify_port = qe_uart_verify_port,
68713 + * Obtain the SOC model number and revision level
68715 + * This function parses the device tree to obtain the SOC model. It then
68716 + * reads the SVR register to the revision.
68718 + * The device tree stores the SOC model two different ways.
68720 + * The new way is:
68723 + * compatible = "PowerPC,8323";
68724 + * device_type = "cpu";
68728 + * The old way is:
68729 + * PowerPC,8323@0 {
68730 + * device_type = "cpu";
68733 + * This code first checks the new way, and then the old way.
68735 +static unsigned int soc_info(unsigned int *rev_h, unsigned int *rev_l)
68737 + struct device_node *np;
68738 + const char *soc_string;
68739 + unsigned int svr;
68740 + unsigned int soc;
68742 + /* Find the CPU node */
68743 + np = of_find_node_by_type(NULL, "cpu");
68746 + /* Find the compatible property */
68747 + soc_string = of_get_property(np, "compatible", NULL);
68749 + /* No compatible property, so try the name. */
68750 + soc_string = np->name;
68752 + /* Extract the SOC number from the "PowerPC," string */
68753 + if ((sscanf(soc_string, "PowerPC,%u", &soc) != 1) || !soc)
68756 + /* Get the revision from the SVR */
68757 + svr = mfspr(SPRN_SVR);
68758 + *rev_h = (svr >> 4) & 0xf;
68759 + *rev_l = svr & 0xf;
68765 + * requst_firmware_nowait() callback function
68767 + * This function is called by the kernel when a firmware is made available,
68768 + * or if it times out waiting for the firmware.
68770 +static void uart_firmware_cont(const struct firmware *fw, void *context)
68772 + struct qe_firmware *firmware;
68773 + struct device *dev = context;
68777 + dev_err(dev, "firmware not found\n");
68781 + firmware = (struct qe_firmware *) fw->data;
68783 + if (firmware->header.length != fw->size) {
68784 + dev_err(dev, "invalid firmware\n");
68788 + ret = qe_upload_firmware(firmware);
68790 + dev_err(dev, "could not load firmware\n");
68794 + firmware_loaded = 1;
68797 +static int ucc_uart_probe(struct of_device *ofdev,
68798 + const struct of_device_id *match)
68800 + struct device_node *np = ofdev->node;
68801 + const unsigned int *iprop; /* Integer OF properties */
68802 + const char *sprop; /* String OF properties */
68803 + struct uart_qe_port *qe_port = NULL;
68804 + struct resource res;
68808 + * Determine if we need Soft-UART mode
68810 + if (of_find_property(np, "soft-uart", NULL)) {
68811 + dev_dbg(&ofdev->dev, "using Soft-UART mode\n");
68816 + * If we are using Soft-UART, determine if we need to upload the
68820 + struct qe_firmware_info *qe_fw_info;
68822 + qe_fw_info = qe_get_firmware_info();
68824 + /* Check if the firmware has been uploaded. */
68825 + if (qe_fw_info && strstr(qe_fw_info->id, "Soft-UART")) {
68826 + firmware_loaded = 1;
68828 + char filename[32];
68829 + unsigned int soc;
68830 + unsigned int rev_h;
68831 + unsigned int rev_l;
68833 + soc = soc_info(&rev_h, &rev_l);
68835 + dev_err(&ofdev->dev, "unknown CPU model\n");
68838 + sprintf(filename, "fsl_qe_ucode_uart_%u_%u%u.bin",
68839 + soc, rev_h, rev_l);
68841 + dev_info(&ofdev->dev, "waiting for firmware %s\n",
68845 + * We call request_firmware_nowait instead of
68846 + * request_firmware so that the driver can load and
68847 + * initialize the ports without holding up the rest of
68848 + * the kernel. If hotplug support is enabled in the
68849 + * kernel, then we use it.
68851 + ret = request_firmware_nowait(THIS_MODULE,
68852 + FW_ACTION_HOTPLUG, filename, &ofdev->dev,
68853 + &ofdev->dev, uart_firmware_cont);
68855 + dev_err(&ofdev->dev,
68856 + "could not load firmware %s\n",
68863 + qe_port = kzalloc(sizeof(struct uart_qe_port), GFP_KERNEL);
68865 + dev_err(&ofdev->dev, "can't allocate QE port structure\n");
68869 + /* Search for IRQ and mapbase */
68870 + ret = of_address_to_resource(np, 0, &res);
68872 + dev_err(&ofdev->dev, "missing 'reg' property in device tree\n");
68876 + if (!res.start) {
68877 + dev_err(&ofdev->dev, "invalid 'reg' property in device tree\n");
68881 + qe_port->port.mapbase = res.start;
68883 + /* Get the UCC number (device ID) */
68884 + /* UCCs are numbered 1-7 */
68885 + iprop = of_get_property(np, "device-id", NULL);
68886 + if (!iprop || (*iprop < 1) || (*iprop > UCC_MAX_NUM)) {
68887 + dev_err(&ofdev->dev,
68888 + "missing or invalid UCC specified in device tree\n");
68892 + qe_port->ucc_num = *iprop - 1;
68895 + * In the future, we should not require the BRG to be specified in the
68896 + * device tree. If no clock-source is specified, then just pick a BRG
68897 + * to use. This requires a new QE library function that manages BRG
68901 + sprop = of_get_property(np, "rx-clock-name", NULL);
68903 + dev_err(&ofdev->dev, "missing rx-clock-name in device tree\n");
68908 + qe_port->us_info.rx_clock = qe_clock_source(sprop);
68909 + if ((qe_port->us_info.rx_clock < QE_BRG1) ||
68910 + (qe_port->us_info.rx_clock > QE_BRG16)) {
68911 + dev_err(&ofdev->dev, "rx-clock-name must be a BRG for UART\n");
68917 + /* In internal loopback mode, TX and RX must use the same clock */
68918 + qe_port->us_info.tx_clock = qe_port->us_info.rx_clock;
68920 + sprop = of_get_property(np, "tx-clock-name", NULL);
68922 + dev_err(&ofdev->dev, "missing tx-clock-name in device tree\n");
68926 + qe_port->us_info.tx_clock = qe_clock_source(sprop);
68928 + if ((qe_port->us_info.tx_clock < QE_BRG1) ||
68929 + (qe_port->us_info.tx_clock > QE_BRG16)) {
68930 + dev_err(&ofdev->dev, "tx-clock-name must be a BRG for UART\n");
68935 + /* Get the port number, numbered 0-3 */
68936 + iprop = of_get_property(np, "port-number", NULL);
68938 + dev_err(&ofdev->dev, "missing port-number in device tree\n");
68942 + qe_port->port.line = *iprop;
68943 + if (qe_port->port.line >= UCC_MAX_UART) {
68944 + dev_err(&ofdev->dev, "port-number must be 0-%u\n",
68945 + UCC_MAX_UART - 1);
68950 + qe_port->port.irq = irq_of_parse_and_map(np, 0);
68951 + if (qe_port->port.irq == NO_IRQ) {
68952 + dev_err(&ofdev->dev, "could not map IRQ for UCC%u\n",
68953 + qe_port->ucc_num + 1);
68959 + * Newer device trees have an "fsl,qe" compatible property for the QE
68960 + * node, but we still need to support older device trees.
68962 + np = of_find_compatible_node(NULL, NULL, "fsl,qe");
68964 + np = of_find_node_by_type(NULL, "qe");
68966 + dev_err(&ofdev->dev, "could not find 'qe' node\n");
68972 + iprop = of_get_property(np, "brg-frequency", NULL);
68974 + dev_err(&ofdev->dev,
68975 + "missing brg-frequency in device tree\n");
68981 + qe_port->port.uartclk = *iprop;
68984 + * Older versions of U-Boot do not initialize the brg-frequency
68985 + * property, so in this case we assume the BRG frequency is
68986 + * half the QE bus frequency.
68988 + iprop = of_get_property(np, "bus-frequency", NULL);
68990 + dev_err(&ofdev->dev,
68991 + "missing QE bus-frequency in device tree\n");
68996 + qe_port->port.uartclk = *iprop / 2;
68998 + dev_err(&ofdev->dev,
68999 + "invalid QE bus-frequency in device tree\n");
69005 + spin_lock_init(&qe_port->port.lock);
69006 + qe_port->np = np;
69007 + qe_port->port.dev = &ofdev->dev;
69008 + qe_port->port.ops = &qe_uart_pops;
69009 + qe_port->port.iotype = UPIO_MEM;
69011 + qe_port->tx_nrfifos = TX_NUM_FIFO;
69012 + qe_port->tx_fifosize = TX_BUF_SIZE;
69013 + qe_port->rx_nrfifos = RX_NUM_FIFO;
69014 + qe_port->rx_fifosize = RX_BUF_SIZE;
69016 + qe_port->wait_closing = UCC_WAIT_CLOSING;
69017 + qe_port->port.fifosize = 512;
69018 + qe_port->port.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP;
69020 + qe_port->us_info.ucc_num = qe_port->ucc_num;
69021 + qe_port->us_info.regs = (phys_addr_t) res.start;
69022 + qe_port->us_info.irq = qe_port->port.irq;
69024 + qe_port->us_info.rx_bd_ring_len = qe_port->rx_nrfifos;
69025 + qe_port->us_info.tx_bd_ring_len = qe_port->tx_nrfifos;
69027 + /* Make sure ucc_slow_init() initializes both TX and RX */
69028 + qe_port->us_info.init_tx = 1;
69029 + qe_port->us_info.init_rx = 1;
69031 + /* Add the port to the uart sub-system. This will cause
69032 + * qe_uart_config_port() to be called, so the us_info structure must
69033 + * be initialized.
69035 + ret = uart_add_one_port(&ucc_uart_driver, &qe_port->port);
69037 + dev_err(&ofdev->dev, "could not add /dev/ttyQE%u\n",
69038 + qe_port->port.line);
69043 + dev_set_drvdata(&ofdev->dev, qe_port);
69045 + dev_info(&ofdev->dev, "UCC%u assigned to /dev/ttyQE%u\n",
69046 + qe_port->ucc_num + 1, qe_port->port.line);
69048 + /* Display the mknod command for this device */
69049 + dev_dbg(&ofdev->dev, "mknod command is 'mknod /dev/ttyQE%u c %u %u'\n",
69050 + qe_port->port.line, SERIAL_QE_MAJOR,
69051 + SERIAL_QE_MINOR + qe_port->port.line);
69056 +static int ucc_uart_remove(struct of_device *ofdev)
69058 + struct uart_qe_port *qe_port = dev_get_drvdata(&ofdev->dev);
69060 + dev_info(&ofdev->dev, "removing /dev/ttyQE%u\n", qe_port->port.line);
69062 + uart_remove_one_port(&ucc_uart_driver, &qe_port->port);
69064 + dev_set_drvdata(&ofdev->dev, NULL);
69070 +static struct of_device_id ucc_uart_match[] = {
69072 + .type = "serial",
69073 + .compatible = "ucc_uart",
69077 +MODULE_DEVICE_TABLE(of, ucc_uart_match);
69079 +static struct of_platform_driver ucc_uart_of_driver = {
69080 + .owner = THIS_MODULE,
69081 + .name = "ucc_uart",
69082 + .match_table = ucc_uart_match,
69083 + .probe = ucc_uart_probe,
69084 + .remove = ucc_uart_remove,
69087 +static int __init ucc_uart_init(void)
69091 + printk(KERN_INFO "Freescale QUICC Engine UART device driver\n");
69093 + printk(KERN_INFO "ucc-uart: Using loopback mode\n");
69096 + ret = uart_register_driver(&ucc_uart_driver);
69098 + printk(KERN_ERR "ucc-uart: could not register UART driver\n");
69102 + ret = of_register_platform_driver(&ucc_uart_of_driver);
69105 + "ucc-uart: could not register platform driver\n");
69110 +static void __exit ucc_uart_exit(void)
69113 + "Freescale QUICC Engine UART device driver unloading\n");
69115 + of_unregister_platform_driver(&ucc_uart_of_driver);
69116 + uart_unregister_driver(&ucc_uart_driver);
69119 +module_init(ucc_uart_init);
69120 +module_exit(ucc_uart_exit);
69122 +MODULE_DESCRIPTION("Freescale QUICC Engine (QE) UART");
69123 +MODULE_AUTHOR("Timur Tabi <timur@freescale.com>");
69124 +MODULE_LICENSE("GPL v2");
69125 +MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_QE_MAJOR);
69127 diff -x .git -x .gitignore -Nur linux-2.6.24/drivers/spi/mpc52xx_psc_spi.c powerpc.git/drivers/spi/mpc52xx_psc_spi.c
69128 --- linux-2.6.24/drivers/spi/mpc52xx_psc_spi.c 2008-01-24 23:58:37.000000000 +0100
69129 +++ powerpc.git/drivers/spi/mpc52xx_psc_spi.c 2008-01-28 20:26:20.000000000 +0100
69130 @@ -330,6 +330,7 @@
69132 static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps)
69134 + struct device_node *np;
69135 struct mpc52xx_cdm __iomem *cdm;
69136 struct mpc52xx_gpio __iomem *gpio;
69137 struct mpc52xx_psc __iomem *psc = mps->psc;
69138 @@ -338,8 +339,12 @@
69141 #if defined(CONFIG_PPC_MERGE)
69142 - cdm = mpc52xx_find_and_map("mpc5200-cdm");
69143 - gpio = mpc52xx_find_and_map("mpc5200-gpio");
69144 + np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm");
69145 + cdm = of_iomap(np, 0);
69147 + np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio");
69148 + gpio = of_iomap(np, 0);
69151 cdm = ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE);
69152 gpio = ioremap(MPC52xx_PA(MPC52xx_GPIO_OFFSET), MPC52xx_GPIO_SIZE);
69153 diff -x .git -x .gitignore -Nur linux-2.6.24/fs/openpromfs/inode.c powerpc.git/fs/openpromfs/inode.c
69154 --- linux-2.6.24/fs/openpromfs/inode.c 2008-01-28 20:50:11.000000000 +0100
69155 +++ powerpc.git/fs/openpromfs/inode.c 2008-01-28 20:26:31.000000000 +0100
69156 @@ -131,7 +131,7 @@
69157 /* Nothing to do */
69160 -static const struct seq_operations property_op = {
69161 +static struct seq_operations property_op = {
69162 .start = property_start,
69163 .next = property_next,
69164 .stop = property_stop,
69165 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/8xx_immap.h powerpc.git/include/asm-powerpc/8xx_immap.h
69166 --- linux-2.6.24/include/asm-powerpc/8xx_immap.h 2008-01-24 23:58:37.000000000 +0100
69167 +++ powerpc.git/include/asm-powerpc/8xx_immap.h 2008-01-28 20:26:42.000000000 +0100
69168 @@ -123,7 +123,7 @@
69169 #define OR_G5LA 0x00000400 /* Output #GPL5 on #GPL_A5 */
69170 #define OR_G5LS 0x00000200 /* Drive #GPL high on falling edge of...*/
69171 #define OR_BI 0x00000100 /* Burst inhibit */
69172 -#define OR_SCY_MSK 0x000000f0 /* Cycle Lenght in Clocks */
69173 +#define OR_SCY_MSK 0x000000f0 /* Cycle Length in Clocks */
69174 #define OR_SCY_0_CLK 0x00000000 /* 0 clock cycles wait states */
69175 #define OR_SCY_1_CLK 0x00000010 /* 1 clock cycles wait states */
69176 #define OR_SCY_2_CLK 0x00000020 /* 2 clock cycles wait states */
69177 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/commproc.h powerpc.git/include/asm-powerpc/commproc.h
69178 --- linux-2.6.24/include/asm-powerpc/commproc.h 2008-01-24 23:58:37.000000000 +0100
69179 +++ powerpc.git/include/asm-powerpc/commproc.h 2008-01-28 20:26:42.000000000 +0100
69180 @@ -693,7 +693,7 @@
69181 #define CICR_SCC_SCC3 ((uint)0x00200000) /* SCC3 @ SCCc */
69182 #define CICR_SCB_SCC2 ((uint)0x00040000) /* SCC2 @ SCCb */
69183 #define CICR_SCA_SCC1 ((uint)0x00000000) /* SCC1 @ SCCa */
69184 -#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrrupt */
69185 +#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrupt */
69186 #define CICR_HP_MASK ((uint)0x00001f00) /* Hi-pri int. */
69187 #define CICR_IEN ((uint)0x00000080) /* Int. enable */
69188 #define CICR_SPS ((uint)0x00000001) /* SCC Spread */
69189 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/cpm.h powerpc.git/include/asm-powerpc/cpm.h
69190 --- linux-2.6.24/include/asm-powerpc/cpm.h 2008-01-24 23:58:37.000000000 +0100
69191 +++ powerpc.git/include/asm-powerpc/cpm.h 2008-01-28 20:26:42.000000000 +0100
69193 unsigned long cpm_muram_alloc_fixed(unsigned long offset, unsigned long size);
69194 void __iomem *cpm_muram_addr(unsigned long offset);
69195 dma_addr_t cpm_muram_dma(void __iomem *addr);
69196 +int cpm_command(u32 command, u8 opcode);
69199 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/cputable.h powerpc.git/include/asm-powerpc/cputable.h
69200 --- linux-2.6.24/include/asm-powerpc/cputable.h 2008-01-24 23:58:37.000000000 +0100
69201 +++ powerpc.git/include/asm-powerpc/cputable.h 2008-01-28 20:26:42.000000000 +0100
69208 +extern int machine_check_generic(struct pt_regs *regs);
69209 +extern int machine_check_4xx(struct pt_regs *regs);
69210 +extern int machine_check_440A(struct pt_regs *regs);
69211 +extern int machine_check_e500(struct pt_regs *regs);
69212 +extern int machine_check_e200(struct pt_regs *regs);
69214 /* NOTE WELL: Update identify_cpu() if fields are added or removed! */
69216 /* CPU is matched via (PVR & pvr_mask) == pvr_value */
69217 @@ -97,6 +105,11 @@
69219 /* Name of processor class, for the ELF AT_PLATFORM entry */
69222 + /* Processor specific machine check handling. Return negative
69223 + * if the error is fatal, 1 if it was fully recovered and 0 to
69224 + * pass up (not CPU originated) */
69225 + int (*machine_check)(struct pt_regs *regs);
69228 extern struct cpu_spec *cur_cpu_spec;
69229 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/cputhreads.h powerpc.git/include/asm-powerpc/cputhreads.h
69230 --- linux-2.6.24/include/asm-powerpc/cputhreads.h 1970-01-01 01:00:00.000000000 +0100
69231 +++ powerpc.git/include/asm-powerpc/cputhreads.h 2008-01-28 20:26:42.000000000 +0100
69233 +#ifndef _ASM_POWERPC_CPUTHREADS_H
69234 +#define _ASM_POWERPC_CPUTHREADS_H
69236 +#include <linux/cpumask.h>
69239 + * Mapping of threads to cores
69243 +extern int threads_per_core;
69244 +extern int threads_shift;
69245 +extern cpumask_t threads_core_mask;
69247 +#define threads_per_core 1
69248 +#define threads_shift 0
69249 +#define threads_core_mask (CPU_MASK_CPU0)
69252 +/* cpu_thread_mask_to_cores - Return a cpumask of one per cores
69253 + * hit by the argument
69255 + * @threads: a cpumask of threads
69257 + * This function returns a cpumask which will have one "cpu" (or thread)
69258 + * bit set for each core that has at least one thread set in the argument.
69260 + * This can typically be used for things like IPI for tlb invalidations
69261 + * since those need to be done only once per core/TLB
69263 +static inline cpumask_t cpu_thread_mask_to_cores(cpumask_t threads)
69265 + cpumask_t tmp, res;
69268 + res = CPU_MASK_NONE;
69269 + for (i = 0; i < NR_CPUS; i += threads_per_core) {
69270 + cpus_shift_right(tmp, threads_core_mask, i);
69271 + if (cpus_intersects(threads, tmp))
69277 +static inline int cpu_nr_cores(void)
69279 + return NR_CPUS >> threads_shift;
69282 +static inline cpumask_t cpu_online_cores_map(void)
69284 + return cpu_thread_mask_to_cores(cpu_online_map);
69287 +static inline int cpu_thread_to_core(int cpu)
69289 + return cpu >> threads_shift;
69292 +static inline int cpu_thread_in_core(int cpu)
69294 + return cpu & (threads_per_core - 1);
69297 +static inline int cpu_first_thread_in_core(int cpu)
69299 + return cpu & ~(threads_per_core - 1);
69302 +#endif /* _ASM_POWERPC_CPUTHREADS_H */
69304 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/dcr-native.h powerpc.git/include/asm-powerpc/dcr-native.h
69305 --- linux-2.6.24/include/asm-powerpc/dcr-native.h 2008-01-24 23:58:37.000000000 +0100
69306 +++ powerpc.git/include/asm-powerpc/dcr-native.h 2008-01-28 20:26:42.000000000 +0100
69309 #ifndef __ASSEMBLY__
69311 +#include <linux/spinlock.h>
69316 @@ -55,20 +57,28 @@
69319 /* R/W of indirect DCRs make use of standard naming conventions for DCRs */
69320 -#define mfdcri(base, reg) \
69322 - mtdcr(base ## _CFGADDR, base ## _ ## reg); \
69323 - mfdcr(base ## _CFGDATA); \
69324 +extern spinlock_t dcr_ind_lock;
69326 +#define mfdcri(base, reg) \
69328 + unsigned long flags; \
69329 + unsigned int val; \
69330 + spin_lock_irqsave(&dcr_ind_lock, flags); \
69331 + mtdcr(DCRN_ ## base ## _CONFIG_ADDR, reg); \
69332 + val = mfdcr(DCRN_ ## base ## _CONFIG_DATA); \
69333 + spin_unlock_irqrestore(&dcr_ind_lock, flags); \
69337 -#define mtdcri(base, reg, data) \
69339 - mtdcr(base ## _CFGADDR, base ## _ ## reg); \
69340 - mtdcr(base ## _CFGDATA, data); \
69341 +#define mtdcri(base, reg, data) \
69343 + unsigned long flags; \
69344 + spin_lock_irqsave(&dcr_ind_lock, flags); \
69345 + mtdcr(DCRN_ ## base ## _CONFIG_ADDR, reg); \
69346 + mtdcr(DCRN_ ## base ## _CONFIG_DATA, data); \
69347 + spin_unlock_irqrestore(&dcr_ind_lock, flags); \
69350 #endif /* __ASSEMBLY__ */
69351 #endif /* __KERNEL__ */
69352 #endif /* _ASM_POWERPC_DCR_NATIVE_H */
69355 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/dcr-regs.h powerpc.git/include/asm-powerpc/dcr-regs.h
69356 --- linux-2.6.24/include/asm-powerpc/dcr-regs.h 1970-01-01 01:00:00.000000000 +0100
69357 +++ powerpc.git/include/asm-powerpc/dcr-regs.h 2008-01-28 20:26:42.000000000 +0100
69360 + * Common DCR / SDR / CPR register definitions used on various IBM/AMCC
69363 + * Copyright 2007 Benjamin Herrenschmidt, IBM Corp
69364 + * <benh@kernel.crashing.org>
69366 + * Mostly lifted from asm-ppc/ibm4xx.h by
69368 + * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
69372 +#ifndef __DCR_REGS_H__
69373 +#define __DCR_REGS_H__
69376 + * Most DCRs used for controlling devices such as the MAL, DMA engine,
69377 + * etc... are obtained for the device tree.
69379 + * The definitions in this files are fixed DCRs and indirect DCRs that
69380 + * are commonly used outside of specific drivers or refer to core
69381 + * common registers that may occasionally have to be tweaked outside
69382 + * of the driver main register set
69385 +/* CPRs (440GX and 440SP/440SPe) */
69386 +#define DCRN_CPR0_CONFIG_ADDR 0xc
69387 +#define DCRN_CPR0_CONFIG_DATA 0xd
69389 +/* SDRs (440GX and 440SP/440SPe) */
69390 +#define DCRN_SDR0_CONFIG_ADDR 0xe
69391 +#define DCRN_SDR0_CONFIG_DATA 0xf
69393 +#define SDR0_PFC0 0x4100
69394 +#define SDR0_PFC1 0x4101
69395 +#define SDR0_PFC1_EPS 0x1c00000
69396 +#define SDR0_PFC1_EPS_SHIFT 22
69397 +#define SDR0_PFC1_RMII 0x02000000
69398 +#define SDR0_MFR 0x4300
69399 +#define SDR0_MFR_TAH0 0x80000000 /* TAHOE0 Enable */
69400 +#define SDR0_MFR_TAH1 0x40000000 /* TAHOE1 Enable */
69401 +#define SDR0_MFR_PCM 0x10000000 /* PPC440GP irq compat mode */
69402 +#define SDR0_MFR_ECS 0x08000000 /* EMAC int clk */
69403 +#define SDR0_MFR_T0TXFL 0x00080000
69404 +#define SDR0_MFR_T0TXFH 0x00040000
69405 +#define SDR0_MFR_T1TXFL 0x00020000
69406 +#define SDR0_MFR_T1TXFH 0x00010000
69407 +#define SDR0_MFR_E0TXFL 0x00008000
69408 +#define SDR0_MFR_E0TXFH 0x00004000
69409 +#define SDR0_MFR_E0RXFL 0x00002000
69410 +#define SDR0_MFR_E0RXFH 0x00001000
69411 +#define SDR0_MFR_E1TXFL 0x00000800
69412 +#define SDR0_MFR_E1TXFH 0x00000400
69413 +#define SDR0_MFR_E1RXFL 0x00000200
69414 +#define SDR0_MFR_E1RXFH 0x00000100
69415 +#define SDR0_MFR_E2TXFL 0x00000080
69416 +#define SDR0_MFR_E2TXFH 0x00000040
69417 +#define SDR0_MFR_E2RXFL 0x00000020
69418 +#define SDR0_MFR_E2RXFH 0x00000010
69419 +#define SDR0_MFR_E3TXFL 0x00000008
69420 +#define SDR0_MFR_E3TXFH 0x00000004
69421 +#define SDR0_MFR_E3RXFL 0x00000002
69422 +#define SDR0_MFR_E3RXFH 0x00000001
69423 +#define SDR0_UART0 0x0120
69424 +#define SDR0_UART1 0x0121
69425 +#define SDR0_UART2 0x0122
69426 +#define SDR0_UART3 0x0123
69427 +#define SDR0_CUST0 0x4000
69429 +#endif /* __DCR_REGS_H__ */
69430 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/dma-mapping.h powerpc.git/include/asm-powerpc/dma-mapping.h
69431 --- linux-2.6.24/include/asm-powerpc/dma-mapping.h 2008-01-24 23:58:37.000000000 +0100
69432 +++ powerpc.git/include/asm-powerpc/dma-mapping.h 2008-01-28 20:26:42.000000000 +0100
69434 return dma_ops->dma_supported(dev, mask);
69437 +/* We have our own implementation of pci_set_dma_mask() */
69438 +#define HAVE_ARCH_PCI_SET_DMA_MASK
69440 static inline int dma_set_mask(struct device *dev, u64 dma_mask)
69442 struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
69443 @@ -186,8 +189,6 @@
69444 extern struct dma_mapping_ops dma_iommu_ops;
69445 extern struct dma_mapping_ops dma_direct_ops;
69447 -extern unsigned long dma_direct_offset;
69449 #else /* CONFIG_PPC64 */
69451 #define dma_supported(dev, mask) (1)
69452 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/firmware.h powerpc.git/include/asm-powerpc/firmware.h
69453 --- linux-2.6.24/include/asm-powerpc/firmware.h 2008-01-24 23:58:37.000000000 +0100
69454 +++ powerpc.git/include/asm-powerpc/firmware.h 2008-01-28 20:26:42.000000000 +0100
69456 FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
69457 FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
69458 FW_FEATURE_CELLEB_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_BEAT,
69459 - FW_FEATURE_CELLEB_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_BEAT,
69460 + FW_FEATURE_CELLEB_ALWAYS = 0,
69461 FW_FEATURE_NATIVE_POSSIBLE = 0,
69462 FW_FEATURE_NATIVE_ALWAYS = 0,
69463 FW_FEATURE_POSSIBLE =
69464 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/immap_86xx.h powerpc.git/include/asm-powerpc/immap_86xx.h
69465 --- linux-2.6.24/include/asm-powerpc/immap_86xx.h 2008-01-24 23:58:37.000000000 +0100
69466 +++ powerpc.git/include/asm-powerpc/immap_86xx.h 2008-01-28 20:26:42.000000000 +0100
69467 @@ -89,14 +89,14 @@
69470 * guts: Pointer to GUTS structure
69471 - * co: The DMA controller (1 or 2)
69472 + * co: The DMA controller (0 or 1)
69473 * ch: The channel on the DMA controller (0, 1, 2, or 3)
69474 * device: The device to set as the source (CCSR_GUTS_DMACR_DEV_xx)
69476 static inline void guts_set_dmacr(struct ccsr_guts __iomem *guts,
69477 unsigned int co, unsigned int ch, unsigned int device)
69479 - unsigned int shift = 16 + (8 * (2 - co) + 2 * (3 - ch));
69480 + unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch));
69482 clrsetbits_be32(&guts->dmacr, 3 << shift, device << shift);
69484 @@ -118,6 +118,27 @@
69485 #define CCSR_GUTS_PMUXCR_DMA1_0 0x00000002
69486 #define CCSR_GUTS_PMUXCR_DMA1_3 0x00000001
69489 + * Set the DMA external control bits in the GUTS
69491 + * The DMA external control bits in the PMUXCR are only meaningful for
69492 + * channels 0 and 3. Any other channels are ignored.
69494 + * guts: Pointer to GUTS structure
69495 + * co: The DMA controller (0 or 1)
69496 + * ch: The channel on the DMA controller (0, 1, 2, or 3)
69497 + * value: the new value for the bit (0 or 1)
69499 +static inline void guts_set_pmuxcr_dma(struct ccsr_guts __iomem *guts,
69500 + unsigned int co, unsigned int ch, unsigned int value)
69502 + if ((ch == 0) || (ch == 3)) {
69503 + unsigned int shift = 2 * (co + 1) - (ch & 1) - 1;
69505 + clrsetbits_be32(&guts->pmuxcr, 1 << shift, value << shift);
69509 #define CCSR_GUTS_CLKDVDR_PXCKEN 0x80000000
69510 #define CCSR_GUTS_CLKDVDR_SSICKEN 0x20000000
69511 #define CCSR_GUTS_CLKDVDR_PXCKINV 0x10000000
69512 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/immap_qe.h powerpc.git/include/asm-powerpc/immap_qe.h
69513 --- linux-2.6.24/include/asm-powerpc/immap_qe.h 2008-01-24 23:58:37.000000000 +0100
69514 +++ powerpc.git/include/asm-powerpc/immap_qe.h 2008-01-28 20:26:42.000000000 +0100
69515 @@ -393,9 +393,39 @@
69517 } __attribute__ ((packed));
69519 -/* RISC Special Registers (Trap and Breakpoint) */
69521 + * RISC Special Registers (Trap and Breakpoint). These are described in
69522 + * the QE Developer's Handbook.
69525 - u32 reg[0x40]; /* 64 32-bit registers */
69526 + __be32 tibcr[16]; /* Trap/instruction breakpoint control regs */
69551 + __be32 eccr; /* Exception control configuration register */
69553 + u8 res4[0x100-0xf8];
69554 } __attribute__ ((packed));
69557 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/io.h powerpc.git/include/asm-powerpc/io.h
69558 --- linux-2.6.24/include/asm-powerpc/io.h 2008-01-24 23:58:37.000000000 +0100
69559 +++ powerpc.git/include/asm-powerpc/io.h 2008-01-28 20:26:42.000000000 +0100
69560 @@ -50,15 +50,16 @@
69561 #define PCI_DRAM_OFFSET pci_dram_offset
69563 #define _IO_BASE pci_io_base
69564 -#define _ISA_MEM_BASE 0
69565 +#define _ISA_MEM_BASE isa_mem_base
69566 #define PCI_DRAM_OFFSET 0
69569 extern unsigned long isa_io_base;
69570 -extern unsigned long isa_mem_base;
69571 extern unsigned long pci_io_base;
69572 extern unsigned long pci_dram_offset;
69574 +extern resource_size_t isa_mem_base;
69576 #if defined(CONFIG_PPC32) && defined(CONFIG_PPC_INDIRECT_IO)
69577 #error CONFIG_PPC_INDIRECT_IO is not yet supported on 32 bits
69579 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/iommu.h powerpc.git/include/asm-powerpc/iommu.h
69580 --- linux-2.6.24/include/asm-powerpc/iommu.h 2008-01-24 23:58:37.000000000 +0100
69581 +++ powerpc.git/include/asm-powerpc/iommu.h 2008-01-28 20:26:42.000000000 +0100
69585 struct scatterlist;
69586 -struct device_node;
69588 /* Frees table for an individual device node */
69589 -extern void iommu_free_table(struct device_node *dn);
69590 +extern void iommu_free_table(struct iommu_table *tbl, const char *node_name);
69592 /* Initializes an iommu_table based in values set in the passed-in
69594 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/ipic.h powerpc.git/include/asm-powerpc/ipic.h
69595 --- linux-2.6.24/include/asm-powerpc/ipic.h 2008-01-24 23:58:37.000000000 +0100
69596 +++ powerpc.git/include/asm-powerpc/ipic.h 2008-01-28 20:26:42.000000000 +0100
69597 @@ -20,11 +20,13 @@
69599 /* Flags when we init the IPIC */
69600 #define IPIC_SPREADMODE_GRP_A 0x00000001
69601 -#define IPIC_SPREADMODE_GRP_D 0x00000002
69602 -#define IPIC_SPREADMODE_MIX_A 0x00000004
69603 -#define IPIC_SPREADMODE_MIX_B 0x00000008
69604 -#define IPIC_DISABLE_MCP_OUT 0x00000010
69605 -#define IPIC_IRQ0_MCP 0x00000020
69606 +#define IPIC_SPREADMODE_GRP_B 0x00000002
69607 +#define IPIC_SPREADMODE_GRP_C 0x00000004
69608 +#define IPIC_SPREADMODE_GRP_D 0x00000008
69609 +#define IPIC_SPREADMODE_MIX_A 0x00000010
69610 +#define IPIC_SPREADMODE_MIX_B 0x00000020
69611 +#define IPIC_DISABLE_MCP_OUT 0x00000040
69612 +#define IPIC_IRQ0_MCP 0x00000080
69614 /* IPIC registers offsets */
69615 #define IPIC_SICFR 0x00 /* System Global Interrupt Configuration Register */
69616 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/iseries/hv_lp_event.h powerpc.git/include/asm-powerpc/iseries/hv_lp_event.h
69617 --- linux-2.6.24/include/asm-powerpc/iseries/hv_lp_event.h 2008-01-24 23:58:37.000000000 +0100
69618 +++ powerpc.git/include/asm-powerpc/iseries/hv_lp_event.h 2008-01-28 20:26:42.000000000 +0100
69622 * Close an Lp Event Path for a type and partition
69623 - * returns 0 on sucess
69624 + * returns 0 on success
69626 extern int HvLpEvent_closePath(HvLpEvent_Type eventType, HvLpIndex lpIndex);
69628 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/kexec.h powerpc.git/include/asm-powerpc/kexec.h
69629 --- linux-2.6.24/include/asm-powerpc/kexec.h 2008-01-24 23:58:37.000000000 +0100
69630 +++ powerpc.git/include/asm-powerpc/kexec.h 2008-01-28 20:26:42.000000000 +0100
69631 @@ -123,6 +123,9 @@
69632 extern void default_machine_kexec(struct kimage *image);
69633 extern int default_machine_kexec_prepare(struct kimage *image);
69634 extern void default_machine_crash_shutdown(struct pt_regs *regs);
69635 +typedef void (*crash_shutdown_t)(void);
69636 +extern int crash_shutdown_register(crash_shutdown_t handler);
69637 +extern int crash_shutdown_unregister(crash_shutdown_t handler);
69639 extern void machine_kexec_simple(struct kimage *image);
69640 extern void crash_kexec_secondary(struct pt_regs *regs);
69641 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/lmb.h powerpc.git/include/asm-powerpc/lmb.h
69642 --- linux-2.6.24/include/asm-powerpc/lmb.h 2008-01-24 23:58:37.000000000 +0100
69643 +++ powerpc.git/include/asm-powerpc/lmb.h 2008-01-28 20:26:42.000000000 +0100
69645 extern unsigned long __init lmb_phys_mem_size(void);
69646 extern unsigned long __init lmb_end_of_DRAM(void);
69647 extern void __init lmb_enforce_memory_limit(unsigned long memory_limit);
69648 +extern int __init lmb_is_reserved(unsigned long addr);
69650 extern void lmb_dump_all(void);
69652 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/machdep.h powerpc.git/include/asm-powerpc/machdep.h
69653 --- linux-2.6.24/include/asm-powerpc/machdep.h 2008-01-24 23:58:37.000000000 +0100
69654 +++ powerpc.git/include/asm-powerpc/machdep.h 2008-01-28 20:26:42.000000000 +0100
69655 @@ -204,6 +204,13 @@
69657 * optional PCI "hooks"
69659 + /* Called in indirect_* to avoid touching devices */
69660 + int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char);
69662 + /* Called at then very end of pcibios_init() */
69663 + void (*pcibios_after_init)(void);
69665 +#endif /* CONFIG_PPC32 */
69667 /* Called after PPC generic resource fixup to perform
69668 machine specific fixups */
69669 @@ -212,18 +219,9 @@
69670 /* Called for each PCI bus in the system when it's probed */
69671 void (*pcibios_fixup_bus)(struct pci_bus *);
69673 - /* Called when pci_enable_device() is called (initial=0) or
69674 - * when a device with no assigned resource is found (initial=1).
69675 - * Returns 0 to allow assignment/enabling of the device. */
69676 - int (*pcibios_enable_device_hook)(struct pci_dev *, int initial);
69678 - /* Called in indirect_* to avoid touching devices */
69679 - int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char);
69681 - /* Called at then very end of pcibios_init() */
69682 - void (*pcibios_after_init)(void);
69684 -#endif /* CONFIG_PPC32 */
69685 + /* Called when pci_enable_device() is called. Returns 0 to
69686 + * allow assignment/enabling of the device. */
69687 + int (*pcibios_enable_device_hook)(struct pci_dev *);
69689 /* Called to shutdown machine specific hardware not already controlled
69690 * by other drivers.
69691 @@ -253,6 +251,16 @@
69693 void (*machine_kexec)(struct kimage *image);
69694 #endif /* CONFIG_KEXEC */
69696 +#ifdef CONFIG_SUSPEND
69697 + /* These are called to disable and enable, respectively, IRQs when
69698 + * entering a suspend state. If NULL, then the generic versions
69699 + * will be called. The generic versions disable/enable the
69700 + * decrementer along with interrupts.
69702 + void (*suspend_disable_irqs)(void);
69703 + void (*suspend_enable_irqs)(void);
69707 extern void power4_idle(void);
69708 @@ -326,5 +334,31 @@
69709 ppc_md.log_error(buf, err_type, fatal);
69712 +#define __define_machine_initcall(mach,level,fn,id) \
69713 + static int __init __machine_initcall_##mach##_##fn(void) { \
69714 + if (machine_is(mach)) return fn(); \
69717 + __define_initcall(level,__machine_initcall_##mach##_##fn,id);
69719 +#define machine_core_initcall(mach,fn) __define_machine_initcall(mach,"1",fn,1)
69720 +#define machine_core_initcall_sync(mach,fn) __define_machine_initcall(mach,"1s",fn,1s)
69721 +#define machine_postcore_initcall(mach,fn) __define_machine_initcall(mach,"2",fn,2)
69722 +#define machine_postcore_initcall_sync(mach,fn) __define_machine_initcall(mach,"2s",fn,2s)
69723 +#define machine_arch_initcall(mach,fn) __define_machine_initcall(mach,"3",fn,3)
69724 +#define machine_arch_initcall_sync(mach,fn) __define_machine_initcall(mach,"3s",fn,3s)
69725 +#define machine_subsys_initcall(mach,fn) __define_machine_initcall(mach,"4",fn,4)
69726 +#define machine_subsys_initcall_sync(mach,fn) __define_machine_initcall(mach,"4s",fn,4s)
69727 +#define machine_fs_initcall(mach,fn) __define_machine_initcall(mach,"5",fn,5)
69728 +#define machine_fs_initcall_sync(mach,fn) __define_machine_initcall(mach,"5s",fn,5s)
69729 +#define machine_rootfs_initcall(mach,fn) __define_machine_initcall(mach,"rootfs",fn,rootfs)
69730 +#define machine_device_initcall(mach,fn) __define_machine_initcall(mach,"6",fn,6)
69731 +#define machine_device_initcall_sync(mach,fn) __define_machine_initcall(mach,"6s",fn,6s)
69732 +#define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7)
69733 +#define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s)
69735 +void generic_suspend_disable_irqs(void);
69736 +void generic_suspend_enable_irqs(void);
69738 #endif /* __KERNEL__ */
69739 #endif /* _ASM_POWERPC_MACHDEP_H */
69740 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/mmu-hash64.h powerpc.git/include/asm-powerpc/mmu-hash64.h
69741 --- linux-2.6.24/include/asm-powerpc/mmu-hash64.h 2008-01-24 23:58:37.000000000 +0100
69742 +++ powerpc.git/include/asm-powerpc/mmu-hash64.h 2008-01-28 21:37:04.000000000 +0100
69744 #define HPTE_V_AVPN_SHIFT 7
69745 #define HPTE_V_AVPN ASM_CONST(0x3fffffffffffff80)
69746 #define HPTE_V_AVPN_VAL(x) (((x) & HPTE_V_AVPN) >> HPTE_V_AVPN_SHIFT)
69747 -#define HPTE_V_COMPARE(x,y) (!(((x) ^ (y)) & 0xffffffffffffff80))
69748 +#define HPTE_V_COMPARE(x,y) (!(((x) ^ (y)) & 0xffffffffffffff80UL))
69749 #define HPTE_V_BOLTED ASM_CONST(0x0000000000000010)
69750 #define HPTE_V_LOCK ASM_CONST(0x0000000000000008)
69751 #define HPTE_V_LARGE ASM_CONST(0x0000000000000004)
69752 @@ -180,6 +180,7 @@
69753 extern int mmu_io_psize;
69754 extern int mmu_kernel_ssize;
69755 extern int mmu_highuser_ssize;
69756 +extern u16 mmu_slb_size;
69759 * If the processor supports 64k normal pages but not 64k cache
69760 @@ -277,6 +278,7 @@
69761 extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
69762 unsigned long pstart, unsigned long mode,
69763 int psize, int ssize);
69764 +extern void set_huge_psize(int psize);
69766 extern void htab_initialize(void);
69767 extern void htab_initialize_secondary(void);
69768 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/mpc52xx.h powerpc.git/include/asm-powerpc/mpc52xx.h
69769 --- linux-2.6.24/include/asm-powerpc/mpc52xx.h 2008-01-24 23:58:37.000000000 +0100
69770 +++ powerpc.git/include/asm-powerpc/mpc52xx.h 2008-01-28 20:26:42.000000000 +0100
69771 @@ -248,8 +248,6 @@
69773 #ifndef __ASSEMBLY__
69775 -extern void __iomem * mpc52xx_find_and_map(const char *);
69776 -extern void __iomem * mpc52xx_find_and_map_path(const char *path);
69777 extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node);
69778 extern void mpc5200_setup_xlb_arbiter(void);
69779 extern void mpc52xx_declare_of_platform_devices(void);
69780 @@ -257,7 +255,12 @@
69781 extern void mpc52xx_init_irq(void);
69782 extern unsigned int mpc52xx_get_irq(void);
69785 extern int __init mpc52xx_add_bridge(struct device_node *node);
69786 +extern void __init mpc52xx_setup_pci(void);
69788 +static inline void mpc52xx_setup_pci(void) { }
69791 extern void __init mpc52xx_map_wdt(void);
69792 extern void mpc52xx_restart(char *cmd);
69793 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/mpc52xx_psc.h powerpc.git/include/asm-powerpc/mpc52xx_psc.h
69794 --- linux-2.6.24/include/asm-powerpc/mpc52xx_psc.h 2008-01-24 23:58:37.000000000 +0100
69795 +++ powerpc.git/include/asm-powerpc/mpc52xx_psc.h 2008-01-28 20:26:42.000000000 +0100
69796 @@ -153,6 +153,9 @@
69798 u8 irfdr; /* PSC + 0x54 */
69802 +struct mpc52xx_psc_fifo {
69803 u16 rfnum; /* PSC + 0x58 */
69805 u16 tfnum; /* PSC + 0x5c */
69806 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/mpc8260.h powerpc.git/include/asm-powerpc/mpc8260.h
69807 --- linux-2.6.24/include/asm-powerpc/mpc8260.h 2008-01-24 23:58:37.000000000 +0100
69808 +++ powerpc.git/include/asm-powerpc/mpc8260.h 2008-01-28 20:26:42.000000000 +0100
69810 #ifndef __ASM_POWERPC_MPC8260_H__
69811 #define __ASM_POWERPC_MPC8260_H__
69813 +#define MPC82XX_BCR_PLDP 0x00800000 /* Pipeline Maximum Depth */
69817 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/mpic.h powerpc.git/include/asm-powerpc/mpic.h
69818 --- linux-2.6.24/include/asm-powerpc/mpic.h 2008-01-24 23:58:37.000000000 +0100
69819 +++ powerpc.git/include/asm-powerpc/mpic.h 2008-01-28 20:26:42.000000000 +0100
69821 #define MPIC_GREG_GLOBAL_CONF_0 0x00020
69822 #define MPIC_GREG_GCONF_RESET 0x80000000
69823 #define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000
69824 +#define MPIC_GREG_GCONF_NO_BIAS 0x10000000
69825 #define MPIC_GREG_GCONF_BASE_MASK 0x000fffff
69826 +#define MPIC_GREG_GCONF_MCK 0x08000000
69827 #define MPIC_GREG_GLOBAL_CONF_1 0x00030
69828 #define MPIC_GREG_GLOBAL_CONF_1_SIE 0x08000000
69829 #define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK 0x70000000
69831 #define MPIC_CPU_WHOAMI_MASK 0x0000001f
69832 #define MPIC_CPU_INTACK 0x000a0
69833 #define MPIC_CPU_EOI 0x000b0
69834 +#define MPIC_CPU_MCACK 0x000c0
69837 * Per-source registers
69838 @@ -141,6 +144,7 @@
69839 #define TSI108_CPU_WHOAMI 0xffffffff
69840 #define TSI108_CPU_INTACK 0x00004
69841 #define TSI108_CPU_EOI 0x00008
69842 +#define TSI108_CPU_MCACK 0x00004 /* Doesn't really exist here */
69845 * Per-source registers
69846 @@ -183,6 +187,7 @@
69847 MPIC_IDX_CPU_WHOAMI,
69848 MPIC_IDX_CPU_INTACK,
69850 + MPIC_IDX_CPU_MCACK,
69853 MPIC_IDX_IRQ_STRIDE,
69854 @@ -344,6 +349,10 @@
69855 #define MPIC_USES_DCR 0x00000080
69856 /* MPIC has 11-bit vector fields (or larger) */
69857 #define MPIC_LARGE_VECTORS 0x00000100
69858 +/* Enable delivery of prio 15 interrupts as MCK instead of EE */
69859 +#define MPIC_ENABLE_MCK 0x00000200
69860 +/* Disable bias among target selection, spread interrupts evenly */
69861 +#define MPIC_NO_BIAS 0x00000400
69863 /* MPIC HW modification ID */
69864 #define MPIC_REGSET_MASK 0xf0000000
69865 @@ -447,10 +456,19 @@
69866 /* Send a message (IPI) to a given target (cpu number or MSG_*) */
69867 void smp_mpic_message_pass(int target, int msg);
69869 +/* Unmask a specific virq */
69870 +extern void mpic_unmask_irq(unsigned int irq);
69871 +/* Mask a specific virq */
69872 +extern void mpic_mask_irq(unsigned int irq);
69873 +/* EOI a specific virq */
69874 +extern void mpic_end_irq(unsigned int irq);
69876 /* Fetch interrupt from a given mpic */
69877 extern unsigned int mpic_get_one_irq(struct mpic *mpic);
69878 -/* This one gets to the primary mpic */
69879 +/* This one gets from the primary mpic */
69880 extern unsigned int mpic_get_irq(void);
69881 +/* Fetch Machine Check interrupt from primary mpic */
69882 +extern unsigned int mpic_get_mcirq(void);
69884 /* Set the EPIC clock ratio */
69885 void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio);
69886 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/nvram.h powerpc.git/include/asm-powerpc/nvram.h
69887 --- linux-2.6.24/include/asm-powerpc/nvram.h 2008-01-24 23:58:37.000000000 +0100
69888 +++ powerpc.git/include/asm-powerpc/nvram.h 2008-01-28 20:26:42.000000000 +0100
69890 #ifndef _ASM_POWERPC_NVRAM_H
69891 #define _ASM_POWERPC_NVRAM_H
69893 +#include <linux/errno.h>
69895 #define NVRW_CNT 0x20
69896 #define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
69897 #define NVRAM_BLOCK_LEN 16
69899 extern struct nvram_partition *nvram_find_partition(int sig, const char *name);
69901 extern int pSeries_nvram_init(void);
69903 +#ifdef CONFIG_MMIO_NVRAM
69904 extern int mmio_nvram_init(void);
69906 +static inline int mmio_nvram_init(void)
69912 #endif /* __KERNEL__ */
69914 /* PowerMac specific nvram stuffs */
69915 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/of_platform.h powerpc.git/include/asm-powerpc/of_platform.h
69916 --- linux-2.6.24/include/asm-powerpc/of_platform.h 2008-01-24 23:58:37.000000000 +0100
69917 +++ powerpc.git/include/asm-powerpc/of_platform.h 2008-01-28 20:26:42.000000000 +0100
69919 #include <linux/of_platform.h>
69921 /* Platform drivers register/unregister */
69922 -extern int of_register_platform_driver(struct of_platform_driver *drv);
69923 -extern void of_unregister_platform_driver(struct of_platform_driver *drv);
69924 +static inline int of_register_platform_driver(struct of_platform_driver *drv)
69926 + return of_register_driver(drv, &of_platform_bus_type);
69928 +static inline void of_unregister_platform_driver(struct of_platform_driver *drv)
69930 + of_unregister_driver(drv);
69933 /* Platform devices and busses creation */
69934 extern struct of_device *of_platform_device_create(struct device_node *np,
69936 #define OF_NO_DEEP_PROBE ((struct of_device_id *)-1)
69938 extern int of_platform_bus_probe(struct device_node *root,
69939 - struct of_device_id *matches,
69940 + const struct of_device_id *matches,
69941 struct device *parent);
69943 extern struct of_device *of_find_device_by_phandle(phandle ph);
69945 +extern void of_instantiate_rtc(void);
69947 #endif /* _ASM_POWERPC_OF_PLATFORM_H */
69948 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/pci-bridge.h powerpc.git/include/asm-powerpc/pci-bridge.h
69949 --- linux-2.6.24/include/asm-powerpc/pci-bridge.h 2008-01-24 23:58:37.000000000 +0100
69950 +++ powerpc.git/include/asm-powerpc/pci-bridge.h 2008-01-28 20:26:42.000000000 +0100
69952 #ifndef _ASM_POWERPC_PCI_BRIDGE_H
69953 #define _ASM_POWERPC_PCI_BRIDGE_H
69957 + * This program is free software; you can redistribute it and/or
69958 + * modify it under the terms of the GNU General Public License
69959 + * as published by the Free Software Foundation; either version
69960 + * 2 of the License, or (at your option) any later version.
69962 #include <linux/pci.h>
69963 #include <linux/list.h>
69964 #include <linux/ioport.h>
69966 -#ifndef CONFIG_PPC64
69968 struct device_node;
69969 -struct pci_controller;
69971 +extern unsigned int ppc_pci_flags;
69973 + /* Force re-assigning all resources (ignore firmware
69974 + * setup completely)
69976 + PPC_PCI_REASSIGN_ALL_RSRC = 0x00000001,
69978 + /* Re-assign all bus numbers */
69979 + PPC_PCI_REASSIGN_ALL_BUS = 0x00000002,
69981 + /* Do not try to assign, just use existing setup */
69982 + PPC_PCI_PROBE_ONLY = 0x00000004,
69984 + /* Don't bother with ISA alignment unless the bridge has
69985 + * ISA forwarding enabled
69987 + PPC_PCI_CAN_SKIP_ISA_ALIGN = 0x00000008,
69989 + /* Enable domain numbers in /proc */
69990 + PPC_PCI_ENABLE_PROC_DOMAINS = 0x00000010,
69991 + /* ... except for domain 0 */
69992 + PPC_PCI_COMPAT_DOMAIN_0 = 0x00000020,
69997 * Structure of a PCI controller (host bridge)
69998 @@ -17,26 +44,41 @@
69999 struct pci_controller {
70000 struct pci_bus *bus;
70003 +#ifdef CONFIG_PPC64
70006 + struct device_node *dn;
70007 struct list_head list_node;
70008 struct device *parent;
70012 +#ifndef CONFIG_PPC64
70016 void __iomem *io_base_virt;
70017 +#ifdef CONFIG_PPC64
70018 + void *io_base_alloc;
70020 resource_size_t io_base_phys;
70021 +#ifndef CONFIG_PPC64
70022 + resource_size_t pci_io_size;
70025 /* Some machines (PReP) have a non 1:1 mapping of
70026 * the PCI memory space in the CPU bus space
70028 resource_size_t pci_mem_offset;
70029 +#ifdef CONFIG_PPC64
70030 + unsigned long pci_io_size;
70033 struct pci_ops *ops;
70034 - volatile unsigned int __iomem *cfg_addr;
70035 - volatile void __iomem *cfg_data;
70036 + unsigned int __iomem *cfg_addr;
70037 + void __iomem *cfg_data;
70039 +#ifndef CONFIG_PPC64
70041 * Used for variants of PCI indirect handling and possible quirks:
70042 * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1
70043 @@ -51,21 +93,30 @@
70045 * BIG_ENDIAN - cfg_addr is a big endian register
70047 -#define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001)
70048 -#define PPC_INDIRECT_TYPE_EXT_REG (0x00000002)
70049 -#define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS (0x00000004)
70050 -#define PPC_INDIRECT_TYPE_NO_PCIE_LINK (0x00000008)
70051 -#define PPC_INDIRECT_TYPE_BIG_ENDIAN (0x00000010)
70052 +#define PPC_INDIRECT_TYPE_SET_CFG_TYPE 0x00000001
70053 +#define PPC_INDIRECT_TYPE_EXT_REG 0x00000002
70054 +#define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS 0x00000004
70055 +#define PPC_INDIRECT_TYPE_NO_PCIE_LINK 0x00000008
70056 +#define PPC_INDIRECT_TYPE_BIG_ENDIAN 0x00000010
70059 +#endif /* !CONFIG_PPC64 */
70060 /* Currently, we limit ourselves to 1 IO range and 3 mem
70061 * ranges since the common pci_bus structure can't handle more
70063 struct resource io_resource;
70064 struct resource mem_resources[3];
70065 int global_number; /* PCI domain number */
70066 +#ifdef CONFIG_PPC64
70067 + unsigned long buid;
70068 + unsigned long dma_window_base_cur;
70069 + unsigned long dma_window_size;
70071 + void *private_data;
70072 +#endif /* CONFIG_PPC64 */
70075 +#ifndef CONFIG_PPC64
70077 static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus)
70079 return bus->sysdata;
70080 @@ -81,18 +132,18 @@
70082 /* These are used for config access before all the PCI probing
70084 -int early_read_config_byte(struct pci_controller *hose, int bus, int dev_fn,
70085 - int where, u8 *val);
70086 -int early_read_config_word(struct pci_controller *hose, int bus, int dev_fn,
70087 - int where, u16 *val);
70088 -int early_read_config_dword(struct pci_controller *hose, int bus, int dev_fn,
70089 - int where, u32 *val);
70090 -int early_write_config_byte(struct pci_controller *hose, int bus, int dev_fn,
70091 - int where, u8 val);
70092 -int early_write_config_word(struct pci_controller *hose, int bus, int dev_fn,
70093 - int where, u16 val);
70094 -int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn,
70095 - int where, u32 val);
70096 +extern int early_read_config_byte(struct pci_controller *hose, int bus,
70097 + int dev_fn, int where, u8 *val);
70098 +extern int early_read_config_word(struct pci_controller *hose, int bus,
70099 + int dev_fn, int where, u16 *val);
70100 +extern int early_read_config_dword(struct pci_controller *hose, int bus,
70101 + int dev_fn, int where, u32 *val);
70102 +extern int early_write_config_byte(struct pci_controller *hose, int bus,
70103 + int dev_fn, int where, u8 val);
70104 +extern int early_write_config_word(struct pci_controller *hose, int bus,
70105 + int dev_fn, int where, u16 val);
70106 +extern int early_write_config_dword(struct pci_controller *hose, int bus,
70107 + int dev_fn, int where, u32 val);
70109 extern int early_find_capability(struct pci_controller *hose, int bus,
70110 int dev_fn, int cap);
70111 @@ -101,87 +152,33 @@
70112 resource_size_t cfg_addr,
70113 resource_size_t cfg_data, u32 flags);
70114 extern void setup_grackle(struct pci_controller *hose);
70115 -extern void __init update_bridge_resource(struct pci_dev *dev,
70116 - struct resource *res);
70122 - * This program is free software; you can redistribute it and/or
70123 - * modify it under the terms of the GNU General Public License
70124 - * as published by the Free Software Foundation; either version
70125 - * 2 of the License, or (at your option) any later version.
70129 - * Structure of a PCI controller (host bridge)
70131 -struct pci_controller {
70132 - struct pci_bus *bus;
70136 - struct list_head list_node;
70137 - struct device *parent;
70142 - void __iomem *io_base_virt;
70143 - void *io_base_alloc;
70144 - resource_size_t io_base_phys;
70146 - /* Some machines have a non 1:1 mapping of
70147 - * the PCI memory space in the CPU bus space
70149 - resource_size_t pci_mem_offset;
70150 - unsigned long pci_io_size;
70152 - struct pci_ops *ops;
70153 - volatile unsigned int __iomem *cfg_addr;
70154 - volatile void __iomem *cfg_data;
70156 - /* Currently, we limit ourselves to 1 IO range and 3 mem
70157 - * ranges since the common pci_bus structure can't handle more
70159 - struct resource io_resource;
70160 - struct resource mem_resources[3];
70161 - int global_number;
70162 - unsigned long buid;
70163 - unsigned long dma_window_base_cur;
70164 - unsigned long dma_window_size;
70166 - void *private_data;
70168 +#else /* CONFIG_PPC64 */
70171 * PCI stuff, for nodes representing PCI devices, pointed to
70172 * by device_node->data.
70174 -struct pci_controller;
70175 struct iommu_table;
70178 int busno; /* pci bus number */
70179 - int bussubno; /* pci subordinate bus number */
70180 int devfn; /* pci device and function number */
70181 - int class_code; /* pci device class */
70183 struct pci_controller *phb; /* for pci devices */
70184 struct iommu_table *iommu_table; /* for phb's or bridges */
70185 - struct pci_dev *pcidev; /* back-pointer to the pci device */
70186 struct device_node *node; /* back-pointer to the device_node */
70188 int pci_ext_config_space; /* for pci devices */
70191 + struct pci_dev *pcidev; /* back-pointer to the pci device */
70192 + int class_code; /* pci device class */
70193 int eeh_mode; /* See eeh.h for possible EEH_MODEs */
70194 int eeh_config_addr;
70195 int eeh_pe_config_addr; /* new-style partition endpoint address */
70196 - int eeh_check_count; /* # times driver ignored error */
70197 - int eeh_freeze_count; /* # times this device froze up. */
70198 - int eeh_false_positives; /* # times this device reported #ff's */
70199 + int eeh_check_count; /* # times driver ignored error */
70200 + int eeh_freeze_count; /* # times this device froze up. */
70201 + int eeh_false_positives; /* # times this device reported #ff's */
70202 u32 config_space[16]; /* saved PCI config space */
70205 @@ -189,7 +186,7 @@
70206 /* Get the pointer to a device_node's pci_dn */
70207 #define PCI_DN(dn) ((struct pci_dn *) (dn)->data)
70209 -struct device_node *fetch_dev_dn(struct pci_dev *dev);
70210 +extern struct device_node *fetch_dev_dn(struct pci_dev *dev);
70212 /* Get a device_node from a pci_dev. This code must be fast except
70213 * in the case where the sysdata is incorrect and needs to be fixed
70214 @@ -227,14 +224,14 @@
70217 /** Find the bus corresponding to the indicated device node */
70218 -struct pci_bus * pcibios_find_pci_bus(struct device_node *dn);
70219 +extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn);
70221 /** Remove all of the PCI devices under this bus */
70222 -void pcibios_remove_pci_devices(struct pci_bus *bus);
70223 +extern void pcibios_remove_pci_devices(struct pci_bus *bus);
70225 /** Discover new pci devices under this bus, and add them */
70226 -void pcibios_add_pci_devices(struct pci_bus * bus);
70227 -void pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus);
70228 +extern void pcibios_add_pci_devices(struct pci_bus *bus);
70229 +extern void pcibios_fixup_new_pci_devices(struct pci_bus *bus);
70231 extern int pcibios_remove_root_bus(struct pci_controller *phb);
70233 @@ -270,20 +267,18 @@
70234 #define PHB_SET_NODE(PHB, NODE) ((PHB)->node = -1)
70237 -#endif /* CONFIG_PPC64 */
70238 +#endif /* CONFIG_PPC64 */
70240 /* Get the PCI host controller for an OF device */
70241 -extern struct pci_controller*
70242 -pci_find_hose_for_OF_device(struct device_node* node);
70243 +extern struct pci_controller *pci_find_hose_for_OF_device(
70244 + struct device_node* node);
70246 /* Fill up host controller resources from the OF node */
70248 -pci_process_bridge_OF_ranges(struct pci_controller *hose,
70249 - struct device_node *dev, int primary);
70250 +extern void pci_process_bridge_OF_ranges(struct pci_controller *hose,
70251 + struct device_node *dev, int primary);
70253 /* Allocate & free a PCI host bridge structure */
70254 -extern struct pci_controller *
70255 -pcibios_alloc_controller(struct device_node *dev);
70256 +extern struct pci_controller *pcibios_alloc_controller(struct device_node *dev);
70257 extern void pcibios_free_controller(struct pci_controller *phb);
70260 @@ -298,9 +293,7 @@
70266 +#endif /* CONFIG_PCI */
70269 -#endif /* __KERNEL__ */
70271 +#endif /* __KERNEL__ */
70272 +#endif /* _ASM_POWERPC_PCI_BRIDGE_H */
70273 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/pci.h powerpc.git/include/asm-powerpc/pci.h
70274 --- linux-2.6.24/include/asm-powerpc/pci.h 2008-01-24 23:58:37.000000000 +0100
70275 +++ powerpc.git/include/asm-powerpc/pci.h 2008-01-28 20:26:42.000000000 +0100
70276 @@ -36,11 +36,10 @@
70279 * Set this to 1 if you want the kernel to re-assign all PCI
70281 + * bus numbers (don't do that on ppc64 yet !)
70283 -extern int pci_assign_all_buses;
70284 -#define pcibios_assign_all_busses() (pci_assign_all_buses)
70286 +#define pcibios_assign_all_busses() (ppc_pci_flags & \
70287 + PPC_PCI_REASSIGN_ALL_BUS)
70288 #define pcibios_scan_all_fns(a, b) 0
70290 static inline void pcibios_set_master(struct pci_dev *dev)
70292 #define get_pci_dma_ops() NULL
70295 -/* Decide whether to display the domain number in /proc */
70296 -extern int pci_proc_domain(struct pci_bus *bus);
70301 @@ -109,17 +105,14 @@
70302 *strategy_parameter = ~0UL;
70306 -/* Set the name of the bus as it appears in /proc/bus/pci */
70307 -static inline int pci_proc_domain(struct pci_bus *bus)
70312 #endif /* CONFIG_PPC64 */
70314 extern int pci_domain_nr(struct pci_bus *bus);
70316 +/* Decide whether to display the domain number in /proc */
70317 +extern int pci_proc_domain(struct pci_bus *bus);
70320 struct vm_area_struct;
70321 /* Map a range of PCI memory or I/O space for a device into user space */
70322 int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
70323 @@ -199,13 +192,12 @@
70327 -extern void pcibios_fixup_device_resources(struct pci_dev *dev,
70328 - struct pci_bus *bus);
70330 extern void pcibios_setup_new_device(struct pci_dev *dev);
70332 extern void pcibios_claim_one_bus(struct pci_bus *b);
70334 +extern void pcibios_resource_survey(void);
70336 extern struct pci_controller *init_phb_dynamic(struct device_node *dn);
70338 extern struct pci_dev *of_create_pci_dev(struct device_node *node,
70339 @@ -229,5 +221,8 @@
70340 const struct resource *rsrc,
70341 resource_size_t *start, resource_size_t *end);
70343 +extern void pcibios_do_bus_setup(struct pci_bus *bus);
70344 +extern void pcibios_fixup_of_probed_bus(struct pci_bus *bus);
70346 #endif /* __KERNEL__ */
70347 #endif /* __ASM_POWERPC_PCI_H */
70348 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/ppc-pci.h powerpc.git/include/asm-powerpc/ppc-pci.h
70349 --- linux-2.6.24/include/asm-powerpc/ppc-pci.h 2008-01-24 23:58:37.000000000 +0100
70350 +++ powerpc.git/include/asm-powerpc/ppc-pci.h 2008-01-28 20:26:42.000000000 +0100
70354 extern struct list_head hose_list;
70355 -extern int global_phb_number;
70357 extern void find_and_init_phbs(void);
70360 extern unsigned long get_phb_buid (struct device_node *);
70361 extern int rtas_setup_phb(struct pci_controller *phb);
70363 -/* From iSeries PCI */
70364 -extern void iSeries_pcibios_init(void);
70366 extern unsigned long pci_probe_only;
70368 /* ---- EEH internal-use-only related routines ---- */
70369 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/prom.h powerpc.git/include/asm-powerpc/prom.h
70370 --- linux-2.6.24/include/asm-powerpc/prom.h 2008-01-24 23:58:37.000000000 +0100
70371 +++ powerpc.git/include/asm-powerpc/prom.h 2008-01-28 20:26:42.000000000 +0100
70372 @@ -202,6 +202,10 @@
70374 extern u64 of_translate_address(struct device_node *np, const u32 *addr);
70376 +/* Translate a DMA address from device space to CPU space */
70377 +extern u64 of_translate_dma_address(struct device_node *dev,
70378 + const u32 *in_addr);
70380 /* Extract an address from a device, returns the region size and
70381 * the address space flags too. The PCI version uses a BAR number
70382 * instead of an absolute index
70383 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/ps3.h powerpc.git/include/asm-powerpc/ps3.h
70384 --- linux-2.6.24/include/asm-powerpc/ps3.h 2008-01-24 23:58:37.000000000 +0100
70385 +++ powerpc.git/include/asm-powerpc/ps3.h 2008-01-28 20:26:42.000000000 +0100
70387 #include <linux/init.h>
70388 #include <linux/types.h>
70389 #include <linux/device.h>
70390 +#include "cell-pmu.h"
70392 union ps3_firmware_version {
70394 @@ -317,6 +318,7 @@
70395 PS3_MATCH_ID_STOR_FLASH = 8,
70396 PS3_MATCH_ID_SOUND = 9,
70397 PS3_MATCH_ID_GRAPHICS = 10,
70398 + PS3_MATCH_ID_LPM = 11,
70401 #define PS3_MODULE_ALIAS_EHCI "ps3:1"
70402 @@ -329,11 +331,13 @@
70403 #define PS3_MODULE_ALIAS_STOR_FLASH "ps3:8"
70404 #define PS3_MODULE_ALIAS_SOUND "ps3:9"
70405 #define PS3_MODULE_ALIAS_GRAPHICS "ps3:10"
70406 +#define PS3_MODULE_ALIAS_LPM "ps3:11"
70408 enum ps3_system_bus_device_type {
70409 PS3_DEVICE_TYPE_IOC0 = 1,
70410 PS3_DEVICE_TYPE_SB,
70411 PS3_DEVICE_TYPE_VUART,
70412 + PS3_DEVICE_TYPE_LPM,
70416 @@ -344,12 +348,17 @@
70417 enum ps3_match_id match_id;
70418 enum ps3_system_bus_device_type dev_type;
70420 - unsigned int bus_id; /* SB */
70421 - unsigned int dev_id; /* SB */
70422 + u64 bus_id; /* SB */
70423 + u64 dev_id; /* SB */
70424 unsigned int interrupt_id; /* SB */
70425 struct ps3_dma_region *d_region; /* SB, IOC0 */
70426 struct ps3_mmio_region *m_region; /* SB, IOC0*/
70427 unsigned int port_number; /* VUART */
70428 + struct { /* LPM */
70434 /* struct iommu_table *iommu_table; -- waiting for BenH's cleanups */
70435 struct device core;
70436 @@ -438,5 +447,66 @@
70437 extern struct ps3_prealloc ps3fb_videomemory;
70438 extern struct ps3_prealloc ps3flash_bounce_buffer;
70440 +/* logical performance monitor */
70443 + * enum ps3_lpm_rights - Rigths granted by the system policy module.
70445 + * @PS3_LPM_RIGHTS_USE_LPM: The right to use the lpm.
70446 + * @PS3_LPM_RIGHTS_USE_TB: The right to use the internal trace buffer.
70449 +enum ps3_lpm_rights {
70450 + PS3_LPM_RIGHTS_USE_LPM = 0x001,
70451 + PS3_LPM_RIGHTS_USE_TB = 0x100,
70455 + * enum ps3_lpm_tb_type - Type of trace buffer lv1 should use.
70457 + * @PS3_LPM_TB_TYPE_NONE: Do not use a trace buffer.
70458 + * @PS3_LPM_RIGHTS_USE_TB: Use the lv1 internal trace buffer. Must have
70459 + * rights @PS3_LPM_RIGHTS_USE_TB.
70462 +enum ps3_lpm_tb_type {
70463 + PS3_LPM_TB_TYPE_NONE = 0,
70464 + PS3_LPM_TB_TYPE_INTERNAL = 1,
70467 +int ps3_lpm_open(enum ps3_lpm_tb_type tb_type, void *tb_cache,
70468 + u64 tb_cache_size);
70469 +int ps3_lpm_close(void);
70470 +int ps3_lpm_copy_tb(unsigned long offset, void *buf, unsigned long count,
70471 + unsigned long *bytes_copied);
70472 +int ps3_lpm_copy_tb_to_user(unsigned long offset, void __user *buf,
70473 + unsigned long count, unsigned long *bytes_copied);
70474 +void ps3_set_bookmark(u64 bookmark);
70475 +void ps3_set_pm_bookmark(u64 tag, u64 incident, u64 th_id);
70476 +int ps3_set_signal(u64 rtas_signal_group, u8 signal_bit, u16 sub_unit,
70479 +u32 ps3_read_phys_ctr(u32 cpu, u32 phys_ctr);
70480 +void ps3_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val);
70481 +u32 ps3_read_ctr(u32 cpu, u32 ctr);
70482 +void ps3_write_ctr(u32 cpu, u32 ctr, u32 val);
70484 +u32 ps3_read_pm07_control(u32 cpu, u32 ctr);
70485 +void ps3_write_pm07_control(u32 cpu, u32 ctr, u32 val);
70486 +u32 ps3_read_pm(u32 cpu, enum pm_reg_name reg);
70487 +void ps3_write_pm(u32 cpu, enum pm_reg_name reg, u32 val);
70489 +u32 ps3_get_ctr_size(u32 cpu, u32 phys_ctr);
70490 +void ps3_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size);
70492 +void ps3_enable_pm(u32 cpu);
70493 +void ps3_disable_pm(u32 cpu);
70494 +void ps3_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask);
70495 +void ps3_disable_pm_interrupts(u32 cpu);
70497 +u32 ps3_get_and_clear_pm_interrupts(u32 cpu);
70498 +void ps3_sync_irq(int node);
70499 +u32 ps3_get_hw_thread_id(int cpu);
70500 +u64 ps3_get_spe_id(void *arg);
70503 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/ptrace.h powerpc.git/include/asm-powerpc/ptrace.h
70504 --- linux-2.6.24/include/asm-powerpc/ptrace.h 2008-01-24 23:58:37.000000000 +0100
70505 +++ powerpc.git/include/asm-powerpc/ptrace.h 2008-01-28 20:26:42.000000000 +0100
70506 @@ -106,7 +106,8 @@
70508 #define FULL_REGS(regs) (((regs)->trap & 1) == 0)
70509 #ifndef __powerpc64__
70510 -#define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) == 0)
70511 +#define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) != 0)
70512 +#define IS_MCHECK_EXC(regs) (((regs)->trap & 4) != 0)
70513 #endif /* ! __powerpc64__ */
70514 #define TRAP(regs) ((regs)->trap & ~0xF)
70515 #ifdef __powerpc64__
70516 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/qe.h powerpc.git/include/asm-powerpc/qe.h
70517 --- linux-2.6.24/include/asm-powerpc/qe.h 2008-01-24 23:58:37.000000000 +0100
70518 +++ powerpc.git/include/asm-powerpc/qe.h 2008-01-28 20:26:42.000000000 +0100
70520 #define MEM_PART_SECONDARY 1
70521 #define MEM_PART_MURAM 2
70523 +/* Clocks and BRGs */
70526 + QE_BRG1, /* Baud Rate Generator 1 */
70527 + QE_BRG2, /* Baud Rate Generator 2 */
70528 + QE_BRG3, /* Baud Rate Generator 3 */
70529 + QE_BRG4, /* Baud Rate Generator 4 */
70530 + QE_BRG5, /* Baud Rate Generator 5 */
70531 + QE_BRG6, /* Baud Rate Generator 6 */
70532 + QE_BRG7, /* Baud Rate Generator 7 */
70533 + QE_BRG8, /* Baud Rate Generator 8 */
70534 + QE_BRG9, /* Baud Rate Generator 9 */
70535 + QE_BRG10, /* Baud Rate Generator 10 */
70536 + QE_BRG11, /* Baud Rate Generator 11 */
70537 + QE_BRG12, /* Baud Rate Generator 12 */
70538 + QE_BRG13, /* Baud Rate Generator 13 */
70539 + QE_BRG14, /* Baud Rate Generator 14 */
70540 + QE_BRG15, /* Baud Rate Generator 15 */
70541 + QE_BRG16, /* Baud Rate Generator 16 */
70542 + QE_CLK1, /* Clock 1 */
70543 + QE_CLK2, /* Clock 2 */
70544 + QE_CLK3, /* Clock 3 */
70545 + QE_CLK4, /* Clock 4 */
70546 + QE_CLK5, /* Clock 5 */
70547 + QE_CLK6, /* Clock 6 */
70548 + QE_CLK7, /* Clock 7 */
70549 + QE_CLK8, /* Clock 8 */
70550 + QE_CLK9, /* Clock 9 */
70551 + QE_CLK10, /* Clock 10 */
70552 + QE_CLK11, /* Clock 11 */
70553 + QE_CLK12, /* Clock 12 */
70554 + QE_CLK13, /* Clock 13 */
70555 + QE_CLK14, /* Clock 14 */
70556 + QE_CLK15, /* Clock 15 */
70557 + QE_CLK16, /* Clock 16 */
70558 + QE_CLK17, /* Clock 17 */
70559 + QE_CLK18, /* Clock 18 */
70560 + QE_CLK19, /* Clock 19 */
70561 + QE_CLK20, /* Clock 20 */
70562 + QE_CLK21, /* Clock 21 */
70563 + QE_CLK22, /* Clock 22 */
70564 + QE_CLK23, /* Clock 23 */
70565 + QE_CLK24, /* Clock 24 */
70569 /* Export QE common operations */
70570 extern void qe_reset(void);
70571 extern int par_io_init(struct device_node *np);
70574 /* QE internal API */
70575 int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input);
70576 -void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier);
70577 +enum qe_clock qe_clock_source(const char *source);
70578 +int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier);
70579 int qe_get_snum(void);
70580 void qe_put_snum(u8 snum);
70581 unsigned long qe_muram_alloc(int size, int align);
70583 void qe_muram_dump(void);
70584 void *qe_muram_addr(unsigned long offset);
70586 +/* Structure that defines QE firmware binary files.
70588 + * See Documentation/powerpc/qe-firmware.txt for a description of these
70591 +struct qe_firmware {
70592 + struct qe_header {
70593 + __be32 length; /* Length of the entire structure, in bytes */
70594 + u8 magic[3]; /* Set to { 'Q', 'E', 'F' } */
70595 + u8 version; /* Version of this layout. First ver is '1' */
70597 + u8 id[62]; /* Null-terminated identifier string */
70598 + u8 split; /* 0 = shared I-RAM, 1 = split I-RAM */
70599 + u8 count; /* Number of microcode[] structures */
70601 + __be16 model; /* The SOC model */
70602 + u8 major; /* The SOC revision major */
70603 + u8 minor; /* The SOC revision minor */
70604 + } __attribute__ ((packed)) soc;
70605 + u8 padding[4]; /* Reserved, for alignment */
70606 + __be64 extended_modes; /* Extended modes */
70607 + __be32 vtraps[8]; /* Virtual trap addresses */
70608 + u8 reserved[4]; /* Reserved, for future expansion */
70609 + struct qe_microcode {
70610 + u8 id[32]; /* Null-terminated identifier */
70611 + __be32 traps[16]; /* Trap addresses, 0 == ignore */
70612 + __be32 eccr; /* The value for the ECCR register */
70613 + __be32 iram_offset; /* Offset into I-RAM for the code */
70614 + __be32 count; /* Number of 32-bit words of the code */
70615 + __be32 code_offset; /* Offset of the actual microcode */
70616 + u8 major; /* The microcode version major */
70617 + u8 minor; /* The microcode version minor */
70618 + u8 revision; /* The microcode version revision */
70619 + u8 padding; /* Reserved, for alignment */
70620 + u8 reserved[4]; /* Reserved, for future expansion */
70621 + } __attribute__ ((packed)) microcode[1];
70622 + /* All microcode binaries should be located here */
70623 + /* CRC32 should be located here, after the microcode binaries */
70624 +} __attribute__ ((packed));
70626 +struct qe_firmware_info {
70627 + char id[64]; /* Firmware name */
70628 + u32 vtraps[8]; /* Virtual trap addresses */
70629 + u64 extended_modes; /* Extended modes */
70632 +/* Upload a firmware to the QE */
70633 +int qe_upload_firmware(const struct qe_firmware *firmware);
70635 +/* Obtain information on the uploaded firmware */
70636 +struct qe_firmware_info *qe_get_firmware_info(void);
70638 /* Buffer descriptors */
70641 @@ -129,52 +228,6 @@
70642 COMM_DIR_RX_AND_TX = 3
70645 -/* Clocks and BRGs */
70648 - QE_BRG1, /* Baud Rate Generator 1 */
70649 - QE_BRG2, /* Baud Rate Generator 2 */
70650 - QE_BRG3, /* Baud Rate Generator 3 */
70651 - QE_BRG4, /* Baud Rate Generator 4 */
70652 - QE_BRG5, /* Baud Rate Generator 5 */
70653 - QE_BRG6, /* Baud Rate Generator 6 */
70654 - QE_BRG7, /* Baud Rate Generator 7 */
70655 - QE_BRG8, /* Baud Rate Generator 8 */
70656 - QE_BRG9, /* Baud Rate Generator 9 */
70657 - QE_BRG10, /* Baud Rate Generator 10 */
70658 - QE_BRG11, /* Baud Rate Generator 11 */
70659 - QE_BRG12, /* Baud Rate Generator 12 */
70660 - QE_BRG13, /* Baud Rate Generator 13 */
70661 - QE_BRG14, /* Baud Rate Generator 14 */
70662 - QE_BRG15, /* Baud Rate Generator 15 */
70663 - QE_BRG16, /* Baud Rate Generator 16 */
70664 - QE_CLK1, /* Clock 1 */
70665 - QE_CLK2, /* Clock 2 */
70666 - QE_CLK3, /* Clock 3 */
70667 - QE_CLK4, /* Clock 4 */
70668 - QE_CLK5, /* Clock 5 */
70669 - QE_CLK6, /* Clock 6 */
70670 - QE_CLK7, /* Clock 7 */
70671 - QE_CLK8, /* Clock 8 */
70672 - QE_CLK9, /* Clock 9 */
70673 - QE_CLK10, /* Clock 10 */
70674 - QE_CLK11, /* Clock 11 */
70675 - QE_CLK12, /* Clock 12 */
70676 - QE_CLK13, /* Clock 13 */
70677 - QE_CLK14, /* Clock 14 */
70678 - QE_CLK15, /* Clock 15 */
70679 - QE_CLK16, /* Clock 16 */
70680 - QE_CLK17, /* Clock 17 */
70681 - QE_CLK18, /* Clock 18 */
70682 - QE_CLK19, /* Clock 19 */
70683 - QE_CLK20, /* Clock 20 */
70684 - QE_CLK21, /* Clock 21 */
70685 - QE_CLK22, /* Clock 22 */
70686 - QE_CLK23, /* Clock 23 */
70687 - QE_CLK24, /* Clock 24 */
70691 /* QE CMXUCR Registers.
70692 * There are two UCCs represented in each of the four CMXUCR registers.
70693 * These values are for the UCC in the LSBs
70694 @@ -328,6 +381,15 @@
70696 #define QE_SDEBCR_BA_MASK 0x01FFFFFF
70698 +/* Communication Processor */
70699 +#define QE_CP_CERCR_MEE 0x8000 /* Multi-user RAM ECC enable */
70700 +#define QE_CP_CERCR_IEE 0x4000 /* Instruction RAM ECC enable */
70701 +#define QE_CP_CERCR_CIR 0x0800 /* Common instruction RAM */
70704 +#define QE_IRAM_IADD_AIE 0x80000000 /* Auto Increment Enable */
70705 +#define QE_IRAM_IADD_BADDR 0x00080000 /* Base Address */
70708 #define UPGCR_PROTOCOL 0x80000000 /* protocol ul2 or pl2 */
70709 #define UPGCR_TMS 0x40000000 /* Transmit master/slave mode */
70710 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/reg.h powerpc.git/include/asm-powerpc/reg.h
70711 --- linux-2.6.24/include/asm-powerpc/reg.h 2008-01-24 23:58:37.000000000 +0100
70712 +++ powerpc.git/include/asm-powerpc/reg.h 2008-01-28 20:26:42.000000000 +0100
70713 @@ -553,6 +553,7 @@
70714 #define SPRN_PA6T_BTCR 978 /* Breakpoint and Tagging Control Register */
70715 #define SPRN_PA6T_IMAAT 979 /* Instruction Match Array Action Table */
70716 #define SPRN_PA6T_PCCR 1019 /* Power Counter Control Register */
70717 +#define SPRN_BKMK 1020 /* Cell Bookmark Register */
70718 #define SPRN_PA6T_RPCCR 1021 /* Retire PC Trace Control Register */
70721 @@ -691,12 +692,6 @@
70722 #define PV_BE 0x0070
70723 #define PV_PA6T 0x0090
70726 - * Number of entries in the SLB. If this ever changes we should handle
70727 - * it with a use a cpu feature fixup.
70729 -#define SLB_NUM_ENTRIES 64
70731 /* Macros for setting and retrieving special purpose registers */
70732 #ifndef __ASSEMBLY__
70733 #define mfmsr() ({unsigned long rval; \
70734 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/reg_booke.h powerpc.git/include/asm-powerpc/reg_booke.h
70735 --- linux-2.6.24/include/asm-powerpc/reg_booke.h 2008-01-24 23:58:37.000000000 +0100
70736 +++ powerpc.git/include/asm-powerpc/reg_booke.h 2008-01-28 20:26:42.000000000 +0100
70737 @@ -123,16 +123,23 @@
70738 #define SPRN_SPEFSCR 0x200 /* SPE & Embedded FP Status & Control */
70739 #define SPRN_BBEAR 0x201 /* Branch Buffer Entry Address Register */
70740 #define SPRN_BBTAR 0x202 /* Branch Buffer Target Address Register */
70741 +#define SPRN_ATB 0x20E /* Alternate Time Base */
70742 +#define SPRN_ATBL 0x20E /* Alternate Time Base Lower */
70743 +#define SPRN_ATBU 0x20F /* Alternate Time Base Upper */
70744 #define SPRN_IVOR32 0x210 /* Interrupt Vector Offset Register 32 */
70745 #define SPRN_IVOR33 0x211 /* Interrupt Vector Offset Register 33 */
70746 #define SPRN_IVOR34 0x212 /* Interrupt Vector Offset Register 34 */
70747 #define SPRN_IVOR35 0x213 /* Interrupt Vector Offset Register 35 */
70748 +#define SPRN_IVOR36 0x214 /* Interrupt Vector Offset Register 36 */
70749 +#define SPRN_IVOR37 0x215 /* Interrupt Vector Offset Register 37 */
70750 #define SPRN_MCSRR0 0x23A /* Machine Check Save and Restore Register 0 */
70751 #define SPRN_MCSRR1 0x23B /* Machine Check Save and Restore Register 1 */
70752 #define SPRN_MCSR 0x23C /* Machine Check Status Register */
70753 #define SPRN_MCAR 0x23D /* Machine Check Address Register */
70754 #define SPRN_DSRR0 0x23E /* Debug Save and Restore Register 0 */
70755 #define SPRN_DSRR1 0x23F /* Debug Save and Restore Register 1 */
70756 +#define SPRN_SPRG8 0x25C /* Special Purpose Register General 8 */
70757 +#define SPRN_SPRG9 0x25D /* Special Purpose Register General 9 */
70758 #define SPRN_MAS0 0x270 /* MMU Assist Register 0 */
70759 #define SPRN_MAS1 0x271 /* MMU Assist Register 1 */
70760 #define SPRN_MAS2 0x272 /* MMU Assist Register 2 */
70761 @@ -140,15 +147,18 @@
70762 #define SPRN_MAS4 0x274 /* MMU Assist Register 4 */
70763 #define SPRN_MAS5 0x275 /* MMU Assist Register 5 */
70764 #define SPRN_MAS6 0x276 /* MMU Assist Register 6 */
70765 -#define SPRN_MAS7 0x3b0 /* MMU Assist Register 7 */
70766 #define SPRN_PID1 0x279 /* Process ID Register 1 */
70767 #define SPRN_PID2 0x27A /* Process ID Register 2 */
70768 #define SPRN_TLB0CFG 0x2B0 /* TLB 0 Config Register */
70769 #define SPRN_TLB1CFG 0x2B1 /* TLB 1 Config Register */
70770 +#define SPRN_EPR 0x2BE /* External Proxy Register */
70771 #define SPRN_CCR1 0x378 /* Core Configuration Register 1 */
70772 #define SPRN_ZPR 0x3B0 /* Zone Protection Register (40x) */
70773 +#define SPRN_MAS7 0x3B0 /* MMU Assist Register 7 */
70774 #define SPRN_MMUCR 0x3B2 /* MMU Control Register */
70775 #define SPRN_CCR0 0x3B3 /* Core Configuration Register 0 */
70776 +#define SPRN_EPLC 0x3B3 /* External Process ID Load Context */
70777 +#define SPRN_EPSC 0x3B4 /* External Process ID Store Context */
70778 #define SPRN_SGR 0x3B9 /* Storage Guarded Register */
70779 #define SPRN_DCWR 0x3BA /* Data Cache Write-thru Register */
70780 #define SPRN_SLER 0x3BB /* Little-endian real mode */
70781 @@ -159,6 +169,7 @@
70782 #define SPRN_L1CSR0 0x3F2 /* L1 Cache Control and Status Register 0 */
70783 #define SPRN_L1CSR1 0x3F3 /* L1 Cache Control and Status Register 1 */
70784 #define SPRN_PIT 0x3DB /* Programmable Interval Timer */
70785 +#define SPRN_BUCSR 0x3F5 /* Branch Unit Control and Status */
70786 #define SPRN_DCCR 0x3FA /* Data Cache Cacheability Register */
70787 #define SPRN_ICCR 0x3FB /* Instruction Cache Cacheability Register */
70788 #define SPRN_SVR 0x3FF /* System Version Register */
70789 @@ -207,7 +218,6 @@
70790 #define CCR1_TCS 0x00000080 /* Timer Clock Select */
70792 /* Bit definitions for the MCSR. */
70793 -#ifdef CONFIG_440A
70794 #define MCSR_MCS 0x80000000 /* Machine Check Summary */
70795 #define MCSR_IB 0x40000000 /* Instruction PLB Error */
70796 #define MCSR_DRB 0x20000000 /* Data Read PLB Error */
70797 @@ -217,7 +227,7 @@
70798 #define MCSR_DCSP 0x02000000 /* D-Cache Search Parity Error */
70799 #define MCSR_DCFP 0x01000000 /* D-Cache Flush Parity Error */
70800 #define MCSR_IMPE 0x00800000 /* Imprecise Machine Check Exception */
70804 #define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */
70805 #define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */
70806 @@ -293,7 +303,7 @@
70807 #define ESR_IMCB 0x20000000 /* Instr. Machine Check - Bus error */
70808 #define ESR_IMCT 0x10000000 /* Instr. Machine Check - Timeout */
70809 #define ESR_PIL 0x08000000 /* Program Exception - Illegal */
70810 -#define ESR_PPR 0x04000000 /* Program Exception - Priveleged */
70811 +#define ESR_PPR 0x04000000 /* Program Exception - Privileged */
70812 #define ESR_PTR 0x02000000 /* Program Exception - Trap */
70813 #define ESR_FP 0x01000000 /* Floating Point Operation */
70814 #define ESR_DST 0x00800000 /* Storage Exception - Data miss */
70815 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/setjmp.h powerpc.git/include/asm-powerpc/setjmp.h
70816 --- linux-2.6.24/include/asm-powerpc/setjmp.h 1970-01-01 01:00:00.000000000 +0100
70817 +++ powerpc.git/include/asm-powerpc/setjmp.h 2008-01-28 20:26:42.000000000 +0100
70820 + * Copyright © 2008 Michael Neuling IBM Corporation
70822 + * This program is free software; you can redistribute it and/or
70823 + * modify it under the terms of the GNU General Public License
70824 + * as published by the Free Software Foundation; either version
70825 + * 2 of the License, or (at your option) any later version.
70828 +#ifndef _ASM_POWERPC_SETJMP_H
70829 +#define _ASM_POWERPC_SETJMP_H
70831 +#define JMP_BUF_LEN 23
70833 +extern long setjmp(long *);
70834 +extern void longjmp(long *, long);
70836 +#endif /* _ASM_POWERPC_SETJMP_H */
70837 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/smu.h powerpc.git/include/asm-powerpc/smu.h
70838 --- linux-2.6.24/include/asm-powerpc/smu.h 2008-01-24 23:58:37.000000000 +0100
70839 +++ powerpc.git/include/asm-powerpc/smu.h 2008-01-28 20:26:42.000000000 +0100
70841 * Partition info commands
70843 * These commands are used to retrieve the sdb-partition-XX datas from
70844 - * the SMU. The lenght is always 2. First byte is the subcommand code
70845 + * the SMU. The length is always 2. First byte is the subcommand code
70846 * and second byte is the partition ID.
70848 * The reply is 6 bytes:
70849 @@ -173,12 +173,12 @@
70850 * Power supply control
70852 * The "sub" command is an ASCII string in the data, the
70853 - * data lenght is that of the string.
70854 + * data length is that of the string.
70856 * The VSLEW command can be used to get or set the voltage slewing.
70857 - * - lenght 5 (only "VSLEW") : it returns "DONE" and 3 bytes of
70858 + * - length 5 (only "VSLEW") : it returns "DONE" and 3 bytes of
70859 * reply at data offset 6, 7 and 8.
70860 - * - lenght 8 ("VSLEWxyz") has 3 additional bytes appended, and is
70861 + * - length 8 ("VSLEWxyz") has 3 additional bytes appended, and is
70862 * used to set the voltage slewing point. The SMU replies with "DONE"
70863 * I yet have to figure out their exact meaning of those 3 bytes in
70864 * both cases. They seem to be:
70865 @@ -201,20 +201,90 @@
70867 #define SMU_CMD_READ_ADC 0xd8
70872 * This command seem to be a grab bag of various things
70877 #define SMU_CMD_MISC_df_COMMAND 0xdf
70878 -#define SMU_CMD_MISC_df_SET_DISPLAY_LIT 0x02 /* i: 1 byte */
70881 + * Sets "system ready" status
70883 + * I did not yet understand how it exactly works or what it does.
70885 + * Guessing from OF code, 0x02 activates the display backlight. Apple uses/used
70886 + * the same codebase for all OF versions. On PowerBooks, this command would
70887 + * enable the backlight. For the G5s, it only activates the front LED. However,
70888 + * don't take this for granted.
70891 + * 2: status [0x00, 0x01 or 0x02]
70893 +#define SMU_CMD_MISC_df_SET_DISPLAY_LIT 0x02
70896 + * Sets mode of power switch.
70898 + * What this actually does is not yet known. Maybe it enables some interrupt.
70901 + * 2: enable power switch? [0x00 or 0x01]
70902 + * 3 (optional): enable nmi? [0x00 or 0x01]
70905 + * If parameter 2 is 0x00 and parameter 3 is not specified, returns wether
70906 + * NMI is enabled. Otherwise unknown.
70908 #define SMU_CMD_MISC_df_NMI_OPTION 0x04
70910 +/* Sets LED dimm offset.
70912 + * The front LED dimms itself during sleep. Its brightness (or, well, the PWM
70913 + * frequency) depends on current time. Therefore, the SMU needs to know the
70917 + * 2-8: unknown (BCD coding)
70919 +#define SMU_CMD_MISC_df_DIMM_OFFSET 0x99
70923 * Version info commands
70925 - * I haven't quite tried to figure out how these work
70927 + * 1 (optional): Specifies version part to retrieve
70932 #define SMU_CMD_VERSION_COMMAND 0xea
70933 +#define SMU_VERSION_RUNNING 0x00
70934 +#define SMU_VERSION_BASE 0x01
70935 +#define SMU_VERSION_UPDATE 0x02
70941 + * These are switches whose status seems to be known to the SMU.
70947 + * Switch bits (ORed, see below)
70949 +#define SMU_CMD_SWITCHES 0xdc
70951 +/* Switches bits */
70952 +#define SMU_SWITCH_CASE_CLOSED 0x01
70953 +#define SMU_SWITCH_AC_POWER 0x04
70954 +#define SMU_SWITCH_POWER_SWITCH 0x08
70958 @@ -243,10 +313,64 @@
70960 #define SMU_CMD_MISC_ee_COMMAND 0xee
70961 #define SMU_CMD_MISC_ee_GET_DATABLOCK_REC 0x02
70962 -#define SMU_CMD_MISC_ee_LEDS_CTRL 0x04 /* i: 00 (00,01) [00] */
70964 +/* Retrieves currently used watts.
70967 + * 1: 0x03 (Meaning unknown)
70969 +#define SMU_CMD_MISC_ee_GET_WATTS 0x03
70971 +#define SMU_CMD_MISC_ee_LEDS_CTRL 0x04 /* i: 00 (00,01) [00] */
70972 #define SMU_CMD_MISC_ee_GET_DATA 0x05 /* i: 00 , o: ?? */
70976 + * Power related commands
70981 +#define SMU_CMD_POWER_EVENTS_COMMAND 0x8f
70983 +/* SMU_POWER_EVENTS subcommands */
70985 + SMU_PWR_GET_POWERUP_EVENTS = 0x00,
70986 + SMU_PWR_SET_POWERUP_EVENTS = 0x01,
70987 + SMU_PWR_CLR_POWERUP_EVENTS = 0x02,
70988 + SMU_PWR_GET_WAKEUP_EVENTS = 0x03,
70989 + SMU_PWR_SET_WAKEUP_EVENTS = 0x04,
70990 + SMU_PWR_CLR_WAKEUP_EVENTS = 0x05,
70993 + * Get last shutdown cause
70996 + * 1 byte (signed char): Last shutdown cause. Exact meaning unknown.
70998 + SMU_PWR_LAST_SHUTDOWN_CAUSE = 0x07,
71001 + * Sets or gets server ID. Meaning or use is unknown.
71004 + * 2 (optional): Set server ID (1 byte)
71007 + * 1 byte (server ID?)
71009 + SMU_PWR_SERVER_ID = 0x08,
71012 +/* Power events wakeup bits */
71014 + SMU_PWR_WAKEUP_KEY = 0x01, /* Wake on key press */
71015 + SMU_PWR_WAKEUP_AC_INSERT = 0x02, /* Wake on AC adapter plug */
71016 + SMU_PWR_WAKEUP_AC_CHANGE = 0x04,
71017 + SMU_PWR_WAKEUP_LID_OPEN = 0x08,
71018 + SMU_PWR_WAKEUP_RING = 0x10,
71023 * - Kernel side interface -
71024 @@ -564,13 +688,13 @@
71026 __u8 cmd; /* SMU command byte */
71027 __u8 pad[3]; /* padding */
71028 - __u32 data_len; /* Lenght of data following */
71029 + __u32 data_len; /* Length of data following */
71032 struct smu_user_reply_hdr
71034 __u32 status; /* Command status */
71035 - __u32 reply_len; /* Lenght of data follwing */
71036 + __u32 reply_len; /* Length of data follwing */
71039 #endif /* _SMU_H */
71040 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/sparsemem.h powerpc.git/include/asm-powerpc/sparsemem.h
71041 --- linux-2.6.24/include/asm-powerpc/sparsemem.h 2008-01-24 23:58:37.000000000 +0100
71042 +++ powerpc.git/include/asm-powerpc/sparsemem.h 2008-01-28 20:26:42.000000000 +0100
71045 #define SECTION_SIZE_BITS 24
71047 -#if defined(CONFIG_PS3_USE_LPAR_ADDR)
71048 -#define MAX_PHYSADDR_BITS 47
71049 -#define MAX_PHYSMEM_BITS 47
71051 #define MAX_PHYSADDR_BITS 44
71052 #define MAX_PHYSMEM_BITS 44
71055 #ifdef CONFIG_MEMORY_HOTPLUG
71056 extern void create_section_mapping(unsigned long start, unsigned long end);
71057 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/spu.h powerpc.git/include/asm-powerpc/spu.h
71058 --- linux-2.6.24/include/asm-powerpc/spu.h 2008-01-24 23:58:37.000000000 +0100
71059 +++ powerpc.git/include/asm-powerpc/spu.h 2008-01-28 20:26:42.000000000 +0100
71060 @@ -104,6 +104,7 @@
71062 struct spu_context;
71063 struct spu_runqueue;
71065 struct device_node;
71067 enum spu_utilization_state {
71068 @@ -145,7 +146,6 @@
71069 void (* ibox_callback)(struct spu *spu);
71070 void (* stop_callback)(struct spu *spu);
71071 void (* mfc_callback)(struct spu *spu);
71072 - void (* dma_callback)(struct spu *spu, int type);
71076 @@ -196,10 +196,11 @@
71077 extern struct cbe_spu_info cbe_spu_info[];
71079 void spu_init_channels(struct spu *spu);
71080 -int spu_irq_class_0_bottom(struct spu *spu);
71081 -int spu_irq_class_1_bottom(struct spu *spu);
71082 void spu_irq_setaffinity(struct spu *spu, int cpu);
71084 +void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
71085 + void *code, int code_size);
71087 #ifdef CONFIG_KEXEC
71088 void crash_register_spus(struct list_head *list);
71090 @@ -210,6 +211,7 @@
71092 extern void spu_invalidate_slbs(struct spu *spu);
71093 extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm);
71094 +int spu_64k_pages_available(void);
71096 /* Calls from the memory management to the SPU */
71098 @@ -279,6 +281,8 @@
71099 int spu_add_sysdev_attr_group(struct attribute_group *attrs);
71100 void spu_remove_sysdev_attr_group(struct attribute_group *attrs);
71102 +int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
71103 + unsigned long dsisr, unsigned *flt);
71107 @@ -303,7 +307,7 @@
71108 extern void do_notify_spus_active(void);
71111 - * This defines the Local Store, Problem Area and Privlege Area of an SPU.
71112 + * This defines the Local Store, Problem Area and Privilege Area of an SPU.
71115 union mfc_tag_size_class_cmd {
71116 @@ -524,8 +528,24 @@
71117 #define CLASS2_ENABLE_SPU_STOP_INTR 0x2L
71118 #define CLASS2_ENABLE_SPU_HALT_INTR 0x4L
71119 #define CLASS2_ENABLE_SPU_DMA_TAG_GROUP_COMPLETE_INTR 0x8L
71120 +#define CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR 0x10L
71121 u8 pad_0x118_0x140[0x28]; /* 0x118 */
71122 u64 int_stat_RW[3]; /* 0x140 */
71123 +#define CLASS0_DMA_ALIGNMENT_INTR 0x1L
71124 +#define CLASS0_INVALID_DMA_COMMAND_INTR 0x2L
71125 +#define CLASS0_SPU_ERROR_INTR 0x4L
71126 +#define CLASS0_INTR_MASK 0x7L
71127 +#define CLASS1_SEGMENT_FAULT_INTR 0x1L
71128 +#define CLASS1_STORAGE_FAULT_INTR 0x2L
71129 +#define CLASS1_LS_COMPARE_SUSPEND_ON_GET_INTR 0x4L
71130 +#define CLASS1_LS_COMPARE_SUSPEND_ON_PUT_INTR 0x8L
71131 +#define CLASS1_INTR_MASK 0xfL
71132 +#define CLASS2_MAILBOX_INTR 0x1L
71133 +#define CLASS2_SPU_STOP_INTR 0x2L
71134 +#define CLASS2_SPU_HALT_INTR 0x4L
71135 +#define CLASS2_SPU_DMA_TAG_GROUP_COMPLETE_INTR 0x8L
71136 +#define CLASS2_MAILBOX_THRESHOLD_INTR 0x10L
71137 +#define CLASS2_INTR_MASK 0x1fL
71138 u8 pad_0x158_0x180[0x28]; /* 0x158 */
71139 u64 int_route_RW; /* 0x180 */
71141 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/spu_csa.h powerpc.git/include/asm-powerpc/spu_csa.h
71142 --- linux-2.6.24/include/asm-powerpc/spu_csa.h 2008-01-24 23:58:37.000000000 +0100
71143 +++ powerpc.git/include/asm-powerpc/spu_csa.h 2008-01-28 20:26:42.000000000 +0100
71144 @@ -194,7 +194,7 @@
71148 - * struct spu_priv2_collapsed - condensed priviliged 2 area, w/o pads.
71149 + * struct spu_priv2_collapsed - condensed privileged 2 area, w/o pads.
71151 struct spu_priv2_collapsed {
71153 @@ -254,20 +254,11 @@
71154 u64 spu_chnldata_RW[32];
71155 u32 spu_mailbox_data[4];
71156 u32 pu_mailbox_data[1];
71158 + u64 dar, dsisr, class_0_pending;
71159 unsigned long suspend_time;
71160 spinlock_t register_lock;
71163 -extern int spu_init_csa(struct spu_state *csa);
71164 -extern void spu_fini_csa(struct spu_state *csa);
71165 -extern int spu_save(struct spu_state *prev, struct spu *spu);
71166 -extern int spu_restore(struct spu_state *new, struct spu *spu);
71167 -extern int spu_switch(struct spu_state *prev, struct spu_state *new,
71168 - struct spu *spu);
71169 -extern int spu_alloc_lscsa(struct spu_state *csa);
71170 -extern void spu_free_lscsa(struct spu_state *csa);
71172 #endif /* !__SPU__ */
71173 #endif /* __KERNEL__ */
71174 #endif /* !__ASSEMBLY__ */
71175 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/spu_priv1.h powerpc.git/include/asm-powerpc/spu_priv1.h
71176 --- linux-2.6.24/include/asm-powerpc/spu_priv1.h 2008-01-24 23:58:37.000000000 +0100
71177 +++ powerpc.git/include/asm-powerpc/spu_priv1.h 2008-01-28 20:26:42.000000000 +0100
71179 #include <linux/types.h>
71182 +struct spu_context;
71184 /* access to priv1 registers */
71186 @@ -178,6 +179,8 @@
71187 int (*enumerate_spus)(int (*fn)(void *data));
71188 int (*create_spu)(struct spu *spu, void *data);
71189 int (*destroy_spu)(struct spu *spu);
71190 + void (*enable_spu)(struct spu_context *ctx);
71191 + void (*disable_spu)(struct spu_context *ctx);
71192 int (*init_affinity)(void);
71195 @@ -207,6 +210,18 @@
71196 return spu_management_ops->init_affinity();
71199 +static inline void
71200 +spu_enable_spu (struct spu_context *ctx)
71202 + spu_management_ops->enable_spu(ctx);
71205 +static inline void
71206 +spu_disable_spu (struct spu_context *ctx)
71208 + spu_management_ops->disable_spu(ctx);
71212 * The declarations folowing are put here for convenience
71213 * and only intended to be used by the platform setup code.
71214 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/system.h powerpc.git/include/asm-powerpc/system.h
71215 --- linux-2.6.24/include/asm-powerpc/system.h 2008-01-24 23:58:37.000000000 +0100
71216 +++ powerpc.git/include/asm-powerpc/system.h 2008-01-28 20:26:42.000000000 +0100
71217 @@ -169,6 +169,8 @@
71218 extern void bad_page_fault(struct pt_regs *, unsigned long, int);
71219 extern int die(const char *, struct pt_regs *, long);
71220 extern void _exception(int, struct pt_regs *, int, unsigned long);
71221 +extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
71223 #ifdef CONFIG_BOOKE_WDT
71224 extern u32 booke_wdt_enabled;
71225 extern u32 booke_wdt_period;
71226 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-powerpc/udbg.h powerpc.git/include/asm-powerpc/udbg.h
71227 --- linux-2.6.24/include/asm-powerpc/udbg.h 2008-01-24 23:58:37.000000000 +0100
71228 +++ powerpc.git/include/asm-powerpc/udbg.h 2008-01-28 20:26:42.000000000 +0100
71230 extern void __init udbg_init_debug_beat(void);
71231 extern void __init udbg_init_btext(void);
71232 extern void __init udbg_init_44x_as1(void);
71233 +extern void __init udbg_init_40x_realmode(void);
71234 extern void __init udbg_init_cpm(void);
71236 #endif /* __KERNEL__ */
71237 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-ppc/8xx_immap.h powerpc.git/include/asm-ppc/8xx_immap.h
71238 --- linux-2.6.24/include/asm-ppc/8xx_immap.h 2008-01-24 23:58:37.000000000 +0100
71239 +++ powerpc.git/include/asm-ppc/8xx_immap.h 2008-01-28 20:26:42.000000000 +0100
71240 @@ -123,7 +123,7 @@
71241 #define OR_G5LA 0x00000400 /* Output #GPL5 on #GPL_A5 */
71242 #define OR_G5LS 0x00000200 /* Drive #GPL high on falling edge of...*/
71243 #define OR_BI 0x00000100 /* Burst inhibit */
71244 -#define OR_SCY_MSK 0x000000f0 /* Cycle Lenght in Clocks */
71245 +#define OR_SCY_MSK 0x000000f0 /* Cycle Length in Clocks */
71246 #define OR_SCY_0_CLK 0x00000000 /* 0 clock cycles wait states */
71247 #define OR_SCY_1_CLK 0x00000010 /* 1 clock cycles wait states */
71248 #define OR_SCY_2_CLK 0x00000020 /* 2 clock cycles wait states */
71249 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-ppc/commproc.h powerpc.git/include/asm-ppc/commproc.h
71250 --- linux-2.6.24/include/asm-ppc/commproc.h 2008-01-24 23:58:37.000000000 +0100
71251 +++ powerpc.git/include/asm-ppc/commproc.h 2008-01-28 20:26:42.000000000 +0100
71252 @@ -681,7 +681,7 @@
71253 #define CICR_SCC_SCC3 ((uint)0x00200000) /* SCC3 @ SCCc */
71254 #define CICR_SCB_SCC2 ((uint)0x00040000) /* SCC2 @ SCCb */
71255 #define CICR_SCA_SCC1 ((uint)0x00000000) /* SCC1 @ SCCa */
71256 -#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrrupt */
71257 +#define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrupt */
71258 #define CICR_HP_MASK ((uint)0x00001f00) /* Hi-pri int. */
71259 #define CICR_IEN ((uint)0x00000080) /* Int. enable */
71260 #define CICR_SPS ((uint)0x00000001) /* SCC Spread */
71261 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-ppc/mmu.h powerpc.git/include/asm-ppc/mmu.h
71262 --- linux-2.6.24/include/asm-ppc/mmu.h 2008-01-24 23:58:37.000000000 +0100
71263 +++ powerpc.git/include/asm-ppc/mmu.h 2008-01-28 20:26:43.000000000 +0100
71264 @@ -383,6 +383,12 @@
71265 #define BOOKE_PAGESZ_256GB 14
71266 #define BOOKE_PAGESZ_1TB 15
71268 +#ifndef CONFIG_SERIAL_TEXT_DEBUG
71269 +#define PPC44x_EARLY_TLBS 1
71271 +#define PPC44x_EARLY_TLBS 2
71275 * Freescale Book-E MMU support
71277 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-ppc/mpc52xx_psc.h powerpc.git/include/asm-ppc/mpc52xx_psc.h
71278 --- linux-2.6.24/include/asm-ppc/mpc52xx_psc.h 2008-01-24 23:58:37.000000000 +0100
71279 +++ powerpc.git/include/asm-ppc/mpc52xx_psc.h 2008-01-28 20:26:43.000000000 +0100
71280 @@ -159,6 +159,9 @@
71282 u8 irfdr; /* PSC + 0x54 */
71286 +struct mpc52xx_psc_fifo {
71287 u16 rfnum; /* PSC + 0x58 */
71289 u16 tfnum; /* PSC + 0x5c */
71290 diff -x .git -x .gitignore -Nur linux-2.6.24/include/asm-ppc/reg_booke.h powerpc.git/include/asm-ppc/reg_booke.h
71291 --- linux-2.6.24/include/asm-ppc/reg_booke.h 2008-01-24 23:58:37.000000000 +0100
71292 +++ powerpc.git/include/asm-ppc/reg_booke.h 2008-01-28 20:26:43.000000000 +0100
71293 @@ -207,7 +207,7 @@
71294 #define CCR1_TCS 0x00000080 /* Timer Clock Select */
71296 /* Bit definitions for the MCSR. */
71297 -#ifdef CONFIG_440A
71299 #define MCSR_MCS 0x80000000 /* Machine Check Summary */
71300 #define MCSR_IB 0x40000000 /* Instruction PLB Error */
71301 #define MCSR_DRB 0x20000000 /* Data Read PLB Error */
71302 @@ -283,7 +283,7 @@
71303 #define ESR_IMCB 0x20000000 /* Instr. Machine Check - Bus error */
71304 #define ESR_IMCT 0x10000000 /* Instr. Machine Check - Timeout */
71305 #define ESR_PIL 0x08000000 /* Program Exception - Illegal */
71306 -#define ESR_PPR 0x04000000 /* Program Exception - Priveleged */
71307 +#define ESR_PPR 0x04000000 /* Program Exception - Privileged */
71308 #define ESR_PTR 0x02000000 /* Program Exception - Trap */
71309 #define ESR_FP 0x01000000 /* Floating Point Operation */
71310 #define ESR_DST 0x00800000 /* Storage Exception - Data miss */
71311 diff -x .git -x .gitignore -Nur linux-2.6.24/include/linux/of.h powerpc.git/include/linux/of.h
71312 --- linux-2.6.24/include/linux/of.h 2008-01-24 23:58:37.000000000 +0100
71313 +++ powerpc.git/include/linux/of.h 2008-01-28 20:26:44.000000000 +0100
71316 #include <linux/types.h>
71317 #include <linux/bitops.h>
71318 +#include <linux/mod_devicetable.h>
71320 #include <asm/prom.h>
71322 @@ -41,11 +42,20 @@
71323 #define for_each_compatible_node(dn, type, compatible) \
71324 for (dn = of_find_compatible_node(NULL, type, compatible); dn; \
71325 dn = of_find_compatible_node(dn, type, compatible))
71326 +extern struct device_node *of_find_matching_node(struct device_node *from,
71327 + const struct of_device_id *matches);
71328 +#define for_each_matching_node(dn, matches) \
71329 + for (dn = of_find_matching_node(NULL, matches); dn; \
71330 + dn = of_find_matching_node(dn, matches))
71331 extern struct device_node *of_find_node_by_path(const char *path);
71332 extern struct device_node *of_find_node_by_phandle(phandle handle);
71333 extern struct device_node *of_get_parent(const struct device_node *node);
71334 extern struct device_node *of_get_next_child(const struct device_node *node,
71335 struct device_node *prev);
71336 +#define for_each_child_of_node(parent, child) \
71337 + for (child = of_get_next_child(parent, NULL); child != NULL; \
71338 + child = of_get_next_child(parent, child))
71340 extern struct property *of_find_property(const struct device_node *np,
71345 extern int of_n_addr_cells(struct device_node *np);
71346 extern int of_n_size_cells(struct device_node *np);
71347 +extern const struct of_device_id *of_match_node(
71348 + const struct of_device_id *matches, const struct device_node *node);
71350 #endif /* _LINUX_OF_H */
71351 diff -x .git -x .gitignore -Nur linux-2.6.24/include/linux/of_device.h powerpc.git/include/linux/of_device.h
71352 --- linux-2.6.24/include/linux/of_device.h 2008-01-24 23:58:37.000000000 +0100
71353 +++ powerpc.git/include/linux/of_device.h 2008-01-28 20:26:44.000000000 +0100
71356 #define to_of_device(d) container_of(d, struct of_device, dev)
71358 -extern const struct of_device_id *of_match_node(
71359 - const struct of_device_id *matches, const struct device_node *node);
71360 extern const struct of_device_id *of_match_device(
71361 const struct of_device_id *matches, const struct of_device *dev);
71363 diff -x .git -x .gitignore -Nur linux-2.6.24/include/linux/pata_platform.h powerpc.git/include/linux/pata_platform.h
71364 --- linux-2.6.24/include/linux/pata_platform.h 2008-01-24 23:58:37.000000000 +0100
71365 +++ powerpc.git/include/linux/pata_platform.h 2008-01-28 20:26:44.000000000 +0100
71367 unsigned int irq_flags;
71370 +extern int __devinit __pata_platform_probe(struct device *dev,
71371 + struct resource *io_res,
71372 + struct resource *ctl_res,
71373 + struct resource *irq_res,
71374 + unsigned int ioport_shift,
71377 +extern int __devexit __pata_platform_remove(struct device *dev);
71379 #endif /* __LINUX_PATA_PLATFORM_H */
71380 diff -x .git -x .gitignore -Nur linux-2.6.24/include/linux/phy_fixed.h powerpc.git/include/linux/phy_fixed.h
71381 --- linux-2.6.24/include/linux/phy_fixed.h 2008-01-24 23:58:37.000000000 +0100
71382 +++ powerpc.git/include/linux/phy_fixed.h 2008-01-28 20:26:44.000000000 +0100
71384 #ifndef __PHY_FIXED_H
71385 #define __PHY_FIXED_H
71387 -#define MII_REGS_NUM 29
71389 -/* max number of virtual phy stuff */
71390 -#define MAX_PHY_AMNT 10
71392 - The idea is to emulate normal phy behavior by responding with
71393 - pre-defined values to mii BMCR read, so that read_status hook could
71394 - take all the needed info.
71397 struct fixed_phy_status {
71408 -/*-----------------------------------------------------------------------------
71409 - * Private information hoder for mii_bus
71410 - *-----------------------------------------------------------------------------*/
71411 -struct fixed_info {
71414 - struct fixed_phy_status phy_status;
71415 - struct phy_device *phydev; /* pointer to the container */
71416 - /* link & speed cb */
71417 - int (*link_update) (struct net_device *, struct fixed_phy_status *);
71418 +#ifdef CONFIG_FIXED_PHY
71419 +extern int fixed_phy_add(unsigned int irq, int phy_id,
71420 + struct fixed_phy_status *status);
71422 +static inline int fixed_phy_add(unsigned int irq, int phy_id,
71423 + struct fixed_phy_status *status)
71427 +#endif /* CONFIG_FIXED_PHY */
71432 -int fixed_mdio_set_link_update(struct phy_device *,
71433 - int (*link_update) (struct net_device *, struct fixed_phy_status *));
71434 -struct fixed_info *fixed_mdio_get_phydev (int phydev_ind);
71436 + * This function issued only by fixed_phy-aware drivers, no need
71437 + * protect it with #ifdef
71439 +extern int fixed_phy_set_link_update(struct phy_device *phydev,
71440 + int (*link_update)(struct net_device *,
71441 + struct fixed_phy_status *));
71443 #endif /* __PHY_FIXED_H */
71444 diff -x .git -x .gitignore -Nur linux-2.6.24/include/linux/pmu.h powerpc.git/include/linux/pmu.h
71445 --- linux-2.6.24/include/linux/pmu.h 2008-01-24 23:58:37.000000000 +0100
71446 +++ powerpc.git/include/linux/pmu.h 2008-01-28 20:26:44.000000000 +0100
71447 @@ -159,41 +159,7 @@
71448 extern int pmu_present(void);
71449 extern int pmu_get_model(void);
71453 - * Stuff for putting the powerbook to sleep and waking it again.
71456 -#include <linux/list.h>
71458 -struct pmu_sleep_notifier
71460 - void (*notifier_call)(struct pmu_sleep_notifier *self, int when);
71462 - struct list_head list;
71465 -/* Code values for calling sleep/wakeup handlers
71467 -#define PBOOK_SLEEP_REQUEST 1
71468 -#define PBOOK_SLEEP_NOW 2
71469 -#define PBOOK_WAKE 3
71471 -/* priority levels in notifiers */
71472 -#define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */
71473 -#define SLEEP_LEVEL_MEDIABAY 90 /* Media bay driver */
71474 -#define SLEEP_LEVEL_BLOCK 80 /* IDE, SCSI */
71475 -#define SLEEP_LEVEL_NET 70 /* bmac, gmac */
71476 -#define SLEEP_LEVEL_MISC 60 /* Anything else */
71477 -#define SLEEP_LEVEL_USERLAND 55 /* Reserved for apm_emu */
71478 -#define SLEEP_LEVEL_ADB 50 /* ADB (async) */
71479 -#define SLEEP_LEVEL_SOUND 40 /* Sound driver (blocking) */
71481 -/* special register notifier functions */
71482 -int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier);
71483 -int pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* notifier);
71485 -#endif /* CONFIG_PM */
71486 +extern void pmu_backlight_set_sleep(int sleep);
71488 #define PMU_MAX_BATTERIES 2