mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Teresa Remmet <t.remmet@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] arm: boards: vscom-baltos: Run environment_initcall only on correct board
Date: Mon, 17 Dec 2018 15:02:09 +0100	[thread overview]
Message-ID: <1545055330-33957-1-git-send-email-t.remmet@phytec.de> (raw)

Check for the correct hardware before reading the eeprom.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/boards/vscom-baltos/board.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boards/vscom-baltos/board.c b/arch/arm/boards/vscom-baltos/board.c
index 39f40a6061f8..c64864d43200 100644
--- a/arch/arm/boards/vscom-baltos/board.c
+++ b/arch/arm/boards/vscom-baltos/board.c
@@ -68,6 +68,9 @@ static int baltos_read_eeprom(void)
 	int rc;
 	unsigned char mac_addr[6];
 
+	if (!of_machine_is_compatible("vscom,onrisc"))
+		return 0;
+
 	rc = read_file_2("/dev/eeprom0",
 			 &size,
 			 (void *)&buf,
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2018-12-17 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 14:02 Teresa Remmet [this message]
2018-12-17 14:02 ` [PATCH 2/2] arm: dts: am335x strip: Don't strip timer2 anymore Teresa Remmet
2018-12-18  7:14 ` [PATCH 1/2] arm: boards: vscom-baltos: Run environment_initcall only on correct board Sascha Hauer

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=1545055330-33957-1-git-send-email-t.remmet@phytec.de \
    --to=t.remmet@phytec.de \
    --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