2 * libfdt - Flat Device Tree manipulation
3 * Testcase for character literals in dtc
4 * Copyright (C) 2006 David Gibson, IBM Corporation.
5 * Copyright (C) 2011 The Chromium Authors. All rights reserved.
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.
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.
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
31 int main(int argc, char *argv[])
34 uint32_t expected_cells[5];
36 expected_cells[0] = cpu_to_fdt32((unsigned char)TEST_CHAR1);
37 expected_cells[1] = cpu_to_fdt32((unsigned char)TEST_CHAR2);
38 expected_cells[2] = cpu_to_fdt32((unsigned char)TEST_CHAR3);
39 expected_cells[3] = cpu_to_fdt32((unsigned char)TEST_CHAR4);
40 expected_cells[4] = cpu_to_fdt32((unsigned char)TEST_CHAR5);
42 test_init(argc, argv);
43 fdt = load_blob_arg(argc, argv);
45 check_getprop(fdt, 0, "char-literal-cells",
46 sizeof(expected_cells), expected_cells);