summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-06-27 11:00:41 -0700
committerChromeBot <chrome-bot@google.com>2013-07-01 10:19:49 -0700
commitd3dffe253213fd7fa75fe6ef1c14b32629ca30c6 (patch)
treea79271df4eacf1a5b35a35d9bf2ba510d22d95f8 /board
parent61820ceb435917607107674cd0eb888598072dbf (diff)
downloadchrome-ec-d3dffe253213fd7fa75fe6ef1c14b32629ca30c6.tar.gz
stm32: Add CHIP_FAMILY defines
Previously, code which needed to work on all STM32F platforms needed to specify them by name (CHIP_VARIANT_stm32f100 || CHIP_VARIANT_stm32f10x), and we needed extra symlinks in the chip/stm32/ directory to allow the build system to find family-specific files. Add a CHIP_FAMILY level of abstraction, so that things which are common across all STM32F platforms don't need to specify every STM32F variant. Make the chip build look for family-specific filenames instead of variant-specific filenames (except for config*.h, which is actually variant specific). In the few places where things actually are variant-specific, keep using the existing CHIP_VARIANT defines. Code refactoring only; no functional changes. BUG=chrome-os-partner:20567 BRANCH=none TEST=build all platforms Change-Id: I1da831aadabf8b8dd9dfde423cac13c9f43eb953 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/60247 Reviewed-by: David Hendricks <dhendrix@chromium.org> Reviewed-by: Vic Yang <victoryang@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/daisy/build.mk1
-rw-r--r--board/mccroskey/build.mk2
-rw-r--r--board/pit/build.mk1
-rw-r--r--board/snow/build.mk1
-rw-r--r--board/spring/build.mk1
5 files changed, 5 insertions, 1 deletions
diff --git a/board/daisy/build.mk b/board/daisy/build.mk
index 3fd1e94556..c6b8ef64ea 100644
--- a/board/daisy/build.mk
+++ b/board/daisy/build.mk
@@ -7,6 +7,7 @@
# the IC is STmicro STM32L151R8H6
CHIP:=stm32
+CHIP_FAMILY:=stm32l
CHIP_VARIANT:=stm32l15x
board-y=board.o
diff --git a/board/mccroskey/build.mk b/board/mccroskey/build.mk
index aedcb384eb..b3956b1645 100644
--- a/board/mccroskey/build.mk
+++ b/board/mccroskey/build.mk
@@ -7,7 +7,7 @@
# the IC is STmicro STM32F102R8
CHIP:=stm32
-
+CHIP_FAMILY:=stm32f
CHIP_VARIANT:=stm32f10x
board-y=board.o
diff --git a/board/pit/build.mk b/board/pit/build.mk
index 2aec946f29..8de1b957d3 100644
--- a/board/pit/build.mk
+++ b/board/pit/build.mk
@@ -7,6 +7,7 @@
# the IC is STmicro STM32L151R8H6
CHIP:=stm32
+CHIP_FAMILY:=stm32l
CHIP_VARIANT:=stm32l15x
board-y=board.o
diff --git a/board/snow/build.mk b/board/snow/build.mk
index 53d994e236..88b201efd5 100644
--- a/board/snow/build.mk
+++ b/board/snow/build.mk
@@ -7,6 +7,7 @@
# the IC is STmicro STM32F100R8
CHIP:=stm32
+CHIP_FAMILY:=stm32f
CHIP_VARIANT:=stm32f100
board-y=board.o
diff --git a/board/spring/build.mk b/board/spring/build.mk
index 8c1bc9c0a6..28c73da08f 100644
--- a/board/spring/build.mk
+++ b/board/spring/build.mk
@@ -6,6 +6,7 @@
# the IC is STmicro STM32F100RB
CHIP:=stm32
+CHIP_FAMILY:=stm32f
CHIP_VARIANT:=stm32f100
board-y=board.o