Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: drop HPCD/MPC8610 evaluation platform support

This evaluation platform was essentially a single core 8641 with
integrated graphics/display support - in an effort to reduce chip count
on kiosk and similar applications.

Compared to other evaluation platforms considered for removal in other
recent commits, this platform was relatively rare. Unlike all the other
10+ platforms, I couldn't find any documentation on it - just a link to
downloading the 2007 era BSP in "LTIB" format as was done back then.

With all that in mind, it seems prudent to remove it here in 2023.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
[mpe: Drop stale reference to MPC8610_HPCD in 86xx/Kconfig]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230225201318.3682-4-paul.gortmaker@windriver.com

authored by

Paul Gortmaker and committed by
Michael Ellerman
248667f8 c1d85f3f

-835
-503
arch/powerpc/boot/dts/mpc8610_hpcd.dts
··· 1 - // SPDX-License-Identifier: GPL-2.0-only 2 - /* 3 - * MPC8610 HPCD Device Tree Source 4 - * 5 - * Copyright 2007-2008 Freescale Semiconductor Inc. 6 - */ 7 - 8 - /dts-v1/; 9 - 10 - / { 11 - model = "MPC8610HPCD"; 12 - compatible = "fsl,MPC8610HPCD"; 13 - #address-cells = <1>; 14 - #size-cells = <1>; 15 - 16 - aliases { 17 - serial0 = &serial0; 18 - serial1 = &serial1; 19 - pci0 = &pci0; 20 - pci1 = &pci1; 21 - pci2 = &pci2; 22 - }; 23 - 24 - cpus { 25 - #address-cells = <1>; 26 - #size-cells = <0>; 27 - 28 - PowerPC,8610@0 { 29 - device_type = "cpu"; 30 - reg = <0>; 31 - d-cache-line-size = <32>; 32 - i-cache-line-size = <32>; 33 - d-cache-size = <32768>; // L1 34 - i-cache-size = <32768>; // L1 35 - sleep = <&pmc 0x00008000 0 // core 36 - &pmc 0x00004000 0>; // timebase 37 - timebase-frequency = <0>; // From uboot 38 - bus-frequency = <0>; // From uboot 39 - clock-frequency = <0>; // From uboot 40 - }; 41 - }; 42 - 43 - memory { 44 - device_type = "memory"; 45 - reg = <0x00000000 0x20000000>; // 512M at 0x0 46 - }; 47 - 48 - localbus@e0005000 { 49 - #address-cells = <2>; 50 - #size-cells = <1>; 51 - compatible = "fsl,mpc8610-elbc", "fsl,elbc", "simple-bus"; 52 - reg = <0xe0005000 0x1000>; 53 - interrupts = <19 2>; 54 - interrupt-parent = <&mpic>; 55 - ranges = <0 0 0xf8000000 0x08000000 56 - 1 0 0xf0000000 0x08000000 57 - 2 0 0xe8400000 0x00008000 58 - 4 0 0xe8440000 0x00008000 59 - 5 0 0xe8480000 0x00008000 60 - 6 0 0xe84c0000 0x00008000 61 - 3 0 0xe8000000 0x00000020>; 62 - sleep = <&pmc 0x08000000 0>; 63 - 64 - flash@0,0 { 65 - compatible = "cfi-flash"; 66 - reg = <0 0 0x8000000>; 67 - bank-width = <2>; 68 - device-width = <1>; 69 - }; 70 - 71 - flash@1,0 { 72 - compatible = "cfi-flash"; 73 - reg = <1 0 0x8000000>; 74 - bank-width = <2>; 75 - device-width = <1>; 76 - }; 77 - 78 - flash@2,0 { 79 - compatible = "fsl,mpc8610-fcm-nand", 80 - "fsl,elbc-fcm-nand"; 81 - reg = <2 0 0x8000>; 82 - }; 83 - 84 - flash@4,0 { 85 - compatible = "fsl,mpc8610-fcm-nand", 86 - "fsl,elbc-fcm-nand"; 87 - reg = <4 0 0x8000>; 88 - }; 89 - 90 - flash@5,0 { 91 - compatible = "fsl,mpc8610-fcm-nand", 92 - "fsl,elbc-fcm-nand"; 93 - reg = <5 0 0x8000>; 94 - }; 95 - 96 - flash@6,0 { 97 - compatible = "fsl,mpc8610-fcm-nand", 98 - "fsl,elbc-fcm-nand"; 99 - reg = <6 0 0x8000>; 100 - }; 101 - 102 - board-control@3,0 { 103 - #address-cells = <1>; 104 - #size-cells = <1>; 105 - compatible = "fsl,fpga-pixis"; 106 - reg = <3 0 0x20>; 107 - ranges = <0 3 0 0x20>; 108 - interrupt-parent = <&mpic>; 109 - interrupts = <8 8>; 110 - 111 - sdcsr_pio: gpio-controller@a { 112 - #gpio-cells = <2>; 113 - compatible = "fsl,fpga-pixis-gpio-bank"; 114 - reg = <0xa 1>; 115 - gpio-controller; 116 - }; 117 - }; 118 - }; 119 - 120 - soc@e0000000 { 121 - #address-cells = <1>; 122 - #size-cells = <1>; 123 - #interrupt-cells = <2>; 124 - device_type = "soc"; 125 - compatible = "fsl,mpc8610-immr", "simple-bus"; 126 - ranges = <0x0 0xe0000000 0x00100000>; 127 - bus-frequency = <0>; 128 - 129 - mcm-law@0 { 130 - compatible = "fsl,mcm-law"; 131 - reg = <0x0 0x1000>; 132 - fsl,num-laws = <10>; 133 - }; 134 - 135 - mcm@1000 { 136 - compatible = "fsl,mpc8610-mcm", "fsl,mcm"; 137 - reg = <0x1000 0x1000>; 138 - interrupts = <17 2>; 139 - interrupt-parent = <&mpic>; 140 - }; 141 - 142 - i2c@3000 { 143 - #address-cells = <1>; 144 - #size-cells = <0>; 145 - cell-index = <0>; 146 - compatible = "fsl-i2c"; 147 - reg = <0x3000 0x100>; 148 - interrupts = <43 2>; 149 - interrupt-parent = <&mpic>; 150 - dfsrr; 151 - 152 - cs4270:codec@4f { 153 - compatible = "cirrus,cs4270"; 154 - reg = <0x4f>; 155 - /* MCLK source is a stand-alone oscillator */ 156 - clock-frequency = <12288000>; 157 - }; 158 - }; 159 - 160 - i2c@3100 { 161 - #address-cells = <1>; 162 - #size-cells = <0>; 163 - cell-index = <1>; 164 - compatible = "fsl-i2c"; 165 - reg = <0x3100 0x100>; 166 - interrupts = <43 2>; 167 - interrupt-parent = <&mpic>; 168 - sleep = <&pmc 0x00000004 0>; 169 - dfsrr; 170 - }; 171 - 172 - serial0: serial@4500 { 173 - cell-index = <0>; 174 - device_type = "serial"; 175 - compatible = "fsl,ns16550", "ns16550"; 176 - reg = <0x4500 0x100>; 177 - clock-frequency = <0>; 178 - interrupts = <42 2>; 179 - interrupt-parent = <&mpic>; 180 - sleep = <&pmc 0x00000002 0>; 181 - }; 182 - 183 - serial1: serial@4600 { 184 - cell-index = <1>; 185 - device_type = "serial"; 186 - compatible = "fsl,ns16550", "ns16550"; 187 - reg = <0x4600 0x100>; 188 - clock-frequency = <0>; 189 - interrupts = <42 2>; 190 - interrupt-parent = <&mpic>; 191 - sleep = <&pmc 0x00000008 0>; 192 - }; 193 - 194 - spi@7000 { 195 - #address-cells = <1>; 196 - #size-cells = <0>; 197 - compatible = "fsl,mpc8610-spi", "fsl,spi"; 198 - reg = <0x7000 0x40>; 199 - cell-index = <0>; 200 - interrupts = <59 2>; 201 - interrupt-parent = <&mpic>; 202 - mode = "cpu"; 203 - cs-gpios = <&sdcsr_pio 7 0>; 204 - sleep = <&pmc 0x00000800 0>; 205 - 206 - mmc-slot@0 { 207 - compatible = "fsl,mpc8610hpcd-mmc-slot", 208 - "mmc-spi-slot"; 209 - reg = <0>; 210 - gpios = <&sdcsr_pio 0 1 /* nCD */ 211 - &sdcsr_pio 1 0>; /* WP */ 212 - voltage-ranges = <3300 3300>; 213 - spi-max-frequency = <50000000>; 214 - }; 215 - }; 216 - 217 - display@2c000 { 218 - compatible = "fsl,diu"; 219 - reg = <0x2c000 100>; 220 - interrupts = <72 2>; 221 - interrupt-parent = <&mpic>; 222 - sleep = <&pmc 0x04000000 0>; 223 - }; 224 - 225 - mpic: interrupt-controller@40000 { 226 - interrupt-controller; 227 - #address-cells = <0>; 228 - #interrupt-cells = <2>; 229 - reg = <0x40000 0x40000>; 230 - compatible = "chrp,open-pic"; 231 - device_type = "open-pic"; 232 - }; 233 - 234 - msi@41600 { 235 - compatible = "fsl,mpc8610-msi", "fsl,mpic-msi"; 236 - reg = <0x41600 0x80>; 237 - msi-available-ranges = <0 0x100>; 238 - interrupts = < 239 - 0xe0 0 240 - 0xe1 0 241 - 0xe2 0 242 - 0xe3 0 243 - 0xe4 0 244 - 0xe5 0 245 - 0xe6 0 246 - 0xe7 0>; 247 - interrupt-parent = <&mpic>; 248 - }; 249 - 250 - global-utilities@e0000 { 251 - #address-cells = <1>; 252 - #size-cells = <1>; 253 - compatible = "fsl,mpc8610-guts"; 254 - reg = <0xe0000 0x1000>; 255 - ranges = <0 0xe0000 0x1000>; 256 - fsl,has-rstcr; 257 - 258 - pmc: power@70 { 259 - compatible = "fsl,mpc8610-pmc", 260 - "fsl,mpc8641d-pmc"; 261 - reg = <0x70 0x20>; 262 - }; 263 - }; 264 - 265 - wdt@e4000 { 266 - compatible = "fsl,mpc8610-wdt"; 267 - reg = <0xe4000 0x100>; 268 - }; 269 - 270 - ssi@16000 { 271 - compatible = "fsl,mpc8610-ssi"; 272 - cell-index = <0>; 273 - reg = <0x16000 0x100>; 274 - interrupt-parent = <&mpic>; 275 - interrupts = <62 2>; 276 - fsl,mode = "i2s-slave"; 277 - codec-handle = <&cs4270>; 278 - fsl,playback-dma = <&dma00>; 279 - fsl,capture-dma = <&dma01>; 280 - fsl,fifo-depth = <8>; 281 - sleep = <&pmc 0 0x08000000>; 282 - }; 283 - 284 - ssi@16100 { 285 - compatible = "fsl,mpc8610-ssi"; 286 - status = "disabled"; 287 - cell-index = <1>; 288 - reg = <0x16100 0x100>; 289 - interrupt-parent = <&mpic>; 290 - interrupts = <63 2>; 291 - fsl,fifo-depth = <8>; 292 - sleep = <&pmc 0 0x04000000>; 293 - }; 294 - 295 - dma@21300 { 296 - #address-cells = <1>; 297 - #size-cells = <1>; 298 - compatible = "fsl,mpc8610-dma", "fsl,eloplus-dma"; 299 - cell-index = <0>; 300 - reg = <0x21300 0x4>; /* DMA general status register */ 301 - ranges = <0x0 0x21100 0x200>; 302 - sleep = <&pmc 0x00000400 0>; 303 - 304 - dma00: dma-channel@0 { 305 - compatible = "fsl,mpc8610-dma-channel", 306 - "fsl,ssi-dma-channel"; 307 - cell-index = <0>; 308 - reg = <0x0 0x80>; 309 - interrupt-parent = <&mpic>; 310 - interrupts = <20 2>; 311 - }; 312 - dma01: dma-channel@1 { 313 - compatible = "fsl,mpc8610-dma-channel", 314 - "fsl,ssi-dma-channel"; 315 - cell-index = <1>; 316 - reg = <0x80 0x80>; 317 - interrupt-parent = <&mpic>; 318 - interrupts = <21 2>; 319 - }; 320 - dma-channel@2 { 321 - compatible = "fsl,mpc8610-dma-channel", 322 - "fsl,eloplus-dma-channel"; 323 - cell-index = <2>; 324 - reg = <0x100 0x80>; 325 - interrupt-parent = <&mpic>; 326 - interrupts = <22 2>; 327 - }; 328 - dma-channel@3 { 329 - compatible = "fsl,mpc8610-dma-channel", 330 - "fsl,eloplus-dma-channel"; 331 - cell-index = <3>; 332 - reg = <0x180 0x80>; 333 - interrupt-parent = <&mpic>; 334 - interrupts = <23 2>; 335 - }; 336 - }; 337 - 338 - dma@c300 { 339 - #address-cells = <1>; 340 - #size-cells = <1>; 341 - compatible = "fsl,mpc8610-dma", "fsl,eloplus-dma"; 342 - cell-index = <1>; 343 - reg = <0xc300 0x4>; /* DMA general status register */ 344 - ranges = <0x0 0xc100 0x200>; 345 - sleep = <&pmc 0x00000200 0>; 346 - 347 - dma-channel@0 { 348 - compatible = "fsl,mpc8610-dma-channel", 349 - "fsl,eloplus-dma-channel"; 350 - cell-index = <0>; 351 - reg = <0x0 0x80>; 352 - interrupt-parent = <&mpic>; 353 - interrupts = <76 2>; 354 - }; 355 - dma-channel@1 { 356 - compatible = "fsl,mpc8610-dma-channel", 357 - "fsl,eloplus-dma-channel"; 358 - cell-index = <1>; 359 - reg = <0x80 0x80>; 360 - interrupt-parent = <&mpic>; 361 - interrupts = <77 2>; 362 - }; 363 - dma-channel@2 { 364 - compatible = "fsl,mpc8610-dma-channel", 365 - "fsl,eloplus-dma-channel"; 366 - cell-index = <2>; 367 - reg = <0x100 0x80>; 368 - interrupt-parent = <&mpic>; 369 - interrupts = <78 2>; 370 - }; 371 - dma-channel@3 { 372 - compatible = "fsl,mpc8610-dma-channel", 373 - "fsl,eloplus-dma-channel"; 374 - cell-index = <3>; 375 - reg = <0x180 0x80>; 376 - interrupt-parent = <&mpic>; 377 - interrupts = <79 2>; 378 - }; 379 - }; 380 - 381 - }; 382 - 383 - pci0: pci@e0008000 { 384 - compatible = "fsl,mpc8610-pci"; 385 - device_type = "pci"; 386 - #interrupt-cells = <1>; 387 - #size-cells = <2>; 388 - #address-cells = <3>; 389 - reg = <0xe0008000 0x1000>; 390 - bus-range = <0 0>; 391 - ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x10000000 392 - 0x01000000 0x0 0x00000000 0xe1000000 0x0 0x00100000>; 393 - sleep = <&pmc 0x80000000 0>; 394 - clock-frequency = <33333333>; 395 - interrupt-parent = <&mpic>; 396 - interrupts = <24 2>; 397 - interrupt-map-mask = <0xf800 0 0 7>; 398 - interrupt-map = < 399 - /* IDSEL 0x11 */ 400 - 0x8800 0 0 1 &mpic 4 1 401 - 0x8800 0 0 2 &mpic 5 1 402 - 0x8800 0 0 3 &mpic 6 1 403 - 0x8800 0 0 4 &mpic 7 1 404 - 405 - /* IDSEL 0x12 */ 406 - 0x9000 0 0 1 &mpic 5 1 407 - 0x9000 0 0 2 &mpic 6 1 408 - 0x9000 0 0 3 &mpic 7 1 409 - 0x9000 0 0 4 &mpic 4 1 410 - >; 411 - }; 412 - 413 - pci1: pcie@e000a000 { 414 - compatible = "fsl,mpc8641-pcie"; 415 - device_type = "pci"; 416 - #interrupt-cells = <1>; 417 - #size-cells = <2>; 418 - #address-cells = <3>; 419 - reg = <0xe000a000 0x1000>; 420 - bus-range = <1 3>; 421 - ranges = <0x02000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000 422 - 0x01000000 0x0 0x00000000 0xe3000000 0x0 0x00100000>; 423 - sleep = <&pmc 0x40000000 0>; 424 - clock-frequency = <33333333>; 425 - interrupt-parent = <&mpic>; 426 - interrupts = <26 2>; 427 - interrupt-map-mask = <0xf800 0 0 7>; 428 - 429 - interrupt-map = < 430 - /* IDSEL 0x1b */ 431 - 0xd800 0 0 1 &mpic 2 1 432 - 433 - /* IDSEL 0x1c*/ 434 - 0xe000 0 0 1 &mpic 1 1 435 - 0xe000 0 0 2 &mpic 1 1 436 - 0xe000 0 0 3 &mpic 1 1 437 - 0xe000 0 0 4 &mpic 1 1 438 - 439 - /* IDSEL 0x1f */ 440 - 0xf800 0 0 1 &mpic 3 2 441 - 0xf800 0 0 2 &mpic 0 1 442 - >; 443 - 444 - pcie@0 { 445 - reg = <0 0 0 0 0>; 446 - #size-cells = <2>; 447 - #address-cells = <3>; 448 - device_type = "pci"; 449 - ranges = <0x02000000 0x0 0xa0000000 450 - 0x02000000 0x0 0xa0000000 451 - 0x0 0x10000000 452 - 0x01000000 0x0 0x00000000 453 - 0x01000000 0x0 0x00000000 454 - 0x0 0x00100000>; 455 - uli1575@0 { 456 - reg = <0 0 0 0 0>; 457 - #size-cells = <2>; 458 - #address-cells = <3>; 459 - ranges = <0x02000000 0x0 0xa0000000 460 - 0x02000000 0x0 0xa0000000 461 - 0x0 0x10000000 462 - 0x01000000 0x0 0x00000000 463 - 0x01000000 0x0 0x00000000 464 - 0x0 0x00100000>; 465 - 466 - isa@1e { 467 - device_type = "isa"; 468 - #size-cells = <1>; 469 - #address-cells = <2>; 470 - reg = <0xf000 0 0 0 0>; 471 - ranges = <1 0 0x01000000 0 0 472 - 0x00001000>; 473 - 474 - rtc@70 { 475 - compatible = "pnpPNP,b00"; 476 - reg = <1 0x70 2>; 477 - }; 478 - }; 479 - }; 480 - }; 481 - }; 482 - 483 - pci2: pcie@e0009000 { 484 - #address-cells = <3>; 485 - #size-cells = <2>; 486 - #interrupt-cells = <1>; 487 - device_type = "pci"; 488 - compatible = "fsl,mpc8641-pcie"; 489 - reg = <0xe0009000 0x00001000>; 490 - ranges = <0x02000000 0 0x90000000 0x90000000 0 0x10000000 491 - 0x01000000 0 0x00000000 0xe2000000 0 0x00100000>; 492 - bus-range = <0 255>; 493 - interrupt-map-mask = <0xf800 0 0 7>; 494 - interrupt-map = <0x0000 0 0 1 &mpic 4 1 495 - 0x0000 0 0 2 &mpic 5 1 496 - 0x0000 0 0 3 &mpic 6 1 497 - 0x0000 0 0 4 &mpic 7 1>; 498 - interrupt-parent = <&mpic>; 499 - interrupts = <25 2>; 500 - sleep = <&pmc 0x20000000 0>; 501 - clock-frequency = <33333333>; 502 - }; 503 - };
-1
arch/powerpc/configs/mpc86xx_base.config
··· 1 1 CONFIG_PPC_86xx=y 2 - CONFIG_MPC8610_HPCD=y 3 2 CONFIG_GEF_PPC9A=y 4 3 CONFIG_GEF_SBC310=y 5 4 CONFIG_GEF_SBC610=y
-1
arch/powerpc/configs/ppc6xx_defconfig
··· 50 50 CONFIG_MPC837x_RDB=y 51 51 CONFIG_ASP834x=y 52 52 CONFIG_PPC_86xx=y 53 - CONFIG_MPC8610_HPCD=y 54 53 CONFIG_GEF_SBC610=y 55 54 CONFIG_CPU_FREQ=y 56 55 CONFIG_CPU_FREQ_STAT=y
-8
arch/powerpc/platforms/86xx/Kconfig
··· 10 10 11 11 if PPC_86xx 12 12 13 - config MPC8610_HPCD 14 - bool "Freescale MPC8610 HPCD" 15 - select DEFAULT_UIMAGE 16 - select FSL_ULI1575 if PCI 17 - help 18 - This option enables support for the MPC8610 HPCD board. 19 - 20 13 config GEF_PPC9A 21 14 bool "GE PPC9A" 22 15 select DEFAULT_UIMAGE ··· 60 67 select FSL_PCI if PCI 61 68 select PPC_UDBG_16550 62 69 select MPIC 63 - default y if MPC8610_HPCD
-1
arch/powerpc/platforms/86xx/Makefile
··· 5 5 6 6 obj-y := pic.o common.o 7 7 obj-$(CONFIG_SMP) += mpc86xx_smp.o 8 - obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o 9 8 obj-$(CONFIG_GEF_SBC610) += gef_sbc610.o 10 9 obj-$(CONFIG_GEF_SBC310) += gef_sbc310.o 11 10 obj-$(CONFIG_GEF_PPC9A) += gef_ppc9a.o
-321
arch/powerpc/platforms/86xx/mpc8610_hpcd.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-or-later 2 - /* 3 - * MPC8610 HPCD board specific routines 4 - * 5 - * Initial author: Xianghua Xiao <x.xiao@freescale.com> 6 - * Recode: Jason Jin <jason.jin@freescale.com> 7 - * York Sun <yorksun@freescale.com> 8 - * 9 - * Rewrite the interrupt routing. remove the 8259PIC support, 10 - * All the integrated device in ULI use sideband interrupt. 11 - * 12 - * Copyright 2008 Freescale Semiconductor Inc. 13 - */ 14 - 15 - #include <linux/stddef.h> 16 - #include <linux/kernel.h> 17 - #include <linux/pci.h> 18 - #include <linux/interrupt.h> 19 - #include <linux/kdev_t.h> 20 - #include <linux/delay.h> 21 - #include <linux/seq_file.h> 22 - #include <linux/of.h> 23 - #include <linux/of_address.h> 24 - #include <linux/of_irq.h> 25 - #include <linux/fsl/guts.h> 26 - 27 - #include <asm/time.h> 28 - #include <asm/machdep.h> 29 - #include <asm/pci-bridge.h> 30 - #include <mm/mmu_decl.h> 31 - #include <asm/udbg.h> 32 - 33 - #include <asm/mpic.h> 34 - 35 - #include <linux/of_platform.h> 36 - #include <sysdev/fsl_pci.h> 37 - #include <sysdev/fsl_soc.h> 38 - 39 - #include "mpc86xx.h" 40 - 41 - static struct device_node *pixis_node; 42 - static unsigned char *pixis_bdcfg0, *pixis_arch; 43 - 44 - /* DIU Pixel Clock bits of the CLKDVDR Global Utilities register */ 45 - #define CLKDVDR_PXCKEN 0x80000000 46 - #define CLKDVDR_PXCKINV 0x10000000 47 - #define CLKDVDR_PXCKDLY 0x06000000 48 - #define CLKDVDR_PXCLK_MASK 0x001F0000 49 - 50 - #ifdef CONFIG_SUSPEND 51 - static irqreturn_t mpc8610_sw9_irq(int irq, void *data) 52 - { 53 - pr_debug("%s: PIXIS' event (sw9/wakeup) IRQ handled\n", __func__); 54 - return IRQ_HANDLED; 55 - } 56 - 57 - static void __init mpc8610_suspend_init(void) 58 - { 59 - int irq; 60 - int ret; 61 - 62 - if (!pixis_node) 63 - return; 64 - 65 - irq = irq_of_parse_and_map(pixis_node, 0); 66 - if (!irq) { 67 - pr_err("%s: can't map pixis event IRQ.\n", __func__); 68 - return; 69 - } 70 - 71 - ret = request_irq(irq, mpc8610_sw9_irq, 0, "sw9:wakeup", NULL); 72 - if (ret) { 73 - pr_err("%s: can't request pixis event IRQ: %d\n", 74 - __func__, ret); 75 - irq_dispose_mapping(irq); 76 - } 77 - 78 - enable_irq_wake(irq); 79 - } 80 - #else 81 - static inline void mpc8610_suspend_init(void) { } 82 - #endif /* CONFIG_SUSPEND */ 83 - 84 - static const struct of_device_id mpc8610_ids[] __initconst = { 85 - { .compatible = "fsl,mpc8610-immr", }, 86 - { .compatible = "fsl,mpc8610-guts", }, 87 - /* So that the DMA channel nodes can be probed individually: */ 88 - { .compatible = "fsl,eloplus-dma", }, 89 - /* PCI controllers */ 90 - { .compatible = "fsl,mpc8610-pci", }, 91 - {} 92 - }; 93 - 94 - static int __init mpc8610_declare_of_platform_devices(void) 95 - { 96 - /* Enable wakeup on PIXIS' event IRQ. */ 97 - mpc8610_suspend_init(); 98 - 99 - mpc86xx_common_publish_devices(); 100 - 101 - /* Without this call, the SSI device driver won't get probed. */ 102 - of_platform_bus_probe(NULL, mpc8610_ids, NULL); 103 - 104 - return 0; 105 - } 106 - machine_arch_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices); 107 - 108 - #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 109 - 110 - /* 111 - * DIU Area Descriptor 112 - * 113 - * The MPC8610 reference manual shows the bits of the AD register in 114 - * little-endian order, which causes the BLUE_C field to be split into two 115 - * parts. To simplify the definition of the MAKE_AD() macro, we define the 116 - * fields in big-endian order and byte-swap the result. 117 - * 118 - * So even though the registers don't look like they're in the 119 - * same bit positions as they are on the P1022, the same value is written to 120 - * the AD register on the MPC8610 and on the P1022. 121 - */ 122 - #define AD_BYTE_F 0x10000000 123 - #define AD_ALPHA_C_MASK 0x0E000000 124 - #define AD_ALPHA_C_SHIFT 25 125 - #define AD_BLUE_C_MASK 0x01800000 126 - #define AD_BLUE_C_SHIFT 23 127 - #define AD_GREEN_C_MASK 0x00600000 128 - #define AD_GREEN_C_SHIFT 21 129 - #define AD_RED_C_MASK 0x00180000 130 - #define AD_RED_C_SHIFT 19 131 - #define AD_PALETTE 0x00040000 132 - #define AD_PIXEL_S_MASK 0x00030000 133 - #define AD_PIXEL_S_SHIFT 16 134 - #define AD_COMP_3_MASK 0x0000F000 135 - #define AD_COMP_3_SHIFT 12 136 - #define AD_COMP_2_MASK 0x00000F00 137 - #define AD_COMP_2_SHIFT 8 138 - #define AD_COMP_1_MASK 0x000000F0 139 - #define AD_COMP_1_SHIFT 4 140 - #define AD_COMP_0_MASK 0x0000000F 141 - #define AD_COMP_0_SHIFT 0 142 - 143 - #define MAKE_AD(alpha, red, blue, green, size, c0, c1, c2, c3) \ 144 - cpu_to_le32(AD_BYTE_F | (alpha << AD_ALPHA_C_SHIFT) | \ 145 - (blue << AD_BLUE_C_SHIFT) | (green << AD_GREEN_C_SHIFT) | \ 146 - (red << AD_RED_C_SHIFT) | (c3 << AD_COMP_3_SHIFT) | \ 147 - (c2 << AD_COMP_2_SHIFT) | (c1 << AD_COMP_1_SHIFT) | \ 148 - (c0 << AD_COMP_0_SHIFT) | (size << AD_PIXEL_S_SHIFT)) 149 - 150 - u32 mpc8610hpcd_get_pixel_format(enum fsl_diu_monitor_port port, 151 - unsigned int bits_per_pixel) 152 - { 153 - static const u32 pixelformat[][3] = { 154 - { 155 - MAKE_AD(3, 0, 2, 1, 3, 8, 8, 8, 8), 156 - MAKE_AD(4, 2, 0, 1, 2, 8, 8, 8, 0), 157 - MAKE_AD(4, 0, 2, 1, 1, 5, 6, 5, 0) 158 - }, 159 - { 160 - MAKE_AD(3, 2, 0, 1, 3, 8, 8, 8, 8), 161 - MAKE_AD(4, 0, 2, 1, 2, 8, 8, 8, 0), 162 - MAKE_AD(4, 2, 0, 1, 1, 5, 6, 5, 0) 163 - }, 164 - }; 165 - unsigned int arch_monitor; 166 - 167 - /* The DVI port is mis-wired on revision 1 of this board. */ 168 - arch_monitor = 169 - ((*pixis_arch == 0x01) && (port == FSL_DIU_PORT_DVI)) ? 0 : 1; 170 - 171 - switch (bits_per_pixel) { 172 - case 32: 173 - return pixelformat[arch_monitor][0]; 174 - case 24: 175 - return pixelformat[arch_monitor][1]; 176 - case 16: 177 - return pixelformat[arch_monitor][2]; 178 - default: 179 - pr_err("fsl-diu: unsupported pixel depth %u\n", bits_per_pixel); 180 - return 0; 181 - } 182 - } 183 - 184 - void mpc8610hpcd_set_gamma_table(enum fsl_diu_monitor_port port, 185 - char *gamma_table_base) 186 - { 187 - int i; 188 - if (port == FSL_DIU_PORT_DLVDS) { 189 - for (i = 0; i < 256*3; i++) 190 - gamma_table_base[i] = (gamma_table_base[i] << 2) | 191 - ((gamma_table_base[i] >> 6) & 0x03); 192 - } 193 - } 194 - 195 - #define PX_BRDCFG0_DVISEL (1 << 3) 196 - #define PX_BRDCFG0_DLINK (1 << 4) 197 - #define PX_BRDCFG0_DIU_MASK (PX_BRDCFG0_DVISEL | PX_BRDCFG0_DLINK) 198 - 199 - void mpc8610hpcd_set_monitor_port(enum fsl_diu_monitor_port port) 200 - { 201 - switch (port) { 202 - case FSL_DIU_PORT_DVI: 203 - clrsetbits_8(pixis_bdcfg0, PX_BRDCFG0_DIU_MASK, 204 - PX_BRDCFG0_DVISEL | PX_BRDCFG0_DLINK); 205 - break; 206 - case FSL_DIU_PORT_LVDS: 207 - clrsetbits_8(pixis_bdcfg0, PX_BRDCFG0_DIU_MASK, 208 - PX_BRDCFG0_DLINK); 209 - break; 210 - case FSL_DIU_PORT_DLVDS: 211 - clrbits8(pixis_bdcfg0, PX_BRDCFG0_DIU_MASK); 212 - break; 213 - } 214 - } 215 - 216 - /** 217 - * mpc8610hpcd_set_pixel_clock: program the DIU's clock 218 - * 219 - * @pixclock: the wavelength, in picoseconds, of the clock 220 - */ 221 - void mpc8610hpcd_set_pixel_clock(unsigned int pixclock) 222 - { 223 - struct device_node *guts_np = NULL; 224 - struct ccsr_guts __iomem *guts; 225 - unsigned long freq; 226 - u64 temp; 227 - u32 pxclk; 228 - 229 - /* Map the global utilities registers. */ 230 - guts_np = of_find_compatible_node(NULL, NULL, "fsl,mpc8610-guts"); 231 - if (!guts_np) { 232 - pr_err("mpc8610hpcd: missing global utilities device node\n"); 233 - return; 234 - } 235 - 236 - guts = of_iomap(guts_np, 0); 237 - of_node_put(guts_np); 238 - if (!guts) { 239 - pr_err("mpc8610hpcd: could not map global utilities device\n"); 240 - return; 241 - } 242 - 243 - /* Convert pixclock from a wavelength to a frequency */ 244 - temp = 1000000000000ULL; 245 - do_div(temp, pixclock); 246 - freq = temp; 247 - 248 - /* 249 - * 'pxclk' is the ratio of the platform clock to the pixel clock. 250 - * On the MPC8610, the value programmed into CLKDVDR is the ratio 251 - * minus one. The valid range of values is 2-31. 252 - */ 253 - pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq) - 1; 254 - pxclk = clamp_t(u32, pxclk, 2, 31); 255 - 256 - /* Disable the pixel clock, and set it to non-inverted and no delay */ 257 - clrbits32(&guts->clkdvdr, 258 - CLKDVDR_PXCKEN | CLKDVDR_PXCKDLY | CLKDVDR_PXCLK_MASK); 259 - 260 - /* Enable the clock and set the pxclk */ 261 - setbits32(&guts->clkdvdr, CLKDVDR_PXCKEN | (pxclk << 16)); 262 - 263 - iounmap(guts); 264 - } 265 - 266 - enum fsl_diu_monitor_port 267 - mpc8610hpcd_valid_monitor_port(enum fsl_diu_monitor_port port) 268 - { 269 - return port; 270 - } 271 - 272 - #endif 273 - 274 - static void __init mpc86xx_hpcd_setup_arch(void) 275 - { 276 - struct resource r; 277 - unsigned char *pixis; 278 - 279 - if (ppc_md.progress) 280 - ppc_md.progress("mpc86xx_hpcd_setup_arch()", 0); 281 - 282 - fsl_pci_assign_primary(); 283 - 284 - #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 285 - diu_ops.get_pixel_format = mpc8610hpcd_get_pixel_format; 286 - diu_ops.set_gamma_table = mpc8610hpcd_set_gamma_table; 287 - diu_ops.set_monitor_port = mpc8610hpcd_set_monitor_port; 288 - diu_ops.set_pixel_clock = mpc8610hpcd_set_pixel_clock; 289 - diu_ops.valid_monitor_port = mpc8610hpcd_valid_monitor_port; 290 - #endif 291 - 292 - pixis_node = of_find_compatible_node(NULL, NULL, "fsl,fpga-pixis"); 293 - if (pixis_node) { 294 - of_address_to_resource(pixis_node, 0, &r); 295 - of_node_put(pixis_node); 296 - pixis = ioremap(r.start, 32); 297 - if (!pixis) { 298 - printk(KERN_ERR "Err: can't map FPGA cfg register!\n"); 299 - return; 300 - } 301 - pixis_bdcfg0 = pixis + 8; 302 - pixis_arch = pixis + 1; 303 - } else 304 - printk(KERN_ERR "Err: " 305 - "can't find device node 'fsl,fpga-pixis'\n"); 306 - 307 - printk("MPC86xx HPCD board from Freescale Semiconductor\n"); 308 - } 309 - 310 - define_machine(mpc86xx_hpcd) { 311 - .name = "MPC86xx HPCD", 312 - .compatible = "fsl,MPC8610HPCD", 313 - .setup_arch = mpc86xx_hpcd_setup_arch, 314 - .init_IRQ = mpc86xx_init_irq, 315 - .get_irq = mpic_get_irq, 316 - .time_init = mpc86xx_time_init, 317 - .progress = udbg_progress, 318 - #ifdef CONFIG_PCI 319 - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 320 - #endif 321 - };