Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#492 closed enhancement (fixed)

debugging code in time.c should be disabled by default

Reported by: samot Owned by: developers
Priority: lowest Milestone: 0.9/rc6
Component: kernel Version:
Keywords: Cc: vanekt@…

Description

both trunk and whrus brcm 2.4

For perfectionists only :-)

There is a lost debugging code from brcm for blinking LED on OUT2 of external UART.
It is just an useless code executed in time interrupt.

If superio chip is used as external UART, OUT2 tristates IRQ output and serial does not work smooth. That why I want to get rid of it.

--- linux/arch/mips/bcm947xx/time.c	2006-03-27 22:09:12.000000000 +0200
+++ linux/arch/mips/bcm947xx/time.c	2006-04-05 06:58:23.000000000 +0200
@@ -36,7 +37,10 @@
 
 extern int panic_timeout;
 static int watchdog = 0;
+
+#ifdef DEBUG_LED_BLINK
 static u8 *mcr = NULL;
+#endif
 
 void __init
 bcm947xx_time_init(void)
@@ -73,12 +77,14 @@
 	/* Set panic timeout in seconds */
 	panic_timeout = watchdog / 1000;
 
+#ifdef DEBUG_LED_BLINK
 	/* Setup blink */
 	if ((eir = sb_setcore(sbh, SB_EXTIF, 0))) {
 		sbconfig_t *sb = (sbconfig_t *)((unsigned int) eir + SBCONFIGOFF);
 		unsigned long base = EXTIF_CFGIF_BASE(sb_base(readl(&sb->sbadmatch1)));
 		mcr = (u8 *) ioremap_nocache(base + UART_MCR, 1);
 	}
+#endif
 }
 
 static void
@@ -94,10 +100,12 @@
 #ifdef	CONFIG_HWSIM
 	(*((int *)0xa0000f1c))++;
 #else
+#ifdef DEBUG_LED_BLINK
 	/* Blink one of the LEDs in the external UART */
 	if (mcr && !(jiffies % (HZ/2)))
 		writeb(readb(mcr) ^ UART_MCR_OUT2, mcr);
 #endif
+#endif
 }
 
 static struct irqaction bcm947xx_timer_irqaction = {

Attachments (0)

Change History (3)

comment:1 Changed 12 years ago by anonymous

IMHO, this really looks like something that should be applied.
-albertr

comment:2 Changed 12 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

fixed in [3868]

comment:3 Changed 12 years ago by mbm

  • Milestone set to 1.0-rc6

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.