Re: [U-Boot] Compilation warning: "MSR_RI" redefined
Dear Detlev, In message you wrote: > > Attached is a patch which fixes this fallout and starts a round of > cleanups. Please submit patches inline, not as attachments! > Subject: [PATCH] Rename common ns16550 constants with UART_ prefix to prevent > conflicts > > Fix problems introduced in commit > 7b5611cdd12ca0cc33f994f0d4a4454788fc3124 [inka4x0: Add hardware > diagnosis functions for inka4x0] which redefined MSR_RI which is > already used on PowerPC systems. > > Also eliminate redundant definitions in ps2mult.h. More cleanup will > be needed for other redundant occurrences though. > > Signed-off-by: Detlev Zundel > --- > board/inka4x0/inkadiag.c | 20 > board/linkstation/avr.c |6 +- > drivers/input/ps2ser.c | 22 > drivers/serial/ns16550.c | 39 +++-- > include/ns16550.h| 135 +++-- > include/ps2mult.h| 99 - > 6 files changed, 139 insertions(+), 182 deletions(-) Applied, thanks. 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: w...@denx.de [Doctors and Bartenders], We both get the same two kinds of customers -- the living and the dying. -- Dr. Boyce, "The Menagerie" ("The Cage"), stardate unknown ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Compilation warning: "MSR_RI" redefined
Hi, > On Apr 2, 2009, at 4:03 AM, Stefan Roese wrote: > >> On Thursday 02 April 2009, Detlev Zundel wrote: I suggest to either remove this MSI_RI from the header again (it doesn't seem to be used here) or rename it. >>> >>> Ok, so much for the plan to add the defines not bit by bit as needed, >>> but register-wise, while we're there. >>> >>> I actually would prefer to use UART_MSR_RI, as this is a UART thingy >>> rather than to remove the define as we surely use the register, so I >>> feel it worthwhile to have the whole definition on board. >> >> That's my preference as well. > > Agreed, when I saw MSR_RI I wasn't thinking UART at all. That's really context specific. Looking at 16550 registers for a day, I forgot the "other" meaning of MSR ;) Attached is a patch which fixes this fallout and starts a round of cleanups. Thanks Detlev -- Alisa Sherer (AMD) suggested that consumer demand will not follow faster clock speeds. Marketing might help with this problem, she added.-- 2004/02/20 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de >From 92a20fe9a3004cbd3685491ca51054e6cb6ba1e3 Mon Sep 17 00:00:00 2001 From: Detlev Zundel Date: Fri, 3 Apr 2009 11:53:01 +0200 Subject: [PATCH] Rename common ns16550 constants with UART_ prefix to prevent conflicts Fix problems introduced in commit 7b5611cdd12ca0cc33f994f0d4a4454788fc3124 [inka4x0: Add hardware diagnosis functions for inka4x0] which redefined MSR_RI which is already used on PowerPC systems. Also eliminate redundant definitions in ps2mult.h. More cleanup will be needed for other redundant occurrences though. Signed-off-by: Detlev Zundel --- board/inka4x0/inkadiag.c | 20 board/linkstation/avr.c |6 +- drivers/input/ps2ser.c | 22 drivers/serial/ns16550.c | 39 +++-- include/ns16550.h| 135 +++-- include/ps2mult.h| 99 - 6 files changed, 139 insertions(+), 182 deletions(-) diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c index 06c9807..12c0a85 100644 --- a/board/inka4x0/inkadiag.c +++ b/board/inka4x0/inkadiag.c @@ -280,48 +280,48 @@ static int do_inkadiag_serial(cmd_tbl_t *cmdtp, int flag, int argc, if ((num >= 0) && (num <= 7)) { if (mode & 1) { /* turn on 'loopback' mode */ - out_8(&uart->mcr, MCR_LOOP); + out_8(&uart->mcr, UART_MCR_LOOP); } else { /* * establish the UART's operational parameters * set DLAB=1, so rbr accesses DLL */ - out_8(&uart->lcr, LCR_DLAB); + out_8(&uart->lcr, UART_LCR_DLAB); /* set baudrate */ out_8(&uart->rbr, combrd); /* set data-format: 8-N-1 */ - out_8(&uart->lcr, LCR_WLS_8); + out_8(&uart->lcr, UART_LCR_WLS_8); } if (mode & 2) { /* set request to send */ - out_8(&uart->mcr, MCR_RTS); + out_8(&uart->mcr, UART_MCR_RTS); udelay(10); /* check clear to send */ - if ((in_8(&uart->msr) & MSR_CTS) == 0x00) + if ((in_8(&uart->msr) & UART_MSR_CTS) == 0x00) return -1; } if (mode & 4) { /* set data terminal ready */ - out_8(&uart->mcr, MCR_DTR); + out_8(&uart->mcr, UART_MCR_DTR); udelay(10); /* check data set ready and carrier detect */ - if ((in_8(&uart->msr) & (MSR_DSR | MSR_DCD)) - != (MSR_DSR | MSR_DCD)) + if ((in_8(&uart->msr) & (UART_MSR_DSR | UART_MSR_DCD)) + != (UART_MSR_DSR | UART_MSR_DCD)) return -1; } /* write each message-character, read it back, and display it */ for (i = 0, len = strlen(argv[3]); i < len; ++i) { j = 0; - while ((in_8(&uart->lsr) & LSR_THRE) == 0x00) { + while ((in_8(&uart->lsr) & UART_LSR_THRE) == 0x00) { if (j++ > CONFIG_SYS_HZ) break; udelay(10); } out_8(&uart->rbr, argv[3][i]); j = 0; - while ((in_8(&uart->lsr) & LSR_DR) == 0x00) { + while ((in_8(&uart->lsr) & UART_LSR_DR) == 0x00) { if (j++ > CONFIG_SYS_HZ) break; udelay(10); diff --git a/board/linkstation/avr.c b/board/linkstation/avr.c index fda1b91..782b24a 100644 --- a/board/linkstation/avr.c +++ b/board/linkstation/avr.c @@ -90,12 +90,12 @@ void init_AVR_DUART (void) */ AVR_port->lcr = 0x00; AVR_port->ier = 0x00; - AVR_port->lcr = LCR_BKSE; + AVR_port->lcr = UART_LCR_BKSE; AVR_port->dll = clock_divisor & 0xff; AVR_port->dlm = (clock_divisor >> 8) & 0xff; - AVR_port->lcr = LCR_WLS_8 | LCR_PEN | LCR_EPS; + AVR_port->lcr = UART_LCR_WLS_8 | UART_LCR_PEN | UART_LCR_EPS; AVR_port->mcr = 0x00; - AVR_port->fcr = FCR_FIFO_EN | FCR_RXSR | FCR_TXSR; + AVR_port->fcr = UART_FCR_FIFO_EN | UART_FCR_RXSR | UART_FCR_TXSR; miconCntl_DisWDT(); diff --git a/drivers/input/ps2ser.c b/drivers/input/ps2ser.c index 1af3fde..1a5e2d4 100644 --- a/drivers/input/ps2ser.c +++ b/drivers/in
Re: [U-Boot] Compilation warning: "MSR_RI" redefined
On Apr 2, 2009, at 4:03 AM, Stefan Roese wrote: > On Thursday 02 April 2009, Detlev Zundel wrote: >>> I suggest to either remove this MSI_RI from the header again (it >>> doesn't >>> seem to be used here) or rename it. >> >> Ok, so much for the plan to add the defines not bit by bit as needed, >> but register-wise, while we're there. >> >> I actually would prefer to use UART_MSR_RI, as this is a UART thingy >> rather than to remove the define as we surely use the register, so I >> feel it worthwhile to have the whole definition on board. > > That's my preference as well. Agreed, when I saw MSR_RI I wasn't thinking UART at all. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Compilation warning: "MSR_RI" redefined
On Thursday 02 April 2009, Detlev Zundel wrote: > > I suggest to either remove this MSI_RI from the header again (it doesn't > > seem to be used here) or rename it. > > Ok, so much for the plan to add the defines not bit by bit as needed, > but register-wise, while we're there. > > I actually would prefer to use UART_MSR_RI, as this is a UART thingy > rather than to remove the define as we surely use the register, so I > feel it worthwhile to have the whole definition on board. That's my preference as well. > Let me cook up a rename for the UART stuff.. Thanks. Best regards, Stefan = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Compilation warning: "MSR_RI" redefined
Hi Stefan, > your patch 7b5611cdd12ca0cc33f994f0d4a4454788fc3124 [inka4x0: Add hardware > diagnosis functions for inka4x0] introduced all kind of new defines in the > ns16550.h header resulting in a warning on some 4xx platforms: > > [ste...@kubuntu u-boot (master)]$ ./MAKEALL ml300 > Configuring for ml300 board... > In file included from serial.c:53: > /home/stefan/git/u-boot/u-boot/include/ns16550.h:151:1: warning: "MSR_RI" > redefined > In file included from serial.c:41: > /home/stefan/git/u-boot/u-boot/include/asm/processor.h:48:1: warning: this is > the location of the previous definition > > I suggest to either remove this MSI_RI from the header again (it doesn't seem > to be used here) or rename it. Ok, so much for the plan to add the defines not bit by bit as needed, but register-wise, while we're there. I actually would prefer to use UART_MSR_RI, as this is a UART thingy rather than to remove the define as we surely use the register, so I feel it worthwhile to have the whole definition on board. Let me cook up a rename for the UART stuff.. Cheers Detlev -- We have a live-manual. It's called emacs-de...@gnu.org. You can stick to just reading it, but you can skip to a specific chapter by simply sending an email asking for it ;-) -- Stefan Monnier -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Compilation warning: "MSR_RI" redefined
Hi Detlev, your patch 7b5611cdd12ca0cc33f994f0d4a4454788fc3124 [inka4x0: Add hardware diagnosis functions for inka4x0] introduced all kind of new defines in the ns16550.h header resulting in a warning on some 4xx platforms: [ste...@kubuntu u-boot (master)]$ ./MAKEALL ml300 Configuring for ml300 board... In file included from serial.c:53: /home/stefan/git/u-boot/u-boot/include/ns16550.h:151:1: warning: "MSR_RI" redefined In file included from serial.c:41: /home/stefan/git/u-boot/u-boot/include/asm/processor.h:48:1: warning: this is the location of the previous definition I suggest to either remove this MSI_RI from the header again (it doesn't seem to be used here) or rename it. Thanks. Best regards, Stefan = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot