From: Wolfgang Denk Date: Fri, 05 Jun 2009 11:59:54 +0200 Subject: [U-Boot] [PATCH] kgdb: unify kgdb on serial In-Reply-To: <1242487402-11170-1-git-send-email-plagnioj@jcrosoft.com> References: <1242487402-11170-1-git-send-email-plagnioj@jcrosoft.com> Message-ID: <20090605095954.0E3A8832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 ... 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 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "A fractal is by definition a set for which the Hausdorff Besicovitch dimension strictly exceeds the topological dimension." - Mandelbrot, _The Fractal Geometry of Nature_