From owner-p4-projects@FreeBSD.ORG Mon Dec 19 21:36:28 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C80016A422; Mon, 19 Dec 2005 21:36:28 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2328416A41F for ; Mon, 19 Dec 2005 21:36:28 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA57443D60 for ; Mon, 19 Dec 2005 21:36:27 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jBJLaRtT033931 for ; Mon, 19 Dec 2005 21:36:27 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jBJLaRS8033928 for perforce@freebsd.org; Mon, 19 Dec 2005 21:36:27 GMT (envelope-from imp@freebsd.org) Date: Mon, 19 Dec 2005 21:36:27 GMT Message-Id: <200512192136.jBJLaRS8033928@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 88426 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2005 21:36:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=88426 Change 88426 by imp@imp_Speedy on 2005/12/19 21:35:29 Default RCLK is the system's master clock. Add some comments. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/uart_dev_at91usart.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/uart_dev_at91usart.c#3 (text+ko) ==== @@ -43,7 +43,7 @@ #include "uart_if.h" -#define DEFAULT_RCLK 3686400 +#define DEFAULT_RCLK AT91C_MASTER_CLOCK /* * Low-level UART interface. @@ -71,9 +71,13 @@ static int usart_at91rm92_probe(struct uart_bas *bas) { + /* We know that this is always here */ return (0); } +/* + * Initialize this device (I think as the console) + */ static void usart_at91rm92_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) @@ -84,12 +88,19 @@ uart_setreg(bas, USART_IER, USART_CSR_TXRDY | USART_CSR_RXRDY); } +/* + * Free resources now that we're no longer the console. + */ static void usart_at91rm92_term(struct uart_bas *bas) { /* XXX */ } +/* + * Put a character of console output (so we do it here polling rather than + * interrutp driven). + */ static void usart_at91rm92_putc(struct uart_bas *bas, int c) { @@ -99,6 +110,9 @@ uart_setreg(bas, USART_THR, c); } +/* + * Poll for a character available + */ static int usart_at91rm92_poll(struct uart_bas *bas) { @@ -108,6 +122,9 @@ return (uart_getreg(bas, USART_RHR) & 0xff); } +/* + * Block waiting for a character. + */ static int usart_at91rm92_getc(struct uart_bas *bas) { @@ -212,5 +229,5 @@ usart_at91rm92_methods, 1, .uc_range = 8, - .uc_rclk = 3686400 + .uc_rclk = DEFAULT_RCLK };