diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-12-17 18:22:27 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-12-17 18:22:27 -0500 |
commit | 376bddd34433065aeb9b9a140870537feecf90ef (patch) | |
tree | a40e2b84ad89f4b3ba968de65a4bf7ff6ccae835 /arch/powerpc | |
parent | d526e85f60fce9aa2a1432cbd06e3cf20c1644c8 (diff) | |
parent | 667b504a2c411e4d5915a6e2260a3857ba9f797a (diff) |
Merge remote-tracking branch 'agust/next' into next
Brings some 52xx updates. Also manually merged tools/perf/perf.h.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/boot/dts/a3m071.dts | 144 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc5121_ads.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x.h | 11 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x_shared.c | 25 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc5200_simple.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 16 |
7 files changed, 162 insertions, 39 deletions
diff --git a/arch/powerpc/boot/dts/a3m071.dts b/arch/powerpc/boot/dts/a3m071.dts new file mode 100644 index 000000000000..877a28cb77e4 --- /dev/null +++ b/arch/powerpc/boot/dts/a3m071.dts | |||
@@ -0,0 +1,144 @@ | |||
1 | /* | ||
2 | * a3m071 board Device Tree Source | ||
3 | * | ||
4 | * Copyright 2012 Stefan Roese <sr@denx.de> | ||
5 | * | ||
6 | * Copyright (C) 2011 DENX Software Engineering GmbH | ||
7 | * Heiko Schocher <hs@denx.de> | ||
8 | * | ||
9 | * Copyright (C) 2007 Semihalf | ||
10 | * Marian Balakowicz <m8@semihalf.com> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | |||
18 | /include/ "mpc5200b.dtsi" | ||
19 | |||
20 | / { | ||
21 | model = "anonymous,a3m071"; | ||
22 | compatible = "anonymous,a3m071"; | ||
23 | |||
24 | soc5200@f0000000 { | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <1>; | ||
27 | compatible = "fsl,mpc5200b-immr"; | ||
28 | ranges = <0 0xf0000000 0x0000c000>; | ||
29 | reg = <0xf0000000 0x00000100>; | ||
30 | bus-frequency = <0>; /* From boot loader */ | ||
31 | system-frequency = <0>; /* From boot loader */ | ||
32 | |||
33 | timer@600 { | ||
34 | fsl,has-wdt; | ||
35 | }; | ||
36 | |||
37 | spi@f00 { | ||
38 | status = "disabled"; | ||
39 | }; | ||
40 | |||
41 | usb: usb@1000 { | ||
42 | status = "disabled"; | ||
43 | }; | ||
44 | |||
45 | psc@2000 { | ||
46 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | ||
47 | reg = <0x2000 0x100>; | ||
48 | interrupts = <2 1 0>; | ||
49 | }; | ||
50 | |||
51 | psc@2200 { | ||
52 | status = "disabled"; | ||
53 | }; | ||
54 | |||
55 | psc@2400 { | ||
56 | status = "disabled"; | ||
57 | }; | ||
58 | |||
59 | psc@2600 { | ||
60 | status = "disabled"; | ||
61 | }; | ||
62 | |||
63 | psc@2800 { | ||
64 | status = "disabled"; | ||
65 | }; | ||
66 | |||
67 | psc@2c00 { // PSC6 | ||
68 | compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart"; | ||
69 | reg = <0x2c00 0x100>; | ||
70 | interrupts = <2 4 0>; | ||
71 | }; | ||
72 | |||
73 | ethernet@3000 { | ||
74 | phy-handle = <&phy0>; | ||
75 | }; | ||
76 | |||
77 | mdio@3000 { | ||
78 | phy0: ethernet-phy@3 { | ||
79 | reg = <0x03>; | ||
80 | }; | ||
81 | }; | ||
82 | |||
83 | ata@3a00 { | ||
84 | status = "disabled"; | ||
85 | }; | ||
86 | |||
87 | i2c@3d00 { | ||
88 | status = "disabled"; | ||
89 | }; | ||
90 | |||
91 | i2c@3d40 { | ||
92 | status = "disabled"; | ||
93 | }; | ||
94 | }; | ||
95 | |||
96 | localbus { | ||
97 | compatible = "fsl,mpc5200b-lpb","simple-bus"; | ||
98 | #address-cells = <2>; | ||
99 | #size-cells = <1>; | ||
100 | ranges = <0 0 0xfc000000 0x02000000 | ||
101 | 3 0 0xe9000000 0x00080000 | ||
102 | 5 0 0xe8000000 0x00010000>; | ||
103 | |||
104 | flash@0,0 { | ||
105 | #address-cells = <1>; | ||
106 | #size-cells = <1>; | ||
107 | reg = <0 0x0 0x02000000>; | ||
108 | compatible = "cfi-flash"; | ||
109 | bank-width = <2>; | ||
110 | partition@0x0 { | ||
111 | label = "u-boot"; | ||
112 | reg = <0x00000000 0x00040000>; | ||
113 | read-only; | ||
114 | }; | ||
115 | partition@0x00040000 { | ||
116 | label = "env"; | ||
117 | reg = <0x00040000 0x00020000>; | ||
118 | }; | ||
119 | partition@0x00060000 { | ||
120 | label = "dtb"; | ||
121 | reg = <0x00060000 0x00020000>; | ||
122 | }; | ||
123 | partition@0x00080000 { | ||
124 | label = "kernel"; | ||
125 | reg = <0x00080000 0x00500000>; | ||
126 | }; | ||
127 | partition@0x00580000 { | ||
128 | label = "root"; | ||
129 | reg = <0x00580000 0x00A80000>; | ||
130 | }; | ||
131 | }; | ||
132 | |||
133 | fpga@3,0 { | ||
134 | compatible = "anonymous,a3m071-fpga"; | ||
135 | reg = <3 0x0 0x00080000 | ||
136 | 5 0x0 0x00010000>; | ||
137 | interrupts = <0 0 3>; /* level low */ | ||
138 | }; | ||
139 | }; | ||
140 | |||
141 | pci@f0000d00 { | ||
142 | status = "disabled"; | ||
143 | }; | ||
144 | }; | ||
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig index b62508b113db..c16999802ecf 100644 --- a/arch/powerpc/platforms/512x/Kconfig +++ b/arch/powerpc/platforms/512x/Kconfig | |||
@@ -2,7 +2,6 @@ config PPC_MPC512x | |||
2 | bool "512x-based boards" | 2 | bool "512x-based boards" |
3 | depends on 6xx | 3 | depends on 6xx |
4 | select FSL_SOC | 4 | select FSL_SOC |
5 | select FB_FSL_DIU | ||
6 | select IPIC | 5 | select IPIC |
7 | select PPC_CLOCK | 6 | select PPC_CLOCK |
8 | select PPC_PCI_CHOICE | 7 | select PPC_PCI_CHOICE |
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c index dcef6ade48e1..0a134e0469ef 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads.c +++ b/arch/powerpc/platforms/512x/mpc5121_ads.c | |||
@@ -42,7 +42,10 @@ static void __init mpc5121_ads_setup_arch(void) | |||
42 | for_each_compatible_node(np, "pci", "fsl,mpc5121-pci") | 42 | for_each_compatible_node(np, "pci", "fsl,mpc5121-pci") |
43 | mpc83xx_add_bridge(np); | 43 | mpc83xx_add_bridge(np); |
44 | #endif | 44 | #endif |
45 | |||
46 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | ||
45 | mpc512x_setup_diu(); | 47 | mpc512x_setup_diu(); |
48 | #endif | ||
46 | } | 49 | } |
47 | 50 | ||
48 | static void __init mpc5121_ads_init_IRQ(void) | 51 | static void __init mpc5121_ads_init_IRQ(void) |
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h index 1ab6d11d0b19..c32b399eb952 100644 --- a/arch/powerpc/platforms/512x/mpc512x.h +++ b/arch/powerpc/platforms/512x/mpc512x.h | |||
@@ -16,6 +16,13 @@ extern void __init mpc512x_init(void); | |||
16 | extern int __init mpc5121_clk_init(void); | 16 | extern int __init mpc5121_clk_init(void); |
17 | void __init mpc512x_declare_of_platform_devices(void); | 17 | void __init mpc512x_declare_of_platform_devices(void); |
18 | extern void mpc512x_restart(char *cmd); | 18 | extern void mpc512x_restart(char *cmd); |
19 | extern void mpc512x_init_diu(void); | 19 | |
20 | extern void mpc512x_setup_diu(void); | 20 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) |
21 | void mpc512x_init_diu(void); | ||
22 | void mpc512x_setup_diu(void); | ||
23 | #else | ||
24 | #define mpc512x_init_diu NULL | ||
25 | #define mpc512x_setup_diu NULL | ||
26 | #endif | ||
27 | |||
21 | #endif /* __MPC512X_H__ */ | 28 | #endif /* __MPC512X_H__ */ |
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c index 1650e090ef3a..35f14fda108a 100644 --- a/arch/powerpc/platforms/512x/mpc512x_shared.c +++ b/arch/powerpc/platforms/512x/mpc512x_shared.c | |||
@@ -58,6 +58,8 @@ void mpc512x_restart(char *cmd) | |||
58 | ; | 58 | ; |
59 | } | 59 | } |
60 | 60 | ||
61 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | ||
62 | |||
61 | struct fsl_diu_shared_fb { | 63 | struct fsl_diu_shared_fb { |
62 | u8 gamma[0x300]; /* 32-bit aligned! */ | 64 | u8 gamma[0x300]; /* 32-bit aligned! */ |
63 | struct diu_ad ad0; /* 32-bit aligned! */ | 65 | struct diu_ad ad0; /* 32-bit aligned! */ |
@@ -66,25 +68,6 @@ struct fsl_diu_shared_fb { | |||
66 | bool in_use; | 68 | bool in_use; |
67 | }; | 69 | }; |
68 | 70 | ||
69 | u32 mpc512x_get_pixel_format(enum fsl_diu_monitor_port port, | ||
70 | unsigned int bits_per_pixel) | ||
71 | { | ||
72 | switch (bits_per_pixel) { | ||
73 | case 32: | ||
74 | return 0x88883316; | ||
75 | case 24: | ||
76 | return 0x88082219; | ||
77 | case 16: | ||
78 | return 0x65053118; | ||
79 | } | ||
80 | return 0x00000400; | ||
81 | } | ||
82 | |||
83 | void mpc512x_set_gamma_table(enum fsl_diu_monitor_port port, | ||
84 | char *gamma_table_base) | ||
85 | { | ||
86 | } | ||
87 | |||
88 | void mpc512x_set_monitor_port(enum fsl_diu_monitor_port port) | 71 | void mpc512x_set_monitor_port(enum fsl_diu_monitor_port port) |
89 | { | 72 | { |
90 | } | 73 | } |
@@ -320,14 +303,14 @@ void __init mpc512x_setup_diu(void) | |||
320 | } | 303 | } |
321 | } | 304 | } |
322 | 305 | ||
323 | diu_ops.get_pixel_format = mpc512x_get_pixel_format; | ||
324 | diu_ops.set_gamma_table = mpc512x_set_gamma_table; | ||
325 | diu_ops.set_monitor_port = mpc512x_set_monitor_port; | 306 | diu_ops.set_monitor_port = mpc512x_set_monitor_port; |
326 | diu_ops.set_pixel_clock = mpc512x_set_pixel_clock; | 307 | diu_ops.set_pixel_clock = mpc512x_set_pixel_clock; |
327 | diu_ops.valid_monitor_port = mpc512x_valid_monitor_port; | 308 | diu_ops.valid_monitor_port = mpc512x_valid_monitor_port; |
328 | diu_ops.release_bootmem = mpc512x_release_bootmem; | 309 | diu_ops.release_bootmem = mpc512x_release_bootmem; |
329 | } | 310 | } |
330 | 311 | ||
312 | #endif | ||
313 | |||
331 | void __init mpc512x_init_IRQ(void) | 314 | void __init mpc512x_init_IRQ(void) |
332 | { | 315 | { |
333 | struct device_node *np; | 316 | struct device_node *np; |
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c index 9cf36020cf0d..792a301a0bf0 100644 --- a/arch/powerpc/platforms/52xx/mpc5200_simple.c +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c | |||
@@ -50,6 +50,7 @@ static void __init mpc5200_simple_setup_arch(void) | |||
50 | 50 | ||
51 | /* list of the supported boards */ | 51 | /* list of the supported boards */ |
52 | static const char *board[] __initdata = { | 52 | static const char *board[] __initdata = { |
53 | "anonymous,a3m071", | ||
53 | "anonymous,a4m072", | 54 | "anonymous,a4m072", |
54 | "anon,charon", | 55 | "anon,charon", |
55 | "ifm,o2d", | 56 | "ifm,o2d", |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index 2351f9e0fb6f..16150fa430f9 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | |||
@@ -578,18 +578,4 @@ static struct platform_driver mpc52xx_lpbfifo_driver = { | |||
578 | .probe = mpc52xx_lpbfifo_probe, | 578 | .probe = mpc52xx_lpbfifo_probe, |
579 | .remove = __devexit_p(mpc52xx_lpbfifo_remove), | 579 | .remove = __devexit_p(mpc52xx_lpbfifo_remove), |
580 | }; | 580 | }; |
581 | 581 | module_platform_driver(mpc52xx_lpbfifo_driver); | |
582 | /*********************************************************************** | ||
583 | * Module init/exit | ||
584 | */ | ||
585 | static int __init mpc52xx_lpbfifo_init(void) | ||
586 | { | ||
587 | return platform_driver_register(&mpc52xx_lpbfifo_driver); | ||
588 | } | ||
589 | module_init(mpc52xx_lpbfifo_init); | ||
590 | |||
591 | static void __exit mpc52xx_lpbfifo_exit(void) | ||
592 | { | ||
593 | platform_driver_unregister(&mpc52xx_lpbfifo_driver); | ||
594 | } | ||
595 | module_exit(mpc52xx_lpbfifo_exit); | ||