X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fti%2Fam57xx%2Fboard.c;h=fd9d20779bef5c5ac11d5109138a56724f05f77f;hb=e8f80a5a58c9b506453cc0780687e8ed457d30a6;hp=8862ee932cbc0105c93858e65b88b4d702265e62;hpb=443b0df361b95af54cc587b750a036619b2f3405;p=u-boot diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 8862ee932c..fd9d20779b 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -1,11 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com * * Author: Felipe Balbi * * Based on board/ti/dra7xx/evm.c - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -30,6 +29,7 @@ #include #include #include +#include #include "../common/board_detect.h" #include "mux_data.h" @@ -815,6 +815,35 @@ int board_mmc_init(bd_t *bis) omap_mmc_init(1, 0, 0, -1, -1); return 0; } + +static const struct mmc_platform_fixups am57x_es1_1_mmc1_fixups = { + .hw_rev = "rev11", + .unsupported_caps = MMC_CAP(MMC_HS_200) | + MMC_CAP(UHS_SDR104), + .max_freq = 96000000, +}; + +static const struct mmc_platform_fixups am57x_es1_1_mmc23_fixups = { + .hw_rev = "rev11", + .unsupported_caps = MMC_CAP(MMC_HS_200) | + MMC_CAP(UHS_SDR104) | + MMC_CAP(UHS_SDR50), + .max_freq = 48000000, +}; + +const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr) +{ + switch (omap_revision()) { + case DRA752_ES1_0: + case DRA752_ES1_1: + if (addr == OMAP_HSMMC1_BASE) + return &am57x_es1_1_mmc1_fixups; + else + return &am57x_es1_1_mmc23_fixups; + default: + return NULL; + } +} #endif #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT) @@ -867,7 +896,7 @@ int usb_gadget_handle_interrupts(int index) #endif /* CONFIG_USB_DWC3 */ #if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP) -int omap_xhci_board_usb_init(int index, enum usb_init_type init) +int board_usb_init(int index, enum usb_init_type init) { enable_usb_clocks(index); switch (index) { @@ -901,7 +930,7 @@ int omap_xhci_board_usb_init(int index, enum usb_init_type init) return 0; } -int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { #ifdef CONFIG_USB_DWC3 switch (index) { @@ -1128,6 +1157,8 @@ int board_fit_config_name_match(const char *name) return 0; } else if (board_is_am572x_idk() && !strcmp(name, "am572x-idk")) { return 0; + } else if (board_is_am574x_idk() && !strcmp(name, "am574x-idk")) { + return 0; } else if (board_is_am571x_idk() && !strcmp(name, "am571x-idk")) { return 0; }