summaryrefslogtreecommitdiffstats
path: root/bsps/shared/start/bsp-uboot-board-info.c
blob: cf86462ca8758e3da91542339d078df5c1b86135 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * Copyright (c) 2010, 2016 embedded brains GmbH.  All rights reserved.
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.org/license/LICENSE.
 */

#include <bsp/u-boot.h>

#include <string.h>
#include <rtems.h>

#ifndef U_BOOT_BOARD_INFO_DATA_SECTION
#define U_BOOT_BOARD_INFO_DATA_SECTION
#endif

U_BOOT_BOARD_INFO_DATA_SECTION bd_t bsp_uboot_board_info;

void bsp_uboot_copy_board_info(const bd_t *src)
{
  bd_t *dst = &bsp_uboot_board_info;

  dst = memcpy(dst, src, sizeof(*dst));
  rtems_cache_flush_multiple_data_lines(dst, sizeof(*dst));
}