summaryrefslogtreecommitdiff
path: root/board/discovery
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-01-26 01:09:48 +0000
committerVincent Palatin <vpalatin@chromium.org>2012-01-26 16:50:55 -0800
commit414499778d790c249ebb77dee71704616cc461d9 (patch)
tree04156daebe30044d68a6041a653322d26d77a030 /board/discovery
parent36050a30d58f1b61410bff5ce07d43d4bf075216 (diff)
downloadchrome-ec-414499778d790c249ebb77dee71704616cc461d9.tar.gz
add the skeleton for STM32L chip and discovery board
All hardware drivers code is stubbed excepted a few configuration settings. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=make BOARD=discovery Change-Id: Ic9e88a0f51ab626679c8aeb6192272e66a3f79b8
Diffstat (limited to 'board/discovery')
-rw-r--r--board/discovery/board.c46
-rw-r--r--board/discovery/board.h24
-rw-r--r--board/discovery/build.mk10
-rw-r--r--board/discovery/ec.tasklist17
4 files changed, 97 insertions, 0 deletions
diff --git a/board/discovery/board.c b/board/discovery/board.c
new file mode 100644
index 0000000000..d6b05bb622
--- /dev/null
+++ b/board/discovery/board.c
@@ -0,0 +1,46 @@
+/* Copyright (c) 2012 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.
+ */
+/* STM32L Discovery board-specific configuration */
+
+#include "board.h"
+#include "common.h"
+
+void configure_board(void)
+{
+}
+
+/**
+ * Stubs for non implemented drivers
+ * TODO: implement
+ */
+int jtag_pre_init(void)
+{
+ return EC_SUCCESS;
+}
+
+int gpio_pre_init(void)
+{
+ return EC_SUCCESS;
+}
+
+int eeprom_init(void)
+{
+ return EC_SUCCESS;
+}
+
+int i2c_init(void)
+{
+ return EC_SUCCESS;
+}
+
+int power_button_init(void)
+{
+ return EC_SUCCESS;
+}
+
+int adc_init(void)
+{
+ return EC_SUCCESS;
+}
diff --git a/board/discovery/board.h b/board/discovery/board.h
new file mode 100644
index 0000000000..3e4ea80d12
--- /dev/null
+++ b/board/discovery/board.h
@@ -0,0 +1,24 @@
+/* Copyright (c) 2012 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.
+ */
+
+/* STM32L Discovery board configuration */
+
+#ifndef __BOARD_H
+#define __BOARD_H
+
+#define USB_CHARGE_PORT_COUNT 0
+
+/* GPIO signal list */
+enum gpio_signal {
+ GPIO_DUMMY0 = 0, /* Dummy GPIO */
+ GPIO_DUMMY1,
+
+ /* Number of GPIOs; not an actual GPIO */
+ GPIO_COUNT
+};
+
+void configure_board(void);
+
+#endif /* __BOARD_H */
diff --git a/board/discovery/build.mk b/board/discovery/build.mk
new file mode 100644
index 0000000000..2f0ebe32af
--- /dev/null
+++ b/board/discovery/build.mk
@@ -0,0 +1,10 @@
+# Copyright (c) 2012 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.
+#
+# Board specific files build
+
+# the IC is STmicro STM32L151R8H6
+CHIP:=stm32l
+
+board-y=board.o
diff --git a/board/discovery/ec.tasklist b/board/discovery/ec.tasklist
new file mode 100644
index 0000000000..8e52f9f1c2
--- /dev/null
+++ b/board/discovery/ec.tasklist
@@ -0,0 +1,17 @@
+/* Copyright (c) 2012 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.
+ */
+
+/**
+ * List of enabled tasks in the priority order
+ *
+ * The first one has the lowest priority.
+ *
+ * For each task, use the macro TASK(n, r, d) where :
+ * 'n' in the name of the task
+ * 'r' in the main routine of the task
+ * 'd' in an opaque parameter passed to the routine at startup
+ */
+#define CONFIG_TASK_LIST \
+ TASK(CONSOLE, console_task, NULL)