static int __init nios2_timer_get_base_and_freq()

in kernel/time.c [212:227]


static int __init nios2_timer_get_base_and_freq(struct device_node *np,
				void __iomem **base, u32 *freq)
{
	*base = of_iomap(np, 0);
	if (!*base) {
		pr_crit("Unable to map reg for %pOFn\n", np);
		return -ENXIO;
	}

	if (of_property_read_u32(np, "clock-frequency", freq)) {
		pr_crit("Unable to get %pOFn clock frequency\n", np);
		return -EINVAL;
	}

	return 0;
}