Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] IP32 Fix and complete IP32 parport definitions Fix, complete, and indent IP32 parport definitions. Definition were wrong for CTXINUSE and DMACTIVE (1-bit shift). Add macros DATA_BOUND, DATALEN_SHIFT, and CTRSHIFT. Signed-off-by: Arnaud Giersch <arnaud.giersch@free.fr> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Arnaud Giersch and committed by
Ralf Baechle
84c493d8 19ce1cfb

+26 -16
+26 -16
include/asm-mips/ip32/mace.h
··· 150 150 151 151 /* register definitions for parallel port DMA */ 152 152 struct mace_parport { 153 - /* 0 - do nothing, 1 - pulse terminal count to the device after buffer is drained */ 154 - #define MACEPAR_CONTEXT_LASTFLAG BIT(63) 155 - /* Should not cross 4K page boundary */ 156 - #define MACEPAR_CONTEXT_DATALEN_MASK 0xfff00000000 157 - /* Can be arbitrarily aligned on any byte boundary on output, 64 byte aligned on input */ 158 - #define MACEPAR_CONTEXT_BASEADDR_MASK 0xffffffff 153 + /* 0 - do nothing, 154 + * 1 - pulse terminal count to the device after buffer is drained */ 155 + #define MACEPAR_CONTEXT_LASTFLAG BIT(63) 156 + /* Should not cross 4K page boundary */ 157 + #define MACEPAR_CONTEXT_DATA_BOUND 0x0000000000001000UL 158 + #define MACEPAR_CONTEXT_DATALEN_MASK 0x00000fff00000000UL 159 + #define MACEPAR_CONTEXT_DATALEN_SHIFT 32 160 + /* Can be arbitrarily aligned on any byte boundary on output, 161 + * 64 byte aligned on input */ 162 + #define MACEPAR_CONTEXT_BASEADDR_MASK 0x00000000ffffffffUL 159 163 volatile u64 context_a; 160 164 volatile u64 context_b; 161 - #define MACEPAR_CTLSTAT_DIRECTION BIT(0) /* 0 - mem->device, 1 - device->mem */ 162 - #define MACEPAR_CTLSTAT_ENABLE BIT(1) /* 0 - channel frozen, 1 - channel enabled */ 163 - #define MACEPAR_CTLSTAT_RESET BIT(2) /* 0 - channel active, 1 - complete channel reset */ 164 - #define MACEPAR_CTLSTAT_CTXB_VALID BIT(3) 165 - #define MACEPAR_CTLSTAT_CTXA_VALID BIT(4) 166 - volatile u64 cntlstat; /* Control/Status register */ 167 - #define MACEPAR_DIAG_CTXINUSE BIT(1) 168 - #define MACEPAR_DIAG_DMACTIVE BIT(2) /* 1 - Dma engine is enabled and processing something */ 169 - #define MACEPAR_DIAG_CTRMASK 0x3ffc /* Counter of bytes left */ 170 - volatile u64 diagnostic; /* RO: diagnostic register */ 165 + /* 0 - mem->device, 1 - device->mem */ 166 + #define MACEPAR_CTLSTAT_DIRECTION BIT(0) 167 + /* 0 - channel frozen, 1 - channel enabled */ 168 + #define MACEPAR_CTLSTAT_ENABLE BIT(1) 169 + /* 0 - channel active, 1 - complete channel reset */ 170 + #define MACEPAR_CTLSTAT_RESET BIT(2) 171 + #define MACEPAR_CTLSTAT_CTXB_VALID BIT(3) 172 + #define MACEPAR_CTLSTAT_CTXA_VALID BIT(4) 173 + volatile u64 cntlstat; /* Control/Status register */ 174 + #define MACEPAR_DIAG_CTXINUSE BIT(0) 175 + /* 1 - Dma engine is enabled and processing something */ 176 + #define MACEPAR_DIAG_DMACTIVE BIT(1) 177 + /* Counter of bytes left */ 178 + #define MACEPAR_DIAG_CTRMASK 0x0000000000003ffcUL 179 + #define MACEPAR_DIAG_CTRSHIFT 2 180 + volatile u64 diagnostic; /* RO: diagnostic register */ 171 181 }; 172 182 173 183 /* ISA Control and DMA registers */