Skip to contentSkip to conversation

m68k: network interface on amcore board

RFC Angelo Dureghello 3 participants 4 messages Oct 31, 2016 – Nov 1, 2016

lore
Share & tools
lore
#0 lore raw

Hi all,

i have still a last issue open on mcf5307-based "amcore" board i would like to fix, and need a suggestion:

at design time, i wired the 32bit parallel data bus from cpu to the ethernet chip as "straight" (D0 to D0, ... D32 to D32).

dm9000 driver btw works for little-endian cpu only. To have it working, i actually keep a byte "swap" patch in the driver.

Since i guess i cannot pretend any driver patch for this case, i am planning a new pcb version with 32bit data bus bytes swapped in hardware.

What do you think ?

Thanks,

Best regards,
Angelo Dureghello

#1 lore raw

Hi Angelo,

Quoted 6 lines · Angelo Dureghello

i have still a last issue open on mcf5307-based "amcore" board i would like to fix, and need a suggestion:

at design time, i wired the 32bit parallel data bus from cpu to the ethernet chip as "straight" (D0 to D0, ... D32 to D32).

Quoted 8 lines

dm9000 driver btw works for little-endian cpu only. To have it working, i actually keep a byte "swap" patch in the driver.

Since i guess i cannot pretend any driver patch for this case, i am planning a new pcb version with 32bit data bus bytes swapped in hardware.

What do you think ?

BenH has written some excellent background information about this:
Big and Little Endian inside / out
https://www.linuxplumbersconf.org/2012/wp-content/uploads/2012/09/2012-lpc-ref-big-little-endian-herrenschmidt.odp
https://www.youtube.com/watch?v=oBSuXP-1Tc0

Happy reading!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw

Hi Geert,

Quoted 16 lines · Geert Uytterhoeven

Hi Angelo,

Quoted 13 lines · Angelo Dureghello

i have still a last issue open on mcf5307-based "amcore" board i would like to fix, and need a suggestion:

at design time, i wired the 32bit parallel data bus from cpu to the ethernet chip as "straight" (D0 to D0, ... D32 to D32).

dm9000 driver btw works for little-endian cpu only. To have it working, i actually keep a byte "swap" patch in the driver.

Since i guess i cannot pretend any driver patch for this case, i am planning a new pcb version with 32bit data bus bytes swapped in hardware.

Quoted 9 lines
Quoted 1 line

What do you think ?

BenH has written some excellent background information about this:
Big and Little Endian inside / out
https://www.linuxplumbersconf.org/2012/wp-content/uploads/2012/09/2012-lpc-ref-big-little-endian-herrenschmidt.odp
https://www.youtube.com/watch?v=oBSuXP-1Tc0

Happy reading!

many thanks for the very interesting presentation, so from what i understand, the issue is in this terms:

* dm9000 registers/memory byte order is little endian.
* coldfire memory byte order is big endian

The proper way to fix this should be as said in the presentation above to swap bytes in hardware.

Best regards,
Angelo Dureghello

Quoted 11 lines

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw

Hi Angelo,

Quoted 30 lines · Angelo Dureghello

Hi Geert,

Quoted 16 lines · Geert Uytterhoeven

Hi Angelo,

Quoted 13 lines · Angelo Dureghello

i have still a last issue open on mcf5307-based "amcore" board i would like to fix, and need a suggestion:

at design time, i wired the 32bit parallel data bus from cpu to the ethernet chip as "straight" (D0 to D0, ... D32 to D32).

dm9000 driver btw works for little-endian cpu only. To have it working, i actually keep a byte "swap" patch in the driver.

Since i guess i cannot pretend any driver patch for this case, i am planning a new pcb version with 32bit data bus bytes swapped in hardware.

Quoted 9 lines
Quoted 1 line

What do you think ?

BenH has written some excellent background information about this:
Big and Little Endian inside / out
https://www.linuxplumbersconf.org/2012/wp-content/uploads/2012/09/2012-lpc-ref-big-little-endian-herrenschmidt.odp
https://www.youtube.com/watch?v=oBSuXP-1Tc0

Happy reading!

Quoted 8 lines

many thanks for the very interesting presentation, so from what i understand, the issue is in this terms:

* dm9000 registers/memory byte order is little endian.
* coldfire memory byte order is big endian

The proper way to fix this should be as said in the presentation above to swap bytes in hardware.

Does the dm9000 have to use a 16bit bus, or can you wire it up 8bit only? Can be another option to avoid problems.

Regards
Greg

Quoted 16 lines
Quoted 11 lines

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html