diff options
author | Aaron Durbin <adurbin@chromium.org> | 2014-08-13 13:27:14 -0500 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-03-26 00:27:12 +0100 |
commit | 65627dd6bd415aa7194a600eb998fe07026d2004 (patch) | |
tree | 5697a1dc50d95d859405635947bb8b1007c62422 /src/mainboard/google/rush_ryu/mainboard.c | |
parent | 4d6ac8d9d9561762bf349eb553a36c0379ac23a6 (diff) |
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>
Diffstat (limited to 'src/mainboard/google/rush_ryu/mainboard.c')
-rw-r--r-- | src/mainboard/google/rush_ryu/mainboard.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mainboard/google/rush_ryu/mainboard.c b/src/mainboard/google/rush_ryu/mainboard.c index 1e80b5b9b2..426c30c5e6 100644 --- a/src/mainboard/google/rush_ryu/mainboard.c +++ b/src/mainboard/google/rush_ryu/mainboard.c @@ -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) |