MCPcopy Create free account
hub / github.com/coreboot/coreboot / generate_outputh

Function generate_outputh

util/sconfig/main.c:1900–1920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1898}
1899
1900static void generate_outputh(FILE *f, const char *fw_conf_header, const char *device_header)
1901{
1902 fprintf(f, "#ifndef __STATIC_DEVICE_TREE_H\n");
1903 fprintf(f, "#define __STATIC_DEVICE_TREE_H\n\n");
1904
1905 fprintf(f, "#include <%s>\n", fw_conf_header);
1906 fprintf(f, "#include <%s>\n\n", device_header);
1907
1908 fprintf(f, "/* Returns pointer to config structure of root device (B:D:F = 0:00:0) */\n");
1909 fprintf(f, "#define config_of_soc() __pci_0_00_0_config\n\n");
1910
1911 fprintf(f, "/* Macro to generate `struct device *` name that points to a device with the given alias. */\n");
1912 fprintf(f, "#define DEV_PTR(_alias) \t_dev_##_alias##_ptr\n\n");
1913
1914 fprintf(f, "/* Macro to generate weak `struct device *` definition that points to a device with the given\n");
1915 fprintf(f, " alias. */\n");
1916 fprintf(f, "#define WEAK_DEV_PTR(_alias)\t\t\t\\\n");
1917 fprintf(f, "\t__weak DEVTREE_CONST struct device *const DEV_PTR(_alias)\n");
1918
1919 fprintf(f, "\n#endif /* __STATIC_DEVICE_TREE_H */\n");
1920}
1921
1922static void generate_outputc(FILE *f, const char *static_header)
1923{

Callers 1

mainFunction · 0.85

Calls 1

fprintfFunction · 0.85

Tested by

no test coverage detected