LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-03-2008, 12:01 PM   #1
webquinty
Member
 
Registered: Apr 2008
Location: Espa˝a
Distribution: Suse
Posts: 218

Rep: Reputation: 32
Question about bus access.....


Hello,

I am newbie and I have a doubt about how to access a device conneted in a bus.

For example, I have address bus and data bus where I have connected a device. My problem is I do not known to access to this device.

I look for information about it, and I find functions, for example, ioremap, but I am not sure if this is the best way to do it.

Could some body tell any idea about it???

Best regards
John Martin

UPDATE:

Well, I find some information about it, Memory-mapped I/O.
I understand that the best way to use a new device connected to physical bus, but I am not sure how to do it.

Last edited by webquinty; 09-05-2008 at 04:12 AM.
 
Old 09-04-2008, 10:05 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware«
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Let me see now, let's look into my crystal ball. Shucks it's cracked everything is fuzzy. Somewhat like your post.

No information to allow us to assist you. What buss, pci or isa?

If you are using memory mapped i/o then you should have the address and the width of the data.

You would create a device driver to setup the device and to service it. This can be done with assembly, C/C++ or whatever you have that will allow you perform the required action(s).

There are volumes of information on how to build interfaces devices along with the means to access or control the I/O. Do some searches.

I would suggest that you read the next two links so you will know how to present or create a knowledgeable post.
 
Old 09-05-2008, 04:10 AM   #3
webquinty
Member
 
Registered: Apr 2008
Location: Espa˝a
Distribution: Suse
Posts: 218

Original Poster
Rep: Reputation: 32
Hello onebuck,

I am sorry about it, but I will hope you understand that I am newbie, and this section is for newbie.

The world of linux is too big, and the first step with linux is too hard.
If I do not give you more information, it is because I do not known enough knownledge of it.

I have a chip with 20 bits address and 16 bits data.
I would like to connect to address and data signals of pc104 bus, where there is A0-A19 address signals and D0-D15 data signals.
I have memory map of my hardware and there is a free memory address, B0000h-B7FFFh, and in this zone I would like to mapped my device.

And again, I am sorry for do not give you more information about my problem.

Best regards

Last edited by webquinty; 09-05-2008 at 04:13 AM.
 
Old 09-05-2008, 03:29 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware«
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

I didn't mean to come across as judgmental or stringent. You should read the suggested links to get a understanding as to how one should formulate a question that provides enough information so a good response will be formulated.

Your interface will dictate as to how data is handled. If memory mapped I/O then your decoder circuitry will provide the means to present the data back to you within the mapped memory address range, just remember that 4 cycles are required verse a I/O port interface design (most use 5 cycles). So your design will require that the data you see will presented without propagation. You can google and find some good examples.

How often your data is updated or valid will depend on what you are interfacing with therefore the interface must provide the means to interrupt or flag when ready so part of the memory mapped decoded will be a control word/byte part of the datain register. That is how you will know when to get the data. The data stream will dictate the design of the interface scheme. I've been very simplistic in the description of the interface, volumes have been written on 'Interfacing'. I would suggest that you find a good author. Some of the older books are still valid. Just remember you will have to absolute decode the 20 bit memory mapped I/O address therefore your decoder will need the buss signals, MEMR & MEMW along with your Data.

As for the software, it doesn't matter if it's Linux, M$ Win on a PC you just need to provide the means to communicate with the interface via assembly, C/C++ or even python. The handling or manipulation of the data will be decided by you.

You can get a lot of information from the net. I like the 'Circuit Cellar' by Steve Ciarcia, he has been around for years. His interface techniques are good and reliable source of information especially his online archive. If you happen to find some old hard copies of the 'Circuit Cellar' at a garage sale then grab them.

Good luck with your design!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LM Sensors Help, Can't access procfs/sysfs file Unable to find i2c bus information; Whiskers Linux - Software 16 11-03-2008 05:58 PM
A question about architecture and bus-width Dosnerd90 Linux - Newbie 7 01-27-2008 09:55 PM
About the DMA and PCI bus question boer Linux - Kernel 0 08-28-2006 08:31 PM
ISA bus question Berhanie Linux - General 2 01-04-2004 01:40 PM
Motherboard bus speed question Dr_Travis Linux - Hardware 6 07-21-2002 07:48 PM


All times are GMT -5. The time now is 08:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration