This is the software DTR patch.
To enable add:
on the kernel commandline when the amba-pl011 module is compiled into the kernel.
use dtr_pin=18 on the insmod commandline if you use this as a module.
AMBA software DTR patch
Does this fix a problem? Since it's been nine months I'm assuming no one else is having trouble...
Please reopen if this is an issue
The hardware provides: "You can easily provide a DTR on a GPIO pin if neccessary". This implements that.
If you connect an arduino board directly on the serial port of the raspberry pi, the standard arduino software expects to be able to reset the arduino by toggling the DTR line. This causes the bootloader to be active for a few miliseconds during which the programmer starts sending a new firmware for the atmega328.
The core of the matter is that I can make it work without this patch.
IF (we're running on a raspberry pi)
toggle GPIO 18 to reset the arduino
That is exactly what "having device drivers" Is all about. That we're getting rid of all the low-level stuff in all of the programs so that a program becomes portable. With this patch the arduino software is portable to the raspberry pi, in that a simple recompile will make it able to reset the arduino with the DTR line as it does on different platforms.
Without this patch, the avrdude program needs to be replaced by a script that toggles the GPIO and then starts up the real binary. Messy. Or a special patch needs to be written for avrdude to do this itself. Messy.
I don't seem to have permissions to be able to reopen.
Does this work if you just add the setting to the kernel command line, i.e. edit cmdline.txt
We don't really want to dedicate one of the 'somewhat precious' GPIOs to this task, maybe if there was a special arduino distribution?
The patch is totally inactive if you don't pass the cmdline parameter.
Those that want the DTR function should chose the GPIO they want, and configure its use in the cmdline.txt file.
Sorry I hadn't noticed the patch along side! You'll need to push this upstream first, if it gets accepted we'll take it
You need to submit your patches to the linux kernel mailing list to be included in the linux kernel. Once your patch has been accepted then give us a shout and we'll add it in (main issue being merge conflicts if we take it here) plus there are a different set of people who are watching that amba driver and will comment on the patch.