summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/beagle/include/i2c.h
diff options
context:
space:
mode:
authorBen Gras <beng@shrike-systems.com>2014-11-03 19:53:40 +0100
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-11-03 14:19:47 -0600
commit53dd6d6130c870d12351d8ca75e4ac9dcc834c86 (patch)
tree022804b833f8fdb47a15ab8940743f91726776b5 /c/src/lib/libbsp/arm/beagle/include/i2c.h
parentAdded BeagleBoard BSP (diff)
downloadrtems-53dd6d6130c870d12351d8ca75e4ac9dcc834c86.tar.bz2
BSP for several Beagle products
Specifically the beagleboard, beagleboard xM, beaglebone, beaglebone black. More info on these targets: http://www.beagleboard.org/ This commit forms a basic BSP by combining Claas's work with . new clock and irq code and definitions for beagle targets (beagleboard and beaglebones), mostly reused from the Minix codebase, thus making irqs, ticks and non-polled console mode work too . new timer code for ns timing with high timer resolution, 24MHz on the AM335X and 13MHz on the DM37XX . select the console uart based on target at configure time . removing all the lpc32xx-specific macros and code and other unused code and definitions that the beagle bsp was based on . re-using some standard functions instead of lpc32xx versions . fixed some whitespace problem in preinstall.am . fixed some compile warnings . configure MMU: set 1MB sections directly in the TTBR, just to show the difference between cacheable RAM and non-cacheable device memory and invalid ranges; this lets us turn on caches and not rely on boot loader MMU configuration. Verified to work when MMU is initially either on or off when RTEMS gets control. Thanks for testing, commentary, improvements and fixes to Chris Johns, Brandon Matthews, Matt Carberry, Romain Bornet, AZ technology and others. Signed-Off-By: Ben Gras <beng@shrike-systems.com>
Diffstat (limited to 'c/src/lib/libbsp/arm/beagle/include/i2c.h')
-rw-r--r--c/src/lib/libbsp/arm/beagle/include/i2c.h89
1 files changed, 2 insertions, 87 deletions
diff --git a/c/src/lib/libbsp/arm/beagle/include/i2c.h b/c/src/lib/libbsp/arm/beagle/include/i2c.h
index 59b9364aba..dbd066a984 100644
--- a/c/src/lib/libbsp/arm/beagle/include/i2c.h
+++ b/c/src/lib/libbsp/arm/beagle/include/i2c.h
@@ -1,7 +1,7 @@
/**
* @file
*
- * @ingroup beagle_i2c
+ * @ingroup arm_beagle
*
* @brief I2C support API.
*/
@@ -25,7 +25,7 @@
#include <rtems.h>
-#include <bsp/beagle.h>
+#include <bsp.h>
#ifdef __cplusplus
extern "C" {
@@ -215,89 +215,6 @@ static int imw ( unsigned char chip, unsigned long addr, unsigned char byte );
static int imd( unsigned char chip, unsigned int addr, unsigned int length );
/**
- * @defgroup beagle_i2c I2C Support
- *
- * @ingroup beagle
- *
- * @brief I2C Support
- *
- * All writes and reads will be performed in master mode. Exclusive bus access
- * will be assumed.
- *
- * @{
- */
-
-/**
- * @name I2C Clock Control Register (I2CCLK_CTRL)
- *
- * @{
- */
-
-//#define I2CCLK_1_EN BSP_BIT32(0)
-//#define I2CCLK_2_EN BSP_BIT32(1)
-//#define I2CCLK_1_HIGH_DRIVE BSP_BIT32(2)
-//#define I2CCLK_2_HIGH_DRIVE BSP_BIT32(3)
-//#define I2CCLK_USB_HIGH_DRIVE BSP_BIT32(4)
-
-/** @} */
-
-/**
- * @name I2C TX Data FIFO Register (I2Cn_TX)
- *
- * @{
- */
-
-//#define I2C_TX_READ BSP_BIT32(0)
-//#define I2C_TX_ADDR(val) BSP_FLD32(val, 1, 7)
-//#define I2C_TX_START BSP_BIT32(8)
-//#define I2C_TX_STOP BSP_BIT32(9)
-
-/** @} */
-
-/**
- * @name I2C Status Register (I2Cn_STAT)
- *
- * @{
- */
-
-//#define I2C_STAT_TDI BSP_BIT32(0)
-//#define I2C_STAT_AFI BSP_BIT32(1)
-//#define I2C_STAT_NAI BSP_BIT32(2)
-//#define I2C_STAT_DRMI BSP_BIT32(3)
-//#define I2C_STAT_DRSI BSP_BIT32(4)
-//#define I2C_STAT_ACTIVE BSP_BIT32(5)
-//#define I2C_STAT_SCL BSP_BIT32(6)
-//#define I2C_STAT_SDA BSP_BIT32(7)
-//#define I2C_STAT_RFF BSP_BIT32(8)
-//#define I2C_STAT_RFE BSP_BIT32(9)
-//#define I2C_STAT_TFF BSP_BIT32(10)
-//#define I2C_STAT_TFE BSP_BIT32(11)
-//#define I2C_STAT_TFFS BSP_BIT32(12)
-//#define I2C_STAT_TFES BSP_BIT32(13)
-
-/** @} */
-
-/**
- * @name I2C Control Register (I2Cn_CTRL)
- *
- * @{
- */
-
-//#define I2C_CTRL_TDIE BSP_BIT32(0)
-//#define I2C_CTRL_AFIE BSP_BIT32(1)
-//#define I2C_CTRL_NAIE BSP_BIT32(2)
-//#define I2C_CTRL_DRMIE BSP_BIT32(3)
-//#define I2C_CTRL_DRSIE BSP_BIT32(4)
-//#define I2C_CTRL_RFFIE BSP_BIT32(5)
-//#define I2C_CTRL_RFDAIE BSP_BIT32(6)
-//#define I2C_CTRL_TFFIO BSP_BIT32(7)
-//#define I2C_CTRL_RESET BSP_BIT32(8)
-//#define I2C_CTRL_SEVEN BSP_BIT32(9)
-//#define I2C_CTRL_TFFSIE BSP_BIT32(10)
-
-/** @} */
-
-/**
* @brief Initializes the I2C module @a i2c.
*
* Valid @a clock_in_hz values are 100000 and 400000.
@@ -444,8 +361,6 @@ static inline rtems_status_code beagle_i2c_read(
return beagle_i2c_write_and_read(i2c, addr, NULL, 0, in, in_size);
}
-/** @} */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */