Changeset 05f9858f in rtems


Ignore:
Timestamp:
Sep 13, 2017, 5:00:57 AM (23 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
ea4488ae
Parents:
29919242
git-author:
Sebastian Huber <sebastian.huber@…> (09/13/17 05:00:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/22/17 12:32:37)
Message:

bsps: Generalize bsp_fdt_map_intr()

Pass all interrupt cells to bsp_fdt_map_intr() since some platforms use
an array to describe an interrupt.

Update #3090.

Location:
c/src/lib/libbsp
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/beagle/startup/bspstart.c

    r29919242 r05f9858f  
    3030}
    3131
    32 uint32_t bsp_fdt_map_intr(uint32_t intr)
     32uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
    3333{
    34   return intr;
     34  return intr[0];
    3535}
  • c/src/lib/libbsp/arm/imx/console/console-config.c

    r29919242 r05f9858f  
    8787  val = fdt_getprop(fdt, node, "interrupts", &len);
    8888  if (val != NULL && len >= 8) {
    89     ctx->irq = bsp_fdt_map_intr(fdt32_to_cpu(val[1]));
     89    uint32_t cpu_val[2];
     90    cpu_val[1] = fdt32_to_cpu(val[1]);
     91    ctx->irq = bsp_fdt_map_intr(cpu_val, 2);
    9092  }
    9193#endif
  • c/src/lib/libbsp/arm/imx/startup/bspstart.c

    r29919242 r05f9858f  
    2121#include <libfdt.h>
    2222
    23 uint32_t bsp_fdt_map_intr(uint32_t intr)
     23uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
    2424{
    25   return intr + 32;
     25  return intr[1] + 32;
    2626}
    2727
  • c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c

    r29919242 r05f9858f  
    206206}
    207207
    208 uint32_t bsp_fdt_map_intr(uint32_t intr)
    209 {
    210   return intr - 16;
    211 }
     208uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
     209{
     210  return intr[0] - 16;
     211}
  • c/src/lib/libbsp/shared/include/fdt.h

    r29919242 r05f9858f  
    5454 * method.
    5555 *
    56  * @param[in] intr The FDT interrupt number.
     56 * @param[in] intr The FDT interrupt number cells.
     57 * @param[in] icells The FDT interrupt cell count.
    5758 *
    5859 * @return The interrupt vector of the FDT interrupt number.
    5960 */
    60 uint32_t bsp_fdt_map_intr(uint32_t intr);
     61uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells);
    6162
    6263#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.