aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-01-11 08:02:57 -0500
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-01-11 08:02:57 -0500
commit98c31c1d6c9c8a7e57cdac96ad574e0e172d3192 (patch)
treeab870590bfaf03fb8f9a41b7f61f0b329cd33498
parent78994e240fce03832ceebc875c43773a2c615e79 (diff)
parentf67702a37533f59eee3386578450eeeb531da279 (diff)
Merge branch 'virtex-for-2.6.25' of git://git.secretlab.ca/git/linux-2.6-virtex into for-2.6.25
-rw-r--r--Documentation/powerpc/booting-without-of.txt56
-rw-r--r--arch/powerpc/boot/serial.c3
-rw-r--r--arch/powerpc/platforms/40x/virtex.c12
-rw-r--r--arch/powerpc/sysdev/xilinx_intc.c8
-rw-r--r--drivers/serial/uartlite.c6
5 files changed, 56 insertions, 29 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index ee0209a7de3e..a9e2d5ea9a06 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -2292,7 +2292,7 @@ platforms are moved over to use the flattened-device-tree model.
2292 properties of the device node. In general, device nodes for IP-cores 2292 properties of the device node. In general, device nodes for IP-cores
2293 will take the following form: 2293 will take the following form:
2294 2294
2295 (name)@(base-address) { 2295 (name): (generic-name)@(base-address) {
2296 compatible = "xlnx,(ip-core-name)-(HW_VER)" 2296 compatible = "xlnx,(ip-core-name)-(HW_VER)"
2297 [, (list of compatible devices), ...]; 2297 [, (list of compatible devices), ...];
2298 reg = <(baseaddr) (size)>; 2298 reg = <(baseaddr) (size)>;
@@ -2302,6 +2302,9 @@ platforms are moved over to use the flattened-device-tree model.
2302 xlnx,(parameter2) = <(int-value)>; 2302 xlnx,(parameter2) = <(int-value)>;
2303 }; 2303 };
2304 2304
2305 (generic-name): an open firmware-style name that describes the
2306 generic class of device. Preferably, this is one word, such
2307 as 'serial' or 'ethernet'.
2305 (ip-core-name): the name of the ip block (given after the BEGIN 2308 (ip-core-name): the name of the ip block (given after the BEGIN
2306 directive in system.mhs). Should be in lowercase 2309 directive in system.mhs). Should be in lowercase
2307 and all underscores '_' converted to dashes '-'. 2310 and all underscores '_' converted to dashes '-'.
@@ -2310,9 +2313,9 @@ platforms are moved over to use the flattened-device-tree model.
2310 dropped from the parameter name, the name is converted 2313 dropped from the parameter name, the name is converted
2311 to lowercase and all underscore '_' characters are 2314 to lowercase and all underscore '_' characters are
2312 converted to dashes '-'. 2315 converted to dashes '-'.
2313 (baseaddr): the C_BASEADDR parameter. 2316 (baseaddr): the baseaddr parameter value (often named C_BASEADDR).
2314 (HW_VER): from the HW_VER parameter. 2317 (HW_VER): from the HW_VER parameter.
2315 (size): equals C_HIGHADDR - C_BASEADDR + 1 2318 (size): the address range size (often C_HIGHADDR - C_BASEADDR + 1).
2316 2319
2317 Typically, the compatible list will include the exact IP core version 2320 Typically, the compatible list will include the exact IP core version
2318 followed by an older IP core version which implements the same 2321 followed by an older IP core version which implements the same
@@ -2342,11 +2345,11 @@ platforms are moved over to use the flattened-device-tree model.
2342 2345
2343 becomes the following device tree node: 2346 becomes the following device tree node:
2344 2347
2345 opb-uartlite-0@ec100000 { 2348 opb_uartlite_0: serial@ec100000 {
2346 device_type = "serial"; 2349 device_type = "serial";
2347 compatible = "xlnx,opb-uartlite-1.00.b"; 2350 compatible = "xlnx,opb-uartlite-1.00.b";
2348 reg = <ec100000 10000>; 2351 reg = <ec100000 10000>;
2349 interrupt-parent = <&opb-intc>; 2352 interrupt-parent = <&opb_intc_0>;
2350 interrupts = <1 0>; // got this from the opb_intc parameters 2353 interrupts = <1 0>; // got this from the opb_intc parameters
2351 current-speed = <d#115200>; // standard serial device prop 2354 current-speed = <d#115200>; // standard serial device prop
2352 clock-frequency = <d#50000000>; // standard serial device prop 2355 clock-frequency = <d#50000000>; // standard serial device prop
@@ -2355,16 +2358,19 @@ platforms are moved over to use the flattened-device-tree model.
2355 xlnx,use-parity = <0>; 2358 xlnx,use-parity = <0>;
2356 }; 2359 };
2357 2360
2358 Some IP cores actually implement 2 or more logical devices. In this case, 2361 Some IP cores actually implement 2 or more logical devices. In
2359 the device should still describe the whole IP core with a single node 2362 this case, the device should still describe the whole IP core with
2360 and add a child node for each logical device. The ranges property can 2363 a single node and add a child node for each logical device. The
2361 be used to translate from parent IP-core to the registers of each device. 2364 ranges property can be used to translate from parent IP-core to the
2362 (Note: this makes the assumption that both logical devices have the same 2365 registers of each device. In addition, the parent node should be
2363 bus binding. If this is not true, then separate nodes should be used for 2366 compatible with the bus type 'xlnx,compound', and should contain
2364 each logical device). The 'cell-index' property can be used to enumerate 2367 #address-cells and #size-cells, as with any other bus. (Note: this
2365 logical devices within an IP core. For example, the following is the 2368 makes the assumption that both logical devices have the same bus
2366 system.mhs entry for the dual ps2 controller found on the ml403 reference 2369 binding. If this is not true, then separate nodes should be used
2367 design. 2370 for each logical device). The 'cell-index' property can be used to
2371 enumerate logical devices within an IP core. For example, the
2372 following is the system.mhs entry for the dual ps2 controller found
2373 on the ml403 reference design.
2368 2374
2369 BEGIN opb_ps2_dual_ref 2375 BEGIN opb_ps2_dual_ref
2370 PARAMETER INSTANCE = opb_ps2_dual_ref_0 2376 PARAMETER INSTANCE = opb_ps2_dual_ref_0
@@ -2386,21 +2392,24 @@ platforms are moved over to use the flattened-device-tree model.
2386 2392
2387 It would result in the following device tree nodes: 2393 It would result in the following device tree nodes:
2388 2394
2389 opb_ps2_dual_ref_0@a9000000 { 2395 opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {
2396 #address-cells = <1>;
2397 #size-cells = <1>;
2398 compatible = "xlnx,compound";
2390 ranges = <0 a9000000 2000>; 2399 ranges = <0 a9000000 2000>;
2391 // If this device had extra parameters, then they would 2400 // If this device had extra parameters, then they would
2392 // go here. 2401 // go here.
2393 ps2@0 { 2402 ps2@0 {
2394 compatible = "xlnx,opb-ps2-dual-ref-1.00.a"; 2403 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
2395 reg = <0 40>; 2404 reg = <0 40>;
2396 interrupt-parent = <&opb-intc>; 2405 interrupt-parent = <&opb_intc_0>;
2397 interrupts = <3 0>; 2406 interrupts = <3 0>;
2398 cell-index = <0>; 2407 cell-index = <0>;
2399 }; 2408 };
2400 ps2@1000 { 2409 ps2@1000 {
2401 compatible = "xlnx,opb-ps2-dual-ref-1.00.a"; 2410 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
2402 reg = <1000 40>; 2411 reg = <1000 40>;
2403 interrupt-parent = <&opb-intc>; 2412 interrupt-parent = <&opb_intc_0>;
2404 interrupts = <3 0>; 2413 interrupts = <3 0>;
2405 cell-index = <0>; 2414 cell-index = <0>;
2406 }; 2415 };
@@ -2463,17 +2472,18 @@ platforms are moved over to use the flattened-device-tree model.
2463 2472
2464 Gives this device tree (some properties removed for clarity): 2473 Gives this device tree (some properties removed for clarity):
2465 2474
2466 plb-v34-0 { 2475 plb@0 {
2467 #address-cells = <1>; 2476 #address-cells = <1>;
2468 #size-cells = <1>; 2477 #size-cells = <1>;
2478 compatible = "xlnx,plb-v34-1.02.a";
2469 device_type = "ibm,plb"; 2479 device_type = "ibm,plb";
2470 ranges; // 1:1 translation 2480 ranges; // 1:1 translation
2471 2481
2472 plb-bram-if-cntrl-0@ffff0000 { 2482 plb_bram_if_cntrl_0: bram@ffff0000 {
2473 reg = <ffff0000 10000>; 2483 reg = <ffff0000 10000>;
2474 } 2484 }
2475 2485
2476 opb-v20-0 { 2486 opb@20000000 {
2477 #address-cells = <1>; 2487 #address-cells = <1>;
2478 #size-cells = <1>; 2488 #size-cells = <1>;
2479 ranges = <20000000 20000000 20000000 2489 ranges = <20000000 20000000 20000000
@@ -2481,11 +2491,11 @@ platforms are moved over to use the flattened-device-tree model.
2481 80000000 80000000 40000000 2491 80000000 80000000 40000000
2482 c0000000 c0000000 20000000>; 2492 c0000000 c0000000 20000000>;
2483 2493
2484 opb-uart16550-0@a0000000 { 2494 opb_uart16550_0: serial@a0000000 {
2485 reg = <a00000000 2000>; 2495 reg = <a00000000 2000>;
2486 }; 2496 };
2487 2497
2488 opb-intc-0@d1000fc0 { 2498 opb_intc_0: interrupt-controller@d1000fc0 {
2489 reg = <d1000fc0 20>; 2499 reg = <d1000fc0 20>;
2490 }; 2500 };
2491 }; 2501 };
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index cafeece20ac7..b6c68ef46809 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -128,7 +128,8 @@ int serial_console_init(void)
128 rc = cpm_console_init(devp, &serial_cd); 128 rc = cpm_console_init(devp, &serial_cd);
129 else if (dt_is_compatible(devp, "mpc5200-psc-uart")) 129 else if (dt_is_compatible(devp, "mpc5200-psc-uart"))
130 rc = mpc5200_psc_console_init(devp, &serial_cd); 130 rc = mpc5200_psc_console_init(devp, &serial_cd);
131 else if (dt_is_compatible(devp, "xilinx,uartlite")) 131 else if (dt_is_compatible(devp, "xlnx,opb-uartlite-1.00.b") ||
132 dt_is_compatible(devp, "xlnx,xps-uartlite-1.00.a"))
132 rc = uartlite_console_init(devp, &serial_cd); 133 rc = uartlite_console_init(devp, &serial_cd);
133 134
134 /* Add other serial console driver calls here */ 135 /* Add other serial console driver calls here */
diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c
index 43fcc8e9f7d0..88b66444dfb2 100644
--- a/arch/powerpc/platforms/40x/virtex.c
+++ b/arch/powerpc/platforms/40x/virtex.c
@@ -15,9 +15,19 @@
15#include <asm/time.h> 15#include <asm/time.h>
16#include <asm/xilinx_intc.h> 16#include <asm/xilinx_intc.h>
17 17
18static struct of_device_id xilinx_of_bus_ids[] __initdata = {
19 { .compatible = "xlnx,plb-v46-1.00.a", },
20 { .compatible = "xlnx,plb-v34-1.01.a", },
21 { .compatible = "xlnx,plb-v34-1.02.a", },
22 { .compatible = "xlnx,opb-v20-1.10.c", },
23 { .compatible = "xlnx,dcr-v29-1.00.a", },
24 { .compatible = "xlnx,compound", },
25 {}
26};
27
18static int __init virtex_device_probe(void) 28static int __init virtex_device_probe(void)
19{ 29{
20 of_platform_bus_probe(NULL, NULL, NULL); 30 of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL);
21 31
22 return 0; 32 return 0;
23} 33}
diff --git a/arch/powerpc/sysdev/xilinx_intc.c b/arch/powerpc/sysdev/xilinx_intc.c
index c2f17cc43dfa..ba8eea2bcce0 100644
--- a/arch/powerpc/sysdev/xilinx_intc.c
+++ b/arch/powerpc/sysdev/xilinx_intc.c
@@ -135,10 +135,16 @@ void __init xilinx_intc_init_tree(void)
135 struct device_node *np; 135 struct device_node *np;
136 136
137 /* find top level interrupt controller */ 137 /* find top level interrupt controller */
138 for_each_compatible_node(np, NULL, "xilinx,intc") { 138 for_each_compatible_node(np, NULL, "xlnx,opb-intc-1.00.c") {
139 if (!of_get_property(np, "interrupts", NULL)) 139 if (!of_get_property(np, "interrupts", NULL))
140 break; 140 break;
141 } 141 }
142 if (!np) {
143 for_each_compatible_node(np, NULL, "xlnx,xps-intc-1.00.a") {
144 if (!of_get_property(np, "interrupts", NULL))
145 break;
146 }
147 }
142 148
143 /* xilinx interrupt controller needs to be top level */ 149 /* xilinx interrupt controller needs to be top level */
144 BUG_ON(!np); 150 BUG_ON(!np);
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index 3f593247c41e..80943409edb0 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -539,7 +539,7 @@ static int __devinit ulite_assign(struct device *dev, int id, u32 base, int irq)
539 * 539 *
540 * @dev: pointer to device structure 540 * @dev: pointer to device structure
541 */ 541 */
542static int __devinit ulite_release(struct device *dev) 542static int __devexit ulite_release(struct device *dev)
543{ 543{
544 struct uart_port *port = dev_get_drvdata(dev); 544 struct uart_port *port = dev_get_drvdata(dev);
545 int rc = 0; 545 int rc = 0;
@@ -572,14 +572,14 @@ static int __devinit ulite_probe(struct platform_device *pdev)
572 return ulite_assign(&pdev->dev, pdev->id, res->start, res2->start); 572 return ulite_assign(&pdev->dev, pdev->id, res->start, res2->start);
573} 573}
574 574
575static int ulite_remove(struct platform_device *pdev) 575static int __devexit ulite_remove(struct platform_device *pdev)
576{ 576{
577 return ulite_release(&pdev->dev); 577 return ulite_release(&pdev->dev);
578} 578}
579 579
580static struct platform_driver ulite_platform_driver = { 580static struct platform_driver ulite_platform_driver = {
581 .probe = ulite_probe, 581 .probe = ulite_probe,
582 .remove = ulite_remove, 582 .remove = __devexit_p(ulite_remove),
583 .driver = { 583 .driver = {
584 .owner = THIS_MODULE, 584 .owner = THIS_MODULE,
585 .name = "uartlite", 585 .name = "uartlite",