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

[POWERPC] 8xx: mpc885ads cleanup

It now uses the new CPM binding and the generic pin/clock functions, and
has assorted fixes and cleanup.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by

Scott Wood and committed by
Kumar Gala
20906ece 96fca1de

+429 -570
+114 -81
arch/powerpc/boot/dts/mpc885ads.dts
··· 2 2 * MPC885 ADS Device Tree Source 3 3 * 4 4 * Copyright 2006 MontaVista Software, Inc. 5 + * Copyright 2007 Freescale Semiconductor, Inc. 5 6 * 6 7 * This program is free software; you can redistribute it and/or modify it 7 8 * under the terms of the GNU General Public License as published by the ··· 13 12 14 13 / { 15 14 model = "MPC885ADS"; 16 - compatible = "mpc8xx"; 15 + compatible = "fsl,mpc885ads"; 17 16 #address-cells = <1>; 18 17 #size-cells = <1>; 19 18 ··· 24 23 PowerPC,885@0 { 25 24 device_type = "cpu"; 26 25 reg = <0>; 27 - d-cache-line-size = <20>; // 32 bytes 28 - i-cache-line-size = <20>; // 32 bytes 29 - d-cache-size = <2000>; // L1, 8K 30 - i-cache-size = <2000>; // L1, 8K 26 + d-cache-line-size = <d#16>; 27 + i-cache-line-size = <d#16>; 28 + d-cache-size = <d#8192>; 29 + i-cache-size = <d#8192>; 31 30 timebase-frequency = <0>; 32 31 bus-frequency = <0>; 33 32 clock-frequency = <0>; 34 33 interrupts = <f 2>; // decrementer interrupt 35 - interrupt-parent = <&Mpc8xx_pic>; 34 + interrupt-parent = <&PIC>; 36 35 }; 37 36 }; 38 37 39 38 memory { 40 39 device_type = "memory"; 41 - reg = <00000000 800000>; 40 + reg = <0 0>; 42 41 }; 43 42 44 - soc885@ff000000 { 43 + localbus@ff000100 { 44 + compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus"; 45 + #address-cells = <2>; 46 + #size-cells = <1>; 47 + reg = <ff000100 40>; 48 + 49 + ranges = < 50 + 0 0 fe000000 00800000 51 + 1 0 ff080000 00008000 52 + 5 0 ff0a0000 00008000 53 + >; 54 + 55 + flash@0,0 { 56 + compatible = "jedec-flash"; 57 + reg = <0 0 800000>; 58 + bank-width = <4>; 59 + device-width = <1>; 60 + }; 61 + 62 + board-control@1,0 { 63 + reg = <1 0 20 5 300 4>; 64 + compatible = "fsl,mpc885ads-bcsr"; 65 + }; 66 + }; 67 + 68 + soc@ff000000 { 69 + compatible = "fsl,mpc885", "fsl,pq1-soc"; 45 70 #address-cells = <1>; 46 71 #size-cells = <1>; 47 72 device_type = "soc"; 48 - ranges = <0 ff000000 00100000>; 49 - reg = <ff000000 00000200>; 73 + ranges = <0 ff000000 00004000>; 50 74 bus-frequency = <0>; 51 - mdio@e80 { 52 - device_type = "mdio"; 53 - compatible = "fs_enet"; 54 - reg = <e80 8>; 75 + 76 + // Temporary -- will go away once kernel uses ranges for get_immrbase(). 77 + reg = <ff000000 4000>; 78 + 79 + mdio@e00 { 80 + compatible = "fsl,mpc885-fec-mdio", "fsl,pq1-fec-mdio"; 81 + reg = <e00 188>; 55 82 #address-cells = <1>; 56 83 #size-cells = <0>; 57 - Phy0: ethernet-phy@0 { 84 + 85 + PHY0: ethernet-phy@0 { 58 86 reg = <0>; 59 87 device_type = "ethernet-phy"; 60 88 }; 61 - Phy1: ethernet-phy@1 { 89 + 90 + PHY1: ethernet-phy@1 { 62 91 reg = <1>; 63 92 device_type = "ethernet-phy"; 64 93 }; 65 - Phy2: ethernet-phy@2 { 94 + 95 + PHY2: ethernet-phy@2 { 66 96 reg = <2>; 67 97 device_type = "ethernet-phy"; 68 98 }; 69 99 }; 70 100 71 - fec@e00 { 101 + ethernet@e00 { 72 102 device_type = "network"; 73 - compatible = "fs_enet"; 74 - model = "FEC"; 75 - device-id = <1>; 103 + compatible = "fsl,mpc885-fec-enet", 104 + "fsl,pq1-fec-enet"; 76 105 reg = <e00 188>; 77 - mac-address = [ 00 00 0C 00 01 FD ]; 106 + local-mac-address = [ 00 00 00 00 00 00 ]; 78 107 interrupts = <3 1>; 79 - interrupt-parent = <&Mpc8xx_pic>; 80 - phy-handle = <&Phy1>; 108 + interrupt-parent = <&PIC>; 109 + phy-handle = <&PHY0>; 110 + linux,network-index = <0>; 81 111 }; 82 112 83 - fec@1e00 { 113 + ethernet@1e00 { 84 114 device_type = "network"; 85 - compatible = "fs_enet"; 86 - model = "FEC"; 87 - device-id = <2>; 115 + compatible = "fsl,mpc885-fec-enet", 116 + "fsl,pq1-fec-enet"; 88 117 reg = <1e00 188>; 89 - mac-address = [ 00 00 0C 00 02 FD ]; 118 + local-mac-address = [ 00 00 00 00 00 00 ]; 90 119 interrupts = <7 1>; 91 - interrupt-parent = <&Mpc8xx_pic>; 92 - phy-handle = <&Phy2>; 120 + interrupt-parent = <&PIC>; 121 + phy-handle = <&PHY1>; 122 + linux,network-index = <1>; 93 123 }; 94 124 95 - Mpc8xx_pic: pic@ff000000 { 125 + PIC: interrupt-controller@0 { 96 126 interrupt-controller; 97 - #address-cells = <0>; 98 127 #interrupt-cells = <2>; 99 128 reg = <0 24>; 100 - device_type = "mpc8xx-pic"; 101 - compatible = "CPM"; 129 + compatible = "fsl,mpc885-pic", "fsl,pq1-pic"; 102 130 }; 103 131 104 - pcmcia@0080 { 132 + pcmcia@80 { 105 133 #address-cells = <3>; 106 134 #interrupt-cells = <1>; 107 135 #size-cells = <2>; 108 136 compatible = "fsl,pq-pcmcia"; 109 137 device_type = "pcmcia"; 110 138 reg = <80 80>; 111 - interrupt-parent = <&Mpc8xx_pic>; 139 + interrupt-parent = <&PIC>; 112 140 interrupts = <d 1>; 113 141 }; 114 142 115 - cpm@ff000000 { 143 + cpm@9c0 { 116 144 #address-cells = <1>; 117 145 #size-cells = <1>; 118 - device_type = "cpm"; 119 - model = "CPM"; 120 - ranges = <0 0 4000>; 121 - reg = <860 f0>; 146 + compatible = "fsl,mpc885-cpm", "fsl,cpm1"; 122 147 command-proc = <9c0>; 123 - brg-frequency = <0>; 124 - interrupts = <0 2>; // cpm error interrupt 125 - interrupt-parent = <&Cpm_pic>; 148 + interrupts = <0>; // cpm error interrupt 149 + interrupt-parent = <&CPM_PIC>; 150 + reg = <9c0 40 2000 1c00>; 151 + ranges; 126 152 127 - Cpm_pic: pic@930 { 153 + brg@9f0 { 154 + compatible = "fsl,mpc885-brg", 155 + "fsl,cpm1-brg", 156 + "fsl,cpm-brg"; 157 + reg = <9f0 10>; 158 + }; 159 + 160 + CPM_PIC: interrupt-controller@930 { 128 161 interrupt-controller; 129 - #address-cells = <0>; 130 - #interrupt-cells = <2>; 162 + #interrupt-cells = <1>; 131 163 interrupts = <5 2 0 2>; 132 - interrupt-parent = <&Mpc8xx_pic>; 164 + interrupt-parent = <&PIC>; 133 165 reg = <930 20>; 134 - device_type = "cpm-pic"; 135 - compatible = "CPM"; 166 + compatible = "fsl,mpc885-cpm-pic", 167 + "fsl,cpm1-pic"; 136 168 }; 137 169 138 - smc@a80 { 170 + serial@a80 { 139 171 device_type = "serial"; 140 - compatible = "cpm_uart"; 141 - model = "SMC"; 142 - device-id = <1>; 172 + compatible = "fsl,mpc885-smc-uart", 173 + "fsl,cpm1-smc-uart"; 143 174 reg = <a80 10 3e80 40>; 144 - clock-setup = <00ffffff 0>; 145 - rx-clock = <1>; 146 - tx-clock = <1>; 147 - current-speed = <0>; 148 - interrupts = <4 3>; 149 - interrupt-parent = <&Cpm_pic>; 175 + interrupts = <4>; 176 + interrupt-parent = <&CPM_PIC>; 177 + fsl,cpm-brg = <1>; 178 + fsl,cpm-command = <0090>; 150 179 }; 151 180 152 - smc@a90 { 181 + serial@a90 { 153 182 device_type = "serial"; 154 - compatible = "cpm_uart"; 155 - model = "SMC"; 156 - device-id = <2>; 157 - reg = <a90 20 3f80 40>; 158 - clock-setup = <ff00ffff 90000>; 159 - rx-clock = <2>; 160 - tx-clock = <2>; 161 - current-speed = <0>; 162 - interrupts = <3 3>; 163 - interrupt-parent = <&Cpm_pic>; 183 + compatible = "fsl,mpc885-smc-uart", 184 + "fsl,cpm1-smc-uart"; 185 + reg = <a90 10 3f80 40>; 186 + interrupts = <3>; 187 + interrupt-parent = <&CPM_PIC>; 188 + fsl,cpm-brg = <2>; 189 + fsl,cpm-command = <00d0>; 164 190 }; 165 191 166 - scc@a40 { 192 + ethernet@a40 { 167 193 device_type = "network"; 168 - compatible = "fs_enet"; 169 - model = "SCC"; 170 - device-id = <3>; 171 - reg = <a40 18 3e00 80>; 172 - mac-address = [ 00 00 0C 00 03 FD ]; 173 - interrupts = <1c 3>; 174 - interrupt-parent = <&Cpm_pic>; 175 - phy-handle = <&Phy2>; 194 + compatible = "fsl,mpc885-scc-enet", 195 + "fsl,cpm1-scc-enet"; 196 + reg = <a40 18 3e00 100>; 197 + local-mac-address = [ 00 00 00 00 00 00 ]; 198 + interrupts = <1c>; 199 + interrupt-parent = <&CPM_PIC>; 200 + phy-handle = <&PHY2>; 201 + fsl,cpm-command = <0080>; 202 + linux,network-index = <2>; 176 203 }; 177 204 }; 205 + }; 206 + 207 + chosen { 208 + linux,stdout-path = "/soc/cpm/serial@a80"; 178 209 }; 179 210 };
+153 -144
arch/powerpc/configs/mpc885_ads_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.23-rc4 4 - # Tue Aug 28 21:24:45 2007 3 + # Linux kernel version: 2.6.23-rc3 4 + # Mon Aug 27 15:23:16 2007 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 38 38 # CONFIG_PPC_UDBG_16550 is not set 39 39 # CONFIG_GENERIC_TBSYNC is not set 40 40 CONFIG_AUDIT_ARCH=y 41 + CONFIG_GENERIC_BUG=y 41 42 # CONFIG_DEFAULT_UIMAGE is not set 42 43 # CONFIG_PPC_DCR_NATIVE is not set 43 44 # CONFIG_PPC_DCR_MMIO is not set ··· 70 69 CONFIG_EMBEDDED=y 71 70 # CONFIG_SYSCTL_SYSCALL is not set 72 71 CONFIG_KALLSYMS=y 72 + # CONFIG_KALLSYMS_ALL is not set 73 73 # CONFIG_KALLSYMS_EXTRA_PASS is not set 74 - # CONFIG_HOTPLUG is not set 74 + CONFIG_HOTPLUG=y 75 75 CONFIG_PRINTK=y 76 - # CONFIG_BUG is not set 77 - CONFIG_ELF_CORE=y 76 + CONFIG_BUG=y 77 + # CONFIG_ELF_CORE is not set 78 78 # CONFIG_BASE_FULL is not set 79 - CONFIG_FUTEX=y 79 + # CONFIG_FUTEX is not set 80 80 CONFIG_ANON_INODES=y 81 - # CONFIG_EPOLL is not set 81 + CONFIG_EPOLL=y 82 82 CONFIG_SIGNALFD=y 83 83 CONFIG_TIMERFD=y 84 84 CONFIG_EVENTFD=y 85 85 CONFIG_SHMEM=y 86 86 # CONFIG_VM_EVENT_COUNTERS is not set 87 - CONFIG_SLAB=y 88 - # CONFIG_SLUB is not set 87 + CONFIG_SLUB_DEBUG=y 88 + # CONFIG_SLAB is not set 89 + CONFIG_SLUB=y 89 90 # CONFIG_SLOB is not set 90 - CONFIG_RT_MUTEXES=y 91 91 # CONFIG_TINY_SHMEM is not set 92 92 CONFIG_BASE_SMALL=1 93 93 # CONFIG_MODULES is not set ··· 102 100 # IO Schedulers 103 101 # 104 102 CONFIG_IOSCHED_NOOP=y 105 - CONFIG_IOSCHED_AS=y 103 + # CONFIG_IOSCHED_AS is not set 106 104 CONFIG_IOSCHED_DEADLINE=y 107 - CONFIG_IOSCHED_CFQ=y 108 - CONFIG_DEFAULT_AS=y 109 - # CONFIG_DEFAULT_DEADLINE is not set 105 + # CONFIG_IOSCHED_CFQ is not set 106 + # CONFIG_DEFAULT_AS is not set 107 + CONFIG_DEFAULT_DEADLINE=y 110 108 # CONFIG_DEFAULT_CFQ is not set 111 109 # CONFIG_DEFAULT_NOOP is not set 112 - CONFIG_DEFAULT_IOSCHED="anticipatory" 110 + CONFIG_DEFAULT_IOSCHED="deadline" 113 111 114 112 # 115 113 # Platform support ··· 122 120 # CONFIG_MPC8XXFADS is not set 123 121 # CONFIG_MPC86XADS is not set 124 122 CONFIG_MPC885ADS=y 123 + # CONFIG_PPC_EP88XC is not set 125 124 126 125 # 127 126 # Freescale Ethernet driver platform-specific options ··· 140 137 # 141 138 CONFIG_8xx_COPYBACK=y 142 139 # CONFIG_8xx_CPU6 is not set 140 + CONFIG_8xx_CPU15=y 143 141 CONFIG_NO_UCODE_PATCH=y 144 142 # CONFIG_USB_SOF_UCODE_PATCH is not set 145 143 # CONFIG_I2C_SPI_UCODE_PATCH is not set ··· 157 153 # CONFIG_GENERIC_IOMAP is not set 158 154 # CONFIG_CPU_FREQ is not set 159 155 # CONFIG_CPM2 is not set 160 - # CONFIG_FSL_ULI1575 is not set 156 + CONFIG_PPC_CPM_NEW_BINDING=y 161 157 162 158 # 163 159 # Kernel options 164 160 # 165 161 # CONFIG_HIGHMEM is not set 166 - # CONFIG_HZ_100 is not set 162 + CONFIG_HZ_100=y 167 163 # CONFIG_HZ_250 is not set 168 164 # CONFIG_HZ_300 is not set 169 - CONFIG_HZ_1000=y 170 - CONFIG_HZ=1000 165 + # CONFIG_HZ_1000 is not set 166 + CONFIG_HZ=100 171 167 CONFIG_PREEMPT_NONE=y 172 168 # CONFIG_PREEMPT_VOLUNTARY is not set 173 169 # CONFIG_PREEMPT is not set 174 170 CONFIG_BINFMT_ELF=y 175 171 # CONFIG_BINFMT_MISC is not set 176 - CONFIG_MATH_EMULATION=y 172 + # CONFIG_MATH_EMULATION is not set 177 173 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 178 174 CONFIG_ARCH_FLATMEM_ENABLE=y 179 175 CONFIG_ARCH_POPULATES_NODE_MAP=y ··· 189 185 CONFIG_ZONE_DMA_FLAG=1 190 186 CONFIG_BOUNCE=y 191 187 CONFIG_VIRT_TO_BUS=y 192 - # CONFIG_PROC_DEVICETREE is not set 188 + CONFIG_PROC_DEVICETREE=y 193 189 # CONFIG_CMDLINE_BOOL is not set 194 190 # CONFIG_PM is not set 195 191 # CONFIG_SECCOMP is not set 196 - # CONFIG_WANT_DEVICE_TREE is not set 192 + CONFIG_WANT_DEVICE_TREE=y 193 + CONFIG_DEVICE_TREE="mpc885ads.dts" 197 194 CONFIG_ISA_DMA_API=y 198 195 199 196 # ··· 211 206 # 212 207 # PCCARD (PCMCIA/CardBus) support 213 208 # 209 + # CONFIG_PCCARD is not set 214 210 215 211 # 216 212 # Advanced setup ··· 240 234 CONFIG_PACKET=y 241 235 # CONFIG_PACKET_MMAP is not set 242 236 CONFIG_UNIX=y 243 - CONFIG_XFRM=y 244 - # CONFIG_XFRM_USER is not set 245 - # CONFIG_XFRM_SUB_POLICY is not set 246 - # CONFIG_XFRM_MIGRATE is not set 247 237 # CONFIG_NET_KEY is not set 248 238 CONFIG_INET=y 249 239 CONFIG_IP_MULTICAST=y ··· 259 257 # CONFIG_INET_IPCOMP is not set 260 258 # CONFIG_INET_XFRM_TUNNEL is not set 261 259 # CONFIG_INET_TUNNEL is not set 262 - CONFIG_INET_XFRM_MODE_TRANSPORT=y 263 - CONFIG_INET_XFRM_MODE_TUNNEL=y 264 - CONFIG_INET_XFRM_MODE_BEET=y 260 + # CONFIG_INET_XFRM_MODE_TRANSPORT is not set 261 + # CONFIG_INET_XFRM_MODE_TUNNEL is not set 262 + # CONFIG_INET_XFRM_MODE_BEET is not set 265 263 CONFIG_INET_DIAG=y 266 264 CONFIG_INET_TCP_DIAG=y 267 265 # CONFIG_TCP_CONG_ADVANCED is not set ··· 321 319 # 322 320 CONFIG_STANDALONE=y 323 321 CONFIG_PREVENT_FIRMWARE_BUILD=y 322 + # CONFIG_FW_LOADER is not set 323 + # CONFIG_DEBUG_DRIVER is not set 324 + # CONFIG_DEBUG_DEVRES is not set 324 325 # CONFIG_SYS_HYPERVISOR is not set 325 326 # CONFIG_CONNECTOR is not set 326 - # CONFIG_MTD is not set 327 + CONFIG_MTD=y 328 + # CONFIG_MTD_DEBUG is not set 329 + # CONFIG_MTD_CONCAT is not set 330 + # CONFIG_MTD_PARTITIONS is not set 331 + 332 + # 333 + # User Modules And Translation Layers 334 + # 335 + CONFIG_MTD_CHAR=y 336 + CONFIG_MTD_BLKDEVS=y 337 + CONFIG_MTD_BLOCK=y 338 + # CONFIG_FTL is not set 339 + # CONFIG_NFTL is not set 340 + # CONFIG_INFTL is not set 341 + # CONFIG_RFD_FTL is not set 342 + # CONFIG_SSFDC is not set 343 + 344 + # 345 + # RAM/ROM/Flash chip drivers 346 + # 347 + # CONFIG_MTD_CFI is not set 348 + CONFIG_MTD_JEDECPROBE=y 349 + CONFIG_MTD_GEN_PROBE=y 350 + CONFIG_MTD_CFI_ADV_OPTIONS=y 351 + CONFIG_MTD_CFI_NOSWAP=y 352 + # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set 353 + # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set 354 + CONFIG_MTD_CFI_GEOMETRY=y 355 + # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set 356 + # CONFIG_MTD_MAP_BANK_WIDTH_2 is not set 357 + CONFIG_MTD_MAP_BANK_WIDTH_4=y 358 + # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set 359 + # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set 360 + # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set 361 + # CONFIG_MTD_CFI_I1 is not set 362 + # CONFIG_MTD_CFI_I2 is not set 363 + CONFIG_MTD_CFI_I4=y 364 + # CONFIG_MTD_CFI_I8 is not set 365 + # CONFIG_MTD_OTP is not set 366 + # CONFIG_MTD_CFI_INTELEXT is not set 367 + CONFIG_MTD_CFI_AMDSTD=y 368 + # CONFIG_MTD_CFI_STAA is not set 369 + CONFIG_MTD_CFI_UTIL=y 370 + # CONFIG_MTD_RAM is not set 371 + # CONFIG_MTD_ROM is not set 372 + # CONFIG_MTD_ABSENT is not set 373 + 374 + # 375 + # Mapping drivers for chip access 376 + # 377 + # CONFIG_MTD_COMPLEX_MAPPINGS is not set 378 + # CONFIG_MTD_PHYSMAP is not set 379 + CONFIG_MTD_PHYSMAP_OF=y 380 + # CONFIG_MTD_PLATRAM is not set 381 + 382 + # 383 + # Self-contained MTD device drivers 384 + # 385 + # CONFIG_MTD_SLRAM is not set 386 + # CONFIG_MTD_PHRAM is not set 387 + # CONFIG_MTD_MTDRAM is not set 388 + # CONFIG_MTD_BLOCK2MTD is not set 389 + 390 + # 391 + # Disk-On-Chip Device Drivers 392 + # 393 + # CONFIG_MTD_DOC2000 is not set 394 + # CONFIG_MTD_DOC2001 is not set 395 + # CONFIG_MTD_DOC2001PLUS is not set 396 + # CONFIG_MTD_NAND is not set 397 + # CONFIG_MTD_ONENAND is not set 398 + 399 + # 400 + # UBI - Unsorted block images 401 + # 402 + # CONFIG_MTD_UBI is not set 327 403 CONFIG_OF_DEVICE=y 328 404 # CONFIG_PARPORT is not set 329 - CONFIG_BLK_DEV=y 330 - # CONFIG_BLK_DEV_FD is not set 331 - # CONFIG_BLK_DEV_COW_COMMON is not set 332 - CONFIG_BLK_DEV_LOOP=y 333 - # CONFIG_BLK_DEV_CRYPTOLOOP is not set 334 - # CONFIG_BLK_DEV_NBD is not set 335 - # CONFIG_BLK_DEV_RAM is not set 336 - # CONFIG_CDROM_PKTCDVD is not set 337 - # CONFIG_ATA_OVER_ETH is not set 338 - CONFIG_MISC_DEVICES=y 339 - # CONFIG_EEPROM_93CX6 is not set 405 + # CONFIG_BLK_DEV is not set 406 + # CONFIG_MISC_DEVICES is not set 340 407 # CONFIG_IDE is not set 341 408 342 409 # ··· 439 368 # CONFIG_SMSC_PHY is not set 440 369 # CONFIG_BROADCOM_PHY is not set 441 370 # CONFIG_ICPLUS_PHY is not set 442 - CONFIG_FIXED_PHY=y 443 - CONFIG_FIXED_MII_10_FDX=y 444 - # CONFIG_FIXED_MII_100_FDX is not set 371 + # CONFIG_FIXED_PHY is not set 372 + # CONFIG_MDIO_BITBANG is not set 445 373 CONFIG_NET_ETHERNET=y 446 374 CONFIG_MII=y 447 375 CONFIG_FS_ENET=y 448 - CONFIG_FS_ENET_HAS_SCC=y 376 + # CONFIG_FS_ENET_HAS_SCC is not set 449 377 CONFIG_FS_ENET_HAS_FEC=y 450 - CONFIG_NETDEV_1000=y 451 - CONFIG_NETDEV_10000=y 378 + # CONFIG_NETDEV_1000 is not set 379 + # CONFIG_NETDEV_10000 is not set 452 380 453 381 # 454 382 # Wireless LAN ··· 467 397 # 468 398 # Input device support 469 399 # 470 - CONFIG_INPUT=y 471 - # CONFIG_INPUT_FF_MEMLESS is not set 472 - # CONFIG_INPUT_POLLDEV is not set 473 - 474 - # 475 - # Userland interfaces 476 - # 477 - CONFIG_INPUT_MOUSEDEV=y 478 - CONFIG_INPUT_MOUSEDEV_PSAUX=y 479 - CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 480 - CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 481 - # CONFIG_INPUT_JOYDEV is not set 482 - # CONFIG_INPUT_TSDEV is not set 483 - # CONFIG_INPUT_EVDEV is not set 484 - # CONFIG_INPUT_EVBUG is not set 485 - 486 - # 487 - # Input Device Drivers 488 - # 489 - CONFIG_INPUT_KEYBOARD=y 490 - CONFIG_KEYBOARD_ATKBD=y 491 - # CONFIG_KEYBOARD_SUNKBD is not set 492 - # CONFIG_KEYBOARD_LKKBD is not set 493 - # CONFIG_KEYBOARD_XTKBD is not set 494 - # CONFIG_KEYBOARD_NEWTON is not set 495 - # CONFIG_KEYBOARD_STOWAWAY is not set 496 - CONFIG_INPUT_MOUSE=y 497 - CONFIG_MOUSE_PS2=y 498 - CONFIG_MOUSE_PS2_ALPS=y 499 - CONFIG_MOUSE_PS2_LOGIPS2PP=y 500 - CONFIG_MOUSE_PS2_SYNAPTICS=y 501 - CONFIG_MOUSE_PS2_LIFEBOOK=y 502 - CONFIG_MOUSE_PS2_TRACKPOINT=y 503 - # CONFIG_MOUSE_PS2_TOUCHKIT is not set 504 - # CONFIG_MOUSE_SERIAL is not set 505 - # CONFIG_MOUSE_VSXXXAA is not set 506 - # CONFIG_INPUT_JOYSTICK is not set 507 - # CONFIG_INPUT_TABLET is not set 508 - # CONFIG_INPUT_TOUCHSCREEN is not set 509 - # CONFIG_INPUT_MISC is not set 400 + # CONFIG_INPUT is not set 510 401 511 402 # 512 403 # Hardware I/O ports 513 404 # 514 - CONFIG_SERIO=y 515 - CONFIG_SERIO_I8042=y 516 - CONFIG_SERIO_SERPORT=y 517 - CONFIG_SERIO_LIBPS2=y 518 - # CONFIG_SERIO_RAW is not set 405 + # CONFIG_SERIO is not set 519 406 # CONFIG_GAMEPORT is not set 520 407 521 408 # ··· 520 493 # CONFIG_SPI_MASTER is not set 521 494 # CONFIG_W1 is not set 522 495 # CONFIG_POWER_SUPPLY is not set 523 - CONFIG_HWMON=y 524 - # CONFIG_HWMON_VID is not set 525 - # CONFIG_SENSORS_ABITUGURU is not set 526 - # CONFIG_SENSORS_ABITUGURU3 is not set 527 - # CONFIG_SENSORS_F71805F is not set 528 - # CONFIG_SENSORS_IT87 is not set 529 - # CONFIG_SENSORS_PC87360 is not set 530 - # CONFIG_SENSORS_PC87427 is not set 531 - # CONFIG_SENSORS_SMSC47M1 is not set 532 - # CONFIG_SENSORS_SMSC47B397 is not set 533 - # CONFIG_SENSORS_VT1211 is not set 534 - # CONFIG_SENSORS_W83627HF is not set 535 - # CONFIG_SENSORS_W83627EHF is not set 536 - # CONFIG_HWMON_DEBUG_CHIP is not set 496 + # CONFIG_HWMON is not set 537 497 538 498 # 539 499 # Multifunction device drivers ··· 544 530 # 545 531 # CONFIG_DISPLAY_SUPPORT is not set 546 532 # CONFIG_VGASTATE is not set 547 - CONFIG_VIDEO_OUTPUT_CONTROL=y 533 + # CONFIG_VIDEO_OUTPUT_CONTROL is not set 548 534 # CONFIG_FB is not set 549 535 # CONFIG_FB_IBM_GXT4500 is not set 550 536 ··· 552 538 # Sound 553 539 # 554 540 # CONFIG_SOUND is not set 555 - CONFIG_HID_SUPPORT=y 556 - CONFIG_HID=y 557 - # CONFIG_HID_DEBUG is not set 558 - CONFIG_USB_SUPPORT=y 559 - # CONFIG_USB_ARCH_HAS_HCD is not set 560 - # CONFIG_USB_ARCH_HAS_OHCI is not set 561 - # CONFIG_USB_ARCH_HAS_EHCI is not set 562 - 563 - # 564 - # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 565 - # 566 - 567 - # 568 - # USB Gadget Support 569 - # 570 - # CONFIG_USB_GADGET is not set 541 + # CONFIG_USB_SUPPORT is not set 571 542 # CONFIG_MMC is not set 572 543 # CONFIG_NEW_LEDS is not set 573 544 # CONFIG_EDAC is not set ··· 579 580 # 580 581 # File systems 581 582 # 582 - CONFIG_EXT2_FS=y 583 - CONFIG_EXT2_FS_XATTR=y 584 - # CONFIG_EXT2_FS_POSIX_ACL is not set 585 - # CONFIG_EXT2_FS_SECURITY is not set 586 - # CONFIG_EXT2_FS_XIP is not set 587 - CONFIG_EXT3_FS=y 588 - CONFIG_EXT3_FS_XATTR=y 589 - # CONFIG_EXT3_FS_POSIX_ACL is not set 590 - # CONFIG_EXT3_FS_SECURITY is not set 583 + # CONFIG_EXT2_FS is not set 584 + # CONFIG_EXT3_FS is not set 591 585 # CONFIG_EXT4DEV_FS is not set 592 - CONFIG_JBD=y 593 - # CONFIG_JBD_DEBUG is not set 594 - CONFIG_FS_MBCACHE=y 595 586 # CONFIG_REISERFS_FS is not set 596 587 # CONFIG_JFS_FS is not set 597 588 # CONFIG_FS_POSIX_ACL is not set ··· 590 601 # CONFIG_OCFS2_FS is not set 591 602 # CONFIG_MINIX_FS is not set 592 603 # CONFIG_ROMFS_FS is not set 593 - CONFIG_INOTIFY=y 594 - CONFIG_INOTIFY_USER=y 604 + # CONFIG_INOTIFY is not set 595 605 # CONFIG_QUOTA is not set 596 - CONFIG_DNOTIFY=y 606 + # CONFIG_DNOTIFY is not set 597 607 # CONFIG_AUTOFS_FS is not set 598 608 # CONFIG_AUTOFS4_FS is not set 599 609 # CONFIG_FUSE_FS is not set ··· 633 645 # CONFIG_BEFS_FS is not set 634 646 # CONFIG_BFS_FS is not set 635 647 # CONFIG_EFS_FS is not set 648 + # CONFIG_JFFS2_FS is not set 636 649 CONFIG_CRAMFS=y 637 650 # CONFIG_VXFS_FS is not set 638 651 # CONFIG_HPFS_FS is not set ··· 700 711 # 701 712 # Library routines 702 713 # 703 - CONFIG_BITREVERSE=y 704 - CONFIG_CRC_CCITT=y 714 + # CONFIG_CRC_CCITT is not set 705 715 # CONFIG_CRC16 is not set 706 716 # CONFIG_CRC_ITU_T is not set 707 - CONFIG_CRC32=y 717 + # CONFIG_CRC32 is not set 708 718 # CONFIG_CRC7 is not set 709 719 # CONFIG_LIBCRC32C is not set 710 720 CONFIG_ZLIB_INFLATE=y 711 - CONFIG_PLIST=y 712 721 CONFIG_HAS_IOMEM=y 713 722 CONFIG_HAS_IOPORT=y 714 723 CONFIG_HAS_DMA=y ··· 721 734 # 722 735 # CONFIG_PRINTK_TIME is not set 723 736 CONFIG_ENABLE_MUST_CHECK=y 724 - # CONFIG_MAGIC_SYSRQ is not set 737 + CONFIG_MAGIC_SYSRQ=y 725 738 # CONFIG_UNUSED_SYMBOLS is not set 726 739 # CONFIG_DEBUG_FS is not set 727 740 # CONFIG_HEADERS_CHECK is not set 728 - # CONFIG_DEBUG_KERNEL is not set 741 + CONFIG_DEBUG_KERNEL=y 742 + # CONFIG_DEBUG_SHIRQ is not set 743 + CONFIG_DETECT_SOFTLOCKUP=y 744 + CONFIG_SCHED_DEBUG=y 745 + # CONFIG_SCHEDSTATS is not set 746 + # CONFIG_TIMER_STATS is not set 747 + # CONFIG_SLUB_DEBUG_ON is not set 748 + # CONFIG_DEBUG_SPINLOCK is not set 749 + # CONFIG_DEBUG_MUTEXES is not set 750 + # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 751 + # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 752 + # CONFIG_DEBUG_KOBJECT is not set 753 + CONFIG_DEBUG_BUGVERBOSE=y 754 + CONFIG_DEBUG_INFO=y 755 + # CONFIG_DEBUG_VM is not set 756 + # CONFIG_DEBUG_LIST is not set 757 + CONFIG_FORCED_INLINING=y 758 + # CONFIG_FAULT_INJECTION is not set 759 + # CONFIG_DEBUG_STACKOVERFLOW is not set 760 + # CONFIG_DEBUG_STACK_USAGE is not set 761 + # CONFIG_DEBUG_PAGEALLOC is not set 762 + # CONFIG_DEBUGGER is not set 763 + # CONFIG_BDI_SWITCH is not set 729 764 # CONFIG_PPC_EARLY_DEBUG is not set 730 765 731 766 #
+1
arch/powerpc/platforms/8xx/Kconfig
··· 26 26 config MPC885ADS 27 27 bool "MPC885ADS" 28 28 select CPM1 29 + select PPC_CPM_NEW_BINDING 29 30 help 30 31 Freescale Semiconductor MPC885 Application Development System (ADS). 31 32 Also known as DUET.
-38
arch/powerpc/platforms/8xx/mpc885ads.h
··· 17 17 18 18 #include <sysdev/fsl_soc.h> 19 19 20 - /* U-Boot maps BCSR to 0xff080000 */ 21 - #define BCSR_ADDR ((uint)0xff080000) 22 - #define BCSR_SIZE ((uint)32) 23 - #define BCSR0 ((uint)(BCSR_ADDR + 0x00)) 24 - #define BCSR1 ((uint)(BCSR_ADDR + 0x04)) 25 - #define BCSR2 ((uint)(BCSR_ADDR + 0x08)) 26 - #define BCSR3 ((uint)(BCSR_ADDR + 0x0c)) 27 - #define BCSR4 ((uint)(BCSR_ADDR + 0x10)) 28 - 29 - #define CFG_PHYDEV_ADDR ((uint)0xff0a0000) 30 - #define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300)) 31 - 32 20 #define MPC8xx_CPM_OFFSET (0x9c0) 33 21 #define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET) 34 22 #define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver 35 - 36 - #define PCMCIA_MEM_ADDR ((uint)0xff020000) 37 - #define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) 38 23 39 24 /* Bits of interest in the BCSRs. 40 25 */ ··· 48 63 #define BCSR5_ATM25_RST 0x04 49 64 #define BCSR5_MII1_EN 0x02 50 65 #define BCSR5_MII1_RST 0x01 51 - 52 - /* Interrupt level assignments */ 53 - #define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */ 54 - #define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */ 55 - #define SIU_INT_FEC2 SIU_LEVEL3 /* FEC2 interrupt */ 56 - #define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */ 57 - 58 - /* We don't use the 8259 */ 59 - #define NR_8259_INTS 0 60 - 61 - /* CPM Ethernet through SCC3 */ 62 - #define PA_ENET_RXD ((ushort)0x0040) 63 - #define PA_ENET_TXD ((ushort)0x0080) 64 - #define PE_ENET_TCLK ((uint)0x00004000) 65 - #define PE_ENET_RCLK ((uint)0x00008000) 66 - #define PE_ENET_TENA ((uint)0x00000010) 67 - #define PC_ENET_CLSN ((ushort)0x0400) 68 - #define PC_ENET_RENA ((ushort)0x0800) 69 - 70 - /* Control bits in the SICR to route TCLK (CLK5) and RCLK (CLK6) to 71 - * SCC3. Also, make sure GR3 (bit 8) and SC3 (bit 9) are zero */ 72 - #define SICR_ENET_MASK ((uint)0x00ff0000) 73 - #define SICR_ENET_CLKRT ((uint)0x002c0000) 74 66 75 67 #endif /* __ASM_MPC885ADS_H__ */ 76 68 #endif /* __KERNEL__ */
+161 -307
arch/powerpc/platforms/8xx/mpc885ads_setup.c
··· 1 - /*arch/powerpc/platforms/8xx/mpc885ads_setup.c 2 - * 1 + /* 3 2 * Platform setup for the Freescale mpc885ads board 4 3 * 5 4 * Vitaly Bordug <vbordug@ru.mvista.com> 6 5 * 7 6 * Copyright 2005 MontaVista Software Inc. 7 + * 8 + * Heavily modified by Scott Wood <scottwood@freescale.com> 9 + * Copyright 2007 Freescale Semiconductor, Inc. 8 10 * 9 11 * This file is licensed under the terms of the GNU General Public License 10 12 * version 2. This program is licensed "as is" without any warranty of any ··· 20 18 #include <linux/ioport.h> 21 19 #include <linux/device.h> 22 20 #include <linux/delay.h> 23 - #include <linux/root_dev.h> 24 21 25 22 #include <linux/fs_enet_pd.h> 26 23 #include <linux/fs_uart_pd.h> 27 24 #include <linux/fsl_devices.h> 28 25 #include <linux/mii.h> 26 + #include <linux/of_platform.h> 29 27 30 28 #include <asm/delay.h> 31 29 #include <asm/io.h> ··· 38 36 #include <asm/8xx_immap.h> 39 37 #include <asm/commproc.h> 40 38 #include <asm/fs_pd.h> 41 - #include <asm/prom.h> 39 + #include <asm/udbg.h> 42 40 43 41 #include <sysdev/commproc.h> 44 42 45 - static void init_smc1_uart_ioports(struct fs_uart_platform_info *fpi); 46 - static void init_smc2_uart_ioports(struct fs_uart_platform_info *fpi); 47 - static void init_scc3_ioports(struct fs_platform_info *ptr); 43 + static u32 __iomem *bcsr, *bcsr5; 48 44 49 45 #ifdef CONFIG_PCMCIA_M8XX 50 46 static void pcmcia_hw_setup(int slot, int enable) 51 47 { 52 - unsigned *bcsr_io; 53 - 54 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 55 48 if (enable) 56 - clrbits32(bcsr_io, BCSR1_PCCEN); 49 + clrbits32(&bcsr[1], BCSR1_PCCEN); 57 50 else 58 - setbits32(bcsr_io, BCSR1_PCCEN); 59 - 60 - iounmap(bcsr_io); 51 + setbits32(&bcsr[1], BCSR1_PCCEN); 61 52 } 62 53 63 54 static int pcmcia_set_voltage(int slot, int vcc, int vpp) 64 55 { 65 56 u32 reg = 0; 66 - unsigned *bcsr_io; 67 - 68 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 69 57 70 58 switch (vcc) { 71 59 case 0: ··· 90 98 } 91 99 92 100 /* first, turn off all power */ 93 - clrbits32(bcsr_io, 0x00610000); 101 + clrbits32(&bcsr[1], 0x00610000); 94 102 95 103 /* enable new powersettings */ 96 - setbits32(bcsr_io, reg); 104 + setbits32(&bcsr[1], reg); 97 105 98 - iounmap(bcsr_io); 99 106 return 0; 100 107 } 101 108 #endif 102 109 103 - void __init mpc885ads_board_setup(void) 104 - { 105 - cpm8xx_t *cp; 106 - unsigned int *bcsr_io; 107 - u8 tmpval8; 110 + struct cpm_pin { 111 + int port, pin, flags; 112 + }; 108 113 109 - #ifdef CONFIG_FS_ENET 110 - iop8xx_t *io_port; 114 + static struct cpm_pin mpc885ads_pins[] = { 115 + /* SMC1 */ 116 + {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */ 117 + {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */ 118 + 119 + /* SMC2 */ 120 + #ifndef CONFIG_MPC8xx_SECOND_ETH_FEC2 121 + {CPM_PORTE, 21, CPM_PIN_INPUT}, /* RX */ 122 + {CPM_PORTE, 20, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */ 111 123 #endif 112 124 113 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 114 - cp = (cpm8xx_t *) immr_map(im_cpm); 125 + /* SCC3 */ 126 + {CPM_PORTA, 9, CPM_PIN_INPUT}, /* RX */ 127 + {CPM_PORTA, 8, CPM_PIN_INPUT}, /* TX */ 128 + {CPM_PORTC, 4, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* RENA */ 129 + {CPM_PORTC, 5, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* CLSN */ 130 + {CPM_PORTE, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TENA */ 131 + {CPM_PORTE, 17, CPM_PIN_INPUT}, /* CLK5 */ 132 + {CPM_PORTE, 16, CPM_PIN_INPUT}, /* CLK6 */ 115 133 116 - if (bcsr_io == NULL) { 134 + /* MII1 */ 135 + {CPM_PORTA, 0, CPM_PIN_INPUT}, 136 + {CPM_PORTA, 1, CPM_PIN_INPUT}, 137 + {CPM_PORTA, 2, CPM_PIN_INPUT}, 138 + {CPM_PORTA, 3, CPM_PIN_INPUT}, 139 + {CPM_PORTA, 4, CPM_PIN_OUTPUT}, 140 + {CPM_PORTA, 10, CPM_PIN_OUTPUT}, 141 + {CPM_PORTA, 11, CPM_PIN_OUTPUT}, 142 + {CPM_PORTB, 19, CPM_PIN_INPUT}, 143 + {CPM_PORTB, 31, CPM_PIN_INPUT}, 144 + {CPM_PORTC, 12, CPM_PIN_INPUT}, 145 + {CPM_PORTC, 13, CPM_PIN_INPUT}, 146 + {CPM_PORTE, 30, CPM_PIN_OUTPUT}, 147 + {CPM_PORTE, 31, CPM_PIN_OUTPUT}, 148 + 149 + /* MII2 */ 150 + #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2 151 + {CPM_PORTE, 14, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, 152 + {CPM_PORTE, 15, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, 153 + {CPM_PORTE, 16, CPM_PIN_OUTPUT}, 154 + {CPM_PORTE, 17, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, 155 + {CPM_PORTE, 18, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, 156 + {CPM_PORTE, 19, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, 157 + {CPM_PORTE, 20, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, 158 + {CPM_PORTE, 21, CPM_PIN_OUTPUT}, 159 + {CPM_PORTE, 22, CPM_PIN_OUTPUT}, 160 + {CPM_PORTE, 23, CPM_PIN_OUTPUT}, 161 + {CPM_PORTE, 24, CPM_PIN_OUTPUT}, 162 + {CPM_PORTE, 25, CPM_PIN_OUTPUT}, 163 + {CPM_PORTE, 26, CPM_PIN_OUTPUT}, 164 + {CPM_PORTE, 27, CPM_PIN_OUTPUT}, 165 + {CPM_PORTE, 28, CPM_PIN_OUTPUT}, 166 + {CPM_PORTE, 29, CPM_PIN_OUTPUT}, 167 + #endif 168 + }; 169 + 170 + static void __init init_ioports(void) 171 + { 172 + int i; 173 + 174 + for (i = 0; i < ARRAY_SIZE(mpc885ads_pins); i++) { 175 + struct cpm_pin *pin = &mpc885ads_pins[i]; 176 + cpm1_set_pin(pin->port, pin->pin, pin->flags); 177 + } 178 + 179 + cpm1_clk_setup(CPM_CLK_SMC1, CPM_BRG1, CPM_CLK_RTX); 180 + cpm1_clk_setup(CPM_CLK_SMC2, CPM_BRG2, CPM_CLK_RTX); 181 + cpm1_clk_setup(CPM_CLK_SCC3, CPM_CLK5, CPM_CLK_TX); 182 + cpm1_clk_setup(CPM_CLK_SCC3, CPM_CLK6, CPM_CLK_RX); 183 + 184 + /* Set FEC1 and FEC2 to MII mode */ 185 + clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180); 186 + } 187 + 188 + static void __init mpc885ads_setup_arch(void) 189 + { 190 + struct device_node *np; 191 + 192 + cpm_reset(); 193 + init_ioports(); 194 + 195 + np = of_find_compatible_node(NULL, NULL, "fsl,mpc885ads-bcsr"); 196 + if (!np) { 197 + printk(KERN_CRIT "Could not find fsl,mpc885ads-bcsr node\n"); 198 + return; 199 + } 200 + 201 + bcsr = of_iomap(np, 0); 202 + bcsr5 = of_iomap(np, 1); 203 + of_node_put(np); 204 + 205 + if (!bcsr || !bcsr5) { 117 206 printk(KERN_CRIT "Could not remap BCSR\n"); 118 207 return; 119 208 } 120 - #ifdef CONFIG_SERIAL_CPM_SMC1 121 - clrbits32(bcsr_io, BCSR1_RS232EN_1); 122 - clrbits32(&cp->cp_simode, 0xe0000000 >> 17); /* brg1 */ 123 - tmpval8 = in_8(&(cp->cp_smc[0].smc_smcm)) | (SMCM_RX | SMCM_TX); 124 - out_8(&(cp->cp_smc[0].smc_smcm), tmpval8); 125 - clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN); /* brg1 */ 209 + 210 + clrbits32(&bcsr[1], BCSR1_RS232EN_1); 211 + #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2 212 + setbits32(&bcsr[1], BCSR1_RS232EN_2); 126 213 #else 127 - setbits32(bcsr_io, BCSR1_RS232EN_1); 128 - out_be16(&cp->cp_smc[0].smc_smcmr, 0); 129 - out_8(&cp->cp_smc[0].smc_smce, 0); 214 + clrbits32(&bcsr[1], BCSR1_RS232EN_2); 130 215 #endif 131 216 132 - #ifdef CONFIG_SERIAL_CPM_SMC2 133 - clrbits32(bcsr_io, BCSR1_RS232EN_2); 134 - clrbits32(&cp->cp_simode, 0xe0000000 >> 1); 135 - setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */ 136 - tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX); 137 - out_8(&(cp->cp_smc[1].smc_smcm), tmpval8); 138 - clrbits16(&cp->cp_smc[1].smc_smcmr, SMCMR_REN | SMCMR_TEN); 217 + clrbits32(bcsr5, BCSR5_MII1_EN); 218 + setbits32(bcsr5, BCSR5_MII1_RST); 219 + udelay(1000); 220 + clrbits32(bcsr5, BCSR5_MII1_RST); 139 221 140 - init_smc2_uart_ioports(0); 222 + #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2 223 + clrbits32(bcsr5, BCSR5_MII2_EN); 224 + setbits32(bcsr5, BCSR5_MII2_RST); 225 + udelay(1000); 226 + clrbits32(bcsr5, BCSR5_MII2_RST); 141 227 #else 142 - setbits32(bcsr_io, BCSR1_RS232EN_2); 143 - out_be16(&cp->cp_smc[1].smc_smcmr, 0); 144 - out_8(&cp->cp_smc[1].smc_smce, 0); 228 + setbits32(bcsr5, BCSR5_MII2_EN); 145 229 #endif 146 - immr_unmap(cp); 147 - iounmap(bcsr_io); 148 230 149 - #ifdef CONFIG_FS_ENET 150 - /* use MDC for MII (common) */ 151 - io_port = (iop8xx_t *) immr_map(im_ioport); 152 - setbits16(&io_port->iop_pdpar, 0x0080); 153 - clrbits16(&io_port->iop_pddir, 0x0080); 231 + #ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3 232 + clrbits32(&bcsr[4], BCSR4_ETH10_RST); 233 + udelay(1000); 234 + setbits32(&bcsr[4], BCSR4_ETH10_RST); 154 235 155 - bcsr_io = ioremap(BCSR5, sizeof(unsigned long)); 156 - clrbits32(bcsr_io, BCSR5_MII1_EN); 157 - clrbits32(bcsr_io, BCSR5_MII1_RST); 158 - #ifndef CONFIG_FC_ENET_HAS_SCC 159 - clrbits32(bcsr_io, BCSR5_MII2_EN); 160 - clrbits32(bcsr_io, BCSR5_MII2_RST); 236 + setbits32(&bcsr[1], BCSR1_ETHEN); 161 237 238 + np = of_find_node_by_path("/soc@ff000000/cpm@9c0/serial@a80"); 239 + #else 240 + np = of_find_node_by_path("/soc@ff000000/cpm@9c0/ethernet@a40"); 162 241 #endif 163 - iounmap(bcsr_io); 164 - immr_unmap(io_port); 165 242 166 - #endif 243 + /* The SCC3 enet registers overlap the SMC1 registers, so 244 + * one of the two must be removed from the device tree. 245 + */ 246 + 247 + if (np) { 248 + of_detach_node(np); 249 + of_node_put(np); 250 + } 167 251 168 252 #ifdef CONFIG_PCMCIA_M8XX 169 - /*Set up board specific hook-ups */ 253 + /* Set up board specific hook-ups.*/ 170 254 m8xx_pcmcia_ops.hw_ctrl = pcmcia_hw_setup; 171 255 m8xx_pcmcia_ops.voltage_set = pcmcia_set_voltage; 172 256 #endif 173 257 } 174 258 175 - static void init_fec1_ioports(struct fs_platform_info *ptr) 259 + static int __init mpc885ads_probe(void) 176 260 { 177 - cpm8xx_t *cp = (cpm8xx_t *) immr_map(im_cpm); 178 - iop8xx_t *io_port = (iop8xx_t *) immr_map(im_ioport); 179 - 180 - /* configure FEC1 pins */ 181 - setbits16(&io_port->iop_papar, 0xf830); 182 - setbits16(&io_port->iop_padir, 0x0830); 183 - clrbits16(&io_port->iop_padir, 0xf000); 184 - 185 - setbits32(&cp->cp_pbpar, 0x00001001); 186 - clrbits32(&cp->cp_pbdir, 0x00001001); 187 - 188 - setbits16(&io_port->iop_pcpar, 0x000c); 189 - clrbits16(&io_port->iop_pcdir, 0x000c); 190 - 191 - setbits32(&cp->cp_pepar, 0x00000003); 192 - setbits32(&cp->cp_pedir, 0x00000003); 193 - clrbits32(&cp->cp_peso, 0x00000003); 194 - clrbits32(&cp->cp_cptr, 0x00000100); 195 - 196 - immr_unmap(io_port); 197 - immr_unmap(cp); 261 + unsigned long root = of_get_flat_dt_root(); 262 + return of_flat_dt_is_compatible(root, "fsl,mpc885ads"); 198 263 } 199 264 200 - static void init_fec2_ioports(struct fs_platform_info *ptr) 265 + static struct of_device_id __initdata of_bus_ids[] = { 266 + { .name = "soc", }, 267 + { .name = "cpm", }, 268 + { .name = "localbus", }, 269 + {}, 270 + }; 271 + 272 + static int __init declare_of_platform_devices(void) 201 273 { 202 - cpm8xx_t *cp = (cpm8xx_t *) immr_map(im_cpm); 203 - iop8xx_t *io_port = (iop8xx_t *) immr_map(im_ioport); 204 - 205 - /* configure FEC2 pins */ 206 - setbits32(&cp->cp_pepar, 0x0003fffc); 207 - setbits32(&cp->cp_pedir, 0x0003fffc); 208 - clrbits32(&cp->cp_peso, 0x000087fc); 209 - setbits32(&cp->cp_peso, 0x00037800); 210 - clrbits32(&cp->cp_cptr, 0x00000080); 211 - 212 - immr_unmap(io_port); 213 - immr_unmap(cp); 214 - } 215 - 216 - void init_fec_ioports(struct fs_platform_info *fpi) 217 - { 218 - int fec_no = fs_get_fec_index(fpi->fs_no); 219 - 220 - switch (fec_no) { 221 - case 0: 222 - init_fec1_ioports(fpi); 223 - break; 224 - case 1: 225 - init_fec2_ioports(fpi); 226 - break; 227 - default: 228 - printk(KERN_ERR "init_fec_ioports: invalid FEC number\n"); 229 - return; 230 - } 231 - } 232 - 233 - static void init_scc3_ioports(struct fs_platform_info *fpi) 234 - { 235 - unsigned *bcsr_io; 236 - iop8xx_t *io_port; 237 - cpm8xx_t *cp; 238 - 239 - bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE); 240 - io_port = (iop8xx_t *) immr_map(im_ioport); 241 - cp = (cpm8xx_t *) immr_map(im_cpm); 242 - 243 - if (bcsr_io == NULL) { 244 - printk(KERN_CRIT "Could not remap BCSR\n"); 245 - return; 246 - } 247 - 248 - /* Enable the PHY. 249 - */ 250 - clrbits32(bcsr_io + 4, BCSR4_ETH10_RST); 251 - udelay(1000); 252 - setbits32(bcsr_io + 4, BCSR4_ETH10_RST); 253 - /* Configure port A pins for Txd and Rxd. 254 - */ 255 - setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD); 256 - clrbits16(&io_port->iop_padir, PA_ENET_RXD | PA_ENET_TXD); 257 - 258 - /* Configure port C pins to enable CLSN and RENA. 259 - */ 260 - clrbits16(&io_port->iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); 261 - clrbits16(&io_port->iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); 262 - setbits16(&io_port->iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); 263 - 264 - /* Configure port E for TCLK and RCLK. 265 - */ 266 - setbits32(&cp->cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK); 267 - clrbits32(&cp->cp_pepar, PE_ENET_TENA); 268 - clrbits32(&cp->cp_pedir, PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA); 269 - clrbits32(&cp->cp_peso, PE_ENET_TCLK | PE_ENET_RCLK); 270 - setbits32(&cp->cp_peso, PE_ENET_TENA); 271 - 272 - /* Configure Serial Interface clock routing. 273 - * First, clear all SCC bits to zero, then set the ones we want. 274 - */ 275 - clrbits32(&cp->cp_sicr, SICR_ENET_MASK); 276 - setbits32(&cp->cp_sicr, SICR_ENET_CLKRT); 277 - 278 - /* Disable Rx and Tx. SMC1 sshould be stopped if SCC3 eternet are used. 279 - */ 280 - clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN); 281 - /* On the MPC885ADS SCC ethernet PHY is initialized in the full duplex mode 282 - * by H/W setting after reset. SCC ethernet controller support only half duplex. 283 - * This discrepancy of modes causes a lot of carrier lost errors. 284 - */ 285 - 286 - /* In the original SCC enet driver the following code is placed at 287 - the end of the initialization */ 288 - setbits32(&cp->cp_pepar, PE_ENET_TENA); 289 - clrbits32(&cp->cp_pedir, PE_ENET_TENA); 290 - setbits32(&cp->cp_peso, PE_ENET_TENA); 291 - 292 - setbits32(bcsr_io + 4, BCSR1_ETHEN); 293 - iounmap(bcsr_io); 294 - immr_unmap(io_port); 295 - immr_unmap(cp); 296 - } 297 - 298 - void init_scc_ioports(struct fs_platform_info *fpi) 299 - { 300 - int scc_no = fs_get_scc_index(fpi->fs_no); 301 - 302 - switch (scc_no) { 303 - case 2: 304 - init_scc3_ioports(fpi); 305 - break; 306 - default: 307 - printk(KERN_ERR "init_scc_ioports: invalid SCC number\n"); 308 - return; 309 - } 310 - } 311 - 312 - static void init_smc1_uart_ioports(struct fs_uart_platform_info *ptr) 313 - { 314 - unsigned *bcsr_io; 315 - cpm8xx_t *cp; 316 - 317 - cp = (cpm8xx_t *) immr_map(im_cpm); 318 - setbits32(&cp->cp_pepar, 0x000000c0); 319 - clrbits32(&cp->cp_pedir, 0x000000c0); 320 - clrbits32(&cp->cp_peso, 0x00000040); 321 - setbits32(&cp->cp_peso, 0x00000080); 322 - immr_unmap(cp); 323 - 324 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 325 - 326 - if (bcsr_io == NULL) { 327 - printk(KERN_CRIT "Could not remap BCSR1\n"); 328 - return; 329 - } 330 - clrbits32(bcsr_io, BCSR1_RS232EN_1); 331 - iounmap(bcsr_io); 332 - } 333 - 334 - static void init_smc2_uart_ioports(struct fs_uart_platform_info *fpi) 335 - { 336 - unsigned *bcsr_io; 337 - cpm8xx_t *cp; 338 - 339 - cp = (cpm8xx_t *) immr_map(im_cpm); 340 - setbits32(&cp->cp_pepar, 0x00000c00); 341 - clrbits32(&cp->cp_pedir, 0x00000c00); 342 - clrbits32(&cp->cp_peso, 0x00000400); 343 - setbits32(&cp->cp_peso, 0x00000800); 344 - immr_unmap(cp); 345 - 346 - bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 347 - 348 - if (bcsr_io == NULL) { 349 - printk(KERN_CRIT "Could not remap BCSR1\n"); 350 - return; 351 - } 352 - clrbits32(bcsr_io, BCSR1_RS232EN_2); 353 - iounmap(bcsr_io); 354 - } 355 - 356 - void init_smc_ioports(struct fs_uart_platform_info *data) 357 - { 358 - int smc_no = fs_uart_id_fsid2smc(data->fs_no); 359 - 360 - switch (smc_no) { 361 - case 0: 362 - init_smc1_uart_ioports(data); 363 - data->brg = data->clk_rx; 364 - break; 365 - case 1: 366 - init_smc2_uart_ioports(data); 367 - data->brg = data->clk_rx; 368 - break; 369 - default: 370 - printk(KERN_ERR "init_scc_ioports: invalid SCC number\n"); 371 - return; 372 - } 373 - } 374 - 375 - int platform_device_skip(const char *model, int id) 376 - { 377 - #ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3 378 - const char *dev = "FEC"; 379 - int n = 2; 380 - #else 381 - const char *dev = "SCC"; 382 - int n = 3; 383 - #endif 384 - 385 - if (!strcmp(model, dev) && n == id) 386 - return 1; 274 + /* Publish the QE devices */ 275 + if (machine_is(mpc885_ads)) 276 + of_platform_bus_probe(NULL, of_bus_ids, NULL); 387 277 388 278 return 0; 389 279 } 280 + device_initcall(declare_of_platform_devices); 390 281 391 - static void __init mpc885ads_setup_arch(void) 392 - { 393 - cpm_reset(); 394 - 395 - mpc885ads_board_setup(); 396 - 397 - ROOT_DEV = Root_NFS; 398 - } 399 - 400 - static int __init mpc885ads_probe(void) 401 - { 402 - char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), 403 - "model", NULL); 404 - if (model == NULL) 405 - return 0; 406 - if (strcmp(model, "MPC885ADS")) 407 - return 0; 408 - 409 - return 1; 410 - } 411 - 412 - define_machine(mpc885_ads) 413 - { 414 - .name = "MPC885 ADS", 415 - .probe = mpc885ads_probe, 416 - .setup_arch = mpc885ads_setup_arch, 417 - .init_IRQ = m8xx_pic_init, 418 - .get_irq = mpc8xx_get_irq, 419 - .restart = mpc8xx_restart, 420 - .calibrate_decr = mpc8xx_calibrate_decr, 421 - .set_rtc_time = mpc8xx_set_rtc_time, 422 - .get_rtc_time = mpc8xx_get_rtc_time, 282 + define_machine(mpc885_ads) { 283 + .name = "Freescale MPC885 ADS", 284 + .probe = mpc885ads_probe, 285 + .setup_arch = mpc885ads_setup_arch, 286 + .init_IRQ = m8xx_pic_init, 287 + .get_irq = mpc8xx_get_irq, 288 + .restart = mpc8xx_restart, 289 + .calibrate_decr = mpc8xx_calibrate_decr, 290 + .set_rtc_time = mpc8xx_set_rtc_time, 291 + .get_rtc_time = mpc8xx_get_rtc_time, 292 + .progress = udbg_progress, 423 293 };