Lines Matching +full:hip07 +full:- +full:sec

1 // SPDX-License-Identifier: GPL-2.0-only
29 #include <linux/arm-smccc.h>
47 [ARCH_TIMER_PHYS_SECURE_PPI] = "sec-phys",
50 [ARCH_TIMER_HYP_PPI] = "hyp-phys",
51 [ARCH_TIMER_HYP_VIRT_PPI] = "hyp-virt",
78 * 2) a roll-over time of not less than 40 years
87 return clamp_val(ilog2(min_cycles - 1) + 1, 56, 64); in arch_counter_get_width()
180 _retries--; \
216 _retries--; \
217 } while (unlikely((_new - _old) >> 5) && _retries); \
250 .oem_table_id = "HIP07 ",
281 * (7ff -> 000 -> 800) and forward (7ff -> fff -> 800), ignore register values
291 _retries--; \
359 .id = "fsl,erratum-a008585",
370 .id = "hisilicon,erratum-161010101",
401 .id = "allwinner,erratum-unknown1",
428 return of_property_read_bool(np, wa->id); in arch_timer_check_dt_erratum()
435 return this_cpu_has_cap((uintptr_t)wa->id); in arch_timer_check_local_cap_erratum()
444 const struct ate_acpi_oem_info *info = wa->id; in arch_timer_check_acpi_oem_erratum()
449 if (!memcmp(info->oem_id, table->oem_id, ACPI_OEM_ID_SIZE) && in arch_timer_check_acpi_oem_erratum()
450 !memcmp(info->oem_table_id, table->oem_table_id, ACPI_OEM_TABLE_ID_SIZE) && in arch_timer_check_acpi_oem_erratum()
451 info->oem_revision == table->oem_revision) in arch_timer_check_acpi_oem_erratum()
491 if (wa->read_cntvct_el0 || wa->read_cntpct_el0) in arch_timer_enable_workaround()
496 * out-of-line counter accessor. We may change our mind pretty in arch_timer_enable_workaround()
497 * late in the game (with a per-CPU erratum, for example), so in arch_timer_enable_workaround()
500 if (wa->read_cntvct_el0) { in arch_timer_enable_workaround()
503 } else if (wa->disable_compat_vdso && vdso_default != VDSO_CLOCKMODE_NONE) { in arch_timer_enable_workaround()
539 wa->desc, __wa->desc); in arch_timer_check_ool_workaround()
546 local ? "local" : "global", wa->desc); in arch_timer_check_ool_workaround()
573 evt->event_handler(evt); in timer_handler()
654 * XGene-1 implements CVAL in terms of TVAL, meaning in __arch_timer_check_delta()
676 typeof(clk->set_next_event) sne; in __arch_timer_setup()
679 clk->features = CLOCK_EVT_FEAT_ONESHOT; in __arch_timer_setup()
684 clk->features |= CLOCK_EVT_FEAT_C3STOP; in __arch_timer_setup()
685 clk->name = "arch_sys_timer"; in __arch_timer_setup()
686 clk->rating = 450; in __arch_timer_setup()
687 clk->cpumask = cpumask_of(smp_processor_id()); in __arch_timer_setup()
688 clk->irq = arch_timer_ppi[arch_timer_uses_ppi]; in __arch_timer_setup()
691 clk->set_state_shutdown = arch_timer_shutdown_virt; in __arch_timer_setup()
692 clk->set_state_oneshot_stopped = arch_timer_shutdown_virt; in __arch_timer_setup()
698 clk->set_state_shutdown = arch_timer_shutdown_phys; in __arch_timer_setup()
699 clk->set_state_oneshot_stopped = arch_timer_shutdown_phys; in __arch_timer_setup()
706 clk->set_next_event = sne; in __arch_timer_setup()
709 clk->set_state_shutdown(clk); in __arch_timer_setup()
722 divider -= 8; in arch_timer_evtstrm_enable()
750 lsb = fls(evt_stream_div) - 1; in arch_timer_configure_evtstream()
751 if (lsb > 0 && (evt_stream_div & BIT(lsb - 1))) in arch_timer_configure_evtstream()
850 return -EINVAL; in validate_timer_rate()
859 * For historical reasons, when probing with DT we use whichever (non-zero)
861 * probed has a clock-frequency property, this overrides the HW register.
869 if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate)) in arch_timer_of_configure_rate()
954 pr_debug("disable IRQ%d cpu #%d\n", clk->irq, smp_processor_id()); in arch_timer_stop()
1019 err = -ENOMEM; in arch_timer_register()
1091 * arch_timer_select_ppi() - Select suitable PPI for the current system.
1140 has_names = of_property_present(np, "interrupt-names"); in arch_timer_of_init()
1156 arch_timer_c3stop = !of_property_read_bool(np, "always-on"); in arch_timer_of_init()
1166 of_property_read_bool(np, "arm,cpu-registers-not-fw-configured")) in arch_timer_of_init()
1173 return -EINVAL; in arch_timer_of_init()
1178 "arm,no-tick-in-suspend"); in arch_timer_of_init()
1186 TIMER_OF_DECLARE(armv7_arch_timer, "arm,armv7-timer", arch_timer_of_init);
1187 TIMER_OF_DECLARE(armv8_arch_timer, "arm,armv8-timer", arch_timer_of_init);
1196 return -EINVAL; in arch_timer_acpi_init()
1228 return -EINVAL; in arch_timer_acpi_init()
1231 /* Always-on capability */ in arch_timer_acpi_init()
1254 return -EOPNOTSUPP; in kvm_arch_ptp_get_crosststamp()
1265 return -EOPNOTSUPP; in kvm_arch_ptp_get_crosststamp()