Find the answer to your Linux question:
Results 1 to 10 of 10
Hello, I have develop a easy driver to handle a pci device but now, I have a problem. I have a new device and its connected using PC/104 bus. My ...
  1. #1
    Just Joined!
    Join Date
    May 2007
    Posts
    22

    how to handle pc/104 in Linux???

    Hello,

    I have develop a easy driver to handle a pci device but now, I have a problem. I have a new device and its connected using PC/104 bus.

    My question is: how to access pc/104 device in linux???
    Can I use the same libraries than PCI???? or is there other way to do it???

    Best regards.

  2. #2
    Just Joined!
    Join Date
    May 2007
    Posts
    22
    Hello,

    nobody can give a piece of information???

    I only need a lite advice or way to continue.

    Best regards

  3. #3
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Searching the web for an answer before you ask us to hand-craft an answer for you is simple etiquette, as this linux forums post indicates. (But you should have been able to figure that out on your own.)

    Searching for yourself yields a win-win situation:
    1. We don't have to drop what we're doing to give you answers you can get on your own. We do have lives, you know.
    2. You'll get your answer faster.

    Just so you know.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  4. #4
    Just Joined!
    Join Date
    May 2007
    Posts
    22
    Hello wje_lf,

    Well, I do not want that a forum give me all work or information. Always my first step is to look for information in GOOGLE, but I do not find properly information, because I do not known if words in my search are correct.

    If I look for information about PCI access in Linux, there is a lot of information about it, but if I look for information about PC/104 access in Linux, the results are about pc/104 boards or Device Drivers Linux of O'Relly book.

    So, I am sorry, but I always have thought that a forum is a place to find answers.

    Best regards.

  5. #5
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Did the link I gave you provide you with sufficient information? I got that by googling:
    Code:
    Linux PC/104
    That gives you information in sufficient detail, because you'll find actual drivers there. So you can learn from them how to write a PC/104 driver.

    But other results from that same search give you more introductory material, in case you need a slower introduction. I know I have been in that situation. :)
    I always have thought that a forum is a place to find answers.
    And it is, but there's the concept of "leverage". People who volunteer their time to help others find answers want to know that they're giving the most help for each minute of time they spend answering questions. That's why the etiquette of this forum, as shown in the other link I gave you in the previous post, encourages you to google first, so we can concentrate on the problems with less obvious answers. (Other advice sites encourage their users similarly.)

    So my question to you now is this: do you need further help beyond what you can find with the search terms I list here?
    --
    Bill

    Old age and treachery will overcome youth and skill.

  6. #6
    Just Joined!
    Join Date
    May 2007
    Posts
    22
    Hello wje_lf,

    I am very sorry, I did not see the link. It is a wonderful point to start.

    So my question to you now is this: do you need further help beyond what you can find with the search terms I list here?
    And sorry again because I did not understand well that you told me, my english is not perfect ( I am from Spain).

    Best regards and thanks a lot

  7. #7
    Just Joined!
    Join Date
    May 2007
    Posts
    22
    Hello,

    About this question, in kernel space, is there any reason that outb works fine and inb always return me 0xFF but the correct value is other???

    Best regards

  8. #8
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    is there any reason that outb works fine and inb always return me 0xFF but the correct value is other?
    I'm hoping someone else will join this thread and give you a useful answer.

    But in the meantime, take the driver from freshmeat, install it, and see whether it gives you the same problem. If it does, there might be a problem with your device, or it might be a problem with the way the device is configured somehow. (It might not be configurable in any way. I'm just guessing here.)

    But if the driver from freshmeat doesn't give you this problem, but your own driver does, it's time to see how the two drivers differ. This will be a long road to travel, but you'll learn a lot from it.

    Sorry I couldn't be of more help.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  9. #9
    Just Joined!
    Join Date
    May 2007
    Posts
    22
    Hello,

    well, Now I understand why my driver does not works and example digital input/output works.

    This is output of > cat /proc/ioport
    0000-001f : dma1
    0020-0021 : pic1
    0040-0043 : timer0
    0050-0053 : timer1
    0060-006f : keyboard
    0070-0077 : rtc
    0080-008f : dma page reg
    00a0-00a1 : pic2
    00c0-00df : dma2
    00f0-00ff : fpu
    0168-016f : MYBOARD TEST
    0170-0177 : 0000:00:0f.2
    01f0-01f7 : 0000:00:0f.2
    01f0-01f7 : ide0
    02f8-02ff : serial
    0376-0376 : 0000:00:0f.2
    0378-037a : parport0
    This is output of this command > cat /dev/port | hexdump

    0000100 ffff ffff ffff ffff ffff ffff ffff ffff
    * ---> where is 0x168 range????
    00001f0 0000 5e00 0800 50e0 ffff ffff ffff ffff
    0000200 ffff ffff ffff ffff ffff ffff ffff ffff
    *
    0000290 ffff ffff 20ff ff4f ffff ffff ffff ffff
    00002a0 ffff ffff ffff ffff ffff ffff ffff ffff
    *
    00002f0 ffff ffff ffff ffff 00fa 00c1 6000 0010
    0000300 ffff ffff ffff ffff ffff ffff ffff ffff
    *
    0000370 ffff ffff ffff ffff 7f04 ffcc ffff ffff
    0000380 ffff ffff ffff ffff ffff ffff ffff ffff
    And piece of my driver:

    baseio = 0x168;
    result = check_region(baseio, TSXXX_IO_RANGE));
    if result == 0
    return -1;
    mytscan1 = request_region(baseio, TSXXX_IO_RANGE, "TSCAN1 Board");

    outb(0x00, baseio + 3);
    udelay(500);
    id0 = inb(baseio); --> always return me 0xFF,
    Well, Digital I/O example works with baseio=0x300, but my driver works with baseio=0x168, but as you can see, this address does not appear, then , my questions is, why?? is it necesary to reserve a I/O range???

    Best regards

  10. #10
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    I haven't ever coded or maintained a driver for Linux, so I really don't know where to go at this point. You might want to google the following search terms:
    Code:
    Linux driver tutorial
    to see whether you can get any extra help.

    Wish I could be more useful. Sorry. :(
    --
    Bill

    Old age and treachery will overcome youth and skill.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...