Module Name: src Committed By: jmcneill Date: Tue Sep 9 22:44:32 UTC 2014
Modified Files: src/sys/dev/i2c: files.i2c gttwsireg.h Log Message: AllWinner implementation uses a different register layout, select it with options GTTWSI_ALLWINNER To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/dev/i2c/files.i2c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/gttwsireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/i2c/files.i2c diff -u src/sys/dev/i2c/files.i2c:1.54 src/sys/dev/i2c/files.i2c:1.55 --- src/sys/dev/i2c/files.i2c:1.54 Sun May 18 11:46:23 2014 +++ src/sys/dev/i2c/files.i2c Tue Sep 9 22:44:32 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.i2c,v 1.54 2014/05/18 11:46:23 kardel Exp $ +# $NetBSD: files.i2c,v 1.55 2014/09/09 22:44:32 jmcneill Exp $ obsolete defflag opt_i2cbus.h I2C_SCAN define i2cbus { } @@ -54,6 +54,7 @@ define motoi2c file dev/i2c/motoi2c.c motoi2c define mvi2c file dev/i2c/gttwsi_core.c mvi2c +defflag opt_gttwsi.h GTTWSI_ALLWINNER # # I2C client devices Index: src/sys/dev/i2c/gttwsireg.h diff -u src/sys/dev/i2c/gttwsireg.h:1.1 src/sys/dev/i2c/gttwsireg.h:1.2 --- src/sys/dev/i2c/gttwsireg.h:1.1 Fri Sep 6 00:56:12 2013 +++ src/sys/dev/i2c/gttwsireg.h Tue Sep 9 22:44:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: gttwsireg.h,v 1.1 2013/09/06 00:56:12 matt Exp $ */ +/* $NetBSD: gttwsireg.h,v 1.2 2014/09/09 22:44:32 jmcneill Exp $ */ /* * Copyright (c) 2008 Eiji Kawauchi. @@ -27,8 +27,19 @@ #ifndef _GTTWSIREG_H_ #define _GTTWSIREG_H_ +#include "opt_gttwsi.h" + #define GTTWSI_SIZE 0x100 +#if defined(GTTWSI_ALLWINNER) +#define TWSI_SLAVEADDR 0x00 +#define TWSI_EXTEND_SLAVEADDR 0x04 +#define TWSI_DATA 0x08 +#define TWSI_CONTROL 0x0c +#define TWSI_STATUS 0x10 +#define TWSI_BAUDRATE 0x14 +#define TWSI_SOFTRESET 0x1c +#else #define TWSI_SLAVEADDR 0x00 #define TWSI_EXTEND_SLAVEADDR 0x10 #define TWSI_DATA 0x04 @@ -36,6 +47,7 @@ #define TWSI_STATUS 0x0c /* for read */ #define TWSI_BAUDRATE 0x0c /* for write */ #define TWSI_SOFTRESET 0x1c +#endif #define SLAVEADDR_GCE_MASK 0x01 #define SLAVEADDR_SADDR_MASK 0xfe