Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm/ti/ti_hwmods.c
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | while ((len > 0) && (clk == INVALID_CLK_IDENT)) { | ||||
l = strlen(name) + 1; | l = strlen(name) + 1; | ||||
name += l; | name += l; | ||||
len -= l; | len -= l; | ||||
} | } | ||||
if (len > 0) | if (len > 0) | ||||
device_printf(dev, "WARNING: more than one ti,hwmod \n"); | device_printf(dev, "WARNING: more than one ti,hwmod \n"); | ||||
free(buf, M_OFWPROP); | OF_prop_free(buf); | ||||
return (clk); | return (clk); | ||||
} | } | ||||
int ti_hwmods_contains(device_t dev, const char *hwmod) | int ti_hwmods_contains(device_t dev, const char *hwmod) | ||||
{ | { | ||||
phandle_t node; | phandle_t node; | ||||
int len, l; | int len, l; | ||||
char *name; | char *name; | ||||
Show All 16 Lines | while (len > 0) { | ||||
} | } | ||||
/* Slide to the next sub-string. */ | /* Slide to the next sub-string. */ | ||||
l = strlen(name) + 1; | l = strlen(name) + 1; | ||||
name += l; | name += l; | ||||
len -= l; | len -= l; | ||||
} | } | ||||
free(buf, M_OFWPROP); | OF_prop_free(buf); | ||||
return (result); | return (result); | ||||
} | } | ||||
int | int | ||||
ti_hwmods_get_unit(device_t dev, const char *hwmod) | ti_hwmods_get_unit(device_t dev, const char *hwmod) | ||||
{ | { | ||||
phandle_t node; | phandle_t node; | ||||
Show All 16 Lines | if (strncmp(name, hwmod, hwmodlen) == 0) { | ||||
break; | break; | ||||
} | } | ||||
/* Slide to the next sub-string. */ | /* Slide to the next sub-string. */ | ||||
l = strlen(name) + 1; | l = strlen(name) + 1; | ||||
name += l; | name += l; | ||||
len -= l; | len -= l; | ||||
} | } | ||||
free(buf, M_OFWPROP); | OF_prop_free(buf); | ||||
return (result); | return (result); | ||||
} | } |