Subversion Repositories HelenOS

Rev

Rev 1896 | Rev 1910 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1896 Rev 1909
Line 34... Line 34...
34
 * @brief   FHC 'reg' and 'ranges' properties handling.
34
 * @brief   FHC 'reg' and 'ranges' properties handling.
35
 *
35
 *
36
 */
36
 */
37
 
37
 
38
#include <genarch/ofw/ofw_tree.h>
38
#include <genarch/ofw/ofw_tree.h>
-
 
39
#include <arch/drivers/fhc.h>
39
#include <arch/memstr.h>
40
#include <arch/memstr.h>
40
#include <func.h>
41
#include <func.h>
41
#include <panic.h>
42
#include <panic.h>
42
#include <macros.h>
43
#include <macros.h>
43
 
44
 
Line 106... Line 107...
106
    }
107
    }
107
   
108
   
108
    return false;
109
    return false;
109
}
110
}
110
 
111
 
-
 
112
bool ofw_fhc_map_interrupts(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, uint32_t interrupt, int *ino)
-
 
113
{
-
 
114
    fhc_t *fhc = NULL;
-
 
115
    if (!node->device) {
-
 
116
        fhc = fhc_init(node);
-
 
117
        if (!fhc)
-
 
118
            return false;
-
 
119
        node->device = fhc;
-
 
120
        central_fhc = fhc;
-
 
121
    }
-
 
122
   
-
 
123
    /*
-
 
124
     * The interrupt controller for the interrupt is the FHC itself.
-
 
125
     */
-
 
126
    fhc_enable_interrupt(fhc, interrupt);
-
 
127
   
-
 
128
    *ino = interrupt;
-
 
129
    return true;
-
 
130
}
-
 
131
 
111
/** @}
132
/** @}
112
 */
133
 */