Skip to content

Commit

Permalink
adc: adapts irq static macro calls
Browse files Browse the repository at this point in the history
Adapts IRQ macro calls for the new IRQ static support convention
on ARC.

The new IRQ_CONNECT macro requires to receive the irq numbers without
parenthesis around. This is needed to execute preprocesor substitution
correctly.

Change-Id: I318cb7916b6c3ff3a92b4d2e5a13379f8eed0b4e
Signed-off-by: Juan Manuel Cruz <[email protected]>
  • Loading branch information
jmcruzal authored and nashif committed Feb 6, 2016
1 parent b51b3da commit 46e79a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions drivers/adc/adc_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <arch/cpu.h>
#include "adc_dw.h"
#include "adc_ss_dw.h"
#include <sw_isr_table.h>

#define ADC_CLOCK_GATE (1 << 31)
#define ADC_STANDBY 0x02
Expand Down Expand Up @@ -320,27 +321,26 @@ DECLARE_DEVICE_INIT_CONFIG(adc_dw_0, /* config name*/

SYS_DEFINE_DEVICE(adc_dw_0, &adc_info_dev_0, SECONDARY,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
struct device *adc_dw_isr_0_device = SYS_GET_DEVICE(adc_dw_0);

IRQ_CONNECT_STATIC(adc_dw_0,
IRQ_CONNECT_STATIC(adc_dw_0_rx,
IO_ADC0_INT_IRQ,
ADC_INT_PRIORITY,
adc_dw_rx_isr,
0);
SYS_GET_DEVICE(adc_dw_0), 0);

IRQ_CONNECT_STATIC(adc_dw_0,
IO_ADC0_INT_IRQ,
IRQ_CONNECT_STATIC(adc_dw_0_err,
IO_ADC0_INT_ERR,
ADC_INT_ERR,
adc_dw_err_isr,
0);
SYS_GET_DEVICE(adc_dw_0), 0);

static void adc_config_0_irq(struct device *dev)
{
struct adc_config *config = dev->config->config_info;

IRQ_CONFIG(adc_dw_rx_isr, config->rx_vector, 0);
IRQ_CONFIG(adc_dw_0_rx, IO_ADC0_INT_IRQ, 0);
irq_enable(config->rx_vector);
IRQ_CONFIG(adc_dw_err_isr, config->err_vector, 0);
IRQ_CONFIG(adc_dw_0_err, IO_ADC0_INT_ERR, 0);
irq_enable(config->err_vector);
}
#endif
4 changes: 2 additions & 2 deletions drivers/adc/adc_dw.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
/* ADC control commands */
#define IO_ADC0_FS (32)
#define IO_ADC0_SE (32)
#define IO_ADC0_INT_ERR (18)
#define IO_ADC0_INT_IRQ (19)
#define IO_ADC0_INT_ERR 18
#define IO_ADC0_INT_IRQ 19

#define IO_ADC_SET_CLK_DIVIDER (0x20)
#define IO_ADC_SET_CONFIG (0x21)
Expand Down

0 comments on commit 46e79a7

Please sign in to comment.