uboot/board/xilinx/microblaze-generic/microblaze-generic.c
<<
>>
Prefs
   1// SPDX-License-Identifier: GPL-2.0+
   2/*
   3 * (C) Copyright 2007-2018 Michal Simek
   4 *
   5 * Michal SIMEK <monstr@monstr.eu>
   6 */
   7
   8/*
   9 * This is a board specific file.  It's OK to include board specific
  10 * header files
  11 */
  12
  13#include <common.h>
  14#include <config.h>
  15#include <dm.h>
  16#include <dm/lists.h>
  17#include <fdtdec.h>
  18#include <asm/processor.h>
  19#include <asm/microblaze_intc.h>
  20#include <asm/asm.h>
  21#include <asm/gpio.h>
  22#include <dm/uclass.h>
  23#include <wdt.h>
  24
  25DECLARE_GLOBAL_DATA_PTR;
  26
  27ulong ram_base;
  28
  29int dram_init_banksize(void)
  30{
  31        return fdtdec_setup_memory_banksize();
  32}
  33
  34int dram_init(void)
  35{
  36        if (fdtdec_setup_mem_size_base() != 0)
  37                return -EINVAL;
  38
  39        return 0;
  40};
  41
  42int board_late_init(void)
  43{
  44#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SYSRESET_MICROBLAZE)
  45        int ret;
  46
  47        ret = device_bind_driver(gd->dm_root, "mb_soft_reset",
  48                                 "reset_soft", NULL);
  49        if (ret)
  50                printf("Warning: No reset driver: ret=%d\n", ret);
  51#endif
  52        return 0;
  53}
  54