forked from Imagelibrary/rtems
libchip/ata: Fix pre-processor symbol evaluation
This commit is contained in:
@@ -33,7 +33,7 @@ bool ata_trace;
|
|||||||
#define ata_printf if (ata_trace) printf
|
#define ata_printf if (ata_trace) printf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
|
#if CPU_SIMPLE_VECTORED_INTERRUPTS != TRUE
|
||||||
#include <rtems/irq.h>
|
#include <rtems/irq.h>
|
||||||
#define ATA_IRQ_CHAIN_MAX_CNT 4 /* support up to 4 ATA devices */
|
#define ATA_IRQ_CHAIN_MAX_CNT 4 /* support up to 4 ATA devices */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -134,7 +134,7 @@ static bool ata_initialized = false;
|
|||||||
static rtems_id ata_task_id;
|
static rtems_id ata_task_id;
|
||||||
static rtems_id ata_queue_id;
|
static rtems_id ata_queue_id;
|
||||||
|
|
||||||
#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
|
#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
|
||||||
/* Mapping of interrupt vectors to devices */
|
/* Mapping of interrupt vectors to devices */
|
||||||
static rtems_chain_control ata_int_vec[ATA_MAX_RTEMS_INT_VEC_NUMBER + 1];
|
static rtems_chain_control ata_int_vec[ATA_MAX_RTEMS_INT_VEC_NUMBER + 1];
|
||||||
#endif
|
#endif
|
||||||
@@ -632,7 +632,7 @@ ata_add_to_controller_queue(rtems_device_minor_number ctrl_minor,
|
|||||||
* RETURNS:
|
* RETURNS:
|
||||||
* NONE
|
* NONE
|
||||||
*/
|
*/
|
||||||
#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
|
#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
|
||||||
static rtems_isr ata_interrupt_handler(rtems_vector_number vec)
|
static rtems_isr ata_interrupt_handler(rtems_vector_number vec)
|
||||||
{
|
{
|
||||||
rtems_chain_node *the_node = rtems_chain_first(&ata_int_vec[vec]);
|
rtems_chain_node *the_node = rtems_chain_first(&ata_int_vec[vec]);
|
||||||
@@ -1153,7 +1153,7 @@ rtems_ata_initialize(rtems_device_major_number major,
|
|||||||
dev_t device;
|
dev_t device;
|
||||||
ata_int_st_t *int_st;
|
ata_int_st_t *int_st;
|
||||||
|
|
||||||
#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
|
#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
|
||||||
rtems_isr_entry old_isr;
|
rtems_isr_entry old_isr;
|
||||||
#else
|
#else
|
||||||
int ata_irq_chain_use;
|
int ata_irq_chain_use;
|
||||||
@@ -1238,7 +1238,7 @@ rtems_ata_initialize(rtems_device_major_number major,
|
|||||||
for (i = 0; i < (2 * IDE_CTRL_MAX_MINOR_NUMBER); i++)
|
for (i = 0; i < (2 * IDE_CTRL_MAX_MINOR_NUMBER); i++)
|
||||||
ata_devs[i].device = ATA_UNDEFINED_VALUE;
|
ata_devs[i].device = ATA_UNDEFINED_VALUE;
|
||||||
|
|
||||||
#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
|
#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
|
||||||
/* prepare ATA driver for handling interrupt driven devices */
|
/* prepare ATA driver for handling interrupt driven devices */
|
||||||
for (i = 0; i < ATA_MAX_RTEMS_INT_VEC_NUMBER; i++)
|
for (i = 0; i < ATA_MAX_RTEMS_INT_VEC_NUMBER; i++)
|
||||||
rtems_chain_initialize_empty(&ata_int_vec[i]);
|
rtems_chain_initialize_empty(&ata_int_vec[i]);
|
||||||
@@ -1278,7 +1278,7 @@ rtems_ata_initialize(rtems_device_major_number major,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int_st->ctrl_minor = ctrl_minor;
|
int_st->ctrl_minor = ctrl_minor;
|
||||||
#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
|
#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
|
||||||
status = rtems_interrupt_catch(
|
status = rtems_interrupt_catch(
|
||||||
ata_interrupt_handler,
|
ata_interrupt_handler,
|
||||||
IDE_Controller_Table[ctrl_minor].int_vec,
|
IDE_Controller_Table[ctrl_minor].int_vec,
|
||||||
@@ -1330,7 +1330,7 @@ rtems_ata_initialize(rtems_device_major_number major,
|
|||||||
rtems_disk_io_done();
|
rtems_disk_io_done();
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
|
#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
|
||||||
rtems_chain_append(
|
rtems_chain_append(
|
||||||
&ata_int_vec[IDE_Controller_Table[ctrl_minor].int_vec],
|
&ata_int_vec[IDE_Controller_Table[ctrl_minor].int_vec],
|
||||||
&int_st->link);
|
&int_st->link);
|
||||||
|
|||||||
Reference in New Issue
Block a user