From: Matwey V. Kornilov <matwey.kornilov@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 19/24] rockchip: rk3328: Migrate to use common board file
Date: Tue, 23 Jul 2019 22:51:49 +0300 [thread overview]
Message-ID: <qh7ogl$2dsq$1@blaine.gmane.org> (raw)
In-Reply-To: <20190722120221.25468-20-kever.yang@rock-chips.com>
22.07.2019 15:02, Kever Yang пишет:
> Use common board file for board_init() and board_late_init(),
> for Rockchip SoCs have very similar process.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Hi,
I've just checked that rock64-rk3328_defconfig is still bootable with
this series.
> ---
>
> arch/arm/mach-rockchip/Kconfig | 1 +
> board/rockchip/evb_rk3328/evb-rk3328.c | 64 --------------------------
> 2 files changed, 1 insertion(+), 64 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
> index b75c209b66..2b8bb8aa25 100644
> --- a/arch/arm/mach-rockchip/Kconfig
> +++ b/arch/arm/mach-rockchip/Kconfig
> @@ -110,6 +110,7 @@ config ROCKCHIP_RK3328
> select ARM64
> select SUPPORT_SPL
> select SPL
> + imply ROCKCHIP_COMMON_BOARD
> imply SPL_ROCKCHIP_COMMON_BOARD
> imply SPL_SERIAL_SUPPORT
> imply SPL_SEPARATE_BSS
> diff --git a/board/rockchip/evb_rk3328/evb-rk3328.c b/board/rockchip/evb_rk3328/evb-rk3328.c
> index 64595c783d..779bc646b2 100644
> --- a/board/rockchip/evb_rk3328/evb-rk3328.c
> +++ b/board/rockchip/evb_rk3328/evb-rk3328.c
> @@ -3,67 +3,3 @@
> * (C) Copyright 2016 Rockchip Electronics Co., Ltd
> */
>
> -#include <common.h>
> -#include <asm/armv8/mmu.h>
> -#include <dwc3-uboot.h>
> -#include <power/regulator.h>
> -#include <usb.h>
> -
> -DECLARE_GLOBAL_DATA_PTR;
> -
> -int board_init(void)
> -{
> - int ret;
> -
> - ret = regulators_enable_boot_on(false);
> - if (ret)
> - debug("%s: Cannot enable boot on regulator\n", __func__);
> -
> - return ret;
> -}
> -
> -#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
> -#include <usb.h>
> -#include <usb/dwc2_udc.h>
> -
> -static struct dwc2_plat_otg_data otg_data = {
> - .rx_fifo_sz = 512,
> - .np_tx_fifo_sz = 16,
> - .tx_fifo_sz = 128,
> -};
> -
> -int board_usb_init(int index, enum usb_init_type init)
> -{
> - int node;
> - const char *mode;
> - bool matched = false;
> - const void *blob = gd->fdt_blob;
> -
> - /* find the usb_otg node */
> - node = fdt_node_offset_by_compatible(blob, -1,
> - "snps,dwc2");
> -
> - while (node > 0) {
> - mode = fdt_getprop(blob, node, "dr_mode", NULL);
> - if (mode && strcmp(mode, "otg") == 0) {
> - matched = true;
> - break;
> - }
> -
> - node = fdt_node_offset_by_compatible(blob, node,
> - "snps,dwc2");
> - }
> - if (!matched) {
> - debug("Not found usb_otg device\n");
> - return -ENODEV;
> - }
> - otg_data.regs_otg = fdtdec_get_addr(blob, node, "reg");
> -
> - return dwc2_udc_probe(&otg_data);
> -}
> -
> -int board_usb_cleanup(int index, enum usb_init_type init)
> -{
> - return 0;
> -}
> -#endif
>
next prev parent reply other threads:[~2019-07-23 19:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 12:01 [U-Boot] [PATCH 00/24] rockchip: Migrate to use common board file Kever Yang
2019-07-22 12:01 ` [U-Boot] [PATCH 01/24] rockchip: rk3328: add board_debug_uart_init() Kever Yang
2019-07-22 12:01 ` [U-Boot] [PATCH 02/24] rockchip: convert to use ROCKCHIP_BOOT_MODE_REG for fastboot tag Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 03/24] rockchip: clean up board_usb_init() for all SoCs Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 04/24] rockchip: add common board file for U-Boot proper Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 05/24] rockchip: sdram_common: add common dram_init_banksize Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 06/24] rockchip: rk3036: move dram_init() into soc file Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 07/24] rockchip: rk3036: Migrate to use common board file Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 08/24] rockchip: rk3128: " Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 09/24] rockchip: rk322x: move SoC setting into arch_cpu_init() Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 10/24] rockchip: rk322x: Migrate to use common board file Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 11/24] rockchip: rk3188: Move SoC one time setting into arch_cpu_init() Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 12/24] rockchip: rk3188: Migrate to use common board file Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 13/24] rockchip: rk3288: move SOC setting into arch_cpu_init() Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 14/24] rockchip: rk3288: move board_early_init_f() back to veyron Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 15/24] rockchip: rk3288: Move veyron_init() back to veyron.c Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 16/24] rockchip: rk3288: Move clock CMD to SoC file Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 17/24] rockchip: rk3288: Move rk3288_detect_reset_reason to soc file Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 18/24] rockchip: rk3288: Migrate to use common board file Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 19/24] rockchip: rk3328: " Kever Yang
2019-07-23 19:51 ` Matwey V. Kornilov [this message]
2019-07-22 12:02 ` [U-Boot] [PATCH 20/24] " Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 21/24] rockchip: rk3399: init vbus regulator in board_early_init_f() Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 22/24] rockchip: rk3399: Migrate to use common board file Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 23/24] rockchip: elgin-rv1108: use board_early_init_f for per-boar init Kever Yang
2019-07-22 12:02 ` [U-Boot] [PATCH 24/24] rockchip: rv1108: Migrate to use common board file Kever Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='qh7ogl$2dsq$1@blaine.gmane.org' \
--to=matwey.kornilov@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox