Hi Daniele,

Daniele Ziglioli wrote:
I need to port some 2.4 drivers to a 2.6.x uclinux kernel and I wish to understand
the right way to do this.

Just as a reference I'm talking, for example, about cypress sl811 usb-host driver . In particular I need to introduce some board-specific irqs and memory address access managements. The previous 2.4 driver (hc_sl811.c) was full of board-specific conditional statement like for example:

    #if defined(CONFIG_SIGNAL_MCP751)
        /* Acknowledge interrupt */
        {
        volatile unsigned long *icrp;
        icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR4);
        *icrp = (*icrp & 0x7777777) | 0x08000000; // INT5
        }
    #endif

I suppose this is not acceptable anymore in the new kernel drivers.

Which is the right way in the 2.6.x kernel to do this sort of things, and in general to do specific board initialization or configurations ? I suppose that some effort has been done in the new kernels to introduce a clean separation between board-specific issues and the generic part of the driver, but due to my lack of experience in 2.6.x kernel is not clear for me how to operate.

I've had a look at LDD book, LKH docs, and some other readings, but I've not found useful information about treating board-specific driver codings techniques. Could someone point me to some good examples or documents regarding board-specific driver codings techniques,

Generally now in 2.6 based code you want to put the platform
hardware specifics in the platform code. In this case for the
ColdFire that would be files like:

  arch/m68knommu/platform/520x/config.c

(The 520x is just an example, use the appropriate ColdFire type).

The serial port setups in many of those config.c files should
be a good example of what is needed.

Regards
Greg



------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [EMAIL PROTECTED]
SnapGear, a McAfee Company                  PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
_______________________________________________
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