Quantcast
Channel: Altera Forums
Viewing all articles
Browse latest Browse all 19390

Porting a custom Hardware device Driver from nonmmu to mmu Advice

$
0
0
Thanks in Advance.

I've got a daughter card with custom hardware and my device driver that was developed on the nonmmu (nios2.h) without "probe function" that I'm updating for the mmu device tree release and a new daughter card on the DE2-115 evaluation board.
I read and learned a bunch from http://uuoc.org/uClinux_nios2_custom_hardware.pdf

My problem is that my "probe" is not getting executed so I don't have a base address or irq for the driver. But my "mod_init" does get executed if I make it a built-in module AND if I make it loadable I can to a modprobe and it is executed.

My *.dts file entry for this hardware is:
NOTE: I made up the "pcm2par" it was unknown - and my device driver matches that "pcm2par"

pcm2par_av_0: unknown@0x09004c0 {
compatible = "pcm2par, pcm2par-1.0";
reg = < 0x09004c0 0x00000010 >;
interrupt-parent = < &cpu >;
interrupts = < 8 >;
}; // end unknown@0x09004c0 (pcm2par_av_0)


SO:
1. Do I have to use probe? Can I just do all of that (of_match_device, platform_get_resource, request_mem_region, ...) in mod_init?
2. Is there a place to define custom "pcm2par" for the kernel - is "ALTR" defined somewhere in the nios2-linux/uClinux-dist ?


Viewing all articles
Browse latest Browse all 19390

Trending Articles