tdc: coding style stuff

Signed-off-by: Samuel Iglesias Gonsálvez's avatarSamuel Iglesias Gonsálvez <siglesias@igalia.com>
parent 00e7a3c3
......@@ -28,11 +28,11 @@
#define TDC_DMA_NEXT_H_R 0x1C
#define TDC_DMA_ATTRIB_R 0x20
#define TDC_DMA_STAT_IDLE BIT(0)
#define TDC_DMA_STAT_DONE BIT(1)
#define TDC_DMA_STAT_BUSY BIT(2)
#define TDC_DMA_STAT_ERR BIT(3)
#define TDC_DMA_STAT_ABORT BIT(4)
#define TDC_DMA_STAT_IDLE BIT(0)
#define TDC_DMA_STAT_DONE BIT(1)
#define TDC_DMA_STAT_BUSY BIT(2)
#define TDC_DMA_STAT_ERR BIT(3)
#define TDC_DMA_STAT_ABORT BIT(4)
/* ACAM GPX chip registers available */
#define TDC_ACAM_CFG_REG_0 0x20000
......@@ -103,10 +103,10 @@
#define TDC_MEZZANINE_1WIRE 0x80000
/* Constants */
#define TDC_CHAN_NUMBER 5
#define TDC_CHAN_NUMBER 5
#define TDC_EVENT_BUFFER_SIZE 256
#define TDC_EVENT_CHANNEL_MASK 0x3
#define TDC_EVENT_DACAPO_FLAG BIT(0)
#define TDC_EVENT_BUFFER_SIZE 256
#define TDC_EVENT_CHANNEL_MASK 0x3
#define TDC_EVENT_DACAPO_FLAG BIT(0)
#endif /* __TDC_REGISTERS_H */
......@@ -37,6 +37,7 @@ static void tdc_fmc_gennum_setup_local_clock(struct spec_tdc *tdc, int freq)
/* Setup local clock */
divot = 800/freq - 1;
data = 0xE001F00C + (divot << 4);
/* FIXME: Now setup for 160 MHz directly. */
writel(0x0001F04C, tdc->gn412x_regs + TDC_PCI_CLK_CSR);
}
......@@ -89,7 +90,6 @@ static void tdc_fmc_irq_work(struct work_struct *work)
int ret, dacapo_flag, count, rd_ptr, chan;
struct tdc_event *events, *tmp_data;
/* TODO: change the size of the tdc buffer for a constant with a proper value */
events = kzalloc(TDC_EVENT_BUFFER_SIZE*sizeof(struct tdc_event), GFP_KERNEL);
if(!events) {
pr_err("error allocating memory for the events\n");
......@@ -115,7 +115,6 @@ static void tdc_fmc_irq_work(struct work_struct *work)
wait_event(fmc_wait_dma, atomic_read(&fmc_dma_end));
/* DMA happened */
atomic_set(&fmc_dma_end, 0);
/* Check the status of the DMA */
if(readl(tdc->base + TDC_DMA_STAT_R) & (TDC_DMA_STAT_ERR | TDC_DMA_STAT_ABORT))
goto dma_out;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment