mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-27 13:33:40 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
78 lines
1.5 KiB
C
78 lines
1.5 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Board functions for CompuLab cl_som_am57x board
|
|
*
|
|
* (C) Copyright 2016 CompuLab, Ltd. http://compulab.co.il/
|
|
*
|
|
* Author: Dmitry Lifshitz <lifshitz@compulab.co.il>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <palmas.h>
|
|
#include <usb.h>
|
|
#include <asm/gpio.h>
|
|
#include <asm/arch/mmc_host_def.h>
|
|
#include <asm/arch/sys_proto.h>
|
|
#include "../common/common.h"
|
|
#include "../common/eeprom.h"
|
|
#include <asm/omap_common.h>
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
const struct omap_sysinfo sysinfo = {
|
|
"Board: CL-SOM-AM57x\n"
|
|
};
|
|
|
|
int board_init(void)
|
|
{
|
|
/* Disable PMIC Powerhold feature, DEV_CTRL.DEV_ON = 1 */
|
|
palmas_i2c_write_u8(TPS65903X_CHIP_P1, 0xA0, 0x1);
|
|
|
|
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
|
|
|
return 0;
|
|
}
|
|
|
|
#ifdef CONFIG_MMC
|
|
#define SB_SOM_CD_GPIO 187
|
|
#define SB_SOM_WP_GPIO 188
|
|
|
|
int board_mmc_init(bd_t *bis)
|
|
{
|
|
int ret0, ret1;
|
|
|
|
ret0 = omap_mmc_init(0, 0, 0, SB_SOM_CD_GPIO, SB_SOM_WP_GPIO);
|
|
if (ret0)
|
|
printf("cl-som-am57x: failed to initialize mmc0\n");
|
|
|
|
ret1 = omap_mmc_init(1, 0, 0, -1, -1);
|
|
if (ret1)
|
|
printf("cl-som-am57x: failed to initialize mmc1\n");
|
|
|
|
return ret0 && ret1;
|
|
}
|
|
#endif /* CONFIG_MMC */
|
|
|
|
int misc_init_r(void)
|
|
{
|
|
cl_print_pcb_info();
|
|
|
|
return 0;
|
|
}
|
|
|
|
u32 get_board_rev(void)
|
|
{
|
|
return cl_eeprom_get_board_rev(CONFIG_SYS_I2C_EEPROM_BUS);
|
|
}
|
|
|
|
int board_usb_init(int index, enum usb_init_type init)
|
|
{
|
|
enable_usb_clocks(index);
|
|
return 0;
|
|
}
|
|
|
|
int board_usb_cleanup(int index, enum usb_init_type init)
|
|
{
|
|
disable_usb_clocks(index);
|
|
return 0;
|
|
}
|