[coreboot-gerrit] New patch to review for coreboot: 11630a4 Use a common boardid.h instead of per board copies

Marc Jones (marc.jones@se-eng.com) gerrit at coreboot.org
Fri Mar 13 22:02:27 CET 2015


Marc Jones (marc.jones at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8666

-gerrit

commit 11630a45231db39afe4ac6a70d3f4bf878343dc7
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Wed Jul 23 18:32:01 2014 -0700

    Use a common boardid.h instead of per board copies
    
    There is no point in duplicating boardid.h per board - they are all
    the same. Let's keep a single instance in the common include directory
    and let the linker report a problem if one tries using this function
    on a board where it is not supported.
    
    BUG=chrome-os-partner:30489
    TEST=verified that coreboot builds fine for nyan_big and nyan_blaze.
    
    Original-Change-Id: Ifbe9c2287a1d828d4db74c637d1d02047ac4da25
    Original-Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/209699
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Original-Reviewed-by: Furquan Shaikh <furquan at chromium.org>
    (cherry picked from commit 589e6415faf18ca6aaf44da343dd33eadc8a53d3)
    Signed-off-by: Marc Jones <marc.jones at se-eng.com>
    
    Change-Id: I8eef89cb822611a0050e5a50fc4b970eebd8d962
---
 src/include/boardid.h                     | 27 +++++++++++++++++++++++++++
 src/mainboard/google/nyan/boardid.c       |  2 +-
 src/mainboard/google/nyan/boardid.h       | 27 ---------------------------
 src/mainboard/google/nyan/pmic.c          |  2 +-
 src/mainboard/google/nyan_big/boardid.c   |  2 +-
 src/mainboard/google/nyan_big/boardid.h   | 27 ---------------------------
 src/mainboard/google/nyan_big/pmic.c      |  2 +-
 src/mainboard/google/nyan_blaze/boardid.c |  2 +-
 src/mainboard/google/nyan_blaze/boardid.h | 27 ---------------------------
 src/mainboard/google/nyan_blaze/pmic.c    |  2 +-
 src/mainboard/google/rush/boardid.c       |  2 +-
 src/mainboard/google/rush/boardid.h       | 27 ---------------------------
 src/mainboard/google/rush/pmic.c          |  2 +-
 src/mainboard/google/rush_ryu/boardid.c   |  2 +-
 src/mainboard/google/rush_ryu/boardid.h   | 27 ---------------------------
 15 files changed, 36 insertions(+), 144 deletions(-)

diff --git a/src/include/boardid.h b/src/include/boardid.h
new file mode 100644
index 0000000..d1c6ad9
--- /dev/null
+++ b/src/include/boardid.h
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __INCLUDE_BOARDID_H__
+#define __INCLUDE_BOARDID_H__
+
+#include <stdint.h>
+
+uint8_t board_id(void);
+
+#endif /* __INCLUDE_BOARDID_H__ */
diff --git a/src/mainboard/google/nyan/boardid.c b/src/mainboard/google/nyan/boardid.c
index 18d920b..a5ec61f 100644
--- a/src/mainboard/google/nyan/boardid.c
+++ b/src/mainboard/google/nyan/boardid.c
@@ -20,7 +20,7 @@
 #include <console/console.h>
 #include <soc/nvidia/tegra124/gpio.h>
 
-#include "boardid.h"
+#include <boardid.h>
 
 uint8_t board_id(void)
 {
diff --git a/src/mainboard/google/nyan/boardid.h b/src/mainboard/google/nyan/boardid.h
deleted file mode 100644
index b65f543..0000000
--- a/src/mainboard/google/nyan/boardid.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2013 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __MAINBOARD_GOOGLE_NYAN_BOARDID_H__
-#define __MAINBOARD_GOOGLE_NYAN_BOARDID_H__
-
-#include <stdint.h>
-
-uint8_t board_id(void);
-
-#endif /* __MAINBOARD_GOOGLE_NYAN_BOARDID_H__ */
diff --git a/src/mainboard/google/nyan/pmic.c b/src/mainboard/google/nyan/pmic.c
index dc5f744..2a65719 100644
--- a/src/mainboard/google/nyan/pmic.c
+++ b/src/mainboard/google/nyan/pmic.c
@@ -24,7 +24,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 
-#include "boardid.h"
+#include <boardid.h>
 #include "pmic.h"
 #include "reset.h"
 
diff --git a/src/mainboard/google/nyan_big/boardid.c b/src/mainboard/google/nyan_big/boardid.c
index 23b1c6a..c7bd2e6 100644
--- a/src/mainboard/google/nyan_big/boardid.c
+++ b/src/mainboard/google/nyan_big/boardid.c
@@ -21,7 +21,7 @@
 #include <soc/nvidia/tegra124/gpio.h>
 #include <stdlib.h>
 
-#include "boardid.h"
+#include <boardid.h>
 
 uint8_t board_id(void)
 {
diff --git a/src/mainboard/google/nyan_big/boardid.h b/src/mainboard/google/nyan_big/boardid.h
deleted file mode 100644
index 8b20032..0000000
--- a/src/mainboard/google/nyan_big/boardid.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2014 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __MAINBOARD_GOOGLE_NYAN_BIG_BOARDID_H__
-#define __MAINBOARD_GOOGLE_NYAN_BIG_BOARDID_H__
-
-#include <stdint.h>
-
-uint8_t board_id(void);
-
-#endif /* __MAINBOARD_GOOGLE_NYAN_BIG_BOARDID_H__ */
diff --git a/src/mainboard/google/nyan_big/pmic.c b/src/mainboard/google/nyan_big/pmic.c
index 4d52f70..ed855f1 100644
--- a/src/mainboard/google/nyan_big/pmic.c
+++ b/src/mainboard/google/nyan_big/pmic.c
@@ -24,7 +24,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 
-#include "boardid.h"
+#include <boardid.h>
 #include "pmic.h"
 #include "reset.h"
 
diff --git a/src/mainboard/google/nyan_blaze/boardid.c b/src/mainboard/google/nyan_blaze/boardid.c
index 23b1c6a..c7bd2e6 100644
--- a/src/mainboard/google/nyan_blaze/boardid.c
+++ b/src/mainboard/google/nyan_blaze/boardid.c
@@ -21,7 +21,7 @@
 #include <soc/nvidia/tegra124/gpio.h>
 #include <stdlib.h>
 
-#include "boardid.h"
+#include <boardid.h>
 
 uint8_t board_id(void)
 {
diff --git a/src/mainboard/google/nyan_blaze/boardid.h b/src/mainboard/google/nyan_blaze/boardid.h
deleted file mode 100644
index 0a3fe80..0000000
--- a/src/mainboard/google/nyan_blaze/boardid.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2014 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __MAINBOARD_GOOGLE_NYAN_BLAZE_BOARDID_H__
-#define __MAINBOARD_GOOGLE_NYAN_BLAZE_BOARDID_H__
-
-#include <stdint.h>
-
-uint8_t board_id(void);
-
-#endif /* __MAINBOARD_GOOGLE_NYAN_BLAZE_BOARDID_H__ */
diff --git a/src/mainboard/google/nyan_blaze/pmic.c b/src/mainboard/google/nyan_blaze/pmic.c
index 4d52f70..ed855f1 100644
--- a/src/mainboard/google/nyan_blaze/pmic.c
+++ b/src/mainboard/google/nyan_blaze/pmic.c
@@ -24,7 +24,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 
-#include "boardid.h"
+#include <boardid.h>
 #include "pmic.h"
 #include "reset.h"
 
diff --git a/src/mainboard/google/rush/boardid.c b/src/mainboard/google/rush/boardid.c
index 76bd4d9..67e55ba 100644
--- a/src/mainboard/google/rush/boardid.c
+++ b/src/mainboard/google/rush/boardid.c
@@ -20,7 +20,7 @@
 #include <console/console.h>
 #include <soc/nvidia/tegra132/gpio.h>
 
-#include "boardid.h"
+#include <boardid.h>
 
 uint8_t board_id(void)
 {
diff --git a/src/mainboard/google/rush/boardid.h b/src/mainboard/google/rush/boardid.h
deleted file mode 100644
index aa2ea5f..0000000
--- a/src/mainboard/google/rush/boardid.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2014 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __MAINBOARD_GOOGLE_RUSH_BOARDID_H__
-#define __MAINBOARD_GOOGLE_RUSH_BOARDID_H__
-
-#include <stdint.h>
-
-uint8_t board_id(void);
-
-#endif /* __MAINBOARD_GOOGLE_RUSH_BOARDID_H__ */
diff --git a/src/mainboard/google/rush/pmic.c b/src/mainboard/google/rush/pmic.c
index 7aa7dc9..85de200 100644
--- a/src/mainboard/google/rush/pmic.c
+++ b/src/mainboard/google/rush/pmic.c
@@ -24,7 +24,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 
-#include "boardid.h"
+#include <boardid.h>
 #include "pmic.h"
 #include "reset.h"
 
diff --git a/src/mainboard/google/rush_ryu/boardid.c b/src/mainboard/google/rush_ryu/boardid.c
index 76bd4d9..67e55ba 100644
--- a/src/mainboard/google/rush_ryu/boardid.c
+++ b/src/mainboard/google/rush_ryu/boardid.c
@@ -20,7 +20,7 @@
 #include <console/console.h>
 #include <soc/nvidia/tegra132/gpio.h>
 
-#include "boardid.h"
+#include <boardid.h>
 
 uint8_t board_id(void)
 {
diff --git a/src/mainboard/google/rush_ryu/boardid.h b/src/mainboard/google/rush_ryu/boardid.h
deleted file mode 100644
index aa2ea5f..0000000
--- a/src/mainboard/google/rush_ryu/boardid.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2014 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __MAINBOARD_GOOGLE_RUSH_BOARDID_H__
-#define __MAINBOARD_GOOGLE_RUSH_BOARDID_H__
-
-#include <stdint.h>
-
-uint8_t board_id(void);
-
-#endif /* __MAINBOARD_GOOGLE_RUSH_BOARDID_H__ */



More information about the coreboot-gerrit mailing list