svn commit: r257924 - head/sys/arm/freescale/imx

Ian Lepore ian at FreeBSD.org
Sun Nov 10 21:12:43 UTC 2013


Author: ian
Date: Sun Nov 10 21:12:42 2013
New Revision: 257924
URL: http://svnweb.freebsd.org/changeset/base/257924

Log:
  Apparently with "const uint32_t foo = 0x60;" gcc doesn't consider 'foo'
  to be a constant integer suitable for use in a case label, so use #defines.

Modified:
  head/sys/arm/freescale/imx/imx6_machdep.c

Modified: head/sys/arm/freescale/imx/imx6_machdep.c
==============================================================================
--- head/sys/arm/freescale/imx/imx6_machdep.c	Sun Nov 10 20:24:41 2013	(r257923)
+++ head/sys/arm/freescale/imx/imx6_machdep.c	Sun Nov 10 21:12:42 2013	(r257924)
@@ -145,11 +145,11 @@ u_int imx_soc_type()
 {
 	uint32_t digprog, hwsoc;
 	uint32_t *pcr;
-	const uint32_t HWSOC_MX6SL   = 0x60;
-	const uint32_t HWSOC_MX6DL   = 0x61;
-	const uint32_t HWSOC_MX6SOLO = 0x62;
-	const uint32_t HWSOC_MX6Q    = 0x63;
 	const vm_offset_t SCU_CONFIG_PHYSADDR = 0x00a00004;
+#define	HWSOC_MX6SL	0x60
+#define	HWSOC_MX6DL	0x61
+#define	HWSOC_MX6SOLO	0x62
+#define	HWSOC_MX6Q	0x63
 
 	digprog = imx6_anatop_read_4(IMX6_ANALOG_DIGPROG_SL);
 	hwsoc = (digprog >> IMX6_ANALOG_DIGPROG_SOCTYPE_SHIFT) & 


More information about the svn-src-head mailing list