otp.c (21a8cfcea044e751281e1e0d56618e0a943dbd8c) | otp.c (377f8cd79ec310cd94a38e627bb6de3bd189b407) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Copyright 2021 Aspeed Technology Inc. 4 */ 5 6#include <stdlib.h> 7#include <common.h> 8#include <console.h> --- 299 unchanged lines hidden (view full) --- 308 wait_complete(); 309} 310 311static void otp_soak(int soak) 312{ 313 if (info_cb.version == OTP_A2 || info_cb.version == OTP_A3) { 314 switch (soak) { 315 case 0: //default | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Copyright 2021 Aspeed Technology Inc. 4 */ 5 6#include <stdlib.h> 7#include <common.h> 8#include <console.h> --- 299 unchanged lines hidden (view full) --- 308 wait_complete(); 309} 310 311static void otp_soak(int soak) 312{ 313 if (info_cb.version == OTP_A2 || info_cb.version == OTP_A3) { 314 switch (soak) { 315 case 0: //default |
316 otp_write(0x3000, 0x0210); // Write MRA 317 otp_write(0x5000, 0x2000); // Write MRB | 316 otp_write(0x3000, 0x0); // Write MRA 317 otp_write(0x5000, 0x0); // Write MRB |
318 otp_write(0x1000, 0x0); // Write MR 319 break; 320 case 1: //normal program | 318 otp_write(0x1000, 0x0); // Write MR 319 break; 320 case 1: //normal program |
321 otp_write(0x3000, 0x1200); // Write MRA 322 otp_write(0x5000, 0x107F); // Write MRB 323 otp_write(0x1000, 0x1024); // Write MR | 321 otp_write(0x3000, 0x1320); // Write MRA 322 otp_write(0x5000, 0x1008); // Write MRB 323 otp_write(0x1000, 0x0024); // Write MR |
324 writel(0x04191388, OTP_TIMING); // 200us 325 break; 326 case 2: //soak program | 324 writel(0x04191388, OTP_TIMING); // 200us 325 break; 326 case 2: //soak program |
327 otp_write(0x3000, 0x1220); // Write MRA 328 otp_write(0x5000, 0x2074); // Write MRB 329 otp_write(0x1000, 0x08a4); // Write MR | 327 otp_write(0x3000, 0x1320); // Write MRA 328 otp_write(0x5000, 0x0007); // Write MRB 329 otp_write(0x1000, 0x0100); // Write MR |
330 writel(0x04193a98, OTP_TIMING); // 600us 331 break; 332 } 333 } else { 334 switch (soak) { 335 case 0: //default 336 otp_write(0x3000, 0x0); // Write MRA 337 otp_write(0x5000, 0x0); // Write MRB --- 2096 unchanged lines hidden --- | 330 writel(0x04193a98, OTP_TIMING); // 600us 331 break; 332 } 333 } else { 334 switch (soak) { 335 case 0: //default 336 otp_write(0x3000, 0x0); // Write MRA 337 otp_write(0x5000, 0x0); // Write MRB --- 2096 unchanged lines hidden --- |