Hi Alan,
For some reasons, I still can't get it to work.
The following is the init part of my code:
static int __init myudc_init (void)
{
struct socle_lp2a_udc *dev;
int retval;
INFO(KERN_DEBUG "%s: version %s\n", driver_name, DRIVER_VERSION);
/* allocate resources */
if (!request_mem_region(REGISTER_FIRST, REGISTER_LENGTH,
driver_name))
return -EBUSY;
/* initialize data */
dev = &memory;
the_controller = dev;
udc_reinit(dev);
/* irq setup after old hardware state is cleaned up */
retval = request_irq(INO_UDC, my_udc_irq,
SA_INTERRUPT, driver_name, dev);
if (retval != 0) {
printk(KERN_ERR "%s: can't get irq %i, err %d\n",
driver_name, INO_UDC, retval);
return -EBUSY;
}
dev->got_irq = 1;
create_proc_files();
return 0;
}
module_init (myudc_init);
andy ideas?
Andy
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alan Stern
Sent: Wednesday, September 21, 2005 10:36 PM
To: Andy Chuo
Cc: [email protected]
Subject: RE: [linux-usb-devel] A better way to load the pheripheral
controller driver during developement time?
On Wed, 21 Sep 2005, Andy Chuo wrote:
> Hi Alan,
>
> Thanks for the info. So far, I can't change the kernel to 2.6, any chance
> for this to happen on 2.4.21? Inside my init() section I basically did
three
> things:
> 1. request_mem_region()
> 2. initialize driver data.
> 3. request irq.
>
> The following is the reply from Dave:
> >Then clearly you've not written the probe() or remove() methods in your
> peripheral >controller driver correctly ...
> >- Dave
>
> >And my reply:
> >Are the Probe() and the remove() methods applicable on non-PCI based UDC?
I
> >basically followed the pxa25x UDC controller driver structure because the
> UDC I am >working on is part of the ARM SOC core not a PCI device. I only
> see the probe() and >remove() methods under the goku and net2280
> implementations and they are both >PCI based. Am I making sense here?
In 2.6, probe and remove methods apply to all drivers, PCI-based or not.
In 2.4 the situation is different.
2.4.21 should work. It may be that your exit() routine doesn't undo
everything the init() routine sets up. Like I said before, put printk
statements in your driver so you can see what is happening. Also look at
/proc/interrupts and /proc/io{mem,ports}, or the 2.4 equivalent, before
insmod, after insmod, and after rmmod to make sure that all the resources
you claim do eventually get released.
I notice that the pxa2xx_udc driver in 2.4 declares the cleanup() routine
as __init. That's probably a mistake.
Alan Stern
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel