forked from Imagelibrary/rtems
2010-12-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
* shared/bspgetworkarea.c: Include <bsp/u-boot.h> if necessary. * shared/include/u-boot.h, shared/src/bsp-uboot-board-info.c: New files.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2010-12-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
|
* shared/bspgetworkarea.c: Include <bsp/u-boot.h> if necessary.
|
||||||
|
* shared/include/u-boot.h, shared/src/bsp-uboot-board-info.c: New
|
||||||
|
files.
|
||||||
|
|
||||||
2010-10-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
2010-10-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
* include/utility.h: Renamed macros.
|
* include/utility.h: Renamed macros.
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ extern char HeapSize[];
|
|||||||
* We may get the size information from U-Boot or the linker scripts.
|
* We may get the size information from U-Boot or the linker scripts.
|
||||||
*/
|
*/
|
||||||
#ifdef HAS_UBOOT
|
#ifdef HAS_UBOOT
|
||||||
extern bd_t bsp_uboot_board_info;
|
#include <bsp/u-boot.h>
|
||||||
#else
|
#else
|
||||||
extern char RamBase[];
|
extern char RamBase[];
|
||||||
extern char RamSize[];
|
extern char RamSize[];
|
||||||
|
|||||||
38
c/src/lib/libbsp/shared/include/u-boot.h
Normal file
38
c/src/lib/libbsp/shared/include/u-boot.h
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2010 embedded brains GmbH. All rights reserved.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Obere Lagerstr. 30
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef LIBBSP_SHARED_U_BOOT_H
|
||||||
|
#define LIBBSP_SHARED_U_BOOT_H
|
||||||
|
|
||||||
|
#include <bsp/u-boot-config.h>
|
||||||
|
|
||||||
|
typedef unsigned long phys_size_t;
|
||||||
|
|
||||||
|
#include <bsp/u-boot-board-info.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
extern bd_t bsp_uboot_board_info;
|
||||||
|
|
||||||
|
void bsp_uboot_copy_board_info(const bd_t *src);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* LIBBSP_SHARED_U_BOOT_H */
|
||||||
31
c/src/lib/libbsp/shared/src/bsp-uboot-board-info.c
Normal file
31
c/src/lib/libbsp/shared/src/bsp-uboot-board-info.c
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2010 embedded brains GmbH. All rights reserved.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Obere Lagerstr. 30
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <bsp/u-boot.h>
|
||||||
|
|
||||||
|
bd_t bsp_uboot_board_info;
|
||||||
|
|
||||||
|
void bsp_uboot_copy_board_info(const bd_t *src)
|
||||||
|
{
|
||||||
|
const int *s = (const int *) src;
|
||||||
|
int *d = (int *) &bsp_uboot_board_info;
|
||||||
|
int i = 0;
|
||||||
|
int n = sizeof(*src) / sizeof(int);
|
||||||
|
|
||||||
|
for (i = 0; i < n; ++i) {
|
||||||
|
d [i] = s [i];
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user