| 116 | } |
| 117 | |
| 118 | static int |
| 119 | mtk_clock_get_info(device_t dev, int index, struct fdt_clock_info *info) |
| 120 | { |
| 121 | uint32_t mask; |
| 122 | |
| 123 | if (index < 0 || index > 31 || info == NULL) |
| 124 | return (EINVAL); |
| 125 | |
| 126 | if (mtk_sysctl_get(SYSCTL_CLKCFG1) & mask) |
| 127 | info->flags = FDT_CIFLAG_RUNNING; |
| 128 | else |
| 129 | info->flags = 0; |
| 130 | |
| 131 | return (0); |
| 132 | } |
| 133 | |
| 134 | static device_method_t mtk_clock_methods[] = { |
| 135 | DEVMETHOD(device_probe, mtk_clock_probe), |
nothing calls this directly
no test coverage detected