IRQ_CONNECT_STATIC implementation for x86 platform

In order to simplify x86 interrupt stub creation, each interrupt
controller implements an interrupt stub definition macro.

Add IRQ_CONNECT_STATIC() for static interrupt registration, and
construct the interrupt stubs name from device and interrupt
handler names.

Add IRQ_CONFIG() macro for the interrupt controller configuration.
On x86 platform it programs APIC to associate an IRQ number with
the interupt vector.

Add HPET_TIMER0_INT_PRI parameter to Quark platform header to
make it build correctly.

Change-Id: I24ad25e1aa807ffa63733a27ad882877fcad72af
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
diff --git a/drivers/timer/i8253.c b/drivers/timer/i8253.c
index de1e14f..f08cb0f 100644
--- a/drivers/timer/i8253.c
+++ b/drivers/timer/i8253.c
@@ -116,10 +116,7 @@
 /* interrupt stub memory for irq_connect() */
 
 #ifndef CONFIG_DYNAMIC_INT_STUBS
-extern void *_i8253_interrupt_stub;
-SYS_INT_REGISTER(_i8253_interrupt_stub, PIT_INT_LVL, PIT_INT_PRI);
-#else
-static NANO_CPU_INT_STUB_DECL(_i8253_interrupt_stub);
+IRQ_CONNECT_STATIC(i8253, PIT_INT_LVL, PIT_INT_PRI, _timer_int_handler, 0);
 #endif
 
 static uint16_t __noinit counterLoadVal; /* computed counter */
@@ -497,7 +494,9 @@
 
 	_i8253CounterPeriodic(counterLoadVal);
 
-#ifdef CONFIG_DYNAMIC_INT_STUBS
+#ifndef CONFIG_DYNAMIC_INT_STUBS
+	IRQ_CONFIG(i8253, PIT_INT_LVL);
+#else
 	/* connect specified routine/parameter to PIT interrupt vector */
 
 	(void)irq_connect(PIT_INT_LVL,
@@ -505,6 +504,7 @@
 				_timer_int_handler,
 				0,
 				_i8253_interrupt_stub);
+
 #endif /* CONFIG_DYNAMIC_INT_STUBS */
 
 	_i8253TicklessIdleSkew();