• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * libfdt - Flat Device Tree manipulation
3  *	Testcase for fdt_getprop()
4  * Copyright (C) 2006 David Gibson, IBM Corporation.
5  * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #include <stdlib.h>
23 #include <stdio.h>
24 #include <string.h>
25 #include <stdint.h>
26 
27 #include <libfdt.h>
28 
29 #include "tests.h"
30 
main(int argc,char * argv[])31 int main(int argc, char *argv[])
32 {
33 	void *fdt;
34 
35 	test_init(argc, argv);
36 	fdt = load_blob_arg(argc, argv);
37 
38 	check_getprop_cell(fdt, 0, "#address-cells", 1);
39 	check_getprop_cell(fdt, 0, "#gpio-cells", 2);
40 
41 	PASS();
42 }
43