mv_common.c (233013) | mv_common.c (238873) |
---|---|
1/*- 2 * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. 3 * All rights reserved. 4 * 5 * Developed by Semihalf. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. 3 * All rights reserved. 4 * 5 * Developed by Semihalf. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/arm/mv/common.c 233013 2012-03-15 21:48:27Z raj $"); | 33__FBSDID("$FreeBSD: head/sys/arm/mv/common.c 238873 2012-07-28 21:56:24Z hrs $"); |
34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/bus.h> 38#include <sys/kernel.h> 39 40#include <dev/fdt/fdt_common.h> 41#include <dev/ofw/openfirm.h> --- 204 unchanged lines hidden (view full) --- 246 247uint32_t 248cpu_extra_feat(void) 249{ 250 uint32_t dev, rev; 251 uint32_t ef = 0; 252 253 soc_id(&dev, &rev); | 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/bus.h> 38#include <sys/kernel.h> 39 40#include <dev/fdt/fdt_common.h> 41#include <dev/ofw/openfirm.h> --- 204 unchanged lines hidden (view full) --- 246 247uint32_t 248cpu_extra_feat(void) 249{ 250 uint32_t dev, rev; 251 uint32_t ef = 0; 252 253 soc_id(&dev, &rev); |
254 if (dev == MV_DEV_88F6281 || dev == MV_DEV_MV78100_Z0 || | 254 if (dev == MV_DEV_88F6281 || 255 dev == MV_DEV_88F6282 || 256 dev == MV_DEV_MV78100_Z0 || |
255 dev == MV_DEV_MV78100) 256 __asm __volatile("mrc p15, 1, %0, c15, c1, 0" : "=r" (ef)); 257 else if (dev == MV_DEV_88F5182 || dev == MV_DEV_88F5281) 258 __asm __volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (ef)); 259 else if (bootverbose) 260 printf("This ARM Core does not support any extra features\n"); 261 262 return (ef); --- 83 unchanged lines hidden (view full) --- 346 dev = "Marvell 88F6281"; 347 if (r == 0) 348 rev = "Z0"; 349 else if (r == 2) 350 rev = "A0"; 351 else if (r == 3) 352 rev = "A1"; 353 break; | 257 dev == MV_DEV_MV78100) 258 __asm __volatile("mrc p15, 1, %0, c15, c1, 0" : "=r" (ef)); 259 else if (dev == MV_DEV_88F5182 || dev == MV_DEV_88F5281) 260 __asm __volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (ef)); 261 else if (bootverbose) 262 printf("This ARM Core does not support any extra features\n"); 263 264 return (ef); --- 83 unchanged lines hidden (view full) --- 348 dev = "Marvell 88F6281"; 349 if (r == 0) 350 rev = "Z0"; 351 else if (r == 2) 352 rev = "A0"; 353 else if (r == 3) 354 rev = "A1"; 355 break; |
356 case MV_DEV_88F6282: 357 dev = "Marvell 88F6282"; 358 if (r == 0) 359 rev = "A0"; 360 else if (r == 1) 361 rev = "A1"; 362 break; |
|
354 case MV_DEV_MV78100_Z0: 355 dev = "Marvell MV78100 Z0"; 356 break; 357 case MV_DEV_MV78100: 358 dev = "Marvell MV78100"; 359 break; 360 default: 361 dev = "UNKNOWN"; --- 169 unchanged lines hidden (view full) --- 531 uint32_t dev, rev; 532 533 soc_id(&dev, &rev); 534 535 /* Depending on the SoC certain windows have remap capability */ 536 if ((dev == MV_DEV_88F5182 && i < 2) || 537 (dev == MV_DEV_88F5281 && i < 4) || 538 (dev == MV_DEV_88F6281 && i < 4) || | 363 case MV_DEV_MV78100_Z0: 364 dev = "Marvell MV78100 Z0"; 365 break; 366 case MV_DEV_MV78100: 367 dev = "Marvell MV78100"; 368 break; 369 default: 370 dev = "UNKNOWN"; --- 169 unchanged lines hidden (view full) --- 540 uint32_t dev, rev; 541 542 soc_id(&dev, &rev); 543 544 /* Depending on the SoC certain windows have remap capability */ 545 if ((dev == MV_DEV_88F5182 && i < 2) || 546 (dev == MV_DEV_88F5281 && i < 4) || 547 (dev == MV_DEV_88F6281 && i < 4) || |
548 (dev == MV_DEV_88F6282 && i < 4) || |
|
539 (dev == MV_DEV_MV78100 && i < 8) || 540 (dev == MV_DEV_MV78100_Z0 && i < 8)) 541 return (1); 542 543 return (0); 544} 545 546/* XXX This should check for overlapping remap fields too.. */ --- 768 unchanged lines hidden (view full) --- 1315} 1316 1317static int 1318xor_max_eng(void) 1319{ 1320 uint32_t dev, rev; 1321 1322 soc_id(&dev, &rev); | 549 (dev == MV_DEV_MV78100 && i < 8) || 550 (dev == MV_DEV_MV78100_Z0 && i < 8)) 551 return (1); 552 553 return (0); 554} 555 556/* XXX This should check for overlapping remap fields too.. */ --- 768 unchanged lines hidden (view full) --- 1325} 1326 1327static int 1328xor_max_eng(void) 1329{ 1330 uint32_t dev, rev; 1331 1332 soc_id(&dev, &rev); |
1323 if (dev == MV_DEV_88F6281) | 1333 if (dev == MV_DEV_88F6281 || 1334 dev == MV_DEV_88F6282) |
1324 return (2); 1325 else if ((dev == MV_DEV_MV78100) || (dev == MV_DEV_MV78100_Z0)) 1326 return (1); 1327 else 1328 return (0); 1329} 1330 1331static void --- 544 unchanged lines hidden --- | 1335 return (2); 1336 else if ((dev == MV_DEV_MV78100) || (dev == MV_DEV_MV78100_Z0)) 1337 return (1); 1338 else 1339 return (0); 1340} 1341 1342static void --- 544 unchanged lines hidden --- |