Ignore:
Timestamp:
2014-03-15T19:21:53Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c773adc
Parents:
2034f98 (diff), 8cffdf5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/genarch/include/genarch/drivers/grlib/irqmp.h

    r2034f98 rb0b4592e  
    11/*
    2  * Copyright (c) 2011 Petr Koupy
     2 * Copyright (c) 2013 Jakub Klama
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libposix
     29/** @addtogroup genarch
    3030 * @{
    3131 */
    32 /** @file Mathematical operations.
    33  *
    34  * The implementation is provided by a separate library to allow
    35  * switching of the implementations.
     32/**
     33 * @file
     34 * @brief Gaisler GRLIB interrupt controller driver.
    3635 */
    3736
    38 #ifndef LIBC_MATH_H_
    39 #define LIBC_MATH_H_
     37#ifndef KERN_GRLIB_IRQMP_H_
     38#define KERN_GRLIB_IRQMP_H_
    4039
    41 #ifdef __GNUC__
    42         #define HUGE_VAL (__builtin_huge_val())
    43 #endif
     40#include <typedefs.h>
     41#include <arch.h>
    4442
    45 extern double ldexp(double, int);
    46 extern double frexp(double, int *);
     43#define GRLIB_IRQMP_MASK_OFFSET   0x40
     44#define GRLIB_IRQMP_FORCE_OFFSET  0x80
    4745
    48 extern double fabs(double);
    49 extern double floor(double);
    50 extern double ceil(double);
    51 extern double modf(double, double *);
    52 extern double fmod(double, double);
    53 extern double pow(double, double);
    54 extern double exp(double);
    55 extern double expm1(double);
    56 extern double sqrt(double);
    57 extern double log(double);
    58 extern double log10(double);
    59 extern double sin(double);
    60 extern double sinh(double);
    61 extern double asin(double);
    62 extern double asinh(double);
    63 extern double cos(double);
    64 extern double cosh(double);
    65 extern double acos(double);
    66 extern double acosh(double);
    67 extern double tan(double);
    68 extern double tanh(double);
    69 extern double atan(double);
    70 extern double atanh(double);
    71 extern double atan2(double, double);
     46/** IRQMP registers */
     47typedef struct {
     48        uint32_t level;
     49        uint32_t pending;
     50        uint32_t force;
     51        uint32_t clear;
     52        uint32_t mp_status;
     53        uint32_t broadcast;
     54} grlib_irqmp_regs_t;
    7255
    73 double copysign(double, double);
     56/** LEON3 interrupt assignments */
     57enum grlib_irq_source {
     58        GRLIB_INT_AHBERROR = 1,
     59        GRLIB_INT_UART1    = 2,
     60        GRLIB_INT_PCIDMA   = 4,
     61        GRLIB_INT_CAN      = 5,
     62        GRLIB_INT_TIMER0   = 6,
     63        GRLIB_INT_TIMER1   = 7,
     64        GRLIB_INT_TIMER2   = 8,
     65        GRLIB_INT_TIMER3   = 9,
     66        GRLIB_INT_ETHERNET = 14
     67};
     68
     69typedef struct {
     70        grlib_irqmp_regs_t *regs;
     71} grlib_irqmp_t;
     72
     73extern void grlib_irqmp_init(grlib_irqmp_t *, bootinfo_t *);
     74extern int grlib_irqmp_inum_get(grlib_irqmp_t *);
     75extern void grlib_irqmp_clear(grlib_irqmp_t *, unsigned int);
     76extern void grlib_irqmp_mask(grlib_irqmp_t *, unsigned int);
     77extern void grlib_irqmp_unmask(grlib_irqmp_t *, unsigned int);
    7478
    7579#endif
Note: See TracChangeset for help on using the changeset viewer.