this will be usefull to check that we set a valid machine id

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
---
 arch/arm/tools/gen-mach-types | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types
index 04fef71..fd771aa 100644
--- a/arch/arm/tools/gen-mach-types
+++ b/arch/arm/tools/gen-mach-types
@@ -34,9 +34,15 @@ END  {
          printf("#endif\n\n");
 
          printf("/* see arch/arm/kernel/arch.c for a description of these 
*/\n");
+         max_mach_type = 0
          for (i = 0; i < nr; i++)
-           if (num[i] ~ /..*/)
+           if (num[i] ~ /..*/) {
              printf("#define %-30s %d\n", mach_type[i], num[i]);
+             if (num[i] > max_mach_type)
+               max_mach_type = num[i]
+           }
+
+             printf("#define MAX_MACH_TYPE %d\n", max_mach_type);
 
          printf("\n");
 
-- 
1.8.4.3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to