151b58561SPaul Burton /* 251b58561SPaul Burton * Flattened Image Tree loader. 351b58561SPaul Burton * 451b58561SPaul Burton * Copyright (c) 2016 Imagination Technologies 551b58561SPaul Burton * 651b58561SPaul Burton * This library is free software; you can redistribute it and/or 751b58561SPaul Burton * modify it under the terms of the GNU Lesser General Public 851b58561SPaul Burton * License as published by the Free Software Foundation; either 9*61f3c91aSChetan Pant * version 2.1 of the License, or (at your option) any later version. 1051b58561SPaul Burton * 1151b58561SPaul Burton * This library is distributed in the hope that it will be useful, 1251b58561SPaul Burton * but WITHOUT ANY WARRANTY; without even the implied warranty of 1351b58561SPaul Burton * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1451b58561SPaul Burton * Lesser General Public License for more details. 1551b58561SPaul Burton * 1651b58561SPaul Burton * You should have received a copy of the GNU Lesser General Public 1751b58561SPaul Burton * License along with this library; if not, see <http://www.gnu.org/licenses/>. 1851b58561SPaul Burton */ 1951b58561SPaul Burton 2051b58561SPaul Burton #ifndef HW_LOADER_FIT_H 2151b58561SPaul Burton #define HW_LOADER_FIT_H 2251b58561SPaul Burton 23d8e39b70SMarkus Armbruster #include "exec/hwaddr.h" 2451b58561SPaul Burton 2551b58561SPaul Burton struct fit_loader_match { 2651b58561SPaul Burton const char *compatible; 2751b58561SPaul Burton const void *data; 2851b58561SPaul Burton }; 2951b58561SPaul Burton 3051b58561SPaul Burton struct fit_loader { 3151b58561SPaul Burton const struct fit_loader_match *matches; 3251b58561SPaul Burton hwaddr (*addr_to_phys)(void *opaque, uint64_t addr); 3351b58561SPaul Burton const void *(*fdt_filter)(void *opaque, const void *fdt, 3451b58561SPaul Burton const void *match_data, hwaddr *load_addr); 3551b58561SPaul Burton const void *(*kernel_filter)(void *opaque, const void *kernel, 3651b58561SPaul Burton hwaddr *load_addr, hwaddr *entry_addr); 3751b58561SPaul Burton }; 3851b58561SPaul Burton 3951b58561SPaul Burton int load_fit(const struct fit_loader *ldr, const char *filename, void *opaque); 4051b58561SPaul Burton 4151b58561SPaul Burton #endif /* HW_LOADER_FIT_H */ 42