mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 18:41:11 +00:00
This board function allows workarounds to be applied to a board after all power rails are up but before the AP is out of reset. Most workarounds for power sequencing can go in board init hooks, but for devices where the power sequencing is driven by external PMIC the EC may not get interrupts in time to handle workarounds. For x86 platforms and boards which support RSMRST# passthrough this board callback will allow workarounds to be applied despite the PMIC sequencing by ensuring that the function is executed before RSMRST# deassertion. BUG=chrome-os-partner:58666 BRANCH=none TEST=test IMVP8 workaround on multiple eve boards Change-Id: I0569494084000a4b1738ee18aafce5c96900dc4b Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/402591 Reviewed-by: Shawn N <shawnn@chromium.org>
52 lines
1.7 KiB
C
52 lines
1.7 KiB
C
/* 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
|
|
|
|
#ifdef CONFIG_BOARD_HAS_BEFORE_RSMRST
|
|
/**
|
|
* Configure board before RSMRST# state change
|
|
*
|
|
* This board function allows workarounds to be applied to a board after all
|
|
* power rails are up but before the AP is out of reset.
|
|
*
|
|
* Most workarounds for power sequencing can go in board init hooks, but for
|
|
* devices where the power sequencing is driven by external PMIC the EC may
|
|
* not get interrupts in time to handle workarounds. For x86 platforms and
|
|
* boards which support RSMRST# passthrough this hook will allow the board
|
|
* to apply workarounds despite the PMIC sequencing.
|
|
*/
|
|
void board_before_rsmrst(int rsmrst);
|
|
#endif
|
|
|
|
#endif /* __CROS_EC_BOARD_CONFIG_H */
|