blob: 085c8e195a6c1798553cd77f908a350f081e02f6 [file] [log] [blame]
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (C) 2023 PHYTEC Messtechnik GmbH
* Author: Christoph Stoidner <c.stoidner@phytec.de>
* Copyright (C) 2024 Mathieu Othacehe <m.othacehe@gmail.com>
*/
#include <asm/arch-imx9/ccm_regs.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch-imx9/imx93_pins.h>
#include <asm/arch/clock.h>
#include <asm/global_data.h>
#include <asm/mach-imx/boot_mode.h>
#include <env.h>
DECLARE_GLOBAL_DATA_PTR;
int board_init(void)
{
return 0;
}
int board_mmc_get_env_dev(int devno)
{
return devno;
}
int board_late_init(void)
{
switch (get_boot_device()) {
case SD2_BOOT:
env_set_ulong("mmcdev", 1);
break;
case MMC1_BOOT:
env_set_ulong("mmcdev", 0);
break;
default:
break;
}
return 0;
}