amd/addrlib: fix the C++ one definition rule violation
[mesa.git] / src / amd / addrlib / src / chip / gfx9 / gfx9_gb_reg.h
index ade70b9f6be197f91c98b215c6f3898d3a958031..43e3738c50339163622d1b33826d6d742f272d0f 100644 (file)
@@ -1,8 +1,5 @@
-#if !defined (__GFX9_GB_REG_H__)
-#define __GFX9_GB_REG_H__
-
 /*
- * Copyright © 2007-2018 Advanced Micro Devices, Inc.
+ * Copyright © 2007-2019 Advanced Micro Devices, Inc.
  * All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining
  * of the Software.
  */
 
-#include "util/u_endian.h"
+#if !defined (__GFX9_GB_REG_H__)
+#define __GFX9_GB_REG_H__
 
-#if defined(PIPE_ARCH_LITTLE_ENDIAN)
-#define LITTLEENDIAN_CPU
-#elif defined(PIPE_ARCH_BIG_ENDIAN)
-#define BIGENDIAN_CPU
-#endif
+/*
+*    gfx9_gb_reg.h
+*
+*    Register Spec Release:  1.0
+*
+*/
 
 //
 // Make sure the necessary endian defines are there.
 //
-#if defined(LITTLEENDIAN_CPU)
-#elif defined(BIGENDIAN_CPU)
-#else
-#error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined"
+#include "util/u_endian.h"
+
+#if UTIL_ARCH_LITTLE_ENDIAN
+#define LITTLEENDIAN_CPU
+#elif UTIL_ARCH_BIG_ENDIAN
+#define BIGENDIAN_CPU
 #endif
 
-union GB_ADDR_CONFIG {
+union GB_ADDR_CONFIG_gfx9 {
     struct {
 #if        defined(LITTLEENDIAN_CPU)
         unsigned int                       NUM_PIPES : 3;