use byteorder.h instead of implementing another byte swap function
[coreboot.git] / src / boot / selfboot.c
index 5f7a8f11f5efcd5e4d5bb53960f7f8ac42297a08..7ae9f8cd7d5541969d05e3954aee20ddc2614390 100644 (file)
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
  */
 
+#include <arch/byteorder.h>
 #include <console/console.h>
 #include <fallback.h>
 #include <boot/elf.h>
 #include <cbfs.h>
 #include <lib.h>
 
-#if !CONFIG_BIG_ENDIAN
-#define ntohl(x) ( ((x&0xff)<<24) | ((x&0xff00)<<8) | \
-               ((x&0xff0000) >> 8) | ((x&0xff000000) >> 24) )
-#else
-#define ntohl(x) (x)
-#endif
-
 /* Maximum physical address we can use for the coreboot bounce buffer.
  */
 #ifndef MAX_ADDR