Hi all,

i would like to apologize, at the end this was also another hardware issue, so let's say "out of topic".

DM9000 have default interrupt signal from low to high, exactly the opposite that MCF5307 need :) .
This was the reason why no interrupt was detected.

I found that pulling up a bootstrap pin in the DM9000 the interrupt signal can be inverted.
So everything seems to works:

ang...@angel7:~/sysam/amcore/uClinux-dist$ ping 192.168.0.80
PING 192.168.0.80 (192.168.0.80) 56(84) bytes of data.
64 bytes from 192.168.0.80: icmp_seq=1 ttl=64 time=4.46 ms
64 bytes from 192.168.0.80: icmp_seq=2 ttl=64 time=0.621 ms
64 bytes from 192.168.0.80: icmp_seq=3 ttl=64 time=0.627 ms
64 bytes from 192.168.0.80: icmp_seq=4 ttl=64 time=0.620 ms
64 bytes from 192.168.0.80: icmp_seq=5 ttl=64 time=0.713 ms
64 bytes from 192.168.0.80: icmp_seq=6 ttl=64 time=0.669 ms
64 bytes from 192.168.0.80: icmp_seq=7 ttl=64 time=0.657 ms
64 bytes from 192.168.0.80: icmp_seq=8 ttl=64 time=0.712 ms
64 bytes from 192.168.0.80: icmp_seq=9 ttl=64 time=0.658 ms
64 bytes from 192.168.0.80: icmp_seq=10 ttl=64 time=0.661 ms
64 bytes from 192.168.0.80: icmp_seq=11 ttl=64 time=0.666 ms
^C
--- 192.168.0.80 ping statistics ---

So now that everything hw-related is up and running, i can really enjoy uClinux :)

thanks for all the support, hope to help in future,

Regards,
Angelo


On 05/06/2010 13:24, angelo wrote:
Hi all,

i did still some progresses, but i am still investigating, so any help is appreciated. I guess that who have clear idea of how coldfire interrupts/priorities works should see the problem in a moment.

I have seen from other boards that "autovectored" interrupts must be enabled in the board.c. (nettel.c is doing this for 2 networks chips actually, using mcf_autovector() ).

Calling this function in my board.c init, paralize the kernel boot, nothing is output anymore:

my moard.c call

mcf_autovector(31);

5307/config.c contains:

void mcf_autovector(unsigned int vec)
{
    volatile unsigned char  *mbar;

    if ((vec >= 25) && (vec <= 31)) {
        mbar = (volatile unsigned char *) MCF_MBAR;
        vec = 0x1 << (vec - 24);
        *(mbar + MCFSIM_AVR) |= vec;
mcf_setimr(mcf_getimr() & ~vec); <<<-- this line block the kernel boot
    }
}

regards,
Angelo

On 05/06/2010 09:44, angelo wrote:
Hi all,

i dumped finally the vector table:

00000000 : 00 00 00 00 ff c0 04 00 00 00 0a e8 00 00 0b 4c
00000001 : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
00000002 : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
00000003 : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
00000004 : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
00000005 : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
*00000006 : 00 00 39 30 00 00 39 30 00 00 39 30 00 00 39 30
00000007 : 00 00 39 30 00 00 39 30 00 00 39 3000 00 39 30  *
00000008 : 00 00 37 c0 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
00000009 : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
0000000a : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
0000000b : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
0000000c : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
0000000d : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
0000000e : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
0000000f : 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c 00 00 0b 4c
00000010 : 00 00 39 30 00 00 39 30 00 00 39 30 00 00 39 30
00000011 : 00 00 39 30 00 00 39 30 00 00 39 30 00 00 39 30
00000012 : 00 00 39 30 00 00 39 30 00 00 39 30 00 00 39 30

The vector related to IRQ7 pin (31), where dm9000 interrupt is physically wired, seems not to be set from the driver to the dm9000_interrupt routine offset.

I am sure i am missing something basic. Going on studying/searching ..

Regards,
Angelo


On 04/06/2010 20:34, angelo wrote:
Hi all,

i have interfaced a dm9000 chip with a Coldfire MCF5307. Driver is written for little-endian cpu, but with some job i could have it working, almost for the transmission part.

Anyway, i am not receiving any network packet, while i am able to send them out correctly. Interrupt pin of dm9000 (active low) is now wired to the IRQ7 pin on MCF5307.

I put some traces on the dm9000.c and i have seen that:

- RX circuit to the chip works properly, since i checked the dm9000 ISR registry (0xfeh), and interrupt bit get set when a packet arrive. - At start up the driver displays: "dm9000 dm9000: WARNING: no IRQ resource flags set."
- dm9000_interrupt() routine is never entered.

Even if my resource structure set the IRQ flags as below, probably some other task disable the interrupt maybe.

This are my board resources:

#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
static struct resource dm9000_resources[] = {
    /* physical address of the address register (CMD [A2] to 0)*/
    [0] = {
        .start  = MCF5307_CS1,
        .end    = MCF5307_CS1,
        .flags  = IORESOURCE_MEM,
    },
    /* physical address of the data register (CMD [A2] to 1)*/
    [1] = {
        .start  = MCF5307_CS1 + 0x4,
        .end    = MCF5307_CS1 + 0x4 + 03,
        .flags  = IORESOURCE_MEM,
    },
    /* IRQ line the device's interrupt pin is connected to */
    [2] = {
        .start  = 0 + INT_IRQ7,
        .end    = 0 + INT_IRQ7,
        .flags  = IORESOURCE_IRQ,
    },
};

static struct dm9000_plat_data dm9000_platdata = {
    .flags = DM9000_PLATF_32BITONLY,
};

static struct platform_device dm9000_device = {
    .name           = "dm9000",
    .id             = -1,
    .num_resources  = ARRAY_SIZE(dm9000_resources),
    .resource       = dm9000_resources,
    .dev = {
        .platform_data = &dm9000_platdata,
    }
};
#endif

Thanks,

Regards,
Angelo






_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to