mirror of
https://github.com/smaeul/u-boot.git
synced 2025-09-14 14:06:02 +01:00
Introduce common weak board_early_init_f() in rcar64-common.c which is the default implementation in case there is no other board specific board_early_init_f(). Remove board_early_init_f() from Salvator-X, ULCB and Draak boards where this function is empty. Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
37 lines
955 B
C
37 lines
955 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* board/renesas/draak/draak.c
|
|
* This file is Draak board support.
|
|
*
|
|
* Copyright (C) 2017 Marek Vasut <marek.vasut+renesas@gmail.com>
|
|
*/
|
|
|
|
#include <asm/io.h>
|
|
#include <asm/arch/rcar-mstp.h>
|
|
#include <asm/arch/renesas.h>
|
|
|
|
#define HSUSB_MSTP704 BIT(4) /* HSUSB */
|
|
|
|
/* HSUSB block registers */
|
|
#define HSUSB_REG_LPSTS 0xE6590102
|
|
#define HSUSB_REG_LPSTS_SUSPM_NORMAL BIT(14)
|
|
#define HSUSB_REG_UGCTRL2 0xE6590184
|
|
#define HSUSB_REG_UGCTRL2_USB0SEL 0x30
|
|
#define HSUSB_REG_UGCTRL2_USB0SEL_EHCI 0x10
|
|
|
|
int board_init(void)
|
|
{
|
|
/* USB1 pull-up */
|
|
setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN);
|
|
|
|
/* Configure the HSUSB block */
|
|
mstp_clrbits_le32(SMSTPCR7, SMSTPCR7, HSUSB_MSTP704);
|
|
/* Choice USB0SEL */
|
|
clrsetbits_le32(HSUSB_REG_UGCTRL2, HSUSB_REG_UGCTRL2_USB0SEL,
|
|
HSUSB_REG_UGCTRL2_USB0SEL_EHCI);
|
|
/* low power status */
|
|
setbits_le16(HSUSB_REG_LPSTS, HSUSB_REG_LPSTS_SUSPM_NORMAL);
|
|
|
|
return 0;
|
|
}
|