summaryrefslogtreecommitdiff
path: root/include/board_config.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-04-04 14:51:06 -0700
committerChromeBot <chrome-bot@google.com>2013-04-05 14:28:42 -0700
commit14adad27e8534852df01bd3b3a86c551f78cf21c (patch)
tree28a5dc4b3db5a8d4e2d37e81c4dd40ae31ef0897 /include/board_config.h
parent765c50ef5fc77aec2ef0abca7a76f000b4167d57 (diff)
downloadchrome-ec-14adad27e8534852df01bd3b3a86c551f78cf21c.tar.gz
Clean up board configuration
Board configuration interfaces are now defined in board_config.h, not in every board.h file. Tidied /alphabetized CONFIG defines. No functional changes, just rearranging code. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all targets Change-Id: I6196591784f8fa9ce6dfccd31891b679fb200063 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47419
Diffstat (limited to 'include/board_config.h')
-rw-r--r--include/board_config.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/board_config.h b/include/board_config.h
new file mode 100644
index 0000000000..0a97b8a181
--- /dev/null
+++ b/include/board_config.h
@@ -0,0 +1,35 @@
+/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef __CROS_EC_BOARD_CONFIG_H
+#define __CROS_EC_BOARD_CONFIG_H
+
+#include "common.h"
+
+#ifdef CONFIG_BOARD_PRE_INIT
+/**
+ * Configure board before any inits are called.
+ *
+ * Note that this is in general a hacky place to do configuration. Most config
+ * is actually chip-specific or module-specific and not board-specific, so
+ * putting it here hides dependencies between module inits and board init.
+ * Think very hard before putting code here.
+ */
+void board_config_pre_init(void);
+#endif
+
+#ifdef CONFIG_BOARD_POST_GPIO_INIT
+/**
+ * Configure board after GPIOs are initialized.
+ *
+ * Note that this is in general a hacky place to do configuration. Most config
+ * is actually chip-specific or module-specific and not board-specific, so
+ * putting it here hides dependencies between module inits and board init.
+ * Think very hard before putting code here.
+ */
+void board_config_post_gpio_init(void);
+#endif
+
+#endif /* __CROS_EC_BOARD_CONFIG_H */