| 397 | } |
| 398 | |
| 399 | void |
| 400 | mtk_soc_set_cpu_model(void) |
| 401 | { |
| 402 | int idx, offset = sizeof(mtk_soc_chipid0_3); |
| 403 | char *chipid0_3 = (char *)(&mtk_soc_chipid0_3); |
| 404 | char *chipid4_7 = (char *)(&mtk_soc_chipid4_7); |
| 405 | |
| 406 | /* |
| 407 | * CHIPID is always 2x32 bit registers, containing the ASCII |
| 408 | * representation of the chip, so use that directly. |
| 409 | * |
| 410 | * The info is either pre-populated in mtk_soc_try_early_detect() or |
| 411 | * it is left at its default value of "unknown " if it could not be |
| 412 | * obtained for some reason. |
| 413 | */ |
| 414 | for (idx = 0; idx < offset; idx++) { |
| 415 | cpu_model[idx] = chipid0_3[idx]; |
| 416 | cpu_model[idx + offset] = chipid4_7[idx]; |
| 417 | } |
| 418 | |
| 419 | /* Null-terminate the string */ |
| 420 | cpu_model[2 * offset] = 0; |
| 421 | } |
| 422 | |
| 423 | uint32_t |
| 424 | mtk_soc_get_uartclk(void) |