Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c
Show First 20 Lines • Show All 249 Lines • ▼ Show 20 Lines | aml8726_clkmsr_bus_frequency() | ||||
KASSERT(aml8726_soc_hw_rev != AML_SOC_HW_REV_UNKNOWN, | KASSERT(aml8726_soc_hw_rev != AML_SOC_HW_REV_UNKNOWN, | ||||
("aml8726_soc_hw_rev isn't initialized")); | ("aml8726_soc_hw_rev isn't initialized")); | ||||
/* | /* | ||||
* Try to access the clkmsr node directly i.e. through /aliases/. | * Try to access the clkmsr node directly i.e. through /aliases/. | ||||
*/ | */ | ||||
if ((node = OF_finddevice("clkmsr")) != 0) | if ((node = OF_finddevice("clkmsr")) != -1) | ||||
if (fdt_is_compatible_strict(node, "amlogic,aml8726-clkmsr")) | if (fdt_is_compatible_strict(node, "amlogic,aml8726-clkmsr")) | ||||
goto moveon; | goto moveon; | ||||
/* | /* | ||||
* Find the node the long way. | * Find the node the long way. | ||||
*/ | */ | ||||
if ((node = OF_finddevice("/soc")) == 0) | if ((node = OF_finddevice("/soc")) == -1) | ||||
return (0); | return (0); | ||||
if ((node = fdt_find_compatible(node, | if ((node = fdt_find_compatible(node, | ||||
"amlogic,aml8726-clkmsr", 1)) == 0) | "amlogic,aml8726-clkmsr", 1)) == 0) | ||||
return (0); | return (0); | ||||
moveon: | moveon: | ||||
if (fdt_get_range(OF_parent(node), 0, &pbase, &psize) != 0 | if (fdt_get_range(OF_parent(node), 0, &pbase, &psize) != 0 | ||||
Show All 27 Lines |