David Hendricks (dhendrix@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3140
-gerrit
commit 0cd7b2defd2369adeb49185ccc5ada88f692f28e Author: David Hendricks dhendrix@chromium.org Date: Thu Apr 25 15:44:11 2013 -0700
snow: cleanup legacy board_* function naming
These functions got their names from u-boot where board-specific functions get called from CPU code and various drivers, usually to fetch some kind of board-specific information.
Coreboot's code flow is such that CPU and driver code gets called from mainboard code and is given the necessary parameters as function arguments. Thus CPU and driver code is isolated and does not need to call board-specific functions to determine things like I2C topology, what DRAM module is used for a particular board, etc.
Change-Id: Ibc597af33c2162b0e33f62f6b6872cbe035066c6 Signed-off-by: David Hendricks dhendrix@chromium.org --- src/mainboard/google/snow/mainboard.c | 2 +- src/mainboard/google/snow/mainboard.h | 6 +++--- src/mainboard/google/snow/memory.c | 2 +- src/mainboard/google/snow/wakeup.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/mainboard/google/snow/mainboard.c b/src/mainboard/google/snow/mainboard.c index 4a0d181..5339dc5 100644 --- a/src/mainboard/google/snow/mainboard.c +++ b/src/mainboard/google/snow/mainboard.c @@ -46,7 +46,7 @@ struct { { LOGIC_Z, LOGIC_1, SNOW_CONFIG_RSVD }, };
-int board_get_config(void) +int get_board_config(void) { int i; int id0, id1; diff --git a/src/mainboard/google/snow/mainboard.h b/src/mainboard/google/snow/mainboard.h index 63a2c18..e3a4d01 100644 --- a/src/mainboard/google/snow/mainboard.h +++ b/src/mainboard/google/snow/mainboard.h @@ -33,7 +33,7 @@ enum snow_board_config { SNOW_CONFIG_RSVD, };
-int board_get_config(void); +int get_board_config(void);
enum { BOARD_IS_NOT_WAKEUP, // A normal boot (not suspend/resume). @@ -43,7 +43,7 @@ enum { // controllers are re-initialized. };
-int board_get_wakeup_state(void); -void board_wakeup(void); +int get_wakeup_state(void); +void wakeup(void);
#endif /* MAINBOARD_H */ diff --git a/src/mainboard/google/snow/memory.c b/src/mainboard/google/snow/memory.c index ba8c91f..a228ec4 100644 --- a/src/mainboard/google/snow/memory.c +++ b/src/mainboard/google/snow/memory.c @@ -459,7 +459,7 @@ struct mem_timings *get_mem_timings(void) enum mem_manuf mem_manuf; struct mem_timings *mem; - board_config = board_get_config(); + board_config = get_board_config(); switch (board_config) { case SNOW_CONFIG_ELPIDA_EVT: case SNOW_CONFIG_ELPIDA_DVT: diff --git a/src/mainboard/google/snow/wakeup.c b/src/mainboard/google/snow/wakeup.c index 33ea9d8..452752d 100644 --- a/src/mainboard/google/snow/wakeup.c +++ b/src/mainboard/google/snow/wakeup.c @@ -33,7 +33,7 @@ static int wakeup_need_reset(void) return gpio_get_value(GPIO_Y10); }
-void board_wakeup(void) +void wakeup(void) { if (wakeup_need_reset()) power_reset(); @@ -44,7 +44,7 @@ void board_wakeup(void) die("Failed to wake up.\n"); }
-int board_get_wakeup_state() +int get_wakeup_state() { uint32_t status = power_read_reset_status();