From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 9 Aug 2008 11:13:23 +0200 Subject: [U-Boot-Users] [PATCH 5/7 v6] serial: add S3C64XX serial driver In-Reply-To: References: Message-ID: <20080809091323.GD18040@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > + u32 reg; > + u32 pclk_ratio = get_PCLK() / gd->baudrate; > + int i; > + IMHO it's still obscur > + /* PCLK / (16 * baudrate) - 1 */ > + reg = pclk_ratio / 16 - 1; > + /* i = pclk_ratio % 16 */ > + i = pclk_ratio - (reg + 1) * 16; > + > + uart->UBRDIV = reg; > + uart->UDIVSLOT = udivslot[i]; > + > + for (i = 0; i < 100; i++) > + barrier(); > +} Best Regards, J.