1 /* 2 * Copyright © 2021 Google, Inc. 3 * SPDX-License-Identifier: MIT 4 */ 5 6 #ifndef FREEDRENO_DT_H_ 7 #define FREEDRENO_DT_H_ 8 9 #include <stdbool.h> 10 #include <stdint.h> 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 /** 17 * A helper for extracting information about the GPU from devicetree, and 18 * mapping it's i/o space, etc. 19 * 20 * Note, not-reentrant (due to use of nftw(), etc). 21 */ 22 23 bool fd_dt_find_freqs(uint32_t *min_freq, uint32_t *max_freq); 24 void *fd_dt_find_io(void); 25 26 #ifdef __cplusplus 27 } /* end of extern "C" */ 28 #endif 29 30 #endif /* FREEDRENO_DT_H_ */ 31