Lines Matching refs:val
39 uint32_t val; in tonga_set_smc_sram_address() local
49 val = RREG32(mmSMC_IND_ACCESS_CNTL); in tonga_set_smc_sram_address()
50 val = REG_SET_FIELD(val, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0); in tonga_set_smc_sram_address()
51 WREG32(mmSMC_IND_ACCESS_CNTL, val); in tonga_set_smc_sram_address()
130 uint32_t val = RREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0); in tonga_is_smc_ram_running() local
131 val = REG_GET_FIELD(val, SMC_SYSCON_CLOCK_CNTL_0, ck_disable); in tonga_is_smc_ram_running()
133 return ((0 == val) && (0x20100 <= RREG32_SMC(ixSMC_PC_C))); in tonga_is_smc_ram_running()
139 uint32_t val; in wait_smu_response() local
142 val = RREG32(mmSMC_RESP_0); in wait_smu_response()
143 if (REG_GET_FIELD(val, SMC_RESP_0, SMC_RESP)) in wait_smu_response()
242 uint32_t val;
248 val = RREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0);
249 if (REG_GET_FIELD(val, SMC_SYSCON_CLOCK_CNTL_0, cken) == 0)
267 uint32_t val; in tonga_smu_upload_firmware_image() local
297 val = RREG32(mmSMC_IND_ACCESS_CNTL); in tonga_smu_upload_firmware_image()
298 val = REG_SET_FIELD(val, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 1); in tonga_smu_upload_firmware_image()
299 WREG32(mmSMC_IND_ACCESS_CNTL, val); in tonga_smu_upload_firmware_image()
306 val = RREG32(mmSMC_IND_ACCESS_CNTL); in tonga_smu_upload_firmware_image()
307 val = REG_SET_FIELD(val, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0); in tonga_smu_upload_firmware_image()
308 WREG32(mmSMC_IND_ACCESS_CNTL, val); in tonga_smu_upload_firmware_image()
349 uint32_t val = RREG32_SMC(ixSMC_SYSCON_RESET_CNTL);
350 val = REG_SET_FIELD(val, SMC_SYSCON_RESET_CNTL, rst_reg, 1);
351 WREG32_SMC(ixSMC_SYSCON_RESET_CNTL, val);
353 val = RREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0);
354 val = REG_SET_FIELD(val, SMC_SYSCON_CLOCK_CNTL_0, ck_disable, 1);
355 WREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0, val);
566 uint32_t val; in tonga_smu_start_in_protection_mode() local
570 val = RREG32_SMC(ixSMC_SYSCON_RESET_CNTL); in tonga_smu_start_in_protection_mode()
571 val = REG_SET_FIELD(val, SMC_SYSCON_RESET_CNTL, rst_reg, 1); in tonga_smu_start_in_protection_mode()
572 WREG32_SMC(ixSMC_SYSCON_RESET_CNTL, val); in tonga_smu_start_in_protection_mode()
582 val = RREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0); in tonga_smu_start_in_protection_mode()
583 val = REG_SET_FIELD(val, SMC_SYSCON_CLOCK_CNTL_0, ck_disable, 0); in tonga_smu_start_in_protection_mode()
584 WREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0, val); in tonga_smu_start_in_protection_mode()
587 val = RREG32_SMC(ixSMC_SYSCON_RESET_CNTL); in tonga_smu_start_in_protection_mode()
588 val = REG_SET_FIELD(val, SMC_SYSCON_RESET_CNTL, rst_reg, 0); in tonga_smu_start_in_protection_mode()
589 WREG32_SMC(ixSMC_SYSCON_RESET_CNTL, val); in tonga_smu_start_in_protection_mode()
592 val = RREG32_SMC(ixSMU_INPUT_DATA); in tonga_smu_start_in_protection_mode()
593 val = REG_SET_FIELD(val, SMU_INPUT_DATA, AUTO_START, 1); in tonga_smu_start_in_protection_mode()
594 WREG32_SMC(ixSMU_INPUT_DATA, val); in tonga_smu_start_in_protection_mode()
600 val = RREG32_SMC(ixRCU_UC_EVENTS); in tonga_smu_start_in_protection_mode()
601 if (REG_GET_FIELD(val, RCU_UC_EVENTS, INTERRUPTS_ENABLED)) in tonga_smu_start_in_protection_mode()
618 val = RREG32_SMC(ixSMU_STATUS); in tonga_smu_start_in_protection_mode()
619 if (REG_GET_FIELD(val, SMU_STATUS, SMU_DONE)) in tonga_smu_start_in_protection_mode()
630 val = RREG32_SMC(ixSMU_STATUS); in tonga_smu_start_in_protection_mode()
631 if (!REG_GET_FIELD(val, SMU_STATUS, SMU_PASS)) { in tonga_smu_start_in_protection_mode()
638 val = RREG32_SMC(ixFIRMWARE_FLAGS); in tonga_smu_start_in_protection_mode()
639 if(REG_GET_FIELD(val, FIRMWARE_FLAGS, INTERRUPTS_ENABLED)) in tonga_smu_start_in_protection_mode()
655 uint32_t val; in tonga_smu_start_in_non_protection_mode() local
659 val = RREG32_SMC(ixRCU_UC_EVENTS); in tonga_smu_start_in_non_protection_mode()
660 val = REG_GET_FIELD(val, RCU_UC_EVENTS, boot_seq_done); in tonga_smu_start_in_non_protection_mode()
661 if (val) in tonga_smu_start_in_non_protection_mode()
675 val = RREG32_SMC(ixSMC_SYSCON_RESET_CNTL); in tonga_smu_start_in_non_protection_mode()
676 val = REG_SET_FIELD(val, SMC_SYSCON_RESET_CNTL, rst_reg, 1); in tonga_smu_start_in_non_protection_mode()
677 WREG32_SMC(ixSMC_SYSCON_RESET_CNTL, val); in tonga_smu_start_in_non_protection_mode()
687 val = RREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0); in tonga_smu_start_in_non_protection_mode()
688 val = REG_SET_FIELD(val, SMC_SYSCON_CLOCK_CNTL_0, ck_disable, 0); in tonga_smu_start_in_non_protection_mode()
689 WREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0, val); in tonga_smu_start_in_non_protection_mode()
692 val = RREG32_SMC(ixSMC_SYSCON_RESET_CNTL); in tonga_smu_start_in_non_protection_mode()
693 val = REG_SET_FIELD(val, SMC_SYSCON_RESET_CNTL, rst_reg, 0); in tonga_smu_start_in_non_protection_mode()
694 WREG32_SMC(ixSMC_SYSCON_RESET_CNTL, val); in tonga_smu_start_in_non_protection_mode()
698 val = RREG32_SMC(ixFIRMWARE_FLAGS); in tonga_smu_start_in_non_protection_mode()
699 if (REG_GET_FIELD(val, FIRMWARE_FLAGS, INTERRUPTS_ENABLED)) in tonga_smu_start_in_non_protection_mode()
715 uint32_t val; in tonga_smu_start() local
718 val = RREG32_SMC(ixSMU_FIRMWARE); in tonga_smu_start()
719 if (!REG_GET_FIELD(val, SMU_FIRMWARE, SMU_MODE)) { in tonga_smu_start()