[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] Serious trouble with uartlite-like modified driver module
- To: microblaze-uclinux@xxxxxxxxxxxxxx
- Subject: [microblaze-uclinux] Serious trouble with uartlite-like modified driver module
- From: "Chris Enrique" <microdevel@xxxxxxxxxxxxxx>
- Date: Wed, 8 Oct 2008 10:32:46 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=QaALqOxQ9hKW9DmfJvnGHT9PFp9HfCA66hfb1w1VvJ8=; b=uMBNsGPwGkK7YtTxYXjRX4Ua1gcMs4fJA/ma1laKnj9O6zf3MRkNHx224qzrS9X30l 6wTS9R/xAxSRBAoW+jOkzkeQvPDZlgouWGVqYm/O3Gro0Z/gnsYX2OSpeDjvFo+kpdr+ NqdzCranNBV6U8wKaJ1QJNXet7BdX15XFMUw4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=IgKTGEMOZRjB1HR05kmJLcG32bvlARFQq6JGoSjOhrqoQ0f9yEVZuAzhAraw7HdCfZ nwC6VY/HSkIKSZdmWbM7M7L9iW7MGlH2FUzMn0qVWzyyszmZQexvDGLvd0kv7JmsQ8xt 7/iolP/2DGakTdf7d3XiOHWRA0RQC/ynLDwGg=
- Reply-to: microblaze-uclinux@xxxxxxxxxxxxxx
- Sender: owner-microblaze-uclinux@xxxxxxxxxxxxxx
Hello,
i have some problems making a driver module (very similar to uartlite driver) work. My situation is the following:
I am running petalinux on a Xilinx Spartan3A1800DSP Starter Kit Board (Microblaze), my hardware has 2 uartlite-cores implemented. The first one should be accessed by the original uartlite driver, the second one (which was modified for testing purposes...its fifo always contains "0101010...") should be driven by a modified uartlite driver, which is currently loaded as a module after system startup. the module_init procedure is exactly the same that can be found in the uartlite driver:
(module pan)
-------------------------------
int __devinit pan_init(void)
{
int ret;
ret = uart_register_driver(&pan_uart_driver);
printk(KERN_INFO "PAN: pan_init - uart_register_driver ret:%d\n",ret);
if (ret)
return ret;
ret = platform_driver_register(&pan_platform_driver);
printk(KERN_INFO "PAN: pan_init - platform_driver_register ret:%d\n",ret);
if (ret)
{
uart_unregister_driver(&pan_uart_driver);
printk(KERN_WARNING "PAN: pan_init - UNREGISTERED DRIVER ret:%d\n",ret);
}
printk(KERN_INFO "PAN: pan_init - success\n");
return ret;
}
this init procedure just works fine but the problem is, the .probe function specified in pan_platform_driver struct never gets called...so my module doesn't do any work at all...
can anyone explain me how the kernel gets an idea of which module to probe for the uart hardware?shouldn't it just probe any driver registered via te platform_driver_register() call? i chose 4 as major number and 68 as minor and created a device node pan0,c,4,68..should be good so far.
there is some issue concerning the original uartlite driver that is driving the first uartlite-core...it gets probed twice when the system is loaded, so i limited its UARTLITE_NR_UARTS to 1, is that the right way?
thanks for help in advance
chris