mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/6] arm: gen-mach-types: add MAX_MACH_TYPE
Date: Thu, 28 Nov 2013 19:06:42 +0100	[thread overview]
Message-ID: <1385662007-13057-1-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20131128180526.GA27628@ns203013.ovh.net>

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

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-11-28 18:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-28 18:05 [PATCH 0/6] ARM: machine struct support Jean-Christophe PLAGNIOL-VILLARD
2013-11-28 18:06 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-11-28 18:06   ` [PATCH 2/6] ARM: introduce machine description Jean-Christophe PLAGNIOL-VILLARD
2013-11-28 18:19     ` Alexander Aring
2013-11-28 19:00       ` Jean-Christophe PLAGNIOL-VILLARD
2013-11-28 19:02         ` Alexander Aring
2013-12-02  9:01     ` Sascha Hauer
2013-12-02 11:04       ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-02 11:54         ` Sascha Hauer
2013-11-28 18:06   ` [PATCH 3/6] ARM: introduce SoC description Jean-Christophe PLAGNIOL-VILLARD
2013-11-28 18:06   ` [PATCH 4/6] AT91: detect SoC earlier Jean-Christophe PLAGNIOL-VILLARD
2013-11-28 18:06   ` [PATCH 5/6] AT91: switch to machine description Jean-Christophe PLAGNIOL-VILLARD
2013-11-28 18:06   ` [PATCH 6/6] vexpress: " Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1385662007-13057-1-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox