2 * (C) Copyright 2014 CompuLab, Ltd. <www.compulab.co.il>
4 * Authors: Igor Grinberg <grinberg@compulab.co.il>
6 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/bootm.h>
16 void cl_print_pcb_info(void)
18 u32 board_rev = get_board_rev();
19 u32 rev_major = board_rev / 100;
20 u32 rev_minor = board_rev - (rev_major * 100);
22 if ((rev_minor / 10) * 10 == rev_minor)
23 rev_minor = rev_minor / 10;
25 printf("PCB: %u.%u\n", rev_major, rev_minor);
28 #ifdef CONFIG_SERIAL_TAG
29 void __weak get_board_serial(struct tag_serialnr *serialnr)
32 * This corresponds to what happens when we can communicate with the
33 * eeprom but don't get a valid board serial value.
41 int cl_usb_hub_init(int gpio, const char *label)
43 if (gpio_request(gpio, label)) {
44 printf("Error: can't obtain GPIO%d for %s", gpio, label);
48 gpio_direction_output(gpio, 0);
50 gpio_set_value(gpio, 1);
55 void cl_usb_hub_deinit(int gpio)