To: | |
---|---|
Subject: | Re: [ts-7000] Re: On using the PC-104 bus of a TS7800 board |
From: | Bill Whiteley <> |
Date: | Thu, 29 Jan 2009 10:04:06 -0500 |
It sounds like you are already doing this correctly, but below is the function that I use to enable the PC104 bus on the 7800 to access expansion boards. It is part of a larger class but I think clearly demonstrates how to convert the PC104 bus to ISA. Maybe it will be helpful. #define ARM9_REGISTER 0xE8000000 //ARM9 registers int TS7800_ExpansionBoard::setPC104toISA() { volatile unsigned int *regs; //Check to make sure we have a FD for memory device if ( _intDevMem < 1 ) { openMemoryMapDevice(O_RDWR|O_SYNC); } //Get pointer to base address regs = (unsigned int *)mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, _intDevMem, ARM9_REGISTER); if ( regs == MAP_FAILED ) { // TODO: Log the error perror("Error occurred while getting memory map file.\n"); exit(1); } //Set the PC104 bus to ISA so we can talk to peripheral devices *(regs + 0x30/sizeof(unsigned int)) = 0x55555555; *(regs + 0x34/sizeof(unsigned int)) = 0x55555555; *(regs + 0x38/sizeof(unsigned int)) = 0x55555; *(regs + 0x3C/sizeof(unsigned int)) = 0x55555; //Unmap the memory map since we are done with it munmap((void *)regs, getpagesize()); regs = NULL; return 0; } On Thu, Jan 29, 2009 at 5:21 AM, Christian Gagneraud <> wrote:
|
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | Re: [ts-7000] PC-104 - How it works ??, ali |
---|---|
Next by Date: | Re: [ts-7000] Re: Cross-compiling question, Bill Whiteley |
Previous by Thread: | Re: [ts-7000] Re: On using the PC-104 bus of a TS7800 board, Christian Gagneraud |
Next by Thread: | Re: [ts-7000] Re: On using the PC-104 bus of a TS7800 board, Christian Gagneraud |
Indexes: | [Date] [Thread] [Top] [All Lists] |
Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU