From: Ian Campbell Subject: Re: [PATCH V2 29/33] xen/arm: Add exynos 4210 UART support Date: Thu, 9 May 2013 11:13:54 +0100 Message-ID: <1368094434.17285.122.camel@zakaz.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Anthony Perard , Stefano Stabellini , "patches@linaro.org" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2013-05-08 at 03:33 +0100, Julien Grall wrote: > + /* TODO: should be updated */ > + /* Baud rate already set: read it out from the divisor latch. */ > +#if 0 > + divisor = (uart->regs[IBRD] << 6) | uart->regs[FBRD]; > + uart->baud = (uart->clock_hz << 2) / divisor; > +#endif Can we drop the #if 0, extending the comment if necessary, or if possible drop the whole thing. > +static int __init exynos4210_uart_init(struct dt_device_node *dev, > + const void *data) > +{ > + const struct serial_arm_defaults *defaults = data; > + struct exynos4210_uart *uart; > + int res; > + > + if ( (defaults->index < 0) || (defaults->index > 1) ) > + return -EINVAL; > + > + uart = &exynos4210_com[defaults->index]; > + > + /* uart->clock_hz = 0x16e3600; */ > + uart->baud = BAUD_AUTO;//115200; Drop the //115200. > diff --git a/xen/include/asm-arm/exynos4210-uart.h b/xen/include/asm-arm/exynos4210-uart.h > new file mode 100644 > index 0000000..1527521 > --- /dev/null > +++ b/xen/include/asm-arm/exynos4210-uart.h > @@ -0,0 +1,111 @@ > +/* > + * xen/include/asm-arm/exynos4210-uart.h > + * > + * Common constant definition between ealry printk and the UART driver "early" If you fix all the above then Acked-by: Ian Campbell Ian.