summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTeresa Remmet <t.remmet@phytec.de>2018-12-17 15:02:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-12-20 08:50:49 +0100
commit0b1759c0295b8cac0ddd8a766dcbc2e90ba1d91e (patch)
tree9df53ec0426584185bd30974e678782e15d92717 /arch
parentfd040c0e3d84f52d0836b13d6c707d3a70e9fa2f (diff)
downloadbarebox-0b1759c0295b8cac0ddd8a766dcbc2e90ba1d91e.tar.gz
barebox-0b1759c0295b8cac0ddd8a766dcbc2e90ba1d91e.tar.xz
arm: boards: vscom-baltos: Run environment_initcall only on correct board
Check for the correct hardware before reading the eeprom. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/vscom-baltos/board.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/boards/vscom-baltos/board.c b/arch/arm/boards/vscom-baltos/board.c
index 39f40a6061..c64864d432 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,