2008-08-28 Till Straumann <strauman@slac.stanford.edu>

* vmeUniverse/vmeTsi148.h, vmeUniverse/vmeTsi148.c:
	added vmeTsi148ResetBusXX(), vmeTsi148ResetBus().
This commit is contained in:
Till Straumann
2008-08-28 15:38:07 +00:00
parent 183e5cf0b8
commit 231680a692
4 changed files with 54 additions and 2 deletions

View File

@@ -1,3 +1,12 @@
2008-08-28 Till Straumann <strauman@slac.stanford.edu>
* vmeUniverse/vmeTsi148.h, vmeUniverse/vmeTsi148.c:
added vmeTsi148ResetBusXX(), vmeTsi148ResetBus().
2008-08-28 Till Straumann <strauman@slac.stanford.edu>
* vmeUniverse/VME.h: added BSP_VMEResetBus().
2008-08-20 Sebastian Huber <sebastian.huber@embedded-brains.de>
* src/irq-generic.c: Fixed integer conversion warnings.

View File

@@ -110,4 +110,8 @@ BSP_VMEOutboundPortsShow(FILE *f);
void
BSP_VMEInboundPortsShow(FILE *f);
/* Assert VME SYSRESET */
void
BSP_VMEResetBus(void);
#endif

View File

@@ -168,6 +168,18 @@
# define TSI_VMCTRL_VREQL_MSK (3<< 0)
# define TSI_VMCTRL_VREQL(x) ((x)&3)
#define TSI_VCTRL_REG 0x238
#define TSI_VCTRL_DLT_MSK (0xf<<24)
#define TSI_VCTRL_NELBB (1<<20)
#define TSI_VCTRL_SRESET (1<<17)
#define TSI_VCTRL_LRESET (1<<16)
#define TSI_VCTRL_SFAILAI (1<<15)
#define TSI_VCTRL_BID_MSK (0x1f<<8)
#define TSI_VCTRL_ATOEN (1<< 7)
#define TSI_VCTRL_ROBIN (1<< 6)
#define TSI_VCTRL_GTO_MSK (7<< 0)
#define TSI_VSTAT_REG 0x23c
# define TSI_VSTAT_CPURST (1<<15) /* clear power-up reset bit */
# define TSI_VSTAT_BDFAIL (1<<14)
@@ -530,6 +542,25 @@ vmeTsi148Reset()
vmeTsi148ResetXX(THEBASE);
}
void
vmeTsi148ResetBusXX(BERegister *base)
{
unsigned long flags;
uint32_t v;
rtems_interrupt_disable(flags);
v = TSI_RD(base, TSI_VCTRL_REG);
TSI_WR(base, TSI_VCTRL_REG, v | TSI_VCTRL_SRESET);
rtems_interrupt_enable(flags);
}
void
vmeTsi148ResetBus(void)
{
vmeTsi148ResetBusXX(THEBASE);
}
/* convert an address space selector to a corresponding
* Tsi148 control mode word
*/

View File

@@ -108,16 +108,24 @@ vmeTsi148InitInstance(unsigned instance);
int
vmeTsi148Init(void);
/* setup the tsi148 chip, i.e. disable most of its
/* Setup the tsi148 chip, i.e. disable most of its
* mappings, reset interrupts etc.
*/
void
vmeTsi148ResetXX(BERegister *base);
/* setup the tsi148 connected to the first driver slot */
/* Setup the tsi148 connected to the first driver slot */
void
vmeTsi148Reset();
/* Pull VME SYSRESET line */
void
vmeTsi148ResetBusXX(BERegister *base);
/* Pull VME SYSRESET line of the 1st controller */
void
vmeTsi148ResetBus(void);
/* NOTE: all non-'XX' versions of driver entry points which
* have an associated 'XX' entry point operate on the
* device connected to the 1st driver slot.