Changeset 43fbb50f in rtems


Ignore:
Timestamp:
Feb 15, 2019, 11:07:23 AM (2 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
af80b0a
Parents:
3d65f45
git-author:
Sebastian Huber <sebastian.huber@…> (02/15/19 11:07:23)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/18/19 07:33:27)
Message:

bsp/altera-cyclone-v: Make FDT support optional

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • bsps/arm/altera-cyclone-v/include/bsp.h

    r3d65f45 r43fbb50f  
    2727
    2828#define BSP_FEATURE_IRQ_EXTENSION
    29 
    30 #define BSP_FDT_IS_SUPPORTED
    3129
    3230#ifndef ASM
  • bsps/arm/altera-cyclone-v/start/bspgetworkarea.c

    r3d65f45 r43fbb50f  
    1515
    1616#include <libfdt.h>
     17
     18#ifdef BSP_FDT_IS_SUPPORTED
    1719
    1820#define AREA_COUNT_MAX 16
     
    148150}
    149151
     152#else /* !BSP_FDT_IS_SUPPORTED */
     153
     154#define AREA_COUNT_MAX 1
     155
     156#endif /* BSP_FDT_IS_SUPPORTED */
     157
    150158void bsp_work_area_initialize(void)
    151159{
    152   const void *fdt;
    153160  Heap_Area areas[AREA_COUNT_MAX];
    154161  size_t area_count;
     162#ifdef BSP_FDT_IS_SUPPORTED
     163  const void *fdt;
    155164  size_t i;
     165#endif
    156166
    157167  areas[0].begin = bsp_section_work_begin;
     
    159169  area_count = 1;
    160170
     171#ifdef BSP_FDT_IS_SUPPORTED
    161172  fdt = bsp_fdt_get();
    162173
     
    171182    );
    172183  }
     184#endif
    173185
    174186  bsp_work_area_initialize_with_table(areas, area_count);
  • bsps/arm/altera-cyclone-v/start/bspstart.c

    r3d65f45 r43fbb50f  
    2222#include <libfdt.h>
    2323
     24#ifdef BSP_FDT_IS_SUPPORTED
    2425uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
    2526{
     
    9192  set_clock_by_output_name(fdt, ALT_CLK_F2H_SDRAM_REF, "hps_0_f2s_sdram_ref_clk-clk");
    9293}
     94#endif
    9395
    9496void bsp_start(void)
    9597{
     98#ifdef BSP_FDT_IS_SUPPORTED
    9699  update_clocks();
     100#endif
    97101  bsp_interrupt_initialize();
    98102  rtems_cache_coherent_add_area(
  • c/src/lib/libbsp/arm/altera-cyclone-v/configure.ac

    r3d65f45 r43fbb50f  
    2727RTEMS_BSPOPTS_SET([BSP_INSTRUCTION_CACHE_ENABLED],[*],[1])
    2828RTEMS_BSPOPTS_HELP([BSP_INSTRUCTION_CACHE_ENABLED],[enable instruction cache])
     29
     30RTEMS_BSPOPTS_SET([BSP_FDT_IS_SUPPORTED],[*],[1])
     31RTEMS_BSPOPTS_HELP([BSP_FDT_IS_SUPPORTED],[define if FDT is supported])
    2932
    3033RTEMS_BSPOPTS_SET([BSP_START_COPY_FDT_FROM_U_BOOT],[*],[1])
Note: See TracChangeset for help on using the changeset viewer.