Skip to content
Snippets Groups Projects
Commit a9c20d2c authored by Armin Luntzer's avatar Armin Luntzer
Browse files

add config compile options for backend calls

parent b6aec461
No related branches found
No related tags found
No related merge requests found
......@@ -192,11 +192,18 @@ static inline unsigned long leon_get_fp(void)
}
/* XXX need to make sure this trap is installed */
__attribute__((unused))
#ifdef CONFIG_ARCH_CUSTOM_BOOT_CODE
#include <kernel/printk.h>
#endif
static inline void leon_reg_win_flush(void)
{
#ifdef CONFIG_ARCH_CUSTOM_BOOT_CODE
pr_warn("NOT IMPLEMENTED: leon_reg_win_flush() %s:%d\n", __FILE__, __LINE__);
#else
/* BCC/libgloss provide such functionality via SW trap 3 */
__asm__ __volatile__("ta 3");
#endif /* CONFIG_ARCH_CUSTOM_BOOT_CODE */
}
......
......@@ -263,8 +263,10 @@ static struct sobj_attribute *eirl_attributes[] = {
#endif /* CONFIG_IRQ_STATS_COLLECT */
/* XXX we use BCC's libgloss implementation for now */
#ifndef CONFIG_ARCH_CUSTOM_BOOT_CODE
/* provided by BCC's libgloss */
extern int catch_interrupt (int func, int irq);
#endif /* CONFIG_ARCH_CUSTOM_BOOT_CODE */
/**
......@@ -470,7 +472,7 @@ void leon_irq_queue_execute(void)
*
* XXX maybe we want to keep acking IRQs as in eirq_dispatch...
*/
__attribute__((unused))
static int leon_irq_dispatch(unsigned int irq)
{
struct irl_vector_elem *p_elem;
......@@ -501,7 +503,7 @@ static int leon_irq_dispatch(unsigned int irq)
*
* @note handler return codes ignored for now
*/
__attribute__((unused))
static int leon_eirq_dispatch(unsigned int irq)
{
unsigned int eirq;
......@@ -626,8 +628,15 @@ int irl_register_handler(unsigned int irq,
leon_enable_irq(irq, 0);
#endif /* CONFIG_LEON2 */
/* XXX this is the call to whatever the low level handler is */
/* here goes the call to whatever the low level handler is */
#ifdef CONFIG_ARCH_CUSTOM_BOOT_CODE
pr_warn("NOT IMPLEMENTED: catch_interrupt() %s:%d\n", __FILE__, __LINE__);
return -1;
#else
/* provided by BCC/libgloss */
return catch_interrupt(((int) leon_irq_dispatch), irq);
#endif /* CONFIG_ARCH_CUSTOM_BOOT_CODE */
}
......@@ -908,8 +917,12 @@ static void leon_setup_eirq(void)
}
leon_eirq = eirq;
#ifdef CONFIG_ARCH_CUSTOM_BOOT_CODE
pr_warn("NOT IMPLEMENTED: catch_interrupt() %s:%d\n", __FILE__, __LINE__);
#else
/* provided by BCC/libgloss */
BUG_ON(catch_interrupt((int) leon_eirq_dispatch, leon_eirq));
#endif /* CONFIG_ARCH_CUSTOM_BOOT_CODE */
#ifdef CONFIG_LEON3
/* XXX for now, just register to the current CPU */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment