Re: PIC IO Memory Access Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry to send this to Mulyadi, but somehow, posting to kernelnewbie is not seen to me.

So, Mulyadi, if you haven't gotten this message from kernelnewbie directly, would you let me know if you are available, please? (I am terribly sorry, but you are only one person I know here.) Thank you in advance.

Thanks,
Daniel

On Fri, Dec 17, 2010 at 1:31 PM, Daniel (Youngwhan) Song <breadncup@xxxxxxxxx> wrote:
Hi, there,

I am currently using regular X86 32 bit architecture having PCI and PCIe interface in a certain embedded system.

One of PCIe device is attached, and I am trying to load the kernel module.

One problem I have is that a certain area in the iomapped shows only 0xFFFF values. So, initially, I thought the hardware device module itself has a problem, but when I insert it in PC rather than my embedded system, it shows valid values.

Here is a snippet of the code.

------------
struct foo {
    unsigned long int TEST1;
    unsigned long int a1[256];
}
void * regsva;

struct foo *test_foo;

    if ((regsva = ioremap_nocache(dev->base_addr, (16 * 1024))) == NULL) {
        printk("ioremap() failed\n");
        goto fail;
    }

test_foo = (struct foo*)regsva;
printk(KERN_DBG "value TEST1: 0x%lx\n", *test_foo->TEST1);
printk(KERN_DBG "value 0: 0x%lx\n", *test_foo->a1[0]);
printk(KERN_DBG "value 1: 0x%lx\n", *test_foo->a1[1]);
-------------

The above code in PC with the same h/w module shows that

value TEST1: 0x8080
value 0: 0x9090
value 1: 0xa0a0

So, that's valid value.

But, when the code is run on our platform with the same h/w module, it shows that

value TEST1: 0x8080
value 0: 0xFFFF
value 1: 0xFFFF

So, I would like to get an idea why it would happen only on our platform (all our platform shows same behavior, and all PC shows same behavior.)

Any idea would be appreciated.

Thank you,
Daniel


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux