minor additions

i2c-driver: wait, 'til stop executed
This commit is contained in:
Thomas Doerfler
2008-09-09 13:18:58 +00:00
parent ae52c9c642
commit 39dfbe1621
4 changed files with 30 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2008-09-09 Thomas Doerfler <thomas.doerfler@embedded-brains.de>
* mpc8xx/mpc8xx.h, mpc8xx/timer/timer.c: minor additions
* mpc83xx/i2c/mpc83xx_i2cdrv.c: wait, 'til STOP has been executed
2008-09-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* mpc8xx/clock/clock.c, mpc8xx/console-generic/console-generic.c,
@@ -9,7 +15,7 @@
MPC866 and firends
* mpc8xx/cpm/cp.c: use correct type for interrupt level
2008-09-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* mpc5xx/irq/irq.c, mpc83xx/spi/mpc83xx_spidrv.c,

View File

@@ -424,7 +424,12 @@ static rtems_status_code mpc83xx_i2c_send_stop
printk("mpc83xx_i2c_send_stop called... ");
#endif
softc_ptr->reg_ptr->i2ccr &= ~MPC83XX_I2CCR_MSTA;
/*
* wait, 'til stop has been executed
*/
while (0 != (softc_ptr->reg_ptr->i2csr & MPC83XX_I2CSR_MBB)) {
rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
}
#if defined(DEBUG)
printk("... exit OK\r\n");
#endif

View File

@@ -278,6 +278,23 @@ typedef struct m8xxFECRegisters_ {
#define M8xx_FEC_IMASK_MIIEN (1 << 23)
#define M8xx_FEC_IMASK_EBERREN (1 << 22)
/*
* access macros to write to mii_data register
*/
#define M8xx_FEC_MII_DATA_ST ( 1 << (31- 1))
#define M8xx_FEC_MII_DATA_OP_RD ( 2 << (31- 3))
#define M8xx_FEC_MII_DATA_OP_WR ( 1 << (31- 3))
#define M8xx_FEC_MII_DATA_PHYAD(n) (((n) & 0x3f) << (31- 8))
#define M8xx_FEC_MII_DATA_PHYRA(n) (((n) & 0x3f) << (31-13))
#define M8xx_FEC_MII_DATA_TA ( 2 << (31-15))
#define M8xx_FEC_MII_DATA_WDATA(n) ((n) & 0xffff )
#define M8xx_FEC_MII_DATA_RDATA(reg) ((reg) & 0xffff )
/*
* bits for FEC X_CNTRL register
*/
#define M8xx_FEC_X_CNTRL_FDEN ( 1 << (31-29))
#define M8xx_FEC_X_CNTRL_HBC ( 1 << (31-30))
#define M8xx_FEC_X_CNTRL_GTS ( 1 << (31-31))
/*
*************************************************************************
* Miscellaneous Parameters *

View File

@@ -82,7 +82,6 @@ int benchmark_timer_read(void)
if ( benchmark_timer_find_average_overhead == 1 )
return total; /* in XXX microsecond units */
else {
if ( total < bsp_timer_least_valid ) {
return 0; /* below timer resolution */