From: "Kevin Hilman" <[EMAIL PROTECTED]> > > 1) In arch/arm/mach-davinci/clock.c, the GPIO clock is > > set at 27 MHz (you > > can see it also in /proc/davinci_clocks) while the > > maximum GPIO clock speed > > is 10 MHz. > > Good catch.
However this doesn't seem to affect the GPIO operation in any way, I suppose it has just an informative purpose. GPIO stage is fed with SYSCLK5, and if I'm not wrong, with the board defaults that's 94.5 MHz. The "maximum operation speed" of 10 MHz depicted in SPRUE25 is probably just a consequence of the actual delay propagation of the GPIO stages (see the DM6446 datasheet, page 108). > > 2) In arch/arm/mach-davinci/gpio.c, the function > > gpio_set_direction() is > > declared as __init. This is quite restrictive, because > > there are a lot of > > situations where you may need to change a the direction > > of a GPIO > > dynamically (e.g. bidirectional data lines). > > Removal of __init is OK, but your patch also renames the > version in > gpio.c (to something that is never called) and moves the > function to > gpio.h. What's the reason for that? Yes, you are right, it doesn't make sense. I just wanted to reproduce the way the other functions were implemented (an inline "stub" in gpio.h that calls when needed the real function in gpio.c), but then I've mistakenly copied all the function in the .h, and this doesn't help at all. :) I just removed __init, the new patch (still against the original code) is attached. > > 3) In include/asm-arm/arch-davinci/gpio.h, there is an > > error in the > > gpio_clear() function (the bit is always set). > > I don't see how this patch fixes that problem. The problem shows up only when you use a non-constant value for the GPIO, see the answer of David Brownell. > If you're doing your changes inside your git tree, you can > just do a > 'git diff' to generate a patch. > > Personally, I use quilt to manage my patches. Thank you, I'll try it! Cheers, Lorenzo -- Lorenzo Lutti Embedded Devices s.r.l. Via Trinita` 1/2, 41058 Vignola (MO), ITALY Tel +39 059 7474015 Fax +39 059 763776 Skype: emb-lorenzo
gpio.patch
Description: Binary data
_______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
