mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 22:03:15 +00:00
7a3620b246
Some UniPhier boards are equipped with an expansion slot that
some optional SRAM/NOR-flash cards can be attached to. So, run-time
detection of the number of flash banks would be more user-friendly.
Until this commit, UniPhier boards have achieved this by (ab)using
board_flash_wp_on() because the boot failed if flash_size got zero.
Fortunately, this problem was solved by commit 70879a9256
(flash:
do not fail even if flash_size is zero).
Now it is possible to throw away such a tricky workaround. This
commit also enables CONFIG_SYS_MAX_FLASH_BANKS_DETECT for further
refactoring.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
42 lines
877 B
C
42 lines
877 B
C
/*
|
|
* Copyright (C) 2012-2014 Panasonic Corporation
|
|
* Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef ARCH_BOARD_H
|
|
#define ARCH_BOARD_H
|
|
|
|
#if defined(CONFIG_PFC_MICRO_SUPPORT_CARD) || \
|
|
defined(CONFIG_DCC_MICRO_SUPPORT_CARD)
|
|
void support_card_reset(void);
|
|
void support_card_init(void);
|
|
void support_card_late_init(void);
|
|
int check_support_card(void);
|
|
#else
|
|
#define support_card_reset() do {} while (0)
|
|
#define support_card_init() do {} while (0)
|
|
#define support_card_late_init() do {} while (0)
|
|
static inline int check_support_card(void)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
static inline void uniphier_board_reset(void)
|
|
{
|
|
support_card_reset();
|
|
}
|
|
|
|
static inline void uniphier_board_init(void)
|
|
{
|
|
support_card_init();
|
|
}
|
|
|
|
static inline void uniphier_board_late_init(void)
|
|
{
|
|
support_card_late_init();
|
|
}
|
|
|
|
#endif /* ARCH_BOARD_H */
|