the ds1672 can be detected -- fix the driver and remove unneeded hacks
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.24 / 700-powerpc_git.patch
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
4 @@ -686,6 +686,7 @@
5 See Documentation/isdn/README.HiSax.
6
7 hugepages= [HW,X86-32,IA-64] Maximal number of HugeTLB pages.
8 + hugepagesz= [HW,IA-64,PPC] The size of the HugeTLB pages.
9
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
15 @@ -28,3 +28,6 @@
16 - info on sound support under Linux/PPC
17 zImage_layout.txt
18 - info on the kernel images for Linux/PPC
19 +qe_firmware.txt
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
25 @@ -52,7 +52,11 @@
26 i) Freescale QUICC Engine module (QE)
27 j) CFI or JEDEC memory-mapped NOR flash
28 k) Global Utilities Block
29 - l) Xilinx IP cores
30 + l) Freescale Communications Processor Module
31 + m) Chipselect/Local Bus
32 + n) 4xx/Axon EMAC ethernet nodes
33 + o) Xilinx IP cores
34 + p) Freescale Synchronous Serial Interface
35
36 VII - Specifying interrupt information for devices
37 1) interrupts property
38 @@ -671,10 +675,10 @@
39
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.
50
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
53 @@ -711,13 +715,14 @@
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.
56
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
65 -bus is a list of:
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
68 +of:
69
70 bus address, parent bus address, size
71
72 @@ -735,6 +740,10 @@
73 1/1 format, unless the processor supports physical addresses greater
74 than 32-bits, in which case a 2/1 format is recommended.
75
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.
80
81 2) Note about "compatible" properties
82 -------------------------------------
83 @@ -1218,16 +1227,14 @@
84
85 Required properties:
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"
91
92 Example:
93
94 mdio@24520 {
95 reg = <24520 20>;
96 - device_type = "mdio";
97 - compatible = "gianfar";
98 + compatible = "fsl,gianfar-mdio";
99
100 ethernet-phy@0 {
101 ......
102 @@ -1254,6 +1261,10 @@
103 services interrupts for this device.
104 - phy-handle : The phandle for the PHY connected to this ethernet
105 controller.
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.
110
111 Recommended properties:
112
113 @@ -1408,7 +1419,6 @@
114
115 Example multi port host USB controller device node :
116 usb@22000 {
117 - device_type = "usb";
118 compatible = "fsl-usb2-mph";
119 reg = <22000 1000>;
120 #address-cells = <1>;
121 @@ -1422,7 +1432,6 @@
122
123 Example dual role USB controller device node :
124 usb@23000 {
125 - device_type = "usb";
126 compatible = "fsl-usb2-dr";
127 reg = <23000 1000>;
128 #address-cells = <1>;
129 @@ -1586,7 +1595,6 @@
130 iii) USB (Universal Serial Bus Controller)
131
132 Required properties:
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 @@
138
139 Example(slave):
140 usb@6c0 {
141 - device_type = "usb";
142 compatible = "qe_udc";
143 reg = <6c0 40>;
144 interrupts = <8b 0>;
145 @@ -1613,7 +1620,7 @@
146
147 Required properties:
148 - device_type : should be "network", "hldc", "uart", "transparent"
149 - "bisync" or "atm".
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 @@
182 };
183 };
184
185 + viii) Uploaded QE firmware
186 +
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.
191 +
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.
202 +
203 + Example:
204 +
205 + firmware {
206 + id = "Soft-UART";
207 + extended-modes = <0 0>;
208 + virtual-traps = <0 0 0 0 0 0 0 0>;
209 + }
210 +
211 j) CFI or JEDEC memory-mapped NOR flash
212
213 Flash chips (Memory Technology Devices) are often used for solid state
214 @@ -2075,8 +2128,7 @@
215
216 Example:
217 localbus@f0010100 {
218 - compatible = "fsl,mpc8272ads-localbus",
219 - "fsl,mpc8272-localbus",
220 + compatible = "fsl,mpc8272-localbus",
221 "fsl,pq2-localbus";
222 #address-cells = <2>;
223 #size-cells = <1>;
224 @@ -2254,7 +2306,7 @@
225 available.
226 For Axon: 0x0000012a
227
228 - l) Xilinx IP cores
229 + o) Xilinx IP cores
230
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:
236
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)>;
244 };
245
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).
261
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 @@
265
266 becomes the following device tree node:
267
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>;
280 };
281
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
291 - design.
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.
305
306 BEGIN opb_ps2_dual_ref
307 PARAMETER INSTANCE = opb_ps2_dual_ref_0
308 @@ -2370,21 +2428,24 @@
309
310 It would result in the following device tree nodes:
311
312 - opb_ps2_dual_ref_0@a9000000 {
313 + opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {
314 + #address-cells = <1>;
315 + #size-cells = <1>;
316 + compatible = "xlnx,compound";
317 ranges = <0 a9000000 2000>;
318 // If this device had extra parameters, then they would
319 // go here.
320 ps2@0 {
321 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
322 reg = <0 40>;
323 - interrupt-parent = <&opb-intc>;
324 + interrupt-parent = <&opb_intc_0>;
325 interrupts = <3 0>;
326 cell-index = <0>;
327 };
328 ps2@1000 {
329 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
330 reg = <1000 40>;
331 - interrupt-parent = <&opb-intc>;
332 + interrupt-parent = <&opb_intc_0>;
333 interrupts = <3 0>;
334 cell-index = <0>;
335 };
336 @@ -2447,17 +2508,18 @@
337
338 Gives this device tree (some properties removed for clarity):
339
340 - plb-v34-0 {
341 + plb@0 {
342 #address-cells = <1>;
343 #size-cells = <1>;
344 + compatible = "xlnx,plb-v34-1.02.a";
345 device_type = "ibm,plb";
346 ranges; // 1:1 translation
347
348 - plb-bram-if-cntrl-0@ffff0000 {
349 + plb_bram_if_cntrl_0: bram@ffff0000 {
350 reg = <ffff0000 10000>;
351 }
352
353 - opb-v20-0 {
354 + opb@20000000 {
355 #address-cells = <1>;
356 #size-cells = <1>;
357 ranges = <20000000 20000000 20000000
358 @@ -2465,11 +2527,11 @@
359 80000000 80000000 40000000
360 c0000000 c0000000 20000000>;
361
362 - opb-uart16550-0@a0000000 {
363 + opb_uart16550_0: serial@a0000000 {
364 reg = <a00000000 2000>;
365 };
366
367 - opb-intc-0@d1000fc0 {
368 + opb_intc_0: interrupt-controller@d1000fc0 {
369 reg = <d1000fc0 20>;
370 };
371 };
372 @@ -2514,6 +2576,46 @@
373 Requred properties:
374 - current-speed : Baud rate of uartlite
375
376 + p) Freescale Synchronous Serial Interface
377 +
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.
380 +
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
390 + have.
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
402 +
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.
407 +
408 + Child 'codec' node required properties:
409 + - compatible : compatible list, contains the name of the codec
410 +
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.
414 +
415 +
416 More devices will be defined as this spec matures.
417
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
422 @@ -0,0 +1,295 @@
423 + Freescale QUICC Engine Firmware Uploading
424 + -----------------------------------------
425 +
426 +(c) 2007 Timur Tabi <timur at freescale.com>,
427 + Freescale Semiconductor
428 +
429 +Table of Contents
430 +=================
431 +
432 + I - Software License for Firmware
433 +
434 + II - Microcode Availability
435 +
436 + III - Description and Terminology
437 +
438 + IV - Microcode Programming Details
439 +
440 + V - Firmware Structure Layout
441 +
442 + VI - Sample Code for Creating Firmware Files
443 +
444 +Revision Information
445 +====================
446 +
447 +November 30, 2007: Rev 1.0 - Initial version
448 +
449 +I - Software License for Firmware
450 +=================================
451 +
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
454 +the firmware.
455 +
456 +II - Microcode Availability
457 +===========================
458 +
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.
462 +
463 +III - Description and Terminology
464 +================================
465 +
466 +In this document, the term 'microcode' refers to the sequence of 32-bit
467 +integers that compose the actual QE microcode.
468 +
469 +The term 'firmware' refers to a binary blob that contains the microcode as
470 +well as other data that
471 +
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
476 +
477 +Firmware files are binary files that contain only a firmware.
478 +
479 +IV - Microcode Programming Details
480 +===================================
481 +
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.
485 +
486 +QE microcode is uploaded using the following procedure:
487 +
488 +1) The microcode is placed into I-RAM at a specific location, using the
489 + IRAM.IADD and IRAM.IDATA registers.
490 +
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.
496 +
497 +3) The TIBCR trap registers are loaded with the addresses of the trap handlers
498 + in the microcode.
499 +
500 +4) The RSP.ECCR register is programmed with the value provided.
501 +
502 +5) If necessary, device drivers that need the virtual traps and extended mode
503 + data will use them.
504 +
505 +Virtual Microcode Traps
506 +
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.
512 +
513 +This structure contains 6 words that the application should copy to some
514 +specific been defined. This table describes the structure.
515 +
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 + ---------------------------------------------------------------
537 +
538 +
539 +Extended Modes
540 +
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:
545 +
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 + -----------------------------------------------------------------------
587 +
588 +V - Firmware Structure Layout
589 +==============================
590 +
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.
596 +
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
600 +the microcode.
601 +
602 +All integers are big-endian. See the comments for function
603 +qe_upload_firmware() for up-to-date implementation information.
604 +
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.
609 +
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
613 + present).
614 +
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.
618 +
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.
623 +
624 +The 'id' field is a null-terminated string(suitable for printing) that
625 +identifies the firmware.
626 +
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
630 +SOC.
631 +
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.
637 +
638 +Although it is not recommended, you can specify '0' in the soc.model
639 +field to skip matching SOCs altogether.
640 +
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.
644 +
645 +For example, to match the 8323, revision 1.0:
646 + soc.model = 8323
647 + soc.major = 1
648 + soc.minor = 0
649 +
650 +'padding' is neccessary for structure alignment. This field ensures that the
651 +'extended_modes' field is aligned on a 64-bit boundary.
652 +
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().
657 +
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().
661 +
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.
665 +
666 + The 'id' field is a null-terminated string suitable for printing that
667 + identifies this particular microcode.
668 +
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.
674 +
675 + 'eccr' is the value to program into the ECCR register.
676 +
677 + 'iram_offset' is the offset into IRAM to start writing the
678 + microcode.
679 +
680 + 'count' is the number of 32-bit words in the microcode.
681 +
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'
685 + array.
686 +
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.
690 +
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
695 + 'reserved'.
696 +
697 +After the last microcode is a 32-bit CRC. It can be calculated using
698 +this algorithm:
699 +
700 +u32 crc32(const u8 *p, unsigned int len)
701 +{
702 + unsigned int i;
703 + u32 crc = 0;
704 +
705 + while (len--) {
706 + crc ^= *p++;
707 + for (i = 0; i < 8; i++)
708 + crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0);
709 + }
710 + return crc;
711 +}
712 +
713 +VI - Sample Code for Creating Firmware Files
714 +============================================
715 +
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
721 @@ -140,6 +140,9 @@
722 Used to allow a board to specify it wants a uImage built by default
723 default n
724
725 +config REDBOOT
726 + bool
727 +
728 config PPC64_SWSUSP
729 bool
730 depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL))
731 @@ -160,11 +163,13 @@
732
733 config PPC_OF_PLATFORM_PCI
734 bool
735 + depends on PCI
736 depends on PPC64 # not supported on 32 bits yet
737 default n
738
739 source "init/Kconfig"
740
741 +source "arch/powerpc/sysdev/Kconfig"
742 source "arch/powerpc/platforms/Kconfig"
743
744 menu "Kernel options"
745 @@ -417,7 +422,7 @@
746
747 config ISA_DMA_API
748 bool
749 - default y
750 + default !PPC_ISERIES || PCI
751
752 menu "Bus options"
753
754 @@ -467,7 +472,7 @@
755 config PCI
756 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
757 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
758 - || PPC_PS3
759 + || PPC_PS3 || 44x
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
766 @@ -151,6 +151,13 @@
767
768 config PPC_EARLY_DEBUG
769 bool "Early debugging (dangerous)"
770 + help
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
777
778 choice
779 prompt "Early debugging console"
780 @@ -218,7 +225,16 @@
781 depends on 44x
782 help
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.
787 +
788 +config PPC_EARLY_DEBUG_40x
789 + bool "Early serial debugging for IBM/AMCC 40x CPUs"
790 + depends on 40x
791 + help
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.
795
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
801 default "0x40000200"
802 + help
803 + You probably want 0x40000200 for ebony boards and
804 + 0x40000300 for taishan
805
806 config PPC_EARLY_DEBUG_44x_PHYSHIGH
807 hex "EPRN of early debug UART physical address"
808 depends on PPC_EARLY_DEBUG_44x
809 default "0x1"
810
811 +config PPC_EARLY_DEBUG_40x_PHYSADDR
812 + hex "Early debug UART physical address"
813 + depends on PPC_EARLY_DEBUG_40x
814 + default "0xef600300"
815 +
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
822 @@ -167,6 +167,9 @@
823 $(BOOT_TARGETS): vmlinux
824 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
825
826 +bootwrapper_install:
827 + $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
828 +
829 define archhelp
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
835 @@ -22,16 +22,14 @@
836 #include "dcr.h"
837
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)
841 {
842 int i;
843 unsigned long memsize, bank_config;
844
845 memsize = 0;
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);
849 -
850 + bank_config = SDRAM0_READ(sdram_bxcr[i]);
851 if (bank_config & SDRAM_CONFIG_BANK_ENABLE)
852 memsize += SDRAM_CONFIG_BANK_SIZE(bank_config);
853 }
854 @@ -39,6 +37,69 @@
855 dt_fixup_memory(0, memsize);
856 }
857
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
863 +
864 +static u64 ibm440spe_decode_bas(u32 bas)
865 +{
866 + u64 base = ((u64)(bas & 0xFFE00000u)) << 2;
867 +
868 + /* open coded because I'm paranoid about invalid values */
869 + switch ((bas >> 4) & 0xFFF) {
870 + case 0:
871 + return 0;
872 + case 0xffc:
873 + return base + 0x000800000ull;
874 + case 0xff8:
875 + return base + 0x001000000ull;
876 + case 0xff0:
877 + return base + 0x002000000ull;
878 + case 0xfe0:
879 + return base + 0x004000000ull;
880 + case 0xfc0:
881 + return base + 0x008000000ull;
882 + case 0xf80:
883 + return base + 0x010000000ull;
884 + case 0xf00:
885 + return base + 0x020000000ull;
886 + case 0xe00:
887 + return base + 0x040000000ull;
888 + case 0xc00:
889 + return base + 0x080000000ull;
890 + case 0x800:
891 + return base + 0x100000000ull;
892 + }
893 + printf("Memory BAS value 0x%08x unsupported !\n", bas);
894 + return 0;
895 +}
896 +
897 +void ibm440spe_fixup_memsize(void)
898 +{
899 + u64 banktop, memsize = 0;
900 +
901 + /* Ultimately, we should directly construct the memory node
902 + * so we are able to handle holes in the memory address space
903 + */
904 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B0BAS));
905 + if (banktop > memsize)
906 + memsize = banktop;
907 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B1BAS));
908 + if (banktop > memsize)
909 + memsize = banktop;
910 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B2BAS));
911 + if (banktop > memsize)
912 + memsize = banktop;
913 + banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B3BAS));
914 + if (banktop > memsize)
915 + memsize = banktop;
916 +
917 + dt_fixup_memory(0, memsize);
918 +}
919 +
920 +
921 /* 4xx DDR1/2 Denali memory controller support */
922 /* DDR0 registers */
923 #define DDR0_02 2
924 @@ -77,19 +138,13 @@
925
926 #define DDR_GET_VAL(val, mask, shift) (((val) >> (shift)) & (mask))
927
928 -static inline u32 mfdcr_sdram0(u32 reg)
929 -{
930 - mtdcr(DCRN_SDRAM0_CFGADDR, reg);
931 - return mfdcr(DCRN_SDRAM0_CFGDATA);
932 -}
933 -
934 void ibm4xx_denali_fixup_memsize(void)
935 {
936 u32 val, max_cs, max_col, max_row;
937 u32 cs, col, row, bank, dpath;
938 unsigned long memsize;
939
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");
944
945 @@ -99,12 +154,12 @@
946 max_row = DDR_GET_VAL(val, DDR_MAX_ROW_REG, DDR_MAX_ROW_REG_SHIFT);
947
948 /* get CS value */
949 - val = mfdcr_sdram0(DDR0_10);
950 + val = SDRAM0_READ(DDR0_10);
951
952 val = DDR_GET_VAL(val, DDR_CS_MAP, DDR_CS_MAP_SHIFT);
953 cs = 0;
954 while (val) {
955 - if (val && 0x1)
956 + if (val & 0x1)
957 cs++;
958 val = val >> 1;
959 }
960 @@ -115,15 +170,15 @@
961 fatal("DDR wrong CS configuration\n");
962
963 /* get data path bytes */
964 - val = mfdcr_sdram0(DDR0_14);
965 + val = SDRAM0_READ(DDR0_14);
966
967 if (DDR_GET_VAL(val, DDR_REDUC, DDR_REDUC_SHIFT))
968 dpath = 8; /* 64 bits */
969 else
970 dpath = 4; /* 32 bits */
971
972 - /* get adress pins (rows) */
973 - val = mfdcr_sdram0(DDR0_42);
974 + /* get address pins (rows) */
975 + val = SDRAM0_READ(DDR0_42);
976
977 row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT);
978 if (row > max_row)
979 @@ -131,7 +186,7 @@
980 row = max_row - row;
981
982 /* get collomn size and banks */
983 - val = mfdcr_sdram0(DDR0_43);
984 + val = SDRAM0_READ(DDR0_43);
985
986 col = DDR_GET_VAL(val, DDR_COL_SZ, DDR_COL_SZ_SHIFT);
987 if (col > max_col)
988 @@ -179,13 +234,17 @@
989 #define EMAC_RESET 0x20000000
990 void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1)
991 {
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
994 + * do this for us
995 + */
996 if (emac0)
997 *emac0 = EMAC_RESET;
998 if (emac1)
999 *emac1 = EMAC_RESET;
1000
1001 mtdcr(DCRN_MAL0_CFG, MAL_RESET);
1002 + while (mfdcr(DCRN_MAL0_CFG) & MAL_RESET)
1003 + ; /* loop until reset takes effect */
1004 }
1005
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));
1009 }
1010
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)
1015 {
1016 - u32 cpu, plb, opb, ebc, tb, uart0, m, vco;
1017 - u32 reg;
1018 - u32 fwdva, fwdvb, fbdv, lfbdv, opbdv0, perdv0, spcid0, prbdv0, tmp;
1019 -
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);
1029 -
1030 - mtdcr(DCRN_CPR0_ADDR, CPR0_OPBD0);
1031 - reg = mfdcr(DCRN_CPR0_DATA);
1032 - tmp = (reg & 0x03000000) >> 24;
1033 - opbdv0 = tmp ? tmp : 4;
1034 -
1035 - mtdcr(DCRN_CPR0_ADDR, CPR0_PERD0);
1036 - reg = mfdcr(DCRN_CPR0_DATA);
1037 - tmp = (reg & 0x07000000) >> 24;
1038 - perdv0 = tmp ? tmp : 8;
1039 -
1040 - mtdcr(DCRN_CPR0_ADDR, CPR0_PRIMBD0);
1041 - reg = mfdcr(DCRN_CPR0_DATA);
1042 - tmp = (reg & 0x07000000) >> 24;
1043 - prbdv0 = tmp ? tmp : 8;
1044 -
1045 - mtdcr(DCRN_CPR0_ADDR, CPR0_SCPID);
1046 - reg = mfdcr(DCRN_CPR0_DATA);
1047 - tmp = (reg & 0x03000000) >> 24;
1048 - spcid0 = tmp ? tmp : 4;
1049 -
1050 - /* Calculate M */
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);
1063 +
1064 + if (sys0 & CPC0_SYS0_BYPASS) {
1065 + /* Bypass system PLL */
1066 + cpu = plb = sys_clk;
1067 + } else {
1068 + if (sys0 & CPC0_SYS0_EXTSL)
1069 + /* PerClk */
1070 + m = CPC0_SYS0_FWDVB(sys0) * opdv * epdv;
1071 else
1072 - m = fbdv * lfbdv * fwdvb;
1073 + /* CPU clock */
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);
1077 }
1078 - else if (tmp == 1) /* CPU output */
1079 - m = fbdv * fwdva;
1080 +
1081 + opb = plb / opdv;
1082 + ebc = opb / epdv;
1083 +
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 */
1087 + tb = sys_clk;
1088 else
1089 - m = perdv0 * opbdv0 * fwdvb;
1090 + /* Rev. C 440GP, errata force us to use internal clock */
1091 + tb = cpu;
1092
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 */
1100 + uart0 = ser_clk;
1101 + else
1102 + /* Internal UART clock */
1103 + uart0 = plb / CPC0_CR0_UDIV(cr0);
1104
1105 - /* FIXME */
1106 - uart0 = ser_clk;
1107 + if (cr0 & CPC0_CR0_U1EC)
1108 + /* External UART clock */
1109 + uart1 = ser_clk;
1110 + else
1111 + /* Internal UART clock */
1112 + uart1 = plb / CPC0_CR0_UDIV(cr0);
1113 +
1114 + printf("PPC440GP: SysClk = %dMHz (%x)\n\r",
1115 + (sys_clk + 500000) / 1000000, sys_clk);
1116 +
1117 + dt_fixup_cpu_clocks(cpu, tb, 0);
1118 +
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);
1124 +}
1125 +
1126 +#define SPRN_CCR1 0x378
1127 +
1128 +static inline u32 __fix_zero(u32 v, u32 def)
1129 +{
1130 + return v ? v : def;
1131 +}
1132 +
1133 +static unsigned int __ibm440eplike_fixup_clocks(unsigned int sys_clk,
1134 + unsigned int tmr_clk,
1135 + int per_clk_from_opb)
1136 +{
1137 + /* PLL config */
1138 + u32 pllc = CPR0_READ(DCRN_CPR0_PLLC);
1139 + u32 plld = CPR0_READ(DCRN_CPR0_PLLD);
1140 +
1141 + /* Dividers */
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);
1150 +
1151 + /* Input clocks for primary dividers */
1152 + u32 clk_a, clk_b;
1153 +
1154 + /* Resulting clocks */
1155 + u32 cpu, plb, opb, ebc, vco;
1156 +
1157 + /* Timebase */
1158 + u32 ccr1, tb = tmr_clk;
1159 +
1160 + if (pllc & 0x40000000) {
1161 + u32 m;
1162 +
1163 + /* Feedback path */
1164 + switch ((pllc >> 24) & 7) {
1165 + case 0:
1166 + /* PLLOUTx */
1167 + m = ((pllc & 0x20000000) ? fwdvb : fwdva) * lfbdv;
1168 + break;
1169 + case 1:
1170 + /* CPU */
1171 + m = fwdva * pradv0;
1172 + break;
1173 + case 5:
1174 + /* PERClk */
1175 + m = fwdvb * prbdv0 * opbdv0 * perdv0;
1176 + break;
1177 + default:
1178 + printf("WARNING ! Invalid PLL feedback source !\n");
1179 + goto bypass;
1180 + }
1181 + m *= fbdv;
1182 + vco = sys_clk * m;
1183 + clk_a = vco / fwdva;
1184 + clk_b = vco / fwdvb;
1185 + } else {
1186 +bypass:
1187 + /* Bypass system PLL */
1188 + vco = 0;
1189 + clk_a = clk_b = sys_clk;
1190 + }
1191 +
1192 + cpu = clk_a / pradv0;
1193 + plb = clk_b / prbdv0;
1194 + opb = plb / opbdv0;
1195 + ebc = (per_clk_from_opb ? opb : plb) / perdv0;
1196
1197 /* Figure out timebase. Either CPU or default TmrClk */
1198 - asm volatile (
1199 - "mfspr %0,%1\n"
1200 - :
1201 - "=&r"(reg) : "i"(SPRN_CCR1));
1202 - if (reg & 0x0080)
1203 - tb = 25000000; /* TmrClk is 25MHz */
1204 - else
1205 + ccr1 = mfspr(SPRN_CCR1);
1206 +
1207 + /* If passed a 0 tmr_clk, force CPU clock */
1208 + if (tb == 0) {
1209 + ccr1 &= ~0x80u;
1210 + mtspr(SPRN_CCR1, ccr1);
1211 + }
1212 + if ((ccr1 & 0x0080) == 0)
1213 tb = cpu;
1214
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);
1219 +
1220 + return plb;
1221 +}
1222 +
1223 +static void eplike_fixup_uart_clk(int index, const char *path,
1224 + unsigned int ser_clk,
1225 + unsigned int plb_clk)
1226 +{
1227 + unsigned int sdr;
1228 + unsigned int clock;
1229 +
1230 + switch (index) {
1231 + case 0:
1232 + sdr = SDR0_READ(DCRN_SDR0_UART0);
1233 + break;
1234 + case 1:
1235 + sdr = SDR0_READ(DCRN_SDR0_UART1);
1236 + break;
1237 + case 2:
1238 + sdr = SDR0_READ(DCRN_SDR0_UART2);
1239 + break;
1240 + case 3:
1241 + sdr = SDR0_READ(DCRN_SDR0_UART3);
1242 + break;
1243 + default:
1244 + return;
1245 + }
1246 +
1247 + if (sdr & 0x00800000u)
1248 + clock = ser_clk;
1249 + else
1250 + clock = plb_clk / __fix_zero(sdr & 0xff, 256);
1251 +
1252 + dt_fixup_clock(path, clock);
1253 +}
1254 +
1255 +void ibm440ep_fixup_clocks(unsigned int sys_clk,
1256 + unsigned int ser_clk,
1257 + unsigned int tmr_clk)
1258 +{
1259 + unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 0);
1260 +
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);
1266 +}
1267 +
1268 +void ibm440gx_fixup_clocks(unsigned int sys_clk,
1269 + unsigned int ser_clk,
1270 + unsigned int tmr_clk)
1271 +{
1272 + unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
1273 +
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);
1277 +}
1278 +
1279 +void ibm440spe_fixup_clocks(unsigned int sys_clk,
1280 + unsigned int ser_clk,
1281 + unsigned int tmr_clk)
1282 +{
1283 + unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
1284 +
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);
1289 +}
1290 +
1291 +void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
1292 +{
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;
1299 +
1300 + fwdv = (8 - ((pllmr & 0xe0000000) >> 29));
1301 + fbdv = (pllmr & 0x1e000000) >> 25;
1302 + if (fbdv == 0)
1303 + fbdv = 16;
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;
1309 +
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;
1316 + else
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;
1321 + else
1322 + m = fbdv * fwdv;
1323 + else if (epdv == fbdv)
1324 + m = fbdv * cbdv * epdv;
1325 + else
1326 + m = fbdv * fwdvb * cbdv;
1327 +
1328 + cpu = sys_clk * m / fwdv;
1329 + plb = sys_clk * m / (fwdvb * cbdv);
1330 + } else {
1331 + m = fwdv * fbdv * cbdv;
1332 + cpu = sys_clk * m / fwdv;
1333 + plb = cpu / cbdv;
1334 + }
1335 + opb = plb / opdv;
1336 + ebc = plb / epdv;
1337 +
1338 + if (cpc0_cr0 & 0x80)
1339 + /* uart0 uses the external clock */
1340 + uart0 = ser_clk;
1341 + else
1342 + uart0 = cpu / udiv;
1343 +
1344 + if (cpc0_cr0 & 0x40)
1345 + /* uart1 uses the external clock */
1346 + uart1 = ser_clk;
1347 + else
1348 + uart1 = cpu / udiv;
1349 +
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);
1353 + tb = cpu;
1354 +
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);
1361 +}
1362 +
1363 +
1364 +void ibm405ep_fixup_clocks(unsigned int sys_clk)
1365 +{
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;
1372 +
1373 + fwdva = 8 - ((pllmr1 & 0x00070000) >> 16);
1374 + fwdvb = 8 - ((pllmr1 & 0x00007000) >> 12);
1375 + fbdv = (pllmr1 & 0x00f00000) >> 20;
1376 + if (fbdv == 0)
1377 + fbdv = 16;
1378 +
1379 + cbdv = ((pllmr0 & 0x00030000) >> 16) + 1; /* CPU:PLB */
1380 + epdv = ((pllmr0 & 0x00000300) >> 8) + 2; /* PLB:EBC */
1381 + opdv = ((pllmr0 & 0x00003000) >> 12) + 1; /* PLB:OPB */
1382 +
1383 + m = fbdv * fwdvb;
1384 +
1385 + pllmr0_ccdv = ((pllmr0 & 0x00300000) >> 20) + 1;
1386 + if (pllmr1 & 0x80000000)
1387 + cpu = sys_clk * m / (fwdva * pllmr0_ccdv);
1388 + else
1389 + cpu = sys_clk / pllmr0_ccdv;
1390 +
1391 + plb = cpu / cbdv;
1392 + opb = plb / opdv;
1393 + ebc = plb / epdv;
1394 + tb = cpu;
1395 + uart0 = cpu / (cpc0_ucr & 0x0000007f);
1396 + uart1 = cpu / ((cpc0_ucr & 0x00007f00) >> 8);
1397 +
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);
1407 }
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
1411 @@ -11,12 +11,22 @@
1412 #ifndef _POWERPC_BOOT_4XX_H_
1413 #define _POWERPC_BOOT_4XX_H_
1414
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);
1424 +
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);
1434
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
1439 @@ -33,12 +33,15 @@
1440 BOOTCFLAGS += -fno-stack-protector
1441 endif
1442
1443 -BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
1444 +BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) -I$(srctree)/$(src)/libfdt
1445
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
1451
1452 +
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
1456 @@ -46,17 +49,21 @@
1457 $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \
1458 $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
1459
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 \
1477 + cuboot-warp.c
1478 src-boot := $(src-wlib) $(src-plat) empty.c
1479
1480 src-boot := $(addprefix $(obj)/, $(src-boot))
1481 @@ -101,24 +108,61 @@
1482 cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
1483
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)
1490
1491 $(obj)/wrapper.a: $(obj-wlib) FORCE
1492 $(call if_changed,bootar)
1493
1494 -hostprogs-y := addnote addRamDisk hack-coff mktree
1495 +hostprogs-y := addnote addRamDisk hack-coff mktree dtc
1496
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
1500
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) \
1504 $(wrapper) FORCE
1505
1506 #############
1507 +# Bits for building dtc
1508 +# DTC_GENPARSER := 1 # Uncomment to rebuild flex/bison output
1509 +
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))
1513 +
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
1517 +
1518 +HOSTCFLAGS += -I$(src)/dtc-src/ -I$(src)/libfdt/
1519 +
1520 +targets += dtc-src/dtc-parser.tab.c
1521 +targets += dtc-src/dtc-lexer.lex.c
1522 +
1523 +ifdef DTC_GENPARSER
1524 +BISON = bison
1525 +FLEX = flex
1526 +
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
1531 +
1532 +$(obj)/dtc-src/dtc-parser.tab.c: $(src)/dtc-src/dtc-parser.y FORCE
1533 + $(call if_changed,bison)
1534 +
1535 +$(obj)/dtc-src/dtc-parser.tab.h: $(obj)/dtc-src/dtc-parser.tab.c
1536 +
1537 +$(obj)/dtc-src/dtc-lexer.lex.c: $(src)/dtc-src/dtc-lexer.l FORCE
1538 + $(call if_changed,flex)
1539 +endif
1540 +
1541 +#############
1542 # Bits for building various flavours of zImage
1543
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
1565 +endif
1566 +
1567 +ifneq ($(CONFIG_REDBOOT),"")
1568 +image-$(CONFIG_PPC_8xx) += zImage.redboot-8xx
1569 endif
1570
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))
1576 +
1577 +WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
1578 +WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
1579 +WRAPPER_BINDIR := /usr/sbin
1580 +INSTALL := install
1581 +
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))
1586 +
1587 +all-installed := $(extra-installed) $(hostprogs-installed) $(wrapper-installed) $(dts-installed)
1588 +
1589 +quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
1590 + cmd_mkdir = mkdir -p $@
1591 +
1592 +quiet_cmd_install = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,%,$@)
1593 + cmd_install = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,$(obj)/%,$@) $@
1594 +
1595 +quiet_cmd_install_dts = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,dts/%,$@)
1596 + cmd_install_dts = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,$(srctree)/$(obj)/dts/%,$@) $@
1597 +
1598 +quiet_cmd_install_exe = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@)
1599 + cmd_install_exe = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(obj)/%,$@) $@
1600 +
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)%' \
1605 +
1606 +
1607 +$(DESTDIR)$(WRAPPER_OBJDIR) $(DESTDIR)$(WRAPPER_DTSDIR) $(DESTDIR)$(WRAPPER_BINDIR):
1608 + $(call cmd,mkdir)
1609 +
1610 +$(extra-installed) : $(DESTDIR)$(WRAPPER_OBJDIR)/% : $(obj)/% | $(DESTDIR)$(WRAPPER_OBJDIR)
1611 + $(call cmd,install)
1612 +
1613 +$(hostprogs-installed) : $(DESTDIR)$(WRAPPER_BINDIR)/% : $(obj)/% | $(DESTDIR)$(WRAPPER_BINDIR)
1614 + $(call cmd,install_exe)
1615 +
1616 +$(dts-installed) : $(DESTDIR)$(WRAPPER_DTSDIR)/% : $(srctree)/$(obj)/dts/% | $(DESTDIR)$(WRAPPER_DTSDIR)
1617 + $(call cmd,install_dts)
1618 +
1619 +$(wrapper-installed): $(DESTDIR)$(WRAPPER_BINDIR) $(srctree)/$(obj)/wrapper | $(DESTDIR)$(WRAPPER_BINDIR)
1620 + $(call cmd,install_wrapper)
1621 +
1622 +$(obj)/bootwrapper_install: $(all-installed)
1623 +
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
1627 @@ -30,8 +30,8 @@
1628 {
1629 unsigned long sysclk = 33333333;
1630
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);
1637 }
1638 @@ -42,6 +42,6 @@
1639 platform_ops.exit = ibm44x_dbcr_reset;
1640 bamboo_mac0 = mac0;
1641 bamboo_mac1 = mac1;
1642 - ft_init(_dtb_start, 0, 32);
1643 + fdt_init(_dtb_start);
1644 serial_console_init();
1645 }
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
1649 @@ -53,7 +53,7 @@
1650 unsigned long r6, unsigned long r7)
1651 {
1652 CUBOOT_INIT();
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;
1657 }
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
1661 @@ -0,0 +1,53 @@
1662 +/*
1663 + * Old U-boot compatibility for 824x
1664 + *
1665 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
1666 + *
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.
1670 + */
1671 +
1672 +#include "ops.h"
1673 +#include "stdio.h"
1674 +#include "cuboot.h"
1675 +
1676 +#define TARGET_824x
1677 +#include "ppcboot.h"
1678 +
1679 +static bd_t bd;
1680 +
1681 +
1682 +static void platform_fixups(void)
1683 +{
1684 + void *soc;
1685 +
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);
1689 +
1690 + soc = find_node_by_devtype(NULL, "soc");
1691 + if (soc) {
1692 + void *serial = NULL;
1693 +
1694 + setprop(soc, "bus-frequency", &bd.bi_busfreq,
1695 + sizeof(bd.bi_busfreq));
1696 +
1697 + while ((serial = find_node_by_devtype(serial, "serial"))) {
1698 + if (get_parent(serial) != soc)
1699 + continue;
1700 +
1701 + setprop(serial, "clock-frequency", &bd.bi_busfreq,
1702 + sizeof(bd.bi_busfreq));
1703 + }
1704 + }
1705 +}
1706 +
1707 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1708 + unsigned long r6, unsigned long r7)
1709 +{
1710 + CUBOOT_INIT();
1711 + fdt_init(_dtb_start);
1712 + serial_console_init();
1713 + platform_ops.fixups = platform_fixups;
1714 +}
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
1718 @@ -24,7 +24,8 @@
1719 void *soc;
1720
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);
1726
1727 /* Unfortunately, the specific model number is encoded in the
1728 @@ -52,7 +53,7 @@
1729 unsigned long r6, unsigned long r7)
1730 {
1731 CUBOOT_INIT();
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;
1736 }
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
1740 @@ -24,8 +24,9 @@
1741 void *soc;
1742
1743 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
1744 - dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr,
1745 - bd.bi_enet2addr);
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);
1750
1751 /* Unfortunately, the specific model number is encoded in the
1752 @@ -53,7 +54,7 @@
1753 unsigned long r6, unsigned long r7)
1754 {
1755 CUBOOT_INIT();
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;
1760 }
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
1764 @@ -41,7 +41,7 @@
1765 unsigned long r6, unsigned long r7)
1766 {
1767 CUBOOT_INIT();
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;
1772 }
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
1776 @@ -42,7 +42,7 @@
1777 unsigned long r6, unsigned long r7)
1778 {
1779 CUBOOT_INIT();
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;
1784 }
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
1788 @@ -0,0 +1,56 @@
1789 +/*
1790 + * Old U-boot compatibility for Katmai
1791 + *
1792 + * Author: Hugh Blemings <hugh@au.ibm.com>
1793 + *
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.
1799 + *
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.
1803 + */
1804 +
1805 +#include "ops.h"
1806 +#include "stdio.h"
1807 +#include "reg.h"
1808 +#include "dcr.h"
1809 +#include "4xx.h"
1810 +#include "44x.h"
1811 +#include "cuboot.h"
1812 +
1813 +#define TARGET_44x
1814 +#include "ppcboot.h"
1815 +
1816 +static bd_t bd;
1817 +
1818 +BSS_STACK(4096);
1819 +
1820 +static void katmai_fixups(void)
1821 +{
1822 + unsigned long sysclk = 33333000;
1823 +
1824 + /* 440SP Clock logic is all but identical to 440GX
1825 + * so we just use that code for now at least
1826 + */
1827 + ibm440spe_fixup_clocks(sysclk, 6 * 1843200, 0);
1828 +
1829 + ibm440spe_fixup_memsize();
1830 +
1831 + dt_fixup_mac_address(0, bd.bi_enetaddr);
1832 +
1833 + ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
1834 +}
1835 +
1836 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1837 + unsigned long r6, unsigned long r7)
1838 +{
1839 + CUBOOT_INIT();
1840 +
1841 + platform_ops.fixups = katmai_fixups;
1842 + fdt_init(_dtb_start);
1843 + serial_console_init();
1844 +}
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
1848 @@ -255,7 +255,7 @@
1849 unsigned long r6, unsigned long r7)
1850 {
1851 CUBOOT_INIT();
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;
1856 }
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
1860 @@ -0,0 +1,56 @@
1861 +/*
1862 + * Old U-boot compatibility for Rainier
1863 + *
1864 + * Valentine Barshak <vbarshak@ru.mvista.com>
1865 + * Copyright 2007 MontaVista Software, Inc
1866 + *
1867 + * Based on Ebony code by David Gibson <david@gibson.dropbear.id.au>
1868 + * Copyright IBM Corporation, 2007
1869 + *
1870 + * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com>
1871 + * Copyright IBM Corporation, 2007
1872 + *
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
1876 + */
1877 +
1878 +#include <stdarg.h>
1879 +#include <stddef.h>
1880 +#include "types.h"
1881 +#include "elf.h"
1882 +#include "string.h"
1883 +#include "stdio.h"
1884 +#include "page.h"
1885 +#include "ops.h"
1886 +#include "dcr.h"
1887 +#include "4xx.h"
1888 +#include "44x.h"
1889 +#include "cuboot.h"
1890 +
1891 +#define TARGET_4xx
1892 +#define TARGET_44x
1893 +#include "ppcboot.h"
1894 +
1895 +static bd_t bd;
1896 +
1897 +
1898 +static void rainier_fixups(void)
1899 +{
1900 + unsigned long sysclk = 33333333;
1901 +
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);
1906 +}
1907 +
1908 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1909 + unsigned long r6, unsigned long r7)
1910 +{
1911 + CUBOOT_INIT();
1912 + platform_ops.fixups = rainier_fixups;
1913 + platform_ops.exit = ibm44x_dbcr_reset;
1914 + fdt_init(_dtb_start);
1915 + serial_console_init();
1916 +}
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
1920 @@ -39,7 +39,7 @@
1921 {
1922 unsigned long sysclk = 33333333;
1923
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);
1929 @@ -51,6 +51,6 @@
1930 CUBOOT_INIT();
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();
1936 }
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
1940 @@ -0,0 +1,54 @@
1941 +/*
1942 + * Old U-boot compatibility for Taishan
1943 + *
1944 + * Author: Hugh Blemings <hugh@au.ibm.com>
1945 + *
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.
1951 + *
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.
1955 + */
1956 +
1957 +#include "ops.h"
1958 +#include "stdio.h"
1959 +#include "cuboot.h"
1960 +#include "reg.h"
1961 +#include "dcr.h"
1962 +#include "4xx.h"
1963 +
1964 +#define TARGET_44x
1965 +#include "ppcboot.h"
1966 +
1967 +static bd_t bd;
1968 +
1969 +BSS_STACK(4096);
1970 +
1971 +static void taishan_fixups(void)
1972 +{
1973 + /* FIXME: sysclk should be derived by reading the FPGA
1974 + registers */
1975 + unsigned long sysclk = 33000000;
1976 +
1977 + ibm440gx_fixup_clocks(sysclk, 6 * 1843200, 25000000);
1978 +
1979 + ibm4xx_sdram_fixup_memsize();
1980 +
1981 + dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
1982 +
1983 + ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
1984 +}
1985 +
1986 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1987 + unsigned long r6, unsigned long r7)
1988 +{
1989 + CUBOOT_INIT();
1990 +
1991 + platform_ops.fixups = taishan_fixups;
1992 + fdt_init(_dtb_start);
1993 + serial_console_init();
1994 +}
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
1998 @@ -0,0 +1,39 @@
1999 +/*
2000 + * Copyright (c) 2008 PIKA Technologies
2001 + * Sean MacLennan <smaclennan@pikatech.com>
2002 + *
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.
2006 + */
2007 +
2008 +#include "ops.h"
2009 +#include "4xx.h"
2010 +#include "cuboot.h"
2011 +
2012 +#define TARGET_44x
2013 +#include "ppcboot.h"
2014 +
2015 +static bd_t bd;
2016 +
2017 +static void warp_fixups(void)
2018 +{
2019 + unsigned long sysclk = 66000000;
2020 +
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);
2025 +}
2026 +
2027 +
2028 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
2029 + unsigned long r6, unsigned long r7)
2030 +{
2031 + CUBOOT_INIT();
2032 +
2033 + platform_ops.fixups = warp_fixups;
2034 + platform_ops.exit = ibm44x_dbcr_reset;
2035 + fdt_init(_dtb_start);
2036 + serial_console_init();
2037 +}
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
2041 @@ -14,12 +14,20 @@
2042 #define DCRN_SDRAM0_CFGADDR 0x010
2043 #define DCRN_SDRAM0_CFGDATA 0x011
2044
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); })
2051 +
2052 #define SDRAM0_B0CR 0x40
2053 #define SDRAM0_B1CR 0x44
2054 #define SDRAM0_B2CR 0x48
2055 #define SDRAM0_B3CR 0x4c
2056
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 };
2060
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
2068 +
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
2073 +
2074 +/* 440GX Clock control etc */
2075 +
2076 +
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
2085 +
2086 +#define DCRN_SDR0_CONFIG_ADDR 0xe
2087 +#define DCRN_SDR0_CONFIG_DATA 0xf
2088 +
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); })
2096 +
2097 +#define DCRN_SDR0_UART0 0x0120
2098 +#define DCRN_SDR0_UART1 0x0121
2099 +#define DCRN_SDR0_UART2 0x0122
2100 +#define DCRN_SDR0_UART3 0x0123
2101 +
2102 +
2103 +/* CPRs read/write helper macros - based off include/asm-ppc/ibm44x.h */
2104 +
2105 +#define DCRN_CPR0_CFGADDR 0xc
2106 +#define DCRN_CPR0_CFGDATA 0xd
2107 +
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); })
2114 +
2115 +
2116
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
2121 @@ -88,6 +88,20 @@
2122 }
2123 }
2124
2125 +void dt_fixup_mac_address_by_alias(const char *alias, const u8 *addr)
2126 +{
2127 + void *devp = find_node_by_alias(alias);
2128 +
2129 + if (devp) {
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]);
2134 +
2135 + setprop(devp, "local-mac-address", addr, 6);
2136 + }
2137 +}
2138 +
2139 void dt_fixup_mac_address(u32 index, const u8 *addr)
2140 {
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
2145 @@ -0,0 +1,25 @@
2146 +# Makefile.dtc
2147 +#
2148 +# This is not a complete Makefile of itself. Instead, it is designed to
2149 +# be easily embeddable into other systems of Makefiles.
2150 +#
2151 +DTC_SRCS = dtc.c flattree.c fstree.c data.c livetree.c treesource.c srcpos.c \
2152 + checks.c
2153 +DTC_EXTRA = dtc.h srcpos.h
2154 +DTC_LEXFILES = dtc-lexer.l
2155 +DTC_BISONFILES = dtc-parser.y
2156 +
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)
2160 +
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)
2164 +
2165 +DTC_CLEANFILES = $(DTC_GEN_ALL)
2166 +
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
2169 +
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
2174 @@ -0,0 +1,750 @@
2175 +/*
2176 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2007.
2177 + *
2178 + *
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.
2183 + *
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.
2188 + *
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
2192 + * USA
2193 + */
2194 +
2195 +#include "dtc.h"
2196 +
2197 +#ifdef TRACE_CHECKS
2198 +#define TRACE(c, ...) \
2199 + do { \
2200 + fprintf(stderr, "=== %s: ", (c)->name); \
2201 + fprintf(stderr, __VA_ARGS__); \
2202 + fprintf(stderr, "\n"); \
2203 + } while (0)
2204 +#else
2205 +#define TRACE(c, fmt, ...) do { } while (0)
2206 +#endif
2207 +
2208 +enum checklevel {
2209 + IGNORE = 0,
2210 + WARN = 1,
2211 + ERROR = 2,
2212 +};
2213 +
2214 +enum checkstatus {
2215 + UNCHECKED = 0,
2216 + PREREQ,
2217 + PASSED,
2218 + FAILED,
2219 +};
2220 +
2221 +struct check;
2222 +
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);
2227 +
2228 +struct check {
2229 + const char *name;
2230 + tree_check_fn tree_fn;
2231 + node_check_fn node_fn;
2232 + prop_check_fn prop_fn;
2233 + void *data;
2234 + enum checklevel level;
2235 + enum checkstatus status;
2236 + int inprogress;
2237 + int num_prereqs;
2238 + struct check **prereq;
2239 +};
2240 +
2241 +#define CHECK(nm, tfn, nfn, pfn, d, lvl, ...) \
2242 + static struct check *nm##_prereqs[] = { __VA_ARGS__ }; \
2243 + static struct check nm = { \
2244 + .name = #nm, \
2245 + .tree_fn = (tfn), \
2246 + .node_fn = (nfn), \
2247 + .prop_fn = (pfn), \
2248 + .data = (d), \
2249 + .level = (lvl), \
2250 + .status = UNCHECKED, \
2251 + .num_prereqs = ARRAY_SIZE(nm##_prereqs), \
2252 + .prereq = nm##_prereqs, \
2253 + };
2254 +
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__)
2263 +
2264 +#ifdef __GNUC__
2265 +static inline void check_msg(struct check *c, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
2266 +#endif
2267 +static inline void check_msg(struct check *c, const char *fmt, ...)
2268 +{
2269 + va_list ap;
2270 + va_start(ap, fmt);
2271 +
2272 + if ((c->level < WARN) || (c->level <= quiet))
2273 + return; /* Suppress message */
2274 +
2275 + fprintf(stderr, "%s (%s): ",
2276 + (c->level == ERROR) ? "ERROR" : "Warning", c->name);
2277 + vfprintf(stderr, fmt, ap);
2278 + fprintf(stderr, "\n");
2279 +}
2280 +
2281 +#define FAIL(c, ...) \
2282 + do { \
2283 + TRACE((c), "\t\tFAILED at %s:%d", __FILE__, __LINE__); \
2284 + (c)->status = FAILED; \
2285 + check_msg((c), __VA_ARGS__); \
2286 + } while (0)
2287 +
2288 +static void check_nodes_props(struct check *c, struct node *dt, struct node *node)
2289 +{
2290 + struct node *child;
2291 + struct property *prop;
2292 +
2293 + TRACE(c, "%s", node->fullpath);
2294 + if (c->node_fn)
2295 + c->node_fn(c, dt, node);
2296 +
2297 + if (c->prop_fn)
2298 + for_each_property(node, prop) {
2299 + TRACE(c, "%s\t'%s'", node->fullpath, prop->name);
2300 + c->prop_fn(c, dt, node, prop);
2301 + }
2302 +
2303 + for_each_child(node, child)
2304 + check_nodes_props(c, dt, child);
2305 +}
2306 +
2307 +static int run_check(struct check *c, struct node *dt)
2308 +{
2309 + int error = 0;
2310 + int i;
2311 +
2312 + assert(!c->inprogress);
2313 +
2314 + if (c->status != UNCHECKED)
2315 + goto out;
2316 +
2317 + c->inprogress = 1;
2318 +
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);
2326 + }
2327 + }
2328 +
2329 + if (c->status != UNCHECKED)
2330 + goto out;
2331 +
2332 + if (c->node_fn || c->prop_fn)
2333 + check_nodes_props(c, dt, dt);
2334 +
2335 + if (c->tree_fn)
2336 + c->tree_fn(c, dt);
2337 + if (c->status == UNCHECKED)
2338 + c->status = PASSED;
2339 +
2340 + TRACE(c, "\tCompleted, status %d", c->status);
2341 +
2342 +out:
2343 + c->inprogress = 0;
2344 + if ((c->status != PASSED) && (c->level == ERROR))
2345 + error = 1;
2346 + return error;
2347 +}
2348 +
2349 +/*
2350 + * Utility check functions
2351 + */
2352 +
2353 +static void check_is_string(struct check *c, struct node *root,
2354 + struct node *node)
2355 +{
2356 + struct property *prop;
2357 + char *propname = c->data;
2358 +
2359 + prop = get_property(node, propname);
2360 + if (!prop)
2361 + return; /* Not present, assumed ok */
2362 +
2363 + if (!data_is_one_string(prop->val))
2364 + FAIL(c, "\"%s\" property in %s is not a string",
2365 + propname, node->fullpath);
2366 +}
2367 +#define CHECK_IS_STRING(nm, propname, lvl) \
2368 + CHECK(nm, NULL, check_is_string, NULL, (propname), (lvl))
2369 +
2370 +static void check_is_cell(struct check *c, struct node *root,
2371 + struct node *node)
2372 +{
2373 + struct property *prop;
2374 + char *propname = c->data;
2375 +
2376 + prop = get_property(node, propname);
2377 + if (!prop)
2378 + return; /* Not present, assumed ok */
2379 +
2380 + if (prop->val.len != sizeof(cell_t))
2381 + FAIL(c, "\"%s\" property in %s is not a single cell",
2382 + propname, node->fullpath);
2383 +}
2384 +#define CHECK_IS_CELL(nm, propname, lvl) \
2385 + CHECK(nm, NULL, check_is_cell, NULL, (propname), (lvl))
2386 +
2387 +/*
2388 + * Structural check functions
2389 + */
2390 +
2391 +static void check_duplicate_node_names(struct check *c, struct node *dt,
2392 + struct node *node)
2393 +{
2394 + struct node *child, *child2;
2395 +
2396 + for_each_child(node, child)
2397 + for (child2 = child->next_sibling;
2398 + child2;
2399 + child2 = child2->next_sibling)
2400 + if (streq(child->name, child2->name))
2401 + FAIL(c, "Duplicate node name %s",
2402 + child->fullpath);
2403 +}
2404 +NODE_CHECK(duplicate_node_names, NULL, ERROR);
2405 +
2406 +static void check_duplicate_property_names(struct check *c, struct node *dt,
2407 + struct node *node)
2408 +{
2409 + struct property *prop, *prop2;
2410 +
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);
2416 +}
2417 +NODE_CHECK(duplicate_property_names, NULL, ERROR);
2418 +
2419 +static void check_explicit_phandles(struct check *c, struct node *root,
2420 + struct node *node)
2421 +{
2422 + struct property *prop;
2423 + struct node *other;
2424 + cell_t phandle;
2425 +
2426 + prop = get_property(node, "linux,phandle");
2427 + if (! prop)
2428 + return; /* No phandle, that's fine */
2429 +
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);
2433 + return;
2434 + }
2435 +
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);
2440 + return;
2441 + }
2442 +
2443 + other = get_node_by_phandle(root, phandle);
2444 + if (other) {
2445 + FAIL(c, "%s has duplicated phandle 0x%x (seen before at %s)",
2446 + node->fullpath, phandle, other->fullpath);
2447 + return;
2448 + }
2449 +
2450 + node->phandle = phandle;
2451 +}
2452 +NODE_CHECK(explicit_phandles, NULL, ERROR);
2453 +
2454 +static void check_name_properties(struct check *c, struct node *root,
2455 + struct node *node)
2456 +{
2457 + struct property *prop;
2458 +
2459 + prop = get_property(node, "name");
2460 + if (!prop)
2461 + return; /* No name property, that's fine */
2462 +
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);
2467 +}
2468 +CHECK_IS_STRING(name_is_string, "name", ERROR);
2469 +NODE_CHECK(name_properties, NULL, ERROR, &name_is_string);
2470 +
2471 +/*
2472 + * Reference fixup functions
2473 + */
2474 +
2475 +static void fixup_phandle_references(struct check *c, struct node *dt,
2476 + struct node *node, struct property *prop)
2477 +{
2478 + struct marker *m = prop->val.markers;
2479 + struct node *refnode;
2480 + cell_t phandle;
2481 +
2482 + for_each_marker_of_type(m, REF_PHANDLE) {
2483 + assert(m->offset + sizeof(cell_t) <= prop->val.len);
2484 +
2485 + refnode = get_node_by_ref(dt, m->ref);
2486 + if (! refnode) {
2487 + FAIL(c, "Reference to non-existent node or label \"%s\"\n",
2488 + m->ref);
2489 + continue;
2490 + }
2491 +
2492 + phandle = get_node_phandle(dt, refnode);
2493 + *((cell_t *)(prop->val.val + m->offset)) = cpu_to_be32(phandle);
2494 + }
2495 +}
2496 +CHECK(phandle_references, NULL, NULL, fixup_phandle_references, NULL, ERROR,
2497 + &duplicate_node_names, &explicit_phandles);
2498 +
2499 +static void fixup_path_references(struct check *c, struct node *dt,
2500 + struct node *node, struct property *prop)
2501 +{
2502 + struct marker *m = prop->val.markers;
2503 + struct node *refnode;
2504 + char *path;
2505 +
2506 + for_each_marker_of_type(m, REF_PATH) {
2507 + assert(m->offset <= prop->val.len);
2508 +
2509 + refnode = get_node_by_ref(dt, m->ref);
2510 + if (!refnode) {
2511 + FAIL(c, "Reference to non-existent node or label \"%s\"\n",
2512 + m->ref);
2513 + continue;
2514 + }
2515 +
2516 + path = refnode->fullpath;
2517 + prop->val = data_insert_at_marker(prop->val, m, path,
2518 + strlen(path) + 1);
2519 + }
2520 +}
2521 +CHECK(path_references, NULL, NULL, fixup_path_references, NULL, ERROR,
2522 + &duplicate_node_names);
2523 +
2524 +/*
2525 + * Semantic checks
2526 + */
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);
2530 +
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);
2534 +
2535 +static void fixup_addr_size_cells(struct check *c, struct node *dt,
2536 + struct node *node)
2537 +{
2538 + struct property *prop;
2539 +
2540 + node->addr_cells = -1;
2541 + node->size_cells = -1;
2542 +
2543 + prop = get_property(node, "#address-cells");
2544 + if (prop)
2545 + node->addr_cells = propval_cell(prop);
2546 +
2547 + prop = get_property(node, "#size-cells");
2548 + if (prop)
2549 + node->size_cells = propval_cell(prop);
2550 +}
2551 +CHECK(addr_size_cells, NULL, fixup_addr_size_cells, NULL, NULL, WARN,
2552 + &address_cells_is_cell, &size_cells_is_cell);
2553 +
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)
2558 +
2559 +static void check_reg_format(struct check *c, struct node *dt,
2560 + struct node *node)
2561 +{
2562 + struct property *prop;
2563 + int addr_cells, size_cells, entrylen;
2564 +
2565 + prop = get_property(node, "reg");
2566 + if (!prop)
2567 + return; /* No "reg", that's fine */
2568 +
2569 + if (!node->parent) {
2570 + FAIL(c, "Root node has a \"reg\" property");
2571 + return;
2572 + }
2573 +
2574 + if (prop->val.len == 0)
2575 + FAIL(c, "\"reg\" property in %s is empty", node->fullpath);
2576 +
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);
2580 +
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);
2585 +}
2586 +NODE_CHECK(reg_format, NULL, WARN, &addr_size_cells);
2587 +
2588 +static void check_ranges_format(struct check *c, struct node *dt,
2589 + struct node *node)
2590 +{
2591 + struct property *prop;
2592 + int c_addr_cells, p_addr_cells, c_size_cells, p_size_cells, entrylen;
2593 +
2594 + prop = get_property(node, "ranges");
2595 + if (!prop)
2596 + return;
2597 +
2598 + if (!node->parent) {
2599 + FAIL(c, "Root node has a \"ranges\" property");
2600 + return;
2601 + }
2602 +
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);
2608 +
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,
2614 + p_addr_cells);
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,
2619 + p_size_cells);
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);
2625 + }
2626 +}
2627 +NODE_CHECK(ranges_format, NULL, WARN, &addr_size_cells);
2628 +
2629 +/*
2630 + * Style checks
2631 + */
2632 +static void check_avoid_default_addr_size(struct check *c, struct node *dt,
2633 + struct node *node)
2634 +{
2635 + struct property *reg, *ranges;
2636 +
2637 + if (!node->parent)
2638 + return; /* Ignore root node */
2639 +
2640 + reg = get_property(node, "reg");
2641 + ranges = get_property(node, "ranges");
2642 +
2643 + if (!reg && !ranges)
2644 + return;
2645 +
2646 + if ((node->parent->addr_cells == -1))
2647 + FAIL(c, "Relying on default #address-cells value for %s",
2648 + node->fullpath);
2649 +
2650 + if ((node->parent->size_cells == -1))
2651 + FAIL(c, "Relying on default #size-cells value for %s",
2652 + node->fullpath);
2653 +}
2654 +NODE_CHECK(avoid_default_addr_size, NULL, WARN, &addr_size_cells);
2655 +
2656 +static void check_obsolete_chosen_interrupt_controller(struct check *c,
2657 + struct node *dt)
2658 +{
2659 + struct node *chosen;
2660 + struct property *prop;
2661 +
2662 + chosen = get_node_by_path(dt, "/chosen");
2663 + if (!chosen)
2664 + return;
2665 +
2666 + prop = get_property(chosen, "interrupt-controller");
2667 + if (prop)
2668 + FAIL(c, "/chosen has obsolete \"interrupt-controller\" "
2669 + "property");
2670 +}
2671 +TREE_CHECK(obsolete_chosen_interrupt_controller, NULL, WARN);
2672 +
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,
2678 +
2679 + &address_cells_is_cell, &size_cells_is_cell, &interrupt_cells_is_cell,
2680 + &device_type_is_string, &model_is_string, &status_is_string,
2681 +
2682 + &addr_size_cells, &reg_format, &ranges_format,
2683 +
2684 + &avoid_default_addr_size,
2685 + &obsolete_chosen_interrupt_controller,
2686 +};
2687 +
2688 +int check_semantics(struct node *dt, int outversion, int boot_cpuid_phys);
2689 +
2690 +void process_checks(int force, struct boot_info *bi,
2691 + int checkflag, int outversion, int boot_cpuid_phys)
2692 +{
2693 + struct node *dt = bi->dt;
2694 + int i;
2695 + int error = 0;
2696 +
2697 + for (i = 0; i < ARRAY_SIZE(check_table); i++) {
2698 + struct check *c = check_table[i];
2699 +
2700 + if (c->level != IGNORE)
2701 + error = error || run_check(c, dt);
2702 + }
2703 +
2704 + if (error) {
2705 + if (!force) {
2706 + fprintf(stderr, "ERROR: Input tree has errors, aborting "
2707 + "(use -f to force output)\n");
2708 + exit(2);
2709 + } else if (quiet < 3) {
2710 + fprintf(stderr, "Warning: Input tree has errors, "
2711 + "output forced\n");
2712 + }
2713 + }
2714 +
2715 + if (checkflag) {
2716 + if (error) {
2717 + fprintf(stderr, "Warning: Skipping semantic checks due to structural errors\n");
2718 + } else {
2719 + if (!check_semantics(bi->dt, outversion,
2720 + boot_cpuid_phys))
2721 + fprintf(stderr, "Warning: Input tree has semantic errors\n");
2722 + }
2723 + }
2724 +}
2725 +
2726 +/*
2727 + * Semantic check functions
2728 + */
2729 +
2730 +#define ERRMSG(...) if (quiet < 2) fprintf(stderr, "ERROR: " __VA_ARGS__)
2731 +#define WARNMSG(...) if (quiet < 1) fprintf(stderr, "Warning: " __VA_ARGS__)
2732 +
2733 +#define DO_ERR(...) do {ERRMSG(__VA_ARGS__); ok = 0; } while (0)
2734 +
2735 +#define CHECK_HAVE(node, propname) \
2736 + do { \
2737 + if (! (prop = get_property((node), (propname)))) \
2738 + DO_ERR("Missing \"%s\" property in %s\n", (propname), \
2739 + (node)->fullpath); \
2740 + } while (0);
2741 +
2742 +#define CHECK_HAVE_WARN(node, propname) \
2743 + do { \
2744 + if (! (prop = get_property((node), (propname)))) \
2745 + WARNMSG("%s has no \"%s\" property\n", \
2746 + (node)->fullpath, (propname)); \
2747 + } while (0)
2748 +
2749 +#define CHECK_HAVE_STRING(node, propname) \
2750 + do { \
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); \
2755 + } while (0)
2756 +
2757 +#define CHECK_HAVE_STREQ(node, propname, value) \
2758 + do { \
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)); \
2764 + } while (0)
2765 +
2766 +#define CHECK_HAVE_ONECELL(node, propname) \
2767 + do { \
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); \
2771 + } while (0)
2772 +
2773 +#define CHECK_HAVE_WARN_ONECELL(node, propname) \
2774 + do { \
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); \
2778 + } while (0)
2779 +
2780 +#define CHECK_HAVE_WARN_PHANDLE(xnode, propname, root) \
2781 + do { \
2782 + struct node *ref; \
2783 + CHECK_HAVE_WARN_ONECELL((xnode), (propname)); \
2784 + if (prop) {\
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); \
2788 + } else { \
2789 + ref = get_node_by_phandle((root), propval_cell(prop)); \
2790 + if (! ref) \
2791 + DO_ERR("\"%s\" property in %s refers to non-existant phandle %x\n", (propname), (xnode)->fullpath, propval_cell(prop)); \
2792 + } \
2793 + } \
2794 + } while (0)
2795 +
2796 +#define CHECK_HAVE_WARN_STRING(node, propname) \
2797 + do { \
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); \
2802 + } while (0)
2803 +
2804 +static int check_root(struct node *root)
2805 +{
2806 + struct property *prop;
2807 + int ok = 1;
2808 +
2809 + CHECK_HAVE_STRING(root, "model");
2810 + CHECK_HAVE_WARN(root, "compatible");
2811 +
2812 + return ok;
2813 +}
2814 +
2815 +static int check_cpus(struct node *root, int outversion, int boot_cpuid_phys)
2816 +{
2817 + struct node *cpus, *cpu;
2818 + struct property *prop;
2819 + struct node *bootcpu = NULL;
2820 + int ok = 1;
2821 +
2822 + cpus = get_subnode(root, "cpus");
2823 + if (! cpus) {
2824 + ERRMSG("Missing /cpus node\n");
2825 + return 0;
2826 + }
2827 +
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);
2834 +
2835 + for_each_child(cpus, cpu) {
2836 + CHECK_HAVE_STREQ(cpu, "device_type", "cpu");
2837 +
2838 + CHECK_HAVE_ONECELL(cpu, "reg");
2839 + if (prop) {
2840 + cell_t unitnum;
2841 + char *eptr;
2842 +
2843 + unitnum = strtol(get_unitname(cpu), &eptr, 16);
2844 + if (*eptr) {
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));
2851 + }
2852 + }
2853 +
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");
2858 +
2859 + CHECK_HAVE_WARN_ONECELL(cpu, "clock-frequency");
2860 + CHECK_HAVE_WARN_ONECELL(cpu, "timebase-frequency");
2861 +
2862 + prop = get_property(cpu, "linux,boot-cpu");
2863 + if (prop) {
2864 + if (prop->val.len)
2865 + WARNMSG("\"linux,boot-cpu\" property in %s is non-empty\n",
2866 + cpu->fullpath);
2867 + if (bootcpu)
2868 + DO_ERR("Multiple boot cpus (%s and %s)\n",
2869 + bootcpu->fullpath, cpu->fullpath);
2870 + else
2871 + bootcpu = cpu;
2872 + }
2873 + }
2874 +
2875 + if (outversion < 2) {
2876 + if (! bootcpu)
2877 + WARNMSG("No cpu has \"linux,boot-cpu\" property\n");
2878 + } else {
2879 + if (bootcpu)
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");
2883 + }
2884 +
2885 + return ok;
2886 +}
2887 +
2888 +static int check_memory(struct node *root)
2889 +{
2890 + struct node *mem;
2891 + struct property *prop;
2892 + int nnodes = 0;
2893 + int ok = 1;
2894 +
2895 + for_each_child(root, mem) {
2896 + if (! strneq(mem->name, "memory", mem->basenamelen))
2897 + continue;
2898 +
2899 + nnodes++;
2900 +
2901 + CHECK_HAVE_STREQ(mem, "device_type", "memory");
2902 + CHECK_HAVE(mem, "reg");
2903 + }
2904 +
2905 + if (nnodes == 0) {
2906 + ERRMSG("No memory nodes\n");
2907 + return 0;
2908 + }
2909 +
2910 + return ok;
2911 +}
2912 +
2913 +int check_semantics(struct node *dt, int outversion, int boot_cpuid_phys)
2914 +{
2915 + int ok = 1;
2916 +
2917 + ok = ok && check_root(dt);
2918 + ok = ok && check_cpus(dt, outversion, boot_cpuid_phys);
2919 + ok = ok && check_memory(dt);
2920 + if (! ok)
2921 + return 0;
2922 +
2923 + return 1;
2924 +}
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
2928 @@ -0,0 +1,321 @@
2929 +/*
2930 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
2931 + *
2932 + *
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.
2937 + *
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.
2942 + *
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
2946 + * USA
2947 + */
2948 +
2949 +#include "dtc.h"
2950 +
2951 +void data_free(struct data d)
2952 +{
2953 + struct marker *m, *nm;
2954 +
2955 + m = d.markers;
2956 + while (m) {
2957 + nm = m->next;
2958 + free(m->ref);
2959 + free(m);
2960 + m = nm;
2961 + }
2962 +
2963 + assert(!d.val || d.asize);
2964 +
2965 + if (d.val)
2966 + free(d.val);
2967 +}
2968 +
2969 +struct data data_grow_for(struct data d, int xlen)
2970 +{
2971 + struct data nd;
2972 + int newsize;
2973 +
2974 + /* we must start with an allocated datum */
2975 + assert(!d.val || d.asize);
2976 +
2977 + if (xlen == 0)
2978 + return d;
2979 +
2980 + nd = d;
2981 +
2982 + newsize = xlen;
2983 +
2984 + while ((d.len + xlen) > newsize)
2985 + newsize *= 2;
2986 +
2987 + nd.asize = newsize;
2988 + nd.val = xrealloc(d.val, newsize);
2989 +
2990 + assert(nd.asize >= (d.len + xlen));
2991 +
2992 + return nd;
2993 +}
2994 +
2995 +struct data data_copy_mem(const char *mem, int len)
2996 +{
2997 + struct data d;
2998 +
2999 + d = data_grow_for(empty_data, len);
3000 +
3001 + d.len = len;
3002 + memcpy(d.val, mem, len);
3003 +
3004 + return d;
3005 +}
3006 +
3007 +static char get_oct_char(const char *s, int *i)
3008 +{
3009 + char x[4];
3010 + char *endx;
3011 + long val;
3012 +
3013 + x[3] = '\0';
3014 + x[0] = s[(*i)];
3015 + if (x[0]) {
3016 + x[1] = s[(*i)+1];
3017 + if (x[1])
3018 + x[2] = s[(*i)+2];
3019 + }
3020 +
3021 + val = strtol(x, &endx, 8);
3022 + if ((endx - x) == 0)
3023 + fprintf(stderr, "Empty \\nnn escape\n");
3024 +
3025 + (*i) += endx - x;
3026 + return val;
3027 +}
3028 +
3029 +static char get_hex_char(const char *s, int *i)
3030 +{
3031 + char x[3];
3032 + char *endx;
3033 + long val;
3034 +
3035 + x[2] = '\0';
3036 + x[0] = s[(*i)];
3037 + if (x[0])
3038 + x[1] = s[(*i)+1];
3039 +
3040 + val = strtol(x, &endx, 16);
3041 + if ((endx - x) == 0)
3042 + fprintf(stderr, "Empty \\x escape\n");
3043 +
3044 + (*i) += endx - x;
3045 + return val;
3046 +}
3047 +
3048 +struct data data_copy_escape_string(const char *s, int len)
3049 +{
3050 + int i = 0;
3051 + struct data d;
3052 + char *q;
3053 +
3054 + d = data_grow_for(empty_data, strlen(s)+1);
3055 +
3056 + q = d.val;
3057 + while (i < len) {
3058 + char c = s[i++];
3059 +
3060 + if (c != '\\') {
3061 + q[d.len++] = c;
3062 + continue;
3063 + }
3064 +
3065 + c = s[i++];
3066 + assert(c);
3067 + switch (c) {
3068 + case 'a':
3069 + q[d.len++] = '\a';
3070 + break;
3071 + case 'b':
3072 + q[d.len++] = '\b';
3073 + break;
3074 + case 't':
3075 + q[d.len++] = '\t';
3076 + break;
3077 + case 'n':
3078 + q[d.len++] = '\n';
3079 + break;
3080 + case 'v':
3081 + q[d.len++] = '\v';
3082 + break;
3083 + case 'f':
3084 + q[d.len++] = '\f';
3085 + break;
3086 + case 'r':
3087 + q[d.len++] = '\r';
3088 + break;
3089 + case '0':
3090 + case '1':
3091 + case '2':
3092 + case '3':
3093 + case '4':
3094 + case '5':
3095 + case '6':
3096 + case '7':
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);
3100 + break;
3101 + case 'x':
3102 + q[d.len++] = get_hex_char(s, &i);
3103 + break;
3104 + default:
3105 + q[d.len++] = c;
3106 + }
3107 + }
3108 +
3109 + q[d.len++] = '\0';
3110 + return d;
3111 +}
3112 +
3113 +struct data data_copy_file(FILE *f, size_t len)
3114 +{
3115 + struct data d;
3116 +
3117 + d = data_grow_for(empty_data, len);
3118 +
3119 + d.len = len;
3120 + fread(d.val, len, 1, f);
3121 +
3122 + return d;
3123 +}
3124 +
3125 +struct data data_append_data(struct data d, const void *p, int len)
3126 +{
3127 + d = data_grow_for(d, len);
3128 + memcpy(d.val + d.len, p, len);
3129 + d.len += len;
3130 + return d;
3131 +}
3132 +
3133 +struct data data_insert_at_marker(struct data d, struct marker *m,
3134 + const void *p, int len)
3135 +{
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);
3139 + d.len += len;
3140 +
3141 + /* Adjust all markers after the one we're inserting at */
3142 + m = m->next;
3143 + for_each_marker(m)
3144 + m->offset += len;
3145 + return d;
3146 +}
3147 +
3148 +struct data data_append_markers(struct data d, struct marker *m)
3149 +{
3150 + struct marker **mp = &d.markers;
3151 +
3152 + /* Find the end of the markerlist */
3153 + while (*mp)
3154 + mp = &((*mp)->next);
3155 + *mp = m;
3156 + return d;
3157 +}
3158 +
3159 +struct data data_merge(struct data d1, struct data d2)
3160 +{
3161 + struct data d;
3162 + struct marker *m2 = d2.markers;
3163 +
3164 + d = data_append_markers(data_append_data(d1, d2.val, d2.len), m2);
3165 +
3166 + /* Adjust for the length of d1 */
3167 + for_each_marker(m2)
3168 + m2->offset += d1.len;
3169 +
3170 + d2.markers = NULL; /* So data_free() doesn't clobber them */
3171 + data_free(d2);
3172 +
3173 + return d;
3174 +}
3175 +
3176 +struct data data_append_cell(struct data d, cell_t word)
3177 +{
3178 + cell_t beword = cpu_to_be32(word);
3179 +
3180 + return data_append_data(d, &beword, sizeof(beword));
3181 +}
3182 +
3183 +struct data data_append_re(struct data d, const struct fdt_reserve_entry *re)
3184 +{
3185 + struct fdt_reserve_entry bere;
3186 +
3187 + bere.address = cpu_to_be64(re->address);
3188 + bere.size = cpu_to_be64(re->size);
3189 +
3190 + return data_append_data(d, &bere, sizeof(bere));
3191 +}
3192 +
3193 +struct data data_append_addr(struct data d, u64 addr)
3194 +{
3195 + u64 beaddr = cpu_to_be64(addr);
3196 +
3197 + return data_append_data(d, &beaddr, sizeof(beaddr));
3198 +}
3199 +
3200 +struct data data_append_byte(struct data d, uint8_t byte)
3201 +{
3202 + return data_append_data(d, &byte, 1);
3203 +}
3204 +
3205 +struct data data_append_zeroes(struct data d, int len)
3206 +{
3207 + d = data_grow_for(d, len);
3208 +
3209 + memset(d.val + d.len, 0, len);
3210 + d.len += len;
3211 + return d;
3212 +}
3213 +
3214 +struct data data_append_align(struct data d, int align)
3215 +{
3216 + int newlen = ALIGN(d.len, align);
3217 + return data_append_zeroes(d, newlen - d.len);
3218 +}
3219 +
3220 +struct data data_add_marker(struct data d, enum markertype type, char *ref)
3221 +{
3222 + struct marker *m;
3223 +
3224 + m = xmalloc(sizeof(*m));
3225 + m->offset = d.len;
3226 + m->type = type;
3227 + m->ref = ref;
3228 + m->next = NULL;
3229 +
3230 + return data_append_markers(d, m);
3231 +}
3232 +
3233 +int data_is_one_string(struct data d)
3234 +{
3235 + int i;
3236 + int len = d.len;
3237 +
3238 + if (len == 0)
3239 + return 0;
3240 +
3241 + for (i = 0; i < len-1; i++)
3242 + if (d.val[i] == '\0')
3243 + return 0;
3244 +
3245 + if (d.val[len-1] != '\0')
3246 + return 0;
3247 +
3248 + return 1;
3249 +}
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
3253 @@ -0,0 +1,328 @@
3254 +/*
3255 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3256 + *
3257 + *
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.
3262 + *
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.
3267 + *
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
3271 + * USA
3272 + */
3273 +
3274 +%option noyywrap nounput yylineno
3275 +
3276 +%x INCLUDE
3277 +%x BYTESTRING
3278 +%x PROPNODENAME
3279 +%s V1
3280 +
3281 +PROPNODECHAR [a-zA-Z0-9,._+*#?@-]
3282 +PATHCHAR ({PROPNODECHAR}|[/])
3283 +LABEL [a-zA-Z_][a-zA-Z0-9_]*
3284 +
3285 +%{
3286 +#include "dtc.h"
3287 +#include "srcpos.h"
3288 +#include "dtc-parser.tab.h"
3289 +
3290 +
3291 +/*#define LEXDEBUG 1*/
3292 +
3293 +#ifdef LEXDEBUG
3294 +#define DPRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
3295 +#else
3296 +#define DPRINT(fmt, ...) do { } while (0)
3297 +#endif
3298 +
3299 +static int dts_version; /* = 0 */
3300 +
3301 +#define BEGIN_DEFAULT() if (dts_version == 0) { \
3302 + DPRINT("<INITIAL>\n"); \
3303 + BEGIN(INITIAL); \
3304 + } else { \
3305 + DPRINT("<V1>\n"); \
3306 + BEGIN(V1); \
3307 + }
3308 +%}
3309 +
3310 +%%
3311 +<*>"/include/" BEGIN(INCLUDE);
3312 +
3313 +<INCLUDE>\"[^"\n]*\" {
3314 + yytext[strlen(yytext) - 1] = 0;
3315 + if (!push_input_file(yytext + 1)) {
3316 + /* Some unrecoverable error.*/
3317 + exit(1);
3318 + }
3319 + BEGIN_DEFAULT();
3320 + }
3321 +
3322 +
3323 +<*><<EOF>> {
3324 + if (!pop_input_file()) {
3325 + yyterminate();
3326 + }
3327 + }
3328 +
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,
3334 + yyleng-2);
3335 + yylloc.first_line = yylineno;
3336 + return DT_STRING;
3337 + }
3338 +
3339 +<*>"/dts-v1/" {
3340 + yylloc.filenum = srcpos_filenum;
3341 + yylloc.first_line = yylineno;
3342 + DPRINT("Keyword: /dts-v1/\n");
3343 + dts_version = 1;
3344 + BEGIN_DEFAULT();
3345 + return DT_V1;
3346 + }
3347 +
3348 +<*>"/memreserve/" {
3349 + yylloc.filenum = srcpos_filenum;
3350 + yylloc.first_line = yylineno;
3351 + DPRINT("Keyword: /memreserve/\n");
3352 + BEGIN_DEFAULT();
3353 + return DT_MEMRESERVE;
3354 + }
3355 +
3356 +<*>{LABEL}: {
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';
3362 + return DT_LABEL;
3363 + }
3364 +
3365 +<INITIAL>[bodh]# {
3366 + yylloc.filenum = srcpos_filenum;
3367 + yylloc.first_line = yylineno;
3368 + if (*yytext == 'b')
3369 + yylval.cbase = 2;
3370 + else if (*yytext == 'o')
3371 + yylval.cbase = 8;
3372 + else if (*yytext == 'd')
3373 + yylval.cbase = 10;
3374 + else
3375 + yylval.cbase = 16;
3376 + DPRINT("Base: %d\n", yylval.cbase);
3377 + return DT_BASE;
3378 + }
3379 +
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;
3386 + }
3387 +
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;
3394 + }
3395 +
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);
3401 + return DT_REF;
3402 + }
3403 +
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);
3410 + return DT_REF;
3411 + }
3412 +
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);
3418 + return DT_REF;
3419 + }
3420 +
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);
3426 + return DT_BYTE;
3427 + }
3428 +
3429 +<BYTESTRING>"]" {
3430 + yylloc.filenum = srcpos_filenum;
3431 + yylloc.first_line = yylineno;
3432 + DPRINT("/BYTESTRING\n");
3433 + BEGIN_DEFAULT();
3434 + return ']';
3435 + }
3436 +
3437 +<PROPNODENAME>{PROPNODECHAR}+ {
3438 + yylloc.filenum = srcpos_filenum;
3439 + yylloc.first_line = yylineno;
3440 + DPRINT("PropNodeName: %s\n", yytext);
3441 + yylval.propnodename = strdup(yytext);
3442 + BEGIN_DEFAULT();
3443 + return DT_PROPNODENAME;
3444 + }
3445 +
3446 +
3447 +<*>[[:space:]]+ /* eat whitespace */
3448 +
3449 +<*>"/*"([^*]|\*+[^*/])*\*+"/" {
3450 + yylloc.filenum = srcpos_filenum;
3451 + yylloc.first_line = yylineno;
3452 + DPRINT("Comment: %s\n", yytext);
3453 + /* eat comments */
3454 + }
3455 +
3456 +<*>"//".*\n /* eat line comments */
3457 +
3458 +<*>. {
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);
3466 + }
3467 + if ((yytext[0] == '{')
3468 + || (yytext[0] == ';')) {
3469 + DPRINT("<PROPNODENAME>\n");
3470 + BEGIN(PROPNODENAME);
3471 + }
3472 + return yytext[0];
3473 + }
3474 +
3475 +%%
3476 +
3477 +
3478 +/*
3479 + * Stack of nested include file contexts.
3480 + */
3481 +
3482 +struct incl_file {
3483 + int filenum;
3484 + FILE *file;
3485 + YY_BUFFER_STATE yy_prev_buf;
3486 + int yy_prev_lineno;
3487 + struct incl_file *prev;
3488 +};
3489 +
3490 +struct incl_file *incl_file_stack;
3491 +
3492 +
3493 +/*
3494 + * Detect infinite include recursion.
3495 + */
3496 +#define MAX_INCLUDE_DEPTH (100)
3497 +
3498 +static int incl_depth = 0;
3499 +
3500 +
3501 +int push_input_file(const char *filename)
3502 +{
3503 + FILE *f;
3504 + struct incl_file *incl_file;
3505 +
3506 + if (!filename) {
3507 + yyerror("No include file name given.");
3508 + return 0;
3509 + }
3510 +
3511 + if (incl_depth++ >= MAX_INCLUDE_DEPTH) {
3512 + yyerror("Includes nested too deeply");
3513 + return 0;
3514 + }
3515 +
3516 + f = dtc_open_file(filename);
3517 +
3518 + incl_file = malloc(sizeof(struct incl_file));
3519 + if (!incl_file) {
3520 + yyerror("Can not allocate include file space.");
3521 + return 0;
3522 + }
3523 +
3524 + /*
3525 + * Save current context.
3526 + */
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;
3532 +
3533 + incl_file_stack = incl_file;
3534 +
3535 + /*
3536 + * Establish new context.
3537 + */
3538 + srcpos_filenum = lookup_file_name(filename, 0);
3539 + yylineno = 1;
3540 + yyin = f;
3541 + yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
3542 +
3543 + return 1;
3544 +}
3545 +
3546 +
3547 +int pop_input_file(void)
3548 +{
3549 + struct incl_file *incl_file;
3550 +
3551 + if (incl_file_stack == 0)
3552 + return 0;
3553 +
3554 + fclose(yyin);
3555 +
3556 + /*
3557 + * Pop.
3558 + */
3559 + --incl_depth;
3560 + incl_file = incl_file_stack;
3561 + incl_file_stack = incl_file->prev;
3562 +
3563 + /*
3564 + * Recover old context.
3565 + */
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;
3571 +
3572 + /*
3573 + * Free old state.
3574 + */
3575 + free(incl_file);
3576 +
3577 + if (YY_CURRENT_BUFFER == 0)
3578 + return 0;
3579 +
3580 + return 1;
3581 +}
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
3585 @@ -0,0 +1,2174 @@
3586 +#line 2 "dtc-lexer.lex.c"
3587 +
3588 +#line 4 "dtc-lexer.lex.c"
3589 +
3590 +#define YY_INT_ALIGNED short int
3591 +
3592 +/* A lexical scanner generated by flex */
3593 +
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
3599 +#define FLEX_BETA
3600 +#endif
3601 +
3602 +/* First, we deal with platform-specific or compiler-specific issues. */
3603 +
3604 +/* begin standard C headers. */
3605 +#include <stdio.h>
3606 +#include <string.h>
3607 +#include <errno.h>
3608 +#include <stdlib.h>
3609 +
3610 +/* end standard C headers. */
3611 +
3612 +/* flex integer type definitions */
3613 +
3614 +#ifndef FLEXINT_H
3615 +#define FLEXINT_H
3616 +
3617 +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
3618 +
3619 +#if __STDC_VERSION__ >= 199901L
3620 +
3621 +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
3622 + * if you want the limit (max/min) macros for int types.
3623 + */
3624 +#ifndef __STDC_LIMIT_MACROS
3625 +#define __STDC_LIMIT_MACROS 1
3626 +#endif
3627 +
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;
3635 +#else
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;
3642 +#endif /* ! C99 */
3643 +
3644 +/* Limits of integral types. */
3645 +#ifndef INT8_MIN
3646 +#define INT8_MIN (-128)
3647 +#endif
3648 +#ifndef INT16_MIN
3649 +#define INT16_MIN (-32767-1)
3650 +#endif
3651 +#ifndef INT32_MIN
3652 +#define INT32_MIN (-2147483647-1)
3653 +#endif
3654 +#ifndef INT8_MAX
3655 +#define INT8_MAX (127)
3656 +#endif
3657 +#ifndef INT16_MAX
3658 +#define INT16_MAX (32767)
3659 +#endif
3660 +#ifndef INT32_MAX
3661 +#define INT32_MAX (2147483647)
3662 +#endif
3663 +#ifndef UINT8_MAX
3664 +#define UINT8_MAX (255U)
3665 +#endif
3666 +#ifndef UINT16_MAX
3667 +#define UINT16_MAX (65535U)
3668 +#endif
3669 +#ifndef UINT32_MAX
3670 +#define UINT32_MAX (4294967295U)
3671 +#endif
3672 +
3673 +#endif /* ! FLEXINT_H */
3674 +
3675 +#ifdef __cplusplus
3676 +
3677 +/* The "const" storage-class-modifier is valid. */
3678 +#define YY_USE_CONST
3679 +
3680 +#else /* ! __cplusplus */
3681 +
3682 +#if __STDC__
3683 +
3684 +#define YY_USE_CONST
3685 +
3686 +#endif /* __STDC__ */
3687 +#endif /* ! __cplusplus */
3688 +
3689 +#ifdef YY_USE_CONST
3690 +#define yyconst const
3691 +#else
3692 +#define yyconst
3693 +#endif
3694 +
3695 +/* Returned upon end-of-file. */
3696 +#define YY_NULL 0
3697 +
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
3701 + * double cast.
3702 + */
3703 +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
3704 +
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.
3708 + */
3709 +#define BEGIN (yy_start) = 1 + 2 *
3710 +
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
3713 + * compatibility.
3714 + */
3715 +#define YY_START (((yy_start) - 1) / 2)
3716 +#define YYSTATE YY_START
3717 +
3718 +/* Action number for EOF rule of a given start state. */
3719 +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
3720 +
3721 +/* Special action meaning "start processing a new file". */
3722 +#define YY_NEW_FILE yyrestart(yyin )
3723 +
3724 +#define YY_END_OF_BUFFER_CHAR 0
3725 +
3726 +/* Size of default input buffer. */
3727 +#ifndef YY_BUF_SIZE
3728 +#define YY_BUF_SIZE 16384
3729 +#endif
3730 +
3731 +/* The state buf must be large enough to hold one state per character in the main buffer.
3732 + */
3733 +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
3734 +
3735 +#ifndef YY_TYPEDEF_YY_BUFFER_STATE
3736 +#define YY_TYPEDEF_YY_BUFFER_STATE
3737 +typedef struct yy_buffer_state *YY_BUFFER_STATE;
3738 +#endif
3739 +
3740 +extern int yyleng;
3741 +
3742 +extern FILE *yyin, *yyout;
3743 +
3744 +#define EOB_ACT_CONTINUE_SCAN 0
3745 +#define EOB_ACT_END_OF_FILE 1
3746 +#define EOB_ACT_LAST_MATCH 2
3747 +
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.
3754 + */
3755 + #define YY_LESS_LINENO(n) \
3756 + do { \
3757 + int yyl;\
3758 + for ( yyl = n; yyl < yyleng; ++yyl )\
3759 + if ( yytext[yyl] == '\n' )\
3760 + --yylineno;\
3761 + }while(0)
3762 +
3763 +/* Return all but the first "n" matched characters back to the input stream. */
3764 +#define yyless(n) \
3765 + do \
3766 + { \
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 */ \
3774 + } \
3775 + while ( 0 )
3776 +
3777 +#define unput(c) yyunput( c, (yytext_ptr) )
3778 +
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).
3782 + */
3783 +
3784 +#ifndef YY_TYPEDEF_YY_SIZE_T
3785 +#define YY_TYPEDEF_YY_SIZE_T
3786 +typedef unsigned int yy_size_t;
3787 +#endif
3788 +
3789 +#ifndef YY_STRUCT_YY_BUFFER_STATE
3790 +#define YY_STRUCT_YY_BUFFER_STATE
3791 +struct yy_buffer_state
3792 + {
3793 + FILE *yy_input_file;
3794 +
3795 + char *yy_ch_buf; /* input buffer */
3796 + char *yy_buf_pos; /* current position in input buffer */
3797 +
3798 + /* Size of input buffer in bytes, not including room for EOB
3799 + * characters.
3800 + */
3801 + yy_size_t yy_buf_size;
3802 +
3803 + /* Number of characters read into yy_ch_buf, not including EOB
3804 + * characters.
3805 + */
3806 + int yy_n_chars;
3807 +
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
3810 + * delete it.
3811 + */
3812 + int yy_is_our_buffer;
3813 +
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
3817 + * each newline.
3818 + */
3819 + int yy_is_interactive;
3820 +
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
3823 + * not.
3824 + */
3825 + int yy_at_bol;
3826 +
3827 + int yy_bs_lineno; /**< The line count. */
3828 + int yy_bs_column; /**< The column count. */
3829 +
3830 + /* Whether to try to fill the input buffer when we reach the
3831 + * end of it.
3832 + */
3833 + int yy_fill_buffer;
3834 +
3835 + int yy_buffer_status;
3836 +
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.
3844 + *
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.
3848 + */
3849 +#define YY_BUFFER_EOF_PENDING 2
3850 +
3851 + };
3852 +#endif /* !YY_STRUCT_YY_BUFFER_STATE */
3853 +
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. */
3858 +
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".
3862 + *
3863 + * Returns the top of the stack, or NULL.
3864 + */
3865 +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
3866 + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
3867 + : NULL)
3868 +
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.
3871 + */
3872 +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
3873 +
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 */
3877 +int yyleng;
3878 +
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 */
3883 +
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 ...
3886 + */
3887 +static int yy_did_buffer_switch_on_eof;
3888 +
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 );
3896 +
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 );
3900 +
3901 +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
3902 +
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 );
3906 +
3907 +void *yyalloc (yy_size_t );
3908 +void *yyrealloc (void *,yy_size_t );
3909 +void yyfree (void * );
3910 +
3911 +#define yy_new_buffer yy_create_buffer
3912 +
3913 +#define yy_set_interactive(is_interactive) \
3914 + { \
3915 + if ( ! YY_CURRENT_BUFFER ){ \
3916 + yyensure_buffer_stack (); \
3917 + YY_CURRENT_BUFFER_LVALUE = \
3918 + yy_create_buffer(yyin,YY_BUF_SIZE ); \
3919 + } \
3920 + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
3921 + }
3922 +
3923 +#define yy_set_bol(at_bol) \
3924 + { \
3925 + if ( ! YY_CURRENT_BUFFER ){\
3926 + yyensure_buffer_stack (); \
3927 + YY_CURRENT_BUFFER_LVALUE = \
3928 + yy_create_buffer(yyin,YY_BUF_SIZE ); \
3929 + } \
3930 + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
3931 + }
3932 +
3933 +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
3934 +
3935 +/* Begin user sect3 */
3936 +
3937 +#define yywrap() 1
3938 +#define YY_SKIP_YYWRAP
3939 +
3940 +typedef unsigned char YY_CHAR;
3941 +
3942 +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
3943 +
3944 +typedef int yy_state_type;
3945 +
3946 +extern int yylineno;
3947 +
3948 +int yylineno = 1;
3949 +
3950 +extern char *yytext;
3951 +#define yytext_ptr yytext
3952 +
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[] );
3957 +
3958 +/* Done after the current pattern has been matched and before the
3959 + * corresponding action - sets up yytext.
3960 + */
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; \
3965 + *yy_cp = '\0'; \
3966 + (yy_c_buf_p) = yy_cp;
3967 +
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
3973 + {
3974 + flex_int32_t yy_verify;
3975 + flex_int32_t yy_nxt;
3976 + };
3977 +static yyconst flex_int16_t yy_accept[94] =
3978 + { 0,
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,
3988 + 0, 5, 0
3989 +
3990 + } ;
3991 +
3992 +static yyconst flex_int32_t yy_ec[256] =
3993 + { 0,
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,
4004 +
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,
4015 +
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,
4021 + 1, 1, 1, 1, 1
4022 + } ;
4023 +
4024 +static yyconst flex_int32_t yy_meta[36] =
4025 + { 0,
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,
4029 + 7, 7, 7, 8, 1
4030 + } ;
4031 +
4032 +static yyconst flex_int16_t yy_base[107] =
4033 + { 0,
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,
4044 +
4045 + 251, 255, 262, 270, 275, 280
4046 + } ;
4047 +
4048 +static yyconst flex_int16_t yy_def[107] =
4049 + { 0,
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,
4060 +
4061 + 93, 93, 93, 93, 93, 93
4062 + } ;
4063 +
4064 +static yyconst flex_int16_t yy_nxt[324] =
4065 + { 0,
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,
4076 +
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,
4087 +
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,
4098 +
4099 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4100 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4101 + 93, 93, 93
4102 + } ;
4103 +
4104 +static yyconst flex_int16_t yy_chk[324] =
4105 + { 0,
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,
4116 +
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,
4127 +
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,
4138 +
4139 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4140 + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
4141 + 93, 93, 93
4142 + } ;
4143 +
4144 +/* Table of booleans, true if rule could match eol. */
4145 +static yyconst flex_int32_t yy_rule_can_match_eol[21] =
4146 + { 0,
4147 +0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,
4148 + 0, };
4149 +
4150 +static yy_state_type yy_last_accepting_state;
4151 +static char *yy_last_accepting_cpos;
4152 +
4153 +extern int yy_flex_debug;
4154 +int yy_flex_debug = 0;
4155 +
4156 +/* The intent behind this definition is that it'll catch
4157 + * any uses of REJECT which flex missed.
4158 + */
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
4163 +char *yytext;
4164 +#line 1 "dtc-lexer.l"
4165 +/*
4166 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
4167 + *
4168 + *
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.
4173 + *
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.
4178 + *
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
4182 + * USA
4183 + */
4184 +
4185 +
4186 +
4187 +
4188 +#line 33 "dtc-lexer.l"
4189 +#include "dtc.h"
4190 +#include "srcpos.h"
4191 +#include "dtc-parser.tab.h"
4192 +
4193 +
4194 +/*#define LEXDEBUG 1*/
4195 +
4196 +#ifdef LEXDEBUG
4197 +#define DPRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
4198 +#else
4199 +#define DPRINT(fmt, ...) do { } while (0)
4200 +#endif
4201 +
4202 +static int dts_version; /* = 0 */
4203 +
4204 +#define BEGIN_DEFAULT() if (dts_version == 0) { \
4205 + DPRINT("<INITIAL>\n"); \
4206 + BEGIN(INITIAL); \
4207 + } else { \
4208 + DPRINT("<V1>\n"); \
4209 + BEGIN(V1); \
4210 + }
4211 +#line 627 "dtc-lexer.lex.c"
4212 +
4213 +#define INITIAL 0
4214 +#define INCLUDE 1
4215 +#define BYTESTRING 2
4216 +#define PROPNODENAME 3
4217 +#define V1 4
4218 +
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.
4223 + */
4224 +#include <unistd.h>
4225 +#endif
4226 +
4227 +#ifndef YY_EXTRA_TYPE
4228 +#define YY_EXTRA_TYPE void *
4229 +#endif
4230 +
4231 +static int yy_init_globals (void );
4232 +
4233 +/* Macros after this point can all be overridden by user definitions in
4234 + * section 1.
4235 + */
4236 +
4237 +#ifndef YY_SKIP_YYWRAP
4238 +#ifdef __cplusplus
4239 +extern "C" int yywrap (void );
4240 +#else
4241 +extern int yywrap (void );
4242 +#endif
4243 +#endif
4244 +
4245 +#ifndef yytext_ptr
4246 +static void yy_flex_strncpy (char *,yyconst char *,int );
4247 +#endif
4248 +
4249 +#ifdef YY_NEED_STRLEN
4250 +static int yy_flex_strlen (yyconst char * );
4251 +#endif
4252 +
4253 +#ifndef YY_NO_INPUT
4254 +
4255 +#ifdef __cplusplus
4256 +static int yyinput (void );
4257 +#else
4258 +static int input (void );
4259 +#endif
4260 +
4261 +#endif
4262 +
4263 +/* Amount of stuff to slurp up with each read. */
4264 +#ifndef YY_READ_BUF_SIZE
4265 +#define YY_READ_BUF_SIZE 8192
4266 +#endif
4267 +
4268 +/* Copy whatever the last rule matched to the standard output. */
4269 +#ifndef ECHO
4270 +/* This used to be an fputs(), but since the string might contain NUL's,
4271 + * we now use fwrite().
4272 + */
4273 +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
4274 +#endif
4275 +
4276 +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
4277 + * is returned in "result".
4278 + */
4279 +#ifndef YY_INPUT
4280 +#define YY_INPUT(buf,result,max_size) \
4281 + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
4282 + { \
4283 + int c = '*'; \
4284 + size_t n; \
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" ); \
4292 + result = n; \
4293 + } \
4294 + else \
4295 + { \
4296 + errno=0; \
4297 + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
4298 + { \
4299 + if( errno != EINTR) \
4300 + { \
4301 + YY_FATAL_ERROR( "input in flex scanner failed" ); \
4302 + break; \
4303 + } \
4304 + errno=0; \
4305 + clearerr(yyin); \
4306 + } \
4307 + }\
4308 +\
4309 +
4310 +#endif
4311 +
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.
4315 + */
4316 +#ifndef yyterminate
4317 +#define yyterminate() return YY_NULL
4318 +#endif
4319 +
4320 +/* Number of entries by which start-condition stack grows. */
4321 +#ifndef YY_START_STACK_INCR
4322 +#define YY_START_STACK_INCR 25
4323 +#endif
4324 +
4325 +/* Report a fatal error. */
4326 +#ifndef YY_FATAL_ERROR
4327 +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
4328 +#endif
4329 +
4330 +/* end tables serialization structures and prototypes */
4331 +
4332 +/* Default declaration of generated scanner - a define so the user can
4333 + * easily add parameters.
4334 + */
4335 +#ifndef YY_DECL
4336 +#define YY_DECL_IS_OURS 1
4337 +
4338 +extern int yylex (void);
4339 +
4340 +#define YY_DECL int yylex (void)
4341 +#endif /* !YY_DECL */
4342 +
4343 +/* Code executed at the beginning of each rule, after yytext and yyleng
4344 + * have been set up.
4345 + */
4346 +#ifndef YY_USER_ACTION
4347 +#define YY_USER_ACTION
4348 +#endif
4349 +
4350 +/* Code executed at the end of each rule. */
4351 +#ifndef YY_BREAK
4352 +#define YY_BREAK break;
4353 +#endif
4354 +
4355 +#define YY_RULE_SETUP \
4356 + YY_USER_ACTION
4357 +
4358 +/** The main scanner function which does all the work.
4359 + */
4360 +YY_DECL
4361 +{
4362 + register yy_state_type yy_current_state;
4363 + register char *yy_cp, *yy_bp;
4364 + register int yy_act;
4365 +
4366 +#line 57 "dtc-lexer.l"
4367 +
4368 +#line 784 "dtc-lexer.lex.c"
4369 +
4370 + if ( !(yy_init) )
4371 + {
4372 + (yy_init) = 1;
4373 +
4374 +#ifdef YY_USER_INIT
4375 + YY_USER_INIT;
4376 +#endif
4377 +
4378 + if ( ! (yy_start) )
4379 + (yy_start) = 1; /* first start state */
4380 +
4381 + if ( ! yyin )
4382 + yyin = stdin;
4383 +
4384 + if ( ! yyout )
4385 + yyout = stdout;
4386 +
4387 + if ( ! YY_CURRENT_BUFFER ) {
4388 + yyensure_buffer_stack ();
4389 + YY_CURRENT_BUFFER_LVALUE =
4390 + yy_create_buffer(yyin,YY_BUF_SIZE );
4391 + }
4392 +
4393 + yy_load_buffer_state( );
4394 + }
4395 +
4396 + while ( 1 ) /* loops until end-of-file is reached */
4397 + {
4398 + yy_cp = (yy_c_buf_p);
4399 +
4400 + /* Support of yytext. */
4401 + *yy_cp = (yy_hold_char);
4402 +
4403 + /* yy_bp points to the position in yy_ch_buf of the start of
4404 + * the current run.
4405 + */
4406 + yy_bp = yy_cp;
4407 +
4408 + yy_current_state = (yy_start);
4409 +yy_match:
4410 + do
4411 + {
4412 + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
4413 + if ( yy_accept[yy_current_state] )
4414 + {
4415 + (yy_last_accepting_state) = yy_current_state;
4416 + (yy_last_accepting_cpos) = yy_cp;
4417 + }
4418 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4419 + {
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];
4423 + }
4424 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4425 + ++yy_cp;
4426 + }
4427 + while ( yy_base[yy_current_state] != 288 );
4428 +
4429 +yy_find_action:
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];
4436 + }
4437 +
4438 + YY_DO_BEFORE_ACTION;
4439 +
4440 + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
4441 + {
4442 + int yyl;
4443 + for ( yyl = 0; yyl < yyleng; ++yyl )
4444 + if ( yytext[yyl] == '\n' )
4445 +
4446 + yylineno++;
4447 +;
4448 + }
4449 +
4450 +do_action: /* This label is used only to access EOF actions. */
4451 +
4452 + switch ( yy_act )
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;
4460 +
4461 +case 1:
4462 +YY_RULE_SETUP
4463 +#line 58 "dtc-lexer.l"
4464 +BEGIN(INCLUDE);
4465 + YY_BREAK
4466 +case 2:
4467 +YY_RULE_SETUP
4468 +#line 60 "dtc-lexer.l"
4469 +{
4470 + yytext[strlen(yytext) - 1] = 0;
4471 + if (!push_input_file(yytext + 1)) {
4472 + /* Some unrecoverable error.*/
4473 + exit(1);
4474 + }
4475 + BEGIN_DEFAULT();
4476 + }
4477 + YY_BREAK
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"
4484 +{
4485 + if (!pop_input_file()) {
4486 + yyterminate();
4487 + }
4488 + }
4489 + YY_BREAK
4490 +case 3:
4491 +/* rule 3 can match eol */
4492 +YY_RULE_SETUP
4493 +#line 76 "dtc-lexer.l"
4494 +{
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,
4499 + yyleng-2);
4500 + yylloc.first_line = yylineno;
4501 + return DT_STRING;
4502 + }
4503 + YY_BREAK
4504 +case 4:
4505 +YY_RULE_SETUP
4506 +#line 86 "dtc-lexer.l"
4507 +{
4508 + yylloc.filenum = srcpos_filenum;
4509 + yylloc.first_line = yylineno;
4510 + DPRINT("Keyword: /dts-v1/\n");
4511 + dts_version = 1;
4512 + BEGIN_DEFAULT();
4513 + return DT_V1;
4514 + }
4515 + YY_BREAK
4516 +case 5:
4517 +YY_RULE_SETUP
4518 +#line 95 "dtc-lexer.l"
4519 +{
4520 + yylloc.filenum = srcpos_filenum;
4521 + yylloc.first_line = yylineno;
4522 + DPRINT("Keyword: /memreserve/\n");
4523 + BEGIN_DEFAULT();
4524 + return DT_MEMRESERVE;
4525 + }
4526 + YY_BREAK
4527 +case 6:
4528 +YY_RULE_SETUP
4529 +#line 103 "dtc-lexer.l"
4530 +{
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';
4536 + return DT_LABEL;
4537 + }
4538 + YY_BREAK
4539 +case 7:
4540 +YY_RULE_SETUP
4541 +#line 112 "dtc-lexer.l"
4542 +{
4543 + yylloc.filenum = srcpos_filenum;
4544 + yylloc.first_line = yylineno;
4545 + if (*yytext == 'b')
4546 + yylval.cbase = 2;
4547 + else if (*yytext == 'o')
4548 + yylval.cbase = 8;
4549 + else if (*yytext == 'd')
4550 + yylval.cbase = 10;
4551 + else
4552 + yylval.cbase = 16;
4553 + DPRINT("Base: %d\n", yylval.cbase);
4554 + return DT_BASE;
4555 + }
4556 + YY_BREAK
4557 +case 8:
4558 +YY_RULE_SETUP
4559 +#line 127 "dtc-lexer.l"
4560 +{
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;
4566 + }
4567 + YY_BREAK
4568 +case 9:
4569 +YY_RULE_SETUP
4570 +#line 135 "dtc-lexer.l"
4571 +{
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;
4577 + }
4578 + YY_BREAK
4579 +case 10:
4580 +YY_RULE_SETUP
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);
4587 + return DT_REF;
4588 + }
4589 + YY_BREAK
4590 +case 11:
4591 +YY_RULE_SETUP
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);
4599 + return DT_REF;
4600 + }
4601 + YY_BREAK
4602 +case 12:
4603 +YY_RULE_SETUP
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);
4610 + return DT_REF;
4611 + }
4612 + YY_BREAK
4613 +case 13:
4614 +YY_RULE_SETUP
4615 +#line 168 "dtc-lexer.l"
4616 +{
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);
4621 + return DT_BYTE;
4622 + }
4623 + YY_BREAK
4624 +case 14:
4625 +YY_RULE_SETUP
4626 +#line 176 "dtc-lexer.l"
4627 +{
4628 + yylloc.filenum = srcpos_filenum;
4629 + yylloc.first_line = yylineno;
4630 + DPRINT("/BYTESTRING\n");
4631 + BEGIN_DEFAULT();
4632 + return ']';
4633 + }
4634 + YY_BREAK
4635 +case 15:
4636 +YY_RULE_SETUP
4637 +#line 184 "dtc-lexer.l"
4638 +{
4639 + yylloc.filenum = srcpos_filenum;
4640 + yylloc.first_line = yylineno;
4641 + DPRINT("PropNodeName: %s\n", yytext);
4642 + yylval.propnodename = strdup(yytext);
4643 + BEGIN_DEFAULT();
4644 + return DT_PROPNODENAME;
4645 + }
4646 + YY_BREAK
4647 +case 16:
4648 +/* rule 16 can match eol */
4649 +YY_RULE_SETUP
4650 +#line 194 "dtc-lexer.l"
4651 +/* eat whitespace */
4652 + YY_BREAK
4653 +case 17:
4654 +/* rule 17 can match eol */
4655 +YY_RULE_SETUP
4656 +#line 196 "dtc-lexer.l"
4657 +{
4658 + yylloc.filenum = srcpos_filenum;
4659 + yylloc.first_line = yylineno;
4660 + DPRINT("Comment: %s\n", yytext);
4661 + /* eat comments */
4662 + }
4663 + YY_BREAK
4664 +case 18:
4665 +/* rule 18 can match eol */
4666 +YY_RULE_SETUP
4667 +#line 203 "dtc-lexer.l"
4668 +/* eat line comments */
4669 + YY_BREAK
4670 +case 19:
4671 +YY_RULE_SETUP
4672 +#line 205 "dtc-lexer.l"
4673 +{
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);
4681 + }
4682 + if ((yytext[0] == '{')
4683 + || (yytext[0] == ';')) {
4684 + DPRINT("<PROPNODENAME>\n");
4685 + BEGIN(PROPNODENAME);
4686 + }
4687 + return yytext[0];
4688 + }
4689 + YY_BREAK
4690 +case 20:
4691 +YY_RULE_SETUP
4692 +#line 222 "dtc-lexer.l"
4693 +ECHO;
4694 + YY_BREAK
4695 +#line 1111 "dtc-lexer.lex.c"
4696 +
4697 + case YY_END_OF_BUFFER:
4698 + {
4699 + /* Amount of text matched not including the EOB char. */
4700 + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
4701 +
4702 + /* Undo the effects of YY_DO_BEFORE_ACTION. */
4703 + *yy_cp = (yy_hold_char);
4704 + YY_RESTORE_YY_MORE_OFFSET
4705 +
4706 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
4707 + {
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.
4716 + */
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;
4720 + }
4721 +
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
4727 + * in input().
4728 + */
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;
4732 +
4733 + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
4734 +
4735 + yy_current_state = yy_get_previous_state( );
4736 +
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).
4744 + */
4745 +
4746 + yy_next_state = yy_try_NUL_trans( yy_current_state );
4747 +
4748 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
4749 +
4750 + if ( yy_next_state )
4751 + {
4752 + /* Consume the NUL. */
4753 + yy_cp = ++(yy_c_buf_p);
4754 + yy_current_state = yy_next_state;
4755 + goto yy_match;
4756 + }
4757 +
4758 + else
4759 + {
4760 + yy_cp = (yy_c_buf_p);
4761 + goto yy_find_action;
4762 + }
4763 + }
4764 +
4765 + else switch ( yy_get_next_buffer( ) )
4766 + {
4767 + case EOB_ACT_END_OF_FILE:
4768 + {
4769 + (yy_did_buffer_switch_on_eof) = 0;
4770 +
4771 + if ( yywrap( ) )
4772 + {
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.
4781 + */
4782 + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
4783 +
4784 + yy_act = YY_STATE_EOF(YY_START);
4785 + goto do_action;
4786 + }
4787 +
4788 + else
4789 + {
4790 + if ( ! (yy_did_buffer_switch_on_eof) )
4791 + YY_NEW_FILE;
4792 + }
4793 + break;
4794 + }
4795 +
4796 + case EOB_ACT_CONTINUE_SCAN:
4797 + (yy_c_buf_p) =
4798 + (yytext_ptr) + yy_amount_of_matched_text;
4799 +
4800 + yy_current_state = yy_get_previous_state( );
4801 +
4802 + yy_cp = (yy_c_buf_p);
4803 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
4804 + goto yy_match;
4805 +
4806 + case EOB_ACT_LAST_MATCH:
4807 + (yy_c_buf_p) =
4808 + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
4809 +
4810 + yy_current_state = yy_get_previous_state( );
4811 +
4812 + yy_cp = (yy_c_buf_p);
4813 + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
4814 + goto yy_find_action;
4815 + }
4816 + break;
4817 + }
4818 +
4819 + default:
4820 + YY_FATAL_ERROR(
4821 + "fatal flex scanner internal error--no action found" );
4822 + } /* end of action switch */
4823 + } /* end of scanning one token */
4824 +} /* end of yylex */
4825 +
4826 +/* yy_get_next_buffer - try to read in a new buffer
4827 + *
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
4832 + */
4833 +static int yy_get_next_buffer (void)
4834 +{
4835 + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
4836 + register char *source = (yytext_ptr);
4837 + register int number_to_move, i;
4838 + int ret_val;
4839 +
4840 + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
4841 + YY_FATAL_ERROR(
4842 + "fatal flex scanner internal error--end of buffer missed" );
4843 +
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 )
4847 + {
4848 + /* We matched a single character, the EOB, so
4849 + * treat this as a final EOF.
4850 + */
4851 + return EOB_ACT_END_OF_FILE;
4852 + }
4853 +
4854 + else
4855 + {
4856 + /* We matched some text prior to the EOB, first
4857 + * process it.
4858 + */
4859 + return EOB_ACT_LAST_MATCH;
4860 + }
4861 + }
4862 +
4863 + /* Try to read more data. */
4864 +
4865 + /* First move last chars to start of buffer. */
4866 + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
4867 +
4868 + for ( i = 0; i < number_to_move; ++i )
4869 + *(dest++) = *(source++);
4870 +
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
4874 + */
4875 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
4876 +
4877 + else
4878 + {
4879 + int num_to_read =
4880 + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
4881 +
4882 + while ( num_to_read <= 0 )
4883 + { /* Not enough room in the buffer - grow it. */
4884 +
4885 + /* just a shorter name for the current buffer */
4886 + YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
4887 +
4888 + int yy_c_buf_p_offset =
4889 + (int) ((yy_c_buf_p) - b->yy_ch_buf);
4890 +
4891 + if ( b->yy_is_our_buffer )
4892 + {
4893 + int new_size = b->yy_buf_size * 2;
4894 +
4895 + if ( new_size <= 0 )
4896 + b->yy_buf_size += b->yy_buf_size / 8;
4897 + else
4898 + b->yy_buf_size *= 2;
4899 +
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 );
4903 + }
4904 + else
4905 + /* Can't grow it, we don't own it. */
4906 + b->yy_ch_buf = 0;
4907 +
4908 + if ( ! b->yy_ch_buf )
4909 + YY_FATAL_ERROR(
4910 + "fatal error - scanner input buffer overflow" );
4911 +
4912 + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
4913 +
4914 + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
4915 + number_to_move - 1;
4916 +
4917 + }
4918 +
4919 + if ( num_to_read > YY_READ_BUF_SIZE )
4920 + num_to_read = YY_READ_BUF_SIZE;
4921 +
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 );
4925 +
4926 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
4927 + }
4928 +
4929 + if ( (yy_n_chars) == 0 )
4930 + {
4931 + if ( number_to_move == YY_MORE_ADJ )
4932 + {
4933 + ret_val = EOB_ACT_END_OF_FILE;
4934 + yyrestart(yyin );
4935 + }
4936 +
4937 + else
4938 + {
4939 + ret_val = EOB_ACT_LAST_MATCH;
4940 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
4941 + YY_BUFFER_EOF_PENDING;
4942 + }
4943 + }
4944 +
4945 + else
4946 + ret_val = EOB_ACT_CONTINUE_SCAN;
4947 +
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;
4951 +
4952 + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
4953 +
4954 + return ret_val;
4955 +}
4956 +
4957 +/* yy_get_previous_state - get the state just before the EOB char was reached */
4958 +
4959 + static yy_state_type yy_get_previous_state (void)
4960 +{
4961 + register yy_state_type yy_current_state;
4962 + register char *yy_cp;
4963 +
4964 + yy_current_state = (yy_start);
4965 +
4966 + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
4967 + {
4968 + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
4969 + if ( yy_accept[yy_current_state] )
4970 + {
4971 + (yy_last_accepting_state) = yy_current_state;
4972 + (yy_last_accepting_cpos) = yy_cp;
4973 + }
4974 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4975 + {
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];
4979 + }
4980 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4981 + }
4982 +
4983 + return yy_current_state;
4984 +}
4985 +
4986 +/* yy_try_NUL_trans - try to make a transition on the NUL character
4987 + *
4988 + * synopsis
4989 + * next_state = yy_try_NUL_trans( current_state );
4990 + */
4991 + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
4992 +{
4993 + register int yy_is_jam;
4994 + register char *yy_cp = (yy_c_buf_p);
4995 +
4996 + register YY_CHAR yy_c = 1;
4997 + if ( yy_accept[yy_current_state] )
4998 + {
4999 + (yy_last_accepting_state) = yy_current_state;
5000 + (yy_last_accepting_cpos) = yy_cp;
5001 + }
5002 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
5003 + {
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];
5007 + }
5008 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
5009 + yy_is_jam = (yy_current_state == 93);
5010 +
5011 + return yy_is_jam ? 0 : yy_current_state;
5012 +}
5013 +
5014 +#ifndef YY_NO_INPUT
5015 +#ifdef __cplusplus
5016 + static int yyinput (void)
5017 +#else
5018 + static int input (void)
5019 +#endif
5020 +
5021 +{
5022 + int c;
5023 +
5024 + *(yy_c_buf_p) = (yy_hold_char);
5025 +
5026 + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
5027 + {
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.
5031 + */
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';
5035 +
5036 + else
5037 + { /* need more input */
5038 + int offset = (yy_c_buf_p) - (yytext_ptr);
5039 + ++(yy_c_buf_p);
5040 +
5041 + switch ( yy_get_next_buffer( ) )
5042 + {
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.
5052 + */
5053 +
5054 + /* Reset buffer status. */
5055 + yyrestart(yyin );
5056 +
5057 + /*FALLTHROUGH*/
5058 +
5059 + case EOB_ACT_END_OF_FILE:
5060 + {
5061 + if ( yywrap( ) )
5062 + return EOF;
5063 +
5064 + if ( ! (yy_did_buffer_switch_on_eof) )
5065 + YY_NEW_FILE;
5066 +#ifdef __cplusplus
5067 + return yyinput();
5068 +#else
5069 + return input();
5070 +#endif
5071 + }
5072 +
5073 + case EOB_ACT_CONTINUE_SCAN:
5074 + (yy_c_buf_p) = (yytext_ptr) + offset;
5075 + break;
5076 + }
5077 + }
5078 + }
5079 +
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);
5083 +
5084 + if ( c == '\n' )
5085 +
5086 + yylineno++;
5087 +;
5088 +
5089 + return c;
5090 +}
5091 +#endif /* ifndef YY_NO_INPUT */
5092 +
5093 +/** Immediately switch to a different input stream.
5094 + * @param input_file A readable stream.
5095 + *
5096 + * @note This function does not reset the start condition to @c INITIAL .
5097 + */
5098 + void yyrestart (FILE * input_file )
5099 +{
5100 +
5101 + if ( ! YY_CURRENT_BUFFER ){
5102 + yyensure_buffer_stack ();
5103 + YY_CURRENT_BUFFER_LVALUE =
5104 + yy_create_buffer(yyin,YY_BUF_SIZE );
5105 + }
5106 +
5107 + yy_init_buffer(YY_CURRENT_BUFFER,input_file );
5108 + yy_load_buffer_state( );
5109 +}
5110 +
5111 +/** Switch to a different input buffer.
5112 + * @param new_buffer The new input buffer.
5113 + *
5114 + */
5115 + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
5116 +{
5117 +
5118 + /* TODO. We should be able to replace this entire function body
5119 + * with
5120 + * yypop_buffer_state();
5121 + * yypush_buffer_state(new_buffer);
5122 + */
5123 + yyensure_buffer_stack ();
5124 + if ( YY_CURRENT_BUFFER == new_buffer )
5125 + return;
5126 +
5127 + if ( YY_CURRENT_BUFFER )
5128 + {
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);
5133 + }
5134 +
5135 + YY_CURRENT_BUFFER_LVALUE = new_buffer;
5136 + yy_load_buffer_state( );
5137 +
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.
5142 + */
5143 + (yy_did_buffer_switch_on_eof) = 1;
5144 +}
5145 +
5146 +static void yy_load_buffer_state (void)
5147 +{
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);
5152 +}
5153 +
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.
5157 + *
5158 + * @return the allocated buffer state.
5159 + */
5160 + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
5161 +{
5162 + YY_BUFFER_STATE b;
5163 +
5164 + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
5165 + if ( ! b )
5166 + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
5167 +
5168 + b->yy_buf_size = size;
5169 +
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.
5172 + */
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()" );
5176 +
5177 + b->yy_is_our_buffer = 1;
5178 +
5179 + yy_init_buffer(b,file );
5180 +
5181 + return b;
5182 +}
5183 +
5184 +/** Destroy the buffer.
5185 + * @param b a buffer created with yy_create_buffer()
5186 + *
5187 + */
5188 + void yy_delete_buffer (YY_BUFFER_STATE b )
5189 +{
5190 +
5191 + if ( ! b )
5192 + return;
5193 +
5194 + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
5195 + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
5196 +
5197 + if ( b->yy_is_our_buffer )
5198 + yyfree((void *) b->yy_ch_buf );
5199 +
5200 + yyfree((void *) b );
5201 +}
5202 +
5203 +#ifndef __cplusplus
5204 +extern int isatty (int );
5205 +#endif /* __cplusplus */
5206 +
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.
5210 + */
5211 + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
5212 +
5213 +{
5214 + int oerrno = errno;
5215 +
5216 + yy_flush_buffer(b );
5217 +
5218 + b->yy_input_file = file;
5219 + b->yy_fill_buffer = 1;
5220 +
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.
5224 + */
5225 + if (b != YY_CURRENT_BUFFER){
5226 + b->yy_bs_lineno = 1;
5227 + b->yy_bs_column = 0;
5228 + }
5229 +
5230 + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
5231 +
5232 + errno = oerrno;
5233 +}
5234 +
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.
5237 + *
5238 + */
5239 + void yy_flush_buffer (YY_BUFFER_STATE b )
5240 +{
5241 + if ( ! b )
5242 + return;
5243 +
5244 + b->yy_n_chars = 0;
5245 +
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.
5249 + */
5250 + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
5251 + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
5252 +
5253 + b->yy_buf_pos = &b->yy_ch_buf[0];
5254 +
5255 + b->yy_at_bol = 1;
5256 + b->yy_buffer_status = YY_BUFFER_NEW;
5257 +
5258 + if ( b == YY_CURRENT_BUFFER )
5259 + yy_load_buffer_state( );
5260 +}
5261 +
5262 +/** Pushes the new state onto the stack. The new state becomes
5263 + * the current state. This function will allocate the stack
5264 + * if necessary.
5265 + * @param new_buffer The new state.
5266 + *
5267 + */
5268 +void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
5269 +{
5270 + if (new_buffer == NULL)
5271 + return;
5272 +
5273 + yyensure_buffer_stack();
5274 +
5275 + /* This block is copied from yy_switch_to_buffer. */
5276 + if ( YY_CURRENT_BUFFER )
5277 + {
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);
5282 + }
5283 +
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;
5288 +
5289 + /* copied from yy_switch_to_buffer. */
5290 + yy_load_buffer_state( );
5291 + (yy_did_buffer_switch_on_eof) = 1;
5292 +}
5293 +
5294 +/** Removes and deletes the top of the stack, if present.
5295 + * The next element becomes the new top.
5296 + *
5297 + */
5298 +void yypop_buffer_state (void)
5299 +{
5300 + if (!YY_CURRENT_BUFFER)
5301 + return;
5302 +
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);
5307 +
5308 + if (YY_CURRENT_BUFFER) {
5309 + yy_load_buffer_state( );
5310 + (yy_did_buffer_switch_on_eof) = 1;
5311 + }
5312 +}
5313 +
5314 +/* Allocates the stack if it does not exist.
5315 + * Guarantees space for at least one push.
5316 + */
5317 +static void yyensure_buffer_stack (void)
5318 +{
5319 + int num_to_alloc;
5320 +
5321 + if (!(yy_buffer_stack)) {
5322 +
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.
5326 + */
5327 + num_to_alloc = 1;
5328 + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
5329 + (num_to_alloc * sizeof(struct yy_buffer_state*)
5330 + );
5331 +
5332 + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
5333 +
5334 + (yy_buffer_stack_max) = num_to_alloc;
5335 + (yy_buffer_stack_top) = 0;
5336 + return;
5337 + }
5338 +
5339 + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
5340 +
5341 + /* Increase the buffer to prepare for a possible push. */
5342 + int grow_size = 8 /* arbitrary grow size */;
5343 +
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*)
5348 + );
5349 +
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;
5353 + }
5354 +}
5355 +
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
5359 + *
5360 + * @return the newly allocated buffer state object.
5361 + */
5362 +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
5363 +{
5364 + YY_BUFFER_STATE b;
5365 +
5366 + if ( size < 2 ||
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. */
5370 + return 0;
5371 +
5372 + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
5373 + if ( ! b )
5374 + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
5375 +
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;
5382 + b->yy_at_bol = 1;
5383 + b->yy_fill_buffer = 0;
5384 + b->yy_buffer_status = YY_BUFFER_NEW;
5385 +
5386 + yy_switch_to_buffer(b );
5387 +
5388 + return b;
5389 +}
5390 +
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
5394 + *
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.
5398 + */
5399 +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
5400 +{
5401 +
5402 + return yy_scan_bytes(yystr,strlen(yystr) );
5403 +}
5404 +
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.
5409 + *
5410 + * @return the newly allocated buffer state object.
5411 + */
5412 +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
5413 +{
5414 + YY_BUFFER_STATE b;
5415 + char *buf;
5416 + yy_size_t n;
5417 + int i;
5418 +
5419 + /* Get memory for full buffer, including space for trailing EOB's. */
5420 + n = _yybytes_len + 2;
5421 + buf = (char *) yyalloc(n );
5422 + if ( ! buf )
5423 + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
5424 +
5425 + for ( i = 0; i < _yybytes_len; ++i )
5426 + buf[i] = yybytes[i];
5427 +
5428 + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
5429 +
5430 + b = yy_scan_buffer(buf,n );
5431 + if ( ! b )
5432 + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
5433 +
5434 + /* It's okay to grow etc. this buffer, and we should throw it
5435 + * away when we're done.
5436 + */
5437 + b->yy_is_our_buffer = 1;
5438 +
5439 + return b;
5440 +}
5441 +
5442 +#ifndef YY_EXIT_FAILURE
5443 +#define YY_EXIT_FAILURE 2
5444 +#endif
5445 +
5446 +static void yy_fatal_error (yyconst char* msg )
5447 +{
5448 + (void) fprintf( stderr, "%s\n", msg );
5449 + exit( YY_EXIT_FAILURE );
5450 +}
5451 +
5452 +/* Redefine yyless() so it works in section 3 code. */
5453 +
5454 +#undef yyless
5455 +#define yyless(n) \
5456 + do \
5457 + { \
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; \
5466 + } \
5467 + while ( 0 )
5468 +
5469 +/* Accessor methods (get/set functions) to struct members. */
5470 +
5471 +/** Get the current line number.
5472 + *
5473 + */
5474 +int yyget_lineno (void)
5475 +{
5476 +
5477 + return yylineno;
5478 +}
5479 +
5480 +/** Get the input stream.
5481 + *
5482 + */
5483 +FILE *yyget_in (void)
5484 +{
5485 + return yyin;
5486 +}
5487 +
5488 +/** Get the output stream.
5489 + *
5490 + */
5491 +FILE *yyget_out (void)
5492 +{
5493 + return yyout;
5494 +}
5495 +
5496 +/** Get the length of the current token.
5497 + *
5498 + */
5499 +int yyget_leng (void)
5500 +{
5501 + return yyleng;
5502 +}
5503 +
5504 +/** Get the current token.
5505 + *
5506 + */
5507 +
5508 +char *yyget_text (void)
5509 +{
5510 + return yytext;
5511 +}
5512 +
5513 +/** Set the current line number.
5514 + * @param line_number
5515 + *
5516 + */
5517 +void yyset_lineno (int line_number )
5518 +{
5519 +
5520 + yylineno = line_number;
5521 +}
5522 +
5523 +/** Set the input stream. This does not discard the current
5524 + * input buffer.
5525 + * @param in_str A readable stream.
5526 + *
5527 + * @see yy_switch_to_buffer
5528 + */
5529 +void yyset_in (FILE * in_str )
5530 +{
5531 + yyin = in_str ;
5532 +}
5533 +
5534 +void yyset_out (FILE * out_str )
5535 +{
5536 + yyout = out_str ;
5537 +}
5538 +
5539 +int yyget_debug (void)
5540 +{
5541 + return yy_flex_debug;
5542 +}
5543 +
5544 +void yyset_debug (int bdebug )
5545 +{
5546 + yy_flex_debug = bdebug ;
5547 +}
5548 +
5549 +static int yy_init_globals (void)
5550 +{
5551 + /* Initialization is the same as for the non-reentrant scanner.
5552 + * This function is called from yylex_destroy(), so don't allocate here.
5553 + */
5554 +
5555 + /* We do not touch yylineno unless the option is enabled. */
5556 + yylineno = 1;
5557 +
5558 + (yy_buffer_stack) = 0;
5559 + (yy_buffer_stack_top) = 0;
5560 + (yy_buffer_stack_max) = 0;
5561 + (yy_c_buf_p) = (char *) 0;
5562 + (yy_init) = 0;
5563 + (yy_start) = 0;
5564 +
5565 +/* Defined in main.c */
5566 +#ifdef YY_STDINIT
5567 + yyin = stdin;
5568 + yyout = stdout;
5569 +#else
5570 + yyin = (FILE *) 0;
5571 + yyout = (FILE *) 0;
5572 +#endif
5573 +
5574 + /* For future reference: Set errno on error, since we are called by
5575 + * yylex_init()
5576 + */
5577 + return 0;
5578 +}
5579 +
5580 +/* yylex_destroy is for both reentrant and non-reentrant scanners. */
5581 +int yylex_destroy (void)
5582 +{
5583 +
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();
5589 + }
5590 +
5591 + /* Destroy the stack itself. */
5592 + yyfree((yy_buffer_stack) );
5593 + (yy_buffer_stack) = NULL;
5594 +
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( );
5598 +
5599 + return 0;
5600 +}
5601 +
5602 +/*
5603 + * Internal utility routines.
5604 + */
5605 +
5606 +#ifndef yytext_ptr
5607 +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
5608 +{
5609 + register int i;
5610 + for ( i = 0; i < n; ++i )
5611 + s1[i] = s2[i];
5612 +}
5613 +#endif
5614 +
5615 +#ifdef YY_NEED_STRLEN
5616 +static int yy_flex_strlen (yyconst char * s )
5617 +{
5618 + register int n;
5619 + for ( n = 0; s[n]; ++n )
5620 + ;
5621 +
5622 + return n;
5623 +}
5624 +#endif
5625 +
5626 +void *yyalloc (yy_size_t size )
5627 +{
5628 + return (void *) malloc( size );
5629 +}
5630 +
5631 +void *yyrealloc (void * ptr, yy_size_t size )
5632 +{
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.
5639 + */
5640 + return (void *) realloc( (char *) ptr, size );
5641 +}
5642 +
5643 +void yyfree (void * ptr )
5644 +{
5645 + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
5646 +}
5647 +
5648 +#define YYTABLES_NAME "yytables"
5649 +
5650 +#line 222 "dtc-lexer.l"
5651 +
5652 +
5653 +
5654 +
5655 +/*
5656 + * Stack of nested include file contexts.
5657 + */
5658 +
5659 +struct incl_file {
5660 + int filenum;
5661 + FILE *file;
5662 + YY_BUFFER_STATE yy_prev_buf;
5663 + int yy_prev_lineno;
5664 + struct incl_file *prev;
5665 +};
5666 +
5667 +struct incl_file *incl_file_stack;
5668 +
5669 +
5670 +/*
5671 + * Detect infinite include recursion.
5672 + */
5673 +#define MAX_INCLUDE_DEPTH (100)
5674 +
5675 +static int incl_depth = 0;
5676 +
5677 +
5678 +int push_input_file(const char *filename)
5679 +{
5680 + FILE *f;
5681 + struct incl_file *incl_file;
5682 +
5683 + if (!filename) {
5684 + yyerror("No include file name given.");
5685 + return 0;
5686 + }
5687 +
5688 + if (incl_depth++ >= MAX_INCLUDE_DEPTH) {
5689 + yyerror("Includes nested too deeply");
5690 + return 0;
5691 + }
5692 +
5693 + f = dtc_open_file(filename);
5694 +
5695 + incl_file = malloc(sizeof(struct incl_file));
5696 + if (!incl_file) {
5697 + yyerror("Can not allocate include file space.");
5698 + return 0;
5699 + }
5700 +
5701 + /*
5702 + * Save current context.
5703 + */
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;
5709 +
5710 + incl_file_stack = incl_file;
5711 +
5712 + /*
5713 + * Establish new context.
5714 + */
5715 + srcpos_filenum = lookup_file_name(filename, 0);
5716 + yylineno = 1;
5717 + yyin = f;
5718 + yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
5719 +
5720 + return 1;
5721 +}
5722 +
5723 +
5724 +int pop_input_file(void)
5725 +{
5726 + struct incl_file *incl_file;
5727 +
5728 + if (incl_file_stack == 0)
5729 + return 0;
5730 +
5731 + fclose(yyin);
5732 +
5733 + /*
5734 + * Pop.
5735 + */
5736 + --incl_depth;
5737 + incl_file = incl_file_stack;
5738 + incl_file_stack = incl_file->prev;
5739 +
5740 + /*
5741 + * Recover old context.
5742 + */
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;
5748 +
5749 + /*
5750 + * Free old state.
5751 + */
5752 + free(incl_file);
5753 +
5754 + if (YY_CURRENT_BUFFER == 0)
5755 + return 0;
5756 +
5757 + return 1;
5758 +}
5759 +
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
5763 @@ -0,0 +1,1983 @@
5764 +/* A Bison parser, made by GNU Bison 2.3. */
5765 +
5766 +/* Skeleton implementation for Bison's Yacc-like parsers in C
5767 +
5768 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
5769 + Free Software Foundation, Inc.
5770 +
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.
5775 +
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.
5780 +
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. */
5785 +
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.
5795 +
5796 + This special exception was added by the Free Software Foundation in
5797 + version 2.2 of Bison. */
5798 +
5799 +/* C LALR(1) parser skeleton written by Richard Stallman, by
5800 + simplifying the original so-called "semantic" parser. */
5801 +
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. */
5808 +
5809 +/* Identify Bison output. */
5810 +#define YYBISON 1
5811 +
5812 +/* Bison version. */
5813 +#define YYBISON_VERSION "2.3"
5814 +
5815 +/* Skeleton name. */
5816 +#define YYSKELETON_NAME "yacc.c"
5817 +
5818 +/* Pure parsers. */
5819 +#define YYPURE 0
5820 +
5821 +/* Using locations. */
5822 +#define YYLSP_NEEDED 1
5823 +
5824 +
5825 +
5826 +/* Tokens. */
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 {
5832 + DT_V1 = 258,
5833 + DT_MEMRESERVE = 259,
5834 + DT_PROPNODENAME = 260,
5835 + DT_LITERAL = 261,
5836 + DT_LEGACYLITERAL = 262,
5837 + DT_BASE = 263,
5838 + DT_BYTE = 264,
5839 + DT_STRING = 265,
5840 + DT_LABEL = 266,
5841 + DT_REF = 267
5842 + };
5843 +#endif
5844 +/* Tokens. */
5845 +#define DT_V1 258
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
5854 +#define DT_REF 267
5855 +
5856 +
5857 +
5858 +
5859 +/* Copy the first part of user declarations. */
5860 +#line 23 "dtc-parser.y"
5861 +
5862 +#include "dtc.h"
5863 +#include "srcpos.h"
5864 +
5865 +int yylex(void);
5866 +unsigned long long eval_literal(const char *s, int base, int bits);
5867 +
5868 +extern struct boot_info *the_boot_info;
5869 +
5870 +
5871 +
5872 +/* Enabling traces. */
5873 +#ifndef YYDEBUG
5874 +# define YYDEBUG 0
5875 +#endif
5876 +
5877 +/* Enabling verbose error messages. */
5878 +#ifdef YYERROR_VERBOSE
5879 +# undef YYERROR_VERBOSE
5880 +# define YYERROR_VERBOSE 1
5881 +#else
5882 +# define YYERROR_VERBOSE 0
5883 +#endif
5884 +
5885 +/* Enabling the token table. */
5886 +#ifndef YYTOKEN_TABLE
5887 +# define YYTOKEN_TABLE 0
5888 +#endif
5889 +
5890 +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
5891 +typedef union YYSTYPE
5892 +#line 34 "dtc-parser.y"
5893 +{
5894 + char *propnodename;
5895 + char *literal;
5896 + char *labelref;
5897 + unsigned int cbase;
5898 + u8 byte;
5899 + struct data data;
5900 +
5901 + u64 addr;
5902 + cell_t cell;
5903 + struct property *prop;
5904 + struct property *proplist;
5905 + struct node *node;
5906 + struct node *nodelist;
5907 + struct reserve_info *re;
5908 +}
5909 +/* Line 187 of yacc.c. */
5910 +#line 148 "dtc-parser.tab.c"
5911 + YYSTYPE;
5912 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
5913 +# define YYSTYPE_IS_DECLARED 1
5914 +# define YYSTYPE_IS_TRIVIAL 1
5915 +#endif
5916 +
5917 +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
5918 +typedef struct YYLTYPE
5919 +{
5920 + int first_line;
5921 + int first_column;
5922 + int last_line;
5923 + int last_column;
5924 +} YYLTYPE;
5925 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
5926 +# define YYLTYPE_IS_DECLARED 1
5927 +# define YYLTYPE_IS_TRIVIAL 1
5928 +#endif
5929 +
5930 +
5931 +/* Copy the second part of user declarations. */
5932 +
5933 +
5934 +/* Line 216 of yacc.c. */
5935 +#line 173 "dtc-parser.tab.c"
5936 +
5937 +#ifdef short
5938 +# undef short
5939 +#endif
5940 +
5941 +#ifdef YYTYPE_UINT8
5942 +typedef YYTYPE_UINT8 yytype_uint8;
5943 +#else
5944 +typedef unsigned char yytype_uint8;
5945 +#endif
5946 +
5947 +#ifdef YYTYPE_INT8
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;
5952 +#else
5953 +typedef short int yytype_int8;
5954 +#endif
5955 +
5956 +#ifdef YYTYPE_UINT16
5957 +typedef YYTYPE_UINT16 yytype_uint16;
5958 +#else
5959 +typedef unsigned short int yytype_uint16;
5960 +#endif
5961 +
5962 +#ifdef YYTYPE_INT16
5963 +typedef YYTYPE_INT16 yytype_int16;
5964 +#else
5965 +typedef short int yytype_int16;
5966 +#endif
5967 +
5968 +#ifndef YYSIZE_T
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
5977 +# else
5978 +# define YYSIZE_T unsigned int
5979 +# endif
5980 +#endif
5981 +
5982 +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
5983 +
5984 +#ifndef YY_
5985 +# if YYENABLE_NLS
5986 +# if ENABLE_NLS
5987 +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
5988 +# define YY_(msgid) dgettext ("bison-runtime", msgid)
5989 +# endif
5990 +# endif
5991 +# ifndef YY_
5992 +# define YY_(msgid) msgid
5993 +# endif
5994 +#endif
5995 +
5996 +/* Suppress unused-variable warnings by "using" E. */
5997 +#if ! defined lint || defined __GNUC__
5998 +# define YYUSE(e) ((void) (e))
5999 +#else
6000 +# define YYUSE(e) /* empty */
6001 +#endif
6002 +
6003 +/* Identity function, used to suppress warnings about constant conditions. */
6004 +#ifndef lint
6005 +# define YYID(n) (n)
6006 +#else
6007 +#if (defined __STDC__ || defined __C99__FUNC__ \
6008 + || defined __cplusplus || defined _MSC_VER)
6009 +static int
6010 +YYID (int i)
6011 +#else
6012 +static int
6013 +YYID (i)
6014 + int i;
6015 +#endif
6016 +{
6017 + return i;
6018 +}
6019 +#endif
6020 +
6021 +#if ! defined yyoverflow || YYERROR_VERBOSE
6022 +
6023 +/* The parser invokes alloca or malloc; define the necessary symbols. */
6024 +
6025 +# ifdef YYSTACK_USE_ALLOCA
6026 +# if YYSTACK_USE_ALLOCA
6027 +# ifdef __GNUC__
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
6036 +# else
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 */
6041 +# ifndef _STDLIB_H
6042 +# define _STDLIB_H 1
6043 +# endif
6044 +# endif
6045 +# endif
6046 +# endif
6047 +# endif
6048 +
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 */
6058 +# endif
6059 +# else
6060 +# define YYSTACK_ALLOC YYMALLOC
6061 +# define YYSTACK_FREE YYFREE
6062 +# ifndef YYSTACK_ALLOC_MAXIMUM
6063 +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
6064 +# endif
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 */
6069 +# ifndef _STDLIB_H
6070 +# define _STDLIB_H 1
6071 +# endif
6072 +# endif
6073 +# ifndef YYMALLOC
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 */
6078 +# endif
6079 +# endif
6080 +# ifndef YYFREE
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 */
6085 +# endif
6086 +# endif
6087 +# endif
6088 +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
6089 +
6090 +
6091 +#if (! defined yyoverflow \
6092 + && (! defined __cplusplus \
6093 + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
6094 + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
6095 +
6096 +/* A type that is properly aligned for any stack member. */
6097 +union yyalloc
6098 +{
6099 + yytype_int16 yyss;
6100 + YYSTYPE yyvs;
6101 + YYLTYPE yyls;
6102 +};
6103 +
6104 +/* The size of the maximum gap between one aligned stack and the next. */
6105 +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
6106 +
6107 +/* The size of an array large to enough to hold all stacks, each with
6108 + N elements. */
6109 +# define YYSTACK_BYTES(N) \
6110 + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
6111 + + 2 * YYSTACK_GAP_MAXIMUM)
6112 +
6113 +/* Copy COUNT objects from FROM to TO. The source and destination do
6114 + not overlap. */
6115 +# ifndef YYCOPY
6116 +# if defined __GNUC__ && 1 < __GNUC__
6117 +# define YYCOPY(To, From, Count) \
6118 + __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
6119 +# else
6120 +# define YYCOPY(To, From, Count) \
6121 + do \
6122 + { \
6123 + YYSIZE_T yyi; \
6124 + for (yyi = 0; yyi < (Count); yyi++) \
6125 + (To)[yyi] = (From)[yyi]; \
6126 + } \
6127 + while (YYID (0))
6128 +# endif
6129 +# endif
6130 +
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
6135 + stack. */
6136 +# define YYSTACK_RELOCATE(Stack) \
6137 + do \
6138 + { \
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); \
6144 + } \
6145 + while (YYID (0))
6146 +
6147 +#endif
6148 +
6149 +/* YYFINAL -- State number of the termination state. */
6150 +#define YYFINAL 9
6151 +/* YYLAST -- Last index in YYTABLE. */
6152 +#define YYLAST 60
6153 +
6154 +/* YYNTOKENS -- Number of terminals. */
6155 +#define YYNTOKENS 24
6156 +/* YYNNTS -- Number of nonterminals. */
6157 +#define YYNNTS 20
6158 +/* YYNRULES -- Number of rules. */
6159 +#define YYNRULES 43
6160 +/* YYNRULES -- Number of states. */
6161 +#define YYNSTATES 67
6162 +
6163 +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
6164 +#define YYUNDEFTOK 2
6165 +#define YYMAXUTOK 267
6166 +
6167 +#define YYTRANSLATE(YYX) \
6168 + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
6169 +
6170 +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
6171 +static const yytype_uint8 yytranslate[] =
6172 +{
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
6200 +};
6201 +
6202 +#if YYDEBUG
6203 +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
6204 + YYRHS. */
6205 +static const yytype_uint8 yyprhs[] =
6206 +{
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
6212 +};
6213 +
6214 +/* YYRHS -- A `-1'-separated list of the rules' RHS. */
6215 +static const yytype_int8 yyrhs[] =
6216 +{
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
6230 +};
6231 +
6232 +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
6233 +static const yytype_uint16 yyrline[] =
6234 +{
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
6240 +};
6241 +#endif
6242 +
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[] =
6247 +{
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
6256 +};
6257 +#endif
6258 +
6259 +# ifdef YYPRINT
6260 +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
6261 + token YYLEX-NUM. */
6262 +static const yytype_uint16 yytoknum[] =
6263 +{
6264 + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
6265 + 265, 266, 267, 59, 45, 47, 123, 125, 61, 60,
6266 + 62, 91, 93, 44
6267 +};
6268 +# endif
6269 +
6270 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
6271 +static const yytype_uint8 yyr1[] =
6272 +{
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,
6277 + 41, 42, 43, 43
6278 +};
6279 +
6280 +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
6281 +static const yytype_uint8 yyr2[] =
6282 +{
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,
6287 + 2, 3, 0, 1
6288 +};
6289 +
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[] =
6294 +{
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
6302 +};
6303 +
6304 +/* YYDEFGOTO[NTERM-NUM]. */
6305 +static const yytype_int8 yydefgoto[] =
6306 +{
6307 + -1, 3, 14, 4, 5, 6, 27, 11, 18, 25,
6308 + 29, 44, 45, 54, 61, 62, 55, 30, 31, 7
6309 +};
6310 +
6311 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
6312 + STATE-NUM. */
6313 +#define YYPACT_NINF -13
6314 +static const yytype_int8 yypact[] =
6315 +{
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
6323 +};
6324 +
6325 +/* YYPGOTO[NTERM-NUM]. */
6326 +static const yytype_int8 yypgoto[] =
6327 +{
6328 + -13, -13, 35, 27, 47, -13, -12, 40, 17, -13,
6329 + 26, -13, -13, -13, -13, -13, -13, 29, -13, -8
6330 +};
6331 +
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[] =
6338 +{
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,
6345 + 37
6346 +};
6347 +
6348 +static const yytype_int8 yycheck[] =
6349 +{
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,
6356 + 31
6357 +};
6358 +
6359 +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
6360 + symbol of state STATE-NUM. */
6361 +static const yytype_uint8 yystos[] =
6362 +{
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
6370 +};
6371 +
6372 +#define yyerrok (yyerrstatus = 0)
6373 +#define yyclearin (yychar = YYEMPTY)
6374 +#define YYEMPTY (-2)
6375 +#define YYEOF 0
6376 +
6377 +#define YYACCEPT goto yyacceptlab
6378 +#define YYABORT goto yyabortlab
6379 +#define YYERROR goto yyerrorlab
6380 +
6381 +
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. */
6385 +
6386 +#define YYFAIL goto yyerrlab
6387 +
6388 +#define YYRECOVERING() (!!yyerrstatus)
6389 +
6390 +#define YYBACKUP(Token, Value) \
6391 +do \
6392 + if (yychar == YYEMPTY && yylen == 1) \
6393 + { \
6394 + yychar = (Token); \
6395 + yylval = (Value); \
6396 + yytoken = YYTRANSLATE (yychar); \
6397 + YYPOPSTACK (1); \
6398 + goto yybackup; \
6399 + } \
6400 + else \
6401 + { \
6402 + yyerror (YY_("syntax error: cannot back up")); \
6403 + YYERROR; \
6404 + } \
6405 +while (YYID (0))
6406 +
6407 +
6408 +#define YYTERROR 1
6409 +#define YYERRCODE 256
6410 +
6411 +
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). */
6415 +
6416 +#define YYRHSLOC(Rhs, K) ((Rhs)[K])
6417 +#ifndef YYLLOC_DEFAULT
6418 +# define YYLLOC_DEFAULT(Current, Rhs, N) \
6419 + do \
6420 + if (YYID (N)) \
6421 + { \
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; \
6426 + } \
6427 + else \
6428 + { \
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; \
6433 + } \
6434 + while (YYID (0))
6435 +#endif
6436 +
6437 +
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. */
6441 +
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)
6448 +# else
6449 +# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
6450 +# endif
6451 +#endif
6452 +
6453 +
6454 +/* YYLEX -- calling `yylex' with the right arguments. */
6455 +
6456 +#ifdef YYLEX_PARAM
6457 +# define YYLEX yylex (YYLEX_PARAM)
6458 +#else
6459 +# define YYLEX yylex ()
6460 +#endif
6461 +
6462 +/* Enable debugging if requested. */
6463 +#if YYDEBUG
6464 +
6465 +# ifndef YYFPRINTF
6466 +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
6467 +# define YYFPRINTF fprintf
6468 +# endif
6469 +
6470 +# define YYDPRINTF(Args) \
6471 +do { \
6472 + if (yydebug) \
6473 + YYFPRINTF Args; \
6474 +} while (YYID (0))
6475 +
6476 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
6477 +do { \
6478 + if (yydebug) \
6479 + { \
6480 + YYFPRINTF (stderr, "%s ", Title); \
6481 + yy_symbol_print (stderr, \
6482 + Type, Value, Location); \
6483 + YYFPRINTF (stderr, "\n"); \
6484 + } \
6485 +} while (YYID (0))
6486 +
6487 +
6488 +/*--------------------------------.
6489 +| Print this symbol on YYOUTPUT. |
6490 +`--------------------------------*/
6491 +
6492 +/*ARGSUSED*/
6493 +#if (defined __STDC__ || defined __C99__FUNC__ \
6494 + || defined __cplusplus || defined _MSC_VER)
6495 +static void
6496 +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
6497 +#else
6498 +static void
6499 +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
6500 + FILE *yyoutput;
6501 + int yytype;
6502 + YYSTYPE const * const yyvaluep;
6503 + YYLTYPE const * const yylocationp;
6504 +#endif
6505 +{
6506 + if (!yyvaluep)
6507 + return;
6508 + YYUSE (yylocationp);
6509 +# ifdef YYPRINT
6510 + if (yytype < YYNTOKENS)
6511 + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
6512 +# else
6513 + YYUSE (yyoutput);
6514 +# endif
6515 + switch (yytype)
6516 + {
6517 + default:
6518 + break;
6519 + }
6520 +}
6521 +
6522 +
6523 +/*--------------------------------.
6524 +| Print this symbol on YYOUTPUT. |
6525 +`--------------------------------*/
6526 +
6527 +#if (defined __STDC__ || defined __C99__FUNC__ \
6528 + || defined __cplusplus || defined _MSC_VER)
6529 +static void
6530 +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
6531 +#else
6532 +static void
6533 +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
6534 + FILE *yyoutput;
6535 + int yytype;
6536 + YYSTYPE const * const yyvaluep;
6537 + YYLTYPE const * const yylocationp;
6538 +#endif
6539 +{
6540 + if (yytype < YYNTOKENS)
6541 + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
6542 + else
6543 + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
6544 +
6545 + YY_LOCATION_PRINT (yyoutput, *yylocationp);
6546 + YYFPRINTF (yyoutput, ": ");
6547 + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
6548 + YYFPRINTF (yyoutput, ")");
6549 +}
6550 +
6551 +/*------------------------------------------------------------------.
6552 +| yy_stack_print -- Print the state stack from its BOTTOM up to its |
6553 +| TOP (included). |
6554 +`------------------------------------------------------------------*/
6555 +
6556 +#if (defined __STDC__ || defined __C99__FUNC__ \
6557 + || defined __cplusplus || defined _MSC_VER)
6558 +static void
6559 +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
6560 +#else
6561 +static void
6562 +yy_stack_print (bottom, top)
6563 + yytype_int16 *bottom;
6564 + yytype_int16 *top;
6565 +#endif
6566 +{
6567 + YYFPRINTF (stderr, "Stack now");
6568 + for (; bottom <= top; ++bottom)
6569 + YYFPRINTF (stderr, " %d", *bottom);
6570 + YYFPRINTF (stderr, "\n");
6571 +}
6572 +
6573 +# define YY_STACK_PRINT(Bottom, Top) \
6574 +do { \
6575 + if (yydebug) \
6576 + yy_stack_print ((Bottom), (Top)); \
6577 +} while (YYID (0))
6578 +
6579 +
6580 +/*------------------------------------------------.
6581 +| Report that the YYRULE is going to be reduced. |
6582 +`------------------------------------------------*/
6583 +
6584 +#if (defined __STDC__ || defined __C99__FUNC__ \
6585 + || defined __cplusplus || defined _MSC_VER)
6586 +static void
6587 +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
6588 +#else
6589 +static void
6590 +yy_reduce_print (yyvsp, yylsp, yyrule)
6591 + YYSTYPE *yyvsp;
6592 + YYLTYPE *yylsp;
6593 + int yyrule;
6594 +#endif
6595 +{
6596 + int yynrhs = yyr2[yyrule];
6597 + int yyi;
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++)
6603 + {
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");
6609 + }
6610 +}
6611 +
6612 +# define YY_REDUCE_PRINT(Rule) \
6613 +do { \
6614 + if (yydebug) \
6615 + yy_reduce_print (yyvsp, yylsp, Rule); \
6616 +} while (YYID (0))
6617 +
6618 +/* Nonzero means print parse trace. It is left uninitialized so that
6619 + multiple parsers can coexist. */
6620 +int yydebug;
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 */
6627 +
6628 +
6629 +/* YYINITDEPTH -- initial size of the parser's stacks. */
6630 +#ifndef YYINITDEPTH
6631 +# define YYINITDEPTH 200
6632 +#endif
6633 +
6634 +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
6635 + if the built-in stack extension method is used).
6636 +
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. */
6640 +
6641 +#ifndef YYMAXDEPTH
6642 +# define YYMAXDEPTH 10000
6643 +#endif
6644 +
6645 +\f
6646 +
6647 +#if YYERROR_VERBOSE
6648 +
6649 +# ifndef yystrlen
6650 +# if defined __GLIBC__ && defined _STRING_H
6651 +# define yystrlen strlen
6652 +# else
6653 +/* Return the length of YYSTR. */
6654 +#if (defined __STDC__ || defined __C99__FUNC__ \
6655 + || defined __cplusplus || defined _MSC_VER)
6656 +static YYSIZE_T
6657 +yystrlen (const char *yystr)
6658 +#else
6659 +static YYSIZE_T
6660 +yystrlen (yystr)
6661 + const char *yystr;
6662 +#endif
6663 +{
6664 + YYSIZE_T yylen;
6665 + for (yylen = 0; yystr[yylen]; yylen++)
6666 + continue;
6667 + return yylen;
6668 +}
6669 +# endif
6670 +# endif
6671 +
6672 +# ifndef yystpcpy
6673 +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
6674 +# define yystpcpy stpcpy
6675 +# else
6676 +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
6677 + YYDEST. */
6678 +#if (defined __STDC__ || defined __C99__FUNC__ \
6679 + || defined __cplusplus || defined _MSC_VER)
6680 +static char *
6681 +yystpcpy (char *yydest, const char *yysrc)
6682 +#else
6683 +static char *
6684 +yystpcpy (yydest, yysrc)
6685 + char *yydest;
6686 + const char *yysrc;
6687 +#endif
6688 +{
6689 + char *yyd = yydest;
6690 + const char *yys = yysrc;
6691 +
6692 + while ((*yyd++ = *yys++) != '\0')
6693 + continue;
6694 +
6695 + return yyd - 1;
6696 +}
6697 +# endif
6698 +# endif
6699 +
6700 +# ifndef yytnamerr
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. */
6708 +static YYSIZE_T
6709 +yytnamerr (char *yyres, const char *yystr)
6710 +{
6711 + if (*yystr == '"')
6712 + {
6713 + YYSIZE_T yyn = 0;
6714 + char const *yyp = yystr;
6715 +
6716 + for (;;)
6717 + switch (*++yyp)
6718 + {
6719 + case '\'':
6720 + case ',':
6721 + goto do_not_strip_quotes;
6722 +
6723 + case '\\':
6724 + if (*++yyp != '\\')
6725 + goto do_not_strip_quotes;
6726 + /* Fall through. */
6727 + default:
6728 + if (yyres)
6729 + yyres[yyn] = *yyp;
6730 + yyn++;
6731 + break;
6732 +
6733 + case '"':
6734 + if (yyres)
6735 + yyres[yyn] = '\0';
6736 + return yyn;
6737 + }
6738 + do_not_strip_quotes: ;
6739 + }
6740 +
6741 + if (! yyres)
6742 + return yystrlen (yystr);
6743 +
6744 + return yystpcpy (yyres, yystr) - yyres;
6745 +}
6746 +# endif
6747 +
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. */
6755 +static YYSIZE_T
6756 +yysyntax_error (char *yyresult, int yystate, int yychar)
6757 +{
6758 + int yyn = yypact[yystate];
6759 +
6760 + if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
6761 + return 0;
6762 + else
6763 + {
6764 + int yytype = YYTRANSLATE (yychar);
6765 + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
6766 + YYSIZE_T yysize = yysize0;
6767 + YYSIZE_T yysize1;
6768 + int yysize_overflow = 0;
6769 + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
6770 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
6771 + int yyx;
6772 +
6773 +# if 0
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");
6781 +# endif
6782 + char *yyfmt;
6783 + char const *yyf;
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;
6792 +
6793 + /* Start YYX at -YYN if negative to avoid negative indexes in
6794 + YYCHECK. */
6795 + int yyxbegin = yyn < 0 ? -yyn : 0;
6796 +
6797 + /* Stay within bounds of both yycheck and yytname. */
6798 + int yychecklim = YYLAST - yyn + 1;
6799 + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
6800 + int yycount = 1;
6801 +
6802 + yyarg[0] = yytname[yytype];
6803 + yyfmt = yystpcpy (yyformat, yyunexpected);
6804 +
6805 + for (yyx = yyxbegin; yyx < yyxend; ++yyx)
6806 + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
6807 + {
6808 + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
6809 + {
6810 + yycount = 1;
6811 + yysize = yysize0;
6812 + yyformat[sizeof yyunexpected - 1] = '\0';
6813 + break;
6814 + }
6815 + yyarg[yycount++] = yytname[yyx];
6816 + yysize1 = yysize + yytnamerr (0, yytname[yyx]);
6817 + yysize_overflow |= (yysize1 < yysize);
6818 + yysize = yysize1;
6819 + yyfmt = yystpcpy (yyfmt, yyprefix);
6820 + yyprefix = yyor;
6821 + }
6822 +
6823 + yyf = YY_(yyformat);
6824 + yysize1 = yysize + yystrlen (yyf);
6825 + yysize_overflow |= (yysize1 < yysize);
6826 + yysize = yysize1;
6827 +
6828 + if (yysize_overflow)
6829 + return YYSIZE_MAXIMUM;
6830 +
6831 + if (yyresult)
6832 + {
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;
6837 + int yyi = 0;
6838 + while ((*yyp = *yyf) != '\0')
6839 + {
6840 + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
6841 + {
6842 + yyp += yytnamerr (yyp, yyarg[yyi++]);
6843 + yyf += 2;
6844 + }
6845 + else
6846 + {
6847 + yyp++;
6848 + yyf++;
6849 + }
6850 + }
6851 + }
6852 + return yysize;
6853 + }
6854 +}
6855 +#endif /* YYERROR_VERBOSE */
6856 +\f
6857 +
6858 +/*-----------------------------------------------.
6859 +| Release the memory associated to this symbol. |
6860 +`-----------------------------------------------*/
6861 +
6862 +/*ARGSUSED*/
6863 +#if (defined __STDC__ || defined __C99__FUNC__ \
6864 + || defined __cplusplus || defined _MSC_VER)
6865 +static void
6866 +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
6867 +#else
6868 +static void
6869 +yydestruct (yymsg, yytype, yyvaluep, yylocationp)
6870 + const char *yymsg;
6871 + int yytype;
6872 + YYSTYPE *yyvaluep;
6873 + YYLTYPE *yylocationp;
6874 +#endif
6875 +{
6876 + YYUSE (yyvaluep);
6877 + YYUSE (yylocationp);
6878 +
6879 + if (!yymsg)
6880 + yymsg = "Deleting";
6881 + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
6882 +
6883 + switch (yytype)
6884 + {
6885 +
6886 + default:
6887 + break;
6888 + }
6889 +}
6890 +\f
6891 +
6892 +/* Prevent warnings from -Wmissing-prototypes. */
6893 +
6894 +#ifdef YYPARSE_PARAM
6895 +#if defined __STDC__ || defined __cplusplus
6896 +int yyparse (void *YYPARSE_PARAM);
6897 +#else
6898 +int yyparse ();
6899 +#endif
6900 +#else /* ! YYPARSE_PARAM */
6901 +#if defined __STDC__ || defined __cplusplus
6902 +int yyparse (void);
6903 +#else
6904 +int yyparse ();
6905 +#endif
6906 +#endif /* ! YYPARSE_PARAM */
6907 +
6908 +
6909 +
6910 +/* The look-ahead symbol. */
6911 +int yychar;
6912 +
6913 +/* The semantic value of the look-ahead symbol. */
6914 +YYSTYPE yylval;
6915 +
6916 +/* Number of syntax errors so far. */
6917 +int yynerrs;
6918 +/* Location data for the look-ahead symbol. */
6919 +YYLTYPE yylloc;
6920 +
6921 +
6922 +
6923 +/*----------.
6924 +| yyparse. |
6925 +`----------*/
6926 +
6927 +#ifdef YYPARSE_PARAM
6928 +#if (defined __STDC__ || defined __C99__FUNC__ \
6929 + || defined __cplusplus || defined _MSC_VER)
6930 +int
6931 +yyparse (void *YYPARSE_PARAM)
6932 +#else
6933 +int
6934 +yyparse (YYPARSE_PARAM)
6935 + void *YYPARSE_PARAM;
6936 +#endif
6937 +#else /* ! YYPARSE_PARAM */
6938 +#if (defined __STDC__ || defined __C99__FUNC__ \
6939 + || defined __cplusplus || defined _MSC_VER)
6940 +int
6941 +yyparse (void)
6942 +#else
6943 +int
6944 +yyparse ()
6945 +
6946 +#endif
6947 +#endif
6948 +{
6949 +
6950 + int yystate;
6951 + int yyn;
6952 + int yyresult;
6953 + /* Number of tokens to shift before error messages enabled. */
6954 + int yyerrstatus;
6955 + /* Look-ahead token as an internal (translated) token number. */
6956 + int yytoken = 0;
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;
6962 +#endif
6963 +
6964 + /* Three stacks and their tools:
6965 + `yyss': related to states,
6966 + `yyvs': related to semantic values,
6967 + `yyls': related to locations.
6968 +
6969 + Refer to the stacks thru separate pointers, to allow yyoverflow
6970 + to reallocate them elsewhere. */
6971 +
6972 + /* The state stack. */
6973 + yytype_int16 yyssa[YYINITDEPTH];
6974 + yytype_int16 *yyss = yyssa;
6975 + yytype_int16 *yyssp;
6976 +
6977 + /* The semantic value stack. */
6978 + YYSTYPE yyvsa[YYINITDEPTH];
6979 + YYSTYPE *yyvs = yyvsa;
6980 + YYSTYPE *yyvsp;
6981 +
6982 + /* The location stack. */
6983 + YYLTYPE yylsa[YYINITDEPTH];
6984 + YYLTYPE *yyls = yylsa;
6985 + YYLTYPE *yylsp;
6986 + /* The locations where the error started and ended. */
6987 + YYLTYPE yyerror_range[2];
6988 +
6989 +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
6990 +
6991 + YYSIZE_T yystacksize = YYINITDEPTH;
6992 +
6993 + /* The variables used to return semantic value and location from the
6994 + action routines. */
6995 + YYSTYPE yyval;
6996 + YYLTYPE yyloc;
6997 +
6998 + /* The number of symbols on the RHS of the reduced rule.
6999 + Keep to zero when no symbol should be popped. */
7000 + int yylen = 0;
7001 +
7002 + YYDPRINTF ((stderr, "Starting parse\n"));
7003 +
7004 + yystate = 0;
7005 + yyerrstatus = 0;
7006 + yynerrs = 0;
7007 + yychar = YYEMPTY; /* Cause a token to be read. */
7008 +
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. */
7013 +
7014 + yyssp = yyss;
7015 + yyvsp = yyvs;
7016 + yylsp = yyls;
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;
7021 +#endif
7022 +
7023 + goto yysetstate;
7024 +
7025 +/*------------------------------------------------------------.
7026 +| yynewstate -- Push a new state, which is found in yystate. |
7027 +`------------------------------------------------------------*/
7028 + yynewstate:
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. */
7031 + yyssp++;
7032 +
7033 + yysetstate:
7034 + *yyssp = yystate;
7035 +
7036 + if (yyss + yystacksize - 1 <= yyssp)
7037 + {
7038 + /* Get the current used size of the three stacks, in elements. */
7039 + YYSIZE_T yysize = yyssp - yyss + 1;
7040 +
7041 +#ifdef yyoverflow
7042 + {
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
7045 + memory. */
7046 + YYSTYPE *yyvs1 = yyvs;
7047 + yytype_int16 *yyss1 = yyss;
7048 + YYLTYPE *yyls1 = yyls;
7049 +
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),
7058 + &yystacksize);
7059 + yyls = yyls1;
7060 + yyss = yyss1;
7061 + yyvs = yyvs1;
7062 + }
7063 +#else /* no yyoverflow */
7064 +# ifndef YYSTACK_RELOCATE
7065 + goto yyexhaustedlab;
7066 +# else
7067 + /* Extend the stack our own way. */
7068 + if (YYMAXDEPTH <= yystacksize)
7069 + goto yyexhaustedlab;
7070 + yystacksize *= 2;
7071 + if (YYMAXDEPTH < yystacksize)
7072 + yystacksize = YYMAXDEPTH;
7073 +
7074 + {
7075 + yytype_int16 *yyss1 = yyss;
7076 + union yyalloc *yyptr =
7077 + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
7078 + if (! yyptr)
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);
7086 + }
7087 +# endif
7088 +#endif /* no yyoverflow */
7089 +
7090 + yyssp = yyss + yysize - 1;
7091 + yyvsp = yyvs + yysize - 1;
7092 + yylsp = yyls + yysize - 1;
7093 +
7094 + YYDPRINTF ((stderr, "Stack size increased to %lu\n",
7095 + (unsigned long int) yystacksize));
7096 +
7097 + if (yyss + yystacksize - 1 <= yyssp)
7098 + YYABORT;
7099 + }
7100 +
7101 + YYDPRINTF ((stderr, "Entering state %d\n", yystate));
7102 +
7103 + goto yybackup;
7104 +
7105 +/*-----------.
7106 +| yybackup. |
7107 +`-----------*/
7108 +yybackup:
7109 +
7110 + /* Do appropriate processing given the current state. Read a
7111 + look-ahead token if we need one and don't already have one. */
7112 +
7113 + /* First try to decide what to do without reference to look-ahead token. */
7114 + yyn = yypact[yystate];
7115 + if (yyn == YYPACT_NINF)
7116 + goto yydefault;
7117 +
7118 + /* Not known => get a look-ahead token if don't already have one. */
7119 +
7120 + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
7121 + if (yychar == YYEMPTY)
7122 + {
7123 + YYDPRINTF ((stderr, "Reading a token: "));
7124 + yychar = YYLEX;
7125 + }
7126 +
7127 + if (yychar <= YYEOF)
7128 + {
7129 + yychar = yytoken = YYEOF;
7130 + YYDPRINTF ((stderr, "Now at end of input.\n"));
7131 + }
7132 + else
7133 + {
7134 + yytoken = YYTRANSLATE (yychar);
7135 + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
7136 + }
7137 +
7138 + /* If the proper action on seeing token YYTOKEN is to reduce or to
7139 + detect an error, take that action. */
7140 + yyn += yytoken;
7141 + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
7142 + goto yydefault;
7143 + yyn = yytable[yyn];
7144 + if (yyn <= 0)
7145 + {
7146 + if (yyn == 0 || yyn == YYTABLE_NINF)
7147 + goto yyerrlab;
7148 + yyn = -yyn;
7149 + goto yyreduce;
7150 + }
7151 +
7152 + if (yyn == YYFINAL)
7153 + YYACCEPT;
7154 +
7155 + /* Count tokens shifted since error; after three, turn off error
7156 + status. */
7157 + if (yyerrstatus)
7158 + yyerrstatus--;
7159 +
7160 + /* Shift the look-ahead token. */
7161 + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
7162 +
7163 + /* Discard the shifted token unless it is eof. */
7164 + if (yychar != YYEOF)
7165 + yychar = YYEMPTY;
7166 +
7167 + yystate = yyn;
7168 + *++yyvsp = yylval;
7169 + *++yylsp = yylloc;
7170 + goto yynewstate;
7171 +
7172 +
7173 +/*-----------------------------------------------------------.
7174 +| yydefault -- do the default action for the current state. |
7175 +`-----------------------------------------------------------*/
7176 +yydefault:
7177 + yyn = yydefact[yystate];
7178 + if (yyn == 0)
7179 + goto yyerrlab;
7180 + goto yyreduce;
7181 +
7182 +
7183 +/*-----------------------------.
7184 +| yyreduce -- Do a reduction. |
7185 +`-----------------------------*/
7186 +yyreduce:
7187 + /* yyn is the number of a rule to reduce with. */
7188 + yylen = yyr2[yyn];
7189 +
7190 + /* If YYLEN is nonzero, implement the default value of the action:
7191 + `$$ = $1'.
7192 +
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];
7199 +
7200 + /* Default location. */
7201 + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
7202 + YY_REDUCE_PRINT (yyn);
7203 + switch (yyn)
7204 + {
7205 + case 2:
7206 +#line 86 "dtc-parser.y"
7207 + {
7208 + the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node));
7209 + ;}
7210 + break;
7211 +
7212 + case 3:
7213 +#line 90 "dtc-parser.y"
7214 + {
7215 + the_boot_info = build_boot_info((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].node));
7216 + ;}
7217 + break;
7218 +
7219 + case 4:
7220 +#line 97 "dtc-parser.y"
7221 + {
7222 + (yyval.re) = NULL;
7223 + ;}
7224 + break;
7225 +
7226 + case 5:
7227 +#line 101 "dtc-parser.y"
7228 + {
7229 + (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
7230 + ;}
7231 + break;
7232 +
7233 + case 6:
7234 +#line 108 "dtc-parser.y"
7235 + {
7236 + (yyval.re) = build_reserve_entry((yyvsp[(3) - (5)].addr), (yyvsp[(4) - (5)].addr), (yyvsp[(1) - (5)].labelref));
7237 + ;}
7238 + break;
7239 +
7240 + case 7:
7241 +#line 115 "dtc-parser.y"
7242 + {
7243 + (yyval.re) = NULL;
7244 + ;}
7245 + break;
7246 +
7247 + case 8:
7248 +#line 119 "dtc-parser.y"
7249 + {
7250 + (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
7251 + ;}
7252 + break;
7253 +
7254 + case 9:
7255 +#line 126 "dtc-parser.y"
7256 + {
7257 + (yyval.re) = (yyvsp[(1) - (1)].re);
7258 + ;}
7259 + break;
7260 +
7261 + case 10:
7262 +#line 130 "dtc-parser.y"
7263 + {
7264 + (yyval.re) = build_reserve_entry((yyvsp[(3) - (6)].addr), (yyvsp[(5) - (6)].addr) - (yyvsp[(3) - (6)].addr) + 1, (yyvsp[(1) - (6)].labelref));
7265 + ;}
7266 + break;
7267 +
7268 + case 11:
7269 +#line 137 "dtc-parser.y"
7270 + {
7271 + (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
7272 + ;}
7273 + break;
7274 +
7275 + case 12:
7276 +#line 141 "dtc-parser.y"
7277 + {
7278 + (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 16, 64);
7279 + ;}
7280 + break;
7281 +
7282 + case 13:
7283 +#line 148 "dtc-parser.y"
7284 + {
7285 + (yyval.node) = name_node((yyvsp[(2) - (2)].node), "", NULL);
7286 + ;}
7287 + break;
7288 +
7289 + case 14:
7290 +#line 155 "dtc-parser.y"
7291 + {
7292 + (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
7293 + ;}
7294 + break;
7295 +
7296 + case 15:
7297 +#line 162 "dtc-parser.y"
7298 + {
7299 + (yyval.proplist) = NULL;
7300 + ;}
7301 + break;
7302 +
7303 + case 16:
7304 +#line 166 "dtc-parser.y"
7305 + {
7306 + (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
7307 + ;}
7308 + break;
7309 +
7310 + case 17:
7311 +#line 173 "dtc-parser.y"
7312 + {
7313 + (yyval.prop) = build_property((yyvsp[(2) - (5)].propnodename), (yyvsp[(4) - (5)].data), (yyvsp[(1) - (5)].labelref));
7314 + ;}
7315 + break;
7316 +
7317 + case 18:
7318 +#line 177 "dtc-parser.y"
7319 + {
7320 + (yyval.prop) = build_property((yyvsp[(2) - (3)].propnodename), empty_data, (yyvsp[(1) - (3)].labelref));
7321 + ;}
7322 + break;
7323 +
7324 + case 19:
7325 +#line 184 "dtc-parser.y"
7326 + {
7327 + (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
7328 + ;}
7329 + break;
7330 +
7331 + case 20:
7332 +#line 188 "dtc-parser.y"
7333 + {
7334 + (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
7335 + ;}
7336 + break;
7337 +
7338 + case 21:
7339 +#line 192 "dtc-parser.y"
7340 + {
7341 + (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
7342 + ;}
7343 + break;
7344 +
7345 + case 22:
7346 +#line 196 "dtc-parser.y"
7347 + {
7348 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
7349 + ;}
7350 + break;
7351 +
7352 + case 23:
7353 +#line 200 "dtc-parser.y"
7354 + {
7355 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7356 + ;}
7357 + break;
7358 +
7359 + case 24:
7360 +#line 207 "dtc-parser.y"
7361 + {
7362 + (yyval.data) = empty_data;
7363 + ;}
7364 + break;
7365 +
7366 + case 25:
7367 +#line 211 "dtc-parser.y"
7368 + {
7369 + (yyval.data) = (yyvsp[(1) - (2)].data);
7370 + ;}
7371 + break;
7372 +
7373 + case 26:
7374 +#line 215 "dtc-parser.y"
7375 + {
7376 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7377 + ;}
7378 + break;
7379 +
7380 + case 27:
7381 +#line 222 "dtc-parser.y"
7382 + {
7383 + (yyval.data) = empty_data;
7384 + ;}
7385 + break;
7386 +
7387 + case 28:
7388 +#line 226 "dtc-parser.y"
7389 + {
7390 + (yyval.data) = data_append_cell((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].cell));
7391 + ;}
7392 + break;
7393 +
7394 + case 29:
7395 +#line 230 "dtc-parser.y"
7396 + {
7397 + (yyval.data) = data_append_cell(data_add_marker((yyvsp[(1) - (2)].data), REF_PHANDLE,
7398 + (yyvsp[(2) - (2)].labelref)), -1);
7399 + ;}
7400 + break;
7401 +
7402 + case 30:
7403 +#line 235 "dtc-parser.y"
7404 + {
7405 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7406 + ;}
7407 + break;
7408 +
7409 + case 31:
7410 +#line 242 "dtc-parser.y"
7411 + {
7412 + (yyval.cbase) = 16;
7413 + ;}
7414 + break;
7415 +
7416 + case 33:
7417 +#line 250 "dtc-parser.y"
7418 + {
7419 + (yyval.cell) = eval_literal((yyvsp[(1) - (1)].literal), 0, 32);
7420 + ;}
7421 + break;
7422 +
7423 + case 34:
7424 +#line 254 "dtc-parser.y"
7425 + {
7426 + (yyval.cell) = eval_literal((yyvsp[(2) - (2)].literal), (yyvsp[(1) - (2)].cbase), 32);
7427 + ;}
7428 + break;
7429 +
7430 + case 35:
7431 +#line 261 "dtc-parser.y"
7432 + {
7433 + (yyval.data) = empty_data;
7434 + ;}
7435 + break;
7436 +
7437 + case 36:
7438 +#line 265 "dtc-parser.y"
7439 + {
7440 + (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
7441 + ;}
7442 + break;
7443 +
7444 + case 37:
7445 +#line 269 "dtc-parser.y"
7446 + {
7447 + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
7448 + ;}
7449 + break;
7450 +
7451 + case 38:
7452 +#line 276 "dtc-parser.y"
7453 + {
7454 + (yyval.nodelist) = NULL;
7455 + ;}
7456 + break;
7457 +
7458 + case 39:
7459 +#line 280 "dtc-parser.y"
7460 + {
7461 + (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
7462 + ;}
7463 + break;
7464 +
7465 + case 40:
7466 +#line 284 "dtc-parser.y"
7467 + {
7468 + yyerror("syntax error: properties must precede subnodes\n");
7469 + YYERROR;
7470 + ;}
7471 + break;
7472 +
7473 + case 41:
7474 +#line 292 "dtc-parser.y"
7475 + {
7476 + (yyval.node) = name_node((yyvsp[(3) - (3)].node), (yyvsp[(2) - (3)].propnodename), (yyvsp[(1) - (3)].labelref));
7477 + ;}
7478 + break;
7479 +
7480 + case 42:
7481 +#line 299 "dtc-parser.y"
7482 + {
7483 + (yyval.labelref) = NULL;
7484 + ;}
7485 + break;
7486 +
7487 + case 43:
7488 +#line 303 "dtc-parser.y"
7489 + {
7490 + (yyval.labelref) = (yyvsp[(1) - (1)].labelref);
7491 + ;}
7492 + break;
7493 +
7494 +
7495 +/* Line 1267 of yacc.c. */
7496 +#line 1734 "dtc-parser.tab.c"
7497 + default: break;
7498 + }
7499 + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
7500 +
7501 + YYPOPSTACK (yylen);
7502 + yylen = 0;
7503 + YY_STACK_PRINT (yyss, yyssp);
7504 +
7505 + *++yyvsp = yyval;
7506 + *++yylsp = yyloc;
7507 +
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. */
7511 +
7512 + yyn = yyr1[yyn];
7513 +
7514 + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
7515 + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
7516 + yystate = yytable[yystate];
7517 + else
7518 + yystate = yydefgoto[yyn - YYNTOKENS];
7519 +
7520 + goto yynewstate;
7521 +
7522 +
7523 +/*------------------------------------.
7524 +| yyerrlab -- here on detecting error |
7525 +`------------------------------------*/
7526 +yyerrlab:
7527 + /* If not already recovering from an error, report this error. */
7528 + if (!yyerrstatus)
7529 + {
7530 + ++yynerrs;
7531 +#if ! YYERROR_VERBOSE
7532 + yyerror (YY_("syntax error"));
7533 +#else
7534 + {
7535 + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
7536 + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
7537 + {
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);
7544 + if (yymsg)
7545 + yymsg_alloc = yyalloc;
7546 + else
7547 + {
7548 + yymsg = yymsgbuf;
7549 + yymsg_alloc = sizeof yymsgbuf;
7550 + }
7551 + }
7552 +
7553 + if (0 < yysize && yysize <= yymsg_alloc)
7554 + {
7555 + (void) yysyntax_error (yymsg, yystate, yychar);
7556 + yyerror (yymsg);
7557 + }
7558 + else
7559 + {
7560 + yyerror (YY_("syntax error"));
7561 + if (yysize != 0)
7562 + goto yyexhaustedlab;
7563 + }
7564 + }
7565 +#endif
7566 + }
7567 +
7568 + yyerror_range[0] = yylloc;
7569 +
7570 + if (yyerrstatus == 3)
7571 + {
7572 + /* If just tried and failed to reuse look-ahead token after an
7573 + error, discard it. */
7574 +
7575 + if (yychar <= YYEOF)
7576 + {
7577 + /* Return failure if at end of input. */
7578 + if (yychar == YYEOF)
7579 + YYABORT;
7580 + }
7581 + else
7582 + {
7583 + yydestruct ("Error: discarding",
7584 + yytoken, &yylval, &yylloc);
7585 + yychar = YYEMPTY;
7586 + }
7587 + }
7588 +
7589 + /* Else will try to reuse look-ahead token after shifting the error
7590 + token. */
7591 + goto yyerrlab1;
7592 +
7593 +
7594 +/*---------------------------------------------------.
7595 +| yyerrorlab -- error raised explicitly by YYERROR. |
7596 +`---------------------------------------------------*/
7597 +yyerrorlab:
7598 +
7599 + /* Pacify compilers like GCC when the user code never invokes
7600 + YYERROR and the label yyerrorlab therefore never appears in user
7601 + code. */
7602 + if (/*CONSTCOND*/ 0)
7603 + goto yyerrorlab;
7604 +
7605 + yyerror_range[0] = yylsp[1-yylen];
7606 + /* Do not reclaim the symbols of the rule which action triggered
7607 + this YYERROR. */
7608 + YYPOPSTACK (yylen);
7609 + yylen = 0;
7610 + YY_STACK_PRINT (yyss, yyssp);
7611 + yystate = *yyssp;
7612 + goto yyerrlab1;
7613 +
7614 +
7615 +/*-------------------------------------------------------------.
7616 +| yyerrlab1 -- common code for both syntax error and YYERROR. |
7617 +`-------------------------------------------------------------*/
7618 +yyerrlab1:
7619 + yyerrstatus = 3; /* Each real token shifted decrements this. */
7620 +
7621 + for (;;)
7622 + {
7623 + yyn = yypact[yystate];
7624 + if (yyn != YYPACT_NINF)
7625 + {
7626 + yyn += YYTERROR;
7627 + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
7628 + {
7629 + yyn = yytable[yyn];
7630 + if (0 < yyn)
7631 + break;
7632 + }
7633 + }
7634 +
7635 + /* Pop the current state because it cannot handle the error token. */
7636 + if (yyssp == yyss)
7637 + YYABORT;
7638 +
7639 + yyerror_range[0] = *yylsp;
7640 + yydestruct ("Error: popping",
7641 + yystos[yystate], yyvsp, yylsp);
7642 + YYPOPSTACK (1);
7643 + yystate = *yyssp;
7644 + YY_STACK_PRINT (yyss, yyssp);
7645 + }
7646 +
7647 + if (yyn == YYFINAL)
7648 + YYACCEPT;
7649 +
7650 + *++yyvsp = yylval;
7651 +
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);
7656 + *++yylsp = yyloc;
7657 +
7658 + /* Shift the error token. */
7659 + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
7660 +
7661 + yystate = yyn;
7662 + goto yynewstate;
7663 +
7664 +
7665 +/*-------------------------------------.
7666 +| yyacceptlab -- YYACCEPT comes here. |
7667 +`-------------------------------------*/
7668 +yyacceptlab:
7669 + yyresult = 0;
7670 + goto yyreturn;
7671 +
7672 +/*-----------------------------------.
7673 +| yyabortlab -- YYABORT comes here. |
7674 +`-----------------------------------*/
7675 +yyabortlab:
7676 + yyresult = 1;
7677 + goto yyreturn;
7678 +
7679 +#ifndef yyoverflow
7680 +/*-------------------------------------------------.
7681 +| yyexhaustedlab -- memory exhaustion comes here. |
7682 +`-------------------------------------------------*/
7683 +yyexhaustedlab:
7684 + yyerror (YY_("memory exhausted"));
7685 + yyresult = 2;
7686 + /* Fall through. */
7687 +#endif
7688 +
7689 +yyreturn:
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)
7698 + {
7699 + yydestruct ("Cleanup: popping",
7700 + yystos[*yyssp], yyvsp, yylsp);
7701 + YYPOPSTACK (1);
7702 + }
7703 +#ifndef yyoverflow
7704 + if (yyss != yyssa)
7705 + YYSTACK_FREE (yyss);
7706 +#endif
7707 +#if YYERROR_VERBOSE
7708 + if (yymsg != yymsgbuf)
7709 + YYSTACK_FREE (yymsg);
7710 +#endif
7711 + /* Make sure YYID is used. */
7712 + return YYID (yyresult);
7713 +}
7714 +
7715 +
7716 +#line 308 "dtc-parser.y"
7717 +
7718 +
7719 +void yyerror (char const *s)
7720 +{
7721 + const char *fname = srcpos_filename_for_num(yylloc.filenum);
7722 +
7723 + if (strcmp(fname, "-") == 0)
7724 + fname = "stdin";
7725 +
7726 + fprintf(stderr, "%s:%d %s\n",
7727 + fname, yylloc.first_line, s);
7728 +}
7729 +
7730 +unsigned long long eval_literal(const char *s, int base, int bits)
7731 +{
7732 + unsigned long long val;
7733 + char *e;
7734 +
7735 + errno = 0;
7736 + val = strtoull(s, &e, base);
7737 + if (*e)
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");
7744 + return val;
7745 +}
7746 +
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
7750 @@ -0,0 +1,111 @@
7751 +/* A Bison parser, made by GNU Bison 2.3. */
7752 +
7753 +/* Skeleton interface for Bison's Yacc-like parsers in C
7754 +
7755 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7756 + Free Software Foundation, Inc.
7757 +
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.
7762 +
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.
7767 +
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. */
7772 +
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.
7782 +
7783 + This special exception was added by the Free Software Foundation in
7784 + version 2.2 of Bison. */
7785 +
7786 +/* Tokens. */
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 {
7792 + DT_V1 = 258,
7793 + DT_MEMRESERVE = 259,
7794 + DT_PROPNODENAME = 260,
7795 + DT_LITERAL = 261,
7796 + DT_LEGACYLITERAL = 262,
7797 + DT_BASE = 263,
7798 + DT_BYTE = 264,
7799 + DT_STRING = 265,
7800 + DT_LABEL = 266,
7801 + DT_REF = 267
7802 + };
7803 +#endif
7804 +/* Tokens. */
7805 +#define DT_V1 258
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
7814 +#define DT_REF 267
7815 +
7816 +
7817 +
7818 +
7819 +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
7820 +typedef union YYSTYPE
7821 +#line 34 "dtc-parser.y"
7822 +{
7823 + char *propnodename;
7824 + char *literal;
7825 + char *labelref;
7826 + unsigned int cbase;
7827 + u8 byte;
7828 + struct data data;
7829 +
7830 + u64 addr;
7831 + cell_t cell;
7832 + struct property *prop;
7833 + struct property *proplist;
7834 + struct node *node;
7835 + struct node *nodelist;
7836 + struct reserve_info *re;
7837 +}
7838 +/* Line 1489 of yacc.c. */
7839 +#line 90 "dtc-parser.tab.h"
7840 + YYSTYPE;
7841 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
7842 +# define YYSTYPE_IS_DECLARED 1
7843 +# define YYSTYPE_IS_TRIVIAL 1
7844 +#endif
7845 +
7846 +extern YYSTYPE yylval;
7847 +
7848 +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
7849 +typedef struct YYLTYPE
7850 +{
7851 + int first_line;
7852 + int first_column;
7853 + int last_line;
7854 + int last_column;
7855 +} YYLTYPE;
7856 +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
7857 +# define YYLTYPE_IS_DECLARED 1
7858 +# define YYLTYPE_IS_TRIVIAL 1
7859 +#endif
7860 +
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
7865 @@ -0,0 +1,336 @@
7866 +/*
7867 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
7868 + *
7869 + *
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.
7874 + *
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.
7879 + *
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
7883 + * USA
7884 + */
7885 +
7886 +%locations
7887 +
7888 +%{
7889 +#include "dtc.h"
7890 +#include "srcpos.h"
7891 +
7892 +int yylex(void);
7893 +unsigned long long eval_literal(const char *s, int base, int bits);
7894 +
7895 +extern struct boot_info *the_boot_info;
7896 +
7897 +%}
7898 +
7899 +%union {
7900 + char *propnodename;
7901 + char *literal;
7902 + char *labelref;
7903 + unsigned int cbase;
7904 + u8 byte;
7905 + struct data data;
7906 +
7907 + u64 addr;
7908 + cell_t cell;
7909 + struct property *prop;
7910 + struct property *proplist;
7911 + struct node *node;
7912 + struct node *nodelist;
7913 + struct reserve_info *re;
7914 +}
7915 +
7916 +%token DT_V1
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
7926 +
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
7933 +%type <addr> addr
7934 +%type <data> celllist
7935 +%type <cbase> cellbase
7936 +%type <cell> cellval
7937 +%type <data> bytestring
7938 +%type <prop> propdef
7939 +%type <proplist> proplist
7940 +
7941 +%type <node> devicetree
7942 +%type <node> nodedef
7943 +%type <node> subnode
7944 +%type <nodelist> subnodes
7945 +%type <labelref> label
7946 +
7947 +%%
7948 +
7949 +sourcefile:
7950 + DT_V1 ';' memreserves devicetree
7951 + {
7952 + the_boot_info = build_boot_info($3, $4);
7953 + }
7954 + | v0_memreserves devicetree
7955 + {
7956 + the_boot_info = build_boot_info($1, $2);
7957 + }
7958 + ;
7959 +
7960 +memreserves:
7961 + /* empty */
7962 + {
7963 + $$ = NULL;
7964 + }
7965 + | memreserve memreserves
7966 + {
7967 + $$ = chain_reserve_entry($1, $2);
7968 + }
7969 + ;
7970 +
7971 +memreserve:
7972 + label DT_MEMRESERVE addr addr ';'
7973 + {
7974 + $$ = build_reserve_entry($3, $4, $1);
7975 + }
7976 + ;
7977 +
7978 +v0_memreserves:
7979 + /* empty */
7980 + {
7981 + $$ = NULL;
7982 + }
7983 + | v0_memreserve v0_memreserves
7984 + {
7985 + $$ = chain_reserve_entry($1, $2);
7986 + };
7987 + ;
7988 +
7989 +v0_memreserve:
7990 + memreserve
7991 + {
7992 + $$ = $1;
7993 + }
7994 + | label DT_MEMRESERVE addr '-' addr ';'
7995 + {
7996 + $$ = build_reserve_entry($3, $5 - $3 + 1, $1);
7997 + }
7998 + ;
7999 +
8000 +addr:
8001 + DT_LITERAL
8002 + {
8003 + $$ = eval_literal($1, 0, 64);
8004 + }
8005 + | DT_LEGACYLITERAL
8006 + {
8007 + $$ = eval_literal($1, 16, 64);
8008 + }
8009 + ;
8010 +
8011 +devicetree:
8012 + '/' nodedef
8013 + {
8014 + $$ = name_node($2, "", NULL);
8015 + }
8016 + ;
8017 +
8018 +nodedef:
8019 + '{' proplist subnodes '}' ';'
8020 + {
8021 + $$ = build_node($2, $3);
8022 + }
8023 + ;
8024 +
8025 +proplist:
8026 + /* empty */
8027 + {
8028 + $$ = NULL;
8029 + }
8030 + | proplist propdef
8031 + {
8032 + $$ = chain_property($2, $1);
8033 + }
8034 + ;
8035 +
8036 +propdef:
8037 + label DT_PROPNODENAME '=' propdata ';'
8038 + {
8039 + $$ = build_property($2, $4, $1);
8040 + }
8041 + | label DT_PROPNODENAME ';'
8042 + {
8043 + $$ = build_property($2, empty_data, $1);
8044 + }
8045 + ;
8046 +
8047 +propdata:
8048 + propdataprefix DT_STRING
8049 + {
8050 + $$ = data_merge($1, $2);
8051 + }
8052 + | propdataprefix '<' celllist '>'
8053 + {
8054 + $$ = data_merge($1, $3);
8055 + }
8056 + | propdataprefix '[' bytestring ']'
8057 + {
8058 + $$ = data_merge($1, $3);
8059 + }
8060 + | propdataprefix DT_REF
8061 + {
8062 + $$ = data_add_marker($1, REF_PATH, $2);
8063 + }
8064 + | propdata DT_LABEL
8065 + {
8066 + $$ = data_add_marker($1, LABEL, $2);
8067 + }
8068 + ;
8069 +
8070 +propdataprefix:
8071 + /* empty */
8072 + {
8073 + $$ = empty_data;
8074 + }
8075 + | propdata ','
8076 + {
8077 + $$ = $1;
8078 + }
8079 + | propdataprefix DT_LABEL
8080 + {
8081 + $$ = data_add_marker($1, LABEL, $2);
8082 + }
8083 + ;
8084 +
8085 +celllist:
8086 + /* empty */
8087 + {
8088 + $$ = empty_data;
8089 + }
8090 + | celllist cellval
8091 + {
8092 + $$ = data_append_cell($1, $2);
8093 + }
8094 + | celllist DT_REF
8095 + {
8096 + $$ = data_append_cell(data_add_marker($1, REF_PHANDLE,
8097 + $2), -1);
8098 + }
8099 + | celllist DT_LABEL
8100 + {
8101 + $$ = data_add_marker($1, LABEL, $2);
8102 + }
8103 + ;
8104 +
8105 +cellbase:
8106 + /* empty */
8107 + {
8108 + $$ = 16;
8109 + }
8110 + | DT_BASE
8111 + ;
8112 +
8113 +cellval:
8114 + DT_LITERAL
8115 + {
8116 + $$ = eval_literal($1, 0, 32);
8117 + }
8118 + | cellbase DT_LEGACYLITERAL
8119 + {
8120 + $$ = eval_literal($2, $1, 32);
8121 + }
8122 + ;
8123 +
8124 +bytestring:
8125 + /* empty */
8126 + {
8127 + $$ = empty_data;
8128 + }
8129 + | bytestring DT_BYTE
8130 + {
8131 + $$ = data_append_byte($1, $2);
8132 + }
8133 + | bytestring DT_LABEL
8134 + {
8135 + $$ = data_add_marker($1, LABEL, $2);
8136 + }
8137 + ;
8138 +
8139 +subnodes:
8140 + /* empty */
8141 + {
8142 + $$ = NULL;
8143 + }
8144 + | subnode subnodes
8145 + {
8146 + $$ = chain_node($1, $2);
8147 + }
8148 + | subnode propdef
8149 + {
8150 + yyerror("syntax error: properties must precede subnodes\n");
8151 + YYERROR;
8152 + }
8153 + ;
8154 +
8155 +subnode:
8156 + label DT_PROPNODENAME nodedef
8157 + {
8158 + $$ = name_node($3, $2, $1);
8159 + }
8160 + ;
8161 +
8162 +label:
8163 + /* empty */
8164 + {
8165 + $$ = NULL;
8166 + }
8167 + | DT_LABEL
8168 + {
8169 + $$ = $1;
8170 + }
8171 + ;
8172 +
8173 +%%
8174 +
8175 +void yyerror (char const *s)
8176 +{
8177 + const char *fname = srcpos_filename_for_num(yylloc.filenum);
8178 +
8179 + if (strcmp(fname, "-") == 0)
8180 + fname = "stdin";
8181 +
8182 + fprintf(stderr, "%s:%d %s\n",
8183 + fname, yylloc.first_line, s);
8184 +}
8185 +
8186 +unsigned long long eval_literal(const char *s, int base, int bits)
8187 +{
8188 + unsigned long long val;
8189 + char *e;
8190 +
8191 + errno = 0;
8192 + val = strtoull(s, &e, base);
8193 + if (*e)
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");
8200 + return val;
8201 +}
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
8205 @@ -0,0 +1,231 @@
8206 +/*
8207 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
8208 + *
8209 + *
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.
8214 + *
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.
8219 + *
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
8223 + * USA
8224 + */
8225 +
8226 +#include "dtc.h"
8227 +#include "srcpos.h"
8228 +
8229 +#include "version_gen.h"
8230 +
8231 +/*
8232 + * Command line options
8233 + */
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 */
8238 +
8239 +char *join_path(const char *path, const char *name)
8240 +{
8241 + int lenp = strlen(path);
8242 + int lenn = strlen(name);
8243 + int len;
8244 + int needslash = 1;
8245 + char *str;
8246 +
8247 + len = lenp + lenn + 2;
8248 + if ((lenp > 0) && (path[lenp-1] == '/')) {
8249 + needslash = 0;
8250 + len--;
8251 + }
8252 +
8253 + str = xmalloc(len);
8254 + memcpy(str, path, lenp);
8255 + if (needslash) {
8256 + str[lenp] = '/';
8257 + lenp++;
8258 + }
8259 + memcpy(str+lenp, name, lenn+1);
8260 + return str;
8261 +}
8262 +
8263 +void fill_fullpaths(struct node *tree, const char *prefix)
8264 +{
8265 + struct node *child;
8266 + const char *unit;
8267 +
8268 + tree->fullpath = join_path(prefix, tree->name);
8269 +
8270 + unit = strchr(tree->name, '@');
8271 + if (unit)
8272 + tree->basenamelen = unit - tree->name;
8273 + else
8274 + tree->basenamelen = strlen(tree->name);
8275 +
8276 + for_each_child(tree, child)
8277 + fill_fullpaths(child, tree->fullpath);
8278 +}
8279 +
8280 +static void __attribute__ ((noreturn)) usage(void)
8281 +{
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");
8314 + exit(2);
8315 +}
8316 +
8317 +int main(int argc, char *argv[])
8318 +{
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;
8324 + const char *arg;
8325 + int opt;
8326 + FILE *inf = NULL;
8327 + FILE *outf = NULL;
8328 + int outversion = DEFAULT_FDT_VERSION;
8329 + int boot_cpuid_phys = 0xfeedbeef;
8330 +
8331 + quiet = 0;
8332 + reservenum = 0;
8333 + minsize = 0;
8334 + padsize = 0;
8335 +
8336 + while ((opt = getopt(argc, argv, "hI:O:o:V:R:S:p:fcqb:v")) != EOF) {
8337 + switch (opt) {
8338 + case 'I':
8339 + inform = optarg;
8340 + break;
8341 + case 'O':
8342 + outform = optarg;
8343 + break;
8344 + case 'o':
8345 + outname = optarg;
8346 + break;
8347 + case 'V':
8348 + outversion = strtol(optarg, NULL, 0);
8349 + break;
8350 + case 'R':
8351 + reservenum = strtol(optarg, NULL, 0);
8352 + break;
8353 + case 'S':
8354 + minsize = strtol(optarg, NULL, 0);
8355 + break;
8356 + case 'p':
8357 + padsize = strtol(optarg, NULL, 0);
8358 + break;
8359 + case 'f':
8360 + force = 1;
8361 + break;
8362 + case 'c':
8363 + check = 1;
8364 + break;
8365 + case 'q':
8366 + quiet++;
8367 + break;
8368 + case 'b':
8369 + boot_cpuid_phys = strtol(optarg, NULL, 0);
8370 + break;
8371 + case 'v':
8372 + printf("Version: %s\n", DTC_VERSION);
8373 + exit(0);
8374 + case 'h':
8375 + default:
8376 + usage();
8377 + }
8378 + }
8379 +
8380 + if (argc > (optind+1))
8381 + usage();
8382 + else if (argc < (optind+1))
8383 + arg = "-";
8384 + else
8385 + arg = argv[optind];
8386 +
8387 + /* minsize and padsize are mutually exclusive */
8388 + if ((minsize) && (padsize)) {
8389 + die("Can't set both -p and -S\n");
8390 + }
8391 +
8392 + fprintf(stderr, "DTC: %s->%s on file \"%s\"\n",
8393 + inform, outform, arg);
8394 +
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);
8402 + } else {
8403 + die("Unknown input format \"%s\"\n", inform);
8404 + }
8405 +
8406 + if (inf && (inf != stdin))
8407 + fclose(inf);
8408 +
8409 + if (! bi || ! bi->dt)
8410 + die("Couldn't read input tree\n");
8411 +
8412 + process_checks(force, bi, check, outversion, boot_cpuid_phys);
8413 +
8414 + if (streq(outname, "-")) {
8415 + outf = stdout;
8416 + } else {
8417 + outf = fopen(outname, "w");
8418 + if (! outf)
8419 + die("Couldn't open output file %s: %s\n",
8420 + outname, strerror(errno));
8421 + }
8422 +
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")) {
8430 + /* do nothing */
8431 + } else {
8432 + die("Unknown output format \"%s\"\n", outform);
8433 + }
8434 +
8435 + exit(0);
8436 +}
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
8440 @@ -0,0 +1,269 @@
8441 +#ifndef _DTC_H
8442 +#define _DTC_H
8443 +
8444 +/*
8445 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
8446 + *
8447 + *
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.
8452 + *
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.
8457 + *
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
8461 + * USA
8462 + */
8463 +
8464 +#include <stdio.h>
8465 +#include <string.h>
8466 +#include <stdlib.h>
8467 +#include <stdint.h>
8468 +#include <stdarg.h>
8469 +#include <assert.h>
8470 +#include <ctype.h>
8471 +#include <errno.h>
8472 +#include <unistd.h>
8473 +#include <netinet/in.h>
8474 +#include <endian.h>
8475 +#include <byteswap.h>
8476 +
8477 +#include <fdt.h>
8478 +
8479 +#define DEFAULT_FDT_VERSION 17
8480 +/*
8481 + * Command line options
8482 + */
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 */
8487 +
8488 +static inline void __attribute__((noreturn)) die(char * str, ...)
8489 +{
8490 + va_list ap;
8491 +
8492 + va_start(ap, str);
8493 + fprintf(stderr, "FATAL ERROR: ");
8494 + vfprintf(stderr, str, ap);
8495 + exit(1);
8496 +}
8497 +
8498 +static inline void *xmalloc(size_t len)
8499 +{
8500 + void *new = malloc(len);
8501 +
8502 + if (! new)
8503 + die("malloc() failed\n");
8504 +
8505 + return new;
8506 +}
8507 +
8508 +static inline void *xrealloc(void *p, size_t len)
8509 +{
8510 + void *new = realloc(p, len);
8511 +
8512 + if (! new)
8513 + die("realloc() failed (len=%d)\n", len);
8514 +
8515 + return new;
8516 +}
8517 +
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;
8523 +
8524 +#define cpu_to_be16(x) htons(x)
8525 +#define be16_to_cpu(x) ntohs(x)
8526 +
8527 +#define cpu_to_be32(x) htonl(x)
8528 +#define be32_to_cpu(x) ntohl(x)
8529 +
8530 +#if __BYTE_ORDER == __BIG_ENDIAN
8531 +#define cpu_to_be64(x) (x)
8532 +#define be64_to_cpu(x) (x)
8533 +#else
8534 +#define cpu_to_be64(x) bswap_64(x)
8535 +#define be64_to_cpu(x) bswap_64(x)
8536 +#endif
8537 +
8538 +#define streq(a, b) (strcmp((a), (b)) == 0)
8539 +#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
8540 +
8541 +#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
8542 +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
8543 +
8544 +/* Data blobs */
8545 +enum markertype {
8546 + REF_PHANDLE,
8547 + REF_PATH,
8548 + LABEL,
8549 +};
8550 +
8551 +struct marker {
8552 + enum markertype type;
8553 + int offset;
8554 + char *ref;
8555 + struct marker *next;
8556 +};
8557 +
8558 +struct data {
8559 + int len;
8560 + char *val;
8561 + int asize;
8562 + struct marker *markers;
8563 +};
8564 +
8565 +
8566 +#define empty_data ((struct data){ /* all .members = 0 or NULL */ })
8567 +
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))
8573 +
8574 +void data_free(struct data d);
8575 +
8576 +struct data data_grow_for(struct data d, int xlen);
8577 +
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);
8581 +
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);
8592 +
8593 +struct data data_add_marker(struct data d, enum markertype type, char *ref);
8594 +
8595 +int data_is_one_string(struct data d);
8596 +
8597 +/* DT constraints */
8598 +
8599 +#define MAX_PROPNAME_LEN 31
8600 +#define MAX_NODENAME_LEN 31
8601 +
8602 +/* Live trees */
8603 +struct property {
8604 + char *name;
8605 + struct data val;
8606 +
8607 + struct property *next;
8608 +
8609 + char *label;
8610 +};
8611 +
8612 +struct node {
8613 + char *name;
8614 + struct property *proplist;
8615 + struct node *children;
8616 +
8617 + struct node *parent;
8618 + struct node *next_sibling;
8619 +
8620 + char *fullpath;
8621 + int basenamelen;
8622 +
8623 + cell_t phandle;
8624 + int addr_cells, size_cells;
8625 +
8626 + char *label;
8627 +};
8628 +
8629 +#define for_each_property(n, p) \
8630 + for ((p) = (n)->proplist; (p); (p) = (p)->next)
8631 +
8632 +#define for_each_child(n, c) \
8633 + for ((c) = (n)->children; (c); (c) = (c)->next_sibling)
8634 +
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);
8638 +
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);
8642 +
8643 +void add_property(struct node *node, struct property *prop);
8644 +void add_child(struct node *parent, struct node *child);
8645 +
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);
8655 +
8656 +/* Boot info (tree plus memreserve information */
8657 +
8658 +struct reserve_info {
8659 + struct fdt_reserve_entry re;
8660 +
8661 + struct reserve_info *next;
8662 +
8663 + char *label;
8664 +};
8665 +
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);
8671 +
8672 +
8673 +struct boot_info {
8674 + struct reserve_info *reservelist;
8675 + struct node *dt; /* the device tree */
8676 +};
8677 +
8678 +struct boot_info *build_boot_info(struct reserve_info *reservelist,
8679 + struct node *tree);
8680 +
8681 +/* Checks */
8682 +
8683 +void process_checks(int force, struct boot_info *bi,
8684 + int checkflag, int outversion, int boot_cpuid_phys);
8685 +
8686 +/* Flattened trees */
8687 +
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);
8692 +
8693 +struct boot_info *dt_from_blob(FILE *f);
8694 +
8695 +/* Tree source */
8696 +
8697 +void dt_to_source(FILE *f, struct boot_info *bi);
8698 +struct boot_info *dt_from_source(const char *f);
8699 +
8700 +/* FS trees */
8701 +
8702 +struct boot_info *dt_from_fs(const char *dirname);
8703 +
8704 +/* misc */
8705 +
8706 +char *join_path(const char *path, const char *name);
8707 +void fill_fullpaths(struct node *tree, const char *prefix);
8708 +
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
8713 @@ -0,0 +1,968 @@
8714 +/*
8715 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
8716 + *
8717 + *
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.
8722 + *
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.
8727 + *
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
8731 + * USA
8732 + */
8733 +
8734 +#include "dtc.h"
8735 +
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
8743 +
8744 +static struct version_info {
8745 + int version;
8746 + int last_comp_version;
8747 + int hdr_size;
8748 + int flags;
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},
8760 +};
8761 +
8762 +struct emitter {
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 *);
8770 +};
8771 +
8772 +static void bin_emit_cell(void *e, cell_t val)
8773 +{
8774 + struct data *dtbuf = e;
8775 +
8776 + *dtbuf = data_append_cell(*dtbuf, val);
8777 +}
8778 +
8779 +static void bin_emit_string(void *e, char *str, int len)
8780 +{
8781 + struct data *dtbuf = e;
8782 +
8783 + if (len == 0)
8784 + len = strlen(str);
8785 +
8786 + *dtbuf = data_append_data(*dtbuf, str, len);
8787 + *dtbuf = data_append_byte(*dtbuf, '\0');
8788 +}
8789 +
8790 +static void bin_emit_align(void *e, int a)
8791 +{
8792 + struct data *dtbuf = e;
8793 +
8794 + *dtbuf = data_append_align(*dtbuf, a);
8795 +}
8796 +
8797 +static void bin_emit_data(void *e, struct data d)
8798 +{
8799 + struct data *dtbuf = e;
8800 +
8801 + *dtbuf = data_append_data(*dtbuf, d.val, d.len);
8802 +}
8803 +
8804 +static void bin_emit_beginnode(void *e, const char *label)
8805 +{
8806 + bin_emit_cell(e, FDT_BEGIN_NODE);
8807 +}
8808 +
8809 +static void bin_emit_endnode(void *e, const char *label)
8810 +{
8811 + bin_emit_cell(e, FDT_END_NODE);
8812 +}
8813 +
8814 +static void bin_emit_property(void *e, const char *label)
8815 +{
8816 + bin_emit_cell(e, FDT_PROP);
8817 +}
8818 +
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,
8827 +};
8828 +
8829 +static void emit_label(FILE *f, const char *prefix, const char *label)
8830 +{
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);
8834 +}
8835 +
8836 +static void emit_offset_label(FILE *f, const char *label, int offset)
8837 +{
8838 + fprintf(f, "\t.globl\t%s\n", label);
8839 + fprintf(f, "%s\t= . + %d\n", label, offset);
8840 +}
8841 +
8842 +static void asm_emit_cell(void *e, cell_t val)
8843 +{
8844 + FILE *f = e;
8845 +
8846 + fprintf(f, "\t.long\t0x%x\n", val);
8847 +}
8848 +
8849 +static void asm_emit_string(void *e, char *str, int len)
8850 +{
8851 + FILE *f = e;
8852 + char c = 0;
8853 +
8854 + if (len != 0) {
8855 + /* XXX: ewww */
8856 + c = str[len];
8857 + str[len] = '\0';
8858 + }
8859 +
8860 + fprintf(f, "\t.string\t\"%s\"\n", str);
8861 +
8862 + if (len != 0) {
8863 + str[len] = c;
8864 + }
8865 +}
8866 +
8867 +static void asm_emit_align(void *e, int a)
8868 +{
8869 + FILE *f = e;
8870 +
8871 + fprintf(f, "\t.balign\t%d\n", a);
8872 +}
8873 +
8874 +static void asm_emit_data(void *e, struct data d)
8875 +{
8876 + FILE *f = e;
8877 + int off = 0;
8878 + struct marker *m;
8879 +
8880 + m = d.markers;
8881 + while (m) {
8882 + if (m->type == LABEL)
8883 + emit_offset_label(f, m->ref, m->offset);
8884 + m = m->next;
8885 + }
8886 +
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);
8891 + }
8892 +
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);
8897 + }
8898 +
8899 + if ((d.len - off) >= 1) {
8900 + fprintf(f, "\t.byte\t0x%hhx\n", d.val[off]);
8901 + off += 1;
8902 + }
8903 +
8904 + assert(off == d.len);
8905 +}
8906 +
8907 +static void asm_emit_beginnode(void *e, const char *label)
8908 +{
8909 + FILE *f = e;
8910 +
8911 + if (label) {
8912 + fprintf(f, "\t.globl\t%s\n", label);
8913 + fprintf(f, "%s:\n", label);
8914 + }
8915 + fprintf(f, "\t.long\tFDT_BEGIN_NODE\n");
8916 +}
8917 +
8918 +static void asm_emit_endnode(void *e, const char *label)
8919 +{
8920 + FILE *f = e;
8921 +
8922 + fprintf(f, "\t.long\tFDT_END_NODE\n");
8923 + if (label) {
8924 + fprintf(f, "\t.globl\t%s_end\n", label);
8925 + fprintf(f, "%s_end:\n", label);
8926 + }
8927 +}
8928 +
8929 +static void asm_emit_property(void *e, const char *label)
8930 +{
8931 + FILE *f = e;
8932 +
8933 + if (label) {
8934 + fprintf(f, "\t.globl\t%s\n", label);
8935 + fprintf(f, "%s:\n", label);
8936 + }
8937 + fprintf(f, "\t.long\tFDT_PROP\n");
8938 +}
8939 +
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,
8948 +};
8949 +
8950 +static int stringtable_insert(struct data *d, const char *str)
8951 +{
8952 + int i;
8953 +
8954 + /* FIXME: do this more efficiently? */
8955 +
8956 + for (i = 0; i < d->len; i++) {
8957 + if (streq(str, d->val + i))
8958 + return i;
8959 + }
8960 +
8961 + *d = data_append_data(*d, str, strlen(str)+1);
8962 + return i;
8963 +}
8964 +
8965 +static void flatten_tree(struct node *tree, struct emitter *emit,
8966 + void *etarget, struct data *strbuf,
8967 + struct version_info *vi)
8968 +{
8969 + struct property *prop;
8970 + struct node *child;
8971 + int seen_name_prop = 0;
8972 +
8973 + emit->beginnode(etarget, tree->label);
8974 +
8975 + if (vi->flags & FTF_FULLPATH)
8976 + emit->string(etarget, tree->fullpath, 0);
8977 + else
8978 + emit->string(etarget, tree->name, 0);
8979 +
8980 + emit->align(etarget, sizeof(cell_t));
8981 +
8982 + for_each_property(tree, prop) {
8983 + int nameoff;
8984 +
8985 + if (streq(prop->name, "name"))
8986 + seen_name_prop = 1;
8987 +
8988 + nameoff = stringtable_insert(strbuf, prop->name);
8989 +
8990 + emit->property(etarget, prop->label);
8991 + emit->cell(etarget, prop->val.len);
8992 + emit->cell(etarget, nameoff);
8993 +
8994 + if ((vi->flags & FTF_VARALIGN) && (prop->val.len >= 8))
8995 + emit->align(etarget, 8);
8996 +
8997 + emit->data(etarget, prop->val);
8998 + emit->align(etarget, sizeof(cell_t));
8999 + }
9000 +
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"));
9005 +
9006 + if ((vi->flags & FTF_VARALIGN) && ((tree->basenamelen+1) >= 8))
9007 + emit->align(etarget, 8);
9008 +
9009 + emit->string(etarget, tree->name, tree->basenamelen);
9010 + emit->align(etarget, sizeof(cell_t));
9011 + }
9012 +
9013 + for_each_child(tree, child) {
9014 + flatten_tree(child, emit, etarget, strbuf, vi);
9015 + }
9016 +
9017 + emit->endnode(etarget, tree->label);
9018 +}
9019 +
9020 +static struct data flatten_reserve_list(struct reserve_info *reservelist,
9021 + struct version_info *vi)
9022 +{
9023 + struct reserve_info *re;
9024 + struct data d = empty_data;
9025 + static struct fdt_reserve_entry null_re = {0,0};
9026 + int j;
9027 +
9028 + for (re = reservelist; re; re = re->next) {
9029 + d = data_append_re(d, &re->re);
9030 + }
9031 + /*
9032 + * Add additional reserved slots if the user asked for them.
9033 + */
9034 + for (j = 0; j < reservenum; j++) {
9035 + d = data_append_re(d, &null_re);
9036 + }
9037 +
9038 + return d;
9039 +}
9040 +
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)
9045 +{
9046 + int reserve_off;
9047 +
9048 + reservesize += sizeof(struct fdt_reserve_entry);
9049 +
9050 + memset(fdt, 0xff, sizeof(*fdt));
9051 +
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);
9055 +
9056 + /* Reserve map should be doubleword aligned */
9057 + reserve_off = ALIGN(vi->hdr_size, 8);
9058 +
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
9062 + + dtsize);
9063 + fdt->totalsize = cpu_to_be32(reserve_off + reservesize + dtsize + strsize);
9064 +
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);
9071 +}
9072 +
9073 +void dt_to_blob(FILE *f, struct boot_info *bi, int version,
9074 + int boot_cpuid_phys)
9075 +{
9076 + struct version_info *vi = NULL;
9077 + int i;
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;
9083 + int padlen = 0;
9084 +
9085 + for (i = 0; i < ARRAY_SIZE(version_table); i++) {
9086 + if (version_table[i].version == version)
9087 + vi = &version_table[i];
9088 + }
9089 + if (!vi)
9090 + die("Unknown device tree blob version %d\n", version);
9091 +
9092 + flatten_tree(bi->dt, &bin_emitter, &dtbuf, &strbuf, vi);
9093 + bin_emit_cell(&dtbuf, FDT_END);
9094 +
9095 + reservebuf = flatten_reserve_list(bi->reservelist, vi);
9096 +
9097 + /* Make header */
9098 + make_fdt_header(&fdt, vi, reservebuf.len, dtbuf.len, strbuf.len,
9099 + boot_cpuid_phys);
9100 +
9101 + /*
9102 + * If the user asked for more space than is used, adjust the totalsize.
9103 + */
9104 + if (minsize > 0) {
9105 + padlen = minsize - be32_to_cpu(fdt.totalsize);
9106 + if ((padlen < 0) && (quiet < 1))
9107 + fprintf(stderr,
9108 + "Warning: blob size %d >= minimum size %d\n",
9109 + be32_to_cpu(fdt.totalsize), minsize);
9110 + }
9111 +
9112 + if (padsize > 0)
9113 + padlen = padsize;
9114 +
9115 + if (padlen > 0) {
9116 + int tsize = be32_to_cpu(fdt.totalsize);
9117 + tsize += padlen;
9118 + fdt.totalsize = cpu_to_be32(tsize);
9119 + }
9120 +
9121 + /*
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.
9125 + */
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);
9132 +
9133 + /*
9134 + * If the user asked for more space than is used, pad out the blob.
9135 + */
9136 + if (padlen > 0)
9137 + blob = data_append_zeroes(blob, padlen);
9138 +
9139 + fwrite(blob.val, blob.len, 1, f);
9140 +
9141 + if (ferror(f))
9142 + die("Error writing device tree blob: %s\n", strerror(errno));
9143 +
9144 + /*
9145 + * data_merge() frees the right-hand element so only the blob
9146 + * remains to be freed.
9147 + */
9148 + data_free(blob);
9149 +}
9150 +
9151 +static void dump_stringtable_asm(FILE *f, struct data strbuf)
9152 +{
9153 + const char *p;
9154 + int len;
9155 +
9156 + p = strbuf.val;
9157 +
9158 + while (p < (strbuf.val + strbuf.len)) {
9159 + len = strlen(p);
9160 + fprintf(f, "\t.string \"%s\"\n", p);
9161 + p += len+1;
9162 + }
9163 +}
9164 +
9165 +void dt_to_asm(FILE *f, struct boot_info *bi, int version, int boot_cpuid_phys)
9166 +{
9167 + struct version_info *vi = NULL;
9168 + int i;
9169 + struct data strbuf = empty_data;
9170 + struct reserve_info *re;
9171 + const char *symprefix = "dt";
9172 +
9173 + for (i = 0; i < ARRAY_SIZE(version_table); i++) {
9174 + if (version_table[i].version == version)
9175 + vi = &version_table[i];
9176 + }
9177 + if (!vi)
9178 + die("Unknown device tree blob version %d\n", version);
9179 +
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);
9186 + fprintf(f, "\n");
9187 +
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);
9202 +
9203 + if (vi->flags & FTF_BOOTCPUID)
9204 + fprintf(f, "\t.long\t%i\t\t\t\t\t/* boot_cpuid_phys */\n",
9205 + boot_cpuid_phys);
9206 +
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);
9210 +
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);
9214 +
9215 + /*
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.
9220 + */
9221 + asm_emit_align(f, 8);
9222 + emit_label(f, symprefix, "reserve_map");
9223 +
9224 + fprintf(f, "/* Memory reserve map from source file */\n");
9225 +
9226 + /*
9227 + * Use .long on high and low halfs of u64s to avoid .quad
9228 + * as it appears .quad isn't available in some assemblers.
9229 + */
9230 + for (re = bi->reservelist; re; re = re->next) {
9231 + if (re->label) {
9232 + fprintf(f, "\t.globl\t%s\n", re->label);
9233 + fprintf(f, "%s:\n", re->label);
9234 + }
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));
9241 + }
9242 + for (i = 0; i < reservenum; i++) {
9243 + fprintf(f, "\t.long\t0, 0\n\t.long\t0, 0\n");
9244 + }
9245 +
9246 + fprintf(f, "\t.long\t0, 0\n\t.long\t0, 0\n");
9247 +
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");
9252 +
9253 + emit_label(f, symprefix, "strings_start");
9254 + dump_stringtable_asm(f, strbuf);
9255 + emit_label(f, symprefix, "strings_end");
9256 +
9257 + emit_label(f, symprefix, "blob_end");
9258 +
9259 + /*
9260 + * If the user asked for more space than is used, pad it out.
9261 + */
9262 + if (minsize > 0) {
9263 + fprintf(f, "\t.space\t%d - (_%s_blob_end - _%s_blob_start), 0\n",
9264 + minsize, symprefix, symprefix);
9265 + }
9266 + if (padsize > 0) {
9267 + fprintf(f, "\t.space\t%d, 0\n", padsize);
9268 + }
9269 + emit_label(f, symprefix, "blob_abs_end");
9270 +
9271 + data_free(strbuf);
9272 +}
9273 +
9274 +struct inbuf {
9275 + char *base, *limit, *ptr;
9276 +};
9277 +
9278 +static void inbuf_init(struct inbuf *inb, void *base, void *limit)
9279 +{
9280 + inb->base = base;
9281 + inb->limit = limit;
9282 + inb->ptr = inb->base;
9283 +}
9284 +
9285 +static void flat_read_chunk(struct inbuf *inb, void *p, int len)
9286 +{
9287 + if ((inb->ptr + len) > inb->limit)
9288 + die("Premature end of data parsing flat device tree\n");
9289 +
9290 + memcpy(p, inb->ptr, len);
9291 +
9292 + inb->ptr += len;
9293 +}
9294 +
9295 +static u32 flat_read_word(struct inbuf *inb)
9296 +{
9297 + u32 val;
9298 +
9299 + assert(((inb->ptr - inb->base) % sizeof(val)) == 0);
9300 +
9301 + flat_read_chunk(inb, &val, sizeof(val));
9302 +
9303 + return be32_to_cpu(val);
9304 +}
9305 +
9306 +static void flat_realign(struct inbuf *inb, int align)
9307 +{
9308 + int off = inb->ptr - inb->base;
9309 +
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");
9313 +}
9314 +
9315 +static char *flat_read_string(struct inbuf *inb)
9316 +{
9317 + int len = 0;
9318 + const char *p = inb->ptr;
9319 + char *str;
9320 +
9321 + do {
9322 + if (p >= inb->limit)
9323 + die("Premature end of data parsing flat device tree\n");
9324 + len++;
9325 + } while ((*p++) != '\0');
9326 +
9327 + str = strdup(inb->ptr);
9328 +
9329 + inb->ptr += len;
9330 +
9331 + flat_realign(inb, sizeof(u32));
9332 +
9333 + return str;
9334 +}
9335 +
9336 +static struct data flat_read_data(struct inbuf *inb, int len)
9337 +{
9338 + struct data d = empty_data;
9339 +
9340 + if (len == 0)
9341 + return empty_data;
9342 +
9343 + d = data_grow_for(d, len);
9344 + d.len = len;
9345 +
9346 + flat_read_chunk(inb, d.val, len);
9347 +
9348 + flat_realign(inb, sizeof(u32));
9349 +
9350 + return d;
9351 +}
9352 +
9353 +static char *flat_read_stringtable(struct inbuf *inb, int offset)
9354 +{
9355 + const char *p;
9356 +
9357 + p = inb->base + offset;
9358 + while (1) {
9359 + if (p >= inb->limit || p < inb->base)
9360 + die("String offset %d overruns string table\n",
9361 + offset);
9362 +
9363 + if (*p == '\0')
9364 + break;
9365 +
9366 + p++;
9367 + }
9368 +
9369 + return strdup(inb->base + offset);
9370 +}
9371 +
9372 +static struct property *flat_read_property(struct inbuf *dtbuf,
9373 + struct inbuf *strbuf, int flags)
9374 +{
9375 + u32 proplen, stroff;
9376 + char *name;
9377 + struct data val;
9378 +
9379 + proplen = flat_read_word(dtbuf);
9380 + stroff = flat_read_word(dtbuf);
9381 +
9382 + name = flat_read_stringtable(strbuf, stroff);
9383 +
9384 + if ((flags & FTF_VARALIGN) && (proplen >= 8))
9385 + flat_realign(dtbuf, 8);
9386 +
9387 + val = flat_read_data(dtbuf, proplen);
9388 +
9389 + return build_property(name, val, NULL);
9390 +}
9391 +
9392 +
9393 +static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
9394 +{
9395 + struct reserve_info *reservelist = NULL;
9396 + struct reserve_info *new;
9397 + const char *p;
9398 + struct fdt_reserve_entry re;
9399 +
9400 + /*
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.
9403 + *
9404 + * First pass, count entries.
9405 + */
9406 + p = inb->ptr;
9407 + while (1) {
9408 + flat_read_chunk(inb, &re, sizeof(re));
9409 + re.address = be64_to_cpu(re.address);
9410 + re.size = be64_to_cpu(re.size);
9411 + if (re.size == 0)
9412 + break;
9413 +
9414 + new = build_reserve_entry(re.address, re.size, NULL);
9415 + reservelist = add_reserve_entry(reservelist, new);
9416 + }
9417 +
9418 + return reservelist;
9419 +}
9420 +
9421 +
9422 +static char *nodename_from_path(const char *ppath, const char *cpath)
9423 +{
9424 + const char *lslash;
9425 + int plen;
9426 +
9427 + lslash = strrchr(cpath, '/');
9428 + if (! lslash)
9429 + return NULL;
9430 +
9431 + plen = lslash - cpath;
9432 +
9433 + if (streq(cpath, "/") && streq(ppath, ""))
9434 + return "";
9435 +
9436 + if ((plen == 0) && streq(ppath, "/"))
9437 + return strdup(lslash+1);
9438 +
9439 + if (! strneq(ppath, cpath, plen))
9440 + return NULL;
9441 +
9442 + return strdup(lslash+1);
9443 +}
9444 +
9445 +static const char PROPCHAR[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,._+*#?-";
9446 +static const char UNITCHAR[] = "0123456789abcdef,";
9447 +
9448 +static int check_node_name(const char *name)
9449 +{
9450 + const char *atpos;
9451 + int basenamelen;
9452 +
9453 + atpos = strrchr(name, '@');
9454 +
9455 + if (atpos)
9456 + basenamelen = atpos - name;
9457 + else
9458 + basenamelen = strlen(name);
9459 +
9460 + if (strspn(name, PROPCHAR) < basenamelen)
9461 + return -1;
9462 +
9463 + if (atpos
9464 + && ((basenamelen + 1 + strspn(atpos+1, UNITCHAR)) < strlen(name)))
9465 + return -1;
9466 +
9467 + return basenamelen;
9468 +}
9469 +
9470 +static struct node *unflatten_tree(struct inbuf *dtbuf,
9471 + struct inbuf *strbuf,
9472 + const char *parent_path, int flags)
9473 +{
9474 + struct node *node;
9475 + u32 val;
9476 +
9477 + node = build_node(NULL, NULL);
9478 +
9479 + if (flags & FTF_FULLPATH) {
9480 + node->fullpath = flat_read_string(dtbuf);
9481 + node->name = nodename_from_path(parent_path, node->fullpath);
9482 +
9483 + if (! node->name)
9484 + die("Path \"%s\" is not valid as a child of \"%s\"\n",
9485 + node->fullpath, parent_path);
9486 + } else {
9487 + node->name = flat_read_string(dtbuf);
9488 + node->fullpath = join_path(parent_path, node->name);
9489 + }
9490 +
9491 + node->basenamelen = check_node_name(node->name);
9492 + if (node->basenamelen < 0) {
9493 + fprintf(stderr, "Warning \"%s\" has incorrect format\n", node->name);
9494 + }
9495 +
9496 + do {
9497 + struct property *prop;
9498 + struct node *child;
9499 +
9500 + val = flat_read_word(dtbuf);
9501 + switch (val) {
9502 + case FDT_PROP:
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);
9508 + break;
9509 +
9510 + case FDT_BEGIN_NODE:
9511 + child = unflatten_tree(dtbuf,strbuf, node->fullpath,
9512 + flags);
9513 + add_child(node, child);
9514 + break;
9515 +
9516 + case FDT_END_NODE:
9517 + break;
9518 +
9519 + case FDT_END:
9520 + die("Premature FDT_END in device tree blob\n");
9521 + break;
9522 +
9523 + case FDT_NOP:
9524 + if (!(flags & FTF_NOPS))
9525 + fprintf(stderr, "Warning: NOP tag found in flat tree"
9526 + " version <16\n");
9527 +
9528 + /* Ignore */
9529 + break;
9530 +
9531 + default:
9532 + die("Invalid opcode word %08x in device tree blob\n",
9533 + val);
9534 + }
9535 + } while (val != FDT_END_NODE);
9536 +
9537 + return node;
9538 +}
9539 +
9540 +
9541 +struct boot_info *dt_from_blob(FILE *f)
9542 +{
9543 + u32 magic, totalsize, version, size_str, size_dt;
9544 + u32 off_dt, off_str, off_mem_rsvmap;
9545 + int rc;
9546 + char *blob;
9547 + struct fdt_header *fdt;
9548 + char *p;
9549 + struct inbuf dtbuf, strbuf;
9550 + struct inbuf memresvbuf;
9551 + int sizeleft;
9552 + struct reserve_info *reservelist;
9553 + struct node *tree;
9554 + u32 val;
9555 + int flags = 0;
9556 +
9557 + rc = fread(&magic, sizeof(magic), 1, f);
9558 + if (ferror(f))
9559 + die("Error reading DT blob magic number: %s\n",
9560 + strerror(errno));
9561 + if (rc < 1) {
9562 + if (feof(f))
9563 + die("EOF reading DT blob magic number\n");
9564 + else
9565 + die("Mysterious short read reading magic number\n");
9566 + }
9567 +
9568 + magic = be32_to_cpu(magic);
9569 + if (magic != FDT_MAGIC)
9570 + die("Blob has incorrect magic number\n");
9571 +
9572 + rc = fread(&totalsize, sizeof(totalsize), 1, f);
9573 + if (ferror(f))
9574 + die("Error reading DT blob size: %s\n", strerror(errno));
9575 + if (rc < 1) {
9576 + if (feof(f))
9577 + die("EOF reading DT blob size\n");
9578 + else
9579 + die("Mysterious short read reading blob size\n");
9580 + }
9581 +
9582 + totalsize = be32_to_cpu(totalsize);
9583 + if (totalsize < FDT_V1_SIZE)
9584 + die("DT blob size (%d) is too small\n", totalsize);
9585 +
9586 + blob = xmalloc(totalsize);
9587 +
9588 + fdt = (struct fdt_header *)blob;
9589 + fdt->magic = cpu_to_be32(magic);
9590 + fdt->totalsize = cpu_to_be32(totalsize);
9591 +
9592 + sizeleft = totalsize - sizeof(magic) - sizeof(totalsize);
9593 + p = blob + sizeof(magic) + sizeof(totalsize);
9594 +
9595 + while (sizeleft) {
9596 + if (feof(f))
9597 + die("EOF before reading %d bytes of DT blob\n",
9598 + totalsize);
9599 +
9600 + rc = fread(p, 1, sizeleft, f);
9601 + if (ferror(f))
9602 + die("Error reading DT blob: %s\n",
9603 + strerror(errno));
9604 +
9605 + sizeleft -= rc;
9606 + p += rc;
9607 + }
9608 +
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);
9613 +
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));
9622 +
9623 + if (off_mem_rsvmap >= totalsize)
9624 + die("Mem Reserve structure offset exceeds total size\n");
9625 +
9626 + if (off_dt >= totalsize)
9627 + die("DT structure offset exceeds total size\n");
9628 +
9629 + if (off_str > totalsize)
9630 + die("String table offset exceeds total size\n");
9631 +
9632 + if (version >= 2)
9633 + fprintf(stderr, "\tboot_cpuid_phys:\t0x%x\n",
9634 + be32_to_cpu(fdt->boot_cpuid_phys));
9635 +
9636 + size_str = -1;
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");
9642 + }
9643 +
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");
9649 + }
9650 +
9651 + if (version < 16) {
9652 + flags |= FTF_FULLPATH | FTF_NAMEPROPS | FTF_VARALIGN;
9653 + } else {
9654 + flags |= FTF_NOPS;
9655 + }
9656 +
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);
9662 + else
9663 + inbuf_init(&strbuf, blob + off_str, blob + totalsize);
9664 +
9665 + reservelist = flat_read_mem_reserve(&memresvbuf);
9666 +
9667 + val = flat_read_word(&dtbuf);
9668 +
9669 + if (val != FDT_BEGIN_NODE)
9670 + die("Device tree blob doesn't begin with FDT_BEGIN_NODE (begins with 0x%08x)\n", val);
9671 +
9672 + tree = unflatten_tree(&dtbuf, &strbuf, "", flags);
9673 +
9674 + val = flat_read_word(&dtbuf);
9675 + if (val != FDT_END)
9676 + die("Device tree blob doesn't end with FDT_END\n");
9677 +
9678 + free(blob);
9679 +
9680 + return build_boot_info(reservelist, tree);
9681 +}
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
9685 @@ -0,0 +1,94 @@
9686 +/*
9687 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
9688 + *
9689 + *
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.
9694 + *
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.
9699 + *
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
9703 + * USA
9704 + */
9705 +
9706 +#include "dtc.h"
9707 +
9708 +#include <dirent.h>
9709 +#include <sys/stat.h>
9710 +
9711 +static struct node *read_fstree(const char *dirname)
9712 +{
9713 + DIR *d;
9714 + struct dirent *de;
9715 + struct stat st;
9716 + struct node *tree;
9717 +
9718 + d = opendir(dirname);
9719 + if (! d)
9720 + die("opendir(): %s\n", strerror(errno));
9721 +
9722 + tree = build_node(NULL, NULL);
9723 +
9724 + while ((de = readdir(d)) != NULL) {
9725 + char *tmpnam;
9726 +
9727 + if (streq(de->d_name, ".")
9728 + || streq(de->d_name, ".."))
9729 + continue;
9730 +
9731 + tmpnam = join_path(dirname, de->d_name);
9732 +
9733 + if (lstat(tmpnam, &st) < 0)
9734 + die("stat(%s): %s\n", tmpnam, strerror(errno));
9735 +
9736 + if (S_ISREG(st.st_mode)) {
9737 + struct property *prop;
9738 + FILE *pfile;
9739 +
9740 + pfile = fopen(tmpnam, "r");
9741 + if (! pfile) {
9742 + fprintf(stderr,
9743 + "WARNING: Cannot open %s: %s\n",
9744 + tmpnam, strerror(errno));
9745 + } else {
9746 + prop = build_property(strdup(de->d_name),
9747 + data_copy_file(pfile,
9748 + st.st_size),
9749 + NULL);
9750 + add_property(tree, prop);
9751 + fclose(pfile);
9752 + }
9753 + } else if (S_ISDIR(st.st_mode)) {
9754 + struct node *newchild;
9755 +
9756 + newchild = read_fstree(tmpnam);
9757 + newchild = name_node(newchild, strdup(de->d_name),
9758 + NULL);
9759 + add_child(tree, newchild);
9760 + }
9761 +
9762 + free(tmpnam);
9763 + }
9764 +
9765 + return tree;
9766 +}
9767 +
9768 +struct boot_info *dt_from_fs(const char *dirname)
9769 +{
9770 + struct node *tree;
9771 +
9772 + tree = read_fstree(dirname);
9773 + tree = name_node(tree, "", NULL);
9774 +
9775 + fill_fullpaths(tree, "");
9776 +
9777 + return build_boot_info(NULL, tree);
9778 +}
9779 +
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
9783 @@ -0,0 +1,305 @@
9784 +/*
9785 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
9786 + *
9787 + *
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.
9792 + *
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.
9797 + *
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
9801 + * USA
9802 + */
9803 +
9804 +#include "dtc.h"
9805 +
9806 +/*
9807 + * Tree building functions
9808 + */
9809 +
9810 +struct property *build_property(char *name, struct data val, char *label)
9811 +{
9812 + struct property *new = xmalloc(sizeof(*new));
9813 +
9814 + new->name = name;
9815 + new->val = val;
9816 +
9817 + new->next = NULL;
9818 +
9819 + new->label = label;
9820 +
9821 + return new;
9822 +}
9823 +
9824 +struct property *chain_property(struct property *first, struct property *list)
9825 +{
9826 + assert(first->next == NULL);
9827 +
9828 + first->next = list;
9829 + return first;
9830 +}
9831 +
9832 +struct property *reverse_properties(struct property *first)
9833 +{
9834 + struct property *p = first;
9835 + struct property *head = NULL;
9836 + struct property *next;
9837 +
9838 + while (p) {
9839 + next = p->next;
9840 + p->next = head;
9841 + head = p;
9842 + p = next;
9843 + }
9844 + return head;
9845 +}
9846 +
9847 +struct node *build_node(struct property *proplist, struct node *children)
9848 +{
9849 + struct node *new = xmalloc(sizeof(*new));
9850 + struct node *child;
9851 +
9852 + memset(new, 0, sizeof(*new));
9853 +
9854 + new->proplist = reverse_properties(proplist);
9855 + new->children = children;
9856 +
9857 + for_each_child(new, child) {
9858 + child->parent = new;
9859 + }
9860 +
9861 + return new;
9862 +}
9863 +
9864 +struct node *name_node(struct node *node, char *name, char * label)
9865 +{
9866 + assert(node->name == NULL);
9867 +
9868 + node->name = name;
9869 +
9870 + node->label = label;
9871 +
9872 + return node;
9873 +}
9874 +
9875 +struct node *chain_node(struct node *first, struct node *list)
9876 +{
9877 + assert(first->next_sibling == NULL);
9878 +
9879 + first->next_sibling = list;
9880 + return first;
9881 +}
9882 +
9883 +void add_property(struct node *node, struct property *prop)
9884 +{
9885 + struct property **p;
9886 +
9887 + prop->next = NULL;
9888 +
9889 + p = &node->proplist;
9890 + while (*p)
9891 + p = &((*p)->next);
9892 +
9893 + *p = prop;
9894 +}
9895 +
9896 +void add_child(struct node *parent, struct node *child)
9897 +{
9898 + struct node **p;
9899 +
9900 + child->next_sibling = NULL;
9901 +
9902 + p = &parent->children;
9903 + while (*p)
9904 + p = &((*p)->next_sibling);
9905 +
9906 + *p = child;
9907 +}
9908 +
9909 +struct reserve_info *build_reserve_entry(u64 address, u64 size, char *label)
9910 +{
9911 + struct reserve_info *new = xmalloc(sizeof(*new));
9912 +
9913 + new->re.address = address;
9914 + new->re.size = size;
9915 +
9916 + new->next = NULL;
9917 +
9918 + new->label = label;
9919 +
9920 + return new;
9921 +}
9922 +
9923 +struct reserve_info *chain_reserve_entry(struct reserve_info *first,
9924 + struct reserve_info *list)
9925 +{
9926 + assert(first->next == NULL);
9927 +
9928 + first->next = list;
9929 + return first;
9930 +}
9931 +
9932 +struct reserve_info *add_reserve_entry(struct reserve_info *list,
9933 + struct reserve_info *new)
9934 +{
9935 + struct reserve_info *last;
9936 +
9937 + new->next = NULL;
9938 +
9939 + if (! list)
9940 + return new;
9941 +
9942 + for (last = list; last->next; last = last->next)
9943 + ;
9944 +
9945 + last->next = new;
9946 +
9947 + return list;
9948 +}
9949 +
9950 +struct boot_info *build_boot_info(struct reserve_info *reservelist,
9951 + struct node *tree)
9952 +{
9953 + struct boot_info *bi;
9954 +
9955 + bi = xmalloc(sizeof(*bi));
9956 + bi->reservelist = reservelist;
9957 + bi->dt = tree;
9958 +
9959 + return bi;
9960 +}
9961 +
9962 +/*
9963 + * Tree accessor functions
9964 + */
9965 +
9966 +const char *get_unitname(struct node *node)
9967 +{
9968 + if (node->name[node->basenamelen] == '\0')
9969 + return "";
9970 + else
9971 + return node->name + node->basenamelen + 1;
9972 +}
9973 +
9974 +struct property *get_property(struct node *node, const char *propname)
9975 +{
9976 + struct property *prop;
9977 +
9978 + for_each_property(node, prop)
9979 + if (streq(prop->name, propname))
9980 + return prop;
9981 +
9982 + return NULL;
9983 +}
9984 +
9985 +cell_t propval_cell(struct property *prop)
9986 +{
9987 + assert(prop->val.len == sizeof(cell_t));
9988 + return be32_to_cpu(*((cell_t *)prop->val.val));
9989 +}
9990 +
9991 +struct node *get_subnode(struct node *node, const char *nodename)
9992 +{
9993 + struct node *child;
9994 +
9995 + for_each_child(node, child)
9996 + if (streq(child->name, nodename))
9997 + return child;
9998 +
9999 + return NULL;
10000 +}
10001 +
10002 +struct node *get_node_by_path(struct node *tree, const char *path)
10003 +{
10004 + const char *p;
10005 + struct node *child;
10006 +
10007 + if (!path || ! (*path))
10008 + return tree;
10009 +
10010 + while (path[0] == '/')
10011 + path++;
10012 +
10013 + p = strchr(path, '/');
10014 +
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))
10019 + return child;
10020 + }
10021 +
10022 + return NULL;
10023 +}
10024 +
10025 +struct node *get_node_by_label(struct node *tree, const char *label)
10026 +{
10027 + struct node *child, *node;
10028 +
10029 + assert(label && (strlen(label) > 0));
10030 +
10031 + if (tree->label && streq(tree->label, label))
10032 + return tree;
10033 +
10034 + for_each_child(tree, child) {
10035 + node = get_node_by_label(child, label);
10036 + if (node)
10037 + return node;
10038 + }
10039 +
10040 + return NULL;
10041 +}
10042 +
10043 +struct node *get_node_by_phandle(struct node *tree, cell_t phandle)
10044 +{
10045 + struct node *child, *node;
10046 +
10047 + assert((phandle != 0) && (phandle != -1));
10048 +
10049 + if (tree->phandle == phandle)
10050 + return tree;
10051 +
10052 + for_each_child(tree, child) {
10053 + node = get_node_by_phandle(child, phandle);
10054 + if (node)
10055 + return node;
10056 + }
10057 +
10058 + return NULL;
10059 +}
10060 +
10061 +struct node *get_node_by_ref(struct node *tree, const char *ref)
10062 +{
10063 + if (ref[0] == '/')
10064 + return get_node_by_path(tree, ref);
10065 + else
10066 + return get_node_by_label(tree, ref);
10067 +}
10068 +
10069 +cell_t get_node_phandle(struct node *root, struct node *node)
10070 +{
10071 + static cell_t phandle = 1; /* FIXME: ick, static local */
10072 +
10073 + if ((node->phandle != 0) && (node->phandle != -1))
10074 + return node->phandle;
10075 +
10076 + assert(! get_property(node, "linux,phandle"));
10077 +
10078 + while (get_node_by_phandle(root, phandle))
10079 + phandle++;
10080 +
10081 + node->phandle = phandle;
10082 + add_property(node,
10083 + build_property("linux,phandle",
10084 + data_append_cell(empty_data, phandle),
10085 + NULL));
10086 +
10087 + return node->phandle;
10088 +}
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
10092 @@ -0,0 +1,105 @@
10093 +/*
10094 + * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc.
10095 + *
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.
10100 + *
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.
10105 + *
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
10109 + * USA
10110 + */
10111 +
10112 +#include "dtc.h"
10113 +#include "srcpos.h"
10114 +
10115 +
10116 +/*
10117 + * Record the complete unique set of opened file names.
10118 + * Primarily used to cache source position file names.
10119 + */
10120 +#define MAX_N_FILE_NAMES (100)
10121 +
10122 +const char *file_names[MAX_N_FILE_NAMES];
10123 +static int n_file_names = 0;
10124 +
10125 +/*
10126 + * Like yylineno, this is the current open file pos.
10127 + */
10128 +
10129 +int srcpos_filenum = -1;
10130 +
10131 +
10132 +
10133 +FILE *dtc_open_file(const char *fname)
10134 +{
10135 + FILE *f;
10136 +
10137 + if (lookup_file_name(fname, 1) < 0)
10138 + die("Too many files opened\n");
10139 +
10140 + if (streq(fname, "-"))
10141 + f = stdin;
10142 + else
10143 + f = fopen(fname, "r");
10144 +
10145 + if (! f)
10146 + die("Couldn't open \"%s\": %s\n", fname, strerror(errno));
10147 +
10148 + return f;
10149 +}
10150 +
10151 +
10152 +
10153 +/*
10154 + * Locate and optionally add filename fname in the file_names[] array.
10155 + *
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.
10158 + *
10159 + * Returns;
10160 + * Index [0..MAX_N_FILE_NAMES) where the filename is kept
10161 + * -1 if the name can not be recorded
10162 + */
10163 +
10164 +int lookup_file_name(const char *fname, int add_it)
10165 +{
10166 + int i;
10167 +
10168 + for (i = 0; i < n_file_names; i++) {
10169 + if (strcmp(file_names[i], fname) == 0)
10170 + return i;
10171 + }
10172 +
10173 + if (add_it) {
10174 + if (n_file_names < MAX_N_FILE_NAMES) {
10175 + file_names[n_file_names] = strdup(fname);
10176 + return n_file_names++;
10177 + }
10178 + }
10179 +
10180 + return -1;
10181 +}
10182 +
10183 +
10184 +const char *srcpos_filename_for_num(int filenum)
10185 +{
10186 + if (0 <= filenum && filenum < n_file_names) {
10187 + return file_names[filenum];
10188 + }
10189 +
10190 + return 0;
10191 +}
10192 +
10193 +
10194 +const char *srcpos_get_filename(void)
10195 +{
10196 + return srcpos_filename_for_num(srcpos_filenum);
10197 +}
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
10201 @@ -0,0 +1,75 @@
10202 +/*
10203 + * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc.
10204 + *
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.
10209 + *
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.
10214 + *
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
10218 + * USA
10219 + */
10220 +
10221 +/*
10222 + * Augment the standard YYLTYPE with a filenum index into an
10223 + * array of all opened filenames.
10224 + */
10225 +
10226 +#if ! defined(YYLTYPE) && ! defined(YYLTYPE_IS_DECLARED)
10227 +typedef struct YYLTYPE {
10228 + int first_line;
10229 + int first_column;
10230 + int last_line;
10231 + int last_column;
10232 + int filenum;
10233 +} YYLTYPE;
10234 +
10235 +#define YYLTYPE_IS_DECLARED 1
10236 +#define YYLTYPE_IS_TRIVIAL 1
10237 +#endif
10238 +
10239 +/* Cater to old parser templates. */
10240 +#ifndef YYID
10241 +#define YYID(n) (n)
10242 +#endif
10243 +
10244 +#define YYLLOC_DEFAULT(Current, Rhs, N) \
10245 + do \
10246 + if (YYID (N)) \
10247 + { \
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; \
10253 + } \
10254 + else \
10255 + { \
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; \
10261 + } \
10262 + while (YYID (0))
10263 +
10264 +
10265 +
10266 +extern void yyerror(char const *);
10267 +
10268 +extern int srcpos_filenum;
10269 +
10270 +extern int push_input_file(const char *filename);
10271 +extern int pop_input_file(void);
10272 +
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
10280 @@ -0,0 +1,275 @@
10281 +/*
10282 + * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
10283 + *
10284 + *
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.
10289 + *
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.
10294 + *
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
10298 + * USA
10299 + */
10300 +
10301 +#include "dtc.h"
10302 +#include "srcpos.h"
10303 +
10304 +extern FILE *yyin;
10305 +extern int yyparse(void);
10306 +extern void yyerror(char const *);
10307 +
10308 +struct boot_info *the_boot_info;
10309 +
10310 +struct boot_info *dt_from_source(const char *fname)
10311 +{
10312 + the_boot_info = NULL;
10313 +
10314 + push_input_file(fname);
10315 +
10316 + if (yyparse() != 0)
10317 + return NULL;
10318 +
10319 + fill_fullpaths(the_boot_info->dt, "");
10320 +
10321 + return the_boot_info;
10322 +}
10323 +
10324 +static void write_prefix(FILE *f, int level)
10325 +{
10326 + int i;
10327 +
10328 + for (i = 0; i < level; i++)
10329 + fputc('\t', f);
10330 +}
10331 +
10332 +int isstring(char c)
10333 +{
10334 + return (isprint(c)
10335 + || (c == '\0')
10336 + || strchr("\a\b\t\n\v\f\r", c));
10337 +}
10338 +
10339 +static void write_propval_string(FILE *f, struct data val)
10340 +{
10341 + const char *str = val.val;
10342 + int i;
10343 + int newchunk = 1;
10344 + struct marker *m = val.markers;
10345 +
10346 + assert(str[val.len-1] == '\0');
10347 +
10348 + for (i = 0; i < (val.len-1); i++) {
10349 + char c = str[i];
10350 +
10351 + if (newchunk) {
10352 + while (m && (m->offset <= i)) {
10353 + if (m->type == LABEL) {
10354 + assert(m->offset == i);
10355 + fprintf(f, "%s: ", m->ref);
10356 + }
10357 + m = m->next;
10358 + }
10359 + fprintf(f, "\"");
10360 + newchunk = 0;
10361 + }
10362 +
10363 + switch (c) {
10364 + case '\a':
10365 + fprintf(f, "\\a");
10366 + break;
10367 + case '\b':
10368 + fprintf(f, "\\b");
10369 + break;
10370 + case '\t':
10371 + fprintf(f, "\\t");
10372 + break;
10373 + case '\n':
10374 + fprintf(f, "\\n");
10375 + break;
10376 + case '\v':
10377 + fprintf(f, "\\v");
10378 + break;
10379 + case '\f':
10380 + fprintf(f, "\\f");
10381 + break;
10382 + case '\r':
10383 + fprintf(f, "\\r");
10384 + break;
10385 + case '\\':
10386 + fprintf(f, "\\\\");
10387 + break;
10388 + case '\"':
10389 + fprintf(f, "\\\"");
10390 + break;
10391 + case '\0':
10392 + fprintf(f, "\", ");
10393 + newchunk = 1;
10394 + break;
10395 + default:
10396 + if (isprint(c))
10397 + fprintf(f, "%c", c);
10398 + else
10399 + fprintf(f, "\\x%02hhx", c);
10400 + }
10401 + }
10402 + fprintf(f, "\"");
10403 +
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);
10408 + }
10409 +}
10410 +
10411 +static void write_propval_cells(FILE *f, struct data val)
10412 +{
10413 + void *propend = val.val + val.len;
10414 + cell_t *cp = (cell_t *)val.val;
10415 + struct marker *m = val.markers;
10416 +
10417 + fprintf(f, "<");
10418 + for (;;) {
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);
10423 + }
10424 + m = m->next;
10425 + }
10426 +
10427 + fprintf(f, "0x%x", be32_to_cpu(*cp++));
10428 + if ((void *)cp >= propend)
10429 + break;
10430 + fprintf(f, " ");
10431 + }
10432 +
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);
10437 + }
10438 + fprintf(f, ">");
10439 +}
10440 +
10441 +static void write_propval_bytes(FILE *f, struct data val)
10442 +{
10443 + void *propend = val.val + val.len;
10444 + const char *bp = val.val;
10445 + struct marker *m = val.markers;
10446 +
10447 + fprintf(f, "[");
10448 + for (;;) {
10449 + while (m && (m->offset == (bp-val.val))) {
10450 + if (m->type == LABEL)
10451 + fprintf(f, "%s: ", m->ref);
10452 + m = m->next;
10453 + }
10454 +
10455 + fprintf(f, "%02hhx", *bp++);
10456 + if ((void *)bp >= propend)
10457 + break;
10458 + fprintf(f, " ");
10459 + }
10460 +
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);
10465 + }
10466 + fprintf(f, "]");
10467 +}
10468 +
10469 +static void write_propval(FILE *f, struct property *prop)
10470 +{
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;
10476 + int i;
10477 +
10478 + if (len == 0) {
10479 + fprintf(f, ";\n");
10480 + return;
10481 + }
10482 +
10483 + for (i = 0; i < len; i++) {
10484 + if (! isstring(p[i]))
10485 + nnotstring++;
10486 + if (p[i] == '\0')
10487 + nnul++;
10488 + }
10489 +
10490 + for_each_marker_of_type(m, LABEL) {
10491 + if ((m->offset > 0) && (prop->val.val[m->offset - 1] != '\0'))
10492 + nnotstringlbl++;
10493 + if ((m->offset % sizeof(cell_t)) != 0)
10494 + nnotcelllbl++;
10495 + }
10496 +
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);
10503 + } else {
10504 + write_propval_bytes(f, prop->val);
10505 + }
10506 +
10507 + fprintf(f, ";\n");
10508 +}
10509 +
10510 +static void write_tree_source_node(FILE *f, struct node *tree, int level)
10511 +{
10512 + struct property *prop;
10513 + struct node *child;
10514 +
10515 + write_prefix(f, level);
10516 + if (tree->label)
10517 + fprintf(f, "%s: ", tree->label);
10518 + if (tree->name && (*tree->name))
10519 + fprintf(f, "%s {\n", tree->name);
10520 + else
10521 + fprintf(f, "/ {\n");
10522 +
10523 + for_each_property(tree, prop) {
10524 + write_prefix(f, level+1);
10525 + if (prop->label)
10526 + fprintf(f, "%s: ", prop->label);
10527 + fprintf(f, "%s", prop->name);
10528 + write_propval(f, prop);
10529 + }
10530 + for_each_child(tree, child) {
10531 + fprintf(f, "\n");
10532 + write_tree_source_node(f, child, level+1);
10533 + }
10534 + write_prefix(f, level);
10535 + fprintf(f, "};\n");
10536 +}
10537 +
10538 +
10539 +void dt_to_source(FILE *f, struct boot_info *bi)
10540 +{
10541 + struct reserve_info *re;
10542 +
10543 + fprintf(f, "/dts-v1/;\n\n");
10544 +
10545 + for (re = bi->reservelist; re; re = re->next) {
10546 + if (re->label)
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);
10551 + }
10552 +
10553 + write_tree_source_node(f, bi->dt, 0);
10554 +}
10555 +
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
10559 @@ -0,0 +1 @@
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
10564 @@ -0,0 +1,184 @@
10565 +/*
10566 + * Device Tree Source for MPC885 ADS running RedBoot
10567 + *
10568 + * Copyright 2006 MontaVista Software, Inc.
10569 + * Copyright 2007 Freescale Semiconductor, Inc.
10570 + *
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.
10575 + */
10576 +
10577 +/dts-v1/;
10578 +/ {
10579 + model = "Analogue & Micro Adder MPC875";
10580 + compatible = "analogue-and-micro,adder875";
10581 + #address-cells = <1>;
10582 + #size-cells = <1>;
10583 +
10584 + aliases {
10585 + console = &console;
10586 + ethernet0 = &eth0;
10587 + ethernet1 = &eth1;
10588 + };
10589 +
10590 + cpus {
10591 + #address-cells = <1>;
10592 + #size-cells = <0>;
10593 +
10594 + PowerPC,875@0 {
10595 + device_type = "cpu";
10596 + reg = <0>;
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>;
10606 + };
10607 + };
10608 +
10609 + memory {
10610 + device_type = "memory";
10611 + reg = <0 0x01000000>;
10612 + };
10613 +
10614 + localbus@fa200100 {
10615 + compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus",
10616 + "simple-bus";
10617 + #address-cells = <2>;
10618 + #size-cells = <1>;
10619 + reg = <0xfa200100 0x40>;
10620 +
10621 + ranges = <
10622 + 0 0 0xfe000000 0x00800000
10623 + 2 0 0xfa100000 0x00008000
10624 + >;
10625 +
10626 + flash@0,0 {
10627 + compatible = "cfi-flash";
10628 + reg = <0 0 0x800000>;
10629 + bank-width = <2>;
10630 + device-width = <2>;
10631 + };
10632 + };
10633 +
10634 + soc@fa200000 {
10635 + compatible = "fsl,mpc875-immr", "fsl,pq1-soc", "simple-bus";
10636 + #address-cells = <1>;
10637 + #size-cells = <1>;
10638 + ranges = <0 0xfa200000 0x00004000>;
10639 +
10640 + // Temporary until code stops depending on it.
10641 + device_type = "soc";
10642 +
10643 + // Temporary until get_immrbase() is fixed.
10644 + reg = <0xfa200000 0x4000>;
10645 +
10646 + mdio@e00 {
10647 + compatible = "fsl,mpc875-fec-mdio", "fsl,pq1-fec-mdio";
10648 + reg = <0xe00 0x188>;
10649 + #address-cells = <1>;
10650 + #size-cells = <0>;
10651 +
10652 + PHY0: ethernet-phy@0 {
10653 + reg = <0>;
10654 + device_type = "ethernet-phy";
10655 + };
10656 +
10657 + PHY1: ethernet-phy@1 {
10658 + reg = <1>;
10659 + device_type = "ethernet-phy";
10660 + };
10661 + };
10662 +
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>;
10673 + };
10674 +
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>;
10685 + };
10686 +
10687 + PIC: interrupt-controller@0 {
10688 + interrupt-controller;
10689 + #interrupt-cells = <2>;
10690 + reg = <0 0x24>;
10691 + compatible = "fsl,mpc875-pic", "fsl,pq1-pic";
10692 + };
10693 +
10694 + cpm@9c0 {
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>;
10701 + ranges;
10702 +
10703 + muram {
10704 + #address-cells = <1>;
10705 + #size-cells = <1>;
10706 + ranges = <0 0x2000 0x2000>;
10707 +
10708 + data@0 {
10709 + compatible = "fsl,cpm-muram-data";
10710 + reg = <0 0x1c00>;
10711 + };
10712 + };
10713 +
10714 + brg@9f0 {
10715 + compatible = "fsl,mpc875-brg",
10716 + "fsl,cpm1-brg",
10717 + "fsl,cpm-brg";
10718 + reg = <0x9f0 0x10>;
10719 + };
10720 +
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",
10728 + "fsl,cpm1-pic";
10729 + };
10730 +
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>;
10741 + };
10742 + };
10743 + };
10744 +
10745 + chosen {
10746 + linux,stdout-path = &console;
10747 + };
10748 +};
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
10752 @@ -0,0 +1,183 @@
10753 +/*
10754 + * Device Tree Source for MPC885 ADS running U-Boot
10755 + *
10756 + * Copyright 2006 MontaVista Software, Inc.
10757 + * Copyright 2007 Freescale Semiconductor, Inc.
10758 + *
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.
10763 + */
10764 +
10765 +/dts-v1/;
10766 +/ {
10767 + model = "Analogue & Micro Adder MPC875";
10768 + compatible = "analogue-and-micro,adder875";
10769 + #address-cells = <1>;
10770 + #size-cells = <1>;
10771 +
10772 + aliases {
10773 + console = &console;
10774 + ethernet0 = &eth0;
10775 + ethernet1 = &eth1;
10776 + };
10777 +
10778 + cpus {
10779 + #address-cells = <1>;
10780 + #size-cells = <0>;
10781 +
10782 + PowerPC,875@0 {
10783 + device_type = "cpu";
10784 + reg = <0>;
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>;
10794 + };
10795 + };
10796 +
10797 + memory {
10798 + device_type = "memory";
10799 + reg = <0 0x01000000>;
10800 + };
10801 +
10802 + localbus@ff000100 {
10803 + compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus",
10804 + "simple-bus";
10805 + #address-cells = <2>;
10806 + #size-cells = <1>;
10807 + reg = <0xff000100 0x40>;
10808 +
10809 + ranges = <
10810 + 0 0 0xfe000000 0x01000000
10811 + >;
10812 +
10813 + flash@0,0 {
10814 + compatible = "cfi-flash";
10815 + reg = <0 0 0x800000>;
10816 + bank-width = <2>;
10817 + device-width = <2>;
10818 + };
10819 + };
10820 +
10821 + soc@ff000000 {
10822 + compatible = "fsl,mpc875-immr", "fsl,pq1-soc", "simple-bus";
10823 + #address-cells = <1>;
10824 + #size-cells = <1>;
10825 + ranges = <0 0xff000000 0x00004000>;
10826 +
10827 + // Temporary until code stops depending on it.
10828 + device_type = "soc";
10829 +
10830 + // Temporary until get_immrbase() is fixed.
10831 + reg = <0xff000000 0x4000>;
10832 +
10833 + mdio@e00 {
10834 + compatible = "fsl,mpc875-fec-mdio", "fsl,pq1-fec-mdio";
10835 + reg = <0xe00 0x188>;
10836 + #address-cells = <1>;
10837 + #size-cells = <0>;
10838 +
10839 + PHY0: ethernet-phy@0 {
10840 + reg = <0>;
10841 + device_type = "ethernet-phy";
10842 + };
10843 +
10844 + PHY1: ethernet-phy@1 {
10845 + reg = <1>;
10846 + device_type = "ethernet-phy";
10847 + };
10848 + };
10849 +
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>;
10860 + };
10861 +
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>;
10872 + };
10873 +
10874 + PIC: interrupt-controller@0 {
10875 + interrupt-controller;
10876 + #interrupt-cells = <2>;
10877 + reg = <0 0x24>;
10878 + compatible = "fsl,mpc875-pic", "fsl,pq1-pic";
10879 + };
10880 +
10881 + cpm@9c0 {
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>;
10888 + ranges;
10889 +
10890 + muram {
10891 + #address-cells = <1>;
10892 + #size-cells = <1>;
10893 + ranges = <0 0x2000 0x2000>;
10894 +
10895 + data@0 {
10896 + compatible = "fsl,cpm-muram-data";
10897 + reg = <0 0x1c00>;
10898 + };
10899 + };
10900 +
10901 + brg@9f0 {
10902 + compatible = "fsl,mpc875-brg",
10903 + "fsl,cpm1-brg",
10904 + "fsl,cpm-brg";
10905 + reg = <0x9f0 0x10>;
10906 + };
10907 +
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",
10915 + "fsl,cpm1-pic";
10916 + };
10917 +
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>;
10928 + };
10929 + };
10930 + };
10931 +
10932 + chosen {
10933 + linux,stdout-path = &console;
10934 + };
10935 +};
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 @@
10940 #size-cells = <1>;
10941 model = "amcc,bamboo";
10942 compatible = "amcc,bamboo";
10943 - dcr-parent = <&/cpus/PowerPC,440EP@0>;
10944 + dcr-parent = <&/cpus/cpu@0>;
10945 +
10946 + aliases {
10947 + ethernet0 = &EMAC0;
10948 + ethernet1 = &EMAC1;
10949 + serial0 = &UART0;
10950 + serial1 = &UART1;
10951 + serial2 = &UART2;
10952 + serial3 = &UART3;
10953 + };
10954
10955 cpus {
10956 #address-cells = <1>;
10957 #size-cells = <0>;
10958
10959 - PowerPC,440EP@0 {
10960 + cpu@0 {
10961 device_type = "cpu";
10962 + model = "PowerPC,440EP";
10963 reg = <0>;
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>;
10968 #size-cells = <1>;
10969 clock-frequency = <0>; /* Filled in by zImage */
10970 - ranges;
10971 interrupts = <5 1>;
10972 interrupt-parent = <&UIC1>;
10973 };
10974 @@ -238,11 +247,56 @@
10975 zmii-device = <&ZMII0>;
10976 zmii-channel = <1>;
10977 };
10978 +
10979 + usb@ef601000 {
10980 + compatible = "ohci-be";
10981 + reg = <ef601000 80>;
10982 + interrupts = <8 1 9 1>;
10983 + interrupt-parent = < &UIC1 >;
10984 + };
10985 + };
10986 +
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";
10993 + primary;
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 */
10998 +
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
11002 + */
11003 + ranges = <02000000 0 a0000000 0 a0000000 0 20000000
11004 + 01000000 0 00000000 0 e8000000 0 00010000>;
11005 +
11006 + /* Inbound 2GB range starting at 0 */
11007 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
11008 +
11009 + /* Bamboo has all 4 IRQ pins tied together per slot */
11010 + interrupt-map-mask = <f800 0 0 0>;
11011 + interrupt-map = <
11012 + /* IDSEL 1 */
11013 + 0800 0 0 0 &UIC0 1c 8
11014 +
11015 + /* IDSEL 2 */
11016 + 1000 0 0 0 &UIC0 1b 8
11017 +
11018 + /* IDSEL 3 */
11019 + 1800 0 0 0 &UIC0 1a 8
11020 +
11021 + /* IDSEL 4 */
11022 + 2000 0 0 0 &UIC0 19 8
11023 + >;
11024 };
11025 };
11026
11027 chosen {
11028 linux,stdout-path = "/plb/opb/serial@ef600300";
11029 - bootargs = "console=ttyS0,115200";
11030 };
11031 };
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
11035 @@ -0,0 +1,236 @@
11036 +/*
11037 + * CM5200 board Device Tree Source
11038 + *
11039 + * Copyright (C) 2007 Semihalf
11040 + * Marian Balakowicz <m8@semihalf.com>
11041 + *
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.
11046 + */
11047 +
11048 +/*
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
11052 + */
11053 +
11054 +/ {
11055 + model = "schindler,cm5200";
11056 + compatible = "schindler,cm5200";
11057 + #address-cells = <1>;
11058 + #size-cells = <1>;
11059 +
11060 + cpus {
11061 + #address-cells = <1>;
11062 + #size-cells = <0>;
11063 +
11064 + PowerPC,5200@0 {
11065 + device_type = "cpu";
11066 + reg = <0>;
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
11074 + };
11075 + };
11076 +
11077 + memory {
11078 + device_type = "memory";
11079 + reg = <00000000 04000000>; // 64MB
11080 + };
11081 +
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
11091 +
11092 + cdm@200 {
11093 + compatible = "mpc5200b-cdm","mpc5200-cdm";
11094 + reg = <200 38>;
11095 + };
11096 +
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";
11102 + reg = <500 80>;
11103 + };
11104 +
11105 + gpt@600 { // General Purpose Timer
11106 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11107 + reg = <600 10>;
11108 + interrupts = <1 9 0>;
11109 + interrupt-parent = <&mpc5200_pic>;
11110 + fsl,has-wdt;
11111 + };
11112 +
11113 + gpt@610 { // General Purpose Timer
11114 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11115 + reg = <610 10>;
11116 + interrupts = <1 a 0>;
11117 + interrupt-parent = <&mpc5200_pic>;
11118 + };
11119 +
11120 + gpt@620 { // General Purpose Timer
11121 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11122 + reg = <620 10>;
11123 + interrupts = <1 b 0>;
11124 + interrupt-parent = <&mpc5200_pic>;
11125 + };
11126 +
11127 + gpt@630 { // General Purpose Timer
11128 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11129 + reg = <630 10>;
11130 + interrupts = <1 c 0>;
11131 + interrupt-parent = <&mpc5200_pic>;
11132 + };
11133 +
11134 + gpt@640 { // General Purpose Timer
11135 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11136 + reg = <640 10>;
11137 + interrupts = <1 d 0>;
11138 + interrupt-parent = <&mpc5200_pic>;
11139 + };
11140 +
11141 + gpt@650 { // General Purpose Timer
11142 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11143 + reg = <650 10>;
11144 + interrupts = <1 e 0>;
11145 + interrupt-parent = <&mpc5200_pic>;
11146 + };
11147 +
11148 + gpt@660 { // General Purpose Timer
11149 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11150 + reg = <660 10>;
11151 + interrupts = <1 f 0>;
11152 + interrupt-parent = <&mpc5200_pic>;
11153 + };
11154 +
11155 + gpt@670 { // General Purpose Timer
11156 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
11157 + reg = <670 10>;
11158 + interrupts = <1 10 0>;
11159 + interrupt-parent = <&mpc5200_pic>;
11160 + };
11161 +
11162 + rtc@800 { // Real time clock
11163 + compatible = "mpc5200b-rtc","mpc5200-rtc";
11164 + reg = <800 100>;
11165 + interrupts = <1 5 0 1 6 0>;
11166 + interrupt-parent = <&mpc5200_pic>;
11167 + };
11168 +
11169 + gpio@b00 {
11170 + compatible = "mpc5200b-gpio","mpc5200-gpio";
11171 + reg = <b00 40>;
11172 + interrupts = <1 7 0>;
11173 + interrupt-parent = <&mpc5200_pic>;
11174 + };
11175 +
11176 + gpio-wkup@c00 {
11177 + compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup";
11178 + reg = <c00 40>;
11179 + interrupts = <1 8 0 0 3 0>;
11180 + interrupt-parent = <&mpc5200_pic>;
11181 + };
11182 +
11183 + spi@f00 {
11184 + compatible = "mpc5200b-spi","mpc5200-spi";
11185 + reg = <f00 20>;
11186 + interrupts = <2 d 0 2 e 0>;
11187 + interrupt-parent = <&mpc5200_pic>;
11188 + };
11189 +
11190 + usb@1000 {
11191 + device_type = "usb-ohci-be";
11192 + compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
11193 + reg = <1000 ff>;
11194 + interrupts = <2 6 0>;
11195 + interrupt-parent = <&mpc5200_pic>;
11196 + };
11197 +
11198 + dma-controller@1200 {
11199 + compatible = "mpc5200b-bestcomm","mpc5200-bestcomm";
11200 + reg = <1200 80>;
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>;
11206 + };
11207 +
11208 + xlb@1f00 {
11209 + compatible = "mpc5200b-xlb","mpc5200-xlb";
11210 + reg = <1f00 100>;
11211 + };
11212 +
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>;
11220 + };
11221 +
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>;
11229 + };
11230 +
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>;
11238 + };
11239 +
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>;
11247 + };
11248 +
11249 + ethernet@3000 {
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>;
11256 + };
11257 +
11258 + i2c@3d40 {
11259 + compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
11260 + reg = <3d40 40>;
11261 + interrupts = <2 10 0>;
11262 + interrupt-parent = <&mpc5200_pic>;
11263 + fsl5200-clocking;
11264 + };
11265 +
11266 + sram@8000 {
11267 + compatible = "mpc5200b-sram","mpc5200-sram";
11268 + reg = <8000 4000>;
11269 + };
11270 + };
11271 +};
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 @@
11276 #size-cells = <1>;
11277 model = "ibm,ebony";
11278 compatible = "ibm,ebony";
11279 - dcr-parent = <&/cpus/PowerPC,440GP@0>;
11280 + dcr-parent = <&/cpus/cpu@0>;
11281 +
11282 + aliases {
11283 + ethernet0 = &EMAC0;
11284 + ethernet1 = &EMAC1;
11285 + serial0 = &UART0;
11286 + serial1 = &UART1;
11287 + };
11288
11289 cpus {
11290 #address-cells = <1>;
11291 #size-cells = <0>;
11292
11293 - PowerPC,440GP@0 {
11294 + cpu@0 {
11295 device_type = "cpu";
11296 + model = "PowerPC,440GP";
11297 reg = <0>;
11298 clock-frequency = <0>; // Filled in by zImage
11299 timebase-frequency = <0>; // Filled in by zImage
11300 @@ -150,9 +158,10 @@
11301 };
11302 };
11303
11304 - ds1743@1,0 {
11305 + nvram@1,0 {
11306 /* NVRAM & RTC */
11307 - compatible = "ds1743";
11308 + compatible = "ds1743-nvram";
11309 + #bytes = <2000>;
11310 reg = <1 0 2000>;
11311 };
11312
11313 @@ -284,12 +293,43 @@
11314
11315 };
11316
11317 - PCIX0: pci@1234 {
11318 + PCIX0: pci@20ec00000 {
11319 device_type = "pci";
11320 - /* FIXME */
11321 - reg = <2 0ec00000 8
11322 - 2 0ec80000 f0
11323 - 2 0ec80100 fc>;
11324 + #interrupt-cells = <1>;
11325 + #size-cells = <2>;
11326 + #address-cells = <3>;
11327 + compatible = "ibm,plb440gp-pcix", "ibm,plb-pcix";
11328 + primary;
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 */
11334 +
11335 + /* Outbound ranges, one memory and one IO,
11336 + * later cannot be changed
11337 + */
11338 + ranges = <02000000 0 80000000 00000003 80000000 0 80000000
11339 + 01000000 0 00000000 00000002 08000000 0 00010000>;
11340 +
11341 + /* Inbound 2GB range starting at 0 */
11342 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
11343 +
11344 + /* Ebony has all 4 IRQ pins tied together per slot */
11345 + interrupt-map-mask = <f800 0 0 0>;
11346 + interrupt-map = <
11347 + /* IDSEL 1 */
11348 + 0800 0 0 0 &UIC0 17 8
11349 +
11350 + /* IDSEL 2 */
11351 + 1000 0 0 0 &UIC0 18 8
11352 +
11353 + /* IDSEL 3 */
11354 + 1800 0 0 0 &UIC0 19 8
11355 +
11356 + /* IDSEL 4 */
11357 + 2000 0 0 0 &UIC0 1a 8
11358 + >;
11359 };
11360 };
11361
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
11365 @@ -0,0 +1,228 @@
11366 +/*
11367 + * Device Tree Source for EP405
11368 + *
11369 + * Copyright 2007 IBM Corp.
11370 + * Benjamin Herrenschmidt <benh@kernel.crashing.org>
11371 + *
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.
11375 + */
11376 +
11377 +/ {
11378 + #address-cells = <1>;
11379 + #size-cells = <1>;
11380 + model = "ep405";
11381 + compatible = "ep405";
11382 + dcr-parent = <&/cpus/cpu@0>;
11383 +
11384 + aliases {
11385 + ethernet0 = &EMAC;
11386 + serial0 = &UART0;
11387 + serial1 = &UART1;
11388 + };
11389 +
11390 + cpus {
11391 + #address-cells = <1>;
11392 + #size-cells = <0>;
11393 +
11394 + cpu@0 {
11395 + device_type = "cpu";
11396 + model = "PowerPC,405GP";
11397 + reg = <0>;
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>;
11404 + dcr-controller;
11405 + dcr-access-method = "native";
11406 + };
11407 + };
11408 +
11409 + memory {
11410 + device_type = "memory";
11411 + reg = <0 0>; /* Filled in by zImage */
11412 + };
11413 +
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>;
11422 + };
11423 +
11424 + plb {
11425 + compatible = "ibm,plb3";
11426 + #address-cells = <1>;
11427 + #size-cells = <1>;
11428 + ranges;
11429 + clock-frequency = <0>; /* Filled in by zImage */
11430 +
11431 + SDRAM0: memory-controller {
11432 + compatible = "ibm,sdram-405gp";
11433 + dcr-reg = <010 2>;
11434 + };
11435 +
11436 + MAL: mcmal {
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>;
11442 + interrupts = <
11443 + b 4 /* TXEOB */
11444 + c 4 /* RXEOB */
11445 + a 4 /* SERR */
11446 + d 4 /* TXDE */
11447 + e 4 /* RXDE */>;
11448 + };
11449 +
11450 + POB0: opb {
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 */
11457 +
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>;
11467 + };
11468 +
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>;
11478 + };
11479 +
11480 + IIC: i2c@ef600500 {
11481 + compatible = "ibm,iic-405gp", "ibm,iic";
11482 + reg = <ef600500 11>;
11483 + interrupt-parent = <&UIC0>;
11484 + interrupts = <2 4>;
11485 + };
11486 +
11487 + GPIO: gpio@ef600700 {
11488 + compatible = "ibm,gpio-405gp";
11489 + reg = <ef600700 20>;
11490 + };
11491 +
11492 + EMAC: ethernet@ef600800 {
11493 + linux,network-index = <0>;
11494 + device_type = "network";
11495 + compatible = "ibm,emac-405gp", "ibm,emac";
11496 + interrupt-parent = <&UIC0>;
11497 + interrupts = <
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>;
11511 + };
11512 +
11513 + };
11514 +
11515 + EBC0: ebc {
11516 + compatible = "ibm,ebc-405gp", "ibm,ebc";
11517 + dcr-reg = <012 2>;
11518 + #address-cells = <2>;
11519 + #size-cells = <1>;
11520 +
11521 +
11522 + /* The ranges property is supplied by the bootwrapper
11523 + * and is based on the firmware's configuration of the
11524 + * EBC bridge
11525 + */
11526 + clock-frequency = <0>; /* Filled in by zImage */
11527 +
11528 + /* NVRAM and RTC */
11529 + nvrtc@4,200000 {
11530 + compatible = "ds1742";
11531 + reg = <4 200000 0>; /* size fixed up by zImage */
11532 + };
11533 +
11534 + /* "BCSR" CPLD contains a PCI irq controller */
11535 + bcsr@4,0 {
11536 + compatible = "ep405-bcsr";
11537 + reg = <4 0 10>;
11538 + interrupt-controller;
11539 + /* Routing table */
11540 + irq-routing = [ 00 /* SYSERR */
11541 + 01 /* STTM */
11542 + 01 /* RTC */
11543 + 01 /* FENET */
11544 + 02 /* NB PCIIRQ mux ? */
11545 + 03 /* SB Winbond 8259 ? */
11546 + 04 /* Serial Ring */
11547 + 05 /* USB (ep405pc) */
11548 + 06 /* XIRQ 0 */
11549 + 06 /* XIRQ 1 */
11550 + 06 /* XIRQ 2 */
11551 + 06 /* XIRQ 3 */
11552 + 06 /* XIRQ 4 */
11553 + 06 /* XIRQ 5 */
11554 + 06 /* XIRQ 6 */
11555 + 07]; /* Reserved */
11556 + };
11557 + };
11558 +
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";
11565 + primary;
11566 + reg = <eec00000 8 /* Config space access */
11567 + eed80000 4 /* IACK */
11568 + eed80000 4 /* Special cycle */
11569 + ef480000 40>; /* Internal registers */
11570 +
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
11574 + */
11575 + ranges = <02000000 0 80000000 80000000 0 20000000
11576 + 01000000 0 00000000 e8000000 0 00010000>;
11577 +
11578 + /* Inbound 2GB range starting at 0 */
11579 + dma-ranges = <42000000 0 0 0 0 80000000>;
11580 +
11581 + /* That's all I know about IRQs on that thing ... */
11582 + interrupt-map-mask = <f800 0 0 0>;
11583 + interrupt-map = <
11584 + /* USB */
11585 + 7000 0 0 0 &UIC0 1e 8 /* IRQ5 */
11586 + >;
11587 + };
11588 + };
11589 +
11590 + chosen {
11591 + linux,stdout-path = "/plb/opb/serial@ef600300";
11592 + };
11593 +};
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
11597 @@ -0,0 +1,207 @@
11598 +/*
11599 + * Device Tree for the Embedded Planet EP8248E board running PlanetCore.
11600 + *
11601 + * Copyright 2007 Freescale Semiconductor Inc.
11602 + *
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.
11607 + */
11608 +
11609 +/dts-v1/;
11610 +/ {
11611 + model = "EP8248E";
11612 + compatible = "fsl,ep8248e";
11613 + #address-cells = <1>;
11614 + #size-cells = <1>;
11615 +
11616 + aliases {
11617 + planetcore-SMC1 = &smc1;
11618 + planetcore-SCC1 = &scc1;
11619 + ethernet0 = &eth0;
11620 + ethernet1 = &eth1;
11621 + serial0 = &smc1;
11622 + serial1 = &scc1;
11623 + };
11624 +
11625 + cpus {
11626 + #address-cells = <1>;
11627 + #size-cells = <0>;
11628 +
11629 + PowerPC,8248@0 {
11630 + device_type = "cpu";
11631 + reg = <0>;
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>;
11638 + };
11639 + };
11640 +
11641 + localbus@f0010100 {
11642 + compatible = "fsl,mpc8248-localbus",
11643 + "fsl,pq2-localbus",
11644 + "simple-bus";
11645 + #address-cells = <2>;
11646 + #size-cells = <1>;
11647 + reg = <0xf0010100 0x40>;
11648 +
11649 + ranges = <0 0 0xfc000000 0x04000000
11650 + 1 0 0xfa000000 0x00008000>;
11651 +
11652 + flash@0,3800000 {
11653 + compatible = "cfi-flash";
11654 + reg = <0 0x3800000 0x800000>;
11655 + bank-width = <4>;
11656 + device-width = <2>;
11657 + };
11658 +
11659 + bcsr@1,0 {
11660 + #address-cells = <2>;
11661 + #size-cells = <1>;
11662 + reg = <1 0 0x10>;
11663 + compatible = "fsl,ep8248e-bcsr";
11664 + ranges;
11665 +
11666 + mdio {
11667 + device_type = "mdio";
11668 + compatible = "fsl,ep8248e-mdio-bitbang";
11669 + #address-cells = <1>;
11670 + #size-cells = <0>;
11671 + reg = <1 8 1>;
11672 +
11673 + PHY0: ethernet-phy@0 {
11674 + interrupt-parent = <&PIC>;
11675 + reg = <0>;
11676 + device_type = "ethernet-phy";
11677 + };
11678 +
11679 + PHY1: ethernet-phy@1 {
11680 + interrupt-parent = <&PIC>;
11681 + reg = <1>;
11682 + device_type = "ethernet-phy";
11683 + };
11684 + };
11685 + };
11686 + };
11687 +
11688 + memory {
11689 + device_type = "memory";
11690 + reg = <0 0>;
11691 + };
11692 +
11693 + soc@f0000000 {
11694 + #address-cells = <1>;
11695 + #size-cells = <1>;
11696 + compatible = "fsl,mpc8248-immr", "fsl,pq2-soc", "simple-bus";
11697 + ranges = <0x00000000 0xf0000000 0x00053000>;
11698 +
11699 + // Temporary until code stops depending on it.
11700 + device_type = "soc";
11701 +
11702 + // Temporary -- will go away once kernel uses ranges for get_immrbase().
11703 + reg = <0xf0000000 0x00053000>;
11704 +
11705 + cpm@119c0 {
11706 + #address-cells = <1>;
11707 + #size-cells = <1>;
11708 + #interrupt-cells = <2>;
11709 + compatible = "fsl,mpc8248-cpm", "fsl,cpm2",
11710 + "simple-bus";
11711 + reg = <0x119c0 0x30>;
11712 + ranges;
11713 +
11714 + muram {
11715 + #address-cells = <1>;
11716 + #size-cells = <1>;
11717 + ranges = <0 0 0x10000>;
11718 +
11719 + data@0 {
11720 + compatible = "fsl,cpm-muram-data";
11721 + reg = <0 0x1100 0x1140
11722 + 0xec0 0x9800 0x800>;
11723 + };
11724 + };
11725 +
11726 + brg@119f0 {
11727 + compatible = "fsl,mpc8248-brg",
11728 + "fsl,cpm2-brg",
11729 + "fsl,cpm-brg";
11730 + reg = <0x119f0 0x10 0x115f0 0x10>;
11731 + };
11732 +
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";
11744 + };
11745 +
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";
11757 + };
11758 +
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>;
11770 + };
11771 +
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>;
11783 + };
11784 +
11785 + usb@11b60 {
11786 + #address-cells = <1>;
11787 + #size-cells = <0>;
11788 + compatible = "fsl,mpc8248-usb",
11789 + "fsl,cpm2-usb";
11790 + reg = <0x11b60 0x18 0x8b00 0x100>;
11791 + interrupt-parent = <&PIC>;
11792 + interrupts = <11 8>;
11793 + fsl,cpm-command = <0x2e600000>;
11794 + };
11795 + };
11796 +
11797 + PIC: interrupt-controller@10c00 {
11798 + #interrupt-cells = <2>;
11799 + interrupt-controller;
11800 + reg = <0x10c00 0x80>;
11801 + compatible = "fsl,mpc8248-pic", "fsl,pq2-pic";
11802 + };
11803 + };
11804 +};
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
11808 @@ -0,0 +1,274 @@
11809 +/*
11810 + * Device Tree Source for AMCC Haleakala (405EXr)
11811 + *
11812 + * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
11813 + *
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.
11817 + */
11818 +
11819 +/ {
11820 + #address-cells = <1>;
11821 + #size-cells = <1>;
11822 + model = "amcc,haleakala";
11823 + compatible = "amcc,kilauea";
11824 + dcr-parent = <&/cpus/cpu@0>;
11825 +
11826 + aliases {
11827 + ethernet0 = &EMAC0;
11828 + serial0 = &UART0;
11829 + serial1 = &UART1;
11830 + };
11831 +
11832 + cpus {
11833 + #address-cells = <1>;
11834 + #size-cells = <0>;
11835 +
11836 + cpu@0 {
11837 + device_type = "cpu";
11838 + model = "PowerPC,405EXr";
11839 + reg = <0>;
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 */
11846 + dcr-controller;
11847 + dcr-access-method = "native";
11848 + };
11849 + };
11850 +
11851 + memory {
11852 + device_type = "memory";
11853 + reg = <0 0>; /* Filled in by U-Boot */
11854 + };
11855 +
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>;
11864 + };
11865 +
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>;
11876 + };
11877 +
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>;
11888 + };
11889 +
11890 + plb {
11891 + compatible = "ibm,plb-405exr", "ibm,plb4";
11892 + #address-cells = <1>;
11893 + #size-cells = <1>;
11894 + ranges;
11895 + clock-frequency = <0>; /* Filled in by U-Boot */
11896 +
11897 + SDRAM0: memory-controller {
11898 + compatible = "ibm,sdram-405exr";
11899 + dcr-reg = <010 2>;
11900 + };
11901 +
11902 + MAL0: mcmal {
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>;
11918 + };
11919 +
11920 + POB0: opb {
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 */
11929 +
11930 + EBC0: ebc {
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>;
11939 +
11940 + nor_flash@0,0 {
11941 + compatible = "amd,s29gl512n", "cfi-flash";
11942 + bank-width = <2>;
11943 + reg = <0 000000 4000000>;
11944 + #address-cells = <1>;
11945 + #size-cells = <1>;
11946 + partition@0 {
11947 + label = "kernel";
11948 + reg = <0 200000>;
11949 + };
11950 + partition@200000 {
11951 + label = "root";
11952 + reg = <200000 200000>;
11953 + };
11954 + partition@400000 {
11955 + label = "user";
11956 + reg = <400000 3b60000>;
11957 + };
11958 + partition@3f60000 {
11959 + label = "env";
11960 + reg = <3f60000 40000>;
11961 + };
11962 + partition@3fa0000 {
11963 + label = "u-boot";
11964 + reg = <3fa0000 60000>;
11965 + };
11966 + };
11967 + };
11968 +
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>;
11978 + };
11979 +
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>;
11989 + };
11990 +
11991 + IIC0: i2c@ef600400 {
11992 + compatible = "ibm,iic-405exr", "ibm,iic";
11993 + reg = <ef600400 14>;
11994 + interrupt-parent = <&UIC0>;
11995 + interrupts = <2 4>;
11996 + };
11997 +
11998 + IIC1: i2c@ef600500 {
11999 + compatible = "ibm,iic-405exr", "ibm,iic";
12000 + reg = <ef600500 14>;
12001 + interrupt-parent = <&UIC0>;
12002 + interrupts = <7 4>;
12003 + };
12004 +
12005 +
12006 + RGMII0: emac-rgmii@ef600b00 {
12007 + compatible = "ibm,rgmii-405exr", "ibm,rgmii";
12008 + reg = <ef600b00 104>;
12009 + has-mdio;
12010 + };
12011 +
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;
12038 + };
12039 + };
12040 +
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";
12047 + primary;
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>;
12053 +
12054 + /* Outbound ranges, one memory and one IO,
12055 + * later cannot be changed
12056 + */
12057 + ranges = <02000000 0 80000000 90000000 0 08000000
12058 + 01000000 0 00000000 e0000000 0 00010000>;
12059 +
12060 + /* Inbound 2GB range starting at 0 */
12061 + dma-ranges = <42000000 0 0 0 0 80000000>;
12062 +
12063 + /* This drives busses 0x00 to 0x3f */
12064 + bus-range = <00 3f>;
12065 +
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
12073 + */
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 */>;
12080 + };
12081 + };
12082 +};
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
12086 @@ -0,0 +1,400 @@
12087 +/*
12088 + * Device Tree Source for AMCC Katmai eval board
12089 + *
12090 + * Copyright (c) 2006, 2007 IBM Corp.
12091 + * Benjamin Herrenschmidt <benh@kernel.crashing.org>
12092 + *
12093 + * Copyright (c) 2006, 2007 IBM Corp.
12094 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
12095 + *
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.
12099 + */
12100 +
12101 +/ {
12102 + #address-cells = <2>;
12103 + #size-cells = <1>;
12104 + model = "amcc,katmai";
12105 + compatible = "amcc,katmai";
12106 + dcr-parent = <&/cpus/cpu@0>;
12107 +
12108 + aliases {
12109 + ethernet0 = &EMAC0;
12110 + serial0 = &UART0;
12111 + serial1 = &UART1;
12112 + serial2 = &UART2;
12113 + };
12114 +
12115 + cpus {
12116 + #address-cells = <1>;
12117 + #size-cells = <0>;
12118 +
12119 + cpu@0 {
12120 + device_type = "cpu";
12121 + model = "PowerPC,440SPe";
12122 + reg = <0>;
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>;
12129 + dcr-controller;
12130 + dcr-access-method = "native";
12131 + };
12132 + };
12133 +
12134 + memory {
12135 + device_type = "memory";
12136 + reg = <0 0 0>; /* Filled in by zImage */
12137 + };
12138 +
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>;
12147 + };
12148 +
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>;
12159 + };
12160 +
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>;
12171 + };
12172 +
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>;
12183 + };
12184 +
12185 + SDR0: sdr {
12186 + compatible = "ibm,sdr-440spe";
12187 + dcr-reg = <00e 002>;
12188 + };
12189 +
12190 + CPR0: cpr {
12191 + compatible = "ibm,cpr-440spe";
12192 + dcr-reg = <00c 002>;
12193 + };
12194 +
12195 + plb {
12196 + compatible = "ibm,plb-440spe", "ibm,plb-440gp", "ibm,plb4";
12197 + #address-cells = <2>;
12198 + #size-cells = <1>;
12199 + ranges;
12200 + clock-frequency = <0>; /* Filled in by zImage */
12201 +
12202 + SDRAM0: sdram {
12203 + compatible = "ibm,sdram-440spe", "ibm,sdram-405gp";
12204 + dcr-reg = <010 2>;
12205 + };
12206 +
12207 + MAL0: mcmal {
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>;
12222 + };
12223 +
12224 + POB0: opb {
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 */
12230 +
12231 + EBC0: ebc {
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>;
12239 + };
12240 +
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>;
12250 + };
12251 +
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>;
12261 + };
12262 +
12263 +
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>;
12273 + };
12274 +
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>;
12281 + };
12282 +
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>;
12289 + };
12290 +
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;
12310 + };
12311 + };
12312 +
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";
12319 + primary;
12320 + large-inbound-windows;
12321 + enable-msi-hole;
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 */
12327 +
12328 + /* Outbound ranges, one memory and one IO,
12329 + * later cannot be changed
12330 + */
12331 + ranges = <02000000 0 80000000 0000000d 80000000 0 80000000
12332 + 01000000 0 00000000 0000000c 08000000 0 00010000>;
12333 +
12334 + /* Inbound 2GB range starting at 0 */
12335 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12336 +
12337 + /* This drives busses 0 to 0xf */
12338 + bus-range = <0 f>;
12339 +
12340 + /*
12341 + * On Katmai, the following PCI-X interrupts signals
12342 + * have to be enabled via jumpers (only INTA is
12343 + * enabled per default):
12344 + *
12345 + * INTB: J3: 1-2
12346 + * INTC: J2: 1-2
12347 + * INTD: J1: 1-2
12348 + */
12349 + interrupt-map-mask = <f800 0 0 7>;
12350 + interrupt-map = <
12351 + /* IDSEL 1 */
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
12356 + >;
12357 + };
12358 +
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";
12365 + primary;
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>;
12371 +
12372 + /* Outbound ranges, one memory and one IO,
12373 + * later cannot be changed
12374 + */
12375 + ranges = <02000000 0 80000000 0000000e 00000000 0 80000000
12376 + 01000000 0 00000000 0000000f 80000000 0 00010000>;
12377 +
12378 + /* Inbound 2GB range starting at 0 */
12379 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12380 +
12381 + /* This drives busses 10 to 0x1f */
12382 + bus-range = <10 1f>;
12383 +
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
12391 + */
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 */>;
12398 + };
12399 +
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";
12406 + primary;
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>;
12412 +
12413 + /* Outbound ranges, one memory and one IO,
12414 + * later cannot be changed
12415 + */
12416 + ranges = <02000000 0 80000000 0000000e 80000000 0 80000000
12417 + 01000000 0 00000000 0000000f 80010000 0 00010000>;
12418 +
12419 + /* Inbound 2GB range starting at 0 */
12420 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12421 +
12422 + /* This drives busses 10 to 0x1f */
12423 + bus-range = <20 2f>;
12424 +
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
12432 + */
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 */>;
12439 + };
12440 +
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";
12447 + primary;
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>;
12453 +
12454 + /* Outbound ranges, one memory and one IO,
12455 + * later cannot be changed
12456 + */
12457 + ranges = <02000000 0 80000000 0000000f 00000000 0 80000000
12458 + 01000000 0 00000000 0000000f 80020000 0 00010000>;
12459 +
12460 + /* Inbound 2GB range starting at 0 */
12461 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
12462 +
12463 + /* This drives busses 10 to 0x1f */
12464 + bus-range = <30 3f>;
12465 +
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
12473 + */
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 */>;
12480 + };
12481 + };
12482 +
12483 + chosen {
12484 + linux,stdout-path = "/plb/opb/serial@10000200";
12485 + };
12486 +};
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 @@
12491 #size-cells = <1>;
12492 model = "amcc,kilauea";
12493 compatible = "amcc,kilauea";
12494 - dcr-parent = <&/cpus/PowerPC,405EX@0>;
12495 + dcr-parent = <&/cpus/cpu@0>;
12496 +
12497 + aliases {
12498 + ethernet0 = &EMAC0;
12499 + ethernet1 = &EMAC1;
12500 + serial0 = &UART0;
12501 + serial1 = &UART1;
12502 + };
12503
12504 cpus {
12505 #address-cells = <1>;
12506 #size-cells = <0>;
12507
12508 - PowerPC,405EX@0 {
12509 + cpu@0 {
12510 device_type = "cpu";
12511 + model = "PowerPC,405EX";
12512 reg = <0>;
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>;
12519 + has-mdio;
12520 };
12521
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;
12529 };
12530
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;
12538 };
12539 };
12540 +
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";
12547 + primary;
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>;
12553 +
12554 + /* Outbound ranges, one memory and one IO,
12555 + * later cannot be changed
12556 + */
12557 + ranges = <02000000 0 80000000 90000000 0 08000000
12558 + 01000000 0 00000000 e0000000 0 00010000>;
12559 +
12560 + /* Inbound 2GB range starting at 0 */
12561 + dma-ranges = <42000000 0 0 0 0 80000000>;
12562 +
12563 + /* This drives busses 0x00 to 0x3f */
12564 + bus-range = <00 3f>;
12565 +
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
12573 + */
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 */>;
12580 + };
12581 +
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";
12588 + primary;
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>;
12594 +
12595 + /* Outbound ranges, one memory and one IO,
12596 + * later cannot be changed
12597 + */
12598 + ranges = <02000000 0 80000000 98000000 0 08000000
12599 + 01000000 0 00000000 e0010000 0 00010000>;
12600 +
12601 + /* Inbound 2GB range starting at 0 */
12602 + dma-ranges = <42000000 0 0 0 0 80000000>;
12603 +
12604 + /* This drives busses 0x40 to 0x7f */
12605 + bus-range = <40 7f>;
12606 +
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
12614 + */
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 */>;
12621 + };
12622 };
12623 };
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
12627 @@ -23,6 +23,12 @@
12628 #address-cells = <1>;
12629 #size-cells = <1>;
12630
12631 + aliases {
12632 + serial0 = &serial0;
12633 + serial1 = &serial1;
12634 + pci0 = &pci0;
12635 + };
12636 +
12637 cpus {
12638 #address-cells = <1>;
12639 #size-cells = <0>;
12640 @@ -60,7 +66,7 @@
12641 i2c@80003000 {
12642 #address-cells = <1>;
12643 #size-cells = <0>;
12644 - device_type = "i2c";
12645 + cell-index = <0>;
12646 compatible = "fsl-i2c";
12647 reg = <80003000 1000>;
12648 interrupts = <5 2>;
12649 @@ -73,7 +79,8 @@
12650 };
12651 };
12652
12653 - serial@80004500 {
12654 + serial0: serial@80004500 {
12655 + cell-index = <0>;
12656 device_type = "serial";
12657 compatible = "ns16550";
12658 reg = <80004500 8>;
12659 @@ -83,7 +90,8 @@
12660 interrupt-parent = <&mpic>;
12661 };
12662
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>;
12671 };
12672
12673 - pci@fec00000 {
12674 + pci0: pci@fec00000 {
12675 #address-cells = <3>;
12676 #size-cells = <2>;
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
12681 @@ -23,6 +23,12 @@
12682 #address-cells = <1>;
12683 #size-cells = <1>;
12684
12685 + aliases {
12686 + serial0 = &serial0;
12687 + serial1 = &serial1;
12688 + pci0 = &pci0;
12689 + };
12690 +
12691 cpus {
12692 #address-cells = <1>;
12693 #size-cells = <0>;
12694 @@ -60,7 +66,7 @@
12695 i2c@80003000 {
12696 #address-cells = <1>;
12697 #size-cells = <0>;
12698 - device_type = "i2c";
12699 + cell-index = <0>;
12700 compatible = "fsl-i2c";
12701 reg = <80003000 1000>;
12702 interrupts = <5 2>;
12703 @@ -73,7 +79,8 @@
12704 };
12705 };
12706
12707 - serial@80004500 {
12708 + serial0: serial@80004500 {
12709 + cell-index = <0>;
12710 device_type = "serial";
12711 compatible = "ns16550";
12712 reg = <80004500 8>;
12713 @@ -83,7 +90,8 @@
12714 interrupt-parent = <&mpic>;
12715 };
12716
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>;
12725 };
12726
12727 - pci@fec00000 {
12728 + pci0: pci@fec00000 {
12729 #address-cells = <3>;
12730 #size-cells = <2>;
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
12735 @@ -19,7 +19,7 @@
12736 / {
12737 model = "fsl,lite5200";
12738 // revision = "1.0";
12739 - compatible = "fsl,lite5200","generic-mpc5200";
12740 + compatible = "fsl,lite5200";
12741 #address-cells = <1>;
12742 #size-cells = <1>;
12743
12744 @@ -284,7 +284,8 @@
12745 };
12746
12747 i2c@3d00 {
12748 - device_type = "i2c";
12749 + #address-cells = <1>;
12750 + #size-cells = <0>;
12751 compatible = "mpc5200-i2c","fsl-i2c";
12752 cell-index = <0>;
12753 reg = <3d00 40>;
12754 @@ -294,7 +295,8 @@
12755 };
12756
12757 i2c@3d40 {
12758 - device_type = "i2c";
12759 + #address-cells = <1>;
12760 + #size-cells = <0>;
12761 compatible = "mpc5200-i2c","fsl-i2c";
12762 cell-index = <1>;
12763 reg = <3d40 40>;
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
12767 @@ -19,7 +19,7 @@
12768 / {
12769 model = "fsl,lite5200b";
12770 // revision = "1.0";
12771 - compatible = "fsl,lite5200b","generic-mpc5200";
12772 + compatible = "fsl,lite5200b";
12773 #address-cells = <1>;
12774 #size-cells = <1>;
12775
12776 @@ -300,7 +300,8 @@
12777 };
12778
12779 i2c@3d00 {
12780 - device_type = "i2c";
12781 + #address-cells = <1>;
12782 + #size-cells = <0>;
12783 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
12784 cell-index = <0>;
12785 reg = <3d00 40>;
12786 @@ -310,7 +311,8 @@
12787 };
12788
12789 i2c@3d40 {
12790 - device_type = "i2c";
12791 + #address-cells = <1>;
12792 + #size-cells = <0>;
12793 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
12794 cell-index = <1>;
12795 reg = <3d40 40>;
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
12799 @@ -0,0 +1,347 @@
12800 +/*
12801 + * Device Tree Source for AMCC Makalu (405EX)
12802 + *
12803 + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
12804 + *
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.
12808 + */
12809 +
12810 +/ {
12811 + #address-cells = <1>;
12812 + #size-cells = <1>;
12813 + model = "amcc,makalu";
12814 + compatible = "amcc,makalu";
12815 + dcr-parent = <&/cpus/cpu@0>;
12816 +
12817 + aliases {
12818 + ethernet0 = &EMAC0;
12819 + ethernet1 = &EMAC1;
12820 + serial0 = &UART0;
12821 + serial1 = &UART1;
12822 + };
12823 +
12824 + cpus {
12825 + #address-cells = <1>;
12826 + #size-cells = <0>;
12827 +
12828 + cpu@0 {
12829 + device_type = "cpu";
12830 + model = "PowerPC,405EX";
12831 + reg = <0>;
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 */
12838 + dcr-controller;
12839 + dcr-access-method = "native";
12840 + };
12841 + };
12842 +
12843 + memory {
12844 + device_type = "memory";
12845 + reg = <0 0>; /* Filled in by U-Boot */
12846 + };
12847 +
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>;
12856 + };
12857 +
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>;
12868 + };
12869 +
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>;
12880 + };
12881 +
12882 + plb {
12883 + compatible = "ibm,plb-405ex", "ibm,plb4";
12884 + #address-cells = <1>;
12885 + #size-cells = <1>;
12886 + ranges;
12887 + clock-frequency = <0>; /* Filled in by U-Boot */
12888 +
12889 + SDRAM0: memory-controller {
12890 + compatible = "ibm,sdram-405ex";
12891 + dcr-reg = <010 2>;
12892 + };
12893 +
12894 + MAL0: mcmal {
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>;
12910 + };
12911 +
12912 + POB0: opb {
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 */
12921 +
12922 + EBC0: ebc {
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>;
12931 +
12932 + nor_flash@0,0 {
12933 + compatible = "amd,s29gl512n", "cfi-flash";
12934 + bank-width = <2>;
12935 + reg = <0 000000 4000000>;
12936 + #address-cells = <1>;
12937 + #size-cells = <1>;
12938 + partition@0 {
12939 + label = "kernel";
12940 + reg = <0 200000>;
12941 + };
12942 + partition@200000 {
12943 + label = "root";
12944 + reg = <200000 200000>;
12945 + };
12946 + partition@400000 {
12947 + label = "user";
12948 + reg = <400000 3b60000>;
12949 + };
12950 + partition@3f60000 {
12951 + label = "env";
12952 + reg = <3f60000 40000>;
12953 + };
12954 + partition@3fa0000 {
12955 + label = "u-boot";
12956 + reg = <3fa0000 60000>;
12957 + };
12958 + };
12959 + };
12960 +
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>;
12970 + };
12971 +
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>;
12981 + };
12982 +
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>;
12989 + };
12990 +
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>;
12997 + };
12998 +
12999 +
13000 + RGMII0: emac-rgmii@ef600b00 {
13001 + device_type = "rgmii-interface";
13002 + compatible = "ibm,rgmii-405ex", "ibm,rgmii";
13003 + reg = <ef600b00 104>;
13004 + has-mdio;
13005 + };
13006 +
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;
13033 + };
13034 +
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;
13061 + };
13062 + };
13063 +
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";
13070 + primary;
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>;
13076 +
13077 + /* Outbound ranges, one memory and one IO,
13078 + * later cannot be changed
13079 + */
13080 + ranges = <02000000 0 80000000 90000000 0 08000000
13081 + 01000000 0 00000000 e0000000 0 00010000>;
13082 +
13083 + /* Inbound 2GB range starting at 0 */
13084 + dma-ranges = <42000000 0 0 0 0 80000000>;
13085 +
13086 + /* This drives busses 0x00 to 0x3f */
13087 + bus-range = <00 3f>;
13088 +
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
13096 + */
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 */>;
13103 + };
13104 +
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";
13111 + primary;
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>;
13117 +
13118 + /* Outbound ranges, one memory and one IO,
13119 + * later cannot be changed
13120 + */
13121 + ranges = <02000000 0 80000000 98000000 0 08000000
13122 + 01000000 0 00000000 e0010000 0 00010000>;
13123 +
13124 + /* Inbound 2GB range starting at 0 */
13125 + dma-ranges = <42000000 0 0 0 0 80000000>;
13126 +
13127 + /* This drives busses 0x40 to 0x7f */
13128 + bus-range = <40 7f>;
13129 +
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
13137 + */
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 */>;
13144 + };
13145 + };
13146 +};
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
13150 @@ -0,0 +1,309 @@
13151 +/*
13152 + * Motion-PRO board Device Tree Source
13153 + *
13154 + * Copyright (C) 2007 Semihalf
13155 + * Marian Balakowicz <m8@semihalf.com>
13156 + *
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.
13161 + */
13162 +
13163 +/*
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
13167 + */
13168 +
13169 +/ {
13170 + model = "promess,motionpro";
13171 + compatible = "promess,motionpro";
13172 + #address-cells = <1>;
13173 + #size-cells = <1>;
13174 +
13175 + cpus {
13176 + #address-cells = <1>;
13177 + #size-cells = <0>;
13178 +
13179 + PowerPC,5200@0 {
13180 + device_type = "cpu";
13181 + reg = <0>;
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
13189 + };
13190 + };
13191 +
13192 + memory {
13193 + device_type = "memory";
13194 + reg = <00000000 04000000>; // 64MB
13195 + };
13196 +
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
13206 +
13207 + cdm@200 {
13208 + compatible = "mpc5200b-cdm","mpc5200-cdm";
13209 + reg = <200 38>;
13210 + };
13211 +
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";
13217 + reg = <500 80>;
13218 + };
13219 +
13220 + gpt@600 { // General Purpose Timer
13221 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13222 + reg = <600 10>;
13223 + interrupts = <1 9 0>;
13224 + interrupt-parent = <&mpc5200_pic>;
13225 + fsl,has-wdt;
13226 + };
13227 +
13228 + gpt@610 { // General Purpose Timer
13229 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13230 + reg = <610 10>;
13231 + interrupts = <1 a 0>;
13232 + interrupt-parent = <&mpc5200_pic>;
13233 + };
13234 +
13235 + gpt@620 { // General Purpose Timer
13236 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13237 + reg = <620 10>;
13238 + interrupts = <1 b 0>;
13239 + interrupt-parent = <&mpc5200_pic>;
13240 + };
13241 +
13242 + gpt@630 { // General Purpose Timer
13243 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13244 + reg = <630 10>;
13245 + interrupts = <1 c 0>;
13246 + interrupt-parent = <&mpc5200_pic>;
13247 + };
13248 +
13249 + gpt@640 { // General Purpose Timer
13250 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13251 + reg = <640 10>;
13252 + interrupts = <1 d 0>;
13253 + interrupt-parent = <&mpc5200_pic>;
13254 + };
13255 +
13256 + gpt@650 { // General Purpose Timer
13257 + compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
13258 + reg = <650 10>;
13259 + interrupts = <1 e 0>;
13260 + interrupt-parent = <&mpc5200_pic>;
13261 + };
13262 +
13263 + motionpro-led@660 { // Motion-PRO status LED
13264 + compatible = "promess,motionpro-led";
13265 + label = "motionpro-statusled";
13266 + reg = <660 10>;
13267 + interrupts = <1 f 0>;
13268 + interrupt-parent = <&mpc5200_pic>;
13269 + blink-delay = <64>; // 100 msec
13270 + };
13271 +
13272 + motionpro-led@670 { // Motion-PRO ready LED
13273 + compatible = "promess,motionpro-led";
13274 + label = "motionpro-readyled";
13275 + reg = <670 10>;
13276 + interrupts = <1 10 0>;
13277 + interrupt-parent = <&mpc5200_pic>;
13278 + };
13279 +
13280 + rtc@800 { // Real time clock
13281 + compatible = "mpc5200b-rtc","mpc5200-rtc";
13282 + reg = <800 100>;
13283 + interrupts = <1 5 0 1 6 0>;
13284 + interrupt-parent = <&mpc5200_pic>;
13285 + };
13286 +
13287 + mscan@980 {
13288 + compatible = "mpc5200b-mscan","mpc5200-mscan";
13289 + interrupts = <2 12 0>;
13290 + interrupt-parent = <&mpc5200_pic>;
13291 + reg = <980 80>;
13292 + };
13293 +
13294 + gpio@b00 {
13295 + compatible = "mpc5200b-gpio","mpc5200-gpio";
13296 + reg = <b00 40>;
13297 + interrupts = <1 7 0>;
13298 + interrupt-parent = <&mpc5200_pic>;
13299 + };
13300 +
13301 + gpio-wkup@c00 {
13302 + compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup";
13303 + reg = <c00 40>;
13304 + interrupts = <1 8 0 0 3 0>;
13305 + interrupt-parent = <&mpc5200_pic>;
13306 + };
13307 +
13308 +
13309 + spi@f00 {
13310 + compatible = "mpc5200b-spi","mpc5200-spi";
13311 + reg = <f00 20>;
13312 + interrupts = <2 d 0 2 e 0>;
13313 + interrupt-parent = <&mpc5200_pic>;
13314 + };
13315 +
13316 + usb@1000 {
13317 + compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
13318 + reg = <1000 ff>;
13319 + interrupts = <2 6 0>;
13320 + interrupt-parent = <&mpc5200_pic>;
13321 + };
13322 +
13323 + dma-controller@1200 {
13324 + compatible = "mpc5200b-bestcomm","mpc5200-bestcomm";
13325 + reg = <1200 80>;
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>;
13331 + };
13332 +
13333 + xlb@1f00 {
13334 + compatible = "mpc5200b-xlb","mpc5200-xlb";
13335 + reg = <1f00 100>;
13336 + };
13337 +
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>;
13345 + };
13346 +
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>;
13354 + };
13355 +
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>;
13364 + };
13365 +
13366 + ethernet@3000 {
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>;
13373 + };
13374 +
13375 + ata@3a00 {
13376 + compatible = "mpc5200b-ata","mpc5200-ata";
13377 + reg = <3a00 100>;
13378 + interrupts = <2 7 0>;
13379 + interrupt-parent = <&mpc5200_pic>;
13380 + };
13381 +
13382 + i2c@3d40 {
13383 + compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
13384 + reg = <3d40 40>;
13385 + interrupts = <2 10 0>;
13386 + interrupt-parent = <&mpc5200_pic>;
13387 + fsl5200-clocking;
13388 + };
13389 +
13390 + sram@8000 {
13391 + compatible = "mpc5200b-sram","mpc5200-sram";
13392 + reg = <8000 4000>;
13393 + };
13394 + };
13395 +
13396 + lpb {
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>;
13404 +
13405 + // 8-bit DualPort SRAM on LocalPlus Bus CS1
13406 + kollmorgen@1,0 {
13407 + compatible = "promess,motionpro-kollmorgen";
13408 + reg = <1 0 10000>;
13409 + interrupts = <1 1 0>;
13410 + interrupt-parent = <&mpc5200_pic>;
13411 + };
13412 +
13413 + // 8-bit board CPLD on LocalPlus Bus CS2
13414 + cpld@2,0 {
13415 + compatible = "promess,motionpro-cpld";
13416 + reg = <2 0 10000>;
13417 + };
13418 +
13419 + // 8-bit custom Anybus Module on LocalPlus Bus CS3
13420 + anybus@3,0 {
13421 + compatible = "promess,motionpro-anybus";
13422 + reg = <3 0 10000>;
13423 + };
13424 + pro_module_general@3,0 {
13425 + compatible = "promess,pro_module_general";
13426 + reg = <3 0 3>;
13427 + };
13428 + pro_module_dio@3,800 {
13429 + compatible = "promess,pro_module_dio";
13430 + reg = <3 800 2>;
13431 + };
13432 + };
13433 +
13434 + pci@f0000d00 {
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
13446 +
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>;
13458 + };
13459 +};
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
13463 @@ -15,6 +15,14 @@
13464 #address-cells = <1>;
13465 #size-cells = <1>;
13466
13467 + aliases {
13468 + ethernet0 = &enet0;
13469 + ethernet1 = &enet1;
13470 + serial0 = &serial0;
13471 + serial1 = &serial1;
13472 + pci0 = &pci0;
13473 + };
13474 +
13475 cpus {
13476 #address-cells = <1>;
13477 #size-cells = <0>;
13478 @@ -37,10 +45,58 @@
13479 reg = <00000000 08000000>; // 128MB at 0
13480 };
13481
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>;
13489 +
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>;
13497 +
13498 + flash@0,0 {
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>;
13505 + };
13506 +
13507 + nand@1,0 {
13508 + #address-cells = <1>;
13509 + #size-cells = <1>;
13510 + compatible = "fsl,mpc8313-fcm-nand",
13511 + "fsl,elbc-fcm-nand";
13512 + reg = <1 0 2000>;
13513 +
13514 + u-boot@0 {
13515 + reg = <0 100000>;
13516 + read-only;
13517 + };
13518 +
13519 + kernel@100000 {
13520 + reg = <100000 300000>;
13521 + };
13522 +
13523 + fs@400000 {
13524 + reg = <400000 1c00000>;
13525 + };
13526 + };
13527 + };
13528 +
13529 soc8313@e0000000 {
13530 #address-cells = <1>;
13531 #size-cells = <1>;
13532 device_type = "soc";
13533 + compatible = "simple-bus";
13534 ranges = <0 e0000000 00100000>;
13535 reg = <e0000000 00000200>;
13536 bus-frequency = <0>;
13537 @@ -52,7 +108,9 @@
13538 };
13539
13540 i2c@3000 {
13541 - device_type = "i2c";
13542 + #address-cells = <1>;
13543 + #size-cells = <0>;
13544 + cell-index = <0>;
13545 compatible = "fsl-i2c";
13546 reg = <3000 100>;
13547 interrupts = <e 8>;
13548 @@ -61,7 +119,9 @@
13549 };
13550
13551 i2c@3100 {
13552 - device_type = "i2c";
13553 + #address-cells = <1>;
13554 + #size-cells = <0>;
13555 + cell-index = <1>;
13556 compatible = "fsl-i2c";
13557 reg = <3100 100>;
13558 interrupts = <f 8>;
13559 @@ -80,7 +140,6 @@
13560
13561 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
13562 usb@23000 {
13563 - device_type = "usb";
13564 compatible = "fsl-usb2-dr";
13565 reg = <23000 1000>;
13566 #address-cells = <1>;
13567 @@ -91,11 +150,10 @@
13568 };
13569
13570 mdio@24520 {
13571 - device_type = "mdio";
13572 - compatible = "gianfar";
13573 - reg = <24520 20>;
13574 #address-cells = <1>;
13575 #size-cells = <0>;
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 @@
13582 };
13583 };
13584
13585 - ethernet@24000 {
13586 + enet0: ethernet@24000 {
13587 + cell-index = <0>;
13588 device_type = "network";
13589 model = "eTSEC";
13590 compatible = "gianfar";
13591 @@ -121,7 +180,8 @@
13592 phy-handle = < &phy1 >;
13593 };
13594
13595 - ethernet@25000 {
13596 + enet1: ethernet@25000 {
13597 + cell-index = <1>;
13598 device_type = "network";
13599 model = "eTSEC";
13600 compatible = "gianfar";
13601 @@ -132,7 +192,8 @@
13602 phy-handle = < &phy4 >;
13603 };
13604
13605 - serial@4500 {
13606 + serial0: serial@4500 {
13607 + cell-index = <0>;
13608 device_type = "serial";
13609 compatible = "ns16550";
13610 reg = <4500 100>;
13611 @@ -141,7 +202,8 @@
13612 interrupt-parent = < &ipic >;
13613 };
13614
13615 - serial@4600 {
13616 + serial1: serial@4600 {
13617 + cell-index = <1>;
13618 device_type = "serial";
13619 compatible = "ns16550";
13620 reg = <4600 100>;
13621 @@ -179,7 +241,8 @@
13622 };
13623 };
13624
13625 - pci@e0008500 {
13626 + pci0: pci@e0008500 {
13627 + cell-index = <1>;
13628 interrupt-map-mask = <f800 0 0 7>;
13629 interrupt-map = <
13630
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
13634 @@ -7,6 +7,18 @@
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.
13638 +
13639 + * To enable external serial I/O on a Freescale MPC 8323 SYS/MDS board, do
13640 + * this:
13641 + *
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.
13646 + *
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".
13650 */
13651
13652 / {
13653 @@ -15,6 +27,14 @@
13654 #address-cells = <1>;
13655 #size-cells = <1>;
13656
13657 + aliases {
13658 + ethernet0 = &enet0;
13659 + ethernet1 = &enet1;
13660 + serial0 = &serial0;
13661 + serial1 = &serial1;
13662 + pci0 = &pci0;
13663 + };
13664 +
13665 cpus {
13666 #address-cells = <1>;
13667 #size-cells = <0>;
13668 @@ -59,7 +79,7 @@
13669 i2c@3000 {
13670 #address-cells = <1>;
13671 #size-cells = <0>;
13672 - device_type = "i2c";
13673 + cell-index = <0>;
13674 compatible = "fsl-i2c";
13675 reg = <3000 100>;
13676 interrupts = <e 8>;
13677 @@ -72,7 +92,8 @@
13678 };
13679 };
13680
13681 - serial@4500 {
13682 + serial0: serial@4500 {
13683 + cell-index = <0>;
13684 device_type = "serial";
13685 compatible = "ns16550";
13686 reg = <4500 100>;
13687 @@ -81,7 +102,8 @@
13688 interrupt-parent = < &ipic >;
13689 };
13690
13691 - serial@4600 {
13692 + serial1: serial@4600 {
13693 + cell-index = <1>;
13694 device_type = "serial";
13695 compatible = "ns16550";
13696 reg = <4600 100>;
13697 @@ -159,6 +181,23 @@
13698 1 1e 1 0 1 0 /* TX_EN */
13699 1 1f 2 0 1 0>;/* CRS */
13700 };
13701 + pio5: ucc_pin@05 {
13702 + pio-map = <
13703 + /*
13704 + * open has
13705 + * port pin dir drain sel irq
13706 + */
13707 + 2 0 1 0 2 0 /* TxD5 */
13708 + 2 8 2 0 2 0 /* RxD5 */
13709 +
13710 + 2 1d 2 0 0 0 /* CTS5 */
13711 + 2 1f 1 0 2 0 /* RTS5 */
13712 +
13713 + 2 18 2 0 0 0 /* CD */
13714 +
13715 + >;
13716 + };
13717 +
13718 };
13719 };
13720
13721 @@ -166,6 +205,7 @@
13722 #address-cells = <1>;
13723 #size-cells = <1>;
13724 device_type = "qe";
13725 + compatible = "fsl,qe";
13726 model = "QE";
13727 ranges = <0 e0100000 00100000>;
13728 reg = <e0100000 480>;
13729 @@ -200,7 +240,6 @@
13730 };
13731
13732 usb@6c0 {
13733 - device_type = "usb";
13734 compatible = "qe_udc";
13735 reg = <6c0 40 8B00 100>;
13736 interrupts = <b>;
13737 @@ -208,48 +247,58 @@
13738 mode = "slave";
13739 };
13740
13741 - ucc@2200 {
13742 + enet0: ucc@2200 {
13743 device_type = "network";
13744 compatible = "ucc_geth";
13745 model = "UCC";
13746 + cell-index = <3>;
13747 device-id = <3>;
13748 reg = <2200 200>;
13749 interrupts = <22>;
13750 interrupt-parent = < &qeic >;
13751 - /*
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.
13755 - */
13756 - mac-address = [ 00 00 00 00 00 00 ];
13757 local-mac-address = [ 00 00 00 00 00 00 ];
13758 - rx-clock = <19>;
13759 - tx-clock = <1a>;
13760 + rx-clock-name = "clk9";
13761 + tx-clock-name = "clk10";
13762 phy-handle = < &phy3 >;
13763 pio-handle = < &pio3 >;
13764 };
13765
13766 - ucc@3200 {
13767 + enet1: ucc@3200 {
13768 device_type = "network";
13769 compatible = "ucc_geth";
13770 model = "UCC";
13771 + cell-index = <4>;
13772 device-id = <4>;
13773 reg = <3200 200>;
13774 interrupts = <23>;
13775 interrupt-parent = < &qeic >;
13776 - /*
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.
13780 - */
13781 - mac-address = [ 00 00 00 00 00 00 ];
13782 local-mac-address = [ 00 00 00 00 00 00 ];
13783 - rx-clock = <17>;
13784 - tx-clock = <18>;
13785 + rx-clock-name = "clk7";
13786 + tx-clock-name = "clk8";
13787 phy-handle = < &phy4 >;
13788 pio-handle = < &pio4 >;
13789 };
13790
13791 + ucc@2400 {
13792 + device_type = "serial";
13793 + compatible = "ucc_uart";
13794 + model = "UCC";
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 >;
13801 + /*
13802 + * For Soft-UART, we need to set TX to 1X, which
13803 + * means specifying separate clock sources.
13804 + */
13805 + rx-clock-name = "brg5";
13806 + tx-clock-name = "brg6";
13807 + pio-handle = < &pio5 >;
13808 + };
13809 +
13810 +
13811 mdio@2320 {
13812 #address-cells = <1>;
13813 #size-cells = <0>;
13814 @@ -283,7 +332,8 @@
13815 };
13816 };
13817
13818 - pci@e0008500 {
13819 + pci0: pci@e0008500 {
13820 + cell-index = <1>;
13821 interrupt-map-mask = <f800 0 0 7>;
13822 interrupt-map = <
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
13827 @@ -15,6 +15,14 @@
13828 #address-cells = <1>;
13829 #size-cells = <1>;
13830
13831 + aliases {
13832 + ethernet0 = &enet0;
13833 + ethernet1 = &enet1;
13834 + serial0 = &serial0;
13835 + serial1 = &serial1;
13836 + pci0 = &pci0;
13837 + };
13838 +
13839 cpus {
13840 #address-cells = <1>;
13841 #size-cells = <0>;
13842 @@ -52,7 +60,9 @@
13843 };
13844
13845 i2c@3000 {
13846 - device_type = "i2c";
13847 + #address-cells = <1>;
13848 + #size-cells = <0>;
13849 + cell-index = <0>;
13850 compatible = "fsl-i2c";
13851 reg = <3000 100>;
13852 interrupts = <e 8>;
13853 @@ -60,7 +70,8 @@
13854 dfsrr;
13855 };
13856
13857 - serial@4500 {
13858 + serial0: serial@4500 {
13859 + cell-index = <0>;
13860 device_type = "serial";
13861 compatible = "ns16550";
13862 reg = <4500 100>;
13863 @@ -69,7 +80,8 @@
13864 interrupt-parent = <&pic>;
13865 };
13866
13867 - serial@4600 {
13868 + serial1: serial@4600 {
13869 + cell-index = <1>;
13870 device_type = "serial";
13871 compatible = "ns16550";
13872 reg = <4600 100>;
13873 @@ -187,44 +199,34 @@
13874 mode = "cpu";
13875 };
13876
13877 - ucc@3000 {
13878 + enet0: ucc@3000 {
13879 device_type = "network";
13880 compatible = "ucc_geth";
13881 model = "UCC";
13882 + cell-index = <2>;
13883 device-id = <2>;
13884 reg = <3000 200>;
13885 interrupts = <21>;
13886 interrupt-parent = <&qeic>;
13887 - /*
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.
13891 - */
13892 - mac-address = [ 00 00 00 00 00 00 ];
13893 local-mac-address = [ 00 00 00 00 00 00 ];
13894 - rx-clock = <20>;
13895 - tx-clock = <13>;
13896 + rx-clock-name = "clk16";
13897 + tx-clock-name = "clk3";
13898 phy-handle = <&phy00>;
13899 pio-handle = <&ucc2pio>;
13900 };
13901
13902 - ucc@2200 {
13903 + enet1: ucc@2200 {
13904 device_type = "network";
13905 compatible = "ucc_geth";
13906 model = "UCC";
13907 + cell-index = <3>;
13908 device-id = <3>;
13909 reg = <2200 200>;
13910 interrupts = <22>;
13911 interrupt-parent = <&qeic>;
13912 - /*
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.
13916 - */
13917 - mac-address = [ 00 00 00 00 00 00 ];
13918 local-mac-address = [ 00 00 00 00 00 00 ];
13919 - rx-clock = <19>;
13920 - tx-clock = <1a>;
13921 + rx-clock-name = "clk9";
13922 + tx-clock-name = "clk10";
13923 phy-handle = <&phy04>;
13924 pio-handle = <&ucc3pio>;
13925 };
13926 @@ -262,7 +264,8 @@
13927 };
13928 };
13929
13930 - pci@e0008500 {
13931 + pci0: pci@e0008500 {
13932 + cell-index = <1>;
13933 interrupt-map-mask = <f800 0 0 7>;
13934 interrupt-map = <
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
13939 @@ -14,6 +14,15 @@
13940 #address-cells = <1>;
13941 #size-cells = <1>;
13942
13943 + aliases {
13944 + ethernet0 = &enet0;
13945 + ethernet1 = &enet1;
13946 + serial0 = &serial0;
13947 + serial1 = &serial1;
13948 + pci0 = &pci0;
13949 + pci1 = &pci1;
13950 + };
13951 +
13952 cpus {
13953 #address-cells = <1>;
13954 #size-cells = <0>;
13955 @@ -51,7 +60,9 @@
13956 };
13957
13958 i2c@3000 {
13959 - device_type = "i2c";
13960 + #address-cells = <1>;
13961 + #size-cells = <0>;
13962 + cell-index = <0>;
13963 compatible = "fsl-i2c";
13964 reg = <3000 100>;
13965 interrupts = <e 8>;
13966 @@ -60,7 +71,9 @@
13967 };
13968
13969 i2c@3100 {
13970 - device_type = "i2c";
13971 + #address-cells = <1>;
13972 + #size-cells = <0>;
13973 + cell-index = <1>;
13974 compatible = "fsl-i2c";
13975 reg = <3100 100>;
13976 interrupts = <f 8>;
13977 @@ -78,7 +91,6 @@
13978 };
13979
13980 usb@22000 {
13981 - device_type = "usb";
13982 compatible = "fsl-usb2-mph";
13983 reg = <22000 1000>;
13984 #address-cells = <1>;
13985 @@ -90,7 +102,6 @@
13986 };
13987
13988 usb@23000 {
13989 - device_type = "usb";
13990 compatible = "fsl-usb2-dr";
13991 reg = <23000 1000>;
13992 #address-cells = <1>;
13993 @@ -102,11 +113,10 @@
13994 };
13995
13996 mdio@24520 {
13997 - device_type = "mdio";
13998 - compatible = "gianfar";
13999 - reg = <24520 20>;
14000 #address-cells = <1>;
14001 #size-cells = <0>;
14002 + compatible = "fsl,gianfar-mdio";
14003 + reg = <24520 20>;
14004
14005 /* Vitesse 8201 */
14006 phy1c: ethernet-phy@1c {
14007 @@ -115,27 +125,14 @@
14008 reg = <1c>;
14009 device_type = "ethernet-phy";
14010 };
14011 -
14012 - /* Vitesse 7385 */
14013 - phy1f: ethernet-phy@1f {
14014 - interrupt-parent = < &ipic >;
14015 - interrupts = <12 8>;
14016 - reg = <1f>;
14017 - device_type = "ethernet-phy";
14018 - };
14019 };
14020
14021 - ethernet@24000 {
14022 + enet0: ethernet@24000 {
14023 + cell-index = <0>;
14024 device_type = "network";
14025 model = "TSEC";
14026 compatible = "gianfar";
14027 reg = <24000 1000>;
14028 - /*
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.
14032 - */
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>;
14039 };
14040
14041 - ethernet@25000 {
14042 - #address-cells = <1>;
14043 - #size-cells = <0>;
14044 + enet1: ethernet@25000 {
14045 + cell-index = <1>;
14046 device_type = "network";
14047 model = "TSEC";
14048 compatible = "gianfar";
14049 reg = <25000 1000>;
14050 - /*
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.
14054 - */
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>;
14063 };
14064
14065 - serial@4500 {
14066 + serial0: serial@4500 {
14067 + cell-index = <0>;
14068 device_type = "serial";
14069 compatible = "ns16550";
14070 reg = <4500 100>;
14071 @@ -172,7 +164,8 @@
14072 interrupt-parent = < &ipic >;
14073 };
14074
14075 - serial@4600 {
14076 + serial1: serial@4600 {
14077 + cell-index = <1>;
14078 device_type = "serial";
14079 compatible = "ns16550";
14080 reg = <4600 100>;
14081 @@ -203,7 +196,8 @@
14082 };
14083 };
14084
14085 - pci@e0008500 {
14086 + pci0: pci@e0008500 {
14087 + cell-index = <1>;
14088 interrupt-map-mask = <f800 0 0 7>;
14089 interrupt-map = <
14090 /* IDSEL 0x10 - SATA */
14091 @@ -224,7 +218,8 @@
14092 device_type = "pci";
14093 };
14094
14095 - pci@e0008600 {
14096 + pci1: pci@e0008600 {
14097 + cell-index = <2>;
14098 interrupt-map-mask = <f800 0 0 7>;
14099 interrupt-map = <
14100 /* IDSEL 0x0E - MiniPCI Slot */
14101 @@ -249,6 +244,21 @@
14102 device_type = "pci";
14103 };
14104
14105 -
14106 -
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>;
14114 +
14115 + pata@3,0 {
14116 + compatible = "fsl,mpc8349emitx-pata", "ata-generic";
14117 + reg = <3 0 10 3 20c 4>;
14118 + reg-shift = <1>;
14119 + pio-mode = <6>;
14120 + interrupts = <17 8>;
14121 + interrupt-parent = <&ipic>;
14122 + };
14123 + };
14124 };
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
14128 @@ -14,6 +14,13 @@
14129 #address-cells = <1>;
14130 #size-cells = <1>;
14131
14132 + aliases {
14133 + ethernet0 = &enet0;
14134 + serial0 = &serial0;
14135 + serial1 = &serial1;
14136 + pci0 = &pci0;
14137 + };
14138 +
14139 cpus {
14140 #address-cells = <1>;
14141 #size-cells = <0>;
14142 @@ -51,7 +58,9 @@
14143 };
14144
14145 i2c@3000 {
14146 - device_type = "i2c";
14147 + #address-cells = <1>;
14148 + #size-cells = <0>;
14149 + cell-index = <0>;
14150 compatible = "fsl-i2c";
14151 reg = <3000 100>;
14152 interrupts = <e 8>;
14153 @@ -60,7 +69,9 @@
14154 };
14155
14156 i2c@3100 {
14157 - device_type = "i2c";
14158 + #address-cells = <1>;
14159 + #size-cells = <0>;
14160 + cell-index = <1>;
14161 compatible = "fsl-i2c";
14162 reg = <3100 100>;
14163 interrupts = <f 8>;
14164 @@ -78,7 +89,6 @@
14165 };
14166
14167 usb@23000 {
14168 - device_type = "usb";
14169 compatible = "fsl-usb2-dr";
14170 reg = <23000 1000>;
14171 #address-cells = <1>;
14172 @@ -90,11 +100,10 @@
14173 };
14174
14175 mdio@24520 {
14176 - device_type = "mdio";
14177 - compatible = "gianfar";
14178 - reg = <24520 20>;
14179 #address-cells = <1>;
14180 #size-cells = <0>;
14181 + compatible = "fsl,gianfar-mdio";
14182 + reg = <24520 20>;
14183
14184 /* Vitesse 8201 */
14185 phy1c: ethernet-phy@1c {
14186 @@ -105,7 +114,8 @@
14187 };
14188 };
14189
14190 - ethernet@24000 {
14191 + enet0: ethernet@24000 {
14192 + cell-index = <0>;
14193 device_type = "network";
14194 model = "TSEC";
14195 compatible = "gianfar";
14196 @@ -117,7 +127,8 @@
14197 linux,network-index = <0>;
14198 };
14199
14200 - serial@4500 {
14201 + serial0: serial@4500 {
14202 + cell-index = <0>;
14203 device_type = "serial";
14204 compatible = "ns16550";
14205 reg = <4500 100>;
14206 @@ -126,7 +137,8 @@
14207 interrupt-parent = < &ipic >;
14208 };
14209
14210 - serial@4600 {
14211 + serial1: serial@4600 {
14212 + cell-index = <1>;
14213 device_type = "serial";
14214 compatible = "ns16550";
14215 reg = <4600 100>;
14216 @@ -157,7 +169,8 @@
14217 };
14218 };
14219
14220 - pci@e0008600 {
14221 + pci0: pci@e0008600 {
14222 + cell-index = <2>;
14223 interrupt-map-mask = <f800 0 0 7>;
14224 interrupt-map = <
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
14229 @@ -15,6 +15,15 @@
14230 #address-cells = <1>;
14231 #size-cells = <1>;
14232
14233 + aliases {
14234 + ethernet0 = &enet0;
14235 + ethernet1 = &enet1;
14236 + serial0 = &serial0;
14237 + serial1 = &serial1;
14238 + pci0 = &pci0;
14239 + pci1 = &pci1;
14240 + };
14241 +
14242 cpus {
14243 #address-cells = <1>;
14244 #size-cells = <0>;
14245 @@ -59,7 +68,7 @@
14246 i2c@3000 {
14247 #address-cells = <1>;
14248 #size-cells = <0>;
14249 - device_type = "i2c";
14250 + cell-index = <0>;
14251 compatible = "fsl-i2c";
14252 reg = <3000 100>;
14253 interrupts = <e 8>;
14254 @@ -75,7 +84,7 @@
14255 i2c@3100 {
14256 #address-cells = <1>;
14257 #size-cells = <0>;
14258 - device_type = "i2c";
14259 + cell-index = <1>;
14260 compatible = "fsl-i2c";
14261 reg = <3100 100>;
14262 interrupts = <f 8>;
14263 @@ -95,7 +104,6 @@
14264 /* phy type (ULPI or SERIAL) are only types supportted for MPH */
14265 /* port = 0 or 1 */
14266 usb@22000 {
14267 - device_type = "usb";
14268 compatible = "fsl-usb2-mph";
14269 reg = <22000 1000>;
14270 #address-cells = <1>;
14271 @@ -107,7 +115,6 @@
14272 };
14273 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
14274 usb@23000 {
14275 - device_type = "usb";
14276 compatible = "fsl-usb2-dr";
14277 reg = <23000 1000>;
14278 #address-cells = <1>;
14279 @@ -119,11 +126,11 @@
14280 };
14281
14282 mdio@24520 {
14283 - device_type = "mdio";
14284 - compatible = "gianfar";
14285 - reg = <24520 20>;
14286 #address-cells = <1>;
14287 #size-cells = <0>;
14288 + compatible = "fsl,gianfar-mdio";
14289 + reg = <24520 20>;
14290 +
14291 phy0: ethernet-phy@0 {
14292 interrupt-parent = < &ipic >;
14293 interrupts = <11 8>;
14294 @@ -138,17 +145,12 @@
14295 };
14296 };
14297
14298 - ethernet@24000 {
14299 + enet0: ethernet@24000 {
14300 + cell-index = <0>;
14301 device_type = "network";
14302 model = "TSEC";
14303 compatible = "gianfar";
14304 reg = <24000 1000>;
14305 - /*
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.
14309 - */
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>;
14316 };
14317
14318 - ethernet@25000 {
14319 - #address-cells = <1>;
14320 - #size-cells = <0>;
14321 + enet1: ethernet@25000 {
14322 + cell-index = <1>;
14323 device_type = "network";
14324 model = "TSEC";
14325 compatible = "gianfar";
14326 reg = <25000 1000>;
14327 - /*
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.
14331 - */
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>;
14338 };
14339
14340 - serial@4500 {
14341 + serial0: serial@4500 {
14342 + cell-index = <0>;
14343 device_type = "serial";
14344 compatible = "ns16550";
14345 reg = <4500 100>;
14346 @@ -185,7 +181,8 @@
14347 interrupt-parent = < &ipic >;
14348 };
14349
14350 - serial@4600 {
14351 + serial1: serial@4600 {
14352 + cell-index = <1>;
14353 device_type = "serial";
14354 compatible = "ns16550";
14355 reg = <4600 100>;
14356 @@ -225,7 +222,8 @@
14357 };
14358 };
14359
14360 - pci@e0008500 {
14361 + pci0: pci@e0008500 {
14362 + cell-index = <1>;
14363 interrupt-map-mask = <f800 0 0 7>;
14364 interrupt-map = <
14365
14366 @@ -285,7 +283,8 @@
14367 device_type = "pci";
14368 };
14369
14370 - pci@e0008600 {
14371 + pci1: pci@e0008600 {
14372 + cell-index = <2>;
14373 interrupt-map-mask = <f800 0 0 7>;
14374 interrupt-map = <
14375
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
14379 @@ -20,6 +20,14 @@
14380 #address-cells = <1>;
14381 #size-cells = <1>;
14382
14383 + aliases {
14384 + ethernet0 = &enet0;
14385 + ethernet1 = &enet1;
14386 + serial0 = &serial0;
14387 + serial1 = &serial1;
14388 + pci0 = &pci0;
14389 + };
14390 +
14391 cpus {
14392 #address-cells = <1>;
14393 #size-cells = <0>;
14394 @@ -64,7 +72,7 @@
14395 i2c@3000 {
14396 #address-cells = <1>;
14397 #size-cells = <0>;
14398 - device_type = "i2c";
14399 + cell-index = <0>;
14400 compatible = "fsl-i2c";
14401 reg = <3000 100>;
14402 interrupts = <e 8>;
14403 @@ -80,7 +88,7 @@
14404 i2c@3100 {
14405 #address-cells = <1>;
14406 #size-cells = <0>;
14407 - device_type = "i2c";
14408 + cell-index = <1>;
14409 compatible = "fsl-i2c";
14410 reg = <3100 100>;
14411 interrupts = <f 8>;
14412 @@ -88,7 +96,8 @@
14413 dfsrr;
14414 };
14415
14416 - serial@4500 {
14417 + serial0: serial@4500 {
14418 + cell-index = <0>;
14419 device_type = "serial";
14420 compatible = "ns16550";
14421 reg = <4500 100>;
14422 @@ -97,7 +106,8 @@
14423 interrupt-parent = < &ipic >;
14424 };
14425
14426 - serial@4600 {
14427 + serial1: serial@4600 {
14428 + cell-index = <1>;
14429 device_type = "serial";
14430 compatible = "ns16550";
14431 reg = <4600 100>;
14432 @@ -231,7 +241,6 @@
14433 };
14434
14435 usb@6c0 {
14436 - device_type = "usb";
14437 compatible = "qe_udc";
14438 reg = <6c0 40 8B00 100>;
14439 interrupts = <b>;
14440 @@ -239,45 +248,35 @@
14441 mode = "slave";
14442 };
14443
14444 - ucc@2000 {
14445 + enet0: ucc@2000 {
14446 device_type = "network";
14447 compatible = "ucc_geth";
14448 model = "UCC";
14449 + cell-index = <1>;
14450 device-id = <1>;
14451 reg = <2000 200>;
14452 interrupts = <20>;
14453 interrupt-parent = < &qeic >;
14454 - /*
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.
14458 - */
14459 - mac-address = [ 00 00 00 00 00 00 ];
14460 local-mac-address = [ 00 00 00 00 00 00 ];
14461 - rx-clock = <0>;
14462 - tx-clock = <19>;
14463 + rx-clock-name = "none";
14464 + tx-clock-name = "clk9";
14465 phy-handle = < &phy0 >;
14466 phy-connection-type = "rgmii-id";
14467 pio-handle = < &pio1 >;
14468 };
14469
14470 - ucc@3000 {
14471 + enet1: ucc@3000 {
14472 device_type = "network";
14473 compatible = "ucc_geth";
14474 model = "UCC";
14475 + cell-index = <2>;
14476 device-id = <2>;
14477 reg = <3000 200>;
14478 interrupts = <21>;
14479 interrupt-parent = < &qeic >;
14480 - /*
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.
14484 - */
14485 - mac-address = [ 00 00 00 00 00 00 ];
14486 local-mac-address = [ 00 00 00 00 00 00 ];
14487 - rx-clock = <0>;
14488 - tx-clock = <14>;
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 @@
14495 };
14496 };
14497
14498 - pci@e0008500 {
14499 + pci0: pci@e0008500 {
14500 + cell-index = <1>;
14501 interrupt-map-mask = <f800 0 0 7>;
14502 interrupt-map = <
14503
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
14507 @@ -0,0 +1,279 @@
14508 +/*
14509 + * MPC8377E MDS Device Tree Source
14510 + *
14511 + * Copyright 2007 Freescale Semiconductor Inc.
14512 + *
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.
14517 + */
14518 +
14519 +/dts-v1/;
14520 +
14521 +/ {
14522 + model = "fsl,mpc8377emds";
14523 + compatible = "fsl,mpc8377emds","fsl,mpc837xmds";
14524 + #address-cells = <1>;
14525 + #size-cells = <1>;
14526 +
14527 + aliases {
14528 + ethernet0 = &enet0;
14529 + ethernet1 = &enet1;
14530 + serial0 = &serial0;
14531 + serial1 = &serial1;
14532 + pci0 = &pci0;
14533 + };
14534 +
14535 + cpus {
14536 + #address-cells = <1>;
14537 + #size-cells = <0>;
14538 +
14539 + PowerPC,8377@0 {
14540 + device_type = "cpu";
14541 + reg = <0>;
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>;
14549 + };
14550 + };
14551 +
14552 + memory {
14553 + device_type = "memory";
14554 + reg = <0x00000000 0x20000000>; // 512MB at 0
14555 + };
14556 +
14557 + soc@e0000000 {
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>;
14564 +
14565 + wdt@200 {
14566 + compatible = "mpc83xx_wdt";
14567 + reg = <0x200 0x100>;
14568 + };
14569 +
14570 + i2c@3000 {
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 >;
14578 + dfsrr;
14579 + };
14580 +
14581 + i2c@3100 {
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 >;
14589 + dfsrr;
14590 + };
14591 +
14592 + spi@7000 {
14593 + compatible = "fsl_spi";
14594 + reg = <0x7000 0x1000>;
14595 + interrupts = <0x10 0x8>;
14596 + interrupt-parent = < &ipic >;
14597 + mode = "cpu";
14598 + };
14599 +
14600 + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
14601 + usb@23000 {
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";
14609 + };
14610 +
14611 + mdio@24520 {
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>;
14619 + reg = <2>;
14620 + device_type = "ethernet-phy";
14621 + };
14622 + phy3: ethernet-phy@3 {
14623 + interrupt-parent = < &ipic >;
14624 + interrupts = <0x12 0x8>;
14625 + reg = <3>;
14626 + device_type = "ethernet-phy";
14627 + };
14628 + };
14629 +
14630 + enet0: ethernet@24000 {
14631 + cell-index = <0>;
14632 + device_type = "network";
14633 + model = "eTSEC";
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 >;
14641 + };
14642 +
14643 + enet1: ethernet@25000 {
14644 + cell-index = <1>;
14645 + device_type = "network";
14646 + model = "eTSEC";
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 >;
14654 + };
14655 +
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 >;
14664 + };
14665 +
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 >;
14674 + };
14675 +
14676 + crypto@30000 {
14677 + model = "SEC3";
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>;
14687 + };
14688 +
14689 + sdhc@2e000 {
14690 + model = "eSDHC";
14691 + compatible = "fsl,esdhc";
14692 + reg = <0x2e000 0x1000>;
14693 + interrupts = <0x2a 0x8>;
14694 + interrupt-parent = < &ipic >;
14695 + };
14696 +
14697 + sata@18000 {
14698 + compatible = "fsl,mpc8379-sata";
14699 + reg = <0x18000 0x1000>;
14700 + interrupts = <0x2c 0x8>;
14701 + interrupt-parent = < &ipic >;
14702 + };
14703 +
14704 + sata@19000 {
14705 + compatible = "fsl,mpc8379-sata";
14706 + reg = <0x19000 0x1000>;
14707 + interrupts = <0x2d 0x8>;
14708 + interrupt-parent = < &ipic >;
14709 + };
14710 +
14711 + /* 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
14716 + */
14717 + ipic: pic@700 {
14718 + compatible = "fsl,ipic";
14719 + interrupt-controller;
14720 + #address-cells = <0>;
14721 + #interrupt-cells = <2>;
14722 + reg = <0x700 0x100>;
14723 + };
14724 + };
14725 +
14726 + pci0: pci@e0008500 {
14727 + cell-index = <0>;
14728 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
14729 + interrupt-map = <
14730 +
14731 + /* IDSEL 0x11 */
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
14736 +
14737 + /* IDSEL 0x12 */
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
14742 +
14743 + /* IDSEL 0x13 */
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
14748 +
14749 + /* IDSEL 0x15 */
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
14754 +
14755 + /* IDSEL 0x16 */
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
14760 +
14761 + /* IDSEL 0x17 */
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
14766 +
14767 + /* IDSEL 0x18 */
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";
14785 + };
14786 +};
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
14790 @@ -0,0 +1,265 @@
14791 +/*
14792 + * MPC8378E MDS Device Tree Source
14793 + *
14794 + * Copyright 2007 Freescale Semiconductor Inc.
14795 + *
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.
14800 + */
14801 +
14802 +/dts-v1/;
14803 +
14804 +/ {
14805 + model = "fsl,mpc8378emds";
14806 + compatible = "fsl,mpc8378emds","fsl,mpc837xmds";
14807 + #address-cells = <1>;
14808 + #size-cells = <1>;
14809 +
14810 + aliases {
14811 + ethernet0 = &enet0;
14812 + ethernet1 = &enet1;
14813 + serial0 = &serial0;
14814 + serial1 = &serial1;
14815 + pci0 = &pci0;
14816 + };
14817 +
14818 + cpus {
14819 + #address-cells = <1>;
14820 + #size-cells = <0>;
14821 +
14822 + PowerPC,8378@0 {
14823 + device_type = "cpu";
14824 + reg = <0>;
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>;
14832 + };
14833 + };
14834 +
14835 + memory {
14836 + device_type = "memory";
14837 + reg = <0x00000000 0x20000000>; // 512MB at 0
14838 + };
14839 +
14840 + soc@e0000000 {
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>;
14847 +
14848 + wdt@200 {
14849 + compatible = "mpc83xx_wdt";
14850 + reg = <0x200 0x100>;
14851 + };
14852 +
14853 + i2c@3000 {
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 >;
14861 + dfsrr;
14862 + };
14863 +
14864 + i2c@3100 {
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 >;
14872 + dfsrr;
14873 + };
14874 +
14875 + spi@7000 {
14876 + compatible = "fsl_spi";
14877 + reg = <0x7000 0x1000>;
14878 + interrupts = <0x10 0x8>;
14879 + interrupt-parent = < &ipic >;
14880 + mode = "cpu";
14881 + };
14882 +
14883 + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
14884 + usb@23000 {
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";
14892 + };
14893 +
14894 + mdio@24520 {
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>;
14902 + reg = <2>;
14903 + device_type = "ethernet-phy";
14904 + };
14905 + phy3: ethernet-phy@3 {
14906 + interrupt-parent = < &ipic >;
14907 + interrupts = <0x12 0x8>;
14908 + reg = <3>;
14909 + device_type = "ethernet-phy";
14910 + };
14911 + };
14912 +
14913 + enet0: ethernet@24000 {
14914 + cell-index = <0>;
14915 + device_type = "network";
14916 + model = "eTSEC";
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 >;
14924 + };
14925 +
14926 + enet1: ethernet@25000 {
14927 + cell-index = <1>;
14928 + device_type = "network";
14929 + model = "eTSEC";
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 >;
14937 + };
14938 +
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 >;
14947 + };
14948 +
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 >;
14957 + };
14958 +
14959 + crypto@30000 {
14960 + model = "SEC3";
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>;
14970 + };
14971 +
14972 + sdhc@2e000 {
14973 + model = "eSDHC";
14974 + compatible = "fsl,esdhc";
14975 + reg = <0x2e000 0x1000>;
14976 + interrupts = <0x2a 0x8>;
14977 + interrupt-parent = < &ipic >;
14978 + };
14979 +
14980 + /* 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
14985 + */
14986 + ipic: pic@700 {
14987 + compatible = "fsl,ipic";
14988 + interrupt-controller;
14989 + #address-cells = <0>;
14990 + #interrupt-cells = <2>;
14991 + reg = <0x700 0x100>;
14992 + };
14993 + };
14994 +
14995 + pci0: pci@e0008500 {
14996 + cell-index = <0>;
14997 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
14998 + interrupt-map = <
14999 +
15000 + /* IDSEL 0x11 */
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
15005 +
15006 + /* IDSEL 0x12 */
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
15011 +
15012 + /* IDSEL 0x13 */
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
15017 +
15018 + /* IDSEL 0x15 */
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
15023 +
15024 + /* IDSEL 0x16 */
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
15029 +
15030 + /* IDSEL 0x17 */
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
15035 +
15036 + /* IDSEL 0x18 */
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";
15054 + };
15055 +};
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
15059 @@ -0,0 +1,293 @@
15060 +/*
15061 + * MPC8379E MDS Device Tree Source
15062 + *
15063 + * Copyright 2007 Freescale Semiconductor Inc.
15064 + *
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.
15069 + */
15070 +
15071 +/dts-v1/;
15072 +
15073 +/ {
15074 + model = "fsl,mpc8379emds";
15075 + compatible = "fsl,mpc8379emds","fsl,mpc837xmds";
15076 + #address-cells = <1>;
15077 + #size-cells = <1>;
15078 +
15079 + aliases {
15080 + ethernet0 = &enet0;
15081 + ethernet1 = &enet1;
15082 + serial0 = &serial0;
15083 + serial1 = &serial1;
15084 + pci0 = &pci0;
15085 + };
15086 +
15087 + cpus {
15088 + #address-cells = <1>;
15089 + #size-cells = <0>;
15090 +
15091 + PowerPC,8379@0 {
15092 + device_type = "cpu";
15093 + reg = <0>;
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>;
15101 + };
15102 + };
15103 +
15104 + memory {
15105 + device_type = "memory";
15106 + reg = <0x00000000 0x20000000>; // 512MB at 0
15107 + };
15108 +
15109 + soc@e0000000 {
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>;
15116 +
15117 + wdt@200 {
15118 + compatible = "mpc83xx_wdt";
15119 + reg = <0x200 0x100>;
15120 + };
15121 +
15122 + i2c@3000 {
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 >;
15130 + dfsrr;
15131 + };
15132 +
15133 + i2c@3100 {
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 >;
15141 + dfsrr;
15142 + };
15143 +
15144 + spi@7000 {
15145 + compatible = "fsl_spi";
15146 + reg = <0x7000 0x1000>;
15147 + interrupts = <0x10 0x8>;
15148 + interrupt-parent = < &ipic >;
15149 + mode = "cpu";
15150 + };
15151 +
15152 + /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
15153 + usb@23000 {
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";
15161 + };
15162 +
15163 + mdio@24520 {
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>;
15171 + reg = <2>;
15172 + device_type = "ethernet-phy";
15173 + };
15174 + phy3: ethernet-phy@3 {
15175 + interrupt-parent = < &ipic >;
15176 + interrupts = <0x12 0x8>;
15177 + reg = <3>;
15178 + device_type = "ethernet-phy";
15179 + };
15180 + };
15181 +
15182 + enet0: ethernet@24000 {
15183 + cell-index = <0>;
15184 + device_type = "network";
15185 + model = "eTSEC";
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 >;
15193 + };
15194 +
15195 + enet1: ethernet@25000 {
15196 + cell-index = <1>;
15197 + device_type = "network";
15198 + model = "eTSEC";
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 >;
15206 + };
15207 +
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 >;
15216 + };
15217 +
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 >;
15226 + };
15227 +
15228 + crypto@30000 {
15229 + model = "SEC3";
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>;
15239 + };
15240 +
15241 + sdhc@2e000 {
15242 + model = "eSDHC";
15243 + compatible = "fsl,esdhc";
15244 + reg = <0x2e000 0x1000>;
15245 + interrupts = <0x2a 0x8>;
15246 + interrupt-parent = < &ipic >;
15247 + };
15248 +
15249 + sata@18000 {
15250 + compatible = "fsl,mpc8379-sata";
15251 + reg = <0x18000 0x1000>;
15252 + interrupts = <0x2c 0x8>;
15253 + interrupt-parent = < &ipic >;
15254 + };
15255 +
15256 + sata@19000 {
15257 + compatible = "fsl,mpc8379-sata";
15258 + reg = <0x19000 0x1000>;
15259 + interrupts = <0x2d 0x8>;
15260 + interrupt-parent = < &ipic >;
15261 + };
15262 +
15263 + sata@1a000 {
15264 + compatible = "fsl,mpc8379-sata";
15265 + reg = <0x1a000 0x1000>;
15266 + interrupts = <0x2e 0x8>;
15267 + interrupt-parent = < &ipic >;
15268 + };
15269 +
15270 + sata@1b000 {
15271 + compatible = "fsl,mpc8379-sata";
15272 + reg = <0x1b000 0x1000>;
15273 + interrupts = <0x2f 0x8>;
15274 + interrupt-parent = < &ipic >;
15275 + };
15276 +
15277 + /* 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
15282 + */
15283 + ipic: pic@700 {
15284 + compatible = "fsl,ipic";
15285 + interrupt-controller;
15286 + #address-cells = <0>;
15287 + #interrupt-cells = <2>;
15288 + reg = <0x700 0x100>;
15289 + };
15290 + };
15291 +
15292 + pci0: pci@e0008500 {
15293 + cell-index = <0>;
15294 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
15295 + interrupt-map = <
15296 +
15297 + /* IDSEL 0x11 */
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
15302 +
15303 + /* IDSEL 0x12 */
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
15308 +
15309 + /* IDSEL 0x13 */
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
15314 +
15315 + /* IDSEL 0x15 */
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
15320 +
15321 + /* IDSEL 0x16 */
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
15326 +
15327 + /* IDSEL 0x17 */
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
15332 +
15333 + /* IDSEL 0x18 */
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";
15351 + };
15352 +};
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
15356 @@ -16,6 +16,15 @@
15357 #address-cells = <1>;
15358 #size-cells = <1>;
15359
15360 + aliases {
15361 + ethernet0 = &enet0;
15362 + ethernet1 = &enet1;
15363 + ethernet2 = &enet2;
15364 + serial0 = &serial0;
15365 + serial1 = &serial1;
15366 + pci0 = &pci0;
15367 + };
15368 +
15369 cpus {
15370 #address-cells = <1>;
15371 #size-cells = <0>;
15372 @@ -63,7 +72,9 @@
15373 };
15374
15375 i2c@3000 {
15376 - device_type = "i2c";
15377 + #address-cells = <1>;
15378 + #size-cells = <0>;
15379 + cell-index = <0>;
15380 compatible = "fsl-i2c";
15381 reg = <3000 100>;
15382 interrupts = <2b 2>;
15383 @@ -74,9 +85,9 @@
15384 mdio@24520 {
15385 #address-cells = <1>;
15386 #size-cells = <0>;
15387 - device_type = "mdio";
15388 - compatible = "gianfar";
15389 + compatible = "fsl,gianfar-mdio";
15390 reg = <24520 20>;
15391 +
15392 phy0: ethernet-phy@0 {
15393 interrupt-parent = <&mpic>;
15394 interrupts = <5 1>;
15395 @@ -97,64 +108,44 @@
15396 };
15397 };
15398
15399 - ethernet@24000 {
15400 - #address-cells = <1>;
15401 - #size-cells = <0>;
15402 + enet0: ethernet@24000 {
15403 + cell-index = <0>;
15404 device_type = "network";
15405 model = "TSEC";
15406 compatible = "gianfar";
15407 reg = <24000 1000>;
15408 - /*
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.
15412 - */
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>;
15418 };
15419
15420 - ethernet@25000 {
15421 - #address-cells = <1>;
15422 - #size-cells = <0>;
15423 + enet1: ethernet@25000 {
15424 + cell-index = <1>;
15425 device_type = "network";
15426 model = "TSEC";
15427 compatible = "gianfar";
15428 reg = <25000 1000>;
15429 - /*
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.
15433 - */
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>;
15439 };
15440
15441 - ethernet@26000 {
15442 - #address-cells = <1>;
15443 - #size-cells = <0>;
15444 + enet2: ethernet@26000 {
15445 + cell-index = <2>;
15446 device_type = "network";
15447 model = "FEC";
15448 compatible = "gianfar";
15449 reg = <26000 1000>;
15450 - /*
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.
15454 - */
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>;
15460 };
15461
15462 - serial@4500 {
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>;
15470 };
15471
15472 - serial@4600 {
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 @@
15479 };
15480 };
15481
15482 - pci@e0008000 {
15483 + pci0: pci@e0008000 {
15484 + cell-index = <0>;
15485 interrupt-map-mask = <f800 0 0 7>;
15486 interrupt-map = <
15487
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
15491 @@ -16,6 +16,15 @@
15492 #address-cells = <1>;
15493 #size-cells = <1>;
15494
15495 + aliases {
15496 + ethernet0 = &enet0;
15497 + ethernet1 = &enet1;
15498 + serial0 = &serial0;
15499 + serial1 = &serial1;
15500 + pci0 = &pci0;
15501 + pci1 = &pci1;
15502 + };
15503 +
15504 cpus {
15505 #address-cells = <1>;
15506 #size-cells = <0>;
15507 @@ -63,7 +72,9 @@
15508 };
15509
15510 i2c@3000 {
15511 - device_type = "i2c";
15512 + #address-cells = <1>;
15513 + #size-cells = <0>;
15514 + cell-index = <0>;
15515 compatible = "fsl-i2c";
15516 reg = <3000 100>;
15517 interrupts = <2b 2>;
15518 @@ -74,9 +85,9 @@
15519 mdio@24520 {
15520 #address-cells = <1>;
15521 #size-cells = <0>;
15522 - device_type = "mdio";
15523 - compatible = "gianfar";
15524 + compatible = "fsl,gianfar-mdio";
15525 reg = <24520 20>;
15526 +
15527 phy0: ethernet-phy@0 {
15528 interrupt-parent = <&mpic>;
15529 interrupts = <5 1>;
15530 @@ -91,9 +102,8 @@
15531 };
15532 };
15533
15534 - ethernet@24000 {
15535 - #address-cells = <1>;
15536 - #size-cells = <0>;
15537 + enet0: ethernet@24000 {
15538 + cell-index = <0>;
15539 device_type = "network";
15540 model = "TSEC";
15541 compatible = "gianfar";
15542 @@ -104,9 +114,8 @@
15543 phy-handle = <&phy0>;
15544 };
15545
15546 - ethernet@25000 {
15547 - #address-cells = <1>;
15548 - #size-cells = <0>;
15549 + enet1: ethernet@25000 {
15550 + cell-index = <1>;
15551 device_type = "network";
15552 model = "TSEC";
15553 compatible = "gianfar";
15554 @@ -117,7 +126,8 @@
15555 phy-handle = <&phy1>;
15556 };
15557
15558 - serial@4500 {
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>;
15566 };
15567
15568 - serial@4600 {
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 @@
15575 };
15576 };
15577
15578 - pci1: pci@e0008000 {
15579 + pci0: pci@e0008000 {
15580 + cell-index = <0>;
15581 interrupt-map-mask = <1f800 0 0 7>;
15582 interrupt-map = <
15583
15584 @@ -250,11 +262,12 @@
15585 #interrupt-cells = <2>;
15586 compatible = "chrp,iic";
15587 interrupts = <1>;
15588 - interrupt-parent = <&pci1>;
15589 + interrupt-parent = <&pci0>;
15590 };
15591 };
15592
15593 - pci@e0009000 {
15594 + pci1: pci@e0009000 {
15595 + cell-index = <1>;
15596 interrupt-map-mask = <f800 0 0 7>;
15597 interrupt-map = <
15598
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
15602 @@ -15,6 +15,17 @@
15603 #address-cells = <1>;
15604 #size-cells = <1>;
15605
15606 + aliases {
15607 + ethernet0 = &enet0;
15608 + ethernet1 = &enet1;
15609 + serial0 = &serial0;
15610 + serial1 = &serial1;
15611 + pci0 = &pci0;
15612 + pci1 = &pci1;
15613 + pci2 = &pci2;
15614 + pci3 = &pci3;
15615 + };
15616 +
15617 cpus {
15618 #cpus = <1>;
15619 #address-cells = <1>;
15620 @@ -64,7 +75,9 @@
15621 };
15622
15623 i2c@3000 {
15624 - device_type = "i2c";
15625 + #address-cells = <1>;
15626 + #size-cells = <0>;
15627 + cell-index = <0>;
15628 compatible = "fsl-i2c";
15629 reg = <3000 100>;
15630 interrupts = <2b 2>;
15631 @@ -72,12 +85,23 @@
15632 dfsrr;
15633 };
15634
15635 + i2c@3100 {
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>;
15643 + dfsrr;
15644 + };
15645 +
15646 mdio@24520 {
15647 #address-cells = <1>;
15648 #size-cells = <0>;
15649 - device_type = "mdio";
15650 - compatible = "gianfar";
15651 + compatible = "fsl,gianfar-mdio";
15652 reg = <24520 20>;
15653 +
15654 phy0: ethernet-phy@0 {
15655 interrupt-parent = <&mpic>;
15656 interrupts = <a 1>;
15657 @@ -92,9 +116,8 @@
15658 };
15659 };
15660
15661 - ethernet@24000 {
15662 - #address-cells = <1>;
15663 - #size-cells = <0>;
15664 + enet0: ethernet@24000 {
15665 + cell-index = <0>;
15666 device_type = "network";
15667 model = "TSEC";
15668 compatible = "gianfar";
15669 @@ -106,9 +129,8 @@
15670 phy-connection-type = "rgmii-id";
15671 };
15672
15673 - ethernet@26000 {
15674 - #address-cells = <1>;
15675 - #size-cells = <0>;
15676 + enet1: ethernet@26000 {
15677 + cell-index = <1>;
15678 device_type = "network";
15679 model = "TSEC";
15680 compatible = "gianfar";
15681 @@ -120,7 +142,8 @@
15682 phy-connection-type = "rgmii-id";
15683 };
15684
15685 - serial@4500 {
15686 + serial0: serial@4500 {
15687 + cell-index = <0>;
15688 device_type = "serial";
15689 compatible = "ns16550";
15690 reg = <4500 100>;
15691 @@ -129,7 +152,8 @@
15692 interrupt-parent = <&mpic>;
15693 };
15694
15695 - serial@4600 {
15696 + serial1: serial@4600 {
15697 + cell-index = <1>;
15698 device_type = "serial";
15699 compatible = "ns16550";
15700 reg = <4600 100>;
15701 @@ -156,7 +180,8 @@
15702 };
15703 };
15704
15705 - pci@e0008000 {
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>;
15713 };
15714
15715 - pcie@e0009000 {
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 @@
15722 };
15723 };
15724
15725 - pcie@e000a000 {
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 @@
15732 };
15733 };
15734
15735 - pcie@e000b000 {
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 @@
15742 interrupt-map = <
15743 // IDSEL 0x1c USB
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
15751
15752 // IDSEL 0x1d Audio
15753 e800 0 0 1 &i8259 6 2
15754 @@ -369,6 +397,5 @@
15755 };
15756 };
15757 };
15758 -
15759 };
15760 };
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
15764 @@ -16,6 +16,20 @@
15765 #address-cells = <1>;
15766 #size-cells = <1>;
15767
15768 + aliases {
15769 + ethernet0 = &enet0;
15770 + ethernet1 = &enet1;
15771 +/*
15772 + ethernet2 = &enet2;
15773 + ethernet3 = &enet3;
15774 +*/
15775 + serial0 = &serial0;
15776 + serial1 = &serial1;
15777 + pci0 = &pci0;
15778 + pci1 = &pci1;
15779 + pci2 = &pci2;
15780 + };
15781 +
15782 cpus {
15783 #address-cells = <1>;
15784 #size-cells = <0>;
15785 @@ -63,7 +77,9 @@
15786 };
15787
15788 i2c@3000 {
15789 - device_type = "i2c";
15790 + #address-cells = <1>;
15791 + #size-cells = <0>;
15792 + cell-index = <0>;
15793 compatible = "fsl-i2c";
15794 reg = <3000 100>;
15795 interrupts = <2b 2>;
15796 @@ -71,12 +87,23 @@
15797 dfsrr;
15798 };
15799
15800 + i2c@3100 {
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>;
15808 + dfsrr;
15809 + };
15810 +
15811 mdio@24520 {
15812 #address-cells = <1>;
15813 #size-cells = <0>;
15814 - device_type = "mdio";
15815 - compatible = "gianfar";
15816 + compatible = "fsl,gianfar-mdio";
15817 reg = <24520 20>;
15818 +
15819 phy0: ethernet-phy@0 {
15820 interrupt-parent = <&mpic>;
15821 interrupts = <5 1>;
15822 @@ -103,9 +130,8 @@
15823 };
15824 };
15825
15826 - ethernet@24000 {
15827 - #address-cells = <1>;
15828 - #size-cells = <0>;
15829 + enet0: ethernet@24000 {
15830 + cell-index = <0>;
15831 device_type = "network";
15832 model = "eTSEC";
15833 compatible = "gianfar";
15834 @@ -116,9 +142,8 @@
15835 phy-handle = <&phy0>;
15836 };
15837
15838 - ethernet@25000 {
15839 - #address-cells = <1>;
15840 - #size-cells = <0>;
15841 + enet1: ethernet@25000 {
15842 + cell-index = <1>;
15843 device_type = "network";
15844 model = "eTSEC";
15845 compatible = "gianfar";
15846 @@ -130,9 +155,8 @@
15847 };
15848
15849 /* eTSEC 3/4 are currently broken
15850 - ethernet@26000 {
15851 - #address-cells = <1>;
15852 - #size-cells = <0>;
15853 + enet2: ethernet@26000 {
15854 + cell-index = <2>;
15855 device_type = "network";
15856 model = "eTSEC";
15857 compatible = "gianfar";
15858 @@ -143,9 +167,8 @@
15859 phy-handle = <&phy2>;
15860 };
15861
15862 - ethernet@27000 {
15863 - #address-cells = <1>;
15864 - #size-cells = <0>;
15865 + enet3: ethernet@27000 {
15866 + cell-index = <3>;
15867 device_type = "network";
15868 model = "eTSEC";
15869 compatible = "gianfar";
15870 @@ -157,7 +180,8 @@
15871 };
15872 */
15873
15874 - serial@4500 {
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>;
15882 };
15883
15884 - serial@4600 {
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 @@
15891 };
15892 };
15893
15894 - pci@e0008000 {
15895 + pci0: pci@e0008000 {
15896 + cell-index = <0>;
15897 interrupt-map-mask = <f800 0 0 7>;
15898 interrupt-map = <
15899 /* IDSEL 0x4 (PCIX Slot 2) */
15900 @@ -342,7 +368,8 @@
15901 };
15902 };
15903
15904 - pci@e0009000 {
15905 + pci1: pci@e0009000 {
15906 + cell-index = <1>;
15907 interrupt-map-mask = <f800 0 0 7>;
15908 interrupt-map = <
15909
15910 @@ -366,7 +393,8 @@
15911 device_type = "pci";
15912 };
15913
15914 - pcie@e000a000 {
15915 + pci2: pcie@e000a000 {
15916 + cell-index = <2>;
15917 interrupt-map-mask = <f800 0 0 7>;
15918 interrupt-map = <
15919
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
15923 @@ -16,6 +16,15 @@
15924 #address-cells = <1>;
15925 #size-cells = <1>;
15926
15927 + aliases {
15928 + ethernet0 = &enet0;
15929 + ethernet1 = &enet1;
15930 + serial0 = &serial0;
15931 + serial1 = &serial1;
15932 + pci0 = &pci0;
15933 + pci1 = &pci1;
15934 + };
15935 +
15936 cpus {
15937 #address-cells = <1>;
15938 #size-cells = <0>;
15939 @@ -63,7 +72,9 @@
15940 };
15941
15942 i2c@3000 {
15943 - device_type = "i2c";
15944 + #address-cells = <1>;
15945 + #size-cells = <0>;
15946 + cell-index = <0>;
15947 compatible = "fsl-i2c";
15948 reg = <3000 100>;
15949 interrupts = <2b 2>;
15950 @@ -74,9 +85,9 @@
15951 mdio@24520 {
15952 #address-cells = <1>;
15953 #size-cells = <0>;
15954 - device_type = "mdio";
15955 - compatible = "gianfar";
15956 + compatible = "fsl,gianfar-mdio";
15957 reg = <24520 20>;
15958 +
15959 phy0: ethernet-phy@0 {
15960 interrupt-parent = <&mpic>;
15961 interrupts = <5 1>;
15962 @@ -91,9 +102,8 @@
15963 };
15964 };
15965
15966 - ethernet@24000 {
15967 - #address-cells = <1>;
15968 - #size-cells = <0>;
15969 + enet0: ethernet@24000 {
15970 + cell-index = <0>;
15971 device_type = "network";
15972 model = "TSEC";
15973 compatible = "gianfar";
15974 @@ -104,9 +114,8 @@
15975 phy-handle = <&phy0>;
15976 };
15977
15978 - ethernet@25000 {
15979 - #address-cells = <1>;
15980 - #size-cells = <0>;
15981 + enet1: ethernet@25000 {
15982 + cell-index = <1>;
15983 device_type = "network";
15984 model = "TSEC";
15985 compatible = "gianfar";
15986 @@ -117,7 +126,8 @@
15987 phy-handle = <&phy1>;
15988 };
15989
15990 - serial@4500 {
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>;
15998 };
15999
16000 - serial@4600 {
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 @@
16007 };
16008 };
16009
16010 - pci1: pci@e0008000 {
16011 + pci0: pci@e0008000 {
16012 + cell-index = <0>;
16013 interrupt-map-mask = <1f800 0 0 7>;
16014 interrupt-map = <
16015
16016 @@ -250,11 +262,12 @@
16017 #interrupt-cells = <2>;
16018 compatible = "chrp,iic";
16019 interrupts = <1>;
16020 - interrupt-parent = <&pci1>;
16021 + interrupt-parent = <&pci0>;
16022 };
16023 };
16024
16025 - pci@e0009000 {
16026 + pci1: pci@e0009000 {
16027 + cell-index = <1>;
16028 interrupt-map-mask = <f800 0 0 7>;
16029 interrupt-map = <
16030
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
16034 @@ -16,6 +16,16 @@
16035 #address-cells = <1>;
16036 #size-cells = <1>;
16037
16038 + aliases {
16039 + ethernet0 = &enet0;
16040 + ethernet1 = &enet1;
16041 + ethernet2 = &enet2;
16042 + ethernet3 = &enet3;
16043 + serial0 = &serial0;
16044 + serial1 = &serial1;
16045 + pci0 = &pci0;
16046 + };
16047 +
16048 cpus {
16049 #address-cells = <1>;
16050 #size-cells = <0>;
16051 @@ -63,11 +73,11 @@
16052 };
16053
16054 mdio@24520 {
16055 - device_type = "mdio";
16056 - compatible = "gianfar";
16057 - reg = <24520 20>;
16058 #address-cells = <1>;
16059 #size-cells = <0>;
16060 + compatible = "fsl,gianfar-mdio";
16061 + reg = <24520 20>;
16062 +
16063 phy0: ethernet-phy@0 {
16064 interrupt-parent = <&mpic>;
16065 interrupts = <5 1>;
16066 @@ -94,36 +104,24 @@
16067 };
16068 };
16069
16070 - ethernet@24000 {
16071 + enet0: ethernet@24000 {
16072 + cell-index = <0>;
16073 device_type = "network";
16074 model = "TSEC";
16075 compatible = "gianfar";
16076 reg = <24000 1000>;
16077 - /*
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.
16081 - */
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>;
16087 };
16088
16089 - ethernet@25000 {
16090 - #address-cells = <1>;
16091 - #size-cells = <0>;
16092 + enet1: ethernet@25000 {
16093 + cell-index = <1>;
16094 device_type = "network";
16095 model = "TSEC";
16096 compatible = "gianfar";
16097 reg = <25000 1000>;
16098 - /*
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.
16102 - */
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";
16109 };
16110
16111 - serial@91a00 {
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>;
16118 };
16119
16120 - serial@91a20 {
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>;
16127 };
16128
16129 - ethernet@91320 {
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>;
16135 - /*
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.
16139 - */
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>;
16146 };
16147
16148 - ethernet@91340 {
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>;
16154 - /*
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.
16158 - */
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 @@
16164 };
16165 };
16166
16167 - pci@e0008000 {
16168 + pci0: pci@e0008000 {
16169 + cell-index = <0>;
16170 #interrupt-cells = <1>;
16171 #size-cells = <2>;
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
16176 @@ -20,6 +20,17 @@
16177 #address-cells = <1>;
16178 #size-cells = <1>;
16179
16180 + aliases {
16181 + ethernet0 = &enet0;
16182 + ethernet1 = &enet1;
16183 + ethernet2 = &enet2;
16184 + ethernet3 = &enet3;
16185 + serial0 = &serial0;
16186 + serial1 = &serial1;
16187 + pci0 = &pci0;
16188 + pci1 = &pci1;
16189 + };
16190 +
16191 cpus {
16192 #address-cells = <1>;
16193 #size-cells = <0>;
16194 @@ -74,7 +85,7 @@
16195 i2c@3000 {
16196 #address-cells = <1>;
16197 #size-cells = <0>;
16198 - device_type = "i2c";
16199 + cell-index = <0>;
16200 compatible = "fsl-i2c";
16201 reg = <3000 100>;
16202 interrupts = <2b 2>;
16203 @@ -90,7 +101,7 @@
16204 i2c@3100 {
16205 #address-cells = <1>;
16206 #size-cells = <0>;
16207 - device_type = "i2c";
16208 + cell-index = <1>;
16209 compatible = "fsl-i2c";
16210 reg = <3100 100>;
16211 interrupts = <2b 2>;
16212 @@ -101,9 +112,9 @@
16213 mdio@24520 {
16214 #address-cells = <1>;
16215 #size-cells = <0>;
16216 - device_type = "mdio";
16217 - compatible = "gianfar";
16218 + compatible = "fsl,gianfar-mdio";
16219 reg = <24520 20>;
16220 +
16221 phy0: ethernet-phy@7 {
16222 interrupt-parent = <&mpic>;
16223 interrupts = <1 1>;
16224 @@ -130,45 +141,32 @@
16225 };
16226 };
16227
16228 - ethernet@24000 {
16229 - #address-cells = <1>;
16230 - #size-cells = <0>;
16231 + enet0: ethernet@24000 {
16232 + cell-index = <0>;
16233 device_type = "network";
16234 model = "eTSEC";
16235 compatible = "gianfar";
16236 reg = <24000 1000>;
16237 - /*
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.
16241 - */
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>;
16247 };
16248
16249 - ethernet@25000 {
16250 - #address-cells = <1>;
16251 - #size-cells = <0>;
16252 + enet1: ethernet@25000 {
16253 + cell-index = <1>;
16254 device_type = "network";
16255 model = "eTSEC";
16256 compatible = "gianfar";
16257 reg = <25000 1000>;
16258 - /*
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.
16262 - */
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>;
16268 };
16269
16270 - serial@4500 {
16271 + serial0: serial@4500 {
16272 + cell-index = <0>;
16273 device_type = "serial";
16274 compatible = "ns16550";
16275 reg = <4500 100>;
16276 @@ -183,7 +181,8 @@
16277 fsl,has-rstcr;
16278 };
16279
16280 - serial@4600 {
16281 + serial1: serial@4600 {
16282 + cell-index = <1>;
16283 device_type = "serial";
16284 compatible = "ns16550";
16285 reg = <4600 100>;
16286 @@ -318,45 +317,35 @@
16287 mode = "cpu";
16288 };
16289
16290 - ucc@2000 {
16291 + enet2: ucc@2000 {
16292 device_type = "network";
16293 compatible = "ucc_geth";
16294 model = "UCC";
16295 + cell-index = <1>;
16296 device-id = <1>;
16297 reg = <2000 200>;
16298 interrupts = <20>;
16299 interrupt-parent = <&qeic>;
16300 - /*
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.
16304 - */
16305 - mac-address = [ 00 00 00 00 00 00 ];
16306 local-mac-address = [ 00 00 00 00 00 00 ];
16307 - rx-clock = <0>;
16308 - tx-clock = <20>;
16309 + rx-clock-name = "none";
16310 + tx-clock-name = "clk16";
16311 pio-handle = <&pio1>;
16312 phy-handle = <&phy0>;
16313 phy-connection-type = "rgmii-id";
16314 };
16315
16316 - ucc@3000 {
16317 + enet3: ucc@3000 {
16318 device_type = "network";
16319 compatible = "ucc_geth";
16320 model = "UCC";
16321 + cell-index = <2>;
16322 device-id = <2>;
16323 reg = <3000 200>;
16324 interrupts = <21>;
16325 interrupt-parent = <&qeic>;
16326 - /*
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.
16330 - */
16331 - mac-address = [ 00 00 00 00 00 00 ];
16332 local-mac-address = [ 00 00 00 00 00 00 ];
16333 - rx-clock = <0>;
16334 - tx-clock = <20>;
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>;
16342 #size-cells = <0>;
16343 reg = <2120 18>;
16344 - device_type = "mdio";
16345 compatible = "ucc_geth_phy";
16346
16347 /* These are the same PHYs as on
16348 @@ -410,7 +398,8 @@
16349
16350 };
16351
16352 - pci@e0008000 {
16353 + pci0: pci@e0008000 {
16354 + cell-index = <0>;
16355 interrupt-map-mask = <f800 0 0 7>;
16356 interrupt-map = <
16357 /* IDSEL 0x12 AD18 */
16358 @@ -440,7 +429,8 @@
16359 };
16360
16361 /* PCI Express */
16362 - pcie@e000a000 {
16363 + pci1: pcie@e000a000 {
16364 + cell-index = <2>;
16365 interrupt-map-mask = <f800 0 0 7>;
16366 interrupt-map = <
16367
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
16371 @@ -15,6 +15,18 @@
16372 #address-cells = <1>;
16373 #size-cells = <1>;
16374
16375 + aliases {
16376 + ethernet0 = &enet0;
16377 + ethernet1 = &enet1;
16378 + ethernet2 = &enet2;
16379 + ethernet3 = &enet3;
16380 + serial0 = &serial0;
16381 + serial1 = &serial1;
16382 + pci0 = &pci0;
16383 + pci1 = &pci1;
16384 + pci2 = &pci2;
16385 + };
16386 +
16387 cpus {
16388 #address-cells = <1>;
16389 #size-cells = <0>;
16390 @@ -69,7 +81,9 @@
16391 };
16392
16393 i2c@3000 {
16394 - device_type = "i2c";
16395 + #address-cells = <1>;
16396 + #size-cells = <0>;
16397 + cell-index = <0>;
16398 compatible = "fsl-i2c";
16399 reg = <3000 100>;
16400 interrupts = <2b 2>;
16401 @@ -78,7 +92,9 @@
16402 };
16403
16404 i2c@3100 {
16405 - device_type = "i2c";
16406 + #address-cells = <1>;
16407 + #size-cells = <0>;
16408 + cell-index = <1>;
16409 compatible = "fsl-i2c";
16410 reg = <3100 100>;
16411 interrupts = <2b 2>;
16412 @@ -89,9 +105,9 @@
16413 mdio@24520 {
16414 #address-cells = <1>;
16415 #size-cells = <0>;
16416 - device_type = "mdio";
16417 - compatible = "gianfar";
16418 + compatible = "fsl,gianfar-mdio";
16419 reg = <24520 20>;
16420 +
16421 phy0: ethernet-phy@0 {
16422 interrupt-parent = <&mpic>;
16423 interrupts = <a 1>;
16424 @@ -114,9 +130,8 @@
16425 };
16426 };
16427
16428 - ethernet@24000 {
16429 - #address-cells = <1>;
16430 - #size-cells = <0>;
16431 + enet0: ethernet@24000 {
16432 + cell-index = <0>;
16433 device_type = "network";
16434 model = "eTSEC";
16435 compatible = "gianfar";
16436 @@ -128,9 +143,8 @@
16437 phy-connection-type = "rgmii-id";
16438 };
16439
16440 - ethernet@25000 {
16441 - #address-cells = <1>;
16442 - #size-cells = <0>;
16443 + enet1: ethernet@25000 {
16444 + cell-index = <1>;
16445 device_type = "network";
16446 model = "eTSEC";
16447 compatible = "gianfar";
16448 @@ -142,9 +156,8 @@
16449 phy-connection-type = "rgmii-id";
16450 };
16451
16452 - ethernet@26000 {
16453 - #address-cells = <1>;
16454 - #size-cells = <0>;
16455 + enet2: ethernet@26000 {
16456 + cell-index = <2>;
16457 device_type = "network";
16458 model = "eTSEC";
16459 compatible = "gianfar";
16460 @@ -156,9 +169,8 @@
16461 phy-connection-type = "rgmii-id";
16462 };
16463
16464 - ethernet@27000 {
16465 - #address-cells = <1>;
16466 - #size-cells = <0>;
16467 + enet3: ethernet@27000 {
16468 + cell-index = <3>;
16469 device_type = "network";
16470 model = "eTSEC";
16471 compatible = "gianfar";
16472 @@ -170,7 +182,8 @@
16473 phy-connection-type = "rgmii-id";
16474 };
16475
16476 - serial@4500 {
16477 + serial0: serial@4500 {
16478 + cell-index = <0>;
16479 device_type = "serial";
16480 compatible = "ns16550";
16481 reg = <4500 100>;
16482 @@ -179,7 +192,8 @@
16483 interrupt-parent = <&mpic>;
16484 };
16485
16486 - serial@4600 {
16487 + serial1: serial@4600 {
16488 + cell-index = <1>;
16489 device_type = "serial";
16490 compatible = "ns16550";
16491 reg = <4600 100>;
16492 @@ -206,7 +220,8 @@
16493 };
16494 };
16495
16496 - pcie@ffe08000 {
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 @@
16503
16504 // IDSEL 0x1c USB
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
16512
16513 // IDSEL 0x1d Audio
16514 e800 0 0 1 &i8259 6 2
16515 @@ -415,7 +430,8 @@
16516
16517 };
16518
16519 - pcie@ffe09000 {
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 @@
16526 };
16527 };
16528
16529 - pcie@ffe0a000 {
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>;
16540 interrupt-map = <
16541 /* IDSEL 0x0 */
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
16546 @@ -1,7 +1,7 @@
16547 /*
16548 * MPC8610 HPCD Device Tree Source
16549 *
16550 - * Copyright 2007 Freescale Semiconductor Inc.
16551 + * Copyright 2007-2008 Freescale Semiconductor Inc.
16552 *
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
16555 @@ -15,6 +15,13 @@
16556 #address-cells = <1>;
16557 #size-cells = <1>;
16558
16559 + aliases {
16560 + serial0 = &serial0;
16561 + serial1 = &serial1;
16562 + pci0 = &pci0;
16563 + pci1 = &pci1;
16564 + };
16565 +
16566 cpus {
16567 #address-cells = <1>;
16568 #size-cells = <0>;
16569 @@ -42,33 +49,42 @@
16570 #size-cells = <1>;
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>;
16577
16578 i2c@3000 {
16579 - device_type = "i2c";
16580 - compatible = "fsl-i2c";
16581 #address-cells = <1>;
16582 #size-cells = <0>;
16583 + cell-index = <0>;
16584 + compatible = "fsl-i2c";
16585 reg = <3000 100>;
16586 interrupts = <2b 2>;
16587 interrupt-parent = <&mpic>;
16588 dfsrr;
16589 +
16590 + cs4270:codec@4f {
16591 + compatible = "cirrus,cs4270";
16592 + reg = <4f>;
16593 + /* MCLK source is a stand-alone oscillator */
16594 + clock-frequency = <bb8000>;
16595 + };
16596 };
16597
16598 i2c@3100 {
16599 - device_type = "i2c";
16600 - compatible = "fsl-i2c";
16601 #address-cells = <1>;
16602 #size-cells = <0>;
16603 + cell-index = <1>;
16604 + compatible = "fsl-i2c";
16605 reg = <3100 100>;
16606 interrupts = <2b 2>;
16607 interrupt-parent = <&mpic>;
16608 dfsrr;
16609 };
16610
16611 - serial@4500 {
16612 + serial0: serial@4500 {
16613 + cell-index = <0>;
16614 device_type = "serial";
16615 compatible = "ns16550";
16616 reg = <4500 100>;
16617 @@ -77,7 +93,8 @@
16618 interrupt-parent = <&mpic>;
16619 };
16620
16621 - serial@4600 {
16622 + serial1: serial@4600 {
16623 + cell-index = <1>;
16624 device_type = "serial";
16625 compatible = "ns16550";
16626 reg = <4600 100>;
16627 @@ -86,7 +103,6 @@
16628 interrupt-parent = <&mpic>;
16629 };
16630
16631 -
16632 mpic: interrupt-controller@40000 {
16633 clock-frequency = <0>;
16634 interrupt-controller;
16635 @@ -103,9 +119,113 @@
16636 reg = <e0000 1000>;
16637 fsl,has-rstcr;
16638 };
16639 +
16640 + i2s@16000 {
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>;
16648 + };
16649 +
16650 + ssi@16100 {
16651 + compatible = "fsl,mpc8610-ssi";
16652 + cell-index = <1>;
16653 + reg = <16100 100>;
16654 + interrupt-parent = <&mpic>;
16655 + interrupts = <3f 2>;
16656 + };
16657 +
16658 + dma@21300 {
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>;
16665 +
16666 + dma-channel@0 {
16667 + compatible = "fsl,mpc8610-dma-channel",
16668 + "fsl,eloplus-dma-channel";
16669 + cell-index = <0>;
16670 + reg = <0 80>;
16671 + interrupt-parent = <&mpic>;
16672 + interrupts = <14 2>;
16673 + };
16674 + dma-channel@1 {
16675 + compatible = "fsl,mpc8610-dma-channel",
16676 + "fsl,eloplus-dma-channel";
16677 + cell-index = <1>;
16678 + reg = <80 80>;
16679 + interrupt-parent = <&mpic>;
16680 + interrupts = <15 2>;
16681 + };
16682 + dma-channel@2 {
16683 + compatible = "fsl,mpc8610-dma-channel",
16684 + "fsl,eloplus-dma-channel";
16685 + cell-index = <2>;
16686 + reg = <100 80>;
16687 + interrupt-parent = <&mpic>;
16688 + interrupts = <16 2>;
16689 + };
16690 + dma-channel@3 {
16691 + compatible = "fsl,mpc8610-dma-channel",
16692 + "fsl,eloplus-dma-channel";
16693 + cell-index = <3>;
16694 + reg = <180 80>;
16695 + interrupt-parent = <&mpic>;
16696 + interrupts = <17 2>;
16697 + };
16698 + };
16699 +
16700 + dma@c300 {
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>;
16707 +
16708 + dma-channel@0 {
16709 + compatible = "fsl,mpc8610-dma-channel",
16710 + "fsl,mpc8540-dma-channel";
16711 + cell-index = <0>;
16712 + reg = <0 80>;
16713 + interrupt-parent = <&mpic>;
16714 + interrupts = <3c 2>;
16715 + };
16716 + dma-channel@1 {
16717 + compatible = "fsl,mpc8610-dma-channel",
16718 + "fsl,mpc8540-dma-channel";
16719 + cell-index = <1>;
16720 + reg = <80 80>;
16721 + interrupt-parent = <&mpic>;
16722 + interrupts = <3d 2>;
16723 + };
16724 + dma-channel@2 {
16725 + compatible = "fsl,mpc8610-dma-channel",
16726 + "fsl,mpc8540-dma-channel";
16727 + cell-index = <2>;
16728 + reg = <100 80>;
16729 + interrupt-parent = <&mpic>;
16730 + interrupts = <3e 2>;
16731 + };
16732 + dma-channel@3 {
16733 + compatible = "fsl,mpc8610-dma-channel",
16734 + "fsl,mpc8540-dma-channel";
16735 + cell-index = <3>;
16736 + reg = <180 80>;
16737 + interrupt-parent = <&mpic>;
16738 + interrupts = <3f 2>;
16739 + };
16740 + };
16741 +
16742 };
16743
16744 - pci@e0008000 {
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 @@
16751 >;
16752 };
16753
16754 - pcie@e000a000 {
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
16763 @@ -16,6 +16,17 @@
16764 #address-cells = <1>;
16765 #size-cells = <1>;
16766
16767 + aliases {
16768 + ethernet0 = &enet0;
16769 + ethernet1 = &enet1;
16770 + ethernet2 = &enet2;
16771 + ethernet3 = &enet3;
16772 + serial0 = &serial0;
16773 + serial1 = &serial1;
16774 + pci0 = &pci0;
16775 + pci1 = &pci1;
16776 + };
16777 +
16778 cpus {
16779 #address-cells = <1>;
16780 #size-cells = <0>;
16781 @@ -49,16 +60,60 @@
16782 reg = <00000000 40000000>; // 1G at 0x0
16783 };
16784
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>;
16792 +
16793 + ranges = <0 0 ff800000 00800000
16794 + 1 0 fe000000 01000000
16795 + 2 0 f8200000 00100000
16796 + 3 0 f8100000 00100000>;
16797 +
16798 + flash@0,0 {
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>;
16805 + partition@0 {
16806 + label = "kernel";
16807 + reg = <00000000 00300000>;
16808 + };
16809 + partition@300000 {
16810 + label = "firmware b";
16811 + reg = <00300000 00100000>;
16812 + read-only;
16813 + };
16814 + partition@400000 {
16815 + label = "fs";
16816 + reg = <00400000 00300000>;
16817 + };
16818 + partition@700000 {
16819 + label = "firmware a";
16820 + reg = <00700000 00100000>;
16821 + read-only;
16822 + };
16823 + };
16824 + };
16825 +
16826 soc8641@f8000000 {
16827 #address-cells = <1>;
16828 #size-cells = <1>;
16829 device_type = "soc";
16830 + compatible = "simple-bus";
16831 ranges = <00000000 f8000000 00100000>;
16832 reg = <f8000000 00001000>; // CCSRBAR
16833 bus-frequency = <0>;
16834
16835 i2c@3000 {
16836 - device_type = "i2c";
16837 + #address-cells = <1>;
16838 + #size-cells = <0>;
16839 + cell-index = <0>;
16840 compatible = "fsl-i2c";
16841 reg = <3000 100>;
16842 interrupts = <2b 2>;
16843 @@ -67,7 +122,9 @@
16844 };
16845
16846 i2c@3100 {
16847 - device_type = "i2c";
16848 + #address-cells = <1>;
16849 + #size-cells = <0>;
16850 + cell-index = <1>;
16851 compatible = "fsl-i2c";
16852 reg = <3100 100>;
16853 interrupts = <2b 2>;
16854 @@ -78,9 +135,9 @@
16855 mdio@24520 {
16856 #address-cells = <1>;
16857 #size-cells = <0>;
16858 - device_type = "mdio";
16859 - compatible = "gianfar";
16860 + compatible = "fsl,gianfar-mdio";
16861 reg = <24520 20>;
16862 +
16863 phy0: ethernet-phy@0 {
16864 interrupt-parent = <&mpic>;
16865 interrupts = <a 1>;
16866 @@ -107,19 +164,12 @@
16867 };
16868 };
16869
16870 - ethernet@24000 {
16871 - #address-cells = <1>;
16872 - #size-cells = <0>;
16873 + enet0: ethernet@24000 {
16874 + cell-index = <0>;
16875 device_type = "network";
16876 model = "TSEC";
16877 compatible = "gianfar";
16878 reg = <24000 1000>;
16879 - /*
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.
16883 - */
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";
16890 };
16891
16892 - ethernet@25000 {
16893 - #address-cells = <1>;
16894 - #size-cells = <0>;
16895 + enet1: ethernet@25000 {
16896 + cell-index = <1>;
16897 device_type = "network";
16898 model = "TSEC";
16899 compatible = "gianfar";
16900 reg = <25000 1000>;
16901 - /*
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.
16905 - */
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";
16912 };
16913
16914 - ethernet@26000 {
16915 - #address-cells = <1>;
16916 - #size-cells = <0>;
16917 + enet2: ethernet@26000 {
16918 + cell-index = <2>;
16919 device_type = "network";
16920 model = "TSEC";
16921 compatible = "gianfar";
16922 reg = <26000 1000>;
16923 - /*
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.
16927 - */
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";
16934 };
16935
16936 - ethernet@27000 {
16937 - #address-cells = <1>;
16938 - #size-cells = <0>;
16939 + enet3: ethernet@27000 {
16940 + cell-index = <3>;
16941 device_type = "network";
16942 model = "TSEC";
16943 compatible = "gianfar";
16944 reg = <27000 1000>;
16945 - /*
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.
16949 - */
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";
16956 };
16957 - serial@4500 {
16958 +
16959 + serial0: serial@4500 {
16960 + cell-index = <0>;
16961 device_type = "serial";
16962 compatible = "ns16550";
16963 reg = <4500 100>;
16964 @@ -195,7 +226,8 @@
16965 interrupt-parent = <&mpic>;
16966 };
16967
16968 - serial@4600 {
16969 + serial1: serial@4600 {
16970 + cell-index = <1>;
16971 device_type = "serial";
16972 compatible = "ns16550";
16973 reg = <4600 100>;
16974 @@ -222,7 +254,8 @@
16975 };
16976 };
16977
16978 - pcie@f8008000 {
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 @@
16985
16986 // IDSEL 0x1c USB
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
16994
16995 // IDSEL 0x1d Audio
16996 e800 0 0 1 &i8259 6 2
16997 @@ -430,7 +463,8 @@
16998
16999 };
17000
17001 - pcie@f8009000 {
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
17010 @@ -12,7 +12,7 @@
17011
17012 / {
17013 model = "MPC866ADS";
17014 - compatible = "mpc8xx";
17015 + compatible = "fsl,mpc866ads";
17016 #address-cells = <1>;
17017 #size-cells = <1>;
17018
17019 @@ -23,15 +23,15 @@
17020 PowerPC,866@0 {
17021 device_type = "cpu";
17022 reg = <0>;
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>;
17035 };
17036 };
17037
17038 @@ -40,107 +40,139 @@
17039 reg = <00000000 800000>;
17040 };
17041
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>;
17048 +
17049 + ranges = <
17050 + 1 0 ff080000 00008000
17051 + 5 0 ff0a0000 00008000
17052 + >;
17053 +
17054 + board-control@1,0 {
17055 + reg = <1 0 20 5 300 4>;
17056 + compatible = "fsl,mpc866ads-bcsr";
17057 + };
17058 + };
17059 +
17060 + soc@ff000000 {
17061 #address-cells = <1>;
17062 #size-cells = <1>;
17063 device_type = "soc";
17064 ranges = <0 ff000000 00100000>;
17065 reg = <ff000000 00000200>;
17066 bus-frequency = <0>;
17067 - mdio@e80 {
17068 - device_type = "mdio";
17069 - compatible = "fs_enet";
17070 - reg = <e80 8>;
17071 +
17072 + mdio@e00 {
17073 + compatible = "fsl,mpc866-fec-mdio", "fsl,pq1-fec-mdio";
17074 + reg = <e00 188>;
17075 #address-cells = <1>;
17076 #size-cells = <0>;
17077 - phy: ethernet-phy@f {
17078 + PHY: ethernet-phy@f {
17079 reg = <f>;
17080 device_type = "ethernet-phy";
17081 };
17082 };
17083
17084 - fec@e00 {
17085 + ethernet@e00 {
17086 device_type = "network";
17087 - compatible = "fs_enet";
17088 - model = "FEC";
17089 - device-id = <1>;
17090 + compatible = "fsl,mpc866-fec-enet",
17091 + "fsl,pq1-fec-enet";
17092 reg = <e00 188>;
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>;
17101 };
17102
17103 - mpc8xx_pic: pic@ff000000 {
17104 + PIC: pic@0 {
17105 interrupt-controller;
17106 - #address-cells = <0>;
17107 #interrupt-cells = <2>;
17108 reg = <0 24>;
17109 - device_type = "mpc8xx-pic";
17110 - compatible = "CPM";
17111 + compatible = "fsl,mpc866-pic", "fsl,pq1-pic";
17112 };
17113
17114 - cpm@ff000000 {
17115 + cpm@9c0 {
17116 #address-cells = <1>;
17117 #size-cells = <1>;
17118 - device_type = "cpm";
17119 - model = "CPM";
17120 - ranges = <0 0 4000>;
17121 - reg = <860 f0>;
17122 - command-proc = <9c0>;
17123 + compatible = "fsl,mpc866-cpm", "fsl,cpm1";
17124 + ranges;
17125 + reg = <9c0 40>;
17126 brg-frequency = <0>;
17127 interrupts = <0 2>; // cpm error interrupt
17128 - interrupt-parent = <&Cpm_pic>;
17129 + interrupt-parent = <&CPM_PIC>;
17130
17131 - cpm_pic: pic@930 {
17132 + muram@2000 {
17133 + #address-cells = <1>;
17134 + #size-cells = <1>;
17135 + ranges = <0 2000 2000>;
17136 +
17137 + data@0 {
17138 + compatible = "fsl,cpm-muram-data";
17139 + reg = <0 1c00>;
17140 + };
17141 + };
17142 +
17143 + brg@9f0 {
17144 + compatible = "fsl,mpc866-brg",
17145 + "fsl,cpm1-brg",
17146 + "fsl,cpm-brg";
17147 + reg = <9f0 10>;
17148 + clock-frequency = <0>;
17149 + };
17150 +
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>;
17159 reg = <930 20>;
17160 - device_type = "cpm-pic";
17161 - compatible = "CPM";
17162 + compatible = "fsl,mpc866-cpm-pic",
17163 + "fsl,cpm1-pic";
17164 };
17165
17166 - smc@a80 {
17167 +
17168 + serial@a80 {
17169 device_type = "serial";
17170 - compatible = "cpm_uart";
17171 - model = "SMC";
17172 - device-id = <1>;
17173 + compatible = "fsl,mpc866-smc-uart",
17174 + "fsl,cpm1-smc-uart";
17175 reg = <a80 10 3e80 40>;
17176 - clock-setup = <00ffffff 0>;
17177 - rx-clock = <1>;
17178 - tx-clock = <1>;
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>;
17186 };
17187
17188 - smc@a90 {
17189 + serial@a90 {
17190 device_type = "serial";
17191 - compatible = "cpm_uart";
17192 - model = "SMC";
17193 - device-id = <2>;
17194 - reg = <a90 20 3f80 40>;
17195 - clock-setup = <ff00ffff 90000>;
17196 - rx-clock = <2>;
17197 - tx-clock = <2>;
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>;
17208 };
17209
17210 - scc@a00 {
17211 + ethernet@a00 {
17212 device_type = "network";
17213 - compatible = "fs_enet";
17214 - model = "SCC";
17215 - device-id = <1>;
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>;
17228 };
17229 };
17230 };
17231 +
17232 + chosen {
17233 + linux,stdout-path = "/soc/cpm/serial@a80";
17234 + };
17235 };
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
17239 @@ -0,0 +1,353 @@
17240 +/*
17241 + * Device Tree Source for AMCC Rainier
17242 + *
17243 + * Based on Sequoia code
17244 + * Copyright (c) 2007 MontaVista Software, Inc.
17245 + *
17246 + * FIXME: Draft only!
17247 + *
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.
17251 + *
17252 + */
17253 +
17254 +/ {
17255 + #address-cells = <2>;
17256 + #size-cells = <1>;
17257 + model = "amcc,rainier";
17258 + compatible = "amcc,rainier";
17259 + dcr-parent = <&/cpus/cpu@0>;
17260 +
17261 + aliases {
17262 + ethernet0 = &EMAC0;
17263 + ethernet1 = &EMAC1;
17264 + serial0 = &UART0;
17265 + serial1 = &UART1;
17266 + serial2 = &UART2;
17267 + serial3 = &UART3;
17268 + };
17269 +
17270 + cpus {
17271 + #address-cells = <1>;
17272 + #size-cells = <0>;
17273 +
17274 + cpu@0 {
17275 + device_type = "cpu";
17276 + model = "PowerPC,440GRx";
17277 + reg = <0>;
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>;
17284 + dcr-controller;
17285 + dcr-access-method = "native";
17286 + };
17287 + };
17288 +
17289 + memory {
17290 + device_type = "memory";
17291 + reg = <0 0 0>; /* Filled in by zImage */
17292 + };
17293 +
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>;
17302 + };
17303 +
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>;
17314 + };
17315 +
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>;
17326 + };
17327 +
17328 + SDR0: sdr {
17329 + compatible = "ibm,sdr-440grx", "ibm,sdr-440ep";
17330 + dcr-reg = <00e 002>;
17331 + };
17332 +
17333 + CPR0: cpr {
17334 + compatible = "ibm,cpr-440grx", "ibm,cpr-440ep";
17335 + dcr-reg = <00c 002>;
17336 + };
17337 +
17338 + plb {
17339 + compatible = "ibm,plb-440grx", "ibm,plb4";
17340 + #address-cells = <2>;
17341 + #size-cells = <1>;
17342 + ranges;
17343 + clock-frequency = <0>; /* Filled in by zImage */
17344 +
17345 + SDRAM0: sdram {
17346 + compatible = "ibm,sdram-440grx", "ibm,sdram-44x-ddr2denali";
17347 + dcr-reg = <010 2>;
17348 + };
17349 +
17350 + DMA0: dma {
17351 + compatible = "ibm,dma-440grx", "ibm,dma-4xx";
17352 + dcr-reg = <100 027>;
17353 + };
17354 +
17355 + MAL0: mcmal {
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>;
17371 + };
17372 +
17373 + POB0: opb {
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 */
17382 +
17383 + EBC0: ebc {
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>;
17391 +
17392 + nor_flash@0,0 {
17393 + compatible = "amd,s29gl256n", "cfi-flash";
17394 + bank-width = <2>;
17395 + reg = <0 000000 4000000>;
17396 + #address-cells = <1>;
17397 + #size-cells = <1>;
17398 + partition@0 {
17399 + label = "Kernel";
17400 + reg = <0 180000>;
17401 + };
17402 + partition@180000 {
17403 + label = "ramdisk";
17404 + reg = <180000 200000>;
17405 + };
17406 + partition@380000 {
17407 + label = "file system";
17408 + reg = <380000 3aa0000>;
17409 + };
17410 + partition@3e20000 {
17411 + label = "kozio";
17412 + reg = <3e20000 140000>;
17413 + };
17414 + partition@3f60000 {
17415 + label = "env";
17416 + reg = <3f60000 40000>;
17417 + };
17418 + partition@3fa0000 {
17419 + label = "u-boot";
17420 + reg = <3fa0000 60000>;
17421 + };
17422 + };
17423 +
17424 + };
17425 +
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>;
17435 + };
17436 +
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>;
17446 + };
17447 +
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>;
17457 + };
17458 +
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>;
17468 + };
17469 +
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>;
17476 + };
17477 +
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>;
17484 + };
17485 +
17486 + ZMII0: emac-zmii@ef600d00 {
17487 + device_type = "zmii-interface";
17488 + compatible = "ibm,zmii-440grx", "ibm,zmii";
17489 + reg = <ef600d00 c>;
17490 + };
17491 +
17492 + RGMII0: emac-rgmii@ef601000 {
17493 + device_type = "rgmii-interface";
17494 + compatible = "ibm,rgmii-440grx", "ibm,rgmii";
17495 + reg = <ef601000 8>;
17496 + has-mdio;
17497 + };
17498 +
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;
17527 + };
17528 +
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;
17557 + };
17558 + };
17559 +
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";
17566 + primary;
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 */
17571 +
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
17575 + */
17576 + ranges = <02000000 0 80000000 1 80000000 0 10000000
17577 + 01000000 0 00000000 1 e8000000 0 00100000>;
17578 +
17579 + /* Inbound 2GB range starting at 0 */
17580 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
17581 +
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 >;
17585 + };
17586 + };
17587 +
17588 + chosen {
17589 + linux,stdout-path = "/plb/opb/serial@ef600300";
17590 + bootargs = "console=ttyS0,115200";
17591 + };
17592 +};
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 @@
17597 #size-cells = <1>;
17598 model = "amcc,sequoia";
17599 compatible = "amcc,sequoia";
17600 - dcr-parent = <&/cpus/PowerPC,440EPx@0>;
17601 + dcr-parent = <&/cpus/cpu@0>;
17602 +
17603 + aliases {
17604 + ethernet0 = &EMAC0;
17605 + ethernet1 = &EMAC1;
17606 + serial0 = &UART0;
17607 + serial1 = &UART1;
17608 + serial2 = &UART2;
17609 + serial3 = &UART3;
17610 + };
17611
17612 cpus {
17613 #address-cells = <1>;
17614 #size-cells = <0>;
17615
17616 - PowerPC,440EPx@0 {
17617 + cpu@0 {
17618 device_type = "cpu";
17619 + model = "PowerPC,440EPx";
17620 reg = <0>;
17621 clock-frequency = <0>; /* Filled in by zImage */
17622 timebase-frequency = <0>; /* Filled in by zImage */
17623 @@ -94,7 +104,6 @@
17624 clock-frequency = <0>; /* Filled in by zImage */
17625
17626 SDRAM0: sdram {
17627 - device_type = "memory-controller";
17628 compatible = "ibm,sdram-440epx", "ibm,sdram-44x-ddr2denali";
17629 dcr-reg = <010 2>;
17630 };
17631 @@ -122,6 +131,13 @@
17632 interrupt-map-mask = <ffffffff>;
17633 };
17634
17635 + USB1: usb@e0000400 {
17636 + compatible = "ohci-be";
17637 + reg = <0 e0000400 60>;
17638 + interrupt-parent = <&UIC0>;
17639 + interrupts = <15 8>;
17640 + };
17641 +
17642 POB0: opb {
17643 compatible = "ibm,opb-440epx", "ibm,opb";
17644 #address-cells = <1>;
17645 @@ -308,6 +324,33 @@
17646 has-new-stacr-staopc;
17647 };
17648 };
17649 +
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";
17656 + primary;
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 */
17661 +
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
17665 + */
17666 + ranges = <02000000 0 80000000 1 80000000 0 10000000
17667 + 01000000 0 00000000 1 e8000000 0 00100000>;
17668 +
17669 + /* Inbound 2GB range starting at 0 */
17670 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
17671 +
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 >;
17675 + };
17676 };
17677
17678 chosen {
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
17682 @@ -0,0 +1,138 @@
17683 +/*
17684 + * Device Tree Source for IOMEGA StorCenter
17685 + *
17686 + * Copyright 2007 Oyvind Repvik
17687 + * Copyright 2007 Jon Loeliger
17688 + *
17689 + * Based on the Kurobox DTS by G. Liakhovetski <g.liakhovetski@gmx.de>
17690 + *
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.
17694 + */
17695 +
17696 +/ {
17697 + model = "StorCenter";
17698 + compatible = "storcenter";
17699 + #address-cells = <1>;
17700 + #size-cells = <1>;
17701 +
17702 + aliases {
17703 + serial0 = &serial0;
17704 + serial1 = &serial1;
17705 + pci0 = &pci0;
17706 + };
17707 +
17708 + cpus {
17709 + #address-cells = <1>;
17710 + #size-cells = <0>;
17711 +
17712 + PowerPC,8241@0 {
17713 + device_type = "cpu";
17714 + reg = <0>;
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>;
17722 + };
17723 + };
17724 +
17725 + memory {
17726 + device_type = "memory";
17727 + reg = <00000000 04000000>; /* 64MB @ 0x0 */
17728 + };
17729 +
17730 + soc@fc000000 {
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 */
17739 +
17740 + i2c@3000 {
17741 + #address-cells = <1>;
17742 + #size-cells = <0>;
17743 + compatible = "fsl-i2c";
17744 + reg = <3000 100>;
17745 + interrupts = <5 2>;
17746 + interrupt-parent = <&mpic>;
17747 +
17748 + rtc@68 {
17749 + compatible = "dallas,ds1337";
17750 + reg = <68>;
17751 + };
17752 + };
17753 +
17754 + serial0: serial@4500 {
17755 + cell-index = <0>;
17756 + device_type = "serial";
17757 + compatible = "ns16550";
17758 + reg = <4500 20>;
17759 + clock-frequency = <d# 97553800>; /* Hz */
17760 + current-speed = <d# 115200>;
17761 + interrupts = <9 2>;
17762 + interrupt-parent = <&mpic>;
17763 + };
17764 +
17765 + serial1: serial@4600 {
17766 + cell-index = <1>;
17767 + device_type = "serial";
17768 + compatible = "ns16550";
17769 + reg = <4600 20>;
17770 + clock-frequency = <d# 97553800>; /* Hz */
17771 + current-speed = <d# 9600>;
17772 + interrupts = <a 2>;
17773 + interrupt-parent = <&mpic>;
17774 + };
17775 +
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>;
17782 + };
17783 +
17784 + };
17785 +
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
17814 + >;
17815 + };
17816 +
17817 + chosen {
17818 + linux,stdout-path = "/soc/serial@4500";
17819 + };
17820 +};
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
17824 @@ -0,0 +1,383 @@
17825 +/*
17826 + * Device Tree Source for IBM/AMCC Taishan
17827 + *
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>
17831 + *
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.
17835 + */
17836 +
17837 +/ {
17838 + #address-cells = <2>;
17839 + #size-cells = <1>;
17840 + model = "amcc,taishan";
17841 + compatible = "amcc,taishan";
17842 + dcr-parent = <&/cpus/cpu@0>;
17843 +
17844 + aliases {
17845 + ethernet0 = &EMAC2;
17846 + ethernet1 = &EMAC3;
17847 + serial0 = &UART0;
17848 + serial1 = &UART1;
17849 + };
17850 +
17851 + cpus {
17852 + #address-cells = <1>;
17853 + #size-cells = <0>;
17854 +
17855 + cpu@0 {
17856 + device_type = "cpu";
17857 + model = "PowerPC,440GX";
17858 + reg = <0>;
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 */
17865 + dcr-controller;
17866 + dcr-access-method = "native";
17867 + };
17868 + };
17869 +
17870 + memory {
17871 + device_type = "memory";
17872 + reg = <0 0 0>; // Filled in by zImage
17873 + };
17874 +
17875 +
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>;
17884 + };
17885 +
17886 +
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>;
17897 +
17898 + };
17899 +
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>;
17910 + };
17911 +
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>;
17922 + };
17923 +
17924 +
17925 + CPC0: cpc {
17926 + compatible = "ibm,cpc-440gp";
17927 + dcr-reg = <0b0 003 0e0 010>;
17928 + // FIXME: anything else?
17929 + };
17930 +
17931 + plb {
17932 + compatible = "ibm,plb-440gx", "ibm,plb4";
17933 + #address-cells = <2>;
17934 + #size-cells = <1>;
17935 + ranges;
17936 + clock-frequency = <9896800>; // 160MHz
17937 +
17938 + SDRAM0: memory-controller {
17939 + compatible = "ibm,sdram-440gp";
17940 + dcr-reg = <010 2>;
17941 + // FIXME: anything else?
17942 + };
17943 +
17944 + SRAM0: sram {
17945 + compatible = "ibm,sram-440gp";
17946 + dcr-reg = <020 8 00a 1>;
17947 + };
17948 +
17949 + DMA0: dma {
17950 + // FIXME: ???
17951 + compatible = "ibm,dma-440gp";
17952 + dcr-reg = <100 027>;
17953 + };
17954 +
17955 + MAL0: mcmal {
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>;
17971 + };
17972 +
17973 + POB0: opb {
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
17978 + range */
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
17985 +
17986 +
17987 + EBC0: ebc {
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
17993 +
17994 + /* ranges property is supplied by zImage
17995 + * based on firmware's configuration of the
17996 + * EBC bridge */
17997 +
17998 + interrupts = <5 4>;
17999 + interrupt-parent = <&UIC1>;
18000 +
18001 + /* TODO: Add other EBC devices */
18002 + };
18003 +
18004 +
18005 +
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>;
18015 + };
18016 +
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>;
18026 + };
18027 +
18028 + IIC0: i2c@40000400 {
18029 + /* FIXME */
18030 + device_type = "i2c";
18031 + compatible = "ibm,iic-440gp", "ibm,iic";
18032 + reg = <40000400 14>;
18033 + interrupt-parent = <&UIC0>;
18034 + interrupts = <2 4>;
18035 + };
18036 + IIC1: i2c@40000500 {
18037 + /* FIXME */
18038 + device_type = "i2c";
18039 + compatible = "ibm,iic-440gp", "ibm,iic";
18040 + reg = <40000500 14>;
18041 + interrupt-parent = <&UIC0>;
18042 + interrupts = <3 4>;
18043 + };
18044 +
18045 + GPIO0: gpio@40000700 {
18046 + /* FIXME */
18047 + compatible = "ibm,gpio-440gp";
18048 + reg = <40000700 20>;
18049 + };
18050 +
18051 + ZMII0: emac-zmii@40000780 {
18052 + device_type = "zgmii-interface";
18053 + compatible = "ibm,zmii-440gx", "ibm,zmii";
18054 + reg = <40000780 c>;
18055 + };
18056 +
18057 + RGMII0: emac-rgmii@40000790 {
18058 + device_type = "rgmii-interface";
18059 + compatible = "ibm,rgmii";
18060 + reg = <40000790 8>;
18061 + };
18062 +
18063 +
18064 + EMAC0: ethernet@40000800 {
18065 + unused = <1>;
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>;
18084 + };
18085 + EMAC1: ethernet@40000900 {
18086 + unused = <1>;
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>;
18105 + };
18106 +
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>;
18128 + };
18129 +
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>;
18151 + };
18152 +
18153 +
18154 + GPT0: gpt@40000a00 {
18155 + /* FIXME */
18156 + reg = <40000a00 d4>;
18157 + interrupt-parent = <&UIC0>;
18158 + interrupts = <12 4 13 4 14 4 15 4 16 4>;
18159 + };
18160 +
18161 + };
18162 +
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";
18169 + primary;
18170 + large-inbound-windows;
18171 + enable-msi-hole;
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 */
18177 +
18178 + /* Outbound ranges, one memory and one IO,
18179 + * later cannot be changed
18180 + */
18181 + ranges = <02000000 0 80000000 00000003 80000000 0 80000000
18182 + 01000000 0 00000000 00000002 08000000 0 00010000>;
18183 +
18184 + /* Inbound 2GB range starting at 0 */
18185 + dma-ranges = <42000000 0 0 0 0 0 80000000>;
18186 +
18187 + interrupt-map-mask = <f800 0 0 7>;
18188 + interrupt-map = <
18189 + /* IDSEL 1 */
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
18194 +
18195 + /* IDSEL 2 */
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
18200 + >;
18201 + };
18202 + };
18203 +
18204 + chosen {
18205 + linux,stdout-path = "/plb/opb/serial@40000300";
18206 + };
18207 +};
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
18211 @@ -0,0 +1,184 @@
18212 +/*
18213 + * TQM5200 board Device Tree Source
18214 + *
18215 + * Copyright (C) 2007 Semihalf
18216 + * Marian Balakowicz <m8@semihalf.com>
18217 + *
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.
18222 + */
18223 +
18224 +/*
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
18228 + */
18229 +
18230 +/ {
18231 + model = "tqc,tqm5200";
18232 + compatible = "tqc,tqm5200";
18233 + #address-cells = <1>;
18234 + #size-cells = <1>;
18235 +
18236 + cpus {
18237 + #address-cells = <1>;
18238 + #size-cells = <0>;
18239 +
18240 + PowerPC,5200@0 {
18241 + device_type = "cpu";
18242 + reg = <0>;
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
18250 + };
18251 + };
18252 +
18253 + memory {
18254 + device_type = "memory";
18255 + reg = <00000000 04000000>; // 64MB
18256 + };
18257 +
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
18267 +
18268 + cdm@200 {
18269 + compatible = "mpc5200-cdm";
18270 + reg = <200 38>;
18271 + };
18272 +
18273 + mpc5200_pic: pic@500 {
18274 + // 5200 interrupts are encoded into two levels;
18275 + interrupt-controller;
18276 + #interrupt-cells = <3>;
18277 + compatible = "mpc5200-pic";
18278 + reg = <500 80>;
18279 + };
18280 +
18281 + gpt@600 { // General Purpose Timer
18282 + compatible = "fsl,mpc5200-gpt";
18283 + reg = <600 10>;
18284 + interrupts = <1 9 0>;
18285 + interrupt-parent = <&mpc5200_pic>;
18286 + fsl,has-wdt;
18287 + };
18288 +
18289 + gpio@b00 {
18290 + compatible = "mpc5200-gpio";
18291 + reg = <b00 40>;
18292 + interrupts = <1 7 0>;
18293 + interrupt-parent = <&mpc5200_pic>;
18294 + };
18295 +
18296 + usb@1000 {
18297 + compatible = "mpc5200-ohci","ohci-be";
18298 + reg = <1000 ff>;
18299 + interrupts = <2 6 0>;
18300 + interrupt-parent = <&mpc5200_pic>;
18301 + };
18302 +
18303 + dma-controller@1200 {
18304 + compatible = "mpc5200-bestcomm";
18305 + reg = <1200 80>;
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>;
18311 + };
18312 +
18313 + xlb@1f00 {
18314 + compatible = "mpc5200-xlb";
18315 + reg = <1f00 100>;
18316 + };
18317 +
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>;
18325 + };
18326 +
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>;
18334 + };
18335 +
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>;
18343 + };
18344 +
18345 + ethernet@3000 {
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>;
18352 + };
18353 +
18354 + ata@3a00 {
18355 + compatible = "mpc5200-ata";
18356 + reg = <3a00 100>;
18357 + interrupts = <2 7 0>;
18358 + interrupt-parent = <&mpc5200_pic>;
18359 + };
18360 +
18361 + i2c@3d40 {
18362 + compatible = "mpc5200-i2c","fsl-i2c";
18363 + reg = <3d40 40>;
18364 + interrupts = <2 10 0>;
18365 + interrupt-parent = <&mpc5200_pic>;
18366 + fsl5200-clocking;
18367 + };
18368 +
18369 + sram@8000 {
18370 + compatible = "mpc5200-sram";
18371 + reg = <8000 4000>;
18372 + };
18373 + };
18374 +
18375 + pci@f0000d00 {
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>;
18394 + };
18395 +};
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 @@
18400 #size-cells = <1>;
18401 model = "ibm,walnut";
18402 compatible = "ibm,walnut";
18403 - dcr-parent = <&/cpus/PowerPC,405GP@0>;
18404 + dcr-parent = <&/cpus/cpu@0>;
18405 +
18406 + aliases {
18407 + ethernet0 = &EMAC;
18408 + serial0 = &UART0;
18409 + serial1 = &UART1;
18410 + };
18411
18412 cpus {
18413 #address-cells = <1>;
18414 #size-cells = <0>;
18415
18416 - PowerPC,405GP@0 {
18417 + cpu@0 {
18418 device_type = "cpu";
18419 + model = "PowerPC,405GP";
18420 reg = <0>;
18421 clock-frequency = <bebc200>; /* Filled in by zImage */
18422 timebase-frequency = <0>; /* Filled in by zImage */
18423 @@ -168,9 +175,10 @@
18424 };
18425 };
18426
18427 - ds1743@1,0 {
18428 + nvram@1,0 {
18429 /* NVRAM and RTC */
18430 - compatible = "ds1743";
18431 + compatible = "ds1743-nvram";
18432 + #bytes = <2000>;
18433 reg = <1 0 2000>;
18434 };
18435
18436 @@ -190,6 +198,45 @@
18437 virtual-reg = <f0300005>;
18438 };
18439 };
18440 +
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";
18447 + primary;
18448 + reg = <eec00000 8 /* Config space access */
18449 + eed80000 4 /* IACK */
18450 + eed80000 4 /* Special cycle */
18451 + ef480000 40>; /* Internal registers */
18452 +
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
18456 + */
18457 + ranges = <02000000 0 80000000 80000000 0 20000000
18458 + 01000000 0 00000000 e8000000 0 00010000>;
18459 +
18460 + /* Inbound 2GB range starting at 0 */
18461 + dma-ranges = <42000000 0 0 0 0 80000000>;
18462 +
18463 + /* Walnut has all 4 IRQ pins tied together per slot */
18464 + interrupt-map-mask = <f800 0 0 0>;
18465 + interrupt-map = <
18466 + /* IDSEL 1 */
18467 + 0800 0 0 0 &UIC0 1c 8
18468 +
18469 + /* IDSEL 2 */
18470 + 1000 0 0 0 &UIC0 1d 8
18471 +
18472 + /* IDSEL 3 */
18473 + 1800 0 0 0 &UIC0 1e 8
18474 +
18475 + /* IDSEL 4 */
18476 + 2000 0 0 0 &UIC0 1f 8
18477 + >;
18478 + };
18479 };
18480
18481 chosen {
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
18485 @@ -0,0 +1,239 @@
18486 +/*
18487 + * Device Tree Source for PIKA Warp
18488 + *
18489 + * Copyright (c) 2008 PIKA Technologies
18490 + * Sean MacLennan <smaclennan@pikatech.com>
18491 + *
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.
18495 + */
18496 +
18497 +/ {
18498 + #address-cells = <2>;
18499 + #size-cells = <1>;
18500 + model = "pika,warp";
18501 + compatible = "pika,warp";
18502 + dcr-parent = <&/cpus/cpu@0>;
18503 +
18504 + aliases {
18505 + ethernet0 = &EMAC0;
18506 + serial0 = &UART0;
18507 + };
18508 +
18509 + cpus {
18510 + #address-cells = <1>;
18511 + #size-cells = <0>;
18512 +
18513 + cpu@0 {
18514 + device_type = "cpu";
18515 + model = "PowerPC,440EP";
18516 + reg = <0>;
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>;
18523 + dcr-controller;
18524 + dcr-access-method = "native";
18525 + };
18526 + };
18527 +
18528 + memory {
18529 + device_type = "memory";
18530 + reg = <0 0 0>; /* Filled in by zImage */
18531 + };
18532 +
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>;
18541 + };
18542 +
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>;
18553 + };
18554 +
18555 + SDR0: sdr {
18556 + compatible = "ibm,sdr-440ep";
18557 + dcr-reg = <00e 002>;
18558 + };
18559 +
18560 + CPR0: cpr {
18561 + compatible = "ibm,cpr-440ep";
18562 + dcr-reg = <00c 002>;
18563 + };
18564 +
18565 + plb {
18566 + compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4";
18567 + #address-cells = <2>;
18568 + #size-cells = <1>;
18569 + ranges;
18570 + clock-frequency = <0>; /* Filled in by zImage */
18571 +
18572 + SDRAM0: sdram {
18573 + compatible = "ibm,sdram-440ep", "ibm,sdram-405gp";
18574 + dcr-reg = <010 2>;
18575 + };
18576 +
18577 + DMA0: dma {
18578 + compatible = "ibm,dma-440ep", "ibm,dma-440gp";
18579 + dcr-reg = <100 027>;
18580 + };
18581 +
18582 + MAL0: mcmal {
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>;
18597 + };
18598 +
18599 + POB0: opb {
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 */
18608 +
18609 + EBC0: ebc {
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>;
18617 +
18618 + fpga@2,0 {
18619 + compatible = "pika,fpga";
18620 + reg = <2 0 2200>;
18621 + interrupts = <18 8>;
18622 + interrupt-parent = <&UIC0>;
18623 + };
18624 +
18625 + nor_flash@0,0 {
18626 + compatible = "amd,s29gl512n", "cfi-flash";
18627 + bank-width = <2>;
18628 + reg = <0 0 4000000>;
18629 + #address-cells = <1>;
18630 + #size-cells = <1>;
18631 + partition@0 {
18632 + label = "kernel";
18633 + reg = <0 180000>;
18634 + };
18635 + partition@180000 {
18636 + label = "root";
18637 + reg = <180000 3480000>;
18638 + };
18639 + partition@3600000 {
18640 + label = "user";
18641 + reg = <3600000 900000>;
18642 + };
18643 + partition@3f00000 {
18644 + label = "fpga";
18645 + reg = <3f00000 40000>;
18646 + };
18647 + partition@3f40000 {
18648 + label = "env";
18649 + reg = <3f40000 40000>;
18650 + };
18651 + partition@3f80000 {
18652 + label = "u-boot";
18653 + reg = <3f80000 80000>;
18654 + };
18655 + };
18656 + };
18657 +
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>;
18667 + };
18668 +
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>;
18674 + };
18675 +
18676 + GPIO0: gpio@ef600b00 {
18677 + compatible = "ibm,gpio-440ep";
18678 + reg = <ef600b00 48>;
18679 + };
18680 +
18681 + GPIO1: gpio@ef600c00 {
18682 + compatible = "ibm,gpio-440ep";
18683 + reg = <ef600c00 48>;
18684 + };
18685 +
18686 + ZMII0: emac-zmii@ef600d00 {
18687 + compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii";
18688 + reg = <ef600d00 c>;
18689 + };
18690 +
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>;
18710 + };
18711 +
18712 + usb@ef601000 {
18713 + compatible = "ohci-be";
18714 + reg = <ef601000 80>;
18715 + interrupts = <8 1 9 1>;
18716 + interrupt-parent = < &UIC1 >;
18717 + };
18718 + };
18719 + };
18720 +
18721 + chosen {
18722 + linux,stdout-path = "/plb/opb/serial@ef600300";
18723 + };
18724 +};
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
18728 @@ -31,66 +31,6 @@
18729
18730 static u8 *ebony_mac0, *ebony_mac1;
18731
18732 -/* Calculate 440GP clocks */
18733 -void ibm440gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
18734 -{
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);
18740 -
18741 - if (sys0 & CPC0_SYS0_BYPASS) {
18742 - /* Bypass system PLL */
18743 - cpu = plb = sysclk;
18744 - } else {
18745 - if (sys0 & CPC0_SYS0_EXTSL)
18746 - /* PerClk */
18747 - m = CPC0_SYS0_FWDVB(sys0) * opdv * epdv;
18748 - else
18749 - /* CPU clock */
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);
18753 - }
18754 -
18755 - opb = plb / opdv;
18756 - ebc = opb / epdv;
18757 -
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 */
18761 - tb = sysclk;
18762 - else
18763 - /* Rev. C 440GP, errata force us to use internal clock */
18764 - tb = cpu;
18765 -
18766 - if (cr0 & CPC0_CR0_U0EC)
18767 - /* External UART clock */
18768 - uart0 = ser_clk;
18769 - else
18770 - /* Internal UART clock */
18771 - uart0 = plb / CPC0_CR0_UDIV(cr0);
18772 -
18773 - if (cr0 & CPC0_CR0_U1EC)
18774 - /* External UART clock */
18775 - uart1 = ser_clk;
18776 - else
18777 - /* Internal UART clock */
18778 - uart1 = plb / CPC0_CR0_UDIV(cr0);
18779 -
18780 - printf("PPC440GP: SysClk = %dMHz (%x)\n\r",
18781 - (sysclk + 500000) / 1000000, sysclk);
18782 -
18783 - dt_fixup_cpu_clocks(cpu, tb, 0);
18784 -
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);
18790 -}
18791 -
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"
18795 @@ -134,7 +74,7 @@
18796 unsigned long sysclk = 33000000;
18797
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();
18804 @@ -146,6 +86,6 @@
18805 platform_ops.exit = ibm44x_dbcr_reset;
18806 ebony_mac0 = mac0;
18807 ebony_mac1 = mac1;
18808 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
18809 + fdt_init(_dtb_start);
18810 serial_console_init();
18811 }
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
18815 @@ -0,0 +1,74 @@
18816 +/*
18817 + * Embedded Planet EP405 with PlanetCore firmware
18818 + *
18819 + * (c) Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp,\
18820 + *
18821 + * Based on ep88xc.c by
18822 + *
18823 + * Scott Wood <scottwood@freescale.com>
18824 + *
18825 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
18826 + *
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.
18830 + */
18831 +
18832 +#include "ops.h"
18833 +#include "stdio.h"
18834 +#include "planetcore.h"
18835 +#include "dcr.h"
18836 +#include "4xx.h"
18837 +#include "io.h"
18838 +
18839 +static char *table;
18840 +static u64 mem_size;
18841 +
18842 +static void platform_fixups(void)
18843 +{
18844 + u64 val;
18845 + void *nvrtc;
18846 +
18847 + dt_fixup_memory(0, mem_size);
18848 + planetcore_set_mac_addrs(table);
18849 +
18850 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) {
18851 + printf("No PlanetCore crystal frequency key.\r\n");
18852 + return;
18853 + }
18854 + ibm405gp_fixup_clocks(val, 0xa8c000);
18855 + ibm4xx_quiesce_eth((u32 *)0xef600800, NULL);
18856 + ibm4xx_fixup_ebc_ranges("/plb/ebc");
18857 +
18858 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_KB_NVRAM, &val)) {
18859 + printf("No PlanetCore NVRAM size key.\r\n");
18860 + return;
18861 + }
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);
18868 + }
18869 +}
18870 +
18871 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
18872 + unsigned long r6, unsigned long r7)
18873 +{
18874 + table = (char *)r3;
18875 + planetcore_prepare_table(table);
18876 +
18877 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size))
18878 + return;
18879 +
18880 + mem_size *= 1024 * 1024;
18881 + simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
18882 +
18883 + fdt_init(_dtb_start);
18884 +
18885 + planetcore_set_stdout_path(table);
18886 +
18887 + serial_console_init();
18888 + platform_ops.fixups = platform_fixups;
18889 +}
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
18893 @@ -0,0 +1,55 @@
18894 +/*
18895 + * Embedded Planet EP8248E with PlanetCore firmware
18896 + *
18897 + * Author: Scott Wood <scottwood@freescale.com>
18898 + *
18899 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
18900 + *
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.
18904 + */
18905 +
18906 +#include "ops.h"
18907 +#include "stdio.h"
18908 +#include "planetcore.h"
18909 +#include "pq2.h"
18910 +
18911 +static char *table;
18912 +static u64 mem_size;
18913 +
18914 +#include <io.h>
18915 +
18916 +static void platform_fixups(void)
18917 +{
18918 + u64 val;
18919 +
18920 + dt_fixup_memory(0, mem_size);
18921 + planetcore_set_mac_addrs(table);
18922 +
18923 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) {
18924 + printf("No PlanetCore crystal frequency key.\r\n");
18925 + return;
18926 + }
18927 +
18928 + pq2_fixup_clocks(val);
18929 +}
18930 +
18931 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
18932 + unsigned long r6, unsigned long r7)
18933 +{
18934 + table = (char *)r3;
18935 + planetcore_prepare_table(table);
18936 +
18937 + if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size))
18938 + return;
18939 +
18940 + mem_size *= 1024 * 1024;
18941 + simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
18942 +
18943 + fdt_init(_dtb_start);
18944 +
18945 + planetcore_set_stdout_path(table);
18946 + serial_console_init();
18947 + platform_ops.fixups = platform_fixups;
18948 +}
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
18952 @@ -45,7 +45,7 @@
18953 mem_size *= 1024 * 1024;
18954 simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
18955
18956 - ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
18957 + fdt_init(_dtb_start);
18958
18959 planetcore_set_stdout_path(table);
18960
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
18964 @@ -1,1036 +0,0 @@
18965 -/*
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.
18970 - *
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.
18975 - *
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.
18979 - *
18980 - * Copyright Pantelis Antoniou 2006
18981 - * Copyright (C) IBM Corporation 2006
18982 - *
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>
18987 - */
18988 -
18989 -#include <string.h>
18990 -#include <stddef.h>
18991 -#include "flatdevtree.h"
18992 -#include "flatdevtree_env.h"
18993 -
18994 -#define _ALIGN(x, al) (((x) + (al) - 1) & ~((al) - 1))
18995 -
18996 -static char *ft_root_node(struct ft_cxt *cxt)
18997 -{
18998 - return cxt->rgn[FT_STRUCT].start;
18999 -}
19000 -
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)
19004 -{
19005 - unsigned int i;
19006 -
19007 - if (!node)
19008 - return NULL;
19009 -
19010 - for (i = 1; i < cxt->nodes_used; i++) /* already there? */
19011 - if (cxt->node_tbl[i] == node)
19012 - return (void *)i;
19013 -
19014 - if (cxt->nodes_used < cxt->node_max) {
19015 - cxt->node_tbl[cxt->nodes_used] = node;
19016 - return (void *)cxt->nodes_used++;
19017 - }
19018 -
19019 - return NULL;
19020 -}
19021 -
19022 -static char *ft_node_ph2node(struct ft_cxt *cxt, const void *phandle)
19023 -{
19024 - unsigned int i = (unsigned int)phandle;
19025 -
19026 - if (i < cxt->nodes_used)
19027 - return cxt->node_tbl[i];
19028 - return NULL;
19029 -}
19030 -
19031 -static void ft_node_update_before(struct ft_cxt *cxt, char *addr, int shift)
19032 -{
19033 - unsigned int i;
19034 -
19035 - if (shift == 0)
19036 - return;
19037 -
19038 - for (i = 1; i < cxt->nodes_used; i++)
19039 - if (cxt->node_tbl[i] < addr)
19040 - cxt->node_tbl[i] += shift;
19041 -}
19042 -
19043 -static void ft_node_update_after(struct ft_cxt *cxt, char *addr, int shift)
19044 -{
19045 - unsigned int i;
19046 -
19047 - if (shift == 0)
19048 - return;
19049 -
19050 - for (i = 1; i < cxt->nodes_used; i++)
19051 - if (cxt->node_tbl[i] >= addr)
19052 - cxt->node_tbl[i] += shift;
19053 -}
19054 -
19055 -/* Struct used to return info from ft_next() */
19056 -struct ft_atom {
19057 - u32 tag;
19058 - const char *name;
19059 - void *data;
19060 - u32 size;
19061 -};
19062 -
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)
19065 -{
19066 - u32 sz;
19067 -
19068 - if (p >= cxt->rgn[FT_STRUCT].start + cxt->rgn[FT_STRUCT].size)
19069 - return NULL;
19070 -
19071 - ret->tag = be32_to_cpu(*(u32 *) p);
19072 - p += 4;
19073 -
19074 - switch (ret->tag) { /* Tag */
19075 - case OF_DT_BEGIN_NODE:
19076 - ret->name = p;
19077 - ret->data = (void *)(p - 4); /* start of node */
19078 - p += _ALIGN(strlen(p) + 1, 4);
19079 - break;
19080 - case OF_DT_PROP:
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);
19085 - break;
19086 - case OF_DT_END_NODE:
19087 - case OF_DT_NOP:
19088 - break;
19089 - case OF_DT_END:
19090 - default:
19091 - p = NULL;
19092 - break;
19093 - }
19094 -
19095 - return p;
19096 -}
19097 -
19098 -#define HDR_SIZE _ALIGN(sizeof(struct boot_param_header), 8)
19099 -#define EXPAND_INCR 1024 /* alloc this much extra when expanding */
19100 -
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)
19103 -{
19104 - unsigned long tot;
19105 - enum ft_rgn_id r;
19106 - char *p, *pend;
19107 - int stroff;
19108 -
19109 - tot = HDR_SIZE + EXPAND_INCR;
19110 - for (r = FT_RSVMAP; r <= FT_STRINGS; ++r)
19111 - tot += cxt->rgn[r].size;
19112 - if (nextra > 0)
19113 - tot += nextra;
19114 - tot = _ALIGN(tot, 8);
19115 -
19116 - if (!cxt->realloc)
19117 - return 0;
19118 - p = cxt->realloc(NULL, tot);
19119 - if (!p)
19120 - return 0;
19121 -
19122 - memcpy(p, cxt->bph, sizeof(struct boot_param_header));
19123 - /* offsets get fixed up later */
19124 -
19125 - cxt->bph = (struct boot_param_header *)p;
19126 - cxt->max_size = tot;
19127 - pend = p + tot;
19128 - p += HDR_SIZE;
19129 -
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;
19133 -
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;
19139 -
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;
19145 -
19146 - cxt->isordered = 1;
19147 - return 1;
19148 -}
19149 -
19150 -static inline char *prev_end(struct ft_cxt *cxt, enum ft_rgn_id r)
19151 -{
19152 - if (r > FT_RSVMAP)
19153 - return cxt->rgn[r - 1].start + cxt->rgn[r - 1].size;
19154 - return (char *)cxt->bph + HDR_SIZE;
19155 -}
19156 -
19157 -static inline char *next_start(struct ft_cxt *cxt, enum ft_rgn_id r)
19158 -{
19159 - if (r < FT_STRINGS)
19160 - return cxt->rgn[r + 1].start;
19161 - return (char *)cxt->bph + cxt->max_size;
19162 -}
19163 -
19164 -/*
19165 - * See if we can expand region rgn by nextra bytes by using up
19166 - * free space after or before the region.
19167 - */
19168 -static int ft_shuffle(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn,
19169 - int nextra)
19170 -{
19171 - char *p = *pp;
19172 - char *rgn_start, *rgn_end;
19173 -
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) {
19179 - if (nextra < 0)
19180 - memmove(p, p - nextra, rgn_end - p + nextra);
19181 - else
19182 - memmove(p + nextra, p, rgn_end - p);
19183 - if (rgn == FT_STRUCT)
19184 - ft_node_update_after(cxt, p, nextra);
19185 - }
19186 - cxt->rgn[rgn].size += nextra;
19187 - if (rgn == FT_STRINGS)
19188 - /* assumes strings only added at beginning */
19189 - cxt->str_anchor += nextra;
19190 - return 1;
19191 - }
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);
19198 - }
19199 - *pp -= nextra;
19200 - cxt->rgn[rgn].start -= nextra;
19201 - cxt->rgn[rgn].size += nextra;
19202 - return 1;
19203 - }
19204 - return 0;
19205 -}
19206 -
19207 -static int ft_make_space(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn,
19208 - int nextra)
19209 -{
19210 - unsigned long size, ssize, tot;
19211 - char *str, *next;
19212 - enum ft_rgn_id r;
19213 -
19214 - if (!cxt->isordered) {
19215 - unsigned long rgn_off = *pp - cxt->rgn[rgn].start;
19216 -
19217 - if (!ft_reorder(cxt, nextra))
19218 - return 0;
19219 -
19220 - *pp = cxt->rgn[rgn].start + rgn_off;
19221 - }
19222 - if (ft_shuffle(cxt, pp, rgn, nextra))
19223 - return 1;
19224 -
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))
19236 - return 1;
19237 - }
19238 -
19239 - /* how much total free space is there following this region? */
19240 - tot = 0;
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;
19244 - }
19245 -
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;
19250 - int shift;
19251 -
19252 - if (!cxt->realloc)
19253 - return 0;
19254 - size = _ALIGN(cxt->max_size + (nextra - tot) + EXPAND_INCR, 8);
19255 - newp = cxt->realloc(cxt->bph, size);
19256 - if (!newp)
19257 - return 0;
19258 - cxt->max_size = size;
19259 - shift = newp - (char *)cxt->bph;
19260 -
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,
19264 - shift);
19265 - for (r = FT_RSVMAP; r <= FT_STRINGS; ++r) {
19266 - new_start = cxt->rgn[r].start + shift;
19267 - cxt->rgn[r].start = new_start;
19268 - }
19269 - *pp += shift;
19270 - cxt->str_anchor += shift;
19271 - }
19272 -
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;
19278 -
19279 - if (ft_shuffle(cxt, pp, rgn, nextra))
19280 - return 1;
19281 - }
19282 -
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
19286 - + nextra;
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;
19293 -
19294 - if (ft_shuffle(cxt, pp, rgn, nextra))
19295 - return 1;
19296 - }
19297 -
19298 - return 0; /* "can't happen" */
19299 -}
19300 -
19301 -static void ft_put_word(struct ft_cxt *cxt, u32 v)
19302 -{
19303 - *(u32 *) cxt->p = cpu_to_be32(v);
19304 - cxt->p += 4;
19305 -}
19306 -
19307 -static void ft_put_bin(struct ft_cxt *cxt, const void *data, unsigned int sz)
19308 -{
19309 - unsigned long sza = _ALIGN(sz, 4);
19310 -
19311 - /* zero out the alignment gap if necessary */
19312 - if (sz < sza)
19313 - *(u32 *) (cxt->p + sza - 4) = 0;
19314 -
19315 - /* copy in the data */
19316 - memcpy(cxt->p, data, sz);
19317 -
19318 - cxt->p += sza;
19319 -}
19320 -
19321 -char *ft_begin_node(struct ft_cxt *cxt, const char *name)
19322 -{
19323 - unsigned long nlen = strlen(name) + 1;
19324 - unsigned long len = 8 + _ALIGN(nlen, 4);
19325 - char *ret;
19326 -
19327 - if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, len))
19328 - return NULL;
19329 -
19330 - ret = cxt->p;
19331 -
19332 - ft_put_word(cxt, OF_DT_BEGIN_NODE);
19333 - ft_put_bin(cxt, name, strlen(name) + 1);
19334 -
19335 - return ret;
19336 -}
19337 -
19338 -void ft_end_node(struct ft_cxt *cxt)
19339 -{
19340 - ft_put_word(cxt, OF_DT_END_NODE);
19341 -}
19342 -
19343 -void ft_nop(struct ft_cxt *cxt)
19344 -{
19345 - if (ft_make_space(cxt, &cxt->p, FT_STRUCT, 4))
19346 - ft_put_word(cxt, OF_DT_NOP);
19347 -}
19348 -
19349 -#define NO_STRING 0x7fffffff
19350 -
19351 -static int lookup_string(struct ft_cxt *cxt, const char *name)
19352 -{
19353 - char *p, *end;
19354 -
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;
19361 - }
19362 -
19363 - return NO_STRING;
19364 -}
19365 -
19366 -/* lookup string and insert if not found */
19367 -static int map_string(struct ft_cxt *cxt, const char *name)
19368 -{
19369 - int off;
19370 - char *p;
19371 -
19372 - off = lookup_string(cxt, name);
19373 - if (off != NO_STRING)
19374 - return off;
19375 - p = cxt->rgn[FT_STRINGS].start;
19376 - if (!ft_make_space(cxt, &p, FT_STRINGS, strlen(name) + 1))
19377 - return NO_STRING;
19378 - strcpy(p, name);
19379 - return p - cxt->str_anchor;
19380 -}
19381 -
19382 -int ft_prop(struct ft_cxt *cxt, const char *name, const void *data,
19383 - unsigned int sz)
19384 -{
19385 - int off, len;
19386 -
19387 - off = map_string(cxt, name);
19388 - if (off == NO_STRING)
19389 - return -1;
19390 -
19391 - len = 12 + _ALIGN(sz, 4);
19392 - if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, len))
19393 - return -1;
19394 -
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);
19399 - return 0;
19400 -}
19401 -
19402 -int ft_prop_str(struct ft_cxt *cxt, const char *name, const char *str)
19403 -{
19404 - return ft_prop(cxt, name, str, strlen(str) + 1);
19405 -}
19406 -
19407 -int ft_prop_int(struct ft_cxt *cxt, const char *name, unsigned int val)
19408 -{
19409 - u32 v = cpu_to_be32((u32) val);
19410 -
19411 - return ft_prop(cxt, name, &v, 4);
19412 -}
19413 -
19414 -/* Calculate the size of the reserved map */
19415 -static unsigned long rsvmap_size(struct ft_cxt *cxt)
19416 -{
19417 - struct ft_reserve *res;
19418 -
19419 - res = (struct ft_reserve *)cxt->rgn[FT_RSVMAP].start;
19420 - while (res->start || res->len)
19421 - ++res;
19422 - return (char *)(res + 1) - cxt->rgn[FT_RSVMAP].start;
19423 -}
19424 -
19425 -/* Calculate the size of the struct region by stepping through it */
19426 -static unsigned long struct_size(struct ft_cxt *cxt)
19427 -{
19428 - char *p = cxt->rgn[FT_STRUCT].start;
19429 - char *next;
19430 - struct ft_atom atom;
19431 -
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;
19435 -
19436 - while ((next = ft_next(cxt, p, &atom)) != NULL)
19437 - p = next;
19438 - return p + 4 - cxt->rgn[FT_STRUCT].start;
19439 -}
19440 -
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)
19443 -{
19444 - char *p = cxt->rgn[FT_STRUCT].start;
19445 - char *next;
19446 - struct ft_atom atom;
19447 - int off;
19448 -
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);
19453 - }
19454 - p = next;
19455 - }
19456 -}
19457 -
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))
19461 -{
19462 - struct boot_param_header *bph = blob;
19463 - char *p;
19464 - struct ft_reserve *pres;
19465 -
19466 - /* clear the cxt */
19467 - memset(cxt, 0, sizeof(*cxt));
19468 -
19469 - cxt->bph = bph;
19470 - cxt->max_size = max_size;
19471 - cxt->realloc = realloc_fn;
19472 - cxt->isordered = 1;
19473 -
19474 - /* zero everything in the header area */
19475 - memset(bph, 0, sizeof(*bph));
19476 -
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);
19480 -
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;
19489 -
19490 - /* init rsvmap and struct */
19491 - pres->start = 0;
19492 - pres->len = 0;
19493 - *(u32 *) p = cpu_to_be32(OF_DT_END);
19494 -
19495 - cxt->str_anchor = blob;
19496 -}
19497 -
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))
19502 -{
19503 - struct boot_param_header *bph = blob;
19504 -
19505 - /* can't cope with version < 16 */
19506 - if (be32_to_cpu(bph->version) < 16)
19507 - return -1;
19508 -
19509 - /* clear the cxt */
19510 - memset(cxt, 0, sizeof(*cxt));
19511 -
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)
19516 - return -1;
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 */
19520 -
19521 - cxt->bph = bph;
19522 - cxt->max_size = max_size;
19523 - cxt->realloc = realloc_fn;
19524 -
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);
19531 -
19532 - cxt->p = cxt->rgn[FT_STRUCT].start;
19533 - cxt->str_anchor = cxt->rgn[FT_STRINGS].start;
19534 -
19535 - return 0;
19536 -}
19537 -
19538 -/* add a reserver physical area to the rsvmap */
19539 -int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size)
19540 -{
19541 - char *p;
19542 - struct ft_reserve *pres;
19543 -
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)))
19547 - return -1;
19548 -
19549 - pres = (struct ft_reserve *)p;
19550 - pres->start = cpu_to_be64(physaddr);
19551 - pres->len = cpu_to_be64(size);
19552 -
19553 - return 0;
19554 -}
19555 -
19556 -void ft_begin_tree(struct ft_cxt *cxt)
19557 -{
19558 - cxt->p = ft_root_node(cxt);
19559 -}
19560 -
19561 -void ft_end_tree(struct ft_cxt *cxt)
19562 -{
19563 - struct boot_param_header *bph = cxt->bph;
19564 - char *p, *oldstr, *str, *endp;
19565 - unsigned long ssize;
19566 - int adj;
19567 -
19568 - if (!cxt->isordered)
19569 - return; /* we haven't touched anything */
19570 -
19571 - /* adjust string offsets */
19572 - oldstr = cxt->rgn[FT_STRINGS].start;
19573 - adj = cxt->str_anchor - oldstr;
19574 - if (adj)
19575 - adjust_string_offsets(cxt, adj);
19576 -
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;
19582 -
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;
19587 -
19588 - /* fill in header fields */
19589 - p = (char *)bph;
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);
19595 -}
19596 -
19597 -void *ft_find_device(struct ft_cxt *cxt, const void *top, const char *srch_path)
19598 -{
19599 - char *node;
19600 -
19601 - if (top) {
19602 - node = ft_node_ph2node(cxt, top);
19603 - if (node == NULL)
19604 - return NULL;
19605 - } else {
19606 - node = ft_root_node(cxt);
19607 - }
19608 -
19609 - node = ft_find_descendent(cxt, node, srch_path);
19610 - return ft_get_phandle(cxt, node);
19611 -}
19612 -
19613 -void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path)
19614 -{
19615 - struct ft_atom atom;
19616 - char *p;
19617 - const char *cp, *q;
19618 - int cl;
19619 - int depth = -1;
19620 - int dmatch = 0;
19621 - const char *path_comp[FT_MAX_DEPTH];
19622 -
19623 - cp = srch_path;
19624 - cl = 0;
19625 - p = top;
19626 -
19627 - while ((p = ft_next(cxt, p, &atom)) != NULL) {
19628 - switch (atom.tag) {
19629 - case OF_DT_BEGIN_NODE:
19630 - ++depth;
19631 - if (depth != dmatch)
19632 - break;
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] == '@')))
19639 - break;
19640 - path_comp[dmatch] = cp;
19641 - /* it matches so far, advance to next path component */
19642 - cp += cl;
19643 - /* skip slashes */
19644 - while (*cp == '/')
19645 - ++cp;
19646 - /* we're done if this is the end of the string */
19647 - if (*cp == 0)
19648 - return atom.data;
19649 - /* look for end of this component */
19650 - q = strchr(cp, '/');
19651 - if (q)
19652 - cl = q - cp;
19653 - else
19654 - cl = strlen(cp);
19655 - ++dmatch;
19656 - break;
19657 - case OF_DT_END_NODE:
19658 - if (depth == 0)
19659 - return NULL;
19660 - if (dmatch > depth) {
19661 - --dmatch;
19662 - cl = cp - path_comp[dmatch] - 1;
19663 - cp = path_comp[dmatch];
19664 - while (cl > 0 && cp[cl - 1] == '/')
19665 - --cl;
19666 - }
19667 - --depth;
19668 - break;
19669 - }
19670 - }
19671 - return NULL;
19672 -}
19673 -
19674 -void *__ft_get_parent(struct ft_cxt *cxt, void *node)
19675 -{
19676 - int d;
19677 - struct ft_atom atom;
19678 - char *p;
19679 -
19680 - for (d = 0; cxt->genealogy[d] != NULL; ++d)
19681 - if (cxt->genealogy[d] == node)
19682 - return d > 0 ? cxt->genealogy[d - 1] : NULL;
19683 -
19684 - /* have to do it the hard way... */
19685 - p = ft_root_node(cxt);
19686 - d = 0;
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) {
19692 - /* found it */
19693 - cxt->genealogy[d + 1] = NULL;
19694 - return d > 0 ? cxt->genealogy[d - 1] : NULL;
19695 - }
19696 - ++d;
19697 - break;
19698 - case OF_DT_END_NODE:
19699 - --d;
19700 - break;
19701 - }
19702 - }
19703 - return NULL;
19704 -}
19705 -
19706 -void *ft_get_parent(struct ft_cxt *cxt, const void *phandle)
19707 -{
19708 - void *node = ft_node_ph2node(cxt, phandle);
19709 - if (node == NULL)
19710 - return NULL;
19711 -
19712 - node = __ft_get_parent(cxt, node);
19713 - return ft_get_phandle(cxt, node);
19714 -}
19715 -
19716 -static const void *__ft_get_prop(struct ft_cxt *cxt, void *node,
19717 - const char *propname, unsigned int *len)
19718 -{
19719 - struct ft_atom atom;
19720 - int depth = 0;
19721 -
19722 - while ((node = ft_next(cxt, node, &atom)) != NULL) {
19723 - switch (atom.tag) {
19724 - case OF_DT_BEGIN_NODE:
19725 - ++depth;
19726 - break;
19727 -
19728 - case OF_DT_PROP:
19729 - if (depth != 1 || strcmp(atom.name, propname))
19730 - break;
19731 -
19732 - if (len)
19733 - *len = atom.size;
19734 -
19735 - return atom.data;
19736 -
19737 - case OF_DT_END_NODE:
19738 - if (--depth <= 0)
19739 - return NULL;
19740 - }
19741 - }
19742 -
19743 - return NULL;
19744 -}
19745 -
19746 -int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
19747 - void *buf, const unsigned int buflen)
19748 -{
19749 - const void *data;
19750 - unsigned int size;
19751 -
19752 - void *node = ft_node_ph2node(cxt, phandle);
19753 - if (!node)
19754 - return -1;
19755 -
19756 - data = __ft_get_prop(cxt, node, propname, &size);
19757 - if (data) {
19758 - unsigned int clipped_size = min(size, buflen);
19759 - memcpy(buf, data, clipped_size);
19760 - return size;
19761 - }
19762 -
19763 - return -1;
19764 -}
19765 -
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)
19769 -{
19770 - struct ft_atom atom;
19771 - char *p = ft_root_node(cxt);
19772 - char *next;
19773 - int past_prev = prev ? 0 : 1;
19774 - int depth = -1;
19775 -
19776 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19777 - const void *data;
19778 - unsigned int size;
19779 -
19780 - switch (atom.tag) {
19781 - case OF_DT_BEGIN_NODE:
19782 - depth++;
19783 -
19784 - if (prev == p) {
19785 - past_prev = 1;
19786 - break;
19787 - }
19788 -
19789 - if (!past_prev || depth < 1)
19790 - break;
19791 -
19792 - data = __ft_get_prop(cxt, p, propname, &size);
19793 - if (!data || size != proplen)
19794 - break;
19795 - if (memcmp(data, propval, size))
19796 - break;
19797 -
19798 - return p;
19799 -
19800 - case OF_DT_END_NODE:
19801 - if (depth-- == 0)
19802 - return NULL;
19803 -
19804 - break;
19805 - }
19806 -
19807 - p = next;
19808 - }
19809 -
19810 - return NULL;
19811 -}
19812 -
19813 -void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev,
19814 - const char *propname, const char *propval,
19815 - int proplen)
19816 -{
19817 - void *node = NULL;
19818 -
19819 - if (prev) {
19820 - node = ft_node_ph2node(cxt, prev);
19821 -
19822 - if (!node)
19823 - return NULL;
19824 - }
19825 -
19826 - node = __ft_find_node_by_prop_value(cxt, node, propname,
19827 - propval, proplen);
19828 - return ft_get_phandle(cxt, node);
19829 -}
19830 -
19831 -int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
19832 - const void *buf, const unsigned int buflen)
19833 -{
19834 - struct ft_atom atom;
19835 - void *node;
19836 - char *p, *next;
19837 - int nextra;
19838 -
19839 - node = ft_node_ph2node(cxt, phandle);
19840 - if (node == NULL)
19841 - return -1;
19842 -
19843 - next = ft_next(cxt, node, &atom);
19844 - if (atom.tag != OF_DT_BEGIN_NODE)
19845 - /* phandle didn't point to a node */
19846 - return -1;
19847 - p = next;
19848 -
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 */
19854 - cxt->p = p;
19855 - return ft_prop(cxt, propname, buf, buflen);
19856 - case OF_DT_PROP:
19857 - if (strcmp(atom.name, propname))
19858 - break;
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,
19863 - nextra))
19864 - return -1;
19865 - *(u32 *) (cxt->p - 8) = cpu_to_be32(buflen);
19866 - ft_put_bin(cxt, buf, buflen);
19867 - return 0;
19868 - }
19869 - p = next;
19870 - }
19871 - return -1;
19872 -}
19873 -
19874 -int ft_del_prop(struct ft_cxt *cxt, const void *phandle, const char *propname)
19875 -{
19876 - struct ft_atom atom;
19877 - void *node;
19878 - char *p, *next;
19879 - int size;
19880 -
19881 - node = ft_node_ph2node(cxt, phandle);
19882 - if (node == NULL)
19883 - return -1;
19884 -
19885 - p = node;
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:
19890 - return -1;
19891 - case OF_DT_PROP:
19892 - if (strcmp(atom.name, propname))
19893 - break;
19894 - /* found the property, remove it */
19895 - size = 12 + -_ALIGN(atom.size, 4);
19896 - cxt->p = p;
19897 - if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, -size))
19898 - return -1;
19899 - return 0;
19900 - }
19901 - p = next;
19902 - }
19903 - return -1;
19904 -}
19905 -
19906 -void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name)
19907 -{
19908 - struct ft_atom atom;
19909 - char *p, *next, *ret;
19910 - int depth = 0;
19911 -
19912 - if (parent) {
19913 - p = ft_node_ph2node(cxt, parent);
19914 - if (!p)
19915 - return NULL;
19916 - } else {
19917 - p = ft_root_node(cxt);
19918 - }
19919 -
19920 - while ((next = ft_next(cxt, p, &atom)) != NULL) {
19921 - switch (atom.tag) {
19922 - case OF_DT_BEGIN_NODE:
19923 - ++depth;
19924 - if (depth == 1 && strcmp(atom.name, name) == 0)
19925 - /* duplicate node name, return error */
19926 - return NULL;
19927 - break;
19928 - case OF_DT_END_NODE:
19929 - --depth;
19930 - if (depth > 0)
19931 - break;
19932 - /* end of node, insert here */
19933 - cxt->p = p;
19934 - ret = ft_begin_node(cxt, name);
19935 - ft_end_node(cxt);
19936 - return ft_get_phandle(cxt, ret);
19937 - }
19938 - p = next;
19939 - }
19940 - return NULL;
19941 -}
19942 -
19943 -/* Returns the start of the path within the provided buffer, or NULL on
19944 - * error.
19945 - */
19946 -char *ft_get_path(struct ft_cxt *cxt, const void *phandle,
19947 - char *buf, int len)
19948 -{
19949 - const char *path_comp[FT_MAX_DEPTH];
19950 - struct ft_atom atom;
19951 - char *p, *next, *pos;
19952 - int depth = 0, i;
19953 - void *node;
19954 -
19955 - node = ft_node_ph2node(cxt, phandle);
19956 - if (node == NULL)
19957 - return NULL;
19958 -
19959 - p = ft_root_node(cxt);
19960 -
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;
19965 - if (p == node)
19966 - goto found;
19967 -
19968 - break;
19969 -
19970 - case OF_DT_END_NODE:
19971 - if (--depth == 0)
19972 - return NULL;
19973 - }
19974 -
19975 - p = next;
19976 - }
19977 -
19978 -found:
19979 - pos = buf;
19980 - for (i = 1; i < depth; i++) {
19981 - int this_len;
19982 -
19983 - if (len <= 1)
19984 - return NULL;
19985 -
19986 - *pos++ = '/';
19987 - len--;
19988 -
19989 - strncpy(pos, path_comp[i], len);
19990 -
19991 - if (pos[len - 1] != 0)
19992 - return NULL;
19993 -
19994 - this_len = strlen(pos);
19995 - len -= this_len;
19996 - pos += this_len;
19997 - }
19998 -
19999 - return buf;
20000 -}
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
20004 @@ -1,113 +0,0 @@
20005 -/*
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.
20010 - *
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.
20015 - *
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.
20019 - */
20020 -
20021 -#ifndef FLATDEVTREE_H
20022 -#define FLATDEVTREE_H
20023 -
20024 -#include "flatdevtree_env.h"
20025 -
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
20033 -
20034 -#define OF_DT_VERSION 0x10
20035 -
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 */
20048 -};
20049 -
20050 -struct ft_reserve {
20051 - u64 start;
20052 - u64 len;
20053 -};
20054 -
20055 -struct ft_region {
20056 - char *start;
20057 - unsigned long size;
20058 -};
20059 -
20060 -enum ft_rgn_id {
20061 - FT_RSVMAP,
20062 - FT_STRUCT,
20063 - FT_STRINGS,
20064 - FT_N_REGION
20065 -};
20066 -
20067 -#define FT_MAX_DEPTH 50
20068 -
20069 -struct ft_cxt {
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];
20078 - char **node_tbl;
20079 - unsigned int node_max;
20080 - unsigned int nodes_used;
20081 -};
20082 -
20083 -char *ft_begin_node(struct ft_cxt *cxt, const char *name);
20084 -void ft_end_node(struct ft_cxt *cxt);
20085 -
20086 -void ft_begin_tree(struct ft_cxt *cxt);
20087 -void ft_end_tree(struct ft_cxt *cxt);
20088 -
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);
20100 -
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,
20113 - int proplen);
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);
20116 -
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
20121 @@ -1,79 +0,0 @@
20122 -/*
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].
20126 - *
20127 - * Author: Mark A. Greer <mgreer@mvista.com>
20128 - *
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
20132 - * or implied.
20133 - */
20134 -#include <stddef.h>
20135 -#include "flatdevtree.h"
20136 -#include "ops.h"
20137 -
20138 -static struct ft_cxt cxt;
20139 -
20140 -static void *fdtm_finddevice(const char *name)
20141 -{
20142 - return ft_find_device(&cxt, NULL, name);
20143 -}
20144 -
20145 -static int fdtm_getprop(const void *phandle, const char *propname,
20146 - void *buf, const int buflen)
20147 -{
20148 - return ft_get_prop(&cxt, phandle, propname, buf, buflen);
20149 -}
20150 -
20151 -static int fdtm_setprop(const void *phandle, const char *propname,
20152 - const void *buf, const int buflen)
20153 -{
20154 - return ft_set_prop(&cxt, phandle, propname, buf, buflen);
20155 -}
20156 -
20157 -static void *fdtm_get_parent(const void *phandle)
20158 -{
20159 - return ft_get_parent(&cxt, phandle);
20160 -}
20161 -
20162 -static void *fdtm_create_node(const void *phandle, const char *name)
20163 -{
20164 - return ft_create_node(&cxt, phandle, name);
20165 -}
20166 -
20167 -static void *fdtm_find_node_by_prop_value(const void *prev,
20168 - const char *propname,
20169 - const char *propval,
20170 - int proplen)
20171 -{
20172 - return ft_find_node_by_prop_value(&cxt, prev, propname,
20173 - propval, proplen);
20174 -}
20175 -
20176 -static unsigned long fdtm_finalize(void)
20177 -{
20178 - ft_end_tree(&cxt);
20179 - return (unsigned long)cxt.bph;
20180 -}
20181 -
20182 -static char *fdtm_get_path(const void *phandle, char *buf, int len)
20183 -{
20184 - return ft_get_path(&cxt, phandle, buf, len);
20185 -}
20186 -
20187 -int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device)
20188 -{
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;
20197 -
20198 - return ft_open(&cxt, dt_blob, max_size, max_find_device,
20199 - platform_ops.realloc);
20200 -}
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
20204 @@ -28,6 +28,6 @@
20205 u32 heapsize = 0x8000000 - (u32)_end; /* 128M */
20206
20207 simple_alloc_init(_end, heapsize, 32, 64);
20208 - ft_init(_dtb_start, 0, 4);
20209 + fdt_init(_dtb_start);
20210 serial_console_init();
20211 }
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
20215 @@ -0,0 +1,14 @@
20216 +# Makefile.libfdt
20217 +#
20218 +# This is not a complete Makefile of itself. Instead, it is designed to
20219 +# be easily embeddable into other systems of Makefiles.
20220 +#
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
20225 +
20226 +LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)
20227 +
20228 +$(LIBFDT_objdir)/$(LIBFDT_LIB): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))
20229 +
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
20233 @@ -0,0 +1,156 @@
20234 +/*
20235 + * libfdt - Flat Device Tree manipulation
20236 + * Copyright (C) 2006 David Gibson, IBM Corporation.
20237 + *
20238 + * libfdt is dual licensed: you can use it either under the terms of
20239 + * the GPL, or the BSD license, at your option.
20240 + *
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.
20245 + *
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.
20250 + *
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
20255 + *
20256 + * Alternatively,
20257 + *
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:
20261 + *
20262 + * 1. Redistributions of source code must retain the above
20263 + * copyright notice, this list of conditions and the following
20264 + * disclaimer.
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.
20269 + *
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.
20283 + */
20284 +#include "libfdt_env.h"
20285 +
20286 +#include <fdt.h>
20287 +#include <libfdt.h>
20288 +
20289 +#include "libfdt_internal.h"
20290 +
20291 +int fdt_check_header(const void *fdt)
20292 +{
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;
20303 + } else {
20304 + return -FDT_ERR_BADMAGIC;
20305 + }
20306 +
20307 + return 0;
20308 +}
20309 +
20310 +const void *fdt_offset_ptr(const void *fdt, int offset, int len)
20311 +{
20312 + const void *p;
20313 +
20314 + if (fdt_version(fdt) >= 0x11)
20315 + if (((offset + len) < offset)
20316 + || ((offset + len) > fdt_size_dt_struct(fdt)))
20317 + return NULL;
20318 +
20319 + p = _fdt_offset_ptr(fdt, offset);
20320 +
20321 + if (p + len < p)
20322 + return NULL;
20323 + return p;
20324 +}
20325 +
20326 +uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset)
20327 +{
20328 + const uint32_t *tagp, *lenp;
20329 + uint32_t tag;
20330 + const char *p;
20331 +
20332 + if (offset % FDT_TAGSIZE)
20333 + return -1;
20334 +
20335 + tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
20336 + if (! tagp)
20337 + return FDT_END; /* premature end */
20338 + tag = fdt32_to_cpu(*tagp);
20339 + offset += FDT_TAGSIZE;
20340 +
20341 + switch (tag) {
20342 + case FDT_BEGIN_NODE:
20343 + /* skip name */
20344 + do {
20345 + p = fdt_offset_ptr(fdt, offset++, 1);
20346 + } while (p && (*p != '\0'));
20347 + if (! p)
20348 + return FDT_END;
20349 + break;
20350 + case FDT_PROP:
20351 + lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
20352 + if (! lenp)
20353 + return FDT_END;
20354 + /* skip name offset, length and value */
20355 + offset += 2*FDT_TAGSIZE + fdt32_to_cpu(*lenp);
20356 + break;
20357 + }
20358 +
20359 + if (nextoffset)
20360 + *nextoffset = ALIGN(offset, FDT_TAGSIZE);
20361 +
20362 + return tag;
20363 +}
20364 +
20365 +const char *_fdt_find_string(const char *strtab, int tabsize, const char *s)
20366 +{
20367 + int len = strlen(s) + 1;
20368 + const char *last = strtab + tabsize - len;
20369 + const char *p;
20370 +
20371 + for (p = strtab; p <= last; p++)
20372 + if (memeq(p, s, len))
20373 + return p;
20374 + return NULL;
20375 +}
20376 +
20377 +int fdt_move(const void *fdt, void *buf, int bufsize)
20378 +{
20379 + int err = fdt_check_header(fdt);
20380 +
20381 + if (err)
20382 + return err;
20383 +
20384 + if (fdt_totalsize(fdt) > bufsize)
20385 + return -FDT_ERR_NOSPACE;
20386 +
20387 + memmove(buf, fdt, fdt_totalsize(fdt));
20388 + return 0;
20389 +}
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
20393 @@ -0,0 +1,60 @@
20394 +#ifndef _FDT_H
20395 +#define _FDT_H
20396 +
20397 +#ifndef __ASSEMBLY__
20398 +
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 */
20407 +
20408 + /* version 2 fields below */
20409 + uint32_t boot_cpuid_phys; /* Which physical CPU id we're
20410 + booting on */
20411 + /* version 3 fields below */
20412 + uint32_t size_dt_strings; /* size of the strings block */
20413 +
20414 + /* version 17 fields below */
20415 + uint32_t size_dt_struct; /* size of the structure block */
20416 +};
20417 +
20418 +struct fdt_reserve_entry {
20419 + uint64_t address;
20420 + uint64_t size;
20421 +};
20422 +
20423 +struct fdt_node_header {
20424 + uint32_t tag;
20425 + char name[0];
20426 +};
20427 +
20428 +struct fdt_property {
20429 + uint32_t tag;
20430 + uint32_t len;
20431 + uint32_t nameoff;
20432 + char data[0];
20433 +};
20434 +
20435 +#endif /* !__ASSEMBLY */
20436 +
20437 +#define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
20438 +#define FDT_TAGSIZE sizeof(uint32_t)
20439 +
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,
20443 + size, content */
20444 +#define FDT_NOP 0x4 /* nop */
20445 +#define FDT_END 0x9
20446 +
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))
20452 +
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
20457 @@ -0,0 +1,583 @@
20458 +/*
20459 + * libfdt - Flat Device Tree manipulation
20460 + * Copyright (C) 2006 David Gibson, IBM Corporation.
20461 + *
20462 + * libfdt is dual licensed: you can use it either under the terms of
20463 + * the GPL, or the BSD license, at your option.
20464 + *
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.
20469 + *
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.
20474 + *
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
20479 + *
20480 + * Alternatively,
20481 + *
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:
20485 + *
20486 + * 1. Redistributions of source code must retain the above
20487 + * copyright notice, this list of conditions and the following
20488 + * disclaimer.
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.
20493 + *
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.
20507 + */
20508 +#include "libfdt_env.h"
20509 +
20510 +#include <fdt.h>
20511 +#include <libfdt.h>
20512 +
20513 +#include "libfdt_internal.h"
20514 +
20515 +#define CHECK_HEADER(fdt) \
20516 + { \
20517 + int err; \
20518 + if ((err = fdt_check_header(fdt)) != 0) \
20519 + return err; \
20520 + }
20521 +
20522 +static int nodename_eq(const void *fdt, int offset,
20523 + const char *s, int len)
20524 +{
20525 + const char *p = fdt_offset_ptr(fdt, offset, len+1);
20526 +
20527 + if (! p)
20528 + /* short match */
20529 + return 0;
20530 +
20531 + if (memcmp(p, s, len) != 0)
20532 + return 0;
20533 +
20534 + if (p[len] == '\0')
20535 + return 1;
20536 + else if (!memchr(s, '@', len) && (p[len] == '@'))
20537 + return 1;
20538 + else
20539 + return 0;
20540 +}
20541 +
20542 +const char *fdt_string(const void *fdt, int stroffset)
20543 +{
20544 + return (char *)fdt + fdt_off_dt_strings(fdt) + stroffset;
20545 +}
20546 +
20547 +int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size)
20548 +{
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);
20552 + return 0;
20553 +}
20554 +
20555 +int fdt_num_mem_rsv(const void *fdt)
20556 +{
20557 + int i = 0;
20558 +
20559 + while (fdt64_to_cpu(_fdt_mem_rsv(fdt, i)->size) != 0)
20560 + i++;
20561 + return i;
20562 +}
20563 +
20564 +int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
20565 + const char *name, int namelen)
20566 +{
20567 + int level = 0;
20568 + uint32_t tag;
20569 + int offset, nextoffset;
20570 +
20571 + CHECK_HEADER(fdt);
20572 +
20573 + tag = fdt_next_tag(fdt, parentoffset, &nextoffset);
20574 + if (tag != FDT_BEGIN_NODE)
20575 + return -FDT_ERR_BADOFFSET;
20576 +
20577 + do {
20578 + offset = nextoffset;
20579 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20580 +
20581 + switch (tag) {
20582 + case FDT_END:
20583 + return -FDT_ERR_TRUNCATED;
20584 +
20585 + case FDT_BEGIN_NODE:
20586 + level++;
20587 + if (level != 1)
20588 + continue;
20589 + if (nodename_eq(fdt, offset+FDT_TAGSIZE, name, namelen))
20590 + /* Found it! */
20591 + return offset;
20592 + break;
20593 +
20594 + case FDT_END_NODE:
20595 + level--;
20596 + break;
20597 +
20598 + case FDT_PROP:
20599 + case FDT_NOP:
20600 + break;
20601 +
20602 + default:
20603 + return -FDT_ERR_BADSTRUCTURE;
20604 + }
20605 + } while (level >= 0);
20606 +
20607 + return -FDT_ERR_NOTFOUND;
20608 +}
20609 +
20610 +int fdt_subnode_offset(const void *fdt, int parentoffset,
20611 + const char *name)
20612 +{
20613 + return fdt_subnode_offset_namelen(fdt, parentoffset, name, strlen(name));
20614 +}
20615 +
20616 +int fdt_path_offset(const void *fdt, const char *path)
20617 +{
20618 + const char *end = path + strlen(path);
20619 + const char *p = path;
20620 + int offset = 0;
20621 +
20622 + CHECK_HEADER(fdt);
20623 +
20624 + if (*path != '/')
20625 + return -FDT_ERR_BADPATH;
20626 +
20627 + while (*p) {
20628 + const char *q;
20629 +
20630 + while (*p == '/')
20631 + p++;
20632 + if (! *p)
20633 + return offset;
20634 + q = strchr(p, '/');
20635 + if (! q)
20636 + q = end;
20637 +
20638 + offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p);
20639 + if (offset < 0)
20640 + return offset;
20641 +
20642 + p = q;
20643 + }
20644 +
20645 + return offset;
20646 +}
20647 +
20648 +const char *fdt_get_name(const void *fdt, int nodeoffset, int *len)
20649 +{
20650 + const struct fdt_node_header *nh;
20651 + int err;
20652 +
20653 + if ((err = fdt_check_header(fdt)) != 0)
20654 + goto fail;
20655 +
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))
20659 + goto fail;
20660 +
20661 + if (len)
20662 + *len = strlen(nh->name);
20663 +
20664 + return nh->name;
20665 +
20666 + fail:
20667 + if (len)
20668 + *len = err;
20669 + return NULL;
20670 +}
20671 +
20672 +const struct fdt_property *fdt_get_property(const void *fdt,
20673 + int nodeoffset,
20674 + const char *name, int *lenp)
20675 +{
20676 + uint32_t tag;
20677 + const struct fdt_property *prop;
20678 + int namestroff;
20679 + int offset, nextoffset;
20680 + int err;
20681 +
20682 + if ((err = fdt_check_header(fdt)) != 0)
20683 + goto fail;
20684 +
20685 + err = -FDT_ERR_BADOFFSET;
20686 + if (nodeoffset % FDT_TAGSIZE)
20687 + goto fail;
20688 +
20689 + tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
20690 + if (tag != FDT_BEGIN_NODE)
20691 + goto fail;
20692 +
20693 + do {
20694 + offset = nextoffset;
20695 +
20696 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20697 + switch (tag) {
20698 + case FDT_END:
20699 + err = -FDT_ERR_TRUNCATED;
20700 + goto fail;
20701 +
20702 + case FDT_BEGIN_NODE:
20703 + case FDT_END_NODE:
20704 + case FDT_NOP:
20705 + break;
20706 +
20707 + case FDT_PROP:
20708 + err = -FDT_ERR_BADSTRUCTURE;
20709 + prop = fdt_offset_ptr(fdt, offset, sizeof(*prop));
20710 + if (! prop)
20711 + goto fail;
20712 + namestroff = fdt32_to_cpu(prop->nameoff);
20713 + if (streq(fdt_string(fdt, namestroff), name)) {
20714 + /* Found it! */
20715 + int len = fdt32_to_cpu(prop->len);
20716 + prop = fdt_offset_ptr(fdt, offset,
20717 + sizeof(*prop)+len);
20718 + if (! prop)
20719 + goto fail;
20720 +
20721 + if (lenp)
20722 + *lenp = len;
20723 +
20724 + return prop;
20725 + }
20726 + break;
20727 +
20728 + default:
20729 + err = -FDT_ERR_BADSTRUCTURE;
20730 + goto fail;
20731 + }
20732 + } while ((tag != FDT_BEGIN_NODE) && (tag != FDT_END_NODE));
20733 +
20734 + err = -FDT_ERR_NOTFOUND;
20735 + fail:
20736 + if (lenp)
20737 + *lenp = err;
20738 + return NULL;
20739 +}
20740 +
20741 +const void *fdt_getprop(const void *fdt, int nodeoffset,
20742 + const char *name, int *lenp)
20743 +{
20744 + const struct fdt_property *prop;
20745 +
20746 + prop = fdt_get_property(fdt, nodeoffset, name, lenp);
20747 + if (! prop)
20748 + return NULL;
20749 +
20750 + return prop->data;
20751 +}
20752 +
20753 +uint32_t fdt_get_phandle(const void *fdt, int nodeoffset)
20754 +{
20755 + const uint32_t *php;
20756 + int len;
20757 +
20758 + php = fdt_getprop(fdt, nodeoffset, "linux,phandle", &len);
20759 + if (!php || (len != sizeof(*php)))
20760 + return 0;
20761 +
20762 + return fdt32_to_cpu(*php);
20763 +}
20764 +
20765 +int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen)
20766 +{
20767 + uint32_t tag;
20768 + int p = 0, overflow = 0;
20769 + int offset, nextoffset, namelen;
20770 + const char *name;
20771 +
20772 + CHECK_HEADER(fdt);
20773 +
20774 + tag = fdt_next_tag(fdt, 0, &nextoffset);
20775 + if (tag != FDT_BEGIN_NODE)
20776 + return -FDT_ERR_BADSTRUCTURE;
20777 +
20778 + if (buflen < 2)
20779 + return -FDT_ERR_NOSPACE;
20780 + buf[0] = '/';
20781 + p = 1;
20782 +
20783 + while (nextoffset <= nodeoffset) {
20784 + offset = nextoffset;
20785 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20786 + switch (tag) {
20787 + case FDT_END:
20788 + return -FDT_ERR_BADOFFSET;
20789 +
20790 + case FDT_BEGIN_NODE:
20791 + name = fdt_get_name(fdt, offset, &namelen);
20792 + if (!name)
20793 + return namelen;
20794 + if (overflow || ((p + namelen + 1) > buflen)) {
20795 + overflow++;
20796 + break;
20797 + }
20798 + memcpy(buf + p, name, namelen);
20799 + p += namelen;
20800 + buf[p++] = '/';
20801 + break;
20802 +
20803 + case FDT_END_NODE:
20804 + if (overflow) {
20805 + overflow--;
20806 + break;
20807 + }
20808 + do {
20809 + p--;
20810 + } while (buf[p-1] != '/');
20811 + break;
20812 +
20813 + case FDT_PROP:
20814 + case FDT_NOP:
20815 + break;
20816 +
20817 + default:
20818 + return -FDT_ERR_BADSTRUCTURE;
20819 + }
20820 + }
20821 +
20822 + if (overflow)
20823 + return -FDT_ERR_NOSPACE;
20824 +
20825 + if (p > 1) /* special case so that root path is "/", not "" */
20826 + p--;
20827 + buf[p] = '\0';
20828 + return p;
20829 +}
20830 +
20831 +int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
20832 + int supernodedepth, int *nodedepth)
20833 +{
20834 + int level = -1;
20835 + uint32_t tag;
20836 + int offset, nextoffset = 0;
20837 + int supernodeoffset = -FDT_ERR_INTERNAL;
20838 +
20839 + CHECK_HEADER(fdt);
20840 +
20841 + if (supernodedepth < 0)
20842 + return -FDT_ERR_NOTFOUND;
20843 +
20844 + do {
20845 + offset = nextoffset;
20846 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20847 + switch (tag) {
20848 + case FDT_END:
20849 + return -FDT_ERR_BADOFFSET;
20850 +
20851 + case FDT_BEGIN_NODE:
20852 + level++;
20853 + if (level == supernodedepth)
20854 + supernodeoffset = offset;
20855 + break;
20856 +
20857 + case FDT_END_NODE:
20858 + level--;
20859 + break;
20860 +
20861 + case FDT_PROP:
20862 + case FDT_NOP:
20863 + break;
20864 +
20865 + default:
20866 + return -FDT_ERR_BADSTRUCTURE;
20867 + }
20868 + } while (offset < nodeoffset);
20869 +
20870 + if (nodedepth)
20871 + *nodedepth = level;
20872 +
20873 + if (supernodedepth > level)
20874 + return -FDT_ERR_NOTFOUND;
20875 + return supernodeoffset;
20876 +}
20877 +
20878 +int fdt_node_depth(const void *fdt, int nodeoffset)
20879 +{
20880 + int nodedepth;
20881 + int err;
20882 +
20883 + err = fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, &nodedepth);
20884 + if (err)
20885 + return (err < 0) ? err : -FDT_ERR_INTERNAL;
20886 + return nodedepth;
20887 +}
20888 +
20889 +int fdt_parent_offset(const void *fdt, int nodeoffset)
20890 +{
20891 + int nodedepth = fdt_node_depth(fdt, nodeoffset);
20892 +
20893 + if (nodedepth < 0)
20894 + return nodedepth;
20895 + return fdt_supernode_atdepth_offset(fdt, nodeoffset,
20896 + nodedepth - 1, NULL);
20897 +}
20898 +
20899 +int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
20900 + const char *propname,
20901 + const void *propval, int proplen)
20902 +{
20903 + uint32_t tag;
20904 + int offset, nextoffset;
20905 + const void *val;
20906 + int len;
20907 +
20908 + CHECK_HEADER(fdt);
20909 +
20910 + if (startoffset >= 0) {
20911 + tag = fdt_next_tag(fdt, startoffset, &nextoffset);
20912 + if (tag != FDT_BEGIN_NODE)
20913 + return -FDT_ERR_BADOFFSET;
20914 + } else {
20915 + nextoffset = 0;
20916 + }
20917 +
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. */
20923 + do {
20924 + offset = nextoffset;
20925 + tag = fdt_next_tag(fdt, offset, &nextoffset);
20926 +
20927 + switch (tag) {
20928 + case FDT_BEGIN_NODE:
20929 + val = fdt_getprop(fdt, offset, propname, &len);
20930 + if (val
20931 + && (len == proplen)
20932 + && (memcmp(val, propval, len) == 0))
20933 + return offset;
20934 + break;
20935 +
20936 + case FDT_PROP:
20937 + case FDT_END:
20938 + case FDT_END_NODE:
20939 + case FDT_NOP:
20940 + break;
20941 +
20942 + default:
20943 + return -FDT_ERR_BADSTRUCTURE;
20944 + }
20945 + } while (tag != FDT_END);
20946 +
20947 + return -FDT_ERR_NOTFOUND;
20948 +}
20949 +
20950 +int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle)
20951 +{
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));
20957 +}
20958 +
20959 +int _stringlist_contains(const void *strlist, int listlen, const char *str)
20960 +{
20961 + int len = strlen(str);
20962 + const void *p;
20963 +
20964 + while (listlen >= len) {
20965 + if (memcmp(str, strlist, len+1) == 0)
20966 + return 1;
20967 + p = memchr(strlist, '\0', listlen);
20968 + if (!p)
20969 + return 0; /* malformed strlist.. */
20970 + listlen -= (p-strlist) + 1;
20971 + strlist = p + 1;
20972 + }
20973 + return 0;
20974 +}
20975 +
20976 +int fdt_node_check_compatible(const void *fdt, int nodeoffset,
20977 + const char *compatible)
20978 +{
20979 + const void *prop;
20980 + int len;
20981 +
20982 + prop = fdt_getprop(fdt, nodeoffset, "compatible", &len);
20983 + if (!prop)
20984 + return len;
20985 + if (_stringlist_contains(prop, len, compatible))
20986 + return 0;
20987 + else
20988 + return 1;
20989 +}
20990 +
20991 +int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
20992 + const char *compatible)
20993 +{
20994 + uint32_t tag;
20995 + int offset, nextoffset;
20996 + int err;
20997 +
20998 + CHECK_HEADER(fdt);
20999 +
21000 + if (startoffset >= 0) {
21001 + tag = fdt_next_tag(fdt, startoffset, &nextoffset);
21002 + if (tag != FDT_BEGIN_NODE)
21003 + return -FDT_ERR_BADOFFSET;
21004 + } else {
21005 + nextoffset = 0;
21006 + }
21007 +
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. */
21013 + do {
21014 + offset = nextoffset;
21015 + tag = fdt_next_tag(fdt, offset, &nextoffset);
21016 +
21017 + switch (tag) {
21018 + case FDT_BEGIN_NODE:
21019 + err = fdt_node_check_compatible(fdt, offset,
21020 + compatible);
21021 + if ((err < 0)
21022 + && (err != -FDT_ERR_NOTFOUND))
21023 + return err;
21024 + else if (err == 0)
21025 + return offset;
21026 + break;
21027 +
21028 + case FDT_PROP:
21029 + case FDT_END:
21030 + case FDT_END_NODE:
21031 + case FDT_NOP:
21032 + break;
21033 +
21034 + default:
21035 + return -FDT_ERR_BADSTRUCTURE;
21036 + }
21037 + } while (tag != FDT_END);
21038 +
21039 + return -FDT_ERR_NOTFOUND;
21040 +}
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
21044 @@ -0,0 +1,447 @@
21045 +/*
21046 + * libfdt - Flat Device Tree manipulation
21047 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21048 + *
21049 + * libfdt is dual licensed: you can use it either under the terms of
21050 + * the GPL, or the BSD license, at your option.
21051 + *
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.
21056 + *
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.
21061 + *
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
21066 + *
21067 + * Alternatively,
21068 + *
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:
21072 + *
21073 + * 1. Redistributions of source code must retain the above
21074 + * copyright notice, this list of conditions and the following
21075 + * disclaimer.
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.
21080 + *
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.
21094 + */
21095 +#include "libfdt_env.h"
21096 +
21097 +#include <fdt.h>
21098 +#include <libfdt.h>
21099 +
21100 +#include "libfdt_internal.h"
21101 +
21102 +static int _blocks_misordered(const void *fdt,
21103 + int mem_rsv_size, int struct_size)
21104 +{
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)));
21112 +}
21113 +
21114 +static int rw_check_header(void *fdt)
21115 +{
21116 + int err;
21117 +
21118 + if ((err = fdt_check_header(fdt)))
21119 + return err;
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);
21127 +
21128 + return 0;
21129 +}
21130 +
21131 +#define RW_CHECK_HEADER(fdt) \
21132 + { \
21133 + int err; \
21134 + if ((err = rw_check_header(fdt)) != 0) \
21135 + return err; \
21136 + }
21137 +
21138 +static inline int _blob_data_size(void *fdt)
21139 +{
21140 + return fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
21141 +}
21142 +
21143 +static int _blob_splice(void *fdt, void *p, int oldlen, int newlen)
21144 +{
21145 + void *end = fdt + _blob_data_size(fdt);
21146 +
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);
21152 + return 0;
21153 +}
21154 +
21155 +static int _blob_splice_mem_rsv(void *fdt, struct fdt_reserve_entry *p,
21156 + int oldn, int newn)
21157 +{
21158 + int delta = (newn - oldn) * sizeof(*p);
21159 + int err;
21160 + err = _blob_splice(fdt, p, oldn * sizeof(*p), newn * sizeof(*p));
21161 + if (err)
21162 + return err;
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);
21165 + return 0;
21166 +}
21167 +
21168 +static int _blob_splice_struct(void *fdt, void *p,
21169 + int oldlen, int newlen)
21170 +{
21171 + int delta = newlen - oldlen;
21172 + int err;
21173 +
21174 + if ((err = _blob_splice(fdt, p, oldlen, newlen)))
21175 + return err;
21176 +
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);
21179 + return 0;
21180 +}
21181 +
21182 +static int _blob_splice_string(void *fdt, int newlen)
21183 +{
21184 + void *p = fdt + fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
21185 + int err;
21186 +
21187 + if ((err = _blob_splice(fdt, p, 0, newlen)))
21188 + return err;
21189 +
21190 + fdt_set_size_dt_strings(fdt, fdt_size_dt_strings(fdt) + newlen);
21191 + return 0;
21192 +}
21193 +
21194 +static int _find_add_string(void *fdt, const char *s)
21195 +{
21196 + char *strtab = (char *)fdt + fdt_off_dt_strings(fdt);
21197 + const char *p;
21198 + char *new;
21199 + int len = strlen(s) + 1;
21200 + int err;
21201 +
21202 + p = _fdt_find_string(strtab, fdt_size_dt_strings(fdt), s);
21203 + if (p)
21204 + /* found it */
21205 + return (p - strtab);
21206 +
21207 + new = strtab + fdt_size_dt_strings(fdt);
21208 + err = _blob_splice_string(fdt, len);
21209 + if (err)
21210 + return err;
21211 +
21212 + memcpy(new, s, len);
21213 + return (new - strtab);
21214 +}
21215 +
21216 +int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size)
21217 +{
21218 + struct fdt_reserve_entry *re;
21219 + int err;
21220 +
21221 + if ((err = rw_check_header(fdt)))
21222 + return err;
21223 +
21224 + re = _fdt_mem_rsv_w(fdt, fdt_num_mem_rsv(fdt));
21225 + err = _blob_splice_mem_rsv(fdt, re, 0, 1);
21226 + if (err)
21227 + return err;
21228 +
21229 + re->address = cpu_to_fdt64(address);
21230 + re->size = cpu_to_fdt64(size);
21231 + return 0;
21232 +}
21233 +
21234 +int fdt_del_mem_rsv(void *fdt, int n)
21235 +{
21236 + struct fdt_reserve_entry *re = _fdt_mem_rsv_w(fdt, n);
21237 + int err;
21238 +
21239 + if ((err = rw_check_header(fdt)))
21240 + return err;
21241 + if (n >= fdt_num_mem_rsv(fdt))
21242 + return -FDT_ERR_NOTFOUND;
21243 +
21244 + err = _blob_splice_mem_rsv(fdt, re, 1, 0);
21245 + if (err)
21246 + return err;
21247 + return 0;
21248 +}
21249 +
21250 +static int _resize_property(void *fdt, int nodeoffset, const char *name, int len,
21251 + struct fdt_property **prop)
21252 +{
21253 + int oldlen;
21254 + int err;
21255 +
21256 + *prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen);
21257 + if (! (*prop))
21258 + return oldlen;
21259 +
21260 + if ((err = _blob_splice_struct(fdt, (*prop)->data,
21261 + ALIGN(oldlen, FDT_TAGSIZE),
21262 + ALIGN(len, FDT_TAGSIZE))))
21263 + return err;
21264 +
21265 + (*prop)->len = cpu_to_fdt32(len);
21266 + return 0;
21267 +}
21268 +
21269 +static int _add_property(void *fdt, int nodeoffset, const char *name, int len,
21270 + struct fdt_property **prop)
21271 +{
21272 + uint32_t tag;
21273 + int proplen;
21274 + int nextoffset;
21275 + int namestroff;
21276 + int err;
21277 +
21278 + tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
21279 + if (tag != FDT_BEGIN_NODE)
21280 + return -FDT_ERR_BADOFFSET;
21281 +
21282 + namestroff = _find_add_string(fdt, name);
21283 + if (namestroff < 0)
21284 + return namestroff;
21285 +
21286 + *prop = _fdt_offset_ptr_w(fdt, nextoffset);
21287 + proplen = sizeof(**prop) + ALIGN(len, FDT_TAGSIZE);
21288 +
21289 + err = _blob_splice_struct(fdt, *prop, 0, proplen);
21290 + if (err)
21291 + return err;
21292 +
21293 + (*prop)->tag = cpu_to_fdt32(FDT_PROP);
21294 + (*prop)->nameoff = cpu_to_fdt32(namestroff);
21295 + (*prop)->len = cpu_to_fdt32(len);
21296 + return 0;
21297 +}
21298 +
21299 +int fdt_setprop(void *fdt, int nodeoffset, const char *name,
21300 + const void *val, int len)
21301 +{
21302 + struct fdt_property *prop;
21303 + int err;
21304 +
21305 + if ((err = rw_check_header(fdt)))
21306 + return err;
21307 +
21308 + err = _resize_property(fdt, nodeoffset, name, len, &prop);
21309 + if (err == -FDT_ERR_NOTFOUND)
21310 + err = _add_property(fdt, nodeoffset, name, len, &prop);
21311 + if (err)
21312 + return err;
21313 +
21314 + memcpy(prop->data, val, len);
21315 + return 0;
21316 +}
21317 +
21318 +int fdt_delprop(void *fdt, int nodeoffset, const char *name)
21319 +{
21320 + struct fdt_property *prop;
21321 + int len, proplen;
21322 +
21323 + RW_CHECK_HEADER(fdt);
21324 +
21325 + prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
21326 + if (! prop)
21327 + return len;
21328 +
21329 + proplen = sizeof(*prop) + ALIGN(len, FDT_TAGSIZE);
21330 + return _blob_splice_struct(fdt, prop, proplen, 0);
21331 +}
21332 +
21333 +int fdt_add_subnode_namelen(void *fdt, int parentoffset,
21334 + const char *name, int namelen)
21335 +{
21336 + struct fdt_node_header *nh;
21337 + int offset, nextoffset;
21338 + int nodelen;
21339 + int err;
21340 + uint32_t tag;
21341 + uint32_t *endtag;
21342 +
21343 + RW_CHECK_HEADER(fdt);
21344 +
21345 + offset = fdt_subnode_offset_namelen(fdt, parentoffset, name, namelen);
21346 + if (offset >= 0)
21347 + return -FDT_ERR_EXISTS;
21348 + else if (offset != -FDT_ERR_NOTFOUND)
21349 + return offset;
21350 +
21351 + /* Try to place the new node after the parent's properties */
21352 + fdt_next_tag(fdt, parentoffset, &nextoffset); /* skip the BEGIN_NODE */
21353 + do {
21354 + offset = nextoffset;
21355 + tag = fdt_next_tag(fdt, offset, &nextoffset);
21356 + } while (tag == FDT_PROP);
21357 +
21358 + nh = _fdt_offset_ptr_w(fdt, offset);
21359 + nodelen = sizeof(*nh) + ALIGN(namelen+1, FDT_TAGSIZE) + FDT_TAGSIZE;
21360 +
21361 + err = _blob_splice_struct(fdt, nh, 0, nodelen);
21362 + if (err)
21363 + return err;
21364 +
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);
21370 +
21371 + return offset;
21372 +}
21373 +
21374 +int fdt_add_subnode(void *fdt, int parentoffset, const char *name)
21375 +{
21376 + return fdt_add_subnode_namelen(fdt, parentoffset, name, strlen(name));
21377 +}
21378 +
21379 +int fdt_del_node(void *fdt, int nodeoffset)
21380 +{
21381 + int endoffset;
21382 +
21383 + RW_CHECK_HEADER(fdt);
21384 +
21385 + endoffset = _fdt_node_end_offset(fdt, nodeoffset);
21386 + if (endoffset < 0)
21387 + return endoffset;
21388 +
21389 + return _blob_splice_struct(fdt, _fdt_offset_ptr_w(fdt, nodeoffset),
21390 + endoffset - nodeoffset, 0);
21391 +}
21392 +
21393 +static void _packblocks(const void *fdt, void *buf,
21394 + int mem_rsv_size, int struct_size)
21395 +{
21396 + int mem_rsv_off, struct_off, strings_off;
21397 +
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;
21401 +
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);
21404 +
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);
21408 +
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));
21413 +}
21414 +
21415 +int fdt_open_into(const void *fdt, void *buf, int bufsize)
21416 +{
21417 + int err;
21418 + int mem_rsv_size, struct_size;
21419 + int newsize;
21420 + void *tmp;
21421 +
21422 + err = fdt_check_header(fdt);
21423 + if (err)
21424 + return err;
21425 +
21426 + mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
21427 + * sizeof(struct fdt_reserve_entry);
21428 +
21429 + if (fdt_version(fdt) >= 17) {
21430 + struct_size = fdt_size_dt_struct(fdt);
21431 + } else {
21432 + struct_size = 0;
21433 + while (fdt_next_tag(fdt, struct_size, &struct_size) != FDT_END)
21434 + ;
21435 + }
21436 +
21437 + if (!_blocks_misordered(fdt, mem_rsv_size, struct_size)) {
21438 + /* no further work necessary */
21439 + err = fdt_move(fdt, buf, bufsize);
21440 + if (err)
21441 + return err;
21442 + fdt_set_version(buf, 17);
21443 + fdt_set_size_dt_struct(buf, struct_size);
21444 + fdt_set_totalsize(buf, bufsize);
21445 + return 0;
21446 + }
21447 +
21448 + /* Need to reorder */
21449 + newsize = ALIGN(sizeof(struct fdt_header), 8) + mem_rsv_size
21450 + + struct_size + fdt_size_dt_strings(fdt);
21451 +
21452 + if (bufsize < newsize)
21453 + return -FDT_ERR_NOSPACE;
21454 +
21455 + if (((buf + newsize) <= fdt)
21456 + || (buf >= (fdt + fdt_totalsize(fdt)))) {
21457 + tmp = buf;
21458 + } else {
21459 + tmp = (void *)fdt + fdt_totalsize(fdt);
21460 + if ((tmp + newsize) > (buf + bufsize))
21461 + return -FDT_ERR_NOSPACE;
21462 + }
21463 +
21464 + _packblocks(fdt, tmp, mem_rsv_size, struct_size);
21465 + memmove(buf, tmp, newsize);
21466 +
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));
21472 +
21473 + return 0;
21474 +}
21475 +
21476 +int fdt_pack(void *fdt)
21477 +{
21478 + int mem_rsv_size;
21479 + int err;
21480 +
21481 + err = rw_check_header(fdt);
21482 + if (err)
21483 + return err;
21484 +
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));
21489 +
21490 + return 0;
21491 +}
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
21495 @@ -0,0 +1,96 @@
21496 +/*
21497 + * libfdt - Flat Device Tree manipulation
21498 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21499 + *
21500 + * libfdt is dual licensed: you can use it either under the terms of
21501 + * the GPL, or the BSD license, at your option.
21502 + *
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.
21507 + *
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.
21512 + *
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
21517 + *
21518 + * Alternatively,
21519 + *
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:
21523 + *
21524 + * 1. Redistributions of source code must retain the above
21525 + * copyright notice, this list of conditions and the following
21526 + * disclaimer.
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.
21531 + *
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.
21545 + */
21546 +#include "libfdt_env.h"
21547 +
21548 +#include <fdt.h>
21549 +#include <libfdt.h>
21550 +
21551 +#include "libfdt_internal.h"
21552 +
21553 +struct errtabent {
21554 + const char *str;
21555 +};
21556 +
21557 +#define ERRTABENT(val) \
21558 + [(val)] = { .str = #val, }
21559 +
21560 +static struct errtabent errtable[] = {
21561 + ERRTABENT(FDT_ERR_NOTFOUND),
21562 + ERRTABENT(FDT_ERR_EXISTS),
21563 + ERRTABENT(FDT_ERR_NOSPACE),
21564 +
21565 + ERRTABENT(FDT_ERR_BADOFFSET),
21566 + ERRTABENT(FDT_ERR_BADPATH),
21567 + ERRTABENT(FDT_ERR_BADSTATE),
21568 +
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),
21574 +};
21575 +#define ERRTABSIZE (sizeof(errtable) / sizeof(errtable[0]))
21576 +
21577 +const char *fdt_strerror(int errval)
21578 +{
21579 + if (errval > 0)
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;
21585 +
21586 + if (s)
21587 + return s;
21588 + }
21589 +
21590 + return "<unknown error>";
21591 +}
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
21595 @@ -0,0 +1,258 @@
21596 +/*
21597 + * libfdt - Flat Device Tree manipulation
21598 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21599 + *
21600 + * libfdt is dual licensed: you can use it either under the terms of
21601 + * the GPL, or the BSD license, at your option.
21602 + *
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.
21607 + *
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.
21612 + *
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
21617 + *
21618 + * Alternatively,
21619 + *
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:
21623 + *
21624 + * 1. Redistributions of source code must retain the above
21625 + * copyright notice, this list of conditions and the following
21626 + * disclaimer.
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.
21631 + *
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.
21645 + */
21646 +#include "libfdt_env.h"
21647 +
21648 +#include <fdt.h>
21649 +#include <libfdt.h>
21650 +
21651 +#include "libfdt_internal.h"
21652 +
21653 +static int check_header_sw(void *fdt)
21654 +{
21655 + if (fdt_magic(fdt) != SW_MAGIC)
21656 + return -FDT_ERR_BADMAGIC;
21657 + return 0;
21658 +}
21659 +
21660 +static void *grab_space(void *fdt, int len)
21661 +{
21662 + int offset = fdt_size_dt_struct(fdt);
21663 + int spaceleft;
21664 +
21665 + spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt)
21666 + - fdt_size_dt_strings(fdt);
21667 +
21668 + if ((offset + len < offset) || (offset + len > spaceleft))
21669 + return NULL;
21670 +
21671 + fdt_set_size_dt_struct(fdt, offset + len);
21672 + return fdt_offset_ptr_w(fdt, offset, len);
21673 +}
21674 +
21675 +int fdt_create(void *buf, int bufsize)
21676 +{
21677 + void *fdt = buf;
21678 +
21679 + if (bufsize < sizeof(struct fdt_header))
21680 + return -FDT_ERR_NOSPACE;
21681 +
21682 + memset(buf, 0, bufsize);
21683 +
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);
21688 +
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);
21693 +
21694 + return 0;
21695 +}
21696 +
21697 +int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size)
21698 +{
21699 + struct fdt_reserve_entry *re;
21700 + int err = check_header_sw(fdt);
21701 + int offset;
21702 +
21703 + if (err)
21704 + return err;
21705 + if (fdt_size_dt_struct(fdt))
21706 + return -FDT_ERR_BADSTATE;
21707 +
21708 + offset = fdt_off_dt_struct(fdt);
21709 + if ((offset + sizeof(*re)) > fdt_totalsize(fdt))
21710 + return -FDT_ERR_NOSPACE;
21711 +
21712 + re = (struct fdt_reserve_entry *)(fdt + offset);
21713 + re->address = cpu_to_fdt64(addr);
21714 + re->size = cpu_to_fdt64(size);
21715 +
21716 + fdt_set_off_dt_struct(fdt, offset + sizeof(*re));
21717 +
21718 + return 0;
21719 +}
21720 +
21721 +int fdt_finish_reservemap(void *fdt)
21722 +{
21723 + return fdt_add_reservemap_entry(fdt, 0, 0);
21724 +}
21725 +
21726 +int fdt_begin_node(void *fdt, const char *name)
21727 +{
21728 + struct fdt_node_header *nh;
21729 + int err = check_header_sw(fdt);
21730 + int namelen = strlen(name) + 1;
21731 +
21732 + if (err)
21733 + return err;
21734 +
21735 + nh = grab_space(fdt, sizeof(*nh) + ALIGN(namelen, FDT_TAGSIZE));
21736 + if (! nh)
21737 + return -FDT_ERR_NOSPACE;
21738 +
21739 + nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
21740 + memcpy(nh->name, name, namelen);
21741 + return 0;
21742 +}
21743 +
21744 +int fdt_end_node(void *fdt)
21745 +{
21746 + uint32_t *en;
21747 + int err = check_header_sw(fdt);
21748 +
21749 + if (err)
21750 + return err;
21751 +
21752 + en = grab_space(fdt, FDT_TAGSIZE);
21753 + if (! en)
21754 + return -FDT_ERR_NOSPACE;
21755 +
21756 + *en = cpu_to_fdt32(FDT_END_NODE);
21757 + return 0;
21758 +}
21759 +
21760 +static int find_add_string(void *fdt, const char *s)
21761 +{
21762 + char *strtab = (char *)fdt + fdt_totalsize(fdt);
21763 + const char *p;
21764 + int strtabsize = fdt_size_dt_strings(fdt);
21765 + int len = strlen(s) + 1;
21766 + int struct_top, offset;
21767 +
21768 + p = _fdt_find_string(strtab - strtabsize, strtabsize, s);
21769 + if (p)
21770 + return p - strtab;
21771 +
21772 + /* Add it */
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 :( */
21777 +
21778 + memcpy(strtab + offset, s, len);
21779 + fdt_set_size_dt_strings(fdt, strtabsize + len);
21780 + return offset;
21781 +}
21782 +
21783 +int fdt_property(void *fdt, const char *name, const void *val, int len)
21784 +{
21785 + struct fdt_property *prop;
21786 + int err = check_header_sw(fdt);
21787 + int nameoff;
21788 +
21789 + if (err)
21790 + return err;
21791 +
21792 + nameoff = find_add_string(fdt, name);
21793 + if (nameoff == 0)
21794 + return -FDT_ERR_NOSPACE;
21795 +
21796 + prop = grab_space(fdt, sizeof(*prop) + ALIGN(len, FDT_TAGSIZE));
21797 + if (! prop)
21798 + return -FDT_ERR_NOSPACE;
21799 +
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);
21804 + return 0;
21805 +}
21806 +
21807 +int fdt_finish(void *fdt)
21808 +{
21809 + int err = check_header_sw(fdt);
21810 + char *p = (char *)fdt;
21811 + uint32_t *end;
21812 + int oldstroffset, newstroffset;
21813 + uint32_t tag;
21814 + int offset, nextoffset;
21815 +
21816 + if (err)
21817 + return err;
21818 +
21819 + /* Add terminator */
21820 + end = grab_space(fdt, sizeof(*end));
21821 + if (! end)
21822 + return -FDT_ERR_NOSPACE;
21823 + *end = cpu_to_fdt32(FDT_END);
21824 +
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);
21830 +
21831 + /* Walk the structure, correcting string offsets */
21832 + offset = 0;
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));
21837 + int nameoff;
21838 +
21839 + if (! prop)
21840 + return -FDT_ERR_BADSTRUCTURE;
21841 +
21842 + nameoff = fdt32_to_cpu(prop->nameoff);
21843 + nameoff += fdt_size_dt_strings(fdt);
21844 + prop->nameoff = cpu_to_fdt32(nameoff);
21845 + }
21846 + offset = nextoffset;
21847 + }
21848 +
21849 + /* Finally, adjust the header */
21850 + fdt_set_totalsize(fdt, newstroffset + fdt_size_dt_strings(fdt));
21851 + fdt_set_magic(fdt, FDT_MAGIC);
21852 + return 0;
21853 +}
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
21857 @@ -0,0 +1,144 @@
21858 +/*
21859 + * libfdt - Flat Device Tree manipulation
21860 + * Copyright (C) 2006 David Gibson, IBM Corporation.
21861 + *
21862 + * libfdt is dual licensed: you can use it either under the terms of
21863 + * the GPL, or the BSD license, at your option.
21864 + *
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.
21869 + *
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.
21874 + *
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
21879 + *
21880 + * Alternatively,
21881 + *
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:
21885 + *
21886 + * 1. Redistributions of source code must retain the above
21887 + * copyright notice, this list of conditions and the following
21888 + * disclaimer.
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.
21893 + *
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.
21907 + */
21908 +#include "libfdt_env.h"
21909 +
21910 +#include <fdt.h>
21911 +#include <libfdt.h>
21912 +
21913 +#include "libfdt_internal.h"
21914 +
21915 +int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
21916 + const void *val, int len)
21917 +{
21918 + void *propval;
21919 + int proplen;
21920 +
21921 + propval = fdt_getprop_w(fdt, nodeoffset, name, &proplen);
21922 + if (! propval)
21923 + return proplen;
21924 +
21925 + if (proplen != len)
21926 + return -FDT_ERR_NOSPACE;
21927 +
21928 + memcpy(propval, val, len);
21929 + return 0;
21930 +}
21931 +
21932 +static void nop_region(void *start, int len)
21933 +{
21934 + uint32_t *p;
21935 +
21936 + for (p = start; (void *)p < (start + len); p++)
21937 + *p = cpu_to_fdt32(FDT_NOP);
21938 +}
21939 +
21940 +int fdt_nop_property(void *fdt, int nodeoffset, const char *name)
21941 +{
21942 + struct fdt_property *prop;
21943 + int len;
21944 +
21945 + prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
21946 + if (! prop)
21947 + return len;
21948 +
21949 + nop_region(prop, len + sizeof(*prop));
21950 +
21951 + return 0;
21952 +}
21953 +
21954 +int _fdt_node_end_offset(void *fdt, int nodeoffset)
21955 +{
21956 + int level = 0;
21957 + uint32_t tag;
21958 + int offset, nextoffset;
21959 +
21960 + tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
21961 + if (tag != FDT_BEGIN_NODE)
21962 + return -FDT_ERR_BADOFFSET;
21963 + do {
21964 + offset = nextoffset;
21965 + tag = fdt_next_tag(fdt, offset, &nextoffset);
21966 +
21967 + switch (tag) {
21968 + case FDT_END:
21969 + return offset;
21970 +
21971 + case FDT_BEGIN_NODE:
21972 + level++;
21973 + break;
21974 +
21975 + case FDT_END_NODE:
21976 + level--;
21977 + break;
21978 +
21979 + case FDT_PROP:
21980 + case FDT_NOP:
21981 + break;
21982 +
21983 + default:
21984 + return -FDT_ERR_BADSTRUCTURE;
21985 + }
21986 + } while (level >= 0);
21987 +
21988 + return nextoffset;
21989 +}
21990 +
21991 +int fdt_nop_node(void *fdt, int nodeoffset)
21992 +{
21993 + int endoffset;
21994 +
21995 + endoffset = _fdt_node_end_offset(fdt, nodeoffset);
21996 + if (endoffset < 0)
21997 + return endoffset;
21998 +
21999 + nop_region(fdt_offset_ptr_w(fdt, nodeoffset, 0), endoffset - nodeoffset);
22000 + return 0;
22001 +}
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
22005 @@ -0,0 +1,721 @@
22006 +#ifndef _LIBFDT_H
22007 +#define _LIBFDT_H
22008 +/*
22009 + * libfdt - Flat Device Tree manipulation
22010 + * Copyright (C) 2006 David Gibson, IBM Corporation.
22011 + *
22012 + * libfdt is dual licensed: you can use it either under the terms of
22013 + * the GPL, or the BSD license, at your option.
22014 + *
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.
22019 + *
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.
22024 + *
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
22029 + *
22030 + * Alternatively,
22031 + *
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:
22035 + *
22036 + * 1. Redistributions of source code must retain the above
22037 + * copyright notice, this list of conditions and the following
22038 + * disclaimer.
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.
22043 + *
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.
22057 + */
22058 +
22059 +#include <libfdt_env.h>
22060 +#include <fdt.h>
22061 +
22062 +#define FDT_FIRST_SUPPORTED_VERSION 0x10
22063 +#define FDT_LAST_SUPPORTED_VERSION 0x11
22064 +
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. */
22076 +
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. */
22093 +
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. */
22117 +
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. */
22123 +
22124 +#define FDT_ERR_MAX 13
22125 +
22126 +/**********************************************************************/
22127 +/* Low-level functions (you probably don't need these) */
22128 +/**********************************************************************/
22129 +
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)
22132 +{
22133 + return (void *)fdt_offset_ptr(fdt, offset, checklen);
22134 +}
22135 +
22136 +uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset);
22137 +
22138 +/**********************************************************************/
22139 +/* General functions */
22140 +/**********************************************************************/
22141 +
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))
22154 +
22155 +#define __fdt_set_hdr(name) \
22156 + static inline void fdt_set_##name(void *fdt, uint32_t val) \
22157 + { \
22158 + struct fdt_header *fdth = fdt; \
22159 + fdth->name = cpu_to_fdt32(val); \
22160 + }
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
22172 +
22173 +/**
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
22176 + *
22177 + * fdt_check_header() checks that the given buffer contains what
22178 + * appears to be a flattened device tree with sane information in its
22179 + * header.
22180 + *
22181 + * returns:
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
22186 + */
22187 +int fdt_check_header(const void *fdt);
22188 +
22189 +/**
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
22194 + *
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.
22200 + *
22201 + * returns:
22202 + * 0, on success
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
22207 + */
22208 +int fdt_move(const void *fdt, void *buf, int bufsize);
22209 +
22210 +/**********************************************************************/
22211 +/* Read-only functions */
22212 +/**********************************************************************/
22213 +
22214 +/**
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)
22218 + *
22219 + * fdt_string() retrieves a pointer to a single string from the
22220 + * strings block of the device tree blob at fdt.
22221 + *
22222 + * returns:
22223 + * a pointer to the string, on success
22224 + * NULL, if stroffset is out of bounds
22225 + */
22226 +const char *fdt_string(const void *fdt, int stroffset);
22227 +
22228 +/**
22229 + * fdt_num_mem_rsv - retreive the number of memory reserve map entries
22230 + * @fdt: pointer to the device tree blob
22231 + *
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.
22235 + *
22236 + * returns:
22237 + * the number of entries
22238 + */
22239 +int fdt_num_mem_rsv(const void *fdt);
22240 +
22241 +/**
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
22245 + *
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.
22249 + *
22250 + * returns:
22251 + * 0, on success
22252 + * -FDT_ERR_BADMAGIC,
22253 + * -FDT_ERR_BADVERSION,
22254 + * -FDT_ERR_BADSTATE, standard meanings
22255 + */
22256 +int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size);
22257 +
22258 +/**
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
22264 + *
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.
22269 + */
22270 +int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
22271 + const char *name, int namelen);
22272 +/**
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
22277 + *
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.
22284 + *
22285 + * returns:
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.
22294 + */
22295 +int fdt_subnode_offset(const void *fdt, int parentoffset, const char *name);
22296 +
22297 +/**
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
22301 + *
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
22307 + * address).
22308 + *
22309 + * returns:
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.
22318 + */
22319 +int fdt_path_offset(const void *fdt, const char *path);
22320 +
22321 +/**
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
22326 + *
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.
22331 + *
22332 + * returns:
22333 + * pointer to the node's name, on success
22334 + * If lenp is non-NULL, *lenp contains the length of that name (>=0)
22335 + * NULL, on error
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
22341 + */
22342 +const char *fdt_get_name(const void *fdt, int nodeoffset, int *lenp);
22343 +
22344 +/**
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
22350 + *
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.
22356 + *
22357 + * returns:
22358 + * pointer to the structure representing the property
22359 + * if lenp is non-NULL, *lenp contains the length of the property
22360 + * value (>=0)
22361 + * NULL, on error
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
22370 + */
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,
22375 + int *lenp)
22376 +{
22377 + return (struct fdt_property *)fdt_get_property(fdt, nodeoffset,
22378 + name, lenp);
22379 +}
22380 +
22381 +/**
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
22387 + *
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.
22393 + *
22394 + * returns:
22395 + * pointer to the property's value
22396 + * if lenp is non-NULL, *lenp contains the length of the property
22397 + * value (>=0)
22398 + * NULL, on error
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
22407 + */
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)
22412 +{
22413 + return (void *)fdt_getprop(fdt, nodeoffset, name, lenp);
22414 +}
22415 +
22416 +/**
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
22420 + *
22421 + * fdt_get_phandle() retrieves the phandle of the device tree node at
22422 + * structure block offset nodeoffset.
22423 + *
22424 + * returns:
22425 + * the phandle of the node at nodeoffset, on succes (!= 0, != -1)
22426 + * 0, if the node has no phandle, or another error occurs
22427 + */
22428 +uint32_t fdt_get_phandle(const void *fdt, int nodeoffset);
22429 +
22430 +/**
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
22436 + *
22437 + * fdt_get_path() computes the full path of the node at offset
22438 + * nodeoffset, and records that path in the buffer at buf.
22439 + *
22440 + * NOTE: This function is expensive, as it must scan the device tree
22441 + * structure from the start to nodeoffset.
22442 + *
22443 + * returns:
22444 + * 0, on success
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
22454 + */
22455 +int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen);
22456 +
22457 +/**
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
22463 + *
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.
22472 + *
22473 + * NOTE: This function is expensive, as it must scan the device tree
22474 + * structure from the start to nodeoffset.
22475 + *
22476 + * returns:
22477 +
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
22486 + */
22487 +int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
22488 + int supernodedepth, int *nodedepth);
22489 +
22490 +/**
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
22494 + *
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.
22497 + *
22498 + * NOTE: This function is expensive, as it must scan the device tree
22499 + * structure from the start to nodeoffset.
22500 + *
22501 + * returns:
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
22508 + */
22509 +int fdt_node_depth(const void *fdt, int nodeoffset);
22510 +
22511 +/**
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
22515 + *
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).
22519 + *
22520 + * NOTE: This function is expensive, as it must scan the device tree
22521 + * structure from the start to nodeoffset, *twice*.
22522 + *
22523 + * returns:
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
22531 + */
22532 +int fdt_parent_offset(const void *fdt, int nodeoffset);
22533 +
22534 +/**
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
22541 + *
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.
22546 + *
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);
22555 + * }
22556 + *
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.
22560 + *
22561 + * returns:
22562 + * structure block offset of the located node (>= 0, >startoffset),
22563 + * on success
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
22571 + */
22572 +int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
22573 + const char *propname,
22574 + const void *propval, int proplen);
22575 +
22576 +/**
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
22580 + *
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
22584 + * undefined.
22585 + *
22586 + * returns:
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
22594 + */
22595 +int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle);
22596 +
22597 +/**
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
22602 + *
22603 + *
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.
22607 + *
22608 + * returns:
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
22618 + */
22619 +int fdt_node_check_compatible(const void *fdt, int nodeoffset,
22620 + const char *compatible);
22621 +
22622 +/**
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
22627 + *
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.
22632 + *
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);
22639 + * }
22640 + *
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.
22644 + *
22645 + * returns:
22646 + * structure block offset of the located node (>= 0, >startoffset),
22647 + * on success
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
22655 + */
22656 +int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
22657 + const char *compatible);
22658 +
22659 +/**********************************************************************/
22660 +/* Write-in-place functions */
22661 +/**********************************************************************/
22662 +
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)
22667 +{
22668 + val = cpu_to_fdt32(val);
22669 + return fdt_setprop_inplace(fdt, nodeoffset, name, &val, sizeof(val));
22670 +}
22671 +
22672 +int fdt_nop_property(void *fdt, int nodeoffset, const char *name);
22673 +int fdt_nop_node(void *fdt, int nodeoffset);
22674 +
22675 +/**********************************************************************/
22676 +/* Sequential write functions */
22677 +/**********************************************************************/
22678 +
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)
22685 +{
22686 + val = cpu_to_fdt32(val);
22687 + return fdt_property(fdt, name, &val, sizeof(val));
22688 +}
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);
22693 +
22694 +/**********************************************************************/
22695 +/* Read-write functions */
22696 +/**********************************************************************/
22697 +
22698 +int fdt_open_into(const void *fdt, void *buf, int bufsize);
22699 +int fdt_pack(void *fdt);
22700 +
22701 +int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size);
22702 +int fdt_del_mem_rsv(void *fdt, int n);
22703 +
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,
22707 + uint32_t val)
22708 +{
22709 + val = cpu_to_fdt32(val);
22710 + return fdt_setprop(fdt, nodeoffset, name, &val, sizeof(val));
22711 +}
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);
22719 +
22720 +/**********************************************************************/
22721 +/* Debugging / informational functions */
22722 +/**********************************************************************/
22723 +
22724 +const char *fdt_strerror(int errval);
22725 +
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
22730 @@ -0,0 +1,89 @@
22731 +#ifndef _LIBFDT_INTERNAL_H
22732 +#define _LIBFDT_INTERNAL_H
22733 +/*
22734 + * libfdt - Flat Device Tree manipulation
22735 + * Copyright (C) 2006 David Gibson, IBM Corporation.
22736 + *
22737 + * libfdt is dual licensed: you can use it either under the terms of
22738 + * the GPL, or the BSD license, at your option.
22739 + *
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.
22744 + *
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.
22749 + *
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
22754 + *
22755 + * Alternatively,
22756 + *
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:
22760 + *
22761 + * 1. Redistributions of source code must retain the above
22762 + * copyright notice, this list of conditions and the following
22763 + * disclaimer.
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.
22768 + *
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.
22782 + */
22783 +#include <fdt.h>
22784 +
22785 +#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
22786 +#define PALIGN(p, a) ((void *)ALIGN((unsigned long)(p), (a)))
22787 +
22788 +#define memeq(p, q, n) (memcmp((p), (q), (n)) == 0)
22789 +#define streq(p, q) (strcmp((p), (q)) == 0)
22790 +
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);
22794 +
22795 +static inline const void *_fdt_offset_ptr(const void *fdt, int offset)
22796 +{
22797 + return fdt + fdt_off_dt_struct(fdt) + offset;
22798 +}
22799 +
22800 +static inline void *_fdt_offset_ptr_w(void *fdt, int offset)
22801 +{
22802 + return (void *)_fdt_offset_ptr(fdt, offset);
22803 +}
22804 +
22805 +static inline const struct fdt_reserve_entry *_fdt_mem_rsv(const void *fdt, int n)
22806 +{
22807 + const struct fdt_reserve_entry *rsv_table =
22808 + fdt + fdt_off_mem_rsvmap(fdt);
22809 +
22810 + return rsv_table + n;
22811 +}
22812 +static inline struct fdt_reserve_entry *_fdt_mem_rsv_w(void *fdt, int n)
22813 +{
22814 + return (void *)_fdt_mem_rsv(fdt, n);
22815 +}
22816 +
22817 +#define SW_MAGIC (~FDT_MAGIC)
22818 +
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
22823 @@ -0,0 +1,184 @@
22824 +/*
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].
22828 + *
22829 + * Copyright 2007 David Gibson, IBM Corporation.
22830 + *
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.
22835 + *
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.
22840 + *
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
22844 + * 02110-1301 USA
22845 + */
22846 +
22847 +#include <stddef.h>
22848 +#include <stdio.h>
22849 +#include <page.h>
22850 +#include <libfdt.h>
22851 +#include "ops.h"
22852 +
22853 +#define DEBUG 0
22854 +#define BAD_ERROR(err) (((err) < 0) \
22855 + && ((err) != -FDT_ERR_NOTFOUND) \
22856 + && ((err) != -FDT_ERR_EXISTS))
22857 +
22858 +#define check_err(err) \
22859 + ({ \
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)) \
22864 + exit(); \
22865 + (err < 0) ? -1 : 0; \
22866 + })
22867 +
22868 +#define offset_devp(off) \
22869 + ({ \
22870 + int _offset = (off); \
22871 + check_err(_offset) ? NULL : (void *)(_offset+1); \
22872 + })
22873 +
22874 +#define devp_offset_find(devp) (((int)(devp))-1)
22875 +#define devp_offset(devp) (devp ? ((int)(devp))-1 : 0)
22876 +
22877 +static void *fdt;
22878 +static void *buf; /* = NULL */
22879 +
22880 +#define EXPAND_GRANULARITY 1024
22881 +
22882 +static void expand_buf(int minexpand)
22883 +{
22884 + int size = fdt_totalsize(fdt);
22885 + int rc;
22886 +
22887 + size = _ALIGN(size + minexpand, EXPAND_GRANULARITY);
22888 + buf = platform_ops.realloc(buf, size);
22889 + if (!buf)
22890 + fatal("Couldn't find %d bytes to expand device tree\n\r", size);
22891 + rc = fdt_open_into(fdt, buf, size);
22892 + if (rc != 0)
22893 + fatal("Couldn't expand fdt into new buffer: %s\n\r",
22894 + fdt_strerror(rc));
22895 +
22896 + fdt = buf;
22897 +}
22898 +
22899 +static void *fdt_wrapper_finddevice(const char *path)
22900 +{
22901 + return offset_devp(fdt_path_offset(fdt, path));
22902 +}
22903 +
22904 +static int fdt_wrapper_getprop(const void *devp, const char *name,
22905 + void *buf, const int buflen)
22906 +{
22907 + const void *p;
22908 + int len;
22909 +
22910 + p = fdt_getprop(fdt, devp_offset(devp), name, &len);
22911 + if (!p)
22912 + return check_err(len);
22913 + memcpy(buf, p, min(len, buflen));
22914 + return len;
22915 +}
22916 +
22917 +static int fdt_wrapper_setprop(const void *devp, const char *name,
22918 + const void *buf, const int len)
22919 +{
22920 + int rc;
22921 +
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);
22926 + }
22927 +
22928 + return check_err(rc);
22929 +}
22930 +
22931 +static void *fdt_wrapper_get_parent(const void *devp)
22932 +{
22933 + return offset_devp(fdt_parent_offset(fdt, devp_offset(devp)));
22934 +}
22935 +
22936 +static void *fdt_wrapper_create_node(const void *devp, const char *name)
22937 +{
22938 + int offset;
22939 +
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);
22944 + }
22945 +
22946 + return offset_devp(offset);
22947 +}
22948 +
22949 +static void *fdt_wrapper_find_node_by_prop_value(const void *prev,
22950 + const char *name,
22951 + const char *val,
22952 + int len)
22953 +{
22954 + int offset = fdt_node_offset_by_prop_value(fdt, devp_offset_find(prev),
22955 + name, val, len);
22956 + return offset_devp(offset);
22957 +}
22958 +
22959 +static char *fdt_wrapper_get_path(const void *devp, char *buf, int len)
22960 +{
22961 + int rc;
22962 +
22963 + rc = fdt_get_path(fdt, devp_offset(devp), buf, len);
22964 + if (check_err(rc))
22965 + return NULL;
22966 + return buf;
22967 +}
22968 +
22969 +static unsigned long fdt_wrapper_finalize(void)
22970 +{
22971 + int rc;
22972 +
22973 + rc = fdt_pack(fdt);
22974 + if (rc != 0)
22975 + fatal("Couldn't pack flat tree: %s\n\r",
22976 + fdt_strerror(rc));
22977 + return (unsigned long)fdt;
22978 +}
22979 +
22980 +void fdt_init(void *blob)
22981 +{
22982 + int err;
22983 +
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;
22992 +
22993 + /* Make sure the dt blob is the right version and so forth */
22994 + fdt = blob;
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);
23000 + }
23001 +
23002 + if (err != 0)
23003 + fatal("fdt_init(): %s\n\r", fdt_strerror(err));
23004 +
23005 + if (buf)
23006 + fdt = buf;
23007 +}
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
23011 @@ -0,0 +1,17 @@
23012 +#ifndef _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
23013 +#define _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
23014 +
23015 +#include <types.h>
23016 +#include <string.h>
23017 +
23018 +typedef u32 uint32_t;
23019 +typedef u64 uint64_t;
23020 +
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)
23027 +
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
23032 @@ -16,7 +16,6 @@
23033 #include "stdio.h"
23034 #include "ops.h"
23035 #include "gunzip_util.h"
23036 -#include "flatdevtree.h"
23037 #include "reg.h"
23038
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
23043 @@ -79,7 +79,7 @@
23044 extern struct loader_info loader_info;
23045
23046 void start(void);
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);
23054 }
23055
23056 +static inline void *find_node_by_alias(const char *alias)
23057 +{
23058 + void *devp = finddevice("/aliases");
23059 +
23060 + if (devp) {
23061 + char path[MAX_PATH_LEN];
23062 + if (getprop(devp, alias, path, MAX_PATH_LEN) > 0)
23063 + return finddevice(path);
23064 + }
23065 +
23066 + return NULL;
23067 +}
23068 +
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 @@
23080 if (!dtb)
23081 exit();
23082 memmove(dtb, _dtb_start, dt_size);
23083 - if (ft_init(dtb, dt_size, 16))
23084 - exit();
23085 + fdt_init(dtb);
23086
23087 bridge_base = mv64x60_get_bridge_base();
23088
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");
23094
23095 simple_alloc_init(_end, heapsize, 32, 64);
23096 - ft_init(_dtb_start, 0, 4);
23097 + fdt_init(_dtb_start);
23098
23099 chosen = finddevice("/chosen");
23100
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
23104 @@ -0,0 +1,58 @@
23105 +/*
23106 + * RedBoot firmware support
23107 + *
23108 + * Author: Scott Wood <scottwood@freescale.com>
23109 + *
23110 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
23111 + *
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.
23115 + */
23116 +
23117 +#include "ops.h"
23118 +#include "stdio.h"
23119 +#include "redboot.h"
23120 +#include "fsl-soc.h"
23121 +#include "io.h"
23122 +
23123 +static bd_t bd;
23124 +BSS_STACK(4096);
23125 +
23126 +#define MHZ(x) ((x + 500000) / 1000000)
23127 +
23128 +static void platform_fixups(void)
23129 +{
23130 + void *node;
23131 +
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);
23135 +
23136 + node = finddevice("/soc/cpm/brg");
23137 + if (node) {
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);
23141 + }
23142 +}
23143 +
23144 +void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
23145 + unsigned long r6, unsigned long r7)
23146 +{
23147 + memcpy(&bd, (char *)r3, sizeof(bd));
23148 +
23149 + if (bd.bi_tag != 0x42444944)
23150 + return;
23151 +
23152 + simple_alloc_init(_end,
23153 + bd.bi_memstart + bd.bi_memsize - (unsigned long)_end,
23154 + 32, 64);
23155 +
23156 + fdt_init(_dtb_start);
23157 + serial_console_init();
23158 + platform_ops.fixups = platform_fixups;
23159 +
23160 + loader_info.cmdline = (char *)bd.bi_cmdline;
23161 + loader_info.cmdline_len = strlen((char *)bd.bi_cmdline);
23162 +}
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
23166 @@ -0,0 +1,56 @@
23167 +#ifndef _PPC_REDBOOT_H
23168 +#define _PPC_REDBOOT_H
23169 +
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)
23174 +
23175 +//
23176 +// Board specific details, as provided by RedBoot
23177 +//
23178 +
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.
23183 + */
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 */
23212 + } bi_video;
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 */
23216 +} bd_t;
23217 +
23218 +#define BI_REV 0x0102 /* Version 1.02 */
23219 +
23220 +#define bi_pci_busfreq bi_pci_freq
23221 +#define bi_immr_base bi_immr
23222 +#endif
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
23226 @@ -16,6 +16,14 @@
23227 return pvr;
23228 }
23229
23230 +#define __stringify_1(x) #x
23231 +#define __stringify(x) __stringify_1(x)
23232 +
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))
23237 +
23238 register void *__stack_pointer asm("r1");
23239 #define get_sp() (__stack_pointer)
23240
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);
23252
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
23257 @@ -20,55 +20,6 @@
23258
23259 BSS_STACK(4096);
23260
23261 -void ibm405gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
23262 -{
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;
23268 -
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;
23275 -
23276 - m = fwdv * fbdv * cbdv;
23277 -
23278 - cpu = sysclk * m / fwdv;
23279 - plb = cpu / cbdv;
23280 - opb = plb / opdv;
23281 - ebc = plb / epdv;
23282 -
23283 - if (cpc0_cr0 & 0x80) {
23284 - /* uart0 uses the external clock */
23285 - uart0 = ser_clk;
23286 - } else {
23287 - uart0 = cpu / udiv;
23288 - }
23289 -
23290 - if (cpc0_cr0 & 0x40) {
23291 - /* uart1 uses the external clock */
23292 - uart1 = ser_clk;
23293 - } else {
23294 - uart1 = cpu / udiv;
23295 - }
23296 -
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);
23300 - tb = cpu;
23301 -
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);
23308 -}
23309 -
23310 static void walnut_flashsel_fixup(void)
23311 {
23312 void *devp, *sram;
23313 @@ -112,7 +63,7 @@
23314 #define WALNUT_OPENBIOS_MAC_OFF 0xfffffe0b
23315 static void walnut_fixups(void)
23316 {
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");
23322 @@ -128,6 +79,6 @@
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();
23329 }
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
23333 @@ -45,6 +45,7 @@
23334
23335 # directory for object and other files used by this script
23336 object=arch/powerpc/boot
23337 +objbin=$object
23338
23339 # directory for working files
23340 tmpdir=.
23341 @@ -95,6 +96,7 @@
23342 shift
23343 [ "$#" -gt 0 ] || usage
23344 object="$1"
23345 + objbin="$1"
23346 ;;
23347 -W)
23348 shift
23349 @@ -116,10 +118,13 @@
23350 done
23351
23352 if [ -n "$dts" ]; then
23353 + if [ ! -r "$dts" -a -r "$object/dts/$dts" ]; then
23354 + dts="$object/dts/$dts"
23355 + fi
23356 if [ -z "$dtb" ]; then
23357 dtb="$platform.dtb"
23358 fi
23359 - dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts"
23360 + $object/dtc -O dtb -o "$dtb" -b 0 "$dts"
23361 fi
23362
23363 if [ -z "$kernel" ]; then
23364 @@ -163,7 +168,7 @@
23365 ksection=.kernel:vmlinux.bin
23366 isection=.kernel:initrd
23367 ;;
23368 -ep88xc)
23369 +ep88xc|ep405|redboot*|ep8248e)
23370 platformo="$object/fixed-head.o $object/$platform.o"
23371 binary=y
23372 ;;
23373 @@ -246,11 +251,11 @@
23374 # post-processing needed for some platforms
23375 case "$platform" in
23376 pseries|chrp)
23377 - $object/addnote "$ofile"
23378 + $objbin/addnote "$ofile"
23379 ;;
23380 coff)
23381 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile"
23382 - $object/hack-coff "$ofile"
23383 + $objbin/hack-coff "$ofile"
23384 ;;
23385 cuboot*)
23386 gzip -f -9 "$ofile"
23387 @@ -259,7 +264,7 @@
23388 ;;
23389 treeboot*)
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
23394 rm -f "$ofile.elf"
23395 fi
23396 @@ -287,8 +292,6 @@
23397 overlay_dest="256"
23398 overlay_size="256"
23399
23400 - rm -f "$object/otheros.bld"
23401 -
23402 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
23403
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
23408
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"
23413 ;;
23414 esac
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
23418 @@ -0,0 +1,798 @@
23419 +#
23420 +# Automatically generated make config: don't edit
23421 +# Linux kernel version: 2.6.24-rc6
23422 +# Thu Jan 17 16:17:38 2008
23423 +#
23424 +# CONFIG_PPC64 is not set
23425 +
23426 +#
23427 +# Processor support
23428 +#
23429 +# CONFIG_6xx is not set
23430 +# CONFIG_PPC_85xx is not set
23431 +CONFIG_PPC_8xx=y
23432 +# CONFIG_40x is not set
23433 +# CONFIG_44x is not set
23434 +# CONFIG_E200 is not set
23435 +CONFIG_8xx=y
23436 +# CONFIG_PPC_MM_SLICES is not set
23437 +CONFIG_NOT_COHERENT_CACHE=y
23438 +CONFIG_PPC32=y
23439 +CONFIG_WORD_SIZE=32
23440 +CONFIG_PPC_MERGE=y
23441 +CONFIG_MMU=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
23454 +CONFIG_PPC=y
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
23459 +CONFIG_PPC_OF=y
23460 +CONFIG_OF=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
23466 +CONFIG_REDBOOT=y
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"
23470 +
23471 +#
23472 +# General setup
23473 +#
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
23480 +CONFIG_SYSVIPC=y
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
23498 +CONFIG_SYSCTL=y
23499 +CONFIG_EMBEDDED=y
23500 +# CONFIG_SYSCTL_SYSCALL is not set
23501 +CONFIG_KALLSYMS=y
23502 +# CONFIG_KALLSYMS_ALL is not set
23503 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
23504 +CONFIG_HOTPLUG=y
23505 +CONFIG_PRINTK=y
23506 +CONFIG_BUG=y
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
23511 +CONFIG_EPOLL=y
23512 +CONFIG_SIGNALFD=y
23513 +CONFIG_EVENTFD=y
23514 +CONFIG_SHMEM=y
23515 +# CONFIG_VM_EVENT_COUNTERS is not set
23516 +CONFIG_SLUB_DEBUG=y
23517 +# CONFIG_SLAB is not set
23518 +CONFIG_SLUB=y
23519 +# CONFIG_SLOB is not set
23520 +# CONFIG_TINY_SHMEM is not set
23521 +CONFIG_BASE_SMALL=1
23522 +# CONFIG_MODULES is not set
23523 +CONFIG_BLOCK=y
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
23528 +
23529 +#
23530 +# IO Schedulers
23531 +#
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"
23541 +
23542 +#
23543 +# Platform support
23544 +#
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
23549 +CONFIG_CPM1=y
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
23555 +
23556 +#
23557 +# MPC8xx CPM Options
23558 +#
23559 +
23560 +#
23561 +# Generic MPC8xx Options
23562 +#
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
23584 +CONFIG_CPM=y
23585 +
23586 +#
23587 +# Kernel options
23588 +#
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
23597 +CONFIG_HZ_1000=y
23598 +CONFIG_HZ=1000
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
23613 +CONFIG_FLATMEM=y
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
23620 +CONFIG_BOUNCE=y
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
23631 +
23632 +#
23633 +# Bus options
23634 +#
23635 +CONFIG_ZONE_DMA=y
23636 +CONFIG_FSL_SOC=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
23643 +
23644 +#
23645 +# Advanced setup
23646 +#
23647 +# CONFIG_ADVANCED_OPTIONS is not set
23648 +
23649 +#
23650 +# Default settings for advanced configuration options are used
23651 +#
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
23659 +
23660 +#
23661 +# Networking
23662 +#
23663 +CONFIG_NET=y
23664 +
23665 +#
23666 +# Networking options
23667 +#
23668 +CONFIG_PACKET=y
23669 +# CONFIG_PACKET_MMAP is not set
23670 +CONFIG_UNIX=y
23671 +# CONFIG_NET_KEY is not set
23672 +CONFIG_INET=y
23673 +CONFIG_IP_MULTICAST=y
23674 +# CONFIG_IP_ADVANCED_ROUTER is not set
23675 +CONFIG_IP_FIB_HASH=y
23676 +CONFIG_IP_PNP=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
23720 +
23721 +#
23722 +# Network testing
23723 +#
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
23729 +
23730 +#
23731 +# Wireless
23732 +#
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
23739 +
23740 +#
23741 +# Device Drivers
23742 +#
23743 +
23744 +#
23745 +# Generic Driver Options
23746 +#
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
23755 +CONFIG_MTD=y
23756 +# CONFIG_MTD_DEBUG is not set
23757 +# CONFIG_MTD_CONCAT is not set
23758 +# CONFIG_MTD_PARTITIONS is not set
23759 +
23760 +#
23761 +# User Modules And Translation Layers
23762 +#
23763 +CONFIG_MTD_CHAR=y
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
23772 +
23773 +#
23774 +# RAM/ROM/Flash chip drivers
23775 +#
23776 +CONFIG_MTD_CFI=y
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
23797 +
23798 +#
23799 +# Mapping drivers for chip access
23800 +#
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
23806 +
23807 +#
23808 +# Self-contained MTD device drivers
23809 +#
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
23814 +
23815 +#
23816 +# Disk-On-Chip Device Drivers
23817 +#
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
23823 +
23824 +#
23825 +# UBI - Unsorted block images
23826 +#
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
23833 +
23834 +#
23835 +# SCSI device support
23836 +#
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
23852 +CONFIG_PHYLIB=y
23853 +
23854 +#
23855 +# MII PHY device drivers
23856 +#
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
23869 +CONFIG_MII=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
23875 +CONFIG_FS_ENET=y
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
23881 +
23882 +#
23883 +# Wireless LAN
23884 +#
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
23896 +
23897 +#
23898 +# Input device support
23899 +#
23900 +CONFIG_INPUT=y
23901 +# CONFIG_INPUT_FF_MEMLESS is not set
23902 +# CONFIG_INPUT_POLLDEV is not set
23903 +
23904 +#
23905 +# Userland interfaces
23906 +#
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
23914 +
23915 +#
23916 +# Input Device Drivers
23917 +#
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
23939 +
23940 +#
23941 +# Hardware I/O ports
23942 +#
23943 +CONFIG_SERIO=y
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
23949 +
23950 +#
23951 +# Character devices
23952 +#
23953 +# CONFIG_VT is not set
23954 +# CONFIG_SERIAL_NONSTANDARD is not set
23955 +
23956 +#
23957 +# Serial drivers
23958 +#
23959 +# CONFIG_SERIAL_8250 is not set
23960 +
23961 +#
23962 +# Non-8250 serial port support
23963 +#
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
23980 +CONFIG_GEN_RTC=y
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
23986 +
23987 +#
23988 +# SPI support
23989 +#
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
23996 +
23997 +#
23998 +# Sonics Silicon Backplane
23999 +#
24000 +CONFIG_SSB_POSSIBLE=y
24001 +# CONFIG_SSB is not set
24002 +
24003 +#
24004 +# Multifunction device drivers
24005 +#
24006 +# CONFIG_MFD_SM501 is not set
24007 +
24008 +#
24009 +# Multimedia devices
24010 +#
24011 +# CONFIG_VIDEO_DEV is not set
24012 +# CONFIG_DVB_CORE is not set
24013 +CONFIG_DAB=y
24014 +
24015 +#
24016 +# Graphics support
24017 +#
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
24022 +
24023 +#
24024 +# Display device support
24025 +#
24026 +# CONFIG_DISPLAY_SUPPORT is not set
24027 +
24028 +#
24029 +# Sound
24030 +#
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
24038 +
24039 +#
24040 +# Userspace I/O
24041 +#
24042 +# CONFIG_UIO is not set
24043 +
24044 +#
24045 +# File systems
24046 +#
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
24064 +
24065 +#
24066 +# CD-ROM/DVD Filesystems
24067 +#
24068 +# CONFIG_ISO9660_FS is not set
24069 +# CONFIG_UDF_FS is not set
24070 +
24071 +#
24072 +# DOS/FAT/NT Filesystems
24073 +#
24074 +# CONFIG_MSDOS_FS is not set
24075 +# CONFIG_VFAT_FS is not set
24076 +# CONFIG_NTFS_FS is not set
24077 +
24078 +#
24079 +# Pseudo filesystems
24080 +#
24081 +CONFIG_PROC_FS=y
24082 +# CONFIG_PROC_KCORE is not set
24083 +CONFIG_PROC_SYSCTL=y
24084 +CONFIG_SYSFS=y
24085 +CONFIG_TMPFS=y
24086 +# CONFIG_TMPFS_POSIX_ACL is not set
24087 +# CONFIG_HUGETLB_PAGE is not set
24088 +# CONFIG_CONFIGFS_FS is not set
24089 +
24090 +#
24091 +# Miscellaneous filesystems
24092 +#
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
24101 +CONFIG_CRAMFS=y
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
24108 +CONFIG_NFS_FS=y
24109 +CONFIG_NFS_V3=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
24114 +CONFIG_ROOT_NFS=y
24115 +CONFIG_LOCKD=y
24116 +CONFIG_LOCKD_V4=y
24117 +CONFIG_NFS_COMMON=y
24118 +CONFIG_SUNRPC=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
24127 +
24128 +#
24129 +# Partition Types
24130 +#
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
24152 +
24153 +#
24154 +# Library routines
24155 +#
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
24165 +CONFIG_HAS_DMA=y
24166 +CONFIG_INSTRUMENTATION=y
24167 +# CONFIG_PROFILING is not set
24168 +# CONFIG_MARKERS is not set
24169 +
24170 +#
24171 +# Kernel hacking
24172 +#
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
24207 +
24208 +#
24209 +# Security options
24210 +#
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
24220 @@ -0,0 +1,798 @@
24221 +#
24222 +# Automatically generated make config: don't edit
24223 +# Linux kernel version: 2.6.24-rc6
24224 +# Thu Jan 17 16:17:18 2008
24225 +#
24226 +# CONFIG_PPC64 is not set
24227 +
24228 +#
24229 +# Processor support
24230 +#
24231 +# CONFIG_6xx is not set
24232 +# CONFIG_PPC_85xx is not set
24233 +CONFIG_PPC_8xx=y
24234 +# CONFIG_40x is not set
24235 +# CONFIG_44x is not set
24236 +# CONFIG_E200 is not set
24237 +CONFIG_8xx=y
24238 +# CONFIG_PPC_MM_SLICES is not set
24239 +CONFIG_NOT_COHERENT_CACHE=y
24240 +CONFIG_PPC32=y
24241 +CONFIG_WORD_SIZE=32
24242 +CONFIG_PPC_MERGE=y
24243 +CONFIG_MMU=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
24256 +CONFIG_PPC=y
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
24261 +CONFIG_PPC_OF=y
24262 +CONFIG_OF=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
24268 +CONFIG_REDBOOT=y
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"
24272 +
24273 +#
24274 +# General setup
24275 +#
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
24282 +CONFIG_SYSVIPC=y
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
24300 +CONFIG_SYSCTL=y
24301 +CONFIG_EMBEDDED=y
24302 +# CONFIG_SYSCTL_SYSCALL is not set
24303 +CONFIG_KALLSYMS=y
24304 +# CONFIG_KALLSYMS_ALL is not set
24305 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
24306 +CONFIG_HOTPLUG=y
24307 +CONFIG_PRINTK=y
24308 +CONFIG_BUG=y
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
24313 +CONFIG_EPOLL=y
24314 +CONFIG_SIGNALFD=y
24315 +CONFIG_EVENTFD=y
24316 +CONFIG_SHMEM=y
24317 +# CONFIG_VM_EVENT_COUNTERS is not set
24318 +CONFIG_SLUB_DEBUG=y
24319 +# CONFIG_SLAB is not set
24320 +CONFIG_SLUB=y
24321 +# CONFIG_SLOB is not set
24322 +# CONFIG_TINY_SHMEM is not set
24323 +CONFIG_BASE_SMALL=1
24324 +# CONFIG_MODULES is not set
24325 +CONFIG_BLOCK=y
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
24330 +
24331 +#
24332 +# IO Schedulers
24333 +#
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"
24343 +
24344 +#
24345 +# Platform support
24346 +#
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
24351 +CONFIG_CPM1=y
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
24357 +
24358 +#
24359 +# MPC8xx CPM Options
24360 +#
24361 +
24362 +#
24363 +# Generic MPC8xx Options
24364 +#
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
24386 +CONFIG_CPM=y
24387 +
24388 +#
24389 +# Kernel options
24390 +#
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
24399 +CONFIG_HZ_1000=y
24400 +CONFIG_HZ=1000
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
24415 +CONFIG_FLATMEM=y
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
24422 +CONFIG_BOUNCE=y
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
24433 +
24434 +#
24435 +# Bus options
24436 +#
24437 +CONFIG_ZONE_DMA=y
24438 +CONFIG_FSL_SOC=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
24445 +
24446 +#
24447 +# Advanced setup
24448 +#
24449 +# CONFIG_ADVANCED_OPTIONS is not set
24450 +
24451 +#
24452 +# Default settings for advanced configuration options are used
24453 +#
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
24461 +
24462 +#
24463 +# Networking
24464 +#
24465 +CONFIG_NET=y
24466 +
24467 +#
24468 +# Networking options
24469 +#
24470 +CONFIG_PACKET=y
24471 +# CONFIG_PACKET_MMAP is not set
24472 +CONFIG_UNIX=y
24473 +# CONFIG_NET_KEY is not set
24474 +CONFIG_INET=y
24475 +CONFIG_IP_MULTICAST=y
24476 +# CONFIG_IP_ADVANCED_ROUTER is not set
24477 +CONFIG_IP_FIB_HASH=y
24478 +CONFIG_IP_PNP=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
24522 +
24523 +#
24524 +# Network testing
24525 +#
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
24531 +
24532 +#
24533 +# Wireless
24534 +#
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
24541 +
24542 +#
24543 +# Device Drivers
24544 +#
24545 +
24546 +#
24547 +# Generic Driver Options
24548 +#
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
24557 +CONFIG_MTD=y
24558 +# CONFIG_MTD_DEBUG is not set
24559 +# CONFIG_MTD_CONCAT is not set
24560 +# CONFIG_MTD_PARTITIONS is not set
24561 +
24562 +#
24563 +# User Modules And Translation Layers
24564 +#
24565 +CONFIG_MTD_CHAR=y
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
24574 +
24575 +#
24576 +# RAM/ROM/Flash chip drivers
24577 +#
24578 +CONFIG_MTD_CFI=y
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
24599 +
24600 +#
24601 +# Mapping drivers for chip access
24602 +#
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
24608 +
24609 +#
24610 +# Self-contained MTD device drivers
24611 +#
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
24616 +
24617 +#
24618 +# Disk-On-Chip Device Drivers
24619 +#
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
24625 +
24626 +#
24627 +# UBI - Unsorted block images
24628 +#
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
24635 +
24636 +#
24637 +# SCSI device support
24638 +#
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
24654 +CONFIG_PHYLIB=y
24655 +
24656 +#
24657 +# MII PHY device drivers
24658 +#
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
24671 +CONFIG_MII=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
24677 +CONFIG_FS_ENET=y
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
24683 +
24684 +#
24685 +# Wireless LAN
24686 +#
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
24698 +
24699 +#
24700 +# Input device support
24701 +#
24702 +CONFIG_INPUT=y
24703 +# CONFIG_INPUT_FF_MEMLESS is not set
24704 +# CONFIG_INPUT_POLLDEV is not set
24705 +
24706 +#
24707 +# Userland interfaces
24708 +#
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
24716 +
24717 +#
24718 +# Input Device Drivers
24719 +#
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
24741 +
24742 +#
24743 +# Hardware I/O ports
24744 +#
24745 +CONFIG_SERIO=y
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
24751 +
24752 +#
24753 +# Character devices
24754 +#
24755 +# CONFIG_VT is not set
24756 +# CONFIG_SERIAL_NONSTANDARD is not set
24757 +
24758 +#
24759 +# Serial drivers
24760 +#
24761 +# CONFIG_SERIAL_8250 is not set
24762 +
24763 +#
24764 +# Non-8250 serial port support
24765 +#
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
24782 +CONFIG_GEN_RTC=y
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
24788 +
24789 +#
24790 +# SPI support
24791 +#
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
24798 +
24799 +#
24800 +# Sonics Silicon Backplane
24801 +#
24802 +CONFIG_SSB_POSSIBLE=y
24803 +# CONFIG_SSB is not set
24804 +
24805 +#
24806 +# Multifunction device drivers
24807 +#
24808 +# CONFIG_MFD_SM501 is not set
24809 +
24810 +#
24811 +# Multimedia devices
24812 +#
24813 +# CONFIG_VIDEO_DEV is not set
24814 +# CONFIG_DVB_CORE is not set
24815 +CONFIG_DAB=y
24816 +
24817 +#
24818 +# Graphics support
24819 +#
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
24824 +
24825 +#
24826 +# Display device support
24827 +#
24828 +# CONFIG_DISPLAY_SUPPORT is not set
24829 +
24830 +#
24831 +# Sound
24832 +#
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
24840 +
24841 +#
24842 +# Userspace I/O
24843 +#
24844 +# CONFIG_UIO is not set
24845 +
24846 +#
24847 +# File systems
24848 +#
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
24866 +
24867 +#
24868 +# CD-ROM/DVD Filesystems
24869 +#
24870 +# CONFIG_ISO9660_FS is not set
24871 +# CONFIG_UDF_FS is not set
24872 +
24873 +#
24874 +# DOS/FAT/NT Filesystems
24875 +#
24876 +# CONFIG_MSDOS_FS is not set
24877 +# CONFIG_VFAT_FS is not set
24878 +# CONFIG_NTFS_FS is not set
24879 +
24880 +#
24881 +# Pseudo filesystems
24882 +#
24883 +CONFIG_PROC_FS=y
24884 +# CONFIG_PROC_KCORE is not set
24885 +CONFIG_PROC_SYSCTL=y
24886 +CONFIG_SYSFS=y
24887 +CONFIG_TMPFS=y
24888 +# CONFIG_TMPFS_POSIX_ACL is not set
24889 +# CONFIG_HUGETLB_PAGE is not set
24890 +# CONFIG_CONFIGFS_FS is not set
24891 +
24892 +#
24893 +# Miscellaneous filesystems
24894 +#
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
24903 +CONFIG_CRAMFS=y
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
24910 +CONFIG_NFS_FS=y
24911 +CONFIG_NFS_V3=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
24916 +CONFIG_ROOT_NFS=y
24917 +CONFIG_LOCKD=y
24918 +CONFIG_LOCKD_V4=y
24919 +CONFIG_NFS_COMMON=y
24920 +CONFIG_SUNRPC=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
24929 +
24930 +#
24931 +# Partition Types
24932 +#
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
24954 +
24955 +#
24956 +# Library routines
24957 +#
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
24967 +CONFIG_HAS_DMA=y
24968 +CONFIG_INSTRUMENTATION=y
24969 +# CONFIG_PROFILING is not set
24970 +# CONFIG_MARKERS is not set
24971 +
24972 +#
24973 +# Kernel hacking
24974 +#
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
25009 +
25010 +#
25011 +# Security options
25012 +#
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
25022 @@ -1,7 +1,7 @@
25023 #
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
25029 #
25030 # CONFIG_PPC64 is not set
25031
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
25037
25038 #
25039 # Platform support
25040 @@ -143,6 +144,9 @@
25041 CONFIG_BAMBOO=y
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
25047 CONFIG_440EP=y
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
25079
25080 #
25081 # Security options
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
25085 @@ -50,7 +50,8 @@
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
25091 +CONFIG_PPC_DCR=y
25092 CONFIG_PPC_OF_PLATFORM_PCI=y
25093 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
25094
25095 @@ -148,7 +149,7 @@
25096 CONFIG_PPC_CELLEB=y
25097 # CONFIG_PPC_PS3 is not set
25098 CONFIG_PPC_CELL=y
25099 -# CONFIG_PPC_CELL_NATIVE is not set
25100 +CONFIG_PPC_CELL_NATIVE=y
25101 # CONFIG_PPC_IBM_CELL_BLADE is not set
25102
25103 #
25104 @@ -157,13 +158,19 @@
25105 CONFIG_SPU_FS=y
25106 CONFIG_SPU_FS_64K_LS=y
25107 CONFIG_SPU_BASE=y
25108 +CONFIG_CBE_RAS=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
25115 +CONFIG_MPIC=y
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
25120 +CONFIG_PPC_RTAS=y
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
25146 +CONFIG_HVC_RTAS=y
25147 CONFIG_HVC_BEAT=y
25148 # CONFIG_IPMI_HANDLER is not set
25149 # CONFIG_HW_RANDOM is not set
25150 @@ -822,6 +831,7 @@
25151 # Watchdog Device Drivers
25152 #
25153 # CONFIG_SOFT_WATCHDOG is not set
25154 +# CONFIG_WATCHDOG_RTAS is not set
25155
25156 #
25157 # PCI-based Watchdog Cards
25158 @@ -1245,17 +1255,7 @@
25159 CONFIG_IRQSTACKS=y
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
25174
25175 #
25176 # Security options
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
25180 @@ -1,7 +1,7 @@
25181 #
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
25187 #
25188 # CONFIG_PPC64 is not set
25189
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
25195
25196 #
25197 # Platform support
25198 @@ -142,6 +143,9 @@
25199 # CONFIG_BAMBOO is not set
25200 CONFIG_EBONY=y
25201 # CONFIG_SEQUOIA is not set
25202 +# CONFIG_TAISHAN is not set
25203 +# CONFIG_KATMAI is not set
25204 +# CONFIG_RAINIER is not set
25205 CONFIG_440GP=y
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
25211 @@ -0,0 +1,952 @@
25212 +#
25213 +# Automatically generated make config: don't edit
25214 +# Linux kernel version: 2.6.24-rc6
25215 +# Mon Dec 24 11:17:13 2007
25216 +#
25217 +# CONFIG_PPC64 is not set
25218 +
25219 +#
25220 +# Processor support
25221 +#
25222 +# CONFIG_6xx is not set
25223 +# CONFIG_PPC_85xx is not set
25224 +# CONFIG_PPC_8xx is not set
25225 +CONFIG_40x=y
25226 +# CONFIG_44x is not set
25227 +# CONFIG_E200 is not set
25228 +CONFIG_4xx=y
25229 +# CONFIG_PPC_MM_SLICES is not set
25230 +CONFIG_NOT_COHERENT_CACHE=y
25231 +CONFIG_PPC32=y
25232 +CONFIG_WORD_SIZE=32
25233 +CONFIG_PPC_MERGE=y
25234 +CONFIG_MMU=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
25247 +CONFIG_PPC=y
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
25252 +CONFIG_PPC_OF=y
25253 +CONFIG_OF=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
25261 +CONFIG_PPC_DCR=y
25262 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
25263 +
25264 +#
25265 +# General setup
25266 +#
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
25272 +CONFIG_SWAP=y
25273 +CONFIG_SYSVIPC=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
25292 +CONFIG_SYSCTL=y
25293 +CONFIG_EMBEDDED=y
25294 +CONFIG_SYSCTL_SYSCALL=y
25295 +CONFIG_KALLSYMS=y
25296 +CONFIG_KALLSYMS_ALL=y
25297 +CONFIG_KALLSYMS_EXTRA_PASS=y
25298 +CONFIG_HOTPLUG=y
25299 +CONFIG_PRINTK=y
25300 +CONFIG_BUG=y
25301 +CONFIG_ELF_CORE=y
25302 +CONFIG_BASE_FULL=y
25303 +CONFIG_FUTEX=y
25304 +CONFIG_ANON_INODES=y
25305 +CONFIG_EPOLL=y
25306 +CONFIG_SIGNALFD=y
25307 +CONFIG_EVENTFD=y
25308 +CONFIG_SHMEM=y
25309 +CONFIG_VM_EVENT_COUNTERS=y
25310 +CONFIG_SLUB_DEBUG=y
25311 +# CONFIG_SLAB is not set
25312 +CONFIG_SLUB=y
25313 +# CONFIG_SLOB is not set
25314 +CONFIG_RT_MUTEXES=y
25315 +# CONFIG_TINY_SHMEM is not set
25316 +CONFIG_BASE_SMALL=0
25317 +CONFIG_MODULES=y
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
25322 +CONFIG_KMOD=y
25323 +CONFIG_BLOCK=y
25324 +CONFIG_LBD=y
25325 +# CONFIG_BLK_DEV_IO_TRACE is not set
25326 +# CONFIG_LSF is not set
25327 +# CONFIG_BLK_DEV_BSG is not set
25328 +
25329 +#
25330 +# IO Schedulers
25331 +#
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
25342 +
25343 +#
25344 +# Platform support
25345 +#
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
25351 +CONFIG_EP405=y
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
25356 +CONFIG_405GP=y
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
25371 +
25372 +#
25373 +# Kernel options
25374 +#
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
25381 +CONFIG_HZ_250=y
25382 +# CONFIG_HZ_300 is not set
25383 +# CONFIG_HZ_1000 is not set
25384 +CONFIG_HZ=250
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
25398 +CONFIG_FLATMEM=y
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
25405 +CONFIG_BOUNCE=y
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
25412 +CONFIG_SECCOMP=y
25413 +CONFIG_WANT_DEVICE_TREE=y
25414 +CONFIG_DEVICE_TREE="ep405.dts"
25415 +CONFIG_ISA_DMA_API=y
25416 +
25417 +#
25418 +# Bus options
25419 +#
25420 +CONFIG_ZONE_DMA=y
25421 +CONFIG_PPC_INDIRECT_PCI=y
25422 +CONFIG_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
25432 +
25433 +#
25434 +# Advanced setup
25435 +#
25436 +# CONFIG_ADVANCED_OPTIONS is not set
25437 +
25438 +#
25439 +# Default settings for advanced configuration options are used
25440 +#
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
25448 +
25449 +#
25450 +# Networking
25451 +#
25452 +CONFIG_NET=y
25453 +
25454 +#
25455 +# Networking options
25456 +#
25457 +CONFIG_PACKET=y
25458 +# CONFIG_PACKET_MMAP is not set
25459 +CONFIG_UNIX=y
25460 +# CONFIG_NET_KEY is not set
25461 +CONFIG_INET=y
25462 +# CONFIG_IP_MULTICAST is not set
25463 +# CONFIG_IP_ADVANCED_ROUTER is not set
25464 +CONFIG_IP_FIB_HASH=y
25465 +CONFIG_IP_PNP=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
25508 +
25509 +#
25510 +# Network testing
25511 +#
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
25517 +
25518 +#
25519 +# Wireless
25520 +#
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
25527 +
25528 +#
25529 +# Device Drivers
25530 +#
25531 +
25532 +#
25533 +# Generic Driver Options
25534 +#
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
25544 +CONFIG_MTD=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
25550 +
25551 +#
25552 +# User Modules And Translation Layers
25553 +#
25554 +CONFIG_MTD_CHAR=y
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
25564 +
25565 +#
25566 +# RAM/ROM/Flash chip drivers
25567 +#
25568 +CONFIG_MTD_CFI=y
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
25589 +
25590 +#
25591 +# Mapping drivers for chip access
25592 +#
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
25598 +
25599 +#
25600 +# Self-contained MTD device drivers
25601 +#
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
25607 +
25608 +#
25609 +# Disk-On-Chip Device Drivers
25610 +#
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
25616 +
25617 +#
25618 +# UBI - Unsorted block images
25619 +#
25620 +# CONFIG_MTD_UBI is not set
25621 +CONFIG_OF_DEVICE=y
25622 +# CONFIG_PARPORT is not set
25623 +CONFIG_BLK_DEV=y
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
25647 +
25648 +#
25649 +# SCSI device support
25650 +#
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
25658 +
25659 +#
25660 +# IEEE 1394 (FireWire) support
25661 +#
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
25728 +
25729 +#
25730 +# Wireless LAN
25731 +#
25732 +# CONFIG_WLAN_PRE80211 is not set
25733 +# CONFIG_WLAN_80211 is not set
25734 +
25735 +#
25736 +# USB Network Adapters
25737 +#
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
25754 +
25755 +#
25756 +# Input device support
25757 +#
25758 +# CONFIG_INPUT is not set
25759 +
25760 +#
25761 +# Hardware I/O ports
25762 +#
25763 +# CONFIG_SERIO is not set
25764 +# CONFIG_GAMEPORT is not set
25765 +
25766 +#
25767 +# Character devices
25768 +#
25769 +# CONFIG_VT is not set
25770 +# CONFIG_SERIAL_NONSTANDARD is not set
25771 +
25772 +#
25773 +# Serial drivers
25774 +#
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
25785 +
25786 +#
25787 +# Non-8250 serial port support
25788 +#
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
25805 +CONFIG_DEVPORT=y
25806 +# CONFIG_I2C is not set
25807 +
25808 +#
25809 +# SPI support
25810 +#
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
25817 +
25818 +#
25819 +# Sonics Silicon Backplane
25820 +#
25821 +CONFIG_SSB_POSSIBLE=y
25822 +# CONFIG_SSB is not set
25823 +
25824 +#
25825 +# Multifunction device drivers
25826 +#
25827 +# CONFIG_MFD_SM501 is not set
25828 +
25829 +#
25830 +# Multimedia devices
25831 +#
25832 +# CONFIG_VIDEO_DEV is not set
25833 +# CONFIG_DVB_CORE is not set
25834 +# CONFIG_DAB is not set
25835 +
25836 +#
25837 +# Graphics support
25838 +#
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
25845 +
25846 +#
25847 +# Display device support
25848 +#
25849 +# CONFIG_DISPLAY_SUPPORT is not set
25850 +
25851 +#
25852 +# Sound
25853 +#
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
25859 +CONFIG_USB=y
25860 +# CONFIG_USB_DEBUG is not set
25861 +
25862 +#
25863 +# Miscellaneous USB options
25864 +#
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
25869 +
25870 +#
25871 +# USB Host Controller Drivers
25872 +#
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
25886 +
25887 +#
25888 +# USB Device Class drivers
25889 +#
25890 +# CONFIG_USB_ACM is not set
25891 +# CONFIG_USB_PRINTER is not set
25892 +
25893 +#
25894 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
25895 +#
25896 +
25897 +#
25898 +# may also be needed; see USB_STORAGE Help for more information
25899 +#
25900 +# CONFIG_USB_LIBUSUAL is not set
25901 +
25902 +#
25903 +# USB Imaging devices
25904 +#
25905 +# CONFIG_USB_MDC800 is not set
25906 +CONFIG_USB_MON=y
25907 +
25908 +#
25909 +# USB port drivers
25910 +#
25911 +
25912 +#
25913 +# USB Serial Converter support
25914 +#
25915 +# CONFIG_USB_SERIAL is not set
25916 +
25917 +#
25918 +# USB Miscellaneous drivers
25919 +#
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
25939 +
25940 +#
25941 +# USB DSL modem support
25942 +#
25943 +
25944 +#
25945 +# USB Gadget Support
25946 +#
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
25953 +
25954 +#
25955 +# Userspace I/O
25956 +#
25957 +# CONFIG_UIO is not set
25958 +
25959 +#
25960 +# File systems
25961 +#
25962 +CONFIG_EXT2_FS=y
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
25975 +CONFIG_INOTIFY=y
25976 +CONFIG_INOTIFY_USER=y
25977 +# CONFIG_QUOTA is not set
25978 +CONFIG_DNOTIFY=y
25979 +# CONFIG_AUTOFS_FS is not set
25980 +# CONFIG_AUTOFS4_FS is not set
25981 +# CONFIG_FUSE_FS is not set
25982 +
25983 +#
25984 +# CD-ROM/DVD Filesystems
25985 +#
25986 +# CONFIG_ISO9660_FS is not set
25987 +# CONFIG_UDF_FS is not set
25988 +
25989 +#
25990 +# DOS/FAT/NT Filesystems
25991 +#
25992 +# CONFIG_MSDOS_FS is not set
25993 +# CONFIG_VFAT_FS is not set
25994 +# CONFIG_NTFS_FS is not set
25995 +
25996 +#
25997 +# Pseudo filesystems
25998 +#
25999 +CONFIG_PROC_FS=y
26000 +CONFIG_PROC_KCORE=y
26001 +CONFIG_PROC_SYSCTL=y
26002 +CONFIG_SYSFS=y
26003 +CONFIG_TMPFS=y
26004 +# CONFIG_TMPFS_POSIX_ACL is not set
26005 +# CONFIG_HUGETLB_PAGE is not set
26006 +# CONFIG_CONFIGFS_FS is not set
26007 +
26008 +#
26009 +# Miscellaneous filesystems
26010 +#
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
26019 +CONFIG_CRAMFS=y
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
26026 +CONFIG_NFS_FS=y
26027 +CONFIG_NFS_V3=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
26032 +CONFIG_ROOT_NFS=y
26033 +CONFIG_LOCKD=y
26034 +CONFIG_LOCKD_V4=y
26035 +CONFIG_NFS_COMMON=y
26036 +CONFIG_SUNRPC=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
26045 +
26046 +#
26047 +# Partition Types
26048 +#
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
26054 +
26055 +#
26056 +# Library routines
26057 +#
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
26062 +CONFIG_CRC32=y
26063 +# CONFIG_CRC7 is not set
26064 +# CONFIG_LIBCRC32C is not set
26065 +CONFIG_ZLIB_INFLATE=y
26066 +CONFIG_PLIST=y
26067 +CONFIG_HAS_IOMEM=y
26068 +CONFIG_HAS_IOPORT=y
26069 +CONFIG_HAS_DMA=y
26070 +CONFIG_INSTRUMENTATION=y
26071 +# CONFIG_PROFILING is not set
26072 +# CONFIG_KPROBES is not set
26073 +# CONFIG_MARKERS is not set
26074 +
26075 +#
26076 +# Kernel hacking
26077 +#
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
26115 +
26116 +#
26117 +# Security options
26118 +#
26119 +# CONFIG_KEYS is not set
26120 +# CONFIG_SECURITY is not set
26121 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
26122 +CONFIG_CRYPTO=y
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
26167 @@ -0,0 +1,821 @@
26168 +#
26169 +# Automatically generated make config: don't edit
26170 +# Linux kernel version: 2.6.24-rc6
26171 +# Fri Jan 11 14:02:06 2008
26172 +#
26173 +# CONFIG_PPC64 is not set
26174 +
26175 +#
26176 +# Processor support
26177 +#
26178 +CONFIG_6xx=y
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
26184 +CONFIG_PPC_FPU=y
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
26189 +CONFIG_PPC32=y
26190 +CONFIG_WORD_SIZE=32
26191 +CONFIG_PPC_MERGE=y
26192 +CONFIG_MMU=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
26205 +CONFIG_PPC=y
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
26210 +CONFIG_PPC_OF=y
26211 +CONFIG_OF=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"
26220 +
26221 +#
26222 +# General setup
26223 +#
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
26229 +CONFIG_SWAP=y
26230 +CONFIG_SYSVIPC=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
26235 +CONFIG_IKCONFIG=y
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
26245 +CONFIG_SYSCTL=y
26246 +CONFIG_EMBEDDED=y
26247 +CONFIG_SYSCTL_SYSCALL=y
26248 +CONFIG_KALLSYMS=y
26249 +CONFIG_KALLSYMS_ALL=y
26250 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
26251 +CONFIG_HOTPLUG=y
26252 +CONFIG_PRINTK=y
26253 +CONFIG_BUG=y
26254 +CONFIG_ELF_CORE=y
26255 +CONFIG_BASE_FULL=y
26256 +CONFIG_FUTEX=y
26257 +CONFIG_ANON_INODES=y
26258 +CONFIG_EPOLL=y
26259 +CONFIG_SIGNALFD=y
26260 +CONFIG_EVENTFD=y
26261 +CONFIG_SHMEM=y
26262 +CONFIG_VM_EVENT_COUNTERS=y
26263 +CONFIG_SLAB=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
26270 +CONFIG_BLOCK=y
26271 +# CONFIG_LBD is not set
26272 +# CONFIG_BLK_DEV_IO_TRACE is not set
26273 +# CONFIG_LSF is not set
26274 +
26275 +#
26276 +# IO Schedulers
26277 +#
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"
26287 +
26288 +#
26289 +# Platform support
26290 +#
26291 +# CONFIG_PPC_MULTIPLATFORM is not set
26292 +CONFIG_PPC_82xx=y
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
26301 +CONFIG_EP8248E=y
26302 +# CONFIG_PQ2ADS is not set
26303 +CONFIG_8260=y
26304 +CONFIG_8272=y
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
26315 +CONFIG_CPM2=y
26316 +CONFIG_PPC_CPM_NEW_BINDING=y
26317 +# CONFIG_FSL_ULI1575 is not set
26318 +CONFIG_CPM=y
26319 +
26320 +#
26321 +# Kernel options
26322 +#
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
26329 +CONFIG_HZ_250=y
26330 +# CONFIG_HZ_300 is not set
26331 +# CONFIG_HZ_1000 is not set
26332 +CONFIG_HZ=250
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
26341 +CONFIG_FLATMEM=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
26348 +CONFIG_BOUNCE=y
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
26359 +
26360 +#
26361 +# Bus options
26362 +#
26363 +CONFIG_ZONE_DMA=y
26364 +CONFIG_FSL_SOC=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
26370 +
26371 +#
26372 +# Advanced setup
26373 +#
26374 +# CONFIG_ADVANCED_OPTIONS is not set
26375 +
26376 +#
26377 +# Default settings for advanced configuration options are used
26378 +#
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
26384 +
26385 +#
26386 +# Networking
26387 +#
26388 +CONFIG_NET=y
26389 +
26390 +#
26391 +# Networking options
26392 +#
26393 +CONFIG_PACKET=y
26394 +# CONFIG_PACKET_MMAP is not set
26395 +CONFIG_UNIX=y
26396 +CONFIG_XFRM=y
26397 +# CONFIG_XFRM_USER is not set
26398 +# CONFIG_NET_KEY is not set
26399 +CONFIG_INET=y
26400 +CONFIG_IP_MULTICAST=y
26401 +# CONFIG_IP_ADVANCED_ROUTER is not set
26402 +CONFIG_IP_FIB_HASH=y
26403 +CONFIG_IP_PNP=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
26426 +CONFIG_IPV6=y
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
26437 +CONFIG_IPV6_SIT=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
26442 +
26443 +#
26444 +# Core Netfilter Configuration
26445 +#
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
26450 +
26451 +#
26452 +# IP: Netfilter Configuration
26453 +#
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
26464 +
26465 +#
26466 +# Network testing
26467 +#
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
26472 +
26473 +#
26474 +# Wireless
26475 +#
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
26480 +
26481 +#
26482 +# Device Drivers
26483 +#
26484 +
26485 +#
26486 +# Generic Driver Options
26487 +#
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
26496 +CONFIG_MTD=y
26497 +# CONFIG_MTD_DEBUG is not set
26498 +# CONFIG_MTD_CONCAT is not set
26499 +# CONFIG_MTD_PARTITIONS is not set
26500 +
26501 +#
26502 +# User Modules And Translation Layers
26503 +#
26504 +CONFIG_MTD_CHAR=y
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
26513 +
26514 +#
26515 +# RAM/ROM/Flash chip drivers
26516 +#
26517 +CONFIG_MTD_CFI=y
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
26543 +
26544 +#
26545 +# Mapping drivers for chip access
26546 +#
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
26551 +
26552 +#
26553 +# Self-contained MTD device drivers
26554 +#
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
26559 +
26560 +#
26561 +# Disk-On-Chip Device Drivers
26562 +#
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
26568 +
26569 +#
26570 +# UBI - Unsorted block images
26571 +#
26572 +# CONFIG_MTD_UBI is not set
26573 +CONFIG_OF_DEVICE=y
26574 +# CONFIG_PARPORT is not set
26575 +CONFIG_BLK_DEV=y
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
26586 +
26587 +#
26588 +# SCSI device support
26589 +#
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
26604 +CONFIG_PHYLIB=y
26605 +
26606 +#
26607 +# MII PHY device drivers
26608 +#
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
26621 +CONFIG_MII=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
26627 +CONFIG_FS_ENET=y
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
26633 +
26634 +#
26635 +# Wireless LAN
26636 +#
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
26646 +
26647 +#
26648 +# Input device support
26649 +#
26650 +# CONFIG_INPUT is not set
26651 +
26652 +#
26653 +# Hardware I/O ports
26654 +#
26655 +# CONFIG_SERIO is not set
26656 +# CONFIG_GAMEPORT is not set
26657 +
26658 +#
26659 +# Character devices
26660 +#
26661 +# CONFIG_VT is not set
26662 +# CONFIG_SERIAL_NONSTANDARD is not set
26663 +
26664 +#
26665 +# Serial drivers
26666 +#
26667 +# CONFIG_SERIAL_8250 is not set
26668 +
26669 +#
26670 +# Non-8250 serial port support
26671 +#
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
26693 +
26694 +#
26695 +# SPI support
26696 +#
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
26703 +
26704 +#
26705 +# Sonics Silicon Backplane
26706 +#
26707 +CONFIG_SSB_POSSIBLE=y
26708 +# CONFIG_SSB is not set
26709 +
26710 +#
26711 +# Multifunction device drivers
26712 +#
26713 +# CONFIG_MFD_SM501 is not set
26714 +
26715 +#
26716 +# Multimedia devices
26717 +#
26718 +# CONFIG_VIDEO_DEV is not set
26719 +# CONFIG_DVB_CORE is not set
26720 +CONFIG_DAB=y
26721 +
26722 +#
26723 +# Graphics support
26724 +#
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
26729 +
26730 +#
26731 +# Display device support
26732 +#
26733 +# CONFIG_DISPLAY_SUPPORT is not set
26734 +
26735 +#
26736 +# Sound
26737 +#
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
26743 +
26744 +#
26745 +# Userspace I/O
26746 +#
26747 +# CONFIG_UIO is not set
26748 +
26749 +#
26750 +# File systems
26751 +#
26752 +CONFIG_EXT2_FS=y
26753 +# CONFIG_EXT2_FS_XATTR is not set
26754 +# CONFIG_EXT2_FS_XIP is not set
26755 +CONFIG_EXT3_FS=y
26756 +# CONFIG_EXT3_FS_XATTR is not set
26757 +CONFIG_JBD=y
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
26765 +CONFIG_INOTIFY=y
26766 +CONFIG_INOTIFY_USER=y
26767 +# CONFIG_QUOTA is not set
26768 +CONFIG_DNOTIFY=y
26769 +# CONFIG_AUTOFS_FS is not set
26770 +CONFIG_AUTOFS4_FS=y
26771 +# CONFIG_FUSE_FS is not set
26772 +
26773 +#
26774 +# CD-ROM/DVD Filesystems
26775 +#
26776 +# CONFIG_ISO9660_FS is not set
26777 +# CONFIG_UDF_FS is not set
26778 +
26779 +#
26780 +# DOS/FAT/NT Filesystems
26781 +#
26782 +# CONFIG_MSDOS_FS is not set
26783 +# CONFIG_VFAT_FS is not set
26784 +# CONFIG_NTFS_FS is not set
26785 +
26786 +#
26787 +# Pseudo filesystems
26788 +#
26789 +CONFIG_PROC_FS=y
26790 +CONFIG_PROC_KCORE=y
26791 +CONFIG_PROC_SYSCTL=y
26792 +CONFIG_SYSFS=y
26793 +CONFIG_TMPFS=y
26794 +# CONFIG_TMPFS_POSIX_ACL is not set
26795 +# CONFIG_HUGETLB_PAGE is not set
26796 +
26797 +#
26798 +# Miscellaneous filesystems
26799 +#
26800 +# CONFIG_HFSPLUS_FS is not set
26801 +# CONFIG_JFFS2_FS is not set
26802 +CONFIG_CRAMFS=y
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
26809 +CONFIG_NFS_FS=y
26810 +CONFIG_NFS_V3=y
26811 +# CONFIG_NFS_V3_ACL is not set
26812 +# CONFIG_NFS_DIRECTIO is not set
26813 +# CONFIG_NFSD is not set
26814 +CONFIG_ROOT_NFS=y
26815 +CONFIG_LOCKD=y
26816 +CONFIG_LOCKD_V4=y
26817 +CONFIG_NFS_COMMON=y
26818 +CONFIG_SUNRPC=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
26823 +
26824 +#
26825 +# Partition Types
26826 +#
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
26845 +CONFIG_NLS=y
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
26884 +CONFIG_NLS_UTF8=y
26885 +# CONFIG_UCC_SLOW is not set
26886 +
26887 +#
26888 +# Library routines
26889 +#
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
26897 +CONFIG_PLIST=y
26898 +CONFIG_HAS_IOMEM=y
26899 +CONFIG_HAS_IOPORT=y
26900 +CONFIG_HAS_DMA=y
26901 +CONFIG_INSTRUMENTATION=y
26902 +# CONFIG_PROFILING is not set
26903 +# CONFIG_MARKERS is not set
26904 +
26905 +#
26906 +# Kernel hacking
26907 +#
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
26945 +
26946 +#
26947 +# Security options
26948 +#
26949 +# CONFIG_KEYS is not set
26950 +# CONFIG_SECURITY is not set
26951 +CONFIG_CRYPTO=y
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
26992 @@ -0,0 +1,790 @@
26993 +#
26994 +# Automatically generated make config: don't edit
26995 +# Linux kernel version: 2.6.24-rc6
26996 +# Mon Dec 24 11:17:43 2007
26997 +#
26998 +# CONFIG_PPC64 is not set
26999 +
27000 +#
27001 +# Processor support
27002 +#
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
27007 +CONFIG_44x=y
27008 +# CONFIG_E200 is not set
27009 +CONFIG_4xx=y
27010 +CONFIG_BOOKE=y
27011 +CONFIG_PTE_64BIT=y
27012 +CONFIG_PHYS_64BIT=y
27013 +# CONFIG_PPC_MM_SLICES is not set
27014 +CONFIG_NOT_COHERENT_CACHE=y
27015 +CONFIG_PPC32=y
27016 +CONFIG_WORD_SIZE=32
27017 +CONFIG_PPC_MERGE=y
27018 +CONFIG_MMU=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
27031 +CONFIG_PPC=y
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
27036 +CONFIG_PPC_OF=y
27037 +CONFIG_OF=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
27045 +CONFIG_PPC_DCR=y
27046 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27047 +
27048 +#
27049 +# General setup
27050 +#
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
27056 +CONFIG_SWAP=y
27057 +CONFIG_SYSVIPC=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
27076 +CONFIG_SYSCTL=y
27077 +CONFIG_EMBEDDED=y
27078 +CONFIG_SYSCTL_SYSCALL=y
27079 +CONFIG_KALLSYMS=y
27080 +# CONFIG_KALLSYMS_ALL is not set
27081 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
27082 +CONFIG_HOTPLUG=y
27083 +CONFIG_PRINTK=y
27084 +CONFIG_BUG=y
27085 +CONFIG_ELF_CORE=y
27086 +CONFIG_BASE_FULL=y
27087 +CONFIG_FUTEX=y
27088 +CONFIG_ANON_INODES=y
27089 +CONFIG_EPOLL=y
27090 +CONFIG_SIGNALFD=y
27091 +CONFIG_EVENTFD=y
27092 +CONFIG_SHMEM=y
27093 +CONFIG_VM_EVENT_COUNTERS=y
27094 +CONFIG_SLUB_DEBUG=y
27095 +# CONFIG_SLAB is not set
27096 +CONFIG_SLUB=y
27097 +# CONFIG_SLOB is not set
27098 +CONFIG_RT_MUTEXES=y
27099 +# CONFIG_TINY_SHMEM is not set
27100 +CONFIG_BASE_SMALL=0
27101 +CONFIG_MODULES=y
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
27106 +CONFIG_KMOD=y
27107 +CONFIG_BLOCK=y
27108 +CONFIG_LBD=y
27109 +# CONFIG_BLK_DEV_IO_TRACE is not set
27110 +# CONFIG_LSF is not set
27111 +# CONFIG_BLK_DEV_BSG is not set
27112 +
27113 +#
27114 +# IO Schedulers
27115 +#
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
27126 +
27127 +#
27128 +# Platform support
27129 +#
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
27139 +CONFIG_KATMAI=y
27140 +# CONFIG_RAINIER is not set
27141 +CONFIG_440SPe=y
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
27154 +
27155 +#
27156 +# Kernel options
27157 +#
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
27164 +CONFIG_HZ_250=y
27165 +# CONFIG_HZ_300 is not set
27166 +# CONFIG_HZ_1000 is not set
27167 +CONFIG_HZ=250
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
27181 +CONFIG_FLATMEM=y
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
27188 +CONFIG_BOUNCE=y
27189 +CONFIG_VIRT_TO_BUS=y
27190 +CONFIG_PROC_DEVICETREE=y
27191 +CONFIG_CMDLINE_BOOL=y
27192 +CONFIG_CMDLINE=""
27193 +CONFIG_SECCOMP=y
27194 +CONFIG_WANT_DEVICE_TREE=y
27195 +CONFIG_DEVICE_TREE="katmai.dts"
27196 +CONFIG_ISA_DMA_API=y
27197 +
27198 +#
27199 +# Bus options
27200 +#
27201 +CONFIG_ZONE_DMA=y
27202 +CONFIG_PPC_INDIRECT_PCI=y
27203 +CONFIG_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
27213 +
27214 +#
27215 +# Advanced setup
27216 +#
27217 +# CONFIG_ADVANCED_OPTIONS is not set
27218 +
27219 +#
27220 +# Default settings for advanced configuration options are used
27221 +#
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
27229 +
27230 +#
27231 +# Networking
27232 +#
27233 +CONFIG_NET=y
27234 +
27235 +#
27236 +# Networking options
27237 +#
27238 +CONFIG_PACKET=y
27239 +# CONFIG_PACKET_MMAP is not set
27240 +CONFIG_UNIX=y
27241 +# CONFIG_NET_KEY is not set
27242 +CONFIG_INET=y
27243 +# CONFIG_IP_MULTICAST is not set
27244 +# CONFIG_IP_ADVANCED_ROUTER is not set
27245 +CONFIG_IP_FIB_HASH=y
27246 +CONFIG_IP_PNP=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
27289 +
27290 +#
27291 +# Network testing
27292 +#
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
27298 +
27299 +#
27300 +# Wireless
27301 +#
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
27308 +
27309 +#
27310 +# Device Drivers
27311 +#
27312 +
27313 +#
27314 +# Generic Driver Options
27315 +#
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
27328 +CONFIG_BLK_DEV=y
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
27351 +
27352 +#
27353 +# SCSI device support
27354 +#
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
27362 +
27363 +#
27364 +# IEEE 1394 (FireWire) support
27365 +#
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
27434 +
27435 +#
27436 +# Wireless LAN
27437 +#
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
27451 +
27452 +#
27453 +# Input device support
27454 +#
27455 +# CONFIG_INPUT is not set
27456 +
27457 +#
27458 +# Hardware I/O ports
27459 +#
27460 +# CONFIG_SERIO is not set
27461 +# CONFIG_GAMEPORT is not set
27462 +
27463 +#
27464 +# Character devices
27465 +#
27466 +# CONFIG_VT is not set
27467 +# CONFIG_SERIAL_NONSTANDARD is not set
27468 +
27469 +#
27470 +# Serial drivers
27471 +#
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
27482 +
27483 +#
27484 +# Non-8250 serial port support
27485 +#
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
27502 +CONFIG_DEVPORT=y
27503 +# CONFIG_I2C is not set
27504 +
27505 +#
27506 +# SPI support
27507 +#
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
27514 +
27515 +#
27516 +# Sonics Silicon Backplane
27517 +#
27518 +CONFIG_SSB_POSSIBLE=y
27519 +# CONFIG_SSB is not set
27520 +
27521 +#
27522 +# Multifunction device drivers
27523 +#
27524 +# CONFIG_MFD_SM501 is not set
27525 +
27526 +#
27527 +# Multimedia devices
27528 +#
27529 +# CONFIG_VIDEO_DEV is not set
27530 +# CONFIG_DVB_CORE is not set
27531 +CONFIG_DAB=y
27532 +
27533 +#
27534 +# Graphics support
27535 +#
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
27542 +
27543 +#
27544 +# Display device support
27545 +#
27546 +# CONFIG_DISPLAY_SUPPORT is not set
27547 +
27548 +#
27549 +# Sound
27550 +#
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
27557 +
27558 +#
27559 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
27560 +#
27561 +
27562 +#
27563 +# USB Gadget Support
27564 +#
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
27571 +
27572 +#
27573 +# Userspace I/O
27574 +#
27575 +# CONFIG_UIO is not set
27576 +
27577 +#
27578 +# File systems
27579 +#
27580 +CONFIG_EXT2_FS=y
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
27593 +CONFIG_INOTIFY=y
27594 +CONFIG_INOTIFY_USER=y
27595 +# CONFIG_QUOTA is not set
27596 +CONFIG_DNOTIFY=y
27597 +# CONFIG_AUTOFS_FS is not set
27598 +# CONFIG_AUTOFS4_FS is not set
27599 +# CONFIG_FUSE_FS is not set
27600 +
27601 +#
27602 +# CD-ROM/DVD Filesystems
27603 +#
27604 +# CONFIG_ISO9660_FS is not set
27605 +# CONFIG_UDF_FS is not set
27606 +
27607 +#
27608 +# DOS/FAT/NT Filesystems
27609 +#
27610 +# CONFIG_MSDOS_FS is not set
27611 +# CONFIG_VFAT_FS is not set
27612 +# CONFIG_NTFS_FS is not set
27613 +
27614 +#
27615 +# Pseudo filesystems
27616 +#
27617 +CONFIG_PROC_FS=y
27618 +CONFIG_PROC_KCORE=y
27619 +CONFIG_PROC_SYSCTL=y
27620 +CONFIG_SYSFS=y
27621 +CONFIG_TMPFS=y
27622 +# CONFIG_TMPFS_POSIX_ACL is not set
27623 +# CONFIG_HUGETLB_PAGE is not set
27624 +# CONFIG_CONFIGFS_FS is not set
27625 +
27626 +#
27627 +# Miscellaneous filesystems
27628 +#
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
27636 +CONFIG_CRAMFS=y
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
27643 +CONFIG_NFS_FS=y
27644 +CONFIG_NFS_V3=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
27649 +CONFIG_ROOT_NFS=y
27650 +CONFIG_LOCKD=y
27651 +CONFIG_LOCKD_V4=y
27652 +CONFIG_NFS_COMMON=y
27653 +CONFIG_SUNRPC=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
27662 +
27663 +#
27664 +# Partition Types
27665 +#
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
27671 +
27672 +#
27673 +# Library routines
27674 +#
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
27679 +CONFIG_CRC32=y
27680 +# CONFIG_CRC7 is not set
27681 +# CONFIG_LIBCRC32C is not set
27682 +CONFIG_ZLIB_INFLATE=y
27683 +CONFIG_PLIST=y
27684 +CONFIG_HAS_IOMEM=y
27685 +CONFIG_HAS_IOPORT=y
27686 +CONFIG_HAS_DMA=y
27687 +CONFIG_INSTRUMENTATION=y
27688 +# CONFIG_PROFILING is not set
27689 +# CONFIG_KPROBES is not set
27690 +# CONFIG_MARKERS is not set
27691 +
27692 +#
27693 +# Kernel hacking
27694 +#
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
27729 +CONFIG_DEBUGGER=y
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
27734 +
27735 +#
27736 +# Security options
27737 +#
27738 +# CONFIG_KEYS is not set
27739 +# CONFIG_SECURITY is not set
27740 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
27741 +CONFIG_CRYPTO=y
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
27786 @@ -1,7 +1,7 @@
27787 #
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
27793 #
27794 # CONFIG_PPC64 is not set
27795
27796 @@ -40,7 +40,7 @@
27797 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
27798 CONFIG_PPC_OF=y
27799 CONFIG_OF=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
27810
27811 #
27812 # Platform support
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
27818 CONFIG_KILAUEA=y
27819 +# CONFIG_MAKALU is not set
27820 # CONFIG_WALNUT is not set
27821 # CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
27822 +CONFIG_405EX=y
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 @@
27827 # Bus options
27828 #
27829 CONFIG_ZONE_DMA=y
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
27835 +CONFIG_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
27845
27846 #
27847 # Advanced setup
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
27854
27855 #
27856 # Self-contained MTD device drivers
27857 #
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
27864 CONFIG_BLK_DEV=y
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
27882 +
27883 +#
27884 +# IEEE 1394 (FireWire) support
27885 +#
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
27924
27925 #
27926 # Wireless LAN
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 @@
27937 #
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
27959 +CONFIG_DEVPORT=y
27960 # CONFIG_I2C is not set
27961
27962 #
27963 @@ -525,6 +580,8 @@
27964 #
27965 # Graphics support
27966 #
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
27979
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
27983 @@ -1,847 +0,0 @@
27984 -#
27985 -# Automatically generated make config: don't edit
27986 -# Linux kernel version: 2.6.24-rc4
27987 -# Thu Dec 6 16:48:24 2007
27988 -#
27989 -# CONFIG_PPC64 is not set
27990 -
27991 -#
27992 -# Processor support
27993 -#
27994 -CONFIG_6xx=y
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
28000 -CONFIG_PPC_FPU=y
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
28006 -CONFIG_PPC32=y
28007 -CONFIG_WORD_SIZE=32
28008 -CONFIG_PPC_MERGE=y
28009 -CONFIG_MMU=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
28022 -CONFIG_PPC=y
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
28027 -CONFIG_PPC_OF=y
28028 -CONFIG_OF=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"
28037 -
28038 -#
28039 -# General setup
28040 -#
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
28046 -CONFIG_SWAP=y
28047 -CONFIG_SYSVIPC=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
28064 -CONFIG_SYSCTL=y
28065 -CONFIG_EMBEDDED=y
28066 -# CONFIG_SYSCTL_SYSCALL is not set
28067 -# CONFIG_KALLSYMS is not set
28068 -CONFIG_HOTPLUG=y
28069 -CONFIG_PRINTK=y
28070 -CONFIG_BUG=y
28071 -CONFIG_ELF_CORE=y
28072 -CONFIG_BASE_FULL=y
28073 -CONFIG_FUTEX=y
28074 -CONFIG_ANON_INODES=y
28075 -# CONFIG_EPOLL is not set
28076 -CONFIG_SIGNALFD=y
28077 -CONFIG_EVENTFD=y
28078 -CONFIG_SHMEM=y
28079 -CONFIG_VM_EVENT_COUNTERS=y
28080 -CONFIG_SLUB_DEBUG=y
28081 -# CONFIG_SLAB is not set
28082 -CONFIG_SLUB=y
28083 -# CONFIG_SLOB is not set
28084 -CONFIG_RT_MUTEXES=y
28085 -# CONFIG_TINY_SHMEM is not set
28086 -CONFIG_BASE_SMALL=0
28087 -CONFIG_MODULES=y
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
28093 -CONFIG_BLOCK=y
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
28098 -
28099 -#
28100 -# IO Schedulers
28101 -#
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"
28111 -
28112 -#
28113 -# Platform support
28114 -#
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
28148 -
28149 -#
28150 -# Kernel options
28151 -#
28152 -# CONFIG_HIGHMEM is not set
28153 -CONFIG_TICK_ONESHOT=y
28154 -CONFIG_NO_HZ=y
28155 -CONFIG_HIGH_RES_TIMERS=y
28156 -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
28157 -# CONFIG_HZ_100 is not set
28158 -CONFIG_HZ_250=y
28159 -# CONFIG_HZ_300 is not set
28160 -# CONFIG_HZ_1000 is not set
28161 -CONFIG_HZ=250
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
28175 -CONFIG_FLATMEM=y
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
28182 -CONFIG_BOUNCE=y
28183 -CONFIG_VIRT_TO_BUS=y
28184 -CONFIG_PROC_DEVICETREE=y
28185 -# CONFIG_CMDLINE_BOOL is not set
28186 -CONFIG_PM=y
28187 -# CONFIG_PM_LEGACY is not set
28188 -# CONFIG_PM_DEBUG is not set
28189 -CONFIG_PM_SLEEP=y
28190 -CONFIG_SUSPEND_UP_POSSIBLE=y
28191 -CONFIG_SUSPEND=y
28192 -CONFIG_HIBERNATION_UP_POSSIBLE=y
28193 -# CONFIG_HIBERNATION is not set
28194 -CONFIG_SECCOMP=y
28195 -CONFIG_WANT_DEVICE_TREE=y
28196 -CONFIG_DEVICE_TREE=""
28197 -CONFIG_ISA_DMA_API=y
28198 -
28199 -#
28200 -# Bus options
28201 -#
28202 -CONFIG_ZONE_DMA=y
28203 -CONFIG_GENERIC_ISA_DMA=y
28204 -# CONFIG_PPC_INDIRECT_PCI is not set
28205 -CONFIG_FSL_SOC=y
28206 -CONFIG_PCI=y
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
28216 -
28217 -#
28218 -# Advanced setup
28219 -#
28220 -# CONFIG_ADVANCED_OPTIONS is not set
28221 -
28222 -#
28223 -# Default settings for advanced configuration options are used
28224 -#
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
28230 -
28231 -#
28232 -# Networking
28233 -#
28234 -CONFIG_NET=y
28235 -
28236 -#
28237 -# Networking options
28238 -#
28239 -CONFIG_PACKET=y
28240 -# CONFIG_PACKET_MMAP is not set
28241 -CONFIG_UNIX=y
28242 -CONFIG_XFRM=y
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
28247 -CONFIG_INET=y
28248 -CONFIG_IP_MULTICAST=y
28249 -# CONFIG_IP_ADVANCED_ROUTER is not set
28250 -CONFIG_IP_FIB_HASH=y
28251 -CONFIG_IP_PNP=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
28295 -
28296 -#
28297 -# Network testing
28298 -#
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
28304 -
28305 -#
28306 -# Wireless
28307 -#
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
28314 -
28315 -#
28316 -# Device Drivers
28317 -#
28318 -
28319 -#
28320 -# Generic Driver Options
28321 -#
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
28333 -CONFIG_BLK_DEV=y
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
28356 -
28357 -#
28358 -# SCSI device support
28359 -#
28360 -# CONFIG_RAID_ATTRS is not set
28361 -CONFIG_SCSI=y
28362 -CONFIG_SCSI_DMA=y
28363 -# CONFIG_SCSI_TGT is not set
28364 -# CONFIG_SCSI_NETLINK is not set
28365 -# CONFIG_SCSI_PROC_FS is not set
28366 -
28367 -#
28368 -# SCSI support type (disk, tape, CD-ROM)
28369 -#
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
28376 -
28377 -#
28378 -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
28379 -#
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
28385 -
28386 -#
28387 -# SCSI Transports
28388 -#
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
28431 -CONFIG_ATA=y
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
28490 -
28491 -#
28492 -# IEEE 1394 (FireWire) support
28493 -#
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
28540 -
28541 -#
28542 -# Wireless LAN
28543 -#
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
28558 -
28559 -#
28560 -# Input device support
28561 -#
28562 -# CONFIG_INPUT is not set
28563 -
28564 -#
28565 -# Hardware I/O ports
28566 -#
28567 -# CONFIG_SERIO is not set
28568 -# CONFIG_GAMEPORT is not set
28569 -
28570 -#
28571 -# Character devices
28572 -#
28573 -# CONFIG_VT is not set
28574 -# CONFIG_SERIAL_NONSTANDARD is not set
28575 -
28576 -#
28577 -# Serial drivers
28578 -#
28579 -# CONFIG_SERIAL_8250 is not set
28580 -
28581 -#
28582 -# Non-8250 serial port support
28583 -#
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
28602 -CONFIG_DEVPORT=y
28603 -# CONFIG_I2C is not set
28604 -
28605 -#
28606 -# SPI support
28607 -#
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
28614 -
28615 -#
28616 -# Sonics Silicon Backplane
28617 -#
28618 -CONFIG_SSB_POSSIBLE=y
28619 -# CONFIG_SSB is not set
28620 -
28621 -#
28622 -# Multifunction device drivers
28623 -#
28624 -# CONFIG_MFD_SM501 is not set
28625 -
28626 -#
28627 -# Multimedia devices
28628 -#
28629 -# CONFIG_VIDEO_DEV is not set
28630 -# CONFIG_DVB_CORE is not set
28631 -# CONFIG_DAB is not set
28632 -
28633 -#
28634 -# Graphics support
28635 -#
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
28642 -
28643 -#
28644 -# Display device support
28645 -#
28646 -# CONFIG_DISPLAY_SUPPORT is not set
28647 -
28648 -#
28649 -# Sound
28650 -#
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
28657 -
28658 -#
28659 -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
28660 -#
28661 -
28662 -#
28663 -# USB Gadget Support
28664 -#
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
28671 -
28672 -#
28673 -# Userspace I/O
28674 -#
28675 -# CONFIG_UIO is not set
28676 -
28677 -#
28678 -# File systems
28679 -#
28680 -CONFIG_EXT2_FS=y
28681 -# CONFIG_EXT2_FS_XATTR is not set
28682 -# CONFIG_EXT2_FS_XIP is not set
28683 -CONFIG_EXT3_FS=y
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
28688 -CONFIG_JBD=y
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
28698 -CONFIG_INOTIFY=y
28699 -CONFIG_INOTIFY_USER=y
28700 -# CONFIG_QUOTA is not set
28701 -CONFIG_DNOTIFY=y
28702 -# CONFIG_AUTOFS_FS is not set
28703 -# CONFIG_AUTOFS4_FS is not set
28704 -# CONFIG_FUSE_FS is not set
28705 -
28706 -#
28707 -# CD-ROM/DVD Filesystems
28708 -#
28709 -# CONFIG_ISO9660_FS is not set
28710 -# CONFIG_UDF_FS is not set
28711 -
28712 -#
28713 -# DOS/FAT/NT Filesystems
28714 -#
28715 -# CONFIG_MSDOS_FS is not set
28716 -# CONFIG_VFAT_FS is not set
28717 -# CONFIG_NTFS_FS is not set
28718 -
28719 -#
28720 -# Pseudo filesystems
28721 -#
28722 -CONFIG_PROC_FS=y
28723 -CONFIG_PROC_KCORE=y
28724 -CONFIG_PROC_SYSCTL=y
28725 -CONFIG_SYSFS=y
28726 -CONFIG_TMPFS=y
28727 -# CONFIG_TMPFS_POSIX_ACL is not set
28728 -# CONFIG_HUGETLB_PAGE is not set
28729 -# CONFIG_CONFIGFS_FS is not set
28730 -
28731 -#
28732 -# Miscellaneous filesystems
28733 -#
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
28755 -
28756 -#
28757 -# Partition Types
28758 -#
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
28764 -
28765 -#
28766 -# Library routines
28767 -#
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
28774 -CONFIG_PLIST=y
28775 -CONFIG_HAS_IOMEM=y
28776 -CONFIG_HAS_IOPORT=y
28777 -CONFIG_HAS_DMA=y
28778 -# CONFIG_INSTRUMENTATION is not set
28779 -
28780 -#
28781 -# Kernel hacking
28782 -#
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
28821 -
28822 -#
28823 -# Security options
28824 -#
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
28834 @@ -0,0 +1,812 @@
28835 +#
28836 +# Automatically generated make config: don't edit
28837 +# Linux kernel version: 2.6.24-rc6
28838 +# Mon Dec 24 11:18:32 2007
28839 +#
28840 +# CONFIG_PPC64 is not set
28841 +
28842 +#
28843 +# Processor support
28844 +#
28845 +# CONFIG_6xx is not set
28846 +# CONFIG_PPC_85xx is not set
28847 +# CONFIG_PPC_8xx is not set
28848 +CONFIG_40x=y
28849 +# CONFIG_44x is not set
28850 +# CONFIG_E200 is not set
28851 +CONFIG_4xx=y
28852 +# CONFIG_PPC_MM_SLICES is not set
28853 +CONFIG_NOT_COHERENT_CACHE=y
28854 +CONFIG_PPC32=y
28855 +CONFIG_WORD_SIZE=32
28856 +CONFIG_PPC_MERGE=y
28857 +CONFIG_MMU=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
28870 +CONFIG_PPC=y
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
28875 +CONFIG_PPC_OF=y
28876 +CONFIG_OF=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
28884 +CONFIG_PPC_DCR=y
28885 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28886 +
28887 +#
28888 +# General setup
28889 +#
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
28895 +CONFIG_SWAP=y
28896 +CONFIG_SYSVIPC=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
28913 +CONFIG_SYSCTL=y
28914 +CONFIG_EMBEDDED=y
28915 +CONFIG_SYSCTL_SYSCALL=y
28916 +CONFIG_KALLSYMS=y
28917 +CONFIG_KALLSYMS_ALL=y
28918 +CONFIG_KALLSYMS_EXTRA_PASS=y
28919 +CONFIG_HOTPLUG=y
28920 +CONFIG_PRINTK=y
28921 +CONFIG_BUG=y
28922 +CONFIG_ELF_CORE=y
28923 +CONFIG_BASE_FULL=y
28924 +CONFIG_FUTEX=y
28925 +CONFIG_ANON_INODES=y
28926 +CONFIG_EPOLL=y
28927 +CONFIG_SIGNALFD=y
28928 +CONFIG_EVENTFD=y
28929 +CONFIG_SHMEM=y
28930 +CONFIG_VM_EVENT_COUNTERS=y
28931 +CONFIG_SLUB_DEBUG=y
28932 +# CONFIG_SLAB is not set
28933 +CONFIG_SLUB=y
28934 +# CONFIG_SLOB is not set
28935 +CONFIG_RT_MUTEXES=y
28936 +# CONFIG_TINY_SHMEM is not set
28937 +CONFIG_BASE_SMALL=0
28938 +CONFIG_MODULES=y
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
28943 +CONFIG_KMOD=y
28944 +CONFIG_BLOCK=y
28945 +CONFIG_LBD=y
28946 +# CONFIG_BLK_DEV_IO_TRACE is not set
28947 +# CONFIG_LSF is not set
28948 +# CONFIG_BLK_DEV_BSG is not set
28949 +
28950 +#
28951 +# IO Schedulers
28952 +#
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
28963 +
28964 +#
28965 +# Platform support
28966 +#
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
28974 +CONFIG_MAKALU=y
28975 +# CONFIG_WALNUT is not set
28976 +# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
28977 +CONFIG_405EX=y
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
28990 +
28991 +#
28992 +# Kernel options
28993 +#
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
29000 +CONFIG_HZ_250=y
29001 +# CONFIG_HZ_300 is not set
29002 +# CONFIG_HZ_1000 is not set
29003 +CONFIG_HZ=250
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
29017 +CONFIG_FLATMEM=y
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
29024 +CONFIG_BOUNCE=y
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
29031 +CONFIG_SECCOMP=y
29032 +CONFIG_WANT_DEVICE_TREE=y
29033 +CONFIG_DEVICE_TREE="kilauea.dts"
29034 +CONFIG_ISA_DMA_API=y
29035 +
29036 +#
29037 +# Bus options
29038 +#
29039 +CONFIG_ZONE_DMA=y
29040 +CONFIG_PPC_INDIRECT_PCI=y
29041 +CONFIG_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
29051 +
29052 +#
29053 +# Advanced setup
29054 +#
29055 +# CONFIG_ADVANCED_OPTIONS is not set
29056 +
29057 +#
29058 +# Default settings for advanced configuration options are used
29059 +#
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
29067 +
29068 +#
29069 +# Networking
29070 +#
29071 +CONFIG_NET=y
29072 +
29073 +#
29074 +# Networking options
29075 +#
29076 +CONFIG_PACKET=y
29077 +# CONFIG_PACKET_MMAP is not set
29078 +CONFIG_UNIX=y
29079 +# CONFIG_NET_KEY is not set
29080 +CONFIG_INET=y
29081 +# CONFIG_IP_MULTICAST is not set
29082 +# CONFIG_IP_ADVANCED_ROUTER is not set
29083 +CONFIG_IP_FIB_HASH=y
29084 +CONFIG_IP_PNP=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
29127 +
29128 +#
29129 +# Network testing
29130 +#
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
29136 +
29137 +#
29138 +# Wireless
29139 +#
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
29146 +
29147 +#
29148 +# Device Drivers
29149 +#
29150 +
29151 +#
29152 +# Generic Driver Options
29153 +#
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
29163 +CONFIG_MTD=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
29169 +
29170 +#
29171 +# User Modules And Translation Layers
29172 +#
29173 +CONFIG_MTD_CHAR=y
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
29183 +
29184 +#
29185 +# RAM/ROM/Flash chip drivers
29186 +#
29187 +CONFIG_MTD_CFI=y
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
29208 +
29209 +#
29210 +# Mapping drivers for chip access
29211 +#
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
29217 +
29218 +#
29219 +# Self-contained MTD device drivers
29220 +#
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
29226 +
29227 +#
29228 +# Disk-On-Chip Device Drivers
29229 +#
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
29235 +
29236 +#
29237 +# UBI - Unsorted block images
29238 +#
29239 +# CONFIG_MTD_UBI is not set
29240 +CONFIG_OF_DEVICE=y
29241 +# CONFIG_PARPORT is not set
29242 +CONFIG_BLK_DEV=y
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
29261 +
29262 +#
29263 +# SCSI device support
29264 +#
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
29272 +
29273 +#
29274 +# IEEE 1394 (FireWire) support
29275 +#
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
29315 +
29316 +#
29317 +# Wireless LAN
29318 +#
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
29332 +
29333 +#
29334 +# Input device support
29335 +#
29336 +# CONFIG_INPUT is not set
29337 +
29338 +#
29339 +# Hardware I/O ports
29340 +#
29341 +# CONFIG_SERIO is not set
29342 +# CONFIG_GAMEPORT is not set
29343 +
29344 +#
29345 +# Character devices
29346 +#
29347 +# CONFIG_VT is not set
29348 +# CONFIG_SERIAL_NONSTANDARD is not set
29349 +
29350 +#
29351 +# Serial drivers
29352 +#
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
29363 +
29364 +#
29365 +# Non-8250 serial port support
29366 +#
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
29383 +CONFIG_DEVPORT=y
29384 +# CONFIG_I2C is not set
29385 +
29386 +#
29387 +# SPI support
29388 +#
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
29395 +
29396 +#
29397 +# Sonics Silicon Backplane
29398 +#
29399 +CONFIG_SSB_POSSIBLE=y
29400 +# CONFIG_SSB is not set
29401 +
29402 +#
29403 +# Multifunction device drivers
29404 +#
29405 +# CONFIG_MFD_SM501 is not set
29406 +
29407 +#
29408 +# Multimedia devices
29409 +#
29410 +# CONFIG_VIDEO_DEV is not set
29411 +# CONFIG_DVB_CORE is not set
29412 +# CONFIG_DAB is not set
29413 +
29414 +#
29415 +# Graphics support
29416 +#
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
29423 +
29424 +#
29425 +# Display device support
29426 +#
29427 +# CONFIG_DISPLAY_SUPPORT is not set
29428 +
29429 +#
29430 +# Sound
29431 +#
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
29439 +
29440 +#
29441 +# Userspace I/O
29442 +#
29443 +# CONFIG_UIO is not set
29444 +
29445 +#
29446 +# File systems
29447 +#
29448 +CONFIG_EXT2_FS=y
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
29461 +CONFIG_INOTIFY=y
29462 +CONFIG_INOTIFY_USER=y
29463 +# CONFIG_QUOTA is not set
29464 +CONFIG_DNOTIFY=y
29465 +# CONFIG_AUTOFS_FS is not set
29466 +# CONFIG_AUTOFS4_FS is not set
29467 +# CONFIG_FUSE_FS is not set
29468 +
29469 +#
29470 +# CD-ROM/DVD Filesystems
29471 +#
29472 +# CONFIG_ISO9660_FS is not set
29473 +# CONFIG_UDF_FS is not set
29474 +
29475 +#
29476 +# DOS/FAT/NT Filesystems
29477 +#
29478 +# CONFIG_MSDOS_FS is not set
29479 +# CONFIG_VFAT_FS is not set
29480 +# CONFIG_NTFS_FS is not set
29481 +
29482 +#
29483 +# Pseudo filesystems
29484 +#
29485 +CONFIG_PROC_FS=y
29486 +CONFIG_PROC_KCORE=y
29487 +CONFIG_PROC_SYSCTL=y
29488 +CONFIG_SYSFS=y
29489 +CONFIG_TMPFS=y
29490 +# CONFIG_TMPFS_POSIX_ACL is not set
29491 +# CONFIG_HUGETLB_PAGE is not set
29492 +# CONFIG_CONFIGFS_FS is not set
29493 +
29494 +#
29495 +# Miscellaneous filesystems
29496 +#
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
29505 +CONFIG_CRAMFS=y
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
29512 +CONFIG_NFS_FS=y
29513 +CONFIG_NFS_V3=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
29518 +CONFIG_ROOT_NFS=y
29519 +CONFIG_LOCKD=y
29520 +CONFIG_LOCKD_V4=y
29521 +CONFIG_NFS_COMMON=y
29522 +CONFIG_SUNRPC=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
29531 +
29532 +#
29533 +# Partition Types
29534 +#
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
29540 +
29541 +#
29542 +# Library routines
29543 +#
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
29548 +CONFIG_CRC32=y
29549 +# CONFIG_CRC7 is not set
29550 +# CONFIG_LIBCRC32C is not set
29551 +CONFIG_ZLIB_INFLATE=y
29552 +CONFIG_PLIST=y
29553 +CONFIG_HAS_IOMEM=y
29554 +CONFIG_HAS_IOPORT=y
29555 +CONFIG_HAS_DMA=y
29556 +# CONFIG_INSTRUMENTATION is not set
29557 +
29558 +#
29559 +# Kernel hacking
29560 +#
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
29598 +
29599 +#
29600 +# Security options
29601 +#
29602 +# CONFIG_KEYS is not set
29603 +# CONFIG_SECURITY is not set
29604 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
29605 +CONFIG_CRYPTO=y
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
29650 @@ -0,0 +1,1286 @@
29651 +#
29652 +# Automatically generated make config: don't edit
29653 +# Linux kernel version: 2.6.24-rc6
29654 +# Fri Jan 18 14:19:54 2008
29655 +#
29656 +# CONFIG_PPC64 is not set
29657 +
29658 +#
29659 +# Processor support
29660 +#
29661 +CONFIG_6xx=y
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
29667 +CONFIG_PPC_FPU=y
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
29673 +CONFIG_PPC32=y
29674 +CONFIG_WORD_SIZE=32
29675 +CONFIG_PPC_MERGE=y
29676 +CONFIG_MMU=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
29689 +CONFIG_PPC=y
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
29694 +CONFIG_PPC_OF=y
29695 +CONFIG_OF=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"
29704 +
29705 +#
29706 +# General setup
29707 +#
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
29713 +CONFIG_SWAP=y
29714 +CONFIG_SYSVIPC=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
29733 +CONFIG_SYSCTL=y
29734 +CONFIG_EMBEDDED=y
29735 +# CONFIG_SYSCTL_SYSCALL is not set
29736 +# CONFIG_KALLSYMS is not set
29737 +CONFIG_HOTPLUG=y
29738 +CONFIG_PRINTK=y
29739 +CONFIG_BUG=y
29740 +CONFIG_ELF_CORE=y
29741 +CONFIG_BASE_FULL=y
29742 +CONFIG_FUTEX=y
29743 +CONFIG_ANON_INODES=y
29744 +# CONFIG_EPOLL is not set
29745 +CONFIG_SIGNALFD=y
29746 +CONFIG_EVENTFD=y
29747 +CONFIG_SHMEM=y
29748 +CONFIG_VM_EVENT_COUNTERS=y
29749 +CONFIG_SLUB_DEBUG=y
29750 +# CONFIG_SLAB is not set
29751 +CONFIG_SLUB=y
29752 +# CONFIG_SLOB is not set
29753 +CONFIG_RT_MUTEXES=y
29754 +# CONFIG_TINY_SHMEM is not set
29755 +CONFIG_BASE_SMALL=0
29756 +CONFIG_MODULES=y
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
29762 +CONFIG_BLOCK=y
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
29767 +
29768 +#
29769 +# IO Schedulers
29770 +#
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"
29780 +
29781 +#
29782 +# Platform support
29783 +#
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
29806 +CONFIG_PPC_RTAS=y
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
29822 +
29823 +#
29824 +# Kernel options
29825 +#
29826 +# CONFIG_HIGHMEM is not set
29827 +CONFIG_TICK_ONESHOT=y
29828 +CONFIG_NO_HZ=y
29829 +CONFIG_HIGH_RES_TIMERS=y
29830 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
29831 +# CONFIG_HZ_100 is not set
29832 +CONFIG_HZ_250=y
29833 +# CONFIG_HZ_300 is not set
29834 +# CONFIG_HZ_1000 is not set
29835 +CONFIG_HZ=250
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
29849 +CONFIG_FLATMEM=y
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
29856 +CONFIG_BOUNCE=y
29857 +CONFIG_VIRT_TO_BUS=y
29858 +CONFIG_PROC_DEVICETREE=y
29859 +# CONFIG_CMDLINE_BOOL is not set
29860 +CONFIG_PM=y
29861 +# CONFIG_PM_LEGACY is not set
29862 +# CONFIG_PM_DEBUG is not set
29863 +CONFIG_PM_SLEEP=y
29864 +CONFIG_SUSPEND_UP_POSSIBLE=y
29865 +CONFIG_SUSPEND=y
29866 +CONFIG_HIBERNATION_UP_POSSIBLE=y
29867 +# CONFIG_HIBERNATION is not set
29868 +CONFIG_SECCOMP=y
29869 +CONFIG_WANT_DEVICE_TREE=y
29870 +CONFIG_DEVICE_TREE=""
29871 +CONFIG_ISA_DMA_API=y
29872 +
29873 +#
29874 +# Bus options
29875 +#
29876 +CONFIG_ZONE_DMA=y
29877 +CONFIG_GENERIC_ISA_DMA=y
29878 +# CONFIG_PPC_INDIRECT_PCI is not set
29879 +CONFIG_FSL_SOC=y
29880 +CONFIG_PCI=y
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
29890 +
29891 +#
29892 +# Advanced setup
29893 +#
29894 +# CONFIG_ADVANCED_OPTIONS is not set
29895 +
29896 +#
29897 +# Default settings for advanced configuration options are used
29898 +#
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
29904 +
29905 +#
29906 +# Networking
29907 +#
29908 +CONFIG_NET=y
29909 +
29910 +#
29911 +# Networking options
29912 +#
29913 +CONFIG_PACKET=y
29914 +# CONFIG_PACKET_MMAP is not set
29915 +CONFIG_UNIX=y
29916 +CONFIG_XFRM=y
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
29921 +CONFIG_INET=y
29922 +CONFIG_IP_MULTICAST=y
29923 +# CONFIG_IP_ADVANCED_ROUTER is not set
29924 +CONFIG_IP_FIB_HASH=y
29925 +CONFIG_IP_PNP=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
29969 +
29970 +#
29971 +# Network testing
29972 +#
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
29978 +
29979 +#
29980 +# Wireless
29981 +#
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
29988 +
29989 +#
29990 +# Device Drivers
29991 +#
29992 +
29993 +#
29994 +# Generic Driver Options
29995 +#
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
30004 +CONFIG_MTD=y
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
30010 +
30011 +#
30012 +# User Modules And Translation Layers
30013 +#
30014 +CONFIG_MTD_CHAR=y
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
30023 +
30024 +#
30025 +# RAM/ROM/Flash chip drivers
30026 +#
30027 +CONFIG_MTD_CFI=y
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
30045 +CONFIG_MTD_RAM=y
30046 +CONFIG_MTD_ROM=y
30047 +# CONFIG_MTD_ABSENT is not set
30048 +
30049 +#
30050 +# Mapping drivers for chip access
30051 +#
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
30057 +
30058 +#
30059 +# Self-contained MTD device drivers
30060 +#
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
30066 +
30067 +#
30068 +# Disk-On-Chip Device Drivers
30069 +#
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
30075 +
30076 +#
30077 +# UBI - Unsorted block images
30078 +#
30079 +# CONFIG_MTD_UBI is not set
30080 +CONFIG_OF_DEVICE=y
30081 +# CONFIG_PARPORT is not set
30082 +CONFIG_BLK_DEV=y
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
30106 +
30107 +#
30108 +# SCSI device support
30109 +#
30110 +# CONFIG_RAID_ATTRS is not set
30111 +CONFIG_SCSI=y
30112 +CONFIG_SCSI_DMA=y
30113 +CONFIG_SCSI_TGT=y
30114 +# CONFIG_SCSI_NETLINK is not set
30115 +CONFIG_SCSI_PROC_FS=y
30116 +
30117 +#
30118 +# SCSI support type (disk, tape, CD-ROM)
30119 +#
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
30126 +
30127 +#
30128 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
30129 +#
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
30135 +
30136 +#
30137 +# SCSI Transports
30138 +#
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
30181 +CONFIG_ATA=y
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
30241 +
30242 +#
30243 +# IEEE 1394 (FireWire) support
30244 +#
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
30259 +CONFIG_PHYLIB=y
30260 +
30261 +#
30262 +# MII PHY device drivers
30263 +#
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
30294 +
30295 +#
30296 +# Wireless LAN
30297 +#
30298 +# CONFIG_WLAN_PRE80211 is not set
30299 +# CONFIG_WLAN_80211 is not set
30300 +
30301 +#
30302 +# USB Network Adapters
30303 +#
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
30321 +
30322 +#
30323 +# Input device support
30324 +#
30325 +# CONFIG_INPUT is not set
30326 +
30327 +#
30328 +# Hardware I/O ports
30329 +#
30330 +# CONFIG_SERIO is not set
30331 +# CONFIG_GAMEPORT is not set
30332 +
30333 +#
30334 +# Character devices
30335 +#
30336 +# CONFIG_VT is not set
30337 +# CONFIG_SERIAL_NONSTANDARD is not set
30338 +
30339 +#
30340 +# Serial drivers
30341 +#
30342 +# CONFIG_SERIAL_8250 is not set
30343 +
30344 +#
30345 +# Non-8250 serial port support
30346 +#
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
30361 +CONFIG_GEN_RTC=y
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
30367 +CONFIG_DEVPORT=y
30368 +CONFIG_I2C=y
30369 +CONFIG_I2C_BOARDINFO=y
30370 +CONFIG_I2C_CHARDEV=y
30371 +
30372 +#
30373 +# I2C Algorithms
30374 +#
30375 +# CONFIG_I2C_ALGOBIT is not set
30376 +# CONFIG_I2C_ALGOPCF is not set
30377 +# CONFIG_I2C_ALGOPCA is not set
30378 +
30379 +#
30380 +# I2C Hardware Bus support
30381 +#
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
30390 +CONFIG_I2C_MPC=y
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
30406 +
30407 +#
30408 +# Miscellaneous I2C Chip support
30409 +#
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
30424 +
30425 +#
30426 +# SPI support
30427 +#
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
30432 +CONFIG_HWMON=y
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
30483 +CONFIG_WATCHDOG=y
30484 +# CONFIG_WATCHDOG_NOWAYOUT is not set
30485 +
30486 +#
30487 +# Watchdog Device Drivers
30488 +#
30489 +# CONFIG_SOFT_WATCHDOG is not set
30490 +# CONFIG_MPC5200_WDT is not set
30491 +# CONFIG_WATCHDOG_RTAS is not set
30492 +
30493 +#
30494 +# PCI-based Watchdog Cards
30495 +#
30496 +# CONFIG_PCIPCWATCHDOG is not set
30497 +# CONFIG_WDTPCI is not set
30498 +
30499 +#
30500 +# USB-based Watchdog Cards
30501 +#
30502 +# CONFIG_USBPCWATCHDOG is not set
30503 +
30504 +#
30505 +# Sonics Silicon Backplane
30506 +#
30507 +CONFIG_SSB_POSSIBLE=y
30508 +# CONFIG_SSB is not set
30509 +
30510 +#
30511 +# Multifunction device drivers
30512 +#
30513 +# CONFIG_MFD_SM501 is not set
30514 +
30515 +#
30516 +# Multimedia devices
30517 +#
30518 +# CONFIG_VIDEO_DEV is not set
30519 +# CONFIG_DVB_CORE is not set
30520 +CONFIG_DAB=y
30521 +# CONFIG_USB_DABUSB is not set
30522 +
30523 +#
30524 +# Graphics support
30525 +#
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
30532 +
30533 +#
30534 +# Display device support
30535 +#
30536 +# CONFIG_DISPLAY_SUPPORT is not set
30537 +
30538 +#
30539 +# Sound
30540 +#
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
30546 +CONFIG_USB=y
30547 +# CONFIG_USB_DEBUG is not set
30548 +
30549 +#
30550 +# Miscellaneous USB options
30551 +#
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
30558 +
30559 +#
30560 +# USB Host Controller Drivers
30561 +#
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
30576 +
30577 +#
30578 +# USB Device Class drivers
30579 +#
30580 +# CONFIG_USB_ACM is not set
30581 +# CONFIG_USB_PRINTER is not set
30582 +
30583 +#
30584 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
30585 +#
30586 +
30587 +#
30588 +# may also be needed; see USB_STORAGE Help for more information
30589 +#
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
30603 +
30604 +#
30605 +# USB Imaging devices
30606 +#
30607 +# CONFIG_USB_MDC800 is not set
30608 +# CONFIG_USB_MICROTEK is not set
30609 +CONFIG_USB_MON=y
30610 +
30611 +#
30612 +# USB port drivers
30613 +#
30614 +
30615 +#
30616 +# USB Serial Converter support
30617 +#
30618 +# CONFIG_USB_SERIAL is not set
30619 +
30620 +#
30621 +# USB Miscellaneous drivers
30622 +#
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
30642 +
30643 +#
30644 +# USB DSL modem support
30645 +#
30646 +
30647 +#
30648 +# USB Gadget Support
30649 +#
30650 +# CONFIG_USB_GADGET is not set
30651 +# CONFIG_MMC is not set
30652 +CONFIG_NEW_LEDS=y
30653 +CONFIG_LEDS_CLASS=y
30654 +
30655 +#
30656 +# LED drivers
30657 +#
30658 +
30659 +#
30660 +# LED Triggers
30661 +#
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
30668 +
30669 +#
30670 +# Userspace I/O
30671 +#
30672 +# CONFIG_UIO is not set
30673 +
30674 +#
30675 +# File systems
30676 +#
30677 +CONFIG_EXT2_FS=y
30678 +# CONFIG_EXT2_FS_XATTR is not set
30679 +# CONFIG_EXT2_FS_XIP is not set
30680 +CONFIG_EXT3_FS=y
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
30685 +CONFIG_JBD=y
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
30695 +CONFIG_INOTIFY=y
30696 +CONFIG_INOTIFY_USER=y
30697 +# CONFIG_QUOTA is not set
30698 +CONFIG_DNOTIFY=y
30699 +# CONFIG_AUTOFS_FS is not set
30700 +# CONFIG_AUTOFS4_FS is not set
30701 +# CONFIG_FUSE_FS is not set
30702 +
30703 +#
30704 +# CD-ROM/DVD Filesystems
30705 +#
30706 +# CONFIG_ISO9660_FS is not set
30707 +# CONFIG_UDF_FS is not set
30708 +
30709 +#
30710 +# DOS/FAT/NT Filesystems
30711 +#
30712 +CONFIG_FAT_FS=y
30713 +CONFIG_MSDOS_FS=y
30714 +CONFIG_VFAT_FS=y
30715 +CONFIG_FAT_DEFAULT_CODEPAGE=437
30716 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
30717 +# CONFIG_NTFS_FS is not set
30718 +
30719 +#
30720 +# Pseudo filesystems
30721 +#
30722 +CONFIG_PROC_FS=y
30723 +CONFIG_PROC_KCORE=y
30724 +CONFIG_PROC_SYSCTL=y
30725 +CONFIG_SYSFS=y
30726 +CONFIG_TMPFS=y
30727 +# CONFIG_TMPFS_POSIX_ACL is not set
30728 +# CONFIG_HUGETLB_PAGE is not set
30729 +# CONFIG_CONFIGFS_FS is not set
30730 +
30731 +#
30732 +# Miscellaneous filesystems
30733 +#
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
30741 +CONFIG_JFFS2_FS=y
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
30752 +CONFIG_CRAMFS=y
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
30759 +CONFIG_NFS_FS=y
30760 +CONFIG_NFS_V3=y
30761 +# CONFIG_NFS_V3_ACL is not set
30762 +CONFIG_NFS_V4=y
30763 +# CONFIG_NFS_DIRECTIO is not set
30764 +# CONFIG_NFSD is not set
30765 +CONFIG_ROOT_NFS=y
30766 +CONFIG_LOCKD=y
30767 +CONFIG_LOCKD_V4=y
30768 +CONFIG_NFS_COMMON=y
30769 +CONFIG_SUNRPC=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
30779 +
30780 +#
30781 +# Partition Types
30782 +#
30783 +# CONFIG_PARTITION_ADVANCED is not set
30784 +CONFIG_MSDOS_PARTITION=y
30785 +CONFIG_NLS=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
30827 +
30828 +#
30829 +# Library routines
30830 +#
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
30835 +CONFIG_CRC32=y
30836 +# CONFIG_CRC7 is not set
30837 +# CONFIG_LIBCRC32C is not set
30838 +CONFIG_ZLIB_INFLATE=y
30839 +CONFIG_ZLIB_DEFLATE=y
30840 +CONFIG_PLIST=y
30841 +CONFIG_HAS_IOMEM=y
30842 +CONFIG_HAS_IOPORT=y
30843 +CONFIG_HAS_DMA=y
30844 +# CONFIG_INSTRUMENTATION is not set
30845 +
30846 +#
30847 +# Kernel hacking
30848 +#
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
30887 +
30888 +#
30889 +# Security options
30890 +#
30891 +# CONFIG_KEYS is not set
30892 +# CONFIG_SECURITY is not set
30893 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
30894 +CONFIG_CRYPTO=y
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
30940 @@ -1,7 +1,7 @@
30941 #
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
30947 #
30948 # CONFIG_PPC64 is not set
30949
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 @@
30959 CONFIG_MTD=y
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
30966
30967 #
30968 # User Modules And Translation Layers
30969 #
30970 CONFIG_MTD_CHAR=y
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
30981 #
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
30992
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
30998 +CONFIG_MTD_NAND=y
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
31009
31010 #
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
31016 +CONFIG_JFFS2_FS=y
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 @@
31031 CONFIG_CRC32=y
31032 # CONFIG_CRC7 is not set
31033 # CONFIG_LIBCRC32C is not set
31034 +CONFIG_ZLIB_INFLATE=y
31035 +CONFIG_ZLIB_DEFLATE=y
31036 CONFIG_PLIST=y
31037 CONFIG_HAS_IOMEM=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
31049 CONFIG_MD=y
31050 CONFIG_BLK_DEV_MD=y
31051 CONFIG_MD_LINEAR=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
31055 @@ -0,0 +1,878 @@
31056 +#
31057 +# Automatically generated make config: don't edit
31058 +# Linux kernel version: 2.6.23
31059 +# Wed Oct 10 16:31:39 2007
31060 +#
31061 +# CONFIG_PPC64 is not set
31062 +
31063 +#
31064 +# Processor support
31065 +#
31066 +CONFIG_6xx=y
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
31072 +CONFIG_83xx=y
31073 +CONFIG_PPC_FPU=y
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
31078 +CONFIG_PPC32=y
31079 +CONFIG_PPC_MERGE=y
31080 +CONFIG_MMU=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
31089 +CONFIG_PPC=y
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
31094 +CONFIG_PPC_OF=y
31095 +CONFIG_OF=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"
31104 +
31105 +#
31106 +# General setup
31107 +#
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
31113 +CONFIG_SWAP=y
31114 +CONFIG_SYSVIPC=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
31128 +CONFIG_SYSCTL=y
31129 +CONFIG_EMBEDDED=y
31130 +CONFIG_SYSCTL_SYSCALL=y
31131 +CONFIG_KALLSYMS=y
31132 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
31133 +CONFIG_HOTPLUG=y
31134 +CONFIG_PRINTK=y
31135 +CONFIG_BUG=y
31136 +CONFIG_ELF_CORE=y
31137 +CONFIG_BASE_FULL=y
31138 +CONFIG_FUTEX=y
31139 +CONFIG_ANON_INODES=y
31140 +# CONFIG_EPOLL is not set
31141 +CONFIG_SIGNALFD=y
31142 +CONFIG_EVENTFD=y
31143 +CONFIG_SHMEM=y
31144 +CONFIG_VM_EVENT_COUNTERS=y
31145 +CONFIG_SLAB=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
31151 +CONFIG_MODULES=y
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
31157 +CONFIG_BLOCK=y
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
31162 +
31163 +#
31164 +# IO Schedulers
31165 +#
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"
31175 +
31176 +#
31177 +# Platform support
31178 +#
31179 +# CONFIG_PPC_MULTIPLATFORM is not set
31180 +# CONFIG_EMBEDDED6xx is not set
31181 +# CONFIG_PPC_82xx is not set
31182 +CONFIG_PPC_83xx=y
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
31210 +
31211 +#
31212 +# Kernel options
31213 +#
31214 +# CONFIG_HIGHMEM is not set
31215 +# CONFIG_HZ_100 is not set
31216 +CONFIG_HZ_250=y
31217 +# CONFIG_HZ_300 is not set
31218 +# CONFIG_HZ_1000 is not set
31219 +CONFIG_HZ=250
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
31232 +CONFIG_FLATMEM=y
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
31238 +CONFIG_BOUNCE=y
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
31245 +CONFIG_SECCOMP=y
31246 +CONFIG_WANT_DEVICE_TREE=y
31247 +CONFIG_DEVICE_TREE=""
31248 +CONFIG_ISA_DMA_API=y
31249 +
31250 +#
31251 +# Bus options
31252 +#
31253 +CONFIG_ZONE_DMA=y
31254 +CONFIG_GENERIC_ISA_DMA=y
31255 +CONFIG_PPC_INDIRECT_PCI=y
31256 +CONFIG_FSL_SOC=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
31261 +
31262 +#
31263 +# PCCARD (PCMCIA/CardBus) support
31264 +#
31265 +# CONFIG_PCCARD is not set
31266 +
31267 +#
31268 +# Advanced setup
31269 +#
31270 +# CONFIG_ADVANCED_OPTIONS is not set
31271 +
31272 +#
31273 +# Default settings for advanced configuration options are used
31274 +#
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
31280 +
31281 +#
31282 +# Networking
31283 +#
31284 +CONFIG_NET=y
31285 +
31286 +#
31287 +# Networking options
31288 +#
31289 +CONFIG_PACKET=y
31290 +# CONFIG_PACKET_MMAP is not set
31291 +CONFIG_UNIX=y
31292 +CONFIG_XFRM=y
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
31297 +CONFIG_INET=y
31298 +CONFIG_IP_MULTICAST=y
31299 +# CONFIG_IP_ADVANCED_ROUTER is not set
31300 +CONFIG_IP_FIB_HASH=y
31301 +CONFIG_IP_PNP=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
31343 +
31344 +#
31345 +# QoS and/or fair queueing
31346 +#
31347 +# CONFIG_NET_SCHED is not set
31348 +
31349 +#
31350 +# Network testing
31351 +#
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
31357 +
31358 +#
31359 +# Wireless
31360 +#
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
31367 +
31368 +#
31369 +# Device Drivers
31370 +#
31371 +
31372 +#
31373 +# Generic Driver Options
31374 +#
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
31383 +CONFIG_BLK_DEV=y
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
31398 +
31399 +#
31400 +# SCSI device support
31401 +#
31402 +# CONFIG_RAID_ATTRS is not set
31403 +CONFIG_SCSI=y
31404 +CONFIG_SCSI_DMA=y
31405 +# CONFIG_SCSI_TGT is not set
31406 +# CONFIG_SCSI_NETLINK is not set
31407 +CONFIG_SCSI_PROC_FS=y
31408 +
31409 +#
31410 +# SCSI support type (disk, tape, CD-ROM)
31411 +#
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
31418 +
31419 +#
31420 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
31421 +#
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
31427 +
31428 +#
31429 +# SCSI Transports
31430 +#
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
31438 +CONFIG_ATA=y
31439 +# CONFIG_ATA_NONSTANDARD is not set
31440 +CONFIG_SATA_FSL=y
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
31451 +CONFIG_PHYLIB=y
31452 +
31453 +#
31454 +# MII PHY device drivers
31455 +#
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
31467 +CONFIG_MII=y
31468 +CONFIG_NETDEV_1000=y
31469 +CONFIG_GIANFAR=y
31470 +# CONFIG_GFAR_NAPI is not set
31471 +CONFIG_NETDEV_10000=y
31472 +
31473 +#
31474 +# Wireless LAN
31475 +#
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
31487 +
31488 +#
31489 +# Input device support
31490 +#
31491 +CONFIG_INPUT=y
31492 +# CONFIG_INPUT_FF_MEMLESS is not set
31493 +# CONFIG_INPUT_POLLDEV is not set
31494 +
31495 +#
31496 +# Userland interfaces
31497 +#
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
31503 +
31504 +#
31505 +# Input Device Drivers
31506 +#
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
31513 +
31514 +#
31515 +# Hardware I/O ports
31516 +#
31517 +# CONFIG_SERIO is not set
31518 +# CONFIG_GAMEPORT is not set
31519 +
31520 +#
31521 +# Character devices
31522 +#
31523 +# CONFIG_VT is not set
31524 +# CONFIG_SERIAL_NONSTANDARD is not set
31525 +
31526 +#
31527 +# Serial drivers
31528 +#
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
31534 +
31535 +#
31536 +# Non-8250 serial port support
31537 +#
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
31546 +CONFIG_WATCHDOG=y
31547 +# CONFIG_WATCHDOG_NOWAYOUT is not set
31548 +
31549 +#
31550 +# Watchdog Device Drivers
31551 +#
31552 +# CONFIG_SOFT_WATCHDOG is not set
31553 +CONFIG_83xx_WDT=y
31554 +# CONFIG_HW_RANDOM is not set
31555 +# CONFIG_NVRAM is not set
31556 +CONFIG_GEN_RTC=y
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
31561 +CONFIG_I2C=y
31562 +CONFIG_I2C_BOARDINFO=y
31563 +CONFIG_I2C_CHARDEV=y
31564 +
31565 +#
31566 +# I2C Algorithms
31567 +#
31568 +# CONFIG_I2C_ALGOBIT is not set
31569 +# CONFIG_I2C_ALGOPCF is not set
31570 +# CONFIG_I2C_ALGOPCA is not set
31571 +
31572 +#
31573 +# I2C Hardware Bus support
31574 +#
31575 +CONFIG_I2C_MPC=y
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
31581 +
31582 +#
31583 +# Miscellaneous I2C Chip support
31584 +#
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
31599 +
31600 +#
31601 +# SPI support
31602 +#
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
31607 +CONFIG_HWMON=y
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
31656 +
31657 +#
31658 +# Multifunction device drivers
31659 +#
31660 +# CONFIG_MFD_SM501 is not set
31661 +
31662 +#
31663 +# Multimedia devices
31664 +#
31665 +# CONFIG_VIDEO_DEV is not set
31666 +# CONFIG_DVB_CORE is not set
31667 +CONFIG_DAB=y
31668 +
31669 +#
31670 +# Graphics support
31671 +#
31672 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
31673 +
31674 +#
31675 +# Display device support
31676 +#
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
31682 +
31683 +#
31684 +# Sound
31685 +#
31686 +# CONFIG_SOUND is not set
31687 +CONFIG_HID_SUPPORT=y
31688 +CONFIG_HID=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
31695 +
31696 +#
31697 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
31698 +#
31699 +
31700 +#
31701 +# USB Gadget Support
31702 +#
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
31708 +
31709 +#
31710 +# DMA Engine support
31711 +#
31712 +# CONFIG_DMA_ENGINE is not set
31713 +
31714 +#
31715 +# DMA Clients
31716 +#
31717 +
31718 +#
31719 +# DMA Devices
31720 +#
31721 +
31722 +#
31723 +# Userspace I/O
31724 +#
31725 +# CONFIG_UIO is not set
31726 +
31727 +#
31728 +# File systems
31729 +#
31730 +CONFIG_EXT2_FS=y
31731 +# CONFIG_EXT2_FS_XATTR is not set
31732 +# CONFIG_EXT2_FS_XIP is not set
31733 +CONFIG_EXT3_FS=y
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
31738 +CONFIG_JBD=y
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
31749 +CONFIG_INOTIFY=y
31750 +CONFIG_INOTIFY_USER=y
31751 +# CONFIG_QUOTA is not set
31752 +CONFIG_DNOTIFY=y
31753 +# CONFIG_AUTOFS_FS is not set
31754 +# CONFIG_AUTOFS4_FS is not set
31755 +# CONFIG_FUSE_FS is not set
31756 +
31757 +#
31758 +# CD-ROM/DVD Filesystems
31759 +#
31760 +# CONFIG_ISO9660_FS is not set
31761 +# CONFIG_UDF_FS is not set
31762 +
31763 +#
31764 +# DOS/FAT/NT Filesystems
31765 +#
31766 +# CONFIG_MSDOS_FS is not set
31767 +# CONFIG_VFAT_FS is not set
31768 +# CONFIG_NTFS_FS is not set
31769 +
31770 +#
31771 +# Pseudo filesystems
31772 +#
31773 +CONFIG_PROC_FS=y
31774 +CONFIG_PROC_KCORE=y
31775 +CONFIG_PROC_SYSCTL=y
31776 +CONFIG_SYSFS=y
31777 +CONFIG_TMPFS=y
31778 +# CONFIG_TMPFS_POSIX_ACL is not set
31779 +# CONFIG_HUGETLB_PAGE is not set
31780 +CONFIG_RAMFS=y
31781 +# CONFIG_CONFIGFS_FS is not set
31782 +
31783 +#
31784 +# Miscellaneous filesystems
31785 +#
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
31799 +
31800 +#
31801 +# Network File Systems
31802 +#
31803 +CONFIG_NFS_FS=y
31804 +CONFIG_NFS_V3=y
31805 +# CONFIG_NFS_V3_ACL is not set
31806 +CONFIG_NFS_V4=y
31807 +# CONFIG_NFS_DIRECTIO is not set
31808 +# CONFIG_NFSD is not set
31809 +CONFIG_ROOT_NFS=y
31810 +CONFIG_LOCKD=y
31811 +CONFIG_LOCKD_V4=y
31812 +CONFIG_NFS_COMMON=y
31813 +CONFIG_SUNRPC=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
31823 +
31824 +#
31825 +# Partition Types
31826 +#
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
31845 +
31846 +#
31847 +# Native Language Support
31848 +#
31849 +# CONFIG_NLS is not set
31850 +
31851 +#
31852 +# Distributed Lock Manager
31853 +#
31854 +# CONFIG_DLM is not set
31855 +# CONFIG_UCC_SLOW is not set
31856 +
31857 +#
31858 +# Library routines
31859 +#
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
31864 +CONFIG_CRC32=y
31865 +# CONFIG_CRC7 is not set
31866 +# CONFIG_LIBCRC32C is not set
31867 +CONFIG_PLIST=y
31868 +CONFIG_HAS_IOMEM=y
31869 +CONFIG_HAS_IOPORT=y
31870 +CONFIG_HAS_DMA=y
31871 +
31872 +#
31873 +# Instrumentation Support
31874 +#
31875 +# CONFIG_PROFILING is not set
31876 +# CONFIG_KPROBES is not set
31877 +
31878 +#
31879 +# Kernel hacking
31880 +#
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
31890 +
31891 +#
31892 +# Security options
31893 +#
31894 +# CONFIG_KEYS is not set
31895 +# CONFIG_SECURITY is not set
31896 +CONFIG_CRYPTO=y
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
31949 CONFIG_DEVPORT=y
31950 -# CONFIG_I2C is not set
31951 +CONFIG_I2C=y
31952 +CONFIG_I2C_BOARDINFO=y
31953 +# CONFIG_I2C_CHARDEV is not set
31954 +
31955 +#
31956 +# I2C Algorithms
31957 +#
31958 +# CONFIG_I2C_ALGOBIT is not set
31959 +# CONFIG_I2C_ALGOPCF is not set
31960 +# CONFIG_I2C_ALGOPCA is not set
31961 +
31962 +#
31963 +# I2C Hardware Bus support
31964 +#
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
31973 +CONFIG_I2C_MPC=y
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
31987 +
31988 +#
31989 +# Miscellaneous I2C Chip support
31990 +#
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
32005
32006 #
32007 # SPI support
32008 @@ -763,7 +816,119 @@
32009 #
32010 # Sound
32011 #
32012 -# CONFIG_SOUND is not set
32013 +CONFIG_SOUND=y
32014 +
32015 +#
32016 +# Advanced Linux Sound Architecture
32017 +#
32018 +CONFIG_SND=y
32019 +CONFIG_SND_TIMER=y
32020 +CONFIG_SND_PCM=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
32031 +
32032 +#
32033 +# Generic devices
32034 +#
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
32039 +
32040 +#
32041 +# PCI devices
32042 +#
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
32100 +
32101 +#
32102 +# ALSA PowerMac devices
32103 +#
32104 +
32105 +#
32106 +# ALSA PowerPC devices
32107 +#
32108 +
32109 +#
32110 +# System on Chip audio support
32111 +#
32112 +CONFIG_SND_SOC=y
32113 +
32114 +#
32115 +# SoC Audio support for SuperH
32116 +#
32117 +
32118 +#
32119 +# ALSA SoC audio for Freescale SOCs
32120 +#
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
32125 +
32126 CONFIG_HID_SUPPORT=y
32127 CONFIG_HID=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
32132 @@ -1,7 +1,7 @@
32133 #
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
32139 #
32140 CONFIG_PPC64=y
32141
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
32155 +CONFIG_PCI_MSI=y
32156 CONFIG_PCI_LEGACY=y
32157 # CONFIG_PCI_DEBUG is not set
32158 CONFIG_PCCARD=y
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
32165 +CONFIG_MD=y
32166 +CONFIG_BLK_DEV_MD=y
32167 +CONFIG_MD_LINEAR=y
32168 +CONFIG_MD_RAID0=y
32169 +CONFIG_MD_RAID1=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
32177 +CONFIG_DM_CRYPT=y
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
32185
32186 #
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
32195 CONFIG_CRYPTO=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
32201 @@ -1,7 +1,7 @@
32202 #
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
32207 #
32208 CONFIG_PPC64=y
32209
32210 @@ -211,7 +211,7 @@
32211 CONFIG_MPIC_U3_HT_IRQS=y
32212 CONFIG_MPIC_BROKEN_REGREAD=y
32213 CONFIG_IBMVIO=y
32214 -# CONFIG_IBMEBUS is not set
32215 +CONFIG_IBMEBUS=y
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
32224 +CONFIG_INET_LRO=m
32225 CONFIG_INET_DIAG=y
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
32232 +CONFIG_EHEA=m
32233 # CONFIG_IXGBE is not set
32234 CONFIG_IXGB=m
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
32247 @@ -1,7 +1,7 @@
32248 #
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
32254 #
32255 CONFIG_PPC64=y
32256
32257 @@ -103,6 +103,7 @@
32258 CONFIG_SLAB=y
32259 # CONFIG_SLUB is not set
32260 # CONFIG_SLOB is not set
32261 +CONFIG_SLABINFO=y
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
32270 CONFIG_PS3_VUART=y
32271 CONFIG_PS3_PS3AV=y
32272 CONFIG_PS3_SYS_MANAGER=y
32273 @@ -162,6 +162,7 @@
32274 CONFIG_PS3_DISK=y
32275 CONFIG_PS3_ROM=y
32276 CONFIG_PS3_FLASH=y
32277 +CONFIG_PS3_LPM=m
32278 CONFIG_PPC_CELL=y
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
32295 +CONFIG_BT=m
32296 +CONFIG_BT_L2CAP=m
32297 +CONFIG_BT_SCO=m
32298 +CONFIG_BT_RFCOMM=m
32299 +CONFIG_BT_RFCOMM_TTY=y
32300 +CONFIG_BT_BNEP=m
32301 +CONFIG_BT_BNEP_MC_FILTER=y
32302 +CONFIG_BT_BNEP_PROTO_FILTER=y
32303 +CONFIG_BT_HIDP=m
32304 +
32305 +#
32306 +# Bluetooth device drivers
32307 +#
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
32316
32317 #
32318 @@ -666,14 +686,14 @@
32319 #
32320 # Sound
32321 #
32322 -CONFIG_SOUND=y
32323 +CONFIG_SOUND=m
32324
32325 #
32326 # Advanced Linux Sound Architecture
32327 #
32328 -CONFIG_SND=y
32329 -CONFIG_SND_TIMER=y
32330 -CONFIG_SND_PCM=y
32331 +CONFIG_SND=m
32332 +CONFIG_SND_TIMER=m
32333 +CONFIG_SND_PCM=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 @@
32338 #
32339 # ALSA PowerPC devices
32340 #
32341 -CONFIG_SND_PS3=y
32342 +CONFIG_SND_PS3=m
32343 CONFIG_SND_PS3_DEFAULT_START_DELAY=2000
32344
32345 #
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
32350 -CONFIG_USB=y
32351 +CONFIG_USB=m
32352 # CONFIG_USB_DEBUG is not set
32353
32354 #
32355 @@ -761,13 +781,13 @@
32356 #
32357 # USB Host Controller Drivers
32358 #
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
32373 CONFIG_HAS_DMA=y
32374 CONFIG_INSTRUMENTATION=y
32375 -# CONFIG_PROFILING is not set
32376 +CONFIG_PROFILING=y
32377 +CONFIG_OPROFILE=m
32378 # CONFIG_KPROBES is not set
32379 # CONFIG_MARKERS is not set
32380
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
32384 @@ -0,0 +1,873 @@
32385 +#
32386 +# Automatically generated make config: don't edit
32387 +# Linux kernel version: 2.6.24-rc6
32388 +# Mon Dec 24 11:22:40 2007
32389 +#
32390 +# CONFIG_PPC64 is not set
32391 +
32392 +#
32393 +# Processor support
32394 +#
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
32399 +CONFIG_44x=y
32400 +# CONFIG_E200 is not set
32401 +CONFIG_4xx=y
32402 +CONFIG_BOOKE=y
32403 +CONFIG_PTE_64BIT=y
32404 +CONFIG_PHYS_64BIT=y
32405 +# CONFIG_PPC_MM_SLICES is not set
32406 +CONFIG_NOT_COHERENT_CACHE=y
32407 +CONFIG_PPC32=y
32408 +CONFIG_WORD_SIZE=32
32409 +CONFIG_PPC_MERGE=y
32410 +CONFIG_MMU=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
32423 +CONFIG_PPC=y
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
32428 +CONFIG_PPC_OF=y
32429 +CONFIG_OF=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
32437 +CONFIG_PPC_DCR=y
32438 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
32439 +
32440 +#
32441 +# General setup
32442 +#
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
32448 +CONFIG_SWAP=y
32449 +CONFIG_SYSVIPC=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
32468 +CONFIG_SYSCTL=y
32469 +CONFIG_EMBEDDED=y
32470 +CONFIG_SYSCTL_SYSCALL=y
32471 +CONFIG_KALLSYMS=y
32472 +# CONFIG_KALLSYMS_ALL is not set
32473 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
32474 +CONFIG_HOTPLUG=y
32475 +CONFIG_PRINTK=y
32476 +CONFIG_BUG=y
32477 +CONFIG_ELF_CORE=y
32478 +CONFIG_BASE_FULL=y
32479 +CONFIG_FUTEX=y
32480 +CONFIG_ANON_INODES=y
32481 +CONFIG_EPOLL=y
32482 +CONFIG_SIGNALFD=y
32483 +CONFIG_EVENTFD=y
32484 +CONFIG_SHMEM=y
32485 +CONFIG_VM_EVENT_COUNTERS=y
32486 +CONFIG_SLUB_DEBUG=y
32487 +# CONFIG_SLAB is not set
32488 +CONFIG_SLUB=y
32489 +# CONFIG_SLOB is not set
32490 +CONFIG_RT_MUTEXES=y
32491 +# CONFIG_TINY_SHMEM is not set
32492 +CONFIG_BASE_SMALL=0
32493 +CONFIG_MODULES=y
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
32498 +CONFIG_KMOD=y
32499 +CONFIG_BLOCK=y
32500 +CONFIG_LBD=y
32501 +# CONFIG_BLK_DEV_IO_TRACE is not set
32502 +# CONFIG_LSF is not set
32503 +# CONFIG_BLK_DEV_BSG is not set
32504 +
32505 +#
32506 +# IO Schedulers
32507 +#
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
32518 +
32519 +#
32520 +# Platform support
32521 +#
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
32532 +CONFIG_RAINIER=y
32533 +CONFIG_440GRX=y
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
32546 +
32547 +#
32548 +# Kernel options
32549 +#
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
32556 +CONFIG_HZ_250=y
32557 +# CONFIG_HZ_300 is not set
32558 +# CONFIG_HZ_1000 is not set
32559 +CONFIG_HZ=250
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
32573 +CONFIG_FLATMEM=y
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
32580 +CONFIG_BOUNCE=y
32581 +CONFIG_VIRT_TO_BUS=y
32582 +CONFIG_PROC_DEVICETREE=y
32583 +CONFIG_CMDLINE_BOOL=y
32584 +CONFIG_CMDLINE=""
32585 +CONFIG_SECCOMP=y
32586 +CONFIG_WANT_DEVICE_TREE=y
32587 +CONFIG_DEVICE_TREE="rainier.dts"
32588 +CONFIG_ISA_DMA_API=y
32589 +
32590 +#
32591 +# Bus options
32592 +#
32593 +CONFIG_ZONE_DMA=y
32594 +CONFIG_PPC_INDIRECT_PCI=y
32595 +CONFIG_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
32605 +
32606 +#
32607 +# Advanced setup
32608 +#
32609 +# CONFIG_ADVANCED_OPTIONS is not set
32610 +
32611 +#
32612 +# Default settings for advanced configuration options are used
32613 +#
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
32621 +
32622 +#
32623 +# Networking
32624 +#
32625 +CONFIG_NET=y
32626 +
32627 +#
32628 +# Networking options
32629 +#
32630 +CONFIG_PACKET=y
32631 +# CONFIG_PACKET_MMAP is not set
32632 +CONFIG_UNIX=y
32633 +# CONFIG_NET_KEY is not set
32634 +CONFIG_INET=y
32635 +# CONFIG_IP_MULTICAST is not set
32636 +# CONFIG_IP_ADVANCED_ROUTER is not set
32637 +CONFIG_IP_FIB_HASH=y
32638 +CONFIG_IP_PNP=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
32681 +
32682 +#
32683 +# Network testing
32684 +#
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
32690 +
32691 +#
32692 +# Wireless
32693 +#
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
32700 +
32701 +#
32702 +# Device Drivers
32703 +#
32704 +
32705 +#
32706 +# Generic Driver Options
32707 +#
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
32717 +CONFIG_MTD=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
32723 +
32724 +#
32725 +# User Modules And Translation Layers
32726 +#
32727 +CONFIG_MTD_CHAR=y
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
32737 +
32738 +#
32739 +# RAM/ROM/Flash chip drivers
32740 +#
32741 +CONFIG_MTD_CFI=y
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
32762 +
32763 +#
32764 +# Mapping drivers for chip access
32765 +#
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
32771 +
32772 +#
32773 +# Self-contained MTD device drivers
32774 +#
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
32780 +
32781 +#
32782 +# Disk-On-Chip Device Drivers
32783 +#
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
32789 +
32790 +#
32791 +# UBI - Unsorted block images
32792 +#
32793 +# CONFIG_MTD_UBI is not set
32794 +CONFIG_OF_DEVICE=y
32795 +# CONFIG_PARPORT is not set
32796 +CONFIG_BLK_DEV=y
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
32819 +
32820 +#
32821 +# SCSI device support
32822 +#
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
32830 +
32831 +#
32832 +# IEEE 1394 (FireWire) support
32833 +#
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
32884 +
32885 +#
32886 +# Wireless LAN
32887 +#
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
32901 +
32902 +#
32903 +# Input device support
32904 +#
32905 +# CONFIG_INPUT is not set
32906 +
32907 +#
32908 +# Hardware I/O ports
32909 +#
32910 +# CONFIG_SERIO is not set
32911 +# CONFIG_GAMEPORT is not set
32912 +
32913 +#
32914 +# Character devices
32915 +#
32916 +# CONFIG_VT is not set
32917 +# CONFIG_SERIAL_NONSTANDARD is not set
32918 +
32919 +#
32920 +# Serial drivers
32921 +#
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
32932 +
32933 +#
32934 +# Non-8250 serial port support
32935 +#
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
32952 +CONFIG_DEVPORT=y
32953 +# CONFIG_I2C is not set
32954 +
32955 +#
32956 +# SPI support
32957 +#
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
32964 +
32965 +#
32966 +# Sonics Silicon Backplane
32967 +#
32968 +CONFIG_SSB_POSSIBLE=y
32969 +# CONFIG_SSB is not set
32970 +
32971 +#
32972 +# Multifunction device drivers
32973 +#
32974 +# CONFIG_MFD_SM501 is not set
32975 +
32976 +#
32977 +# Multimedia devices
32978 +#
32979 +# CONFIG_VIDEO_DEV is not set
32980 +# CONFIG_DVB_CORE is not set
32981 +CONFIG_DAB=y
32982 +
32983 +#
32984 +# Graphics support
32985 +#
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
32992 +
32993 +#
32994 +# Display device support
32995 +#
32996 +# CONFIG_DISPLAY_SUPPORT is not set
32997 +
32998 +#
32999 +# Sound
33000 +#
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
33007 +
33008 +#
33009 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
33010 +#
33011 +
33012 +#
33013 +# USB Gadget Support
33014 +#
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
33021 +
33022 +#
33023 +# Userspace I/O
33024 +#
33025 +# CONFIG_UIO is not set
33026 +
33027 +#
33028 +# File systems
33029 +#
33030 +CONFIG_EXT2_FS=y
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
33043 +CONFIG_INOTIFY=y
33044 +CONFIG_INOTIFY_USER=y
33045 +# CONFIG_QUOTA is not set
33046 +CONFIG_DNOTIFY=y
33047 +# CONFIG_AUTOFS_FS is not set
33048 +# CONFIG_AUTOFS4_FS is not set
33049 +# CONFIG_FUSE_FS is not set
33050 +
33051 +#
33052 +# CD-ROM/DVD Filesystems
33053 +#
33054 +# CONFIG_ISO9660_FS is not set
33055 +# CONFIG_UDF_FS is not set
33056 +
33057 +#
33058 +# DOS/FAT/NT Filesystems
33059 +#
33060 +# CONFIG_MSDOS_FS is not set
33061 +# CONFIG_VFAT_FS is not set
33062 +# CONFIG_NTFS_FS is not set
33063 +
33064 +#
33065 +# Pseudo filesystems
33066 +#
33067 +CONFIG_PROC_FS=y
33068 +CONFIG_PROC_KCORE=y
33069 +CONFIG_PROC_SYSCTL=y
33070 +CONFIG_SYSFS=y
33071 +CONFIG_TMPFS=y
33072 +# CONFIG_TMPFS_POSIX_ACL is not set
33073 +# CONFIG_HUGETLB_PAGE is not set
33074 +# CONFIG_CONFIGFS_FS is not set
33075 +
33076 +#
33077 +# Miscellaneous filesystems
33078 +#
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
33086 +CONFIG_JFFS2_FS=y
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
33097 +CONFIG_CRAMFS=y
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
33104 +CONFIG_NFS_FS=y
33105 +CONFIG_NFS_V3=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
33110 +CONFIG_ROOT_NFS=y
33111 +CONFIG_LOCKD=y
33112 +CONFIG_LOCKD_V4=y
33113 +CONFIG_NFS_COMMON=y
33114 +CONFIG_SUNRPC=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
33123 +
33124 +#
33125 +# Partition Types
33126 +#
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
33132 +
33133 +#
33134 +# Library routines
33135 +#
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
33140 +CONFIG_CRC32=y
33141 +# CONFIG_CRC7 is not set
33142 +# CONFIG_LIBCRC32C is not set
33143 +CONFIG_ZLIB_INFLATE=y
33144 +CONFIG_ZLIB_DEFLATE=y
33145 +CONFIG_PLIST=y
33146 +CONFIG_HAS_IOMEM=y
33147 +CONFIG_HAS_IOPORT=y
33148 +CONFIG_HAS_DMA=y
33149 +CONFIG_INSTRUMENTATION=y
33150 +# CONFIG_PROFILING is not set
33151 +# CONFIG_KPROBES is not set
33152 +# CONFIG_MARKERS is not set
33153 +
33154 +#
33155 +# Kernel hacking
33156 +#
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
33191 +CONFIG_DEBUGGER=y
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
33209 +
33210 +#
33211 +# Security options
33212 +#
33213 +# CONFIG_KEYS is not set
33214 +# CONFIG_SECURITY is not set
33215 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
33216 +CONFIG_CRYPTO=y
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
33261 @@ -1,7 +1,7 @@
33262 #
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
33268 #
33269 # CONFIG_PPC64 is not set
33270
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
33276
33277 #
33278 # Platform support
33279 @@ -141,8 +142,10 @@
33280 # CONFIG_BAMBOO is not set
33281 # CONFIG_EBONY is not set
33282 CONFIG_SEQUOIA=y
33283 +# CONFIG_TAISHAN is not set
33284 +# CONFIG_KATMAI is not set
33285 +# CONFIG_RAINIER is not set
33286 CONFIG_440EPX=y
33287 -CONFIG_440A=y
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
33343 @@ -0,0 +1,1174 @@
33344 +#
33345 +# Automatically generated make config: don't edit
33346 +# Linux kernel version: 2.6.24-rc6
33347 +# Tue Jan 8 09:33:54 2008
33348 +#
33349 +# CONFIG_PPC64 is not set
33350 +
33351 +#
33352 +# Processor support
33353 +#
33354 +CONFIG_6xx=y
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
33360 +CONFIG_PPC_FPU=y
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
33366 +CONFIG_PPC32=y
33367 +CONFIG_WORD_SIZE=32
33368 +CONFIG_PPC_MERGE=y
33369 +CONFIG_MMU=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
33382 +CONFIG_PPC=y
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
33387 +CONFIG_PPC_OF=y
33388 +CONFIG_OF=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"
33397 +
33398 +#
33399 +# General setup
33400 +#
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
33406 +CONFIG_SWAP=y
33407 +CONFIG_SYSVIPC=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
33425 +CONFIG_SYSCTL=y
33426 +CONFIG_EMBEDDED=y
33427 +CONFIG_SYSCTL_SYSCALL=y
33428 +# CONFIG_KALLSYMS is not set
33429 +CONFIG_HOTPLUG=y
33430 +CONFIG_PRINTK=y
33431 +CONFIG_BUG=y
33432 +CONFIG_ELF_CORE=y
33433 +CONFIG_BASE_FULL=y
33434 +CONFIG_FUTEX=y
33435 +CONFIG_ANON_INODES=y
33436 +CONFIG_EPOLL=y
33437 +CONFIG_SIGNALFD=y
33438 +CONFIG_EVENTFD=y
33439 +CONFIG_SHMEM=y
33440 +CONFIG_VM_EVENT_COUNTERS=y
33441 +CONFIG_SLUB_DEBUG=y
33442 +# CONFIG_SLAB is not set
33443 +CONFIG_SLUB=y
33444 +# CONFIG_SLOB is not set
33445 +CONFIG_RT_MUTEXES=y
33446 +# CONFIG_TINY_SHMEM is not set
33447 +CONFIG_BASE_SMALL=0
33448 +CONFIG_MODULES=y
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
33453 +CONFIG_KMOD=y
33454 +CONFIG_BLOCK=y
33455 +CONFIG_LBD=y
33456 +# CONFIG_BLK_DEV_IO_TRACE is not set
33457 +# CONFIG_LSF is not set
33458 +# CONFIG_BLK_DEV_BSG is not set
33459 +
33460 +#
33461 +# IO Schedulers
33462 +#
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"
33472 +
33473 +#
33474 +# Platform support
33475 +#
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
33499 +CONFIG_MPIC=y
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
33512 +
33513 +#
33514 +# Kernel options
33515 +#
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
33521 +CONFIG_HZ_100=y
33522 +# CONFIG_HZ_250 is not set
33523 +# CONFIG_HZ_300 is not set
33524 +# CONFIG_HZ_1000 is not set
33525 +CONFIG_HZ=100
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
33539 +CONFIG_FLATMEM=y
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
33546 +CONFIG_BOUNCE=y
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
33558 +
33559 +#
33560 +# Bus options
33561 +#
33562 +CONFIG_ZONE_DMA=y
33563 +CONFIG_GENERIC_ISA_DMA=y
33564 +CONFIG_PPC_INDIRECT_PCI=y
33565 +CONFIG_FSL_SOC=y
33566 +CONFIG_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
33575 +
33576 +#
33577 +# Advanced setup
33578 +#
33579 +# CONFIG_ADVANCED_OPTIONS is not set
33580 +
33581 +#
33582 +# Default settings for advanced configuration options are used
33583 +#
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
33589 +
33590 +#
33591 +# Networking
33592 +#
33593 +CONFIG_NET=y
33594 +
33595 +#
33596 +# Networking options
33597 +#
33598 +CONFIG_PACKET=m
33599 +# CONFIG_PACKET_MMAP is not set
33600 +CONFIG_UNIX=y
33601 +# CONFIG_NET_KEY is not set
33602 +CONFIG_INET=y
33603 +CONFIG_IP_MULTICAST=y
33604 +# CONFIG_IP_ADVANCED_ROUTER is not set
33605 +CONFIG_IP_FIB_HASH=y
33606 +CONFIG_IP_PNP=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
33650 +
33651 +#
33652 +# Network testing
33653 +#
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
33659 +
33660 +#
33661 +# Wireless
33662 +#
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
33669 +
33670 +#
33671 +# Device Drivers
33672 +#
33673 +
33674 +#
33675 +# Generic Driver Options
33676 +#
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
33683 +CONFIG_MTD=y
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
33689 +
33690 +#
33691 +# User Modules And Translation Layers
33692 +#
33693 +CONFIG_MTD_CHAR=y
33694 +CONFIG_MTD_BLKDEVS=y
33695 +CONFIG_MTD_BLOCK=y
33696 +CONFIG_FTL=y
33697 +CONFIG_NFTL=y
33698 +CONFIG_NFTL_RW=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
33703 +
33704 +#
33705 +# RAM/ROM/Flash chip drivers
33706 +#
33707 +CONFIG_MTD_CFI=y
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
33728 +
33729 +#
33730 +# Mapping drivers for chip access
33731 +#
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
33740 +
33741 +#
33742 +# Self-contained MTD device drivers
33743 +#
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
33749 +
33750 +#
33751 +# Disk-On-Chip Device Drivers
33752 +#
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
33758 +
33759 +#
33760 +# UBI - Unsorted block images
33761 +#
33762 +# CONFIG_MTD_UBI is not set
33763 +CONFIG_OF_DEVICE=y
33764 +# CONFIG_PARPORT is not set
33765 +CONFIG_BLK_DEV=y
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
33784 +CONFIG_IDE=y
33785 +CONFIG_IDE_MAX_HWIFS=4
33786 +CONFIG_BLK_DEV_IDE=y
33787 +
33788 +#
33789 +# Please see Documentation/ide.txt for help/info on IDE drives
33790 +#
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
33800 +
33801 +#
33802 +# IDE chipset support/bugfixes
33803 +#
33804 +CONFIG_IDE_GENERIC=y
33805 +# CONFIG_BLK_DEV_PLATFORM is not set
33806 +
33807 +#
33808 +# PCI IDE chipsets support
33809 +#
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
33845 +
33846 +#
33847 +# SCSI device support
33848 +#
33849 +# CONFIG_RAID_ATTRS is not set
33850 +CONFIG_SCSI=y
33851 +CONFIG_SCSI_DMA=y
33852 +# CONFIG_SCSI_TGT is not set
33853 +# CONFIG_SCSI_NETLINK is not set
33854 +CONFIG_SCSI_PROC_FS=y
33855 +
33856 +#
33857 +# SCSI support type (disk, tape, CD-ROM)
33858 +#
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
33866 +
33867 +#
33868 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
33869 +#
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
33875 +
33876 +#
33877 +# SCSI Transports
33878 +#
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
33921 +CONFIG_MD=y
33922 +CONFIG_BLK_DEV_MD=y
33923 +CONFIG_MD_LINEAR=y
33924 +CONFIG_MD_RAID0=y
33925 +CONFIG_MD_RAID1=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
33933 +
33934 +#
33935 +# IEEE 1394 (FireWire) support
33936 +#
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
33943 +CONFIG_DUMMY=m
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
33960 +CONFIG_R8169=y
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
33974 +
33975 +#
33976 +# Wireless LAN
33977 +#
33978 +# CONFIG_WLAN_PRE80211 is not set
33979 +# CONFIG_WLAN_80211 is not set
33980 +
33981 +#
33982 +# USB Network Adapters
33983 +#
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
34001 +
34002 +#
34003 +# Input device support
34004 +#
34005 +# CONFIG_INPUT is not set
34006 +
34007 +#
34008 +# Hardware I/O ports
34009 +#
34010 +# CONFIG_SERIO is not set
34011 +# CONFIG_GAMEPORT is not set
34012 +
34013 +#
34014 +# Character devices
34015 +#
34016 +# CONFIG_VT is not set
34017 +# CONFIG_SERIAL_NONSTANDARD is not set
34018 +
34019 +#
34020 +# Serial drivers
34021 +#
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
34028 +
34029 +#
34030 +# Non-8250 serial port support
34031 +#
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
34042 +CONFIG_NVRAM=y
34043 +CONFIG_GEN_RTC=y
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
34049 +CONFIG_DEVPORT=y
34050 +CONFIG_I2C=y
34051 +CONFIG_I2C_BOARDINFO=y
34052 +CONFIG_I2C_CHARDEV=y
34053 +
34054 +#
34055 +# I2C Algorithms
34056 +#
34057 +# CONFIG_I2C_ALGOBIT is not set
34058 +# CONFIG_I2C_ALGOPCF is not set
34059 +# CONFIG_I2C_ALGOPCA is not set
34060 +
34061 +#
34062 +# I2C Hardware Bus support
34063 +#
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
34072 +CONFIG_I2C_MPC=y
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
34088 +
34089 +#
34090 +# Miscellaneous I2C Chip support
34091 +#
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
34106 +
34107 +#
34108 +# SPI support
34109 +#
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
34116 +
34117 +#
34118 +# Sonics Silicon Backplane
34119 +#
34120 +CONFIG_SSB_POSSIBLE=y
34121 +# CONFIG_SSB is not set
34122 +
34123 +#
34124 +# Multifunction device drivers
34125 +#
34126 +# CONFIG_MFD_SM501 is not set
34127 +
34128 +#
34129 +# Multimedia devices
34130 +#
34131 +# CONFIG_VIDEO_DEV is not set
34132 +# CONFIG_DVB_CORE is not set
34133 +# CONFIG_DAB is not set
34134 +
34135 +#
34136 +# Graphics support
34137 +#
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
34144 +
34145 +#
34146 +# Display device support
34147 +#
34148 +# CONFIG_DISPLAY_SUPPORT is not set
34149 +
34150 +#
34151 +# Sound
34152 +#
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
34158 +CONFIG_USB=y
34159 +# CONFIG_USB_DEBUG is not set
34160 +
34161 +#
34162 +# Miscellaneous USB options
34163 +#
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
34168 +
34169 +#
34170 +# USB Host Controller Drivers
34171 +#
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
34185 +
34186 +#
34187 +# USB Device Class drivers
34188 +#
34189 +# CONFIG_USB_ACM is not set
34190 +# CONFIG_USB_PRINTER is not set
34191 +
34192 +#
34193 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
34194 +#
34195 +
34196 +#
34197 +# may also be needed; see USB_STORAGE Help for more information
34198 +#
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
34212 +
34213 +#
34214 +# USB Imaging devices
34215 +#
34216 +# CONFIG_USB_MDC800 is not set
34217 +# CONFIG_USB_MICROTEK is not set
34218 +# CONFIG_USB_MON is not set
34219 +
34220 +#
34221 +# USB port drivers
34222 +#
34223 +
34224 +#
34225 +# USB Serial Converter support
34226 +#
34227 +# CONFIG_USB_SERIAL is not set
34228 +
34229 +#
34230 +# USB Miscellaneous drivers
34231 +#
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
34252 +
34253 +#
34254 +# USB DSL modem support
34255 +#
34256 +
34257 +#
34258 +# USB Gadget Support
34259 +#
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
34265 +CONFIG_RTC_LIB=y
34266 +CONFIG_RTC_CLASS=y
34267 +CONFIG_RTC_HCTOSYS=y
34268 +CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
34269 +# CONFIG_RTC_DEBUG is not set
34270 +
34271 +#
34272 +# RTC interfaces
34273 +#
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
34279 +
34280 +#
34281 +# I2C RTC drivers
34282 +#
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
34293 +
34294 +#
34295 +# SPI RTC drivers
34296 +#
34297 +
34298 +#
34299 +# Platform RTC drivers
34300 +#
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
34308 +
34309 +#
34310 +# on-CPU RTC drivers
34311 +#
34312 +
34313 +#
34314 +# Userspace I/O
34315 +#
34316 +# CONFIG_UIO is not set
34317 +
34318 +#
34319 +# File systems
34320 +#
34321 +CONFIG_EXT2_FS=y
34322 +# CONFIG_EXT2_FS_XATTR is not set
34323 +# CONFIG_EXT2_FS_XIP is not set
34324 +CONFIG_EXT3_FS=y
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
34329 +CONFIG_JBD=y
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
34334 +CONFIG_XFS_FS=m
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
34343 +CONFIG_INOTIFY=y
34344 +CONFIG_INOTIFY_USER=y
34345 +# CONFIG_QUOTA is not set
34346 +CONFIG_DNOTIFY=y
34347 +# CONFIG_AUTOFS_FS is not set
34348 +# CONFIG_AUTOFS4_FS is not set
34349 +# CONFIG_FUSE_FS is not set
34350 +
34351 +#
34352 +# CD-ROM/DVD Filesystems
34353 +#
34354 +# CONFIG_ISO9660_FS is not set
34355 +# CONFIG_UDF_FS is not set
34356 +
34357 +#
34358 +# DOS/FAT/NT Filesystems
34359 +#
34360 +# CONFIG_MSDOS_FS is not set
34361 +# CONFIG_VFAT_FS is not set
34362 +# CONFIG_NTFS_FS is not set
34363 +
34364 +#
34365 +# Pseudo filesystems
34366 +#
34367 +CONFIG_PROC_FS=y
34368 +CONFIG_PROC_KCORE=y
34369 +CONFIG_PROC_SYSCTL=y
34370 +CONFIG_SYSFS=y
34371 +CONFIG_TMPFS=y
34372 +# CONFIG_TMPFS_POSIX_ACL is not set
34373 +# CONFIG_HUGETLB_PAGE is not set
34374 +# CONFIG_CONFIGFS_FS is not set
34375 +
34376 +#
34377 +# Miscellaneous filesystems
34378 +#
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
34386 +CONFIG_JFFS2_FS=y
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
34404 +
34405 +#
34406 +# Partition Types
34407 +#
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
34426 +CONFIG_NLS=y
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
34465 +CONFIG_NLS_UTF8=y
34466 +# CONFIG_DLM is not set
34467 +# CONFIG_UCC_SLOW is not set
34468 +
34469 +#
34470 +# Library routines
34471 +#
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
34476 +CONFIG_CRC32=y
34477 +# CONFIG_CRC7 is not set
34478 +# CONFIG_LIBCRC32C is not set
34479 +CONFIG_ZLIB_INFLATE=y
34480 +CONFIG_ZLIB_DEFLATE=y
34481 +CONFIG_PLIST=y
34482 +CONFIG_HAS_IOMEM=y
34483 +CONFIG_HAS_IOPORT=y
34484 +CONFIG_HAS_DMA=y
34485 +CONFIG_INSTRUMENTATION=y
34486 +# CONFIG_PROFILING is not set
34487 +# CONFIG_MARKERS is not set
34488 +
34489 +#
34490 +# Kernel hacking
34491 +#
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
34505 +
34506 +#
34507 +# Security options
34508 +#
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
34521 @@ -0,0 +1,790 @@
34522 +#
34523 +# Automatically generated make config: don't edit
34524 +# Linux kernel version: 2.6.24-rc6
34525 +# Mon Dec 24 11:23:39 2007
34526 +#
34527 +# CONFIG_PPC64 is not set
34528 +
34529 +#
34530 +# Processor support
34531 +#
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
34536 +CONFIG_44x=y
34537 +# CONFIG_E200 is not set
34538 +CONFIG_4xx=y
34539 +CONFIG_BOOKE=y
34540 +CONFIG_PTE_64BIT=y
34541 +CONFIG_PHYS_64BIT=y
34542 +# CONFIG_PPC_MM_SLICES is not set
34543 +CONFIG_NOT_COHERENT_CACHE=y
34544 +CONFIG_PPC32=y
34545 +CONFIG_WORD_SIZE=32
34546 +CONFIG_PPC_MERGE=y
34547 +CONFIG_MMU=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
34560 +CONFIG_PPC=y
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
34565 +CONFIG_PPC_OF=y
34566 +CONFIG_OF=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
34574 +CONFIG_PPC_DCR=y
34575 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34576 +
34577 +#
34578 +# General setup
34579 +#
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
34585 +CONFIG_SWAP=y
34586 +CONFIG_SYSVIPC=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
34605 +CONFIG_SYSCTL=y
34606 +CONFIG_EMBEDDED=y
34607 +CONFIG_SYSCTL_SYSCALL=y
34608 +CONFIG_KALLSYMS=y
34609 +# CONFIG_KALLSYMS_ALL is not set
34610 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
34611 +CONFIG_HOTPLUG=y
34612 +CONFIG_PRINTK=y
34613 +CONFIG_BUG=y
34614 +CONFIG_ELF_CORE=y
34615 +CONFIG_BASE_FULL=y
34616 +CONFIG_FUTEX=y
34617 +CONFIG_ANON_INODES=y
34618 +CONFIG_EPOLL=y
34619 +CONFIG_SIGNALFD=y
34620 +CONFIG_EVENTFD=y
34621 +CONFIG_SHMEM=y
34622 +CONFIG_VM_EVENT_COUNTERS=y
34623 +CONFIG_SLUB_DEBUG=y
34624 +# CONFIG_SLAB is not set
34625 +CONFIG_SLUB=y
34626 +# CONFIG_SLOB is not set
34627 +CONFIG_RT_MUTEXES=y
34628 +# CONFIG_TINY_SHMEM is not set
34629 +CONFIG_BASE_SMALL=0
34630 +CONFIG_MODULES=y
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
34635 +CONFIG_KMOD=y
34636 +CONFIG_BLOCK=y
34637 +CONFIG_LBD=y
34638 +# CONFIG_BLK_DEV_IO_TRACE is not set
34639 +# CONFIG_LSF is not set
34640 +# CONFIG_BLK_DEV_BSG is not set
34641 +
34642 +#
34643 +# IO Schedulers
34644 +#
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
34655 +
34656 +#
34657 +# Platform support
34658 +#
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
34667 +CONFIG_TAISHAN=y
34668 +# CONFIG_KATMAI is not set
34669 +# CONFIG_RAINIER is not set
34670 +CONFIG_440GX=y
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
34683 +
34684 +#
34685 +# Kernel options
34686 +#
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
34693 +CONFIG_HZ_250=y
34694 +# CONFIG_HZ_300 is not set
34695 +# CONFIG_HZ_1000 is not set
34696 +CONFIG_HZ=250
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
34710 +CONFIG_FLATMEM=y
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
34717 +CONFIG_BOUNCE=y
34718 +CONFIG_VIRT_TO_BUS=y
34719 +CONFIG_PROC_DEVICETREE=y
34720 +CONFIG_CMDLINE_BOOL=y
34721 +CONFIG_CMDLINE=""
34722 +CONFIG_SECCOMP=y
34723 +CONFIG_WANT_DEVICE_TREE=y
34724 +CONFIG_DEVICE_TREE="taishan.dts"
34725 +CONFIG_ISA_DMA_API=y
34726 +
34727 +#
34728 +# Bus options
34729 +#
34730 +CONFIG_ZONE_DMA=y
34731 +CONFIG_PPC_INDIRECT_PCI=y
34732 +CONFIG_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
34742 +
34743 +#
34744 +# Advanced setup
34745 +#
34746 +# CONFIG_ADVANCED_OPTIONS is not set
34747 +
34748 +#
34749 +# Default settings for advanced configuration options are used
34750 +#
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
34758 +
34759 +#
34760 +# Networking
34761 +#
34762 +CONFIG_NET=y
34763 +
34764 +#
34765 +# Networking options
34766 +#
34767 +CONFIG_PACKET=y
34768 +# CONFIG_PACKET_MMAP is not set
34769 +CONFIG_UNIX=y
34770 +# CONFIG_NET_KEY is not set
34771 +CONFIG_INET=y
34772 +# CONFIG_IP_MULTICAST is not set
34773 +# CONFIG_IP_ADVANCED_ROUTER is not set
34774 +CONFIG_IP_FIB_HASH=y
34775 +CONFIG_IP_PNP=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
34818 +
34819 +#
34820 +# Network testing
34821 +#
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
34827 +
34828 +#
34829 +# Wireless
34830 +#
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
34837 +
34838 +#
34839 +# Device Drivers
34840 +#
34841 +
34842 +#
34843 +# Generic Driver Options
34844 +#
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
34857 +CONFIG_BLK_DEV=y
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
34880 +
34881 +#
34882 +# SCSI device support
34883 +#
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
34891 +
34892 +#
34893 +# IEEE 1394 (FireWire) support
34894 +#
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
34963 +
34964 +#
34965 +# Wireless LAN
34966 +#
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
34980 +
34981 +#
34982 +# Input device support
34983 +#
34984 +# CONFIG_INPUT is not set
34985 +
34986 +#
34987 +# Hardware I/O ports
34988 +#
34989 +# CONFIG_SERIO is not set
34990 +# CONFIG_GAMEPORT is not set
34991 +
34992 +#
34993 +# Character devices
34994 +#
34995 +# CONFIG_VT is not set
34996 +# CONFIG_SERIAL_NONSTANDARD is not set
34997 +
34998 +#
34999 +# Serial drivers
35000 +#
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
35011 +
35012 +#
35013 +# Non-8250 serial port support
35014 +#
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
35031 +CONFIG_DEVPORT=y
35032 +# CONFIG_I2C is not set
35033 +
35034 +#
35035 +# SPI support
35036 +#
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
35043 +
35044 +#
35045 +# Sonics Silicon Backplane
35046 +#
35047 +CONFIG_SSB_POSSIBLE=y
35048 +# CONFIG_SSB is not set
35049 +
35050 +#
35051 +# Multifunction device drivers
35052 +#
35053 +# CONFIG_MFD_SM501 is not set
35054 +
35055 +#
35056 +# Multimedia devices
35057 +#
35058 +# CONFIG_VIDEO_DEV is not set
35059 +# CONFIG_DVB_CORE is not set
35060 +CONFIG_DAB=y
35061 +
35062 +#
35063 +# Graphics support
35064 +#
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
35071 +
35072 +#
35073 +# Display device support
35074 +#
35075 +# CONFIG_DISPLAY_SUPPORT is not set
35076 +
35077 +#
35078 +# Sound
35079 +#
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
35086 +
35087 +#
35088 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
35089 +#
35090 +
35091 +#
35092 +# USB Gadget Support
35093 +#
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
35100 +
35101 +#
35102 +# Userspace I/O
35103 +#
35104 +# CONFIG_UIO is not set
35105 +
35106 +#
35107 +# File systems
35108 +#
35109 +CONFIG_EXT2_FS=y
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
35122 +CONFIG_INOTIFY=y
35123 +CONFIG_INOTIFY_USER=y
35124 +# CONFIG_QUOTA is not set
35125 +CONFIG_DNOTIFY=y
35126 +# CONFIG_AUTOFS_FS is not set
35127 +# CONFIG_AUTOFS4_FS is not set
35128 +# CONFIG_FUSE_FS is not set
35129 +
35130 +#
35131 +# CD-ROM/DVD Filesystems
35132 +#
35133 +# CONFIG_ISO9660_FS is not set
35134 +# CONFIG_UDF_FS is not set
35135 +
35136 +#
35137 +# DOS/FAT/NT Filesystems
35138 +#
35139 +# CONFIG_MSDOS_FS is not set
35140 +# CONFIG_VFAT_FS is not set
35141 +# CONFIG_NTFS_FS is not set
35142 +
35143 +#
35144 +# Pseudo filesystems
35145 +#
35146 +CONFIG_PROC_FS=y
35147 +CONFIG_PROC_KCORE=y
35148 +CONFIG_PROC_SYSCTL=y
35149 +CONFIG_SYSFS=y
35150 +CONFIG_TMPFS=y
35151 +# CONFIG_TMPFS_POSIX_ACL is not set
35152 +# CONFIG_HUGETLB_PAGE is not set
35153 +# CONFIG_CONFIGFS_FS is not set
35154 +
35155 +#
35156 +# Miscellaneous filesystems
35157 +#
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
35165 +CONFIG_CRAMFS=y
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
35172 +CONFIG_NFS_FS=y
35173 +CONFIG_NFS_V3=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
35178 +CONFIG_ROOT_NFS=y
35179 +CONFIG_LOCKD=y
35180 +CONFIG_LOCKD_V4=y
35181 +CONFIG_NFS_COMMON=y
35182 +CONFIG_SUNRPC=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
35191 +
35192 +#
35193 +# Partition Types
35194 +#
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
35200 +
35201 +#
35202 +# Library routines
35203 +#
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
35208 +CONFIG_CRC32=y
35209 +# CONFIG_CRC7 is not set
35210 +# CONFIG_LIBCRC32C is not set
35211 +CONFIG_ZLIB_INFLATE=y
35212 +CONFIG_PLIST=y
35213 +CONFIG_HAS_IOMEM=y
35214 +CONFIG_HAS_IOPORT=y
35215 +CONFIG_HAS_DMA=y
35216 +CONFIG_INSTRUMENTATION=y
35217 +# CONFIG_PROFILING is not set
35218 +# CONFIG_KPROBES is not set
35219 +# CONFIG_MARKERS is not set
35220 +
35221 +#
35222 +# Kernel hacking
35223 +#
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
35258 +CONFIG_DEBUGGER=y
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
35263 +
35264 +#
35265 +# Security options
35266 +#
35267 +# CONFIG_KEYS is not set
35268 +# CONFIG_SECURITY is not set
35269 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
35270 +CONFIG_CRYPTO=y
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
35315 @@ -1,7 +1,7 @@
35316 #
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
35322 #
35323 # CONFIG_PPC64 is not set
35324
35325 @@ -40,7 +40,7 @@
35326 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
35327 CONFIG_PPC_OF=y
35328 CONFIG_OF=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
35339
35340 #
35341 # Platform support
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
35349 CONFIG_WALNUT=y
35350 # CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
35351 CONFIG_405GP=y
35352 @@ -204,11 +207,17 @@
35353 # Bus options
35354 #
35355 CONFIG_ZONE_DMA=y
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
35361 +CONFIG_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
35371
35372 #
35373 # Advanced setup
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
35380
35381 #
35382 # Self-contained MTD device drivers
35383 #
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
35390 CONFIG_BLK_DEV=y
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
35412
35413 #
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
35419 +
35420 +#
35421 +# IEEE 1394 (FireWire) support
35422 +#
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
35483
35484 #
35485 # Wireless LAN
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 @@
35496 #
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
35518 +CONFIG_DEVPORT=y
35519 # CONFIG_I2C is not set
35520
35521 #
35522 @@ -545,6 +615,8 @@
35523 #
35524 # Graphics support
35525 #
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 @@
35532 #
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
35542
35543 #
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
35552
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
35556 @@ -0,0 +1,1057 @@
35557 +#
35558 +# Automatically generated make config: don't edit
35559 +# Linux kernel version: 2.6.24-rc6
35560 +# Tue Jan 8 12:23:23 2008
35561 +#
35562 +# CONFIG_PPC64 is not set
35563 +
35564 +#
35565 +# Processor support
35566 +#
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
35571 +CONFIG_44x=y
35572 +# CONFIG_E200 is not set
35573 +CONFIG_PPC_FPU=y
35574 +CONFIG_4xx=y
35575 +CONFIG_BOOKE=y
35576 +CONFIG_PTE_64BIT=y
35577 +CONFIG_PHYS_64BIT=y
35578 +# CONFIG_PPC_MM_SLICES is not set
35579 +CONFIG_NOT_COHERENT_CACHE=y
35580 +CONFIG_PPC32=y
35581 +CONFIG_WORD_SIZE=32
35582 +CONFIG_PPC_MERGE=y
35583 +CONFIG_MMU=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
35596 +CONFIG_PPC=y
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
35601 +CONFIG_PPC_OF=y
35602 +CONFIG_OF=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
35610 +CONFIG_PPC_DCR=y
35611 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35612 +
35613 +#
35614 +# General setup
35615 +#
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
35621 +CONFIG_SWAP=y
35622 +CONFIG_SYSVIPC=y
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
35641 +CONFIG_SYSCTL=y
35642 +CONFIG_EMBEDDED=y
35643 +CONFIG_SYSCTL_SYSCALL=y
35644 +CONFIG_KALLSYMS=y
35645 +# CONFIG_KALLSYMS_ALL is not set
35646 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
35647 +# CONFIG_HOTPLUG is not set
35648 +CONFIG_PRINTK=y
35649 +CONFIG_BUG=y
35650 +CONFIG_ELF_CORE=y
35651 +CONFIG_BASE_FULL=y
35652 +CONFIG_FUTEX=y
35653 +CONFIG_ANON_INODES=y
35654 +CONFIG_EPOLL=y
35655 +CONFIG_SIGNALFD=y
35656 +CONFIG_EVENTFD=y
35657 +CONFIG_SHMEM=y
35658 +CONFIG_VM_EVENT_COUNTERS=y
35659 +CONFIG_SLAB=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
35665 +CONFIG_MODULES=y
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
35670 +CONFIG_KMOD=y
35671 +CONFIG_BLOCK=y
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
35676 +
35677 +#
35678 +# IO Schedulers
35679 +#
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"
35689 +
35690 +#
35691 +# Platform support
35692 +#
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
35704 +CONFIG_WARP=y
35705 +CONFIG_440EP=y
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
35719 +
35720 +#
35721 +# Kernel options
35722 +#
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
35731 +CONFIG_HZ_1000=y
35732 +CONFIG_HZ=1000
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
35746 +CONFIG_FLATMEM=y
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
35753 +CONFIG_BOUNCE=y
35754 +CONFIG_VIRT_TO_BUS=y
35755 +CONFIG_PROC_DEVICETREE=y
35756 +CONFIG_CMDLINE_BOOL=y
35757 +CONFIG_CMDLINE="ip=on"
35758 +CONFIG_SECCOMP=y
35759 +CONFIG_WANT_DEVICE_TREE=y
35760 +CONFIG_DEVICE_TREE="warp.dts"
35761 +CONFIG_ISA_DMA_API=y
35762 +
35763 +#
35764 +# Bus options
35765 +#
35766 +CONFIG_ZONE_DMA=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
35771 +
35772 +#
35773 +# Advanced setup
35774 +#
35775 +# CONFIG_ADVANCED_OPTIONS is not set
35776 +
35777 +#
35778 +# Default settings for advanced configuration options are used
35779 +#
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
35787 +
35788 +#
35789 +# Networking
35790 +#
35791 +CONFIG_NET=y
35792 +
35793 +#
35794 +# Networking options
35795 +#
35796 +CONFIG_PACKET=y
35797 +# CONFIG_PACKET_MMAP is not set
35798 +CONFIG_UNIX=y
35799 +CONFIG_XFRM=y
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
35804 +CONFIG_INET=y
35805 +# CONFIG_IP_MULTICAST is not set
35806 +# CONFIG_IP_ADVANCED_ROUTER is not set
35807 +CONFIG_IP_FIB_HASH=y
35808 +CONFIG_IP_PNP=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
35838 +
35839 +#
35840 +# Core Netfilter Configuration
35841 +#
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
35846 +
35847 +#
35848 +# IP: Netfilter Configuration
35849 +#
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
35868 +
35869 +#
35870 +# Network testing
35871 +#
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
35877 +
35878 +#
35879 +# Wireless
35880 +#
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
35887 +
35888 +#
35889 +# Device Drivers
35890 +#
35891 +
35892 +#
35893 +# Generic Driver Options
35894 +#
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
35901 +CONFIG_MTD=y
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
35907 +
35908 +#
35909 +# User Modules And Translation Layers
35910 +#
35911 +CONFIG_MTD_CHAR=y
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
35919 +CONFIG_MTD_OOPS=m
35920 +
35921 +#
35922 +# RAM/ROM/Flash chip drivers
35923 +#
35924 +CONFIG_MTD_CFI=y
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
35945 +
35946 +#
35947 +# Mapping drivers for chip access
35948 +#
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
35953 +
35954 +#
35955 +# Self-contained MTD device drivers
35956 +#
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
35961 +
35962 +#
35963 +# Disk-On-Chip Device Drivers
35964 +#
35965 +# CONFIG_MTD_DOC2000 is not set
35966 +# CONFIG_MTD_DOC2001 is not set
35967 +# CONFIG_MTD_DOC2001PLUS is not set
35968 +CONFIG_MTD_NAND=y
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
35979 +
35980 +#
35981 +# UBI - Unsorted block images
35982 +#
35983 +# CONFIG_MTD_UBI is not set
35984 +CONFIG_OF_DEVICE=y
35985 +# CONFIG_PARPORT is not set
35986 +CONFIG_BLK_DEV=y
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
36002 +
36003 +#
36004 +# SCSI device support
36005 +#
36006 +# CONFIG_RAID_ATTRS is not set
36007 +CONFIG_SCSI=y
36008 +CONFIG_SCSI_DMA=y
36009 +# CONFIG_SCSI_TGT is not set
36010 +# CONFIG_SCSI_NETLINK is not set
36011 +CONFIG_SCSI_PROC_FS=y
36012 +
36013 +#
36014 +# SCSI support type (disk, tape, CD-ROM)
36015 +#
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
36022 +
36023 +#
36024 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
36025 +#
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
36031 +
36032 +#
36033 +# SCSI Transports
36034 +#
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
36054 +CONFIG_MII=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
36069 +
36070 +#
36071 +# Wireless LAN
36072 +#
36073 +# CONFIG_WLAN_PRE80211 is not set
36074 +# CONFIG_WLAN_80211 is not set
36075 +
36076 +#
36077 +# USB Network Adapters
36078 +#
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
36093 +
36094 +#
36095 +# Input device support
36096 +#
36097 +# CONFIG_INPUT is not set
36098 +
36099 +#
36100 +# Hardware I/O ports
36101 +#
36102 +# CONFIG_SERIO is not set
36103 +# CONFIG_GAMEPORT is not set
36104 +
36105 +#
36106 +# Character devices
36107 +#
36108 +# CONFIG_VT is not set
36109 +# CONFIG_SERIAL_NONSTANDARD is not set
36110 +
36111 +#
36112 +# Serial drivers
36113 +#
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
36123 +
36124 +#
36125 +# Non-8250 serial port support
36126 +#
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
36141 +CONFIG_I2C=y
36142 +CONFIG_I2C_BOARDINFO=y
36143 +# CONFIG_I2C_CHARDEV is not set
36144 +
36145 +#
36146 +# I2C Algorithms
36147 +#
36148 +# CONFIG_I2C_ALGOBIT is not set
36149 +# CONFIG_I2C_ALGOPCF is not set
36150 +# CONFIG_I2C_ALGOPCA is not set
36151 +
36152 +#
36153 +# I2C Hardware Bus support
36154 +#
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
36163 +
36164 +#
36165 +# Miscellaneous I2C Chip support
36166 +#
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
36181 +
36182 +#
36183 +# SPI support
36184 +#
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
36189 +CONFIG_HWMON=y
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
36238 +
36239 +#
36240 +# Sonics Silicon Backplane
36241 +#
36242 +CONFIG_SSB_POSSIBLE=y
36243 +# CONFIG_SSB is not set
36244 +
36245 +#
36246 +# Multifunction device drivers
36247 +#
36248 +# CONFIG_MFD_SM501 is not set
36249 +
36250 +#
36251 +# Multimedia devices
36252 +#
36253 +# CONFIG_VIDEO_DEV is not set
36254 +# CONFIG_DVB_CORE is not set
36255 +# CONFIG_DAB is not set
36256 +
36257 +#
36258 +# Graphics support
36259 +#
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
36264 +
36265 +#
36266 +# Display device support
36267 +#
36268 +# CONFIG_DISPLAY_SUPPORT is not set
36269 +
36270 +#
36271 +# Sound
36272 +#
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
36278 +CONFIG_USB=y
36279 +# CONFIG_USB_DEBUG is not set
36280 +
36281 +#
36282 +# Miscellaneous USB options
36283 +#
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
36288 +
36289 +#
36290 +# USB Host Controller Drivers
36291 +#
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
36302 +
36303 +#
36304 +# USB Device Class drivers
36305 +#
36306 +# CONFIG_USB_ACM is not set
36307 +# CONFIG_USB_PRINTER is not set
36308 +
36309 +#
36310 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
36311 +#
36312 +
36313 +#
36314 +# may also be needed; see USB_STORAGE Help for more information
36315 +#
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
36329 +
36330 +#
36331 +# USB Imaging devices
36332 +#
36333 +# CONFIG_USB_MDC800 is not set
36334 +# CONFIG_USB_MICROTEK is not set
36335 +CONFIG_USB_MON=y
36336 +
36337 +#
36338 +# USB port drivers
36339 +#
36340 +
36341 +#
36342 +# USB Serial Converter support
36343 +#
36344 +# CONFIG_USB_SERIAL is not set
36345 +
36346 +#
36347 +# USB Miscellaneous drivers
36348 +#
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
36367 +
36368 +#
36369 +# USB DSL modem support
36370 +#
36371 +
36372 +#
36373 +# USB Gadget Support
36374 +#
36375 +# CONFIG_USB_GADGET is not set
36376 +CONFIG_MMC=m
36377 +# CONFIG_MMC_DEBUG is not set
36378 +# CONFIG_MMC_UNSAFE_RESUME is not set
36379 +
36380 +#
36381 +# MMC/SD Card Drivers
36382 +#
36383 +CONFIG_MMC_BLOCK=m
36384 +CONFIG_MMC_BLOCK_BOUNCE=y
36385 +# CONFIG_SDIO_UART is not set
36386 +
36387 +#
36388 +# MMC/SD Host Controller Drivers
36389 +#
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
36394 +
36395 +#
36396 +# Userspace I/O
36397 +#
36398 +# CONFIG_UIO is not set
36399 +
36400 +#
36401 +# File systems
36402 +#
36403 +CONFIG_EXT2_FS=y
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
36416 +CONFIG_INOTIFY=y
36417 +CONFIG_INOTIFY_USER=y
36418 +# CONFIG_QUOTA is not set
36419 +CONFIG_DNOTIFY=y
36420 +# CONFIG_AUTOFS_FS is not set
36421 +# CONFIG_AUTOFS4_FS is not set
36422 +# CONFIG_FUSE_FS is not set
36423 +
36424 +#
36425 +# CD-ROM/DVD Filesystems
36426 +#
36427 +# CONFIG_ISO9660_FS is not set
36428 +# CONFIG_UDF_FS is not set
36429 +
36430 +#
36431 +# DOS/FAT/NT Filesystems
36432 +#
36433 +CONFIG_FAT_FS=y
36434 +CONFIG_MSDOS_FS=y
36435 +CONFIG_VFAT_FS=y
36436 +CONFIG_FAT_DEFAULT_CODEPAGE=437
36437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
36438 +# CONFIG_NTFS_FS is not set
36439 +
36440 +#
36441 +# Pseudo filesystems
36442 +#
36443 +CONFIG_PROC_FS=y
36444 +CONFIG_PROC_KCORE=y
36445 +CONFIG_PROC_SYSCTL=y
36446 +CONFIG_SYSFS=y
36447 +# CONFIG_TMPFS is not set
36448 +# CONFIG_HUGETLB_PAGE is not set
36449 +# CONFIG_CONFIGFS_FS is not set
36450 +
36451 +#
36452 +# Miscellaneous filesystems
36453 +#
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
36461 +CONFIG_JFFS2_FS=y
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
36472 +CONFIG_CRAMFS=y
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
36479 +CONFIG_NFS_FS=y
36480 +CONFIG_NFS_V3=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
36485 +CONFIG_ROOT_NFS=y
36486 +CONFIG_LOCKD=y
36487 +CONFIG_LOCKD_V4=y
36488 +CONFIG_NFS_COMMON=y
36489 +CONFIG_SUNRPC=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
36498 +
36499 +#
36500 +# Partition Types
36501 +#
36502 +# CONFIG_PARTITION_ADVANCED is not set
36503 +CONFIG_MSDOS_PARTITION=y
36504 +CONFIG_NLS=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
36543 +CONFIG_NLS_UTF8=y
36544 +# CONFIG_DLM is not set
36545 +# CONFIG_UCC_SLOW is not set
36546 +
36547 +#
36548 +# Library routines
36549 +#
36550 +CONFIG_BITREVERSE=y
36551 +CONFIG_CRC_CCITT=y
36552 +# CONFIG_CRC16 is not set
36553 +# CONFIG_CRC_ITU_T is not set
36554 +CONFIG_CRC32=y
36555 +# CONFIG_CRC7 is not set
36556 +# CONFIG_LIBCRC32C is not set
36557 +CONFIG_ZLIB_INFLATE=y
36558 +CONFIG_ZLIB_DEFLATE=y
36559 +CONFIG_PLIST=y
36560 +CONFIG_HAS_IOMEM=y
36561 +CONFIG_HAS_IOPORT=y
36562 +CONFIG_HAS_DMA=y
36563 +# CONFIG_INSTRUMENTATION is not set
36564 +
36565 +#
36566 +# Kernel hacking
36567 +#
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
36605 +
36606 +#
36607 +# Security options
36608 +#
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
36617 @@ -3,7 +3,7 @@
36618 #
36619
36620 ifeq ($(CONFIG_PPC64),y)
36621 -EXTRA_CFLAGS += -mno-minimal-toc
36622 +CFLAGS_prom_init.o += -mno-minimal-toc
36623 endif
36624 ifeq ($(CONFIG_PPC32),y)
36625 CFLAGS_prom_init.o += -fPIC
36626 @@ -70,6 +70,7 @@
36627 obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \
36628 pci-common.o
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
36634 @@ -91,3 +92,13 @@
36635
36636 extra-$(CONFIG_PPC_FPU) += fpu.o
36637 extra-$(CONFIG_PPC64) += entry_64.o
36638 +
36639 +extra-y += systbl_chk.i
36640 +$(obj)/systbl.o: systbl_chk
36641 +
36642 +quiet_cmd_systbl_chk = CALL $<
36643 + cmd_systbl_chk = $(CONFIG_SHELL) $< $(obj)/systbl_chk.i
36644 +
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)
36653 return rc;
36654
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 @@
36664 mflr r4
36665 bl __init_fpu_44x
36666 bl __plb_disable_wrp
36667 + bl __fixup_440A_mcheck
36668 mtlr r4
36669 blr
36670 _GLOBAL(__setup_cpu_440grx)
36671 - b __plb_disable_wrp
36672 + mflr r4
36673 + bl __plb_disable_wrp
36674 + bl __fixup_440A_mcheck
36675 + mtlr r4
36676 + blr
36677 +_GLOBAL(__setup_cpu_440gx)
36678 +_GLOBAL(__setup_cpu_440spe)
36679 + b __fixup_440A_mcheck
36680
36681 + /* Temporary fixup for arch/ppc until we kill the whole thing */
36682 +#ifndef CONFIG_PPC_MERGE
36683 +_GLOBAL(__fixup_440A_mcheck)
36684 + blr
36685 +#endif
36686
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
36692 @@ -33,7 +33,9 @@
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);
36702 @@ -85,6 +87,7 @@
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",
36708 },
36709 { /* Power3+ */
36710 @@ -99,6 +102,7 @@
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",
36716 },
36717 { /* Northstar */
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",
36724 },
36725 { /* Pulsar */
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",
36732 },
36733 { /* I-star */
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",
36740 },
36741 { /* S-star */
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",
36748 },
36749 { /* Power4 */
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",
36756 },
36757 { /* 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",
36764 },
36765 { /* PPC970 */
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",
36772 },
36773 { /* PPC970FX */
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",
36780 },
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",
36788 },
36789 { /* PPC970MP */
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",
36796 },
36797 { /* PPC970GX */
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",
36804 },
36805 { /* Power5 GR */
36806 @@ -286,6 +301,7 @@
36807 */
36808 .oprofile_mmcra_sihv = MMCRA_SIHV,
36809 .oprofile_mmcra_sipr = MMCRA_SIPR,
36810 + .machine_check = machine_check_generic,
36811 .platform = "power5",
36812 },
36813 { /* 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+",
36820 },
36821 { /* Power5 GS */
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+",
36828 },
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+",
36836 },
36837 { /* Power6 */
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",
36844 },
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",
36852 },
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",
36860 },
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",
36868 },
36869 { /* default match */
36870 @@ -400,6 +423,7 @@
36871 .dcache_bsize = 128,
36872 .num_pmcs = 6,
36873 .pmc_type = PPC_PMC_IBM,
36874 + .machine_check = machine_check_generic,
36875 .platform = "power4",
36876 }
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",
36884 },
36885 { /* 603 */
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",
36892 },
36893 { /* 603e */
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",
36900 },
36901 { /* 603ev */
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",
36908 },
36909 { /* 604 */
36910 @@ -459,6 +487,7 @@
36911 .dcache_bsize = 32,
36912 .num_pmcs = 2,
36913 .cpu_setup = __setup_cpu_604,
36914 + .machine_check = machine_check_generic,
36915 .platform = "ppc604",
36916 },
36917 { /* 604e */
36918 @@ -471,6 +500,7 @@
36919 .dcache_bsize = 32,
36920 .num_pmcs = 4,
36921 .cpu_setup = __setup_cpu_604,
36922 + .machine_check = machine_check_generic,
36923 .platform = "ppc604",
36924 },
36925 { /* 604r */
36926 @@ -483,6 +513,7 @@
36927 .dcache_bsize = 32,
36928 .num_pmcs = 4,
36929 .cpu_setup = __setup_cpu_604,
36930 + .machine_check = machine_check_generic,
36931 .platform = "ppc604",
36932 },
36933 { /* 604ev */
36934 @@ -495,6 +526,7 @@
36935 .dcache_bsize = 32,
36936 .num_pmcs = 4,
36937 .cpu_setup = __setup_cpu_604,
36938 + .machine_check = machine_check_generic,
36939 .platform = "ppc604",
36940 },
36941 { /* 740/750 (0x4202, don't support TAU ?) */
36942 @@ -507,6 +539,7 @@
36943 .dcache_bsize = 32,
36944 .num_pmcs = 4,
36945 .cpu_setup = __setup_cpu_750,
36946 + .machine_check = machine_check_generic,
36947 .platform = "ppc750",
36948 },
36949 { /* 750CX (80100 and 8010x?) */
36950 @@ -519,6 +552,7 @@
36951 .dcache_bsize = 32,
36952 .num_pmcs = 4,
36953 .cpu_setup = __setup_cpu_750cx,
36954 + .machine_check = machine_check_generic,
36955 .platform = "ppc750",
36956 },
36957 { /* 750CX (82201 and 82202) */
36958 @@ -531,6 +565,7 @@
36959 .dcache_bsize = 32,
36960 .num_pmcs = 4,
36961 .cpu_setup = __setup_cpu_750cx,
36962 + .machine_check = machine_check_generic,
36963 .platform = "ppc750",
36964 },
36965 { /* 750CXe (82214) */
36966 @@ -543,6 +578,7 @@
36967 .dcache_bsize = 32,
36968 .num_pmcs = 4,
36969 .cpu_setup = __setup_cpu_750cx,
36970 + .machine_check = machine_check_generic,
36971 .platform = "ppc750",
36972 },
36973 { /* 750CXe "Gekko" (83214) */
36974 @@ -555,6 +591,7 @@
36975 .dcache_bsize = 32,
36976 .num_pmcs = 4,
36977 .cpu_setup = __setup_cpu_750cx,
36978 + .machine_check = machine_check_generic,
36979 .platform = "ppc750",
36980 },
36981 { /* 750CL */
36982 @@ -567,6 +604,7 @@
36983 .dcache_bsize = 32,
36984 .num_pmcs = 4,
36985 .cpu_setup = __setup_cpu_750,
36986 + .machine_check = machine_check_generic,
36987 .platform = "ppc750",
36988 },
36989 { /* 745/755 */
36990 @@ -579,6 +617,7 @@
36991 .dcache_bsize = 32,
36992 .num_pmcs = 4,
36993 .cpu_setup = __setup_cpu_750,
36994 + .machine_check = machine_check_generic,
36995 .platform = "ppc750",
36996 },
36997 { /* 750FX rev 1.x */
36998 @@ -591,6 +630,7 @@
36999 .dcache_bsize = 32,
37000 .num_pmcs = 4,
37001 .cpu_setup = __setup_cpu_750,
37002 + .machine_check = machine_check_generic,
37003 .platform = "ppc750",
37004 },
37005 { /* 750FX rev 2.0 must disable HID0[DPM] */
37006 @@ -603,6 +643,7 @@
37007 .dcache_bsize = 32,
37008 .num_pmcs = 4,
37009 .cpu_setup = __setup_cpu_750,
37010 + .machine_check = machine_check_generic,
37011 .platform = "ppc750",
37012 },
37013 { /* 750FX (All revs except 2.0) */
37014 @@ -615,6 +656,7 @@
37015 .dcache_bsize = 32,
37016 .num_pmcs = 4,
37017 .cpu_setup = __setup_cpu_750fx,
37018 + .machine_check = machine_check_generic,
37019 .platform = "ppc750",
37020 },
37021 { /* 750GX */
37022 @@ -627,6 +669,7 @@
37023 .dcache_bsize = 32,
37024 .num_pmcs = 4,
37025 .cpu_setup = __setup_cpu_750fx,
37026 + .machine_check = machine_check_generic,
37027 .platform = "ppc750",
37028 },
37029 { /* 740/750 (L2CR bit need fixup for 740) */
37030 @@ -639,6 +682,7 @@
37031 .dcache_bsize = 32,
37032 .num_pmcs = 4,
37033 .cpu_setup = __setup_cpu_750,
37034 + .machine_check = machine_check_generic,
37035 .platform = "ppc750",
37036 },
37037 { /* 7400 rev 1.1 ? (no TAU) */
37038 @@ -652,6 +696,7 @@
37039 .dcache_bsize = 32,
37040 .num_pmcs = 4,
37041 .cpu_setup = __setup_cpu_7400,
37042 + .machine_check = machine_check_generic,
37043 .platform = "ppc7400",
37044 },
37045 { /* 7400 */
37046 @@ -665,6 +710,7 @@
37047 .dcache_bsize = 32,
37048 .num_pmcs = 4,
37049 .cpu_setup = __setup_cpu_7400,
37050 + .machine_check = machine_check_generic,
37051 .platform = "ppc7400",
37052 },
37053 { /* 7410 */
37054 @@ -678,6 +724,7 @@
37055 .dcache_bsize = 32,
37056 .num_pmcs = 4,
37057 .cpu_setup = __setup_cpu_7410,
37058 + .machine_check = machine_check_generic,
37059 .platform = "ppc7400",
37060 },
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",
37068 },
37069 { /* 7450 2.1 */
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",
37076 },
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",
37084 },
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",
37092 },
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",
37100 },
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",
37108 },
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",
37116 },
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",
37124 },
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",
37132 },
37133 { /* 7447A */
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",
37140 },
37141 { /* 7448 */
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",
37148 },
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",
37156 },
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",
37164 },
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",
37172 },
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",
37180 },
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",
37189 },
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",
37201 + },
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",
37211 },
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",
37219 },
37220 { /* 403GCX */
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",
37227 },
37228 { /* 403G ?? */
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",
37235 },
37236 { /* 405GP */
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",
37243 },
37244 { /* STB 03xxx */
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",
37251 },
37252 { /* STB 04xxx */
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",
37259 },
37260 { /* NP405L */
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",
37267 },
37268 { /* NP4GS3 */
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",
37275 },
37276 { /* NP405H */
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",
37283 },
37284 { /* 405GPr */
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",
37291 },
37292 { /* STBx25xx */
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",
37299 },
37300 { /* 405LP */
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",
37307 },
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",
37315 },
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",
37323 },
37324 { /* 405EP */
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",
37331 },
37332 { /* 405EX */
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",
37345 + },
37346 + { /* 405EXr */
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",
37357 },
37358
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",
37365 },
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",
37373 },
37374 {
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",
37381 + },
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",
37393 },
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",
37401 },
37402 { /* 440GRX */
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",
37409 },
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",
37417 },
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",
37425 },
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",
37433 },
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",
37442 },
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",
37451 },
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",
37460 },
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",
37469 },
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",
37477 },
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",
37486 },
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",
37495 },
37496 #endif /* CONFIG_44x */
37497 #ifdef CONFIG_FSL_BOOKE
37498 +#ifdef CONFIG_E200
37499 { /* e200z5 */
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",
37508 },
37509 { /* e200z6 */
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",
37516 },
37517 +#elif defined(CONFIG_E500)
37518 { /* e500 */
37519 .pvr_mask = 0xffff0000,
37520 .pvr_value = 0x80200000,
37521 @@ -1296,6 +1436,7 @@
37522 .num_pmcs = 4,
37523 .oprofile_cpu_type = "ppc/e500",
37524 .oprofile_type = PPC_OPROFILE_BOOKE,
37525 + .machine_check = machine_check_e500,
37526 .platform = "ppc8540",
37527 },
37528 { /* e500v2 */
37529 @@ -1313,9 +1454,11 @@
37530 .num_pmcs = 4,
37531 .oprofile_cpu_type = "ppc/e500",
37532 .oprofile_type = PPC_OPROFILE_BOOKE,
37533 + .machine_check = machine_check_e500,
37534 .platform = "ppc8548",
37535 },
37536 #endif
37537 +#endif
37538 #if !CLASSIC_PPC
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
37544 @@ -32,6 +32,8 @@
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>
37550
37551 #ifdef DEBUG
37552 #include <asm/udbg.h>
37553 @@ -45,6 +47,11 @@
37554 static cpumask_t cpus_in_crash = CPU_MASK_NONE;
37555 cpumask_t cpus_in_sr = CPU_MASK_NONE;
37556
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);
37561 +
37562 #ifdef CONFIG_SMP
37563 static atomic_t enter_on_soft_reset = ATOMIC_INIT(0);
37564
37565 @@ -285,9 +292,72 @@
37566 }
37567 #endif /* CONFIG_SPU_BASE */
37568
37569 +/*
37570 + * Register a function to be called on shutdown. Only use this if you
37571 + * can't reset your device in the second kernel.
37572 + */
37573 +int crash_shutdown_register(crash_shutdown_t handler)
37574 +{
37575 + unsigned int i, rc;
37576 +
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;
37582 + rc = 0;
37583 + break;
37584 + }
37585 +
37586 + if (i == CRASH_HANDLER_MAX) {
37587 + printk(KERN_ERR "Crash shutdown handles full, "
37588 + "not registered.\n");
37589 + rc = 1;
37590 + }
37591 +
37592 + spin_unlock(&crash_handlers_lock);
37593 + return rc;
37594 +}
37595 +EXPORT_SYMBOL(crash_shutdown_register);
37596 +
37597 +int crash_shutdown_unregister(crash_shutdown_t handler)
37598 +{
37599 + unsigned int i, rc;
37600 +
37601 + spin_lock(&crash_handlers_lock);
37602 + for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
37603 + if (crash_shutdown_handles[i] == handler)
37604 + break;
37605 +
37606 + if (i == CRASH_HANDLER_MAX) {
37607 + printk(KERN_ERR "Crash shutdown handle not found\n");
37608 + rc = 1;
37609 + } else {
37610 + /* Shift handles down */
37611 + for (; crash_shutdown_handles[i]; i++)
37612 + crash_shutdown_handles[i] =
37613 + crash_shutdown_handles[i+1];
37614 + rc = 0;
37615 + }
37616 +
37617 + spin_unlock(&crash_handlers_lock);
37618 + return rc;
37619 +}
37620 +EXPORT_SYMBOL(crash_shutdown_unregister);
37621 +
37622 +static unsigned long crash_shutdown_buf[JMP_BUF_LEN];
37623 +
37624 +static int handle_fault(struct pt_regs *regs)
37625 +{
37626 + longjmp(crash_shutdown_buf, 1);
37627 + return 0;
37628 +}
37629 +
37630 void default_machine_crash_shutdown(struct pt_regs *regs)
37631 {
37632 - unsigned int irq;
37633 + unsigned int i;
37634 + int (*old_handler)(struct pt_regs *regs);
37635 +
37636
37637 /*
37638 * This function is only called after the system
37639 @@ -301,15 +371,36 @@
37640 */
37641 hard_irq_disable();
37642
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;
37647
37648 if (desc->status & IRQ_INPROGRESS)
37649 - desc->chip->eoi(irq);
37650 + desc->chip->eoi(i);
37651
37652 if (!(desc->status & IRQ_DISABLED))
37653 - desc->chip->disable(irq);
37654 + desc->chip->disable(i);
37655 + }
37656 +
37657 + /*
37658 + * Call registered shutdown routines savely. Swap out
37659 + * __debugger_fault_handler, and replace on exit.
37660 + */
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) {
37665 + /*
37666 + * Insert syncs and delay to ensure
37667 + * instructions in the dangerous region don't
37668 + * leak away from this protected region.
37669 + */
37670 + asm volatile("sync; isync");
37671 + /* dangerous region */
37672 + crash_shutdown_handles[i]();
37673 + asm volatile("sync; isync");
37674 + }
37675 }
37676 + __debugger_fault_handler = old_handler;
37677
37678 /*
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 @@
37684 /*
37685 * Generic direct DMA implementation
37686 *
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.
37693 */
37694 -unsigned long dma_direct_offset;
37695 +
37696 +static unsigned long get_dma_direct_offset(struct device *dev)
37697 +{
37698 + return (unsigned long)dev->archdata.dma_data;
37699 +}
37700
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 @@
37704 void *ret;
37705 int node = dev->archdata.numa_node;
37706
37707 - /* TODO: Maybe use the numa node here too ? */
37708 page = alloc_pages_node(node, flag, get_order(size));
37709 if (page == NULL)
37710 return NULL;
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);
37715
37716 return ret;
37717 }
37718 @@ -145,7 +150,7 @@
37719 size_t size,
37720 enum dma_data_direction direction)
37721 {
37722 - return virt_to_abs(ptr) | dma_direct_offset;
37723 + return virt_to_abs(ptr) + get_dma_direct_offset(dev);
37724 }
37725
37726 static void dma_direct_unmap_single(struct device *dev, dma_addr_t dma_addr,
37727 @@ -161,7 +166,7 @@
37728 int i;
37729
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;
37734 }
37735
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)
37741
37742 /* Machine Check Interrupt */
37743 -#ifdef CONFIG_440A
37744 - MCHECK_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
37745 -#else
37746 CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
37747 -#endif
37748 + MCHECK_EXCEPTION(0x0210, MachineCheckA, machine_check_exception)
37749
37750 /* Data Storage Interrupt */
37751 START_EXCEPTION(DataStorage)
37752 @@ -674,6 +671,15 @@
37753 */
37754
37755 /*
37756 + * Adjust the machine check IVOR on 440A cores
37757 + */
37758 +_GLOBAL(__fixup_440A_mcheck)
37759 + li r3,MachineCheckA@l
37760 + mtspr SPRN_IVOR1,r3
37761 + sync
37762 + blr
37763 +
37764 +/*
37765 * extern void giveup_altivec(struct task_struct *prev)
37766 *
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)
37779
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
37783 @@ -73,8 +73,8 @@
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.
37791 *
37792 * Requirement on bootloader:
37793 * - The page we're executing in needs to reside in TLB1 and
37794 @@ -167,7 +167,7 @@
37795 mtspr SPRN_MAS0,r7
37796 tlbre
37797
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) */
37802 mtspr SPRN_MAS0,r7
37803 @@ -177,9 +177,12 @@
37804 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_4K))@l
37805 mtspr SPRN_MAS1,r6
37806 mfspr r6,SPRN_MAS2
37807 - li r7,0 /* temp EPN = 0 */
37808 + lis r7,PHYSICAL_START@h
37809 rlwimi r7,r6,0,20,31
37810 mtspr SPRN_MAS2,r7
37811 + mfspr r6,SPRN_MAS3
37812 + rlwimi r7,r6,0,20,31
37813 + mtspr SPRN_MAS3,r7
37814 tlbwe
37815
37816 xori r6,r4,1
37817 @@ -222,11 +225,11 @@
37818 lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */
37819 mtspr SPRN_MAS0,r6
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
37823 mtspr SPRN_MAS1,r6
37824 li r7,0
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
37830 mtspr SPRN_MAS2,r6
37831 li r7,(MAS3_SX|MAS3_SW|MAS3_SR)
37832 @@ -234,6 +237,9 @@
37833 tlbwe
37834
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
37845 @@ -41,6 +41,7 @@
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>
37853 @@ -52,7 +53,7 @@
37854 struct bus_type ibmebus_bus_type;
37855
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" },
37861 {},
37862 @@ -171,7 +172,7 @@
37863
37864 root = of_find_node_by_path("/");
37865
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))
37869 continue;
37870
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);
37874
37875 - drv->driver.name = drv->name;
37876 - drv->driver.bus = &ibmebus_bus_type;
37877 -
37878 - return driver_register(&drv->driver);
37879 + return of_register_driver(drv, &ibmebus_bus_type);
37880 }
37881 EXPORT_SYMBOL(ibmebus_register_driver);
37882
37883 void ibmebus_unregister_driver(struct of_platform_driver *drv)
37884 {
37885 - driver_unregister(&drv->driver);
37886 + of_unregister_driver(drv);
37887 }
37888 EXPORT_SYMBOL(ibmebus_unregister_driver);
37889
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 @@
37894 return tbl;
37895 }
37896
37897 -void iommu_free_table(struct device_node *dn)
37898 +void iommu_free_table(struct iommu_table *tbl, const char *node_name)
37899 {
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;
37904
37905 if (!tbl || !tbl->it_map) {
37906 printk(KERN_ERR "%s: expected TCE map for %s\n", __FUNCTION__,
37907 - dn->full_name);
37908 + node_name);
37909 return;
37910 }
37911
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);
37918 break;
37919 }
37920 }
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)
37926 size = 0x10000;
37927
37928 - printk(KERN_ERR "no ISA IO ranges or unexpected isa range,"
37929 + printk(KERN_ERR "no ISA IO ranges or unexpected isa range, "
37930 "mapping 64k\n");
37931
37932 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
37933 @@ -116,7 +116,7 @@
37934 return;
37935
37936 inval_range:
37937 - printk(KERN_ERR "no ISA IO ranges or unexpected isa range,"
37938 + printk(KERN_ERR "no ISA IO ranges or unexpected isa range, "
37939 "mapping 64k\n");
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);
37949 break;
37950 }
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 @@
37955 }
37956
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 @@
37964 }
37965
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 @@
37973 }
37974
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 @@
37982 }
37983
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 @@
37991
37992 /*
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.
37996 */
37997 DBG("Fixing serial ports interrupts and IO ports ...\n");
37998
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
38002 @@ -41,7 +41,6 @@
38003 /* #define LPARCFG_DEBUG */
38004
38005 static struct proc_dir_entry *proc_ppc64_lparcfg;
38006 -#define LPARCFG_BUFF_SIZE 4096
38007
38008 /*
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);
38012 if (ent) {
38013 ent->proc_fops = &lparcfg_fops;
38014 - ent->data = kmalloc(LPARCFG_BUFF_SIZE, GFP_KERNEL);
38015 - if (!ent->data) {
38016 - printk(KERN_ERR
38017 - "Failed to allocate buffer for lparcfg\n");
38018 - remove_proc_entry("lparcfg", ent->parent);
38019 - return -ENOMEM;
38020 - }
38021 } else {
38022 printk(KERN_ERR "Failed to create ppc64/lparcfg\n");
38023 return -EIO;
38024 @@ -613,10 +605,8 @@
38025
38026 void __exit lparcfg_cleanup(void)
38027 {
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);
38032 - }
38033 }
38034
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
38039 @@ -8,12 +8,17 @@
38040 * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
38041 * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
38042 *
38043 + * setjmp/longjmp code by Paul Mackerras.
38044 + *
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.
38049 */
38050 #include <asm/ppc_asm.h>
38051 +#include <asm/unistd.h>
38052 +#include <asm/asm-compat.h>
38053 +#include <asm/asm-offsets.h>
38054
38055 .text
38056
38057 @@ -43,3 +48,71 @@
38058 add r3,r3,r5
38059 mtlr r0
38060 blr
38061 +
38062 +_GLOBAL(kernel_execve)
38063 + li r0,__NR_execve
38064 + sc
38065 + bnslr
38066 + neg r3,r3
38067 + blr
38068 +
38069 +_GLOBAL(setjmp)
38070 + mflr r0
38071 + PPC_STL r0,0(r3)
38072 + PPC_STL r1,SZL(r3)
38073 + PPC_STL r2,2*SZL(r3)
38074 + mfcr r0
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)
38095 + li r3,0
38096 + blr
38097 +
38098 +_GLOBAL(longjmp)
38099 + PPC_LCMPI r4,0
38100 + bne 1f
38101 + li r4,1
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)
38122 + mtcrf 0x38,r0
38123 + PPC_LL r0,0(r3)
38124 + PPC_LL r1,SZL(r3)
38125 + PPC_LL r2,2*SZL(r3)
38126 + mtlr r0
38127 + mr r3,r4
38128 + blr
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 @@
38133 isync
38134 blr /* Done */
38135
38136 +#ifdef CONFIG_40x
38137 +
38138 +/*
38139 + * Do an IO access in real mode
38140 + */
38141 +_GLOBAL(real_readb)
38142 + mfmsr r7
38143 + ori r0,r7,MSR_DR
38144 + xori r0,r0,MSR_DR
38145 + sync
38146 + mtmsr r0
38147 + sync
38148 + isync
38149 + lbz r3,0(r3)
38150 + sync
38151 + mtmsr r7
38152 + sync
38153 + isync
38154 + blr
38155 +
38156 + /*
38157 + * Do an IO access in real mode
38158 + */
38159 +_GLOBAL(real_writeb)
38160 + mfmsr r7
38161 + ori r0,r7,MSR_DR
38162 + xori r0,r0,MSR_DR
38163 + sync
38164 + mtmsr r0
38165 + sync
38166 + isync
38167 + stb r3,0(r4)
38168 + sync
38169 + mtmsr r7
38170 + sync
38171 + isync
38172 + blr
38173 +
38174 +#endif /* CONFIG_40x */
38175
38176 /*
38177 * Flush MMU TLB
38178 @@ -793,13 +832,6 @@
38179 addi r1,r1,16
38180 blr
38181
38182 -_GLOBAL(kernel_execve)
38183 - li r0,__NR_execve
38184 - sc
38185 - bnslr
38186 - neg r3,r3
38187 - blr
38188 -
38189 /*
38190 * This routine is just here to keep GCC happy - sigh...
38191 */
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 @@
38196
38197 #endif /* CONFIG_ALTIVEC */
38198
38199 -_GLOBAL(kernel_execve)
38200 - li r0,__NR_execve
38201 - sc
38202 - bnslr
38203 - neg r3,r3
38204 - blr
38205 -
38206 /* kexec_wait(phys_cpu)
38207 *
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
38212 @@ -24,6 +24,7 @@
38213 #include <linux/kernel.h>
38214 #include <linux/cache.h>
38215 #include <linux/bug.h>
38216 +#include <linux/sort.h>
38217
38218 #include "setup.h"
38219
38220 @@ -54,22 +55,60 @@
38221 addend) */
38222 static unsigned int count_relocs(const Elf32_Rela *rela, unsigned int num)
38223 {
38224 - unsigned int i, j, ret = 0;
38225 + unsigned int i, r_info, r_addend, _count_relocs;
38226
38227 - /* Sure, this is order(n^2), but it's usually short, and not
38228 - time critical */
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)
38236 - break;
38237 + _count_relocs = 0;
38238 + r_info = 0;
38239 + r_addend = 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)) {
38245 + _count_relocs++;
38246 + r_info = ELF32_R_SYM(rela[i].r_info);
38247 + r_addend = rela[i].r_addend;
38248 }
38249 - if (j == i) ret++;
38250 +
38251 + return _count_relocs;
38252 +}
38253 +
38254 +static int relacmp(const void *_x, const void *_y)
38255 +{
38256 + const Elf32_Rela *x, *y;
38257 +
38258 + y = (Elf32_Rela *)_x;
38259 + x = (Elf32_Rela *)_y;
38260 +
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
38264 + */
38265 + if (x->r_info < y->r_info)
38266 + return -1;
38267 + else if (x->r_info > y->r_info)
38268 + return 1;
38269 + else if (x->r_addend < y->r_addend)
38270 + return -1;
38271 + else if (x->r_addend > y->r_addend)
38272 + return 1;
38273 + else
38274 + return 0;
38275 +}
38276 +
38277 +static void relaswap(void *_x, void *_y, int size)
38278 +{
38279 + uint32_t *x, *y, tmp;
38280 + int i;
38281 +
38282 + y = (uint32_t *)_x;
38283 + x = (uint32_t *)_y;
38284 +
38285 + for (i = 0; i < sizeof(Elf32_Rela) / sizeof(uint32_t); i++) {
38286 + tmp = x[i];
38287 + x[i] = y[i];
38288 + y[i] = tmp;
38289 }
38290 - return ret;
38291 }
38292
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));
38298 +
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)
38303 + */
38304 + sort((void *)hdr + sechdrs[i].sh_offset,
38305 + sechdrs[i].sh_size / sizeof(Elf32_Rela),
38306 + sizeof(Elf32_Rela), relacmp, relaswap);
38307 +
38308 ret += count_relocs((void *)hdr
38309 + sechdrs[i].sh_offset,
38310 sechdrs[i].sh_size
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
38314 @@ -24,6 +24,7 @@
38315 #include <asm/module.h>
38316 #include <asm/uaccess.h>
38317 #include <asm/firmware.h>
38318 +#include <linux/sort.h>
38319
38320 #include "setup.h"
38321
38322 @@ -81,25 +82,23 @@
38323 different addend) */
38324 static unsigned int count_relocs(const Elf64_Rela *rela, unsigned int num)
38325 {
38326 - unsigned int i, j, ret = 0;
38327 + unsigned int i, r_info, r_addend, _count_relocs;
38328
38329 /* FIXME: Only count external ones --RR */
38330 - /* Sure, this is order(n^2), but it's usually short, and not
38331 - time critical */
38332 - for (i = 0; i < num; i++) {
38333 + _count_relocs = 0;
38334 + r_info = 0;
38335 + r_addend = 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)
38339 - continue;
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)
38345 - break;
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)) {
38349 + _count_relocs++;
38350 + r_info = ELF64_R_SYM(rela[i].r_info);
38351 + r_addend = rela[i].r_addend;
38352 }
38353 - if (j == i) ret++;
38354 - }
38355 - return ret;
38356 +
38357 + return _count_relocs;
38358 }
38359
38360 void *module_alloc(unsigned long size)
38361 @@ -118,6 +117,44 @@
38362 table entries. */
38363 }
38364
38365 +static int relacmp(const void *_x, const void *_y)
38366 +{
38367 + const Elf64_Rela *x, *y;
38368 +
38369 + y = (Elf64_Rela *)_x;
38370 + x = (Elf64_Rela *)_y;
38371 +
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
38375 + */
38376 + if (x->r_info < y->r_info)
38377 + return -1;
38378 + else if (x->r_info > y->r_info)
38379 + return 1;
38380 + else if (x->r_addend < y->r_addend)
38381 + return -1;
38382 + else if (x->r_addend > y->r_addend)
38383 + return 1;
38384 + else
38385 + return 0;
38386 +}
38387 +
38388 +static void relaswap(void *_x, void *_y, int size)
38389 +{
38390 + uint64_t *x, *y, tmp;
38391 + int i;
38392 +
38393 + y = (uint64_t *)_x;
38394 + x = (uint64_t *)_y;
38395 +
38396 + for (i = 0; i < sizeof(Elf64_Rela) / sizeof(uint64_t); i++) {
38397 + tmp = x[i];
38398 + x[i] = y[i];
38399 + y[i] = tmp;
38400 + }
38401 +}
38402 +
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));
38410 +
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)
38415 + */
38416 + sort((void *)sechdrs[i].sh_addr,
38417 + sechdrs[i].sh_size / sizeof(Elf64_Rela),
38418 + sizeof(Elf64_Rela), relacmp, relaswap);
38419 +
38420 relocs += count_relocs((void *)sechdrs[i].sh_addr,
38421 sechdrs[i].sh_size
38422 / sizeof(Elf64_Rela));
38423 @@ -343,7 +390,7 @@
38424 /* Simply set it */
38425 *(u32 *)location = value;
38426 break;
38427 -
38428 +
38429 case R_PPC64_ADDR64:
38430 /* Simply set it */
38431 *(unsigned long *)location = value;
38432 @@ -399,7 +446,7 @@
38433 }
38434
38435 /* Only replace bits 2 through 26 */
38436 - *(uint32_t *)location
38437 + *(uint32_t *)location
38438 = (*(uint32_t *)location & ~0x03fffffc)
38439 | (value & 0x03fffffc);
38440 break;
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
38444 @@ -5,10 +5,10 @@
38445 #include <linux/module.h>
38446 #include <linux/mod_devicetable.h>
38447 #include <linux/slab.h>
38448 +#include <linux/of_device.h>
38449
38450 #include <asm/errno.h>
38451 #include <asm/dcr.h>
38452 -#include <asm/of_device.h>
38453
38454 static void of_device_make_bus_id(struct of_device *dev)
38455 {
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
38459 @@ -19,6 +19,7 @@
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>
38466
38467 @@ -40,7 +41,7 @@
38468 * a bus type in the list
38469 */
38470
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", },
38476 @@ -64,26 +65,6 @@
38477
38478 postcore_initcall(of_bus_driver_init);
38479
38480 -int of_register_platform_driver(struct of_platform_driver *drv)
38481 -{
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;
38488 -
38489 - /* register with core */
38490 - return driver_register(&drv->driver);
38491 -}
38492 -EXPORT_SYMBOL(of_register_platform_driver);
38493 -
38494 -void of_unregister_platform_driver(struct of_platform_driver *drv)
38495 -{
38496 - driver_unregister(&drv->driver);
38497 -}
38498 -EXPORT_SYMBOL(of_unregister_platform_driver);
38499 -
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
38506 */
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)
38512 {
38513 struct device_node *child;
38514 struct of_device *dev;
38515 int rc = 0;
38516
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);
38521 if (dev == NULL)
38522 @@ -157,7 +138,7 @@
38523 */
38524
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)
38529 {
38530 struct device_node *child;
38531 @@ -190,7 +171,7 @@
38532 rc = of_platform_bus_create(root, matches, &dev->dev);
38533 goto bail;
38534 }
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))
38538 continue;
38539
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);
38545
38546 /* XXX kill that some day ... */
38547 -int global_phb_number; /* Global phb counter */
38548 +static int global_phb_number; /* Global phb counter */
38549
38550 -extern struct list_head hose_list;
38551 +/* ISA Memory physical address */
38552 +resource_size_t isa_mem_base;
38553
38554 -/*
38555 - * pci_controller(phb) initialized common variables.
38556 - */
38557 -static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
38558 -{
38559 - memset(hose, 0, sizeof(struct pci_controller));
38560 -
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);
38565 -}
38566 +/* Default PCI flags is 0 */
38567 +unsigned int ppc_pci_flags;
38568
38569 -struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
38570 +struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
38571 {
38572 struct pci_controller *phb;
38573
38574 - phb = alloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
38575 + phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
38576 if (phb == NULL)
38577 return NULL;
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);
38584 + phb->dn = dev;
38585 phb->is_dynamic = mem_init_done;
38586 #ifdef CONFIG_PPC64
38587 if (dev) {
38588 @@ -126,15 +120,10 @@
38589 */
38590 int pci_domain_nr(struct pci_bus *bus)
38591 {
38592 - if (firmware_has_feature(FW_FEATURE_ISERIES))
38593 - return 0;
38594 - else {
38595 - struct pci_controller *hose = pci_bus_to_host(bus);
38596 + struct pci_controller *hose = pci_bus_to_host(bus);
38597
38598 - return hose->global_number;
38599 - }
38600 + return hose->global_number;
38601 }
38602 -
38603 EXPORT_SYMBOL(pci_domain_nr);
38604
38605 #ifdef CONFIG_PPC_OF
38606 @@ -153,7 +142,7 @@
38607 while(node) {
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)
38612 return hose;
38613 node = node->parent;
38614 }
38615 @@ -201,6 +190,20 @@
38616 struct of_irq oirq;
38617 unsigned int virq;
38618
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.
38624 + *
38625 + * In the long run, we will hopefully fix the generated device-tree
38626 + * instead.
38627 + */
38628 +#ifdef CONFIG_PPC_ISERIES
38629 + if (firmware_has_feature(FW_FEATURE_ISERIES))
38630 + return -1;
38631 +#endif
38632 +
38633 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
38634
38635 #ifdef DEBUG
38636 @@ -222,10 +225,11 @@
38637 if (pin == 0)
38638 return -1;
38639 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
38640 - line == 0xff) {
38641 + line == 0xff || line == 0) {
38642 return -1;
38643 }
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",
38646 + line, pin);
38647
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;
38653 }
38654 +
38655 +/**
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)
38660 + *
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
38663 + * content.
38664 + *
38665 + * Life would be boring if it wasn't for a few issues that we have to deal
38666 + * with here:
38667 + *
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.
38671 + *
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.
38680 + *
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.
38684 + *
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
38687 + */
38688 +void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
38689 + struct device_node *dev,
38690 + int primary)
38691 +{
38692 + const u32 *ranges;
38693 + int rlen;
38694 + int pna = of_n_addr_cells(dev);
38695 + int np = pna + 5;
38696 + int memno = 0, isa_hole = -1;
38697 + u32 pci_space;
38698 + unsigned long long pci_addr, cpu_addr, pci_next, cpu_next, size;
38699 + unsigned long long isa_mb = 0;
38700 + struct resource *res;
38701 +
38702 + printk(KERN_INFO "PCI host bridge %s %s ranges:\n",
38703 + dev->full_name, primary ? "(primary)" : "");
38704 +
38705 + /* Get ranges property */
38706 + ranges = of_get_property(dev, "ranges", &rlen);
38707 + if (ranges == NULL)
38708 + return;
38709 +
38710 + /* Parse it */
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);
38717 + ranges += np;
38718 + if (cpu_addr == OF_BAD_ADDR || size == 0)
38719 + continue;
38720 +
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)
38725 + break;
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)
38730 + break;
38731 + size += of_read_number(ranges + pna + 3, 2);
38732 + }
38733 +
38734 + /* Act based on address space type */
38735 + res = NULL;
38736 + switch ((pci_space >> 24) & 0x3) {
38737 + case 1: /* PCI IO space */
38738 + printk(KERN_INFO
38739 + " IO 0x%016llx..0x%016llx -> 0x%016llx\n",
38740 + cpu_addr, cpu_addr + size - 1, pci_addr);
38741 +
38742 + /* We support only one IO range */
38743 + if (hose->pci_io_size) {
38744 + printk(KERN_INFO
38745 + " \\--> Skipped (too many) !\n");
38746 + continue;
38747 + }
38748 +#ifdef CONFIG_PPC32
38749 + /* On 32 bits, limit I/O space to 16MB */
38750 + if (size > 0x01000000)
38751 + size = 0x01000000;
38752 +
38753 + /* 32 bits needs to map IOs here */
38754 + hose->io_base_virt = ioremap(cpu_addr, size);
38755 +
38756 + /* Expect trouble if pci_addr is not 0 */
38757 + if (primary)
38758 + isa_io_base =
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
38763 + */
38764 + hose->pci_io_size = pci_addr + size;
38765 + hose->io_base_phys = cpu_addr - pci_addr;
38766 +
38767 + /* Build resource */
38768 + res = &hose->io_resource;
38769 + res->flags = IORESOURCE_IO;
38770 + res->start = pci_addr;
38771 + break;
38772 + case 2: /* PCI Memory space */
38773 + printk(KERN_INFO
38774 + " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n",
38775 + cpu_addr, cpu_addr + size - 1, pci_addr,
38776 + (pci_space & 0x40000000) ? "Prefetch" : "");
38777 +
38778 + /* We support only 3 memory ranges */
38779 + if (memno >= 3) {
38780 + printk(KERN_INFO
38781 + " \\--> Skipped (too many) !\n");
38782 + continue;
38783 + }
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;
38790 + }
38791 +
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.
38795 + */
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) {
38802 + printk(KERN_INFO
38803 + " \\--> Skipped (offset mismatch) !\n");
38804 + continue;
38805 + }
38806 +
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;
38813 + break;
38814 + }
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;
38821 + }
38822 + }
38823 +
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;
38829 + }
38830 +}
38831 +
38832 +/* Decide whether to display the domain number in /proc */
38833 +int pci_proc_domain(struct pci_bus *bus)
38834 +{
38835 + struct pci_controller *hose = pci_bus_to_host(bus);
38836 +#ifdef CONFIG_PPC64
38837 + return hose->buid != 0;
38838 +#else
38839 + if (!(ppc_pci_flags & PPC_PCI_ENABLE_PROC_DOMAINS))
38840 + return 0;
38841 + if (ppc_pci_flags & PPC_PCI_COMPAT_DOMAIN_0)
38842 + return hose->global_number != 0;
38843 + return 1;
38844 +#endif
38845 +}
38846 +
38847 +void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
38848 + struct resource *res)
38849 +{
38850 + resource_size_t offset = 0, mask = (resource_size_t)-1;
38851 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38852 +
38853 + if (!hose)
38854 + return;
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;
38860 +
38861 + region->start = (res->start - offset) & mask;
38862 + region->end = (res->end - offset) & mask;
38863 +}
38864 +EXPORT_SYMBOL(pcibios_resource_to_bus);
38865 +
38866 +void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
38867 + struct pci_bus_region *region)
38868 +{
38869 + resource_size_t offset = 0, mask = (resource_size_t)-1;
38870 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38871 +
38872 + if (!hose)
38873 + return;
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;
38881 +}
38882 +EXPORT_SYMBOL(pcibios_bus_to_resource);
38883 +
38884 +/* Fixup a bus resource into a linux resource */
38885 +static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
38886 +{
38887 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38888 + resource_size_t offset = 0, mask = (resource_size_t)-1;
38889 +
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;
38895 +
38896 + res->start = (res->start + offset) & mask;
38897 + res->end = (res->end + offset) & mask;
38898 +
38899 + pr_debug("PCI:%s %016llx-%016llx\n",
38900 + pci_name(dev),
38901 + (unsigned long long)res->start,
38902 + (unsigned long long)res->end);
38903 +}
38904 +
38905 +
38906 +/* This header fixup will do the resource fixup for all devices as they are
38907 + * probed, but not for bridge ranges
38908 + */
38909 +static void __devinit pcibios_fixup_resources(struct pci_dev *dev)
38910 +{
38911 + struct pci_controller *hose = pci_bus_to_host(dev->bus);
38912 + int i;
38913 +
38914 + if (!hose) {
38915 + printk(KERN_ERR "No host bridge for PCI dev %s !\n",
38916 + pci_name(dev));
38917 + return;
38918 + }
38919 + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
38920 + struct resource *res = dev->resource + i;
38921 + if (!res->flags)
38922 + continue;
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;
38930 + res->start = 0;
38931 + res->flags |= IORESOURCE_UNSET;
38932 + continue;
38933 + }
38934 +
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);
38940 +
38941 + fixup_resource(res, dev);
38942 + }
38943 +
38944 + /* Call machine specific resource fixup */
38945 + if (ppc_md.pcibios_fixup_resources)
38946 + ppc_md.pcibios_fixup_resources(dev);
38947 +}
38948 +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
38949 +
38950 +static void __devinit __pcibios_fixup_bus(struct pci_bus *bus)
38951 +{
38952 + struct pci_controller *hose = pci_bus_to_host(bus);
38953 + struct pci_dev *dev = bus->self;
38954 +
38955 + pr_debug("PCI: Fixup bus %d (%s)\n", bus->number, dev ? pci_name(dev) : "PHB");
38956 +
38957 + /* Fixup PCI<->PCI bridges. Host bridges are handled separately, for
38958 + * now differently between 32 and 64 bits.
38959 + */
38960 + if (dev != NULL) {
38961 + struct resource *res;
38962 + int i;
38963 +
38964 + for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
38965 + if ((res = bus->resource[i]) == NULL)
38966 + continue;
38967 + if (!res->flags)
38968 + continue;
38969 + if (i >= 3 && bus->self->transparent)
38970 + continue;
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...
38975 + *
38976 + * We clear those to force them to be reallocated later
38977 + *
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.
38981 + */
38982 + if (res->flags & IORESOURCE_MEM &&
38983 + res->start == hose->pci_mem_offset &&
38984 + res->end < 0x100000) {
38985 + printk(KERN_INFO
38986 + "PCI: Closing bogus Apple Firmware"
38987 + " region %d on bus 0x%02x\n",
38988 + i, bus->number);
38989 + res->flags = 0;
38990 + continue;
38991 + }
38992 +
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);
38998 +
38999 + fixup_resource(res, dev);
39000 + }
39001 + }
39002 +
39003 + /* Additional setup that is different between 32 and 64 bits for now */
39004 + pcibios_do_bus_setup(bus);
39005 +
39006 + /* Platform specific bus fixups */
39007 + if (ppc_md.pcibios_fixup_bus)
39008 + ppc_md.pcibios_fixup_bus(bus);
39009 +
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);
39015 + }
39016 +}
39017 +
39018 +void __devinit pcibios_fixup_bus(struct pci_bus *bus)
39019 +{
39020 + /* When called from the generic PCI probe, read PCI<->PCI bridge
39021 + * bases before proceeding
39022 + */
39023 + if (bus->self != NULL)
39024 + pci_read_bridge_bases(bus);
39025 + __pcibios_fixup_bus(bus);
39026 +}
39027 +EXPORT_SYMBOL(pcibios_fixup_bus);
39028 +
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
39032 + */
39033 +void __devinit pcibios_fixup_of_probed_bus(struct pci_bus *bus)
39034 +{
39035 + __pcibios_fixup_bus(bus);
39036 +}
39037 +
39038 +static int skip_isa_ioresource_align(struct pci_dev *dev)
39039 +{
39040 + if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) &&
39041 + !(dev->bus->bridge_ctl & PCI_BRIDGE_CTL_ISA))
39042 + return 1;
39043 + return 0;
39044 +}
39045 +
39046 +/*
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
39050 + * modulo 0x400.
39051 + *
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..
39058 + */
39059 +void pcibios_align_resource(void *data, struct resource *res,
39060 + resource_size_t size, resource_size_t align)
39061 +{
39062 + struct pci_dev *dev = data;
39063 +
39064 + if (res->flags & IORESOURCE_IO) {
39065 + resource_size_t start = res->start;
39066 +
39067 + if (skip_isa_ioresource_align(dev))
39068 + return;
39069 + if (start & 0x300) {
39070 + start = (start + 0x3ff) & ~0x3ff;
39071 + res->start = start;
39072 + }
39073 + }
39074 +}
39075 +EXPORT_SYMBOL(pcibios_align_resource);
39076 +
39077 +/*
39078 + * Reparent resource children of pr that conflict with res
39079 + * under res, and make res replace those children.
39080 + */
39081 +static int __init reparent_resources(struct resource *parent,
39082 + struct resource *res)
39083 +{
39084 + struct resource *p, **pp;
39085 + struct resource **firstpp = NULL;
39086 +
39087 + for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
39088 + if (p->end < res->start)
39089 + continue;
39090 + if (res->end < p->start)
39091 + break;
39092 + if (p->start < res->start || p->end > res->end)
39093 + return -1; /* not completely contained */
39094 + if (firstpp == NULL)
39095 + firstpp = pp;
39096 + }
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;
39102 + *firstpp = res;
39103 + *pp = NULL;
39104 + for (p = res->child; p != NULL; p = p->sibling) {
39105 + p->parent = res;
39106 + DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
39107 + p->name,
39108 + (unsigned long long)p->start,
39109 + (unsigned long long)p->end, res->name);
39110 + }
39111 + return 0;
39112 +}
39113 +
39114 +/*
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.
39121 + *
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)
39130 + *
39131 + * Our solution:
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
39140 + * resources.
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
39144 + * as well.
39145 + */
39146 +
39147 +static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
39148 +{
39149 + struct pci_bus *bus;
39150 + int i;
39151 + struct resource *res, *pr;
39152 +
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)
39158 + continue;
39159 + if (bus->parent == NULL)
39160 + pr = (res->flags & IORESOURCE_IO) ?
39161 + &ioport_resource : &iomem_resource;
39162 + else {
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
39167 + * later.
39168 + */
39169 + if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)
39170 + goto clear_resource;
39171 + pr = pci_find_parent_resource(bus->self, res);
39172 + if (pr == res) {
39173 + /* this happens when the generic PCI
39174 + * code (wrongly) decides that this
39175 + * bridge is transparent -- paulus
39176 + */
39177 + continue;
39178 + }
39179 + }
39180 +
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",
39184 + bus->number, i,
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");
39189 +
39190 + if (pr && !(pr->flags & IORESOURCE_UNSET)) {
39191 + if (request_resource(pr, res) == 0)
39192 + continue;
39193 + /*
39194 + * Must be a conflict with an existing entry.
39195 + * Move that entry (or entries) under the
39196 + * bridge resource and try again.
39197 + */
39198 + if (reparent_resources(pr, res) == 0)
39199 + continue;
39200 + }
39201 + printk(KERN_WARNING
39202 + "PCI: Cannot allocate resource region "
39203 + "%d of PCI bridge %d, will remap\n",
39204 + i, bus->number);
39205 +clear_resource:
39206 + res->flags = 0;
39207 + }
39208 + pcibios_allocate_bus_resources(&bus->children);
39209 + }
39210 +}
39211 +
39212 +static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
39213 +{
39214 + struct resource *pr, *r = &dev->resource[idx];
39215 +
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);
39221 +
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));
39227 + if (pr)
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;
39235 + r->start = 0;
39236 + }
39237 +}
39238 +
39239 +static void __init pcibios_allocate_resources(int pass)
39240 +{
39241 + struct pci_dev *dev = NULL;
39242 + int idx, disabled;
39243 + u16 command;
39244 + struct resource *r;
39245 +
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 */
39251 + continue;
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);
39256 + else
39257 + disabled = !(command & PCI_COMMAND_MEMORY);
39258 + if (pass == disabled)
39259 + alloc_resource(dev, idx);
39260 + }
39261 + if (pass)
39262 + continue;
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.
39267 + */
39268 + u32 reg;
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, &reg);
39272 + pci_write_config_dword(dev, dev->rom_base_reg,
39273 + reg & ~PCI_ROM_ADDRESS_ENABLE);
39274 + }
39275 + }
39276 +}
39277 +
39278 +void __init pcibios_resource_survey(void)
39279 +{
39280 + /* Allocate and assign resources. If we re-assign everything, then
39281 + * we skip the allocate phase
39282 + */
39283 + pcibios_allocate_bus_resources(&pci_root_buses);
39284 +
39285 + if (!(ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)) {
39286 + pcibios_allocate_resources(0);
39287 + pcibios_allocate_resources(1);
39288 + }
39289 +
39290 + if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) {
39291 + DBG("PCI: Assigning unassigned resouces...\n");
39292 + pci_assign_unassigned_resources();
39293 + }
39294 +
39295 + /* Call machine dependent fixup */
39296 + if (ppc_md.pcibios_fixup)
39297 + ppc_md.pcibios_fixup();
39298 +}
39299 +
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
39304 + */
39305 +void __devinit pcibios_claim_one_bus(struct pci_bus *bus)
39306 +{
39307 + struct pci_dev *dev;
39308 + struct pci_bus *child_bus;
39309 +
39310 + list_for_each_entry(dev, &bus->devices, bus_list) {
39311 + int i;
39312 +
39313 + for (i = 0; i < PCI_NUM_RESOURCES; i++) {
39314 + struct resource *r = &dev->resource[i];
39315 +
39316 + if (r->parent || !r->start || !r->flags)
39317 + continue;
39318 + pci_claim_resource(dev, i);
39319 + }
39320 + }
39321 +
39322 + list_for_each_entry(child_bus, &bus->children, node)
39323 + pcibios_claim_one_bus(child_bus);
39324 +}
39325 +EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
39326 +#endif /* CONFIG_HOTPLUG */
39327 +
39328 +int pcibios_enable_device(struct pci_dev *dev, int mask)
39329 +{
39330 + u16 cmd, old_cmd;
39331 + int idx;
39332 + struct resource *r;
39333 +
39334 + if (ppc_md.pcibios_enable_device_hook)
39335 + if (ppc_md.pcibios_enable_device_hook(dev))
39336 + return -EINVAL;
39337 +
39338 + pci_read_config_word(dev, PCI_COMMAND, &cmd);
39339 + old_cmd = cmd;
39340 + for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
39341 + /* Only set up the requested stuff */
39342 + if (!(mask & (1 << idx)))
39343 + continue;
39344 + r = &dev->resource[idx];
39345 + if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
39346 + continue;
39347 + if ((idx == PCI_ROM_RESOURCE) &&
39348 + (!(r->flags & IORESOURCE_ROM_ENABLE)))
39349 + continue;
39350 + if (r->parent == NULL) {
39351 + printk(KERN_ERR "PCI: Device %s not available because"
39352 + " of resource collisions\n", pci_name(dev));
39353 + return -EINVAL;
39354 + }
39355 + if (r->flags & IORESOURCE_IO)
39356 + cmd |= PCI_COMMAND_IO;
39357 + if (r->flags & IORESOURCE_MEM)
39358 + cmd |= PCI_COMMAND_MEMORY;
39359 + }
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);
39364 + }
39365 + return 0;
39366 +}
39367 +
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
39371 @@ -13,6 +13,7 @@
39372 #include <linux/bootmem.h>
39373 #include <linux/irq.h>
39374 #include <linux/list.h>
39375 +#include <linux/of.h>
39376
39377 #include <asm/processor.h>
39378 #include <asm/io.h>
39379 @@ -32,19 +33,12 @@
39380 #endif
39381
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;
39386
39387 void pcibios_make_OF_bus_map(void);
39388
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;
39399 @@ -53,7 +47,7 @@
39400 /* By default, we don't re-assign bus numbers. We do this only on
39401 * some pmacs
39402 */
39403 -int pci_assign_all_buses;
39404 +static int pci_assign_all_buses;
39405
39406 LIST_HEAD(hose_list);
39407
39408 @@ -100,505 +94,6 @@
39409 }
39410 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64);
39411
39412 -static void
39413 -pcibios_fixup_resources(struct pci_dev *dev)
39414 -{
39415 - struct pci_controller* hose = (struct pci_controller *)dev->sysdata;
39416 - int i;
39417 - unsigned long offset;
39418 -
39419 - if (!hose) {
39420 - printk(KERN_ERR "No hose for PCI dev %s!\n", pci_name(dev));
39421 - return;
39422 - }
39423 - for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
39424 - struct resource *res = dev->resource + i;
39425 - if (!res->flags)
39426 - continue;
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;
39431 - res->start = 0;
39432 - res->flags |= IORESOURCE_UNSET;
39433 - continue;
39434 - }
39435 - offset = 0;
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
39440 - - isa_io_base;
39441 - }
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);
39448 - }
39449 - }
39450 -
39451 - /* Call machine specific resource fixup */
39452 - if (ppc_md.pcibios_fixup_resources)
39453 - ppc_md.pcibios_fixup_resources(dev);
39454 -}
39455 -DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
39456 -
39457 -void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
39458 - struct resource *res)
39459 -{
39460 - unsigned long offset = 0;
39461 - struct pci_controller *hose = dev->sysdata;
39462 -
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;
39469 -}
39470 -EXPORT_SYMBOL(pcibios_resource_to_bus);
39471 -
39472 -void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
39473 - struct pci_bus_region *region)
39474 -{
39475 - unsigned long offset = 0;
39476 - struct pci_controller *hose = dev->sysdata;
39477 -
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;
39484 -}
39485 -EXPORT_SYMBOL(pcibios_bus_to_resource);
39486 -
39487 -/*
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
39491 - * modulo 0x400.
39492 - *
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..
39499 - */
39500 -void pcibios_align_resource(void *data, struct resource *res,
39501 - resource_size_t size, resource_size_t align)
39502 -{
39503 - struct pci_dev *dev = data;
39504 -
39505 - if (res->flags & IORESOURCE_IO) {
39506 - resource_size_t start = res->start;
39507 -
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);
39512 - }
39513 -
39514 - if (start & 0x300) {
39515 - start = (start + 0x3ff) & ~0x3ff;
39516 - res->start = start;
39517 - }
39518 - }
39519 -}
39520 -EXPORT_SYMBOL(pcibios_align_resource);
39521 -
39522 -/*
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.
39529 - *
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)
39538 - *
39539 - * Our solution:
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
39548 - * resources.
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
39552 - * as well.
39553 - */
39554 -
39555 -static void __init
39556 -pcibios_allocate_bus_resources(struct list_head *bus_list)
39557 -{
39558 - struct pci_bus *bus;
39559 - int i;
39560 - struct resource *res, *pr;
39561 -
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)
39567 - continue;
39568 - if (bus->parent == NULL)
39569 - pr = (res->flags & IORESOURCE_IO)?
39570 - &ioport_resource: &iomem_resource;
39571 - else {
39572 - pr = pci_find_parent_resource(bus->self, res);
39573 - if (pr == res) {
39574 - /* this happens when the generic PCI
39575 - * code (wrongly) decides that this
39576 - * bridge is transparent -- paulus
39577 - */
39578 - continue;
39579 - }
39580 - }
39581 -
39582 - DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
39583 - (u64)res->start, (u64)res->end, res->flags, pr);
39584 - if (pr) {
39585 - if (request_resource(pr, res) == 0)
39586 - continue;
39587 - /*
39588 - * Must be a conflict with an existing entry.
39589 - * Move that entry (or entries) under the
39590 - * bridge resource and try again.
39591 - */
39592 - if (reparent_resources(pr, res) == 0)
39593 - continue;
39594 - }
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;
39599 - }
39600 - pcibios_allocate_bus_resources(&bus->children);
39601 - }
39602 -}
39603 -
39604 -/*
39605 - * Reparent resource children of pr that conflict with res
39606 - * under res, and make res replace those children.
39607 - */
39608 -static int __init
39609 -reparent_resources(struct resource *parent, struct resource *res)
39610 -{
39611 - struct resource *p, **pp;
39612 - struct resource **firstpp = NULL;
39613 -
39614 - for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
39615 - if (p->end < res->start)
39616 - continue;
39617 - if (res->end < p->start)
39618 - break;
39619 - if (p->start < res->start || p->end > res->end)
39620 - return -1; /* not completely contained */
39621 - if (firstpp == NULL)
39622 - firstpp = pp;
39623 - }
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;
39629 - *firstpp = res;
39630 - *pp = NULL;
39631 - for (p = res->child; p != NULL; p = p->sibling) {
39632 - p->parent = res;
39633 - DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
39634 - p->name, (u64)p->start, (u64)p->end, res->name);
39635 - }
39636 - return 0;
39637 -}
39638 -
39639 -/*
39640 - * A bridge has been allocated a range which is outside the range
39641 - * of its parent bridge, so it needs to be moved.
39642 - */
39643 -static int __init
39644 -pci_relocate_bridge_resource(struct pci_bus *bus, int i)
39645 -{
39646 - struct resource *res, *pr, *conflict;
39647 - unsigned long try, size;
39648 - int j;
39649 - struct pci_bus *parent = bus->parent;
39650 -
39651 - if (parent == NULL) {
39652 - /* shouldn't ever happen */
39653 - printk(KERN_ERR "PCI: can't move host bridge resource\n");
39654 - return -1;
39655 - }
39656 - res = bus->resource[i];
39657 - if (res == NULL)
39658 - return -1;
39659 - pr = NULL;
39660 - for (j = 0; j < 4; j++) {
39661 - struct resource *r = parent->resource[j];
39662 - if (!r)
39663 - continue;
39664 - if ((res->flags ^ r->flags) & (IORESOURCE_IO | IORESOURCE_MEM))
39665 - continue;
39666 - if (!((res->flags ^ r->flags) & IORESOURCE_PREFETCH)) {
39667 - pr = r;
39668 - break;
39669 - }
39670 - if (res->flags & IORESOURCE_PREFETCH)
39671 - pr = r;
39672 - }
39673 - if (pr == NULL)
39674 - return -1;
39675 - size = res->end - res->start;
39676 - if (pr->start > pr->end || size > pr->end - pr->start)
39677 - return -1;
39678 - try = pr->end;
39679 - for (;;) {
39680 - res->start = try - size;
39681 - res->end = try;
39682 - if (probe_resource(bus->parent, pr, res, &conflict) == 0)
39683 - break;
39684 - if (conflict->start <= pr->start + size)
39685 - return -1;
39686 - try = conflict->start - 1;
39687 - }
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" */
39692 - }
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);
39697 - return 0;
39698 -}
39699 -
39700 -static int __init
39701 -probe_resource(struct pci_bus *parent, struct resource *pr,
39702 - struct resource *res, struct resource **conflict)
39703 -{
39704 - struct pci_bus *bus;
39705 - struct pci_dev *dev;
39706 - struct resource *r;
39707 - int i;
39708 -
39709 - for (r = pr->child; r != NULL; r = r->sibling) {
39710 - if (r->end >= res->start && res->end >= r->start) {
39711 - *conflict = r;
39712 - return 1;
39713 - }
39714 - }
39715 - list_for_each_entry(bus, &parent->children, node) {
39716 - for (i = 0; i < 4; ++i) {
39717 - if ((r = bus->resource[i]) == NULL)
39718 - continue;
39719 - if (!r->flags || r->start > r->end || r == res)
39720 - continue;
39721 - if (pci_find_parent_resource(bus->self, r) != pr)
39722 - continue;
39723 - if (r->end >= res->start && res->end >= r->start) {
39724 - *conflict = r;
39725 - return 1;
39726 - }
39727 - }
39728 - }
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))
39733 - continue;
39734 - if (pci_find_parent_resource(dev, r) != pr)
39735 - continue;
39736 - if (r->end >= res->start && res->end >= r->start) {
39737 - *conflict = r;
39738 - return 1;
39739 - }
39740 - }
39741 - }
39742 - return 0;
39743 -}
39744 -
39745 -void __init
39746 -update_bridge_resource(struct pci_dev *dev, struct resource *res)
39747 -{
39748 - u8 io_base_lo, io_limit_lo;
39749 - u16 mem_base, mem_limit;
39750 - u16 cmd;
39751 - unsigned long start, end, off;
39752 - struct pci_controller *hose = dev->sysdata;
39753 -
39754 - if (!hose) {
39755 - printk("update_bridge_base: no hose?\n");
39756 - return;
39757 - }
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;
39769 - else
39770 - io_base_lo |= PCI_IO_RANGE_TYPE_16;
39771 - pci_write_config_word(dev, PCI_IO_BASE_UPPER16,
39772 - start >> 16);
39773 - pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16,
39774 - end >> 16);
39775 - pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo);
39776 - pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo);
39777 -
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);
39785 -
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);
39793 -
39794 - } else {
39795 - DBG(KERN_ERR "PCI: ugh, bridge %s res has flags=%lx\n",
39796 - pci_name(dev), res->flags);
39797 - }
39798 - pci_write_config_word(dev, PCI_COMMAND, cmd);
39799 -}
39800 -
39801 -static void __init
39802 -update_bridge_base(struct pci_bus *bus, int i)
39803 -{
39804 - struct resource *res = bus->resource[i];
39805 - struct pci_dev *dev = bus->self;
39806 - update_bridge_resource(dev, res);
39807 -}
39808 -
39809 -static inline void alloc_resource(struct pci_dev *dev, int idx)
39810 -{
39811 - struct resource *pr, *r = &dev->resource[idx];
39812 -
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));
39819 - if (pr)
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;
39825 - r->start = 0;
39826 - }
39827 -}
39828 -
39829 -static void __init
39830 -pcibios_allocate_resources(int pass)
39831 -{
39832 - struct pci_dev *dev = NULL;
39833 - int idx, disabled;
39834 - u16 command;
39835 - struct resource *r;
39836 -
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 */
39842 - continue;
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);
39847 - else
39848 - disabled = !(command & PCI_COMMAND_MEMORY);
39849 - if (pass == disabled)
39850 - alloc_resource(dev, idx);
39851 - }
39852 - if (pass)
39853 - continue;
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. */
39857 - u32 reg;
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, &reg);
39861 - pci_write_config_dword(dev, dev->rom_base_reg,
39862 - reg & ~PCI_ROM_ADDRESS_ENABLE);
39863 - }
39864 - }
39865 -}
39866 -
39867 -static void __init
39868 -pcibios_assign_resources(void)
39869 -{
39870 - struct pci_dev *dev = NULL;
39871 - int idx;
39872 - struct resource *r;
39873 -
39874 - for_each_pci_dev(dev) {
39875 - int class = dev->class >> 8;
39876 -
39877 - /* Don't touch classless devices and host bridges */
39878 - if (!class || class == PCI_CLASS_BRIDGE_HOST)
39879 - continue;
39880 -
39881 - for (idx = 0; idx < 6; idx++) {
39882 - r = &dev->resource[idx];
39883 -
39884 - /*
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.
39889 - */
39890 - if ((r->flags & IORESOURCE_UNSET) && r->end &&
39891 - (!ppc_md.pcibios_enable_device_hook ||
39892 - !ppc_md.pcibios_enable_device_hook(dev, 1))) {
39893 - int rc;
39894 -
39895 - r->flags &= ~IORESOURCE_UNSET;
39896 - rc = pci_assign_resource(dev, idx);
39897 - BUG_ON(rc);
39898 - }
39899 - }
39900 -
39901 -#if 0 /* don't assign ROMs */
39902 - r = &dev->resource[PCI_ROM_RESOURCE];
39903 - r->end -= r->start;
39904 - r->start = 0;
39905 - if (r->end)
39906 - pci_assign_resource(dev, PCI_ROM_RESOURCE);
39907 -#endif
39908 - }
39909 -}
39910 -
39911 #ifdef CONFIG_PPC_OF
39912 /*
39913 * Functions below are used on OpenFirmware machines.
39914 @@ -619,7 +114,7 @@
39915 } else
39916 pci_to_OF_bus_map[pci_bus] = bus_range[0];
39917
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;
39922
39923 @@ -662,8 +157,8 @@
39924
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;
39930 +
39931 if (!node)
39932 continue;
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);
39936
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)
39940 {
39941 + struct device_node *node;
39942 struct device_node* sub_node;
39943
39944 - for (; node != 0;node = node->sibling) {
39945 + for_each_child_of_node(parent, node) {
39946 const unsigned int *class_code;
39947
39948 - if (filter(node, data))
39949 + if (filter(node, data)) {
39950 + of_node_put(node);
39951 return node;
39952 + }
39953
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"))
39959 continue;
39960 - sub_node = scan_OF_pci_childs(node->child, filter, data);
39961 - if (sub_node)
39962 + sub_node = scan_OF_pci_childs(node, filter, data);
39963 + if (sub_node) {
39964 + of_node_put(node);
39965 return sub_node;
39966 + }
39967 }
39968 return NULL;
39969 }
39970 @@ -718,11 +218,11 @@
39971 static struct device_node *scan_OF_for_pci_dev(struct device_node *parent,
39972 unsigned int devfn)
39973 {
39974 - struct device_node *np = NULL;
39975 + struct device_node *np;
39976 const u32 *reg;
39977 unsigned int psize;
39978
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)
39983 continue;
39984 @@ -742,7 +242,7 @@
39985 struct pci_controller *hose = pci_bus_to_host(bus);
39986 if (hose == NULL)
39987 return NULL;
39988 - return of_node_get(hose->arch_data);
39989 + return of_node_get(hose->dn);
39990 }
39991
39992 /* not a root bus, we need to get our parent */
39993 @@ -812,9 +312,9 @@
39994 return -ENODEV;
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)
39999 return -ENODEV;
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))
40003 return -ENODEV;
40004 reg = of_get_property(node, "reg", NULL);
40005 @@ -843,120 +343,6 @@
40006 }
40007 EXPORT_SYMBOL(pci_device_from_OF_node);
40008
40009 -void __init
40010 -pci_process_bridge_OF_ranges(struct pci_controller *hose,
40011 - struct device_node *dev, int primary)
40012 -{
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;
40017 - int memno = 0;
40018 - struct resource *res;
40019 - int np, na = of_n_addr_cells(dev);
40020 - np = na + 5;
40021 -
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
40025 - */
40026 - dt_ranges = of_get_property(dev, "ranges", &rlen);
40027 - if (!dt_ranges)
40028 - return;
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);
40033 - }
40034 - lc_ranges = static_lc_ranges;
40035 - memcpy(lc_ranges, dt_ranges, rlen);
40036 - orig_rlen = rlen;
40037 -
40038 - /* Let's work on a copy of the "ranges" property instead of damaging
40039 - * the device-tree image in memory
40040 - */
40041 - ranges = lc_ranges;
40042 - prev = NULL;
40043 - while ((rlen -= np * sizeof(unsigned int)) >= 0) {
40044 - if (prev) {
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];
40049 - ranges[0] = 0;
40050 - ranges += np;
40051 - continue;
40052 - }
40053 - }
40054 - prev = ranges;
40055 - ranges += np;
40056 - }
40057 -
40058 - /*
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
40065 - */
40066 - ranges = lc_ranges;
40067 - rlen = orig_rlen;
40068 - while (ranges && (rlen -= np * sizeof(unsigned int)) >= 0) {
40069 - res = NULL;
40070 - size = ranges[na+4];
40071 - switch ((ranges[0] >> 24) & 0x3) {
40072 - case 1: /* I/O space */
40073 - if (ranges[2] != 0)
40074 - break;
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);
40080 - if (primary)
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);
40087 - break;
40088 - case 2: /* memory space */
40089 - memno = 0;
40090 - if (ranges[1] == 0 && ranges[2] == 0
40091 - && ranges[na+4] <= (16 << 20)) {
40092 - /* 1st 16MB, i.e. ISA memory area */
40093 - if (primary)
40094 - isa_mem_base = ranges[na+2];
40095 - memno = 1;
40096 - }
40097 - while (memno < 3 && hose->mem_resources[memno].flags)
40098 - ++memno;
40099 - if (memno == 0)
40100 - hose->pci_mem_offset = ranges[na+2] - ranges[2];
40101 - if (memno < 3) {
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);
40109 - }
40110 - break;
40111 - }
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;
40118 - }
40119 - ranges += np;
40120 - }
40121 -}
40122 -
40123 /* We create the "pci-OF-bus-map" property now so it appears in the
40124 * /proc device tree
40125 */
40126 @@ -986,219 +372,7 @@
40127 }
40128 #endif /* CONFIG_PPC_OF */
40129
40130 -#ifdef CONFIG_PPC_PMAC
40131 -/*
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.
40135 - *
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
40139 - * Adaptec).
40140 - *
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
40144 - * minor tweaks
40145 - */
40146 -
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)
40150 -{
40151 - struct pci_dev *bridge = bus->self;
40152 - struct pci_controller* hose = (struct pci_controller *)bridge->sysdata;
40153 - u32 l;
40154 - u16 w;
40155 - struct resource res;
40156 -
40157 - if (bus->resource[0] == NULL)
40158 - return;
40159 - res = *(bus->resource[0]);
40160 -
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);
40165 -
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);
40168 - l &= 0xffff000f;
40169 - l |= (res.start >> 8) & 0x00f0;
40170 - l |= res.end & 0xf000;
40171 - pci_write_config_dword(bridge, PCI_IO_BASE, l);
40172 -
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);
40176 - }
40177 -
40178 - pci_read_config_word(bridge, PCI_COMMAND, &w);
40179 - w |= PCI_COMMAND_IO;
40180 - pci_write_config_word(bridge, PCI_COMMAND, w);
40181 -
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);
40187 - }
40188 -#endif
40189 -}
40190 -
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
40194 - * size.
40195 - */
40196 -static int __init
40197 -check_for_io_childs(struct pci_bus *bus, struct resource* res, int *found_vga)
40198 -{
40199 - struct pci_dev *dev;
40200 - int i;
40201 - int rc = 0;
40202 -
40203 -#define push_end(res, mask) do { \
40204 - BUG_ON((mask+1) & mask); \
40205 - res->end = (res->end + mask) | mask; \
40206 -} while (0)
40207 -
40208 - list_for_each_entry(dev, &bus->devices, bus_list) {
40209 - u16 class = dev->class >> 8;
40210 -
40211 - if (class == PCI_CLASS_DISPLAY_VGA ||
40212 - class == PCI_CLASS_NOT_DEFINED_VGA)
40213 - *found_vga = 1;
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);
40218 -
40219 - for (i=0; i<PCI_NUM_RESOURCES; i++) {
40220 - struct resource *r;
40221 - unsigned long r_size;
40222 -
40223 - if (dev->class >> 8 == PCI_CLASS_BRIDGE_PCI
40224 - && i >= PCI_BRIDGE_RESOURCES)
40225 - continue;
40226 - r = &dev->resource[i];
40227 - r_size = r->end - r->start;
40228 - if (r_size < 0xfff)
40229 - r_size = 0xfff;
40230 - if (r->flags & IORESOURCE_IO && (r_size) != 0) {
40231 - rc = 1;
40232 - push_end(res, r_size);
40233 - }
40234 - }
40235 - }
40236 -
40237 - return rc;
40238 -}
40239 -
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
40245 - */
40246 -static void __init
40247 -do_fixup_p2p_level(struct pci_bus *bus)
40248 -{
40249 - struct pci_bus *b;
40250 - int i, parent_io;
40251 - int has_vga = 0;
40252 -
40253 - for (parent_io=0; parent_io<4; parent_io++)
40254 - if (bus->resource[parent_io]
40255 - && bus->resource[parent_io]->flags & IORESOURCE_IO)
40256 - break;
40257 - if (parent_io >= 4)
40258 - return;
40259 -
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;
40267 -
40268 - memset(&tmp_res, 0, sizeof(tmp_res));
40269 - tmp_res.start = bus->resource[parent_io]->start;
40270 -
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
40273 - */
40274 - if (tmp_res.start == 0)
40275 - tmp_res.start = 0x1000;
40276 -
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)) {
40281 - u8 io_base_lo;
40282 -
40283 - printk(KERN_INFO "Fixing up IO bus %s\n", b->name);
40284 -
40285 - if (found_vga) {
40286 - if (has_vga) {
40287 - printk(KERN_WARNING "Skipping VGA, already active"
40288 - " on bus segment\n");
40289 - found_vga = 0;
40290 - } else
40291 - has_vga = 1;
40292 - }
40293 - pci_read_config_byte(d, PCI_IO_BASE, &io_base_lo);
40294 -
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;
40298 - else
40299 - max = ((unsigned long) hose->io_base_virt
40300 - - isa_io_base) + 0xffff;
40301 -
40302 - *res = tmp_res;
40303 - res->flags = IORESOURCE_IO;
40304 - res->name = b->name;
40305 -
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];
40309 - if (!r)
40310 - continue;
40311 - if ((r->flags & IORESOURCE_IO) == 0)
40312 - continue;
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);
40316 -
40317 - if (allocate_resource(r, res, res->end + 1, res->start, max,
40318 - res->end + 1, NULL, NULL) < 0) {
40319 - DBG("Failed !\n");
40320 - continue;
40321 - }
40322 - do_update_p2p_io_resource(b, found_vga);
40323 - break;
40324 - }
40325 - }
40326 - do_fixup_p2p_level(b);
40327 - }
40328 -}
40329 -
40330 -static void
40331 -pcibios_fixup_p2p_bridges(void)
40332 -{
40333 - struct pci_bus *b;
40334 -
40335 - list_for_each_entry(b, &pci_root_buses, node)
40336 - do_fixup_p2p_level(b);
40337 -}
40338 -
40339 -#endif /* CONFIG_PPC_PMAC */
40340 -
40341 -static int __init
40342 -pcibios_init(void)
40343 +static int __init pcibios_init(void)
40344 {
40345 struct pci_controller *hose, *tmp;
40346 struct pci_bus *bus;
40347 @@ -1206,6 +380,9 @@
40348
40349 printk(KERN_INFO "PCI: Probing PCI hardware\n");
40350
40351 + if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS)
40352 + pci_assign_all_buses = 1;
40353 +
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,
40360 hose->ops, hose);
40361 - if (bus)
40362 + if (bus) {
40363 pci_bus_add_devices(bus);
40364 - hose->last_busno = bus->subordinate;
40365 + hose->last_busno = bus->subordinate;
40366 + }
40367 if (pci_assign_all_buses || next_busno <= hose->last_busno)
40368 next_busno = hose->last_busno + pcibios_assign_bus_offset;
40369 }
40370 @@ -1228,18 +406,8 @@
40371 if (pci_assign_all_buses && have_of)
40372 pcibios_make_OF_bus_map();
40373
40374 - /* Call machine dependent fixup */
40375 - if (ppc_md.pcibios_fixup)
40376 - ppc_md.pcibios_fixup();
40377 -
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();
40388
40389 /* Call machine dependent post-init code */
40390 if (ppc_md.pcibios_after_init)
40391 @@ -1250,14 +418,14 @@
40392
40393 subsys_initcall(pcibios_init);
40394
40395 -void pcibios_fixup_bus(struct pci_bus *bus)
40396 +void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
40397 {
40398 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
40399 unsigned long io_offset;
40400 struct resource *res;
40401 - struct pci_dev *dev;
40402 int i;
40403
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;
40411 }
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;
40416
40417 for (i = 0; i < 3; ++i) {
40418 res = &hose->mem_resources[i];
40419 @@ -1288,35 +456,6 @@
40420 }
40421 bus->resource[i+1] = res;
40422 }
40423 - } else {
40424 - /* This is a subordinate bridge */
40425 - pci_read_bridge_bases(bus);
40426 -
40427 - for (i = 0; i < 4; ++i) {
40428 - if ((res = bus->resource[i]) == NULL)
40429 - continue;
40430 - if (!res->flags || bus->self->transparent)
40431 - continue;
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;
40439 - }
40440 - }
40441 - }
40442 -
40443 - /* Platform specific bus fixups */
40444 - if (ppc_md.pcibios_fixup_bus)
40445 - ppc_md.pcibios_fixup_bus(bus);
40446 -
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);
40452 }
40453 }
40454
40455 @@ -1328,37 +467,6 @@
40456 /* XXX FIXME - update OF device tree node interrupt property */
40457 }
40458
40459 -int pcibios_enable_device(struct pci_dev *dev, int mask)
40460 -{
40461 - u16 cmd, old_cmd;
40462 - int idx;
40463 - struct resource *r;
40464 -
40465 - if (ppc_md.pcibios_enable_device_hook)
40466 - if (ppc_md.pcibios_enable_device_hook(dev, 0))
40467 - return -EINVAL;
40468 -
40469 - pci_read_config_word(dev, PCI_COMMAND, &cmd);
40470 - old_cmd = 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));
40475 - return -EINVAL;
40476 - }
40477 - if (r->flags & IORESOURCE_IO)
40478 - cmd |= PCI_COMMAND_IO;
40479 - if (r->flags & IORESOURCE_MEM)
40480 - cmd |= PCI_COMMAND_MEMORY;
40481 - }
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);
40486 - }
40487 - return 0;
40488 -}
40489 -
40490 static struct pci_controller*
40491 pci_bus_to_hose(int bus)
40492 {
40493 @@ -1381,17 +489,6 @@
40494 struct pci_controller* hose;
40495 long result = -EOPNOTSUPP;
40496
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.
40501 - */
40502 -#ifdef CONFIG_PPC_PMAC
40503 - if (machine_is(powermac) && machine_is_compatible("MacRISC4"))
40504 - if (bus == 0)
40505 - bus = 0xf0;
40506 -#endif /* CONFIG_PPC_PMAC */
40507 -
40508 hose = pci_bus_to_hose(bus);
40509 if (!hose)
40510 return -ENODEV;
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
40514 @@ -31,7 +31,6 @@
40515 #include <asm/byteorder.h>
40516 #include <asm/machdep.h>
40517 #include <asm/ppc-pci.h>
40518 -#include <asm/firmware.h>
40519
40520 #ifdef DEBUG
40521 #include <asm/udbg.h>
40522 @@ -41,10 +40,6 @@
40523 #endif
40524
40525 unsigned long pci_probe_only = 1;
40526 -int pci_assign_all_buses = 0;
40527 -
40528 -static void fixup_resource(struct resource *res, struct pci_dev *dev);
40529 -static void do_bus_setup(struct pci_bus *bus);
40530
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 @@
40534 }
40535 EXPORT_SYMBOL(get_pci_dma_ops);
40536
40537 -static void fixup_broken_pcnet32(struct pci_dev* dev)
40538 -{
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);
40542 - }
40543 -}
40544 -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32);
40545 -
40546 -void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
40547 - struct resource *res)
40548 -{
40549 - unsigned long offset = 0;
40550 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
40551 -
40552 - if (!hose)
40553 - return;
40554 -
40555 - if (res->flags & IORESOURCE_IO)
40556 - offset = (unsigned long)hose->io_base_virt - _IO_BASE;
40557 -
40558 - if (res->flags & IORESOURCE_MEM)
40559 - offset = hose->pci_mem_offset;
40560 -
40561 - region->start = res->start - offset;
40562 - region->end = res->end - offset;
40563 -}
40564
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)
40568 {
40569 - unsigned long offset = 0;
40570 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
40571 -
40572 - if (!hose)
40573 - return;
40574 -
40575 - if (res->flags & IORESOURCE_IO)
40576 - offset = (unsigned long)hose->io_base_virt - _IO_BASE;
40577 -
40578 - if (res->flags & IORESOURCE_MEM)
40579 - offset = hose->pci_mem_offset;
40580 -
40581 - res->start = region->start + offset;
40582 - res->end = region->end + offset;
40583 + return dma_set_mask(&dev->dev, mask);
40584 }
40585
40586 -#ifdef CONFIG_HOTPLUG
40587 -EXPORT_SYMBOL(pcibios_resource_to_bus);
40588 -EXPORT_SYMBOL(pcibios_bus_to_resource);
40589 -#endif
40590 -
40591 -/*
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
40595 - * modulo 0x400.
40596 - *
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..
40603 - */
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)
40607 {
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;
40612 -
40613 - if (res->flags & IORESOURCE_IO) {
40614 - unsigned long offset = (unsigned long)hose->io_base_virt -
40615 - _IO_BASE;
40616 - /* Make sure we start at our min on all hoses */
40617 - if (start - offset < PCIBIOS_MIN_IO)
40618 - start = PCIBIOS_MIN_IO + offset;
40619 -
40620 - /*
40621 - * Put everything into 0x00-0xff region modulo 0x400
40622 - */
40623 - if (start & 0x300)
40624 - start = (start + 0x3ff) & ~0x3ff;
40625 + int rc;
40626
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;
40633
40634 - /* Align to multiple of size of minimum base. */
40635 - alignto = max(0x1000UL, align);
40636 - start = ALIGN(start, alignto);
40637 - }
40638 -
40639 - res->start = start;
40640 + return rc;
40641 }
40642
40643 -void __devinit pcibios_claim_one_bus(struct pci_bus *b)
40644 +static void fixup_broken_pcnet32(struct pci_dev* dev)
40645 {
40646 - struct pci_dev *dev;
40647 - struct pci_bus *child_bus;
40648 -
40649 - list_for_each_entry(dev, &b->devices, bus_list) {
40650 - int i;
40651 -
40652 - for (i = 0; i < PCI_NUM_RESOURCES; i++) {
40653 - struct resource *r = &dev->resource[i];
40654 -
40655 - if (r->parent || !r->start || !r->flags)
40656 - continue;
40657 - pci_claim_resource(dev, i);
40658 - }
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);
40662 }
40663 -
40664 - list_for_each_entry(child_bus, &b->children, node)
40665 - pcibios_claim_one_bus(child_bus);
40666 }
40667 -#ifdef CONFIG_HOTPLUG
40668 -EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
40669 -#endif
40670 -
40671 -static void __init pcibios_claim_of_setup(void)
40672 -{
40673 - struct pci_bus *b;
40674 -
40675 - if (firmware_has_feature(FW_FEATURE_ISERIES))
40676 - return;
40677 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32);
40678
40679 - list_for_each_entry(b, &pci_root_buses, node)
40680 - pcibios_claim_one_bus(b);
40681 -}
40682
40683 static u32 get_int_prop(struct device_node *np, const char *name, u32 def)
40684 {
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);
40690 }
40691 }
40692
40693 @@ -339,16 +225,17 @@
40694 EXPORT_SYMBOL(of_create_pci_dev);
40695
40696 void __devinit of_scan_bus(struct device_node *node,
40697 - struct pci_bus *bus)
40698 + struct pci_bus *bus)
40699 {
40700 - struct device_node *child = NULL;
40701 + struct device_node *child;
40702 const u32 *reg;
40703 int reglen, devfn;
40704 struct pci_dev *dev;
40705
40706 DBG("of_scan_bus(%s) bus no %d... \n", node->full_name, bus->number);
40707
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", &reglen);
40713 if (reg == NULL || reglen < 20)
40714 @@ -359,19 +246,26 @@
40715 dev = of_create_pci_dev(child, bus, devfn);
40716 if (!dev)
40717 continue;
40718 - DBG("dev header type: %x\n", dev->hdr_type);
40719 + DBG(" dev header type: %x\n", dev->hdr_type);
40720 + }
40721
40722 + /* Ally all fixups */
40723 + pcibios_fixup_of_probed_bus(bus);
40724 +
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);
40732 + if (dev)
40733 + of_scan_pci_bridge(child, dev);
40734 + }
40735 }
40736 -
40737 - do_bus_setup(bus);
40738 }
40739 EXPORT_SYMBOL(of_scan_bus);
40740
40741 void __devinit of_scan_pci_bridge(struct device_node *node,
40742 - struct pci_dev *dev)
40743 + struct pci_dev *dev)
40744 {
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);
40752 }
40753 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
40754 bus->number);
40755 @@ -462,12 +355,12 @@
40756 void __devinit scan_phb(struct pci_controller *hose)
40757 {
40758 struct pci_bus *bus;
40759 - struct device_node *node = hose->arch_data;
40760 + struct device_node *node = hose->dn;
40761 int i, mode;
40762 - struct resource *res;
40763
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>");
40766
40767 + /* Create an empty bus for the toplevel */
40768 bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node);
40769 if (bus == NULL) {
40770 printk(KERN_ERR "Failed to create bus for PCI domain %04x\n",
40771 @@ -477,27 +370,27 @@
40772 bus->secondary = hose->first_busno;
40773 hose->bus = bus;
40774
40775 - if (!firmware_has_feature(FW_FEATURE_ISERIES))
40776 - pcibios_map_io_space(bus);
40777 -
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);
40784 - }
40785 + /* Get some IO space for the new PHB */
40786 + pcibios_map_io_space(bus);
40787
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);
40799 - }
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];
40805 + }
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);
40809
40810 + /* Get probe mode and perform scan */
40811 mode = PCI_PROBE_NORMAL;
40812 -
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 @@
40817 {
40818 struct pci_controller *hose, *tmp;
40819
40820 + printk(KERN_INFO "PCI: Probing PCI hardware\n");
40821 +
40822 /* For now, override phys_mem_access_prot. If we need it,
40823 * later, we may move that initialization to each ppc_md
40824 */
40825 ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot;
40826
40827 - if (firmware_has_feature(FW_FEATURE_ISERIES))
40828 - iSeries_pcibios_init();
40829 -
40830 - printk(KERN_DEBUG "PCI: Probing PCI hardware\n");
40831 + if (pci_probe_only)
40832 + ppc_pci_flags |= PPC_PCI_PROBE_ONLY;
40833
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);
40838 }
40839
40840 - if (!firmware_has_feature(FW_FEATURE_ISERIES)) {
40841 - if (pci_probe_only)
40842 - pcibios_claim_of_setup();
40843 - else
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();
40848 - }
40849 -
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();
40855
40856 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n");
40857
40858 @@ -551,141 +433,6 @@
40859
40860 subsys_initcall(pcibios_init);
40861
40862 -int pcibios_enable_device(struct pci_dev *dev, int mask)
40863 -{
40864 - u16 cmd, oldcmd;
40865 - int i;
40866 -
40867 - pci_read_config_word(dev, PCI_COMMAND, &cmd);
40868 - oldcmd = cmd;
40869 -
40870 - for (i = 0; i < PCI_NUM_RESOURCES; i++) {
40871 - struct resource *res = &dev->resource[i];
40872 -
40873 - /* Only set up the requested stuff */
40874 - if (!(mask & (1<<i)))
40875 - continue;
40876 -
40877 - if (res->flags & IORESOURCE_IO)
40878 - cmd |= PCI_COMMAND_IO;
40879 - if (res->flags & IORESOURCE_MEM)
40880 - cmd |= PCI_COMMAND_MEMORY;
40881 - }
40882 -
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);
40888 - }
40889 - return 0;
40890 -}
40891 -
40892 -/* Decide whether to display the domain number in /proc */
40893 -int pci_proc_domain(struct pci_bus *bus)
40894 -{
40895 - if (firmware_has_feature(FW_FEATURE_ISERIES))
40896 - return 0;
40897 - else {
40898 - struct pci_controller *hose = pci_bus_to_host(bus);
40899 - return hose->buid != 0;
40900 - }
40901 -}
40902 -
40903 -void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
40904 - struct device_node *dev, int prim)
40905 -{
40906 - const unsigned int *ranges;
40907 - unsigned int pci_space;
40908 - unsigned long size;
40909 - int rlen = 0;
40910 - int memno = 0;
40911 - struct resource *res;
40912 - int np, na = of_n_addr_cells(dev);
40913 - unsigned long pci_addr, cpu_phys_addr;
40914 -
40915 - np = na + 5;
40916 -
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
40924 - */
40925 - ranges = of_get_property(dev, "ranges", &rlen);
40926 - if (ranges == NULL)
40927 - return;
40928 - hose->io_base_phys = 0;
40929 - while ((rlen -= np * sizeof(unsigned int)) >= 0) {
40930 - res = NULL;
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];
40935 - ranges += np;
40936 - if (size == 0)
40937 - continue;
40938 -
40939 - /* Now consume following elements while they are contiguous */
40940 - while (rlen >= np * sizeof(unsigned int)) {
40941 - unsigned long addr, phys;
40942 -
40943 - if (ranges[0] != pci_space)
40944 - break;
40945 - addr = ((unsigned long)ranges[1] << 32) | ranges[2];
40946 - phys = ranges[3];
40947 - if (na >= 2)
40948 - phys = (phys << 32) | ranges[4];
40949 - if (addr != pci_addr + size ||
40950 - phys != cpu_phys_addr + size)
40951 - break;
40952 -
40953 - size += ((unsigned long)ranges[na+3] << 32)
40954 - | ranges[na+4];
40955 - ranges += np;
40956 - rlen -= np * sizeof(unsigned int);
40957 - }
40958 -
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;
40964 -
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);
40970 - break;
40971 - case 2: /* memory space */
40972 - memno = 0;
40973 - while (memno < 3 && hose->mem_resources[memno].flags)
40974 - ++memno;
40975 -
40976 - if (memno == 0)
40977 - hose->pci_mem_offset = cpu_phys_addr - pci_addr;
40978 - if (memno < 3) {
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);
40984 - }
40985 - break;
40986 - }
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;
40993 - }
40994 - }
40995 -}
40996 -
40997 #ifdef CONFIG_HOTPLUG
40998
40999 int pcibios_unmap_io_space(struct pci_bus *bus)
41000 @@ -719,8 +466,7 @@
41001 if (hose->io_base_alloc == 0)
41002 return 0;
41003
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);
41008
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);
41013
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 @@
41021 }
41022 EXPORT_SYMBOL_GPL(pcibios_map_io_space);
41023
41024 -static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
41025 -{
41026 - struct pci_controller *hose = pci_bus_to_host(dev->bus);
41027 - unsigned long offset;
41028 -
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;
41036 - }
41037 -}
41038 -
41039 -void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
41040 - struct pci_bus *bus)
41041 -{
41042 - /* Update device resources. */
41043 - int i;
41044 -
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];
41048 - if (!res->flags)
41049 - continue;
41050 -
41051 - DBG(" 0x%02x < %08lx:0x%016lx...0x%016lx\n",
41052 - i, res->flags, res->start, res->end);
41053 -
41054 - fixup_resource(res, dev);
41055 -
41056 - DBG(" > %08lx:0x%016lx...0x%016lx\n",
41057 - res->flags, res->start, res->end);
41058 - }
41059 -}
41060 -EXPORT_SYMBOL(pcibios_fixup_device_resources);
41061 -
41062 void __devinit pcibios_setup_new_device(struct pci_dev *dev)
41063 {
41064 struct dev_archdata *sd = &dev->dev.archdata;
41065
41066 sd->of_node = pci_device_to_OF_node(dev);
41067
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>");
41071
41072 sd->dma_ops = pci_dma_ops;
41073 @@ -861,7 +568,7 @@
41074 }
41075 EXPORT_SYMBOL(pcibios_setup_new_device);
41076
41077 -static void __devinit do_bus_setup(struct pci_bus *bus)
41078 +void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
41079 {
41080 struct pci_dev *dev;
41081
41082 @@ -870,42 +577,7 @@
41083
41084 list_for_each_entry(dev, &bus->devices, bus_list)
41085 pcibios_setup_new_device(dev);
41086 -
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);
41092 - }
41093 -}
41094 -
41095 -void __devinit pcibios_fixup_bus(struct pci_bus *bus)
41096 -{
41097 - struct pci_dev *dev = bus->self;
41098 - struct device_node *np;
41099 -
41100 - np = pci_bus_to_OF_node(bus);
41101 -
41102 - DBG("pcibios_fixup_bus(%s)\n", np ? np->full_name : "<???>");
41103 -
41104 - if (dev && pci_probe_only &&
41105 - (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
41106 - /* This is a subordinate bridge */
41107 -
41108 - pci_read_bridge_bases(bus);
41109 - pcibios_fixup_device_resources(dev, bus);
41110 - }
41111 -
41112 - do_bus_setup(bus);
41113 -
41114 - if (!pci_probe_only)
41115 - return;
41116 -
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);
41120 }
41121 -EXPORT_SYMBOL(pcibios_fixup_bus);
41122
41123 unsigned long pci_address_to_pio(phys_addr_t address)
41124 {
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
41128 @@ -56,11 +56,6 @@
41129 pdn->busno = (regs[0] >> 16) & 0xff;
41130 pdn->devfn = (regs[0] >> 8) & 0xff;
41131 }
41132 - if (firmware_has_feature(FW_FEATURE_ISERIES)) {
41133 - const u32 *busp = of_get_property(dn, "linux,subbus", NULL);
41134 - if (busp)
41135 - pdn->bussubno = *busp;
41136 - }
41137
41138 pdn->pci_ext_config_space = (type && *type == 1);
41139 return NULL;
41140 @@ -133,7 +128,7 @@
41141 */
41142 void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb)
41143 {
41144 - struct device_node * dn = (struct device_node *) phb->arch_data;
41145 + struct device_node *dn = phb->dn;
41146 struct pci_dn *pdn;
41147
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
41152 @@ -59,6 +59,7 @@
41153 extern int sys_sigreturn(struct pt_regs *regs);
41154
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));
41165 }
41166
41167 +#ifdef CONFIG_PPC64
41168 +static void __init check_cpu_slb_size(unsigned long node)
41169 +{
41170 + u32 *slb_size_ptr;
41171 +
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;
41175 + }
41176 +}
41177 +#else
41178 +#define check_cpu_slb_size(node) do { } while(0)
41179 +#endif
41180 +
41181 static struct feature_property {
41182 const char *name;
41183 u32 min_value;
41184 @@ -600,6 +614,29 @@
41185 #endif /* CONFIG_PPC64 */
41186 };
41187
41188 +#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU)
41189 +static inline void identical_pvr_fixup(unsigned long node)
41190 +{
41191 + unsigned int pvr;
41192 + char *model = of_get_flat_dt_prop(node, "model", NULL);
41193 +
41194 + /*
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.
41200 + */
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);
41205 + }
41206 +}
41207 +#else
41208 +#define identical_pvr_fixup(node) do { } while(0)
41209 +#endif
41210 +
41211 static void __init check_cpu_feature_properties(unsigned long node)
41212 {
41213 unsigned long i;
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)
41219 - /*
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.
41225 - */
41226 - if (strstr(uname, "440EP")) {
41227 - identify_cpu(0, cur_cpu_spec->pvr_value | 0x8);
41228 - }
41229 -#endif
41230 +
41231 + identical_pvr_fixup(node);
41232 }
41233
41234 check_cpu_feature_properties(node);
41235 check_cpu_pa_features(node);
41236 + check_cpu_slb_size(node);
41237
41238 #ifdef CONFIG_PPC_PSERIES
41239 if (nthreads > 1)
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 @@
41244 #else
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;
41249 #endif
41250 /* No node for host bridge ? give up */
41251 if (ppnode == NULL)
41252 @@ -419,7 +419,7 @@
41253
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)
41258 {
41259 const u32 *ranges;
41260 unsigned int rlen;
41261 @@ -438,7 +438,7 @@
41262 * to translate addresses that aren't supposed to be translated in
41263 * the first place. --BenH.
41264 */
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
41273 */
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)
41277 {
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);
41282
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))
41286 break;
41287
41288 /* Complete the move up one level */
41289 @@ -556,8 +557,19 @@
41290
41291 return result;
41292 }
41293 +
41294 +u64 of_translate_address(struct device_node *dev, const u32 *in_addr)
41295 +{
41296 + return __of_translate_address(dev, in_addr, "ranges");
41297 +}
41298 EXPORT_SYMBOL(of_translate_address);
41299
41300 +u64 of_translate_dma_address(struct device_node *dev, const u32 *in_addr)
41301 +{
41302 + return __of_translate_address(dev, in_addr, "dma-ranges");
41303 +}
41304 +EXPORT_SYMBOL(of_translate_dma_address);
41305 +
41306 const u32 *of_get_address(struct device_node *dev, int index, u64 *size,
41307 unsigned int *flags)
41308 {
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
41312 @@ -0,0 +1,52 @@
41313 +/*
41314 + * RapidIO PPC32 support
41315 + *
41316 + * Copyright 2005 MontaVista Software, Inc.
41317 + * Matt Porter <mporter@kernel.crashing.org>
41318 + *
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.
41323 + */
41324 +
41325 +#include <linux/init.h>
41326 +#include <linux/kernel.h>
41327 +#include <linux/rio.h>
41328 +
41329 +#include <asm/rio.h>
41330 +
41331 +/**
41332 + * platform_rio_init - Do platform specific RIO init
41333 + *
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.
41337 + */
41338 +void __attribute__ ((weak))
41339 + platform_rio_init(void)
41340 +{
41341 + printk(KERN_WARNING "RIO: No platform_rio_init() present\n");
41342 +}
41343 +
41344 +/**
41345 + * ppc_rio_init - Do PPC32 RIO init
41346 + *
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.
41350 + */
41351 +static int __init ppc_rio_init(void)
41352 +{
41353 + printk(KERN_INFO "RIO: RapidIO init\n");
41354 +
41355 + /* Platform specific initialization */
41356 + platform_rio_init();
41357 +
41358 + /* Enumerate all registered ports */
41359 + rio_init_mports();
41360 +
41361 + return 0;
41362 +}
41363 +
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 @@
41369
41370 int __devinit rtas_setup_phb(struct pci_controller *phb)
41371 {
41372 - struct device_node *dev = phb->arch_data;
41373 + struct device_node *dev = phb->dn;
41374
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("/");
41380
41381 - for (node = of_get_next_child(root, NULL);
41382 - node != NULL;
41383 - node = of_get_next_child(root, node)) {
41384 -
41385 + for_each_child_of_node(root, node) {
41386 if (node->type == NULL || (strcmp(node->type, "pci") != 0 &&
41387 strcmp(node->type, "pciex") != 0))
41388 continue;
41389 @@ -311,10 +308,12 @@
41390 if (prop)
41391 pci_probe_only = *prop;
41392
41393 +#ifdef CONFIG_PPC32 /* Will be made generic soon */
41394 prop = of_get_property(of_chosen,
41395 "linux,pci-assign-all-buses", NULL);
41396 - if (prop)
41397 - pci_assign_all_buses = *prop;
41398 + if (prop && *prop)
41399 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
41400 +#endif /* CONFIG_PPC32 */
41401 }
41402 }
41403
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
41407 @@ -33,6 +33,7 @@
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>
41415 @@ -57,6 +58,7 @@
41416 #include <asm/mmu.h>
41417 #include <asm/lmb.h>
41418 #include <asm/xmon.h>
41419 +#include <asm/cputhreads.h>
41420
41421 #include "setup.h"
41422
41423 @@ -327,6 +329,31 @@
41424
41425 #ifdef CONFIG_SMP
41426
41427 +int threads_per_core, threads_shift;
41428 +cpumask_t threads_core_mask;
41429 +
41430 +static void __init cpu_init_thread_core_maps(int tpc)
41431 +{
41432 + int i;
41433 +
41434 + threads_per_core = tpc;
41435 + threads_core_mask = CPU_MASK_NONE;
41436 +
41437 + /* This implementation only supports power of 2 number of threads
41438 + * for simplicity and performance
41439 + */
41440 + threads_shift = ilog2(tpc);
41441 + BUG_ON(tpc != (1 << threads_shift));
41442 +
41443 + for (i = 0; i < tpc; i++)
41444 + cpu_set(i, threads_core_mask);
41445 +
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);
41449 +}
41450 +
41451 +
41452 /**
41453 * setup_cpu_maps - initialize the following cpu maps:
41454 * cpu_possible_map
41455 @@ -350,22 +377,32 @@
41456 {
41457 struct device_node *dn = NULL;
41458 int cpu = 0;
41459 + int nthreads = 1;
41460 +
41461 + DBG("smp_setup_cpu_maps()\n");
41462
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;
41466 + int j, len;
41467 +
41468 + DBG(" * %s...\n", dn->full_name);
41469
41470 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
41471 &len);
41472 - if (intserv)
41473 + if (intserv) {
41474 nthreads = len / sizeof(int);
41475 - else {
41476 + DBG(" ibm,ppc-interrupt-server#s -> %d threads\n",
41477 + nthreads);
41478 + } else {
41479 + DBG(" no ibm,ppc-interrupt-server#s -> 1 thread\n");
41480 intserv = of_get_property(dn, "reg", NULL);
41481 if (!intserv)
41482 intserv = &cpu; /* assume logical == phys */
41483 }
41484
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 @@
41492 }
41493 }
41494
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");
41498 + nthreads = 1;
41499 + }
41500 +
41501 #ifdef CONFIG_PPC64
41502 /*
41503 * On pSeries LPAR, we need to know how many cpus
41504 @@ -395,7 +438,7 @@
41505
41506 /* Double maxcpus for processors which have SMT capability */
41507 if (cpu_has_feature(CPU_FTR_SMT))
41508 - maxcpus *= 2;
41509 + maxcpus *= nthreads;
41510
41511 if (maxcpus > NR_CPUS) {
41512 printk(KERN_WARNING
41513 @@ -412,9 +455,16 @@
41514 out:
41515 of_node_put(dn);
41516 }
41517 -
41518 vdso_data->processorCount = num_present_cpus();
41519 #endif /* CONFIG_PPC64 */
41520 +
41521 + /* Initialize CPU <=> thread mapping/
41522 + *
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
41526 + */
41527 + cpu_init_thread_core_maps(nthreads);
41528 }
41529
41530 /*
41531 @@ -424,17 +474,19 @@
41532 */
41533 void __init smp_setup_cpu_sibling_map(void)
41534 {
41535 -#if defined(CONFIG_PPC64)
41536 - int cpu;
41537 +#ifdef CONFIG_PPC64
41538 + int i, cpu, base;
41539
41540 - /*
41541 - * Do the sibling map; assume only two threads per processor.
41542 - */
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);
41552 + }
41553 + DBG("\n");
41554 }
41555 +
41556 #endif /* CONFIG_PPC64 */
41557 }
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>
41571 #else
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
41580 @@ -76,6 +76,8 @@
41581
41582 int smt_enabled_at_boot = 1;
41583
41584 +static int ipi_fail_ok;
41585 +
41586 static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
41587
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.
41594 *
41595 * You must not call this function with disabled interrupts or from a
41596 * hardware interrupt handler or from a bottom half handler.
41597 */
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)
41602 {
41603 struct call_data_struct data;
41604 int ret = -1, num_cpus;
41605 @@ -203,8 +206,6 @@
41606 if (wait)
41607 atomic_set(&data.finished, 0);
41608
41609 - spin_lock(&call_lock);
41610 -
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));
41618 - debugger(NULL);
41619 + if (!ipi_fail_ok)
41620 + debugger(NULL);
41621 goto out;
41622 }
41623 }
41624 @@ -258,14 +260,18 @@
41625 out:
41626 call_data = NULL;
41627 HMT_medium();
41628 - spin_unlock(&call_lock);
41629 return ret;
41630 }
41631
41632 static int __smp_call_function(void (*func)(void *info), void *info,
41633 int nonatomic, int wait)
41634 {
41635 - return smp_call_function_map(func,info,nonatomic,wait,cpu_online_map);
41636 + int ret;
41637 + spin_lock(&call_lock);
41638 + ret =__smp_call_function_map(func, info, nonatomic, wait,
41639 + cpu_online_map);
41640 + spin_unlock(&call_lock);
41641 + return ret;
41642 }
41643
41644 int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
41645 @@ -278,8 +284,8 @@
41646 }
41647 EXPORT_SYMBOL(smp_call_function);
41648
41649 -int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int nonatomic,
41650 - int wait)
41651 +int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
41652 + int nonatomic, int wait)
41653 {
41654 cpumask_t map = CPU_MASK_NONE;
41655 int ret = 0;
41656 @@ -291,9 +297,11 @@
41657 return -EINVAL;
41658
41659 cpu_set(cpu, map);
41660 - if (cpu != get_cpu())
41661 - ret = smp_call_function_map(func,info,nonatomic,wait,map);
41662 - else {
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);
41667 + } else {
41668 local_irq_disable();
41669 func(info);
41670 local_irq_enable();
41671 @@ -305,7 +313,22 @@
41672
41673 void smp_send_stop(void)
41674 {
41675 - __smp_call_function(stop_this_cpu, NULL, 1, 0);
41676 + int nolock;
41677 +
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.
41680 + *
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
41683 + * place.
41684 + */
41685 + ipi_fail_ok = 1;
41686 +
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);
41690 + if (!nolock)
41691 + spin_unlock(&call_lock);
41692 }
41693
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
41698 @@ -0,0 +1,58 @@
41699 +/*
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.
41703 + *
41704 + * Unfortunately, we cannot check for the correct ordering of entries
41705 + * using SYSX().
41706 + *
41707 + * Copyright © IBM Corporation
41708 + *
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.
41713 + */
41714 +#include <asm/unistd.h>
41715 +
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
41722 +#else
41723 +#define OLDSYS(func) __NR_old##func
41724 +#define SYS32ONLY(func) __NR_##func
41725 +#endif
41726 +#define SYSX(f, f3264, f32) -1
41727 +
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)
41732 +
41733 +/* Just insert a marker for ni_syscalls */
41734 +#define __NR_ni_syscall -1
41735 +
41736 +/*
41737 + * These are the known exceptions.
41738 + * Hopefully, there will be no more.
41739 + */
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
41750 +
41751 +/* We call sys_ugetrlimit for syscall number __NR_getrlimit */
41752 +#define getrlimit ugetrlimit
41753 +
41754 +START_TABLE
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
41760 @@ -0,0 +1,33 @@
41761 +#!/bin/sh
41762 +#
41763 +# Just process the CPP output from systbl_chk.c and complain
41764 +# if anything is out of order.
41765 +#
41766 +# Copyright © 2008 IBM Corporation
41767 +#
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.
41772 +
41773 +awk 'BEGIN { num = -1; } # Ignore the beginning of the file
41774 + /^#/ { next; }
41775 + /^[ \t]*$/ { next; }
41776 + /^START_TABLE/ { num = 0; next; }
41777 + /^END_TABLE/ {
41778 + if (num != $2) {
41779 + printf "__NR_syscalls (%s) is not one more than the last syscall (%s)\n",
41780 + $2, num - 1;
41781 + exit(1);
41782 + }
41783 + num = -1; # Ignore the rest of the file
41784 + }
41785 + {
41786 + if (num == -1) next;
41787 + if (($1 != -1) && ($1 != num)) {
41788 + printf "Syscall %s out of order (expected %s)\n",
41789 + $1, num;
41790 + exit(1);
41791 + };
41792 + num++;
41793 + }' "$1"
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,
41799 };
41800
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;
41806 + u64 next_tb;
41807 +};
41808 +
41809 +static DEFINE_PER_CPU(struct decrementer_clock, decrementers);
41810
41811 #ifdef CONFIG_PPC_ISERIES
41812 static unsigned long __initdata iSeries_recal_titan;
41813 @@ -216,7 +219,11 @@
41814 */
41815 static u64 read_spurr(u64 purr)
41816 {
41817 - if (cpu_has_feature(CPU_FTR_SPURR))
41818 + /*
41819 + * cpus without PURR won't have a SPURR
41820 + * We already know the former when we use this, so tell gcc
41821 + */
41822 + if (cpu_has_feature(CPU_FTR_PURR) && cpu_has_feature(CPU_FTR_SPURR))
41823 return mfspr(SPRN_SPURR);
41824 return purr;
41825 }
41826 @@ -227,29 +234,30 @@
41827 */
41828 void account_system_vtime(struct task_struct *tsk)
41829 {
41830 - u64 now, nowscaled, delta, deltascaled;
41831 + u64 now, nowscaled, delta, deltascaled, sys_time;
41832 unsigned long flags;
41833
41834 local_irq_save(flags);
41835 now = read_purr();
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;
41856 }
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);
41863 }
41864 @@ -326,11 +334,9 @@
41865 s64 stolen;
41866 struct cpu_purr_data *pme;
41867
41868 - if (!cpu_has_feature(CPU_FTR_PURR))
41869 - return;
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 */
41875 tb = mftb();
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))
41880 return;
41881 local_irq_save(flags);
41882 - pme = &per_cpu(cpu_purr_data, smp_processor_id());
41883 + pme = &__get_cpu_var(cpu_purr_data);
41884 pme->tb = mftb();
41885 pme->purr = mfspr(SPRN_PURR);
41886 pme->initialized = 1;
41887 @@ -556,8 +562,8 @@
41888 void timer_interrupt(struct pt_regs * regs)
41889 {
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;
41895 u64 now;
41896
41897 /* Ensure a positive value is written to the decrementer, or else
41898 @@ -570,9 +576,9 @@
41899 #endif
41900
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)
41908 set_dec((int)now);
41909 return;
41910 @@ -623,6 +629,45 @@
41911 set_dec(ticks);
41912 }
41913
41914 +#ifdef CONFIG_SUSPEND
41915 +void generic_suspend_disable_irqs(void)
41916 +{
41917 + preempt_disable();
41918 +
41919 + /* Disable the decrementer, so that it doesn't interfere
41920 + * with suspending.
41921 + */
41922 +
41923 + set_dec(0x7fffffff);
41924 + local_irq_disable();
41925 + set_dec(0x7fffffff);
41926 +}
41927 +
41928 +void generic_suspend_enable_irqs(void)
41929 +{
41930 + wakeup_decrementer();
41931 +
41932 + local_irq_enable();
41933 + preempt_enable();
41934 +}
41935 +
41936 +/* Overrides the weak version in kernel/power/main.c */
41937 +void arch_suspend_disable_irqs(void)
41938 +{
41939 + if (ppc_md.suspend_disable_irqs)
41940 + ppc_md.suspend_disable_irqs();
41941 + generic_suspend_disable_irqs();
41942 +}
41943 +
41944 +/* Overrides the weak version in kernel/power/main.c */
41945 +void arch_suspend_enable_irqs(void)
41946 +{
41947 + generic_suspend_enable_irqs();
41948 + if (ppc_md.suspend_enable_irqs)
41949 + ppc_md.suspend_enable_irqs();
41950 +}
41951 +#endif
41952 +
41953 #ifdef CONFIG_SMP
41954 void __init smp_space_timers(unsigned int max_cpus)
41955 {
41956 @@ -811,7 +856,7 @@
41957 static int decrementer_set_next_event(unsigned long evt,
41958 struct clock_event_device *dev)
41959 {
41960 - __get_cpu_var(decrementer_next_tb) = get_tb_or_rtc() + evt;
41961 + __get_cpu_var(decrementers).next_tb = get_tb_or_rtc() + evt;
41962 set_dec(evt);
41963 return 0;
41964 }
41965 @@ -825,7 +870,7 @@
41966
41967 static void register_decrementer_clockevent(int cpu)
41968 {
41969 - struct clock_event_device *dec = &per_cpu(decrementers, cpu);
41970 + struct clock_event_device *dec = &per_cpu(decrementers, cpu).event;
41971
41972 *dec = decrementer_clockevent;
41973 dec->cpumask = cpumask_of_cpu(cpu);
41974 @@ -836,7 +881,7 @@
41975 clockevents_register_device(dec);
41976 }
41977
41978 -void init_decrementer_clockevent(void)
41979 +static void __init init_decrementer_clockevent(void)
41980 {
41981 int cpu = smp_processor_id();
41982
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)
41988 #endif
41989
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)
41993 {
41994 unsigned long reason = get_mc_reason(regs);
41995
41996 -#if defined(CONFIG_4xx) && !defined(CONFIG_440A)
41997 if (reason & ESR_IMCP) {
41998 printk("Instruction");
41999 mtspr(SPRN_ESR, reason & ~ESR_IMCP);
42000 } else
42001 printk("Data");
42002 printk(" machine check in kernel mode.\n");
42003 -#elif defined(CONFIG_440A)
42004 +
42005 + return 0;
42006 +}
42007 +
42008 +int machine_check_440A(struct pt_regs *regs)
42009 +{
42010 + unsigned long reason = get_mc_reason(regs);
42011 +
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 @@
42016 /* Clear MCSR */
42017 mtspr(SPRN_MCSR, mcsr);
42018 }
42019 -#elif defined (CONFIG_E500)
42020 + return 0;
42021 +}
42022 +#elif defined(CONFIG_E500)
42023 +int machine_check_e500(struct pt_regs *regs)
42024 +{
42025 + unsigned long reason = get_mc_reason(regs);
42026 +
42027 printk("Machine check in kernel mode.\n");
42028 printk("Caused by (from MCSR=%lx): ", reason);
42029
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)
42035 +
42036 + return 0;
42037 +}
42038 +#elif defined(CONFIG_E200)
42039 +int machine_check_e200(struct pt_regs *regs)
42040 +{
42041 + unsigned long reason = get_mc_reason(regs);
42042 +
42043 printk("Machine check in kernel mode.\n");
42044 printk("Caused by (from MCSR=%lx): ", reason);
42045
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 */
42051 +
42052 + return 0;
42053 +}
42054 +#else
42055 +int machine_check_generic(struct pt_regs *regs)
42056 +{
42057 + unsigned long reason = get_mc_reason(regs);
42058 +
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 @@
42063 default:
42064 printk("Unknown values in msr\n");
42065 }
42066 -#endif /* CONFIG_4xx */
42067 -
42068 return 0;
42069 }
42070 +#endif /* everything else */
42071
42072 void machine_check_exception(struct pt_regs *regs)
42073 {
42074 int recover = 0;
42075
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.
42082 + */
42083 if (ppc_md.machine_check_exception)
42084 recover = ppc_md.machine_check_exception(regs);
42085 - else
42086 - recover = generic_machine_check_exception(regs);
42087 + else if (cur_cpu_spec->machine_check)
42088 + recover = cur_cpu_spec->machine_check(regs);
42089
42090 - if (recover)
42091 + if (recover > 0)
42092 return;
42093
42094 if (user_mode(regs)) {
42095 @@ -476,7 +507,12 @@
42096 }
42097
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
42101 + *
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.
42104 + * -- BenH
42105 + */
42106 bad_page_fault(regs, regs->dar, SIGBUS);
42107 return;
42108 #endif
42109 @@ -622,6 +658,9 @@
42110 #define INST_POPCNTB 0x7c0000f4
42111 #define INST_POPCNTB_MASK 0xfc0007fe
42112
42113 +#define INST_ISEL 0x7c00001e
42114 +#define INST_ISEL_MASK 0xfc00003e
42115 +
42116 static int emulate_string_inst(struct pt_regs *regs, u32 instword)
42117 {
42118 u8 rT = (instword >> 21) & 0x1f;
42119 @@ -707,6 +746,23 @@
42120 return 0;
42121 }
42122
42123 +static int emulate_isel(struct pt_regs *regs, u32 instword)
42124 +{
42125 + u8 rT = (instword >> 21) & 0x1f;
42126 + u8 rA = (instword >> 16) & 0x1f;
42127 + u8 rB = (instword >> 11) & 0x1f;
42128 + u8 BC = (instword >> 6) & 0x1f;
42129 + u8 bit;
42130 + unsigned long tmp;
42131 +
42132 + tmp = (rA == 0) ? 0 : regs->gpr[rA];
42133 + bit = (regs->ccr >> (31 - BC)) & 0x1;
42134 +
42135 + regs->gpr[rT] = bit ? tmp : regs->gpr[rB];
42136 +
42137 + return 0;
42138 +}
42139 +
42140 static int emulate_instruction(struct pt_regs *regs)
42141 {
42142 u32 instword;
42143 @@ -749,6 +805,11 @@
42144 return emulate_popcntb_inst(regs, instword);
42145 }
42146
42147 + /* Emulate isel (Integer Select) instruction */
42148 + if ((instword & INST_ISEL_MASK) == INST_ISEL) {
42149 + return emulate_isel(regs, instword);
42150 + }
42151 +
42152 return -EINVAL;
42153 }
42154
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
42158 @@ -54,9 +54,16 @@
42159 #elif defined(CONFIG_PPC_EARLY_DEBUG_44x)
42160 /* PPC44x debug */
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)
42166 udbg_init_cpm();
42167 #endif
42168 +
42169 +#ifdef CONFIG_PPC_EARLY_DEBUG
42170 + console_loglevel = 10;
42171 +#endif
42172 }
42173
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
42178 @@ -46,7 +46,7 @@
42179
42180 #define LCR_DLAB 0x80
42181
42182 -static volatile struct NS16550 __iomem *udbg_comport;
42183 +static struct NS16550 __iomem *udbg_comport;
42184
42185 static void udbg_550_putc(char c)
42186 {
42187 @@ -117,7 +117,7 @@
42188 {
42189 unsigned int dll, dlm, divisor, prescaler, speed;
42190 u8 old_lcr;
42191 - volatile struct NS16550 __iomem *port = comport;
42192 + struct NS16550 __iomem *port = comport;
42193
42194 old_lcr = in_8(&port->lcr);
42195
42196 @@ -162,7 +162,7 @@
42197
42198 void __init udbg_init_maple_realmode(void)
42199 {
42200 - udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8;
42201 + udbg_comport = (struct NS16550 __iomem *)0xf40003f8;
42202
42203 udbg_putc = udbg_maple_real_putc;
42204 udbg_getc = NULL;
42205 @@ -184,7 +184,7 @@
42206
42207 void udbg_init_pas_realmode(void)
42208 {
42209 - udbg_comport = (volatile struct NS16550 __iomem *)0xfcff03f8UL;
42210 + udbg_comport = (struct NS16550 __iomem *)0xfcff03f8UL;
42211
42212 udbg_putc = udbg_pas_real_putc;
42213 udbg_getc = NULL;
42214 @@ -219,9 +219,42 @@
42215 void __init udbg_init_44x_as1(void)
42216 {
42217 udbg_comport =
42218 - (volatile struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
42219 + (struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
42220
42221 udbg_putc = udbg_44x_as1_putc;
42222 udbg_getc = udbg_44x_as1_getc;
42223 }
42224 #endif /* CONFIG_PPC_EARLY_DEBUG_44x */
42225 +
42226 +#ifdef CONFIG_PPC_EARLY_DEBUG_40x
42227 +static void udbg_40x_real_putc(char c)
42228 +{
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();
42233 + if (c == '\n')
42234 + udbg_40x_real_putc('\r');
42235 + }
42236 +}
42237 +
42238 +static int udbg_40x_real_getc(void)
42239 +{
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);
42244 + }
42245 + return -1;
42246 +}
42247 +
42248 +void __init udbg_init_40x_realmode(void)
42249 +{
42250 + udbg_comport = (struct NS16550 __iomem *)
42251 + CONFIG_PPC_EARLY_DEBUG_40x_PHYSADDR;
42252 +
42253 + udbg_putc = udbg_40x_real_putc;
42254 + udbg_getc = udbg_40x_real_getc;
42255 + udbg_getc_poll = NULL;
42256 +}
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)
42263
42264 #ifndef __FP_FRAC_ADD_4
42265 -#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
42266 - (r0 = x0 + 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) \
42271 + do { \
42272 + int _c1, _c2, _c3; \
42273 + r0 = x0 + y0; \
42274 + _c1 = r0 < x0; \
42275 + r1 = x1 + y1; \
42276 + _c2 = r1 < x1; \
42277 + r1 += _c1; \
42278 + _c2 |= r1 < _c1; \
42279 + r2 = x2 + y2; \
42280 + _c3 = r2 < x2; \
42281 + r2 += _c2; \
42282 + _c3 |= r2 < _c2; \
42283 + r3 = x3 + y3 + _c3; \
42284 + } while (0)
42285 #endif
42286
42287 #ifndef __FP_FRAC_SUB_4
42288 -#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
42289 - (r0 = x0 - 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) \
42294 + do { \
42295 + int _c1, _c2, _c3; \
42296 + r0 = x0 - y0; \
42297 + _c1 = r0 > x0; \
42298 + r1 = x1 - y1; \
42299 + _c2 = r1 > x1; \
42300 + r1 -= _c1; \
42301 + _c2 |= r1 > _c1; \
42302 + r2 = x2 - y2; \
42303 + _c3 = r2 > x2; \
42304 + r2 -= _c2; \
42305 + _c3 |= r2 > _c2; \
42306 + r3 = x3 - y3 - _c3; \
42307 + } while (0)
42308 #endif
42309
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))
42316 return 0;
42317
42318 - if (trap == 0x300) {
42319 - if (debugger_fault_handler(regs))
42320 - return 0;
42321 - }
42322 + if (unlikely(debugger_fault_handler(regs)))
42323 + return 0;
42324
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 @@
42328 return SIGSEGV;
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)
42342 {
42343 - settlbcam(0, KERNELBASE, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0);
42344 + settlbcam(0, PAGE_OFFSET, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0);
42345 tlbcam_index++;
42346 if (cam1) {
42347 tlbcam_index++;
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);
42350 }
42351 if (cam2) {
42352 tlbcam_index++;
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);
42355 }
42356 }
42357
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
42361 @@ -96,6 +96,7 @@
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
42371 */
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;
42379 -
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;
42384 - else
42385 - HPAGE_SHIFT = 0; /* No huge pages dude ! */
42386 + set_huge_psize(MMU_PAGE_1M);
42387 #endif /* CONFIG_HUGETLB_PAGE */
42388 }
42389
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>
42396
42397 +#define HPAGE_SHIFT_64K 16
42398 +#define HPAGE_SHIFT_16M 24
42399 +
42400 #define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT)
42401 #define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT)
42402
42403 -#ifdef CONFIG_PPC_64K_PAGES
42404 -#define HUGEPTE_INDEX_SIZE (PMD_SHIFT-HPAGE_SHIFT)
42405 -#else
42406 -#define HUGEPTE_INDEX_SIZE (PUD_SHIFT-HPAGE_SHIFT)
42407 -#endif
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)
42413
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))
42418
42419 @@ -82,11 +81,35 @@
42420 return 0;
42421 }
42422
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)
42427 +#else
42428 +static inline
42429 +pmd_t *hpmd_offset(pud_t *pud, unsigned long addr)
42430 +{
42431 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
42432 + return pmd_offset(pud, addr);
42433 + else
42434 + return (pmd_t *) pud;
42435 +}
42436 +static inline
42437 +pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr)
42438 +{
42439 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
42440 + return pmd_alloc(mm, pud, addr);
42441 + else
42442 + return (pmd_t *) pud;
42443 +}
42444 +#endif
42445 +
42446 /* Modelled after find_linux_pte() */
42447 pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
42448 {
42449 pgd_t *pg;
42450 pud_t *pu;
42451 + pmd_t *pm;
42452
42453 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
42454
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
42460 - pmd_t *pm;
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);
42465 -#else
42466 - return hugepte_offset((hugepd_t *)pu, addr);
42467 -#endif
42468 }
42469 }
42470
42471 @@ -114,6 +132,7 @@
42472 {
42473 pgd_t *pg;
42474 pud_t *pu;
42475 + pmd_t *pm;
42476 hugepd_t *hpdp = NULL;
42477
42478 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
42479 @@ -124,14 +143,9 @@
42480 pu = pud_alloc(mm, pg, addr);
42481
42482 if (pu) {
42483 -#ifdef CONFIG_PPC_64K_PAGES
42484 - pmd_t *pm;
42485 - pm = pmd_alloc(mm, pu, addr);
42486 + pm = hpmd_alloc(mm, pu, addr);
42487 if (pm)
42488 hpdp = (hugepd_t *)pm;
42489 -#else
42490 - hpdp = (hugepd_t *)pu;
42491 -#endif
42492 }
42493
42494 if (! hpdp)
42495 @@ -158,7 +172,6 @@
42496 PGF_CACHENUM_MASK));
42497 }
42498
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 @@
42504 pud_clear(pud);
42505 pmd_free_tlb(tlb, pmd);
42506 }
42507 -#endif
42508
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 @@
42512 continue;
42513 hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
42514 #else
42515 - if (pud_none(*pud))
42516 - continue;
42517 - free_hugepte_range(tlb, (hugepd_t *)pud);
42518 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K) {
42519 + if (pud_none_or_clear_bad(pud))
42520 + continue;
42521 + hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
42522 + } else {
42523 + if (pud_none(*pud))
42524 + continue;
42525 + free_hugepte_range(tlb, (hugepd_t *)pud);
42526 + }
42527 #endif
42528 } while (pud++, addr = next, addr != end);
42529
42530 @@ -526,6 +544,57 @@
42531 return err;
42532 }
42533
42534 +void set_huge_psize(int psize)
42535 +{
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);
42545 +#else
42546 + if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
42547 + hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
42548 + else
42549 + hugepte_shift = (PUD_SHIFT-HPAGE_SHIFT);
42550 +#endif
42551 +
42552 + } else
42553 + HPAGE_SHIFT = 0;
42554 +}
42555 +
42556 +static int __init hugepage_setup_sz(char *str)
42557 +{
42558 + unsigned long long size;
42559 + int mmu_psize = -1;
42560 + int shift;
42561 +
42562 + size = memparse(str, &str);
42563 +
42564 + shift = __ffs(size);
42565 + switch (shift) {
42566 +#ifndef CONFIG_PPC_64K_PAGES
42567 + case HPAGE_SHIFT_64K:
42568 + mmu_psize = MMU_PAGE_64K;
42569 + break;
42570 +#endif
42571 + case HPAGE_SHIFT_16M:
42572 + mmu_psize = MMU_PAGE_16M;
42573 + break;
42574 + }
42575 +
42576 + if (mmu_psize >=0 && mmu_psize_defs[mmu_psize].shift)
42577 + set_huge_psize(mmu_psize);
42578 + else
42579 + printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size);
42580 +
42581 + return 1;
42582 +}
42583 +__setup("hugepagesz=", hugepage_setup_sz);
42584 +
42585 static void zero_ctor(struct kmem_cache *cache, void *addr)
42586 {
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 @@
42592 }
42593 }
42594 }
42595 +
42596 +int __init lmb_is_reserved(unsigned long addr)
42597 +{
42598 + int i;
42599 +
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))
42604 + return 1;
42605 + }
42606 + return 0;
42607 +}
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 @@
42612 */
42613 #ifdef CONFIG_HIGHMEM
42614 free_bootmem_with_active_regions(0, total_lowmem >> PAGE_SHIFT);
42615 +
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,
42627 + adjusted_size);
42628 + }
42629 + }
42630 #else
42631 free_bootmem_with_active_regions(0, max_pfn);
42632 -#endif
42633
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));
42638
42639 +#endif
42640 /* XXX need to clip this if using highmem? */
42641 sparse_memory_present_with_active_regions(0);
42642
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);
42647 -
42648 + if (lmb_is_reserved(pfn << PAGE_SHIFT))
42649 + continue;
42650 ClearPageReserved(page);
42651 init_page_count(page);
42652 __free_page(page);
42653 totalhigh_pages++;
42654 + reservedpages--;
42655 }
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;
42666
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,
42674 + mmu_slb_size);
42675
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 @@
42682
42683 7: ld r10,PACASTABRR(r13)
42684 addi r10,r10,1
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)
42689 + cmpldi r10,0
42690
42691 blt+ 4f
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
42696 @@ -61,7 +61,7 @@
42697 #define NUM_THREADS 2 /* number of physical threads in
42698 * physical processor
42699 */
42700 -#define NUM_TRACE_BUS_WORDS 4
42701 +#define NUM_DEBUG_BUS_WORDS 4
42702 #define NUM_INPUT_BUS_WORDS 2
42703
42704 #define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */
42705 @@ -169,7 +169,6 @@
42706
42707 static u32 ctr_enabled;
42708
42709 -static unsigned char trace_bus[NUM_TRACE_BUS_WORDS];
42710 static unsigned char input_bus[NUM_INPUT_BUS_WORDS];
42711
42712 /*
42713 @@ -298,7 +297,7 @@
42714
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);
42719
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;
42724 }
42725
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)));
42732
42733 for (j = 0; j < NUM_INPUT_BUS_WORDS; j++) {
42734 if (input_bus[j] == 0xff) {
42735 input_bus[j] = i;
42736 pm_regs.group_control |=
42737 - (i << (31 - i));
42738 + (i << (30 - (2 * j)));
42739
42740 break;
42741 }
42742 @@ -450,6 +449,12 @@
42743 hdw_thread = 1 ^ hdw_thread;
42744 next_hdw_thread = hdw_thread;
42745
42746 + pm_regs.group_control = 0;
42747 + pm_regs.debug_bus_control = 0;
42748 +
42749 + for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
42750 + input_bus[i] = 0xff;
42751 +
42752 /*
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;
42757 }
42758
42759 - for (i = 0; i < NUM_TRACE_BUS_WORDS; i++)
42760 - trace_bus[i] = 0xff;
42761 -
42762 for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
42763 input_bus[i] = 0xff;
42764
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 @@
42769 # help
42770 # This option enables support for the CPCI405 board.
42771
42772 -#config EP405
42773 -# bool "EP405/EP405PC"
42774 -# depends on 40x
42775 -# default n
42776 -# select 405GP
42777 -# help
42778 -# This option enables support for the EP405/EP405PC boards.
42779 -
42780 -#config EP405PC
42781 -# bool "EP405PC Support"
42782 -# depends on EP405
42783 -# default y
42784 -# help
42785 -# This option enables support for the extra features of the EP405PC board.
42786 +config EP405
42787 + bool "EP405/EP405PC"
42788 + depends on 40x
42789 + default n
42790 + select 405GP
42791 + select PCI
42792 + help
42793 + This option enables support for the EP405/EP405PC boards.
42794
42795 config KILAUEA
42796 bool "Kilauea"
42797 depends on 40x
42798 default n
42799 + select 405EX
42800 + select PPC4xx_PCI_EXPRESS
42801 help
42802 This option enables support for the AMCC PPC405EX evaluation board.
42803
42804 +config MAKALU
42805 + bool "Makalu"
42806 + depends on 40x
42807 + default n
42808 + select 405EX
42809 + select PCI
42810 + select PPC4xx_PCI_EXPRESS
42811 + help
42812 + This option enables support for the AMCC PPC405EX board.
42813 +
42814 #config REDWOOD_5
42815 # bool "Redwood-5"
42816 # depends on 40x
42817 @@ -65,6 +71,7 @@
42818 depends on 40x
42819 default y
42820 select 405GP
42821 + select PCI
42822 help
42823 This option enables support for the IBM PPC405GP evaluation board.
42824
42825 @@ -105,6 +112,11 @@
42826 config 405EP
42827 bool
42828
42829 +config 405EX
42830 + bool
42831 + select IBM_NEW_EMAC_EMAC4
42832 + select IBM_NEW_EMAC_RGMII
42833 +
42834 config 405GPR
42835 bool
42836
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
42840 @@ -1,3 +1,5 @@
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
42849 @@ -0,0 +1,123 @@
42850 +/*
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>.
42855 + *
42856 + * Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
42857 + *
42858 + * Rewritten and ported to the merged powerpc tree:
42859 + * Copyright 2007 IBM Corporation
42860 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
42861 + *
42862 + * Adapted to EP405 by Ben. Herrenschmidt <benh@kernel.crashing.org>
42863 + *
42864 + * TODO: Wire up the PCI IRQ mux and the southbridge interrupts
42865 + *
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
42869 + * or implied.
42870 + */
42871 +
42872 +#include <linux/init.h>
42873 +#include <linux/of_platform.h>
42874 +
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>
42881 +
42882 +static struct device_node *bcsr_node;
42883 +static void __iomem *bcsr_regs;
42884 +
42885 +/* BCSR registers */
42886 +#define BCSR_ID 0
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 */
42898 +
42899 +
42900 +static __initdata struct of_device_id ep405_of_bus[] = {
42901 + { .compatible = "ibm,plb3", },
42902 + { .compatible = "ibm,opb", },
42903 + { .compatible = "ibm,ebc", },
42904 + {},
42905 +};
42906 +
42907 +static int __init ep405_device_probe(void)
42908 +{
42909 + of_platform_bus_probe(NULL, ep405_of_bus, NULL);
42910 +
42911 + return 0;
42912 +}
42913 +machine_device_initcall(ep405, ep405_device_probe);
42914 +
42915 +static void __init ep405_init_bcsr(void)
42916 +{
42917 + const u8 *irq_routing;
42918 + int i;
42919 +
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");
42924 + return;
42925 + }
42926 + bcsr_regs = of_iomap(bcsr_node, 0);
42927 + if (bcsr_regs == NULL) {
42928 + printk(KERN_ERR "EP405 BCSR failed to map !\n");
42929 + return;
42930 + }
42931 +
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)
42935 + return;
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);
42940 + }
42941 + in_8(bcsr_regs + BCSR_XIRQ_SELECT);
42942 + mb();
42943 + out_8(bcsr_regs + BCSR_GPIO_IRQ_PAR_CTRL, 0xfe);
42944 +}
42945 +
42946 +static void __init ep405_setup_arch(void)
42947 +{
42948 + /* Find & init the BCSR CPLD */
42949 + ep405_init_bcsr();
42950 +
42951 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
42952 +}
42953 +
42954 +static int __init ep405_probe(void)
42955 +{
42956 + unsigned long root = of_get_flat_dt_root();
42957 +
42958 + if (!of_flat_dt_is_compatible(root, "ep405"))
42959 + return 0;
42960 +
42961 + return 1;
42962 +}
42963 +
42964 +define_machine(ep405) {
42965 + .name = "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,
42972 +};
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
42976 @@ -19,8 +19,9 @@
42977 #include <asm/udbg.h>
42978 #include <asm/time.h>
42979 #include <asm/uic.h>
42980 +#include <asm/pci-bridge.h>
42981
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 @@
42988
42989 static int __init kilauea_device_probe(void)
42990 {
42991 - if (!machine_is(kilauea))
42992 - return 0;
42993 -
42994 of_platform_bus_probe(NULL, kilauea_of_bus, NULL);
42995
42996 return 0;
42997 }
42998 -device_initcall(kilauea_device_probe);
42999 +machine_device_initcall(kilauea, kilauea_device_probe);
43000
43001 static int __init kilauea_probe(void)
43002 {
43003 @@ -45,6 +43,8 @@
43004 if (!of_flat_dt_is_compatible(root, "amcc,kilauea"))
43005 return 0;
43006
43007 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43008 +
43009 return 1;
43010 }
43011
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
43015 @@ -0,0 +1,58 @@
43016 +/*
43017 + * Makalu board specific routines
43018 + *
43019 + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
43020 + *
43021 + * Based on the Walnut code by
43022 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
43023 + * Copyright 2007 IBM Corporation
43024 + *
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.
43029 + */
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>
43038 +
43039 +static __initdata struct of_device_id makalu_of_bus[] = {
43040 + { .compatible = "ibm,plb4", },
43041 + { .compatible = "ibm,opb", },
43042 + { .compatible = "ibm,ebc", },
43043 + {},
43044 +};
43045 +
43046 +static int __init makalu_device_probe(void)
43047 +{
43048 + of_platform_bus_probe(NULL, makalu_of_bus, NULL);
43049 +
43050 + return 0;
43051 +}
43052 +machine_device_initcall(makalu, makalu_device_probe);
43053 +
43054 +static int __init makalu_probe(void)
43055 +{
43056 + unsigned long root = of_get_flat_dt_root();
43057 +
43058 + if (!of_flat_dt_is_compatible(root, "amcc,makalu"))
43059 + return 0;
43060 +
43061 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43062 +
43063 + return 1;
43064 +}
43065 +
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,
43073 +};
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>
43080
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", },
43088 + {}
43089 +};
43090 +
43091 static int __init virtex_device_probe(void)
43092 {
43093 - if (!machine_is(virtex))
43094 - return 0;
43095 -
43096 - of_platform_bus_probe(NULL, NULL, NULL);
43097 + of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL);
43098
43099 return 0;
43100 }
43101 -device_initcall(virtex_device_probe);
43102 +machine_device_initcall(virtex, virtex_device_probe);
43103
43104 static int __init virtex_probe(void)
43105 {
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
43109 @@ -24,8 +24,9 @@
43110 #include <asm/udbg.h>
43111 #include <asm/time.h>
43112 #include <asm/uic.h>
43113 +#include <asm/pci-bridge.h>
43114
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 @@
43121
43122 static int __init walnut_device_probe(void)
43123 {
43124 - if (!machine_is(walnut))
43125 - return 0;
43126 -
43127 - /* FIXME: do bus probe here */
43128 of_platform_bus_probe(NULL, walnut_of_bus, NULL);
43129 + of_instantiate_rtc();
43130
43131 return 0;
43132 }
43133 -device_initcall(walnut_device_probe);
43134 +machine_device_initcall(walnut, walnut_device_probe);
43135
43136 static int __init walnut_probe(void)
43137 {
43138 @@ -51,6 +49,8 @@
43139 if (!of_flat_dt_is_compatible(root, "ibm,walnut"))
43140 return 0;
43141
43142 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43143 +
43144 return 1;
43145 }
43146
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
43150 @@ -3,6 +3,7 @@
43151 depends on 44x
43152 default n
43153 select 440EP
43154 + select PCI
43155 help
43156 This option enables support for the IBM PPC440EP evaluation board.
43157
43158 @@ -11,6 +12,8 @@
43159 depends on 44x
43160 default y
43161 select 440GP
43162 + select PCI
43163 + select OF_RTC
43164 help
43165 This option enables support for the IBM PPC440GP evaluation board.
43166
43167 @@ -22,6 +25,48 @@
43168 help
43169 This option enables support for the AMCC PPC440EPX evaluation board.
43170
43171 +config TAISHAN
43172 + bool "Taishan"
43173 + depends on 44x
43174 + default n
43175 + select 440GX
43176 + select PCI
43177 + help
43178 + This option enables support for the AMCC PPC440GX "Taishan"
43179 + evaluation board.
43180 +
43181 +config KATMAI
43182 + bool "Katmai"
43183 + depends on 44x
43184 + default n
43185 + select 440SPe
43186 + select PCI
43187 + select PPC4xx_PCI_EXPRESS
43188 + help
43189 + This option enables support for the AMCC PPC440SPe evaluation board.
43190 +
43191 +config RAINIER
43192 + bool "Rainier"
43193 + depends on 44x
43194 + default n
43195 + select 440GRX
43196 + select PCI
43197 + help
43198 + This option enables support for the AMCC PPC440GRX evaluation board.
43199 +
43200 +config WARP
43201 + bool "PIKA Warp"
43202 + depends on 44x
43203 + default n
43204 + select 440EP
43205 + help
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.
43209 +
43210 + See http://www.pikatechnologies.com/ and follow the "PIKA for Computer
43211 + Telephony Developers" link for more information.
43212 +
43213 #config LUAN
43214 # bool "Luan"
43215 # depends on 44x
43216 @@ -44,6 +89,7 @@
43217 select PPC_FPU
43218 select IBM440EP_ERR42
43219 select IBM_NEW_EMAC_ZMII
43220 + select USB_ARCH_HAS_OHCI
43221
43222 config 440EPX
43223 bool
43224 @@ -52,20 +98,29 @@
43225 select IBM_NEW_EMAC_RGMII
43226 select IBM_NEW_EMAC_ZMII
43227
43228 +config 440GRX
43229 + bool
43230 + select IBM_NEW_EMAC_EMAC4
43231 + select IBM_NEW_EMAC_RGMII
43232 + select IBM_NEW_EMAC_ZMII
43233 +
43234 config 440GP
43235 bool
43236 select IBM_NEW_EMAC_ZMII
43237
43238 config 440GX
43239 bool
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
43244
43245 config 440SP
43246 bool
43247
43248 -config 440A
43249 +config 440SPe
43250 + select IBM_NEW_EMAC_EMAC4
43251 bool
43252 - depends on 440GX || 440EPX
43253 - default y
43254
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
43260 @@ -1,4 +1,9 @@
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
43274 @@ -21,9 +21,11 @@
43275 #include <asm/udbg.h>
43276 #include <asm/time.h>
43277 #include <asm/uic.h>
43278 +#include <asm/pci-bridge.h>
43279 +
43280 #include "44x.h"
43281
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 @@
43288
43289 static int __init bamboo_device_probe(void)
43290 {
43291 - if (!machine_is(bamboo))
43292 - return 0;
43293 -
43294 of_platform_bus_probe(NULL, bamboo_of_bus, NULL);
43295
43296 return 0;
43297 }
43298 -device_initcall(bamboo_device_probe);
43299 +machine_device_initcall(bamboo, bamboo_device_probe);
43300
43301 static int __init bamboo_probe(void)
43302 {
43303 @@ -48,6 +47,8 @@
43304 if (!of_flat_dt_is_compatible(root, "amcc,bamboo"))
43305 return 0;
43306
43307 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43308 +
43309 return 1;
43310 }
43311
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 @@
43316
43317 #include <linux/init.h>
43318 #include <linux/of_platform.h>
43319 +#include <linux/rtc.h>
43320
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>
43327
43328 #include "44x.h"
43329
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 @@
43336
43337 static int __init ebony_device_probe(void)
43338 {
43339 - if (!machine_is(ebony))
43340 - return 0;
43341 -
43342 of_platform_bus_probe(NULL, ebony_of_bus, NULL);
43343 + of_instantiate_rtc();
43344
43345 return 0;
43346 }
43347 -device_initcall(ebony_device_probe);
43348 +machine_device_initcall(ebony, ebony_device_probe);
43349
43350 /*
43351 * Called very early, MMU is off, device-tree isn't unflattened
43352 @@ -55,6 +55,8 @@
43353 if (!of_flat_dt_is_compatible(root, "ibm,ebony"))
43354 return 0;
43355
43356 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43357 +
43358 return 1;
43359 }
43360
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
43364 @@ -0,0 +1,63 @@
43365 +/*
43366 + * Katmai board specific routines
43367 + *
43368 + * Benjamin Herrenschmidt <benh@kernel.crashing.org>
43369 + * Copyright 2007 IBM Corp.
43370 + *
43371 + * Based on the Bamboo code by
43372 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
43373 + * Copyright 2007 IBM Corporation
43374 + *
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.
43379 + */
43380 +#include <linux/init.h>
43381 +#include <linux/of_platform.h>
43382 +
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>
43389 +
43390 +#include "44x.h"
43391 +
43392 +static __initdata struct of_device_id katmai_of_bus[] = {
43393 + { .compatible = "ibm,plb4", },
43394 + { .compatible = "ibm,opb", },
43395 + { .compatible = "ibm,ebc", },
43396 + {},
43397 +};
43398 +
43399 +static int __init katmai_device_probe(void)
43400 +{
43401 + of_platform_bus_probe(NULL, katmai_of_bus, NULL);
43402 +
43403 + return 0;
43404 +}
43405 +machine_device_initcall(katmai, katmai_device_probe);
43406 +
43407 +static int __init katmai_probe(void)
43408 +{
43409 + unsigned long root = of_get_flat_dt_root();
43410 +
43411 + if (!of_flat_dt_is_compatible(root, "amcc,katmai"))
43412 + return 0;
43413 +
43414 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43415 +
43416 + return 1;
43417 +}
43418 +
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,
43427 +};
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
43431 @@ -0,0 +1,62 @@
43432 +/*
43433 + * Rainier board specific routines
43434 + *
43435 + * Valentine Barshak <vbarshak@ru.mvista.com>
43436 + * Copyright 2007 MontaVista Software Inc.
43437 + *
43438 + * Based on the Bamboo code by
43439 + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
43440 + * Copyright 2007 IBM Corporation
43441 + *
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.
43446 + */
43447 +#include <linux/init.h>
43448 +#include <linux/of_platform.h>
43449 +
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>
43456 +#include "44x.h"
43457 +
43458 +static __initdata struct of_device_id rainier_of_bus[] = {
43459 + { .compatible = "ibm,plb4", },
43460 + { .compatible = "ibm,opb", },
43461 + { .compatible = "ibm,ebc", },
43462 + {},
43463 +};
43464 +
43465 +static int __init rainier_device_probe(void)
43466 +{
43467 + of_platform_bus_probe(NULL, rainier_of_bus, NULL);
43468 +
43469 + return 0;
43470 +}
43471 +machine_device_initcall(rainier, rainier_device_probe);
43472 +
43473 +static int __init rainier_probe(void)
43474 +{
43475 + unsigned long root = of_get_flat_dt_root();
43476 +
43477 + if (!of_flat_dt_is_compatible(root, "amcc,rainier"))
43478 + return 0;
43479 +
43480 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43481 +
43482 + return 1;
43483 +}
43484 +
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,
43493 +};
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
43497 @@ -21,9 +21,11 @@
43498 #include <asm/udbg.h>
43499 #include <asm/time.h>
43500 #include <asm/uic.h>
43501 +#include <asm/pci-bridge.h>
43502 +
43503 #include "44x.h"
43504
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 @@
43511
43512 static int __init sequoia_device_probe(void)
43513 {
43514 - if (!machine_is(sequoia))
43515 - return 0;
43516 -
43517 of_platform_bus_probe(NULL, sequoia_of_bus, NULL);
43518
43519 return 0;
43520 }
43521 -device_initcall(sequoia_device_probe);
43522 +machine_device_initcall(sequoia, sequoia_device_probe);
43523
43524 static int __init sequoia_probe(void)
43525 {
43526 @@ -48,6 +47,8 @@
43527 if (!of_flat_dt_is_compatible(root, "amcc,sequoia"))
43528 return 0;
43529
43530 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43531 +
43532 return 1;
43533 }
43534
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
43538 @@ -0,0 +1,73 @@
43539 +/*
43540 + * Taishan board specific routines based off ebony.c code
43541 + * original copyrights below
43542 + *
43543 + * Matt Porter <mporter@kernel.crashing.org>
43544 + * Copyright 2002-2005 MontaVista Software Inc.
43545 + *
43546 + * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
43547 + * Copyright (c) 2003-2005 Zultys Technologies
43548 + *
43549 + * Rewritten and ported to the merged powerpc tree:
43550 + * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
43551 + *
43552 + * Modified from ebony.c for taishan:
43553 + * Copyright 2007 Hugh Blemings <hugh@au.ibm.com>, IBM Corporation.
43554 + *
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.
43559 + */
43560 +
43561 +#include <linux/init.h>
43562 +#include <linux/of_platform.h>
43563 +
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>
43570 +
43571 +#include "44x.h"
43572 +
43573 +static __initdata struct of_device_id taishan_of_bus[] = {
43574 + { .compatible = "ibm,plb4", },
43575 + { .compatible = "ibm,opb", },
43576 + { .compatible = "ibm,ebc", },
43577 + {},
43578 +};
43579 +
43580 +static int __init taishan_device_probe(void)
43581 +{
43582 + of_platform_bus_probe(NULL, taishan_of_bus, NULL);
43583 +
43584 + return 0;
43585 +}
43586 +machine_device_initcall(taishan, taishan_device_probe);
43587 +
43588 +/*
43589 + * Called very early, MMU is off, device-tree isn't unflattened
43590 + */
43591 +static int __init taishan_probe(void)
43592 +{
43593 + unsigned long root = of_get_flat_dt_root();
43594 +
43595 + if (!of_flat_dt_is_compatible(root, "amcc,taishan"))
43596 + return 0;
43597 +
43598 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
43599 +
43600 + return 1;
43601 +}
43602 +
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,
43611 +};
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
43615 @@ -0,0 +1,105 @@
43616 +/*
43617 + * PIKA Warp(tm) NAND flash specific routines
43618 + *
43619 + * Copyright (c) 2008 PIKA Technologies
43620 + * Sean MacLennan <smaclennan@pikatech.com>
43621 + */
43622 +
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>
43629 +
43630 +#ifdef CONFIG_MTD_NAND_NDFC
43631 +
43632 +#define CS_NAND_0 1 /* use chip select 1 for NAND device 0 */
43633 +
43634 +#define WARP_NAND_FLASH_REG_ADDR 0xD0000000UL
43635 +#define WARP_NAND_FLASH_REG_SIZE 0x2000
43636 +
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,
43641 +};
43642 +
43643 +static struct mtd_partition nand_parts[] = {
43644 + {
43645 + .name = "kernel",
43646 + .offset = 0,
43647 + .size = 0x0200000
43648 + },
43649 + {
43650 + .name = "root",
43651 + .offset = 0x0200000,
43652 + .size = 0x3400000
43653 + },
43654 + {
43655 + .name = "user",
43656 + .offset = 0x3600000,
43657 + .size = 0x0A00000
43658 + },
43659 +};
43660 +
43661 +struct ndfc_controller_settings warp_ndfc_settings = {
43662 + .ccr_settings = (NDFC_CCR_BS(CS_NAND_0) | NDFC_CCR_ARAC1),
43663 + .ndfc_erpn = 0,
43664 +};
43665 +
43666 +static struct ndfc_chip_settings warp_chip0_settings = {
43667 + .bank_settings = 0x80002222,
43668 +};
43669 +
43670 +struct platform_nand_ctrl warp_nand_ctrl = {
43671 + .priv = &warp_ndfc_settings,
43672 +};
43673 +
43674 +static struct platform_device warp_ndfc_device = {
43675 + .name = "ndfc-nand",
43676 + .id = 0,
43677 + .dev = {
43678 + .platform_data = &warp_nand_ctrl,
43679 + },
43680 + .num_resources = 1,
43681 + .resource = &warp_ndfc,
43682 +};
43683 +
43684 +static struct nand_ecclayout nand_oob_16 = {
43685 + .eccbytes = 3,
43686 + .eccpos = { 0, 1, 2, 3, 6, 7 },
43687 + .oobfree = { {.offset = 8, .length = 16} }
43688 +};
43689 +
43690 +static struct platform_nand_chip warp_nand_chip0 = {
43691 + .nr_chips = 1,
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,
43698 +};
43699 +
43700 +static struct platform_device warp_nand_device = {
43701 + .name = "ndfc-chip",
43702 + .id = 0,
43703 + .num_resources = 1,
43704 + .resource = &warp_ndfc,
43705 + .dev = {
43706 + .platform_data = &warp_nand_chip0,
43707 + .parent = &warp_ndfc_device.dev,
43708 + }
43709 +};
43710 +
43711 +static int warp_setup_nand_flash(void)
43712 +{
43713 + platform_device_register(&warp_ndfc_device);
43714 + platform_device_register(&warp_nand_device);
43715 +
43716 + return 0;
43717 +}
43718 +device_initcall(warp_setup_nand_flash);
43719 +
43720 +#endif
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
43724 @@ -0,0 +1,153 @@
43725 +/*
43726 + * PIKA Warp(tm) board specific routines
43727 + *
43728 + * Copyright (c) 2008 PIKA Technologies
43729 + * Sean MacLennan <smaclennan@pikatech.com>
43730 + *
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.
43735 + */
43736 +#include <linux/init.h>
43737 +#include <linux/of_platform.h>
43738 +#include <linux/kthread.h>
43739 +
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>
43745 +
43746 +#include "44x.h"
43747 +
43748 +
43749 +static __initdata struct of_device_id warp_of_bus[] = {
43750 + { .compatible = "ibm,plb4", },
43751 + { .compatible = "ibm,opb", },
43752 + { .compatible = "ibm,ebc", },
43753 + {},
43754 +};
43755 +
43756 +static int __init warp_device_probe(void)
43757 +{
43758 + of_platform_bus_probe(NULL, warp_of_bus, NULL);
43759 + return 0;
43760 +}
43761 +machine_device_initcall(warp, warp_device_probe);
43762 +
43763 +static int __init warp_probe(void)
43764 +{
43765 + unsigned long root = of_get_flat_dt_root();
43766 +
43767 + return of_flat_dt_is_compatible(root, "pika,warp");
43768 +}
43769 +
43770 +define_machine(warp) {
43771 + .name = "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,
43778 +};
43779 +
43780 +
43781 +#define LED_GREEN (0x80000000 >> 0)
43782 +#define LED_RED (0x80000000 >> 1)
43783 +
43784 +
43785 +/* This is for the power LEDs 1 = on, 0 = off, -1 = leave alone */
43786 +void warp_set_power_leds(int green, int red)
43787 +{
43788 + static void __iomem *gpio_base = NULL;
43789 + unsigned leds;
43790 +
43791 + if (gpio_base == NULL) {
43792 + struct device_node *np;
43793 +
43794 + /* Power LEDS are on the second GPIO controller */
43795 + np = of_find_compatible_node(NULL, NULL, "ibm,gpio-440EP");
43796 + if (np)
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");
43800 + return;
43801 + }
43802 +
43803 + gpio_base = of_iomap(np, 0);
43804 + of_node_put(np);
43805 + if (gpio_base == NULL) {
43806 + printk(KERN_ERR __FILE__ ": Unable to map gpio");
43807 + return;
43808 + }
43809 + }
43810 +
43811 + leds = in_be32(gpio_base);
43812 +
43813 + switch (green) {
43814 + case 0: leds &= ~LED_GREEN; break;
43815 + case 1: leds |= LED_GREEN; break;
43816 + }
43817 + switch (red) {
43818 + case 0: leds &= ~LED_RED; break;
43819 + case 1: leds |= LED_RED; break;
43820 + }
43821 +
43822 + out_be32(gpio_base, leds);
43823 +}
43824 +EXPORT_SYMBOL(warp_set_power_leds);
43825 +
43826 +
43827 +#ifdef CONFIG_SENSORS_AD7414
43828 +static int pika_dtm_thread(void __iomem *fpga)
43829 +{
43830 + extern int ad7414_get_temp(int index);
43831 +
43832 + while (!kthread_should_stop()) {
43833 + int temp = ad7414_get_temp(0);
43834 +
43835 + out_be32(fpga, temp);
43836 +
43837 + set_current_state(TASK_INTERRUPTIBLE);
43838 + schedule_timeout(HZ);
43839 + }
43840 +
43841 + return 0;
43842 +}
43843 +
43844 +static int __init pika_dtm_start(void)
43845 +{
43846 + struct task_struct *dtm_thread;
43847 + struct device_node *np;
43848 + struct resource res;
43849 + void __iomem *fpga;
43850 +
43851 + np = of_find_compatible_node(NULL, NULL, "pika,fpga");
43852 + if (np == NULL)
43853 + return -ENOENT;
43854 +
43855 + /* We do not call of_iomap here since it would map in the entire
43856 + * fpga space, which is over 8k.
43857 + */
43858 + if (of_address_to_resource(np, 0, &res)) {
43859 + of_node_put(np);
43860 + return -ENOENT;
43861 + }
43862 + of_node_put(np);
43863 +
43864 + fpga = ioremap(res.start + 0x20, 4);
43865 + if (fpga == NULL)
43866 + return -ENOENT;
43867 +
43868 + dtm_thread = kthread_run(pika_dtm_thread, fpga + 0x20, "pika-dtm");
43869 + if (IS_ERR(dtm_thread)) {
43870 + iounmap(fpga);
43871 + return PTR_ERR(dtm_thread);
43872 + }
43873 +
43874 + return 0;
43875 +}
43876 +device_initcall(pika_dtm_start);
43877 +#endif
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
43881 @@ -19,6 +19,28 @@
43882
43883 It is safe to say 'Y' here
43884
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
43891 + default n
43892 + help
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:
43896 +
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.
43903 +
43904 + Boards that are compatible with this generic platform support
43905 + are: 'tqc,tqm5200', 'promess,motionpro', 'schindler,cm5200'.
43906 +
43907 config PPC_EFIKA
43908 bool "bPlan Efika 5k2. MPC5200B based computer"
43909 depends on PPC_MULTIPLATFORM && PPC32
43910 @@ -31,8 +53,7 @@
43911 config PPC_LITE5200
43912 bool "Freescale Lite5200 Eval Board"
43913 depends on PPC_MULTIPLATFORM && PPC32
43914 - select WANT_DEVICE_TREE
43915 select PPC_MPC5200
43916 + select DEFAULT_UIMAGE
43917 + select WANT_DEVICE_TREE
43918 default n
43919 -
43920 -
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
43924 @@ -6,6 +6,7 @@
43925 obj-$(CONFIG_PCI) += mpc52xx_pci.o
43926 endif
43927
43928 +obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o
43929 obj-$(CONFIG_PPC_EFIKA) += efika.o
43930 obj-$(CONFIG_PPC_LITE5200) += lite5200.o
43931
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 @@
43936 static void __init
43937 lite5200_fix_clock_config(void)
43938 {
43939 + struct device_node *np;
43940 struct mpc52xx_cdm __iomem *cdm;
43941
43942 /* Map zones */
43943 - cdm = mpc52xx_find_and_map("mpc5200-cdm");
43944 + np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm");
43945 + cdm = of_iomap(np, 0);
43946 + of_node_put(np);
43947 if (!cdm) {
43948 printk(KERN_ERR "%s() failed; expect abnormal behaviour\n",
43949 __FUNCTION__);
43950 @@ -74,10 +77,13 @@
43951 static void __init
43952 lite5200_fix_port_config(void)
43953 {
43954 + struct device_node *np;
43955 struct mpc52xx_gpio __iomem *gpio;
43956 u32 port_config;
43957
43958 - gpio = mpc52xx_find_and_map("mpc5200-gpio");
43959 + np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio");
43960 + gpio = of_iomap(np, 0);
43961 + of_node_put(np);
43962 if (!gpio) {
43963 printk(KERN_ERR "%s() failed. expect abnormal behavior\n",
43964 __FUNCTION__);
43965 @@ -131,10 +137,6 @@
43966
43967 static void __init lite5200_setup_arch(void)
43968 {
43969 -#ifdef CONFIG_PCI
43970 - struct device_node *np;
43971 -#endif
43972 -
43973 if (ppc_md.progress)
43974 ppc_md.progress("lite5200_setup_arch()", 0);
43975
43976 @@ -154,13 +156,7 @@
43977 lite5200_pm_init();
43978 #endif
43979
43980 -#ifdef CONFIG_PCI
43981 - np = of_find_node_by_type(NULL, "pci");
43982 - if (np) {
43983 - mpc52xx_add_bridge(np);
43984 - of_node_put(np);
43985 - }
43986 -#endif
43987 + mpc52xx_setup_pci();
43988 }
43989
43990 /*
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
43994 @@ -42,6 +42,8 @@
43995
43996 static int lite5200_pm_prepare(void)
43997 {
43998 + struct device_node *np;
43999 +
44000 /* deep sleep? let mpc52xx code handle that */
44001 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY)
44002 return mpc52xx_pm_prepare();
44003 @@ -50,7 +52,9 @@
44004 return -EINVAL;
44005
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);
44010 + of_node_put(np);
44011 if (!mbar) {
44012 printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
44013 return -ENOSYS;
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
44017 @@ -0,0 +1,85 @@
44018 +/*
44019 + * Support for 'mpc5200-simple-platform' compatible boards.
44020 + *
44021 + * Written by Marian Balakowicz <m8@semihalf.com>
44022 + * Copyright (C) 2007 Semihalf
44023 + *
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.
44028 + *
44029 + * Description:
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:
44033 + *
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.
44040 + *
44041 + * Boards that are compatible with this generic platform support
44042 + * are listed in a 'board' table.
44043 + */
44044 +
44045 +#undef DEBUG
44046 +#include <asm/time.h>
44047 +#include <asm/prom.h>
44048 +#include <asm/machdep.h>
44049 +#include <asm/mpc52xx.h>
44050 +
44051 +/*
44052 + * Setup the architecture
44053 + */
44054 +static void __init mpc5200_simple_setup_arch(void)
44055 +{
44056 + if (ppc_md.progress)
44057 + ppc_md.progress("mpc5200_simple_setup_arch()", 0);
44058 +
44059 + /* Some mpc5200 & mpc5200b related configuration */
44060 + mpc5200_setup_xlb_arbiter();
44061 +
44062 + /* Map wdt for mpc52xx_restart() */
44063 + mpc52xx_map_wdt();
44064 +
44065 + mpc52xx_setup_pci();
44066 +}
44067 +
44068 +/* list of the supported boards */
44069 +static char *board[] __initdata = {
44070 + "promess,motionpro",
44071 + "schindler,cm5200",
44072 + "tqc,tqm5200",
44073 + NULL
44074 +};
44075 +
44076 +/*
44077 + * Called very early, MMU is off, device-tree isn't unflattened
44078 + */
44079 +static int __init mpc5200_simple_probe(void)
44080 +{
44081 + unsigned long node = of_get_flat_dt_root();
44082 + int i = 0;
44083 +
44084 + while (board[i]) {
44085 + if (of_flat_dt_is_compatible(node, board[i]))
44086 + break;
44087 + i++;
44088 + }
44089 +
44090 + return (board[i] != NULL);
44091 +}
44092 +
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,
44102 +};
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
44106 @@ -26,45 +26,6 @@
44107 */
44108 static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL;
44109
44110 -static void __iomem *
44111 -mpc52xx_map_node(struct device_node *ofn)
44112 -{
44113 - const u32 *regaddr_p;
44114 - u64 regaddr64, size64;
44115 -
44116 - if (!ofn)
44117 - return NULL;
44118 -
44119 - regaddr_p = of_get_address(ofn, 0, &size64, NULL);
44120 - if (!regaddr_p) {
44121 - of_node_put(ofn);
44122 - return NULL;
44123 - }
44124 -
44125 - regaddr64 = of_translate_address(ofn, regaddr_p);
44126 -
44127 - of_node_put(ofn);
44128 -
44129 - return ioremap((u32)regaddr64, (u32)size64);
44130 -}
44131 -
44132 -void __iomem *
44133 -mpc52xx_find_and_map(const char *compatible)
44134 -{
44135 - return mpc52xx_map_node(
44136 - of_find_compatible_node(NULL, NULL, compatible));
44137 -}
44138 -
44139 -EXPORT_SYMBOL(mpc52xx_find_and_map);
44140 -
44141 -void __iomem *
44142 -mpc52xx_find_and_map_path(const char *path)
44143 -{
44144 - return mpc52xx_map_node(of_find_node_by_path(path));
44145 -}
44146 -
44147 -EXPORT_SYMBOL(mpc52xx_find_and_map_path);
44148 -
44149 /**
44150 * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
44151 * @node: device node
44152 @@ -101,9 +62,12 @@
44153 void __init
44154 mpc5200_setup_xlb_arbiter(void)
44155 {
44156 + struct device_node *np;
44157 struct mpc52xx_xlb __iomem *xlb;
44158
44159 - xlb = mpc52xx_find_and_map("mpc5200-xlb");
44160 + np = of_find_compatible_node(NULL, NULL, "mpc5200-xlb");
44161 + xlb = of_iomap(np, 0);
44162 + of_node_put(np);
44163 if (!xlb) {
44164 printk(KERN_ERR __FILE__ ": "
44165 "Error mapping XLB in mpc52xx_setup_cpu(). "
44166 @@ -124,11 +88,21 @@
44167 iounmap(xlb);
44168 }
44169
44170 +static struct of_device_id mpc52xx_bus_ids[] __initdata= {
44171 + { .compatible = "fsl,mpc5200-immr", },
44172 + { .compatible = "fsl,lpb", },
44173 +
44174 + /* depreciated matches; shouldn't be used in new device trees */
44175 + { .type = "builtin", .compatible = "mpc5200", }, /* efika */
44176 + { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
44177 + {},
44178 +};
44179 +
44180 void __init
44181 mpc52xx_declare_of_platform_devices(void)
44182 {
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");
44188 }
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);
44192 if (has_wdt) {
44193 - mpc52xx_wdt = mpc52xx_map_node(np);
44194 + mpc52xx_wdt = of_iomap(np, 0);
44195 + of_node_put(np);
44196 return;
44197 }
44198 }
44199 for_each_compatible_node(np, NULL, "mpc5200-gpt") {
44200 has_wdt = of_get_property(np, "has-wdt", NULL);
44201 if (has_wdt) {
44202 - mpc52xx_wdt = mpc52xx_map_node(np);
44203 + mpc52xx_wdt = of_iomap(np, 0);
44204 + of_node_put(np);
44205 return;
44206 }
44207 +
44208 }
44209 }
44210
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 @@
44215
44216 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name);
44217
44218 - pci_assign_all_buses = 1;
44219 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
44220
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 @@
44224
44225 return 0;
44226 }
44227 +
44228 +void __init mpc52xx_setup_pci(void)
44229 +{
44230 + struct device_node *pci;
44231 +
44232 + pci = of_find_compatible_node(NULL, NULL, "fsl,mpc5200-pci");
44233 + if (!pci)
44234 + pci = of_find_compatible_node(NULL, NULL, "mpc5200-pci");
44235 + if (!pci)
44236 + return;
44237 +
44238 + mpc52xx_add_bridge(pci);
44239 + of_node_put(pci);
44240 +}
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 @@
44245 {
44246 u32 intr_ctrl;
44247 struct device_node *picnode;
44248 + struct device_node *np;
44249
44250 /* Remap the necessary zones */
44251 picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic");
44252 -
44253 - intr = mpc52xx_find_and_map("mpc5200-pic");
44254 + intr = of_iomap(picnode, 0);
44255 if (!intr)
44256 panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. "
44257 "Check node !");
44258
44259 - sdma = mpc52xx_find_and_map("mpc5200-bestcomm");
44260 + np = of_find_compatible_node(NULL, NULL, "mpc5200-bestcomm");
44261 + sdma = of_iomap(np, 0);
44262 + of_node_put(np);
44263 if (!sdma)
44264 panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. "
44265 "Check node !");
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 @@
44270
44271 int mpc52xx_pm_prepare(void)
44272 {
44273 + struct device_node *np;
44274 +
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);
44279 + of_node_put(np);
44280 if (!mbar) {
44281 - printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
44282 + pr_err("mpc52xx_pm_prepare(): could not map registers\n");
44283 return -ENOSYS;
44284 }
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
44289 @@ -26,6 +26,19 @@
44290 help
44291 This option enables support for the PQ2FADS board
44292
44293 +config EP8248E
44294 + bool "Embedded Planet EP8248E (a.k.a. CWH-PPC-8248N-VE)"
44295 + select 8272
44296 + select 8260
44297 + select FSL_SOC
44298 + select PPC_CPM_NEW_BINDING
44299 + select MDIO_BITBANG
44300 + help
44301 + This enables support for the Embedded Planet EP8248E board.
44302 +
44303 + This board is also resold by Freescale as the QUICCStart
44304 + MPC8248 Evaluation System and/or the CWH-PPC-8248N-VE.
44305 +
44306 endchoice
44307
44308 config PQ2ADS
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
44312 @@ -5,3 +5,4 @@
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
44320 @@ -0,0 +1,324 @@
44321 +/*
44322 + * Embedded Planet EP8248E support
44323 + *
44324 + * Copyright 2007 Freescale Semiconductor, Inc.
44325 + * Author: Scott Wood <scottwood@freescale.com>
44326 + *
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.
44331 + */
44332 +
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>
44338 +
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>
44346 +
44347 +#include <sysdev/fsl_soc.h>
44348 +#include <sysdev/cpm2_pic.h>
44349 +
44350 +#include "pq2.h"
44351 +
44352 +static u8 __iomem *ep8248e_bcsr;
44353 +static struct device_node *ep8248e_bcsr_node;
44354 +
44355 +#define BCSR7_SCC2_ENABLE 0x10
44356 +
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
44364 +
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
44369 +
44370 +static void __init ep8248e_pic_init(void)
44371 +{
44372 + struct device_node *np = of_find_compatible_node(NULL, NULL, "fsl,pq2-pic");
44373 + if (!np) {
44374 + printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
44375 + return;
44376 + }
44377 +
44378 + cpm2_pic_init(np);
44379 + of_node_put(np);
44380 +}
44381 +
44382 +static void ep8248e_set_mdc(struct mdiobb_ctrl *ctrl, int level)
44383 +{
44384 + if (level)
44385 + setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_CLOCK);
44386 + else
44387 + clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_CLOCK);
44388 +
44389 + /* Read back to flush the write. */
44390 + in_8(&ep8248e_bcsr[8]);
44391 +}
44392 +
44393 +static void ep8248e_set_mdio_dir(struct mdiobb_ctrl *ctrl, int output)
44394 +{
44395 + if (output)
44396 + clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_READ);
44397 + else
44398 + setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_READ);
44399 +
44400 + /* Read back to flush the write. */
44401 + in_8(&ep8248e_bcsr[8]);
44402 +}
44403 +
44404 +static void ep8248e_set_mdio_data(struct mdiobb_ctrl *ctrl, int data)
44405 +{
44406 + if (data)
44407 + setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_DATA);
44408 + else
44409 + clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_DATA);
44410 +
44411 + /* Read back to flush the write. */
44412 + in_8(&ep8248e_bcsr[8]);
44413 +}
44414 +
44415 +static int ep8248e_get_mdio_data(struct mdiobb_ctrl *ctrl)
44416 +{
44417 + return in_8(&ep8248e_bcsr[8]) & BCSR8_MDIO_DATA;
44418 +}
44419 +
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,
44426 +};
44427 +
44428 +static struct mdiobb_ctrl ep8248e_mdio_ctrl = {
44429 + .ops = &ep8248e_mdio_ops,
44430 +};
44431 +
44432 +static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
44433 + const struct of_device_id *match)
44434 +{
44435 + struct mii_bus *bus;
44436 + struct resource res;
44437 + struct device_node *node;
44438 + int ret, i;
44439 +
44440 + node = of_get_parent(ofdev->node);
44441 + of_node_put(node);
44442 + if (node != ep8248e_bcsr_node)
44443 + return -ENODEV;
44444 +
44445 + ret = of_address_to_resource(ofdev->node, 0, &res);
44446 + if (ret)
44447 + return ret;
44448 +
44449 + bus = alloc_mdio_bitbang(&ep8248e_mdio_ctrl);
44450 + if (!bus)
44451 + return -ENOMEM;
44452 +
44453 + bus->phy_mask = 0;
44454 + bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
44455 +
44456 + for (i = 0; i < PHY_MAX_ADDR; i++)
44457 + bus->irq[i] = -1;
44458 +
44459 + bus->name = "ep8248e-mdio-bitbang";
44460 + bus->dev = &ofdev->dev;
44461 + bus->id = res.start;
44462 +
44463 + return mdiobus_register(bus);
44464 +}
44465 +
44466 +static int ep8248e_mdio_remove(struct of_device *ofdev)
44467 +{
44468 + BUG();
44469 + return 0;
44470 +}
44471 +
44472 +static const struct of_device_id ep8248e_mdio_match[] = {
44473 + {
44474 + .compatible = "fsl,ep8248e-mdio-bitbang",
44475 + },
44476 + {},
44477 +};
44478 +
44479 +static struct of_platform_driver ep8248e_mdio_driver = {
44480 + .driver = {
44481 + .name = "ep8248e-mdio-bitbang",
44482 + },
44483 + .match_table = ep8248e_mdio_match,
44484 + .probe = ep8248e_mdio_probe,
44485 + .remove = ep8248e_mdio_remove,
44486 +};
44487 +
44488 +struct cpm_pin {
44489 + int port, pin, flags;
44490 +};
44491 +
44492 +static __initdata struct cpm_pin ep8248e_pins[] = {
44493 + /* SMC1 */
44494 + {2, 4, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
44495 + {2, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
44496 +
44497 + /* SCC1 */
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},
44503 +
44504 + /* FCC1 */
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},
44521 +
44522 + /* FCC2 */
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},
44539 +
44540 + /* I2C */
44541 + {4, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44542 + {4, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
44543 +
44544 + /* USB */
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},
44552 +};
44553 +
44554 +static void __init init_ioports(void)
44555 +{
44556 + int i;
44557 +
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);
44561 + }
44562 +
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);
44571 +}
44572 +
44573 +static void __init ep8248e_setup_arch(void)
44574 +{
44575 + if (ppc_md.progress)
44576 + ppc_md.progress("ep8248e_setup_arch()", 0);
44577 +
44578 + cpm2_reset();
44579 +
44580 + /* When this is set, snooping CPM DMA from RAM causes
44581 + * machine checks. See erratum SIU18.
44582 + */
44583 + clrbits32(&cpm2_immr->im_siu_conf.siu_82xx.sc_bcr, MPC82XX_BCR_PLDP);
44584 +
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");
44589 + return;
44590 + }
44591 +
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;
44597 + return;
44598 + }
44599 +
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);
44603 +
44604 + init_ioports();
44605 +
44606 + if (ppc_md.progress)
44607 + ppc_md.progress("ep8248e_setup_arch(), finish", 0);
44608 +}
44609 +
44610 +static __initdata struct of_device_id of_bus_ids[] = {
44611 + { .compatible = "simple-bus", },
44612 + { .compatible = "fsl,ep8248e-bcsr", },
44613 + {},
44614 +};
44615 +
44616 +static int __init declare_of_platform_devices(void)
44617 +{
44618 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
44619 + of_register_platform_driver(&ep8248e_mdio_driver);
44620 +
44621 + return 0;
44622 +}
44623 +machine_device_initcall(ep8248e, declare_of_platform_devices);
44624 +
44625 +/*
44626 + * Called very early, device-tree isn't unflattened
44627 + */
44628 +static int __init ep8248e_probe(void)
44629 +{
44630 + unsigned long root = of_get_flat_dt_root();
44631 + return of_flat_dt_is_compatible(root, "fsl,ep8248e");
44632 +}
44633 +
44634 +define_machine(ep8248e)
44635 +{
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,
44644 +};
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)
44650 goto err;
44651
44652 - pci_assign_all_buses = 1;
44653 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
44654
44655 hose = pcibios_alloc_controller(np);
44656 if (!hose)
44657 return;
44658
44659 - hose->arch_data = np;
44660 + hose->dn = np;
44661
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>
44672
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>
44679
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
44684 @@ -50,6 +50,11 @@
44685 help
44686 This option enables support for the MPC836x MDS Processor Board.
44687
44688 +config MPC837x_MDS
44689 + bool "Freescale MPC837x MDS"
44690 + select DEFAULT_UIMAGE
44691 + help
44692 + This option enables support for the MPC837x MDS Processor Board.
44693 endchoice
44694
44695 config PPC_MPC831x
44696 @@ -75,3 +80,9 @@
44697 select PPC_UDBG_16550
44698 select PPC_INDIRECT_PCI
44699 default y if MPC836x_MDS
44700 +
44701 +config PPC_MPC837x
44702 + bool
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
44709 @@ -9,3 +9,4 @@
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
44717 @@ -14,6 +14,7 @@
44718 */
44719
44720 #include <linux/pci.h>
44721 +#include <linux/of_platform.h>
44722
44723 #include <asm/time.h>
44724 #include <asm/ipic.h>
44725 @@ -70,11 +71,23 @@
44726 */
44727 static int __init mpc8313_rdb_probe(void)
44728 {
44729 - unsigned long root = of_get_flat_dt_root();
44730 + unsigned long root = of_get_flat_dt_root();
44731
44732 - return of_flat_dt_is_compatible(root, "MPC8313ERDB");
44733 + return of_flat_dt_is_compatible(root, "MPC8313ERDB");
44734 }
44735
44736 +static struct of_device_id __initdata of_bus_ids[] = {
44737 + { .compatible = "simple-bus" },
44738 + {},
44739 +};
44740 +
44741 +static int __init declare_of_platform_devices(void)
44742 +{
44743 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
44744 + return 0;
44745 +}
44746 +machine_device_initcall(mpc8313_rdb, declare_of_platform_devices);
44747 +
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
44754 @@ -23,9 +23,9 @@
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>
44760
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 @@
44767
44768 static int __init mpc832x_declare_of_platform_devices(void)
44769 {
44770 - if (!machine_is(mpc832x_mds))
44771 - return 0;
44772 -
44773 /* Publish the QE devices */
44774 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
44775
44776 return 0;
44777 }
44778 -device_initcall(mpc832x_declare_of_platform_devices);
44779 +machine_device_initcall(mpc832x_mds, mpc832x_declare_of_platform_devices);
44780
44781 static void __init mpc832x_sys_init_IRQ(void)
44782 {
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
44786 @@ -19,8 +19,8 @@
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>
44791
44792 -#include <asm/of_platform.h>
44793 #include <asm/time.h>
44794 #include <asm/ipic.h>
44795 #include <asm/udbg.h>
44796 @@ -63,9 +63,6 @@
44797
44798 static int __init mpc832x_spi_init(void)
44799 {
44800 - if (!machine_is(mpc832x_rdb))
44801 - return 0;
44802 -
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 */
44806 @@ -80,7 +77,7 @@
44807 mpc83xx_spi_deactivate_cs);
44808 }
44809
44810 -device_initcall(mpc832x_spi_init);
44811 +machine_device_initcall(mpc832x_rdb, mpc832x_spi_init);
44812
44813 /* ************************************************************************
44814 *
44815 @@ -123,15 +120,12 @@
44816
44817 static int __init mpc832x_declare_of_platform_devices(void)
44818 {
44819 - if (!machine_is(mpc832x_rdb))
44820 - return 0;
44821 -
44822 /* Publish the QE devices */
44823 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
44824
44825 return 0;
44826 }
44827 -device_initcall(mpc832x_declare_of_platform_devices);
44828 +machine_device_initcall(mpc832x_rdb, mpc832x_declare_of_platform_devices);
44829
44830 void __init mpc832x_rdb_init_IRQ(void)
44831 {
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
44835 @@ -23,6 +23,7 @@
44836 #include <linux/delay.h>
44837 #include <linux/seq_file.h>
44838 #include <linux/root_dev.h>
44839 +#include <linux/of_platform.h>
44840
44841 #include <asm/system.h>
44842 #include <asm/atomic.h>
44843 @@ -37,6 +38,17 @@
44844
44845 #include "mpc83xx.h"
44846
44847 +static struct of_device_id __initdata mpc834x_itx_ids[] = {
44848 + { .compatible = "fsl,pq2pro-localbus", },
44849 + {},
44850 +};
44851 +
44852 +static int __init mpc834x_itx_declare_of_platform_devices(void)
44853 +{
44854 + return of_platform_bus_probe(NULL, mpc834x_itx_ids, NULL);
44855 +}
44856 +machine_device_initcall(mpc834x_itx, mpc834x_itx_declare_of_platform_devices);
44857 +
44858 /* ************************************************************************
44859 *
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
44864 @@ -23,6 +23,7 @@
44865 #include <linux/delay.h>
44866 #include <linux/seq_file.h>
44867 #include <linux/root_dev.h>
44868 +#include <linux/of_platform.h>
44869
44870 #include <asm/system.h>
44871 #include <asm/atomic.h>
44872 @@ -106,14 +107,27 @@
44873 ipic_set_default_priority();
44874 }
44875
44876 +static struct of_device_id mpc834x_ids[] = {
44877 + { .type = "soc", },
44878 + { .compatible = "soc", },
44879 + {},
44880 +};
44881 +
44882 +static int __init mpc834x_declare_of_platform_devices(void)
44883 +{
44884 + of_platform_bus_probe(NULL, mpc834x_ids, NULL);
44885 + return 0;
44886 +}
44887 +machine_device_initcall(mpc834x_mds, mpc834x_declare_of_platform_devices);
44888 +
44889 /*
44890 * Called very early, MMU is off, device-tree isn't unflattened
44891 */
44892 static int __init mpc834x_mds_probe(void)
44893 {
44894 - unsigned long root = of_get_flat_dt_root();
44895 + unsigned long root = of_get_flat_dt_root();
44896
44897 - return of_flat_dt_is_compatible(root, "MPC834xMDS");
44898 + return of_flat_dt_is_compatible(root, "MPC834xMDS");
44899 }
44900
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
44905 @@ -29,9 +29,9 @@
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>
44911
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 @@
44918
44919 static int __init mpc836x_declare_of_platform_devices(void)
44920 {
44921 - if (!machine_is(mpc836x_mds))
44922 - return 0;
44923 -
44924 /* Publish the QE devices */
44925 of_platform_bus_probe(NULL, mpc836x_ids, NULL);
44926
44927 return 0;
44928 }
44929 -device_initcall(mpc836x_declare_of_platform_devices);
44930 +machine_device_initcall(mpc836x_mds, mpc836x_declare_of_platform_devices);
44931
44932 static void __init mpc836x_mds_init_IRQ(void)
44933 {
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
44937 @@ -0,0 +1,147 @@
44938 +/*
44939 + * arch/powerpc/platforms/83xx/mpc837x_mds.c
44940 + *
44941 + * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
44942 + *
44943 + * MPC837x MDS board specific routines
44944 + *
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.
44949 + */
44950 +
44951 +#include <linux/pci.h>
44952 +#include <linux/of.h>
44953 +#include <linux/of_platform.h>
44954 +
44955 +#include <asm/time.h>
44956 +#include <asm/ipic.h>
44957 +#include <asm/udbg.h>
44958 +#include <asm/prom.h>
44959 +
44960 +#include "mpc83xx.h"
44961 +
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);
44966 +
44967 +static int mpc837xmds_usb_cfg(void)
44968 +{
44969 + struct device_node *np;
44970 + const void *phy_type, *mode;
44971 + void __iomem *bcsr_regs = NULL;
44972 + u8 bcsr12;
44973 + int ret;
44974 +
44975 + ret = mpc837x_usb_cfg();
44976 + if (ret)
44977 + return ret;
44978 + /* Map BCSR area */
44979 + np = of_find_node_by_name(NULL, "bcsr");
44980 + if (np) {
44981 + struct resource res;
44982 +
44983 + of_address_to_resource(np, 0, &res);
44984 + bcsr_regs = ioremap(res.start, res.end - res.start + 1);
44985 + of_node_put(np);
44986 + }
44987 + if (!bcsr_regs)
44988 + return -1;
44989 +
44990 + np = of_find_node_by_name(NULL, "usb");
44991 + if (!np)
44992 + return -ENODEV;
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);
45003 + } else {
45004 + printk(KERN_ERR "USB DR: unsupported PHY\n");
45005 + }
45006 +
45007 + of_node_put(np);
45008 + iounmap(bcsr_regs);
45009 + return 0;
45010 +}
45011 +
45012 +/* ************************************************************************
45013 + *
45014 + * Setup the architecture
45015 + *
45016 + */
45017 +static void __init mpc837x_mds_setup_arch(void)
45018 +{
45019 +#ifdef CONFIG_PCI
45020 + struct device_node *np;
45021 +#endif
45022 +
45023 + if (ppc_md.progress)
45024 + ppc_md.progress("mpc837x_mds_setup_arch()", 0);
45025 +
45026 +#ifdef CONFIG_PCI
45027 + for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
45028 + mpc83xx_add_bridge(np);
45029 +#endif
45030 + mpc837xmds_usb_cfg();
45031 +}
45032 +
45033 +static struct of_device_id mpc837x_ids[] = {
45034 + { .type = "soc", },
45035 + { .compatible = "soc", },
45036 + {},
45037 +};
45038 +
45039 +static int __init mpc837x_declare_of_platform_devices(void)
45040 +{
45041 + /* Publish of_device */
45042 + of_platform_bus_probe(NULL, mpc837x_ids, NULL);
45043 +
45044 + return 0;
45045 +}
45046 +machine_device_initcall(mpc837x_mds, mpc837x_declare_of_platform_devices);
45047 +
45048 +static void __init mpc837x_mds_init_IRQ(void)
45049 +{
45050 + struct device_node *np;
45051 +
45052 + np = of_find_compatible_node(NULL, NULL, "fsl,ipic");
45053 + if (!np)
45054 + return;
45055 +
45056 + ipic_init(np, 0);
45057 +
45058 + /* Initialize the default interrupt mapping priorities,
45059 + * in case the boot rom changed something on us.
45060 + */
45061 + ipic_set_default_priority();
45062 +}
45063 +
45064 +/*
45065 + * Called very early, MMU is off, device-tree isn't unflattened
45066 + */
45067 +static int __init mpc837x_mds_probe(void)
45068 +{
45069 + unsigned long root = of_get_flat_dt_root();
45070 +
45071 + return of_flat_dt_is_compatible(root, "fsl,mpc837xmds");
45072 +}
45073 +
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,
45084 +};
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
45088 @@ -14,6 +14,7 @@
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
45093
45094 /* system i/o configuration register low */
45095 #define MPC83XX_SICRL_OFFS 0x114
45096 @@ -22,6 +23,8 @@
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
45102
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
45108 @@ -54,7 +54,7 @@
45109 " bus 0\n", dev->full_name);
45110 }
45111
45112 - pci_assign_all_buses = 1;
45113 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
45114 hose = pcibios_alloc_controller(dev);
45115 if (!hose)
45116 return -ENOMEM;
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
45120 @@ -41,7 +41,7 @@
45121 sicrl = in_be32(immap + MPC83XX_SICRL_OFFS) & ~MPC834X_SICRL_USB_MASK;
45122 sicrh = in_be32(immap + MPC83XX_SICRH_OFFS) & ~MPC834X_SICRH_USB_UTMI;
45123
45124 - np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
45125 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
45126 if (np) {
45127 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
45128
45129 @@ -67,7 +67,7 @@
45130 port0_is_dr = 1;
45131 of_node_put(np);
45132 }
45133 - np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph");
45134 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-mph");
45135 if (np) {
45136 sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
45137
45138 @@ -111,7 +111,7 @@
45139 const void *dr_mode;
45140 #endif
45141
45142 - np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
45143 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
45144 if (!np)
45145 return -ENODEV;
45146 prop = of_get_property(np, "phy_type", NULL);
45147 @@ -179,3 +179,43 @@
45148 return ret;
45149 }
45150 #endif /* CONFIG_PPC_MPC831x */
45151 +
45152 +#ifdef CONFIG_PPC_MPC837x
45153 +int mpc837x_usb_cfg(void)
45154 +{
45155 + void __iomem *immap;
45156 + struct device_node *np = NULL;
45157 + const void *prop;
45158 + int ret = 0;
45159 +
45160 + np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
45161 + if (!np)
45162 + return -ENODEV;
45163 + prop = of_get_property(np, "phy_type", NULL);
45164 +
45165 + if (!prop || (strcmp(prop, "ulpi") && strcmp(prop, "serial"))) {
45166 + printk(KERN_WARNING "837x USB PHY type not supported\n");
45167 + of_node_put(np);
45168 + return -EINVAL;
45169 + }
45170 +
45171 + /* Map IMMR space for pin and clock settings */
45172 + immap = ioremap(get_immrbase(), 0x1000);
45173 + if (!immap) {
45174 + of_node_put(np);
45175 + return -ENOMEM;
45176 + }
45177 +
45178 + /* Configure clock */
45179 + clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, MPC837X_SCCR_USB_DRCM_11,
45180 + MPC837X_SCCR_USB_DRCM_11);
45181 +
45182 + /* Configure pin mux for ULPI/serial */
45183 + clrsetbits_be32(immap + MPC83XX_SICRL_OFFS, MPC837X_SICRL_USB_MASK,
45184 + MPC837X_SICRL_USB_ULPI);
45185 +
45186 + iounmap(immap);
45187 + of_node_put(np);
45188 + return ret;
45189 +}
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
45194 @@ -52,9 +52,9 @@
45195 {
45196 int cascade_irq;
45197
45198 - while ((cascade_irq = cpm2_get_irq()) >= 0) {
45199 + while ((cascade_irq = cpm2_get_irq()) >= 0)
45200 generic_handle_irq(cascade_irq);
45201 - }
45202 +
45203 desc->chip->eoi(irq);
45204 }
45205
45206 @@ -70,13 +70,12 @@
45207 #endif
45208
45209 np = of_find_node_by_type(np, "open-pic");
45210 -
45211 - if (np == NULL) {
45212 + if (!np) {
45213 printk(KERN_ERR "Could not find open-pic node\n");
45214 return;
45215 }
45216
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");
45220 of_node_put(np);
45221 return;
45222 @@ -100,6 +99,7 @@
45223 irq = irq_of_parse_and_map(np, 0);
45224
45225 cpm2_pic_init(np);
45226 + of_node_put(np);
45227 set_irq_chained_handler(irq, cpm2_cascade);
45228 #endif
45229 }
45230 @@ -112,7 +112,7 @@
45231 int port, pin, flags;
45232 };
45233
45234 -static struct cpm_pin mpc8560_ads_pins[] = {
45235 +static const struct cpm_pin mpc8560_ads_pins[] = {
45236 /* SCC1 */
45237 {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
45238 {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
45239 @@ -233,13 +233,11 @@
45240
45241 static int __init declare_of_platform_devices(void)
45242 {
45243 - if (!machine_is(mpc85xx_ads))
45244 - return 0;
45245 -
45246 of_platform_bus_probe(NULL, of_bus_ids, NULL);
45247 +
45248 return 0;
45249 }
45250 -device_initcall(declare_of_platform_devices);
45251 +machine_device_initcall(mpc85xx_ads, declare_of_platform_devices);
45252
45253 /*
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;
45260 int cascade_irq;
45261
45262 - if (!machine_is(mpc85xx_cds))
45263 - return 0;
45264 -
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 @@
45269
45270 return 0;
45271 }
45272 -
45273 -device_initcall(mpc85xx_cds_8259_attach);
45274 +machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
45275
45276 #endif /* CONFIG_PPC_I8259 */
45277
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;
45284
45285 - node = (struct device_node *)hose->arch_data;
45286 + node = hose->dn;
45287 of_address_to_resource(node, 0, &rsrc);
45288
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
45293 @@ -30,9 +30,9 @@
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>
45299
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 @@
45306
45307 static int __init mpc85xx_publish_devices(void)
45308 {
45309 - if (!machine_is(mpc85xx_mds))
45310 - return 0;
45311 -
45312 /* Publish the QE devices */
45313 - of_platform_bus_probe(NULL,mpc85xx_ids,NULL);
45314 + of_platform_bus_probe(NULL, mpc85xx_ids, NULL);
45315
45316 return 0;
45317 }
45318 -device_initcall(mpc85xx_publish_devices);
45319 +machine_device_initcall(mpc85xx_mds, mpc85xx_publish_devices);
45320
45321 static void __init mpc85xx_mds_pic_init(void)
45322 {
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
45326 @@ -34,9 +34,24 @@
45327
45328 #include <asm/mpic.h>
45329
45330 +#include <linux/of_platform.h>
45331 #include <sysdev/fsl_pci.h>
45332 #include <sysdev/fsl_soc.h>
45333
45334 +static struct of_device_id __initdata mpc8610_ids[] = {
45335 + { .compatible = "fsl,mpc8610-immr", },
45336 + {}
45337 +};
45338 +
45339 +static int __init mpc8610_declare_of_platform_devices(void)
45340 +{
45341 + /* Without this call, the SSI device driver won't get probed. */
45342 + of_platform_bus_probe(NULL, mpc8610_ids, NULL);
45343 +
45344 + return 0;
45345 +}
45346 +machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices);
45347 +
45348 void __init
45349 mpc86xx_hpcd_init_irq(void)
45350 {
45351 @@ -124,7 +139,7 @@
45352 static void __devinit final_uli5288(struct pci_dev *dev)
45353 {
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;
45358 int virq, pin = 2;
45359 u32 laddr[3];
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
45363 @@ -18,6 +18,7 @@
45364 #include <linux/kdev_t.h>
45365 #include <linux/delay.h>
45366 #include <linux/seq_file.h>
45367 +#include <linux/of_platform.h>
45368
45369 #include <asm/system.h>
45370 #include <asm/time.h>
45371 @@ -116,7 +117,7 @@
45372 struct device_node* node;
45373 struct resource rsrc;
45374
45375 - node = (struct device_node *)hose->arch_data;
45376 + node = hose->dn;
45377 of_address_to_resource(node, 0, &rsrc);
45378
45379 if ((rsrc.start & 0xfffff) == 0x8000) {
45380 @@ -212,6 +213,19 @@
45381 return 0;
45382 }
45383
45384 +static __initdata struct of_device_id of_bus_ids[] = {
45385 + { .compatible = "simple-bus", },
45386 + {},
45387 +};
45388 +
45389 +static int __init declare_of_platform_devices(void)
45390 +{
45391 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45392 +
45393 + return 0;
45394 +}
45395 +machine_device_initcall(mpc86xx_hpcn, declare_of_platform_devices);
45396 +
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
45403 @@ -18,6 +18,7 @@
45404 config MPC86XADS
45405 bool "MPC86XADS"
45406 select CPM1
45407 + select PPC_CPM_NEW_BINDING
45408 help
45409 MPC86x Application Development System by Freescale Semiconductor.
45410 The MPC86xADS is meant to serve as a platform for s/w and h/w
45411 @@ -43,6 +44,15 @@
45412 This board is also resold by Freescale as the QUICCStart
45413 MPC885 Evaluation System and/or the CWH-PPC-885XN-VE.
45414
45415 +config PPC_ADDER875
45416 + bool "Analogue & Micro Adder 875"
45417 + select CPM1
45418 + select PPC_CPM_NEW_BINDING
45419 + select REDBOOT
45420 + help
45421 + This enables support for the Analogue & Micro Adder 875
45422 + board.
45423 +
45424 endchoice
45425
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
45430 @@ -5,3 +5,4 @@
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
45438 @@ -0,0 +1,118 @@
45439 +/* Analogue & Micro Adder MPC875 board support
45440 + *
45441 + * Author: Scott Wood <scottwood@freescale.com>
45442 + *
45443 + * Copyright (c) 2007 Freescale Semiconductor, Inc.
45444 + *
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.
45448 + */
45449 +
45450 +#include <linux/init.h>
45451 +#include <linux/fs_enet_pd.h>
45452 +#include <linux/of_platform.h>
45453 +
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>
45460 +
45461 +#include <sysdev/commproc.h>
45462 +
45463 +struct cpm_pin {
45464 + int port, pin, flags;
45465 +};
45466 +
45467 +static __initdata struct cpm_pin adder875_pins[] = {
45468 + /* SMC1 */
45469 + {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */
45470 + {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
45471 +
45472 + /* MII1 */
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},
45486 +
45487 + /* MII2 */
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},
45504 +};
45505 +
45506 +static void __init init_ioports(void)
45507 +{
45508 + int i;
45509 +
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);
45513 + }
45514 +
45515 + cpm1_clk_setup(CPM_CLK_SMC1, CPM_BRG1, CPM_CLK_RTX);
45516 +
45517 + /* Set FEC1 and FEC2 to MII mode */
45518 + clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180);
45519 +}
45520 +
45521 +static void __init adder875_setup(void)
45522 +{
45523 + cpm_reset();
45524 + init_ioports();
45525 +}
45526 +
45527 +static int __init adder875_probe(void)
45528 +{
45529 + unsigned long root = of_get_flat_dt_root();
45530 + return of_flat_dt_is_compatible(root, "analogue-and-micro,adder875");
45531 +}
45532 +
45533 +static __initdata struct of_device_id of_bus_ids[] = {
45534 + { .compatible = "simple-bus", },
45535 + {},
45536 +};
45537 +
45538 +static int __init declare_of_platform_devices(void)
45539 +{
45540 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45541 + return 0;
45542 +}
45543 +machine_device_initcall(adder875, declare_of_platform_devices);
45544 +
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,
45556 +};
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)
45562 {
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);
45567
45568 return 0;
45569 }
45570 -device_initcall(declare_of_platform_devices);
45571 +machine_device_initcall(ep88xc, declare_of_platform_devices);
45572
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 @@
45579 ppc_tb_freq /= 16;
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 "
45584 "(not found)\n");
45585
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
45590 @@ -15,27 +15,6 @@
45591 #ifndef __ASM_MPC86XADS_H__
45592 #define __ASM_MPC86XADS_H__
45593
45594 -#include <sysdev/fsl_soc.h>
45595 -
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))
45604 -
45605 -#define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
45606 -#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
45607 -
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
45611 -
45612 -#define PCMCIA_MEM_ADDR ((uint)0xff020000)
45613 -#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
45614 -
45615 /* Bits of interest in the BCSRs.
45616 */
45617 #define BCSR1_ETHEN ((uint)0x20000000)
45618 @@ -64,28 +43,5 @@
45619 #define BCSR5_MII1_EN 0x02
45620 #define BCSR5_MII1_RST 0x01
45621
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 */
45626 -
45627 -/* We don't use the 8259 */
45628 -#define NR_8259_INTS 0
45629 -
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)
45638 -
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.
45641 - */
45642 -#define SICR_ENET_MASK ((uint)0x000000ff)
45643 -#define SICR_ENET_CLKRT ((uint)0x0000002c)
45644 -
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 @@
45651 *
45652 * Copyright 2005 MontaVista Software Inc.
45653 *
45654 + * Heavily modified by Scott Wood <scottwood@freescale.com>
45655 + * Copyright 2007 Freescale Semiconductor, Inc.
45656 + *
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.
45660 */
45661
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>
45670 -
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>
45675
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>
45689
45690 #include <sysdev/commproc.h>
45691
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);
45695 -
45696 -void __init mpc86xads_board_setup(void)
45697 -{
45698 - cpm8xx_t *cp;
45699 - unsigned int *bcsr_io;
45700 - u8 tmpval8;
45701 -
45702 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
45703 - cp = (cpm8xx_t *)immr_map(im_cpm);
45704 +#include "mpc86xads.h"
45705
45706 - if (bcsr_io == NULL) {
45707 - printk(KERN_CRIT "Could not remap BCSR\n");
45708 - return;
45709 - }
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);
45716 -#else
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);
45720 -#endif
45721 -
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);
45729 -
45730 - init_smc2_uart_ioports(0);
45731 -#else
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);
45735 -#endif
45736 - immr_unmap(cp);
45737 - iounmap(bcsr_io);
45738 -}
45739 +struct cpm_pin {
45740 + int port, pin, flags;
45741 +};
45742
45743 +static struct cpm_pin mpc866ads_pins[] = {
45744 + /* SMC1 */
45745 + {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */
45746 + {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
45747 +
45748 + /* SMC2 */
45749 + {CPM_PORTB, 21, CPM_PIN_INPUT}, /* RX */
45750 + {CPM_PORTB, 20, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
45751 +
45752 + /* SCC1 */
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 */
45760 +
45761 + /* MII */
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},
45775 +};
45776
45777 -static void init_fec1_ioports(struct fs_platform_info* ptr)
45778 +static void __init init_ioports(void)
45779 {
45780 - iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport);
45781 + int i;
45782
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);
45787 + }
45788
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);
45795
45796 - immr_unmap(io_port);
45797 + /* Set FEC1 and FEC2 to MII mode */
45798 + clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180);
45799 }
45800
45801 -void init_fec_ioports(struct fs_platform_info *fpi)
45802 +static void __init mpc86xads_setup_arch(void)
45803 {
45804 - int fec_no = fs_get_fec_index(fpi->fs_no);
45805 + struct device_node *np;
45806 + u32 __iomem *bcsr_io;
45807 +
45808 + cpm_reset();
45809 + init_ioports();
45810
45811 - switch (fec_no) {
45812 - case 0:
45813 - init_fec1_ioports(fpi);
45814 - break;
45815 - default:
45816 - printk(KERN_ERR "init_fec_ioports: invalid FEC number\n");
45817 + np = of_find_compatible_node(NULL, NULL, "fsl,mpc866ads-bcsr");
45818 + if (!np) {
45819 + printk(KERN_CRIT "Could not find fsl,mpc866ads-bcsr node\n");
45820 return;
45821 }
45822 -}
45823
45824 -static void init_scc1_ioports(struct fs_platform_info* fpi)
45825 -{
45826 - unsigned *bcsr_io;
45827 - iop8xx_t *io_port;
45828 - cpm8xx_t *cp;
45829 -
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);
45834 + of_node_put(np);
45835
45836 if (bcsr_io == NULL) {
45837 printk(KERN_CRIT "Could not remap BCSR\n");
45838 return;
45839 }
45840
45841 - /* Configure port A pins for Txd and Rxd.
45842 - */
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);
45846 -
45847 - /* Configure port C pins to enable CLSN and RENA.
45848 - */
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);
45852 -
45853 - /* Configure port A for TCLK and RCLK.
45854 - */
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);
45859 -
45860 - /* Configure Serial Interface clock routing.
45861 - * First, clear all SCC bits to zero, then set the ones we want.
45862 - */
45863 - clrbits32(&cp->cp_sicr, SICR_ENET_MASK);
45864 - setbits32(&cp->cp_sicr, SICR_ENET_CLKRT);
45865 -
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);
45870 -
45871 - clrbits32(bcsr_io+1, BCSR1_ETHEN);
45872 + clrbits32(bcsr_io, BCSR1_RS232EN_1 | BCSR1_RS232EN_2 | BCSR1_ETHEN);
45873 iounmap(bcsr_io);
45874 - immr_unmap(cp);
45875 - immr_unmap(io_port);
45876 -}
45877 -
45878 -void init_scc_ioports(struct fs_platform_info *fpi)
45879 -{
45880 - int scc_no = fs_get_scc_index(fpi->fs_no);
45881 -
45882 - switch (scc_no) {
45883 - case 0:
45884 - init_scc1_ioports(fpi);
45885 - break;
45886 - default:
45887 - printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
45888 - return;
45889 - }
45890 }
45891
45892 -
45893 -
45894 -static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr)
45895 +static int __init mpc86xads_probe(void)
45896 {
45897 - unsigned *bcsr_io;
45898 - cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
45899 -
45900 - setbits32(&cp->cp_pbpar, 0x000000c0);
45901 - clrbits32(&cp->cp_pbdir, 0x000000c0);
45902 - clrbits16(&cp->cp_pbodr, 0x00c0);
45903 - immr_unmap(cp);
45904 -
45905 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
45906 -
45907 - if (bcsr_io == NULL) {
45908 - printk(KERN_CRIT "Could not remap BCSR1\n");
45909 - return;
45910 - }
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");
45915 }
45916
45917 -static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi)
45918 -{
45919 - unsigned *bcsr_io;
45920 - cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
45921 -
45922 - setbits32(&cp->cp_pbpar, 0x00000c00);
45923 - clrbits32(&cp->cp_pbdir, 0x00000c00);
45924 - clrbits16(&cp->cp_pbodr, 0x0c00);
45925 - immr_unmap(cp);
45926 -
45927 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
45928 -
45929 - if (bcsr_io == NULL) {
45930 - printk(KERN_CRIT "Could not remap BCSR1\n");
45931 - return;
45932 - }
45933 - clrbits32(bcsr_io,BCSR1_RS232EN_2);
45934 - iounmap(bcsr_io);
45935 -}
45936 +static struct of_device_id __initdata of_bus_ids[] = {
45937 + { .name = "soc", },
45938 + { .name = "cpm", },
45939 + { .name = "localbus", },
45940 + {},
45941 +};
45942
45943 -void init_smc_ioports(struct fs_uart_platform_info *data)
45944 +static int __init declare_of_platform_devices(void)
45945 {
45946 - int smc_no = fs_uart_id_fsid2smc(data->fs_no);
45947 -
45948 - switch (smc_no) {
45949 - case 0:
45950 - init_smc1_uart_ioports(data);
45951 - data->brg = data->clk_rx;
45952 - break;
45953 - case 1:
45954 - init_smc2_uart_ioports(data);
45955 - data->brg = data->clk_rx;
45956 - break;
45957 - default:
45958 - printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
45959 - return;
45960 - }
45961 -}
45962 + of_platform_bus_probe(NULL, of_bus_ids, NULL);
45963
45964 -int platform_device_skip(const char *model, int id)
45965 -{
45966 return 0;
45967 }
45968 -
45969 -static void __init mpc86xads_setup_arch(void)
45970 -{
45971 - cpm_reset();
45972 -
45973 - mpc86xads_board_setup();
45974 -
45975 - ROOT_DEV = Root_NFS;
45976 -}
45977 -
45978 -static int __init mpc86xads_probe(void)
45979 -{
45980 - char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
45981 - "model", NULL);
45982 - if (model == NULL)
45983 - return 0;
45984 - if (strcmp(model, "MPC866ADS"))
45985 - return 0;
45986 -
45987 - return 1;
45988 -}
45989 +machine_device_initcall(mpc86x_ads, declare_of_platform_devices);
45990
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,
45998 };
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)
46004 {
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);
46009
46010 return 0;
46011 }
46012 -device_initcall(declare_of_platform_devices);
46013 +machine_device_initcall(mpc885_ads, declare_of_platform_devices);
46014
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
46020 @@ -22,6 +22,7 @@
46021 depends on 6xx
46022 select FSL_SOC
46023 select 83xx
46024 + select IPIC
46025 select WANT_DEVICE_TREE
46026
46027 config PPC_86xx
46028 @@ -80,6 +81,10 @@
46029 bool
46030 default y
46031
46032 +config IPIC
46033 + bool
46034 + default n
46035 +
46036 config MPIC
46037 bool
46038 default n
46039 @@ -265,6 +270,7 @@
46040 config QUICC_ENGINE
46041 bool
46042 select PPC_LIB_RHEAP
46043 + select CRC32
46044 help
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 @@
46048 config CPM
46049 bool
46050
46051 +config OF_RTC
46052 + bool
46053 + help
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.
46056 +
46057 source "arch/powerpc/sysdev/bestcomm/Kconfig"
46058
46059 endmenu
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
46063 @@ -43,6 +43,7 @@
46064 bool "AMCC 40x"
46065 select PPC_DCR_NATIVE
46066 select WANT_DEVICE_TREE
46067 + select PPC_UDBG_16550
46068
46069 config 44x
46070 bool "AMCC 44x"
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
46074 @@ -20,7 +20,7 @@
46075
46076 obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
46077 spu_notify.o \
46078 - spu_syscalls.o \
46079 + spu_syscalls.o spu_fault.o \
46080 $(spu-priv1-y) \
46081 $(spu-manage-y) \
46082 spufs/
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
46086 @@ -21,8 +21,9 @@
46087 */
46088
46089 #include <linux/cpufreq.h>
46090 +#include <linux/of_platform.h>
46091 +
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
46100 @@ -23,7 +23,8 @@
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>
46106 +
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
46113 @@ -9,13 +9,13 @@
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>
46119
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>
46127
46128 /*
46129 @@ -256,6 +256,7 @@
46130 printk(KERN_ERR "cbe_regs: More BE chips than supported"
46131 "!\n");
46132 cbe_regs_map_count--;
46133 + of_node_put(cpu);
46134 return;
46135 }
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)
46142 {
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;
46148
46149 @@ -309,15 +309,12 @@
46150 {
46151 struct pci_controller *phb;
46152
46153 - if (!machine_is(cell))
46154 - return 0;
46155 -
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
46159 */
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);
46164
46165 /* If no model property or name isn't exactly "pci", skip */
46166 @@ -343,4 +340,4 @@
46167
46168 return 0;
46169 }
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>
46180
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>
46190
46191 #include "interrupt.h"
46192 @@ -309,8 +310,8 @@
46193 {
46194 struct page *page;
46195 int ret, i;
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;
46200 unsigned int virq;
46201
46202 if (cell_iommu_find_ioc(iommu->nid, &xlate_base))
46203 @@ -327,7 +328,8 @@
46204 __FUNCTION__, iommu->nid, segments, pages_per_segment);
46205
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));
46210 BUG_ON(!page);
46211 iommu->stab = page_address(page);
46212 clear_page(iommu->stab);
46213 @@ -489,15 +491,18 @@
46214 return NULL;
46215 }
46216
46217 +static unsigned long cell_dma_direct_offset;
46218 +
46219 static void cell_dma_dev_setup(struct device *dev)
46220 {
46221 struct iommu_window *window;
46222 struct cbe_iommu *iommu;
46223 struct dev_archdata *archdata = &dev->archdata;
46224
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;
46229 return;
46230 + }
46231
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 @@
46235
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;
46240
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 @@
46244 return -ENODEV;
46245 }
46246
46247 - dma_direct_offset += base;
46248 + cell_dma_direct_offset += base;
46249 +
46250 + if (cell_dma_direct_offset != 0)
46251 + ppc_md.pci_dma_dev_setup = cell_pci_dma_dev_setup;
46252
46253 printk("iommu: disabled, direct DMA offset is 0x%lx\n",
46254 - dma_direct_offset);
46255 + cell_dma_direct_offset);
46256
46257 return 0;
46258 }
46259 @@ -699,9 +707,6 @@
46260 {
46261 struct device_node *np;
46262
46263 - if (!machine_is(cell))
46264 - return -ENODEV;
46265 -
46266 /* If IOMMU is disabled or we have little enough RAM to not need
46267 * to enable it, we setup a direct mapping.
46268 *
46269 @@ -744,5 +749,6 @@
46270
46271 return 0;
46272 }
46273 -arch_initcall(cell_iommu_init);
46274 +machine_arch_initcall(cell, cell_iommu_init);
46275 +machine_arch_initcall(celleb_native, cell_iommu_init);
46276
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 @@
46281 break;
46282
46283 case pm_interval:
46284 - READ_SHADOW_REG(val, pm_interval);
46285 + READ_MMIO_UPPER32(val, pm_interval);
46286 break;
46287
46288 case pm_start_stop:
46289 @@ -381,9 +381,6 @@
46290 unsigned int irq;
46291 int rc, node;
46292
46293 - if (!machine_is(cell))
46294 - return 0;
46295 -
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 @@
46300
46301 return 0;
46302 }
46303 -arch_initcall(cbe_init_pm_irq);
46304 +machine_arch_initcall(cell, cbe_init_pm_irq);
46305
46306 void cbe_sync_irq(int node)
46307 {
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
46311 @@ -30,6 +30,7 @@
46312 #include <linux/console.h>
46313 #include <linux/mutex.h>
46314 #include <linux/memory_hotplug.h>
46315 +#include <linux/of_platform.h>
46316
46317 #include <asm/mmu.h>
46318 #include <asm/processor.h>
46319 @@ -51,7 +52,6 @@
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>
46325
46326 #include "interrupt.h"
46327 @@ -85,9 +85,6 @@
46328 {
46329 int node;
46330
46331 - if (!machine_is(cell))
46332 - return 0;
46333 -
46334 /* Publish OF platform devices for southbridge IOs */
46335 of_platform_bus_probe(NULL, NULL, NULL);
46336
46337 @@ -101,7 +98,7 @@
46338 }
46339 return 0;
46340 }
46341 -device_initcall(cell_publish_devices);
46342 +machine_device_initcall(cell, cell_publish_devices);
46343
46344 static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc)
46345 {
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
46349 @@ -42,6 +42,7 @@
46350 #include <asm/firmware.h>
46351 #include <asm/system.h>
46352 #include <asm/rtas.h>
46353 +#include <asm/cputhreads.h>
46354
46355 #include "interrupt.h"
46356 #include <asm/udbg.h>
46357 @@ -182,7 +183,7 @@
46358 */
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)
46363 return 0;
46364
46365 return 1;
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
46369 @@ -34,6 +34,7 @@
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>
46376
46377 @@ -47,6 +48,13 @@
46378 EXPORT_SYMBOL_GPL(cbe_spu_info);
46379
46380 /*
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
46383 + * function
46384 + */
46385 +EXPORT_SYMBOL_GPL(force_sig_info);
46386 +
46387 +/*
46388 * Protects cbe_spu_info and spu->number.
46389 */
46390 static DEFINE_SPINLOCK(spu_lock);
46391 @@ -66,6 +74,10 @@
46392 static DEFINE_SPINLOCK(spu_full_list_lock);
46393 static DEFINE_MUTEX(spu_full_list_mutex);
46394
46395 +struct spu_slb {
46396 + u64 esid, vsid;
46397 +};
46398 +
46399 void spu_invalidate_slbs(struct spu *spu)
46400 {
46401 struct spu_priv2 __iomem *priv2 = spu->priv2;
46402 @@ -114,40 +126,36 @@
46403 }
46404 EXPORT_SYMBOL_GPL(spu_associate_mm);
46405
46406 -static int __spu_trap_invalid_dma(struct spu *spu)
46407 +int spu_64k_pages_available(void)
46408 {
46409 - pr_debug("%s\n", __FUNCTION__);
46410 - spu->dma_callback(spu, SPE_EVENT_INVALID_DMA);
46411 - return 0;
46412 + return mmu_psize_defs[MMU_PAGE_64K].shift != 0;
46413 }
46414 +EXPORT_SYMBOL_GPL(spu_64k_pages_available);
46415
46416 -static int __spu_trap_dma_align(struct spu *spu)
46417 +static void spu_restart_dma(struct spu *spu)
46418 {
46419 - pr_debug("%s\n", __FUNCTION__);
46420 - spu->dma_callback(spu, SPE_EVENT_DMA_ALIGNMENT);
46421 - return 0;
46422 -}
46423 + struct spu_priv2 __iomem *priv2 = spu->priv2;
46424
46425 -static int __spu_trap_error(struct spu *spu)
46426 -{
46427 - pr_debug("%s\n", __FUNCTION__);
46428 - spu->dma_callback(spu, SPE_EVENT_SPE_ERROR);
46429 - return 0;
46430 + if (!test_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags))
46431 + out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESTART_DMA_COMMAND);
46432 }
46433
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)
46436 {
46437 struct spu_priv2 __iomem *priv2 = spu->priv2;
46438
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);
46443 +
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);
46447 }
46448
46449 static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
46450 {
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;
46455 int psize;
46456
46457 pr_debug("%s\n", __FUNCTION__);
46458 @@ -159,7 +167,7 @@
46459 printk("%s: invalid access during switch!\n", __func__);
46460 return 1;
46461 }
46462 - esid = (ea & ESID_MASK) | SLB_ESID_V;
46463 + slb.esid = (ea & ESID_MASK) | SLB_ESID_V;
46464
46465 switch(REGION_ID(ea)) {
46466 case USER_REGION_ID:
46467 @@ -168,21 +176,21 @@
46468 #else
46469 psize = mm->context.user_psize;
46470 #endif
46471 - vsid = (get_vsid(mm->context.id, ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46472 - SLB_VSID_USER;
46473 + slb.vsid = (get_vsid(mm->context.id, ea, MMU_SEGSIZE_256M)
46474 + << SLB_VSID_SHIFT) | SLB_VSID_USER;
46475 break;
46476 case VMALLOC_REGION_ID:
46477 if (ea < VMALLOC_END)
46478 psize = mmu_vmalloc_psize;
46479 else
46480 psize = mmu_io_psize;
46481 - vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46482 - SLB_VSID_KERNEL;
46483 + slb.vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M)
46484 + << SLB_VSID_SHIFT) | SLB_VSID_KERNEL;
46485 break;
46486 case KERNEL_REGION_ID:
46487 psize = mmu_linear_psize;
46488 - vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
46489 - SLB_VSID_KERNEL;
46490 + slb.vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M)
46491 + << SLB_VSID_SHIFT) | SLB_VSID_KERNEL;
46492 break;
46493 default:
46494 /* Future: support kernel segments so that drivers
46495 @@ -191,11 +199,9 @@
46496 pr_debug("invalid region access at %016lx\n", ea);
46497 return 1;
46498 }
46499 - llp = mmu_psize_defs[psize].sllp;
46500 + slb.vsid |= mmu_psize_defs[psize].sllp;
46501
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);
46506
46507 spu->slb_replace++;
46508 if (spu->slb_replace >= 8)
46509 @@ -225,13 +231,83 @@
46510 return 1;
46511 }
46512
46513 + spu->class_0_pending = 0;
46514 spu->dar = ea;
46515 spu->dsisr = dsisr;
46516 - mb();
46517 +
46518 spu->stop_callback(spu);
46519 +
46520 return 0;
46521 }
46522
46523 +static void __spu_kernel_slb(void *addr, struct spu_slb *slb)
46524 +{
46525 + unsigned long ea = (unsigned long)addr;
46526 + u64 llp;
46527 +
46528 + if (REGION_ID(ea) == KERNEL_REGION_ID)
46529 + llp = mmu_psize_defs[mmu_linear_psize].sllp;
46530 + else
46531 + llp = mmu_psize_defs[mmu_virtual_psize].sllp;
46532 +
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;
46536 +}
46537 +
46538 +/**
46539 + * Given an array of @nr_slbs SLB entries, @slbs, return non-zero if the
46540 + * address @new_addr is present.
46541 + */
46542 +static inline int __slb_present(struct spu_slb *slbs, int nr_slbs,
46543 + void *new_addr)
46544 +{
46545 + unsigned long ea = (unsigned long)new_addr;
46546 + int i;
46547 +
46548 + for (i = 0; i < nr_slbs; i++)
46549 + if (!((slbs[i].esid ^ ea) & ESID_MASK))
46550 + return 1;
46551 +
46552 + return 0;
46553 +}
46554 +
46555 +/**
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.
46558 + *
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.
46563 + */
46564 +void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
46565 + void *code, int code_size)
46566 +{
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
46573 + };
46574 +
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]))
46579 + continue;
46580 +
46581 + __spu_kernel_slb(addrs[i], &slbs[nr_slbs]);
46582 + nr_slbs++;
46583 + }
46584 +
46585 + /* Add the set of SLBs */
46586 + for (i = 0; i < nr_slbs; i++)
46587 + spu_load_slb(spu, i, &slbs[i]);
46588 +}
46589 +EXPORT_SYMBOL_GPL(spu_setup_kernel_slbs);
46590 +
46591 static irqreturn_t
46592 spu_irq_class_0(int irq, void *data)
46593 {
46594 @@ -240,12 +316,13 @@
46595
46596 spu = data;
46597
46598 + spin_lock(&spu->register_lock);
46599 mask = spu_int_mask_get(spu, 0);
46600 - stat = spu_int_stat_get(spu, 0);
46601 - stat &= mask;
46602 + stat = spu_int_stat_get(spu, 0) & mask;
46603
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);
46609
46610 spu->stop_callback(spu);
46611 @@ -255,31 +332,6 @@
46612 return IRQ_HANDLED;
46613 }
46614
46615 -int
46616 -spu_irq_class_0_bottom(struct spu *spu)
46617 -{
46618 - unsigned long flags;
46619 - unsigned long stat;
46620 -
46621 - spin_lock_irqsave(&spu->register_lock, flags);
46622 - stat = spu->class_0_pending;
46623 - spu->class_0_pending = 0;
46624 -
46625 - if (stat & 1) /* invalid DMA alignment */
46626 - __spu_trap_dma_align(spu);
46627 -
46628 - if (stat & 2) /* invalid MFC DMA */
46629 - __spu_trap_invalid_dma(spu);
46630 -
46631 - if (stat & 4) /* error on SPU */
46632 - __spu_trap_error(spu);
46633 -
46634 - spin_unlock_irqrestore(&spu->register_lock, flags);
46635 -
46636 - return (stat & 0x7) ? -EIO : 0;
46637 -}
46638 -EXPORT_SYMBOL_GPL(spu_irq_class_0_bottom);
46639 -
46640 static irqreturn_t
46641 spu_irq_class_1(int irq, void *data)
46642 {
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,
46653 dar, dsisr);
46654
46655 - if (stat & 1) /* segment fault */
46656 + if (stat & CLASS1_SEGMENT_FAULT_INTR)
46657 __spu_trap_data_seg(spu, dar);
46658
46659 - if (stat & 2) { /* mapping fault */
46660 + if (stat & CLASS1_STORAGE_FAULT_INTR)
46661 __spu_trap_data_map(spu, dar, dsisr);
46662 - }
46663
46664 - if (stat & 4) /* ls compare & suspend on get */
46665 + if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_GET_INTR)
46666 ;
46667
46668 - if (stat & 8) /* ls compare & suspend on put */
46669 + if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_PUT_INTR)
46670 ;
46671
46672 return stat ? IRQ_HANDLED : IRQ_NONE;
46673 @@ -323,6 +374,8 @@
46674 struct spu *spu;
46675 unsigned long stat;
46676 unsigned long mask;
46677 + const int mailbox_intrs =
46678 + CLASS2_MAILBOX_THRESHOLD_INTR | CLASS2_MAILBOX_INTR;
46679
46680 spu = data;
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 */
46685 stat &= mask;
46686 - /*
46687 - * mailbox interrupts (0x1 and 0x10) are level triggered.
46688 - * mask them now before acknowledging.
46689 - */
46690 - if (stat & 0x11)
46691 - spu_int_mask_and(spu, 2, ~(stat & 0x11));
46692 +
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);
46700
46701 pr_debug("class 2 interrupt %d, %lx, %lx\n", irq, stat, mask);
46702
46703 - if (stat & 1) /* PPC core mailbox */
46704 + if (stat & CLASS2_MAILBOX_INTR)
46705 spu->ibox_callback(spu);
46706
46707 - if (stat & 2) /* SPU stop-and-signal */
46708 + if (stat & CLASS2_SPU_STOP_INTR)
46709 spu->stop_callback(spu);
46710
46711 - if (stat & 4) /* SPU halted */
46712 + if (stat & CLASS2_SPU_HALT_INTR)
46713 spu->stop_callback(spu);
46714
46715 - if (stat & 8) /* DMA tag group complete */
46716 + if (stat & CLASS2_SPU_DMA_TAG_GROUP_COMPLETE_INTR)
46717 spu->mfc_callback(spu);
46718
46719 - if (stat & 0x10) /* SPU mailbox threshold */
46720 + if (stat & CLASS2_MAILBOX_THRESHOLD_INTR)
46721 spu->wbox_callback(spu);
46722
46723 spu->stats.class2_intr++;
46724 @@ -479,13 +531,27 @@
46725 int spu_add_sysdev_attr_group(struct attribute_group *attrs)
46726 {
46727 struct spu *spu;
46728 + int rc = 0;
46729
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);
46735 +
46736 + /* we're in trouble here, but try unwinding anyway */
46737 + if (rc) {
46738 + printk(KERN_ERR "%s: can't create sysfs group '%s'\n",
46739 + __func__, attrs->name);
46740 +
46741 + list_for_each_entry_continue_reverse(spu,
46742 + &spu_full_list, full_list)
46743 + sysfs_remove_group(&spu->sysdev.kobj, attrs);
46744 + break;
46745 + }
46746 + }
46747 +
46748 mutex_unlock(&spu_full_list_mutex);
46749
46750 - return 0;
46751 + return rc;
46752 }
46753 EXPORT_SYMBOL_GPL(spu_add_sysdev_attr_group);
46754
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
46758 @@ -0,0 +1,98 @@
46759 +/*
46760 + * SPU mm fault handler
46761 + *
46762 + * (C) Copyright IBM Deutschland Entwicklung GmbH 2007
46763 + *
46764 + * Author: Arnd Bergmann <arndb@de.ibm.com>
46765 + * Author: Jeremy Kerr <jk@ozlabs.org>
46766 + *
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.
46771 + *
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.
46776 + *
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.
46780 + */
46781 +#include <linux/sched.h>
46782 +#include <linux/mm.h>
46783 +#include <linux/module.h>
46784 +
46785 +#include <asm/spu.h>
46786 +#include <asm/spu_csa.h>
46787 +
46788 +/*
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.
46792 + */
46793 +int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
46794 + unsigned long dsisr, unsigned *flt)
46795 +{
46796 + struct vm_area_struct *vma;
46797 + unsigned long is_write;
46798 + int ret;
46799 +
46800 +#if 0
46801 + if (!IS_VALID_EA(ea)) {
46802 + return -EFAULT;
46803 + }
46804 +#endif /* XXX */
46805 + if (mm == NULL) {
46806 + return -EFAULT;
46807 + }
46808 + if (mm->pgd == NULL) {
46809 + return -EFAULT;
46810 + }
46811 +
46812 + down_read(&mm->mmap_sem);
46813 + vma = find_vma(mm, ea);
46814 + if (!vma)
46815 + goto bad_area;
46816 + if (vma->vm_start <= ea)
46817 + goto good_area;
46818 + if (!(vma->vm_flags & VM_GROWSDOWN))
46819 + goto bad_area;
46820 + if (expand_stack(vma, ea))
46821 + goto bad_area;
46822 +good_area:
46823 + is_write = dsisr & MFC_DSISR_ACCESS_PUT;
46824 + if (is_write) {
46825 + if (!(vma->vm_flags & VM_WRITE))
46826 + goto bad_area;
46827 + } else {
46828 + if (dsisr & MFC_DSISR_ACCESS_DENIED)
46829 + goto bad_area;
46830 + if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
46831 + goto bad_area;
46832 + }
46833 + ret = 0;
46834 + *flt = handle_mm_fault(mm, vma, ea, is_write);
46835 + if (unlikely(*flt & VM_FAULT_ERROR)) {
46836 + if (*flt & VM_FAULT_OOM) {
46837 + ret = -ENOMEM;
46838 + goto bad_area;
46839 + } else if (*flt & VM_FAULT_SIGBUS) {
46840 + ret = -EFAULT;
46841 + goto bad_area;
46842 + }
46843 + BUG();
46844 + }
46845 + if (*flt & VM_FAULT_MAJOR)
46846 + current->maj_flt++;
46847 + else
46848 + current->min_flt++;
46849 + up_read(&mm->mmap_sem);
46850 + return ret;
46851 +
46852 +bad_area:
46853 + up_read(&mm->mmap_sem);
46854 + return -EFAULT;
46855 +}
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
46860 @@ -35,6 +35,7 @@
46861 #include <asm/firmware.h>
46862 #include <asm/prom.h>
46863
46864 +#include "spufs/spufs.h"
46865 #include "interrupt.h"
46866
46867 struct device_node *spu_devnode(struct spu *spu)
46868 @@ -345,7 +346,7 @@
46869 }
46870 ret = spu_map_interrupts_old(spu, spe);
46871 if (ret) {
46872 - printk(KERN_ERR "%s: could not map interrupts",
46873 + printk(KERN_ERR "%s: could not map interrupts\n",
46874 spu->name);
46875 goto out_unmap;
46876 }
46877 @@ -369,6 +370,16 @@
46878 return 0;
46879 }
46880
46881 +static void enable_spu_by_master_run(struct spu_context *ctx)
46882 +{
46883 + ctx->ops->master_start(ctx);
46884 +}
46885 +
46886 +static void disable_spu_by_master_run(struct spu_context *ctx)
46887 +{
46888 + ctx->ops->master_stop(ctx);
46889 +}
46890 +
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 @@
46895
46896 static int of_has_vicinity(void)
46897 {
46898 - struct spu* spu;
46899 + struct device_node *dn;
46900
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)) {
46905 + of_node_put(dn);
46906 + return 1;
46907 + }
46908 + }
46909 + return 0;
46910 }
46911
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();
46916 else
46917 - printk("No affinity configuration found");
46918 + printk("No affinity configuration found\n");
46919 }
46920
46921 return 0;
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,
46929 };
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
46933 @@ -1,8 +1,8 @@
46934 -obj-y += switch.o fault.o lscsa_alloc.o
46935
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
46940
46941 # Rules to build switch.o with the help of SPU tool chain
46942 SPU_CROSS := spu-
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;
46949 else {
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;
46956 }
46957 }
46958 if (events & (POLLOUT | POLLWRNORM)) {
46959 if (stat & 0x00ff00)
46960 ret = POLLOUT | POLLWRNORM;
46961 else {
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;
46968 }
46969 }
46970 spin_unlock_irq(&ctx->csa.register_lock);
46971 @@ -139,7 +143,7 @@
46972 ret = 4;
46973 } else {
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;
46977 ret = 0;
46978 }
46979 spin_unlock(&ctx->csa.register_lock);
46980 @@ -169,7 +173,8 @@
46981 } else {
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;
46987 ret = 0;
46988 }
46989 spin_unlock(&ctx->csa.register_lock);
46990 @@ -268,6 +273,11 @@
46991 return ctx->csa.lscsa->ls;
46992 }
46993
46994 +static void spu_backing_privcntl_write(struct spu_context *ctx, u64 val)
46995 +{
46996 + ctx->csa.priv2.spu_privcntl_RW = val;
46997 +}
46998 +
46999 static u32 spu_backing_runcntl_read(struct spu_context *ctx)
47000 {
47001 return ctx->csa.prob.spu_runcntl_RW;
47002 @@ -285,6 +295,11 @@
47003 spin_unlock(&ctx->csa.register_lock);
47004 }
47005
47006 +static void spu_backing_runcntl_stop(struct spu_context *ctx)
47007 +{
47008 + spu_backing_runcntl_write(ctx, SPU_RUNCNTL_STOP);
47009 +}
47010 +
47011 static void spu_backing_master_start(struct spu_context *ctx)
47012 {
47013 struct spu_state *csa = &ctx->csa;
47014 @@ -358,7 +373,7 @@
47015
47016 static void spu_backing_restart_dma(struct spu_context *ctx)
47017 {
47018 - /* nothing to do here */
47019 + ctx->csa.priv2.mfc_control_RW |= MFC_CNTL_RESTART_DMA_COMMAND;
47020 }
47021
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
47037 @@ -52,6 +52,7 @@
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)
47047 {
47048 struct mm_struct *mm;
47049 - spu_acquire_saved(ctx);
47050 +
47051 + /*
47052 + * This is basically an open-coded spu_acquire_saved, except that
47053 + * we don't acquire the state mutex interruptible.
47054 + */
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);
47059 + }
47060 +
47061 mm = ctx->owner;
47062 ctx->owner = NULL;
47063 mmput(mm);
47064 @@ -133,47 +144,23 @@
47065 }
47066
47067 /**
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
47071 - *
47072 - * Note:
47073 - * Returns 0 and with the context locked on success
47074 - * Returns negative error and with the context _unlocked_ on failure.
47075 */
47076 -int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags)
47077 +int spu_acquire_saved(struct spu_context *ctx)
47078 {
47079 - int ret = -EINVAL;
47080 + int ret;
47081
47082 - spu_acquire(ctx);
47083 - if (ctx->state == SPU_STATE_SAVED) {
47084 - /*
47085 - * Context is about to be freed, so we can't acquire it anymore.
47086 - */
47087 - if (!ctx->owner)
47088 - goto out_unlock;
47089 - ret = spu_activate(ctx, flags);
47090 - if (ret)
47091 - goto out_unlock;
47092 - }
47093 -
47094 - return 0;
47095 + ret = spu_acquire(ctx);
47096 + if (ret)
47097 + return ret;
47098
47099 - out_unlock:
47100 - spu_release(ctx);
47101 - return ret;
47102 -}
47103 -
47104 -/**
47105 - * spu_acquire_saved - lock spu contex and make sure it is in saved state
47106 - * @ctx: spu contex to lock
47107 - */
47108 -void spu_acquire_saved(struct spu_context *ctx)
47109 -{
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);
47114 }
47115 +
47116 + return 0;
47117 }
47118
47119 /**
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 @@
47124
47125 fd = 0;
47126 while ((ctx = coredump_next_context(&fd)) != NULL) {
47127 - spu_acquire_saved(ctx);
47128 + rc = spu_acquire_saved(ctx);
47129 + if (rc)
47130 + break;
47131 rc = spufs_ctx_note_size(ctx, fd);
47132 spu_release_saved(ctx);
47133 if (rc < 0)
47134 @@ -224,7 +226,9 @@
47135
47136 fd = 0;
47137 while ((ctx = coredump_next_context(&fd)) != NULL) {
47138 - spu_acquire_saved(ctx);
47139 + rc = spu_acquire_saved(ctx);
47140 + if (rc)
47141 + return rc;
47142
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 @@
47149
47150 #include "spufs.h"
47151
47152 -/*
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.
47156 +/**
47157 + * Handle an SPE event, depending on context SPU_CREATE_EVENTS_ENABLED flag.
47158 + *
47159 + * If the context was created with events, we just set the return event.
47160 + * Otherwise, send an appropriate signal to the process.
47161 */
47162 -static int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
47163 - unsigned long dsisr, unsigned *flt)
47164 -{
47165 - struct vm_area_struct *vma;
47166 - unsigned long is_write;
47167 - int ret;
47168 -
47169 -#if 0
47170 - if (!IS_VALID_EA(ea)) {
47171 - return -EFAULT;
47172 - }
47173 -#endif /* XXX */
47174 - if (mm == NULL) {
47175 - return -EFAULT;
47176 - }
47177 - if (mm->pgd == NULL) {
47178 - return -EFAULT;
47179 - }
47180 -
47181 - down_read(&mm->mmap_sem);
47182 - vma = find_vma(mm, ea);
47183 - if (!vma)
47184 - goto bad_area;
47185 - if (vma->vm_start <= ea)
47186 - goto good_area;
47187 - if (!(vma->vm_flags & VM_GROWSDOWN))
47188 - goto bad_area;
47189 - if (expand_stack(vma, ea))
47190 - goto bad_area;
47191 -good_area:
47192 - is_write = dsisr & MFC_DSISR_ACCESS_PUT;
47193 - if (is_write) {
47194 - if (!(vma->vm_flags & VM_WRITE))
47195 - goto bad_area;
47196 - } else {
47197 - if (dsisr & MFC_DSISR_ACCESS_DENIED)
47198 - goto bad_area;
47199 - if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
47200 - goto bad_area;
47201 - }
47202 - ret = 0;
47203 - *flt = handle_mm_fault(mm, vma, ea, is_write);
47204 - if (unlikely(*flt & VM_FAULT_ERROR)) {
47205 - if (*flt & VM_FAULT_OOM) {
47206 - ret = -ENOMEM;
47207 - goto bad_area;
47208 - } else if (*flt & VM_FAULT_SIGBUS) {
47209 - ret = -EFAULT;
47210 - goto bad_area;
47211 - }
47212 - BUG();
47213 - }
47214 - if (*flt & VM_FAULT_MAJOR)
47215 - current->maj_flt++;
47216 - else
47217 - current->min_flt++;
47218 - up_read(&mm->mmap_sem);
47219 - return ret;
47220 -
47221 -bad_area:
47222 - up_read(&mm->mmap_sem);
47223 - return -EFAULT;
47224 -}
47225 -
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)
47229 {
47230 + siginfo_t info;
47231 +
47232 if (ctx->flags & SPU_CREATE_EVENTS_ENABLED) {
47233 ctx->event_return |= type;
47234 wake_up_all(&ctx->stop_wq);
47235 - } else {
47236 - siginfo_t info;
47237 - memset(&info, 0, sizeof(info));
47238 -
47239 - switch (type) {
47240 - case SPE_EVENT_INVALID_DMA:
47241 - info.si_signo = SIGBUS;
47242 - info.si_code = BUS_OBJERR;
47243 - break;
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;
47248 - break;
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;
47253 - break;
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;
47259 - break;
47260 - }
47261 - if (info.si_signo)
47262 - force_sig_info(info.si_signo, &info, current);
47263 + return;
47264 }
47265 +
47266 + memset(&info, 0, sizeof(info));
47267 +
47268 + switch (type) {
47269 + case SPE_EVENT_INVALID_DMA:
47270 + info.si_signo = SIGBUS;
47271 + info.si_code = BUS_OBJERR;
47272 + break;
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);
47278 + break;
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;
47283 + break;
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;
47289 + break;
47290 + }
47291 +
47292 + if (info.si_signo)
47293 + force_sig_info(info.si_signo, &info, current);
47294 }
47295
47296 -void spufs_dma_callback(struct spu *spu, int type)
47297 +int spufs_handle_class0(struct spu_context *ctx)
47298 {
47299 - spufs_handle_dma_error(spu->ctx, spu->dar, type);
47300 + unsigned long stat = ctx->csa.class_0_pending & CLASS0_INTR_MASK;
47301 +
47302 + if (likely(!stat))
47303 + return 0;
47304 +
47305 + if (stat & CLASS0_DMA_ALIGNMENT_INTR)
47306 + spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_DMA_ALIGNMENT);
47307 +
47308 + if (stat & CLASS0_INVALID_DMA_COMMAND_INTR)
47309 + spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_INVALID_DMA);
47310 +
47311 + if (stat & CLASS0_SPU_ERROR_INTR)
47312 + spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_SPE_ERROR);
47313 +
47314 + return -EIO;
47315 }
47316 -EXPORT_SYMBOL_GPL(spufs_dma_callback);
47317
47318 /*
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;
47323 unsigned flt = 0;
47324 - int ret;
47325 + int ret, ret2;
47326
47327 /*
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.
47332 */
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;
47337 - } else {
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;
47342 - }
47343 + ea = ctx->csa.dar;
47344 + dsisr = ctx->csa.dsisr;
47345
47346 if (!(dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED)))
47347 return 0;
47348 @@ -201,7 +147,22 @@
47349 if (ret)
47350 ret = spu_handle_mm_fault(current->mm, ea, dsisr, &flt);
47351
47352 - spu_acquire(ctx);
47353 + /*
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.
47357 + */
47358 + ret2 = spu_acquire(ctx);
47359 + if (ret2)
47360 + goto out;
47361 +
47362 + /*
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.
47366 + */
47367 + ctx->csa.dar = ctx->csa.dsisr = 0;
47368 +
47369 /*
47370 * If we handled the fault successfully and are in runnable
47371 * state, restart the DMA.
47372 @@ -222,9 +183,9 @@
47373 if (ctx->spu)
47374 ctx->ops->restart_dma(ctx);
47375 } else
47376 - spufs_handle_dma_error(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE);
47377 + spufs_handle_event(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE);
47378
47379 + out:
47380 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
47381 return ret;
47382 }
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 @@
47388
47389 #define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000)
47390
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];
47397 + void *data;
47398 + const char *fmt; /* format for read operation */
47399 + struct mutex mutex; /* protects access to these buffers */
47400 +};
47401 +
47402 +static int spufs_attr_open(struct inode *inode, struct file *file,
47403 + int (*get)(void *, u64 *), int (*set)(void *, u64),
47404 + const char *fmt)
47405 +{
47406 + struct spufs_attr *attr;
47407 +
47408 + attr = kmalloc(sizeof(*attr), GFP_KERNEL);
47409 + if (!attr)
47410 + return -ENOMEM;
47411 +
47412 + attr->get = get;
47413 + attr->set = set;
47414 + attr->data = inode->i_private;
47415 + attr->fmt = fmt;
47416 + mutex_init(&attr->mutex);
47417 + file->private_data = attr;
47418 +
47419 + return nonseekable_open(inode, file);
47420 +}
47421 +
47422 +static int spufs_attr_release(struct inode *inode, struct file *file)
47423 +{
47424 + kfree(file->private_data);
47425 + return 0;
47426 +}
47427 +
47428 +static ssize_t spufs_attr_read(struct file *file, char __user *buf,
47429 + size_t len, loff_t *ppos)
47430 +{
47431 + struct spufs_attr *attr;
47432 + size_t size;
47433 + ssize_t ret;
47434 +
47435 + attr = file->private_data;
47436 + if (!attr->get)
47437 + return -EACCES;
47438 +
47439 + ret = mutex_lock_interruptible(&attr->mutex);
47440 + if (ret)
47441 + return ret;
47442 +
47443 + if (*ppos) { /* continued read */
47444 + size = strlen(attr->get_buf);
47445 + } else { /* first read */
47446 + u64 val;
47447 + ret = attr->get(attr->data, &val);
47448 + if (ret)
47449 + goto out;
47450 +
47451 + size = scnprintf(attr->get_buf, sizeof(attr->get_buf),
47452 + attr->fmt, (unsigned long long)val);
47453 + }
47454 +
47455 + ret = simple_read_from_buffer(buf, len, ppos, attr->get_buf, size);
47456 +out:
47457 + mutex_unlock(&attr->mutex);
47458 + return ret;
47459 +}
47460 +
47461 +static ssize_t spufs_attr_write(struct file *file, const char __user *buf,
47462 + size_t len, loff_t *ppos)
47463 +{
47464 + struct spufs_attr *attr;
47465 + u64 val;
47466 + size_t size;
47467 + ssize_t ret;
47468 +
47469 + attr = file->private_data;
47470 + if (!attr->set)
47471 + return -EACCES;
47472 +
47473 + ret = mutex_lock_interruptible(&attr->mutex);
47474 + if (ret)
47475 + return ret;
47476 +
47477 + ret = -EFAULT;
47478 + size = min(sizeof(attr->set_buf) - 1, len);
47479 + if (copy_from_user(attr->set_buf, buf, size))
47480 + goto out;
47481 +
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);
47486 +out:
47487 + mutex_unlock(&attr->mutex);
47488 + return ret;
47489 +}
47490 +
47491 +#define DEFINE_SPUFS_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \
47492 +static int __fops ## _open(struct inode *inode, struct file *file) \
47493 +{ \
47494 + __simple_attr_check_format(__fmt, 0ull); \
47495 + return spufs_attr_open(inode, file, __get, __set, __fmt); \
47496 +} \
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, \
47503 +};
47504 +
47505
47506 static int
47507 spufs_mem_open(struct inode *inode, struct file *file)
47508 @@ -84,9 +198,12 @@
47509 struct spu_context *ctx = file->private_data;
47510 ssize_t ret;
47511
47512 - spu_acquire(ctx);
47513 + ret = spu_acquire(ctx);
47514 + if (ret)
47515 + return ret;
47516 ret = __spufs_mem_read(ctx, buffer, size, pos);
47517 spu_release(ctx);
47518 +
47519 return ret;
47520 }
47521
47522 @@ -106,7 +223,10 @@
47523 if (size > LS_SIZE - pos)
47524 size = LS_SIZE - pos;
47525
47526 - spu_acquire(ctx);
47527 + ret = spu_acquire(ctx);
47528 + if (ret)
47529 + return ret;
47530 +
47531 local_store = ctx->ops->get_ls(ctx);
47532 ret = copy_from_user(local_store + pos, buffer, size);
47533 spu_release(ctx);
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);
47537
47538 - spu_acquire(ctx);
47539 + if (spu_acquire(ctx))
47540 + return NOPFN_REFAULT;
47541
47542 if (ctx->state == SPU_STATE_SAVED) {
47543 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
47544 @@ -236,23 +357,32 @@
47545 {
47546 struct spu_context *ctx = vma->vm_file->private_data;
47547 unsigned long area, offset = address - vma->vm_start;
47548 - int ret;
47549
47550 offset += vma->vm_pgoff << PAGE_SHIFT;
47551 if (offset >= ps_size)
47552 return NOPFN_SIGBUS;
47553
47554 - /* error here usually means a signal.. we might want to test
47555 - * the error code more precisely though
47556 + /*
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
47562 + * hanged.
47563 */
47564 - ret = spu_acquire_runnable(ctx, 0);
47565 - if (ret)
47566 + if (spu_acquire(ctx))
47567 return NOPFN_REFAULT;
47568
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(&current->mm->mmap_sem);
47574 + spufs_wait(ctx->run_wq, ctx->state == SPU_STATE_RUNNABLE);
47575 + down_read(&current->mm->mmap_sem);
47576 + } else {
47577 + area = ctx->spu->problem_phys + ps_offs;
47578 + vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT);
47579 + }
47580
47581 + spu_release(ctx);
47582 return NOPFN_REFAULT;
47583 }
47584
47585 @@ -286,25 +416,32 @@
47586 #define spufs_cntl_mmap NULL
47587 #endif /* !SPUFS_MMAP_4K */
47588
47589 -static u64 spufs_cntl_get(void *data)
47590 +static int spufs_cntl_get(void *data, u64 *val)
47591 {
47592 struct spu_context *ctx = data;
47593 - u64 val;
47594 + int ret;
47595
47596 - spu_acquire(ctx);
47597 - val = ctx->ops->status_read(ctx);
47598 + ret = spu_acquire(ctx);
47599 + if (ret)
47600 + return ret;
47601 + *val = ctx->ops->status_read(ctx);
47602 spu_release(ctx);
47603
47604 - return val;
47605 + return 0;
47606 }
47607
47608 -static void spufs_cntl_set(void *data, u64 val)
47609 +static int spufs_cntl_set(void *data, u64 val)
47610 {
47611 struct spu_context *ctx = data;
47612 + int ret;
47613
47614 - spu_acquire(ctx);
47615 + ret = spu_acquire(ctx);
47616 + if (ret)
47617 + return ret;
47618 ctx->ops->runcntl_write(ctx, val);
47619 spu_release(ctx);
47620 +
47621 + return 0;
47622 }
47623
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");
47632 }
47633
47634 @@ -327,7 +464,7 @@
47635 struct spufs_inode_info *i = SPUFS_I(inode);
47636 struct spu_context *ctx = i->i_ctx;
47637
47638 - simple_attr_close(inode, file);
47639 + spufs_attr_release(inode, file);
47640
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,
47652 };
47653
47654 @@ -368,7 +505,9 @@
47655 int ret;
47656 struct spu_context *ctx = file->private_data;
47657
47658 - spu_acquire_saved(ctx);
47659 + ret = spu_acquire_saved(ctx);
47660 + if (ret)
47661 + return ret;
47662 ret = __spufs_regs_read(ctx, buffer, size, pos);
47663 spu_release_saved(ctx);
47664 return ret;
47665 @@ -387,7 +526,9 @@
47666 return -EFBIG;
47667 *pos += size;
47668
47669 - spu_acquire_saved(ctx);
47670 + ret = spu_acquire_saved(ctx);
47671 + if (ret)
47672 + return ret;
47673
47674 ret = copy_from_user(lscsa->gprs + *pos - size,
47675 buffer, size) ? -EFAULT : size;
47676 @@ -419,7 +560,9 @@
47677 int ret;
47678 struct spu_context *ctx = file->private_data;
47679
47680 - spu_acquire_saved(ctx);
47681 + ret = spu_acquire_saved(ctx);
47682 + if (ret)
47683 + return ret;
47684 ret = __spufs_fpcr_read(ctx, buffer, size, pos);
47685 spu_release_saved(ctx);
47686 return ret;
47687 @@ -436,10 +579,12 @@
47688 size = min_t(ssize_t, sizeof(lscsa->fpcr) - *pos, size);
47689 if (size <= 0)
47690 return -EFBIG;
47691 - *pos += size;
47692
47693 - spu_acquire_saved(ctx);
47694 + ret = spu_acquire_saved(ctx);
47695 + if (ret)
47696 + return ret;
47697
47698 + *pos += size;
47699 ret = copy_from_user((char *)&lscsa->fpcr + *pos - size,
47700 buffer, size) ? -EFAULT : size;
47701
47702 @@ -486,7 +631,10 @@
47703
47704 udata = (void __user *)buf;
47705
47706 - spu_acquire(ctx);
47707 + count = spu_acquire(ctx);
47708 + if (count)
47709 + return count;
47710 +
47711 for (count = 0; (count + 4) <= len; count += 4, udata++) {
47712 int ret;
47713 ret = ctx->ops->mbox_read(ctx, &mbox_data);
47714 @@ -522,12 +670,15 @@
47715 size_t len, loff_t *pos)
47716 {
47717 struct spu_context *ctx = file->private_data;
47718 + ssize_t ret;
47719 u32 mbox_stat;
47720
47721 if (len < 4)
47722 return -EINVAL;
47723
47724 - spu_acquire(ctx);
47725 + ret = spu_acquire(ctx);
47726 + if (ret)
47727 + return ret;
47728
47729 mbox_stat = ctx->ops->mbox_stat_read(ctx) & 0xff;
47730
47731 @@ -562,6 +713,9 @@
47732 {
47733 struct spu_context *ctx = spu->ctx;
47734
47735 + if (!ctx)
47736 + return;
47737 +
47738 wake_up_all(&ctx->ibox_wq);
47739 kill_fasync(&ctx->ibox_fasync, SIGIO, POLLIN);
47740 }
47741 @@ -593,7 +747,9 @@
47742
47743 udata = (void __user *)buf;
47744
47745 - spu_acquire(ctx);
47746 + count = spu_acquire(ctx);
47747 + if (count)
47748 + return count;
47749
47750 /* wait only for the first element */
47751 count = 0;
47752 @@ -639,7 +795,11 @@
47753
47754 poll_wait(file, &ctx->ibox_wq, wait);
47755
47756 - spu_acquire(ctx);
47757 + /*
47758 + * For now keep this uninterruptible and also ignore the rule
47759 + * that poll should not sleep. Will be fixed later.
47760 + */
47761 + mutex_lock(&ctx->state_mutex);
47762 mask = ctx->ops->mbox_stat_poll(ctx, POLLIN | POLLRDNORM);
47763 spu_release(ctx);
47764
47765 @@ -657,12 +817,15 @@
47766 size_t len, loff_t *pos)
47767 {
47768 struct spu_context *ctx = file->private_data;
47769 + ssize_t ret;
47770 u32 ibox_stat;
47771
47772 if (len < 4)
47773 return -EINVAL;
47774
47775 - spu_acquire(ctx);
47776 + ret = spu_acquire(ctx);
47777 + if (ret)
47778 + return ret;
47779 ibox_stat = (ctx->ops->mbox_stat_read(ctx) >> 16) & 0xff;
47780 spu_release(ctx);
47781
47782 @@ -698,6 +861,9 @@
47783 {
47784 struct spu_context *ctx = spu->ctx;
47785
47786 + if (!ctx)
47787 + return;
47788 +
47789 wake_up_all(&ctx->wbox_wq);
47790 kill_fasync(&ctx->wbox_fasync, SIGIO, POLLOUT);
47791 }
47792 @@ -731,7 +897,9 @@
47793 if (__get_user(wbox_data, udata))
47794 return -EFAULT;
47795
47796 - spu_acquire(ctx);
47797 + count = spu_acquire(ctx);
47798 + if (count)
47799 + return count;
47800
47801 /*
47802 * make sure we can at least write one element, by waiting
47803 @@ -772,7 +940,11 @@
47804
47805 poll_wait(file, &ctx->wbox_wq, wait);
47806
47807 - spu_acquire(ctx);
47808 + /*
47809 + * For now keep this uninterruptible and also ignore the rule
47810 + * that poll should not sleep. Will be fixed later.
47811 + */
47812 + mutex_lock(&ctx->state_mutex);
47813 mask = ctx->ops->mbox_stat_poll(ctx, POLLOUT | POLLWRNORM);
47814 spu_release(ctx);
47815
47816 @@ -790,12 +962,15 @@
47817 size_t len, loff_t *pos)
47818 {
47819 struct spu_context *ctx = file->private_data;
47820 + ssize_t ret;
47821 u32 wbox_stat;
47822
47823 if (len < 4)
47824 return -EINVAL;
47825
47826 - spu_acquire(ctx);
47827 + ret = spu_acquire(ctx);
47828 + if (ret)
47829 + return ret;
47830 wbox_stat = (ctx->ops->mbox_stat_read(ctx) >> 8) & 0xff;
47831 spu_release(ctx);
47832
47833 @@ -866,7 +1041,9 @@
47834 int ret;
47835 struct spu_context *ctx = file->private_data;
47836
47837 - spu_acquire_saved(ctx);
47838 + ret = spu_acquire_saved(ctx);
47839 + if (ret)
47840 + return ret;
47841 ret = __spufs_signal1_read(ctx, buf, len, pos);
47842 spu_release_saved(ctx);
47843
47844 @@ -877,6 +1054,7 @@
47845 size_t len, loff_t *pos)
47846 {
47847 struct spu_context *ctx;
47848 + ssize_t ret;
47849 u32 data;
47850
47851 ctx = file->private_data;
47852 @@ -887,7 +1065,9 @@
47853 if (copy_from_user(&data, buf, 4))
47854 return -EFAULT;
47855
47856 - spu_acquire(ctx);
47857 + ret = spu_acquire(ctx);
47858 + if (ret)
47859 + return ret;
47860 ctx->ops->signal1_write(ctx, data);
47861 spu_release(ctx);
47862
47863 @@ -997,7 +1177,9 @@
47864 struct spu_context *ctx = file->private_data;
47865 int ret;
47866
47867 - spu_acquire_saved(ctx);
47868 + ret = spu_acquire_saved(ctx);
47869 + if (ret)
47870 + return ret;
47871 ret = __spufs_signal2_read(ctx, buf, len, pos);
47872 spu_release_saved(ctx);
47873
47874 @@ -1008,6 +1190,7 @@
47875 size_t len, loff_t *pos)
47876 {
47877 struct spu_context *ctx;
47878 + ssize_t ret;
47879 u32 data;
47880
47881 ctx = file->private_data;
47882 @@ -1018,7 +1201,9 @@
47883 if (copy_from_user(&data, buf, 4))
47884 return -EFAULT;
47885
47886 - spu_acquire(ctx);
47887 + ret = spu_acquire(ctx);
47888 + if (ret)
47889 + return ret;
47890 ctx->ops->signal2_write(ctx, data);
47891 spu_release(ctx);
47892
47893 @@ -1086,33 +1271,42 @@
47894 #define SPU_ATTR_ACQUIRE_SAVED 2
47895
47896 #define DEFINE_SPUFS_ATTRIBUTE(__name, __get, __set, __fmt, __acquire) \
47897 -static u64 __##__get(void *data) \
47898 +static int __##__get(void *data, u64 *val) \
47899 { \
47900 struct spu_context *ctx = data; \
47901 - u64 ret; \
47902 + int ret = 0; \
47903 \
47904 if (__acquire == SPU_ATTR_ACQUIRE) { \
47905 - spu_acquire(ctx); \
47906 - ret = __get(ctx); \
47907 + ret = spu_acquire(ctx); \
47908 + if (ret) \
47909 + return ret; \
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); \
47916 + if (ret) \
47917 + return ret; \
47918 + *val = __get(ctx); \
47919 spu_release_saved(ctx); \
47920 } else \
47921 - ret = __get(ctx); \
47922 + *val = __get(ctx); \
47923 \
47924 - return ret; \
47925 + return 0; \
47926 } \
47927 -DEFINE_SIMPLE_ATTRIBUTE(__name, __##__get, __set, __fmt);
47928 +DEFINE_SPUFS_SIMPLE_ATTRIBUTE(__name, __##__get, __set, __fmt);
47929
47930 -static void spufs_signal1_type_set(void *data, u64 val)
47931 +static int spufs_signal1_type_set(void *data, u64 val)
47932 {
47933 struct spu_context *ctx = data;
47934 + int ret;
47935
47936 - spu_acquire(ctx);
47937 + ret = spu_acquire(ctx);
47938 + if (ret)
47939 + return ret;
47940 ctx->ops->signal1_type_set(ctx, val);
47941 spu_release(ctx);
47942 +
47943 + return 0;
47944 }
47945
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);
47949
47950
47951 -static void spufs_signal2_type_set(void *data, u64 val)
47952 +static int spufs_signal2_type_set(void *data, u64 val)
47953 {
47954 struct spu_context *ctx = data;
47955 + int ret;
47956
47957 - spu_acquire(ctx);
47958 + ret = spu_acquire(ctx);
47959 + if (ret)
47960 + return ret;
47961 ctx->ops->signal2_type_set(ctx, val);
47962 spu_release(ctx);
47963 +
47964 + return 0;
47965 }
47966
47967 static u64 spufs_signal2_type_get(struct spu_context *ctx)
47968 @@ -1329,6 +1528,9 @@
47969 {
47970 struct spu_context *ctx = spu->ctx;
47971
47972 + if (!ctx)
47973 + return;
47974 +
47975 wake_up_all(&ctx->mfc_wq);
47976
47977 pr_debug("%s %s\n", __FUNCTION__, spu->name);
47978 @@ -1375,12 +1577,17 @@
47979 if (size != 4)
47980 goto out;
47981
47982 - spu_acquire(ctx);
47983 + ret = spu_acquire(ctx);
47984 + if (ret)
47985 + return ret;
47986 +
47987 + ret = -EINVAL;
47988 if (file->f_flags & O_NONBLOCK) {
47989 status = ctx->ops->read_mfc_tagstatus(ctx);
47990 if (!(status & ctx->tagwait))
47991 ret = -EAGAIN;
47992 else
47993 + /* XXX(hch): shouldn't we clear ret here? */
47994 ctx->tagwait &= ~status;
47995 } else {
47996 ret = spufs_wait(ctx->mfc_wq,
47997 @@ -1505,7 +1712,11 @@
47998 if (ret)
47999 goto out;
48000
48001 - ret = spu_acquire_runnable(ctx, 0);
48002 + ret = spu_acquire(ctx);
48003 + if (ret)
48004 + goto out;
48005 +
48006 + ret = spufs_wait(ctx->run_wq, ctx->state == SPU_STATE_RUNNABLE);
48007 if (ret)
48008 goto out;
48009
48010 @@ -1539,7 +1750,11 @@
48011
48012 poll_wait(file, &ctx->mfc_wq, wait);
48013
48014 - spu_acquire(ctx);
48015 + /*
48016 + * For now keep this uninterruptible and also ignore the rule
48017 + * that poll should not sleep. Will be fixed later.
48018 + */
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;
48025 int ret;
48026
48027 - spu_acquire(ctx);
48028 + ret = spu_acquire(ctx);
48029 + if (ret)
48030 + return ret;
48031 #if 0
48032 /* this currently hangs */
48033 ret = spufs_wait(ctx->mfc_wq,
48034 @@ -1605,12 +1822,18 @@
48035 .mmap = spufs_mfc_mmap,
48036 };
48037
48038 -static void spufs_npc_set(void *data, u64 val)
48039 +static int spufs_npc_set(void *data, u64 val)
48040 {
48041 struct spu_context *ctx = data;
48042 - spu_acquire(ctx);
48043 + int ret;
48044 +
48045 + ret = spu_acquire(ctx);
48046 + if (ret)
48047 + return ret;
48048 ctx->ops->npc_write(ctx, val);
48049 spu_release(ctx);
48050 +
48051 + return 0;
48052 }
48053
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);
48058
48059 -static void spufs_decr_set(void *data, u64 val)
48060 +static int spufs_decr_set(void *data, u64 val)
48061 {
48062 struct spu_context *ctx = data;
48063 struct spu_lscsa *lscsa = ctx->csa.lscsa;
48064 - spu_acquire_saved(ctx);
48065 + int ret;
48066 +
48067 + ret = spu_acquire_saved(ctx);
48068 + if (ret)
48069 + return ret;
48070 lscsa->decr.slot[0] = (u32) val;
48071 spu_release_saved(ctx);
48072 +
48073 + return 0;
48074 }
48075
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);
48080
48081 -static void spufs_decr_status_set(void *data, u64 val)
48082 +static int spufs_decr_status_set(void *data, u64 val)
48083 {
48084 struct spu_context *ctx = data;
48085 - spu_acquire_saved(ctx);
48086 + int ret;
48087 +
48088 + ret = spu_acquire_saved(ctx);
48089 + if (ret)
48090 + return ret;
48091 if (val)
48092 ctx->csa.priv2.mfc_control_RW |= MFC_CNTL_DECREMENTER_RUNNING;
48093 else
48094 ctx->csa.priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING;
48095 spu_release_saved(ctx);
48096 +
48097 + return 0;
48098 }
48099
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);
48104
48105 -static void spufs_event_mask_set(void *data, u64 val)
48106 +static int spufs_event_mask_set(void *data, u64 val)
48107 {
48108 struct spu_context *ctx = data;
48109 struct spu_lscsa *lscsa = ctx->csa.lscsa;
48110 - spu_acquire_saved(ctx);
48111 + int ret;
48112 +
48113 + ret = spu_acquire_saved(ctx);
48114 + if (ret)
48115 + return ret;
48116 lscsa->event_mask.slot[0] = (u32) val;
48117 spu_release_saved(ctx);
48118 +
48119 + return 0;
48120 }
48121
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)
48126
48127 -static void spufs_srr0_set(void *data, u64 val)
48128 +static int spufs_srr0_set(void *data, u64 val)
48129 {
48130 struct spu_context *ctx = data;
48131 struct spu_lscsa *lscsa = ctx->csa.lscsa;
48132 - spu_acquire_saved(ctx);
48133 + int ret;
48134 +
48135 + ret = spu_acquire_saved(ctx);
48136 + if (ret)
48137 + return ret;
48138 lscsa->srr0.slot[0] = (u32) val;
48139 spu_release_saved(ctx);
48140 +
48141 + return 0;
48142 }
48143
48144 static u64 spufs_srr0_get(struct spu_context *ctx)
48145 @@ -1727,10 +1974,12 @@
48146 return ctx->object_id;
48147 }
48148
48149 -static void spufs_object_id_set(void *data, u64 id)
48150 +static int spufs_object_id_set(void *data, u64 id)
48151 {
48152 struct spu_context *ctx = data;
48153 ctx->object_id = id;
48154 +
48155 + return 0;
48156 }
48157
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)
48162 {
48163 - u32 mbox_stat;
48164 u32 data;
48165
48166 - mbox_stat = ctx->csa.prob.mb_stat_R;
48167 - if (mbox_stat & 0x0000ff) {
48168 - data = ctx->csa.prob.pu_mb_R;
48169 - }
48170 + /* EOF if there's no entry in the mbox */
48171 + if (!(ctx->csa.prob.mb_stat_R & 0x0000ff))
48172 + return 0;
48173 +
48174 + data = ctx->csa.prob.pu_mb_R;
48175
48176 return simple_read_from_buffer(buf, len, pos, &data, sizeof data);
48177 }
48178 @@ -1797,7 +2046,9 @@
48179 if (!access_ok(VERIFY_WRITE, buf, len))
48180 return -EFAULT;
48181
48182 - spu_acquire_saved(ctx);
48183 + ret = spu_acquire_saved(ctx);
48184 + if (ret)
48185 + return ret;
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)
48192 {
48193 - u32 ibox_stat;
48194 u32 data;
48195
48196 - ibox_stat = ctx->csa.prob.mb_stat_R;
48197 - if (ibox_stat & 0xff0000) {
48198 - data = ctx->csa.priv2.puint_mb_R;
48199 - }
48200 + /* EOF if there's no entry in the ibox */
48201 + if (!(ctx->csa.prob.mb_stat_R & 0xff0000))
48202 + return 0;
48203 +
48204 + data = ctx->csa.priv2.puint_mb_R;
48205
48206 return simple_read_from_buffer(buf, len, pos, &data, sizeof data);
48207 }
48208 @@ -1835,7 +2086,9 @@
48209 if (!access_ok(VERIFY_WRITE, buf, len))
48210 return -EFAULT;
48211
48212 - spu_acquire_saved(ctx);
48213 + ret = spu_acquire_saved(ctx);
48214 + if (ret)
48215 + return ret;
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))
48221 return -EFAULT;
48222
48223 - spu_acquire_saved(ctx);
48224 + ret = spu_acquire_saved(ctx);
48225 + if (ret)
48226 + return ret;
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))
48232 return -EFAULT;
48233
48234 - spu_acquire_saved(ctx);
48235 + ret = spu_acquire_saved(ctx);
48236 + if (ret)
48237 + return ret;
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;
48243 int ret;
48244
48245 - spu_acquire_saved(ctx);
48246 + ret = spu_acquire_saved(ctx);
48247 + if (ret)
48248 + return ret;
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)
48254 {
48255 struct spu_context *ctx = s->private;
48256 + int ret;
48257 +
48258 + ret = spu_acquire(ctx);
48259 + if (ret)
48260 + return ret;
48261
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;
48272 else {
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);
48277 }
48278 }
48279 if (events & (POLLOUT | POLLWRNORM)) {
48280 if (stat & 0x00ff00)
48281 ret = POLLOUT | POLLWRNORM;
48282 else {
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);
48289 }
48290 }
48291 spin_unlock_irq(&spu->register_lock);
48292 @@ -106,7 +108,7 @@
48293 ret = 4;
48294 } else {
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);
48298 ret = 0;
48299 }
48300 spin_unlock_irq(&spu->register_lock);
48301 @@ -127,7 +129,7 @@
48302 } else {
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);
48307 ret = 0;
48308 }
48309 spin_unlock_irq(&spu->register_lock);
48310 @@ -206,6 +208,11 @@
48311 return ctx->spu->local_store;
48312 }
48313
48314 +static void spu_hw_privcntl_write(struct spu_context *ctx, u64 val)
48315 +{
48316 + out_be64(&ctx->spu->priv2->spu_privcntl_RW, val);
48317 +}
48318 +
48319 static u32 spu_hw_runcntl_read(struct spu_context *ctx)
48320 {
48321 return in_be32(&ctx->spu->problem->spu_runcntl_RW);
48322 @@ -215,11 +222,21 @@
48323 {
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);
48331 }
48332
48333 +static void spu_hw_runcntl_stop(struct spu_context *ctx)
48334 +{
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)
48338 + cpu_relax();
48339 + spin_unlock_irq(&ctx->spu->register_lock);
48340 +}
48341 +
48342 static void spu_hw_master_start(struct spu_context *ctx)
48343 {
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
48359 @@ -28,6 +28,8 @@
48360 #include <asm/spu_csa.h>
48361 #include <asm/mmu.h>
48362
48363 +#include "spufs.h"
48364 +
48365 static int spu_alloc_lscsa_std(struct spu_state *csa)
48366 {
48367 struct spu_lscsa *lscsa;
48368 @@ -73,7 +75,7 @@
48369 int i, j, n_4k;
48370
48371 /* Check availability of 64K pages */
48372 - if (mmu_psize_defs[MMU_PAGE_64K].shift == 0)
48373 + if (!spu_64k_pages_available())
48374 goto fail;
48375
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 @@
48381 {
48382 struct spu_context *ctx = spu->ctx;
48383
48384 - wake_up_all(&ctx->stop_wq);
48385 + /*
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.
48391 + */
48392 + if (ctx) {
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;
48397 +
48398 + /* ensure that the exception status has hit memory before a
48399 + * thread waiting on the context's stop queue is woken */
48400 + smp_wmb();
48401 +
48402 + wake_up_all(&ctx->stop_wq);
48403 + }
48404 +
48405 + /* Clear callback arguments from spu structure */
48406 + spu->class_0_pending = 0;
48407 + spu->dsisr = 0;
48408 + spu->dar = 0;
48409 }
48410
48411 -static inline int spu_stopped(struct spu_context *ctx, u32 *stat)
48412 +int spu_stopped(struct spu_context *ctx, u32 *stat)
48413 {
48414 - struct spu *spu;
48415 - u64 pte_fault;
48416 + u64 dsisr;
48417 + u32 stopped;
48418
48419 *stat = ctx->ops->status_read(ctx);
48420
48421 - spu = ctx->spu;
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))
48425 + return 1;
48426 +
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)
48430 + return 1;
48431 +
48432 + dsisr = ctx->csa.dsisr;
48433 + if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))
48434 return 1;
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) ?
48438 - 1 : 0;
48439 +
48440 + if (ctx->csa.class_0_pending)
48441 + return 1;
48442 +
48443 + return 0;
48444 }
48445
48446 static int spu_setup_isolated(struct spu_context *ctx)
48447 @@ -128,34 +159,66 @@
48448
48449 static int spu_run_init(struct spu_context *ctx, u32 *npc)
48450 {
48451 + unsigned long runcntl = SPU_RUNCNTL_RUNNABLE;
48452 + int ret;
48453 +
48454 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
48455
48456 - if (ctx->flags & SPU_CREATE_ISOLATE) {
48457 - unsigned long runcntl;
48458 + /*
48459 + * NOSCHED is synchronous scheduling with respect to the caller.
48460 + * The caller waits for the context to be loaded.
48461 + */
48462 + if (ctx->flags & SPU_CREATE_NOSCHED) {
48463 + if (ctx->state == SPU_STATE_SAVED) {
48464 + ret = spu_activate(ctx, 0);
48465 + if (ret)
48466 + return ret;
48467 + }
48468 + }
48469
48470 + /*
48471 + * Apply special setup as required.
48472 + */
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);
48477 if (ret)
48478 return ret;
48479 }
48480
48481 - /* if userspace has set the runcntrl register (eg, to issue an
48482 - * isolated exit), we need to re-set it here */
48483 + /*
48484 + * If userspace has set the runcntrl register (eg, to
48485 + * issue an isolated exit), we need to re-set it here
48486 + */
48487 runcntl = ctx->ops->runcntl_read(ctx) &
48488 (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE);
48489 if (runcntl == 0)
48490 runcntl = SPU_RUNCNTL_RUNNABLE;
48491 + }
48492 +
48493 + if (ctx->flags & SPU_CREATE_NOSCHED) {
48494 + spuctx_switch_state(ctx, SPU_UTIL_USER);
48495 ctx->ops->runcntl_write(ctx, runcntl);
48496 } else {
48497 - unsigned long mode = SPU_PRIVCNTL_MODE_NORMAL;
48498 - ctx->ops->npc_write(ctx, *npc);
48499 + unsigned long privcntl;
48500 +
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);
48505 - }
48506 + privcntl = SPU_PRIVCNTL_MODE_SINGLE_STEP;
48507 + else
48508 + privcntl = SPU_PRIVCNTL_MODE_NORMAL;
48509
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);
48514 +
48515 + if (ctx->state == SPU_STATE_SAVED) {
48516 + ret = spu_activate(ctx, 0);
48517 + if (ret)
48518 + return ret;
48519 + } else {
48520 + spuctx_switch_state(ctx, SPU_UTIL_USER);
48521 + }
48522 + }
48523
48524 return 0;
48525 }
48526 @@ -165,6 +228,8 @@
48527 {
48528 int ret = 0;
48529
48530 + spu_del_from_rq(ctx);
48531 +
48532 *status = ctx->ops->status_read(ctx);
48533 *npc = ctx->ops->npc_read(ctx);
48534
48535 @@ -177,26 +242,6 @@
48536 return ret;
48537 }
48538
48539 -static int spu_reacquire_runnable(struct spu_context *ctx, u32 *npc,
48540 - u32 *status)
48541 -{
48542 - int ret;
48543 -
48544 - ret = spu_run_fini(ctx, npc, status);
48545 - if (ret)
48546 - return ret;
48547 -
48548 - if (*status & (SPU_STATUS_STOPPED_BY_STOP | SPU_STATUS_STOPPED_BY_HALT))
48549 - return *status;
48550 -
48551 - ret = spu_acquire_runnable(ctx, 0);
48552 - if (ret)
48553 - return ret;
48554 -
48555 - spuctx_switch_state(ctx, SPU_UTIL_USER);
48556 - return 0;
48557 -}
48558 -
48559 /*
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;
48564 void __iomem *ls;
48565 long spu_ret;
48566 - int ret;
48567 + int ret, ret2;
48568
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);
48574 }
48575 - spu_acquire(ctx);
48576 + ret2 = spu_acquire(ctx);
48577 if (ret == -ERESTARTSYS)
48578 return ret;
48579 + if (ret2)
48580 + return -EINTR;
48581 }
48582
48583 /* write result, jump over indirect pointer */
48584 @@ -281,18 +328,6 @@
48585 return ret;
48586 }
48587
48588 -static inline int spu_process_events(struct spu_context *ctx)
48589 -{
48590 - struct spu *spu = ctx->spu;
48591 - int ret = 0;
48592 -
48593 - if (spu->class_0_pending)
48594 - ret = spu_irq_class_0_bottom(spu);
48595 - if (!ret && signal_pending(current))
48596 - ret = -ERESTARTSYS;
48597 - return ret;
48598 -}
48599 -
48600 long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
48601 {
48602 int ret;
48603 @@ -302,29 +337,14 @@
48604 if (mutex_lock_interruptible(&ctx->run_mutex))
48605 return -ERESTARTSYS;
48606
48607 - ctx->ops->master_start(ctx);
48608 + spu_enable_spu(ctx);
48609 ctx->event_return = 0;
48610
48611 - spu_acquire(ctx);
48612 - if (ctx->state == SPU_STATE_SAVED) {
48613 - __spu_update_sched_info(ctx);
48614 - spu_set_timeslice(ctx);
48615 -
48616 - ret = spu_activate(ctx, 0);
48617 - if (ret) {
48618 - spu_release(ctx);
48619 - goto out;
48620 - }
48621 - } else {
48622 - /*
48623 - * We have to update the scheduling priority under active_mutex
48624 - * to protect against find_victim().
48625 - *
48626 - * No need to update the timeslice ASAP, it will get updated
48627 - * once the current one has expired.
48628 - */
48629 - spu_update_sched_info(ctx);
48630 - }
48631 + ret = spu_acquire(ctx);
48632 + if (ret)
48633 + goto out_unlock;
48634 +
48635 + spu_update_sched_info(ctx);
48636
48637 ret = spu_run_init(ctx, npc);
48638 if (ret) {
48639 @@ -358,14 +378,12 @@
48640 if (ret)
48641 break;
48642
48643 - if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) {
48644 - ret = spu_reacquire_runnable(ctx, npc, &status);
48645 - if (ret)
48646 - goto out2;
48647 - continue;
48648 - }
48649 - ret = spu_process_events(ctx);
48650 + ret = spufs_handle_class0(ctx);
48651 + if (ret)
48652 + break;
48653
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++;
48661
48662
48663 - ctx->ops->master_stop(ctx);
48664 + spu_disable_spu(ctx);
48665 ret = spu_run_fini(ctx, npc, &status);
48666 spu_yield(ctx);
48667
48668 -out2:
48669 if ((ret == 0) ||
48670 ((ret == -ERESTARTSYS) &&
48671 ((status & SPU_STATUS_STOPPED_BY_HALT) ||
48672 @@ -401,6 +418,7 @@
48673
48674 out:
48675 *event = ctx->event_return;
48676 +out_unlock:
48677 mutex_unlock(&ctx->run_mutex);
48678 return ret;
48679 }
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
48683 @@ -58,6 +58,7 @@
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;
48688
48689 /*
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)
48693 {
48694 /*
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.
48700 + */
48701 + BUG_ON(!list_empty(&ctx->rq));
48702 +
48703 + /*
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.
48707 */
48708 ctx->tid = current->pid;
48709
48710 /*
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.
48716 */
48717 @@ -124,23 +131,32 @@
48718 ctx->policy = current->policy;
48719
48720 /*
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.
48731 */
48732 - spin_lock(&spu_prio->runq_lock);
48733 ctx->cpus_allowed = current->cpus_allowed;
48734 - spin_unlock(&spu_prio->runq_lock);
48735 }
48736
48737 void spu_update_sched_info(struct spu_context *ctx)
48738 {
48739 - int node = ctx->spu->node;
48740 + int node;
48741
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;
48747 +
48748 + /*
48749 + * Take list_mutex to sync with find_victim().
48750 + */
48751 + mutex_lock(&cbe_spu_info[node].list_mutex);
48752 + __spu_update_sched_info(ctx);
48753 + mutex_unlock(&cbe_spu_info[node].list_mutex);
48754 + } else {
48755 + __spu_update_sched_info(ctx);
48756 + }
48757 }
48758
48759 static int __node_allowed(struct spu_context *ctx, int node)
48760 @@ -174,7 +190,7 @@
48761 * Wake up the active spu_contexts.
48762 *
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().
48766 */
48767 for_each_online_node(node) {
48768 struct spu *spu;
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;
48774 mb();
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);
48783 spu->pid = 0;
48784 spu->tgid = 0;
48785 @@ -454,6 +468,13 @@
48786 }
48787 }
48788
48789 +static void spu_add_to_rq(struct spu_context *ctx)
48790 +{
48791 + spin_lock(&spu_prio->runq_lock);
48792 + __spu_add_to_rq(ctx);
48793 + spin_unlock(&spu_prio->runq_lock);
48794 +}
48795 +
48796 static void __spu_del_from_rq(struct spu_context *ctx)
48797 {
48798 int prio = ctx->prio;
48799 @@ -468,10 +489,24 @@
48800 }
48801 }
48802
48803 +void spu_del_from_rq(struct spu_context *ctx)
48804 +{
48805 + spin_lock(&spu_prio->runq_lock);
48806 + __spu_del_from_rq(ctx);
48807 + spin_unlock(&spu_prio->runq_lock);
48808 +}
48809 +
48810 static void spu_prio_wait(struct spu_context *ctx)
48811 {
48812 DEFINE_WAIT(wait);
48813
48814 + /*
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.
48818 + */
48819 + BUG_ON(!(ctx->flags & SPU_CREATE_NOSCHED));
48820 +
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 @@
48825 /*
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
48831 * the future.
48832 */
48833 @@ -571,6 +606,7 @@
48834 struct spu_context *tmp = spu->ctx;
48835
48836 if (tmp && tmp->prio > ctx->prio &&
48837 + !(tmp->flags & SPU_CREATE_NOSCHED) &&
48838 (!victim || tmp->prio > victim->prio))
48839 victim = spu->ctx;
48840 }
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.
48845 + *
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.
48849 */
48850 if (!mutex_trylock(&victim->state_mutex)) {
48851 victim = NULL;
48852 @@ -589,10 +629,10 @@
48853 }
48854
48855 spu = victim->spu;
48856 - if (!spu) {
48857 + if (!spu || victim->prio <= ctx->prio) {
48858 /*
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.
48863 */
48864 mutex_unlock(&victim->state_mutex);
48865 @@ -607,13 +647,10 @@
48866
48867 victim->stats.invol_ctx_switch++;
48868 spu->stats.invol_ctx_switch++;
48869 + spu_add_to_rq(victim);
48870 +
48871 mutex_unlock(&victim->state_mutex);
48872 - /*
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.
48876 - */
48877 - wake_up(&victim->stop_wq);
48878 +
48879 return spu;
48880 }
48881 }
48882 @@ -621,6 +658,50 @@
48883 return NULL;
48884 }
48885
48886 +static void __spu_schedule(struct spu *spu, struct spu_context *ctx)
48887 +{
48888 + int node = spu->node;
48889 + int success = 0;
48890 +
48891 + spu_set_timeslice(ctx);
48892 +
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;
48898 + success = 1;
48899 + }
48900 + mutex_unlock(&cbe_spu_info[node].list_mutex);
48901 +
48902 + if (success)
48903 + wake_up_all(&ctx->run_wq);
48904 + else
48905 + spu_add_to_rq(ctx);
48906 +}
48907 +
48908 +static void spu_schedule(struct spu *spu, struct spu_context *ctx)
48909 +{
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);
48915 +}
48916 +
48917 +static void spu_unschedule(struct spu *spu, struct spu_context *ctx)
48918 +{
48919 + int node = spu->node;
48920 +
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);
48928 +}
48929 +
48930 /**
48931 * spu_activate - find a free spu for a context and execute it
48932 * @ctx: spu context to schedule
48933 @@ -632,39 +713,47 @@
48934 */
48935 int spu_activate(struct spu_context *ctx, unsigned long flags)
48936 {
48937 - do {
48938 - struct spu *spu;
48939 + struct spu *spu;
48940
48941 - /*
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.
48946 - */
48947 - if (ctx->spu)
48948 - return 0;
48949 + /*
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.
48954 + */
48955 + if (ctx->spu)
48956 + return 0;
48957
48958 - spu = spu_get_idle(ctx);
48959 - /*
48960 - * If this is a realtime thread we try to get it running by
48961 - * preempting a lower priority thread.
48962 - */
48963 - if (!spu && rt_prio(ctx->prio))
48964 - spu = find_victim(ctx);
48965 - if (spu) {
48966 - int node = spu->node;
48967 +spu_activate_top:
48968 + if (signal_pending(current))
48969 + return -ERESTARTSYS;
48970
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);
48975 - return 0;
48976 - }
48977 + spu = spu_get_idle(ctx);
48978 + /*
48979 + * If this is a realtime thread we try to get it running by
48980 + * preempting a lower priority thread.
48981 + */
48982 + if (!spu && rt_prio(ctx->prio))
48983 + spu = find_victim(ctx);
48984 + if (spu) {
48985 + unsigned long runcntl;
48986
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);
48991 +
48992 + return 0;
48993 + }
48994 +
48995 + if (ctx->flags & SPU_CREATE_NOSCHED) {
48996 spu_prio_wait(ctx);
48997 - } while (!signal_pending(current));
48998 + goto spu_activate_top;
48999 + }
49000 +
49001 + spu_add_to_rq(ctx);
49002
49003 - return -ERESTARTSYS;
49004 + return 0;
49005 }
49006
49007 /**
49008 @@ -706,21 +795,19 @@
49009 if (spu) {
49010 new = grab_runnable_context(max_prio, spu->node);
49011 if (new || force) {
49012 - int node = spu->node;
49013 -
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);
49019 -
49020 - ctx->stats.vol_ctx_switch++;
49021 - spu->stats.vol_ctx_switch++;
49022 -
49023 - if (new)
49024 - wake_up(&new->stop_wq);
49025 + spu_unschedule(spu, ctx);
49026 + if (new) {
49027 + if (new->flags & SPU_CREATE_NOSCHED)
49028 + wake_up(&new->stop_wq);
49029 + else {
49030 + spu_release(ctx);
49031 + spu_schedule(spu, new);
49032 + /* this one can't easily be made
49033 + interruptible */
49034 + mutex_lock(&ctx->state_mutex);
49035 + }
49036 + }
49037 }
49038 -
49039 }
49040
49041 return new != NULL;
49042 @@ -757,43 +844,38 @@
49043
49044 static noinline void spusched_tick(struct spu_context *ctx)
49045 {
49046 + struct spu_context *new = NULL;
49047 + struct spu *spu = NULL;
49048 + u32 status;
49049 +
49050 + if (spu_acquire(ctx))
49051 + BUG(); /* a kernel thread never has signals pending */
49052 +
49053 + if (ctx->state != SPU_STATE_RUNNABLE)
49054 + goto out;
49055 + if (spu_stopped(ctx, &status))
49056 + goto out;
49057 if (ctx->flags & SPU_CREATE_NOSCHED)
49058 - return;
49059 + goto out;
49060 if (ctx->policy == SCHED_FIFO)
49061 - return;
49062 + goto out;
49063
49064 if (--ctx->time_slice)
49065 - return;
49066 -
49067 - /*
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.
49071 - */
49072 - if (mutex_trylock(&ctx->state_mutex)) {
49073 - struct spu *spu = ctx->spu;
49074 - struct spu_context *new;
49075 + goto out;
49076
49077 - new = grab_runnable_context(ctx->prio + 1, spu->node);
49078 - if (new) {
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);
49085 - /*
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.
49089 - */
49090 - wake_up(&ctx->stop_wq);
49091 - }
49092 - spu_set_timeslice(ctx);
49093 - mutex_unlock(&ctx->state_mutex);
49094 + spu = ctx->spu;
49095 + new = grab_runnable_context(ctx->prio + 1, spu->node);
49096 + if (new) {
49097 + spu_unschedule(spu, ctx);
49098 + spu_add_to_rq(ctx);
49099 } else {
49100 ctx->time_slice++;
49101 }
49102 +out:
49103 + spu_release(ctx);
49104 +
49105 + if (new)
49106 + spu_schedule(spu, new);
49107 }
49108
49109 /**
49110 @@ -817,35 +899,31 @@
49111 }
49112
49113 /**
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.
49117 *
49118 * No locking against reading these values from userspace, as for
49119 * the CPU loadavg code.
49120 */
49121 -static void spu_calc_load(unsigned long ticks)
49122 +static void spu_calc_load(void)
49123 {
49124 unsigned long active_tasks; /* fixed-point */
49125 - static int count = LOAD_FREQ;
49126
49127 - count -= ticks;
49128 -
49129 - if (unlikely(count < 0)) {
49130 - active_tasks = count_active_contexts() * FIXED_1;
49131 - do {
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);
49137 - }
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);
49142 }
49143
49144 static void spusched_wake(unsigned long data)
49145 {
49146 mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
49147 wake_up_process(spusched_task);
49148 - spu_calc_load(SPUSCHED_TICK);
49149 +}
49150 +
49151 +static void spuloadavg_wake(unsigned long data)
49152 +{
49153 + mod_timer(&spuloadavg_timer, jiffies + LOAD_FREQ);
49154 + spu_calc_load();
49155 }
49156
49157 static int spusched_thread(void *unused)
49158 @@ -857,17 +935,58 @@
49159 set_current_state(TASK_INTERRUPTIBLE);
49160 schedule();
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)
49164 - if (spu->ctx)
49165 - spusched_tick(spu->ctx);
49166 - mutex_unlock(&cbe_spu_info[node].list_mutex);
49167 + struct mutex *mtx = &cbe_spu_info[node].list_mutex;
49168 +
49169 + mutex_lock(mtx);
49170 + list_for_each_entry(spu, &cbe_spu_info[node].spus,
49171 + cbe_list) {
49172 + struct spu_context *ctx = spu->ctx;
49173 +
49174 + if (ctx) {
49175 + mutex_unlock(mtx);
49176 + spusched_tick(ctx);
49177 + mutex_lock(mtx);
49178 + }
49179 + }
49180 + mutex_unlock(mtx);
49181 }
49182 }
49183
49184 return 0;
49185 }
49186
49187 +void spuctx_switch_state(struct spu_context *ctx,
49188 + enum spu_utilization_state new_state)
49189 +{
49190 + unsigned long long curtime;
49191 + signed long long delta;
49192 + struct timespec ts;
49193 + struct spu *spu;
49194 + enum spu_utilization_state old_state;
49195 +
49196 + ktime_get_ts(&ts);
49197 + curtime = timespec_to_ns(&ts);
49198 + delta = curtime - ctx->stats.tstamp;
49199 +
49200 + WARN_ON(!mutex_is_locked(&ctx->state_mutex));
49201 + WARN_ON(delta < 0);
49202 +
49203 + spu = ctx->spu;
49204 + old_state = ctx->stats.util_state;
49205 + ctx->stats.util_state = new_state;
49206 + ctx->stats.tstamp = curtime;
49207 +
49208 + /*
49209 + * Update the physical SPU utilization statistics.
49210 + */
49211 + if (spu) {
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;
49216 + }
49217 +}
49218 +
49219 #define LOAD_INT(x) ((x) >> FSHIFT)
49220 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
49221
49222 @@ -881,7 +1000,7 @@
49223
49224 /*
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.
49229 */
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);
49233
49234 setup_timer(&spusched_timer, spusched_wake, 0);
49235 + setup_timer(&spuloadavg_timer, spuloadavg_wake, 0);
49236
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;
49241 }
49242
49243 + mod_timer(&spuloadavg_timer, 0);
49244 +
49245 entry = create_proc_entry("spu_loadavg", 0, NULL);
49246 if (!entry)
49247 goto out_stop_kthread;
49248 @@ -954,6 +1076,7 @@
49249 remove_proc_entry("spu_loadavg", NULL);
49250
49251 del_timer_sync(&spusched_timer);
49252 + del_timer_sync(&spuloadavg_timer);
49253 kthread_stop(spusched_task);
49254
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
49259 @@ -71,6 +71,7 @@
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 @@
49279
49280 /* fault handling */
49281 int spufs_handle_class1(struct spu_context *ctx);
49282 +int spufs_handle_class0(struct spu_context *ctx);
49283
49284 /* affinity */
49285 struct spu *affinity_check(struct spu_context *ctx);
49286
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)
49291 {
49292 - mutex_lock(&ctx->state_mutex);
49293 + return mutex_lock_interruptible(&ctx->state_mutex);
49294 }
49295
49296 static inline void spu_release(struct spu_context *ctx)
49297 @@ -242,10 +246,11 @@
49298 void spu_unmap_mappings(struct spu_context *ctx);
49299
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);
49305
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 @@
49312 } \
49313 spu_release(ctx); \
49314 schedule(); \
49315 - spu_acquire(ctx); \
49316 + __ret = spu_acquire(ctx); \
49317 + if (__ret) \
49318 + break; \
49319 } \
49320 finish_wait(&(wq), &__wait); \
49321 __ret; \
49322 @@ -306,41 +313,16 @@
49323 extern struct spufs_coredump_reader spufs_coredump_read[];
49324 extern int spufs_coredump_num_notes;
49325
49326 -/*
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
49329 - * line.
49330 - */
49331 -static inline void spuctx_switch_state(struct spu_context *ctx,
49332 - enum spu_utilization_state new_state)
49333 -{
49334 - unsigned long long curtime;
49335 - signed long long delta;
49336 - struct timespec ts;
49337 - struct spu *spu;
49338 - enum spu_utilization_state old_state;
49339 -
49340 - ktime_get_ts(&ts);
49341 - curtime = timespec_to_ns(&ts);
49342 - delta = curtime - ctx->stats.tstamp;
49343 -
49344 - WARN_ON(!mutex_is_locked(&ctx->state_mutex));
49345 - WARN_ON(delta < 0);
49346 -
49347 - spu = ctx->spu;
49348 - old_state = ctx->stats.util_state;
49349 - ctx->stats.util_state = new_state;
49350 - ctx->stats.tstamp = curtime;
49351 -
49352 - /*
49353 - * Update the physical SPU utilization statistics.
49354 - */
49355 - if (spu) {
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;
49360 - }
49361 -}
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);
49370 +
49371 +extern void spuctx_switch_state(struct spu_context *ctx,
49372 + enum spu_utilization_state new_state);
49373
49374 #endif
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
49378 @@ -48,6 +48,8 @@
49379 #include <asm/spu_csa.h>
49380 #include <asm/mmu_context.h>
49381
49382 +#include "spufs.h"
49383 +
49384 #include "spu_save_dump.h"
49385 #include "spu_restore_dump.h"
49386
49387 @@ -691,35 +693,9 @@
49388 out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESUME_DMA_QUEUE);
49389 }
49390
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)
49394 {
49395 - u64 llp;
49396 -
49397 - if (REGION_ID(ea) == KERNEL_REGION_ID)
49398 - llp = mmu_psize_defs[mmu_linear_psize].sllp;
49399 - else
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;
49404 -}
49405 -
49406 -static inline void load_mfc_slb(struct spu *spu, u64 slb[2], int slbe)
49407 -{
49408 - struct spu_priv2 __iomem *priv2 = spu->priv2;
49409 -
49410 - out_be64(&priv2->slb_index_W, slbe);
49411 - eieio();
49412 - out_be64(&priv2->slb_vsid_RW, slb[0]);
49413 - out_be64(&priv2->slb_esid_RW, slb[1]);
49414 - eieio();
49415 -}
49416 -
49417 -static inline void setup_mfc_slbs(struct spu_state *csa, struct spu *spu)
49418 -{
49419 - u64 code_slb[2];
49420 - u64 lscsa_slb[2];
49421 -
49422 /* Save, Step 47:
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).
49427 */
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);
49435 }
49436
49437 static inline void set_switch_active(struct spu_state *csa, struct spu *spu)
49438 @@ -768,9 +740,9 @@
49439 * (translation) interrupts.
49440 */
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);
49453
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);
49460 }
49461
49462 @@ -946,8 +918,8 @@
49463 POLL_WHILE_TRUE(in_be32(&prob->spu_status_R) & SPU_STATUS_RUNNING);
49464
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);
49471 }
49472
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);
49484 }
49485
49486 @@ -1866,7 +1838,8 @@
49487 */
49488
49489 resume_mfc_queue(prev, spu); /* Step 46. */
49490 - setup_mfc_slbs(prev, spu); /* Step 47. */
49491 + /* 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. */
49501 + /* 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 @@
49507 int rc;
49508
49509 acquire_spu_lock(spu); /* Step 1. */
49510 - prev->dar = spu->dar;
49511 - prev->dsisr = spu->dsisr;
49512 - spu->dar = 0;
49513 - spu->dsisr = 0;
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;
49521 - new->dar = 0;
49522 - new->dsisr = 0;
49523 - spu->class_0_pending = 0;
49524 rc = __do_spu_restore(new, spu);
49525 release_spu_lock(spu);
49526 if (rc) {
49527 @@ -2215,10 +2182,8 @@
49528
49529 return 0;
49530 }
49531 -EXPORT_SYMBOL_GPL(spu_init_csa);
49532
49533 void spu_fini_csa(struct spu_state *csa)
49534 {
49535 spu_free_lscsa(csa);
49536 }
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
49541 @@ -2,6 +2,8 @@
49542 bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
49543 depends on PPC_MULTIPLATFORM && PPC64
49544 select PPC_CELL
49545 + select PPC_CELL_NATIVE
49546 + select PPC_RTAS
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
49553 @@ -22,6 +22,7 @@
49554
49555 #undef DEBUG
49556
49557 +#include <linux/of.h>
49558 #include <linux/of_device.h>
49559 #include <linux/irq.h>
49560
49561 @@ -222,7 +223,7 @@
49562 void (*dummy_read)(struct pci_controller *))
49563 {
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;
49567
49568 if (celleb_pci_count >= MAX_CELLEB_PCI_BUS) {
49569 printk(KERN_ERR "Too many pci bridges, workarounds"
49570 @@ -256,13 +257,13 @@
49571
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");
49577 return 1;
49578 }
49579
49580 list_for_each_entry(phb, &hose_list, list_node) {
49581 - node = phb->arch_data;
49582 + node = phb->dn;
49583 match = of_match_node(celleb_pci_workaround_match, node);
49584
49585 if (match) {
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
49589 @@ -22,8 +22,9 @@
49590 #include <linux/init.h>
49591 #include <linux/dma-mapping.h>
49592 #include <linux/pci.h>
49593 +#include <linux/of_platform.h>
49594
49595 -#include <asm/of_platform.h>
49596 +#include <asm/machdep.h>
49597
49598 #include "beat_wrapper.h"
49599
49600 @@ -51,6 +52,8 @@
49601 return 0;
49602 }
49603
49604 +static unsigned long celleb_dma_direct_offset;
49605 +
49606 static void __init celleb_init_direct_mapping(void)
49607 {
49608 u64 lpar_addr, io_addr;
49609 @@ -68,7 +71,18 @@
49610 ioid, DMA_FLAGS);
49611 }
49612
49613 - dma_direct_offset = dma_base;
49614 + celleb_dma_direct_offset = dma_base;
49615 +}
49616 +
49617 +static void celleb_dma_dev_setup(struct device *dev)
49618 +{
49619 + dev->archdata.dma_ops = get_pci_dma_ops();
49620 + dev->archdata.dma_data = (void *)celleb_dma_direct_offset;
49621 +}
49622 +
49623 +static void celleb_pci_dma_dev_setup(struct pci_dev *pdev)
49624 +{
49625 + celleb_dma_dev_setup(&pdev->dev);
49626 }
49627
49628 static int celleb_of_bus_notify(struct notifier_block *nb,
49629 @@ -80,7 +94,7 @@
49630 if (action != BUS_NOTIFY_ADD_DEVICE)
49631 return 0;
49632
49633 - dev->archdata.dma_ops = get_pci_dma_ops();
49634 + celleb_dma_dev_setup(dev);
49635
49636 return 0;
49637 }
49638 @@ -91,14 +105,12 @@
49639
49640 static int __init celleb_init_iommu(void)
49641 {
49642 - if (!machine_is(celleb))
49643 - return -ENODEV;
49644 -
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);
49649
49650 return 0;
49651 }
49652
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
49658 @@ -31,6 +31,7 @@
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>
49664
49665 #include <asm/io.h>
49666 @@ -138,8 +139,6 @@
49667 *val = celleb_fake_config_readl(p);
49668 break;
49669 }
49670 -
49671 - return;
49672 }
49673
49674 static void celleb_config_write_fake(unsigned char *config, int where,
49675 @@ -158,7 +157,6 @@
49676 celleb_fake_config_writel(val, p);
49677 break;
49678 }
49679 - return;
49680 }
49681
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");
49689 + goto error;
49690 + }
49691
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);
49696
49697 li = of_get_property(node, "interrupts", &rlen);
49698 + if (!li) {
49699 + printk(KERN_ERR "PCI: interrupts not found.\n");
49700 + goto error;
49701 + }
49702 val = li[0];
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 @@
49706
49707 int __init celleb_setup_phb(struct pci_controller *phb)
49708 {
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 *);
49713
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
49717 @@ -95,7 +95,7 @@
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");
49724 return;
49725 }
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
49729 @@ -47,7 +47,8 @@
49730 u32 val = 0;
49731 int i;
49732
49733 - if (!machine_is(celleb))
49734 + if (!machine_is(celleb_beat) &&
49735 + !machine_is(celleb_native))
49736 return;
49737
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
49742 @@ -40,6 +40,7 @@
49743 #include <linux/seq_file.h>
49744 #include <linux/root_dev.h>
49745 #include <linux/console.h>
49746 +#include <linux/of_platform.h>
49747
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>
49757
49758 #include "interrupt.h"
49759 #include "beat_wrapper.h"
49760 #include "beat.h"
49761 #include "pci.h"
49762 +#include "../cell/interrupt.h"
49763 +#include "../cell/pervasive.h"
49764 +#include "../cell/ras.h"
49765
49766 static char celleb_machine_type[128] = "Celleb";
49767
49768 @@ -88,61 +93,122 @@
49769 printk("*** %04x : %s\n", hex, s ? s : "");
49770 }
49771
49772 -static void __init celleb_setup_arch(void)
49773 +static void __init celleb_setup_arch_common(void)
49774 +{
49775 + /* init to some ~sane value until calibrate_delay() runs */
49776 + loops_per_jiffy = 50000000;
49777 +
49778 +#ifdef CONFIG_DUMMY_CONSOLE
49779 + conswitchp = &dummy_con;
49780 +#endif
49781 +}
49782 +
49783 +static struct of_device_id celleb_bus_ids[] __initdata = {
49784 + { .type = "scc", },
49785 + { .type = "ioif", }, /* old style */
49786 + {},
49787 +};
49788 +
49789 +static int __init celleb_publish_devices(void)
49790 +{
49791 + /* Publish OF platform devices for southbridge IOs */
49792 + of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
49793 +
49794 + celleb_pci_workaround_init();
49795 +
49796 + return 0;
49797 +}
49798 +machine_device_initcall(celleb_beat, celleb_publish_devices);
49799 +machine_device_initcall(celleb_native, celleb_publish_devices);
49800 +
49801 +
49802 +/*
49803 + * functions for Celleb-Beat
49804 + */
49805 +static void __init celleb_setup_arch_beat(void)
49806 {
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;
49812 #endif
49813
49814 #ifdef CONFIG_SMP
49815 smp_init_celleb();
49816 #endif
49817
49818 - /* init to some ~sane value until calibrate_delay() runs */
49819 - loops_per_jiffy = 50000000;
49820 -
49821 -#ifdef CONFIG_DUMMY_CONSOLE
49822 - conswitchp = &dummy_con;
49823 -#endif
49824 + celleb_setup_arch_common();
49825 }
49826
49827 -static int __init celleb_probe(void)
49828 +static int __init celleb_probe_beat(void)
49829 {
49830 unsigned long root = of_get_flat_dt_root();
49831
49832 if (!of_flat_dt_is_compatible(root, "Beat"))
49833 return 0;
49834
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();
49839 +
49840 return 1;
49841 }
49842
49843 -static struct of_device_id celleb_bus_ids[] __initdata = {
49844 - { .type = "scc", },
49845 - { .type = "ioif", }, /* old style */
49846 - {},
49847 -};
49848
49849 -static int __init celleb_publish_devices(void)
49850 +/*
49851 + * functions for Celleb-native
49852 + */
49853 +static void __init celleb_init_IRQ_native(void)
49854 {
49855 - if (!machine_is(celleb))
49856 - return 0;
49857 + iic_init_IRQ();
49858 + spider_init_IRQ();
49859 +}
49860
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)
49864 +{
49865 +#ifdef CONFIG_SPU_BASE
49866 + spu_priv1_ops = &spu_priv1_mmio_ops;
49867 + spu_management_ops = &spu_management_of_ops;
49868 +#endif
49869
49870 - celleb_pci_workaround_init();
49871 + cbe_regs_init();
49872
49873 - return 0;
49874 +#ifdef CONFIG_CBE_RAS
49875 + cbe_ras_init();
49876 +#endif
49877 +
49878 +#ifdef CONFIG_SMP
49879 + smp_init_cell();
49880 +#endif
49881 +
49882 + cbe_pervasive_init();
49883 +
49884 + /* XXX: nvram initialization should be added */
49885 +
49886 + celleb_setup_arch_common();
49887 +}
49888 +
49889 +static int __init celleb_probe_native(void)
49890 +{
49891 + unsigned long root = of_get_flat_dt_root();
49892 +
49893 + if (of_flat_dt_is_compatible(root, "Beat") ||
49894 + !of_flat_dt_is_compatible(root, "TOSHIBA,Celleb"))
49895 + return 0;
49896 +
49897 + powerpc_firmware_features |= FW_FEATURE_CELLEB_ALWAYS;
49898 + hpte_init_native();
49899 +
49900 + return 1;
49901 }
49902 -device_initcall(celleb_publish_devices);
49903
49904 -define_machine(celleb) {
49905 - .name = "Cell Reference Set",
49906 - .probe = celleb_probe,
49907 - .setup_arch = celleb_setup_arch,
49908 +
49909 +/*
49910 + * machine definitions
49911 + */
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,
49921 #endif
49922 };
49923 +
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,
49944 +#endif
49945 +};
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");
49952 }
49953 - pci_assign_all_buses = 1;
49954 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
49955 /* keep the reference to the root node */
49956 }
49957
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);
49963
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' */
49968 /* Memory banks */
49969 sdramen = (in_le32(gg2_pci_config_base + GG2_PCI_DRAM_CTRL)
49970 @@ -203,15 +203,20 @@
49971 static void __init sio_init(void)
49972 {
49973 struct device_node *root;
49974 + const char *model;
49975
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("/");
49980 + if (!root)
49981 + return;
49982 +
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);
49989 }
49990 +
49991 of_node_put(root);
49992 }
49993
49994 @@ -251,6 +256,57 @@
49995 for(;;);
49996 }
49997
49998 +/*
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.
50003 + */
50004 +static void chrp_init_early(void)
50005 +{
50006 + struct device_node *node;
50007 + const char *property;
50008 +
50009 + if (strstr(cmd_line, "console="))
50010 + return;
50011 + /* find the boot console from /chosen/stdout */
50012 + if (!of_chosen)
50013 + return;
50014 + node = of_find_node_by_path("/");
50015 + if (!node)
50016 + return;
50017 + property = of_get_property(node, "model", NULL);
50018 + if (!property)
50019 + goto out_put;
50020 + if (strcmp(property, "Pegasos2"))
50021 + goto out_put;
50022 + /* this is a Pegasos2 */
50023 + property = of_get_property(of_chosen, "linux,stdout-path", NULL);
50024 + if (!property)
50025 + goto out_put;
50026 + of_node_put(node);
50027 + node = of_find_node_by_path(property);
50028 + if (!node)
50029 + return;
50030 + property = of_get_property(node, "device_type", NULL);
50031 + if (!property)
50032 + goto out_put;
50033 + if (strcmp(property, "serial"))
50034 + goto out_put;
50035 + /*
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.
50039 + */
50040 + property = of_get_property(node, "name", NULL);
50041 + if (!property)
50042 + goto out_put;
50043 + if (!strcmp(property, "failsafe") || !strcmp(property, "serial"))
50044 + add_preferred_console("ttyS", 0, NULL);
50045 +out_put:
50046 + of_node_put(node);
50047 +}
50048 +
50049 void __init chrp_setup_arch(void)
50050 {
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
50063 @@ -9,6 +9,8 @@
50064 select FSL_SOC
50065 select PPC_UDBG_16550 if SERIAL_8250
50066 select DEFAULT_UIMAGE
50067 + select MPC10X_OPENPIC
50068 + select MPC10X_BRIDGE
50069 help
50070 Select LINKSTATION if configuring for one of PPC- (MPC8241)
50071 based NAS systems from Buffalo Technology. So far only
50072 @@ -16,6 +18,19 @@
50073 Linkstation-I HD-HLAN and HD-HGLAN versions, and PPC-based
50074 Terastation systems should be supported too.
50075
50076 +config STORCENTER
50077 + bool "IOMEGA StorCenter"
50078 + depends on EMBEDDED6xx
50079 + select MPIC
50080 + select FSL_SOC
50081 + select PPC_UDBG_16550 if SERIAL_8250
50082 + select WANT_DEVICE_TREE
50083 + select MPC10X_OPENPIC
50084 + select MPC10X_BRIDGE
50085 + help
50086 + Select STORCENTER if configuring for the iomega StorCenter
50087 + with an 8241 CPU in it.
50088 +
50089 config MPC7448HPC2
50090 bool "Freescale MPC7448HPC2(Taiga)"
50091 depends on EMBEDDED6xx
50092 @@ -23,6 +38,7 @@
50093 select DEFAULT_UIMAGE
50094 select PPC_UDBG_16550
50095 select WANT_DEVICE_TREE
50096 + select TSI108_BRIDGE
50097 help
50098 Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga)
50099 platform
50100 @@ -33,6 +49,7 @@
50101 select TSI108_BRIDGE
50102 select PPC_UDBG_16550
50103 select WANT_DEVICE_TREE
50104 + select TSI108_BRIDGE
50105 help
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 @@
50109
50110 config TSI108_BRIDGE
50111 bool
50112 - depends on MPC7448HPC2 || PPC_HOLLY
50113 select PCI
50114 select MPIC
50115 select MPIC_WEIRD
50116 - default y
50117
50118 config MPC10X_BRIDGE
50119 bool
50120 - depends on LINKSTATION
50121 select PPC_INDIRECT_PCI
50122 - default y
50123
50124 config MV64X60
50125 bool
50126 @@ -67,8 +80,6 @@
50127
50128 config MPC10X_OPENPIC
50129 bool
50130 - depends on LINKSTATION
50131 - default y
50132
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
50138 @@ -3,5 +3,6 @@
50139 #
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>
50159
50160 #include <asm/system.h>
50161 #include <asm/time.h>
50162 @@ -39,7 +39,6 @@
50163 #include <asm/tsi108_irq.h>
50164 #include <asm/tsi108_pci.h>
50165 #include <asm/mpic.h>
50166 -#include <asm/of_platform.h>
50167
50168 #undef DEBUG
50169
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
50173 @@ -53,8 +53,6 @@
50174
50175 #define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000
50176
50177 -extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
50178 -
50179 int mpc7448_hpc2_exclude_device(struct pci_controller *hose,
50180 u_char bus, u_char devfn)
50181 {
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
50185 @@ -0,0 +1,192 @@
50186 +/*
50187 + * Board setup routines for the storcenter
50188 + *
50189 + * Copyright 2007 (C) Oyvind Repvik (nail@nslu2-linux.org)
50190 + * Copyright 2007 Andy Wilcox, Jon Loeliger
50191 + *
50192 + * Based on linkstation.c by G. Liakhovetski
50193 + *
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.
50197 + */
50198 +
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>
50204 +
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>
50210 +
50211 +#include "mpc10x.h"
50212 +
50213 +
50214 +#ifdef CONFIG_MTD_PHYSMAP
50215 +static struct mtd_partition storcenter_physmap_partitions[] = {
50216 + {
50217 + .name = "kernel",
50218 + .offset = 0x000000,
50219 + .size = 0x170000,
50220 + },
50221 + {
50222 + .name = "rootfs",
50223 + .offset = 0x170000,
50224 + .size = 0x590000,
50225 + },
50226 + {
50227 + .name = "uboot",
50228 + .offset = 0x700000,
50229 + .size = 0x040000,
50230 + },
50231 + {
50232 + .name = "config",
50233 + .offset = 0x740000,
50234 + .size = 0x0c0000,
50235 + },
50236 +};
50237 +#endif
50238 +
50239 +
50240 +static __initdata struct of_device_id storcenter_of_bus[] = {
50241 + { .name = "soc", },
50242 + {},
50243 +};
50244 +
50245 +static int __init storcenter_device_probe(void)
50246 +{
50247 + of_platform_bus_probe(NULL, storcenter_of_bus, NULL);
50248 + return 0;
50249 +}
50250 +machine_device_initcall(storcenter, storcenter_device_probe);
50251 +
50252 +
50253 +static int __init storcenter_add_bridge(struct device_node *dev)
50254 +{
50255 +#ifdef CONFIG_PCI
50256 + int len;
50257 + struct pci_controller *hose;
50258 + const int *bus_range;
50259 +
50260 + printk("Adding PCI host bridge %s\n", dev->full_name);
50261 +
50262 + hose = pcibios_alloc_controller(dev);
50263 + if (hose == NULL)
50264 + return -ENOMEM;
50265 +
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;
50269 +
50270 + setup_indirect_pci(hose, MPC10X_MAPB_CNFG_ADDR, MPC10X_MAPB_CNFG_DATA, 0);
50271 +
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);
50275 +#endif
50276 +
50277 + return 0;
50278 +}
50279 +
50280 +static void __init storcenter_setup_arch(void)
50281 +{
50282 + struct device_node *np;
50283 +
50284 +#ifdef CONFIG_MTD_PHYSMAP
50285 + physmap_set_partitions(storcenter_physmap_partitions,
50286 + ARRAY_SIZE(storcenter_physmap_partitions));
50287 +#endif
50288 +
50289 + /* Lookup PCI host bridges */
50290 + for_each_compatible_node(np, "pci", "mpc10x-pci")
50291 + storcenter_add_bridge(np);
50292 +
50293 + printk(KERN_INFO "IOMEGA StorCenter\n");
50294 +}
50295 +
50296 +/*
50297 + * Interrupt setup and service. Interrrupts on the turbostation come
50298 + * from the four PCI slots plus onboard 8241 devices: I2C, DUART.
50299 + */
50300 +static void __init storcenter_init_IRQ(void)
50301 +{
50302 + struct mpic *mpic;
50303 + struct device_node *dnp;
50304 + const void *prop;
50305 + int size;
50306 + phys_addr_t paddr;
50307 +
50308 + dnp = of_find_node_by_type(NULL, "open-pic");
50309 + if (dnp == NULL)
50310 + return;
50311 +
50312 + prop = of_get_property(dnp, "reg", &size);
50313 + if (prop == NULL) {
50314 + of_node_put(dnp);
50315 + return;
50316 + }
50317 +
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 ");
50321 +
50322 + of_node_put(dnp);
50323 +
50324 + BUG_ON(mpic == NULL);
50325 +
50326 + /* PCI IRQs */
50327 + /*
50328 + * 2.6.12 patch:
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
50339 + */
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);
50347 +
50348 + mpic_init(mpic);
50349 +}
50350 +
50351 +static void storcenter_restart(char *cmd)
50352 +{
50353 + local_irq_disable();
50354 +
50355 + /* Set exception prefix high - to the firmware */
50356 + _nmask_and_or_msr(0, MSR_IP);
50357 +
50358 + /* Wait for reset to happen */
50359 + for (;;) ;
50360 +}
50361 +
50362 +static int __init storcenter_probe(void)
50363 +{
50364 + unsigned long root = of_get_flat_dt_root();
50365 +
50366 + return of_flat_dt_is_compatible(root, "storcenter");
50367 +}
50368 +
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,
50377 +};
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
50381 @@ -5,7 +5,7 @@
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);
50400 return it;
50401 + }
50402 }
50403 return NULL;
50404 }
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.
50411 */
50412 - synchronize_rcu();
50413 + synchronize_sched();
50414 return 0;
50415 }
50416 }
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
50420 @@ -1,5 +1,6 @@
50421 /*
50422 * Copyright (C) 2001 Allan Trautman, IBM Corporation
50423 + * Copyright (C) 2005,2007 Stephen Rothwell, IBM Corp
50424 *
50425 * iSeries specific routines for PCI.
50426 *
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
50430 */
50431 +
50432 +#undef DEBUG
50433 +
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>
50441
50442 +#include <asm/types.h>
50443 #include <asm/io.h>
50444 #include <asm/irq.h>
50445 #include <asm/prom.h>
50446 @@ -35,6 +41,7 @@
50447 #include <asm/abs_addr.h>
50448 #include <asm/firmware.h>
50449
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>
50454 @@ -45,15 +52,8 @@
50455 #include "pci.h"
50456 #include "call_pci.h"
50457
50458 -/*
50459 - * Forward declares of prototypes.
50460 - */
50461 -static struct device_node *find_Device_Node(int bus, int devfn);
50462 -
50463 -static int Pci_Retry_Max = 3; /* Only retry 3 times */
50464 -static int Pci_Error_Flag = 1; /* Set Retry Error on. */
50465 -
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. */
50469
50470 /*
50471 * Table defines
50472 @@ -62,6 +62,7 @@
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
50477
50478 static unsigned long max_io_memory = BASE_IO_MEMORY;
50479 static long current_iomm_table_entry;
50480 @@ -70,12 +71,237 @@
50481 * Lookup Tables.
50482 */
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];
50486
50487 -static const char pci_io_text[] = "iSeries PCI I/O";
50488 static DEFINE_SPINLOCK(iomm_table_lock);
50489
50490 /*
50491 + * Generate a Direct Select Address for the Hypervisor
50492 + */
50493 +static inline u64 iseries_ds_addr(struct device_node *node)
50494 +{
50495 + struct pci_dn *pdn = PCI_DN(node);
50496 + const u32 *sbp = of_get_property(node, "linux,subbus", NULL);
50497 +
50498 + return ((u64)pdn->busno << 48) + ((u64)(sbp ? *sbp : 0) << 40)
50499 + + ((u64)0x10 << 32);
50500 +}
50501 +
50502 +/*
50503 + * Size of Bus VPD data
50504 + */
50505 +#define BUS_VPDSIZE 1024
50506 +
50507 +/*
50508 + * Bus Vpd Tags
50509 + */
50510 +#define VPD_END_OF_AREA 0x79
50511 +#define VPD_ID_STRING 0x82
50512 +#define VPD_VENDOR_AREA 0x84
50513 +
50514 +/*
50515 + * Mfg Area Tags
50516 + */
50517 +#define VPD_FRU_FRAME_ID 0x4649 /* "FI" */
50518 +#define VPD_SLOT_MAP_FORMAT 0x4D46 /* "MF" */
50519 +#define VPD_SLOT_MAP 0x534D /* "SM" */
50520 +
50521 +/*
50522 + * Structures of the areas
50523 + */
50524 +struct mfg_vpd_area {
50525 + u16 tag;
50526 + u8 length;
50527 + u8 data1;
50528 + u8 data2;
50529 +};
50530 +#define MFG_ENTRY_SIZE 3
50531 +
50532 +struct slot_map {
50533 + u8 agent;
50534 + u8 secondary_agent;
50535 + u8 phb;
50536 + char card_location[3];
50537 + char parms[8];
50538 + char reserved[2];
50539 +};
50540 +#define SLOT_ENTRY_SIZE 16
50541 +
50542 +/*
50543 + * Parse the Slot Area
50544 + */
50545 +static void __init iseries_parse_slot_area(struct slot_map *map, int len,
50546 + HvAgentId agent, u8 *phb, char card[4])
50547 +{
50548 + /*
50549 + * Parse Slot label until we find the one requested
50550 + */
50551 + while (len > 0) {
50552 + if (map->agent == agent) {
50553 + /*
50554 + * If Phb wasn't found, grab the entry first one found.
50555 + */
50556 + if (*phb == 0xff)
50557 + *phb = map->phb;
50558 + /* Found it, extract the data. */
50559 + if (map->phb == *phb) {
50560 + memcpy(card, &map->card_location, 3);
50561 + card[3] = 0;
50562 + break;
50563 + }
50564 + }
50565 + /* Point to the next Slot */
50566 + map = (struct slot_map *)((char *)map + SLOT_ENTRY_SIZE);
50567 + len -= SLOT_ENTRY_SIZE;
50568 + }
50569 +}
50570 +
50571 +/*
50572 + * Parse the Mfg Area
50573 + */
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])
50576 +{
50577 + u16 slot_map_fmt = 0;
50578 +
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)
50588 + + area->data2;
50589 + /* Slot Map (SM 534D90 */
50590 + else if (area->tag == VPD_SLOT_MAP) {
50591 + struct slot_map *slot_map;
50592 +
50593 + if (slot_map_fmt == 0x1004)
50594 + slot_map = (struct slot_map *)((char *)area
50595 + + MFG_ENTRY_SIZE + 1);
50596 + else
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);
50601 + }
50602 + /*
50603 + * Point to the next Mfg Area
50604 + * Use defined size, sizeof give wrong answer
50605 + */
50606 + area = (struct mfg_vpd_area *)((char *)area + mfg_tag_len
50607 + + MFG_ENTRY_SIZE);
50608 + len -= (mfg_tag_len + MFG_ENTRY_SIZE);
50609 + }
50610 +}
50611 +
50612 +/*
50613 + * Look for "BUS".. Data is not Null terminated.
50614 + * PHBID of 0xFF indicates PHB was not found in VPD Data.
50615 + */
50616 +static u8 __init iseries_parse_phbid(u8 *area, int len)
50617 +{
50618 + while (len > 0) {
50619 + if ((*area == 'B') && (*(area + 1) == 'U')
50620 + && (*(area + 2) == 'S')) {
50621 + area += 3;
50622 + while (*area == ' ')
50623 + area++;
50624 + return *area & 0x0F;
50625 + }
50626 + area++;
50627 + len--;
50628 + }
50629 + return 0xff;
50630 +}
50631 +
50632 +/*
50633 + * Parse out the VPD Areas
50634 + */
50635 +static void __init iseries_parse_vpd(u8 *data, int data_len,
50636 + HvAgentId agent, u8 *frame, char card[4])
50637 +{
50638 + u8 phb = 0xff;
50639 +
50640 + while (data_len > 0) {
50641 + int len;
50642 + u8 tag = *data;
50643 +
50644 + if (tag == VPD_END_OF_AREA)
50645 + break;
50646 + len = *(data + 1) + (*(data + 2) * 256);
50647 + data += 3;
50648 + data_len -= 3;
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. */
50655 + data += len;
50656 + data_len -= len;
50657 + }
50658 +}
50659 +
50660 +static int __init iseries_get_location_code(u16 bus, HvAgentId agent,
50661 + u8 *frame, char card[4])
50662 +{
50663 + int status = 0;
50664 + int bus_vpd_len = 0;
50665 + u8 *bus_vpd = kmalloc(BUS_VPDSIZE, GFP_KERNEL);
50666 +
50667 + if (bus_vpd == NULL) {
50668 + printk("PCI: Bus VPD Buffer allocation failure.\n");
50669 + return 0;
50670 + }
50671 + bus_vpd_len = HvCallPci_getBusVpd(bus, iseries_hv_addr(bus_vpd),
50672 + BUS_VPDSIZE);
50673 + if (bus_vpd_len == 0) {
50674 + printk("PCI: Bus VPD Buffer zero length.\n");
50675 + goto out_free;
50676 + }
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");
50681 + goto out_free;
50682 + }
50683 + iseries_parse_vpd(bus_vpd, bus_vpd_len, agent, frame, card);
50684 + status = 1;
50685 +out_free:
50686 + kfree(bus_vpd);
50687 + return status;
50688 +}
50689 +
50690 +/*
50691 + * Prints the device information.
50692 + * - Pass in pci_dev* pointer to the device.
50693 + * - Pass in the device count
50694 + *
50695 + * Format:
50696 + * PCI: Bus 0, Device 26, Vendor 0x12AE Frame 1, Card C10 Ethernet
50697 + * controller
50698 + */
50699 +static void __init iseries_device_information(struct pci_dev *pdev,
50700 + u16 bus, HvSubBusNumber subbus)
50701 +{
50702 + u8 frame = 0;
50703 + char card[4];
50704 + HvAgentId agent;
50705 +
50706 + agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus),
50707 + ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus));
50708 +
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));
50713 + }
50714 +}
50715 +
50716 +/*
50717 * iomm_table_allocate_entry
50718 *
50719 * Adds pci_dev entry in address translation table
50720 @@ -87,7 +313,7 @@
50721 * - CurrentIndex is incremented to keep track of the last entry.
50722 * - Builds the resource entry for allocated BARs.
50723 */
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)
50726 {
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.
50731 */
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 @@
50738 */
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;
50746 }
50747 @@ -130,7 +356,7 @@
50748 * - Loops through The Bar resources(0 - 5) including the ROM
50749 * is resource(6).
50750 */
50751 -static void allocate_device_bars(struct pci_dev *dev)
50752 +static void __init allocate_device_bars(struct pci_dev *dev)
50753 {
50754 int bar_num;
50755
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
50759 */
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)
50764 {
50765 - if (HvRc == 0x0302)
50766 + if (hv_res == 0x0302)
50767 return;
50768 printk(KERN_ERR "PCI: %s Failed: 0x%02X.%02X.%02X Rc: 0x%04X",
50769 - Error_Text, Bus, SubBus, AgentId, HvRc);
50770 -}
50771 -
50772 -/*
50773 - * iSeries_pci_final_fixup(void)
50774 - */
50775 -void __init iSeries_pci_final_fixup(void)
50776 -{
50777 - struct pci_dev *pdev = NULL;
50778 - struct device_node *node;
50779 - int DeviceCount = 0;
50780 -
50781 - /* Fix up at the device node and pci_dev relationship */
50782 - mf_display_src(0xC9000100);
50783 -
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);
50789 -
50790 - if (node != NULL) {
50791 - struct pci_dn *pdn = PCI_DN(node);
50792 - const u32 *agent;
50793 -
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,
50797 - pdn->bussubno);
50798 - int err;
50799 -
50800 - err = HvCallXm_connectBusUnit(pdn->busno, pdn->bussubno,
50801 - *agent, irq);
50802 - if (err)
50803 - pci_Log_Error("Connect Bus Unit",
50804 - pdn->busno, pdn->bussubno, *agent, err);
50805 - else {
50806 - err = HvCallPci_configStore8(pdn->busno, pdn->bussubno,
50807 - *agent,
50808 - PCI_INTERRUPT_LINE,
50809 - irq);
50810 - if (err)
50811 - pci_Log_Error("PciCfgStore Irq Failed!",
50812 - pdn->busno, pdn->bussubno, *agent, err);
50813 - }
50814 - if (!err)
50815 - pdev->irq = irq;
50816 - }
50817 -
50818 - ++DeviceCount;
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);
50824 - } else
50825 - printk("PCI: Device Tree not found for 0x%016lX\n",
50826 - (unsigned long)pdev);
50827 - }
50828 - iSeries_activate_IRQs();
50829 - mf_display_src(0xC9000200);
50830 + error, bus, subbus, agent, hv_res);
50831 }
50832
50833 /*
50834 * Look down the chain to find the matching Device Device
50835 */
50836 -static struct device_node *find_Device_Node(int bus, int devfn)
50837 +static struct device_node *find_device_node(int bus, int devfn)
50838 {
50839 struct device_node *node;
50840
50841 @@ -230,22 +396,66 @@
50842 return NULL;
50843 }
50844
50845 -#if 0
50846 /*
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
50851 + *
50852 + * Fixes up all resources for devices
50853 */
50854 -static struct device_node *get_Device_Node(struct pci_dev *pdev)
50855 +void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev)
50856 {
50857 + const u32 *agent;
50858 + const u32 *sub_bus;
50859 + unsigned char bus = pdev->bus->number;
50860 struct device_node *node;
50861 + int i;
50862 +
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);
50866 + if (!node) {
50867 + printk("PCI: %s disabled, device tree entry not found !\n",
50868 + pci_name(pdev));
50869 + for (i = 0; i <= PCI_ROM_RESOURCE; i++)
50870 + pdev->resource[i].flags = 0;
50871 + return;
50872 + }
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);
50877 + int err;
50878 +
50879 + err = HvCallXm_connectBusUnit(bus, *sub_bus, *agent, irq);
50880 + if (err)
50881 + pci_log_error("Connect Bus Unit",
50882 + bus, *sub_bus, *agent, err);
50883 + else {
50884 + err = HvCallPci_configStore8(bus, *sub_bus,
50885 + *agent, PCI_INTERRUPT_LINE, irq);
50886 + if (err)
50887 + pci_log_error("PciCfgStore Irq Failed!",
50888 + bus, *sub_bus, *agent, err);
50889 + else
50890 + pdev->irq = irq;
50891 + }
50892 + }
50893
50894 - node = pdev->sysdata;
50895 - if (node == NULL || PCI_DN(node)->pcidev != pdev)
50896 - node = find_Device_Node(pdev->bus->number, pdev->devfn);
50897 - return node;
50898 + pdev->sysdata = node;
50899 + allocate_device_bars(pdev);
50900 + iseries_device_information(pdev, bus, *sub_bus);
50901 + iommu_devnode_init_iSeries(pdev, node);
50902 +}
50903 +
50904 +/*
50905 + * iSeries_pci_final_fixup(void)
50906 + */
50907 +void __init iSeries_pci_final_fixup(void)
50908 +{
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);
50913 }
50914 -#endif
50915
50916 /*
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)
50921 {
50922 - struct device_node *node = find_Device_Node(bus->number, devfn);
50923 + struct device_node *node = find_device_node(bus->number, devfn);
50924 u64 fn;
50925 struct HvCallPci_LoadReturn ret;
50926
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)
50930 {
50931 - struct device_node *node = find_Device_Node(bus->number, devfn);
50932 + struct device_node *node = find_device_node(bus->number, devfn);
50933 u64 fn;
50934 u64 ret;
50935
50936 @@ -331,22 +541,22 @@
50937 * PCI: Device 23.90 ReadL Retry( 1)
50938 * PCI: Device 23.90 ReadL Retry Successful(1)
50939 */
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)
50943 {
50944 if (ret != 0) {
50945 - struct pci_dn *pdn = PCI_DN(DevNode);
50946 + struct pci_dn *pdn = PCI_DN(dn);
50947
50948 (*retry)++;
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,
50952 *retry, (int)ret);
50953 /*
50954 * Bump the retry and check for retry count exceeded.
50955 * If, Exceeded, panic the system.
50956 */
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);
50962 panic_timeout = 0;
50963 panic("PCI: Hardware I/O Error, SRC B6000103, "
50964 @@ -363,28 +573,39 @@
50965 * the exposure of being device global.
50966 */
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)
50972 {
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;
50981
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;
50988 +
50989 + if ((jiffies - last_jiffies) > 60 * HZ) {
50990 + last_jiffies = jiffies;
50991 + num_printed = 0;
50992 + }
50993 + if (num_printed++ < 10)
50994 + printk(KERN_ERR
50995 + "iSeries_%s: invalid access at IO address %p\n",
50996 + func, addr);
50997 return NULL;
50998 - BaseIoAddr = OrigIoAddr - BASE_IO_MEMORY;
50999 - TableIndex = BaseIoAddr / IOMM_TABLE_ENTRY_SIZE;
51000 - DevNode = iomm_table[TableIndex];
51001 -
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;
51006 + }
51007 + base_addr = orig_addr - BASE_IO_MEMORY;
51008 + ind = base_addr / IOMM_TABLE_ENTRY_SIZE;
51009 + dn = iomm_table[ind];
51010 +
51011 + if (dn != NULL) {
51012 + *dsaptr = ds_addr_table[ind];
51013 + *bar_offset = base_addr % IOMM_TABLE_ENTRY_SIZE;
51014 } else
51015 - panic("PCI: Invalid PCI IoAddress detected!\n");
51016 - return DevNode;
51017 + panic("PCI: Invalid PCI IO address detected!\n");
51018 + return dn;
51019 }
51020
51021 /*
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.
51025 */
51026 -static u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress)
51027 +static u8 iseries_readb(const volatile void __iomem *addr)
51028 {
51029 - u64 BarOffset;
51030 + u64 bar_offset;
51031 u64 dsa;
51032 int retry = 0;
51033 struct HvCallPci_LoadReturn ret;
51034 - struct device_node *DevNode =
51035 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
51036 -
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");
51042
51043 - if ((jiffies - last_jiffies) > 60 * HZ) {
51044 - last_jiffies = jiffies;
51045 - num_printed = 0;
51046 - }
51047 - if (num_printed++ < 10)
51048 - printk(KERN_ERR "iSeries_Read_Byte: invalid access at IO address %p\n",
51049 - IoAddress);
51050 + if (dn == NULL)
51051 return 0xff;
51052 - }
51053 do {
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);
51058
51059 return ret.value;
51060 }
51061
51062 -static u16 iSeries_Read_Word(const volatile void __iomem *IoAddress)
51063 +static u16 iseries_readw_be(const volatile void __iomem *addr)
51064 {
51065 - u64 BarOffset;
51066 + u64 bar_offset;
51067 u64 dsa;
51068 int retry = 0;
51069 struct HvCallPci_LoadReturn ret;
51070 - struct device_node *DevNode =
51071 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
51072 -
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");
51078
51079 - if ((jiffies - last_jiffies) > 60 * HZ) {
51080 - last_jiffies = jiffies;
51081 - num_printed = 0;
51082 - }
51083 - if (num_printed++ < 10)
51084 - printk(KERN_ERR "iSeries_Read_Word: invalid access at IO address %p\n",
51085 - IoAddress);
51086 + if (dn == NULL)
51087 return 0xffff;
51088 - }
51089 do {
51090 HvCall3Ret16(HvCallPciBarLoad16, &ret, dsa,
51091 - BarOffset, 0);
51092 - } while (CheckReturnCode("RDW", DevNode, &retry, ret.rc) != 0);
51093 + bar_offset, 0);
51094 + } while (check_return_code("RDW", dn, &retry, ret.rc) != 0);
51095
51096 return ret.value;
51097 }
51098
51099 -static u32 iSeries_Read_Long(const volatile void __iomem *IoAddress)
51100 +static u32 iseries_readl_be(const volatile void __iomem *addr)
51101 {
51102 - u64 BarOffset;
51103 + u64 bar_offset;
51104 u64 dsa;
51105 int retry = 0;
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");
51111
51112 - if (DevNode == NULL) {
51113 - static unsigned long last_jiffies;
51114 - static int num_printed;
51115 -
51116 - if ((jiffies - last_jiffies) > 60 * HZ) {
51117 - last_jiffies = jiffies;
51118 - num_printed = 0;
51119 - }
51120 - if (num_printed++ < 10)
51121 - printk(KERN_ERR "iSeries_Read_Long: invalid access at IO address %p\n",
51122 - IoAddress);
51123 + if (dn == NULL)
51124 return 0xffffffff;
51125 - }
51126 do {
51127 HvCall3Ret16(HvCallPciBarLoad32, &ret, dsa,
51128 - BarOffset, 0);
51129 - } while (CheckReturnCode("RDL", DevNode, &retry, ret.rc) != 0);
51130 + bar_offset, 0);
51131 + } while (check_return_code("RDL", dn, &retry, ret.rc) != 0);
51132
51133 return ret.value;
51134 }
51135 @@ -485,134 +673,72 @@
51136 * Write MM I/O Instructions for the iSeries
51137 *
51138 */
51139 -static void iSeries_Write_Byte(u8 data, volatile void __iomem *IoAddress)
51140 +static void iseries_writeb(u8 data, volatile void __iomem *addr)
51141 {
51142 - u64 BarOffset;
51143 + u64 bar_offset;
51144 u64 dsa;
51145 int retry = 0;
51146 u64 rc;
51147 - struct device_node *DevNode =
51148 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
51149 -
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");
51155
51156 - if ((jiffies - last_jiffies) > 60 * HZ) {
51157 - last_jiffies = jiffies;
51158 - num_printed = 0;
51159 - }
51160 - if (num_printed++ < 10)
51161 - printk(KERN_ERR "iSeries_Write_Byte: invalid access at IO address %p\n", IoAddress);
51162 + if (dn == NULL)
51163 return;
51164 - }
51165 do {
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);
51170 }
51171
51172 -static void iSeries_Write_Word(u16 data, volatile void __iomem *IoAddress)
51173 +static void iseries_writew_be(u16 data, volatile void __iomem *addr)
51174 {
51175 - u64 BarOffset;
51176 + u64 bar_offset;
51177 u64 dsa;
51178 int retry = 0;
51179 u64 rc;
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");
51184
51185 - if (DevNode == NULL) {
51186 - static unsigned long last_jiffies;
51187 - static int num_printed;
51188 -
51189 - if ((jiffies - last_jiffies) > 60 * HZ) {
51190 - last_jiffies = jiffies;
51191 - num_printed = 0;
51192 - }
51193 - if (num_printed++ < 10)
51194 - printk(KERN_ERR "iSeries_Write_Word: invalid access at IO address %p\n",
51195 - IoAddress);
51196 + if (dn == NULL)
51197 return;
51198 - }
51199 do {
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);
51204 }
51205
51206 -static void iSeries_Write_Long(u32 data, volatile void __iomem *IoAddress)
51207 +static void iseries_writel_be(u32 data, volatile void __iomem *addr)
51208 {
51209 - u64 BarOffset;
51210 + u64 bar_offset;
51211 u64 dsa;
51212 int retry = 0;
51213 u64 rc;
51214 - struct device_node *DevNode =
51215 - xlate_iomm_address(IoAddress, &dsa, &BarOffset);
51216 -
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");
51222
51223 - if ((jiffies - last_jiffies) > 60 * HZ) {
51224 - last_jiffies = jiffies;
51225 - num_printed = 0;
51226 - }
51227 - if (num_printed++ < 10)
51228 - printk(KERN_ERR "iSeries_Write_Long: invalid access at IO address %p\n",
51229 - IoAddress);
51230 + if (dn == NULL)
51231 return;
51232 - }
51233 do {
51234 - rc = HvCall4(HvCallPciBarStore32, dsa, BarOffset, data, 0);
51235 - } while (CheckReturnCode("WWL", DevNode, &retry, rc) != 0);
51236 -}
51237 -
51238 -static u8 iseries_readb(const volatile void __iomem *addr)
51239 -{
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);
51243 }
51244
51245 static u16 iseries_readw(const volatile void __iomem *addr)
51246 {
51247 - return le16_to_cpu(iSeries_Read_Word(addr));
51248 + return le16_to_cpu(iseries_readw_be(addr));
51249 }
51250
51251 static u32 iseries_readl(const volatile void __iomem *addr)
51252 {
51253 - return le32_to_cpu(iSeries_Read_Long(addr));
51254 -}
51255 -
51256 -static u16 iseries_readw_be(const volatile void __iomem *addr)
51257 -{
51258 - return iSeries_Read_Word(addr);
51259 -}
51260 -
51261 -static u32 iseries_readl_be(const volatile void __iomem *addr)
51262 -{
51263 - return iSeries_Read_Long(addr);
51264 -}
51265 -
51266 -static void iseries_writeb(u8 data, volatile void __iomem *addr)
51267 -{
51268 - iSeries_Write_Byte(data, addr);
51269 + return le32_to_cpu(iseries_readl_be(addr));
51270 }
51271
51272 static void iseries_writew(u16 data, volatile void __iomem *addr)
51273 {
51274 - iSeries_Write_Word(cpu_to_le16(data), addr);
51275 + iseries_writew_be(cpu_to_le16(data), addr);
51276 }
51277
51278 static void iseries_writel(u32 data, volatile void __iomem *addr)
51279 {
51280 - iSeries_Write_Long(cpu_to_le32(data), addr);
51281 -}
51282 -
51283 -static void iseries_writew_be(u16 data, volatile void __iomem *addr)
51284 -{
51285 - iSeries_Write_Word(data, addr);
51286 -}
51287 -
51288 -static void iseries_writel_be(u32 data, volatile void __iomem *addr)
51289 -{
51290 - iSeries_Write_Long(data, addr);
51291 + iseries_writel(cpu_to_le32(data), addr);
51292 }
51293
51294 static void iseries_readsb(const volatile void __iomem *addr, void *buf,
51295 @@ -620,7 +746,7 @@
51296 {
51297 u8 *dst = buf;
51298 while(count-- > 0)
51299 - *(dst++) = iSeries_Read_Byte(addr);
51300 + *(dst++) = iseries_readb(addr);
51301 }
51302
51303 static void iseries_readsw(const volatile void __iomem *addr, void *buf,
51304 @@ -628,7 +754,7 @@
51305 {
51306 u16 *dst = buf;
51307 while(count-- > 0)
51308 - *(dst++) = iSeries_Read_Word(addr);
51309 + *(dst++) = iseries_readw_be(addr);
51310 }
51311
51312 static void iseries_readsl(const volatile void __iomem *addr, void *buf,
51313 @@ -636,7 +762,7 @@
51314 {
51315 u32 *dst = buf;
51316 while(count-- > 0)
51317 - *(dst++) = iSeries_Read_Long(addr);
51318 + *(dst++) = iseries_readl_be(addr);
51319 }
51320
51321 static void iseries_writesb(volatile void __iomem *addr, const void *buf,
51322 @@ -644,7 +770,7 @@
51323 {
51324 const u8 *src = buf;
51325 while(count-- > 0)
51326 - iSeries_Write_Byte(*(src++), addr);
51327 + iseries_writeb(*(src++), addr);
51328 }
51329
51330 static void iseries_writesw(volatile void __iomem *addr, const void *buf,
51331 @@ -652,7 +778,7 @@
51332 {
51333 const u16 *src = buf;
51334 while(count-- > 0)
51335 - iSeries_Write_Word(*(src++), addr);
51336 + iseries_writew_be(*(src++), addr);
51337 }
51338
51339 static void iseries_writesl(volatile void __iomem *addr, const void *buf,
51340 @@ -660,7 +786,7 @@
51341 {
51342 const u32 *src = buf;
51343 while(count-- > 0)
51344 - iSeries_Write_Long(*(src++), addr);
51345 + iseries_writel_be(*(src++), addr);
51346 }
51347
51348 static void iseries_memset_io(volatile void __iomem *addr, int c,
51349 @@ -669,7 +795,7 @@
51350 volatile char __iomem *d = addr;
51351
51352 while (n-- > 0)
51353 - iSeries_Write_Byte(c, d++);
51354 + iseries_writeb(c, d++);
51355 }
51356
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;
51360
51361 while (n-- > 0)
51362 - *d++ = iSeries_Read_Byte(s++);
51363 + *d++ = iseries_readb(s++);
51364 }
51365
51366 static void iseries_memcpy_toio(volatile void __iomem *dest, const void *src,
51367 @@ -689,7 +815,7 @@
51368 volatile char __iomem *d = dest;
51369
51370 while (n-- > 0)
51371 - iSeries_Write_Byte(*s++, d++);
51372 + iseries_writeb(*s++, d++);
51373 }
51374
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;
51379
51380 + pci_probe_only = 1;
51381 +
51382 /* iSeries has no IO space in the common sense, it needs to set
51383 * the IO base to 0
51384 */
51385 @@ -767,11 +895,21 @@
51386 phb = pcibios_alloc_controller(node);
51387 if (phb == NULL)
51388 continue;
51389 + /* All legacy iSeries PHBs are in domain zero */
51390 + phb->global_number = 0;
51391
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";
51405 }
51406
51407 of_node_put(root);
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
51411 @@ -30,10 +30,6 @@
51412 * End Change Activity
51413 */
51414
51415 -#include <asm/pci-bridge.h>
51416 -
51417 -struct pci_dev; /* For Forward Reference */
51418 -
51419 /*
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)
51425
51426 -/*
51427 - * Generate a Direct Select Address for the Hypervisor
51428 - */
51429 -static inline u64 iseries_ds_addr(struct device_node *node)
51430 -{
51431 - struct pci_dn *pdn = PCI_DN(node);
51432 -
51433 - return ((u64)pdn->busno << 48) + ((u64)pdn->bussubno << 40)
51434 - + ((u64)0x10 << 32);
51435 -}
51436 +struct pci_dev;
51437
51438 -extern void iSeries_Device_Information(struct pci_dev*, int);
51439 +#ifdef CONFIG_PCI
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);
51443 +#else
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) {}
51447 +#endif
51448
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
51453 @@ -63,6 +63,7 @@
51454 #include "main_store.h"
51455 #include "call_sm.h"
51456 #include "call_hpt.h"
51457 +#include "pci.h"
51458
51459 #ifdef DEBUG
51460 #define DBG(fmt...) udbg_printf(fmt)
51461 @@ -74,11 +75,6 @@
51462 static unsigned long build_iSeries_Memory_Map(void);
51463 static void iseries_shared_idle(void);
51464 static void iseries_dedicated_idle(void);
51465 -#ifdef CONFIG_PCI
51466 -extern void iSeries_pci_final_fixup(void);
51467 -#else
51468 -static void iSeries_pci_final_fixup(void) { }
51469 -#endif
51470
51471
51472 struct MemoryBlock {
51473 @@ -112,13 +108,13 @@
51474 * correctly.
51475 */
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;
51482
51483 if (holeSize) {
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;
51499 }
51500 return numMemoryBlocks;
51501 }
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 @@
51515 };
51516 EXPORT_SYMBOL(mschunks_map);
51517
51518 -void mschunks_alloc(unsigned long num_chunks)
51519 +static void mschunks_alloc(unsigned long num_chunks)
51520 {
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);
51527 +
51528 + iSeries_pcibios_init();
51529 }
51530
51531 static void iSeries_show_cpuinfo(struct seq_file *m)
51532 @@ -641,24 +639,25 @@
51533 }
51534
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 */
51574 };
51575
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
51579 @@ -17,6 +17,7 @@
51580 #ifndef __ISERIES_SETUP_H__
51581 #define __ISERIES_SETUP_H__
51582
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
51590 @@ -1,275 +0,0 @@
51591 -/*
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
51595 - *
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.
51600 - *
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.
51605 - *
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
51611 - *
51612 - * Change Activity:
51613 - * Created, Feb 2, 2001
51614 - * Ported to ppc64, August 20, 2001
51615 - * End Change Activity
51616 - */
51617 -#include <linux/init.h>
51618 -#include <linux/module.h>
51619 -#include <linux/pci.h>
51620 -
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>
51626 -
51627 -#include "pci.h"
51628 -#include "call_pci.h"
51629 -
51630 -/*
51631 - * Size of Bus VPD data
51632 - */
51633 -#define BUS_VPDSIZE 1024
51634 -
51635 -/*
51636 - * Bus Vpd Tags
51637 - */
51638 -#define VpdEndOfAreaTag 0x79
51639 -#define VpdIdStringTag 0x82
51640 -#define VpdVendorAreaTag 0x84
51641 -
51642 -/*
51643 - * Mfg Area Tags
51644 - */
51645 -#define VpdFruFrameId 0x4649 // "FI"
51646 -#define VpdSlotMapFormat 0x4D46 // "MF"
51647 -#define VpdSlotMap 0x534D // "SM"
51648 -
51649 -/*
51650 - * Structures of the areas
51651 - */
51652 -struct MfgVpdAreaStruct {
51653 - u16 Tag;
51654 - u8 TagLength;
51655 - u8 AreaData1;
51656 - u8 AreaData2;
51657 -};
51658 -typedef struct MfgVpdAreaStruct MfgArea;
51659 -#define MFG_ENTRY_SIZE 3
51660 -
51661 -struct SlotMapStruct {
51662 - u8 AgentId;
51663 - u8 SecondaryAgentId;
51664 - u8 PhbId;
51665 - char CardLocation[3];
51666 - char Parms[8];
51667 - char Reserved[2];
51668 -};
51669 -typedef struct SlotMapStruct SlotMap;
51670 -#define SLOT_ENTRY_SIZE 16
51671 -
51672 -/*
51673 - * Parse the Slot Area
51674 - */
51675 -static void __init iSeries_Parse_SlotArea(SlotMap *MapPtr, int MapLen,
51676 - HvAgentId agent, u8 *PhbId, char card[4])
51677 -{
51678 - int SlotMapLen = MapLen;
51679 - SlotMap *SlotMapPtr = MapPtr;
51680 -
51681 - /*
51682 - * Parse Slot label until we find the one requested
51683 - */
51684 - while (SlotMapLen > 0) {
51685 - if (SlotMapPtr->AgentId == agent) {
51686 - /*
51687 - * If Phb wasn't found, grab the entry first one found.
51688 - */
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);
51694 - card[3] = 0;
51695 - break;
51696 - }
51697 - }
51698 - /* Point to the next Slot */
51699 - SlotMapPtr = (SlotMap *)((char *)SlotMapPtr + SLOT_ENTRY_SIZE);
51700 - SlotMapLen -= SLOT_ENTRY_SIZE;
51701 - }
51702 -}
51703 -
51704 -/*
51705 - * Parse the Mfg Area
51706 - */
51707 -static void __init iSeries_Parse_MfgArea(u8 *AreaData, int AreaLen,
51708 - HvAgentId agent, u8 *PhbId,
51709 - u8 *frame, char card[4])
51710 -{
51711 - MfgArea *MfgAreaPtr = (MfgArea *)AreaData;
51712 - int MfgAreaLen = AreaLen;
51713 - u16 SlotMapFmt = 0;
51714 -
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;
51728 -
51729 - if (SlotMapFmt == 0x1004)
51730 - SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr
51731 - + MFG_ENTRY_SIZE + 1);
51732 - else
51733 - SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr
51734 - + MFG_ENTRY_SIZE);
51735 - iSeries_Parse_SlotArea(SlotMapPtr, MfgTagLen,
51736 - agent, PhbId, card);
51737 - }
51738 - /*
51739 - * Point to the next Mfg Area
51740 - * Use defined size, sizeof give wrong answer
51741 - */
51742 - MfgAreaPtr = (MfgArea *)((char *)MfgAreaPtr + MfgTagLen
51743 - + MFG_ENTRY_SIZE);
51744 - MfgAreaLen -= (MfgTagLen + MFG_ENTRY_SIZE);
51745 - }
51746 -}
51747 -
51748 -/*
51749 - * Look for "BUS".. Data is not Null terminated.
51750 - * PHBID of 0xFF indicates PHB was not found in VPD Data.
51751 - */
51752 -static int __init iSeries_Parse_PhbId(u8 *AreaPtr, int AreaLength)
51753 -{
51754 - u8 *PhbPtr = AreaPtr;
51755 - int DataLen = AreaLength;
51756 - char PhbId = 0xFF;
51757 -
51758 - while (DataLen > 0) {
51759 - if ((*PhbPtr == 'B') && (*(PhbPtr + 1) == 'U')
51760 - && (*(PhbPtr + 2) == 'S')) {
51761 - PhbPtr += 3;
51762 - while (*PhbPtr == ' ')
51763 - ++PhbPtr;
51764 - PhbId = (*PhbPtr & 0x0F);
51765 - break;
51766 - }
51767 - ++PhbPtr;
51768 - --DataLen;
51769 - }
51770 - return PhbId;
51771 -}
51772 -
51773 -/*
51774 - * Parse out the VPD Areas
51775 - */
51776 -static void __init iSeries_Parse_Vpd(u8 *VpdData, int VpdDataLen,
51777 - HvAgentId agent, u8 *frame, char card[4])
51778 -{
51779 - u8 *TagPtr = VpdData;
51780 - int DataLen = VpdDataLen - 3;
51781 - u8 PhbId = 0xff;
51782 -
51783 - while ((*TagPtr != VpdEndOfAreaTag) && (DataLen > 0)) {
51784 - int AreaLen = *(TagPtr + 1) + (*(TagPtr + 2) * 256);
51785 - u8 *AreaData = TagPtr + 3;
51786 -
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;
51795 - }
51796 -}
51797 -
51798 -static int __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent,
51799 - u8 *frame, char card[4])
51800 -{
51801 - int status = 0;
51802 - int BusVpdLen = 0;
51803 - u8 *BusVpdPtr = kmalloc(BUS_VPDSIZE, GFP_KERNEL);
51804 -
51805 - if (BusVpdPtr == NULL) {
51806 - printk("PCI: Bus VPD Buffer allocation failure.\n");
51807 - return 0;
51808 - }
51809 - BusVpdLen = HvCallPci_getBusVpd(bus, iseries_hv_addr(BusVpdPtr),
51810 - BUS_VPDSIZE);
51811 - if (BusVpdLen == 0) {
51812 - printk("PCI: Bus VPD Buffer zero length.\n");
51813 - goto out_free;
51814 - }
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");
51819 - goto out_free;
51820 - }
51821 - iSeries_Parse_Vpd(BusVpdPtr, BusVpdLen, agent, frame, card);
51822 - status = 1;
51823 -out_free:
51824 - kfree(BusVpdPtr);
51825 - return status;
51826 -}
51827 -
51828 -/*
51829 - * Prints the device information.
51830 - * - Pass in pci_dev* pointer to the device.
51831 - * - Pass in the device count
51832 - *
51833 - * Format:
51834 - * PCI: Bus 0, Device 26, Vendor 0x12AE Frame 1, Card C10 Ethernet
51835 - * controller
51836 - */
51837 -void __init iSeries_Device_Information(struct pci_dev *PciDev, int count)
51838 -{
51839 - struct device_node *DevNode = PciDev->sysdata;
51840 - struct pci_dn *pdn;
51841 - u16 bus;
51842 - u8 frame = 0;
51843 - char card[4];
51844 - HvSubBusNumber subbus;
51845 - HvAgentId agent;
51846 -
51847 - if (DevNode == NULL) {
51848 - printk("%d. PCI: iSeries_Device_Information DevNode is NULL\n",
51849 - count);
51850 - return;
51851 - }
51852 -
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));
51858 -
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));
51864 - }
51865 -}
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
51869 @@ -1,6 +1,7 @@
51870 config PPC_MAPLE
51871 depends on PPC_MULTIPLATFORM && PPC64
51872 bool "Maple 970FX Evaluation Board"
51873 + select PCI
51874 select MPIC
51875 select U3_DART
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.
51882 */
51883 if (u3_agp) {
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
51892 @@ -42,6 +42,7 @@
51893 #include <linux/serial.h>
51894 #include <linux/smp.h>
51895 #include <linux/bitops.h>
51896 +#include <linux/of_device.h>
51897
51898 #include <asm/processor.h>
51899 #include <asm/sections.h>
51900 @@ -56,7 +57,6 @@
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
51911 @@ -3,6 +3,7 @@
51912 bool "PA Semi SoC-based platforms"
51913 default n
51914 select MPIC
51915 + select PCI
51916 select PPC_UDBG_16550
51917 select PPC_NATIVE
51918 select MPIC_BROKEN_REGREAD
51919 @@ -17,7 +18,7 @@
51920 bool "PA Semi IOMMU support"
51921 depends on PPC_PASEMI
51922 help
51923 - IOMMU support for PA6T-1682M
51924 + IOMMU support for PA Semi PWRficient
51925
51926 config PPC_PASEMI_IOMMU_DMA_FORCE
51927 bool "Force DMA engine to use IOMMU"
51928 @@ -36,13 +37,4 @@
51929 help
51930 Driver for MDIO via GPIO on PWRficient platforms
51931
51932 -config ELECTRA_IDE
51933 - tristate "Electra IDE driver"
51934 - default y
51935 - depends on PPC_PASEMI && ATA
51936 - select PATA_PLATFORM
51937 - help
51938 - This includes driver support for the Electra on-board IDE
51939 - interface.
51940 -
51941 endmenu
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
51945 @@ -1,4 +1,3 @@
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
51953 @@ -32,6 +32,7 @@
51954 #include <asm/io.h>
51955 #include <asm/prom.h>
51956 #include <asm/time.h>
51957 +#include <asm/smp.h>
51958
51959 #define SDCASR_REG 0x0100
51960 #define SDCASR_REG_STRIDE 0x1000
51961 @@ -124,6 +125,11 @@
51962 local_irq_restore(flags);
51963 }
51964
51965 +int check_astate(void)
51966 +{
51967 + return get_cur_astate(hard_smp_processor_id());
51968 +}
51969 +
51970 void restore_astate(int cpu)
51971 {
51972 set_astate(cpu, current_astate);
51973 @@ -147,7 +153,10 @@
51974 if (!cpu)
51975 goto out;
51976
51977 - dn = of_find_compatible_node(NULL, "sdc", "1682m-sdc");
51978 + dn = of_find_compatible_node(NULL, NULL, "1682m-sdc");
51979 + if (!dn)
51980 + dn = of_find_compatible_node(NULL, NULL,
51981 + "pasemi,pwrficient-sdc");
51982 if (!dn)
51983 goto out;
51984 err = of_address_to_resource(dn, 0, &res);
51985 @@ -160,7 +169,10 @@
51986 goto out;
51987 }
51988
51989 - dn = of_find_compatible_node(NULL, "gizmo", "1682m-gizmo");
51990 + dn = of_find_compatible_node(NULL, NULL, "1682m-gizmo");
51991 + if (!dn)
51992 + dn = of_find_compatible_node(NULL, NULL,
51993 + "pasemi,pwrficient-gizmo");
51994 if (!dn) {
51995 err = -ENODEV;
51996 goto out_unmap_sdcasr;
51997 @@ -292,7 +304,8 @@
51998
51999 static int __init pas_cpufreq_init(void)
52000 {
52001 - if (!machine_is_compatible("PA6T-1682M"))
52002 + if (!machine_is_compatible("PA6T-1682M") &&
52003 + !machine_is_compatible("pasemi,pwrficient"))
52004 return -ENODEV;
52005
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
52010 @@ -1,96 +0,0 @@
52011 -/*
52012 - * Copyright (C) 2007 PA Semi, Inc
52013 - *
52014 - * Maintained by: Olof Johansson <olof@lixom.net>
52015 - *
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.
52019 - *
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.
52024 - *
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
52028 - */
52029 -
52030 -#include <linux/platform_device.h>
52031 -
52032 -#include <asm/prom.h>
52033 -#include <asm/system.h>
52034 -
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.
52039 - */
52040 -
52041 -#define MAX_IFS 4 /* really, we have only one */
52042 -
52043 -static struct platform_device *pdevs[MAX_IFS];
52044 -
52045 -static int __devinit electra_ide_init(void)
52046 -{
52047 - struct device_node *np;
52048 - struct resource r[3];
52049 - int ret = 0;
52050 - int i;
52051 -
52052 - np = of_find_compatible_node(NULL, "ide", "electra-ide");
52053 - i = 0;
52054 -
52055 - while (np && i < MAX_IFS) {
52056 - memset(r, 0, sizeof(r));
52057 -
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:
52062 - */
52063 -
52064 - ret = of_address_to_resource(np, 0, &r[0]);
52065 - if (ret)
52066 - goto out;
52067 - ret = of_address_to_resource(np, 0, &r[1]);
52068 - if (ret)
52069 - goto out;
52070 -
52071 - r[1].start += 0x3f6;
52072 - r[0].end = r[1].start-1;
52073 -
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;
52077 -
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]);
52083 - pdevs[i] = NULL;
52084 - goto out;
52085 - }
52086 - np = of_find_compatible_node(np, "ide", "electra-ide");
52087 - }
52088 -out:
52089 - return ret;
52090 -}
52091 -module_init(electra_ide_init);
52092 -
52093 -static void __devexit electra_ide_exit(void)
52094 -{
52095 - int i;
52096 -
52097 - for (i = 0; i < MAX_IFS; i++)
52098 - if (pdevs[i])
52099 - platform_device_unregister(pdevs[i]);
52100 -}
52101 -module_exit(electra_ide_exit);
52102 -
52103 -
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
52110 @@ -30,7 +30,7 @@
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>
52116
52117 #define DELAY 1
52118
52119 @@ -218,45 +218,27 @@
52120 const struct of_device_id *match)
52121 {
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;
52130 - int err = 0;
52131 + int err;
52132 int i;
52133
52134 - gpio_np = of_find_compatible_node(NULL, "gpio", "1682m-gpio");
52135 -
52136 - if (!gpio_np)
52137 - return -ENODEV;
52138 -
52139 - err = of_address_to_resource(gpio_np, 0, &res);
52140 - of_node_put(gpio_np);
52141 -
52142 - if (err)
52143 - return -EINVAL;
52144 -
52145 - if (!gpio_regs)
52146 - gpio_regs = ioremap(res.start, 0x100);
52147 -
52148 - if (!gpio_regs)
52149 - return -EPERM;
52150 -
52151 + err = -ENOMEM;
52152 priv = kzalloc(sizeof(struct gpio_priv), GFP_KERNEL);
52153 - if (priv == NULL)
52154 - return -ENOMEM;
52155 + if (!priv)
52156 + goto out;
52157
52158 new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
52159
52160 - if (new_bus == NULL)
52161 - return -ENOMEM;
52162 + if (!new_bus)
52163 + goto out_free_priv;
52164
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;
52173
52174 prop = of_get_property(np, "reg", NULL);
52175 new_bus->id = *prop;
52176 @@ -265,9 +247,24 @@
52177 new_bus->phy_mask = 0;
52178
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);
52182
52183 + if (!new_bus->irq)
52184 + goto out_free_bus;
52185 +
52186 + for (i = 0; i < PHY_MAX_ADDR; i++)
52187 + new_bus->irq[i] = NO_IRQ;
52188 +
52189 + for (phy_dn = of_get_next_child(np, NULL);
52190 + phy_dn != NULL;
52191 + phy_dn = of_get_next_child(np, phy_dn)) {
52192 + const unsigned int *ip, *regp;
52193 +
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)
52197 + continue;
52198 + new_bus->irq[*regp] = irq_create_mapping(NULL, *ip);
52199 + }
52200
52201 prop = of_get_property(np, "mdc-pin", NULL);
52202 priv->mdc_pin = *prop;
52203 @@ -280,17 +277,21 @@
52204
52205 err = mdiobus_register(new_bus);
52206
52207 - if (0 != err) {
52208 + if (err != 0) {
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;
52213 }
52214
52215 return 0;
52216
52217 -bus_register_fail:
52218 +out_free_irq:
52219 + kfree(new_bus->irq);
52220 +out_free_bus:
52221 kfree(new_bus);
52222 -
52223 +out_free_priv:
52224 + kfree(priv);
52225 +out:
52226 return err;
52227 }
52228
52229 @@ -317,6 +318,7 @@
52230 },
52231 {},
52232 };
52233 +MODULE_DEVICE_TABLE(of, gpio_mdio_match);
52234
52235 static struct of_platform_driver gpio_mdio_driver =
52236 {
52237 @@ -330,12 +332,32 @@
52238
52239 int gpio_mdio_init(void)
52240 {
52241 + struct device_node *np;
52242 +
52243 + np = of_find_compatible_node(NULL, NULL, "1682m-gpio");
52244 + if (!np)
52245 + np = of_find_compatible_node(NULL, NULL,
52246 + "pasemi,pwrficient-gpio");
52247 + if (!np)
52248 + return -ENODEV;
52249 + gpio_regs = of_iomap(np, 0);
52250 + of_node_put(np);
52251 +
52252 + if (!gpio_regs)
52253 + return -ENODEV;
52254 +
52255 return of_register_platform_driver(&gpio_mdio_driver);
52256 }
52257 +module_init(gpio_mdio_init);
52258
52259 void gpio_mdio_exit(void)
52260 {
52261 of_unregister_platform_driver(&gpio_mdio_driver);
52262 + if (gpio_regs)
52263 + iounmap(gpio_regs);
52264 }
52265 -device_initcall(gpio_mdio_init);
52266 +module_exit(gpio_mdio_exit);
52267
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
52274 @@ -74,9 +74,6 @@
52275
52276 static int __init pasemi_idle_init(void)
52277 {
52278 - if (!machine_is(pasemi))
52279 - return -ENODEV;
52280 -
52281 #ifndef CONFIG_PPC_PASEMI_CPUFREQ
52282 printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n");
52283 current_mode = 0;
52284 @@ -88,7 +85,7 @@
52285
52286 return 0;
52287 }
52288 -late_initcall(pasemi_idle_init);
52289 +machine_late_initcall(pasemi, pasemi_idle_init);
52290
52291 static int __init idle_param(char *p)
52292 {
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
52296 @@ -16,8 +16,14 @@
52297
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);
52302 #else
52303 +static inline int check_astate(void)
52304 +{
52305 + /* Always return >0 so we never power save */
52306 + return 1;
52307 +}
52308 static inline void restore_astate(int cpu)
52309 {
52310 }
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
52314 @@ -62,7 +62,16 @@
52315 mflr r0
52316 std r0, 16(r1)
52317 stdu r1,-64(r1)
52318 +#ifdef CONFIG_PPC_PASEMI_CPUFREQ
52319 + std r3, 48(r1)
52320
52321 + /* Only do power savings when in astate 0 */
52322 + bl .check_astate
52323 + cmpwi r3,0
52324 + bne 1f
52325 +
52326 + ld r3, 48(r1)
52327 +#endif
52328 LOAD_REG_IMMEDIATE(r6,MSR_DR|MSR_IR|MSR_ME|MSR_EE)
52329 mfmsr r4
52330 andc r5,r4,r6
52331 @@ -73,7 +82,7 @@
52332
52333 mtmsrd r4,0
52334
52335 - addi r1,r1,64
52336 +1: addi r1,r1,64
52337 ld r0,16(r1)
52338 mtlr r0
52339 blr
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
52343 @@ -27,6 +27,7 @@
52344 #include <linux/delay.h>
52345 #include <linux/console.h>
52346 #include <linux/pci.h>
52347 +#include <linux/of_platform.h>
52348
52349 #include <asm/prom.h>
52350 #include <asm/system.h>
52351 @@ -35,7 +36,7 @@
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>
52357
52358 #include <pcmcia/ss.h>
52359 #include <pcmcia/cistpl.h>
52360 @@ -43,6 +44,10 @@
52361
52362 #include "pasemi.h"
52363
52364 +#if !defined(CONFIG_SMP)
52365 +static void smp_send_stop(void) {}
52366 +#endif
52367 +
52368 /* SDC reset register, must be pre-mapped at reset time */
52369 static void __iomem *reset_reg;
52370
52371 @@ -56,10 +61,14 @@
52372
52373 static struct mce_regs mce_regs[MAX_MCE_REGS];
52374 static int num_mce_regs;
52375 +static int nmi_virq = NO_IRQ;
52376
52377
52378 static void pas_restart(char *cmd)
52379 {
52380 + /* Need to put others cpu in hold loop so they're not sleeping */
52381 + smp_send_stop();
52382 + udelay(10000);
52383 printk("Restarting...\n");
52384 while (1)
52385 out_le32(reset_reg, 0x6000000);
52386 @@ -126,9 +135,6 @@
52387 struct pci_dev *dev;
52388 int reg;
52389
52390 - if (!machine_is(pasemi))
52391 - return -ENODEV;
52392 -
52393 /* Remap various SoC status registers for use by the MCE handler */
52394
52395 reg = 0;
52396 @@ -172,7 +178,7 @@
52397
52398 return 0;
52399 }
52400 -device_initcall(pas_setup_mce_regs);
52401 +machine_device_initcall(pasemi, pas_setup_mce_regs);
52402
52403 static __init void pas_init_IRQ(void)
52404 {
52405 @@ -181,6 +187,8 @@
52406 unsigned long openpic_addr;
52407 const unsigned int *opprop;
52408 int naddr, opplen;
52409 + int mpic_flags;
52410 + const unsigned int *nmiprop;
52411 struct mpic *mpic;
52412
52413 mpic_node = NULL;
52414 @@ -213,13 +221,26 @@
52415 openpic_addr = of_read_number(opprop, naddr);
52416 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
52417
52418 + mpic_flags = MPIC_PRIMARY | MPIC_LARGE_VECTORS | MPIC_NO_BIAS;
52419 +
52420 + nmiprop = of_get_property(mpic_node, "nmi-source", NULL);
52421 + if (nmiprop)
52422 + mpic_flags |= MPIC_ENABLE_MCK;
52423 +
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");
52428 BUG_ON(!mpic);
52429
52430 mpic_assign_isu(mpic, 0, openpic_addr + 0x10000);
52431 mpic_init(mpic);
52432 + /* The NMI/MCK source needs to be prio 15 */
52433 + if (nmiprop) {
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);
52438 + }
52439 +
52440 of_node_put(mpic_node);
52441 of_node_put(root);
52442 }
52443 @@ -239,6 +260,14 @@
52444
52445 srr0 = regs->nip;
52446 srr1 = regs->msr;
52447 +
52448 + if (nmi_virq != NO_IRQ && mpic_get_mcirq() == nmi_virq) {
52449 + printk(KERN_ERR "NMI delivered\n");
52450 + debugger(regs);
52451 + mpic_end_irq(nmi_virq);
52452 + goto out;
52453 + }
52454 +
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 @@
52459 int i;
52460
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);
52467 }
52468 }
52469
52470 -
52471 +out:
52472 /* SRR1[62] is from MSR[62] if recoverable, so pass that back */
52473 return !!(srr1 & 0x2);
52474 }
52475 @@ -362,16 +391,17 @@
52476
52477
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", },
52485 {},
52486 };
52487
52488 static int __init pasemi_publish_devices(void)
52489 {
52490 - if (!machine_is(pasemi))
52491 - return 0;
52492 -
52493 pasemi_pcmcia_init();
52494
52495 /* Publish OF platform devices for SDC and other non-PCI devices */
52496 @@ -379,7 +409,7 @@
52497
52498 return 0;
52499 }
52500 -device_initcall(pasemi_publish_devices);
52501 +machine_device_initcall(pasemi, pasemi_publish_devices);
52502
52503
52504 /*
52505 @@ -389,7 +419,8 @@
52506 {
52507 unsigned long root = of_get_flat_dt_root();
52508
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"))
52512 return 0;
52513
52514 hpte_init_native();
52515 @@ -400,7 +431,7 @@
52516 }
52517
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;
52529
52530 /* Probe keywest-i2c busses */
52531 - for (np = NULL;
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;
52536
52537 @@ -1462,9 +1461,6 @@
52538 return 0;
52539 i2c_inited = 1;
52540
52541 - if (!machine_is(powermac))
52542 - return 0;
52543 -
52544 /* Probe keywest-i2c busses */
52545 kw_i2c_probe();
52546
52547 @@ -1483,7 +1479,7 @@
52548
52549 return 0;
52550 }
52551 -arch_initcall(pmac_i2c_init);
52552 +machine_arch_initcall(powermac, pmac_i2c_init);
52553
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 @@
52557
52558 return 0;
52559 }
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
52565 @@ -40,8 +40,6 @@
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;
52571 #else
52572 static int has_second_ohare;
52573 #endif /* CONFIG_PPC64 */
52574 @@ -314,12 +312,15 @@
52575
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.
52581 */
52582 if (bus->self)
52583 busdn = pci_device_to_OF_node(bus->self);
52584 + else if (devfn == 0)
52585 + return 0;
52586 else
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)
52591 break;
52592 @@ -344,14 +345,15 @@
52593 + (((unsigned int)bus) << 16) \
52594 + 0x01000000UL)
52595
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)
52600 {
52601 + *swap = 1;
52602 if (bus == hose->first_busno) {
52603 - /* For now, we don't self probe U3 HT bridge */
52604 - if (PCI_SLOT(devfn) == 0)
52605 - return NULL;
52606 - return hose->cfg_data + U3_HT_CFA0(devfn, offset);
52607 + if (devfn != 0)
52608 + return hose->cfg_data + U3_HT_CFA0(devfn, offset);
52609 + *swap = 0;
52610 + return ((void __iomem *)hose->cfg_addr) + (offset << 2);
52611 } else
52612 return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset);
52613 }
52614 @@ -360,14 +362,15 @@
52615 int offset, int len, u32 *val)
52616 {
52617 struct pci_controller *hose;
52618 - volatile void __iomem *addr;
52619 + void __iomem *addr;
52620 + int swap;
52621
52622 hose = pci_bus_to_host(bus);
52623 if (hose == NULL)
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);
52629 if (!addr)
52630 return PCIBIOS_DEVICE_NOT_FOUND;
52631
52632 @@ -397,10 +400,10 @@
52633 *val = in_8(addr);
52634 break;
52635 case 2:
52636 - *val = in_le16(addr);
52637 + *val = swap ? in_le16(addr) : in_be16(addr);
52638 break;
52639 default:
52640 - *val = in_le32(addr);
52641 + *val = swap ? in_le32(addr) : in_be32(addr);
52642 break;
52643 }
52644 return PCIBIOS_SUCCESSFUL;
52645 @@ -410,14 +413,15 @@
52646 int offset, int len, u32 val)
52647 {
52648 struct pci_controller *hose;
52649 - volatile void __iomem *addr;
52650 + void __iomem *addr;
52651 + int swap;
52652
52653 hose = pci_bus_to_host(bus);
52654 if (hose == NULL)
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);
52660 if (!addr)
52661 return PCIBIOS_DEVICE_NOT_FOUND;
52662
52663 @@ -439,10 +443,10 @@
52664 out_8(addr, val);
52665 break;
52666 case 2:
52667 - out_le16(addr, val);
52668 + swap ? out_le16(addr, val) : out_be16(addr, val);
52669 break;
52670 default:
52671 - out_le32((u32 __iomem *)addr, val);
52672 + swap ? out_le32(addr, val) : out_be32(addr, val);
52673 break;
52674 }
52675 return PCIBIOS_SUCCESSFUL;
52676 @@ -725,7 +729,7 @@
52677 static int __init setup_uninorth(struct pci_controller *hose,
52678 struct resource *addr)
52679 {
52680 - pci_assign_all_buses = 1;
52681 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
52682 has_uninorth = 1;
52683 hose->ops = &macrisc_pci_ops;
52684 hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000);
52685 @@ -773,31 +777,72 @@
52686 */
52687 hose->first_busno = 0x00;
52688 hose->last_busno = 0xff;
52689 - u4_pcie = hose;
52690 }
52691
52692 -static void __init setup_u3_ht(struct pci_controller* hose)
52693 +static void __init parse_region_decode(struct pci_controller *hose,
52694 + u32 decode)
52695 {
52696 - struct device_node *np = (struct device_node *)hose->arch_data;
52697 - struct pci_controller *other = NULL;
52698 - int i, cur;
52699 + unsigned long base, end, next = -1;
52700 + int i, cur = -1;
52701
52702 + /* Iterate through all bits. We ignore the last bit as this region is
52703 + * reserved for the ROM among other niceties
52704 + */
52705 + for (i = 0; i < 31; i++) {
52706 + if ((decode & (0x80000000 >> i)) == 0)
52707 + continue;
52708 + if (i < 16) {
52709 + base = 0xf0000000 | (((u32)i) << 24);
52710 + end = base + 0x00ffffff;
52711 + } else {
52712 + base = ((u32)i-16) << 28;
52713 + end = base + 0x0fffffff;
52714 + }
52715 + if (base != next) {
52716 + if (++cur >= 3) {
52717 + printk(KERN_WARNING "PCI: Too many ranges !\n");
52718 + break;
52719 + }
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);
52725 + } else {
52726 + DBG(" : -0x%08lx\n", end);
52727 + hose->mem_resources[cur].end = end;
52728 + }
52729 + next = end + 1;
52730 + }
52731 +}
52732 +
52733 +static void __init setup_u3_ht(struct pci_controller* hose)
52734 +{
52735 + struct device_node *np = hose->dn;
52736 + struct resource cfg_res, self_res;
52737 + u32 decode;
52738
52739 hose->ops = &u3_ht_pci_ops;
52740
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
52745 */
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");
52750 + return;
52751 + }
52752 +
52753 + /* Map external cfg space access into cfg_data and self registers
52754 + * into cfg_addr
52755 + */
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);
52759
52760 /*
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.
52770 */
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;
52781 -
52782 - u3_ht = hose;
52783 -
52784 - if (u3_agp != NULL)
52785 - other = u3_agp;
52786 - else if (u4_pcie != NULL)
52787 - other = u4_pcie;
52788
52789 - if (other == NULL) {
52790 - DBG("U3/4 has no AGP/PCIE, using full resource range\n");
52791 - return;
52792 - }
52793 + /* Note: fix offset when cfg_addr becomes a void * */
52794 + decode = in_be32(hose->cfg_addr + 0x80);
52795
52796 - /* Fixup bus range vs. PCIE */
52797 - if (u4_pcie)
52798 - hose->last_busno = u4_pcie->first_busno - 1;
52799 -
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
52804 - */
52805 - cur = 0;
52806 - for (i=0; i<3; i++) {
52807 - struct resource *res = &other->mem_resources[i];
52808 - if (res->flags != IORESOURCE_MEM)
52809 - continue;
52810 - /* We don't care about "fine" resources */
52811 - if (res->start >= 0xf0000000)
52812 - continue;
52813 - /* Check if it's just a matter of "shrinking" us in one
52814 - * direction
52815 - */
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,
52819 - res->end + 1);
52820 - hose->mem_resources[cur].start = res->end + 1;
52821 - continue;
52822 - }
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,
52826 - res->start - 1);
52827 - hose->mem_resources[cur].end = res->start - 1;
52828 - continue;
52829 - }
52830 - /* No, it's not the case, we need a hole */
52831 - if (cur == 2) {
52832 - /* not enough resources for a hole, we drop part
52833 - * of the range
52834 - */
52835 - printk(KERN_WARNING "Running out of resources"
52836 - " for /ht host !\n");
52837 - hose->mem_resources[cur].end = res->start - 1;
52838 - continue;
52839 - }
52840 - cur++;
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;
52848 - }
52849 + DBG("PCI: Apple HT bridge decode register: 0x%08x\n", decode);
52850 +
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.
52855 + *
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.
52859 + *
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).
52863 + *
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.
52867 + */
52868 + decode &= 0x003fffff;
52869 +
52870 + /* Now parse the resulting bits and build resources */
52871 + parse_region_decode(hose, decode);
52872 }
52873 #endif /* CONFIG_PPC64 */
52874
52875 @@ -994,6 +996,8 @@
52876 struct device_node *np, *root;
52877 struct device_node *ht = NULL;
52878
52879 + ppc_pci_flags = PPC_PCI_CAN_SKIP_ISA_ALIGN;
52880 +
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 @@
52885 * future though
52886 */
52887 if (u3_agp) {
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;
52893 }
52894 /* pmac_check_ht_link(); */
52895
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;
52900
52901 #else /* CONFIG_PPC64 */
52902 init_p2pbridge();
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
52906 */
52907 - if (pci_assign_all_buses)
52908 + if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS)
52909 pcibios_assign_bus_offset = 0x10;
52910 #endif
52911 }
52912
52913 -int
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)
52917 {
52918 struct device_node* node;
52919 int updatecfg = 0;
52920 @@ -1099,24 +1103,21 @@
52921 updatecfg = 1;
52922 }
52923
52924 + /*
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.
52929 + */
52930 if (updatecfg) {
52931 u16 cmd;
52932
52933 - /*
52934 - * Make sure PCI is correctly configured
52935 - *
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.
52939 - *
52940 - * Should be replaced by 2.4 new PCI mechanisms and really
52941 - * register the device.
52942 - */
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);
52948 +
52949 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
52950 L1_CACHE_BYTES >> 2);
52951 }
52952 @@ -1124,6 +1125,18 @@
52953 return 0;
52954 }
52955
52956 +void __devinit pmac_pci_fixup_ohci(struct pci_dev *dev)
52957 +{
52958 + struct device_node *node = pci_device_to_OF_node(dev);
52959 +
52960 + /* We don't want to assign resources to USB controllers
52961 + * absent from the OF tree (iBook second controller)
52962 + */
52963 + if (dev->class == PCI_CLASS_SERIAL_USB_OHCI && !node)
52964 + dev->resource[0].flags = 0;
52965 +}
52966 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, PCI_ANY_ID, pmac_pci_fixup_ohci);
52967 +
52968 /* We power down some devices after they have been probed. They'll
52969 * be powered back on later on
52970 */
52971 @@ -1171,7 +1184,6 @@
52972 of_node_put(nd);
52973 }
52974
52975 -#ifdef CONFIG_PPC32
52976 void pmac_pci_fixup_cardbus(struct pci_dev* dev)
52977 {
52978 if (!machine_is(powermac))
52979 @@ -1259,7 +1271,7 @@
52980 }
52981 }
52982 DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata);
52983 -#endif
52984 +#endif /* CONFIG_PPC32 */
52985
52986 /*
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 @@
52992
52993 return 0;
52994 }
52995 -
52996 -arch_initcall(pmac_pfunc_base_install);
52997 +machine_arch_initcall(powermac, pmac_pfunc_base_install);
52998
52999 #ifdef CONFIG_PM
53000
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);
53006 return 0;
53007 }
53008 -
53009 -subsys_initcall(init_pmacpic_sysfs);
53010 +machine_subsys_initcall(powermac, init_pmacpic_sysfs);
53011
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
53015 @@ -26,7 +26,7 @@
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);
53023
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
53027 @@ -51,6 +51,8 @@
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>
53033
53034 #include <asm/reg.h>
53035 #include <asm/sections.h>
53036 @@ -68,8 +70,6 @@
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>
53045 @@ -94,7 +94,6 @@
53046 #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
53047
53048 #ifdef CONFIG_PPC64
53049 -#include <asm/udbg.h>
53050 int sccdbg;
53051 #endif
53052
53053 @@ -398,17 +397,13 @@
53054
53055 static int pmac_late_init(void)
53056 {
53057 - if (!machine_is(powermac))
53058 - return -ENODEV;
53059 -
53060 initializing = 0;
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;
53064 return 0;
53065 }
53066 -
53067 -late_initcall(pmac_late_init);
53068 +machine_late_initcall(powermac, pmac_late_init);
53069
53070 /*
53071 * This is __init_refok because we check for "initializing" before
53072 @@ -535,9 +530,6 @@
53073 if (machine_is(chrp))
53074 return -1;
53075
53076 - if (!machine_is(powermac))
53077 - return 0;
53078 -
53079 np = of_find_node_by_name(NULL, "valkyrie");
53080 if (np)
53081 of_platform_device_create(np, "valkyrie", NULL);
53082 @@ -552,8 +544,7 @@
53083
53084 return 0;
53085 }
53086 -
53087 -device_initcall(pmac_declare_of_platform_devices);
53088 +machine_device_initcall(powermac, pmac_declare_of_platform_devices);
53089
53090 /*
53091 * Called very early, MMU is off, device-tree isn't unflattened
53092 @@ -613,9 +604,11 @@
53093
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.
53097 */
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;
53104 }
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 @@
53109 return delta;
53110 }
53111
53112 +#if defined(CONFIG_ADB_CUDA) || defined(CONFIG_ADB_PMU)
53113 static void to_rtc_time(unsigned long now, struct rtc_time *tm)
53114 {
53115 to_tm(now, tm);
53116 tm->tm_year -= 1900;
53117 tm->tm_mon -= 1;
53118 }
53119 +#endif
53120
53121 static unsigned long from_rtc_time(struct rtc_time *tm)
53122 {
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
53126 @@ -61,17 +61,6 @@
53127 This support is mainly for Linux kernel development. If unsure,
53128 say N.
53129
53130 -config PS3_USE_LPAR_ADDR
53131 - depends on PPC_PS3 && EXPERIMENTAL
53132 - bool "PS3 use lpar address space"
53133 - default y
53134 - help
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.
53138 -
53139 - If you have any doubt, choose the default y.
53140 -
53141 config PS3_VUART
53142 depends on PPC_PS3
53143 tristate
53144 @@ -138,4 +127,17 @@
53145 be disabled on the kernel command line using "ps3flash=off", to
53146 not allocate this fixed buffer.
53147
53148 +config PS3_LPM
53149 + tristate "PS3 Logical Performance Monitor support"
53150 + depends on PPC_PS3
53151 + help
53152 + Include support for the PS3 Logical Performance Monitor.
53153 +
53154 + This support is required to use the logical performance monitor
53155 + of the PS3's LV1 hypervisor.
53156 +
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.
53160 +
53161 endmenu
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
53165 @@ -23,6 +23,7 @@
53166 #include <linux/kernel.h>
53167 #include <linux/kthread.h>
53168 #include <linux/init.h>
53169 +#include <linux/reboot.h>
53170
53171 #include <asm/firmware.h>
53172 #include <asm/lv1call.h>
53173 @@ -30,6 +31,89 @@
53174
53175 #include "platform.h"
53176
53177 +static int __init ps3_register_lpm_devices(void)
53178 +{
53179 + int result;
53180 + u64 tmp1;
53181 + u64 tmp2;
53182 + struct ps3_system_bus_device *dev;
53183 +
53184 + pr_debug(" -> %s:%d\n", __func__, __LINE__);
53185 +
53186 + dev = kzalloc(sizeof(*dev), GFP_KERNEL);
53187 + if (!dev)
53188 + return -ENOMEM;
53189 +
53190 + dev->match_id = PS3_MATCH_ID_LPM;
53191 + dev->dev_type = PS3_DEVICE_TYPE_LPM;
53192 +
53193 + /* The current lpm driver only supports a single BE processor. */
53194 +
53195 + result = ps3_repository_read_be_node_id(0, &dev->lpm.node_id);
53196 +
53197 + if (result) {
53198 + pr_debug("%s:%d: ps3_repository_read_be_node_id failed \n",
53199 + __func__, __LINE__);
53200 + goto fail_read_repo;
53201 + }
53202 +
53203 + result = ps3_repository_read_lpm_privileges(dev->lpm.node_id, &tmp1,
53204 + &dev->lpm.rights);
53205 +
53206 + if (result) {
53207 + pr_debug("%s:%d: ps3_repository_read_lpm_privleges failed \n",
53208 + __func__, __LINE__);
53209 + goto fail_read_repo;
53210 + }
53211 +
53212 + lv1_get_logical_partition_id(&tmp2);
53213 +
53214 + if (tmp1 != tmp2) {
53215 + pr_debug("%s:%d: wrong lpar\n",
53216 + __func__, __LINE__);
53217 + result = -ENODEV;
53218 + goto fail_rights;
53219 + }
53220 +
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__);
53224 + result = -EPERM;
53225 + goto fail_rights;
53226 + }
53227 +
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);
53231 +
53232 + result = ps3_repository_read_pu_id(0, &dev->lpm.pu_id);
53233 +
53234 + if (result) {
53235 + pr_debug("%s:%d: ps3_repository_read_pu_id failed \n",
53236 + __func__, __LINE__);
53237 + goto fail_read_repo;
53238 + }
53239 +
53240 + result = ps3_system_bus_device_register(dev);
53241 +
53242 + if (result) {
53243 + pr_debug("%s:%d ps3_system_bus_device_register failed\n",
53244 + __func__, __LINE__);
53245 + goto fail_register;
53246 + }
53247 +
53248 + pr_debug(" <- %s:%d\n", __func__, __LINE__);
53249 + return 0;
53250 +
53251 +
53252 +fail_register:
53253 +fail_rights:
53254 +fail_read_repo:
53255 + kfree(dev);
53256 + pr_debug(" <- %s:%d: failed\n", __func__, __LINE__);
53257 + return result;
53258 +}
53259 +
53260 /**
53261 * ps3_setup_gelic_device - Setup and register a gelic device instance.
53262 *
53263 @@ -238,166 +322,6 @@
53264 return result;
53265 }
53266
53267 -static int ps3stor_wait_for_completion(u64 dev_id, u64 tag,
53268 - unsigned int timeout)
53269 -{
53270 - int result = -1;
53271 - unsigned int retries = 0;
53272 - u64 status;
53273 -
53274 - for (retries = 0; retries < timeout; retries++) {
53275 - result = lv1_storage_check_async_status(dev_id, tag, &status);
53276 - if (!result)
53277 - break;
53278 -
53279 - msleep(1);
53280 - }
53281 -
53282 - if (result)
53283 - pr_debug("%s:%u: check_async_status: %s, status %lx\n",
53284 - __func__, __LINE__, ps3_result(result), status);
53285 -
53286 - return result;
53287 -}
53288 -
53289 -/**
53290 - * ps3_storage_wait_for_device - Wait for a storage device to become ready.
53291 - * @repo: The repository device to wait for.
53292 - *
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
53297 - * bytes.
53298 - */
53299 -
53300 -static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)
53301 -{
53302 - int error = -ENODEV;
53303 - int result;
53304 - const u64 notification_dev_id = (u64)-1LL;
53305 - const unsigned int timeout = HZ;
53306 - u64 lpar;
53307 - u64 tag;
53308 - void *buf;
53309 - enum ps3_notify_type {
53310 - notify_device_ready = 0,
53311 - notify_region_probe = 1,
53312 - notify_region_update = 2,
53313 - };
53314 - struct {
53315 - u64 operation_code; /* must be zero */
53316 - u64 event_mask; /* OR of 1UL << enum ps3_notify_type */
53317 - } *notify_cmd;
53318 - struct {
53319 - u64 event_type; /* enum ps3_notify_type */
53320 - u64 bus_id;
53321 - u64 dev_id;
53322 - u64 dev_type;
53323 - u64 dev_port;
53324 - } *notify_event;
53325 -
53326 - pr_debug(" -> %s:%u: (%u:%u:%u)\n", __func__, __LINE__, repo->bus_id,
53327 - repo->dev_id, repo->dev_type);
53328 -
53329 - buf = kzalloc(512, GFP_KERNEL);
53330 - if (!buf)
53331 - return -ENOMEM;
53332 -
53333 - lpar = ps3_mm_phys_to_lpar(__pa(buf));
53334 - notify_cmd = buf;
53335 - notify_event = buf;
53336 -
53337 - result = lv1_open_device(repo->bus_id, notification_dev_id, 0);
53338 - if (result) {
53339 - printk(KERN_ERR "%s:%u: lv1_open_device %s\n", __func__,
53340 - __LINE__, ps3_result(result));
53341 - goto fail_free;
53342 - }
53343 -
53344 - /* Setup and write the request for device notification. */
53345 -
53346 - notify_cmd->operation_code = 0; /* must be zero */
53347 - notify_cmd->event_mask = 1UL << notify_region_probe;
53348 -
53349 - result = lv1_storage_write(notification_dev_id, 0, 0, 1, 0, lpar,
53350 - &tag);
53351 - if (result) {
53352 - printk(KERN_ERR "%s:%u: write failed %s\n", __func__, __LINE__,
53353 - ps3_result(result));
53354 - goto fail_close;
53355 - }
53356 -
53357 - /* Wait for the write completion */
53358 -
53359 - result = ps3stor_wait_for_completion(notification_dev_id, tag,
53360 - timeout);
53361 - if (result) {
53362 - printk(KERN_ERR "%s:%u: write not completed %s\n", __func__,
53363 - __LINE__, ps3_result(result));
53364 - goto fail_close;
53365 - }
53366 -
53367 - /* Loop here processing the requested notification events. */
53368 -
53369 - while (1) {
53370 - memset(notify_event, 0, sizeof(*notify_event));
53371 -
53372 - result = lv1_storage_read(notification_dev_id, 0, 0, 1, 0,
53373 - lpar, &tag);
53374 - if (result) {
53375 - printk(KERN_ERR "%s:%u: write failed %s\n", __func__,
53376 - __LINE__, ps3_result(result));
53377 - break;
53378 - }
53379 -
53380 - result = ps3stor_wait_for_completion(notification_dev_id, tag,
53381 - timeout);
53382 - if (result) {
53383 - printk(KERN_ERR "%s:%u: read not completed %s\n",
53384 - __func__, __LINE__, ps3_result(result));
53385 - break;
53386 - }
53387 -
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);
53392 -
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);
53399 - break;
53400 - }
53401 -
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,
53406 - repo->dev_type);
53407 - error = 0;
53408 - break;
53409 - }
53410 -
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);
53415 - break;
53416 - }
53417 - }
53418 -
53419 -fail_close:
53420 - lv1_close_device(repo->bus_id, notification_dev_id);
53421 -fail_free:
53422 - kfree(buf);
53423 - pr_debug(" <- %s:%u\n", __func__, __LINE__);
53424 - return error;
53425 -}
53426 -
53427 static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
53428 enum ps3_match_id match_id)
53429 {
53430 @@ -449,16 +373,6 @@
53431 goto fail_find_interrupt;
53432 }
53433
53434 - /* FIXME: Arrange to only do this on a 'cold' boot */
53435 -
53436 - result = ps3_storage_wait_for_device(repo);
53437 - if (result) {
53438 - printk(KERN_ERR "%s:%u: storage_notification failed %d\n",
53439 - __func__, __LINE__, result);
53440 - result = -ENODEV;
53441 - goto fail_probe_notification;
53442 - }
53443 -
53444 for (i = 0; i < num_regions; i++) {
53445 unsigned int id;
53446 u64 start, size;
53447 @@ -494,7 +408,6 @@
53448
53449 fail_device_register:
53450 fail_read_region:
53451 -fail_probe_notification:
53452 fail_find_interrupt:
53453 kfree(p);
53454 fail_malloc:
53455 @@ -659,62 +572,268 @@
53456 return result;
53457 }
53458
53459 +static void ps3_find_and_add_device(u64 bus_id, u64 dev_id)
53460 +{
53461 + struct ps3_repository_device repo;
53462 + int res;
53463 + unsigned int retries;
53464 + unsigned long rem;
53465 +
53466 + /*
53467 + * On some firmware versions (e.g. 1.90), the device may not show up
53468 + * in the repository immediately
53469 + */
53470 + for (retries = 0; retries < 10; retries++) {
53471 + res = ps3_repository_find_device_by_id(&repo, bus_id, dev_id);
53472 + if (!res)
53473 + goto found;
53474 +
53475 + rem = msleep_interruptible(100);
53476 + if (rem)
53477 + break;
53478 + }
53479 + pr_warning("%s:%u: device %lu:%lu not found\n", __func__, __LINE__,
53480 + bus_id, dev_id);
53481 + return;
53482 +
53483 +found:
53484 + if (retries)
53485 + pr_debug("%s:%u: device %lu:%lu found after %u retries\n",
53486 + __func__, __LINE__, bus_id, dev_id, retries);
53487 +
53488 + ps3_register_repository_device(&repo);
53489 + return;
53490 +}
53491 +
53492 +#define PS3_NOTIFICATION_DEV_ID ULONG_MAX
53493 +#define PS3_NOTIFICATION_INTERRUPT_ID 0
53494 +
53495 +struct ps3_notification_device {
53496 + struct ps3_system_bus_device sbd;
53497 + spinlock_t lock;
53498 + u64 tag;
53499 + u64 lv1_status;
53500 + struct completion done;
53501 +};
53502 +
53503 +enum ps3_notify_type {
53504 + notify_device_ready = 0,
53505 + notify_region_probe = 1,
53506 + notify_region_update = 2,
53507 +};
53508 +
53509 +struct ps3_notify_cmd {
53510 + u64 operation_code; /* must be zero */
53511 + u64 event_mask; /* OR of 1UL << enum ps3_notify_type */
53512 +};
53513 +
53514 +struct ps3_notify_event {
53515 + u64 event_type; /* enum ps3_notify_type */
53516 + u64 bus_id;
53517 + u64 dev_id;
53518 + u64 dev_type;
53519 + u64 dev_port;
53520 +};
53521 +
53522 +static irqreturn_t ps3_notification_interrupt(int irq, void *data)
53523 +{
53524 + struct ps3_notification_device *dev = data;
53525 + int res;
53526 + u64 tag, status;
53527 +
53528 + spin_lock(&dev->lock);
53529 + res = lv1_storage_get_async_status(PS3_NOTIFICATION_DEV_ID, &tag,
53530 + &status);
53531 + if (tag != dev->tag)
53532 + pr_err("%s:%u: tag mismatch, got %lx, expected %lx\n",
53533 + __func__, __LINE__, tag, dev->tag);
53534 +
53535 + if (res) {
53536 + pr_err("%s:%u: res %d status 0x%lx\n", __func__, __LINE__, res,
53537 + status);
53538 + } else {
53539 + pr_debug("%s:%u: completed, status 0x%lx\n", __func__,
53540 + __LINE__, status);
53541 + dev->lv1_status = status;
53542 + complete(&dev->done);
53543 + }
53544 + spin_unlock(&dev->lock);
53545 + return IRQ_HANDLED;
53546 +}
53547 +
53548 +static int ps3_notification_read_write(struct ps3_notification_device *dev,
53549 + u64 lpar, int write)
53550 +{
53551 + const char *op = write ? "write" : "read";
53552 + unsigned long flags;
53553 + int res;
53554 +
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,
53558 + &dev->tag)
53559 + : lv1_storage_read(dev->sbd.dev_id, 0, 0, 1, 0, lpar,
53560 + &dev->tag);
53561 + spin_unlock_irqrestore(&dev->lock, flags);
53562 + if (res) {
53563 + pr_err("%s:%u: %s failed %d\n", __func__, __LINE__, op, res);
53564 + return -EPERM;
53565 + }
53566 + pr_debug("%s:%u: notification %s issued\n", __func__, __LINE__, op);
53567 +
53568 + res = wait_event_interruptible(dev->done.wait,
53569 + dev->done.done || kthread_should_stop());
53570 + if (kthread_should_stop())
53571 + res = -EINTR;
53572 + if (res) {
53573 + pr_debug("%s:%u: interrupted %s\n", __func__, __LINE__, op);
53574 + return res;
53575 + }
53576 +
53577 + if (dev->lv1_status) {
53578 + pr_err("%s:%u: %s not completed, status 0x%lx\n", __func__,
53579 + __LINE__, op, dev->lv1_status);
53580 + return -EIO;
53581 + }
53582 + pr_debug("%s:%u: notification %s completed\n", __func__, __LINE__, op);
53583 +
53584 + return 0;
53585 +}
53586 +
53587 +static struct task_struct *probe_task;
53588 +
53589 /**
53590 * ps3_probe_thread - Background repository probing at system startup.
53591 *
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.
53597 */
53598
53599 static int ps3_probe_thread(void *data)
53600 {
53601 - struct ps3_repository_device *repo = data;
53602 - int result;
53603 - unsigned int ms = 250;
53604 + struct ps3_notification_device dev;
53605 + int res;
53606 + unsigned int irq;
53607 + u64 lpar;
53608 + void *buf;
53609 + struct ps3_notify_cmd *notify_cmd;
53610 + struct ps3_notify_event *notify_event;
53611
53612 pr_debug(" -> %s:%u: kthread started\n", __func__, __LINE__);
53613
53614 - do {
53615 - try_to_freeze();
53616 + buf = kzalloc(512, GFP_KERNEL);
53617 + if (!buf)
53618 + return -ENOMEM;
53619
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;
53624 +
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;
53629 +
53630 + res = lv1_open_device(dev.sbd.bus_id, dev.sbd.dev_id, 0);
53631 + if (res) {
53632 + pr_err("%s:%u: lv1_open_device failed %s\n", __func__,
53633 + __LINE__, ps3_result(res));
53634 + goto fail_free;
53635 + }
53636 +
53637 + res = ps3_sb_event_receive_port_setup(&dev.sbd, PS3_BINDING_CPU_ANY,
53638 + &irq);
53639 + if (res) {
53640 + pr_err("%s:%u: ps3_sb_event_receive_port_setup failed %d\n",
53641 + __func__, __LINE__, res);
53642 + goto fail_close_device;
53643 + }
53644 +
53645 + spin_lock_init(&dev.lock);
53646 +
53647 + res = request_irq(irq, ps3_notification_interrupt, IRQF_DISABLED,
53648 + "ps3_notification", &dev);
53649 + if (res) {
53650 + pr_err("%s:%u: request_irq failed %d\n", __func__, __LINE__,
53651 + res);
53652 + goto fail_sb_event_receive_port_destroy;
53653 + }
53654 +
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;
53658
53659 - do {
53660 - result = ps3_repository_find_device(repo);
53661 + res = ps3_notification_read_write(&dev, lpar, 1);
53662 + if (res)
53663 + goto fail_free_irq;
53664
53665 - if (result == -ENODEV)
53666 - pr_debug("%s:%u: nothing new\n", __func__,
53667 - __LINE__);
53668 - else if (result)
53669 - pr_debug("%s:%u: find device error.\n",
53670 - __func__, __LINE__);
53671 - else {
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);
53677 - ms = 250;
53678 - }
53679 - } while (!result);
53680 + /* Loop here processing the requested notification events. */
53681 + do {
53682 + try_to_freeze();
53683
53684 - pr_debug("%s:%u: ms %u\n", __func__, __LINE__, ms);
53685 + memset(notify_event, 0, sizeof(*notify_event));
53686
53687 - if ( ms > 60000)
53688 + res = ps3_notification_read_write(&dev, lpar, 0);
53689 + if (res)
53690 break;
53691
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);
53698 +
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);
53706 + continue;
53707 + }
53708
53709 - /* An exponential backoff. */
53710 - ms <<= 1;
53711 + ps3_find_and_add_device(dev.sbd.bus_id, notify_event->dev_id);
53712
53713 } while (!kthread_should_stop());
53714
53715 +fail_free_irq:
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);
53721 +fail_free:
53722 + kfree(buf);
53723 +
53724 + probe_task = NULL;
53725 +
53726 pr_debug(" <- %s:%u: kthread finished\n", __func__, __LINE__);
53727
53728 return 0;
53729 }
53730
53731 /**
53732 + * ps3_stop_probe_thread - Stops the background probe thread.
53733 + *
53734 + */
53735 +
53736 +static int ps3_stop_probe_thread(struct notifier_block *nb, unsigned long code,
53737 + void *data)
53738 +{
53739 + if (probe_task)
53740 + kthread_stop(probe_task);
53741 + return 0;
53742 +}
53743 +
53744 +static struct notifier_block nb = {
53745 + .notifier_call = ps3_stop_probe_thread
53746 +};
53747 +
53748 +/**
53749 * ps3_start_probe_thread - Starts the background probe thread.
53750 *
53751 */
53752 @@ -723,7 +842,7 @@
53753 {
53754 int result;
53755 struct task_struct *task;
53756 - static struct ps3_repository_device repo; /* must be static */
53757 + struct ps3_repository_device repo;
53758
53759 pr_debug(" -> %s:%d\n", __func__, __LINE__);
53760
53761 @@ -746,7 +865,8 @@
53762 return -ENODEV;
53763 }
53764
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);
53768
53769 if (IS_ERR(task)) {
53770 result = PTR_ERR(task);
53771 @@ -755,6 +875,9 @@
53772 return result;
53773 }
53774
53775 + probe_task = task;
53776 + register_reboot_notifier(&nb);
53777 +
53778 pr_debug(" <- %s:%d\n", __func__, __LINE__);
53779 return 0;
53780 }
53781 @@ -787,6 +910,8 @@
53782
53783 ps3_register_sound_devices();
53784
53785 + ps3_register_lpm_devices();
53786 +
53787 pr_debug(" <- %s:%d\n", __func__, __LINE__);
53788 return 0;
53789 }
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
53793 @@ -36,11 +36,6 @@
53794 #endif
53795
53796 enum {
53797 -#if defined(CONFIG_PS3_USE_LPAR_ADDR)
53798 - USE_LPAR_ADDR = 1,
53799 -#else
53800 - USE_LPAR_ADDR = 0,
53801 -#endif
53802 #if defined(CONFIG_PS3_DYNAMIC_DMA)
53803 USE_DYNAMIC_DMA = 1,
53804 #else
53805 @@ -137,11 +132,8 @@
53806 unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr)
53807 {
53808 BUG_ON(is_kernel_addr(phys_addr));
53809 - if (USE_LPAR_ADDR)
53810 - return phys_addr;
53811 - else
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;
53816 }
53817
53818 EXPORT_SYMBOL(ps3_mm_phys_to_lpar);
53819 @@ -309,7 +301,7 @@
53820
53821 BUG_ON(!mem_init_done);
53822
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;
53827
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)
53831 {
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,
53834 r->dev->dev_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,
53839 int line)
53840 {
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 @@
53847 BUG_ON(!r);
53848
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);
53853 return 0;
53854 }
53855 @@ -724,7 +716,7 @@
53856 BUG_ON(!r);
53857
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);
53862 return 0;
53863 }
53864 @@ -1007,7 +999,7 @@
53865
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;
53870 len = r->len;
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,
53882 };
53883
53884 int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
53885 u64 *value);
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);
53896 + u64 *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 */
53902
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;
53912 + u64 bus_id;
53913 + u64 dev_id;
53914 };
53915
53916 -static inline struct ps3_repository_device *ps3_repository_bump_device(
53917 - struct ps3_repository_device *repo)
53918 -{
53919 - repo->dev_index++;
53920 - return repo;
53921 -}
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);
53931
53932 -/* repository pu and memory info */
53933 +/* repository logical pu and memory info */
53934
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 @@
53943
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);
53949
53950 +/* repository performance monitor info */
53951 +
53952 +int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar,
53953 + u64 *rights);
53954 +
53955 /* repository 'Other OS' area */
53956
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
53961 @@ -33,7 +33,7 @@
53962 };
53963
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)
53967 {
53968 #if defined(DEBUG)
53969 char s[16];
53970 @@ -50,8 +50,8 @@
53971
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)
53978 {
53979 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id);
53980 _dump_field("n1: ", n1, func, line);
53981 @@ -63,7 +63,7 @@
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)
53987 {
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),
53993 0, 0,
53994 - value, 0);
53995 + value, NULL);
53996 }
53997
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)
54000 {
54001 int result;
54002 - u64 v1;
54003 - u64 v2; /* unused */
54004
54005 result = read_node(PS3_LPAR_ID_PME,
54006 make_first_field("bus", bus_index),
54007 make_field("id", 0),
54008 0, 0,
54009 - &v1, &v2);
54010 - *bus_id = v1;
54011 + bus_id, NULL);
54012 return result;
54013 }
54014
54015 @@ -193,7 +190,7 @@
54016 make_first_field("bus", bus_index),
54017 make_field("type", 0),
54018 0, 0,
54019 - &v1, 0);
54020 + &v1, NULL);
54021 *bus_type = v1;
54022 return result;
54023 }
54024 @@ -208,7 +205,7 @@
54025 make_first_field("bus", bus_index),
54026 make_field("num_dev", 0),
54027 0, 0,
54028 - &v1, 0);
54029 + &v1, NULL);
54030 *num_dev = v1;
54031 return result;
54032 }
54033 @@ -221,22 +218,20 @@
54034 make_field("dev", dev_index),
54035 make_field(dev_str, 0),
54036 0,
54037 - value, 0);
54038 + value, NULL);
54039 }
54040
54041 int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
54042 - unsigned int *dev_id)
54043 + u64 *dev_id)
54044 {
54045 int result;
54046 - u64 v1;
54047
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),
54052 0,
54053 - &v1, 0);
54054 - *dev_id = v1;
54055 + dev_id, NULL);
54056 return result;
54057 }
54058
54059 @@ -251,14 +246,14 @@
54060 make_field("dev", dev_index),
54061 make_field("type", 0),
54062 0,
54063 - &v1, 0);
54064 + &v1, NULL);
54065 *dev_type = v1;
54066 return result;
54067 }
54068
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)
54073 {
54074 int result;
54075 u64 v1;
54076 @@ -287,7 +282,7 @@
54077 make_field("dev", dev_index),
54078 make_field("reg", reg_index),
54079 make_field("type", 0),
54080 - &v1, 0);
54081 + &v1, NULL);
54082 *reg_type = v1;
54083 return result;
54084 }
54085 @@ -332,7 +327,7 @@
54086 return result;
54087 }
54088
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,
54092 num_dev);
54093
54094 @@ -349,47 +344,95 @@
54095 return result;
54096 }
54097
54098 - if (tmp.bus_type == PS3_BUS_TYPE_STORAGE) {
54099 - /*
54100 - * A storage device may show up in the repository before the
54101 - * hypervisor has finished probing its type and regions
54102 - */
54103 - unsigned int num_regions;
54104 -
54105 - if (tmp.dev_type == PS3_DEV_TYPE_STOR_DUMMY) {
54106 - pr_debug("%s:%u storage device not ready\n", __func__,
54107 - __LINE__);
54108 - return -ENODEV;
54109 - }
54110 + result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
54111 + &tmp.dev_id);
54112
54113 - result = ps3_repository_read_stor_dev_num_regions(tmp.bus_index,
54114 - tmp.dev_index,
54115 - &num_regions);
54116 + if (result) {
54117 + pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__,
54118 + __LINE__);
54119 + return result;
54120 + }
54121 +
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);
54124 +
54125 + *repo = tmp;
54126 + return 0;
54127 +}
54128 +
54129 +int ps3_repository_find_device_by_id(struct ps3_repository_device *repo,
54130 + u64 bus_id, u64 dev_id)
54131 +{
54132 + int result = -ENODEV;
54133 + struct ps3_repository_device tmp;
54134 + unsigned int num_dev;
54135 +
54136 + pr_debug(" -> %s:%u: find device by id %lu:%lu\n", __func__, __LINE__,
54137 + bus_id, dev_id);
54138 +
54139 + for (tmp.bus_index = 0; tmp.bus_index < 10; tmp.bus_index++) {
54140 + result = ps3_repository_read_bus_id(tmp.bus_index,
54141 + &tmp.bus_id);
54142 if (result) {
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);
54147 return result;
54148 }
54149
54150 - if (!num_regions) {
54151 - pr_debug("%s:%u storage device has no regions yet\n",
54152 - __func__, __LINE__);
54153 - return -ENODEV;
54154 - }
54155 + if (tmp.bus_id == bus_id)
54156 + goto found_bus;
54157 +
54158 + pr_debug("%s:%u: skip, bus_id %lu\n", __func__, __LINE__,
54159 + tmp.bus_id);
54160 }
54161 + pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__);
54162 + return result;
54163
54164 - result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
54165 - &tmp.dev_id);
54166 +found_bus:
54167 + result = ps3_repository_read_bus_type(tmp.bus_index, &tmp.bus_type);
54168 + if (result) {
54169 + pr_debug("%s:%u read_bus_type(%u) failed\n", __func__,
54170 + __LINE__, tmp.bus_index);
54171 + return result;
54172 + }
54173
54174 + result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev);
54175 if (result) {
54176 - pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__,
54177 - __LINE__);
54178 + pr_debug("%s:%u read_bus_num_dev failed\n", __func__,
54179 + __LINE__);
54180 return result;
54181 }
54182
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,
54187 + tmp.dev_index,
54188 + &tmp.dev_id);
54189 + if (result) {
54190 + pr_debug("%s:%u read_dev_id(%u:%u) failed\n", __func__,
54191 + __LINE__, tmp.bus_index, tmp.dev_index);
54192 + return result;
54193 + }
54194 +
54195 + if (tmp.dev_id == dev_id)
54196 + goto found_dev;
54197 +
54198 + pr_debug("%s:%u: skip, dev_id %lu\n", __func__, __LINE__,
54199 + tmp.dev_id);
54200 + }
54201 + pr_debug(" <- %s:%u: dev not found\n", __func__, __LINE__);
54202 + return result;
54203 +
54204 +found_dev:
54205 + result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index,
54206 + &tmp.dev_type);
54207 + if (result) {
54208 + pr_debug("%s:%u read_dev_type failed\n", __func__, __LINE__);
54209 + return result;
54210 + }
54211
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);
54215 *repo = tmp;
54216 return 0;
54217 }
54218 @@ -402,50 +445,34 @@
54219
54220 pr_debug(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type);
54221
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);
54225 + if (result) {
54226 + pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__);
54227 + return result;
54228 + }
54229
54230 - result = ps3_repository_read_bus_type(repo.bus_index,
54231 - &repo.bus_type);
54232 + result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id);
54233 + if (result) {
54234 + pr_debug("%s:%d read_bus_id(%u) failed\n", __func__, __LINE__,
54235 + repo.bus_index);
54236 + return result;
54237 + }
54238
54239 - if (result) {
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) {
54245 + result = 0;
54246 + break;
54247 + } else if (result)
54248 break;
54249 - }
54250 -
54251 - if (repo.bus_type != bus_type) {
54252 - pr_debug("%s:%d: skip, bus_type %u\n", __func__,
54253 - __LINE__, repo.bus_type);
54254 - continue;
54255 - }
54256 -
54257 - result = ps3_repository_read_bus_id(repo.bus_index,
54258 - &repo.bus_id);
54259
54260 + result = callback(&repo);
54261 if (result) {
54262 - pr_debug("%s:%d read_bus_id(%u) failed\n",
54263 - __func__, __LINE__, repo.bus_index);
54264 - continue;
54265 - }
54266 -
54267 - for (repo.dev_index = 0; ; repo.dev_index++) {
54268 - result = ps3_repository_find_device(&repo);
54269 -
54270 - if (result == -ENODEV) {
54271 - result = 0;
54272 - break;
54273 - } else if (result)
54274 - break;
54275 -
54276 - result = callback(&repo);
54277 -
54278 - if (result) {
54279 - pr_debug("%s:%d: abort at callback\n", __func__,
54280 - __LINE__);
54281 - break;
54282 - }
54283 + pr_debug("%s:%d: abort at callback\n", __func__,
54284 + __LINE__);
54285 + break;
54286 }
54287 - break;
54288 }
54289
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),
54295 - 0, port, 0);
54296 + 0, port, NULL);
54297 }
54298
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),
54304 - 0, blk_size, 0);
54305 + 0, blk_size, NULL);
54306 }
54307
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);
54315 }
54316
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),
54322 - 0, &v1, 0);
54323 + 0, &v1, NULL);
54324 *num_regions = v1;
54325 return result;
54326 }
54327 @@ -611,7 +638,7 @@
54328 make_field("dev", dev_index),
54329 make_field("region", region_index),
54330 make_field("id", 0),
54331 - &v1, 0);
54332 + &v1, NULL);
54333 *region_id = v1;
54334 return result;
54335 }
54336 @@ -624,7 +651,7 @@
54337 make_field("dev", dev_index),
54338 make_field("region", region_index),
54339 make_field("size", 0),
54340 - region_size, 0);
54341 + region_size, NULL);
54342 }
54343
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);
54351 }
54352
54353 int ps3_repository_read_stor_dev_info(unsigned int bus_index,
54354 @@ -684,6 +711,35 @@
54355 return result;
54356 }
54357
54358 +/**
54359 + * ps3_repository_read_num_pu - Number of logical PU processors for this lpar.
54360 + */
54361 +
54362 +int ps3_repository_read_num_pu(u64 *num_pu)
54363 +{
54364 + *num_pu = 0;
54365 + return read_node(PS3_LPAR_ID_CURRENT,
54366 + make_first_field("bi", 0),
54367 + make_field("pun", 0),
54368 + 0, 0,
54369 + num_pu, NULL);
54370 +}
54371 +
54372 +/**
54373 + * ps3_repository_read_pu_id - Read the logical PU id.
54374 + * @pu_index: Zero based index.
54375 + * @pu_id: The logical PU id.
54376 + */
54377 +
54378 +int ps3_repository_read_pu_id(unsigned int pu_index, u64 *pu_id)
54379 +{
54380 + return read_node(PS3_LPAR_ID_CURRENT,
54381 + make_first_field("bi", 0),
54382 + make_field("pu", pu_index),
54383 + 0, 0,
54384 + pu_id, NULL);
54385 +}
54386 +
54387 int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size)
54388 {
54389 return read_node(PS3_LPAR_ID_CURRENT,
54390 @@ -691,7 +747,7 @@
54391 make_field("pu", 0),
54392 ppe_id,
54393 make_field("rm_size", 0),
54394 - rm_size, 0);
54395 + rm_size, NULL);
54396 }
54397
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),
54402 0, 0,
54403 - region_total, 0);
54404 + region_total, NULL);
54405 }
54406
54407 /**
54408 @@ -736,7 +792,7 @@
54409 make_first_field("bi", 0),
54410 make_field("spun", 0),
54411 0, 0,
54412 - &v1, 0);
54413 + &v1, NULL);
54414 *num_spu_reserved = v1;
54415 return result;
54416 }
54417 @@ -755,7 +811,7 @@
54418 make_first_field("bi", 0),
54419 make_field("spursvn", 0),
54420 0, 0,
54421 - &v1, 0);
54422 + &v1, NULL);
54423 *num_resource_id = v1;
54424 return result;
54425 }
54426 @@ -768,7 +824,7 @@
54427 */
54428
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)
54432 {
54433 int result;
54434 u64 v1;
54435 @@ -785,14 +841,14 @@
54436 return result;
54437 }
54438
54439 -int ps3_repository_read_boot_dat_address(u64 *address)
54440 +static int ps3_repository_read_boot_dat_address(u64 *address)
54441 {
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),
54446 0,
54447 - address, 0);
54448 + address, NULL);
54449 }
54450
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),
54455 0,
54456 - &v1, 0);
54457 + &v1, NULL);
54458 *size = v1;
54459 return result;
54460 }
54461 @@ -820,7 +876,7 @@
54462 make_field("vir_uart", 0),
54463 make_field("port", 0),
54464 make_field("avset", 0),
54465 - &v1, 0);
54466 + &v1, NULL);
54467 *port = v1;
54468 return result;
54469 }
54470 @@ -835,7 +891,7 @@
54471 make_field("vir_uart", 0),
54472 make_field("port", 0),
54473 make_field("sysmgr", 0),
54474 - &v1, 0);
54475 + &v1, NULL);
54476 *port = v1;
54477 return result;
54478 }
54479 @@ -856,6 +912,10 @@
54480 : ps3_repository_read_boot_dat_size(size);
54481 }
54482
54483 +/**
54484 + * ps3_repository_read_num_be - Number of physical BE processors in the system.
54485 + */
54486 +
54487 int ps3_repository_read_num_be(unsigned int *num_be)
54488 {
54489 int result;
54490 @@ -866,11 +926,17 @@
54491 0,
54492 0,
54493 0,
54494 - &v1, 0);
54495 + &v1, NULL);
54496 *num_be = v1;
54497 return result;
54498 }
54499
54500 +/**
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.
54504 + */
54505 +
54506 int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id)
54507 {
54508 return read_node(PS3_LPAR_ID_PME,
54509 @@ -878,7 +944,23 @@
54510 0,
54511 0,
54512 0,
54513 - node_id, 0);
54514 + node_id, NULL);
54515 +}
54516 +
54517 +/**
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.
54521 + */
54522 +
54523 +int ps3_repository_read_be_id(u64 node_id, u64 *be_id)
54524 +{
54525 + return read_node(PS3_LPAR_ID_PME,
54526 + make_first_field("be", 0),
54527 + node_id,
54528 + 0,
54529 + 0,
54530 + be_id, NULL);
54531 }
54532
54533 int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq)
54534 @@ -888,7 +970,7 @@
54535 node_id,
54536 make_field("clock", 0),
54537 0,
54538 - tb_freq, 0);
54539 + tb_freq, NULL);
54540 }
54541
54542 int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq)
54543 @@ -897,11 +979,29 @@
54544 u64 node_id;
54545
54546 *tb_freq = 0;
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);
54551 }
54552
54553 +int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar,
54554 + u64 *rights)
54555 +{
54556 + int result;
54557 + u64 node_id;
54558 +
54559 + *lpar = 0;
54560 + *rights = 0;
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),
54565 + node_id,
54566 + make_field("lpm", 0),
54567 + make_field("priv", 0),
54568 + lpar, rights);
54569 +}
54570 +
54571 #if defined(DEBUG)
54572
54573 int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
54574 @@ -1034,7 +1134,7 @@
54575 continue;
54576 }
54577
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);
54582
54583 @@ -1091,7 +1191,7 @@
54584 continue;
54585 }
54586
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);
54591
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
54595 @@ -28,6 +28,7 @@
54596 #include <asm/spu_priv1.h>
54597 #include <asm/lv1call.h>
54598
54599 +#include "../cell/spufs/spufs.h"
54600 #include "platform.h"
54601
54602 /* spu_management_ops */
54603 @@ -419,10 +420,34 @@
54604 return 0;
54605 }
54606
54607 +/**
54608 + * ps3_enable_spu - Enable SPU run control.
54609 + *
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.
54618 + */
54619 +
54620 +static void ps3_enable_spu(struct spu_context *ctx)
54621 +{
54622 +}
54623 +
54624 +static void ps3_disable_spu(struct spu_context *ctx)
54625 +{
54626 + ctx->ops->runcntl_stop(ctx);
54627 +}
54628 +
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,
54636 };
54637
54638 @@ -505,8 +530,6 @@
54639 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK
54640 | MFC_STATE1_PROBLEM_STATE_MASK);
54641
54642 - sr1 |= MFC_STATE1_MASTER_RUN_CONTROL_MASK;
54643 -
54644 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed));
54645
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
54650 @@ -42,8 +42,8 @@
54651 int gpu;
54652 } static usage_hack;
54653
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,
54657 + u64 dev_id)
54658 {
54659 return dev->bus_id == bus_id && dev->dev_id == dev_id;
54660 }
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__,
54668 + dev->bus_id);
54669 BUG();
54670 return -EINVAL;
54671
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__,
54679 + dev->bus_id);
54680 BUG();
54681 return -EINVAL;
54682
54683 @@ -240,7 +240,7 @@
54684 static void _dump_mmio_region(const struct ps3_mmio_region* r,
54685 const char* func, int line)
54686 {
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,
54689 r->dev->dev_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;
54697
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);
54703 break;
54704 + case PS3_DEVICE_TYPE_LPM:
54705 + snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
54706 + "lpm_%02x", ++dev_lpm_count);
54707 + break;
54708 default:
54709 BUG();
54710 };
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
54714 @@ -29,6 +29,8 @@
54715 #include <linux/rbtree.h>
54716 #include <linux/seq_file.h>
54717 #include <linux/spinlock.h>
54718 +#include <linux/of.h>
54719 +
54720 #include <asm/atomic.h>
54721 #include <asm/eeh.h>
54722 #include <asm/eeh_event.h>
54723 @@ -169,7 +171,6 @@
54724 */
54725 static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len)
54726 {
54727 - struct device_node *dn;
54728 struct pci_dev *dev = pdn->pcidev;
54729 u32 cfg;
54730 int cap, i;
54731 @@ -243,12 +244,12 @@
54732
54733 /* Gather status on devices under the bridge */
54734 if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) {
54735 - dn = pdn->node->child;
54736 - while (dn) {
54737 + struct device_node *dn;
54738 +
54739 + for_each_child_of_node(pdn->node, dn) {
54740 pdn = PCI_DN(dn);
54741 if (pdn)
54742 n += gather_pci_data(pdn, buf+n, len-n);
54743 - dn = dn->sibling;
54744 }
54745 }
54746
54747 @@ -372,7 +373,7 @@
54748 return dn;
54749 }
54750
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.
54758 */
54759
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)
54762 {
54763 - while (dn) {
54764 + struct device_node *dn;
54765 +
54766 + for_each_child_of_node(parent, dn) {
54767 if (PCI_DN(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;
54773
54774 - if (dn->child)
54775 - __eeh_mark_slot (dn->child, mode_flag);
54776 + __eeh_mark_slot(dn, mode_flag);
54777 }
54778 - dn = dn->sibling;
54779 }
54780 }
54781
54782 @@ -415,19 +416,19 @@
54783 if (dev)
54784 dev->error_state = pci_channel_io_frozen;
54785
54786 - __eeh_mark_slot (dn->child, mode_flag);
54787 + __eeh_mark_slot(dn, mode_flag);
54788 }
54789
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)
54792 {
54793 - while (dn) {
54794 + struct device_node *dn;
54795 +
54796 + for_each_child_of_node(parent, dn) {
54797 if (PCI_DN(dn)) {
54798 PCI_DN(dn)->eeh_mode &= ~mode_flag;
54799 PCI_DN(dn)->eeh_check_count = 0;
54800 - if (dn->child)
54801 - __eeh_clear_slot (dn->child, mode_flag);
54802 + __eeh_clear_slot(dn, mode_flag);
54803 }
54804 - dn = dn->sibling;
54805 }
54806 }
54807
54808 @@ -444,7 +445,7 @@
54809
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);
54815 }
54816
54817 @@ -480,6 +481,7 @@
54818 no_dn++;
54819 return 0;
54820 }
54821 + dn = find_device_pe(dn);
54822 pdn = PCI_DN(dn);
54823
54824 /* Access to IO BARs might get this far and still not want checking. */
54825 @@ -545,7 +547,7 @@
54826
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)) {
54831 false_positives++;
54832 pdn->eeh_false_positives ++;
54833 rc = 0;
54834 @@ -848,11 +850,8 @@
54835 if ((pdn->eeh_mode & EEH_MODE_SUPPORTED) && !IS_BRIDGE(pdn->class_code))
54836 __restore_bars (pdn);
54837
54838 - dn = pdn->node->child;
54839 - while (dn) {
54840 + for_each_child_of_node(pdn->node, dn)
54841 eeh_restore_bars (PCI_DN(dn));
54842 - dn = dn->sibling;
54843 - }
54844 }
54845
54846 /**
54847 @@ -1130,7 +1129,8 @@
54848 void eeh_add_device_tree_early(struct device_node *dn)
54849 {
54850 struct device_node *sib;
54851 - for (sib = dn->child; sib; sib = sib->sibling)
54852 +
54853 + for_each_child_of_node(dn, sib)
54854 eeh_add_device_tree_early(sib);
54855 eeh_add_device_early(dn);
54856 }
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;
54862
54863 frozen_dn = find_device_pe(event->dn);
54864 - frozen_bus = pcibios_find_pci_bus(frozen_dn);
54865 -
54866 if (!frozen_dn) {
54867
54868 location = of_get_property(event->dn, "ibm,loc-code", NULL);
54869 @@ -321,6 +319,8 @@
54870 location, pci_name(event->dev));
54871 return NULL;
54872 }
54873 +
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";
54877
54878 @@ -354,13 +354,6 @@
54879 if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
54880 goto excess_failures;
54881
54882 - /* Get the current PCI slot state. */
54883 - rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
54884 - if (rc < 0) {
54885 - printk(KERN_WARNING "EEH: Permanent failure\n");
54886 - goto hard_fail;
54887 - }
54888 -
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 @@
54893 */
54894 pci_walk_bus(frozen_bus, eeh_report_error, &result);
54895
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);
54899 + if (rc < 0) {
54900 + printk(KERN_WARNING "EEH: Permanent failure\n");
54901 + goto hard_fail;
54902 + }
54903 +
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;
54912 const u32 *sizep;
54913
54914 - node = (struct device_node *)phb->arch_data;
54915 + node = phb->dn;
54916
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,
54925 + int bussubno)
54926 {
54927 unsigned long offset, size;
54928
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);
54932
54933 tbl->it_base = 0;
54934 @@ -420,17 +421,10 @@
54935 pdn->full_name, ppci->iommu_table);
54936
54937 if (!ppci->iommu_table) {
54938 - /* Bussubno hasn't been copied yet.
54939 - * Do it now because iommu_table_setparms_lpar needs it.
54940 - */
54941 -
54942 - ppci->bussubno = bus->number;
54943 -
54944 tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL,
54945 ppci->phb->node);
54946 -
54947 - iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window);
54948 -
54949 + iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window,
54950 + bus->number);
54951 ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node);
54952 DBG(" created table: %p\n", ppci->iommu_table);
54953 }
54954 @@ -523,14 +517,10 @@
54955
54956 pci = PCI_DN(pdn);
54957 if (!pci->iommu_table) {
54958 - /* iommu_table_setparms_lpar needs bussubno. */
54959 - pci->bussubno = pci->phb->bus->number;
54960 -
54961 tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL,
54962 pci->phb->node);
54963 -
54964 - iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window);
54965 -
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);
54970 } else {
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);
54977 break;
54978 default:
54979 err = NOTIFY_DONE;
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
54983 @@ -83,7 +83,7 @@
54984
54985 /* Must be called before pci_bus_add_devices */
54986 void
54987 -pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus)
54988 +pcibios_fixup_new_pci_devices(struct pci_bus *bus)
54989 {
54990 struct pci_dev *dev;
54991
54992 @@ -98,8 +98,6 @@
54993 /* Fill device archdata and setup iommu table */
54994 pcibios_setup_new_device(dev);
54995
54996 - if(fix_bus)
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 @@
55002
55003 pci_scan_child_bus(child_bus);
55004
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);
55009
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);
55020 }
55021 @@ -178,7 +176,7 @@
55022 slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
55023 num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
55024 if (num) {
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);
55029 }
55030 @@ -208,7 +206,7 @@
55031 eeh_add_device_tree_early(dn);
55032
55033 scan_phb(phb);
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);
55038
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
55042 @@ -8,11 +8,6 @@
55043 return plpar_hcall_norets(H_POLL_PENDING);
55044 }
55045
55046 -static inline long prod_processor(void)
55047 -{
55048 - return plpar_hcall_norets(H_PROD);
55049 -}
55050 -
55051 static inline long cede_processor(void)
55052 {
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
55057 @@ -46,6 +46,7 @@
55058 #include <asm/pSeries_reconfig.h>
55059 #include <asm/mpic.h>
55060 #include <asm/vdso_datapage.h>
55061 +#include <asm/cputhreads.h>
55062
55063 #include "plpar_wrappers.h"
55064 #include "pseries.h"
55065 @@ -202,7 +203,7 @@
55066 */
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)
55071 return 0;
55072
55073 return 1;
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 */
55079
55080
55081 -static inline unsigned int direct_xirr_info_get(int n_cpu)
55082 +static inline unsigned int direct_xirr_info_get(void)
55083 {
55084 - return in_be32(&xics_per_cpu[n_cpu]->xirr.word);
55085 + int cpu = smp_processor_id();
55086 +
55087 + return in_be32(&xics_per_cpu[cpu]->xirr.word);
55088 }
55089
55090 -static inline void direct_xirr_info_set(int n_cpu, int value)
55091 +static inline void direct_xirr_info_set(int value)
55092 {
55093 - out_be32(&xics_per_cpu[n_cpu]->xirr.word, value);
55094 + int cpu = smp_processor_id();
55095 +
55096 + out_be32(&xics_per_cpu[cpu]->xirr.word, value);
55097 }
55098
55099 -static inline void direct_cppr_info(int n_cpu, u8 value)
55100 +static inline void direct_cppr_info(u8 value)
55101 {
55102 - out_8(&xics_per_cpu[n_cpu]->xirr.bytes[0], value);
55103 + int cpu = smp_processor_id();
55104 +
55105 + out_8(&xics_per_cpu[cpu]->xirr.bytes[0], value);
55106 }
55107
55108 static inline void direct_qirr_info(int n_cpu, u8 value)
55109 @@ -111,7 +117,7 @@
55110 /* LPAR low level accessors */
55111
55112
55113 -static inline unsigned int lpar_xirr_info_get(int n_cpu)
55114 +static inline unsigned int lpar_xirr_info_get(void)
55115 {
55116 unsigned long lpar_rc;
55117 unsigned long return_value;
55118 @@ -122,7 +128,7 @@
55119 return (unsigned int)return_value;
55120 }
55121
55122 -static inline void lpar_xirr_info_set(int n_cpu, int value)
55123 +static inline void lpar_xirr_info_set(int value)
55124 {
55125 unsigned long lpar_rc;
55126 unsigned long val64 = value & 0xffffffff;
55127 @@ -133,7 +139,7 @@
55128 val64);
55129 }
55130
55131 -static inline void lpar_cppr_info(int n_cpu, u8 value)
55132 +static inline void lpar_cppr_info(u8 value)
55133 {
55134 unsigned long lpar_rc;
55135
55136 @@ -275,21 +281,19 @@
55137
55138 static void xics_eoi_direct(unsigned int virq)
55139 {
55140 - int cpu = smp_processor_id();
55141 unsigned int irq = (unsigned int)irq_map[virq].hwirq;
55142
55143 iosync();
55144 - direct_xirr_info_set(cpu, (0xff << 24) | irq);
55145 + direct_xirr_info_set((0xff << 24) | irq);
55146 }
55147
55148
55149 static void xics_eoi_lpar(unsigned int virq)
55150 {
55151 - int cpu = smp_processor_id();
55152 unsigned int irq = (unsigned int)irq_map[virq].hwirq;
55153
55154 iosync();
55155 - lpar_xirr_info_set(cpu, (0xff << 24) | irq);
55156 + lpar_xirr_info_set((0xff << 24) | irq);
55157 }
55158
55159 static inline unsigned int xics_remap_irq(unsigned int vec)
55160 @@ -312,16 +316,12 @@
55161
55162 static unsigned int xics_get_irq_direct(void)
55163 {
55164 - unsigned int cpu = smp_processor_id();
55165 -
55166 - return xics_remap_irq(direct_xirr_info_get(cpu));
55167 + return xics_remap_irq(direct_xirr_info_get());
55168 }
55169
55170 static unsigned int xics_get_irq_lpar(void)
55171 {
55172 - unsigned int cpu = smp_processor_id();
55173 -
55174 - return xics_remap_irq(lpar_xirr_info_get(cpu));
55175 + return xics_remap_irq(lpar_xirr_info_get());
55176 }
55177
55178 #ifdef CONFIG_SMP
55179 @@ -387,12 +387,12 @@
55180
55181 #endif /* CONFIG_SMP */
55182
55183 -static void xics_set_cpu_priority(int cpu, unsigned char cppr)
55184 +static void xics_set_cpu_priority(unsigned char cppr)
55185 {
55186 if (firmware_has_feature(FW_FEATURE_LPAR))
55187 - lpar_cppr_info(cpu, cppr);
55188 + lpar_cppr_info(cppr);
55189 else
55190 - direct_cppr_info(cpu, cppr);
55191 + direct_cppr_info(cppr);
55192 iosync();
55193 }
55194
55195 @@ -440,9 +440,7 @@
55196
55197 void xics_setup_cpu(void)
55198 {
55199 - int cpu = smp_processor_id();
55200 -
55201 - xics_set_cpu_priority(cpu, 0xff);
55202 + xics_set_cpu_priority(0xff);
55203
55204 /*
55205 * Put the calling processor into the GIQ. This is really only
55206 @@ -783,7 +781,7 @@
55207 unsigned int ipi;
55208 struct irq_desc *desc;
55209
55210 - xics_set_cpu_priority(cpu, 0);
55211 + xics_set_cpu_priority(0);
55212
55213 /*
55214 * Clear IPI
55215 @@ -824,10 +822,11 @@
55216 void xics_migrate_irqs_away(void)
55217 {
55218 int status;
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;
55222
55223 /* Reject any interrupt that was queued to us... */
55224 - xics_set_cpu_priority(cpu, 0);
55225 + xics_set_cpu_priority(0);
55226
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);
55231
55232 /* Allow IPIs again... */
55233 - xics_set_cpu_priority(cpu, DEFAULT_PRIORITY);
55234 + xics_set_cpu_priority(DEFAULT_PRIORITY);
55235
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
55240 * case.
55241 */
55242 - if (xics_status[0] != get_hard_smp_processor_id(cpu))
55243 + if (xics_status[0] != hw_cpu)
55244 goto unlock;
55245
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
55250 @@ -21,9 +21,6 @@
55251 extern void xics_request_IPIs(void);
55252 extern void xics_migrate_irqs_away(void);
55253
55254 -/* first argument is ignored for now*/
55255 -void pSeriesLP_cppr_info(int n_cpu, u8 value);
55256 -
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
55263 @@ -0,0 +1,8 @@
55264 +# For a description of the syntax of this configuration file,
55265 +# see Documentation/kbuild/kconfig-language.txt.
55266 +#
55267 +
55268 +config PPC4xx_PCI_EXPRESS
55269 + bool
55270 + depends on PCI && 4xx
55271 + default n
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
55275 @@ -2,7 +2,7 @@
55276 EXTRA_CFLAGS += -mno-minimal-toc
55277 endif
55278
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)
55282
55283 obj-$(CONFIG_PPC_MPC106) += grackle.o
55284 @@ -12,6 +12,7 @@
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/
55292 @@ -24,9 +25,13 @@
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
55303 +endif
55304 endif
55305
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
55310 @@ -42,8 +42,9 @@
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>
55318 +
55319 #include <asm/page.h>
55320 #include <asm/prom.h>
55321
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
55325 @@ -20,7 +20,7 @@
55326
55327
55328 /* ======================================================================== */
55329 -/* Generic task managment */
55330 +/* Generic task management */
55331 /* ======================================================================== */
55332
55333 /**
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 @@
55338 #endif
55339 }
55340
55341 +static DEFINE_SPINLOCK(cmd_lock);
55342 +
55343 +#define MAX_CR_CMD_LOOPS 10000
55344 +
55345 +int cpm_command(u32 command, u8 opcode)
55346 +{
55347 + int i, ret;
55348 + unsigned long flags;
55349 +
55350 + if (command & 0xffffff0f)
55351 + return -EINVAL;
55352 +
55353 + spin_lock_irqsave(&cmd_lock, flags);
55354 +
55355 + ret = 0;
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)
55359 + goto out;
55360 +
55361 + printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__);
55362 + ret = -EIO;
55363 +out:
55364 + spin_unlock_irqrestore(&cmd_lock, flags);
55365 + return ret;
55366 +}
55367 +EXPORT_SYMBOL(cpm_command);
55368 +
55369 /* We used to do this earlier, but have to postpone as long as possible
55370 * to ensure the kernel VM is now running.
55371 */
55372 @@ -408,7 +436,7 @@
55373 #endif /* !CONFIG_PPC_CPM_NEW_BINDING */
55374
55375 struct cpm_ioport16 {
55376 - __be16 dir, par, sor, dat, intr;
55377 + __be16 dir, par, odr_sor, dat, intr;
55378 __be16 res[3];
55379 };
55380
55381 @@ -438,6 +466,13 @@
55382 else
55383 clrbits32(&iop->par, pin);
55384
55385 + if (port == CPM_PORTB) {
55386 + if (flags & CPM_PIN_OPENDRAIN)
55387 + setbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
55388 + else
55389 + clrbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
55390 + }
55391 +
55392 if (port == CPM_PORTE) {
55393 if (flags & CPM_PIN_SECONDARY)
55394 setbits32(&iop->sor, pin);
55395 @@ -471,11 +506,17 @@
55396 else
55397 clrbits16(&iop->par, pin);
55398
55399 + if (port == CPM_PORTA) {
55400 + if (flags & CPM_PIN_OPENDRAIN)
55401 + setbits16(&iop->odr_sor, pin);
55402 + else
55403 + clrbits16(&iop->odr_sor, pin);
55404 + }
55405 if (port == CPM_PORTC) {
55406 if (flags & CPM_PIN_SECONDARY)
55407 - setbits16(&iop->sor, pin);
55408 + setbits16(&iop->odr_sor, pin);
55409 else
55410 - clrbits16(&iop->sor, pin);
55411 + clrbits16(&iop->odr_sor, pin);
55412 }
55413 }
55414
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
55418 @@ -82,6 +82,31 @@
55419 cpmp = &cpm2_immr->im_cpm;
55420 }
55421
55422 +static DEFINE_SPINLOCK(cmd_lock);
55423 +
55424 +#define MAX_CR_CMD_LOOPS 10000
55425 +
55426 +int cpm_command(u32 command, u8 opcode)
55427 +{
55428 + int i, ret;
55429 + unsigned long flags;
55430 +
55431 + spin_lock_irqsave(&cmd_lock, flags);
55432 +
55433 + ret = 0;
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)
55437 + goto out;
55438 +
55439 + printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__);
55440 + ret = -EIO;
55441 +out:
55442 + spin_unlock_irqrestore(&cmd_lock, flags);
55443 + return ret;
55444 +}
55445 +EXPORT_SYMBOL(cpm_command);
55446 +
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
55453 @@ -33,8 +33,8 @@
55454 struct ccsr_pci __iomem *pci;
55455 int i;
55456
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);
55462
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)
55474 - & 0x000fffff);
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)
55486 - & 0x000fffff);
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 @@
55492
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)
55500 - & 0x000fffff);
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)
55509 - & 0x000fffff);
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 @@
55515 }
55516 }
55517
55518 -static void __init quirk_fsl_pcie_transparent(struct pci_dev *dev)
55519 -{
55520 - struct resource *res;
55521 - int i, res_idx = PCI_BRIDGE_RESOURCES;
55522 - struct pci_controller *hose;
55523 +static int fsl_pcie_bus_fixup;
55524
55525 +static void __init quirk_fsl_pcie_header(struct pci_dev *dev)
55526 +{
55527 /* if we aren't a PCIe don't bother */
55528 if (!pci_find_capability(dev, PCI_CAP_ID_EXP))
55529 return ;
55530
55531 - /*
55532 - * Make the bridge be transparent.
55533 - */
55534 - dev->transparent = 1;
55535 -
55536 - hose = pci_bus_to_host(dev->bus);
55537 - if (!hose) {
55538 - printk(KERN_ERR "Can't find hose for bus %d\n",
55539 - dev->bus->number);
55540 - return;
55541 - }
55542 -
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);
55554 -
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);
55561 - }
55562 -
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);
55569 - }
55570 + dev->class = PCI_CLASS_BRIDGE_PCI << 8;
55571 + fsl_pcie_bus_fixup = 1;
55572 + return ;
55573 }
55574
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;
55578 int i;
55579
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)))
55589 + {
55590 + for (i = 0; i < 4; ++i) {
55591 + struct resource *res = bus->resource[i];
55592 + struct resource *par = bus->parent->resource[i];
55593 + if (res) {
55594 + res->start = 0;
55595 + res->end = 0;
55596 + res->flags = 0;
55597 + }
55598 + if (res && par) {
55599 + res->start = par->start;
55600 + res->end = par->end;
55601 + res->flags = par->flags;
55602 + }
55603 }
55604 }
55605 }
55606 @@ -202,7 +176,7 @@
55607 printk(KERN_WARNING "Can't get bus-range for %s, assume"
55608 " bus 0\n", dev->full_name);
55609
55610 - pci_assign_all_buses = 1;
55611 + ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
55612 hose = pcibios_alloc_controller(dev);
55613 if (!hose)
55614 return -ENOMEM;
55615 @@ -222,7 +196,7 @@
55616 hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
55617 }
55618
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,
55623 hose->last_busno);
55624 @@ -240,23 +214,23 @@
55625 return 0;
55626 }
55627
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
55671 @@ -0,0 +1,932 @@
55672 +/*
55673 + * MPC85xx RapidIO support
55674 + *
55675 + * Copyright 2005 MontaVista Software, Inc.
55676 + * Matt Porter <mporter@kernel.crashing.org>
55677 + *
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.
55682 + */
55683 +
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>
55691 +
55692 +#include <asm/io.h>
55693 +
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
55699 +
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
55707 +
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
55712 +
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
55719 +
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
55727 +
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))
55732 +
55733 +struct rio_atmu_regs {
55734 + u32 rowtar;
55735 + u32 pad1;
55736 + u32 rowbar;
55737 + u32 pad2;
55738 + u32 rowar;
55739 + u32 pad3[3];
55740 +};
55741 +
55742 +struct rio_msg_regs {
55743 + u32 omr;
55744 + u32 osr;
55745 + u32 pad1;
55746 + u32 odqdpar;
55747 + u32 pad2;
55748 + u32 osar;
55749 + u32 odpr;
55750 + u32 odatr;
55751 + u32 odcr;
55752 + u32 pad3;
55753 + u32 odqepar;
55754 + u32 pad4[13];
55755 + u32 imr;
55756 + u32 isr;
55757 + u32 pad5;
55758 + u32 ifqdpar;
55759 + u32 pad6;
55760 + u32 ifqepar;
55761 + u32 pad7[250];
55762 + u32 dmr;
55763 + u32 dsr;
55764 + u32 pad8;
55765 + u32 dqdpar;
55766 + u32 pad9;
55767 + u32 dqepar;
55768 + u32 pad10[26];
55769 + u32 pwmr;
55770 + u32 pwsr;
55771 + u32 pad11;
55772 + u32 pwqbar;
55773 +};
55774 +
55775 +struct rio_tx_desc {
55776 + u32 res1;
55777 + u32 saddr;
55778 + u32 dport;
55779 + u32 dattr;
55780 + u32 res2;
55781 + u32 res3;
55782 + u32 dwcnt;
55783 + u32 res4;
55784 +};
55785 +
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;
55793 +
55794 +static struct rio_dbell_ring {
55795 + void *virt;
55796 + dma_addr_t phys;
55797 +} dbell_ring;
55798 +
55799 +static struct rio_msg_tx_ring {
55800 + void *virt;
55801 + dma_addr_t phys;
55802 + void *virt_buffer[RIO_MAX_TX_RING_SIZE];
55803 + dma_addr_t phys_buffer[RIO_MAX_TX_RING_SIZE];
55804 + int tx_slot;
55805 + int size;
55806 + void *dev_id;
55807 +} msg_tx_ring;
55808 +
55809 +static struct rio_msg_rx_ring {
55810 + void *virt;
55811 + dma_addr_t phys;
55812 + void *virt_buffer[RIO_MAX_RX_RING_SIZE];
55813 + int rx_slot;
55814 + int size;
55815 + void *dev_id;
55816 +} msg_rx_ring;
55817 +
55818 +/**
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
55823 + *
55824 + * Sends a MPC85xx doorbell message. Returns %0 on success or
55825 + * %-EINVAL on failure.
55826 + */
55827 +static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data)
55828 +{
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);
55833 +
55834 + return 0;
55835 +}
55836 +
55837 +/**
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
55843 + *
55844 + * Generates a MPC85xx local configuration space read. Returns %0 on
55845 + * success or %-EINVAL on failure.
55846 + */
55847 +static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data)
55848 +{
55849 + pr_debug("mpc85xx_local_config_read: index %d offset %8.8x\n", index,
55850 + offset);
55851 + *data = in_be32((void *)(regs_win + offset));
55852 +
55853 + return 0;
55854 +}
55855 +
55856 +/**
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
55862 + *
55863 + * Generates a MPC85xx local configuration space write. Returns %0 on
55864 + * success or %-EINVAL on failure.
55865 + */
55866 +static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data)
55867 +{
55868 + pr_debug
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);
55872 +
55873 + return 0;
55874 +}
55875 +
55876 +/**
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
55884 + *
55885 + * Generates a MPC85xx read maintenance transaction. Returns %0 on
55886 + * success or %-EINVAL on failure.
55887 + */
55888 +static int
55889 +mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len,
55890 + u32 * val)
55891 +{
55892 + u8 *data;
55893 +
55894 + pr_debug
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));
55899 +
55900 + data = (u8 *) maint_win + offset;
55901 + switch (len) {
55902 + case 1:
55903 + *val = in_8((u8 *) data);
55904 + break;
55905 + case 2:
55906 + *val = in_be16((u16 *) data);
55907 + break;
55908 + default:
55909 + *val = in_be32((u32 *) data);
55910 + break;
55911 + }
55912 +
55913 + return 0;
55914 +}
55915 +
55916 +/**
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
55924 + *
55925 + * Generates an MPC85xx write maintenance transaction. Returns %0 on
55926 + * success or %-EINVAL on failure.
55927 + */
55928 +static int
55929 +mpc85xx_rio_config_write(int index, u16 destid, u8 hopcount, u32 offset,
55930 + int len, u32 val)
55931 +{
55932 + u8 *data;
55933 + pr_debug
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));
55938 +
55939 + data = (u8 *) maint_win + offset;
55940 + switch (len) {
55941 + case 1:
55942 + out_8((u8 *) data, val);
55943 + break;
55944 + case 2:
55945 + out_be16((u16 *) data, val);
55946 + break;
55947 + default:
55948 + out_be32((u32 *) data, val);
55949 + break;
55950 + }
55951 +
55952 + return 0;
55953 +}
55954 +
55955 +/**
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
55962 + *
55963 + * Adds the @buffer message to the MPC85xx outbound message queue. Returns
55964 + * %0 on success or %-EINVAL on failure.
55965 + */
55966 +int
55967 +rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox,
55968 + void *buffer, size_t len)
55969 +{
55970 + u32 omr;
55971 + struct rio_tx_desc *desc =
55972 + (struct rio_tx_desc *)msg_tx_ring.virt + msg_tx_ring.tx_slot;
55973 + int ret = 0;
55974 +
55975 + pr_debug
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);
55978 +
55979 + if ((len < 8) || (len > RIO_MAX_MSG_SIZE)) {
55980 + ret = -EINVAL;
55981 + goto out;
55982 + }
55983 +
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);
55990 +
55991 + /* Set mbox field for message */
55992 + desc->dport = mbox & 0x3;
55993 +
55994 + /* Enable EOMI interrupt, set priority, and set destid */
55995 + desc->dattr = 0x28000000 | (rdev->destid << 2);
55996 +
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);
55999 +
56000 + /* Set snooping and source buffer address */
56001 + desc->saddr = 0x00000004 | msg_tx_ring.phys_buffer[msg_tx_ring.tx_slot];
56002 +
56003 + /* Increment enqueue pointer */
56004 + omr = in_be32((void *)&msg_regs->omr);
56005 + out_be32((void *)&msg_regs->omr, omr | RIO_MSG_OMR_MUI);
56006 +
56007 + /* Go to next descriptor */
56008 + if (++msg_tx_ring.tx_slot == msg_tx_ring.size)
56009 + msg_tx_ring.tx_slot = 0;
56010 +
56011 + out:
56012 + return ret;
56013 +}
56014 +
56015 +EXPORT_SYMBOL_GPL(rio_hw_add_outb_message);
56016 +
56017 +/**
56018 + * mpc85xx_rio_tx_handler - MPC85xx outbound message interrupt handler
56019 + * @irq: Linux interrupt number
56020 + * @dev_instance: Pointer to interrupt-specific data
56021 + *
56022 + * Handles outbound message interrupts. Executes a register outbound
56023 + * mailbox event handler and acks the interrupt occurrence.
56024 + */
56025 +static irqreturn_t
56026 +mpc85xx_rio_tx_handler(int irq, void *dev_instance)
56027 +{
56028 + int osr;
56029 + struct rio_mport *port = (struct rio_mport *)dev_instance;
56030 +
56031 + osr = in_be32((void *)&msg_regs->osr);
56032 +
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);
56036 + goto out;
56037 + }
56038 +
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);
56042 + goto out;
56043 + }
56044 +
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);
56049 +
56050 + /* Ack the end-of-message interrupt */
56051 + out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_EOMI);
56052 + }
56053 +
56054 + out:
56055 + return IRQ_HANDLED;
56056 +}
56057 +
56058 +/**
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
56064 + *
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.
56068 + */
56069 +int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
56070 +{
56071 + int i, j, rc = 0;
56072 +
56073 + if ((entries < RIO_MIN_TX_RING_SIZE) ||
56074 + (entries > RIO_MAX_TX_RING_SIZE) || (!is_power_of_2(entries))) {
56075 + rc = -EINVAL;
56076 + goto out;
56077 + }
56078 +
56079 + /* Initialize shadow copy ring */
56080 + msg_tx_ring.dev_id = dev_id;
56081 + msg_tx_ring.size = entries;
56082 +
56083 + for (i = 0; i < msg_tx_ring.size; i++) {
56084 + if (!
56085 + (msg_tx_ring.virt_buffer[i] =
56086 + dma_alloc_coherent(NULL, RIO_MSG_BUFFER_SIZE,
56087 + &msg_tx_ring.phys_buffer[i],
56088 + GFP_KERNEL))) {
56089 + rc = -ENOMEM;
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,
56094 + msg_tx_ring.
56095 + virt_buffer[j],
56096 + msg_tx_ring.
56097 + phys_buffer[j]);
56098 + goto out;
56099 + }
56100 + }
56101 +
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,
56107 + GFP_KERNEL))) {
56108 + rc = -ENOMEM;
56109 + goto out_dma;
56110 + }
56111 + memset(msg_tx_ring.virt, 0, msg_tx_ring.size * RIO_MSG_DESC_SIZE);
56112 + msg_tx_ring.tx_slot = 0;
56113 +
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);
56117 +
56118 + /* Configure for snooping */
56119 + out_be32((void *)&msg_regs->osar, 0x00000004);
56120 +
56121 + /* Clear interrupt status */
56122 + out_be32((void *)&msg_regs->osr, 0x000000b3);
56123 +
56124 + /* Hook up outbound message handler */
56125 + if ((rc =
56126 + request_irq(MPC85xx_IRQ_RIO_TX, mpc85xx_rio_tx_handler, 0,
56127 + "msg_tx", (void *)mport)) < 0)
56128 + goto out_irq;
56129 +
56130 + /*
56131 + * Configure outbound message unit
56132 + * Snooping
56133 + * Interrupts (all enabled, except QEIE)
56134 + * Chaining mode
56135 + * Disable
56136 + */
56137 + out_be32((void *)&msg_regs->omr, 0x00100220);
56138 +
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));
56143 +
56144 + /* Now enable the unit */
56145 + out_be32((void *)&msg_regs->omr, in_be32((void *)&msg_regs->omr) | 0x1);
56146 +
56147 + out:
56148 + return rc;
56149 +
56150 + out_irq:
56151 + dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
56152 + msg_tx_ring.virt, msg_tx_ring.phys);
56153 +
56154 + out_dma:
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]);
56159 +
56160 + return rc;
56161 +}
56162 +
56163 +/**
56164 + * rio_close_outb_mbox - Shut down MPC85xx outbound mailbox
56165 + * @mport: Master port implementing the outbound message unit
56166 + * @mbox: Mailbox to close
56167 + *
56168 + * Disables the outbound message unit, free all buffers, and
56169 + * frees the outbound message interrupt.
56170 + */
56171 +void rio_close_outb_mbox(struct rio_mport *mport, int mbox)
56172 +{
56173 + /* Disable inbound message unit */
56174 + out_be32((void *)&msg_regs->omr, 0);
56175 +
56176 + /* Free ring */
56177 + dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
56178 + msg_tx_ring.virt, msg_tx_ring.phys);
56179 +
56180 + /* Free interrupt */
56181 + free_irq(MPC85xx_IRQ_RIO_TX, (void *)mport);
56182 +}
56183 +
56184 +/**
56185 + * mpc85xx_rio_rx_handler - MPC85xx inbound message interrupt handler
56186 + * @irq: Linux interrupt number
56187 + * @dev_instance: Pointer to interrupt-specific data
56188 + *
56189 + * Handles inbound message interrupts. Executes a registered inbound
56190 + * mailbox event handler and acks the interrupt occurrence.
56191 + */
56192 +static irqreturn_t
56193 +mpc85xx_rio_rx_handler(int irq, void *dev_instance)
56194 +{
56195 + int isr;
56196 + struct rio_mport *port = (struct rio_mport *)dev_instance;
56197 +
56198 + isr = in_be32((void *)&msg_regs->isr);
56199 +
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);
56203 + goto out;
56204 + }
56205 +
56206 + /* XXX Need to check/dispatch until queue empty */
56207 + if (isr & RIO_MSG_ISR_DIQI) {
56208 + /*
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
56212 + * argument.
56213 + */
56214 + port->inb_msg[0].mcback(port, msg_rx_ring.dev_id, -1, -1);
56215 +
56216 + /* Ack the queueing interrupt */
56217 + out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_DIQI);
56218 + }
56219 +
56220 + out:
56221 + return IRQ_HANDLED;
56222 +}
56223 +
56224 +/**
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
56230 + *
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.
56234 + */
56235 +int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
56236 +{
56237 + int i, rc = 0;
56238 +
56239 + if ((entries < RIO_MIN_RX_RING_SIZE) ||
56240 + (entries > RIO_MAX_RX_RING_SIZE) || (!is_power_of_2(entries))) {
56241 + rc = -EINVAL;
56242 + goto out;
56243 + }
56244 +
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;
56251 +
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,
56257 + GFP_KERNEL))) {
56258 + rc = -ENOMEM;
56259 + goto out;
56260 + }
56261 +
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);
56265 +
56266 + /* Clear interrupt status */
56267 + out_be32((void *)&msg_regs->isr, 0x00000091);
56268 +
56269 + /* Hook up inbound message handler */
56270 + if ((rc =
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]);
56276 + goto out;
56277 + }
56278 +
56279 + /*
56280 + * Configure inbound message unit:
56281 + * Snooping
56282 + * 4KB max message size
56283 + * Unmask all interrupt sources
56284 + * Disable
56285 + */
56286 + out_be32((void *)&msg_regs->imr, 0x001b0060);
56287 +
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));
56292 +
56293 + /* Now enable the unit */
56294 + out_be32((void *)&msg_regs->imr, in_be32((void *)&msg_regs->imr) | 0x1);
56295 +
56296 + out:
56297 + return rc;
56298 +}
56299 +
56300 +/**
56301 + * rio_close_inb_mbox - Shut down MPC85xx inbound mailbox
56302 + * @mport: Master port implementing the inbound message unit
56303 + * @mbox: Mailbox to close
56304 + *
56305 + * Disables the inbound message unit, free all buffers, and
56306 + * frees the inbound message interrupt.
56307 + */
56308 +void rio_close_inb_mbox(struct rio_mport *mport, int mbox)
56309 +{
56310 + /* Disable inbound message unit */
56311 + out_be32((void *)&msg_regs->imr, 0);
56312 +
56313 + /* Free ring */
56314 + dma_free_coherent(NULL, msg_rx_ring.size * RIO_MAX_MSG_SIZE,
56315 + msg_rx_ring.virt, msg_rx_ring.phys);
56316 +
56317 + /* Free interrupt */
56318 + free_irq(MPC85xx_IRQ_RIO_RX, (void *)mport);
56319 +}
56320 +
56321 +/**
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
56326 + *
56327 + * Adds the @buf buffer to the MPC85xx inbound message queue. Returns
56328 + * %0 on success or %-EINVAL on failure.
56329 + */
56330 +int rio_hw_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf)
56331 +{
56332 + int rc = 0;
56333 +
56334 + pr_debug("RIO: rio_hw_add_inb_buffer(), msg_rx_ring.rx_slot %d\n",
56335 + msg_rx_ring.rx_slot);
56336 +
56337 + if (msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot]) {
56338 + printk(KERN_ERR
56339 + "RIO: error adding inbound buffer %d, buffer exists\n",
56340 + msg_rx_ring.rx_slot);
56341 + rc = -EINVAL;
56342 + goto out;
56343 + }
56344 +
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;
56348 +
56349 + out:
56350 + return rc;
56351 +}
56352 +
56353 +EXPORT_SYMBOL_GPL(rio_hw_add_inb_buffer);
56354 +
56355 +/**
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
56359 + *
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.
56362 + */
56363 +void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox)
56364 +{
56365 + u32 imr;
56366 + u32 phys_buf, virt_buf;
56367 + void *buf = NULL;
56368 + int buf_idx;
56369 +
56370 + phys_buf = in_be32((void *)&msg_regs->ifqdpar);
56371 +
56372 + /* If no more messages, then bail out */
56373 + if (phys_buf == in_be32((void *)&msg_regs->ifqepar))
56374 + goto out2;
56375 +
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];
56379 +
56380 + if (!buf) {
56381 + printk(KERN_ERR
56382 + "RIO: inbound message copy failed, no buffers\n");
56383 + goto out1;
56384 + }
56385 +
56386 + /* Copy max message size, caller is expected to allocate that big */
56387 + memcpy(buf, (void *)virt_buf, RIO_MAX_MSG_SIZE);
56388 +
56389 + /* Clear the available buffer */
56390 + msg_rx_ring.virt_buffer[buf_idx] = NULL;
56391 +
56392 + out1:
56393 + imr = in_be32((void *)&msg_regs->imr);
56394 + out_be32((void *)&msg_regs->imr, imr | RIO_MSG_IMR_MI);
56395 +
56396 + out2:
56397 + return buf;
56398 +}
56399 +
56400 +EXPORT_SYMBOL_GPL(rio_hw_get_inb_message);
56401 +
56402 +/**
56403 + * mpc85xx_rio_dbell_handler - MPC85xx doorbell interrupt handler
56404 + * @irq: Linux interrupt number
56405 + * @dev_instance: Pointer to interrupt-specific data
56406 + *
56407 + * Handles doorbell interrupts. Parses a list of registered
56408 + * doorbell event handlers and executes a matching event handler.
56409 + */
56410 +static irqreturn_t
56411 +mpc85xx_rio_dbell_handler(int irq, void *dev_instance)
56412 +{
56413 + int dsr;
56414 + struct rio_mport *port = (struct rio_mport *)dev_instance;
56415 +
56416 + dsr = in_be32((void *)&msg_regs->dsr);
56417 +
56418 + if (dsr & DOORBELL_DSR_TE) {
56419 + pr_info("RIO: doorbell reception error\n");
56420 + out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_TE);
56421 + goto out;
56422 + }
56423 +
56424 + if (dsr & DOORBELL_DSR_QFI) {
56425 + pr_info("RIO: doorbell queue full\n");
56426 + out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_QFI);
56427 + goto out;
56428 + }
56429 +
56430 + /* XXX Need to check/dispatch until queue empty */
56431 + if (dsr & DOORBELL_DSR_DIQI) {
56432 + u32 dmsg =
56433 + (u32) dbell_ring.virt +
56434 + (in_be32((void *)&msg_regs->dqdpar) & 0xfff);
56435 + u32 dmr;
56436 + struct rio_dbell *dbell;
56437 + int found = 0;
56438 +
56439 + pr_debug
56440 + ("RIO: processing doorbell, sid %2.2x tid %2.2x info %4.4x\n",
56441 + DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
56442 +
56443 + list_for_each_entry(dbell, &port->dbells, node) {
56444 + if ((dbell->res->start <= DBELL_INF(dmsg)) &&
56445 + (dbell->res->end >= DBELL_INF(dmsg))) {
56446 + found = 1;
56447 + break;
56448 + }
56449 + }
56450 + if (found) {
56451 + dbell->dinb(port, dbell->dev_id, DBELL_SID(dmsg), DBELL_TID(dmsg),
56452 + DBELL_INF(dmsg));
56453 + } else {
56454 + pr_debug
56455 + ("RIO: spurious doorbell, sid %2.2x tid %2.2x info %4.4x\n",
56456 + DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
56457 + }
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);
56461 + }
56462 +
56463 + out:
56464 + return IRQ_HANDLED;
56465 +}
56466 +
56467 +/**
56468 + * mpc85xx_rio_doorbell_init - MPC85xx doorbell interface init
56469 + * @mport: Master port implementing the inbound doorbell unit
56470 + *
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.
56474 + */
56475 +static int mpc85xx_rio_doorbell_init(struct rio_mport *mport)
56476 +{
56477 + int rc = 0;
56478 +
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))) {
56483 + printk(KERN_ERR
56484 + "RIO: unable to map outbound doorbell window\n");
56485 + rc = -ENOMEM;
56486 + goto out;
56487 + }
56488 +
56489 + /* Initialize inbound doorbells */
56490 + if (!(dbell_ring.virt = dma_alloc_coherent(NULL,
56491 + 512 * DOORBELL_MESSAGE_SIZE,
56492 + &dbell_ring.phys,
56493 + GFP_KERNEL))) {
56494 + printk(KERN_ERR "RIO: unable allocate inbound doorbell ring\n");
56495 + rc = -ENOMEM;
56496 + iounmap((void *)dbell_win);
56497 + goto out;
56498 + }
56499 +
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);
56503 +
56504 + /* Clear interrupt status */
56505 + out_be32((void *)&msg_regs->dsr, 0x00000091);
56506 +
56507 + /* Hook up doorbell handler */
56508 + if ((rc =
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);
56514 + printk(KERN_ERR
56515 + "MPC85xx RIO: unable to request inbound doorbell irq");
56516 + goto out;
56517 + }
56518 +
56519 + /* Configure doorbells for snooping, 512 entries, and enable */
56520 + out_be32((void *)&msg_regs->dmr, 0x00108161);
56521 +
56522 + out:
56523 + return rc;
56524 +}
56525 +
56526 +static char *cmdline = NULL;
56527 +
56528 +static int mpc85xx_rio_get_hdid(int index)
56529 +{
56530 + /* XXX Need to parse multiple entries in some format */
56531 + if (!cmdline)
56532 + return -1;
56533 +
56534 + return simple_strtol(cmdline, NULL, 0);
56535 +}
56536 +
56537 +static int mpc85xx_rio_get_cmdline(char *s)
56538 +{
56539 + if (!s)
56540 + return 0;
56541 +
56542 + cmdline = s;
56543 + return 1;
56544 +}
56545 +
56546 +__setup("riohdid=", mpc85xx_rio_get_cmdline);
56547 +
56548 +/**
56549 + * mpc85xx_rio_setup - Setup MPC85xx RapidIO interface
56550 + * @law_start: Starting physical address of RapidIO LAW
56551 + * @law_size: Size of RapidIO LAW
56552 + *
56553 + * Initializes MPC85xx RapidIO hardware interface, configures
56554 + * master port with system-specific info, and registers the
56555 + * master port with the RapidIO subsystem.
56556 + */
56557 +void mpc85xx_rio_setup(int law_start, int law_size)
56558 +{
56559 + struct rio_ops *ops;
56560 + struct rio_mport *port;
56561 +
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;
56568 +
56569 + port = kmalloc(sizeof(struct rio_mport), GFP_KERNEL);
56570 + port->id = 0;
56571 + port->index = 0;
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;
56576 +
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");
56581 +
56582 + port->ops = ops;
56583 + port->host_deviceid = mpc85xx_rio_get_hdid(port->id);
56584 +
56585 + rio_register_mport(port);
56586 +
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);
56592 +
56593 + /* Configure maintenance transaction window */
56594 + out_be32((void *)&maint_atmu_regs->rowbar, 0x000c0000);
56595 + out_be32((void *)&maint_atmu_regs->rowar, 0x80077015);
56596 +
56597 + maint_win = (u32) ioremap(law_start, RIO_MAINT_WIN_SIZE);
56598 +
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);
56603 +}
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
56607 @@ -0,0 +1,20 @@
56608 +/*
56609 + * MPC85xx RapidIO definitions
56610 + *
56611 + * Copyright 2005 MontaVista Software, Inc.
56612 + * Matt Porter <mporter@kernel.crashing.org>
56613 + *
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.
56618 + */
56619 +
56620 +#ifndef __PPC_SYSLIB_PPC85XX_RIO_H
56621 +#define __PPC_SYSLIB_PPC85XX_RIO_H
56622 +
56623 +#include <linux/init.h>
56624 +
56625 +extern void mpc85xx_rio_setup(int law_start, int law_size);
56626 +
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
56631 @@ -24,6 +24,7 @@
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");
56641 if (soc) {
56642 int size;
56643 - const void *prop = of_get_property(soc, "reg", &size);
56644 + u32 naddr;
56645 + const u32 *prop = of_get_property(soc, "#address-cells", &size);
56646
56647 + if (prop && size == 4)
56648 + naddr = *prop;
56649 + else
56650 + naddr = 2;
56651 +
56652 + prop = of_get_property(soc, "ranges", &size);
56653 if (prop)
56654 - immrbase = of_translate_address(soc, prop);
56655 + immrbase = of_translate_address(soc, prop + naddr);
56656 +
56657 of_node_put(soc);
56658 }
56659
56660 @@ -130,17 +139,51 @@
56661 EXPORT_SYMBOL(get_baudrate);
56662 #endif /* CONFIG_CPM2 */
56663
56664 -static int __init gfar_mdio_of_init(void)
56665 +#ifdef CONFIG_FIXED_PHY
56666 +static int __init of_add_fixed_phys(void)
56667 {
56668 + int ret;
56669 struct device_node *np;
56670 - unsigned int i;
56671 + u32 *fixed_link;
56672 + struct fixed_phy_status status = {};
56673 +
56674 + for_each_node_by_name(np, "ethernet") {
56675 + fixed_link = (u32 *)of_get_property(np, "fixed-link", NULL);
56676 + if (!fixed_link)
56677 + continue;
56678 +
56679 + status.link = 1;
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];
56684 +
56685 + ret = fixed_phy_add(PHY_POLL, fixed_link[0], &status);
56686 + if (ret) {
56687 + of_node_put(np);
56688 + return ret;
56689 + }
56690 + }
56691 +
56692 + return 0;
56693 +}
56694 +arch_initcall(of_add_fixed_phys);
56695 +#endif /* CONFIG_FIXED_PHY */
56696 +
56697 +static int __init gfar_mdio_of_init(void)
56698 +{
56699 + struct device_node *np = NULL;
56700 struct platform_device *mdio_dev;
56701 struct resource res;
56702 int ret;
56703
56704 - for (np = NULL, i = 0;
56705 - (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL;
56706 - i++) {
56707 + np = of_find_compatible_node(np, NULL, "fsl,gianfar-mdio");
56708 +
56709 + /* try the deprecated version */
56710 + if (!np)
56711 + np = of_find_compatible_node(np, "mdio", "gianfar");
56712 +
56713 + if (np) {
56714 int k;
56715 struct device_node *child = NULL;
56716 struct gianfar_mdio_data mdio_data;
56717 @@ -179,11 +222,13 @@
56718 goto unreg;
56719 }
56720
56721 + of_node_put(np);
56722 return 0;
56723
56724 unreg:
56725 platform_device_unregister(mdio_dev);
56726 err:
56727 + of_node_put(np);
56728 return ret;
56729 }
56730
56731 @@ -193,7 +238,6 @@
56732 static const char *gfar_rx_intr = "rx";
56733 static const char *gfar_err_intr = "error";
56734
56735 -
56736 static int __init gfar_of_init(void)
56737 {
56738 struct device_node *np;
56739 @@ -277,29 +321,43 @@
56740 gfar_data.interface = PHY_INTERFACE_MODE_MII;
56741
56742 ph = of_get_property(np, "phy-handle", NULL);
56743 - phy = of_find_node_by_phandle(*ph);
56744 + if (ph == NULL) {
56745 + u32 *fixed_link;
56746
56747 - if (phy == NULL) {
56748 - ret = -ENODEV;
56749 - goto unreg;
56750 - }
56751 + fixed_link = (u32 *)of_get_property(np, "fixed-link",
56752 + NULL);
56753 + if (!fixed_link) {
56754 + ret = -ENODEV;
56755 + goto unreg;
56756 + }
56757
56758 - mdio = of_get_parent(phy);
56759 + gfar_data.bus_id = 0;
56760 + gfar_data.phy_id = fixed_link[0];
56761 + } else {
56762 + phy = of_find_node_by_phandle(*ph);
56763 +
56764 + if (phy == NULL) {
56765 + ret = -ENODEV;
56766 + goto unreg;
56767 + }
56768 +
56769 + mdio = of_get_parent(phy);
56770 +
56771 + id = of_get_property(phy, "reg", NULL);
56772 + ret = of_address_to_resource(mdio, 0, &res);
56773 + if (ret) {
56774 + of_node_put(phy);
56775 + of_node_put(mdio);
56776 + goto unreg;
56777 + }
56778 +
56779 + gfar_data.phy_id = *id;
56780 + gfar_data.bus_id = res.start;
56781
56782 - id = of_get_property(phy, "reg", NULL);
56783 - ret = of_address_to_resource(mdio, 0, &res);
56784 - if (ret) {
56785 of_node_put(phy);
56786 of_node_put(mdio);
56787 - goto unreg;
56788 }
56789
56790 - gfar_data.phy_id = *id;
56791 - gfar_data.bus_id = res.start;
56792 -
56793 - of_node_put(phy);
56794 - of_node_put(mdio);
56795 -
56796 ret =
56797 platform_device_add_data(gfar_dev, &gfar_data,
56798 sizeof(struct
56799 @@ -390,13 +448,11 @@
56800 static int __init fsl_i2c_of_init(void)
56801 {
56802 struct device_node *np;
56803 - unsigned int i;
56804 + unsigned int i = 0;
56805 struct platform_device *i2c_dev;
56806 int ret;
56807
56808 - for (np = NULL, i = 0;
56809 - (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL;
56810 - i++) {
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 @@
56816 if (ret)
56817 goto unreg;
56818
56819 - of_register_i2c_devices(np, i);
56820 + of_register_i2c_devices(np, i++);
56821 }
56822
56823 return 0;
56824 @@ -528,14 +584,12 @@
56825 static int __init fsl_usb_of_init(void)
56826 {
56827 struct device_node *np;
56828 - unsigned int i;
56829 + unsigned int i = 0;
56830 struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL,
56831 *usb_dev_dr_client = NULL;
56832 int ret;
56833
56834 - for (np = NULL, i = 0;
56835 - (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL;
56836 - i++) {
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));
56843 if (ret)
56844 goto unreg_mph;
56845 + i++;
56846 }
56847
56848 - for (np = NULL;
56849 - (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL;
56850 - i++) {
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))))
56857 goto unreg_dr;
56858 }
56859 + i++;
56860 }
56861 return 0;
56862
56863 @@ -1125,13 +1179,12 @@
56864
56865 static int __init fsl_pcmcia_of_init(void)
56866 {
56867 - struct device_node *np = NULL;
56868 + struct device_node *np;
56869 /*
56870 * Register all the devices which type is "pcmcia"
56871 */
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);
56877 return 0;
56878 }
56879
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
56883 @@ -57,7 +57,7 @@
56884 {
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 @@
56896 #include "ipic.h"
56897
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);
56901
56902 static struct ipic_info ipic_info[] = {
56903 + [1] = {
56904 + .mask = IPIC_SIMSR_H,
56905 + .prio = IPIC_SIPRR_C,
56906 + .force = IPIC_SIFCR_H,
56907 + .bit = 16,
56908 + .prio_mask = 0,
56909 + },
56910 + [2] = {
56911 + .mask = IPIC_SIMSR_H,
56912 + .prio = IPIC_SIPRR_C,
56913 + .force = IPIC_SIFCR_H,
56914 + .bit = 17,
56915 + .prio_mask = 1,
56916 + },
56917 + [3] = {
56918 + .mask = IPIC_SIMSR_H,
56919 + .prio = IPIC_SIPRR_C,
56920 + .force = IPIC_SIFCR_H,
56921 + .bit = 18,
56922 + .prio_mask = 2,
56923 + },
56924 + [4] = {
56925 + .mask = IPIC_SIMSR_H,
56926 + .prio = IPIC_SIPRR_C,
56927 + .force = IPIC_SIFCR_H,
56928 + .bit = 19,
56929 + .prio_mask = 3,
56930 + },
56931 + [5] = {
56932 + .mask = IPIC_SIMSR_H,
56933 + .prio = IPIC_SIPRR_C,
56934 + .force = IPIC_SIFCR_H,
56935 + .bit = 20,
56936 + .prio_mask = 4,
56937 + },
56938 + [6] = {
56939 + .mask = IPIC_SIMSR_H,
56940 + .prio = IPIC_SIPRR_C,
56941 + .force = IPIC_SIFCR_H,
56942 + .bit = 21,
56943 + .prio_mask = 5,
56944 + },
56945 + [7] = {
56946 + .mask = IPIC_SIMSR_H,
56947 + .prio = IPIC_SIPRR_C,
56948 + .force = IPIC_SIFCR_H,
56949 + .bit = 22,
56950 + .prio_mask = 6,
56951 + },
56952 + [8] = {
56953 + .mask = IPIC_SIMSR_H,
56954 + .prio = IPIC_SIPRR_C,
56955 + .force = IPIC_SIFCR_H,
56956 + .bit = 23,
56957 + .prio_mask = 7,
56958 + },
56959 [9] = {
56960 - .pend = IPIC_SIPNR_H,
56961 .mask = IPIC_SIMSR_H,
56962 .prio = IPIC_SIPRR_D,
56963 .force = IPIC_SIFCR_H,
56964 @@ -42,7 +98,6 @@
56965 .prio_mask = 0,
56966 },
56967 [10] = {
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 @@
56973 .prio_mask = 1,
56974 },
56975 [11] = {
56976 - .pend = IPIC_SIPNR_H,
56977 .mask = IPIC_SIMSR_H,
56978 .prio = IPIC_SIPRR_D,
56979 .force = IPIC_SIFCR_H,
56980 .bit = 26,
56981 .prio_mask = 2,
56982 },
56983 + [12] = {
56984 + .mask = IPIC_SIMSR_H,
56985 + .prio = IPIC_SIPRR_D,
56986 + .force = IPIC_SIFCR_H,
56987 + .bit = 27,
56988 + .prio_mask = 3,
56989 + },
56990 + [13] = {
56991 + .mask = IPIC_SIMSR_H,
56992 + .prio = IPIC_SIPRR_D,
56993 + .force = IPIC_SIFCR_H,
56994 + .bit = 28,
56995 + .prio_mask = 4,
56996 + },
56997 [14] = {
56998 - .pend = IPIC_SIPNR_H,
56999 .mask = IPIC_SIMSR_H,
57000 .prio = IPIC_SIPRR_D,
57001 .force = IPIC_SIFCR_H,
57002 @@ -66,7 +133,6 @@
57003 .prio_mask = 5,
57004 },
57005 [15] = {
57006 - .pend = IPIC_SIPNR_H,
57007 .mask = IPIC_SIMSR_H,
57008 .prio = IPIC_SIPRR_D,
57009 .force = IPIC_SIFCR_H,
57010 @@ -74,7 +140,6 @@
57011 .prio_mask = 6,
57012 },
57013 [16] = {
57014 - .pend = IPIC_SIPNR_H,
57015 .mask = IPIC_SIMSR_H,
57016 .prio = IPIC_SIPRR_D,
57017 .force = IPIC_SIFCR_H,
57018 @@ -82,7 +147,7 @@
57019 .prio_mask = 7,
57020 },
57021 [17] = {
57022 - .pend = IPIC_SEPNR,
57023 + .ack = IPIC_SEPNR,
57024 .mask = IPIC_SEMSR,
57025 .prio = IPIC_SMPRR_A,
57026 .force = IPIC_SEFCR,
57027 @@ -90,7 +155,7 @@
57028 .prio_mask = 5,
57029 },
57030 [18] = {
57031 - .pend = IPIC_SEPNR,
57032 + .ack = IPIC_SEPNR,
57033 .mask = IPIC_SEMSR,
57034 .prio = IPIC_SMPRR_A,
57035 .force = IPIC_SEFCR,
57036 @@ -98,7 +163,7 @@
57037 .prio_mask = 6,
57038 },
57039 [19] = {
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 @@
57046 .prio_mask = 7,
57047 },
57048 [20] = {
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 @@
57055 .prio_mask = 4,
57056 },
57057 [21] = {
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 @@
57064 .prio_mask = 5,
57065 },
57066 [22] = {
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 @@
57073 .prio_mask = 6,
57074 },
57075 [23] = {
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 @@
57082 .prio_mask = 7,
57083 },
57084 [32] = {
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 @@
57090 .prio_mask = 0,
57091 },
57092 [33] = {
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 @@
57098 .prio_mask = 1,
57099 },
57100 [34] = {
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 @@
57106 .prio_mask = 2,
57107 },
57108 [35] = {
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 @@
57114 .prio_mask = 3,
57115 },
57116 [36] = {
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 @@
57122 .prio_mask = 4,
57123 },
57124 [37] = {
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 @@
57130 .prio_mask = 5,
57131 },
57132 [38] = {
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 @@
57138 .prio_mask = 6,
57139 },
57140 [39] = {
57141 - .pend = IPIC_SIPNR_H,
57142 .mask = IPIC_SIMSR_H,
57143 .prio = IPIC_SIPRR_A,
57144 .force = IPIC_SIFCR_H,
57145 .bit = 7,
57146 .prio_mask = 7,
57147 },
57148 + [40] = {
57149 + .mask = IPIC_SIMSR_H,
57150 + .prio = IPIC_SIPRR_B,
57151 + .force = IPIC_SIFCR_H,
57152 + .bit = 8,
57153 + .prio_mask = 0,
57154 + },
57155 + [41] = {
57156 + .mask = IPIC_SIMSR_H,
57157 + .prio = IPIC_SIPRR_B,
57158 + .force = IPIC_SIFCR_H,
57159 + .bit = 9,
57160 + .prio_mask = 1,
57161 + },
57162 + [42] = {
57163 + .mask = IPIC_SIMSR_H,
57164 + .prio = IPIC_SIPRR_B,
57165 + .force = IPIC_SIFCR_H,
57166 + .bit = 10,
57167 + .prio_mask = 2,
57168 + },
57169 + [43] = {
57170 + .mask = IPIC_SIMSR_H,
57171 + .prio = IPIC_SIPRR_B,
57172 + .force = IPIC_SIFCR_H,
57173 + .bit = 11,
57174 + .prio_mask = 3,
57175 + },
57176 + [44] = {
57177 + .mask = IPIC_SIMSR_H,
57178 + .prio = IPIC_SIPRR_B,
57179 + .force = IPIC_SIFCR_H,
57180 + .bit = 12,
57181 + .prio_mask = 4,
57182 + },
57183 + [45] = {
57184 + .mask = IPIC_SIMSR_H,
57185 + .prio = IPIC_SIPRR_B,
57186 + .force = IPIC_SIFCR_H,
57187 + .bit = 13,
57188 + .prio_mask = 5,
57189 + },
57190 + [46] = {
57191 + .mask = IPIC_SIMSR_H,
57192 + .prio = IPIC_SIPRR_B,
57193 + .force = IPIC_SIFCR_H,
57194 + .bit = 14,
57195 + .prio_mask = 6,
57196 + },
57197 + [47] = {
57198 + .mask = IPIC_SIMSR_H,
57199 + .prio = IPIC_SIPRR_B,
57200 + .force = IPIC_SIFCR_H,
57201 + .bit = 15,
57202 + .prio_mask = 7,
57203 + },
57204 [48] = {
57205 - .pend = IPIC_SEPNR,
57206 .mask = IPIC_SEMSR,
57207 .prio = IPIC_SMPRR_A,
57208 .force = IPIC_SEFCR,
57209 @@ -210,7 +322,6 @@
57210 .prio_mask = 4,
57211 },
57212 [64] = {
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 @@
57218 .prio_mask = 0,
57219 },
57220 [65] = {
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 @@
57226 .prio_mask = 1,
57227 },
57228 [66] = {
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 @@
57234 .prio_mask = 2,
57235 },
57236 [67] = {
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 @@
57242 .prio_mask = 3,
57243 },
57244 [68] = {
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 @@
57250 .prio_mask = 0,
57251 },
57252 [69] = {
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 @@
57258 .prio_mask = 1,
57259 },
57260 [70] = {
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 @@
57266 .prio_mask = 2,
57267 },
57268 [71] = {
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 @@
57274 .prio_mask = 3,
57275 },
57276 [72] = {
57277 - .pend = IPIC_SIPNR_L,
57278 .mask = IPIC_SIMSR_L,
57279 .prio = 0,
57280 .force = IPIC_SIFCR_L,
57281 .bit = 8,
57282 },
57283 [73] = {
57284 - .pend = IPIC_SIPNR_L,
57285 .mask = IPIC_SIMSR_L,
57286 .prio = 0,
57287 .force = IPIC_SIFCR_L,
57288 .bit = 9,
57289 },
57290 [74] = {
57291 - .pend = IPIC_SIPNR_L,
57292 .mask = IPIC_SIMSR_L,
57293 .prio = 0,
57294 .force = IPIC_SIFCR_L,
57295 .bit = 10,
57296 },
57297 [75] = {
57298 - .pend = IPIC_SIPNR_L,
57299 .mask = IPIC_SIMSR_L,
57300 .prio = 0,
57301 .force = IPIC_SIFCR_L,
57302 .bit = 11,
57303 },
57304 [76] = {
57305 - .pend = IPIC_SIPNR_L,
57306 .mask = IPIC_SIMSR_L,
57307 .prio = 0,
57308 .force = IPIC_SIFCR_L,
57309 .bit = 12,
57310 },
57311 [77] = {
57312 - .pend = IPIC_SIPNR_L,
57313 .mask = IPIC_SIMSR_L,
57314 .prio = 0,
57315 .force = IPIC_SIFCR_L,
57316 .bit = 13,
57317 },
57318 [78] = {
57319 - .pend = IPIC_SIPNR_L,
57320 .mask = IPIC_SIMSR_L,
57321 .prio = 0,
57322 .force = IPIC_SIFCR_L,
57323 .bit = 14,
57324 },
57325 [79] = {
57326 - .pend = IPIC_SIPNR_L,
57327 .mask = IPIC_SIMSR_L,
57328 .prio = 0,
57329 .force = IPIC_SIFCR_L,
57330 .bit = 15,
57331 },
57332 [80] = {
57333 - .pend = IPIC_SIPNR_L,
57334 .mask = IPIC_SIMSR_L,
57335 .prio = 0,
57336 .force = IPIC_SIFCR_L,
57337 .bit = 16,
57338 },
57339 + [81] = {
57340 + .mask = IPIC_SIMSR_L,
57341 + .prio = 0,
57342 + .force = IPIC_SIFCR_L,
57343 + .bit = 17,
57344 + },
57345 + [82] = {
57346 + .mask = IPIC_SIMSR_L,
57347 + .prio = 0,
57348 + .force = IPIC_SIFCR_L,
57349 + .bit = 18,
57350 + },
57351 + [83] = {
57352 + .mask = IPIC_SIMSR_L,
57353 + .prio = 0,
57354 + .force = IPIC_SIFCR_L,
57355 + .bit = 19,
57356 + },
57357 [84] = {
57358 - .pend = IPIC_SIPNR_L,
57359 .mask = IPIC_SIMSR_L,
57360 .prio = 0,
57361 .force = IPIC_SIFCR_L,
57362 .bit = 20,
57363 },
57364 [85] = {
57365 - .pend = IPIC_SIPNR_L,
57366 .mask = IPIC_SIMSR_L,
57367 .prio = 0,
57368 .force = IPIC_SIFCR_L,
57369 .bit = 21,
57370 },
57371 + [86] = {
57372 + .mask = IPIC_SIMSR_L,
57373 + .prio = 0,
57374 + .force = IPIC_SIFCR_L,
57375 + .bit = 22,
57376 + },
57377 + [87] = {
57378 + .mask = IPIC_SIMSR_L,
57379 + .prio = 0,
57380 + .force = IPIC_SIFCR_L,
57381 + .bit = 23,
57382 + },
57383 + [88] = {
57384 + .mask = IPIC_SIMSR_L,
57385 + .prio = 0,
57386 + .force = IPIC_SIFCR_L,
57387 + .bit = 24,
57388 + },
57389 + [89] = {
57390 + .mask = IPIC_SIMSR_L,
57391 + .prio = 0,
57392 + .force = IPIC_SIFCR_L,
57393 + .bit = 25,
57394 + },
57395 [90] = {
57396 - .pend = IPIC_SIPNR_L,
57397 .mask = IPIC_SIMSR_L,
57398 .prio = 0,
57399 .force = IPIC_SIFCR_L,
57400 .bit = 26,
57401 },
57402 [91] = {
57403 - .pend = IPIC_SIPNR_L,
57404 .mask = IPIC_SIMSR_L,
57405 .prio = 0,
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);
57410
57411 + /* mb() can't guarantee that masking is finished. But it does finish
57412 + * for nearly all cases. */
57413 + mb();
57414 +
57415 spin_unlock_irqrestore(&ipic_lock, flags);
57416 }
57417
57418 @@ -424,9 +561,13 @@
57419
57420 spin_lock_irqsave(&ipic_lock, flags);
57421
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);
57427 +
57428 + /* mb() can't guarantee that ack is finished. But it does finish
57429 + * for nearly all cases. */
57430 + mb();
57431
57432 spin_unlock_irqrestore(&ipic_lock, flags);
57433 }
57434 @@ -444,9 +585,13 @@
57435 temp &= ~(1 << (31 - ipic_info[src].bit));
57436 ipic_write(ipic->regs, ipic_info[src].mask, temp);
57437
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);
57443 +
57444 + /* mb() can't guarantee that ack is finished. But it does finish
57445 + * for nearly all cases. */
57446 + mb();
57447
57448 spin_unlock_irqrestore(&ipic_lock, flags);
57449 }
57450 @@ -468,14 +613,22 @@
57451 flow_type);
57452 return -EINVAL;
57453 }
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 "
57457 + "interrupts\n");
57458 + return -EINVAL;
57459 + }
57460
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;
57467 } else {
57468 desc->handle_irq = handle_edge_irq;
57469 + desc->chip = &ipic_edge_irq_chip;
57470 }
57471
57472 /* only EXT IRQ senses are programmable on ipic
57473 @@ -500,7 +653,16 @@
57474 return 0;
57475 }
57476
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,
57485 +};
57486 +
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)
57493 {
57494 struct ipic *ipic = h->host_data;
57495 - struct irq_chip *chip;
57496 -
57497 - /* Default chip */
57498 - chip = &ipic->hc_irq;
57499
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);
57503
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);
57508
57509 ipic->irqhost->host_data = ipic;
57510 - ipic->hc_irq = ipic_irq_chip;
57511
57512 /* init hw */
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;
57528
57529 - ipic_write(ipic->regs, IPIC_SICNR, temp);
57530 + ipic_write(ipic->regs, IPIC_SICFR, temp);
57531
57532 /* handle MCP route */
57533 temp = 0;
57534 @@ -672,10 +833,12 @@
57535
57536 void ipic_set_default_priority(void)
57537 {
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);
57548 }
57549
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
57556
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
57563
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 @@
57572
57573 /* The remapper for this IPIC */
57574 struct irq_host *irqhost;
57575 -
57576 - /* The "linux" controller struct */
57577 - struct irq_chip hc_irq;
57578 };
57579
57580 struct ipic_info {
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
57590 @@ -99,7 +99,7 @@
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");
57596 ret = -EIO;
57597 goto out;
57598 }
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
57602 @@ -83,6 +83,7 @@
57603 MPIC_CPU_WHOAMI,
57604 MPIC_CPU_INTACK,
57605 MPIC_CPU_EOI,
57606 + MPIC_CPU_MCACK,
57607
57608 MPIC_IRQ_BASE,
57609 MPIC_IRQ_STRIDE,
57610 @@ -121,6 +122,7 @@
57611 TSI108_CPU_WHOAMI,
57612 TSI108_CPU_INTACK,
57613 TSI108_CPU_EOI,
57614 + TSI108_CPU_MCACK,
57615
57616 TSI108_IRQ_BASE,
57617 TSI108_IRQ_STRIDE,
57618 @@ -265,7 +267,7 @@
57619 */
57620
57621
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,
57625 unsigned int size)
57626 {
57627 @@ -285,7 +287,7 @@
57628 BUG_ON(!DCR_MAP_OK(rb->dhost));
57629 }
57630
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,
57634 unsigned int size)
57635 {
57636 @@ -612,12 +614,11 @@
57637 }
57638
57639 #ifdef CONFIG_SMP
57640 -static irqreturn_t mpic_ipi_action(int irq, void *dev_id)
57641 +static irqreturn_t mpic_ipi_action(int irq, void *data)
57642 {
57643 - struct mpic *mpic;
57644 + long ipi = (long)data;
57645
57646 - mpic = mpic_find(irq, NULL);
57647 - smp_message_recv(mpic_irq_to_hw(irq) - mpic->ipi_vecs[0]);
57648 + smp_message_recv(ipi);
57649
57650 return IRQ_HANDLED;
57651 }
57652 @@ -842,6 +843,24 @@
57653 return 0;
57654 }
57655
57656 +void mpic_set_vector(unsigned int virq, unsigned int vector)
57657 +{
57658 + struct mpic *mpic = mpic_from_irq(virq);
57659 + unsigned int src = mpic_irq_to_hw(virq);
57660 + unsigned int vecpri;
57661 +
57662 + DBG("mpic: set_vector(mpic:@%p,virq:%d,src:%d,vector:0x%x)\n",
57663 + mpic, virq, src, vector);
57664 +
57665 + if (src >= mpic->irq_count)
57666 + return;
57667 +
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);
57672 +}
57673 +
57674 static struct irq_chip mpic_irq_chip = {
57675 .mask = mpic_mask_irq,
57676 .unmask = mpic_unmask_irq,
57677 @@ -1109,6 +1128,11 @@
57678 mb();
57679 }
57680
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);
57685 +
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);
57691 }
57692
57693 + mpic_pasemi_msi_init(mpic);
57694 +
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);
57701
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);
57706 +
57707 /* Set current processor priority to 0 */
57708 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0);
57709
57710 @@ -1419,13 +1450,13 @@
57711 mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0]));
57712 }
57713
57714 -unsigned int mpic_get_one_irq(struct mpic *mpic)
57715 +static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)
57716 {
57717 u32 src;
57718
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);
57721 #ifdef DEBUG_LOW
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);
57724 #endif
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);
57729 }
57730
57731 +unsigned int mpic_get_one_irq(struct mpic *mpic)
57732 +{
57733 + return _mpic_get_one_irq(mpic, MPIC_INFO(CPU_INTACK));
57734 +}
57735 +
57736 unsigned int mpic_get_irq(void)
57737 {
57738 struct mpic *mpic = mpic_primary;
57739 @@ -1452,12 +1488,20 @@
57740 return mpic_get_one_irq(mpic);
57741 }
57742
57743 +unsigned int mpic_get_mcirq(void)
57744 +{
57745 + struct mpic *mpic = mpic_primary;
57746 +
57747 + BUG_ON(mpic == NULL);
57748 +
57749 + return _mpic_get_one_irq(mpic, MPIC_INFO(CPU_MCACK));
57750 +}
57751
57752 #ifdef CONFIG_SMP
57753 void mpic_request_ipis(void)
57754 {
57755 struct mpic *mpic = mpic_primary;
57756 - int i, err;
57757 + long i, err;
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);
57767 break;
57768 }
57769 err = request_irq(vipi, mpic_ipi_action,
57770 IRQF_DISABLED|IRQF_PERCPU,
57771 - ipi_names[i], mpic);
57772 + ipi_names[i], (void *)i);
57773 if (err) {
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",
57776 vipi, i);
57777 break;
57778 }
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
57782 @@ -17,6 +17,7 @@
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);
57787 #else
57788 static inline void mpic_msi_reserve_hwirq(struct mpic *mpic,
57789 irq_hw_number_t hwirq)
57790 @@ -28,12 +29,15 @@
57791 {
57792 return -1;
57793 }
57794 +
57795 +static inline int mpic_pasemi_msi_init(struct mpic *mpic)
57796 +{
57797 + return -1;
57798 +}
57799 #endif
57800
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);
57807
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
57812 @@ -0,0 +1,172 @@
57813 +/*
57814 + * Copyright 2007, Olof Johansson, PA Semi
57815 + *
57816 + * Based on arch/powerpc/sysdev/mpic_u3msi.c:
57817 + *
57818 + * Copyright 2006, Segher Boessenkool, IBM Corporation.
57819 + * Copyright 2006-2007, Michael Ellerman, IBM Corporation.
57820 + *
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
57824 + * License.
57825 + *
57826 + */
57827 +
57828 +#undef DEBUG
57829 +
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>
57837 +
57838 +#include "mpic.h"
57839 +
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.
57844 + */
57845 +#define ALLOC_CHUNK 16
57846 +
57847 +#define PASEMI_MSI_ADDR 0xfc080000
57848 +
57849 +/* A bit ugly, can we get this from the pci_dev somehow? */
57850 +static struct mpic *msi_mpic;
57851 +
57852 +
57853 +static void mpic_pasemi_msi_mask_irq(unsigned int irq)
57854 +{
57855 + pr_debug("mpic_pasemi_msi_mask_irq %d\n", irq);
57856 + mask_msi_irq(irq);
57857 + mpic_mask_irq(irq);
57858 +}
57859 +
57860 +static void mpic_pasemi_msi_unmask_irq(unsigned int irq)
57861 +{
57862 + pr_debug("mpic_pasemi_msi_unmask_irq %d\n", irq);
57863 + mpic_unmask_irq(irq);
57864 + unmask_msi_irq(irq);
57865 +}
57866 +
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 ",
57875 +};
57876 +
57877 +static int pasemi_msi_check_device(struct pci_dev *pdev, int nvec, int type)
57878 +{
57879 + if (type == PCI_CAP_ID_MSIX)
57880 + pr_debug("pasemi_msi: MSI-X untested, trying anyway\n");
57881 +
57882 + return 0;
57883 +}
57884 +
57885 +static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev)
57886 +{
57887 + struct msi_desc *entry;
57888 +
57889 + pr_debug("pasemi_msi_teardown_msi_irqs, pdev %p\n", pdev);
57890 +
57891 + list_for_each_entry(entry, &pdev->msi_list, list) {
57892 + if (entry->irq == NO_IRQ)
57893 + continue;
57894 +
57895 + set_irq_msi(entry->irq, NULL);
57896 + mpic_msi_free_hwirqs(msi_mpic, virq_to_hw(entry->irq),
57897 + ALLOC_CHUNK);
57898 + irq_dispose_mapping(entry->irq);
57899 + }
57900 +
57901 + return;
57902 +}
57903 +
57904 +static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
57905 +{
57906 + irq_hw_number_t hwirq;
57907 + unsigned int virq;
57908 + struct msi_desc *entry;
57909 + struct msi_msg msg;
57910 + u64 addr;
57911 +
57912 + pr_debug("pasemi_msi_setup_msi_irqs, pdev %p nvec %d type %d\n",
57913 + pdev, nvec, type);
57914 +
57915 + msg.address_hi = 0;
57916 + msg.address_lo = PASEMI_MSI_ADDR;
57917 +
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.
57923 + */
57924 + hwirq = mpic_msi_alloc_hwirqs(msi_mpic, ALLOC_CHUNK);
57925 + if (hwirq < 0) {
57926 + pr_debug("pasemi_msi: failed allocating hwirq\n");
57927 + return hwirq;
57928 + }
57929 +
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);
57934 + return -ENOSPC;
57935 + }
57936 +
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.
57940 + */
57941 + mpic_set_vector(virq, 0);
57942 +
57943 + set_irq_msi(virq, entry);
57944 + set_irq_chip(virq, &mpic_pasemi_msi_chip);
57945 + set_irq_type(virq, IRQ_TYPE_EDGE_RISING);
57946 +
57947 + pr_debug("pasemi_msi: allocated virq 0x%x (hw 0x%lx) addr 0x%lx\n",
57948 + virq, hwirq, addr);
57949 +
57950 + /* Likewise, the device writes [0...511] into the target
57951 + * register to generate MSI [512...1023]
57952 + */
57953 + msg.data = hwirq-0x200;
57954 + write_msi_msg(virq, &msg);
57955 + }
57956 +
57957 + return 0;
57958 +}
57959 +
57960 +int mpic_pasemi_msi_init(struct mpic *mpic)
57961 +{
57962 + int rc;
57963 +
57964 + if (!mpic->irqhost->of_node ||
57965 + !of_device_is_compatible(mpic->irqhost->of_node,
57966 + "pasemi,pwrficient-openpic"))
57967 + return -ENODEV;
57968 +
57969 + rc = mpic_msi_init_allocator(mpic);
57970 + if (rc) {
57971 + pr_debug("pasemi_msi: Error allocating bitmap!\n");
57972 + return rc;
57973 + }
57974 +
57975 + pr_debug("pasemi_msi: Registering PA Semi MPIC MSI callbacks\n");
57976 +
57977 + msi_mpic = mpic;
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;
57982 +
57983 + return 0;
57984 +}
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 @@
57989
57990 /* only register the shared platform device the first time through */
57991 if (id == 0 && (err = eth_register_shared_pdev(np)))
57992 - return err;;
57993 + return err;
57994
57995 memset(r, 0, sizeof(r));
57996 of_irq_to_resource(np, 0, &r[0]);
57997 @@ -451,22 +451,19 @@
57998 int id;
57999 int err;
58000
58001 - for (id = 0;
58002 - (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); id++)
58003 - if ((err = mv64x60_mpsc_device_setup(np, id)))
58004 + id = 0;
58005 + for_each_compatible_node(np, "serial", "marvell,mpsc")
58006 + if ((err = mv64x60_mpsc_device_setup(np, id++)))
58007 goto error;
58008
58009 - for (id = 0;
58010 - (np = of_find_compatible_node(np, "network",
58011 - "marvell,mv64x60-eth"));
58012 - id++)
58013 - if ((err = mv64x60_eth_device_setup(np, id)))
58014 + id = 0;
58015 + for_each_compatible_node(np, "network", "marvell,mv64x60-eth")
58016 + if ((err = mv64x60_eth_device_setup(np, id++)))
58017 goto error;
58018
58019 - for (id = 0;
58020 - (np = of_find_compatible_node(np, "i2c", "marvell,mv64x60-i2c"));
58021 - id++)
58022 - if ((err = mv64x60_i2c_device_setup(np, id)))
58023 + id = 0;
58024 + for_each_compatible_node(np, "i2c", "marvell,mv64x60-i2c")
58025 + if ((err = mv64x60_i2c_device_setup(np, id++)))
58026 goto error;
58027
58028 /* support up to one watchdog timer */
58029 @@ -477,7 +474,6 @@
58030 of_node_put(np);
58031 }
58032
58033 -
58034 return 0;
58035
58036 error:
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 @@
58041
58042 void __init mv64x60_pci_init(void)
58043 {
58044 - struct device_node *np = NULL;
58045 + struct device_node *np;
58046
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);
58050 }
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 @@
58055 if (!stdout)
58056 return;
58057
58058 - for (np = NULL;
58059 - (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); )
58060 + for_each_compatible_node(np, "serial", "marvell,mpsc") {
58061 if (np == stdout)
58062 break;
58063 + }
58064
58065 of_node_put(stdout);
58066 if (!np)
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
58070 @@ -0,0 +1,59 @@
58071 +/*
58072 + * Instantiate mmio-mapped RTC chips based on device tree information
58073 + *
58074 + * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
58075 + *
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.
58080 + */
58081 +#include <linux/kernel.h>
58082 +#include <linux/of.h>
58083 +#include <linux/init.h>
58084 +#include <linux/of_platform.h>
58085 +
58086 +static __initdata struct {
58087 + const char *compatible;
58088 + char *plat_name;
58089 +} of_rtc_table[] = {
58090 + { "ds1743-nvram", "rtc-ds1742" },
58091 +};
58092 +
58093 +void __init of_instantiate_rtc(void)
58094 +{
58095 + struct device_node *node;
58096 + int err;
58097 + int i;
58098 +
58099 + for (i = 0; i < ARRAY_SIZE(of_rtc_table); i++) {
58100 + char *plat_name = of_rtc_table[i].plat_name;
58101 +
58102 + for_each_compatible_node(node, NULL,
58103 + of_rtc_table[i].compatible) {
58104 + struct resource *res;
58105 +
58106 + res = kmalloc(sizeof(*res), GFP_KERNEL);
58107 + if (!res) {
58108 + printk(KERN_ERR "OF RTC: Out of memory "
58109 + "allocating resource structure for %s\n",
58110 + node->full_name);
58111 + continue;
58112 + }
58113 +
58114 + err = of_address_to_resource(node, 0, res);
58115 + if (err) {
58116 + printk(KERN_ERR "OF RTC: Error "
58117 + "translating resources for %s\n",
58118 + node->full_name);
58119 + continue;
58120 + }
58121 +
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);
58127 + }
58128 + }
58129 +}
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
58133 @@ -28,9 +28,9 @@
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>
58139
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
58148 @@ -0,0 +1,1528 @@
58149 +/*
58150 + * PCI / PCI-X / PCI-Express support for 4xx parts
58151 + *
58152 + * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
58153 + *
58154 + * Most PCI Express code is coming from Stefan Roese implementation for
58155 + * arch/ppc in the Denx tree, slightly reworked by me.
58156 + *
58157 + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
58158 + *
58159 + * Some of that comes itself from a previous implementation for 440SPE only
58160 + * by Roland Dreier:
58161 + *
58162 + * Copyright (c) 2005 Cisco Systems. All rights reserved.
58163 + * Roland Dreier <rolandd@cisco.com>
58164 + *
58165 + */
58166 +
58167 +#undef DEBUG
58168 +
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>
58175 +
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>
58181 +
58182 +#include "ppc4xx_pci.h"
58183 +
58184 +static int dma_offset_set;
58185 +
58186 +/* Move that to a useable header */
58187 +extern unsigned long total_memory;
58188 +
58189 +#define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL))
58190 +#define U64_TO_U32_HIGH(val) ((u32)((val) >> 32))
58191 +
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)
58195 +#else
58196 +#define RES_TO_U32_LOW(val) (val)
58197 +#define RES_TO_U32_HIGH(val) (0)
58198 +#endif
58199 +
58200 +static inline int ppc440spe_revA(void)
58201 +{
58202 + /* Catch both 440SPe variants, with and without RAID6 support */
58203 + if ((mfspr(SPRN_PVR) & 0xffefffff) == 0x53421890)
58204 + return 1;
58205 + else
58206 + return 0;
58207 +}
58208 +
58209 +static void fixup_ppc4xx_pci_bridge(struct pci_dev *dev)
58210 +{
58211 + struct pci_controller *hose;
58212 + int i;
58213 +
58214 + if (dev->devfn != 0 || dev->bus->self != NULL)
58215 + return;
58216 +
58217 + hose = pci_bus_to_host(dev->bus);
58218 + if (hose == NULL)
58219 + return;
58220 +
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"))
58224 + return;
58225 +
58226 + /* Hide the PCI host BARs from the kernel as their content doesn't
58227 + * fit well in the resource management
58228 + */
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;
58232 + }
58233 +
58234 + printk(KERN_INFO "PCI: Hiding 4xx host bridge resources %s\n",
58235 + pci_name(dev));
58236 +}
58237 +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, fixup_ppc4xx_pci_bridge);
58238 +
58239 +static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose,
58240 + void __iomem *reg,
58241 + struct resource *res)
58242 +{
58243 + u64 size;
58244 + const u32 *ranges;
58245 + int rlen;
58246 + int pna = of_n_addr_cells(hose->dn);
58247 + int np = pna + 5;
58248 +
58249 + /* Default */
58250 + res->start = 0;
58251 + res->end = size = 0x80000000;
58252 + res->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
58253 +
58254 + /* Get dma-ranges property */
58255 + ranges = of_get_property(hose->dn, "dma-ranges", &rlen);
58256 + if (ranges == NULL)
58257 + goto out;
58258 +
58259 + /* Walk it */
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);
58265 + ranges += np;
58266 + if (cpu_addr == OF_BAD_ADDR || size == 0)
58267 + continue;
58268 +
58269 + /* We only care about memory */
58270 + if ((pci_space & 0x03000000) != 0x02000000)
58271 + continue;
58272 +
58273 + /* We currently only support memory at 0, and pci_addr
58274 + * within 32 bits space
58275 + */
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);
58281 + continue;
58282 + }
58283 +
58284 + /* Check if not prefetchable */
58285 + if (!(pci_space & 0x40000000))
58286 + res->flags &= ~IORESOURCE_PREFETCH;
58287 +
58288 +
58289 + /* Use that */
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;
58295 + else
58296 +#endif
58297 + res->end = res->start + size - 1;
58298 + break;
58299 + }
58300 +
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);
58305 + return -ENXIO;
58306 + }
58307 +
58308 + /* Check that we can fit all of memory as we don't support
58309 + * DMA bounce buffers
58310 + */
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);
58315 + return -ENXIO;
58316 + }
58317 +
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);
58323 + return -ENXIO;
58324 + }
58325 +
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);
58330 + return -ENXIO;
58331 + }
58332 + out:
58333 + dma_offset_set = 1;
58334 + pci_dram_offset = res->start;
58335 +
58336 + printk(KERN_INFO "4xx PCI DMA offset set to 0x%08lx\n",
58337 + pci_dram_offset);
58338 + return 0;
58339 +}
58340 +
58341 +/*
58342 + * 4xx PCI 2.x part
58343 + */
58344 +
58345 +static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose,
58346 + void __iomem *reg)
58347 +{
58348 + u32 la, ma, pcila, pciha;
58349 + int i, j;
58350 +
58351 + /* Setup outbound memory windows */
58352 + for (i = j = 0; i < 3; i++) {
58353 + struct resource *res = &hose->mem_resources[i];
58354 +
58355 + /* we only care about memory windows */
58356 + if (!(res->flags & IORESOURCE_MEM))
58357 + continue;
58358 + if (j > 2) {
58359 + printk(KERN_WARNING "%s: Too many ranges\n",
58360 + hose->dn->full_name);
58361 + break;
58362 + }
58363 +
58364 + /* Calculate register values */
58365 + la = res->start;
58366 + pciha = RES_TO_U32_HIGH(res->start - hose->pci_mem_offset);
58367 + pcila = RES_TO_U32_LOW(res->start - hose->pci_mem_offset);
58368 +
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);
58373 + continue;
58374 + }
58375 + ma = (0xffffffffu << ilog2(ma)) | 0x1;
58376 + if (res->flags & IORESOURCE_PREFETCH)
58377 + ma |= 0x2;
58378 +
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));
58384 + j++;
58385 + }
58386 +}
58387 +
58388 +static void __init ppc4xx_configure_pci_PTMs(struct pci_controller *hose,
58389 + void __iomem *reg,
58390 + const struct resource *res)
58391 +{
58392 + resource_size_t size = res->end - res->start + 1;
58393 + u32 sa;
58394 +
58395 + /* Calculate window size */
58396 + sa = (0xffffffffu << ilog2(size)) | 1;
58397 + sa |= 0x1;
58398 +
58399 + /* RAM is always at 0 local for now */
58400 + writel(0, reg + PCIL0_PTM1LA);
58401 + writel(sa, reg + PCIL0_PTM1MS);
58402 +
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);
58410 +}
58411 +
58412 +static void __init ppc4xx_probe_pci_bridge(struct device_node *np)
58413 +{
58414 + /* NYI */
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;
58421 + int primary = 0;
58422 +
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 !",
58426 + np->full_name);
58427 + return;
58428 + }
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 !",
58432 + np->full_name);
58433 + return;
58434 + }
58435 +
58436 + /* Check if primary bridge */
58437 + if (of_get_property(np, "primary", NULL))
58438 + primary = 1;
58439 +
58440 + /* Get bus range if any */
58441 + bus_range = of_get_property(np, "bus-range", NULL);
58442 +
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);
58447 + goto fail;
58448 + }
58449 +
58450 + /* Allocate the host controller data structure */
58451 + hose = pcibios_alloc_controller(np);
58452 + if (!hose)
58453 + goto fail;
58454 +
58455 + hose->first_busno = bus_range ? bus_range[0] : 0x0;
58456 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
58457 +
58458 + /* Setup config space */
58459 + setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 0x4, 0);
58460 +
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);
58467 +
58468 + /* Parse outbound mapping resources */
58469 + pci_process_bridge_OF_ranges(hose, np, primary);
58470 +
58471 + /* Parse inbound mapping resources */
58472 + if (ppc4xx_parse_dma_ranges(hose, reg, &dma_window) != 0)
58473 + goto fail;
58474 +
58475 + /* Configure outbound ranges POMs */
58476 + ppc4xx_configure_pci_PMMs(hose, reg);
58477 +
58478 + /* Configure inbound ranges PIMs */
58479 + ppc4xx_configure_pci_PTMs(hose, reg, &dma_window);
58480 +
58481 + /* We don't need the registers anymore */
58482 + iounmap(reg);
58483 + return;
58484 +
58485 + fail:
58486 + if (hose)
58487 + pcibios_free_controller(hose);
58488 + if (reg)
58489 + iounmap(reg);
58490 +}
58491 +
58492 +/*
58493 + * 4xx PCI-X part
58494 + */
58495 +
58496 +static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose,
58497 + void __iomem *reg)
58498 +{
58499 + u32 lah, lal, pciah, pcial, sa;
58500 + int i, j;
58501 +
58502 + /* Setup outbound memory windows */
58503 + for (i = j = 0; i < 3; i++) {
58504 + struct resource *res = &hose->mem_resources[i];
58505 +
58506 + /* we only care about memory windows */
58507 + if (!(res->flags & IORESOURCE_MEM))
58508 + continue;
58509 + if (j > 1) {
58510 + printk(KERN_WARNING "%s: Too many ranges\n",
58511 + hose->dn->full_name);
58512 + break;
58513 + }
58514 +
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);
58525 + continue;
58526 + }
58527 + sa = (0xffffffffu << ilog2(sa)) | 0x1;
58528 +
58529 + /* Program register values */
58530 + if (j == 0) {
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);
58536 + } else {
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);
58542 + }
58543 + j++;
58544 + }
58545 +}
58546 +
58547 +static void __init ppc4xx_configure_pcix_PIMs(struct pci_controller *hose,
58548 + void __iomem *reg,
58549 + const struct resource *res,
58550 + int big_pim,
58551 + int enable_msi_hole)
58552 +{
58553 + resource_size_t size = res->end - res->start + 1;
58554 + u32 sa;
58555 +
58556 + /* RAM is always at 0 */
58557 + writel(0x00000000, reg + PCIX0_PIM0LAH);
58558 + writel(0x00000000, reg + PCIX0_PIM0LAL);
58559 +
58560 + /* Calculate window size */
58561 + sa = (0xffffffffu << ilog2(size)) | 1;
58562 + sa |= 0x1;
58563 + if (res->flags & IORESOURCE_PREFETCH)
58564 + sa |= 0x2;
58565 + if (enable_msi_hole)
58566 + sa |= 0x4;
58567 + writel(sa, reg + PCIX0_PIM0SA);
58568 + if (big_pim)
58569 + writel(0xffffffff, reg + PCIX0_PIM0SAH);
58570 +
58571 + /* Map on PCI side */
58572 + writel(0x00000000, reg + PCIX0_BAR0H);
58573 + writel(res->start, reg + PCIX0_BAR0L);
58574 + writew(0x0006, reg + PCIX0_COMMAND);
58575 +}
58576 +
58577 +static void __init ppc4xx_probe_pcix_bridge(struct device_node *np)
58578 +{
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;
58586 +
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 !",
58590 + np->full_name);
58591 + return;
58592 + }
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 !",
58596 + np->full_name);
58597 + return;
58598 + }
58599 +
58600 + /* Check if it supports large PIMs (440GX) */
58601 + if (of_get_property(np, "large-inbound-windows", NULL))
58602 + big_pim = 1;
58603 +
58604 + /* Check if we should enable MSIs inbound hole */
58605 + if (of_get_property(np, "enable-msi-hole", NULL))
58606 + msi = 1;
58607 +
58608 + /* Check if primary bridge */
58609 + if (of_get_property(np, "primary", NULL))
58610 + primary = 1;
58611 +
58612 + /* Get bus range if any */
58613 + bus_range = of_get_property(np, "bus-range", NULL);
58614 +
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);
58619 + goto fail;
58620 + }
58621 +
58622 + /* Allocate the host controller data structure */
58623 + hose = pcibios_alloc_controller(np);
58624 + if (!hose)
58625 + goto fail;
58626 +
58627 + hose->first_busno = bus_range ? bus_range[0] : 0x0;
58628 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
58629 +
58630 + /* Setup config space */
58631 + setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 0x4, 0);
58632 +
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);
58640 + if (big_pim) {
58641 + writel(0, reg + PCIX0_PIM0SAH);
58642 + writel(0, reg + PCIX0_PIM2SAH);
58643 + }
58644 +
58645 + /* Parse outbound mapping resources */
58646 + pci_process_bridge_OF_ranges(hose, np, primary);
58647 +
58648 + /* Parse inbound mapping resources */
58649 + if (ppc4xx_parse_dma_ranges(hose, reg, &dma_window) != 0)
58650 + goto fail;
58651 +
58652 + /* Configure outbound ranges POMs */
58653 + ppc4xx_configure_pcix_POMs(hose, reg);
58654 +
58655 + /* Configure inbound ranges PIMs */
58656 + ppc4xx_configure_pcix_PIMs(hose, reg, &dma_window, big_pim, msi);
58657 +
58658 + /* We don't need the registers anymore */
58659 + iounmap(reg);
58660 + return;
58661 +
58662 + fail:
58663 + if (hose)
58664 + pcibios_free_controller(hose);
58665 + if (reg)
58666 + iounmap(reg);
58667 +}
58668 +
58669 +#ifdef CONFIG_PPC4xx_PCI_EXPRESS
58670 +
58671 +/*
58672 + * 4xx PCI-Express part
58673 + *
58674 + * We support 3 parts currently based on the compatible property:
58675 + *
58676 + * ibm,plb-pciex-440spe
58677 + * ibm,plb-pciex-405ex
58678 + *
58679 + * Anything else will be rejected for now as they are all subtly
58680 + * different unfortunately.
58681 + *
58682 + */
58683 +
58684 +#define MAX_PCIE_BUS_MAPPED 0x40
58685 +
58686 +struct ppc4xx_pciex_port
58687 +{
58688 + struct pci_controller *hose;
58689 + struct device_node *node;
58690 + unsigned int index;
58691 + int endpoint;
58692 + int link;
58693 + int has_ibpre;
58694 + unsigned int sdr_base;
58695 + dcr_host_t dcrs;
58696 + struct resource cfg_space;
58697 + struct resource utl_regs;
58698 + void __iomem *utl_base;
58699 +};
58700 +
58701 +static struct ppc4xx_pciex_port *ppc4xx_pciex_ports;
58702 +static unsigned int ppc4xx_pciex_port_count;
58703 +
58704 +struct ppc4xx_pciex_hwops
58705 +{
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);
58709 +};
58710 +
58711 +static struct ppc4xx_pciex_hwops *ppc4xx_pciex_hwops;
58712 +
58713 +#ifdef CONFIG_44x
58714 +
58715 +/* Check various reset bits of the 440SPe PCIe core */
58716 +static int __init ppc440spe_pciex_check_reset(struct device_node *np)
58717 +{
58718 + u32 valPE0, valPE1, valPE2;
58719 + int err = 0;
58720 +
58721 + /* SDR0_PEGPLLLCT1 reset */
58722 + if (!(mfdcri(SDR0, PESDR0_PLLLCT1) & 0x01000000)) {
58723 + /*
58724 + * the PCIe core was probably already initialised
58725 + * by firmware - let's re-reset RCSSET regs
58726 + *
58727 + * -- Shouldn't we also re-reset the whole thing ? -- BenH
58728 + */
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);
58733 + }
58734 +
58735 + valPE0 = mfdcri(SDR0, PESDR0_440SPE_RCSSET);
58736 + valPE1 = mfdcri(SDR0, PESDR1_440SPE_RCSSET);
58737 + valPE2 = mfdcri(SDR0, PESDR2_440SPE_RCSSET);
58738 +
58739 + /* SDR0_PExRCSSET rstgu */
58740 + if (!(valPE0 & 0x01000000) ||
58741 + !(valPE1 & 0x01000000) ||
58742 + !(valPE2 & 0x01000000)) {
58743 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstgu error\n");
58744 + err = -1;
58745 + }
58746 +
58747 + /* SDR0_PExRCSSET rstdl */
58748 + if (!(valPE0 & 0x00010000) ||
58749 + !(valPE1 & 0x00010000) ||
58750 + !(valPE2 & 0x00010000)) {
58751 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstdl error\n");
58752 + err = -1;
58753 + }
58754 +
58755 + /* SDR0_PExRCSSET rstpyn */
58756 + if ((valPE0 & 0x00001000) ||
58757 + (valPE1 & 0x00001000) ||
58758 + (valPE2 & 0x00001000)) {
58759 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstpyn error\n");
58760 + err = -1;
58761 + }
58762 +
58763 + /* SDR0_PExRCSSET hldplb */
58764 + if ((valPE0 & 0x10000000) ||
58765 + (valPE1 & 0x10000000) ||
58766 + (valPE2 & 0x10000000)) {
58767 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET hldplb error\n");
58768 + err = -1;
58769 + }
58770 +
58771 + /* SDR0_PExRCSSET rdy */
58772 + if ((valPE0 & 0x00100000) ||
58773 + (valPE1 & 0x00100000) ||
58774 + (valPE2 & 0x00100000)) {
58775 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET rdy error\n");
58776 + err = -1;
58777 + }
58778 +
58779 + /* SDR0_PExRCSSET shutdown */
58780 + if ((valPE0 & 0x00000100) ||
58781 + (valPE1 & 0x00000100) ||
58782 + (valPE2 & 0x00000100)) {
58783 + printk(KERN_INFO "PCIE: SDR0_PExRCSSET shutdown error\n");
58784 + err = -1;
58785 + }
58786 +
58787 + return err;
58788 +}
58789 +
58790 +/* Global PCIe core initializations for 440SPe core */
58791 +static int __init ppc440spe_pciex_core_init(struct device_node *np)
58792 +{
58793 + int time_out = 20;
58794 +
58795 + /* Set PLL clock receiver to LVPECL */
58796 + mtdcri(SDR0, PESDR0_PLLLCT1, mfdcri(SDR0, PESDR0_PLLLCT1) | 1 << 28);
58797 +
58798 + /* Shouldn't we do all the calibration stuff etc... here ? */
58799 + if (ppc440spe_pciex_check_reset(np))
58800 + return -ENXIO;
58801 +
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));
58806 + return -1;
58807 + }
58808 +
58809 + /* De-assert reset of PCIe PLL, wait for lock */
58810 + mtdcri(SDR0, PESDR0_PLLLCT1,
58811 + mfdcri(SDR0, PESDR0_PLLLCT1) & ~(1 << 24));
58812 + udelay(3);
58813 +
58814 + while (time_out) {
58815 + if (!(mfdcri(SDR0, PESDR0_PLLLCT3) & 0x10000000)) {
58816 + time_out--;
58817 + udelay(1);
58818 + } else
58819 + break;
58820 + }
58821 + if (!time_out) {
58822 + printk(KERN_INFO "PCIE: VCO output not locked\n");
58823 + return -1;
58824 + }
58825 +
58826 + pr_debug("PCIE initialization OK\n");
58827 +
58828 + return 3;
58829 +}
58830 +
58831 +static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58832 +{
58833 + u32 val = 1 << 24;
58834 +
58835 + if (port->endpoint)
58836 + val = PTYPE_LEGACY_ENDPOINT << 20;
58837 + else
58838 + val = PTYPE_ROOT_PORT << 20;
58839 +
58840 + if (port->index == 0)
58841 + val |= LNKW_X8 << 12;
58842 + else
58843 + val |= LNKW_X4 << 12;
58844 +
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,
58855 + 0x35000000);
58856 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL5SET1,
58857 + 0x35000000);
58858 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL6SET1,
58859 + 0x35000000);
58860 + mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL7SET1,
58861 + 0x35000000);
58862 + }
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);
58866 +
58867 + return 0;
58868 +}
58869 +
58870 +static int ppc440speA_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58871 +{
58872 + return ppc440spe_pciex_init_port_hw(port);
58873 +}
58874 +
58875 +static int ppc440speB_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58876 +{
58877 + int rc = ppc440spe_pciex_init_port_hw(port);
58878 +
58879 + port->has_ibpre = 1;
58880 +
58881 + return rc;
58882 +}
58883 +
58884 +static int ppc440speA_pciex_init_utl(struct ppc4xx_pciex_port *port)
58885 +{
58886 + /* XXX Check what that value means... I hate magic */
58887 + dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x68782800);
58888 +
58889 + /*
58890 + * Set buffer allocations and then assert VRB and TXE.
58891 + */
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);
58900 +
58901 + return 0;
58902 +}
58903 +
58904 +static int ppc440speB_pciex_init_utl(struct ppc4xx_pciex_port *port)
58905 +{
58906 + /* Report CRS to the operating system */
58907 + out_be32(port->utl_base + PEUTL_PBCTL, 0x08000000);
58908 +
58909 + return 0;
58910 +}
58911 +
58912 +static struct ppc4xx_pciex_hwops ppc440speA_pcie_hwops __initdata =
58913 +{
58914 + .core_init = ppc440spe_pciex_core_init,
58915 + .port_init_hw = ppc440speA_pciex_init_port_hw,
58916 + .setup_utl = ppc440speA_pciex_init_utl,
58917 +};
58918 +
58919 +static struct ppc4xx_pciex_hwops ppc440speB_pcie_hwops __initdata =
58920 +{
58921 + .core_init = ppc440spe_pciex_core_init,
58922 + .port_init_hw = ppc440speB_pciex_init_port_hw,
58923 + .setup_utl = ppc440speB_pciex_init_utl,
58924 +};
58925 +
58926 +#endif /* CONFIG_44x */
58927 +
58928 +#ifdef CONFIG_40x
58929 +
58930 +static int __init ppc405ex_pciex_core_init(struct device_node *np)
58931 +{
58932 + /* Nothing to do, return 2 ports */
58933 + return 2;
58934 +}
58935 +
58936 +static void ppc405ex_pcie_phy_reset(struct ppc4xx_pciex_port *port)
58937 +{
58938 + /* Assert the PE0_PHY reset */
58939 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01010000);
58940 + msleep(1);
58941 +
58942 + /* deassert the PE0_hotreset */
58943 + if (port->endpoint)
58944 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01111000);
58945 + else
58946 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01101000);
58947 +
58948 + /* poll for phy !reset */
58949 + /* XXX FIXME add timeout */
58950 + while (!(mfdcri(SDR0, port->sdr_base + PESDRn_405EX_PHYSTA) & 0x00001000))
58951 + ;
58952 +
58953 + /* deassert the PE0_gpl_utl_reset */
58954 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x00101000);
58955 +}
58956 +
58957 +static int ppc405ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
58958 +{
58959 + u32 val;
58960 +
58961 + if (port->endpoint)
58962 + val = PTYPE_LEGACY_ENDPOINT;
58963 + else
58964 + val = PTYPE_ROOT_PORT;
58965 +
58966 + mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET,
58967 + 1 << 24 | val << 20 | LNKW_X1 << 12);
58968 +
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);
58973 +
58974 + /*
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!
58980 + */
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.
58985 + */
58986 + val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP);
58987 + if (!(val & 0x00001000))
58988 + ppc405ex_pcie_phy_reset(port);
58989 +#else
58990 + ppc405ex_pcie_phy_reset(port);
58991 +#endif
58992 +
58993 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, 0x10000000); /* guarded on */
58994 +
58995 + port->has_ibpre = 1;
58996 +
58997 + return 0;
58998 +}
58999 +
59000 +static int ppc405ex_pciex_init_utl(struct ppc4xx_pciex_port *port)
59001 +{
59002 + dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x0);
59003 +
59004 + /*
59005 + * Set buffer allocations and then assert VRB and TXE.
59006 + */
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);
59015 +
59016 + out_be32(port->utl_base + PEUTL_PBCTL, 0x08000000);
59017 +
59018 + return 0;
59019 +}
59020 +
59021 +static struct ppc4xx_pciex_hwops ppc405ex_pcie_hwops __initdata =
59022 +{
59023 + .core_init = ppc405ex_pciex_core_init,
59024 + .port_init_hw = ppc405ex_pciex_init_port_hw,
59025 + .setup_utl = ppc405ex_pciex_init_utl,
59026 +};
59027 +
59028 +#endif /* CONFIG_40x */
59029 +
59030 +
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)
59033 +{
59034 + static int core_init;
59035 + int count = -ENODEV;
59036 +
59037 + if (core_init++)
59038 + return 0;
59039 +
59040 +#ifdef CONFIG_44x
59041 + if (of_device_is_compatible(np, "ibm,plb-pciex-440spe")) {
59042 + if (ppc440spe_revA())
59043 + ppc4xx_pciex_hwops = &ppc440speA_pcie_hwops;
59044 + else
59045 + ppc4xx_pciex_hwops = &ppc440speB_pcie_hwops;
59046 + }
59047 +#endif /* CONFIG_44x */
59048 +#ifdef CONFIG_40x
59049 + if (of_device_is_compatible(np, "ibm,plb-pciex-405ex"))
59050 + ppc4xx_pciex_hwops = &ppc405ex_pcie_hwops;
59051 +#endif
59052 + if (ppc4xx_pciex_hwops == NULL) {
59053 + printk(KERN_WARNING "PCIE: unknown host type %s\n",
59054 + np->full_name);
59055 + return -ENODEV;
59056 + }
59057 +
59058 + count = ppc4xx_pciex_hwops->core_init(np);
59059 + if (count > 0) {
59060 + ppc4xx_pciex_ports =
59061 + kzalloc(count * sizeof(struct ppc4xx_pciex_port),
59062 + GFP_KERNEL);
59063 + if (ppc4xx_pciex_ports) {
59064 + ppc4xx_pciex_port_count = count;
59065 + return 0;
59066 + }
59067 + printk(KERN_WARNING "PCIE: failed to allocate ports array\n");
59068 + return -ENOMEM;
59069 + }
59070 + return -ENODEV;
59071 +}
59072 +
59073 +static void __init ppc4xx_pciex_port_init_mapping(struct ppc4xx_pciex_port *port)
59074 +{
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));
59080 +
59081 + /* XXX FIXME: Use size from reg property. For now, map 512M */
59082 + dcr_write(port->dcrs, DCRO_PEGPL_CFGMSK, 0xe0000001);
59083 +
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));
59089 +
59090 + /* XXX FIXME: Use size from reg property */
59091 + dcr_write(port->dcrs, DCRO_PEGPL_REGMSK, 0x00007001);
59092 +
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);
59098 +}
59099 +
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,
59104 + int timeout_ms)
59105 +{
59106 + u32 val;
59107 +
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);
59113 + return 0;
59114 + }
59115 + msleep(1);
59116 + }
59117 + return -1;
59118 +}
59119 +
59120 +static int __init ppc4xx_pciex_port_init(struct ppc4xx_pciex_port *port)
59121 +{
59122 + int rc = 0;
59123 +
59124 + /* Init HW */
59125 + if (ppc4xx_pciex_hwops->port_init_hw)
59126 + rc = ppc4xx_pciex_hwops->port_init_hw(port);
59127 + if (rc != 0)
59128 + return rc;
59129 +
59130 + printk(KERN_INFO "PCIE%d: Checking link...\n",
59131 + port->index);
59132 +
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",
59136 + port->index);
59137 + return -1;
59138 + }
59139 +
59140 + /* Check for card presence detect if supported, if not, just wait for
59141 + * link unconditionally.
59142 + *
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.
59146 + */
59147 + if (!port->has_ibpre ||
59148 + !ppc4xx_pciex_wait_on_sdr(port, PESDRn_LOOP,
59149 + 1 << 28, 1 << 28, 100)) {
59150 + printk(KERN_INFO
59151 + "PCIE%d: Device detected, waiting for link...\n",
59152 + port->index);
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);
59157 + else {
59158 + printk(KERN_INFO
59159 + "PCIE%d: link is up !\n", port->index);
59160 + port->link = 1;
59161 + }
59162 + } else
59163 + printk(KERN_INFO "PCIE%d: No device detected.\n", port->index);
59164 +
59165 + /*
59166 + * Initialize mapping: disable all regions and configure
59167 + * CFG and REG regions based on resources in the device tree
59168 + */
59169 + ppc4xx_pciex_port_init_mapping(port);
59170 +
59171 + /*
59172 + * Map UTL
59173 + */
59174 + port->utl_base = ioremap(port->utl_regs.start, 0x100);
59175 + BUG_ON(port->utl_base == NULL);
59176 +
59177 + /*
59178 + * Setup UTL registers --BenH.
59179 + */
59180 + if (ppc4xx_pciex_hwops->setup_utl)
59181 + ppc4xx_pciex_hwops->setup_utl(port);
59182 +
59183 + /*
59184 + * Check for VC0 active and assert RDY.
59185 + */
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);
59190 + port->link = 0;
59191 + }
59192 +
59193 + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
59194 + mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) | 1 << 20);
59195 + msleep(100);
59196 +
59197 + return 0;
59198 +}
59199 +
59200 +static int ppc4xx_pciex_validate_bdf(struct ppc4xx_pciex_port *port,
59201 + struct pci_bus *bus,
59202 + unsigned int devfn)
59203 +{
59204 + static int message;
59205 +
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;
59209 +
59210 + /* Check we are within the mapped range */
59211 + if (bus->number > port->hose->last_busno) {
59212 + if (!message) {
59213 + printk(KERN_WARNING "Warning! Probing bus %u"
59214 + " out of range !\n", bus->number);
59215 + message++;
59216 + }
59217 + return PCIBIOS_DEVICE_NOT_FOUND;
59218 + }
59219 +
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;
59223 +
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;
59228 +
59229 + /* Check if we have a link */
59230 + if ((bus->number != port->hose->first_busno) && !port->link)
59231 + return PCIBIOS_DEVICE_NOT_FOUND;
59232 +
59233 + return 0;
59234 +}
59235 +
59236 +static void __iomem *ppc4xx_pciex_get_config_base(struct ppc4xx_pciex_port *port,
59237 + struct pci_bus *bus,
59238 + unsigned int devfn)
59239 +{
59240 + int relbus;
59241 +
59242 + /* Remove the casts when we finally remove the stupid volatile
59243 + * in struct pci_controller
59244 + */
59245 + if (bus->number == port->hose->first_busno)
59246 + return (void __iomem *)port->hose->cfg_addr;
59247 +
59248 + relbus = bus->number - (port->hose->first_busno + 1);
59249 + return (void __iomem *)port->hose->cfg_data +
59250 + ((relbus << 20) | (devfn << 12));
59251 +}
59252 +
59253 +static int ppc4xx_pciex_read_config(struct pci_bus *bus, unsigned int devfn,
59254 + int offset, int len, u32 *val)
59255 +{
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;
59260 + u32 gpl_cfg;
59261 +
59262 + BUG_ON(hose != port->hose);
59263 +
59264 + if (ppc4xx_pciex_validate_bdf(port, bus, devfn) != 0)
59265 + return PCIBIOS_DEVICE_NOT_FOUND;
59266 +
59267 + addr = ppc4xx_pciex_get_config_base(port, bus, devfn);
59268 +
59269 + /*
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.
59273 + */
59274 + gpl_cfg = dcr_read(port->dcrs, DCRO_PEGPL_CFG);
59275 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg | GPL_DMER_MASK_DISA);
59276 +
59277 + /* Make sure no CRS is recorded */
59278 + out_be32(port->utl_base + PEUTL_RCSTA, 0x00040000);
59279 +
59280 + switch (len) {
59281 + case 1:
59282 + *val = in_8((u8 *)(addr + offset));
59283 + break;
59284 + case 2:
59285 + *val = in_le16((u16 *)(addr + offset));
59286 + break;
59287 + default:
59288 + *val = in_le32((u32 *)(addr + offset));
59289 + break;
59290 + }
59291 +
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);
59296 +
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;
59303 + }
59304 +
59305 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg);
59306 +
59307 + return PCIBIOS_SUCCESSFUL;
59308 +}
59309 +
59310 +static int ppc4xx_pciex_write_config(struct pci_bus *bus, unsigned int devfn,
59311 + int offset, int len, u32 val)
59312 +{
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;
59317 + u32 gpl_cfg;
59318 +
59319 + if (ppc4xx_pciex_validate_bdf(port, bus, devfn) != 0)
59320 + return PCIBIOS_DEVICE_NOT_FOUND;
59321 +
59322 + addr = ppc4xx_pciex_get_config_base(port, bus, devfn);
59323 +
59324 + /*
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.
59328 + */
59329 + gpl_cfg = dcr_read(port->dcrs, DCRO_PEGPL_CFG);
59330 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg | GPL_DMER_MASK_DISA);
59331 +
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);
59336 +
59337 + switch (len) {
59338 + case 1:
59339 + out_8((u8 *)(addr + offset), val);
59340 + break;
59341 + case 2:
59342 + out_le16((u16 *)(addr + offset), val);
59343 + break;
59344 + default:
59345 + out_le32((u32 *)(addr + offset), val);
59346 + break;
59347 + }
59348 +
59349 + dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg);
59350 +
59351 + return PCIBIOS_SUCCESSFUL;
59352 +}
59353 +
59354 +static struct pci_ops ppc4xx_pciex_pci_ops =
59355 +{
59356 + .read = ppc4xx_pciex_read_config,
59357 + .write = ppc4xx_pciex_write_config,
59358 +};
59359 +
59360 +static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port,
59361 + struct pci_controller *hose,
59362 + void __iomem *mbase)
59363 +{
59364 + u32 lah, lal, pciah, pcial, sa;
59365 + int i, j;
59366 +
59367 + /* Setup outbound memory windows */
59368 + for (i = j = 0; i < 3; i++) {
59369 + struct resource *res = &hose->mem_resources[i];
59370 +
59371 + /* we only care about memory windows */
59372 + if (!(res->flags & IORESOURCE_MEM))
59373 + continue;
59374 + if (j > 1) {
59375 + printk(KERN_WARNING "%s: Too many ranges\n",
59376 + port->node->full_name);
59377 + break;
59378 + }
59379 +
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);
59390 + continue;
59391 + }
59392 + sa = (0xffffffffu << ilog2(sa)) | 0x1;
59393 +
59394 + /* Program register values */
59395 + switch (j) {
59396 + case 0:
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);
59403 + break;
59404 + case 1:
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);
59411 + break;
59412 + }
59413 + j++;
59414 + }
59415 +
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);
59426 + }
59427 +}
59428 +
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)
59433 +{
59434 + resource_size_t size = res->end - res->start + 1;
59435 + u64 sa;
59436 +
59437 + /* Calculate window size */
59438 + sa = (0xffffffffffffffffull << ilog2(size));;
59439 + if (res->flags & IORESOURCE_PREFETCH)
59440 + sa |= 0x8;
59441 +
59442 + out_le32(mbase + PECFG_BAR0HMPA, RES_TO_U32_HIGH(sa));
59443 + out_le32(mbase + PECFG_BAR0LMPA, RES_TO_U32_LOW(sa));
59444 +
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);
59452 +
59453 + /* Enable inbound mapping */
59454 + out_le32(mbase + PECFG_PIMEN, 0x1);
59455 +
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));
59458 +
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);
59463 +}
59464 +
59465 +static void __init ppc4xx_pciex_port_setup_hose(struct ppc4xx_pciex_port *port)
59466 +{
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;
59472 +
59473 + /* XXX FIXME: Handle endpoint mode properly */
59474 + if (port->endpoint) {
59475 + printk(KERN_WARNING "PCIE%d: Port in endpoint mode !\n",
59476 + port->index);
59477 + return;
59478 + }
59479 +
59480 + /* Check if primary bridge */
59481 + if (of_get_property(port->node, "primary", NULL))
59482 + primary = 1;
59483 +
59484 + /* Get bus range if any */
59485 + bus_range = of_get_property(port->node, "bus-range", NULL);
59486 +
59487 + /* Allocate the host controller data structure */
59488 + hose = pcibios_alloc_controller(port->node);
59489 + if (!hose)
59490 + goto fail;
59491 +
59492 + /* We stick the port number in "indirect_type" so the config space
59493 + * ops can retrieve the port data structure easily
59494 + */
59495 + hose->indirect_type = port->index;
59496 +
59497 + /* Get bus range */
59498 + hose->first_busno = bus_range ? bus_range[0] : 0x0;
59499 + hose->last_busno = bus_range ? bus_range[1] : 0xff;
59500 +
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.
59505 + */
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;
59510 + }
59511 +
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
59514 + * is 4K
59515 + */
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);
59523 + goto fail;
59524 + }
59525 +
59526 + hose->cfg_data = cfg_data;
59527 + hose->cfg_addr = mbase;
59528 +
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);
59533 +
59534 + /* Setup config space */
59535 + hose->ops = &ppc4xx_pciex_pci_ops;
59536 + port->hose = hose;
59537 + mbase = (void __iomem *)hose->cfg_addr;
59538 +
59539 + /*
59540 + * Set bus numbers on our root port
59541 + */
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);
59545 +
59546 + /*
59547 + * OMRs are already reset, also disable PIMs
59548 + */
59549 + out_le32(mbase + PECFG_PIMEN, 0);
59550 +
59551 + /* Parse outbound mapping resources */
59552 + pci_process_bridge_OF_ranges(hose, port->node, primary);
59553 +
59554 + /* Parse inbound mapping resources */
59555 + if (ppc4xx_parse_dma_ranges(hose, mbase, &dma_window) != 0)
59556 + goto fail;
59557 +
59558 + /* Configure outbound ranges POMs */
59559 + ppc4xx_configure_pciex_POMs(port, hose, mbase);
59560 +
59561 + /* Configure inbound ranges PIMs */
59562 + ppc4xx_configure_pciex_PIMs(port, hose, mbase, &dma_window);
59563 +
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.
59567 + */
59568 + out_le16(mbase + 0x200, 0xaaa0 + port->index);
59569 + out_le16(mbase + 0x202, 0xbed0 + port->index);
59570 +
59571 + /* Set Class Code to PCI-PCI bridge and Revision Id to 1 */
59572 + out_le32(mbase + 0x208, 0x06040001);
59573 +
59574 + printk(KERN_INFO "PCIE%d: successfully set as root-complex\n",
59575 + port->index);
59576 + return;
59577 + fail:
59578 + if (hose)
59579 + pcibios_free_controller(hose);
59580 + if (cfg_data)
59581 + iounmap(cfg_data);
59582 + if (mbase)
59583 + iounmap(mbase);
59584 +}
59585 +
59586 +static void __init ppc4xx_probe_pciex_bridge(struct device_node *np)
59587 +{
59588 + struct ppc4xx_pciex_port *port;
59589 + const u32 *pval;
59590 + int portno;
59591 + unsigned int dcrs;
59592 +
59593 + /* First, proceed to core initialization as we assume there's
59594 + * only one PCIe core in the system
59595 + */
59596 + if (ppc4xx_pciex_check_core_init(np))
59597 + return;
59598 +
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",
59603 + np->full_name);
59604 + return;
59605 + }
59606 + portno = *pval;
59607 + if (portno >= ppc4xx_pciex_port_count) {
59608 + printk(KERN_ERR "PCIE: port number out of range for %s\n",
59609 + np->full_name);
59610 + return;
59611 + }
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",
59618 + np->full_name);
59619 + return;
59620 + }
59621 + port->sdr_base = *pval;
59622 +
59623 + /* XXX Currently, we only support root complex mode */
59624 + port->endpoint = 0;
59625 +
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 !",
59629 + np->full_name);
59630 + return;
59631 + }
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 !",
59635 + np->full_name);
59636 + return;
59637 + }
59638 +
59639 + /* Map DCRs */
59640 + dcrs = dcr_resource_start(np, 0);
59641 + if (dcrs == 0) {
59642 + printk(KERN_ERR "%s: Can't get DCR register base !",
59643 + np->full_name);
59644 + return;
59645 + }
59646 + port->dcrs = dcr_map(np, dcrs, dcr_resource_len(np, 0));
59647 +
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);
59651 + return;
59652 + }
59653 +
59654 + /* Setup the linux hose data structure */
59655 + ppc4xx_pciex_port_setup_hose(port);
59656 +}
59657 +
59658 +#endif /* CONFIG_PPC4xx_PCI_EXPRESS */
59659 +
59660 +static int __init ppc4xx_pci_find_bridges(void)
59661 +{
59662 + struct device_node *np;
59663 +
59664 +#ifdef CONFIG_PPC4xx_PCI_EXPRESS
59665 + for_each_compatible_node(np, NULL, "ibm,plb-pciex")
59666 + ppc4xx_probe_pciex_bridge(np);
59667 +#endif
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);
59672 +
59673 + return 0;
59674 +}
59675 +arch_initcall(ppc4xx_pci_find_bridges);
59676 +
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
59680 @@ -0,0 +1,369 @@
59681 +/*
59682 + * PCI / PCI-X / PCI-Express support for 4xx parts
59683 + *
59684 + * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
59685 + *
59686 + * Bits and pieces extracted from arch/ppc support by
59687 + *
59688 + * Matt Porter <mporter@kernel.crashing.org>
59689 + *
59690 + * Copyright 2002-2005 MontaVista Software Inc.
59691 + */
59692 +#ifndef __PPC4XX_PCI_H__
59693 +#define __PPC4XX_PCI_H__
59694 +
59695 +/*
59696 + * 4xx PCI-X bridge register definitions
59697 + */
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
59783 +
59784 +/*
59785 + * 4xx PCI bridge register definitions
59786 + */
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
59803 +
59804 +/*
59805 + * 4xx PCIe bridge register definitions
59806 + */
59807 +
59808 +/* DCR offsets */
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
59836 +
59837 +/* DMER mask */
59838 +#define GPL_DMER_MASK_DISA 0x02000000
59839 +
59840 +/*
59841 + * System DCRs (SDRs)
59842 + */
59843 +#define PESDR0_PLLLCT1 0x03a0
59844 +#define PESDR0_PLLLCT2 0x03a1
59845 +#define PESDR0_PLLLCT3 0x03a2
59846 +
59847 +/*
59848 + * 440SPe additional DCRs
59849 + */
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
59883 +
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
59904 +
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
59925 +
59926 +/*
59927 + * 405EX additional DCRs
59928 + */
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
59940 +
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
59952 +
59953 +/*
59954 + * Of the above, some are common offsets from the base
59955 + */
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
59962 +
59963 +/* 440spe only */
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
59976 +
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
59990 +
59991 +/* 405ex only */
59992 +#define PESDRn_405EX_PHYSET1 0x06
59993 +#define PESDRn_405EX_PHYSET2 0x07
59994 +#define PESDRn_405EX_PHYSTA 0x0c
59995 +
59996 +/*
59997 + * UTL register offsets
59998 + */
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
60009 +
60010 +/*
60011 + * Config space register offsets
60012 + */
60013 +#define PECFG_ECRTCTL 0x074
60014 +
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
60020 +
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
60028 +
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
60035 +
60036 +
60037 +enum
60038 +{
60039 + PTYPE_ENDPOINT = 0x0,
60040 + PTYPE_LEGACY_ENDPOINT = 0x1,
60041 + PTYPE_ROOT_PORT = 0x4,
60042 +
60043 + LNKW_X1 = 0x1,
60044 + LNKW_X4 = 0x4,
60045 + LNKW_X8 = 0x8
60046 +};
60047 +
60048 +
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
60053 @@ -4,7 +4,7 @@
60054
60055 config UCC_SLOW
60056 bool
60057 - default n
60058 + default y if SERIAL_QE
60059 help
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
60065 @@ -25,6 +25,7 @@
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 @@
60074
60075 /* Program the BRG to the given sampling rate and multiplier
60076 *
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.
60083 - *
60084 - * Also note that the value programmed into the BRGC register must be even.
60085 */
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)
60088 {
60089 u32 divisor, tempval;
60090 u32 div16 = 0;
60091
60092 + if ((brg < QE_BRG1) || (brg > QE_BRG16))
60093 + return -EINVAL;
60094 +
60095 divisor = get_brg_clk() / (rate * multiplier);
60096
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;
60101
60102 - out_be32(&qe_immr->brg.brgc[brg - 1], tempval);
60103 + out_be32(&qe_immr->brg.brgc[brg - QE_BRG1], tempval);
60104 +
60105 + return 0;
60106 +}
60107 +EXPORT_SYMBOL(qe_setbrg);
60108 +
60109 +/* Convert a string to a QE clock source enum
60110 + *
60111 + * This function takes a string, typically from a property in the device
60112 + * tree, and returns the corresponding "enum qe_clock" value.
60113 +*/
60114 +enum qe_clock qe_clock_source(const char *source)
60115 +{
60116 + unsigned int i;
60117 +
60118 + if (strcasecmp(source, "none") == 0)
60119 + return QE_CLK_NONE;
60120 +
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;
60125 + else
60126 + return QE_CLK_DUMMY;
60127 + }
60128 +
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;
60133 + else
60134 + return QE_CLK_DUMMY;
60135 + }
60136 +
60137 + return QE_CLK_DUMMY;
60138 }
60139 +EXPORT_SYMBOL(qe_clock_source);
60140
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];
60145 }
60146 EXPORT_SYMBOL(qe_muram_addr);
60147 +
60148 +/* The maximum number of RISCs we support */
60149 +#define MAX_QE_RISC 2
60150 +
60151 +/* Firmware information stored here for qe_get_firmware_info() */
60152 +static struct qe_firmware_info qe_firmware_info;
60153 +
60154 +/*
60155 + * Set to 1 if QE firmware has been uploaded, and therefore
60156 + * qe_firmware_info contains valid data.
60157 + */
60158 +static int qe_firmware_uploaded;
60159 +
60160 +/*
60161 + * Upload a QE microcode
60162 + *
60163 + * This function is a worker function for qe_upload_firmware(). It does
60164 + * the actual uploading of the microcode.
60165 + */
60166 +static void qe_upload_microcode(const void *base,
60167 + const struct qe_microcode *ucode)
60168 +{
60169 + const __be32 *code = base + be32_to_cpu(ucode->code_offset);
60170 + unsigned int i;
60171 +
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);
60176 + else
60177 + printk(KERN_INFO "qe-firmware: "
60178 + "uploading microcode '%s'\n", ucode->id);
60179 +
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);
60183 +
60184 + for (i = 0; i < be32_to_cpu(ucode->count); i++)
60185 + out_be32(&qe_immr->iram.idata, be32_to_cpu(code[i]));
60186 +}
60187 +
60188 +/*
60189 + * Upload a microcode to the I-RAM at a specific address.
60190 + *
60191 + * See Documentation/powerpc/qe-firmware.txt for information on QE microcode
60192 + * uploading.
60193 + *
60194 + * Currently, only version 1 is supported, so the 'version' field must be
60195 + * set to 1.
60196 + *
60197 + * The SOC model and revision are not validated, they are only displayed for
60198 + * informational purposes.
60199 + *
60200 + * 'calc_size' is the calculated size, in bytes, of the firmware structure and
60201 + * all of the microcode structures, minus the CRC.
60202 + *
60203 + * 'length' is the size that the structure says it is, including the CRC.
60204 + */
60205 +int qe_upload_firmware(const struct qe_firmware *firmware)
60206 +{
60207 + unsigned int i;
60208 + unsigned int j;
60209 + u32 crc;
60210 + size_t calc_size = sizeof(struct qe_firmware);
60211 + size_t length;
60212 + const struct qe_header *hdr;
60213 +
60214 + if (!firmware) {
60215 + printk(KERN_ERR "qe-firmware: invalid pointer\n");
60216 + return -EINVAL;
60217 + }
60218 +
60219 + hdr = &firmware->header;
60220 + length = be32_to_cpu(hdr->length);
60221 +
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");
60226 + return -EPERM;
60227 + }
60228 +
60229 + /* Check the version */
60230 + if (hdr->version != 1) {
60231 + printk(KERN_ERR "qe-firmware: unsupported version\n");
60232 + return -EPERM;
60233 + }
60234 +
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");
60238 + return -EINVAL;
60239 + }
60240 +
60241 + /* Validate the length and check if there's a CRC */
60242 + calc_size += (firmware->count - 1) * sizeof(struct qe_microcode);
60243 +
60244 + for (i = 0; i < firmware->count; i++)
60245 + /*
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.
60249 + */
60250 + calc_size += sizeof(__be32) *
60251 + be32_to_cpu(firmware->microcode[i].count);
60252 +
60253 + /* Validate the length */
60254 + if (length != calc_size + sizeof(__be32)) {
60255 + printk(KERN_ERR "qe-firmware: invalid length\n");
60256 + return -EPERM;
60257 + }
60258 +
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");
60263 + return -EIO;
60264 + }
60265 +
60266 + /*
60267 + * If the microcode calls for it, split the I-RAM.
60268 + */
60269 + if (!firmware->split)
60270 + setbits16(&qe_immr->cp.cercr, QE_CP_CERCR_CIR);
60271 +
60272 + if (firmware->soc.model)
60273 + printk(KERN_INFO
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);
60277 + else
60278 + printk(KERN_INFO "qe-firmware: firmware '%s'\n",
60279 + firmware->id);
60280 +
60281 + /*
60282 + * The QE only supports one microcode per RISC, so clear out all the
60283 + * saved microcode information and put in the new.
60284 + */
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));
60290 +
60291 + /* Loop through each microcode. */
60292 + for (i = 0; i < firmware->count; i++) {
60293 + const struct qe_microcode *ucode = &firmware->microcode[i];
60294 +
60295 + /* Upload a microcode if it's present */
60296 + if (ucode->code_offset)
60297 + qe_upload_microcode(firmware, ucode);
60298 +
60299 + /* Program the traps for this processor */
60300 + for (j = 0; j < 16; j++) {
60301 + u32 trap = be32_to_cpu(ucode->traps[j]);
60302 +
60303 + if (trap)
60304 + out_be32(&qe_immr->rsp[i].tibcr[j], trap);
60305 + }
60306 +
60307 + /* Enable traps */
60308 + out_be32(&qe_immr->rsp[i].eccr, be32_to_cpu(ucode->eccr));
60309 + }
60310 +
60311 + qe_firmware_uploaded = 1;
60312 +
60313 + return 0;
60314 +}
60315 +EXPORT_SYMBOL(qe_upload_firmware);
60316 +
60317 +/*
60318 + * Get info on the currently-loaded firmware
60319 + *
60320 + * This function also checks the device tree to see if the boot loader has
60321 + * uploaded a firmware already.
60322 + */
60323 +struct qe_firmware_info *qe_get_firmware_info(void)
60324 +{
60325 + static int initialized;
60326 + struct property *prop;
60327 + struct device_node *qe;
60328 + struct device_node *fw = NULL;
60329 + const char *sprop;
60330 + unsigned int i;
60331 +
60332 + /*
60333 + * If we haven't checked yet, and a driver hasn't uploaded a firmware
60334 + * yet, then check the device tree for information.
60335 + */
60336 + if (initialized || qe_firmware_uploaded)
60337 + return NULL;
60338 +
60339 + initialized = 1;
60340 +
60341 + /*
60342 + * Newer device trees have an "fsl,qe" compatible property for the QE
60343 + * node, but we still need to support older device trees.
60344 + */
60345 + qe = of_find_compatible_node(NULL, NULL, "fsl,qe");
60346 + if (!qe) {
60347 + qe = of_find_node_by_type(NULL, "qe");
60348 + if (!qe)
60349 + return NULL;
60350 + }
60351 +
60352 + /* Find the 'firmware' child node */
60353 + for_each_child_of_node(qe, fw) {
60354 + if (strcmp(fw->name, "firmware") == 0)
60355 + break;
60356 + }
60357 +
60358 + of_node_put(qe);
60359 +
60360 + /* Did we find the 'firmware' node? */
60361 + if (!fw)
60362 + return NULL;
60363 +
60364 + qe_firmware_uploaded = 1;
60365 +
60366 + /* Copy the data into qe_firmware_info*/
60367 + sprop = of_get_property(fw, "id", NULL);
60368 + if (sprop)
60369 + strncpy(qe_firmware_info.id, sprop,
60370 + sizeof(qe_firmware_info.id) - 1);
60371 +
60372 + prop = of_find_property(fw, "extended-modes", NULL);
60373 + if (prop && (prop->length == sizeof(u64))) {
60374 + const u64 *iprop = prop->value;
60375 +
60376 + qe_firmware_info.extended_modes = *iprop;
60377 + }
60378 +
60379 + prop = of_find_property(fw, "virtual-traps", NULL);
60380 + if (prop && (prop->length == 32)) {
60381 + const u32 *iprop = prop->value;
60382 +
60383 + for (i = 0; i < ARRAY_SIZE(qe_firmware_info.vtraps); i++)
60384 + qe_firmware_info.vtraps[i] = iprop[i];
60385 + }
60386 +
60387 + of_node_put(fw);
60388 +
60389 + return &qe_firmware_info;
60390 +}
60391 +EXPORT_SYMBOL(qe_get_firmware_info);
60392 +
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
60396 @@ -19,6 +19,7 @@
60397 #include <linux/stddef.h>
60398 #include <linux/interrupt.h>
60399 #include <linux/err.h>
60400 +#include <linux/module.h>
60401
60402 #include <asm/io.h>
60403 #include <asm/immap_qe.h>
60404 @@ -41,6 +42,7 @@
60405 default: return QE_CR_SUBBLOCK_INVALID;
60406 }
60407 }
60408 +EXPORT_SYMBOL(ucc_slow_get_qe_cr_subblock);
60409
60410 void ucc_slow_poll_transmitter_now(struct ucc_slow_private * uccs)
60411 {
60412 @@ -56,6 +58,7 @@
60413 qe_issue_cmd(QE_GRACEFUL_STOP_TX, id,
60414 QE_CR_PROTOCOL_UNSPECIFIED, 0);
60415 }
60416 +EXPORT_SYMBOL(ucc_slow_graceful_stop_tx);
60417
60418 void ucc_slow_stop_tx(struct ucc_slow_private * uccs)
60419 {
60420 @@ -65,6 +68,7 @@
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);
60423 }
60424 +EXPORT_SYMBOL(ucc_slow_stop_tx);
60425
60426 void ucc_slow_restart_tx(struct ucc_slow_private * uccs)
60427 {
60428 @@ -74,6 +78,7 @@
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);
60431 }
60432 +EXPORT_SYMBOL(ucc_slow_restart_tx);
60433
60434 void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode)
60435 {
60436 @@ -94,6 +99,7 @@
60437 }
60438 out_be32(&us_regs->gumr_l, gumr_l);
60439 }
60440 +EXPORT_SYMBOL(ucc_slow_enable);
60441
60442 void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
60443 {
60444 @@ -114,6 +120,7 @@
60445 }
60446 out_be32(&us_regs->gumr_l, gumr_l);
60447 }
60448 +EXPORT_SYMBOL(ucc_slow_disable);
60449
60450 /* Initialize the UCC for Slow operations
60451 *
60452 @@ -347,6 +354,7 @@
60453 *uccs_ret = uccs;
60454 return 0;
60455 }
60456 +EXPORT_SYMBOL(ucc_slow_init);
60457
60458 void ucc_slow_free(struct ucc_slow_private * uccs)
60459 {
60460 @@ -366,5 +374,5 @@
60461
60462 kfree(uccs);
60463 }
60464 -
60465 +EXPORT_SYMBOL(ucc_slow_free);
60466
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)
60472 {
60473 struct device_node *np;
60474 - unsigned int i;
60475 + unsigned int i = 0;
60476 struct platform_device *tsi_eth_dev;
60477 struct resource res;
60478 int ret;
60479
60480 - for (np = NULL, i = 0;
60481 - (np = of_find_compatible_node(np, "network", "tsi108-ethernet")) != NULL;
60482 - i++) {
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;
60487 @@ -98,7 +96,7 @@
60488 __FUNCTION__,r[1].name, r[1].start, r[1].end);
60489
60490 tsi_eth_dev =
60491 - platform_device_register_simple("tsi-ethernet", i, &r[0],
60492 + platform_device_register_simple("tsi-ethernet", i++, &r[0],
60493 1);
60494
60495 if (IS_ERR(tsi_eth_dev)) {
60496 @@ -154,6 +152,7 @@
60497 unreg:
60498 platform_device_unregister(tsi_eth_dev);
60499 err:
60500 + of_node_put(np);
60501 return ret;
60502 }
60503
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 @@
60508
60509 /* The remapper for this UIC */
60510 struct irq_host *irqhost;
60511 -
60512 - /* For secondary UICs, the cascade interrupt's irqaction */
60513 - struct irqaction cascade;
60514 };
60515
60516 static void uic_unmask_irq(unsigned int virq)
60517 {
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;
60522 - u32 er;
60523 + u32 er, sr;
60524
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);
60532 + er |= sr;
60533 mtdcr(uic->dcrbase + UIC_ER, er);
60534 spin_unlock_irqrestore(&uic->lock, flags);
60535 }
60536 @@ -99,6 +101,7 @@
60537
60538 static void uic_mask_ack_irq(unsigned int virq)
60539 {
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);
60546 er &= ~sr;
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()
60556 + */
60557 + if (!(desc->status & IRQ_LEVEL))
60558 + mtdcr(uic->dcrbase + UIC_SR, sr);
60559 spin_unlock_irqrestore(&uic->lock, flags);
60560 }
60561
60562 @@ -173,64 +185,6 @@
60563 .set_type = uic_set_irq_type,
60564 };
60565
60566 -/**
60567 - * handle_uic_irq - irq flow handler for UIC
60568 - * @irq: the interrupt number
60569 - * @desc: the interrupt description structure for this irq
60570 - *
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.
60580 - */
60581 -void fastcall handle_uic_irq(unsigned int irq, struct irq_desc *desc)
60582 -{
60583 - unsigned int cpu = smp_processor_id();
60584 - struct irqaction *action;
60585 - irqreturn_t action_ret;
60586 -
60587 - spin_lock(&desc->lock);
60588 - if (desc->status & IRQ_LEVEL)
60589 - desc->chip->mask(irq);
60590 - else
60591 - desc->chip->mask_ack(irq);
60592 -
60593 - if (unlikely(desc->status & IRQ_INPROGRESS))
60594 - goto out_unlock;
60595 - desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
60596 - kstat_cpu(cpu).irqs[irq]++;
60597 -
60598 - /*
60599 - * If its disabled or no action available
60600 - * keep it masked and get out of here
60601 - */
60602 - action = desc->action;
60603 - if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
60604 - desc->status |= IRQ_PENDING;
60605 - goto out_unlock;
60606 - }
60607 -
60608 - desc->status |= IRQ_INPROGRESS;
60609 - desc->status &= ~IRQ_PENDING;
60610 - spin_unlock(&desc->lock);
60611 -
60612 - action_ret = handle_IRQ_event(irq, action);
60613 -
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);
60620 -out_unlock:
60621 - spin_unlock(&desc->lock);
60622 -}
60623 -
60624 static int uic_host_map(struct irq_host *h, unsigned int virq,
60625 irq_hw_number_t hw)
60626 {
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);
60633
60634 /* Set default irq type */
60635 set_irq_type(virq, IRQ_TYPE_NONE);
60636 @@ -264,23 +218,36 @@
60637 .xlate = uic_host_xlate,
60638 };
60639
60640 -irqreturn_t uic_cascade(int virq, void *data)
60641 +void uic_irq_cascade(unsigned int virq, struct irq_desc *desc)
60642 {
60643 - struct uic *uic = data;
60644 + struct uic *uic = get_irq_data(virq);
60645 u32 msr;
60646 int src;
60647 int subvirq;
60648
60649 + spin_lock(&desc->lock);
60650 + if (desc->status & IRQ_LEVEL)
60651 + desc->chip->mask(virq);
60652 + else
60653 + desc->chip->mask_ack(virq);
60654 + spin_unlock(&desc->lock);
60655 +
60656 msr = mfdcr(uic->dcrbase + UIC_MSR);
60657 if (!msr) /* spurious interrupt */
60658 - return IRQ_HANDLED;
60659 + goto uic_irq_ret;
60660
60661 src = 32 - ffs(msr);
60662
60663 subvirq = irq_linear_revmap(uic->irqhost, src);
60664 generic_handle_irq(subvirq);
60665
60666 - return IRQ_HANDLED;
60667 +uic_irq_ret:
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);
60674 }
60675
60676 static struct uic * __init uic_init_one(struct device_node *node)
60677 @@ -342,33 +309,27 @@
60678 const u32 *interrupts;
60679
60680 /* First locate and initialize the top-level UIC */
60681 -
60682 - np = of_find_compatible_node(NULL, NULL, "ibm,uic");
60683 - while (np) {
60684 + for_each_compatible_node(np, NULL, "ibm,uic") {
60685 interrupts = of_get_property(np, "interrupts", NULL);
60686 - if (! interrupts)
60687 + if (!interrupts)
60688 break;
60689 -
60690 - np = of_find_compatible_node(np, NULL, "ibm,uic");
60691 }
60692
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);
60699
60700 irq_set_default_host(primary_uic->irqhost);
60701 of_node_put(np);
60702
60703 /* The scan again for cascaded UICs */
60704 - np = of_find_compatible_node(NULL, NULL, "ibm,uic");
60705 - while (np) {
60706 + for_each_compatible_node(np, NULL, "ibm,uic") {
60707 interrupts = of_get_property(np, "interrupts", NULL);
60708 if (interrupts) {
60709 /* Secondary UIC */
60710 int cascade_virq;
60711 - int ret;
60712
60713 uic = uic_init_one(np);
60714 if (! uic)
60715 @@ -377,20 +338,11 @@
60716
60717 cascade_virq = irq_of_parse_and_map(np, 0);
60718
60719 - uic->cascade.handler = uic_cascade;
60720 - uic->cascade.name = "UIC cascade";
60721 - uic->cascade.dev_id = uic;
60722 -
60723 - ret = setup_irq(cascade_virq, &uic->cascade);
60724 - if (ret)
60725 - printk(KERN_ERR "Failed to setup_irq(%d) for "
60726 - "UIC%d cascade\n", cascade_virq,
60727 - uic->index);
60728 + set_irq_data(cascade_virq, uic);
60729 + set_irq_chained_handler(cascade_virq, uic_irq_cascade);
60730
60731 /* FIXME: setup critical cascade?? */
60732 }
60733 -
60734 - np = of_find_compatible_node(np, NULL, "ibm,uic");
60735 }
60736 }
60737
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;
60743
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))
60748 break;
60749 }
60750 + if (!np) {
60751 + for_each_compatible_node(np, NULL, "xlnx,xps-intc-1.00.a") {
60752 + if (!of_get_property(np, "interrupts", NULL))
60753 + break;
60754 + }
60755 + }
60756
60757 /* xilinx interrupt controller needs to be top level */
60758 BUG_ON(!np);
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
60762 @@ -12,67 +12,6 @@
60763 #include <asm/ppc_asm.h>
60764 #include <asm/asm-offsets.h>
60765
60766 -_GLOBAL(xmon_setjmp)
60767 - mflr r0
60768 - PPC_STL r0,0(r3)
60769 - PPC_STL r1,SZL(r3)
60770 - PPC_STL r2,2*SZL(r3)
60771 - mfcr r0
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)
60792 - li r3,0
60793 - blr
60794 -
60795 -_GLOBAL(xmon_longjmp)
60796 - PPC_LCMPI r4,0
60797 - bne 1f
60798 - li r4,1
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)
60819 - mtcrf 0x38,r0
60820 - PPC_LL r0,0(r3)
60821 - PPC_LL r1,SZL(r3)
60822 - PPC_LL r2,2*SZL(r3)
60823 - mtlr r0
60824 - mr r3,r4
60825 - blr
60826 -
60827 /*
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
60833 @@ -40,6 +40,7 @@
60834 #include <asm/spu.h>
60835 #include <asm/spu_priv1.h>
60836 #include <asm/firmware.h>
60837 +#include <asm/setjmp.h>
60838
60839 #ifdef CONFIG_PPC64
60840 #include <asm/hvcall.h>
60841 @@ -71,12 +72,9 @@
60842 static int termch;
60843 static char tmpstr[128];
60844
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
60851
60852 /* Breakpoint stuff */
60853 struct bpt {
60854 @@ -153,13 +151,15 @@
60855
60856 static int do_spu_cmd(void);
60857
60858 +#ifdef CONFIG_44x
60859 +static void dump_tlb_44x(void);
60860 +#endif
60861 +
60862 int xmon_no_auto_backtrace;
60863
60864 extern void xmon_enter(void);
60865 extern void xmon_leave(void);
60866
60867 -extern long setjmp(long *);
60868 -extern void longjmp(long *, long);
60869 extern void xmon_save_regs(struct pt_regs *);
60870
60871 #ifdef CONFIG_PPC64
60872 @@ -231,6 +231,9 @@
60873 #ifdef CONFIG_PPC_STD_MMU_32
60874 " u dump segment registers\n"
60875 #endif
60876 +#ifdef CONFIG_44x
60877 +" u dump TLB\n"
60878 +#endif
60879 " ? help\n"
60880 " zr reboot\n\
60881 zh halt\n"
60882 @@ -856,6 +859,11 @@
60883 dump_segments();
60884 break;
60885 #endif
60886 +#ifdef CONFIG_4xx
60887 + case 'u':
60888 + dump_tlb_44x();
60889 + break;
60890 +#endif
60891 default:
60892 printf("Unrecognized command: ");
60893 do {
60894 @@ -2527,16 +2535,33 @@
60895 static void dump_slb(void)
60896 {
60897 int i;
60898 - unsigned long tmp;
60899 + unsigned long esid,vsid,valid;
60900 + unsigned long llp;
60901
60902 printf("SLB contents of cpu %x\n", smp_processor_id());
60903
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);
60907 -
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);
60916 + if (valid) {
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,
60922 + llp);
60923 + } else {
60924 + printf(" 256M ESID=%9lx VSID=%13lx LLP:%3lx \n",
60925 + GET_ESID(esid),
60926 + (vsid & ~SLB_VSID_B) >> SLB_VSID_SHIFT,
60927 + llp);
60928 + }
60929 + } else
60930 + printf("\n");
60931 + }
60932 }
60933 }
60934
60935 @@ -2581,6 +2606,32 @@
60936 }
60937 #endif
60938
60939 +#ifdef CONFIG_44x
60940 +static void dump_tlb_44x(void)
60941 +{
60942 + int i;
60943 +
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');
60960 + }
60961 + printf("\n");
60962 + }
60963 +}
60964 +#endif /* CONFIG_44x */
60965 void xmon_init(int enable)
60966 {
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
60971 @@ -13,7 +13,6 @@
60972 ppc_htab.o
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 @@
60983 li r5,0
60984 ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_I | PPC44x_TLB_G)
60985
60986 - li r0,0 /* TLB slot 0 */
60987 + li r0,62 /* TLB slot 62 */
60988
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
60994 @@ -1,52 +0,0 @@
60995 -/*
60996 - * RapidIO PPC32 support
60997 - *
60998 - * Copyright 2005 MontaVista Software, Inc.
60999 - * Matt Porter <mporter@kernel.crashing.org>
61000 - *
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.
61005 - */
61006 -
61007 -#include <linux/init.h>
61008 -#include <linux/kernel.h>
61009 -#include <linux/rio.h>
61010 -
61011 -#include <asm/rio.h>
61012 -
61013 -/**
61014 - * platform_rio_init - Do platform specific RIO init
61015 - *
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.
61019 - */
61020 -void __attribute__ ((weak))
61021 - platform_rio_init(void)
61022 -{
61023 - printk(KERN_WARNING "RIO: No platform_rio_init() present\n");
61024 -}
61025 -
61026 -/**
61027 - * ppc_rio_init - Do PPC32 RIO init
61028 - *
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.
61032 - */
61033 -static int __init ppc_rio_init(void)
61034 -{
61035 - printk(KERN_INFO "RIO: RapidIO init\n");
61036 -
61037 - /* Platform specific initialization */
61038 - platform_rio_init();
61039 -
61040 - /* Enumerate all registered ports */
61041 - rio_init_mports();
61042 -
61043 - return 0;
61044 -}
61045 -
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
61050 @@ -37,7 +37,6 @@
61051 #include <asm/nvram.h>
61052 #include <asm/xmon.h>
61053 #include <asm/ocp.h>
61054 -#include <asm/prom.h>
61055
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 @@
61062 {
61063 }
61064
61065 -void machine_check_exception(struct pt_regs *regs)
61066 +#if defined(CONFIG_4xx)
61067 +int machine_check_4xx(struct pt_regs *regs)
61068 {
61069 unsigned long reason = get_mc_reason(regs);
61070
61071 - if (user_mode(regs)) {
61072 - regs->msr |= MSR_RI;
61073 - _exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
61074 - return;
61075 - }
61076 -
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);
61080 - return;
61081 -#endif
61082 -
61083 - if (debugger_fault_handler) {
61084 - debugger_fault_handler(regs);
61085 - regs->msr |= MSR_RI;
61086 - return;
61087 - }
61088 -
61089 - if (check_io_access(regs))
61090 - return;
61091 -
61092 -#if defined(CONFIG_4xx) && !defined(CONFIG_440A)
61093 if (reason & ESR_IMCP) {
61094 printk("Instruction");
61095 mtspr(SPRN_ESR, reason & ~ESR_IMCP);
61096 } else
61097 printk("Data");
61098 printk(" machine check in kernel mode.\n");
61099 -#elif defined(CONFIG_440A)
61100 +
61101 + return 0;
61102 +}
61103 +
61104 +int machine_check_440A(struct pt_regs *regs)
61105 +{
61106 + unsigned long reason = get_mc_reason(regs);
61107 +
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 @@
61112 /* Clear MCSR */
61113 mtspr(SPRN_MCSR, mcsr);
61114 }
61115 -#elif defined (CONFIG_E500)
61116 + return 0;
61117 +}
61118 +#elif defined(CONFIG_E500)
61119 +int machine_check_e500(struct pt_regs *regs)
61120 +{
61121 + unsigned long reason = get_mc_reason(regs);
61122 +
61123 printk("Machine check in kernel mode.\n");
61124 printk("Caused by (from MCSR=%lx): ", reason);
61125
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)
61146 +
61147 + return 0;
61148 +}
61149 +#elif defined(CONFIG_E200)
61150 +int machine_check_e200(struct pt_regs *regs)
61151 +{
61152 + unsigned long reason = get_mc_reason(regs);
61153 +
61154 printk("Machine check in kernel mode.\n");
61155 printk("Caused by (from MCSR=%lx): ", reason);
61156
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 */
61162 +
61163 + return 0;
61164 +}
61165 +#else
61166 +int machine_check_generic(struct pt_regs *regs)
61167 +{
61168 + unsigned long reason = get_mc_reason(regs);
61169 +
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 @@
61174 default:
61175 printk("Unknown values in msr\n");
61176 }
61177 -#endif /* CONFIG_4xx */
61178 + return 0;
61179 +}
61180 +#endif /* everything else */
61181 +
61182 +void machine_check_exception(struct pt_regs *regs)
61183 +{
61184 + int recover = 0;
61185 +
61186 + if (cur_cpu_spec->machine_check)
61187 + recover = cur_cpu_spec->machine_check(regs);
61188 + if (recover > 0)
61189 + return;
61190 +
61191 + if (user_mode(regs)) {
61192 + regs->msr |= MSR_RI;
61193 + _exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
61194 + return;
61195 + }
61196 +
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);
61200 + return;
61201 +#endif
61202 +
61203 + if (debugger_fault_handler) {
61204 + debugger_fault_handler(regs);
61205 + regs->msr |= MSR_RI;
61206 + return;
61207 + }
61208 +
61209 + if (check_io_access(regs))
61210 + return;
61211
61212 /*
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.
61219 */
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;
61224
61225 /*
61226 * "Pins" a 256MB TLB entry in AS0 for kernel lowmem
61227 */
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)
61231 {
61232 - unsigned long attrib = 0;
61233 -
61234 - __asm__ __volatile__("\
61235 - clrrwi %2,%2,10\n\
61236 - ori %2,%2,%4\n\
61237 - clrrwi %1,%1,10\n\
61238 - li %0,0\n\
61239 - ori %0,%0,%5\n\
61240 - tlbwe %2,%3,%6\n\
61241 - tlbwe %1,%3,%7\n\
61242 - tlbwe %0,%3,%8"
61243 + __asm__ __volatile__(
61244 + "tlbwe %2,%3,%4\n"
61245 + "tlbwe %1,%3,%5\n"
61246 + "tlbwe %0,%3,%6\n"
61247 :
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),
61252 + "r" (phys),
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));
61258 }
61259
61260 -/*
61261 - * MMU_init_hw does the chip-specific initialization of the MMU hardware.
61262 - */
61263 void __init MMU_init_hw(void)
61264 {
61265 flush_instruction_cache();
61266 @@ -99,22 +89,13 @@
61267
61268 unsigned long __init mmu_mapin_ram(void)
61269 {
61270 - unsigned int pinned_tlbs = 1;
61271 - int i;
61272 -
61273 - /* Determine number of entries necessary to cover lowmem */
61274 - pinned_tlbs = (unsigned int)
61275 - (_ALIGN(total_lowmem, PPC_PIN_SIZE) >> PPC44x_PIN_SHIFT);
61276 -
61277 - /* Write upper watermark to save location */
61278 - tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs;
61279 + unsigned long addr;
61280
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);
61286 - }
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);
61292
61293 return total_lowmem;
61294 }
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
61298 @@ -42,8 +42,6 @@
61299
61300 #include <mm/mmu_decl.h>
61301
61302 -#include <syslib/ppc85xx_rio.h>
61303 -
61304 #include <platforms/85xx/mpc85xx_ads_common.h>
61305
61306 #ifndef CONFIG_PCI
61307 @@ -190,6 +188,7 @@
61308 #endif /* CONFIG_PCI */
61309
61310 #ifdef CONFIG_RAPIDIO
61311 +extern void mpc85xx_rio_setup(int law_start, int law_size);
61312 void platform_rio_init(void)
61313 {
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>
61324
61325 #include <syslib/cpm2_pic.h>
61326 #include <syslib/ppc85xx_common.h>
61327 -#include <syslib/ppc85xx_rio.h>
61328
61329
61330 unsigned char __res[sizeof(bd_t)];
61331 @@ -271,6 +269,7 @@
61332 #endif /* CONFIG_PCI */
61333
61334 #ifdef CONFIG_RAPIDIO
61335 +extern void mpc85xx_rio_setup(int law_start, int law_size);
61336 void
61337 platform_rio_init(void)
61338 {
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
61342 @@ -54,7 +54,6 @@
61343 #include <syslib/ppc85xx_setup.h>
61344 #include <syslib/cpm2_pic.h>
61345 #include <syslib/ppc85xx_common.h>
61346 -#include <syslib/ppc85xx_rio.h>
61347
61348 #ifndef CONFIG_PCI
61349 unsigned long isa_io_base = 0;
61350 @@ -309,6 +308,7 @@
61351 #endif /* CONFIG_PCI */
61352
61353 #ifdef CONFIG_RAPIDIO
61354 +extern void mpc85xx_rio_setup(int law_start, int law_size);
61355 void platform_rio_init(void)
61356 {
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 @@
61362 #endif
61363
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 "
61367 "failed\n");
61368
61369 first_time = 0;
61370 @@ -388,7 +388,7 @@
61371 ev64260_early_serial_map();
61372 #endif
61373
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);
61377
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);
61384 }
61385 }
61386 - pci_dev_put(dev);
61387 }
61388
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
61393 @@ -93,7 +93,6 @@
61394 ifeq ($(CONFIG_85xx),y)
61395 obj-$(CONFIG_PCI) += pci_auto.o
61396 endif
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
61404 @@ -35,7 +35,6 @@
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>
61411
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
61415 @@ -20,7 +20,6 @@
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>
61422
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
61426 @@ -36,7 +36,6 @@
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 @@
61438
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);
61444
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
61449 @@ -41,7 +41,6 @@
61450
61451 #include <syslib/ppc83xx_setup.h>
61452 #if defined(CONFIG_PCI)
61453 -#include <asm/delay.h>
61454 #include <syslib/ppc83xx_pci.h>
61455 #endif
61456
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
61460 @@ -1,932 +0,0 @@
61461 -/*
61462 - * MPC85xx RapidIO support
61463 - *
61464 - * Copyright 2005 MontaVista Software, Inc.
61465 - * Matt Porter <mporter@kernel.crashing.org>
61466 - *
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.
61471 - */
61472 -
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>
61480 -
61481 -#include <asm/io.h>
61482 -
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
61488 -
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
61496 -
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
61501 -
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
61508 -
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
61516 -
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))
61521 -
61522 -struct rio_atmu_regs {
61523 - u32 rowtar;
61524 - u32 pad1;
61525 - u32 rowbar;
61526 - u32 pad2;
61527 - u32 rowar;
61528 - u32 pad3[3];
61529 -};
61530 -
61531 -struct rio_msg_regs {
61532 - u32 omr;
61533 - u32 osr;
61534 - u32 pad1;
61535 - u32 odqdpar;
61536 - u32 pad2;
61537 - u32 osar;
61538 - u32 odpr;
61539 - u32 odatr;
61540 - u32 odcr;
61541 - u32 pad3;
61542 - u32 odqepar;
61543 - u32 pad4[13];
61544 - u32 imr;
61545 - u32 isr;
61546 - u32 pad5;
61547 - u32 ifqdpar;
61548 - u32 pad6;
61549 - u32 ifqepar;
61550 - u32 pad7[250];
61551 - u32 dmr;
61552 - u32 dsr;
61553 - u32 pad8;
61554 - u32 dqdpar;
61555 - u32 pad9;
61556 - u32 dqepar;
61557 - u32 pad10[26];
61558 - u32 pwmr;
61559 - u32 pwsr;
61560 - u32 pad11;
61561 - u32 pwqbar;
61562 -};
61563 -
61564 -struct rio_tx_desc {
61565 - u32 res1;
61566 - u32 saddr;
61567 - u32 dport;
61568 - u32 dattr;
61569 - u32 res2;
61570 - u32 res3;
61571 - u32 dwcnt;
61572 - u32 res4;
61573 -};
61574 -
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;
61582 -
61583 -static struct rio_dbell_ring {
61584 - void *virt;
61585 - dma_addr_t phys;
61586 -} dbell_ring;
61587 -
61588 -static struct rio_msg_tx_ring {
61589 - void *virt;
61590 - dma_addr_t phys;
61591 - void *virt_buffer[RIO_MAX_TX_RING_SIZE];
61592 - dma_addr_t phys_buffer[RIO_MAX_TX_RING_SIZE];
61593 - int tx_slot;
61594 - int size;
61595 - void *dev_id;
61596 -} msg_tx_ring;
61597 -
61598 -static struct rio_msg_rx_ring {
61599 - void *virt;
61600 - dma_addr_t phys;
61601 - void *virt_buffer[RIO_MAX_RX_RING_SIZE];
61602 - int rx_slot;
61603 - int size;
61604 - void *dev_id;
61605 -} msg_rx_ring;
61606 -
61607 -/**
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
61612 - *
61613 - * Sends a MPC85xx doorbell message. Returns %0 on success or
61614 - * %-EINVAL on failure.
61615 - */
61616 -static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data)
61617 -{
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);
61622 -
61623 - return 0;
61624 -}
61625 -
61626 -/**
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
61632 - *
61633 - * Generates a MPC85xx local configuration space read. Returns %0 on
61634 - * success or %-EINVAL on failure.
61635 - */
61636 -static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data)
61637 -{
61638 - pr_debug("mpc85xx_local_config_read: index %d offset %8.8x\n", index,
61639 - offset);
61640 - *data = in_be32((void *)(regs_win + offset));
61641 -
61642 - return 0;
61643 -}
61644 -
61645 -/**
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
61651 - *
61652 - * Generates a MPC85xx local configuration space write. Returns %0 on
61653 - * success or %-EINVAL on failure.
61654 - */
61655 -static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data)
61656 -{
61657 - pr_debug
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);
61661 -
61662 - return 0;
61663 -}
61664 -
61665 -/**
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
61673 - *
61674 - * Generates a MPC85xx read maintenance transaction. Returns %0 on
61675 - * success or %-EINVAL on failure.
61676 - */
61677 -static int
61678 -mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len,
61679 - u32 * val)
61680 -{
61681 - u8 *data;
61682 -
61683 - pr_debug
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));
61688 -
61689 - data = (u8 *) maint_win + offset;
61690 - switch (len) {
61691 - case 1:
61692 - *val = in_8((u8 *) data);
61693 - break;
61694 - case 2:
61695 - *val = in_be16((u16 *) data);
61696 - break;
61697 - default:
61698 - *val = in_be32((u32 *) data);
61699 - break;
61700 - }
61701 -
61702 - return 0;
61703 -}
61704 -
61705 -/**
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
61713 - *
61714 - * Generates an MPC85xx write maintenance transaction. Returns %0 on
61715 - * success or %-EINVAL on failure.
61716 - */
61717 -static int
61718 -mpc85xx_rio_config_write(int index, u16 destid, u8 hopcount, u32 offset,
61719 - int len, u32 val)
61720 -{
61721 - u8 *data;
61722 - pr_debug
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));
61727 -
61728 - data = (u8 *) maint_win + offset;
61729 - switch (len) {
61730 - case 1:
61731 - out_8((u8 *) data, val);
61732 - break;
61733 - case 2:
61734 - out_be16((u16 *) data, val);
61735 - break;
61736 - default:
61737 - out_be32((u32 *) data, val);
61738 - break;
61739 - }
61740 -
61741 - return 0;
61742 -}
61743 -
61744 -/**
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
61751 - *
61752 - * Adds the @buffer message to the MPC85xx outbound message queue. Returns
61753 - * %0 on success or %-EINVAL on failure.
61754 - */
61755 -int
61756 -rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox,
61757 - void *buffer, size_t len)
61758 -{
61759 - u32 omr;
61760 - struct rio_tx_desc *desc =
61761 - (struct rio_tx_desc *)msg_tx_ring.virt + msg_tx_ring.tx_slot;
61762 - int ret = 0;
61763 -
61764 - pr_debug
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);
61767 -
61768 - if ((len < 8) || (len > RIO_MAX_MSG_SIZE)) {
61769 - ret = -EINVAL;
61770 - goto out;
61771 - }
61772 -
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);
61779 -
61780 - /* Set mbox field for message */
61781 - desc->dport = mbox & 0x3;
61782 -
61783 - /* Enable EOMI interrupt, set priority, and set destid */
61784 - desc->dattr = 0x28000000 | (rdev->destid << 2);
61785 -
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);
61788 -
61789 - /* Set snooping and source buffer address */
61790 - desc->saddr = 0x00000004 | msg_tx_ring.phys_buffer[msg_tx_ring.tx_slot];
61791 -
61792 - /* Increment enqueue pointer */
61793 - omr = in_be32((void *)&msg_regs->omr);
61794 - out_be32((void *)&msg_regs->omr, omr | RIO_MSG_OMR_MUI);
61795 -
61796 - /* Go to next descriptor */
61797 - if (++msg_tx_ring.tx_slot == msg_tx_ring.size)
61798 - msg_tx_ring.tx_slot = 0;
61799 -
61800 - out:
61801 - return ret;
61802 -}
61803 -
61804 -EXPORT_SYMBOL_GPL(rio_hw_add_outb_message);
61805 -
61806 -/**
61807 - * mpc85xx_rio_tx_handler - MPC85xx outbound message interrupt handler
61808 - * @irq: Linux interrupt number
61809 - * @dev_instance: Pointer to interrupt-specific data
61810 - *
61811 - * Handles outbound message interrupts. Executes a register outbound
61812 - * mailbox event handler and acks the interrupt occurrence.
61813 - */
61814 -static irqreturn_t
61815 -mpc85xx_rio_tx_handler(int irq, void *dev_instance)
61816 -{
61817 - int osr;
61818 - struct rio_mport *port = (struct rio_mport *)dev_instance;
61819 -
61820 - osr = in_be32((void *)&msg_regs->osr);
61821 -
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);
61825 - goto out;
61826 - }
61827 -
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);
61831 - goto out;
61832 - }
61833 -
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);
61838 -
61839 - /* Ack the end-of-message interrupt */
61840 - out_be32((void *)&msg_regs->osr, RIO_MSG_OSR_EOMI);
61841 - }
61842 -
61843 - out:
61844 - return IRQ_HANDLED;
61845 -}
61846 -
61847 -/**
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
61853 - *
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.
61857 - */
61858 -int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
61859 -{
61860 - int i, j, rc = 0;
61861 -
61862 - if ((entries < RIO_MIN_TX_RING_SIZE) ||
61863 - (entries > RIO_MAX_TX_RING_SIZE) || (!is_power_of_2(entries))) {
61864 - rc = -EINVAL;
61865 - goto out;
61866 - }
61867 -
61868 - /* Initialize shadow copy ring */
61869 - msg_tx_ring.dev_id = dev_id;
61870 - msg_tx_ring.size = entries;
61871 -
61872 - for (i = 0; i < msg_tx_ring.size; i++) {
61873 - if (!
61874 - (msg_tx_ring.virt_buffer[i] =
61875 - dma_alloc_coherent(NULL, RIO_MSG_BUFFER_SIZE,
61876 - &msg_tx_ring.phys_buffer[i],
61877 - GFP_KERNEL))) {
61878 - rc = -ENOMEM;
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,
61883 - msg_tx_ring.
61884 - virt_buffer[j],
61885 - msg_tx_ring.
61886 - phys_buffer[j]);
61887 - goto out;
61888 - }
61889 - }
61890 -
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,
61896 - GFP_KERNEL))) {
61897 - rc = -ENOMEM;
61898 - goto out_dma;
61899 - }
61900 - memset(msg_tx_ring.virt, 0, msg_tx_ring.size * RIO_MSG_DESC_SIZE);
61901 - msg_tx_ring.tx_slot = 0;
61902 -
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);
61906 -
61907 - /* Configure for snooping */
61908 - out_be32((void *)&msg_regs->osar, 0x00000004);
61909 -
61910 - /* Clear interrupt status */
61911 - out_be32((void *)&msg_regs->osr, 0x000000b3);
61912 -
61913 - /* Hook up outbound message handler */
61914 - if ((rc =
61915 - request_irq(MPC85xx_IRQ_RIO_TX, mpc85xx_rio_tx_handler, 0,
61916 - "msg_tx", (void *)mport)) < 0)
61917 - goto out_irq;
61918 -
61919 - /*
61920 - * Configure outbound message unit
61921 - * Snooping
61922 - * Interrupts (all enabled, except QEIE)
61923 - * Chaining mode
61924 - * Disable
61925 - */
61926 - out_be32((void *)&msg_regs->omr, 0x00100220);
61927 -
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));
61932 -
61933 - /* Now enable the unit */
61934 - out_be32((void *)&msg_regs->omr, in_be32((void *)&msg_regs->omr) | 0x1);
61935 -
61936 - out:
61937 - return rc;
61938 -
61939 - out_irq:
61940 - dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
61941 - msg_tx_ring.virt, msg_tx_ring.phys);
61942 -
61943 - out_dma:
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]);
61948 -
61949 - return rc;
61950 -}
61951 -
61952 -/**
61953 - * rio_close_outb_mbox - Shut down MPC85xx outbound mailbox
61954 - * @mport: Master port implementing the outbound message unit
61955 - * @mbox: Mailbox to close
61956 - *
61957 - * Disables the outbound message unit, free all buffers, and
61958 - * frees the outbound message interrupt.
61959 - */
61960 -void rio_close_outb_mbox(struct rio_mport *mport, int mbox)
61961 -{
61962 - /* Disable inbound message unit */
61963 - out_be32((void *)&msg_regs->omr, 0);
61964 -
61965 - /* Free ring */
61966 - dma_free_coherent(NULL, msg_tx_ring.size * RIO_MSG_DESC_SIZE,
61967 - msg_tx_ring.virt, msg_tx_ring.phys);
61968 -
61969 - /* Free interrupt */
61970 - free_irq(MPC85xx_IRQ_RIO_TX, (void *)mport);
61971 -}
61972 -
61973 -/**
61974 - * mpc85xx_rio_rx_handler - MPC85xx inbound message interrupt handler
61975 - * @irq: Linux interrupt number
61976 - * @dev_instance: Pointer to interrupt-specific data
61977 - *
61978 - * Handles inbound message interrupts. Executes a registered inbound
61979 - * mailbox event handler and acks the interrupt occurrence.
61980 - */
61981 -static irqreturn_t
61982 -mpc85xx_rio_rx_handler(int irq, void *dev_instance)
61983 -{
61984 - int isr;
61985 - struct rio_mport *port = (struct rio_mport *)dev_instance;
61986 -
61987 - isr = in_be32((void *)&msg_regs->isr);
61988 -
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);
61992 - goto out;
61993 - }
61994 -
61995 - /* XXX Need to check/dispatch until queue empty */
61996 - if (isr & RIO_MSG_ISR_DIQI) {
61997 - /*
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
62001 - * argument.
62002 - */
62003 - port->inb_msg[0].mcback(port, msg_rx_ring.dev_id, -1, -1);
62004 -
62005 - /* Ack the queueing interrupt */
62006 - out_be32((void *)&msg_regs->isr, RIO_MSG_ISR_DIQI);
62007 - }
62008 -
62009 - out:
62010 - return IRQ_HANDLED;
62011 -}
62012 -
62013 -/**
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
62019 - *
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.
62023 - */
62024 -int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
62025 -{
62026 - int i, rc = 0;
62027 -
62028 - if ((entries < RIO_MIN_RX_RING_SIZE) ||
62029 - (entries > RIO_MAX_RX_RING_SIZE) || (!is_power_of_2(entries))) {
62030 - rc = -EINVAL;
62031 - goto out;
62032 - }
62033 -
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;
62040 -
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,
62046 - GFP_KERNEL))) {
62047 - rc = -ENOMEM;
62048 - goto out;
62049 - }
62050 -
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);
62054 -
62055 - /* Clear interrupt status */
62056 - out_be32((void *)&msg_regs->isr, 0x00000091);
62057 -
62058 - /* Hook up inbound message handler */
62059 - if ((rc =
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]);
62065 - goto out;
62066 - }
62067 -
62068 - /*
62069 - * Configure inbound message unit:
62070 - * Snooping
62071 - * 4KB max message size
62072 - * Unmask all interrupt sources
62073 - * Disable
62074 - */
62075 - out_be32((void *)&msg_regs->imr, 0x001b0060);
62076 -
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));
62081 -
62082 - /* Now enable the unit */
62083 - out_be32((void *)&msg_regs->imr, in_be32((void *)&msg_regs->imr) | 0x1);
62084 -
62085 - out:
62086 - return rc;
62087 -}
62088 -
62089 -/**
62090 - * rio_close_inb_mbox - Shut down MPC85xx inbound mailbox
62091 - * @mport: Master port implementing the inbound message unit
62092 - * @mbox: Mailbox to close
62093 - *
62094 - * Disables the inbound message unit, free all buffers, and
62095 - * frees the inbound message interrupt.
62096 - */
62097 -void rio_close_inb_mbox(struct rio_mport *mport, int mbox)
62098 -{
62099 - /* Disable inbound message unit */
62100 - out_be32((void *)&msg_regs->imr, 0);
62101 -
62102 - /* Free ring */
62103 - dma_free_coherent(NULL, msg_rx_ring.size * RIO_MAX_MSG_SIZE,
62104 - msg_rx_ring.virt, msg_rx_ring.phys);
62105 -
62106 - /* Free interrupt */
62107 - free_irq(MPC85xx_IRQ_RIO_RX, (void *)mport);
62108 -}
62109 -
62110 -/**
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
62115 - *
62116 - * Adds the @buf buffer to the MPC85xx inbound message queue. Returns
62117 - * %0 on success or %-EINVAL on failure.
62118 - */
62119 -int rio_hw_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf)
62120 -{
62121 - int rc = 0;
62122 -
62123 - pr_debug("RIO: rio_hw_add_inb_buffer(), msg_rx_ring.rx_slot %d\n",
62124 - msg_rx_ring.rx_slot);
62125 -
62126 - if (msg_rx_ring.virt_buffer[msg_rx_ring.rx_slot]) {
62127 - printk(KERN_ERR
62128 - "RIO: error adding inbound buffer %d, buffer exists\n",
62129 - msg_rx_ring.rx_slot);
62130 - rc = -EINVAL;
62131 - goto out;
62132 - }
62133 -
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;
62137 -
62138 - out:
62139 - return rc;
62140 -}
62141 -
62142 -EXPORT_SYMBOL_GPL(rio_hw_add_inb_buffer);
62143 -
62144 -/**
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
62148 - *
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.
62151 - */
62152 -void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox)
62153 -{
62154 - u32 imr;
62155 - u32 phys_buf, virt_buf;
62156 - void *buf = NULL;
62157 - int buf_idx;
62158 -
62159 - phys_buf = in_be32((void *)&msg_regs->ifqdpar);
62160 -
62161 - /* If no more messages, then bail out */
62162 - if (phys_buf == in_be32((void *)&msg_regs->ifqepar))
62163 - goto out2;
62164 -
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];
62168 -
62169 - if (!buf) {
62170 - printk(KERN_ERR
62171 - "RIO: inbound message copy failed, no buffers\n");
62172 - goto out1;
62173 - }
62174 -
62175 - /* Copy max message size, caller is expected to allocate that big */
62176 - memcpy(buf, (void *)virt_buf, RIO_MAX_MSG_SIZE);
62177 -
62178 - /* Clear the available buffer */
62179 - msg_rx_ring.virt_buffer[buf_idx] = NULL;
62180 -
62181 - out1:
62182 - imr = in_be32((void *)&msg_regs->imr);
62183 - out_be32((void *)&msg_regs->imr, imr | RIO_MSG_IMR_MI);
62184 -
62185 - out2:
62186 - return buf;
62187 -}
62188 -
62189 -EXPORT_SYMBOL_GPL(rio_hw_get_inb_message);
62190 -
62191 -/**
62192 - * mpc85xx_rio_dbell_handler - MPC85xx doorbell interrupt handler
62193 - * @irq: Linux interrupt number
62194 - * @dev_instance: Pointer to interrupt-specific data
62195 - *
62196 - * Handles doorbell interrupts. Parses a list of registered
62197 - * doorbell event handlers and executes a matching event handler.
62198 - */
62199 -static irqreturn_t
62200 -mpc85xx_rio_dbell_handler(int irq, void *dev_instance)
62201 -{
62202 - int dsr;
62203 - struct rio_mport *port = (struct rio_mport *)dev_instance;
62204 -
62205 - dsr = in_be32((void *)&msg_regs->dsr);
62206 -
62207 - if (dsr & DOORBELL_DSR_TE) {
62208 - pr_info("RIO: doorbell reception error\n");
62209 - out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_TE);
62210 - goto out;
62211 - }
62212 -
62213 - if (dsr & DOORBELL_DSR_QFI) {
62214 - pr_info("RIO: doorbell queue full\n");
62215 - out_be32((void *)&msg_regs->dsr, DOORBELL_DSR_QFI);
62216 - goto out;
62217 - }
62218 -
62219 - /* XXX Need to check/dispatch until queue empty */
62220 - if (dsr & DOORBELL_DSR_DIQI) {
62221 - u32 dmsg =
62222 - (u32) dbell_ring.virt +
62223 - (in_be32((void *)&msg_regs->dqdpar) & 0xfff);
62224 - u32 dmr;
62225 - struct rio_dbell *dbell;
62226 - int found = 0;
62227 -
62228 - pr_debug
62229 - ("RIO: processing doorbell, sid %2.2x tid %2.2x info %4.4x\n",
62230 - DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
62231 -
62232 - list_for_each_entry(dbell, &port->dbells, node) {
62233 - if ((dbell->res->start <= DBELL_INF(dmsg)) &&
62234 - (dbell->res->end >= DBELL_INF(dmsg))) {
62235 - found = 1;
62236 - break;
62237 - }
62238 - }
62239 - if (found) {
62240 - dbell->dinb(port, dbell->dev_id, DBELL_SID(dmsg), DBELL_TID(dmsg),
62241 - DBELL_INF(dmsg));
62242 - } else {
62243 - pr_debug
62244 - ("RIO: spurious doorbell, sid %2.2x tid %2.2x info %4.4x\n",
62245 - DBELL_SID(dmsg), DBELL_TID(dmsg), DBELL_INF(dmsg));
62246 - }
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);
62250 - }
62251 -
62252 - out:
62253 - return IRQ_HANDLED;
62254 -}
62255 -
62256 -/**
62257 - * mpc85xx_rio_doorbell_init - MPC85xx doorbell interface init
62258 - * @mport: Master port implementing the inbound doorbell unit
62259 - *
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.
62263 - */
62264 -static int mpc85xx_rio_doorbell_init(struct rio_mport *mport)
62265 -{
62266 - int rc = 0;
62267 -
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))) {
62272 - printk(KERN_ERR
62273 - "RIO: unable to map outbound doorbell window\n");
62274 - rc = -ENOMEM;
62275 - goto out;
62276 - }
62277 -
62278 - /* Initialize inbound doorbells */
62279 - if (!(dbell_ring.virt = dma_alloc_coherent(NULL,
62280 - 512 * DOORBELL_MESSAGE_SIZE,
62281 - &dbell_ring.phys,
62282 - GFP_KERNEL))) {
62283 - printk(KERN_ERR "RIO: unable allocate inbound doorbell ring\n");
62284 - rc = -ENOMEM;
62285 - iounmap((void *)dbell_win);
62286 - goto out;
62287 - }
62288 -
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);
62292 -
62293 - /* Clear interrupt status */
62294 - out_be32((void *)&msg_regs->dsr, 0x00000091);
62295 -
62296 - /* Hook up doorbell handler */
62297 - if ((rc =
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);
62303 - printk(KERN_ERR
62304 - "MPC85xx RIO: unable to request inbound doorbell irq");
62305 - goto out;
62306 - }
62307 -
62308 - /* Configure doorbells for snooping, 512 entries, and enable */
62309 - out_be32((void *)&msg_regs->dmr, 0x00108161);
62310 -
62311 - out:
62312 - return rc;
62313 -}
62314 -
62315 -static char *cmdline = NULL;
62316 -
62317 -static int mpc85xx_rio_get_hdid(int index)
62318 -{
62319 - /* XXX Need to parse multiple entries in some format */
62320 - if (!cmdline)
62321 - return -1;
62322 -
62323 - return simple_strtol(cmdline, NULL, 0);
62324 -}
62325 -
62326 -static int mpc85xx_rio_get_cmdline(char *s)
62327 -{
62328 - if (!s)
62329 - return 0;
62330 -
62331 - cmdline = s;
62332 - return 1;
62333 -}
62334 -
62335 -__setup("riohdid=", mpc85xx_rio_get_cmdline);
62336 -
62337 -/**
62338 - * mpc85xx_rio_setup - Setup MPC85xx RapidIO interface
62339 - * @law_start: Starting physical address of RapidIO LAW
62340 - * @law_size: Size of RapidIO LAW
62341 - *
62342 - * Initializes MPC85xx RapidIO hardware interface, configures
62343 - * master port with system-specific info, and registers the
62344 - * master port with the RapidIO subsystem.
62345 - */
62346 -void mpc85xx_rio_setup(int law_start, int law_size)
62347 -{
62348 - struct rio_ops *ops;
62349 - struct rio_mport *port;
62350 -
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;
62357 -
62358 - port = kmalloc(sizeof(struct rio_mport), GFP_KERNEL);
62359 - port->id = 0;
62360 - port->index = 0;
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;
62365 -
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");
62370 -
62371 - port->ops = ops;
62372 - port->host_deviceid = mpc85xx_rio_get_hdid(port->id);
62373 -
62374 - rio_register_mport(port);
62375 -
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);
62381 -
62382 - /* Configure maintenance transaction window */
62383 - out_be32((void *)&maint_atmu_regs->rowbar, 0x000c0000);
62384 - out_be32((void *)&maint_atmu_regs->rowar, 0x80077015);
62385 -
62386 - maint_win = (u32) ioremap(law_start, RIO_MAINT_WIN_SIZE);
62387 -
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);
62392 -}
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
62396 @@ -1,20 +0,0 @@
62397 -/*
62398 - * MPC85xx RapidIO definitions
62399 - *
62400 - * Copyright 2005 MontaVista Software, Inc.
62401 - * Matt Porter <mporter@kernel.crashing.org>
62402 - *
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.
62407 - */
62408 -
62409 -#ifndef __PPC_SYSLIB_PPC85XX_RIO_H
62410 -#define __PPC_SYSLIB_PPC85XX_RIO_H
62411 -
62412 -#include <linux/init.h>
62413 -
62414 -extern void mpc85xx_rio_setup(int law_start, int law_size);
62415 -
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
62420 @@ -16,7 +16,7 @@
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.
62428 */
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 @@
62433 */
62434
62435 /*
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.
62439 */
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
62444 @@ -10,7 +10,6 @@
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 @@
62456
62457 config PATA_PLATFORM
62458 tristate "Generic platform device PATA support"
62459 - depends on EMBEDDED || ARCH_RPC
62460 + depends on EMBEDDED || ARCH_RPC || PPC
62461 help
62462 This option enables support for generic directly connected ATA
62463 devices commonly found on embedded systems.
62464
62465 If unsure, say N.
62466
62467 +config PATA_OF_PLATFORM
62468 + tristate "OpenFirmware platform device PATA support"
62469 + depends on PATA_PLATFORM && PPC_OF
62470 + help
62471 + This option enables support for generic directly connected ATA
62472 + devices commonly found on embedded systems with OpenFirmware
62473 + bindings.
62474 +
62475 + If unsure, say N.
62476 +
62477 config PATA_ICSIDE
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
62483 @@ -67,6 +67,7 @@
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
62494 @@ -0,0 +1,114 @@
62495 +/*
62496 + * OF-platform PATA driver
62497 + *
62498 + * Copyright (c) 2007 MontaVista Software, Inc.
62499 + * Anton Vorontsov <avorontsov@ru.mvista.com>
62500 + *
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.
62504 + */
62505 +
62506 +#include <linux/kernel.h>
62507 +#include <linux/module.h>
62508 +#include <linux/of_platform.h>
62509 +#include <linux/pata_platform.h>
62510 +
62511 +static int __devinit pata_of_platform_probe(struct of_device *ofdev,
62512 + const struct of_device_id *match)
62513 +{
62514 + int ret;
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;
62521 + int pio_mask;
62522 + const u32 *prop;
62523 +
62524 + ret = of_address_to_resource(dn, 0, &io_res);
62525 + if (ret) {
62526 + dev_err(&ofdev->dev, "can't get IO address from "
62527 + "device tree\n");
62528 + return -EINVAL;
62529 + }
62530 +
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.
62534 + */
62535 + ctl_res = io_res;
62536 + ctl_res.start = ctl_res.start+0x3f6;
62537 + io_res.end = ctl_res.start-1;
62538 + } else {
62539 + ret = of_address_to_resource(dn, 1, &ctl_res);
62540 + if (ret) {
62541 + dev_err(&ofdev->dev, "can't get CTL address from "
62542 + "device tree\n");
62543 + return -EINVAL;
62544 + }
62545 + }
62546 +
62547 + ret = of_irq_to_resource(dn, 0, &irq_res);
62548 + if (ret == NO_IRQ)
62549 + irq_res.start = irq_res.end = -1;
62550 + else
62551 + irq_res.flags = 0;
62552 +
62553 + prop = of_get_property(dn, "reg-shift", NULL);
62554 + if (prop)
62555 + reg_shift = *prop;
62556 +
62557 + prop = of_get_property(dn, "pio-mode", NULL);
62558 + if (prop) {
62559 + pio_mode = *prop;
62560 + if (pio_mode > 6) {
62561 + dev_err(&ofdev->dev, "invalid pio-mode\n");
62562 + return -EINVAL;
62563 + }
62564 + } else {
62565 + dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
62566 + }
62567 +
62568 + pio_mask = 1 << pio_mode;
62569 + pio_mask |= (1 << pio_mode) - 1;
62570 +
62571 + return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, &irq_res,
62572 + reg_shift, pio_mask);
62573 +}
62574 +
62575 +static int __devexit pata_of_platform_remove(struct of_device *ofdev)
62576 +{
62577 + return __pata_platform_remove(&ofdev->dev);
62578 +}
62579 +
62580 +static struct of_device_id pata_of_platform_match[] = {
62581 + { .compatible = "ata-generic", },
62582 + { .compatible = "electra-ide", },
62583 + {},
62584 +};
62585 +MODULE_DEVICE_TABLE(of, pata_of_platform_match);
62586 +
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),
62592 +};
62593 +
62594 +static int __init pata_of_platform_init(void)
62595 +{
62596 + return of_register_platform_driver(&pata_of_platform_driver);
62597 +}
62598 +module_init(pata_of_platform_init);
62599 +
62600 +static void __exit pata_of_platform_exit(void)
62601 +{
62602 + of_unregister_platform_driver(&pata_of_platform_driver);
62603 +}
62604 +module_exit(pata_of_platform_exit);
62605 +
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
62612 @@ -93,14 +93,9 @@
62613 };
62614
62615 static void pata_platform_setup_port(struct ata_ioports *ioaddr,
62616 - struct pata_platform_info *info)
62617 + unsigned int shift)
62618 {
62619 - unsigned int shift = 0;
62620 -
62621 /* Fixup the port shift for platforms that need it */
62622 - if (info && info->ioport_shift)
62623 - shift = info->ioport_shift;
62624 -
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 @@
62629 }
62630
62631 /**
62632 - * pata_platform_probe - attach a platform interface
62633 - * @pdev: platform device
62634 + * __pata_platform_probe - attach a platform interface
62635 + * @dev: device
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
62641 *
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 @@
62645 *
62646 * If no IRQ resource is present, PIO polling mode is used instead.
62647 */
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,
62654 + int __pio_mask)
62655 {
62656 - struct resource *io_res, *ctl_res;
62657 struct ata_host *host;
62658 struct ata_port *ap;
62659 - struct pata_platform_info *pp_info;
62660 unsigned int mmio;
62661 - int irq;
62662 -
62663 - /*
62664 - * Simple resource validation ..
62665 - */
62666 - if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
62667 - dev_err(&pdev->dev, "invalid number of resources\n");
62668 - return -EINVAL;
62669 - }
62670 -
62671 - /*
62672 - * Get the I/O base first
62673 - */
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))
62678 - return -EINVAL;
62679 - }
62680 -
62681 - /*
62682 - * Then the CTL base
62683 - */
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))
62688 - return -EINVAL;
62689 - }
62690 + int irq = 0;
62691 + int irq_flags = 0;
62692
62693 /*
62694 * Check for MMIO
62695 @@ -181,20 +157,21 @@
62696 /*
62697 * And the IRQ
62698 */
62699 - irq = platform_get_irq(pdev, 0);
62700 - if (irq < 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;
62705 + }
62706
62707 /*
62708 * Now that that's out of the way, wire up the port..
62709 */
62710 - host = ata_host_alloc(&pdev->dev, 1);
62711 + host = ata_host_alloc(dev, 1);
62712 if (!host)
62713 return -ENOMEM;
62714 ap = host->ports[0];
62715
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;
62720
62721 /*
62722 @@ -209,25 +186,24 @@
62723 * Handle the MMIO case
62724 */
62725 if (mmio) {
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);
62732 } else {
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);
62739 }
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");
62743 return -ENOMEM;
62744 }
62745
62746 ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
62747
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);
62751
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 @@
62755
62756 /* activate */
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);
62761 }
62762 +EXPORT_SYMBOL_GPL(__pata_platform_probe);
62763
62764 /**
62765 - * pata_platform_remove - unplug a platform interface
62766 - * @pdev: platform device
62767 + * __pata_platform_remove - unplug a platform interface
62768 + * @dev: device
62769 *
62770 * A platform bus ATA device has been unplugged. Perform the needed
62771 * cleanup. Also called on module unload for any active devices.
62772 */
62773 -static int __devexit pata_platform_remove(struct platform_device *pdev)
62774 +int __devexit __pata_platform_remove(struct device *dev)
62775 {
62776 - struct device *dev = &pdev->dev;
62777 struct ata_host *host = dev_get_drvdata(dev);
62778
62779 ata_host_detach(host);
62780
62781 return 0;
62782 }
62783 +EXPORT_SYMBOL_GPL(__pata_platform_remove);
62784 +
62785 +static int __devinit pata_platform_probe(struct platform_device *pdev)
62786 +{
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;
62791 +
62792 + /*
62793 + * Simple resource validation ..
62794 + */
62795 + if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
62796 + dev_err(&pdev->dev, "invalid number of resources\n");
62797 + return -EINVAL;
62798 + }
62799 +
62800 + /*
62801 + * Get the I/O base first
62802 + */
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))
62807 + return -EINVAL;
62808 + }
62809 +
62810 + /*
62811 + * Then the CTL base
62812 + */
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))
62817 + return -EINVAL;
62818 + }
62819 +
62820 + /*
62821 + * And the IRQ
62822 + */
62823 + irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
62824 + if (irq_res)
62825 + irq_res->flags = pp_info ? pp_info->irq_flags : 0;
62826 +
62827 + return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res,
62828 + pp_info ? pp_info->ioport_shift : 0,
62829 + pio_mask);
62830 +}
62831 +
62832 +static int __devexit pata_platform_remove(struct platform_device *pdev)
62833 +{
62834 + return __pata_platform_remove(&pdev->dev);
62835 +}
62836
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
62842 @@ -98,7 +98,7 @@
62843 default HW_RANDOM
62844 ---help---
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.
62848
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 @@
62855 }
62856
62857 static struct of_device_id rng_match[] = {
62858 - {
62859 - .compatible = "1682m-rng",
62860 - },
62861 - {},
62862 + { .compatible = "1682m-rng", },
62863 + { .compatible = "pasemi,pwrficient-rng", },
62864 + { },
62865 };
62866
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 @@
62872 EDAC_FLAG_NONE;
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 @@
62881
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
62889 @@ -35,6 +35,7 @@
62890 #include <linux/spinlock.h>
62891 #include <linux/completion.h>
62892 #include <linux/device.h>
62893 +#include <linux/kthread.h>
62894
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;
62907
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,
62912 - SLEEP_LEVEL_ADB,
62913 -};
62914 -#endif
62915 -
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 @@
62920 }
62921 #endif
62922
62923 -
62924 -static __inline__ void adb_wait_ms(unsigned int ms)
62925 -{
62926 - if (current->pid && adb_probe_task_pid &&
62927 - adb_probe_task_pid == current->pid)
62928 - msleep(ms);
62929 - else
62930 - mdelay(ms);
62931 -}
62932 -
62933 static int adb_scan_bus(void)
62934 {
62935 int i, highFree=0, noMovement;
62936 @@ -248,13 +229,10 @@
62937 static int
62938 adb_probe_task(void *x)
62939 {
62940 - strcpy(current->comm, "kadbprobe");
62941 -
62942 printk(KERN_INFO "adb: starting probe task...\n");
62943 do_adb_reset_bus();
62944 printk(KERN_INFO "adb: finished probe task...\n");
62945
62946 - adb_probe_task_pid = 0;
62947 up(&adb_probe_mutex);
62948
62949 return 0;
62950 @@ -263,7 +241,7 @@
62951 static void
62952 __adb_probe_task(struct work_struct *bullshit)
62953 {
62954 - adb_probe_task_pid = kernel_thread(adb_probe_task, NULL, SIGCHLD | CLONE_KERNEL);
62955 + kthread_run(adb_probe_task, NULL, "kadbprobe");
62956 }
62957
62958 static DECLARE_WORK(adb_reset_work, __adb_probe_task);
62959 @@ -281,6 +259,36 @@
62960 return 0;
62961 }
62962
62963 +#ifdef CONFIG_PM
62964 +/*
62965 + * notify clients before sleep
62966 + */
62967 +static int adb_suspend(struct platform_device *dev, pm_message_t state)
62968 +{
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);
62976 +
62977 + return 0;
62978 +}
62979 +
62980 +/*
62981 + * reset bus after sleep
62982 + */
62983 +static int adb_resume(struct platform_device *dev)
62984 +{
62985 + adb_got_sleep = 0;
62986 + up(&adb_probe_mutex);
62987 + adb_reset_bus();
62988 +
62989 + return 0;
62990 +}
62991 +#endif /* CONFIG_PM */
62992 +
62993 int __init adb_init(void)
62994 {
62995 struct adb_driver *driver;
62996 @@ -313,15 +321,12 @@
62997 printk(KERN_WARNING "Warning: no ADB interface detected\n");
62998 adb_controller = NULL;
62999 } else {
63000 -#ifdef CONFIG_PM_SLEEP
63001 - pmu_register_sleep_notifier(&adb_sleep_notifier);
63002 -#endif /* CONFIG_PM */
63003 #ifdef CONFIG_PPC
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);
63009 +
63010 adbdev_init();
63011 adb_reset_bus();
63012 }
63013 @@ -330,33 +335,6 @@
63014
63015 __initcall(adb_init);
63016
63017 -#ifdef CONFIG_PM
63018 -/*
63019 - * notify clients before sleep and reset bus afterwards
63020 - */
63021 -void
63022 -adb_notify_sleep(struct pmu_sleep_notifier *self, int when)
63023 -{
63024 - switch (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);
63034 - break;
63035 - case PBOOK_WAKE:
63036 - adb_got_sleep = 0;
63037 - up(&adb_probe_mutex);
63038 - adb_reset_bus();
63039 - break;
63040 - }
63041 -}
63042 -#endif /* CONFIG_PM */
63043 -
63044 static int
63045 do_adb_reset_bus(void)
63046 {
63047 @@ -373,7 +351,7 @@
63048
63049 if (sleepy_trackpad) {
63050 /* Let the trackpad settle down */
63051 - adb_wait_ms(500);
63052 + msleep(500);
63053 }
63054
63055 down(&adb_handler_sem);
63056 @@ -389,7 +367,7 @@
63057
63058 if (sleepy_trackpad) {
63059 /* Let the trackpad settle down */
63060 - adb_wait_ms(1500);
63061 + msleep(1500);
63062 }
63063
63064 if (!ret) {
63065 @@ -413,41 +391,27 @@
63066 adb_controller->poll();
63067 }
63068
63069 -static void
63070 -adb_probe_wakeup(struct adb_request *req)
63071 +static void adb_sync_req_done(struct adb_request *req)
63072 {
63073 - complete(&adb_probe_task_comp);
63074 -}
63075 + struct completion *comp = req->arg;
63076
63077 -/* Static request used during probe */
63078 -static struct adb_request adb_sreq;
63079 -static unsigned long adb_sreq_lock; // Use semaphore ! */
63080 + complete(comp);
63081 +}
63082
63083 int
63084 adb_request(struct adb_request *req, void (*done)(struct adb_request *),
63085 int flags, int nbytes, ...)
63086 {
63087 va_list list;
63088 - int i, use_sreq;
63089 + int i;
63090 int rc;
63091 + struct completion comp;
63092
63093 if ((adb_controller == NULL) || (adb_controller->send_request == NULL))
63094 return -ENXIO;
63095 if (nbytes < 1)
63096 return -EINVAL;
63097 - if (req == NULL && (flags & ADBREQ_NOSEND))
63098 - return -EINVAL;
63099 -
63100 - if (req == NULL) {
63101 - if (test_and_set_bit(0,&adb_sreq_lock)) {
63102 - printk("adb.c: Warning: contention on static request !\n");
63103 - return -EPERM;
63104 - }
63105 - req = &adb_sreq;
63106 - flags |= ADBREQ_SYNC;
63107 - use_sreq = 1;
63108 - } else
63109 - use_sreq = 0;
63110 +
63111 req->nbytes = nbytes+1;
63112 req->done = done;
63113 req->reply_expected = flags & ADBREQ_REPLY;
63114 @@ -460,25 +424,18 @@
63115 if (flags & ADBREQ_NOSEND)
63116 return 0;
63117
63118 - /* Synchronous requests send from the probe thread cause it to
63119 - * block. Beware that the "done" callback will be overriden !
63120 - */
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)
63127 - goto bail;
63128 - wait_for_completion(&adb_probe_task_comp);
63129 - rc = 0;
63130 - goto bail;
63131 - }
63132 -
63133 - rc = adb_controller->send_request(req, flags & ADBREQ_SYNC);
63134 -bail:
63135 - if (use_sreq)
63136 - clear_bit(0, &adb_sreq_lock);
63137 + /* Synchronous requests block using an on-stack completion */
63138 + if (flags & ADBREQ_SYNC) {
63139 + WARN_ON(done);
63140 + req->done = adb_sync_req_done;
63141 + req->arg = &comp;
63142 + init_completion(&comp);
63143 + }
63144 +
63145 + rc = adb_controller->send_request(req, 0);
63146 +
63147 + if ((flags & ADBREQ_SYNC) && !rc && !req->complete)
63148 + wait_for_completion(&comp);
63149
63150 return rc;
63151 }
63152 @@ -864,7 +821,29 @@
63153 .release = adb_release,
63154 };
63155
63156 -static void
63157 +static struct platform_driver adb_pfdrv = {
63158 + .driver = {
63159 + .name = "adb",
63160 + },
63161 +#ifdef CONFIG_PM
63162 + .suspend = adb_suspend,
63163 + .resume = adb_resume,
63164 +#endif
63165 +};
63166 +
63167 +static struct platform_device adb_pfdev = {
63168 + .name = "adb",
63169 +};
63170 +
63171 +static int __init
63172 +adb_dummy_probe(struct platform_device *dev)
63173 +{
63174 + if (dev == &adb_pfdev)
63175 + return 0;
63176 + return -ENODEV;
63177 +}
63178 +
63179 +static void __init
63180 adbdev_init(void)
63181 {
63182 if (register_chrdev(ADB_MAJOR, "adb", &adb_fops)) {
63183 @@ -876,4 +855,7 @@
63184 if (IS_ERR(adb_dev_class))
63185 return;
63186 class_device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb");
63187 +
63188 + platform_device_register(&adb_pfdev);
63189 + platform_driver_probe(&adb_pfdrv, adb_dummy_probe);
63190 }
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
63194 @@ -20,6 +20,7 @@
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>
63202 @@ -35,7 +36,6 @@
63203
63204
63205 #define MB_DEBUG
63206 -#define MB_IGNORE_SIGNALS
63207
63208 #ifdef MB_DEBUG
63209 #define MBDBG(fmt, arg...) printk(KERN_INFO fmt , ## arg)
63210 @@ -622,12 +622,7 @@
63211 {
63212 int i;
63213
63214 - strcpy(current->comm, "media-bay");
63215 -#ifdef MB_IGNORE_SIGNALS
63216 - sigfillset(&current->blocked);
63217 -#endif
63218 -
63219 - for (;;) {
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 @@
63225 }
63226
63227 msleep_interruptible(MB_POLL_DELAY);
63228 - if (signal_pending(current))
63229 - return 0;
63230 }
63231 + return 0;
63232 }
63233
63234 static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_device_id *match)
63235 @@ -699,7 +693,7 @@
63236
63237 /* Startup kernel thread */
63238 if (i == 0)
63239 - kernel_thread(media_bay_task, NULL, CLONE_KERNEL);
63240 + kthread_run(media_bay_task, NULL, "media-bay");
63241
63242 return 0;
63243
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;
63249 const u32 *prop;
63250 int i = 0, offset = 0;
63251 + int err;
63252
63253 np = of_find_node_by_name(NULL, "fan");
63254 if (!np)
63255 @@ -612,17 +613,20 @@
63256 return -ENODEV;
63257 }
63258
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);
63280 + if (err)
63281 + printk(KERN_WARNING
63282 + "Failed to create tempertaure attribute file(s).\n");
63283
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 @@
63298 static int state;
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 @@
63307 */
63308 static int init_cpu_state(struct cpu_pid_state *state, int index)
63309 {
63310 + int err;
63311 +
63312 state->index = index;
63313 state->first = 1;
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);
63317
63318 if (index == 0) {
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);
63329 } else {
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);
63335 - }
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);
63341 + }
63342 + if (err)
63343 + printk(KERN_WARNING "Failed to create some of the atribute"
63344 + "files for CPU %d\n", index);
63345
63346 return 0;
63347 fail:
63348 @@ -1328,6 +1334,7 @@
63349 {
63350 struct device_node *u3;
63351 int u3h = 1; /* conservative by default */
63352 + int err;
63353
63354 /*
63355 * There are different PID params for machines with U3 and machines
63356 @@ -1379,8 +1386,11 @@
63357 if (state->monitor == NULL)
63358 return -ENODEV;
63359
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);
63364 + if (err)
63365 + printk(KERN_WARNING "Failed to create attribute file(s)"
63366 + " for backside fan\n");
63367
63368 return 0;
63369 }
63370 @@ -1491,6 +1501,8 @@
63371 */
63372 static int init_drives_state(struct drives_pid_state *state)
63373 {
63374 + int err;
63375 +
63376 state->ticks = 1;
63377 state->first = 1;
63378 state->rpm = 1000;
63379 @@ -1499,8 +1511,11 @@
63380 if (state->monitor == NULL)
63381 return -ENODEV;
63382
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);
63387 + if (err)
63388 + printk(KERN_WARNING "Failed to create attribute file(s)"
63389 + " for drives bay fan\n");
63390
63391 return 0;
63392 }
63393 @@ -1621,7 +1636,9 @@
63394 if (state->monitor == NULL)
63395 return -ENODEV;
63396
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");
63401
63402 return 0;
63403 }
63404 @@ -1731,6 +1748,8 @@
63405 */
63406 static int init_slots_state(struct slots_pid_state *state)
63407 {
63408 + int err;
63409 +
63410 state->ticks = 1;
63411 state->first = 1;
63412 state->pwm = 50;
63413 @@ -1739,8 +1758,11 @@
63414 if (state->monitor == NULL)
63415 return -ENODEV;
63416
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);
63421 + if (err)
63422 + printk(KERN_WARNING "Failed to create attribute file(s)"
63423 + " for slots bay fan\n");
63424
63425 return 0;
63426 }
63427 @@ -1779,8 +1801,6 @@
63428 */
63429 static int main_control_loop(void *x)
63430 {
63431 - daemonize("kfand");
63432 -
63433 DBG("main_control_loop started\n");
63434
63435 down(&driver_lock);
63436 @@ -1956,7 +1976,7 @@
63437 {
63438 init_completion(&ctrl_complete);
63439
63440 - ctrl_task = kernel_thread(main_control_loop, NULL, SIGCHLD | CLONE_KERNEL);
63441 + ctrl_task = kthread_run(main_control_loop, NULL, "kfand");
63442 }
63443
63444 /*
63445 @@ -1964,7 +1984,7 @@
63446 */
63447 static void stop_control_loops(void)
63448 {
63449 - if (ctrl_task != 0)
63450 + if (ctrl_task)
63451 wait_for_completion(&ctrl_complete);
63452 }
63453
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
63457 @@ -36,6 +36,7 @@
63458 #include <linux/i2c.h>
63459 #include <linux/slab.h>
63460 #include <linux/init.h>
63461 +#include <linux/kthread.h>
63462
63463 #include <asm/prom.h>
63464 #include <asm/machdep.h>
63465 @@ -61,8 +62,7 @@
63466
63467 static struct {
63468 volatile int running;
63469 - struct completion completion;
63470 - pid_t poll_task;
63471 + struct task_struct *poll_task;
63472
63473 struct semaphore lock;
63474 struct of_device *of_dev;
63475 @@ -223,6 +223,7 @@
63476 setup_hardware( void )
63477 {
63478 int val;
63479 + int err;
63480
63481 /* save registers (if we unload the module) */
63482 x.r0 = read_reg( x.fan, 0x00, 1 );
63483 @@ -265,8 +266,11 @@
63484 x.upind = -1;
63485 /* tune_fan( fan_up_table[x.upind].fan_setting ); */
63486
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 );
63491 + if (err)
63492 + printk(KERN_WARNING
63493 + "Failed to create temperature attribute file(s).\n");
63494 }
63495
63496 static void
63497 @@ -282,27 +286,27 @@
63498 write_reg( x.fan, 0x00, x.r0, 1 );
63499 }
63500
63501 -static int
63502 -control_loop( void *dummy )
63503 +static int control_loop(void *dummy)
63504 {
63505 - daemonize("g4fand");
63506 -
63507 - down( &x.lock );
63508 + down(&x.lock);
63509 setup_hardware();
63510 + up(&x.lock);
63511
63512 - while( x.running ) {
63513 - up( &x.lock );
63514 -
63515 + for (;;) {
63516 msleep_interruptible(8000);
63517 -
63518 - down( &x.lock );
63519 + if (kthread_should_stop())
63520 + break;
63521 +
63522 + down(&x.lock);
63523 poll_temp();
63524 + up(&x.lock);
63525 }
63526
63527 + down(&x.lock);
63528 restore_regs();
63529 - up( &x.lock );
63530 + up(&x.lock);
63531
63532 - complete_and_exit( &x.completion, 0 );
63533 + return 0;
63534 }
63535
63536
63537 @@ -322,8 +326,7 @@
63538 ret = i2c_probe( adapter, &addr_data, &do_probe );
63539 if( x.thermostat && x.fan ) {
63540 x.running = 1;
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");
63544 }
63545 }
63546 return ret;
63547 @@ -339,7 +342,8 @@
63548 else {
63549 if( x.running ) {
63550 x.running = 0;
63551 - wait_for_completion( &x.completion );
63552 + kthread_stop(x.poll_task);
63553 + x.poll_task = NULL;
63554 }
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
63560 @@ -22,7 +22,7 @@
63561
63562 static void pmu_backlight_init_curve(u8 off, u8 min, u8 max)
63563 {
63564 - unsigned int i, flat, count, range = (max - min);
63565 + int i, flat, count, range = (max - min);
63566
63567 bl_curve[0] = off;
63568
63569 @@ -68,17 +68,11 @@
63570 return pmulevel;
63571 }
63572
63573 -static int pmu_backlight_update_status(struct backlight_device *bd)
63574 +static int __pmu_backlight_update_status(struct backlight_device *bd)
63575 {
63576 struct adb_request req;
63577 - unsigned long flags;
63578 int level = bd->props.brightness;
63579
63580 - spin_lock_irqsave(&pmu_backlight_lock, flags);
63581 -
63582 - /* Don't update brightness when sleeping */
63583 - if (sleeping)
63584 - goto out;
63585
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);
63590 }
63591
63592 -out:
63593 - spin_unlock_irqrestore(&pmu_backlight_lock, flags);
63594 -
63595 return 0;
63596 }
63597
63598 +static int pmu_backlight_update_status(struct backlight_device *bd)
63599 +{
63600 + unsigned long flags;
63601 + int rc = 0;
63602 +
63603 + spin_lock_irqsave(&pmu_backlight_lock, flags);
63604 + /* Don't update brightness when sleeping */
63605 + if (!sleeping)
63606 + rc = __pmu_backlight_update_status(bd);
63607 + spin_unlock_irqrestore(&pmu_backlight_lock, flags);
63608 + return rc;
63609 +}
63610 +
63611 +
63612 static int pmu_backlight_get_brightness(struct backlight_device *bd)
63613 {
63614 return bd->props.brightness;
63615 @@ -123,6 +128,16 @@
63616
63617 spin_lock_irqsave(&pmu_backlight_lock, flags);
63618 sleeping = sleep;
63619 + if (pmac_backlight) {
63620 + if (sleep) {
63621 + struct adb_request req;
63622 +
63623 + pmu_request(&req, NULL, 2, PMU_POWER_CTRL,
63624 + PMU_POW_BACKLIGHT | PMU_POW_OFF);
63625 + pmu_wait_complete(&req);
63626 + } else
63627 + __pmu_backlight_update_status(pmac_backlight);
63628 + }
63629 spin_unlock_irqrestore(&pmu_backlight_lock, flags);
63630 }
63631 #endif /* CONFIG_PM */
63632 @@ -148,8 +163,8 @@
63633
63634 bd = backlight_device_register(name, NULL, NULL, &pmu_backlight_data);
63635 if (IS_ERR(bd)) {
63636 - printk("pmubl: Backlight registration failed\n");
63637 - goto error;
63638 + printk(KERN_ERR "PMU Backlight registration failed\n");
63639 + return;
63640 }
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);
63646
63647 - printk("pmubl: Backlight initialized (%s)\n", name);
63648 -
63649 - return;
63650 -
63651 -error:
63652 - return;
63653 + printk(KERN_INFO "PMU Backlight initialized (%s)\n", name);
63654 }
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 @@
63659 *
63660 * Copyright (C) 1998 Paul Mackerras and Fabio Riccardi.
63661 * Copyright (C) 2001-2002 Benjamin Herrenschmidt
63662 + * Copyright (C) 2006-2007 Johannes Berg
63663 *
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
63670 *
63671 */
63672 #include <stdarg.h>
63673 @@ -33,7 +31,6 @@
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>
63681 @@ -65,9 +62,7 @@
63682 #include "via-pmu-event.h"
63683
63684 /* Some compile options */
63685 -#undef SUSPEND_USES_PMU
63686 -#define DEBUG_SLEEP
63687 -#undef HACKED_PCI_SAVE
63688 +#undef DEBUG_SLEEP
63689
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;
63702 -#endif
63703 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
63704 static unsigned long async_req_locks;
63705 static unsigned int pmu_irq_stats[11];
63706
63707 @@ -177,7 +169,6 @@
63708
63709 int __fake_sleep;
63710 int asleep;
63711 -BLOCKING_NOTIFIER_HEAD(sleep_notifier_list);
63712
63713 #ifdef CONFIG_ADB
63714 static int adb_dev_map;
63715 @@ -224,7 +215,7 @@
63716
63717 #ifdef DEBUG_SLEEP
63718 int pmu_polled_request(struct adb_request *req);
63719 -int pmu_wink(struct adb_request *req);
63720 +void pmu_blink(int n);
63721 #endif
63722
63723 /*
63724 @@ -875,7 +866,7 @@
63725 {
63726 char *p = page;
63727
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 @@
63734 *(val++) = 0;
63735 while(*val == ' ')
63736 val++;
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 @@
63743 pmu_suspend(void)
63744 {
63745 unsigned long flags;
63746 -#ifdef SUSPEND_USES_PMU
63747 - struct adb_request *req;
63748 -#endif
63749 +
63750 if (!via)
63751 return;
63752
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)
63761 - pmu_poll();
63762 -#else /* SUSPEND_USES_PMU */
63763 if (gpio_irq >= 0)
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 */
63768 break;
63769 }
63770 } while (1);
63771 @@ -1307,18 +1289,11 @@
63772 return;
63773 }
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)
63779 - pmu_poll();
63780 -#else /* SUSPEND_USES_PMU */
63781 if (gpio_irq >= 0)
63782 enable_irq(gpio_irq);
63783 out_8(&via[IER], CB1_INT | IER_SET);
63784 spin_unlock_irqrestore(&pmu_lock, flags);
63785 pmu_poll();
63786 -#endif /* SUSPEND_USES_PMU */
63787 }
63788
63789 /* Interrupt data could be the result data from an ADB cmd */
63790 @@ -1738,228 +1713,7 @@
63791 return via != 0;
63792 }
63793
63794 -#ifdef CONFIG_PM_SLEEP
63795 -
63796 -static LIST_HEAD(sleep_notifiers);
63797 -
63798 -int
63799 -pmu_register_sleep_notifier(struct pmu_sleep_notifier *n)
63800 -{
63801 - struct list_head *list;
63802 - struct pmu_sleep_notifier *notifier;
63803 -
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)
63808 - break;
63809 - }
63810 - __list_add(&n->list, list->prev, list);
63811 - return 0;
63812 -}
63813 -EXPORT_SYMBOL(pmu_register_sleep_notifier);
63814 -
63815 -int
63816 -pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* n)
63817 -{
63818 - if (n->list.next == 0)
63819 - return -ENOENT;
63820 - list_del(&n->list);
63821 - n->list.next = NULL;
63822 - return 0;
63823 -}
63824 -EXPORT_SYMBOL(pmu_unregister_sleep_notifier);
63825 -#endif /* CONFIG_PM_SLEEP */
63826 -
63827 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
63828 -
63829 -/* Sleep is broadcast last-to-first */
63830 -static void broadcast_sleep(int when)
63831 -{
63832 - struct list_head *list;
63833 - struct pmu_sleep_notifier *notifier;
63834 -
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);
63839 - }
63840 -}
63841 -
63842 -/* Wake is broadcast first-to-last */
63843 -static void broadcast_wake(void)
63844 -{
63845 - struct list_head *list;
63846 - struct pmu_sleep_notifier *notifier;
63847 -
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);
63852 - }
63853 -}
63854 -
63855 -/*
63856 - * This struct is used to store config register values for
63857 - * PCI devices which may get powered off when we sleep.
63858 - */
63859 -static struct pci_save {
63860 -#ifndef HACKED_PCI_SAVE
63861 - u16 command;
63862 - u16 cache_lat;
63863 - u16 intr;
63864 - u32 rom_address;
63865 -#else
63866 - u32 config[16];
63867 -#endif
63868 -} *pbook_pci_saves;
63869 -static int pbook_npci_saves;
63870 -
63871 -static void
63872 -pbook_alloc_pci_save(void)
63873 -{
63874 - int npci;
63875 - struct pci_dev *pd = NULL;
63876 -
63877 - npci = 0;
63878 - while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
63879 - ++npci;
63880 - }
63881 - if (npci == 0)
63882 - return;
63883 - pbook_pci_saves = (struct pci_save *)
63884 - kmalloc(npci * sizeof(struct pci_save), GFP_KERNEL);
63885 - pbook_npci_saves = npci;
63886 -}
63887 -
63888 -static void
63889 -pbook_free_pci_save(void)
63890 -{
63891 - if (pbook_pci_saves == NULL)
63892 - return;
63893 - kfree(pbook_pci_saves);
63894 - pbook_pci_saves = NULL;
63895 - pbook_npci_saves = 0;
63896 -}
63897 -
63898 -static void
63899 -pbook_pci_save(void)
63900 -{
63901 - struct pci_save *ps = pbook_pci_saves;
63902 - struct pci_dev *pd = NULL;
63903 - int npci = pbook_npci_saves;
63904 -
63905 - if (ps == NULL)
63906 - return;
63907 -
63908 - while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
63909 - if (npci-- == 0) {
63910 - pci_dev_put(pd);
63911 - return;
63912 - }
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);
63918 -#else
63919 - int i;
63920 - for (i=1;i<16;i++)
63921 - pci_read_config_dword(pd, i<<4, &ps->config[i]);
63922 -#endif
63923 - ++ps;
63924 - }
63925 -}
63926 -
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.
63930 - */
63931 -static void
63932 -pbook_pci_restore(void)
63933 -{
63934 - u16 cmd;
63935 - struct pci_save *ps = pbook_pci_saves - 1;
63936 - struct pci_dev *pd = NULL;
63937 - int npci = pbook_npci_saves;
63938 - int j;
63939 -
63940 - while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
63941 -#ifdef HACKED_PCI_SAVE
63942 - int i;
63943 - if (npci-- == 0) {
63944 - pci_dev_put(pd);
63945 - return;
63946 - }
63947 - ps++;
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]);
63951 -#else
63952 - if (npci-- == 0)
63953 - return;
63954 - ps++;
63955 - if (ps->command == 0)
63956 - continue;
63957 - pci_read_config_word(pd, PCI_COMMAND, &cmd);
63958 - if ((ps->command & ~cmd) == 0)
63959 - continue;
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,
63969 - ps->cache_lat);
63970 - pci_write_config_word(pd, PCI_INTERRUPT_LINE,
63971 - ps->intr);
63972 - pci_write_config_word(pd, PCI_COMMAND, ps->command);
63973 - break;
63974 - }
63975 -#endif
63976 - }
63977 -}
63978 -
63979 -#ifdef DEBUG_SLEEP
63980 -/* N.B. This doesn't work on the 3400 */
63981 -void
63982 -pmu_blink(int n)
63983 -{
63984 - struct adb_request req;
63985 -
63986 - memset(&req, 0, sizeof(req));
63987 -
63988 - for (; n > 0; --n) {
63989 - req.nbytes = 4;
63990 - req.done = NULL;
63991 - req.data[0] = 0xee;
63992 - req.data[1] = 4;
63993 - req.data[2] = 0;
63994 - req.data[3] = 1;
63995 - req.reply[0] = ADB_RET_OK;
63996 - req.reply_len = 1;
63997 - req.reply_expected = 0;
63998 - pmu_polled_request(&req);
63999 - mdelay(50);
64000 - req.nbytes = 4;
64001 - req.done = NULL;
64002 - req.data[0] = 0xee;
64003 - req.data[1] = 4;
64004 - req.data[2] = 0;
64005 - req.data[3] = 0;
64006 - req.reply[0] = ADB_RET_OK;
64007 - req.reply_len = 1;
64008 - req.reply_expected = 0;
64009 - pmu_polled_request(&req);
64010 - mdelay(50);
64011 - }
64012 - mdelay(50);
64013 -}
64014 -#endif
64015 -
64016 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64017 /*
64018 * Put the powerbook to sleep.
64019 */
64020 @@ -1994,134 +1748,6 @@
64021 out_8(&via[IER], IER_SET | SR_INT | CB1_INT);
64022 }
64023
64024 -extern void pmu_backlight_set_sleep(int sleep);
64025 -
64026 -static int
64027 -pmac_suspend_devices(void)
64028 -{
64029 - int ret;
64030 -
64031 - pm_prepare_console();
64032 -
64033 - /* Notify old-style device drivers */
64034 - broadcast_sleep(PBOOK_SLEEP_REQUEST);
64035 -
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
64041 - */
64042 - sys_sync();
64043 -
64044 - broadcast_sleep(PBOOK_SLEEP_NOW);
64045 -
64046 - /* Send suspend call to devices, hold the device core's dpm_sem */
64047 - ret = device_suspend(PMSG_SUSPEND);
64048 - if (ret) {
64049 - broadcast_wake();
64050 - printk(KERN_ERR "Driver sleep failed\n");
64051 - return -EBUSY;
64052 - }
64053 -
64054 -#ifdef CONFIG_PMAC_BACKLIGHT
64055 - /* Tell backlight code not to muck around with the chip anymore */
64056 - pmu_backlight_set_sleep(1);
64057 -#endif
64058 -
64059 - /* Call platform functions marked "on sleep" */
64060 - pmac_pfunc_i2c_suspend();
64061 - pmac_pfunc_base_suspend();
64062 -
64063 - /* Stop preemption */
64064 - preempt_disable();
64065 -
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 */
64070 - mb();
64071 - asm volatile("mtdec %0" : : "r" (0x7fffffff));
64072 -
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.
64076 - */
64077 - local_irq_disable();
64078 -
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.
64083 - */
64084 - ret = device_power_down(PMSG_SUSPEND);
64085 - if (ret) {
64086 - wakeup_decrementer();
64087 - local_irq_enable();
64088 - preempt_enable();
64089 - device_resume();
64090 - broadcast_wake();
64091 - printk(KERN_ERR "Driver powerdown failed\n");
64092 - return -EBUSY;
64093 - }
64094 -
64095 - /* Wait for completion of async requests */
64096 - while (!batt_req.complete)
64097 - pmu_poll();
64098 -
64099 - /* Giveup the lazy FPU & vec so we don't have to back them
64100 - * up from the low level code
64101 - */
64102 - enable_kernel_fp();
64103 -
64104 -#ifdef CONFIG_ALTIVEC
64105 - if (cpu_has_feature(CPU_FTR_ALTIVEC))
64106 - enable_kernel_altivec();
64107 -#endif /* CONFIG_ALTIVEC */
64108 -
64109 - return 0;
64110 -}
64111 -
64112 -static int
64113 -pmac_wakeup_devices(void)
64114 -{
64115 - mdelay(100);
64116 -
64117 -#ifdef CONFIG_PMAC_BACKLIGHT
64118 - /* Tell backlight code it can use the chip again */
64119 - pmu_backlight_set_sleep(0);
64120 -#endif
64121 -
64122 - /* Power back up system devices (including the PIC) */
64123 - device_power_up();
64124 -
64125 - /* Force a poll of ADB interrupts */
64126 - adb_int_pending = 1;
64127 - via_pmu_interrupt(0, NULL);
64128 -
64129 - /* Restart jiffies & scheduling */
64130 - wakeup_decrementer();
64131 -
64132 - /* Re-enable local CPU interrupts */
64133 - local_irq_enable();
64134 - mdelay(10);
64135 - preempt_enable();
64136 -
64137 - /* Call platform functions marked "on wake" */
64138 - pmac_pfunc_base_resume();
64139 - pmac_pfunc_i2c_resume();
64140 -
64141 - /* Resume devices */
64142 - device_resume();
64143 -
64144 - /* Notify old style drivers */
64145 - broadcast_wake();
64146 -
64147 - pm_restore_console();
64148 -
64149 - return 0;
64150 -}
64151 -
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;
64159 - int ret;
64160 struct pci_dev *grackle;
64161
64162 grackle = pci_get_bus_and_slot(0, 0);
64163 if (!grackle)
64164 return -ENODEV;
64165
64166 - ret = pmac_suspend_devices();
64167 - if (ret) {
64168 - printk(KERN_ERR "Sleep rejected by devices\n");
64169 - return ret;
64170 - }
64171 -
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);
64178
64179 - pmac_wakeup_devices();
64180 -
64181 return 0;
64182 }
64183
64184 @@ -2218,7 +1835,6 @@
64185 unsigned long save_l2cr;
64186 unsigned long save_l3cr;
64187 struct adb_request req;
64188 - int ret;
64189
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))
64194 return -EAGAIN;
64195
64196 - ret = pmac_suspend_devices();
64197 - if (ret) {
64198 - printk(KERN_ERR "Sleep rejected by devices\n");
64199 - return ret;
64200 - }
64201 -
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;
64208
64209 - pmac_wakeup_devices();
64210 -
64211 return 0;
64212 }
64213
64214 #define PB3400_MEM_CTRL 0xf8000000
64215 #define PB3400_MEM_CTRL_SLEEP 0x70
64216
64217 -static int
64218 -powerbook_sleep_3400(void)
64219 +static void __iomem *pb3400_mem_ctrl;
64220 +
64221 +static void powerbook_sleep_init_3400(void)
64222 {
64223 - int ret, i, x;
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");
64228 +}
64229 +
64230 +static int powerbook_sleep_3400(void)
64231 +{
64232 + int i, x;
64233 unsigned int hid0;
64234 - unsigned long p;
64235 + unsigned long msr;
64236 struct adb_request sleep_req;
64237 - void __iomem *mem_ctrl;
64238 unsigned int __iomem *mem_ctrl_sleep;
64239
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)
64245 return -ENOMEM;
64246 - }
64247 - mem_ctrl_sleep = mem_ctrl + PB3400_MEM_CTRL_SLEEP;
64248 -
64249 - /* Allocate room for PCI save */
64250 - pbook_alloc_pci_save();
64251 -
64252 - ret = pmac_suspend_devices();
64253 - if (ret) {
64254 - pbook_free_pci_save();
64255 - iounmap(mem_ctrl);
64256 - printk(KERN_ERR "Sleep rejected by devices\n");
64257 - return ret;
64258 - }
64259 -
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;
64263
64264 /* Set the memory controller to keep the memory refreshed
64265 while we're asleep */
64266 @@ -2357,41 +1955,34 @@
64267
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)
64271 - mb();
64272 + pmu_wait_complete(&sleep_req);
64273 + pmu_unlock();
64274
64275 - pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,1);
64276 + pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, 1);
64277
64278 - /* displacement-flush the L2 cache - necessary? */
64279 - for (p = KERNELBASE; p < KERNELBASE + 0x100000; p += 0x1000)
64280 - i = *(volatile int *)p;
64281 asleep = 1;
64282
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);
64288 - udelay(10);
64289 + local_irq_enable();
64290 + msr = mfmsr() | MSR_POW;
64291 + while (asleep) {
64292 + mb();
64293 + mtmsr(msr);
64294 + isync();
64295 + }
64296 + local_irq_disable();
64297
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();
64302 - pmu_unlock();
64303 -
64304 - /* wait for the PMU interrupt sequence to complete */
64305 - while (asleep)
64306 - mb();
64307 -
64308 - pmac_wakeup_devices();
64309 - pbook_free_pci_save();
64310 - iounmap(mem_ctrl);
64311 + pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, 0);
64312
64313 return 0;
64314 }
64315
64316 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64317 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
64318
64319 /*
64320 * Support for /dev/pmu device
64321 @@ -2548,7 +2139,6 @@
64322 struct pmu_private *pp = file->private_data;
64323 unsigned long flags;
64324
64325 - lock_kernel();
64326 if (pp != 0) {
64327 file->private_data = NULL;
64328 spin_lock_irqsave(&all_pvt_lock, flags);
64329 @@ -2562,10 +2152,96 @@
64330
64331 kfree(pp);
64332 }
64333 - unlock_kernel();
64334 return 0;
64335 }
64336
64337 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64338 +static void pmac_suspend_disable_irqs(void)
64339 +{
64340 + /* Call platform functions marked "on sleep" */
64341 + pmac_pfunc_i2c_suspend();
64342 + pmac_pfunc_base_suspend();
64343 +}
64344 +
64345 +static int powerbook_sleep(suspend_state_t state)
64346 +{
64347 + int error = 0;
64348 +
64349 + /* Wait for completion of async requests */
64350 + while (!batt_req.complete)
64351 + pmu_poll();
64352 +
64353 + /* Giveup the lazy FPU & vec so we don't have to back them
64354 + * up from the low level code
64355 + */
64356 + enable_kernel_fp();
64357 +
64358 +#ifdef CONFIG_ALTIVEC
64359 + if (cpu_has_feature(CPU_FTR_ALTIVEC))
64360 + enable_kernel_altivec();
64361 +#endif /* CONFIG_ALTIVEC */
64362 +
64363 + switch (pmu_kind) {
64364 + case PMU_OHARE_BASED:
64365 + error = powerbook_sleep_3400();
64366 + break;
64367 + case PMU_HEATHROW_BASED:
64368 + case PMU_PADDINGTON_BASED:
64369 + error = powerbook_sleep_grackle();
64370 + break;
64371 + case PMU_KEYLARGO_BASED:
64372 + error = powerbook_sleep_Core99();
64373 + break;
64374 + default:
64375 + return -ENOSYS;
64376 + }
64377 +
64378 + if (error)
64379 + return error;
64380 +
64381 + mdelay(100);
64382 +
64383 + return 0;
64384 +}
64385 +
64386 +static void pmac_suspend_enable_irqs(void)
64387 +{
64388 + /* Force a poll of ADB interrupts */
64389 + adb_int_pending = 1;
64390 + via_pmu_interrupt(0, NULL);
64391 +
64392 + mdelay(10);
64393 +
64394 + /* Call platform functions marked "on wake" */
64395 + pmac_pfunc_base_resume();
64396 + pmac_pfunc_i2c_resume();
64397 +}
64398 +
64399 +static int pmu_sleep_valid(suspend_state_t state)
64400 +{
64401 + return state == PM_SUSPEND_MEM
64402 + && (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) >= 0);
64403 +}
64404 +
64405 +static struct platform_suspend_ops pmu_pm_ops = {
64406 + .enter = powerbook_sleep,
64407 + .valid = pmu_sleep_valid,
64408 +};
64409 +
64410 +static int register_pmu_pm_ops(void)
64411 +{
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);
64417 +
64418 + return 0;
64419 +}
64420 +
64421 +device_initcall(register_pmu_pm_ops);
64422 +#endif
64423 +
64424 static int
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;
64429
64430 switch (cmd) {
64431 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
64432 case PMU_IOC_SLEEP:
64433 if (!capable(CAP_SYS_ADMIN))
64434 return -EACCES;
64435 - if (sleep_in_progress)
64436 - return -EBUSY;
64437 - sleep_in_progress = 1;
64438 - switch (pmu_kind) {
64439 - case PMU_OHARE_BASED:
64440 - error = powerbook_sleep_3400();
64441 - break;
64442 - case PMU_HEATHROW_BASED:
64443 - case PMU_PADDINGTON_BASED:
64444 - error = powerbook_sleep_grackle();
64445 - break;
64446 - case PMU_KEYLARGO_BASED:
64447 - error = powerbook_sleep_Core99();
64448 - break;
64449 - default:
64450 - error = -ENOSYS;
64451 - }
64452 - sleep_in_progress = 0;
64453 - break;
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);
64459 else
64460 return put_user(1, argp);
64461 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64462
64463 #ifdef CONFIG_PMAC_BACKLIGHT_LEGACY
64464 /* Compatibility ioctl's for backlight */
64465 @@ -2610,9 +2266,6 @@
64466 {
64467 int brightness;
64468
64469 - if (sleep_in_progress)
64470 - return -EBUSY;
64471 -
64472 brightness = pmac_backlight_get_legacy_brightness();
64473 if (brightness < 0)
64474 return brightness;
64475 @@ -2624,9 +2277,6 @@
64476 {
64477 int brightness;
64478
64479 - if (sleep_in_progress)
64480 - return -EBUSY;
64481 -
64482 error = get_user(brightness, argp);
64483 if (error)
64484 return error;
64485 @@ -2751,15 +2401,43 @@
64486 local_irq_restore(flags);
64487 return 0;
64488 }
64489 -#endif /* DEBUG_SLEEP */
64490
64491 +/* N.B. This doesn't work on the 3400 */
64492 +void pmu_blink(int n)
64493 +{
64494 + struct adb_request req;
64495
64496 -/* FIXME: This is a temporary set of callbacks to enable us
64497 - * to do suspend-to-disk.
64498 - */
64499 + memset(&req, 0, sizeof(req));
64500
64501 -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
64502 + for (; n > 0; --n) {
64503 + req.nbytes = 4;
64504 + req.done = NULL;
64505 + req.data[0] = 0xee;
64506 + req.data[1] = 4;
64507 + req.data[2] = 0;
64508 + req.data[3] = 1;
64509 + req.reply[0] = ADB_RET_OK;
64510 + req.reply_len = 1;
64511 + req.reply_expected = 0;
64512 + pmu_polled_request(&req);
64513 + mdelay(50);
64514 + req.nbytes = 4;
64515 + req.done = NULL;
64516 + req.data[0] = 0xee;
64517 + req.data[1] = 4;
64518 + req.data[2] = 0;
64519 + req.data[3] = 0;
64520 + req.reply[0] = ADB_RET_OK;
64521 + req.reply_len = 1;
64522 + req.reply_expected = 0;
64523 + pmu_polled_request(&req);
64524 + mdelay(50);
64525 + }
64526 + mdelay(50);
64527 +}
64528 +#endif /* DEBUG_SLEEP */
64529
64530 +#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
64531 int pmu_sys_suspended;
64532
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)
64536 return 0;
64537
64538 - /* Suspend PMU event interrupts */
64539 + /* Suspend PMU event interrupts */\
64540 pmu_suspend();
64541 -
64542 pmu_sys_suspended = 1;
64543 +
64544 +#ifdef CONFIG_PMAC_BACKLIGHT
64545 + /* Tell backlight code not to muck around with the chip anymore */
64546 + pmu_backlight_set_sleep(1);
64547 +#endif
64548 +
64549 return 0;
64550 }
64551
64552 @@ -2785,15 +2468,18 @@
64553 pmu_request(&req, NULL, 2, PMU_SYSTEM_READY, 2);
64554 pmu_wait_complete(&req);
64555
64556 +#ifdef CONFIG_PMAC_BACKLIGHT
64557 + /* Tell backlight code it can use the chip again */
64558 + pmu_backlight_set_sleep(0);
64559 +#endif
64560 /* Resume PMU event interrupts */
64561 pmu_resume();
64562 -
64563 pmu_sys_suspended = 0;
64564
64565 return 0;
64566 }
64567
64568 -#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
64569 +#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
64570
64571 static struct sysdev_class pmu_sysclass = {
64572 set_kset_name("pmu"),
64573 @@ -2804,10 +2490,10 @@
64574 };
64575
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 */
64583 };
64584
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 */
64598
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;
64605 int ret = 0, len;
64606 + const u32 *data;
64607 +
64608 + data = of_get_property(np, "fixed-link", NULL);
64609 + if (data) {
64610 + snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data);
64611 + return 0;
64612 + }
64613
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)
64617 return -EINVAL;
64618
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
64622 @@ -81,16 +81,8 @@
64623 static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 op)
64624 {
64625 const struct fs_platform_info *fpi = fep->fpi;
64626 - int i;
64627
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)
64631 - return 0;
64632 -
64633 - printk(KERN_ERR "%s(): Not able to issue CPM command\n",
64634 - __FUNCTION__);
64635 - return 1;
64636 + return cpm_command(fpi->cp_command, op);
64637 }
64638
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)
64645 */
64646 #define SCC_RESET_DELAY 50
64647 -#define MAX_CR_CMD_LOOPS 10000
64648
64649 static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op)
64650 {
64651 const struct fs_platform_info *fpi = fep->fpi;
64652 - int i;
64653
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)
64657 - return 0;
64658 -
64659 - printk(KERN_ERR "%s(): Not able to issue CPM command\n",
64660 - __FUNCTION__);
64661 - return 1;
64662 + return cpm_command(fpi->cp_command, op);
64663 }
64664
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
64669 @@ -37,6 +37,7 @@
64670 #include <linux/mii.h>
64671 #include <linux/bitops.h>
64672 #include <linux/workqueue.h>
64673 +#include <linux/of.h>
64674
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.
64682
64683 config FIXED_PHY
64684 - tristate "Drivers for PHY emulation on fixed speed/link"
64685 + bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs"
64686 ---help---
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.
64693
64694 -config FIXED_MII_10_FDX
64695 - bool "Emulation for 10M Fdx fixed PHY behavior"
64696 - depends on FIXED_PHY
64697 -
64698 -config FIXED_MII_100_FDX
64699 - bool "Emulation for 100M Fdx fixed PHY behavior"
64700 - depends on FIXED_PHY
64701 -
64702 -config FIXED_MII_1000_FDX
64703 - bool "Emulation for 1000M Fdx fixed PHY behavior"
64704 - depends on FIXED_PHY
64705 -
64706 -config FIXED_MII_AMNT
64707 - int "Number of emulated PHYs to allocate "
64708 - depends on FIXED_PHY
64709 - default "1"
64710 - ---help---
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.
64716
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 @@
64723 /*
64724 - * drivers/net/phy/fixed.c
64725 + * Fixed MDIO bus (MDIO bus emulation with fixed PHYs)
64726 *
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>
64730 *
64731 - * Author: Vitaly Bordug
64732 - *
64733 - * Copyright (c) 2006 MontaVista Software, Inc.
64734 + * Copyright (c) 2006-2007 MontaVista Software, Inc.
64735 *
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.
64740 - *
64741 */
64742 +
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>
64763
64764 -#include <asm/io.h>
64765 -#include <asm/irq.h>
64766 -#include <asm/uaccess.h>
64767 -
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];
64770 -
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 *))
64779 -{
64780 - struct fixed_info *fixed;
64781 -
64782 - if (link_update == NULL)
64783 - return -EINVAL;
64784 +#define MII_REGS_NUM 29
64785
64786 - if (phydev) {
64787 - if (phydev->bus) {
64788 - fixed = phydev->bus->priv;
64789 - fixed->link_update = link_update;
64790 - return 0;
64791 - }
64792 - }
64793 - return -EINVAL;
64794 -}
64795 -
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;
64801 +};
64802
64803 -struct fixed_info *fixed_mdio_get_phydev (int phydev_ind)
64804 -{
64805 - if (phydev_ind >= MAX_PHY_AMNT)
64806 - return NULL;
64807 - return fixed_phy_ptrs[phydev_ind];
64808 -}
64809 +struct fixed_phy {
64810 + int id;
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;
64816 +};
64817
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),
64822 +};
64823
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)
64830 {
64831 - u16 *regs = fixed->regs;
64832 - u16 bmsr = 0;
64833 + u16 bmsr = BMSR_ANEGCAPABLE;
64834 u16 bmcr = 0;
64835 + u16 lpagb = 0;
64836 + u16 lpa = 0;
64837
64838 - if (!regs) {
64839 - printk(KERN_ERR "%s: regs not set up", __FUNCTION__);
64840 - return -EINVAL;
64841 - }
64842 -
64843 - if (fixed->phy_status.link)
64844 - bmsr |= BMSR_LSTATUS;
64845 -
64846 - if (fixed->phy_status.duplex) {
64847 + if (fp->status.duplex) {
64848 bmcr |= BMCR_FULLDPLX;
64849
64850 - switch (fixed->phy_status.speed) {
64851 + switch (fp->status.speed) {
64852 + case 1000:
64853 + bmsr |= BMSR_ESTATEN;
64854 + bmcr |= BMCR_SPEED1000;
64855 + lpagb |= LPA_1000FULL;
64856 + break;
64857 case 100:
64858 bmsr |= BMSR_100FULL;
64859 bmcr |= BMCR_SPEED100;
64860 + lpa |= LPA_100FULL;
64861 break;
64862 -
64863 case 10:
64864 bmsr |= BMSR_10FULL;
64865 + lpa |= LPA_10FULL;
64866 break;
64867 + default:
64868 + printk(KERN_WARNING "fixed phy: unknown speed\n");
64869 + return -EINVAL;
64870 }
64871 } else {
64872 - switch (fixed->phy_status.speed) {
64873 + switch (fp->status.speed) {
64874 + case 1000:
64875 + bmsr |= BMSR_ESTATEN;
64876 + bmcr |= BMCR_SPEED1000;
64877 + lpagb |= LPA_1000HALF;
64878 + break;
64879 case 100:
64880 bmsr |= BMSR_100HALF;
64881 bmcr |= BMCR_SPEED100;
64882 + lpa |= LPA_100HALF;
64883 break;
64884 -
64885 case 10:
64886 - bmsr |= BMSR_100HALF;
64887 + bmsr |= BMSR_10HALF;
64888 + lpa |= LPA_10HALF;
64889 break;
64890 + default:
64891 + printk(KERN_WARNING "fixed phy: unknown speed\n");
64892 + return -EINVAL;
64893 }
64894 }
64895
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;
64900 +
64901 + if (fp->status.pause)
64902 + lpa |= LPA_PAUSE_CAP;
64903 +
64904 + if (fp->status.asym_pause)
64905 + lpa |= LPA_PAUSE_ASYM;
64906 +
64907 + fp->regs[MII_PHYSID1] = fp->id >> 16;
64908 + fp->regs[MII_PHYSID2] = fp->id;
64909 +
64910 + fp->regs[MII_BMSR] = bmsr;
64911 + fp->regs[MII_BMCR] = bmcr;
64912 + fp->regs[MII_LPA] = lpa;
64913 + fp->regs[MII_STAT1000] = lpagb;
64914
64915 return 0;
64916 }
64917
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)
64920 {
64921 - struct fixed_info *fixed = bus->priv;
64922 + struct fixed_mdio_bus *fmb = container_of(bus, struct fixed_mdio_bus,
64923 + mii_bus);
64924 + struct fixed_phy *fp;
64925
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)
64934 + return -1;
64935 +
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,
64941 + &fp->status);
64942 + fixed_phy_update_regs(fp);
64943 }
64944 + return fp->regs[reg_num];
64945 }
64946 + }
64947
64948 - if ((unsigned int)location >= fixed->regs_num)
64949 - return -1;
64950 - return fixed->regs[location];
64951 + return 0xFFFF;
64952 }
64953
64954 -static int fixed_mii_write(struct mii_bus *bus, int phy_id, int location,
64955 - u16 val)
64956 +static int fixed_mdio_write(struct mii_bus *bus, int phy_id, int reg_num,
64957 + u16 val)
64958 {
64959 - /* do nothing for now */
64960 return 0;
64961 }
64962
64963 -static int fixed_mii_reset(struct mii_bus *bus)
64964 +/*
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.
64968 + */
64969 +int fixed_phy_set_link_update(struct phy_device *phydev,
64970 + int (*link_update)(struct net_device *,
64971 + struct fixed_phy_status *))
64972 {
64973 - /*nothing here - no way/need to reset it */
64974 - return 0;
64975 -}
64976 -#endif
64977 + struct fixed_mdio_bus *fmb = &platform_fmb;
64978 + struct fixed_phy *fp;
64979
64980 -static int fixed_config_aneg(struct phy_device *phydev)
64981 -{
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
64985 - */
64986 - return 0;
64987 -}
64988 + if (!link_update || !phydev || !phydev->bus)
64989 + return -EINVAL;
64990
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,
64999 -#else
65000 - .features = PHY_BASIC_FEATURES,
65001 -#endif
65002 - .config_aneg = fixed_config_aneg,
65003 - .read_status = genphy_read_status,
65004 - .driver = { .owner = THIS_MODULE, },
65005 -};
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;
65010 + return 0;
65011 + }
65012 + }
65013
65014 -static void fixed_mdio_release(struct device *dev)
65015 -{
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;
65019 -
65020 - kfree(phydev);
65021 - kfree(bus->dev);
65022 - kfree(bus);
65023 - kfree(fixed->regs);
65024 - kfree(fixed);
65025 + return -ENOENT;
65026 }
65027 +EXPORT_SYMBOL_GPL(fixed_phy_set_link_update);
65028
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.
65035 - *
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)
65045 {
65046 - struct mii_bus *new_bus;
65047 - struct fixed_info *fixed;
65048 - struct phy_device *phydev;
65049 - int err;
65050 + int ret;
65051 + struct fixed_mdio_bus *fmb = &platform_fmb;
65052 + struct fixed_phy *fp;
65053
65054 - struct device *dev = kzalloc(sizeof(struct device), GFP_KERNEL);
65055 + fp = kzalloc(sizeof(*fp), GFP_KERNEL);
65056 + if (!fp)
65057 + return -ENOMEM;
65058
65059 - if (dev == NULL)
65060 - goto err_dev_alloc;
65061 + memset(fp->regs, 0xFF, sizeof(fp->regs[0]) * MII_REGS_NUM);
65062
65063 - new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
65064 + fmb->irqs[phy_id] = irq;
65065
65066 - if (new_bus == NULL)
65067 - goto err_bus_alloc;
65068 -
65069 - fixed = kzalloc(sizeof(struct fixed_info), GFP_KERNEL);
65070 -
65071 - if (fixed == NULL)
65072 - goto err_fixed_alloc;
65073 -
65074 - fixed->regs = kzalloc(MII_REGS_NUM * sizeof(int), GFP_KERNEL);
65075 - if (NULL == fixed->regs)
65076 - goto err_fixed_regs_alloc;
65077 -
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;
65082 -
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;
65090 -
65091 - new_bus->dev = dev;
65092 - dev_set_drvdata(dev, new_bus);
65093 -
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;
65098 -
65099 - /*
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
65103 - * link-update...
65104 - */
65105 -
65106 - fixed->phydev = phydev;
65107 - phydev->speed = speed;
65108 - phydev->duplex = duplex;
65109 -
65110 - phydev->irq = PHY_IGNORE_INTERRUPT;
65111 - phydev->dev.bus = &mdio_bus_type;
65112 -
65113 - snprintf(phydev->dev.bus_id, BUS_ID_SIZE,
65114 - PHY_ID_FMT, bus_id, phy_id);
65115 -
65116 - phydev->bus = new_bus;
65117 -
65118 - phydev->dev.driver = &fixed_mdio_driver.driver;
65119 - phydev->dev.release = fixed_mdio_release;
65120 - err = phydev->dev.driver->probe(&phydev->dev);
65121 - if (err < 0) {
65122 - printk(KERN_ERR "Phy %s: problems with fixed driver\n",
65123 - phydev->dev.bus_id);
65124 - goto err_out;
65125 - }
65126 - err = device_register(&phydev->dev);
65127 - if (err) {
65128 - printk(KERN_ERR "Phy %s failed to register\n",
65129 - phydev->dev.bus_id);
65130 - goto err_out;
65131 - }
65132 - //phydev->state = PHY_RUNNING; /* make phy go up quick, but in 10Mbit/HDX
65133 - return fixed;
65134 + fp->id = phy_id;
65135 + fp->status = *status;
65136
65137 -err_out:
65138 - kfree(phydev);
65139 -err_phy_dev_create:
65140 - kfree(fixed->regs);
65141 -err_fixed_regs_alloc:
65142 - kfree(fixed);
65143 -err_fixed_alloc:
65144 - kfree(new_bus);
65145 -err_bus_alloc:
65146 - kfree(dev);
65147 -err_dev_alloc:
65148 + ret = fixed_phy_update_regs(fp);
65149 + if (ret)
65150 + goto err_regs;
65151
65152 - return NULL;
65153 + list_add_tail(&fp->node, &fmb->phys);
65154
65155 -}
65156 -#endif
65157 + return 0;
65158
65159 -MODULE_DESCRIPTION("Fixed PHY device & driver for PAL");
65160 -MODULE_AUTHOR("Vitaly Bordug");
65161 -MODULE_LICENSE("GPL");
65162 +err_regs:
65163 + kfree(fp);
65164 + return ret;
65165 +}
65166 +EXPORT_SYMBOL_GPL(fixed_phy_add);
65167
65168 -static int __init fixed_init(void)
65169 +static int __init fixed_mdio_bus_init(void)
65170 {
65171 - int cnt = 0;
65172 - int i;
65173 -/* register on the bus... Not expected to be matched
65174 - * with anything there...
65175 - *
65176 - */
65177 - phy_driver_register(&fixed_mdio_driver);
65178 + struct fixed_mdio_bus *fmb = &platform_fmb;
65179 + int ret;
65180
65181 -/* We will create several mdio devices here, and will bound the upper
65182 - * driver to them.
65183 - *
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.
65186 - *
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.
65191 - */
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);
65195 -#endif
65196 -#ifdef CONFIG_FIXED_MII_100_FDX
65197 - fixed_phy_ptrs[cnt++] = fixed_mdio_register_device(1, 100, 1, i);
65198 -#endif
65199 -#ifdef CONFIG_FIXED_MII_10_FDX
65200 - fixed_phy_ptrs[cnt++] = fixed_mdio_register_device(2, 10, 1, i);
65201 -#endif
65202 + pdev = platform_device_register_simple("Fixed MDIO bus", 0, NULL, 0);
65203 + if (!pdev) {
65204 + ret = -ENOMEM;
65205 + goto err_pdev;
65206 }
65207
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;
65214 +
65215 + ret = mdiobus_register(&fmb->mii_bus);
65216 + if (ret)
65217 + goto err_mdiobus_reg;
65218 +
65219 return 0;
65220 +
65221 +err_mdiobus_reg:
65222 + platform_device_unregister(pdev);
65223 +err_pdev:
65224 + return ret;
65225 }
65226 +module_init(fixed_mdio_bus_init);
65227
65228 -static void __exit fixed_exit(void)
65229 +static void __exit fixed_mdio_bus_exit(void)
65230 {
65231 - int i;
65232 + struct fixed_mdio_bus *fmb = &platform_fmb;
65233 + struct fixed_phy *fp;
65234
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);
65241 +
65242 + list_for_each_entry(fp, &fmb->phys, node) {
65243 + list_del(&fp->node);
65244 + kfree(fp);
65245 + }
65246 }
65247 +module_exit(fixed_mdio_bus_exit);
65248
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 @@
65258 {
65259 return &card->dev->core;
65260 }
65261 -static inline unsigned int bus_id(struct gelic_net_card *card)
65262 +static inline u64 bus_id(struct gelic_net_card *card)
65263 {
65264 return card->dev->bus_id;
65265 }
65266 -static inline unsigned int dev_id(struct gelic_net_card *card)
65267 +static inline u64 dev_id(struct gelic_net_card *card)
65268 {
65269 return card->dev->dev_id;
65270 }
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;
65276 const phandle *ph;
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 @@
65283
65284 ug_info->uf_info.ucc_num = ucc_num;
65285
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);
65291 + if (sprop) {
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)) {
65295 + printk(KERN_ERR
65296 + "ucc_geth: invalid rx-clock-name property\n");
65297 + return -EINVAL;
65298 + }
65299 + } else {
65300 + prop = of_get_property(np, "rx-clock", NULL);
65301 + if (!prop) {
65302 + /* If both rx-clock-name and rx-clock are missing,
65303 + we want to tell people to use rx-clock-name. */
65304 + printk(KERN_ERR
65305 + "ucc_geth: missing rx-clock-name property\n");
65306 + return -EINVAL;
65307 + }
65308 + if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
65309 + printk(KERN_ERR
65310 + "ucc_geth: invalid rx-clock propperty\n");
65311 + return -EINVAL;
65312 + }
65313 + ug_info->uf_info.rx_clock = *prop;
65314 + }
65315 +
65316 + sprop = of_get_property(np, "tx-clock-name", NULL);
65317 + if (sprop) {
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)) {
65321 + printk(KERN_ERR
65322 + "ucc_geth: invalid tx-clock-name property\n");
65323 + return -EINVAL;
65324 + }
65325 + } else {
65326 + prop = of_get_property(np, "rx-clock", NULL);
65327 + if (!prop) {
65328 + printk(KERN_ERR
65329 + "ucc_geth: mising tx-clock-name property\n");
65330 + return -EINVAL;
65331 + }
65332 + if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
65333 + printk(KERN_ERR
65334 + "ucc_geth: invalid tx-clock property\n");
65335 + return -EINVAL;
65336 + }
65337 + ug_info->uf_info.tx_clock = *prop;
65338 + }
65339 +
65340 err = of_address_to_resource(np, 0, &res);
65341 if (err)
65342 return -EINVAL;
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 @@
65347 return np;
65348 }
65349 EXPORT_SYMBOL(of_find_compatible_node);
65350 +
65351 +/**
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
65355 + *
65356 + * Low level utility function used by device matching.
65357 + */
65358 +const struct of_device_id *of_match_node(const struct of_device_id *matches,
65359 + const struct device_node *node)
65360 +{
65361 + while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
65362 + int match = 1;
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);
65372 + if (match)
65373 + return matches;
65374 + matches++;
65375 + }
65376 + return NULL;
65377 +}
65378 +EXPORT_SYMBOL(of_match_node);
65379 +
65380 +/**
65381 + * of_find_matching_node - Find a node based on an of_device_id match
65382 + * table.
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
65388 + *
65389 + * Returns a node pointer with refcount incremented, use
65390 + * of_node_put() on it when done.
65391 + */
65392 +struct device_node *of_find_matching_node(struct device_node *from,
65393 + const struct of_device_id *matches)
65394 +{
65395 + struct device_node *np;
65396 +
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))
65401 + break;
65402 + }
65403 + of_node_put(from);
65404 + read_unlock(&devtree_lock);
65405 + return np;
65406 +}
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
65411 @@ -10,35 +10,6 @@
65412 #include <asm/errno.h>
65413
65414 /**
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
65418 - *
65419 - * Low level utility function used by device matching.
65420 - */
65421 -const struct of_device_id *of_match_node(const struct of_device_id *matches,
65422 - const struct device_node *node)
65423 -{
65424 - while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
65425 - int match = 1;
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);
65435 - if (match)
65436 - return matches;
65437 - matches++;
65438 - }
65439 - return NULL;
65440 -}
65441 -EXPORT_SYMBOL(of_match_node);
65442 -
65443 -/**
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
65450 @@ -4,3 +4,4 @@
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
65458 @@ -0,0 +1,1248 @@
65459 +/*
65460 + * PS3 Logical Performance Monitor.
65461 + *
65462 + * Copyright (C) 2007 Sony Computer Entertainment Inc.
65463 + * Copyright 2007 Sony Corp.
65464 + *
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.
65468 + *
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.
65473 + *
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
65477 + */
65478 +
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>
65486 +
65487 +
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
65495 +
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
65502 +
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
65510 +
65511 +/* CBE PM COUNTER register macres */
65512 +#define PS3_PM_COUNTER_MASK_HI 0xFFFFFFFF00000000ULL
65513 +#define PS3_PM_COUNTER_MASK_LO 0x00000000FFFFFFFFULL
65514 +
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
65531 +
65532 +/**
65533 + * struct ps3_lpm_shadow_regs - Performance monitor shadow registers.
65534 + *
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.
65540 + *
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.
65544 + *
65545 + * The initial value of the shadow registers at lpm creation is
65546 + * PS3_LPM_SHADOW_REG_INIT.
65547 + */
65548 +
65549 +struct ps3_lpm_shadow_regs {
65550 + u64 pm_control;
65551 + u64 pm_start_stop;
65552 + u64 pm_interval;
65553 + u64 group_control;
65554 + u64 debug_bus_control;
65555 +};
65556 +
65557 +#define PS3_LPM_SHADOW_REG_INIT 0xFFFFFFFF00000000ULL
65558 +
65559 +/**
65560 + * struct ps3_lpm_priv - Private lpm device data.
65561 + *
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
65574 + * aligned.
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.
65580 + *
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.
65584 + */
65585 +
65586 +struct ps3_lpm_priv {
65587 + atomic_t open;
65588 + u64 rights;
65589 + u64 node_id;
65590 + u64 pu_id;
65591 + u64 lpm_id;
65592 + u64 outlet_id;
65593 + u64 tb_count;
65594 + void *tb_cache;
65595 + u64 tb_cache_size;
65596 + void *tb_cache_internal;
65597 + struct ps3_lpm_shadow_regs shadow;
65598 + struct ps3_system_bus_device *sbd;
65599 +};
65600 +
65601 +enum {
65602 + PS3_LPM_DEFAULT_TB_CACHE_SIZE = 0x4000,
65603 +};
65604 +
65605 +/**
65606 + * lpm_priv - Static instance of the lpm data.
65607 + *
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.
65611 + */
65612 +
65613 +static struct ps3_lpm_priv *lpm_priv;
65614 +
65615 +static struct device *sbd_core(void)
65616 +{
65617 + BUG_ON(!lpm_priv || !lpm_priv->sbd);
65618 + return &lpm_priv->sbd->core;
65619 +}
65620 +
65621 +/**
65622 + * use_start_stop_bookmark - Enable the PPU bookmark trace.
65623 + *
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.
65627 + *
65628 + * Used to get good quality of the performance counter.
65629 + */
65630 +
65631 +enum {use_start_stop_bookmark = 1,};
65632 +
65633 +void ps3_set_bookmark(u64 bookmark)
65634 +{
65635 + /*
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.
65640 + */
65641 +
65642 + asm volatile("or 29, 29, 29;"); /* db10cyc */
65643 + mtspr(SPRN_BKMK, bookmark);
65644 + asm volatile("or 29, 29, 29;"); /* db10cyc */
65645 +}
65646 +EXPORT_SYMBOL_GPL(ps3_set_bookmark);
65647 +
65648 +void ps3_set_pm_bookmark(u64 tag, u64 incident, u64 th_id)
65649 +{
65650 + u64 bookmark;
65651 +
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);
65657 +}
65658 +EXPORT_SYMBOL_GPL(ps3_set_pm_bookmark);
65659 +
65660 +/**
65661 + * ps3_read_phys_ctr - Read physical counter registers.
65662 + *
65663 + * Each physical counter can act as one 32 bit counter or as two 16 bit
65664 + * counters.
65665 + */
65666 +
65667 +u32 ps3_read_phys_ctr(u32 cpu, u32 phys_ctr)
65668 +{
65669 + int result;
65670 + u64 counter0415;
65671 + u64 counter2637;
65672 +
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);
65676 + return 0;
65677 + }
65678 +
65679 + result = lv1_set_lpm_counter(lpm_priv->lpm_id, 0, 0, 0, 0, &counter0415,
65680 + &counter2637);
65681 + if (result) {
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));
65685 + return 0;
65686 + }
65687 +
65688 + switch (phys_ctr) {
65689 + case 0:
65690 + return counter0415 >> 32;
65691 + case 1:
65692 + return counter0415 & PS3_PM_COUNTER_MASK_LO;
65693 + case 2:
65694 + return counter2637 >> 32;
65695 + case 3:
65696 + return counter2637 & PS3_PM_COUNTER_MASK_LO;
65697 + default:
65698 + BUG();
65699 + }
65700 + return 0;
65701 +}
65702 +EXPORT_SYMBOL_GPL(ps3_read_phys_ctr);
65703 +
65704 +/**
65705 + * ps3_write_phys_ctr - Write physical counter registers.
65706 + *
65707 + * Each physical counter can act as one 32 bit counter or as two 16 bit
65708 + * counters.
65709 + */
65710 +
65711 +void ps3_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val)
65712 +{
65713 + u64 counter0415;
65714 + u64 counter0415_mask;
65715 + u64 counter2637;
65716 + u64 counter2637_mask;
65717 + int result;
65718 +
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);
65722 + return;
65723 + }
65724 +
65725 + switch (phys_ctr) {
65726 + case 0:
65727 + counter0415 = (u64)val << 32;
65728 + counter0415_mask = PS3_PM_COUNTER_MASK_HI;
65729 + counter2637 = 0x0;
65730 + counter2637_mask = 0x0;
65731 + break;
65732 + case 1:
65733 + counter0415 = (u64)val;
65734 + counter0415_mask = PS3_PM_COUNTER_MASK_LO;
65735 + counter2637 = 0x0;
65736 + counter2637_mask = 0x0;
65737 + break;
65738 + case 2:
65739 + counter0415 = 0x0;
65740 + counter0415_mask = 0x0;
65741 + counter2637 = (u64)val << 32;
65742 + counter2637_mask = PS3_PM_COUNTER_MASK_HI;
65743 + break;
65744 + case 3:
65745 + counter0415 = 0x0;
65746 + counter0415_mask = 0x0;
65747 + counter2637 = (u64)val;
65748 + counter2637_mask = PS3_PM_COUNTER_MASK_LO;
65749 + break;
65750 + default:
65751 + BUG();
65752 + }
65753 +
65754 + result = lv1_set_lpm_counter(lpm_priv->lpm_id,
65755 + counter0415, counter0415_mask,
65756 + counter2637, counter2637_mask,
65757 + &counter0415, &counter2637);
65758 + if (result)
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));
65762 +}
65763 +EXPORT_SYMBOL_GPL(ps3_write_phys_ctr);
65764 +
65765 +/**
65766 + * ps3_read_ctr - Read counter.
65767 + *
65768 + * Read 16 or 32 bits depending on the current size of the counter.
65769 + * Counters 4, 5, 6 & 7 are always 16 bit.
65770 + */
65771 +
65772 +u32 ps3_read_ctr(u32 cpu, u32 ctr)
65773 +{
65774 + u32 val;
65775 + u32 phys_ctr = ctr & (NR_PHYS_CTRS - 1);
65776 +
65777 + val = ps3_read_phys_ctr(cpu, phys_ctr);
65778 +
65779 + if (ps3_get_ctr_size(cpu, phys_ctr) == 16)
65780 + val = (ctr < NR_PHYS_CTRS) ? (val >> 16) : (val & 0xffff);
65781 +
65782 + return val;
65783 +}
65784 +EXPORT_SYMBOL_GPL(ps3_read_ctr);
65785 +
65786 +/**
65787 + * ps3_write_ctr - Write counter.
65788 + *
65789 + * Write 16 or 32 bits depending on the current size of the counter.
65790 + * Counters 4, 5, 6 & 7 are always 16 bit.
65791 + */
65792 +
65793 +void ps3_write_ctr(u32 cpu, u32 ctr, u32 val)
65794 +{
65795 + u32 phys_ctr;
65796 + u32 phys_val;
65797 +
65798 + phys_ctr = ctr & (NR_PHYS_CTRS - 1);
65799 +
65800 + if (ps3_get_ctr_size(cpu, phys_ctr) == 16) {
65801 + phys_val = ps3_read_phys_ctr(cpu, phys_ctr);
65802 +
65803 + if (ctr < NR_PHYS_CTRS)
65804 + val = (val << 16) | (phys_val & 0xffff);
65805 + else
65806 + val = (val & 0xffff) | (phys_val & 0xffff0000);
65807 + }
65808 +
65809 + ps3_write_phys_ctr(cpu, phys_ctr, val);
65810 +}
65811 +EXPORT_SYMBOL_GPL(ps3_write_ctr);
65812 +
65813 +/**
65814 + * ps3_read_pm07_control - Read counter control registers.
65815 + *
65816 + * Each logical counter has a corresponding control register.
65817 + */
65818 +
65819 +u32 ps3_read_pm07_control(u32 cpu, u32 ctr)
65820 +{
65821 + return 0;
65822 +}
65823 +EXPORT_SYMBOL_GPL(ps3_read_pm07_control);
65824 +
65825 +/**
65826 + * ps3_write_pm07_control - Write counter control registers.
65827 + *
65828 + * Each logical counter has a corresponding control register.
65829 + */
65830 +
65831 +void ps3_write_pm07_control(u32 cpu, u32 ctr, u32 val)
65832 +{
65833 + int result;
65834 + static const u64 mask = 0xFFFFFFFFFFFFFFFFULL;
65835 + u64 old_value;
65836 +
65837 + if (ctr >= NR_CTRS) {
65838 + dev_dbg(sbd_core(), "%s:%u: ctr too big: %u\n", __func__,
65839 + __LINE__, ctr);
65840 + return;
65841 + }
65842 +
65843 + result = lv1_set_lpm_counter_control(lpm_priv->lpm_id, ctr, val, mask,
65844 + &old_value);
65845 + if (result)
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));
65849 +}
65850 +EXPORT_SYMBOL_GPL(ps3_write_pm07_control);
65851 +
65852 +/**
65853 + * ps3_read_pm - Read Other LPM control registers.
65854 + */
65855 +
65856 +u32 ps3_read_pm(u32 cpu, enum pm_reg_name reg)
65857 +{
65858 + int result = 0;
65859 + u64 val = 0;
65860 +
65861 + switch (reg) {
65862 + case pm_control:
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;
65874 + case pm_status:
65875 + result = lv1_get_lpm_interrupt_status(lpm_priv->lpm_id,
65876 + &val);
65877 + if (result) {
65878 + val = 0;
65879 + dev_dbg(sbd_core(), "%s:%u: lv1 get_lpm_status failed: "
65880 + "reg %u, %s\n", __func__, __LINE__, reg,
65881 + ps3_result(result));
65882 + }
65883 + return (u32)val;
65884 + case ext_tr_timer:
65885 + return 0;
65886 + default:
65887 + dev_dbg(sbd_core(), "%s:%u: unknown reg: %d\n", __func__,
65888 + __LINE__, reg);
65889 + BUG();
65890 + break;
65891 + }
65892 +
65893 + return 0;
65894 +}
65895 +EXPORT_SYMBOL_GPL(ps3_read_pm);
65896 +
65897 +/**
65898 + * ps3_write_pm - Write Other LPM control registers.
65899 + */
65900 +
65901 +void ps3_write_pm(u32 cpu, enum pm_reg_name reg, u32 val)
65902 +{
65903 + int result = 0;
65904 + u64 dummy;
65905 +
65906 + switch (reg) {
65907 + case group_control:
65908 + if (val != lpm_priv->shadow.group_control)
65909 + result = lv1_set_lpm_group_control(lpm_priv->lpm_id,
65910 + val,
65911 + PS3_WRITE_PM_MASK,
65912 + &dummy);
65913 + lpm_priv->shadow.group_control = val;
65914 + break;
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,
65918 + val,
65919 + PS3_WRITE_PM_MASK,
65920 + &dummy);
65921 + lpm_priv->shadow.debug_bus_control = val;
65922 + break;
65923 + case pm_control:
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,
65929 + val,
65930 + PS3_WRITE_PM_MASK,
65931 + 0, 0, &dummy,
65932 + &dummy);
65933 + lpm_priv->shadow.pm_control = val;
65934 + break;
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;
65940 + break;
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,
65944 + val,
65945 + PS3_WRITE_PM_MASK,
65946 + &dummy);
65947 + lpm_priv->shadow.pm_start_stop = val;
65948 + break;
65949 + case trace_address:
65950 + case ext_tr_timer:
65951 + case pm_status:
65952 + break;
65953 + default:
65954 + dev_dbg(sbd_core(), "%s:%u: unknown reg: %d\n", __func__,
65955 + __LINE__, reg);
65956 + BUG();
65957 + break;
65958 + }
65959 +
65960 + if (result)
65961 + dev_err(sbd_core(), "%s:%u: lv1 set_control failed: "
65962 + "reg %u, %s\n", __func__, __LINE__, reg,
65963 + ps3_result(result));
65964 +}
65965 +EXPORT_SYMBOL_GPL(ps3_write_pm);
65966 +
65967 +/**
65968 + * ps3_get_ctr_size - Get the size of a physical counter.
65969 + *
65970 + * Returns either 16 or 32.
65971 + */
65972 +
65973 +u32 ps3_get_ctr_size(u32 cpu, u32 phys_ctr)
65974 +{
65975 + u32 pm_ctrl;
65976 +
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);
65980 + return 0;
65981 + }
65982 +
65983 + pm_ctrl = ps3_read_pm(cpu, pm_control);
65984 + return (pm_ctrl & CBE_PM_16BIT_CTR(phys_ctr)) ? 16 : 32;
65985 +}
65986 +EXPORT_SYMBOL_GPL(ps3_get_ctr_size);
65987 +
65988 +/**
65989 + * ps3_set_ctr_size - Set the size of a physical counter to 16 or 32 bits.
65990 + */
65991 +
65992 +void ps3_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size)
65993 +{
65994 + u32 pm_ctrl;
65995 +
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);
65999 + return;
66000 + }
66001 +
66002 + pm_ctrl = ps3_read_pm(cpu, pm_control);
66003 +
66004 + switch (ctr_size) {
66005 + case 16:
66006 + pm_ctrl |= CBE_PM_16BIT_CTR(phys_ctr);
66007 + ps3_write_pm(cpu, pm_control, pm_ctrl);
66008 + break;
66009 +
66010 + case 32:
66011 + pm_ctrl &= ~CBE_PM_16BIT_CTR(phys_ctr);
66012 + ps3_write_pm(cpu, pm_control, pm_ctrl);
66013 + break;
66014 + default:
66015 + BUG();
66016 + }
66017 +}
66018 +EXPORT_SYMBOL_GPL(ps3_set_ctr_size);
66019 +
66020 +static u64 pm_translate_signal_group_number_on_island2(u64 subgroup)
66021 +{
66022 +
66023 + if (subgroup == 2)
66024 + subgroup = 3;
66025 +
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;
66030 + else
66031 + return PM_ISLAND2_SIGNAL_GROUP_NUMBER2;
66032 +}
66033 +
66034 +static u64 pm_translate_signal_group_number_on_island3(u64 subgroup)
66035 +{
66036 +
66037 + switch (subgroup) {
66038 + case 2:
66039 + case 3:
66040 + case 4:
66041 + subgroup += 2;
66042 + break;
66043 + case 5:
66044 + subgroup = 8;
66045 + break;
66046 + default:
66047 + break;
66048 + }
66049 + return PM_ISLAND3_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66050 +}
66051 +
66052 +static u64 pm_translate_signal_group_number_on_island4(u64 subgroup)
66053 +{
66054 + return PM_ISLAND4_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66055 +}
66056 +
66057 +static u64 pm_translate_signal_group_number_on_island5(u64 subgroup)
66058 +{
66059 +
66060 + switch (subgroup) {
66061 + case 3:
66062 + subgroup = 4;
66063 + break;
66064 + case 4:
66065 + subgroup = 6;
66066 + break;
66067 + default:
66068 + break;
66069 + }
66070 + return PM_ISLAND5_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66071 +}
66072 +
66073 +static u64 pm_translate_signal_group_number_on_island6(u64 subgroup,
66074 + u64 subsubgroup)
66075 +{
66076 + switch (subgroup) {
66077 + case 3:
66078 + case 4:
66079 + case 5:
66080 + subgroup += 1;
66081 + break;
66082 + default:
66083 + break;
66084 + }
66085 +
66086 + switch (subsubgroup) {
66087 + case 4:
66088 + case 5:
66089 + case 6:
66090 + subsubgroup += 2;
66091 + break;
66092 + case 7:
66093 + case 8:
66094 + case 9:
66095 + case 10:
66096 + subsubgroup += 4;
66097 + break;
66098 + case 11:
66099 + case 12:
66100 + case 13:
66101 + subsubgroup += 5;
66102 + break;
66103 + default:
66104 + break;
66105 + }
66106 +
66107 + if (subgroup <= 5)
66108 + return (PM_ISLAND6_BASE_SIGNAL_GROUP_NUMBER + subgroup);
66109 + else
66110 + return (PM_ISLAND6_BASE_SIGNAL_GROUP_NUMBER + subgroup
66111 + + subsubgroup - 1);
66112 +}
66113 +
66114 +static u64 pm_translate_signal_group_number_on_island7(u64 subgroup)
66115 +{
66116 + return PM_ISLAND7_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66117 +}
66118 +
66119 +static u64 pm_translate_signal_group_number_on_island8(u64 subgroup)
66120 +{
66121 + return PM_ISLAND8_BASE_SIGNAL_GROUP_NUMBER + subgroup;
66122 +}
66123 +
66124 +static u64 pm_signal_group_to_ps3_lv1_signal_group(u64 group)
66125 +{
66126 + u64 island;
66127 + u64 subgroup;
66128 + u64 subsubgroup;
66129 +
66130 + subgroup = 0;
66131 + subsubgroup = 0;
66132 + island = 0;
66133 + if (group < 1000) {
66134 + if (group < 100) {
66135 + if (20 <= group && group < 30) {
66136 + island = 2;
66137 + subgroup = group - 20;
66138 + } else if (30 <= group && group < 40) {
66139 + island = 3;
66140 + subgroup = group - 30;
66141 + } else if (40 <= group && group < 50) {
66142 + island = 4;
66143 + subgroup = group - 40;
66144 + } else if (50 <= group && group < 60) {
66145 + island = 5;
66146 + subgroup = group - 50;
66147 + } else if (60 <= group && group < 70) {
66148 + island = 6;
66149 + subgroup = group - 60;
66150 + } else if (70 <= group && group < 80) {
66151 + island = 7;
66152 + subgroup = group - 70;
66153 + } else if (80 <= group && group < 90) {
66154 + island = 8;
66155 + subgroup = group - 80;
66156 + }
66157 + } else if (200 <= group && group < 300) {
66158 + island = 2;
66159 + subgroup = group - 200;
66160 + } else if (600 <= group && group < 700) {
66161 + island = 6;
66162 + subgroup = 5;
66163 + subsubgroup = group - 650;
66164 + }
66165 + } else if (6000 <= group && group < 7000) {
66166 + island = 6;
66167 + subgroup = 5;
66168 + subsubgroup = group - 6500;
66169 + }
66170 +
66171 + switch (island) {
66172 + case 2:
66173 + return pm_translate_signal_group_number_on_island2(subgroup);
66174 + case 3:
66175 + return pm_translate_signal_group_number_on_island3(subgroup);
66176 + case 4:
66177 + return pm_translate_signal_group_number_on_island4(subgroup);
66178 + case 5:
66179 + return pm_translate_signal_group_number_on_island5(subgroup);
66180 + case 6:
66181 + return pm_translate_signal_group_number_on_island6(subgroup,
66182 + subsubgroup);
66183 + case 7:
66184 + return pm_translate_signal_group_number_on_island7(subgroup);
66185 + case 8:
66186 + return pm_translate_signal_group_number_on_island8(subgroup);
66187 + default:
66188 + dev_dbg(sbd_core(), "%s:%u: island not found: %lu\n", __func__,
66189 + __LINE__, group);
66190 + BUG();
66191 + break;
66192 + }
66193 + return 0;
66194 +}
66195 +
66196 +static u64 pm_bus_word_to_ps3_lv1_bus_word(u8 word)
66197 +{
66198 +
66199 + switch (word) {
66200 + case 1:
66201 + return 0xF000;
66202 + case 2:
66203 + return 0x0F00;
66204 + case 4:
66205 + return 0x00F0;
66206 + case 8:
66207 + default:
66208 + return 0x000F;
66209 + }
66210 +}
66211 +
66212 +static int __ps3_set_signal(u64 lv1_signal_group, u64 bus_select,
66213 + u64 signal_select, u64 attr1, u64 attr2, u64 attr3)
66214 +{
66215 + int ret;
66216 +
66217 + ret = lv1_set_lpm_signal(lpm_priv->lpm_id, lv1_signal_group, bus_select,
66218 + signal_select, attr1, attr2, attr3);
66219 + if (ret)
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);
66224 +
66225 + return ret;
66226 +}
66227 +
66228 +int ps3_set_signal(u64 signal_group, u8 signal_bit, u16 sub_unit,
66229 + u8 bus_word)
66230 +{
66231 + int ret;
66232 + u64 lv1_signal_group;
66233 + u64 bus_select;
66234 + u64 signal_select;
66235 + u64 attr1, attr2, attr3;
66236 +
66237 + if (signal_group == 0)
66238 + return __ps3_set_signal(0, 0, 0, 0, 0, 0);
66239 +
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);
66243 +
66244 + switch (signal_group) {
66245 + case PM_SIG_GROUP_SPU_TRIGGER:
66246 + signal_select = 1;
66247 + signal_select = signal_select << (63 - signal_bit);
66248 + break;
66249 + case PM_SIG_GROUP_SPU_EVENT:
66250 + signal_select = 1;
66251 + signal_select = (signal_select << (63 - signal_bit)) | 0x3;
66252 + break;
66253 + default:
66254 + signal_select = 0;
66255 + break;
66256 + }
66257 +
66258 + /*
66259 + * 0: physical object.
66260 + * 1: logical object.
66261 + * This parameter is only used for the PPE and SPE signals.
66262 + */
66263 + attr1 = 1;
66264 +
66265 + /*
66266 + * This parameter is used to specify the target physical/logical
66267 + * PPE/SPE object.
66268 + */
66269 + if (PM_SIG_GROUP_SPU <= signal_group &&
66270 + signal_group < PM_SIG_GROUP_MFC_MAX)
66271 + attr2 = sub_unit;
66272 + else
66273 + attr2 = lpm_priv->pu_id;
66274 +
66275 + /*
66276 + * This parameter is only used for setting the SPE signal.
66277 + */
66278 + attr3 = 0;
66279 +
66280 + ret = __ps3_set_signal(lv1_signal_group, bus_select, signal_select,
66281 + attr1, attr2, attr3);
66282 + if (ret)
66283 + dev_err(sbd_core(), "%s:%u: __ps3_set_signal failed: %d\n",
66284 + __func__, __LINE__, ret);
66285 +
66286 + return ret;
66287 +}
66288 +EXPORT_SYMBOL_GPL(ps3_set_signal);
66289 +
66290 +u32 ps3_get_hw_thread_id(int cpu)
66291 +{
66292 + return get_hard_smp_processor_id(cpu);
66293 +}
66294 +EXPORT_SYMBOL_GPL(ps3_get_hw_thread_id);
66295 +
66296 +/**
66297 + * ps3_enable_pm - Enable the entire performance monitoring unit.
66298 + *
66299 + * When we enable the LPM, all pending writes to counters get committed.
66300 + */
66301 +
66302 +void ps3_enable_pm(u32 cpu)
66303 +{
66304 + int result;
66305 + u64 tmp;
66306 + int insert_bookmark = 0;
66307 +
66308 + lpm_priv->tb_count = 0;
66309 +
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);
66320 +
66321 + if (result)
66322 + dev_err(sbd_core(), "%s:%u: "
66323 + "lv1_set_lpm_trigger_control failed: "
66324 + "%s\n", __func__, __LINE__,
66325 + ps3_result(result));
66326 +
66327 + insert_bookmark = !result;
66328 + }
66329 + }
66330 +
66331 + result = lv1_start_lpm(lpm_priv->lpm_id);
66332 +
66333 + if (result)
66334 + dev_err(sbd_core(), "%s:%u: lv1_start_lpm failed: %s\n",
66335 + __func__, __LINE__, ps3_result(result));
66336 +
66337 + if (use_start_stop_bookmark && !result && insert_bookmark)
66338 + ps3_set_bookmark(get_tb() | PS3_PM_BOOKMARK_START);
66339 +}
66340 +EXPORT_SYMBOL_GPL(ps3_enable_pm);
66341 +
66342 +/**
66343 + * ps3_disable_pm - Disable the entire performance monitoring unit.
66344 + */
66345 +
66346 +void ps3_disable_pm(u32 cpu)
66347 +{
66348 + int result;
66349 + u64 tmp;
66350 +
66351 + ps3_set_bookmark(get_tb() | PS3_PM_BOOKMARK_STOP);
66352 +
66353 + result = lv1_stop_lpm(lpm_priv->lpm_id, &tmp);
66354 +
66355 + if (result) {
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));
66359 + return;
66360 + }
66361 +
66362 + lpm_priv->tb_count = tmp;
66363 +
66364 + dev_dbg(sbd_core(), "%s:%u: tb_count %lu (%lxh)\n", __func__, __LINE__,
66365 + lpm_priv->tb_count, lpm_priv->tb_count);
66366 +}
66367 +EXPORT_SYMBOL_GPL(ps3_disable_pm);
66368 +
66369 +/**
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.
66376 + *
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.
66379 + */
66380 +
66381 +int ps3_lpm_copy_tb(unsigned long offset, void *buf, unsigned long count,
66382 + unsigned long *bytes_copied)
66383 +{
66384 + int result;
66385 +
66386 + *bytes_copied = 0;
66387 +
66388 + if (!lpm_priv->tb_cache)
66389 + return -EPERM;
66390 +
66391 + if (offset >= lpm_priv->tb_count)
66392 + return 0;
66393 +
66394 + count = min(count, lpm_priv->tb_count - offset);
66395 +
66396 + while (*bytes_copied < count) {
66397 + const unsigned long request = count - *bytes_copied;
66398 + u64 tmp;
66399 +
66400 + result = lv1_copy_lpm_trace_buffer(lpm_priv->lpm_id, offset,
66401 + request, &tmp);
66402 + if (result) {
66403 + dev_dbg(sbd_core(), "%s:%u: 0x%lx bytes at 0x%lx\n",
66404 + __func__, __LINE__, request, offset);
66405 +
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;
66410 + }
66411 +
66412 + memcpy(buf, lpm_priv->tb_cache, tmp);
66413 + buf += tmp;
66414 + *bytes_copied += tmp;
66415 + offset += tmp;
66416 + }
66417 + dev_dbg(sbd_core(), "%s:%u: copied %lxh bytes\n", __func__, __LINE__,
66418 + *bytes_copied);
66419 +
66420 + return 0;
66421 +}
66422 +EXPORT_SYMBOL_GPL(ps3_lpm_copy_tb);
66423 +
66424 +/**
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.
66431 + *
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.
66434 + */
66435 +
66436 +int ps3_lpm_copy_tb_to_user(unsigned long offset, void __user *buf,
66437 + unsigned long count, unsigned long *bytes_copied)
66438 +{
66439 + int result;
66440 +
66441 + *bytes_copied = 0;
66442 +
66443 + if (!lpm_priv->tb_cache)
66444 + return -EPERM;
66445 +
66446 + if (offset >= lpm_priv->tb_count)
66447 + return 0;
66448 +
66449 + count = min(count, lpm_priv->tb_count - offset);
66450 +
66451 + while (*bytes_copied < count) {
66452 + const unsigned long request = count - *bytes_copied;
66453 + u64 tmp;
66454 +
66455 + result = lv1_copy_lpm_trace_buffer(lpm_priv->lpm_id, offset,
66456 + request, &tmp);
66457 + if (result) {
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;
66464 + }
66465 +
66466 + result = copy_to_user(buf, lpm_priv->tb_cache, tmp);
66467 +
66468 + if (result) {
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);
66473 + return -EFAULT;
66474 + }
66475 +
66476 + buf += tmp;
66477 + *bytes_copied += tmp;
66478 + offset += tmp;
66479 + }
66480 + dev_dbg(sbd_core(), "%s:%u: copied %lxh bytes\n", __func__, __LINE__,
66481 + *bytes_copied);
66482 +
66483 + return 0;
66484 +}
66485 +EXPORT_SYMBOL_GPL(ps3_lpm_copy_tb_to_user);
66486 +
66487 +/**
66488 + * ps3_get_and_clear_pm_interrupts -
66489 + *
66490 + * Clearing interrupts for the entire performance monitoring unit.
66491 + * Reading pm_status clears the interrupt bits.
66492 + */
66493 +
66494 +u32 ps3_get_and_clear_pm_interrupts(u32 cpu)
66495 +{
66496 + return ps3_read_pm(cpu, pm_status);
66497 +}
66498 +EXPORT_SYMBOL_GPL(ps3_get_and_clear_pm_interrupts);
66499 +
66500 +/**
66501 + * ps3_enable_pm_interrupts -
66502 + *
66503 + * Enabling interrupts for the entire performance monitoring unit.
66504 + * Enables the interrupt bits in the pm_status register.
66505 + */
66506 +
66507 +void ps3_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask)
66508 +{
66509 + if (mask)
66510 + ps3_write_pm(cpu, pm_status, mask);
66511 +}
66512 +EXPORT_SYMBOL_GPL(ps3_enable_pm_interrupts);
66513 +
66514 +/**
66515 + * ps3_enable_pm_interrupts -
66516 + *
66517 + * Disabling interrupts for the entire performance monitoring unit.
66518 + */
66519 +
66520 +void ps3_disable_pm_interrupts(u32 cpu)
66521 +{
66522 + ps3_get_and_clear_pm_interrupts(cpu);
66523 + ps3_write_pm(cpu, pm_status, 0);
66524 +}
66525 +EXPORT_SYMBOL_GPL(ps3_disable_pm_interrupts);
66526 +
66527 +/**
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.
66536 + */
66537 +
66538 +int ps3_lpm_open(enum ps3_lpm_tb_type tb_type, void *tb_cache,
66539 + u64 tb_cache_size)
66540 +{
66541 + int result;
66542 + u64 tb_size;
66543 +
66544 + BUG_ON(!lpm_priv);
66545 + BUG_ON(tb_type != PS3_LPM_TB_TYPE_NONE
66546 + && tb_type != PS3_LPM_TB_TYPE_INTERNAL);
66547 +
66548 + if (tb_type == PS3_LPM_TB_TYPE_NONE && tb_cache)
66549 + dev_dbg(sbd_core(), "%s:%u: bad in vals\n", __func__, __LINE__);
66550 +
66551 + if (!atomic_add_unless(&lpm_priv->open, 1, 1)) {
66552 + dev_dbg(sbd_core(), "%s:%u: busy\n", __func__, __LINE__);
66553 + return -EBUSY;
66554 + }
66555 +
66556 + /* Note tb_cache needs 128 byte alignment. */
66557 +
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;
66568 + goto fail_align;
66569 + }
66570 + lpm_priv->tb_cache_size = tb_cache_size;
66571 + lpm_priv->tb_cache_internal = NULL;
66572 + lpm_priv->tb_cache = tb_cache;
66573 + } else {
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;
66582 + }
66583 + lpm_priv->tb_cache = (void *)_ALIGN_UP(
66584 + (unsigned long)lpm_priv->tb_cache_internal, 128);
66585 + }
66586 +
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);
66591 +
66592 + if (result) {
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;
66597 + }
66598 +
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;
66604 +
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);
66608 +
66609 + return 0;
66610 +
66611 +fail_construct:
66612 + kfree(lpm_priv->tb_cache_internal);
66613 + lpm_priv->tb_cache_internal = NULL;
66614 +fail_malloc:
66615 +fail_align:
66616 + atomic_dec(&lpm_priv->open);
66617 + return result;
66618 +}
66619 +EXPORT_SYMBOL_GPL(ps3_lpm_open);
66620 +
66621 +/**
66622 + * ps3_lpm_close - Close the lpm device.
66623 + *
66624 + */
66625 +
66626 +int ps3_lpm_close(void)
66627 +{
66628 + dev_dbg(sbd_core(), "%s:%u\n", __func__, __LINE__);
66629 +
66630 + lv1_destruct_lpm(lpm_priv->lpm_id);
66631 + lpm_priv->lpm_id = 0;
66632 +
66633 + kfree(lpm_priv->tb_cache_internal);
66634 + lpm_priv->tb_cache_internal = NULL;
66635 +
66636 + atomic_dec(&lpm_priv->open);
66637 + return 0;
66638 +}
66639 +EXPORT_SYMBOL_GPL(ps3_lpm_close);
66640 +
66641 +static int __devinit ps3_lpm_probe(struct ps3_system_bus_device *dev)
66642 +{
66643 + dev_dbg(&dev->core, " -> %s:%u\n", __func__, __LINE__);
66644 +
66645 + if (lpm_priv) {
66646 + dev_info(&dev->core, "%s:%u: called twice\n",
66647 + __func__, __LINE__);
66648 + return -EBUSY;
66649 + }
66650 +
66651 + lpm_priv = kzalloc(sizeof(*lpm_priv), GFP_KERNEL);
66652 +
66653 + if (!lpm_priv)
66654 + return -ENOMEM;
66655 +
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;
66660 +
66661 + dev_info(&dev->core, " <- %s:%u:\n", __func__, __LINE__);
66662 +
66663 + return 0;
66664 +}
66665 +
66666 +static int ps3_lpm_remove(struct ps3_system_bus_device *dev)
66667 +{
66668 + dev_dbg(&dev->core, " -> %s:%u:\n", __func__, __LINE__);
66669 +
66670 + ps3_lpm_close();
66671 +
66672 + kfree(lpm_priv);
66673 + lpm_priv = NULL;
66674 +
66675 + dev_info(&dev->core, " <- %s:%u:\n", __func__, __LINE__);
66676 + return 0;
66677 +}
66678 +
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,
66686 +};
66687 +
66688 +static int __init ps3_lpm_init(void)
66689 +{
66690 + pr_debug("%s:%d:\n", __func__, __LINE__);
66691 + return ps3_system_bus_driver_register(&ps3_lpm_driver);
66692 +}
66693 +
66694 +static void __exit ps3_lpm_exit(void)
66695 +{
66696 + pr_debug("%s:%d:\n", __func__, __LINE__);
66697 + ps3_system_bus_driver_unregister(&ps3_lpm_driver);
66698 +}
66699 +
66700 +module_init(ps3_lpm_init);
66701 +module_exit(ps3_lpm_exit);
66702 +
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);
66716 break;
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");
66722
66723 - if(result)
66724 + if (result)
66725 return result;
66726
66727 if (cmd.version != 1) {
66728 @@ -521,7 +521,7 @@
66729 result = ps3_vuart_read(dev, &header,
66730 sizeof(struct ps3_sys_manager_header));
66731
66732 - if(result)
66733 + if (result)
66734 return result;
66735
66736 if (header.version != 1) {
66737 @@ -589,9 +589,9 @@
66738 PS3_SM_WAKE_DEFAULT);
66739 ps3_sys_manager_send_request_shutdown(dev);
66740
66741 - printk(KERN_EMERG "System Halted, OK to turn off power\n");
66742 + pr_emerg("System Halted, OK to turn off power\n");
66743
66744 - while(1)
66745 + while (1)
66746 ps3_sys_manager_handle_msg(dev);
66747 }
66748
66749 @@ -626,9 +626,9 @@
66750 PS3_SM_WAKE_DEFAULT);
66751 ps3_sys_manager_send_request_shutdown(dev);
66752
66753 - printk(KERN_EMERG "System Halted, OK to turn off power\n");
66754 + pr_emerg("System Halted, OK to turn off power\n");
66755
66756 - while(1)
66757 + while (1)
66758 ps3_sys_manager_handle_msg(dev);
66759 }
66760
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 @@
66765 struct ports_bmp {
66766 u64 status;
66767 u64 unused[3];
66768 -} __attribute__ ((aligned (32)));
66769 +} __attribute__((aligned(32)));
66770
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)
66775 {
66776 pr_debug("%s:%d: ports_bmp: %016lxh\n", func, line, bmp->status);
66777 }
66778
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)
66783 {
66784 #if defined(DEBUG)
66785 static const char *strings[] = {
66786 @@ -363,7 +363,7 @@
66787 */
66788
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)
66792 {
66793 int result;
66794 struct ps3_vuart_port_priv *priv = to_port_priv(dev);
66795 @@ -431,7 +431,7 @@
66796 int result;
66797 struct ps3_vuart_port_priv *priv = to_port_priv(dev);
66798 u64 bytes_waiting;
66799 - void* tmp;
66800 + void *tmp;
66801
66802 result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes_waiting);
66803
66804 @@ -526,9 +526,8 @@
66805
66806 lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_KERNEL);
66807
66808 - if (!lb) {
66809 + if (!lb)
66810 return -ENOMEM;
66811 - }
66812
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;
66818 unsigned int virq;
66819 - struct semaphore probe_mutex;
66820 + struct mutex probe_mutex;
66821 int use_count;
66822 struct ps3_system_bus_device *devices[PORT_COUNT];
66823 } static vuart_bus_priv;
66824 @@ -926,9 +925,8 @@
66825
66826 BUG_ON(vuart_bus_priv.use_count > 2);
66827
66828 - if (vuart_bus_priv.use_count != 1) {
66829 + if (vuart_bus_priv.use_count != 1)
66830 return 0;
66831 - }
66832
66833 BUG_ON(vuart_bus_priv.bmp);
66834
66835 @@ -1017,7 +1015,7 @@
66836 return -EINVAL;
66837 }
66838
66839 - down(&vuart_bus_priv.probe_mutex);
66840 + mutex_lock(&vuart_bus_priv.probe_mutex);
66841
66842 result = ps3_vuart_bus_interrupt_get();
66843
66844 @@ -1077,7 +1075,7 @@
66845 goto fail_probe;
66846 }
66847
66848 - up(&vuart_bus_priv.probe_mutex);
66849 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66850
66851 return result;
66852
66853 @@ -1090,7 +1088,7 @@
66854 fail_busy:
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__);
66860 return result;
66861 }
66862 @@ -1129,7 +1127,7 @@
66863
66864 BUG_ON(!dev);
66865
66866 - down(&vuart_bus_priv.probe_mutex);
66867 + mutex_lock(&vuart_bus_priv.probe_mutex);
66868
66869 dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__,
66870 dev->match_id);
66871 @@ -1137,7 +1135,7 @@
66872 if (!dev->core.driver) {
66873 dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__,
66874 __LINE__);
66875 - up(&vuart_bus_priv.probe_mutex);
66876 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66877 return 0;
66878 }
66879
66880 @@ -1160,7 +1158,7 @@
66881 priv = NULL;
66882
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);
66886 return 0;
66887 }
66888
66889 @@ -1180,7 +1178,7 @@
66890
66891 BUG_ON(!dev);
66892
66893 - down(&vuart_bus_priv.probe_mutex);
66894 + mutex_lock(&vuart_bus_priv.probe_mutex);
66895
66896 dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__,
66897 dev->match_id);
66898 @@ -1188,7 +1186,7 @@
66899 if (!dev->core.driver) {
66900 dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__,
66901 __LINE__);
66902 - up(&vuart_bus_priv.probe_mutex);
66903 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66904 return 0;
66905 }
66906
66907 @@ -1212,7 +1210,7 @@
66908
66909 dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);
66910
66911 - up(&vuart_bus_priv.probe_mutex);
66912 + mutex_unlock(&vuart_bus_priv.probe_mutex);
66913 return 0;
66914 }
66915
66916 @@ -1223,7 +1221,7 @@
66917 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
66918 return -ENODEV;
66919
66920 - init_MUTEX(&vuart_bus_priv.probe_mutex);
66921 + mutex_init(&vuart_bus_priv.probe_mutex);
66922
66923 return 0;
66924 }
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.
66931
66932 +config SERIAL_QE
66933 + tristate "Freescale QUICC Engine serial port support"
66934 + depends on QUICC_ENGINE
66935 + select SERIAL_CORE
66936 + select FW_LOADER
66937 + default n
66938 + help
66939 + This driver supports the QE serial ports on Freescale embedded
66940 + PowerPC that contain a QUICC Engine.
66941 +
66942 endmenu
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
66946 @@ -64,3 +64,4 @@
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
66954 @@ -52,11 +52,7 @@
66955 #ifdef CONFIG_PPC_CPM_NEW_BINDING
66956 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
66957 {
66958 - u16 __iomem *cpcr = &cpmp->cp_cpcr;
66959 -
66960 - out_be16(cpcr, port->command | (cmd << 8) | CPM_CR_FLG);
66961 - while (in_be16(cpcr) & CPM_CR_FLG)
66962 - ;
66963 + cpm_command(port->command, cmd);
66964 }
66965 #else
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
66970 @@ -52,13 +52,7 @@
66971 #ifdef CONFIG_PPC_CPM_NEW_BINDING
66972 void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
66973 {
66974 - cpm_cpm2_t __iomem *cp = cpm2_map(im_cpm);
66975 -
66976 - out_be32(&cp->cp_cpcr, port->command | cmd | CPM_CR_FLG);
66977 - while (in_be32(&cp->cp_cpcr) & CPM_CR_FLG)
66978 - ;
66979 -
66980 - cpm2_unmap(cp);
66981 + cpm_command(port->command, cmd);
66982 }
66983 #else
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.
66988 */
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);
66993
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
66999 @@ -36,7 +36,7 @@
67000 * DCD. However, the pin multiplexing aren't changed and should be set either
67001 * by the bootloader or in the platform init code.
67002 *
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>
67011
67012 -#include <asm/delay.h>
67013 -#include <asm/io.h>
67014 +#include <linux/delay.h>
67015 +#include <linux/io.h>
67016
67017 #if defined(CONFIG_PPC_MERGE)
67018 -#include <asm/of_platform.h>
67019 +#include <linux/of.h>
67020 +#include <linux/of_platform.h>
67021 #else
67022 #include <linux/platform_device.h>
67023 #endif
67024 @@ -111,16 +112,18 @@
67025 #endif
67026
67027 #define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase))
67028 +#define FIFO(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1))
67029
67030
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);
67034
67035
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)
67042 #else
67043 #define uart_console(port) (0)
67044 #endif
67045 @@ -162,7 +165,7 @@
67046 {
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);
67051 }
67052
67053 static void
67054 @@ -170,7 +173,7 @@
67055 {
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);
67060 }
67061
67062 static void
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);
67069 }
67070
67071 spin_unlock_irqrestore(&port->lock, flags);
67072 @@ -195,7 +198,7 @@
67073 {
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);
67078 }
67079
67080 static void
67081 @@ -210,10 +213,10 @@
67082 unsigned long flags;
67083 spin_lock_irqsave(&port->lock, flags);
67084
67085 - if ( ctl == -1 )
67086 - out_8(&PSC(port)->command,MPC52xx_PSC_START_BRK);
67087 + if (ctl == -1)
67088 + out_8(&PSC(port)->command, MPC52xx_PSC_START_BRK);
67089 else
67090 - out_8(&PSC(port)->command,MPC52xx_PSC_STOP_BRK);
67091 + out_8(&PSC(port)->command, MPC52xx_PSC_STOP_BRK);
67092
67093 spin_unlock_irqrestore(&port->lock, flags);
67094 }
67095 @@ -222,6 +225,7 @@
67096 mpc52xx_uart_startup(struct uart_port *port)
67097 {
67098 struct mpc52xx_psc __iomem *psc = PSC(port);
67099 + struct mpc52xx_psc_fifo __iomem *fifo = FIFO(port);
67100 int ret;
67101
67102 /* Request IRQ */
67103 @@ -231,23 +235,23 @@
67104 return ret;
67105
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);
67111
67112 - out_be32(&psc->sicr,0); /* UART mode DCD ignored */
67113 + out_be32(&psc->sicr, 0); /* UART mode DCD ignored */
67114
67115 out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00); /* /16 prescaler on */
67116
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);
67125
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);
67129
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);
67134
67135 return 0;
67136 }
67137 @@ -258,12 +262,12 @@
67138 struct mpc52xx_psc __iomem *psc = PSC(port);
67139
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);
67146
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);
67150
67151 /* Release interrupt */
67152 free_irq(port->irq, port);
67153 @@ -271,7 +275,7 @@
67154
67155 static void
67156 mpc52xx_uart_set_termios(struct uart_port *port, struct ktermios *new,
67157 - struct ktermios *old)
67158 + struct ktermios *old)
67159 {
67160 struct mpc52xx_psc __iomem *psc = PSC(port);
67161 unsigned long flags;
67162 @@ -283,14 +287,14 @@
67163 mr1 = 0;
67164
67165 switch (new->c_cflag & CSIZE) {
67166 - case CS5: mr1 |= MPC52xx_PSC_MODE_5_BITS;
67167 - break;
67168 - case CS6: mr1 |= MPC52xx_PSC_MODE_6_BITS;
67169 - break;
67170 - case CS7: mr1 |= MPC52xx_PSC_MODE_7_BITS;
67171 - break;
67172 - case CS8:
67173 - default: mr1 |= MPC52xx_PSC_MODE_8_BITS;
67174 + case CS5: mr1 |= MPC52xx_PSC_MODE_5_BITS;
67175 + break;
67176 + case CS6: mr1 |= MPC52xx_PSC_MODE_6_BITS;
67177 + break;
67178 + case CS7: mr1 |= MPC52xx_PSC_MODE_7_BITS;
67179 + break;
67180 + case CS8:
67181 + default: mr1 |= MPC52xx_PSC_MODE_8_BITS;
67182 }
67183
67184 if (new->c_cflag & PARENB) {
67185 @@ -332,24 +336,24 @@
67186 udelay(1);
67187
67188 if (!j)
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");
67194
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);
67200
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);
67212
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);
67218
67219 /* We're all set, release the lock */
67220 spin_unlock_irqrestore(&port->lock, flags);
67221 @@ -364,7 +368,8 @@
67222 static void
67223 mpc52xx_uart_release_port(struct uart_port *port)
67224 {
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;
67230 }
67231 @@ -379,7 +384,7 @@
67232
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));
67237
67238 if (!port->membase)
67239 return -EINVAL;
67240 @@ -398,22 +403,22 @@
67241 static void
67242 mpc52xx_uart_config_port(struct uart_port *port, int flags)
67243 {
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;
67250 }
67251
67252 static int
67253 mpc52xx_uart_verify_port(struct uart_port *port, struct serial_struct *ser)
67254 {
67255 - if ( ser->type != PORT_UNKNOWN && ser->type != PORT_MPC52xx )
67256 + if (ser->type != PORT_UNKNOWN && ser->type != PORT_MPC52xx)
67257 return -EINVAL;
67258
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))
67269 return -EINVAL;
67270
67271 return 0;
67272 @@ -455,8 +460,8 @@
67273 unsigned short status;
67274
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) {
67280
67281 /* Get the char */
67282 ch = in_8(&PSC(port)->mpc52xx_psc_buffer_8);
67283 @@ -474,9 +479,9 @@
67284 flag = TTY_NORMAL;
67285 port->icount.rx++;
67286
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)) {
67293
67294 if (status & MPC52xx_PSC_SR_RB) {
67295 flag = TTY_BREAK;
67296 @@ -487,7 +492,7 @@
67297 flag = TTY_FRAME;
67298
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);
67302
67303 }
67304 tty_insert_flip_char(tty, ch, flag);
67305 @@ -568,16 +573,16 @@
67306
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);
67312
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);
67318
67319 /* Limit number of iteration */
67320 - if ( !(--pass) )
67321 + if (!(--pass))
67322 keepgoing = 0;
67323
67324 } while (keepgoing);
67325 @@ -596,7 +601,7 @@
67326
67327 static void __init
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)
67331 {
67332 struct mpc52xx_psc __iomem *psc = PSC(port);
67333 unsigned char mr1;
67334 @@ -604,7 +609,7 @@
67335 pr_debug("mpc52xx_console_get_options(port=%p)\n", port);
67336
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);
67341
67342 /* CT{U,L}R are write-only ! */
67343 @@ -616,11 +621,18 @@
67344
67345 /* Parse them */
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:
67353 + *bits = 5;
67354 + break;
67355 + case MPC52xx_PSC_MODE_6_BITS:
67356 + *bits = 6;
67357 + break;
67358 + case MPC52xx_PSC_MODE_7_BITS:
67359 + *bits = 7;
67360 + break;
67361 + case MPC52xx_PSC_MODE_8_BITS:
67362 + default:
67363 + *bits = 8;
67364 }
67365
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)
67373 udelay(1);
67374 }
67375
67376 @@ -730,16 +742,18 @@
67377 }
67378
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);
67382
67383 /* Fetch register locations */
67384 - if ((ret = of_address_to_resource(np, 0, &res)) != 0) {
67385 + ret = of_address_to_resource(np, 0, &res);
67386 + if (ret) {
67387 pr_debug("Could not get resources for PSC%x\n", co->index);
67388 return ret;
67389 }
67390
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");
67396 return -EINVAL;
67397 }
67398 @@ -757,7 +771,8 @@
67399 return -EINVAL;
67400
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);
67405
67406 /* Setup the port parameters accoding to options */
67407 if (options)
67408 @@ -766,7 +781,7 @@
67409 mpc52xx_console_get_options(port, &baud, &parity, &bits, &flow);
67410
67411 pr_debug("Setting console parameters: %i %i%c1 flow=%c\n",
67412 - baud, bits, parity, flow);
67413 + baud, bits, parity, flow);
67414
67415 return uart_set_options(port, co, baud, parity, bits, flow);
67416 }
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,
67424 };
67425
67426 @@ -809,7 +824,6 @@
67427 /* ======================================================================== */
67428
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)
67436 return -EINVAL;
67437
67438 - if (!mpc52xx_match_psc_function(idx,"uart"))
67439 + if (!mpc52xx_match_psc_function(idx, "uart"))
67440 return -ENODEV;
67441
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);
67449 port->line = idx;
67450 port->ops = &mpc52xx_uart_ops;
67451 port->dev = &dev->dev;
67452
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);
67462 if (!ret)
67463 - platform_set_drvdata(dev, (void*)port);
67464 + platform_set_drvdata(dev, (void *)port);
67465
67466 return ret;
67467 }
67468 @@ -917,6 +931,7 @@
67469 .resume = mpc52xx_uart_resume,
67470 #endif
67471 .driver = {
67472 + .owner = THIS_MODULE,
67473 .name = "mpc52xx-psc",
67474 },
67475 };
67476 @@ -946,10 +961,11 @@
67477 if (idx >= MPC52xx_PSC_MAXNUM)
67478 return -EINVAL;
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);
67482
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");
67488 return -EINVAL;
67489 }
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);
67496 port->line = idx;
67497 port->ops = &mpc52xx_uart_ops;
67498 port->dev = &op->dev;
67499
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);
67503 + if (ret)
67504 return ret;
67505
67506 port->mapbase = res.start;
67507 port->irq = irq_of_parse_and_map(op->node, 0);
67508
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);
67512
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");
67516 return -EINVAL;
67517 }
67518 @@ -985,7 +1002,7 @@
67519 /* Add the port to the uart sub-system */
67520 ret = uart_add_one_port(&mpc52xx_uart_driver, port);
67521 if (!ret)
67522 - dev_set_drvdata(&op->dev, (void*)port);
67523 + dev_set_drvdata(&op->dev, (void *)port);
67524
67525 return ret;
67526 }
67527 @@ -1048,6 +1065,7 @@
67528 if (idx < 0)
67529 return; /* No free slot; abort */
67530
67531 + of_node_get(np);
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 @@
67536 static void
67537 mpc52xx_uart_of_enumerate(void)
67538 {
67539 - static int enum_done = 0;
67540 + static int enum_done;
67541 struct device_node *np;
67542 const unsigned int *devno;
67543 int i;
67544 @@ -1071,7 +1089,7 @@
67545
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);
67550 }
67551
67552 enum_done = 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);
67559 }
67560 }
67561
67562 MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match);
67563
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 @@
67571
67572 printk(KERN_INFO "Serial: MPC52xx PSC UART driver\n");
67573
67574 - if ((ret = uart_register_driver(&mpc52xx_uart_driver)) != 0) {
67575 + ret = uart_register_driver(&mpc52xx_uart_driver);
67576 + if (ret) {
67577 printk(KERN_ERR "%s: uart_register_driver failed (%i)\n",
67578 __FILE__, ret);
67579 return ret;
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 @@
67584 *
67585 * @dev: pointer to device structure
67586 */
67587 -static int __devinit ulite_release(struct device *dev)
67588 +static int __devexit ulite_release(struct device *dev)
67589 {
67590 struct uart_port *port = dev_get_drvdata(dev);
67591 int rc = 0;
67592 @@ -572,14 +572,14 @@
67593 return ulite_assign(&pdev->dev, pdev->id, res->start, res2->start);
67594 }
67595
67596 -static int ulite_remove(struct platform_device *pdev)
67597 +static int __devexit ulite_remove(struct platform_device *pdev)
67598 {
67599 return ulite_release(&pdev->dev);
67600 }
67601
67602 static struct platform_driver ulite_platform_driver = {
67603 .probe = ulite_probe,
67604 - .remove = ulite_remove,
67605 + .remove = __devexit_p(ulite_remove),
67606 .driver = {
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
67612 @@ -0,0 +1,1514 @@
67613 +/*
67614 + * Freescale QUICC Engine UART device driver
67615 + *
67616 + * Author: Timur Tabi <timur@freescale.com>
67617 + *
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
67621 + * or implied.
67622 + *
67623 + * This driver adds support for UART devices via Freescale's QUICC Engine
67624 + * found on some Freescale SOCs.
67625 + *
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).
67631 + */
67632 +
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>
67639 +
67640 +#include <linux/fs_uart_pd.h>
67641 +#include <asm/ucc_slow.h>
67642 +
67643 +#include <linux/firmware.h>
67644 +#include <asm/reg.h>
67645 +
67646 +/*
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
67649 + * this file.
67650 + */
67651 +#define UCC_SLOW_GUMR_H_SUART 0x00004000 /* Soft-UART */
67652 +
67653 +/*
67654 + * soft_uart is 1 if we need to use Soft-UART mode
67655 + */
67656 +static int soft_uart;
67657 +/*
67658 + * firmware_loaded is 1 if the firmware has been loaded, 0 otherwise.
67659 + */
67660 +static int firmware_loaded;
67661 +
67662 +/* Enable this macro to configure all serial ports in internal loopback
67663 + mode */
67664 +/* #define LOOPBACK */
67665 +
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.
67671 + */
67672 +#define SERIAL_QE_MAJOR 204
67673 +#define SERIAL_QE_MINOR 46
67674 +
67675 +/* Since we only have minor numbers 46 - 49, there is a hard limit of 4 ports */
67676 +#define UCC_MAX_UART 4
67677 +
67678 +/* The number of buffer descriptors for receiving characters. */
67679 +#define RX_NUM_FIFO 4
67680 +
67681 +/* The number of buffer descriptors for transmitting characters. */
67682 +#define TX_NUM_FIFO 4
67683 +
67684 +/* The maximum size of the character buffer for a single RX BD. */
67685 +#define RX_BUF_SIZE 32
67686 +
67687 +/* The maximum size of the character buffer for a single TX BD. */
67688 +#define TX_BUF_SIZE 32
67689 +
67690 +/*
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.
67694 + */
67695 +#define UCC_WAIT_CLOSING 100
67696 +
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));
67746 +
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
67770 +
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
67775 +
67776 +#define UCC_UART_PRAM_ALIGNMENT 0x100
67777 +
67778 +#define UCC_UART_SIZE_OF_BD UCC_SLOW_SIZE_OF_BD
67779 +#define NUM_CONTROL_CHARS 8
67780 +
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 */
67790 +
67791 + u16 rx_nrfifos;
67792 + u16 rx_fifosize;
67793 + u16 tx_nrfifos;
67794 + u16 tx_fifosize;
67795 + int wait_closing;
67796 + u32 flags;
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 */
67806 +};
67807 +
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,
67815 +};
67816 +
67817 +/*
67818 + * Virtual to physical address translation.
67819 + *
67820 + * Given the virtual address for a character buffer, this function returns
67821 + * the physical (DMA) equivalent.
67822 + */
67823 +static inline dma_addr_t cpu2qe_addr(void *addr, struct uart_qe_port *qe_port)
67824 +{
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);
67828 +
67829 + /* something nasty happened */
67830 + printk(KERN_ERR "%s: addr=%p\n", __FUNCTION__, addr);
67831 + BUG();
67832 + return 0;
67833 +}
67834 +
67835 +/*
67836 + * Physical to virtual address translation.
67837 + *
67838 + * Given the physical (DMA) address for a character buffer, this function
67839 + * returns the virtual equivalent.
67840 + */
67841 +static inline void *qe2cpu_addr(dma_addr_t addr, struct uart_qe_port *qe_port)
67842 +{
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);
67847 +
67848 + /* something nasty happened */
67849 + printk(KERN_ERR "%s: addr=%x\n", __FUNCTION__, addr);
67850 + BUG();
67851 + return NULL;
67852 +}
67853 +
67854 +/*
67855 + * Return 1 if the QE is done transmitting all buffers for this port
67856 + *
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.
67861 + */
67862 +static unsigned int qe_uart_tx_empty(struct uart_port *port)
67863 +{
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;
67867 +
67868 + while (1) {
67869 + if (in_be16(&bdp->status) & BD_SC_READY)
67870 + /* This BD is not done, so return "not done" */
67871 + return 0;
67872 +
67873 + if (in_be16(&bdp->status) & BD_SC_WRAP)
67874 + /*
67875 + * This BD is done and it's the last one, so return
67876 + * "done"
67877 + */
67878 + return 1;
67879 +
67880 + bdp++;
67881 + };
67882 +}
67883 +
67884 +/*
67885 + * Set the modem control lines
67886 + *
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.
67890 + */
67891 +void qe_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
67892 +{
67893 +}
67894 +
67895 +/*
67896 + * Get the current modem control line status
67897 + *
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.
67901 + */
67902 +static unsigned int qe_uart_get_mctrl(struct uart_port *port)
67903 +{
67904 + return TIOCM_CAR | TIOCM_DSR | TIOCM_CTS;
67905 +}
67906 +
67907 +/*
67908 + * Disable the transmit interrupt.
67909 + *
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.
67913 + */
67914 +static void qe_uart_stop_tx(struct uart_port *port)
67915 +{
67916 + struct uart_qe_port *qe_port =
67917 + container_of(port, struct uart_qe_port, port);
67918 +
67919 + clrbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_TX);
67920 +}
67921 +
67922 +/*
67923 + * Transmit as many characters to the HW as possible.
67924 + *
67925 + * This function will attempt to stuff of all the characters from the
67926 + * kernel's transmit buffer into TX BDs.
67927 + *
67928 + * A return value of non-zero indicates that it sucessfully stuffed all
67929 + * characters from the kernel buffer.
67930 + *
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
67934 + * available.
67935 + */
67936 +static int qe_uart_tx_pump(struct uart_qe_port *qe_port)
67937 +{
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;
67943 +
67944 + bdp = qe_port->rx_cur;
67945 +
67946 + /* Handle xon/xoff */
67947 + if (port->x_char) {
67948 + /* Pick next descriptor and fill from buffer */
67949 + bdp = qe_port->tx_cur;
67950 +
67951 + p = qe2cpu_addr(bdp->buf, qe_port);
67952 +
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;
67959 + else
67960 + bdp++;
67961 + qe_port->tx_cur = bdp;
67962 +
67963 + port->icount.tx++;
67964 + port->x_char = 0;
67965 + return 1;
67966 + }
67967 +
67968 + if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
67969 + qe_uart_stop_tx(port);
67970 + return 0;
67971 + }
67972 +
67973 + /* Pick next descriptor and fill from buffer */
67974 + bdp = qe_port->tx_cur;
67975 +
67976 + while (!(in_be16(&bdp->status) & BD_SC_READY) &&
67977 + (xmit->tail != xmit->head)) {
67978 + count = 0;
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++;
67984 + count++;
67985 + if (xmit->head == xmit->tail)
67986 + break;
67987 + }
67988 +
67989 + out_be16(&bdp->length, count);
67990 + setbits16(&bdp->status, BD_SC_READY);
67991 +
67992 + /* Get next BD. */
67993 + if (in_be16(&bdp->status) & BD_SC_WRAP)
67994 + bdp = qe_port->tx_bd_base;
67995 + else
67996 + bdp++;
67997 + }
67998 + qe_port->tx_cur = bdp;
67999 +
68000 + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
68001 + uart_write_wakeup(port);
68002 +
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
68006 + the data. */
68007 + qe_uart_stop_tx(port);
68008 + return 0;
68009 + }
68010 +
68011 + return 1;
68012 +}
68013 +
68014 +/*
68015 + * Start transmitting data
68016 + *
68017 + * This function will start transmitting any available data, if the port
68018 + * isn't already transmitting data.
68019 + */
68020 +static void qe_uart_start_tx(struct uart_port *port)
68021 +{
68022 + struct uart_qe_port *qe_port =
68023 + container_of(port, struct uart_qe_port, port);
68024 +
68025 + /* If we currently are transmitting, then just return */
68026 + if (in_be16(&qe_port->uccp->uccm) & UCC_UART_UCCE_TX)
68027 + return;
68028 +
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);
68032 +}
68033 +
68034 +/*
68035 + * Stop transmitting data
68036 + */
68037 +static void qe_uart_stop_rx(struct uart_port *port)
68038 +{
68039 + struct uart_qe_port *qe_port =
68040 + container_of(port, struct uart_qe_port, port);
68041 +
68042 + clrbits16(&qe_port->uccp->uccm, UCC_UART_UCCE_RX);
68043 +}
68044 +
68045 +/*
68046 + * Enable status change interrupts
68047 + *
68048 + * We don't support status change interrupts, but we need to define this
68049 + * function otherwise the kernel will panic.
68050 + */
68051 +static void qe_uart_enable_ms(struct uart_port *port)
68052 +{
68053 +}
68054 +
68055 +/* Start or stop sending break signal
68056 + *
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.
68060 + */
68061 +static void qe_uart_break_ctl(struct uart_port *port, int break_state)
68062 +{
68063 + struct uart_qe_port *qe_port =
68064 + container_of(port, struct uart_qe_port, port);
68065 +
68066 + if (break_state)
68067 + ucc_slow_stop_tx(qe_port->us_private);
68068 + else
68069 + ucc_slow_restart_tx(qe_port->us_private);
68070 +}
68071 +
68072 +/* ISR helper function for receiving character.
68073 + *
68074 + * This function is called by the ISR to handling receiving characters
68075 + */
68076 +static void qe_uart_int_rx(struct uart_qe_port *qe_port)
68077 +{
68078 + int i;
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;
68083 + u16 status;
68084 + unsigned int flg;
68085 +
68086 + /* Just loop through the closed BDs and copy the characters into
68087 + * the buffer.
68088 + */
68089 + bdp = qe_port->rx_cur;
68090 + while (1) {
68091 + status = in_be16(&bdp->status);
68092 +
68093 + /* If this one is empty, then we assume we've read them all */
68094 + if (status & BD_SC_EMPTY)
68095 + break;
68096 +
68097 + /* get number of characters, and check space in RX buffer */
68098 + i = in_be16(&bdp->length);
68099 +
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.
68102 + */
68103 + if (tty_buffer_request_room(tty, i) < i) {
68104 + dev_dbg(port->dev, "ucc-uart: no room in RX buffer\n");
68105 + return;
68106 + }
68107 +
68108 + /* get pointer */
68109 + cp = qe2cpu_addr(bdp->buf, qe_port);
68110 +
68111 + /* loop through the buffer */
68112 + while (i-- > 0) {
68113 + ch = *cp++;
68114 + port->icount.rx++;
68115 + flg = TTY_NORMAL;
68116 +
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))
68121 + continue;
68122 +
68123 +error_return:
68124 + tty_insert_flip_char(tty, ch, flg);
68125 +
68126 + }
68127 +
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;
68133 + else
68134 + bdp++;
68135 +
68136 + }
68137 +
68138 + /* Write back buffer pointer */
68139 + qe_port->rx_cur = bdp;
68140 +
68141 + /* Activate BH processing */
68142 + tty_flip_buffer_push(tty);
68143 +
68144 + return;
68145 +
68146 + /* Error processing */
68147 +
68148 +handle_error:
68149 + /* Statistics */
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++;
68158 +
68159 + /* Mask out ignored conditions */
68160 + status &= port->read_status_mask;
68161 +
68162 + /* Handle the remaining ones */
68163 + if (status & BD_SC_BR)
68164 + flg = TTY_BREAK;
68165 + else if (status & BD_SC_PR)
68166 + flg = TTY_PARITY;
68167 + else if (status & BD_SC_FR)
68168 + flg = TTY_FRAME;
68169 +
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
68174 + port->sysrq = 0;
68175 +#endif
68176 + goto error_return;
68177 +}
68178 +
68179 +/* Interrupt handler
68180 + *
68181 + * This interrupt handler is called after a BD is processed.
68182 + */
68183 +static irqreturn_t qe_uart_int(int irq, void *data)
68184 +{
68185 + struct uart_qe_port *qe_port = (struct uart_qe_port *) data;
68186 + struct ucc_slow __iomem *uccp = qe_port->uccp;
68187 + u16 events;
68188 +
68189 + /* Clear the interrupts */
68190 + events = in_be16(&uccp->ucce);
68191 + out_be16(&uccp->ucce, events);
68192 +
68193 + if (events & UCC_UART_UCCE_BRKE)
68194 + uart_handle_break(&qe_port->port);
68195 +
68196 + if (events & UCC_UART_UCCE_RX)
68197 + qe_uart_int_rx(qe_port);
68198 +
68199 + if (events & UCC_UART_UCCE_TX)
68200 + qe_uart_tx_pump(qe_port);
68201 +
68202 + return events ? IRQ_HANDLED : IRQ_NONE;
68203 +}
68204 +
68205 +/* Initialize buffer descriptors
68206 + *
68207 + * This function initializes all of the RX and TX buffer descriptors.
68208 + */
68209 +static void qe_uart_initbd(struct uart_qe_port *qe_port)
68210 +{
68211 + int i;
68212 + void *bd_virt;
68213 + struct qe_bd *bdp;
68214 +
68215 + /* Set the physical address of the host memory buffers in the buffer
68216 + * descriptors, and the virtual address for us to work with.
68217 + */
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;
68226 + bdp++;
68227 + }
68228 +
68229 + /* */
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);
68233 +
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.
68237 + */
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;
68247 + bdp++;
68248 + }
68249 +
68250 + /* Loopback requires the preamble bit to be set on the first TX BD */
68251 +#ifdef LOOPBACK
68252 + setbits16(&qe_port->tx_cur->status, BD_SC_P);
68253 +#endif
68254 +
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);
68258 +}
68259 +
68260 +/*
68261 + * Initialize a UCC for UART.
68262 + *
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.
68266 + */
68267 +static void qe_uart_init_ucc(struct uart_qe_port *qe_port)
68268 +{
68269 + u32 cecr_subblock;
68270 + struct ucc_slow __iomem *uccp = qe_port->uccp;
68271 + struct ucc_uart_pram *uccup = qe_port->uccup;
68272 +
68273 + unsigned int i;
68274 +
68275 + /* First, disable TX and RX in the UCC */
68276 + ucc_slow_disable(qe_port->us_private, COMM_DIR_RX_AND_TX);
68277 +
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);
68294 +
68295 + /* Configure the GUMR registers for UART */
68296 + if (soft_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);
68303 + else
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);
68309 +
68310 + clrsetbits_be32(&uccp->gumr_h, UCC_SLOW_GUMR_H_RFW,
68311 + UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX);
68312 +
68313 +#ifdef LOOPBACK
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);
68319 +#endif
68320 +
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);
68325 +
68326 + /* Initialize UPSMR */
68327 + out_be16(&uccp->upsmr, 0);
68328 +
68329 + if (soft_uart) {
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);
68346 +
68347 + /* Set UART mode.
68348 + * Enable receive and transmit.
68349 + */
68350 +
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)
68356 + * ...
68357 + * 6.Receiver must use 16x over sampling
68358 + */
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);
68364 +
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);
68369 +
68370 +#ifdef LOOPBACK
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);
68375 +#endif
68376 +
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);
68380 + }
68381 +}
68382 +
68383 +/*
68384 + * Initialize the port.
68385 + */
68386 +static int qe_uart_startup(struct uart_port *port)
68387 +{
68388 + struct uart_qe_port *qe_port =
68389 + container_of(port, struct uart_qe_port, port);
68390 + int ret;
68391 +
68392 + /*
68393 + * If we're using Soft-UART mode, then we need to make sure the
68394 + * firmware has been uploaded first.
68395 + */
68396 + if (soft_uart && !firmware_loaded) {
68397 + dev_err(port->dev, "Soft-UART firmware not uploaded\n");
68398 + return -ENODEV;
68399 + }
68400 +
68401 + qe_uart_initbd(qe_port);
68402 + qe_uart_init_ucc(qe_port);
68403 +
68404 + /* Install interrupt handler. */
68405 + ret = request_irq(port->irq, qe_uart_int, IRQF_SHARED, "ucc-uart",
68406 + qe_port);
68407 + if (ret) {
68408 + dev_err(port->dev, "could not claim IRQ %u\n", port->irq);
68409 + return ret;
68410 + }
68411 +
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);
68415 +
68416 + return 0;
68417 +}
68418 +
68419 +/*
68420 + * Shutdown the port.
68421 + */
68422 +static void qe_uart_shutdown(struct uart_port *port)
68423 +{
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;
68428 +
68429 + /* Disable RX and TX */
68430 +
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");
68435 + break;
68436 + }
68437 + set_current_state(TASK_UNINTERRUPTIBLE);
68438 + schedule_timeout(2);
68439 + }
68440 +
68441 + if (qe_port->wait_closing) {
68442 + /* Wait a bit longer */
68443 + set_current_state(TASK_UNINTERRUPTIBLE);
68444 + schedule_timeout(qe_port->wait_closing);
68445 + }
68446 +
68447 + /* Stop uarts */
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);
68450 +
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);
68454 +
68455 + free_irq(port->irq, qe_port);
68456 +}
68457 +
68458 +/*
68459 + * Set the serial port parameters.
68460 + */
68461 +static void qe_uart_set_termios(struct uart_port *port,
68462 + struct ktermios *termios, struct ktermios *old)
68463 +{
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 */
68473 +
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.
68478 + */
68479 +
68480 + /* byte size */
68481 + upsmr &= UCC_UART_UPSMR_CL_MASK;
68482 + supsmr &= UCC_UART_SUPSMR_CL_MASK;
68483 +
68484 + switch (termios->c_cflag & CSIZE) {
68485 + case CS5:
68486 + upsmr |= UCC_UART_UPSMR_CL_5;
68487 + supsmr |= UCC_UART_SUPSMR_CL_5;
68488 + char_length += 5;
68489 + break;
68490 + case CS6:
68491 + upsmr |= UCC_UART_UPSMR_CL_6;
68492 + supsmr |= UCC_UART_SUPSMR_CL_6;
68493 + char_length += 6;
68494 + break;
68495 + case CS7:
68496 + upsmr |= UCC_UART_UPSMR_CL_7;
68497 + supsmr |= UCC_UART_SUPSMR_CL_7;
68498 + char_length += 7;
68499 + break;
68500 + default: /* case CS8 */
68501 + upsmr |= UCC_UART_UPSMR_CL_8;
68502 + supsmr |= UCC_UART_SUPSMR_CL_8;
68503 + char_length += 8;
68504 + break;
68505 + }
68506 +
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 */
68512 + }
68513 +
68514 + if (termios->c_cflag & PARENB) {
68515 + upsmr |= UCC_UART_UPSMR_PEN;
68516 + supsmr |= UCC_UART_SUPSMR_PEN;
68517 + char_length++; /* + PEN */
68518 +
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;
68528 + }
68529 + }
68530 +
68531 + /*
68532 + * Set up parity check flag
68533 + */
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;
68539 +
68540 + /*
68541 + * Characters to ignore
68542 + */
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;
68548 + /*
68549 + * If we're ignore parity and break indicators, ignore
68550 + * overruns too. (For real raw support).
68551 + */
68552 + if (termios->c_iflag & IGNPAR)
68553 + port->ignore_status_mask |= BD_SC_OV;
68554 + }
68555 + /*
68556 + * !!! ignore all characters if CREAD is not set
68557 + */
68558 + if ((termios->c_cflag & CREAD) == 0)
68559 + port->read_status_mask &= ~BD_SC_EMPTY;
68560 +
68561 + baud = uart_get_baud_rate(port, termios, old, 0, 115200);
68562 +
68563 + /* Do we really need a spinlock here? */
68564 + spin_lock_irqsave(&port->lock, flags);
68565 +
68566 + out_be16(&uccp->upsmr, upsmr);
68567 + if (soft_uart) {
68568 + out_be16(&uccup->supsmr, supsmr);
68569 + out_8(&uccup->rx_length, char_length);
68570 +
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);
68574 + } else {
68575 + qe_setbrg(qe_port->us_info.rx_clock, baud, 16);
68576 + qe_setbrg(qe_port->us_info.tx_clock, baud, 16);
68577 + }
68578 +
68579 + spin_unlock_irqrestore(&port->lock, flags);
68580 +}
68581 +
68582 +/*
68583 + * Return a pointer to a string that describes what kind of port this is.
68584 + */
68585 +static const char *qe_uart_type(struct uart_port *port)
68586 +{
68587 + return "QE";
68588 +}
68589 +
68590 +/*
68591 + * Allocate any memory and I/O resources required by the port.
68592 + */
68593 +static int qe_uart_request_port(struct uart_port *port)
68594 +{
68595 + int ret;
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;
68601 + void *bd_virt;
68602 + dma_addr_t bd_dma_addr = 0;
68603 +
68604 + ret = ucc_slow_init(us_info, &uccs);
68605 + if (ret) {
68606 + dev_err(port->dev, "could not initialize UCC%u\n",
68607 + qe_port->ucc_num);
68608 + return ret;
68609 + }
68610 +
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;
68616 +
68617 + /*
68618 + * Allocate the transmit and receive data buffers.
68619 + */
68620 +
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);
68623 +
68624 + bd_virt = dma_alloc_coherent(NULL, rx_size + tx_size, &bd_dma_addr,
68625 + GFP_KERNEL);
68626 + if (!bd_virt) {
68627 + dev_err(port->dev, "could not allocate buffer descriptors\n");
68628 + return -ENOMEM;
68629 + }
68630 +
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;
68634 +
68635 + qe_port->rx_buf = bd_virt;
68636 + qe_port->tx_buf = qe_port->rx_buf + rx_size;
68637 +
68638 + return 0;
68639 +}
68640 +
68641 +/*
68642 + * Configure the port.
68643 + *
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
68646 + * driver.
68647 + */
68648 +static void qe_uart_config_port(struct uart_port *port, int flags)
68649 +{
68650 + if (flags & UART_CONFIG_TYPE) {
68651 + port->type = PORT_CPM;
68652 + qe_uart_request_port(port);
68653 + }
68654 +}
68655 +
68656 +/*
68657 + * Release any memory and I/O resources that were allocated in
68658 + * qe_uart_request_port().
68659 + */
68660 +static void qe_uart_release_port(struct uart_port *port)
68661 +{
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;
68665 +
68666 + dma_free_coherent(NULL, qe_port->bd_size, qe_port->bd_virt,
68667 + qe_port->bd_dma_addr);
68668 +
68669 + ucc_slow_free(uccs);
68670 +}
68671 +
68672 +/*
68673 + * Verify that the data in serial_struct is suitable for this device.
68674 + */
68675 +static int qe_uart_verify_port(struct uart_port *port,
68676 + struct serial_struct *ser)
68677 +{
68678 + if (ser->type != PORT_UNKNOWN && ser->type != PORT_CPM)
68679 + return -EINVAL;
68680 +
68681 + if (ser->irq < 0 || ser->irq >= NR_IRQS)
68682 + return -EINVAL;
68683 +
68684 + if (ser->baud_base < 9600)
68685 + return -EINVAL;
68686 +
68687 + return 0;
68688 +}
68689 +/* UART operations
68690 + *
68691 + * Details on these functions can be found in Documentation/serial/driver
68692 + */
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,
68710 +};
68711 +
68712 +/*
68713 + * Obtain the SOC model number and revision level
68714 + *
68715 + * This function parses the device tree to obtain the SOC model. It then
68716 + * reads the SVR register to the revision.
68717 + *
68718 + * The device tree stores the SOC model two different ways.
68719 + *
68720 + * The new way is:
68721 + *
68722 + * cpu@0 {
68723 + * compatible = "PowerPC,8323";
68724 + * device_type = "cpu";
68725 + * ...
68726 + *
68727 + *
68728 + * The old way is:
68729 + * PowerPC,8323@0 {
68730 + * device_type = "cpu";
68731 + * ...
68732 + *
68733 + * This code first checks the new way, and then the old way.
68734 + */
68735 +static unsigned int soc_info(unsigned int *rev_h, unsigned int *rev_l)
68736 +{
68737 + struct device_node *np;
68738 + const char *soc_string;
68739 + unsigned int svr;
68740 + unsigned int soc;
68741 +
68742 + /* Find the CPU node */
68743 + np = of_find_node_by_type(NULL, "cpu");
68744 + if (!np)
68745 + return 0;
68746 + /* Find the compatible property */
68747 + soc_string = of_get_property(np, "compatible", NULL);
68748 + if (!soc_string)
68749 + /* No compatible property, so try the name. */
68750 + soc_string = np->name;
68751 +
68752 + /* Extract the SOC number from the "PowerPC," string */
68753 + if ((sscanf(soc_string, "PowerPC,%u", &soc) != 1) || !soc)
68754 + return 0;
68755 +
68756 + /* Get the revision from the SVR */
68757 + svr = mfspr(SPRN_SVR);
68758 + *rev_h = (svr >> 4) & 0xf;
68759 + *rev_l = svr & 0xf;
68760 +
68761 + return soc;
68762 +}
68763 +
68764 +/*
68765 + * requst_firmware_nowait() callback function
68766 + *
68767 + * This function is called by the kernel when a firmware is made available,
68768 + * or if it times out waiting for the firmware.
68769 + */
68770 +static void uart_firmware_cont(const struct firmware *fw, void *context)
68771 +{
68772 + struct qe_firmware *firmware;
68773 + struct device *dev = context;
68774 + int ret;
68775 +
68776 + if (!fw) {
68777 + dev_err(dev, "firmware not found\n");
68778 + return;
68779 + }
68780 +
68781 + firmware = (struct qe_firmware *) fw->data;
68782 +
68783 + if (firmware->header.length != fw->size) {
68784 + dev_err(dev, "invalid firmware\n");
68785 + return;
68786 + }
68787 +
68788 + ret = qe_upload_firmware(firmware);
68789 + if (ret) {
68790 + dev_err(dev, "could not load firmware\n");
68791 + return;
68792 + }
68793 +
68794 + firmware_loaded = 1;
68795 +}
68796 +
68797 +static int ucc_uart_probe(struct of_device *ofdev,
68798 + const struct of_device_id *match)
68799 +{
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;
68805 + int ret;
68806 +
68807 + /*
68808 + * Determine if we need Soft-UART mode
68809 + */
68810 + if (of_find_property(np, "soft-uart", NULL)) {
68811 + dev_dbg(&ofdev->dev, "using Soft-UART mode\n");
68812 + soft_uart = 1;
68813 + }
68814 +
68815 + /*
68816 + * If we are using Soft-UART, determine if we need to upload the
68817 + * firmware, too.
68818 + */
68819 + if (soft_uart) {
68820 + struct qe_firmware_info *qe_fw_info;
68821 +
68822 + qe_fw_info = qe_get_firmware_info();
68823 +
68824 + /* Check if the firmware has been uploaded. */
68825 + if (qe_fw_info && strstr(qe_fw_info->id, "Soft-UART")) {
68826 + firmware_loaded = 1;
68827 + } else {
68828 + char filename[32];
68829 + unsigned int soc;
68830 + unsigned int rev_h;
68831 + unsigned int rev_l;
68832 +
68833 + soc = soc_info(&rev_h, &rev_l);
68834 + if (!soc) {
68835 + dev_err(&ofdev->dev, "unknown CPU model\n");
68836 + return -ENXIO;
68837 + }
68838 + sprintf(filename, "fsl_qe_ucode_uart_%u_%u%u.bin",
68839 + soc, rev_h, rev_l);
68840 +
68841 + dev_info(&ofdev->dev, "waiting for firmware %s\n",
68842 + filename);
68843 +
68844 + /*
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.
68850 + */
68851 + ret = request_firmware_nowait(THIS_MODULE,
68852 + FW_ACTION_HOTPLUG, filename, &ofdev->dev,
68853 + &ofdev->dev, uart_firmware_cont);
68854 + if (ret) {
68855 + dev_err(&ofdev->dev,
68856 + "could not load firmware %s\n",
68857 + filename);
68858 + return ret;
68859 + }
68860 + }
68861 + }
68862 +
68863 + qe_port = kzalloc(sizeof(struct uart_qe_port), GFP_KERNEL);
68864 + if (!qe_port) {
68865 + dev_err(&ofdev->dev, "can't allocate QE port structure\n");
68866 + return -ENOMEM;
68867 + }
68868 +
68869 + /* Search for IRQ and mapbase */
68870 + ret = of_address_to_resource(np, 0, &res);
68871 + if (ret) {
68872 + dev_err(&ofdev->dev, "missing 'reg' property in device tree\n");
68873 + kfree(qe_port);
68874 + return ret;
68875 + }
68876 + if (!res.start) {
68877 + dev_err(&ofdev->dev, "invalid 'reg' property in device tree\n");
68878 + kfree(qe_port);
68879 + return -EINVAL;
68880 + }
68881 + qe_port->port.mapbase = res.start;
68882 +
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");
68889 + kfree(qe_port);
68890 + return -ENODEV;
68891 + }
68892 + qe_port->ucc_num = *iprop - 1;
68893 +
68894 + /*
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
68898 + * assignments.
68899 + */
68900 +
68901 + sprop = of_get_property(np, "rx-clock-name", NULL);
68902 + if (!sprop) {
68903 + dev_err(&ofdev->dev, "missing rx-clock-name in device tree\n");
68904 + kfree(qe_port);
68905 + return -ENODEV;
68906 + }
68907 +
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");
68912 + kfree(qe_port);
68913 + return -ENODEV;
68914 + }
68915 +
68916 +#ifdef LOOPBACK
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;
68919 +#else
68920 + sprop = of_get_property(np, "tx-clock-name", NULL);
68921 + if (!sprop) {
68922 + dev_err(&ofdev->dev, "missing tx-clock-name in device tree\n");
68923 + kfree(qe_port);
68924 + return -ENODEV;
68925 + }
68926 + qe_port->us_info.tx_clock = qe_clock_source(sprop);
68927 +#endif
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");
68931 + kfree(qe_port);
68932 + return -ENODEV;
68933 + }
68934 +
68935 + /* Get the port number, numbered 0-3 */
68936 + iprop = of_get_property(np, "port-number", NULL);
68937 + if (!iprop) {
68938 + dev_err(&ofdev->dev, "missing port-number in device tree\n");
68939 + kfree(qe_port);
68940 + return -EINVAL;
68941 + }
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);
68946 + kfree(qe_port);
68947 + return -EINVAL;
68948 + }
68949 +
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);
68954 + kfree(qe_port);
68955 + return -EINVAL;
68956 + }
68957 +
68958 + /*
68959 + * Newer device trees have an "fsl,qe" compatible property for the QE
68960 + * node, but we still need to support older device trees.
68961 + */
68962 + np = of_find_compatible_node(NULL, NULL, "fsl,qe");
68963 + if (!np) {
68964 + np = of_find_node_by_type(NULL, "qe");
68965 + if (!np) {
68966 + dev_err(&ofdev->dev, "could not find 'qe' node\n");
68967 + kfree(qe_port);
68968 + return -EINVAL;
68969 + }
68970 + }
68971 +
68972 + iprop = of_get_property(np, "brg-frequency", NULL);
68973 + if (!iprop) {
68974 + dev_err(&ofdev->dev,
68975 + "missing brg-frequency in device tree\n");
68976 + kfree(qe_port);
68977 + return -EINVAL;
68978 + }
68979 +
68980 + if (*iprop)
68981 + qe_port->port.uartclk = *iprop;
68982 + else {
68983 + /*
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.
68987 + */
68988 + iprop = of_get_property(np, "bus-frequency", NULL);
68989 + if (!iprop) {
68990 + dev_err(&ofdev->dev,
68991 + "missing QE bus-frequency in device tree\n");
68992 + kfree(qe_port);
68993 + return -EINVAL;
68994 + }
68995 + if (*iprop)
68996 + qe_port->port.uartclk = *iprop / 2;
68997 + else {
68998 + dev_err(&ofdev->dev,
68999 + "invalid QE bus-frequency in device tree\n");
69000 + kfree(qe_port);
69001 + return -EINVAL;
69002 + }
69003 + }
69004 +
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;
69010 +
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;
69015 +
69016 + qe_port->wait_closing = UCC_WAIT_CLOSING;
69017 + qe_port->port.fifosize = 512;
69018 + qe_port->port.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP;
69019 +
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;
69023 +
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;
69026 +
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;
69030 +
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.
69034 + */
69035 + ret = uart_add_one_port(&ucc_uart_driver, &qe_port->port);
69036 + if (ret) {
69037 + dev_err(&ofdev->dev, "could not add /dev/ttyQE%u\n",
69038 + qe_port->port.line);
69039 + kfree(qe_port);
69040 + return ret;
69041 + }
69042 +
69043 + dev_set_drvdata(&ofdev->dev, qe_port);
69044 +
69045 + dev_info(&ofdev->dev, "UCC%u assigned to /dev/ttyQE%u\n",
69046 + qe_port->ucc_num + 1, qe_port->port.line);
69047 +
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);
69052 +
69053 + return 0;
69054 +}
69055 +
69056 +static int ucc_uart_remove(struct of_device *ofdev)
69057 +{
69058 + struct uart_qe_port *qe_port = dev_get_drvdata(&ofdev->dev);
69059 +
69060 + dev_info(&ofdev->dev, "removing /dev/ttyQE%u\n", qe_port->port.line);
69061 +
69062 + uart_remove_one_port(&ucc_uart_driver, &qe_port->port);
69063 +
69064 + dev_set_drvdata(&ofdev->dev, NULL);
69065 + kfree(qe_port);
69066 +
69067 + return 0;
69068 +}
69069 +
69070 +static struct of_device_id ucc_uart_match[] = {
69071 + {
69072 + .type = "serial",
69073 + .compatible = "ucc_uart",
69074 + },
69075 + {},
69076 +};
69077 +MODULE_DEVICE_TABLE(of, ucc_uart_match);
69078 +
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,
69085 +};
69086 +
69087 +static int __init ucc_uart_init(void)
69088 +{
69089 + int ret;
69090 +
69091 + printk(KERN_INFO "Freescale QUICC Engine UART device driver\n");
69092 +#ifdef LOOPBACK
69093 + printk(KERN_INFO "ucc-uart: Using loopback mode\n");
69094 +#endif
69095 +
69096 + ret = uart_register_driver(&ucc_uart_driver);
69097 + if (ret) {
69098 + printk(KERN_ERR "ucc-uart: could not register UART driver\n");
69099 + return ret;
69100 + }
69101 +
69102 + ret = of_register_platform_driver(&ucc_uart_of_driver);
69103 + if (ret)
69104 + printk(KERN_ERR
69105 + "ucc-uart: could not register platform driver\n");
69106 +
69107 + return ret;
69108 +}
69109 +
69110 +static void __exit ucc_uart_exit(void)
69111 +{
69112 + printk(KERN_INFO
69113 + "Freescale QUICC Engine UART device driver unloading\n");
69114 +
69115 + of_unregister_platform_driver(&ucc_uart_of_driver);
69116 + uart_unregister_driver(&ucc_uart_driver);
69117 +}
69118 +
69119 +module_init(ucc_uart_init);
69120 +module_exit(ucc_uart_exit);
69121 +
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);
69126 +
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 @@
69131
69132 static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps)
69133 {
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 @@
69139 int ret = 0;
69140
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);
69146 + of_node_put(np);
69147 + np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio");
69148 + gpio = of_iomap(np, 0);
69149 + of_node_put(np);
69150 #else
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 */
69158 }
69159
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
69192 @@ -10,5 +10,6 @@
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);
69197
69198 #endif
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
69202 @@ -57,6 +57,14 @@
69203 PPC_PMC_PA6T = 2,
69204 };
69205
69206 +struct pt_regs;
69207 +
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);
69213 +
69214 /* NOTE WELL: Update identify_cpu() if fields are added or removed! */
69215 struct cpu_spec {
69216 /* CPU is matched via (PVR & pvr_mask) == pvr_value */
69217 @@ -97,6 +105,11 @@
69218
69219 /* Name of processor class, for the ELF AT_PLATFORM entry */
69220 char *platform;
69221 +
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);
69226 };
69227
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
69232 @@ -0,0 +1,71 @@
69233 +#ifndef _ASM_POWERPC_CPUTHREADS_H
69234 +#define _ASM_POWERPC_CPUTHREADS_H
69235 +
69236 +#include <linux/cpumask.h>
69237 +
69238 +/*
69239 + * Mapping of threads to cores
69240 + */
69241 +
69242 +#ifdef CONFIG_SMP
69243 +extern int threads_per_core;
69244 +extern int threads_shift;
69245 +extern cpumask_t threads_core_mask;
69246 +#else
69247 +#define threads_per_core 1
69248 +#define threads_shift 0
69249 +#define threads_core_mask (CPU_MASK_CPU0)
69250 +#endif
69251 +
69252 +/* cpu_thread_mask_to_cores - Return a cpumask of one per cores
69253 + * hit by the argument
69254 + *
69255 + * @threads: a cpumask of threads
69256 + *
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.
69259 + *
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
69262 + */
69263 +static inline cpumask_t cpu_thread_mask_to_cores(cpumask_t threads)
69264 +{
69265 + cpumask_t tmp, res;
69266 + int i;
69267 +
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))
69272 + cpu_set(i, res);
69273 + }
69274 + return res;
69275 +}
69276 +
69277 +static inline int cpu_nr_cores(void)
69278 +{
69279 + return NR_CPUS >> threads_shift;
69280 +}
69281 +
69282 +static inline cpumask_t cpu_online_cores_map(void)
69283 +{
69284 + return cpu_thread_mask_to_cores(cpu_online_map);
69285 +}
69286 +
69287 +static inline int cpu_thread_to_core(int cpu)
69288 +{
69289 + return cpu >> threads_shift;
69290 +}
69291 +
69292 +static inline int cpu_thread_in_core(int cpu)
69293 +{
69294 + return cpu & (threads_per_core - 1);
69295 +}
69296 +
69297 +static inline int cpu_first_thread_in_core(int cpu)
69298 +{
69299 + return cpu & ~(threads_per_core - 1);
69300 +}
69301 +
69302 +#endif /* _ASM_POWERPC_CPUTHREADS_H */
69303 +
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
69307 @@ -22,6 +22,8 @@
69308 #ifdef __KERNEL__
69309 #ifndef __ASSEMBLY__
69310
69311 +#include <linux/spinlock.h>
69312 +
69313 typedef struct {
69314 unsigned int base;
69315 } dcr_host_t;
69316 @@ -55,20 +57,28 @@
69317 } while (0)
69318
69319 /* R/W of indirect DCRs make use of standard naming conventions for DCRs */
69320 -#define mfdcri(base, reg) \
69321 -({ \
69322 - mtdcr(base ## _CFGADDR, base ## _ ## reg); \
69323 - mfdcr(base ## _CFGDATA); \
69324 +extern spinlock_t dcr_ind_lock;
69325 +
69326 +#define mfdcri(base, reg) \
69327 +({ \
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); \
69334 + val; \
69335 })
69336
69337 -#define mtdcri(base, reg, data) \
69338 -do { \
69339 - mtdcr(base ## _CFGADDR, base ## _ ## reg); \
69340 - mtdcr(base ## _CFGDATA, data); \
69341 +#define mtdcri(base, reg, data) \
69342 +do { \
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); \
69348 } while (0)
69349
69350 #endif /* __ASSEMBLY__ */
69351 #endif /* __KERNEL__ */
69352 #endif /* _ASM_POWERPC_DCR_NATIVE_H */
69353 -
69354 -
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
69358 @@ -0,0 +1,71 @@
69359 +/*
69360 + * Common DCR / SDR / CPR register definitions used on various IBM/AMCC
69361 + * 4xx processors
69362 + *
69363 + * Copyright 2007 Benjamin Herrenschmidt, IBM Corp
69364 + * <benh@kernel.crashing.org>
69365 + *
69366 + * Mostly lifted from asm-ppc/ibm4xx.h by
69367 + *
69368 + * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
69369 + *
69370 + */
69371 +
69372 +#ifndef __DCR_REGS_H__
69373 +#define __DCR_REGS_H__
69374 +
69375 +/*
69376 + * Most DCRs used for controlling devices such as the MAL, DMA engine,
69377 + * etc... are obtained for the device tree.
69378 + *
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
69383 + */
69384 +
69385 +/* CPRs (440GX and 440SP/440SPe) */
69386 +#define DCRN_CPR0_CONFIG_ADDR 0xc
69387 +#define DCRN_CPR0_CONFIG_DATA 0xd
69388 +
69389 +/* SDRs (440GX and 440SP/440SPe) */
69390 +#define DCRN_SDR0_CONFIG_ADDR 0xe
69391 +#define DCRN_SDR0_CONFIG_DATA 0xf
69392 +
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
69428 +
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
69433 @@ -87,6 +87,9 @@
69434 return dma_ops->dma_supported(dev, mask);
69435 }
69436
69437 +/* We have our own implementation of pci_set_dma_mask() */
69438 +#define HAVE_ARCH_PCI_SET_DMA_MASK
69439 +
69440 static inline int dma_set_mask(struct device *dev, u64 dma_mask)
69441 {
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;
69446
69447 -extern unsigned long dma_direct_offset;
69448 -
69449 #else /* CONFIG_PPC64 */
69450
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
69455 @@ -64,7 +64,7 @@
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 @@
69468 * them.
69469 *
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)
69475 */
69476 static inline void guts_set_dmacr(struct ccsr_guts __iomem *guts,
69477 unsigned int co, unsigned int ch, unsigned int device)
69478 {
69479 - unsigned int shift = 16 + (8 * (2 - co) + 2 * (3 - ch));
69480 + unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch));
69481
69482 clrsetbits_be32(&guts->dmacr, 3 << shift, device << shift);
69483 }
69484 @@ -118,6 +118,27 @@
69485 #define CCSR_GUTS_PMUXCR_DMA1_0 0x00000002
69486 #define CCSR_GUTS_PMUXCR_DMA1_3 0x00000001
69487
69488 +/*
69489 + * Set the DMA external control bits in the GUTS
69490 + *
69491 + * The DMA external control bits in the PMUXCR are only meaningful for
69492 + * channels 0 and 3. Any other channels are ignored.
69493 + *
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)
69498 + */
69499 +static inline void guts_set_pmuxcr_dma(struct ccsr_guts __iomem *guts,
69500 + unsigned int co, unsigned int ch, unsigned int value)
69501 +{
69502 + if ((ch == 0) || (ch == 3)) {
69503 + unsigned int shift = 2 * (co + 1) - (ch & 1) - 1;
69504 +
69505 + clrsetbits_be32(&guts->pmuxcr, 1 << shift, value << shift);
69506 + }
69507 +}
69508 +
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 @@
69516 u8 res2[0x48];
69517 } __attribute__ ((packed));
69518
69519 -/* RISC Special Registers (Trap and Breakpoint) */
69520 +/*
69521 + * RISC Special Registers (Trap and Breakpoint). These are described in
69522 + * the QE Developer's Handbook.
69523 + */
69524 struct rsp {
69525 - u32 reg[0x40]; /* 64 32-bit registers */
69526 + __be32 tibcr[16]; /* Trap/instruction breakpoint control regs */
69527 + u8 res0[64];
69528 + __be32 ibcr0;
69529 + __be32 ibs0;
69530 + __be32 ibcnr0;
69531 + u8 res1[4];
69532 + __be32 ibcr1;
69533 + __be32 ibs1;
69534 + __be32 ibcnr1;
69535 + __be32 npcr;
69536 + __be32 dbcr;
69537 + __be32 dbar;
69538 + __be32 dbamr;
69539 + __be32 dbsr;
69540 + __be32 dbcnr;
69541 + u8 res2[12];
69542 + __be32 dbdr_h;
69543 + __be32 dbdr_l;
69544 + __be32 dbdmr_h;
69545 + __be32 dbdmr_l;
69546 + __be32 bsr;
69547 + __be32 bor;
69548 + __be32 bior;
69549 + u8 res3[4];
69550 + __be32 iatr[4];
69551 + __be32 eccr; /* Exception control configuration register */
69552 + __be32 eicr;
69553 + u8 res4[0x100-0xf8];
69554 } __attribute__ ((packed));
69555
69556 struct qe_immap {
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
69562 #else
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
69567 #endif
69568
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;
69573
69574 +extern resource_size_t isa_mem_base;
69575 +
69576 #if defined(CONFIG_PPC32) && defined(CONFIG_PPC_INDIRECT_IO)
69577 #error CONFIG_PPC_INDIRECT_IO is not yet supported on 32 bits
69578 #endif
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
69582 @@ -69,10 +69,9 @@
69583 };
69584
69585 struct scatterlist;
69586 -struct device_node;
69587
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);
69591
69592 /* Initializes an iommu_table based in values set in the passed-in
69593 * structure
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 @@
69598
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
69613
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
69619 @@ -78,7 +78,7 @@
69620
69621 /*
69622 * Close an Lp Event Path for a type and partition
69623 - * returns 0 on sucess
69624 + * returns 0 on success
69625 */
69626 extern int HvLpEvent_closePath(HvLpEvent_Type eventType, HvLpIndex lpIndex);
69627
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);
69638
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
69644 @@ -51,6 +51,7 @@
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);
69649
69650 extern void lmb_dump_all(void);
69651
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 @@
69656 /*
69657 * optional PCI "hooks"
69658 */
69659 + /* Called in indirect_* to avoid touching devices */
69660 + int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char);
69661 +
69662 + /* Called at then very end of pcibios_init() */
69663 + void (*pcibios_after_init)(void);
69664 +
69665 +#endif /* CONFIG_PPC32 */
69666
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 *);
69672
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);
69677 -
69678 - /* Called in indirect_* to avoid touching devices */
69679 - int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char);
69680 -
69681 - /* Called at then very end of pcibios_init() */
69682 - void (*pcibios_after_init)(void);
69683 -
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 *);
69688
69689 /* Called to shutdown machine specific hardware not already controlled
69690 * by other drivers.
69691 @@ -253,6 +251,16 @@
69692 */
69693 void (*machine_kexec)(struct kimage *image);
69694 #endif /* CONFIG_KEXEC */
69695 +
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.
69701 + */
69702 + void (*suspend_disable_irqs)(void);
69703 + void (*suspend_enable_irqs)(void);
69704 +#endif
69705 };
69706
69707 extern void power4_idle(void);
69708 @@ -326,5 +334,31 @@
69709 ppc_md.log_error(buf, err_type, fatal);
69710 }
69711
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(); \
69715 + return 0; \
69716 + } \
69717 + __define_initcall(level,__machine_initcall_##mach##_##fn,id);
69718 +
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)
69734 +
69735 +void generic_suspend_disable_irqs(void);
69736 +void generic_suspend_enable_irqs(void);
69737 +
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
69743 @@ -80,7 +80,7 @@
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;
69757
69758 /*
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);
69765
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 @@
69772
69773 #ifndef __ASSEMBLY__
69774
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);
69783
69784 +#ifdef CONFIG_PCI
69785 extern int __init mpc52xx_add_bridge(struct device_node *node);
69786 +extern void __init mpc52xx_setup_pci(void);
69787 +#else
69788 +static inline void mpc52xx_setup_pci(void) { }
69789 +#endif
69790
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 @@
69797 u8 reserved16[3];
69798 u8 irfdr; /* PSC + 0x54 */
69799 u8 reserved17[3];
69800 +};
69801 +
69802 +struct mpc52xx_psc_fifo {
69803 u16 rfnum; /* PSC + 0x58 */
69804 u16 reserved18;
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
69809 @@ -8,6 +8,7 @@
69810 #ifndef __ASM_POWERPC_MPC8260_H__
69811 #define __ASM_POWERPC_MPC8260_H__
69812
69813 +#define MPC82XX_BCR_PLDP 0x00800000 /* Pipeline Maximum Depth */
69814
69815 #ifdef CONFIG_8260
69816
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
69820 @@ -22,7 +22,9 @@
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
69830 @@ -78,6 +80,7 @@
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
69835
69836 /*
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 */
69843
69844 /*
69845 * Per-source registers
69846 @@ -183,6 +187,7 @@
69847 MPIC_IDX_CPU_WHOAMI,
69848 MPIC_IDX_CPU_INTACK,
69849 MPIC_IDX_CPU_EOI,
69850 + MPIC_IDX_CPU_MCACK,
69851
69852 MPIC_IDX_IRQ_BASE,
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
69862
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);
69868
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);
69875 +
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);
69883
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
69889 @@ -10,6 +10,8 @@
69890 #ifndef _ASM_POWERPC_NVRAM_H
69891 #define _ASM_POWERPC_NVRAM_H
69892
69893 +#include <linux/errno.h>
69894 +
69895 #define NVRW_CNT 0x20
69896 #define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
69897 #define NVRAM_BLOCK_LEN 16
69898 @@ -71,7 +73,16 @@
69899 extern struct nvram_partition *nvram_find_partition(int sig, const char *name);
69900
69901 extern int pSeries_nvram_init(void);
69902 +
69903 +#ifdef CONFIG_MMIO_NVRAM
69904 extern int mmio_nvram_init(void);
69905 +#else
69906 +static inline int mmio_nvram_init(void)
69907 +{
69908 + return -ENODEV;
69909 +}
69910 +#endif
69911 +
69912 #endif /* __KERNEL__ */
69913
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
69918 @@ -15,8 +15,14 @@
69919 #include <linux/of_platform.h>
69920
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)
69925 +{
69926 + return of_register_driver(drv, &of_platform_bus_type);
69927 +}
69928 +static inline void of_unregister_platform_driver(struct of_platform_driver *drv)
69929 +{
69930 + of_unregister_driver(drv);
69931 +}
69932
69933 /* Platform devices and busses creation */
69934 extern struct of_device *of_platform_device_create(struct device_node *np,
69935 @@ -26,9 +32,11 @@
69936 #define OF_NO_DEEP_PROBE ((struct of_device_id *)-1)
69937
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);
69942
69943 extern struct of_device *of_find_device_by_phandle(phandle ph);
69944
69945 +extern void of_instantiate_rtc(void);
69946 +
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
69951 @@ -1,15 +1,42 @@
69952 #ifndef _ASM_POWERPC_PCI_BRIDGE_H
69953 #define _ASM_POWERPC_PCI_BRIDGE_H
69954 #ifdef __KERNEL__
69955 -
69956 +/*
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.
69961 + */
69962 #include <linux/pci.h>
69963 #include <linux/list.h>
69964 #include <linux/ioport.h>
69965
69966 -#ifndef CONFIG_PPC64
69967 -
69968 struct device_node;
69969 -struct pci_controller;
69970 +
69971 +extern unsigned int ppc_pci_flags;
69972 +enum {
69973 + /* Force re-assigning all resources (ignore firmware
69974 + * setup completely)
69975 + */
69976 + PPC_PCI_REASSIGN_ALL_RSRC = 0x00000001,
69977 +
69978 + /* Re-assign all bus numbers */
69979 + PPC_PCI_REASSIGN_ALL_BUS = 0x00000002,
69980 +
69981 + /* Do not try to assign, just use existing setup */
69982 + PPC_PCI_PROBE_ONLY = 0x00000004,
69983 +
69984 + /* Don't bother with ISA alignment unless the bridge has
69985 + * ISA forwarding enabled
69986 + */
69987 + PPC_PCI_CAN_SKIP_ISA_ALIGN = 0x00000008,
69988 +
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,
69993 +};
69994 +
69995
69996 /*
69997 * Structure of a PCI controller (host bridge)
69998 @@ -17,26 +44,41 @@
69999 struct pci_controller {
70000 struct pci_bus *bus;
70001 char is_dynamic;
70002 - void *arch_data;
70003 +#ifdef CONFIG_PPC64
70004 + int node;
70005 +#endif
70006 + struct device_node *dn;
70007 struct list_head list_node;
70008 struct device *parent;
70009
70010 int first_busno;
70011 int last_busno;
70012 +#ifndef CONFIG_PPC64
70013 int self_busno;
70014 +#endif
70015
70016 void __iomem *io_base_virt;
70017 +#ifdef CONFIG_PPC64
70018 + void *io_base_alloc;
70019 +#endif
70020 resource_size_t io_base_phys;
70021 +#ifndef CONFIG_PPC64
70022 + resource_size_t pci_io_size;
70023 +#endif
70024
70025 /* Some machines (PReP) have a non 1:1 mapping of
70026 * the PCI memory space in the CPU bus space
70027 */
70028 resource_size_t pci_mem_offset;
70029 +#ifdef CONFIG_PPC64
70030 + unsigned long pci_io_size;
70031 +#endif
70032
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;
70038
70039 +#ifndef CONFIG_PPC64
70040 /*
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 @@
70044 * set.
70045 * BIG_ENDIAN - cfg_addr is a big endian register
70046 */
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
70057 u32 indirect_type;
70058 -
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
70062 */
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;
70070 +
70071 + void *private_data;
70072 +#endif /* CONFIG_PPC64 */
70073 };
70074
70075 +#ifndef CONFIG_PPC64
70076 +
70077 static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus)
70078 {
70079 return bus->sysdata;
70080 @@ -81,18 +132,18 @@
70081
70082 /* These are used for config access before all the PCI probing
70083 has been done. */
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);
70108
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);
70117 -
70118 -#else
70119 -
70120 -
70121 -/*
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.
70126 - */
70127 -
70128 -/*
70129 - * Structure of a PCI controller (host bridge)
70130 - */
70131 -struct pci_controller {
70132 - struct pci_bus *bus;
70133 - char is_dynamic;
70134 - int node;
70135 - void *arch_data;
70136 - struct list_head list_node;
70137 - struct device *parent;
70138 -
70139 - int first_busno;
70140 - int last_busno;
70141 -
70142 - void __iomem *io_base_virt;
70143 - void *io_base_alloc;
70144 - resource_size_t io_base_phys;
70145 -
70146 - /* Some machines have a non 1:1 mapping of
70147 - * the PCI memory space in the CPU bus space
70148 - */
70149 - resource_size_t pci_mem_offset;
70150 - unsigned long pci_io_size;
70151 -
70152 - struct pci_ops *ops;
70153 - volatile unsigned int __iomem *cfg_addr;
70154 - volatile void __iomem *cfg_data;
70155 -
70156 - /* Currently, we limit ourselves to 1 IO range and 3 mem
70157 - * ranges since the common pci_bus structure can't handle more
70158 - */
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;
70165 -
70166 - void *private_data;
70167 -};
70168 +#else /* CONFIG_PPC64 */
70169
70170 /*
70171 * PCI stuff, for nodes representing PCI devices, pointed to
70172 * by device_node->data.
70173 */
70174 -struct pci_controller;
70175 struct iommu_table;
70176
70177 struct pci_dn {
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 */
70182
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 */
70187
70188 int pci_ext_config_space; /* for pci devices */
70189
70190 #ifdef CONFIG_EEH
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 */
70203 #endif
70204 };
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)
70208
70209 -struct device_node *fetch_dev_dn(struct pci_dev *dev);
70210 +extern struct device_node *fetch_dev_dn(struct pci_dev *dev);
70211
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 @@
70215 }
70216
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);
70220
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);
70224
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);
70230
70231 extern int pcibios_remove_root_bus(struct pci_controller *phb);
70232
70233 @@ -270,20 +267,18 @@
70234 #define PHB_SET_NODE(PHB, NODE) ((PHB)->node = -1)
70235 #endif
70236
70237 -#endif /* CONFIG_PPC64 */
70238 +#endif /* CONFIG_PPC64 */
70239
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);
70245
70246 /* Fill up host controller resources from the OF node */
70247 -extern void
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);
70252
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);
70258
70259 #ifdef CONFIG_PCI
70260 @@ -298,9 +293,7 @@
70261 {
70262 return 0;
70263 }
70264 -#endif
70265 -
70266 +#endif /* CONFIG_PCI */
70267
70268 -
70269 -#endif /* __KERNEL__ */
70270 -#endif
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 @@
70277
70278 /*
70279 * Set this to 1 if you want the kernel to re-assign all PCI
70280 - * bus numbers
70281 + * bus numbers (don't do that on ppc64 yet !)
70282 */
70283 -extern int pci_assign_all_buses;
70284 -#define pcibios_assign_all_busses() (pci_assign_all_buses)
70285 -
70286 +#define pcibios_assign_all_busses() (ppc_pci_flags & \
70287 + PPC_PCI_REASSIGN_ALL_BUS)
70288 #define pcibios_scan_all_fns(a, b) 0
70289
70290 static inline void pcibios_set_master(struct pci_dev *dev)
70291 @@ -95,9 +94,6 @@
70292 #define get_pci_dma_ops() NULL
70293 #endif
70294
70295 -/* Decide whether to display the domain number in /proc */
70296 -extern int pci_proc_domain(struct pci_bus *bus);
70297 -
70298 #else /* 32-bit */
70299
70300 #ifdef CONFIG_PCI
70301 @@ -109,17 +105,14 @@
70302 *strategy_parameter = ~0UL;
70303 }
70304 #endif
70305 -
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)
70308 -{
70309 - return 0;
70310 -}
70311 -
70312 #endif /* CONFIG_PPC64 */
70313
70314 extern int pci_domain_nr(struct pci_bus *bus);
70315
70316 +/* Decide whether to display the domain number in /proc */
70317 +extern int pci_proc_domain(struct pci_bus *bus);
70318 +
70319 +
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 @@
70324 return root;
70325 }
70326
70327 -extern void pcibios_fixup_device_resources(struct pci_dev *dev,
70328 - struct pci_bus *bus);
70329 -
70330 extern void pcibios_setup_new_device(struct pci_dev *dev);
70331
70332 extern void pcibios_claim_one_bus(struct pci_bus *b);
70333
70334 +extern void pcibios_resource_survey(void);
70335 +
70336 extern struct pci_controller *init_phb_dynamic(struct device_node *dn);
70337
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);
70342
70343 +extern void pcibios_do_bus_setup(struct pci_bus *bus);
70344 +extern void pcibios_fixup_of_probed_bus(struct pci_bus *bus);
70345 +
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
70351 @@ -22,7 +22,6 @@
70352
70353
70354 extern struct list_head hose_list;
70355 -extern int global_phb_number;
70356
70357 extern void find_and_init_phbs(void);
70358
70359 @@ -47,9 +46,6 @@
70360 extern unsigned long get_phb_buid (struct device_node *);
70361 extern int rtas_setup_phb(struct pci_controller *phb);
70362
70363 -/* From iSeries PCI */
70364 -extern void iSeries_pcibios_init(void);
70365 -
70366 extern unsigned long pci_probe_only;
70367
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 @@
70373 */
70374 extern u64 of_translate_address(struct device_node *np, const u32 *addr);
70375
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);
70379 +
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
70386 @@ -24,6 +24,7 @@
70387 #include <linux/init.h>
70388 #include <linux/types.h>
70389 #include <linux/device.h>
70390 +#include "cell-pmu.h"
70391
70392 union ps3_firmware_version {
70393 u64 raw;
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,
70399 };
70400
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"
70407
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,
70413 };
70414
70415 /**
70416 @@ -344,12 +348,17 @@
70417 enum ps3_match_id match_id;
70418 enum ps3_system_bus_device_type dev_type;
70419
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 */
70429 + u64 node_id;
70430 + u64 pu_id;
70431 + u64 rights;
70432 + } lpm;
70433
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;
70439
70440 +/* logical performance monitor */
70441 +
70442 +/**
70443 + * enum ps3_lpm_rights - Rigths granted by the system policy module.
70444 + *
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.
70447 + */
70448 +
70449 +enum ps3_lpm_rights {
70450 + PS3_LPM_RIGHTS_USE_LPM = 0x001,
70451 + PS3_LPM_RIGHTS_USE_TB = 0x100,
70452 +};
70453 +
70454 +/**
70455 + * enum ps3_lpm_tb_type - Type of trace buffer lv1 should use.
70456 + *
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.
70460 + */
70461 +
70462 +enum ps3_lpm_tb_type {
70463 + PS3_LPM_TB_TYPE_NONE = 0,
70464 + PS3_LPM_TB_TYPE_INTERNAL = 1,
70465 +};
70466 +
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,
70477 + u8 bus_word);
70478 +
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);
70483 +
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);
70488 +
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);
70491 +
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);
70496 +
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);
70501
70502 #endif
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 @@
70507 */
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
70519 @@ -28,6 +28,52 @@
70520 #define MEM_PART_SECONDARY 1
70521 #define MEM_PART_MURAM 2
70522
70523 +/* Clocks and BRGs */
70524 +enum qe_clock {
70525 + QE_CLK_NONE = 0,
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 */
70566 + QE_CLK_DUMMY
70567 +};
70568 +
70569 /* Export QE common operations */
70570 extern void qe_reset(void);
70571 extern int par_io_init(struct device_node *np);
70572 @@ -38,7 +84,8 @@
70573
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);
70582 @@ -47,6 +94,58 @@
70583 void qe_muram_dump(void);
70584 void *qe_muram_addr(unsigned long offset);
70585
70586 +/* Structure that defines QE firmware binary files.
70587 + *
70588 + * See Documentation/powerpc/qe-firmware.txt for a description of these
70589 + * fields.
70590 + */
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' */
70596 + } header;
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 */
70600 + struct {
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));
70625 +
70626 +struct qe_firmware_info {
70627 + char id[64]; /* Firmware name */
70628 + u32 vtraps[8]; /* Virtual trap addresses */
70629 + u64 extended_modes; /* Extended modes */
70630 +};
70631 +
70632 +/* Upload a firmware to the QE */
70633 +int qe_upload_firmware(const struct qe_firmware *firmware);
70634 +
70635 +/* Obtain information on the uploaded firmware */
70636 +struct qe_firmware_info *qe_get_firmware_info(void);
70637 +
70638 /* Buffer descriptors */
70639 struct qe_bd {
70640 __be16 status;
70641 @@ -129,52 +228,6 @@
70642 COMM_DIR_RX_AND_TX = 3
70643 };
70644
70645 -/* Clocks and BRGs */
70646 -enum qe_clock {
70647 - QE_CLK_NONE = 0,
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 */
70688 - QE_CLK_DUMMY,
70689 -};
70690 -
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 @@
70695
70696 #define QE_SDEBCR_BA_MASK 0x01FFFFFF
70697
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 */
70702 +
70703 +/* I-RAM */
70704 +#define QE_IRAM_IADD_AIE 0x80000000 /* Auto Increment Enable */
70705 +#define QE_IRAM_IADD_BADDR 0x00080000 /* Base Address */
70706 +
70707 /* UPC */
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 */
70719
70720
70721 @@ -691,12 +692,6 @@
70722 #define PV_BE 0x0070
70723 #define PV_PA6T 0x0090
70724
70725 -/*
70726 - * Number of entries in the SLB. If this ever changes we should handle
70727 - * it with a use a cpu feature fixup.
70728 - */
70729 -#define SLB_NUM_ENTRIES 64
70730 -
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 */
70791
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 */
70801 -#endif
70802 +
70803 #ifdef CONFIG_E500
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
70818 @@ -0,0 +1,18 @@
70819 +/*
70820 + * Copyright © 2008 Michael Neuling IBM Corporation
70821 + *
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.
70826 + *
70827 + */
70828 +#ifndef _ASM_POWERPC_SETJMP_H
70829 +#define _ASM_POWERPC_SETJMP_H
70830 +
70831 +#define JMP_BUF_LEN 23
70832 +
70833 +extern long setjmp(long *);
70834 +extern void longjmp(long *, long);
70835 +
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
70840 @@ -22,7 +22,7 @@
70841 * Partition info commands
70842 *
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.
70847 *
70848 * The reply is 6 bytes:
70849 @@ -173,12 +173,12 @@
70850 * Power supply control
70851 *
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.
70855 *
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 @@
70866 */
70867 #define SMU_CMD_READ_ADC 0xd8
70868
70869 +
70870 /* Misc commands
70871 *
70872 * This command seem to be a grab bag of various things
70873 + *
70874 + * Parameters:
70875 + * 1: subcommand
70876 */
70877 #define SMU_CMD_MISC_df_COMMAND 0xdf
70878 -#define SMU_CMD_MISC_df_SET_DISPLAY_LIT 0x02 /* i: 1 byte */
70879 +
70880 +/*
70881 + * Sets "system ready" status
70882 + *
70883 + * I did not yet understand how it exactly works or what it does.
70884 + *
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.
70889 + *
70890 + * Parameters:
70891 + * 2: status [0x00, 0x01 or 0x02]
70892 + */
70893 +#define SMU_CMD_MISC_df_SET_DISPLAY_LIT 0x02
70894 +
70895 +/*
70896 + * Sets mode of power switch.
70897 + *
70898 + * What this actually does is not yet known. Maybe it enables some interrupt.
70899 + *
70900 + * Parameters:
70901 + * 2: enable power switch? [0x00 or 0x01]
70902 + * 3 (optional): enable nmi? [0x00 or 0x01]
70903 + *
70904 + * Returns:
70905 + * If parameter 2 is 0x00 and parameter 3 is not specified, returns wether
70906 + * NMI is enabled. Otherwise unknown.
70907 + */
70908 #define SMU_CMD_MISC_df_NMI_OPTION 0x04
70909
70910 +/* Sets LED dimm offset.
70911 + *
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
70914 + * timezone.
70915 + *
70916 + * Parameters:
70917 + * 2-8: unknown (BCD coding)
70918 + */
70919 +#define SMU_CMD_MISC_df_DIMM_OFFSET 0x99
70920 +
70921 +
70922 /*
70923 * Version info commands
70924 *
70925 - * I haven't quite tried to figure out how these work
70926 + * Parameters:
70927 + * 1 (optional): Specifies version part to retrieve
70928 + *
70929 + * Returns:
70930 + * Version value
70931 */
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
70936 +
70937 +
70938 +/*
70939 + * Switches
70940 + *
70941 + * These are switches whose status seems to be known to the SMU.
70942 + *
70943 + * Parameters:
70944 + * none
70945 + *
70946 + * Result:
70947 + * Switch bits (ORed, see below)
70948 + */
70949 +#define SMU_CMD_SWITCHES 0xdc
70950 +
70951 +/* Switches bits */
70952 +#define SMU_SWITCH_CASE_CLOSED 0x01
70953 +#define SMU_SWITCH_AC_POWER 0x04
70954 +#define SMU_SWITCH_POWER_SWITCH 0x08
70955
70956
70957 /*
70958 @@ -243,10 +313,64 @@
70959 */
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] */
70963 +
70964 +/* Retrieves currently used watts.
70965 + *
70966 + * Parameters:
70967 + * 1: 0x03 (Meaning unknown)
70968 + */
70969 +#define SMU_CMD_MISC_ee_GET_WATTS 0x03
70970 +
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: ?? */
70973
70974
70975 +/*
70976 + * Power related commands
70977 + *
70978 + * Parameters:
70979 + * 1: subcommand
70980 + */
70981 +#define SMU_CMD_POWER_EVENTS_COMMAND 0x8f
70982 +
70983 +/* SMU_POWER_EVENTS subcommands */
70984 +enum {
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,
70991 +
70992 + /*
70993 + * Get last shutdown cause
70994 + *
70995 + * Returns:
70996 + * 1 byte (signed char): Last shutdown cause. Exact meaning unknown.
70997 + */
70998 + SMU_PWR_LAST_SHUTDOWN_CAUSE = 0x07,
70999 +
71000 + /*
71001 + * Sets or gets server ID. Meaning or use is unknown.
71002 + *
71003 + * Parameters:
71004 + * 2 (optional): Set server ID (1 byte)
71005 + *
71006 + * Returns:
71007 + * 1 byte (server ID?)
71008 + */
71009 + SMU_PWR_SERVER_ID = 0x08,
71010 +};
71011 +
71012 +/* Power events wakeup bits */
71013 +enum {
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,
71019 +};
71020 +
71021
71022 /*
71023 * - Kernel side interface -
71024 @@ -564,13 +688,13 @@
71025
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 */
71030 };
71031
71032 struct smu_user_reply_hdr
71033 {
71034 __u32 status; /* Command status */
71035 - __u32 reply_len; /* Lenght of data follwing */
71036 + __u32 reply_len; /* Length of data follwing */
71037 };
71038
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
71043 @@ -10,13 +10,8 @@
71044 */
71045 #define SECTION_SIZE_BITS 24
71046
71047 -#if defined(CONFIG_PS3_USE_LPAR_ADDR)
71048 -#define MAX_PHYSADDR_BITS 47
71049 -#define MAX_PHYSMEM_BITS 47
71050 -#else
71051 #define MAX_PHYSADDR_BITS 44
71052 #define MAX_PHYSMEM_BITS 44
71053 -#endif
71054
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 @@
71061
71062 struct spu_context;
71063 struct spu_runqueue;
71064 +struct spu_lscsa;
71065 struct device_node;
71066
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);
71073
71074 char irq_c0[8];
71075 char irq_c1[8];
71076 @@ -196,10 +196,11 @@
71077 extern struct cbe_spu_info cbe_spu_info[];
71078
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);
71083
71084 +void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
71085 + void *code, int code_size);
71086 +
71087 #ifdef CONFIG_KEXEC
71088 void crash_register_spus(struct list_head *list);
71089 #else
71090 @@ -210,6 +211,7 @@
71091
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);
71095
71096 /* Calls from the memory management to the SPU */
71097 struct mm_struct;
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);
71101
71102 +int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
71103 + unsigned long dsisr, unsigned *flt);
71104
71105 /*
71106 * Notifier blocks:
71107 @@ -303,7 +307,7 @@
71108 extern void do_notify_spus_active(void);
71109
71110 /*
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.
71113 */
71114
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 */
71140
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 @@
71145 };
71146
71147 /*
71148 - * struct spu_priv2_collapsed - condensed priviliged 2 area, w/o pads.
71149 + * struct spu_priv2_collapsed - condensed privileged 2 area, w/o pads.
71150 */
71151 struct spu_priv2_collapsed {
71152 u64 slb_index_W;
71153 @@ -254,20 +254,11 @@
71154 u64 spu_chnldata_RW[32];
71155 u32 spu_mailbox_data[4];
71156 u32 pu_mailbox_data[1];
71157 - u64 dar, dsisr;
71158 + u64 dar, dsisr, class_0_pending;
71159 unsigned long suspend_time;
71160 spinlock_t register_lock;
71161 };
71162
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);
71171 -
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
71178 @@ -24,6 +24,7 @@
71179 #include <linux/types.h>
71180
71181 struct spu;
71182 +struct spu_context;
71183
71184 /* access to priv1 registers */
71185
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);
71193 };
71194
71195 @@ -207,6 +210,18 @@
71196 return spu_management_ops->init_affinity();
71197 }
71198
71199 +static inline void
71200 +spu_enable_spu (struct spu_context *ctx)
71201 +{
71202 + spu_management_ops->enable_spu(ctx);
71203 +}
71204 +
71205 +static inline void
71206 +spu_disable_spu (struct spu_context *ctx)
71207 +{
71208 + spu_management_ops->disable_spu(ctx);
71209 +}
71210 +
71211 /*
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);
71222 +
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
71229 @@ -48,6 +48,7 @@
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);
71235
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
71267
71268 +#ifndef CONFIG_SERIAL_TEXT_DEBUG
71269 +#define PPC44x_EARLY_TLBS 1
71270 +#else
71271 +#define PPC44x_EARLY_TLBS 2
71272 +#endif
71273 +
71274 /*
71275 * Freescale Book-E MMU support
71276 */
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 @@
71281 u8 reserved16[3];
71282 u8 irfdr; /* PSC + 0x54 */
71283 u8 reserved17[3];
71284 +};
71285 +
71286 +struct mpc52xx_psc_fifo {
71287 u16 rfnum; /* PSC + 0x58 */
71288 u16 reserved18;
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 */
71295
71296 /* Bit definitions for the MCSR. */
71297 -#ifdef CONFIG_440A
71298 +#ifdef CONFIG_4xx
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
71314 @@ -17,6 +17,7 @@
71315 */
71316 #include <linux/types.h>
71317 #include <linux/bitops.h>
71318 +#include <linux/mod_devicetable.h>
71319
71320 #include <asm/prom.h>
71321
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))
71339 +
71340 extern struct property *of_find_property(const struct device_node *np,
71341 const char *name,
71342 int *lenp);
71343 @@ -56,5 +66,7 @@
71344 int *lenp);
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);
71349
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
71354 @@ -10,8 +10,6 @@
71355
71356 #define to_of_device(d) container_of(d, struct of_device, dev)
71357
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);
71362
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
71366 @@ -15,4 +15,13 @@
71367 unsigned int irq_flags;
71368 };
71369
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,
71375 + int __pio_mask);
71376 +
71377 +extern int __devexit __pata_platform_remove(struct device *dev);
71378 +
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
71383 @@ -1,38 +1,31 @@
71384 #ifndef __PHY_FIXED_H
71385 #define __PHY_FIXED_H
71386
71387 -#define MII_REGS_NUM 29
71388 -
71389 -/* max number of virtual phy stuff */
71390 -#define MAX_PHY_AMNT 10
71391 -/*
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.
71395 -*/
71396 -
71397 struct fixed_phy_status {
71398 - u8 link;
71399 - u16 speed;
71400 - u8 duplex;
71401 + int link;
71402 + int speed;
71403 + int duplex;
71404 + int pause;
71405 + int asym_pause;
71406 };
71407
71408 -/*-----------------------------------------------------------------------------
71409 - * Private information hoder for mii_bus
71410 - *-----------------------------------------------------------------------------*/
71411 -struct fixed_info {
71412 - u16 *regs;
71413 - u8 regs_num;
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);
71421 +#else
71422 +static inline int fixed_phy_add(unsigned int irq, int phy_id,
71423 + struct fixed_phy_status *status)
71424 +{
71425 + return -ENODEV;
71426 +}
71427 +#endif /* CONFIG_FIXED_PHY */
71428
71429 -};
71430 -
71431 -
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);
71435 +/*
71436 + * This function issued only by fixed_phy-aware drivers, no need
71437 + * protect it with #ifdef
71438 + */
71439 +extern int fixed_phy_set_link_update(struct phy_device *phydev,
71440 + int (*link_update)(struct net_device *,
71441 + struct fixed_phy_status *));
71442
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);
71450
71451 -#ifdef CONFIG_PM
71452 -/*
71453 - * Stuff for putting the powerbook to sleep and waking it again.
71454 - *
71455 - */
71456 -#include <linux/list.h>
71457 -
71458 -struct pmu_sleep_notifier
71459 -{
71460 - void (*notifier_call)(struct pmu_sleep_notifier *self, int when);
71461 - int priority;
71462 - struct list_head list;
71463 -};
71464 -
71465 -/* Code values for calling sleep/wakeup handlers
71466 - */
71467 -#define PBOOK_SLEEP_REQUEST 1
71468 -#define PBOOK_SLEEP_NOW 2
71469 -#define PBOOK_WAKE 3
71470 -
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) */
71480 -
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);
71484 -
71485 -#endif /* CONFIG_PM */
71486 +extern void pmu_backlight_set_sleep(int sleep);
71487
71488 #define PMU_MAX_BATTERIES 2
71489