octeon-model.c revision 232812
1210284Sjmallett/***********************license start*************** 2232812Sjmallett * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights 3215990Sjmallett * reserved. 4210284Sjmallett * 5210284Sjmallett * 6215990Sjmallett * Redistribution and use in source and binary forms, with or without 7215990Sjmallett * modification, are permitted provided that the following conditions are 8215990Sjmallett * met: 9210284Sjmallett * 10215990Sjmallett * * Redistributions of source code must retain the above copyright 11215990Sjmallett * notice, this list of conditions and the following disclaimer. 12210284Sjmallett * 13215990Sjmallett * * Redistributions in binary form must reproduce the above 14215990Sjmallett * copyright notice, this list of conditions and the following 15215990Sjmallett * disclaimer in the documentation and/or other materials provided 16215990Sjmallett * with the distribution. 17215990Sjmallett 18232812Sjmallett * * Neither the name of Cavium Inc. nor the names of 19215990Sjmallett * its contributors may be used to endorse or promote products 20215990Sjmallett * derived from this software without specific prior written 21215990Sjmallett * permission. 22215990Sjmallett 23215990Sjmallett * This Software, including technical data, may be subject to U.S. export control 24215990Sjmallett * laws, including the U.S. Export Administration Act and its associated 25215990Sjmallett * regulations, and may be subject to export or import regulations in other 26215990Sjmallett * countries. 27215990Sjmallett 28215990Sjmallett * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" 29232812Sjmallett * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR 30215990Sjmallett * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO 31215990Sjmallett * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR 32215990Sjmallett * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM 33215990Sjmallett * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE, 34215990Sjmallett * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF 35215990Sjmallett * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR 36215990Sjmallett * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR 37215990Sjmallett * PERFORMANCE OF THE SOFTWARE LIES WITH YOU. 38210284Sjmallett ***********************license end**************************************/ 39210284Sjmallett 40210284Sjmallett 41210284Sjmallett 42210284Sjmallett 43210284Sjmallett 44210284Sjmallett 45215990Sjmallett 46210284Sjmallett/** 47210284Sjmallett * @file 48210284Sjmallett * 49210284Sjmallett * File defining functions for working with different Octeon 50210284Sjmallett * models. 51210284Sjmallett * 52232812Sjmallett * <hr>$Revision: 70030 $<hr> 53210284Sjmallett */ 54215990Sjmallett#ifdef CVMX_BUILD_FOR_LINUX_KERNEL 55215990Sjmallett#include <asm/octeon/octeon.h> 56215990Sjmallett#include <asm/octeon/cvmx-clock.h> 57215990Sjmallett#else 58210284Sjmallett#include "cvmx.h" 59210284Sjmallett#include "cvmx-pow.h" 60210284Sjmallett#include "cvmx-warn.h" 61215990Sjmallett#endif 62210284Sjmallett 63210284Sjmallett#if defined(CVMX_BUILD_FOR_LINUX_USER) || defined(CVMX_BUILD_FOR_STANDALONE) 64210284Sjmallett#include <octeon-app-init.h> 65210284Sjmallett#include "cvmx-sysinfo.h" 66210284Sjmallett 67210284Sjmallett/** 68210284Sjmallett * This function checks to see if the software is compatible with the 69210284Sjmallett * chip it is running on. This is called in the application startup code 70210284Sjmallett * and does not need to be called directly by the application. 71210284Sjmallett * Does not return if software is incompatible. 72210284Sjmallett * 73210284Sjmallett * @param chip_id chip id that the software is being run on. 74210284Sjmallett * 75210284Sjmallett * @return 0: runtime checking or exact version match 76210284Sjmallett * 1: chip is newer revision than compiled for, but software will run properly. 77210284Sjmallett */ 78232812Sjmallettint octeon_model_version_check(uint32_t chip_id __attribute__ ((unused))) 79210284Sjmallett{ 80210284Sjmallett //printf("Model Number: %s\n", octeon_model_get_string(chip_id)); 81215990Sjmallett#if !OCTEON_IS_COMMON_BINARY() 82210284Sjmallett /* Check for special case of mismarked 3005 samples, and adjust cpuid */ 83210284Sjmallett if (chip_id == OCTEON_CN3010_PASS1 && (cvmx_read_csr(0x80011800800007B8ull) & (1ull << 34))) 84210284Sjmallett chip_id |= 0x10; 85210284Sjmallett 86210284Sjmallett if ((OCTEON_MODEL & 0xffffff) != chip_id) 87210284Sjmallett { 88210284Sjmallett if (!OCTEON_IS_MODEL((OM_IGNORE_REVISION | chip_id)) || (OCTEON_MODEL & 0xffffff) > chip_id || (((OCTEON_MODEL & 0xffffff) ^ chip_id) & 0x10)) 89210284Sjmallett { 90210284Sjmallett printf("ERROR: Software not configured for this chip\n" 91210284Sjmallett " Expecting ID=0x%08x, Chip is 0x%08x\n", (OCTEON_MODEL & 0xffffff), (unsigned int)chip_id); 92210284Sjmallett if ((OCTEON_MODEL & 0xffffff) > chip_id) 93210284Sjmallett printf("Refusing to run on older revision than program was compiled for.\n"); 94215990Sjmallett exit(-1); 95210284Sjmallett } 96210284Sjmallett else 97210284Sjmallett { 98210284Sjmallett printf("\n###################################################\n"); 99210284Sjmallett printf("WARNING: Software configured for older revision than running on.\n" 100210284Sjmallett " Compiled for ID=0x%08x, Chip is 0x%08x\n", (OCTEON_MODEL & 0xffffff), (unsigned int)chip_id); 101210284Sjmallett printf("###################################################\n\n"); 102210284Sjmallett return(1); 103210284Sjmallett } 104210284Sjmallett } 105210284Sjmallett#endif 106210284Sjmallett 107210284Sjmallett cvmx_warn_if(CVMX_ENABLE_PARAMETER_CHECKING, "Parameter checks are enabled. Expect some performance loss due to the extra checking\n"); 108210284Sjmallett cvmx_warn_if(CVMX_ENABLE_CSR_ADDRESS_CHECKING, "CSR address checks are enabled. Expect some performance loss due to the extra checking\n"); 109210284Sjmallett cvmx_warn_if(CVMX_ENABLE_POW_CHECKS, "POW state checks are enabled. Expect some performance loss due to the extra checking\n"); 110210284Sjmallett 111210284Sjmallett return(0); 112210284Sjmallett} 113210284Sjmallett 114210284Sjmallett#endif 115210284Sjmallett/** 116210284Sjmallett * Given the chip processor ID from COP0, this function returns a 117210284Sjmallett * string representing the chip model number. The string is of the 118210284Sjmallett * form CNXXXXpX.X-FREQ-SUFFIX. 119210284Sjmallett * - XXXX = The chip model number 120210284Sjmallett * - X.X = Chip pass number 121210284Sjmallett * - FREQ = Current frequency in Mhz 122210284Sjmallett * - SUFFIX = NSP, EXP, SCP, SSP, or CP 123210284Sjmallett * 124210284Sjmallett * @param chip_id Chip ID 125210284Sjmallett * 126210284Sjmallett * @return Model string 127210284Sjmallett */ 128210284Sjmallettconst char *octeon_model_get_string(uint32_t chip_id) 129210284Sjmallett{ 130210284Sjmallett static char buffer[32]; 131210284Sjmallett return octeon_model_get_string_buffer(chip_id,buffer); 132210284Sjmallett} 133210284Sjmallett 134210284Sjmallett/* Version of octeon_model_get_string() that takes buffer as argument, as 135210284Sjmallett** running early in u-boot static/global variables don't work when running from 136210284Sjmallett** flash 137210284Sjmallett*/ 138210284Sjmallettconst char *octeon_model_get_string_buffer(uint32_t chip_id, char * buffer) 139210284Sjmallett{ 140210284Sjmallett const char * family; 141210284Sjmallett const char * core_model; 142210284Sjmallett char pass[4]; 143232812Sjmallett#ifndef CVMX_BUILD_FOR_UBOOT 144210284Sjmallett int clock_mhz; 145232812Sjmallett#endif 146210284Sjmallett const char * suffix; 147210284Sjmallett cvmx_l2d_fus3_t fus3; 148210284Sjmallett int num_cores; 149210284Sjmallett cvmx_mio_fus_dat2_t fus_dat2; 150210284Sjmallett cvmx_mio_fus_dat3_t fus_dat3; 151210284Sjmallett char fuse_model[10]; 152210284Sjmallett uint32_t fuse_data = 0; 153210284Sjmallett 154232812Sjmallett fus3.u64 = 0; 155232812Sjmallett if (OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX)) 156215990Sjmallett fus3.u64 = cvmx_read_csr(CVMX_L2D_FUS3); 157210284Sjmallett fus_dat2.u64 = cvmx_read_csr(CVMX_MIO_FUS_DAT2); 158210284Sjmallett fus_dat3.u64 = cvmx_read_csr(CVMX_MIO_FUS_DAT3); 159210284Sjmallett num_cores = cvmx_pop(cvmx_read_csr(CVMX_CIU_FUSE)); 160210284Sjmallett 161232812Sjmallett /* Make sure the non existent devices look disabled */ 162210284Sjmallett switch ((chip_id >> 8) & 0xff) 163210284Sjmallett { 164210284Sjmallett case 6: /* CN50XX */ 165210284Sjmallett case 2: /* CN30XX */ 166210284Sjmallett fus_dat3.s.nodfa_dte = 1; 167210284Sjmallett fus_dat3.s.nozip = 1; 168210284Sjmallett break; 169210284Sjmallett case 4: /* CN57XX or CN56XX */ 170210284Sjmallett fus_dat3.s.nodfa_dte = 1; 171210284Sjmallett break; 172210284Sjmallett default: 173210284Sjmallett break; 174210284Sjmallett } 175210284Sjmallett 176210284Sjmallett /* Make a guess at the suffix */ 177210284Sjmallett /* NSP = everything */ 178210284Sjmallett /* EXP = No crypto */ 179210284Sjmallett /* SCP = No DFA, No zip */ 180210284Sjmallett /* CP = No DFA, No crypto, No zip */ 181210284Sjmallett if (fus_dat3.s.nodfa_dte) 182210284Sjmallett { 183210284Sjmallett if (fus_dat2.s.nocrypto) 184210284Sjmallett suffix = "CP"; 185210284Sjmallett else 186210284Sjmallett suffix = "SCP"; 187210284Sjmallett } 188210284Sjmallett else if (fus_dat2.s.nocrypto) 189210284Sjmallett suffix = "EXP"; 190210284Sjmallett else 191210284Sjmallett suffix = "NSP"; 192210284Sjmallett 193210284Sjmallett /* Assume pass number is encoded using <5:3><2:0>. Exceptions will be 194210284Sjmallett fixed later */ 195210284Sjmallett sprintf(pass, "%d.%d", (int)((chip_id>>3)&7)+1, (int)chip_id&7); 196210284Sjmallett 197210284Sjmallett /* Use the number of cores to determine the last 2 digits of the model 198210284Sjmallett number. There are some exceptions that are fixed later */ 199210284Sjmallett switch (num_cores) 200210284Sjmallett { 201232812Sjmallett case 32: core_model = "80"; break; 202232812Sjmallett case 24: core_model = "70"; break; 203210284Sjmallett case 16: core_model = "60"; break; 204210284Sjmallett case 15: core_model = "58"; break; 205210284Sjmallett case 14: core_model = "55"; break; 206210284Sjmallett case 13: core_model = "52"; break; 207210284Sjmallett case 12: core_model = "50"; break; 208210284Sjmallett case 11: core_model = "48"; break; 209210284Sjmallett case 10: core_model = "45"; break; 210210284Sjmallett case 9: core_model = "42"; break; 211210284Sjmallett case 8: core_model = "40"; break; 212210284Sjmallett case 7: core_model = "38"; break; 213210284Sjmallett case 6: core_model = "34"; break; 214210284Sjmallett case 5: core_model = "32"; break; 215210284Sjmallett case 4: core_model = "30"; break; 216210284Sjmallett case 3: core_model = "25"; break; 217210284Sjmallett case 2: core_model = "20"; break; 218210284Sjmallett case 1: core_model = "10"; break; 219210284Sjmallett default: core_model = "XX"; break; 220210284Sjmallett } 221210284Sjmallett 222210284Sjmallett /* Now figure out the family, the first two digits */ 223210284Sjmallett switch ((chip_id >> 8) & 0xff) 224210284Sjmallett { 225210284Sjmallett case 0: /* CN38XX, CN37XX or CN36XX */ 226210284Sjmallett if (fus3.cn38xx.crip_512k) 227210284Sjmallett { 228210284Sjmallett /* For some unknown reason, the 16 core one is called 37 instead of 36 */ 229210284Sjmallett if (num_cores >= 16) 230210284Sjmallett family = "37"; 231210284Sjmallett else 232210284Sjmallett family = "36"; 233210284Sjmallett } 234210284Sjmallett else 235210284Sjmallett family = "38"; 236210284Sjmallett /* This series of chips didn't follow the standard pass numbering */ 237210284Sjmallett switch (chip_id & 0xf) 238210284Sjmallett { 239210284Sjmallett case 0: strcpy(pass, "1.X"); break; 240210284Sjmallett case 1: strcpy(pass, "2.X"); break; 241210284Sjmallett case 3: strcpy(pass, "3.X"); break; 242210284Sjmallett default:strcpy(pass, "X.X"); break; 243210284Sjmallett } 244210284Sjmallett break; 245210284Sjmallett case 1: /* CN31XX or CN3020 */ 246210284Sjmallett if ((chip_id & 0x10) || fus3.cn31xx.crip_128k) 247210284Sjmallett family = "30"; 248210284Sjmallett else 249210284Sjmallett family = "31"; 250210284Sjmallett /* This series of chips didn't follow the standard pass numbering */ 251210284Sjmallett switch (chip_id & 0xf) 252210284Sjmallett { 253210284Sjmallett case 0: strcpy(pass, "1.0"); break; 254210284Sjmallett case 2: strcpy(pass, "1.1"); break; 255210284Sjmallett default:strcpy(pass, "X.X"); break; 256210284Sjmallett } 257210284Sjmallett break; 258210284Sjmallett case 2: /* CN3010 or CN3005 */ 259210284Sjmallett family = "30"; 260210284Sjmallett /* A chip with half cache is an 05 */ 261210284Sjmallett if (fus3.cn30xx.crip_64k) 262210284Sjmallett core_model = "05"; 263210284Sjmallett /* This series of chips didn't follow the standard pass numbering */ 264210284Sjmallett switch (chip_id & 0xf) 265210284Sjmallett { 266210284Sjmallett case 0: strcpy(pass, "1.0"); break; 267210284Sjmallett case 2: strcpy(pass, "1.1"); break; 268210284Sjmallett default:strcpy(pass, "X.X"); break; 269210284Sjmallett } 270210284Sjmallett break; 271210284Sjmallett case 3: /* CN58XX */ 272210284Sjmallett family = "58"; 273232812Sjmallett /* Special case. 4 core, half cache (CP with half cache) */ 274232812Sjmallett if ((num_cores == 4) && fus3.cn58xx.crip_1024k && !strncmp(suffix, "CP", 2)) 275210284Sjmallett core_model = "29"; 276210284Sjmallett 277210284Sjmallett /* Pass 1 uses different encodings for pass numbers */ 278210284Sjmallett if ((chip_id & 0xFF)< 0x8) 279210284Sjmallett { 280210284Sjmallett switch (chip_id & 0x3) 281210284Sjmallett { 282210284Sjmallett case 0: strcpy(pass, "1.0"); break; 283210284Sjmallett case 1: strcpy(pass, "1.1"); break; 284210284Sjmallett case 3: strcpy(pass, "1.2"); break; 285210284Sjmallett default:strcpy(pass, "1.X"); break; 286210284Sjmallett } 287210284Sjmallett } 288210284Sjmallett break; 289210284Sjmallett case 4: /* CN57XX, CN56XX, CN55XX, CN54XX */ 290210284Sjmallett if (fus_dat2.cn56xx.raid_en) 291210284Sjmallett { 292210284Sjmallett if (fus3.cn56xx.crip_1024k) 293210284Sjmallett family = "55"; 294210284Sjmallett else 295210284Sjmallett family = "57"; 296210284Sjmallett if (fus_dat2.cn56xx.nocrypto) 297210284Sjmallett suffix = "SP"; 298210284Sjmallett else 299210284Sjmallett suffix = "SSP"; 300210284Sjmallett } 301215990Sjmallett else 302210284Sjmallett { 303210284Sjmallett if (fus_dat2.cn56xx.nocrypto) 304210284Sjmallett suffix = "CP"; 305210284Sjmallett else 306210284Sjmallett { 307210284Sjmallett suffix = "NSP"; 308210284Sjmallett if (fus_dat3.s.nozip) 309210284Sjmallett suffix = "SCP"; 310232812Sjmallett 311232812Sjmallett if (fus_dat3.s.bar2_en) 312232812Sjmallett suffix = "NSPB2"; 313210284Sjmallett } 314210284Sjmallett if (fus3.cn56xx.crip_1024k) 315210284Sjmallett family = "54"; 316210284Sjmallett else 317210284Sjmallett family = "56"; 318210284Sjmallett } 319210284Sjmallett break; 320210284Sjmallett case 6: /* CN50XX */ 321210284Sjmallett family = "50"; 322210284Sjmallett break; 323210284Sjmallett case 7: /* CN52XX */ 324210284Sjmallett if (fus3.cn52xx.crip_256k) 325210284Sjmallett family = "51"; 326210284Sjmallett else 327210284Sjmallett family = "52"; 328210284Sjmallett break; 329232812Sjmallett case 0x93: /* CN61XX */ 330232812Sjmallett family = "61"; 331232812Sjmallett if (fus_dat3.cn61xx.nozip) 332232812Sjmallett suffix = "SCP"; 333232812Sjmallett else 334232812Sjmallett suffix = "AAP"; 335232812Sjmallett break; 336215990Sjmallett case 0x90: /* CN63XX */ 337215990Sjmallett family = "63"; 338232812Sjmallett if (fus_dat3.s.l2c_crip == 2) 339232812Sjmallett family = "62"; 340232812Sjmallett if (num_cores == 6) /* Other core counts match generic */ 341215990Sjmallett core_model = "35"; 342215990Sjmallett if (fus_dat2.cn63xx.nocrypto) 343215990Sjmallett suffix = "CP"; 344215990Sjmallett else if (fus_dat2.cn63xx.dorm_crypto) 345215990Sjmallett suffix = "DAP"; 346232812Sjmallett else if (fus_dat3.cn63xx.nozip) 347232812Sjmallett suffix = "SCP"; 348215990Sjmallett else 349215990Sjmallett suffix = "AAP"; 350215990Sjmallett break; 351232812Sjmallett case 0x92: /* CN66XX */ 352232812Sjmallett family = "66"; 353232812Sjmallett if (num_cores == 6) /* Other core counts match generic */ 354232812Sjmallett core_model = "35"; 355232812Sjmallett if (fus_dat2.cn66xx.nocrypto && fus_dat2.cn66xx.dorm_crypto) 356232812Sjmallett suffix = "AP"; 357232812Sjmallett if (fus_dat2.cn66xx.nocrypto) 358232812Sjmallett suffix = "CP"; 359232812Sjmallett else if (fus_dat2.cn66xx.dorm_crypto) 360232812Sjmallett suffix = "DAP"; 361232812Sjmallett else if (fus_dat3.cn66xx.nozip && fus_dat2.cn66xx.raid_en) 362232812Sjmallett suffix = "SCP"; 363232812Sjmallett else if (!fus_dat2.cn66xx.raid_en) 364232812Sjmallett suffix = "HAP"; 365232812Sjmallett else 366232812Sjmallett suffix = "AAP"; 367232812Sjmallett break; 368232812Sjmallett case 0x91: /* CN68XX */ 369232812Sjmallett family = "68"; 370232812Sjmallett if (fus_dat2.cn68xx.nocrypto && fus_dat3.cn68xx.nozip) 371232812Sjmallett suffix = "CP"; 372232812Sjmallett else if (fus_dat2.cn68xx.dorm_crypto) 373232812Sjmallett suffix = "DAP"; 374232812Sjmallett else if (fus_dat3.cn68xx.nozip) 375232812Sjmallett suffix = "SCP"; 376232812Sjmallett else if (fus_dat2.cn68xx.nocrypto) 377232812Sjmallett suffix = "SP"; 378232812Sjmallett else if (!fus_dat2.cn68xx.raid_en) 379232812Sjmallett suffix = "HAP"; 380232812Sjmallett else 381232812Sjmallett suffix = "AAP"; 382232812Sjmallett break; 383232812Sjmallett case 0x94: /* CNF71XX */ 384232812Sjmallett family = "F71"; 385232812Sjmallett if (fus_dat3.cnf71xx.nozip) 386232812Sjmallett suffix = "SCP"; 387232812Sjmallett else 388232812Sjmallett suffix = "AAP"; 389232812Sjmallett break; 390210284Sjmallett default: 391210284Sjmallett family = "XX"; 392210284Sjmallett core_model = "XX"; 393210284Sjmallett strcpy(pass, "X.X"); 394210284Sjmallett suffix = "XXX"; 395210284Sjmallett break; 396210284Sjmallett } 397210284Sjmallett 398232812Sjmallett#ifndef CVMX_BUILD_FOR_UBOOT 399215990Sjmallett clock_mhz = cvmx_clock_get_rate(CVMX_CLOCK_RCLK) / 1000000; 400232812Sjmallett#endif 401210284Sjmallett 402210284Sjmallett if (family[0] != '3') 403210284Sjmallett { 404232812Sjmallett int fuse_base = 384/8; 405232812Sjmallett if (family[0] == '6') 406232812Sjmallett fuse_base = 832/8; 407232812Sjmallett 408210284Sjmallett /* Check for model in fuses, overrides normal decode */ 409210284Sjmallett /* This is _not_ valid for Octeon CN3XXX models */ 410232812Sjmallett fuse_data |= cvmx_fuse_read_byte(fuse_base + 3); 411210284Sjmallett fuse_data = fuse_data << 8; 412232812Sjmallett fuse_data |= cvmx_fuse_read_byte(fuse_base + 2); 413210284Sjmallett fuse_data = fuse_data << 8; 414232812Sjmallett fuse_data |= cvmx_fuse_read_byte(fuse_base + 1); 415210284Sjmallett fuse_data = fuse_data << 8; 416232812Sjmallett fuse_data |= cvmx_fuse_read_byte(fuse_base); 417210284Sjmallett if (fuse_data & 0x7ffff) 418210284Sjmallett { 419210284Sjmallett int model = fuse_data & 0x3fff; 420210284Sjmallett int suffix = (fuse_data >> 14) & 0x1f; 421210284Sjmallett if (suffix && model) /* Have both number and suffix in fuses, so both */ 422210284Sjmallett { 423210284Sjmallett sprintf(fuse_model, "%d%c",model, 'A' + suffix - 1); 424210284Sjmallett core_model = ""; 425210284Sjmallett family = fuse_model; 426210284Sjmallett } 427210284Sjmallett else if (suffix && !model) /* Only have suffix, so add suffix to 'normal' model number */ 428210284Sjmallett { 429210284Sjmallett sprintf(fuse_model, "%s%c", core_model, 'A' + suffix - 1); 430210284Sjmallett core_model = fuse_model; 431210284Sjmallett } 432210284Sjmallett else /* Don't have suffix, so just use model from fuses */ 433210284Sjmallett { 434210284Sjmallett sprintf(fuse_model, "%d",model); 435210284Sjmallett core_model = ""; 436210284Sjmallett family = fuse_model; 437210284Sjmallett } 438210284Sjmallett } 439210284Sjmallett } 440210284Sjmallett#ifdef CVMX_BUILD_FOR_UBOOT 441210284Sjmallett sprintf(buffer, "CN%s%s-%s pass %s", family, core_model, suffix, pass); 442210284Sjmallett#else 443210284Sjmallett sprintf(buffer, "CN%s%sp%s-%d-%s", family, core_model, pass, clock_mhz, suffix); 444210284Sjmallett#endif 445210284Sjmallett return buffer; 446210284Sjmallett} 447