summaryrefslogtreecommitdiffstats
path: root/sys/boot/fdt/fdt_platform.h
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-11-01 17:12:44 +0000
committerandrew <andrew@FreeBSD.org>2014-11-01 17:12:44 +0000
commit2b36711b7857337942c3a4a579451a49491e3db2 (patch)
treeb2eda9c3d489687e9caaec4068e0ceef99190fc0 /sys/boot/fdt/fdt_platform.h
parent9e8b5d9f18c4a511536a0cf4ad5d1528d933abba (diff)
downloadFreeBSD-src-2b36711b7857337942c3a4a579451a49491e3db2.zip
FreeBSD-src-2b36711b7857337942c3a4a579451a49491e3db2.tar.gz
Start to allow platforms other than U-Boot to use the FDT code in loader by
moving U-Boot specific code from libfdt.a to a new libuboot_fdt.a. This needs to be a new library for linking to work correctly. Differential Revision: https://reviews.freebsd.org/D1054 Reviewed by: ian, rpaulo (earlier version) MFC after: 1 week
Diffstat (limited to 'sys/boot/fdt/fdt_platform.h')
-rw-r--r--sys/boot/fdt/fdt_platform.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/sys/boot/fdt/fdt_platform.h b/sys/boot/fdt/fdt_platform.h
index eb9e497..cad7602 100644
--- a/sys/boot/fdt/fdt_platform.h
+++ b/sys/boot/fdt/fdt_platform.h
@@ -29,7 +29,26 @@
#ifndef FDT_PLATFORM_H
#define FDT_PLATFORM_H
-extern int fdt_copy(vm_offset_t);
-extern int fdt_setup_fdtp(void);
+struct fdt_header;
+
+struct fdt_mem_region {
+ unsigned long start;
+ unsigned long size;
+};
+
+#define TMP_MAX_ETH 8
+
+int fdt_copy(vm_offset_t);
+void fdt_fixup_cpubusfreqs(unsigned long, unsigned long);
+void fdt_fixup_ethernet(const char *, char *, int);
+void fdt_fixup_memory(struct fdt_mem_region *, size_t);
+void fdt_fixup_stdout(const char *);
+int fdt_load_dtb_addr(struct fdt_header *);
+int fdt_load_dtb_file(const char *);
+int fdt_setup_fdtp(void);
+
+/* The platform library needs to implement these functions */
+int fdt_platform_load_dtb(void);
+void fdt_platform_fixups(void);
#endif /* FDT_PLATFORM_H */
OpenPOWER on IntegriCloud