
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 1242487402-11170-1-git-send-email-plagnioj@jcrosoft.com you wrote:
unify kgdb serial implementatin when we kgdb over the main serial interface (serial_{getc,putc,puts})
introduce CONFIG_KGDB_ON_SERIAL for this purpose otherwise use as curently CONFIG_KGDB_SER_INDEX to define the serial port to use
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com
...
The new CONFIG_KGDB_ON_SERIAL variable needs to be documented in the README, and the exact use of CONFIG_KGDB_SER_INDEX in the new context needs to be explained, too.
diff --git a/cpu/i386/serial.c b/cpu/i386/serial.c index 8b5f8fa..a495f85 100644 --- a/cpu/i386/serial.c +++ b/cpu/i386/serial.c @@ -394,16 +394,11 @@ int serial_buffered_tstc(void) #endif /* CONFIG_SERIAL_SOFTWARE_FIFO */
-#if defined(CONFIG_CMD_KGDB) +#if defined(CONFIG_CMD_KGDB) && (CONFIG_KGDB_SER_INDEX & 2) /*
- AS HARNOIS : according to CONFIG_KGDB_SER_INDEX kgdb uses serial port
- number 0 or number 1
- if CONFIG_KGDB_SER_INDEX = 1 => serial port number 0 :
- configuration has been already done
- if CONFIG_KGDB_SER_INDEX = 2 => serial port number 1 :
- configure port 1 for serial I/O with rate = CONFIG_KGDB_BAUDRATE
- use the serial number 1
- configure port 1 for serial I/O with rate = CONFIG_KGDB_BAUDRATE
*/
I don;t understand the use of "CONFIG_KGDB_SER_INDEX & 2" here; the old (deleted) comment would be helpful, but I don;t understand if it still applies with your changes.
This needs better documentation / comments.
Best regards,
Wolfgang Denk