summaryrefslogtreecommitdiff
path: root/src/ec/smsc/mec1308
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-17 15:14:38 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-20 13:52:14 +0000
commit07841c2a2a930383dfd56d5adc966d0efaafec66 (patch)
tree321714a5ea901a2fba7a84ce04430a81d311e8f7 /src/ec/smsc/mec1308
parent7d640e2ac791d9847e70ecfc41940ce7d104c06a (diff)
downloadcoreboot-07841c2a2a930383dfd56d5adc966d0efaafec66.tar.xz
src/ec: Drop __PRE_RAM__ and __SMM__ guards
For files built in ramstage and smm -classes, testing for !__PRE_RAM__ is redundant. All chip_operations are exluded with use of DEVTREE_EARLY in static devicetree, so garbage collection will take care of the !__SMM__ cases. Change-Id: Id7219848d6f5c41c4a9724a72204fa5ef9458e43 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34940 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/ec/smsc/mec1308')
-rw-r--r--src/ec/smsc/mec1308/ec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ec/smsc/mec1308/ec.c b/src/ec/smsc/mec1308/ec.c
index 83dd729825..c6e282a015 100644
--- a/src/ec/smsc/mec1308/ec.c
+++ b/src/ec/smsc/mec1308/ec.c
@@ -115,10 +115,9 @@ void ec_set_ports(u16 cmd_reg, u16 data_reg)
ec_data_reg = data_reg;
}
-#if !defined(__PRE_RAM__) && !defined(__SMM__)
static void mec1308_enable(struct device *dev)
{
- struct ec_smsc_mec1308_config *conf = dev->chip_info;
+ DEVTREE_CONST struct ec_smsc_mec1308_config *conf = dev->chip_info;
if (conf->mailbox_port) {
ec_cmd_reg = conf->mailbox_port;
@@ -130,4 +129,3 @@ struct chip_operations ec_smsc_mec1308_ops = {
CHIP_NAME("SMSC MEC1308 EC Mailbox Interface")
.enable_dev = mec1308_enable
};
-#endif