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

arcnet: Add com9026.h to standardize COM9026_REG_<foo>

Deduplicate the COM9026 registers.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

authored by

Joe Perches and committed by
Michael Grzeschik
8e0f295e e15b0362

+21 -34
+1 -12
drivers/net/arcnet/arc-rimi.c
··· 39 39 #include <linux/io.h> 40 40 41 41 #include "arcdevice.h" 42 + #include "com9026.h" 42 43 43 44 /* Internal function declarations */ 44 45 ··· 59 58 /* Amount of I/O memory used by the card */ 60 59 #define BUFFER_SIZE (512) 61 60 #define MIRROR_SIZE (BUFFER_SIZE * 4) 62 - 63 - /* COM 9026 controller chip --> ARCnet register addresses */ 64 - #define COM9026_REG_W_INTMASK 0 /* writable */ 65 - #define COM9026_REG_R_STATUS 0 /* readable */ 66 - #define COM9026_REG_W_COMMAND 1 /* writable, returns random vals on read (?) */ 67 - #define COM9026_REG_RW_CONFIG 2 /* Configuration register */ 68 - #define COM9026_REG_R_RESET 8 /* software reset (on read) */ 69 - #define COM9026_REG_RW_MEMDATA 12 /* Data port for IO-mapped memory */ 70 - #define COM9026_REG_W_ADDR_LO 14 /* Control registers for said */ 71 - #define COM9026_REG_W_ADDR_HI 15 72 - 73 - #define COM9026_REG_R_STATION 1 /* Station ID */ 74 61 75 62 /* We cannot probe for a RIM I card; one reason is I don't know how to reset 76 63 * them. In fact, we can't even get their node ID automatically. So, we
+1
drivers/net/arcnet/arcnet.c
··· 53 53 #include <linux/jiffies.h> 54 54 55 55 #include "arcdevice.h" 56 + #include "com9026.h" 56 57 57 58 /* "do nothing" functions for protocol drivers */ 58 59 static void null_rx(struct net_device *dev, int bufnum,
+17
drivers/net/arcnet/com9026.h
··· 1 + #ifndef __COM9026_H 2 + #define __COM9026_H 3 + 4 + /* COM 9026 controller chip --> ARCnet register addresses */ 5 + 6 + #define COM9026_REG_W_INTMASK 0 /* writable */ 7 + #define COM9026_REG_R_STATUS 0 /* readable */ 8 + #define COM9026_REG_W_COMMAND 1 /* writable, returns random vals on read (?) */ 9 + #define COM9026_REG_RW_CONFIG 2 /* Configuration register */ 10 + #define COM9026_REG_R_RESET 8 /* software reset (on read) */ 11 + #define COM9026_REG_RW_MEMDATA 12 /* Data port for IO-mapped memory */ 12 + #define COM9026_REG_W_ADDR_LO 14 /* Control registers for said */ 13 + #define COM9026_REG_W_ADDR_HI 15 14 + 15 + #define COM9026_REG_R_STATION 1 /* Station ID */ 16 + 17 + #endif
+1 -10
drivers/net/arcnet/com90io.c
··· 40 40 #include <linux/io.h> 41 41 42 42 #include "arcdevice.h" 43 + #include "com9026.h" 43 44 44 45 /* Internal function declarations */ 45 46 ··· 58 57 59 58 /* The number of low I/O ports used by the card. */ 60 59 #define ARCNET_TOTAL_SIZE 16 61 - 62 - /* COM 9026 controller chip --> ARCnet register addresses */ 63 - #define COM9026_REG_W_INTMASK 0 /* writable */ 64 - #define COM9026_REG_R_STATUS 0 /* readable */ 65 - #define COM9026_REG_W_COMMAND 1 /* writable, returns random vals on read (?) */ 66 - #define COM9026_REG_RW_CONFIG 2 /* Configuration register */ 67 - #define COM9026_REG_R_RESET 8 /* software reset (on read) */ 68 - #define COM9026_REG_RW_MEMDATA 12 /* Data port for IO-mapped memory */ 69 - #define COM9026_REG_W_ADDR_LO 14 /* Control registers for said */ 70 - #define COM9026_REG_W_ADDR_HI 15 71 60 72 61 /**************************************************************************** 73 62 * *
+1 -12
drivers/net/arcnet/com90xx.c
··· 38 38 #include <linux/io.h> 39 39 40 40 #include "arcdevice.h" 41 + #include "com9026.h" 41 42 42 43 /* Define this to speed up the autoprobe by assuming if only one io port and 43 44 * shmem are left in the list at Stage 5, they must correspond to each ··· 78 77 /* Amount of I/O memory used by the card */ 79 78 #define BUFFER_SIZE (512) 80 79 #define MIRROR_SIZE (BUFFER_SIZE * 4) 81 - 82 - /* COM 9026 controller chip --> ARCnet register addresses */ 83 - #define COM9026_REG_W_INTMASK 0 /* writable */ 84 - #define COM9026_REG_R_STATUS 0 /* readable */ 85 - #define COM9026_REG_W_COMMAND 1 /* writable, returns random vals on read (?) */ 86 - #define COM9026_REG_RW_CONFIG 2 /* Configuration register */ 87 - #define COM9026_REG_R_RESET 8 /* software reset (on read) */ 88 - #define COM9026_REG_RW_MEMDATA 12 /* Data port for IO-mapped memory */ 89 - #define COM9026_REG_W_ADDR_LO 14 /* Control registers for said */ 90 - #define COM9026_REG_W_ADDR_HI 15 91 - 92 - #define COM9026_REG_R_STATION 1 /* Station ID */ 93 80 94 81 static int com90xx_skip_probe __initdata = 0; 95 82