diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-12-12 09:31:17 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-12-12 09:31:17 -0600 |
commit | 2066928f1b7e0393d52f7f7b675d87176c9f726f (patch) | |
tree | 24417342ab0a2c3e66eab6f452919b9bbb08fe2b /nuttx | |
parent | 64ab3a4292d7ae5171cb12f3d314495396bb5f6e (diff) | |
download | nuttx-2066928f1b7e0393d52f7f7b675d87176c9f726f.tar.gz nuttx-2066928f1b7e0393d52f7f7b675d87176c9f726f.tar.bz2 nuttx-2066928f1b7e0393d52f7f7b675d87176c9f726f.zip |
Tiva I2C: Legacy mode reset logic ommitted in last commit
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/arch/arm/src/tiva/tiva_i2c.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/tiva/tiva_i2c.c b/nuttx/arch/arm/src/tiva/tiva_i2c.c index 3440d5824..4e3838b25 100644 --- a/nuttx/arch/arm/src/tiva/tiva_i2c.c +++ b/nuttx/arch/arm/src/tiva/tiva_i2c.c @@ -194,7 +194,7 @@ struct tiva_i2c_config_s #ifndef TIVA_SYSCON_RCGCI2C uint32_t rcgbit; /* Bit in the RCG1 register to enable clocking */ #endif -#ifndef TIVA_SYSCON_RCGCI2C +#ifndef TIVA_SYSCON_SRI2C uint32_t rstbit; /* Bit in the SRCR1 register to reset I2C */ #endif uint32_t scl_pin; /* GPIO configuration for SCL as SCL */ @@ -355,6 +355,9 @@ static const struct tiva_i2c_config_s tiva_i2c0_config = #ifndef TIVA_SYSCON_RCGCI2C .rcgbit = SYSCON_RCGC1_I2C0, #endif +#ifndef TIVA_SYSCON_SRI2C + .rstbit = SYSCON_SRCR1_I2C0, +#endif .scl_pin = GPIO_I2C0_SCL, .sda_pin = GPIO_I2C0_SDA, #ifndef CONFIG_I2C_POLLED @@ -374,6 +377,9 @@ static const struct tiva_i2c_config_s tiva_i2c1_config = #ifndef TIVA_SYSCON_RCGCI2C .rcgbit = SYSCON_RCGC1_I2C1, #endif +#ifndef TIVA_SYSCON_SRI2C + .rstbit = SYSCON_SRCR1_I2C1, +#endif .scl_pin = GPIO_I2C1_SCL, .sda_pin = GPIO_I2C1_SDA, #ifndef CONFIG_I2C_POLLED @@ -393,6 +399,9 @@ static const struct tiva_i2c_config_s tiva_i2c2_config = #ifndef TIVA_SYSCON_RCGCI2C .rcgbit = SYSCON_RCGC1_I2C2, #endif +#ifndef TIVA_SYSCON_SRI2C + .rstbit = SYSCON_SRCR1_I2C2, +#endif .scl_pin = GPIO_I2C2_SCL, .sda_pin = GPIO_I2C2_SDA, #ifndef CONFIG_I2C_POLLED @@ -412,6 +421,9 @@ static const struct tiva_i2c_config_s tiva_i2c3_config = #ifndef TIVA_SYSCON_RCGCI2C .rcgbit = SYSCON_RCGC1_I2C3, #endif +#ifndef TIVA_SYSCON_SRI2C + .rstbit = SYSCON_SRCR1_I2C3, +#endif .scl_pin = GPIO_I2C3_SCL, .sda_pin = GPIO_I2C3_SDA, #ifndef CONFIG_I2C_POLLED @@ -431,6 +443,9 @@ static const struct tiva_i2c_config_s tiva_i2c4_config = #ifndef TIVA_SYSCON_RCGCI2C .rcgbit = SYSCON_RCGC1_I2C4, #endif +#ifndef TIVA_SYSCON_SRI2C + .rstbit = SYSCON_SRCR1_I2C4, +#endif .scl_pin = GPIO_I2C4_SCL, .sda_pin = GPIO_I2C4_SDA, #ifndef CONFIG_I2C_POLLED @@ -450,6 +465,9 @@ static const struct tiva_i2c_config_s tiva_i2c5_config = #ifndef TIVA_SYSCON_RCGCI2C .rcgbit = SYSCON_RCGC1_I2C5, #endif +#ifndef TIVA_SYSCON_SRI2C + .rstbit = SYSCON_SRCR1_I2C5, +#endif .scl_pin = GPIO_I2C5_SCL, .sda_pin = GPIO_I2C5_SDA, #ifndef CONFIG_I2C_POLLED @@ -1483,7 +1501,7 @@ static int tiva_i2c_initialize(struct tiva_i2c_priv_s *priv, uint32_t frequency) modifyreg32(TIVA_SYSCON_SRI2C, SYSCON_SRI2C(config->devno), 0); #else modifyreg32(TIVA_SYSCON_SRCR1, 0, priv->rstbit); - modifyreg32(TIVA_SYSCON_SRCR1, 0, priv->rstbit); + modifyreg32(TIVA_SYSCON_SRCR1, priv->rstbit, 0); #endif /* Configure pins */ |