X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=arch%2Farm%2Fmach-uniphier%2Fmicro-support-card.c;h=1be5685c6fbfe4b5255d12954c45d406e5dd8149;hb=09056c94a16c953aef029fb09832b6ea86a9a359;hp=04e6558e9be0d580f141c45c7f103c733f03f0be;hpb=9a6535e05f17acf03e891266a650cb6029124743;p=oweals%2Fu-boot.git diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c index 04e6558e9b..1be5685c6f 100644 --- a/arch/arm/mach-uniphier/micro-support-card.c +++ b/arch/arm/mach-uniphier/micro-support-card.c @@ -1,9 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2012-2015 Panasonic Corporation * Copyright (C) 2015-2016 Socionext Inc. * Author: Masahiro Yamada - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -25,12 +24,12 @@ * bit[0]: LAN, I2C, LED * bit[1]: UART */ -void support_card_reset_deassert(void) +static void support_card_reset_deassert(void) { writel(0x00010000, MICRO_SUPPORT_CARD_RESET); } -void support_card_reset(void) +static void support_card_reset(void) { writel(0x00020003, MICRO_SUPPORT_CARD_RESET); } @@ -43,27 +42,24 @@ static int support_card_show_revision(void) revision &= 0xff; /* revision 3.6.x card changed the revision format */ - printf("(CPLD version %s%d.%d)\n", revision >> 4 == 6 ? "3." : "", + printf("SC: Micro Support Card (CPLD version %s%d.%d)\n", + revision >> 4 == 6 ? "3." : "", revision >> 4, revision & 0xf); return 0; } -int checkboard(void) -{ - printf("SC: Micro Support Card "); - return support_card_show_revision(); -} - void support_card_init(void) { + support_card_reset(); /* * After power on, we need to keep the LAN controller in reset state * for a while. (200 usec) - * Fortunately, enough wait time is already inserted in pll_init() - * function. So we do not have to wait here. */ + udelay(200); support_card_reset_deassert(); + + support_card_show_revision(); } #if defined(CONFIG_SMC911X) @@ -75,7 +71,7 @@ int board_eth_init(bd_t *bis) } #endif -#if !defined(CONFIG_SYS_NO_FLASH) +#if defined(CONFIG_MTD_NOR_FLASH) #include @@ -157,11 +153,11 @@ static void detect_num_flash_banks(void) debug("number of flash banks: %d\n", cfi_flash_num_flash_banks); } -#else /* CONFIG_SYS_NO_FLASH */ -void detect_num_flash_banks(void) +#else /* CONFIG_MTD_NOR_FLASH */ +static void detect_num_flash_banks(void) { }; -#endif /* CONFIG_SYS_NO_FLASH */ +#endif /* CONFIG_MTD_NOR_FLASH */ void support_card_late_init(void) {