ls2080: Exit dpaa only right before exiting U-Boot

On ls2080 we have a separate network fabric component which we need to
shut down before we enter Linux (or any other OS). Along with that also
comes configuration of the fabric using a description file.

Today we always stop and configure the fabric in the boot script and
(again) exit it on device tree generation. This works ok for the normal
booti case, but with bootefi the payload we're running may still want to
access the network.

So let's add a new fsl_mc command that defers configuration and stopping
the hardware to when we actually exit U-Boot, so that we can still use
the fabric from an EFI payload.

For existing boot scripts, nothing should change with this patch.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: York Sun <york.sun@nxp.com>
[agraf: Fix x86 build]
This commit is contained in:
Alexander Graf
2016-11-17 01:02:57 +01:00
parent 97d014446c
commit b7b8410a8f
9 changed files with 52 additions and 15 deletions

View File

@@ -37,6 +37,7 @@ int arch_early_init_r(void);
/* board/.../... */
int board_init(void);
void dram_init_banksize (void);
void board_quiesce_devices(void);
/* cpu/.../interrupt.c */
int arch_interrupt_init (void);

View File

@@ -64,6 +64,10 @@ void arch_lmb_reserve(struct lmb *lmb)
gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size - sp);
}
__weak void board_quiesce_devices(void)
{
}
/**
* announce_and_cleanup() - Print message and prepare for kernel boot
*
@@ -84,6 +88,9 @@ static void announce_and_cleanup(int fake)
#ifdef CONFIG_USB_DEVICE
udc_disconnect();
#endif
board_quiesce_devices();
cleanup_before_linux();
}

View File

@@ -74,6 +74,7 @@ static inline __attribute__((no_instrument_function)) uint64_t rdtsc(void)
/* board/... */
void timer_set_tsc_base(uint64_t new_base);
uint64_t timer_get_tsc(void);
void board_quiesce_devices(void);
void quick_ram_check(void);

View File

@@ -26,6 +26,10 @@ DECLARE_GLOBAL_DATA_PTR;
#define COMMAND_LINE_OFFSET 0x9000
__weak void board_quiesce_devices(void)
{
}
void bootm_announce_and_cleanup(void)
{
printf("\nStarting kernel ...\n\n");