diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-04-09 16:38:12 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-04-10 11:19:38 -0700 |
commit | a649f52d5f690a9f8dd2242a3ce85f5d0ff1f318 (patch) | |
tree | b59f17665584634809b1789ae880e5a1c0a2fe58 /include/common.h | |
parent | d6ce2852aed7ca0b7a06e06cee008c0f3778c932 (diff) | |
download | chrome-ec-a649f52d5f690a9f8dd2242a3ce85f5d0ff1f318.tar.gz |
Move REG16 and REG32 macros to common.h
And use them for LM4 as well as STM32. Consistency is good.
No functional changes, just moving/renaming code.
BUG=chrome-os-partner:18343
BRANCH=none
TEST=build all platforms
Change-Id: I029a21fadb50726500255219dc38615874a369e7
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47700
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h index d1f4eb8296..5ac49537e7 100644 --- a/include/common.h +++ b/include/common.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +/* 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. */ @@ -10,6 +10,10 @@ #include <stdint.h> +/* Macros to access registers */ +#define REG32(addr) (*(volatile uint32_t *)(addr)) +#define REG16(addr) (*(volatile uint16_t *)(addr)) + /* * Define __packed if someone hasn't beat us to it. Linux kernel style * checking prefers __packed over __attribute__((packed)). |