ryu: convert hardware initialization to funit API
Use the new funit API to do all the dirty work. BUG=chrome-os-partner:29981 BRANCH=None TEST=Built and ran through depthcharge and into recovery just like before. Change-Id: I8625a06dd847bd3dcfc3ce5a50a31d6aff0b860f Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: ebc04a174269ae072eda804e172fd24362f417d2 Original-Change-Id: Ief2d81c5569c33a90fc9458d741edef1dcbd8239 Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/212152 Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/8930 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
4d6ac8d9d9
commit
65627dd6bd
@@ -24,11 +24,10 @@
|
||||
|
||||
#include <soc/addressmap.h>
|
||||
#include <soc/clock.h>
|
||||
#include <soc/funitcfg.h>
|
||||
#include <soc/padconfig.h>
|
||||
#include <soc/nvidia/tegra132/clk_rst.h>
|
||||
|
||||
static struct clk_rst_ctlr *clk_rst = (void *)TEGRA_CLK_RST_BASE;
|
||||
|
||||
static const struct pad_config mmcpads[] = {
|
||||
/* MMC4 (eMMC) */
|
||||
PAD_CFG_SFIO(SDMMC4_CLK, PINMUX_INPUT_ENABLE|PINMUX_PULL_DOWN, SDMMC4),
|
||||
@@ -43,17 +42,14 @@ static const struct pad_config mmcpads[] = {
|
||||
PAD_CFG_SFIO(SDMMC4_DAT7, PINMUX_INPUT_ENABLE|PINMUX_PULL_UP, SDMMC4),
|
||||
};
|
||||
|
||||
static void init_mmc(void)
|
||||
{
|
||||
clock_enable_clear_reset(CLK_L_SDMMC4, 0, 0, 0, 0, 0);
|
||||
clock_configure_source(sdmmc4, PLLP, 48000);
|
||||
|
||||
soc_configure_pads(mmcpads, ARRAY_SIZE(mmcpads));
|
||||
}
|
||||
static const struct funit_cfg funits[] = {
|
||||
/* MMC on SDMMC4 controller at 48MHz. */
|
||||
FUNIT_CFG(SDMMC4, PLLP, 48000, mmcpads, ARRAY_SIZE(mmcpads)),
|
||||
};
|
||||
|
||||
static void mainboard_init(device_t dev)
|
||||
{
|
||||
init_mmc();
|
||||
soc_configure_funits(funits, ARRAY_SIZE(funits));
|
||||
}
|
||||
|
||||
static void mainboard_enable(device_t dev)
|
||||
|
Reference in New Issue
Block a user