Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 93117
Collapse All | Expand All

(-)1.38/drivers/serial/sunsab.c (-5 / +11 lines)
Lines 682-688 Link Here
682
682
683
/* Internal routine, port->lock is held and local interrupts are disabled.  */
683
/* Internal routine, port->lock is held and local interrupts are disabled.  */
684
static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cflag,
684
static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cflag,
685
				  unsigned int iflag, int baud)
685
				  unsigned int iflag, unsigned int baud,
686
				  unsigned int quot)
686
{
687
{
687
	unsigned int ebrg;
688
	unsigned int ebrg;
688
	unsigned char dafo;
689
	unsigned char dafo;
Lines 766-771 Link Here
766
		up->port.ignore_status_mask |= (SAB82532_ISR0_RPF |
767
		up->port.ignore_status_mask |= (SAB82532_ISR0_RPF |
767
						SAB82532_ISR0_TCD);
768
						SAB82532_ISR0_TCD);
768
769
770
	uart_update_timeout(&up->port, cflag,
771
			    (up->port.uartclk / (16 * quot)));
772
769
	/* Now bang the new settings into the chip.  */
773
	/* Now bang the new settings into the chip.  */
770
	sunsab_cec_wait(up);
774
	sunsab_cec_wait(up);
771
	sunsab_tec_wait(up);
775
	sunsab_tec_wait(up);
Lines 784-793 Link Here
784
{
788
{
785
	struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
789
	struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
786
	unsigned long flags;
790
	unsigned long flags;
787
	int baud = uart_get_baud_rate(port, termios, old, 0, 4000000);
791
	unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000);
792
	unsigned int quot = uart_get_divisor(port, baud);
788
793
789
	spin_lock_irqsave(&up->port.lock, flags);
794
	spin_lock_irqsave(&up->port.lock, flags);
790
	sunsab_convert_to_sab(up, termios->c_cflag, termios->c_iflag, baud);
795
	sunsab_convert_to_sab(up, termios->c_cflag, termios->c_iflag, baud, quot);
791
	spin_unlock_irqrestore(&up->port.lock, flags);
796
	spin_unlock_irqrestore(&up->port.lock, flags);
792
}
797
}
793
798
Lines 880-886 Link Here
880
{
885
{
881
	struct uart_sunsab_port *up = &sunsab_ports[con->index];
886
	struct uart_sunsab_port *up = &sunsab_ports[con->index];
882
	unsigned long flags;
887
	unsigned long flags;
883
	int baud;
888
	unsigned int baud, quot;
884
889
885
	printk("Console: ttyS%d (SAB82532)\n",
890
	printk("Console: ttyS%d (SAB82532)\n",
886
	       (sunsab_reg.minor - 64) + con->index);
891
	       (sunsab_reg.minor - 64) + con->index);
Lines 926-932 Link Here
926
				SAB82532_IMR1_XPR;
931
				SAB82532_IMR1_XPR;
927
	writeb(up->interrupt_mask1, &up->regs->w.imr1);
932
	writeb(up->interrupt_mask1, &up->regs->w.imr1);
928
933
929
	sunsab_convert_to_sab(up, con->cflag, 0, baud);
934
	quot = uart_get_divisor(&up->port, baud);
935
	sunsab_convert_to_sab(up, con->cflag, 0, baud, quot);
930
	sunsab_set_mctrl(&up->port, TIOCM_DTR | TIOCM_RTS);
936
	sunsab_set_mctrl(&up->port, TIOCM_DTR | TIOCM_RTS);
931
937
932
	spin_unlock_irqrestore(&up->port.lock, flags);
938
	spin_unlock_irqrestore(&up->port.lock, flags);

Return to bug 93117