mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-20 00:48:52 +09:00
![Tom Rini](/assets/img/avatar_default.png)
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>
60 lines
1.2 KiB
C
60 lines
1.2 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* (C) Copyright 2014 CompuLab, Ltd. <www.compulab.co.il>
|
|
*
|
|
* Authors: Igor Grinberg <grinberg@compulab.co.il>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <asm/bootm.h>
|
|
#include <asm/gpio.h>
|
|
#include <asm/setup.h>
|
|
|
|
#include "common.h"
|
|
#include "eeprom.h"
|
|
|
|
void cl_print_pcb_info(void)
|
|
{
|
|
u32 board_rev = get_board_rev();
|
|
u32 rev_major = board_rev / 100;
|
|
u32 rev_minor = board_rev - (rev_major * 100);
|
|
|
|
if ((rev_minor / 10) * 10 == rev_minor)
|
|
rev_minor = rev_minor / 10;
|
|
|
|
printf("PCB: %u.%u\n", rev_major, rev_minor);
|
|
}
|
|
|
|
#ifdef CONFIG_SERIAL_TAG
|
|
void __weak get_board_serial(struct tag_serialnr *serialnr)
|
|
{
|
|
/*
|
|
* This corresponds to what happens when we can communicate with the
|
|
* eeprom but don't get a valid board serial value.
|
|
*/
|
|
serialnr->low = 0;
|
|
serialnr->high = 0;
|
|
};
|
|
#endif
|
|
|
|
#ifdef CONFIG_CMD_USB
|
|
int cl_usb_hub_init(int gpio, const char *label)
|
|
{
|
|
if (gpio_request(gpio, label)) {
|
|
printf("Error: can't obtain GPIO%d for %s", gpio, label);
|
|
return -1;
|
|
}
|
|
|
|
gpio_direction_output(gpio, 0);
|
|
udelay(10);
|
|
gpio_set_value(gpio, 1);
|
|
udelay(1000);
|
|
return 0;
|
|
}
|
|
|
|
void cl_usb_hub_deinit(int gpio)
|
|
{
|
|
gpio_free(gpio);
|
|
}
|
|
#endif
|