xref: /rk3399_rockchip-uboot/include/fdt_support.h (revision 9eb77cea1fa12d5969eb26a1d1d81da381bd6b1c)
164dbbd40SGerald Van Baren /*
264dbbd40SGerald Van Baren  * (C) Copyright 2007
364dbbd40SGerald Van Baren  * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com
464dbbd40SGerald Van Baren  *
564dbbd40SGerald Van Baren  * See file CREDITS for list of people who contributed to this
664dbbd40SGerald Van Baren  * project.
764dbbd40SGerald Van Baren  *
864dbbd40SGerald Van Baren  * This program is free software; you can redistribute it and/or
964dbbd40SGerald Van Baren  * modify it under the terms of the GNU General Public License as
1064dbbd40SGerald Van Baren  * published by the Free Software Foundation; either version 2 of
1164dbbd40SGerald Van Baren  * the License, or (at your option) any later version.
1264dbbd40SGerald Van Baren  *
1364dbbd40SGerald Van Baren  * This program is distributed in the hope that it will be useful,
1464dbbd40SGerald Van Baren  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1564dbbd40SGerald Van Baren  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1664dbbd40SGerald Van Baren  * GNU General Public License for more details.
1764dbbd40SGerald Van Baren  *
1864dbbd40SGerald Van Baren  * You should have received a copy of the GNU General Public License
1964dbbd40SGerald Van Baren  * along with this program; if not, write to the Free Software
2064dbbd40SGerald Van Baren  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2164dbbd40SGerald Van Baren  * MA 02111-1307 USA
2264dbbd40SGerald Van Baren  */
2364dbbd40SGerald Van Baren 
2464dbbd40SGerald Van Baren #ifndef __FDT_SUPPORT_H
2564dbbd40SGerald Van Baren #define __FDT_SUPPORT_H
2664dbbd40SGerald Van Baren 
2764dbbd40SGerald Van Baren #ifdef CONFIG_OF_LIBFDT
2864dbbd40SGerald Van Baren 
2964dbbd40SGerald Van Baren #include <fdt.h>
3064dbbd40SGerald Van Baren 
3164dbbd40SGerald Van Baren int fdt_chosen(void *fdt, ulong initrd_start, ulong initrd_end, int force);
32e93becf8SKumar Gala void do_fixup_by_path(void *fdt, const char *path, const char *prop,
33e93becf8SKumar Gala 		      const void *val, int len, int create);
34e93becf8SKumar Gala void do_fixup_by_path_u32(void *fdt, const char *path, const char *prop,
35e93becf8SKumar Gala 			  u32 val, int create);
36*9eb77ceaSKumar Gala void do_fixup_by_prop(void *fdt,
37*9eb77ceaSKumar Gala 		      const char *pname, const void *pval, int plen,
38*9eb77ceaSKumar Gala 		      const char *prop, const void *val, int len,
39*9eb77ceaSKumar Gala 		      int create);
40*9eb77ceaSKumar Gala void do_fixup_by_prop_u32(void *fdt,
41*9eb77ceaSKumar Gala 			  const char *pname, const void *pval, int plen,
42*9eb77ceaSKumar Gala 			  const char *prop, u32 val, int create);
43*9eb77ceaSKumar Gala void do_fixup_by_compat(void *fdt, const char *compat,
44*9eb77ceaSKumar Gala 			const char *prop, const void *val, int len, int create);
45*9eb77ceaSKumar Gala void do_fixup_by_compat_u32(void *fdt, const char *compat,
46*9eb77ceaSKumar Gala 			    const char *prop, u32 val, int create);
47ab544633SKumar Gala void fdt_fixup_ethernet(void *fdt, bd_t *bd);
4864dbbd40SGerald Van Baren 
4964dbbd40SGerald Van Baren #ifdef CONFIG_OF_HAS_UBOOT_ENV
5064dbbd40SGerald Van Baren int fdt_env(void *fdt);
5164dbbd40SGerald Van Baren #endif
5264dbbd40SGerald Van Baren 
5364dbbd40SGerald Van Baren #ifdef CONFIG_OF_HAS_BD_T
5464dbbd40SGerald Van Baren int fdt_bd_t(void *fdt);
5564dbbd40SGerald Van Baren #endif
5664dbbd40SGerald Van Baren 
57e125a2ffSGerald Van Baren #ifdef CONFIG_OF_BOARD_SETUP
58e125a2ffSGerald Van Baren void ft_board_setup(void *blob, bd_t *bd);
59e125a2ffSGerald Van Baren void ft_cpu_setup(void *blob, bd_t *bd);
60e125a2ffSGerald Van Baren void ft_pci_setup(void *blob, bd_t *bd);
61e125a2ffSGerald Van Baren #endif
62e125a2ffSGerald Van Baren 
6364dbbd40SGerald Van Baren #endif /* ifdef CONFIG_OF_LIBFDT */
6464dbbd40SGerald Van Baren #endif /* ifndef __FDT_SUPPORT_H */
65