From owner-svn-src-head@freebsd.org Mon Jan 18 17:41:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F6B6A868DC; Mon, 18 Jan 2016 17:41:40 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 0079119DB; Mon, 18 Jan 2016 17:41:39 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (global-5-143.nat-2.net.cam.ac.uk [131.111.5.143]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id A2EB6D7A17; Mon, 18 Jan 2016 17:41:07 +0000 (UTC) Date: Mon, 18 Jan 2016 17:41:06 +0000 From: Andrew Turner To: Nathan Whitehorn Cc: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r294280 - head/sys/dev/uart Message-ID: <20160118174106.57ce36e6@zapp> In-Reply-To: <569D2107.8030302@freebsd.org> References: <201601181703.u0IH3Cxa031629@repo.freebsd.org> <569D2107.8030302@freebsd.org> X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2016 17:41:40 -0000 On Mon, 18 Jan 2016 09:29:43 -0800 Nathan Whitehorn wrote: > Nice work! You can remove the #include in this file > now, since it no longer depends on anything in dev/fdt. > -Nathan I think we can also remove setting uart_bus_space_mem in uart_cpu_fdt.c. Andrew > > On 01/18/16 09:03, Ian Lepore wrote: > > Author: ian > > Date: Mon Jan 18 17:03:12 2016 > > New Revision: 294280 > > URL: https://svnweb.freebsd.org/changeset/base/294280 > > > > Log: > > Use OF_decode_addr() to create a bus_space tag and handle for > > the console on FDT/OFW platforms. > > > > After the refactoring of the powerpc code so that > > OF_decode_addr() is usable on all FDT/OFW platforms, this switches > > uart(4) to using it. > > Differential Revision: https://reviews.freebsd.org/D4675 > > > > Modified: > > head/sys/dev/uart/uart_cpu_fdt.c > > > > Modified: head/sys/dev/uart/uart_cpu_fdt.c > > ============================================================================== > > --- head/sys/dev/uart/uart_cpu_fdt.c Mon Jan 18 16:54:26 > > 2016 (r294279) +++ head/sys/dev/uart/uart_cpu_fdt.c > > Mon Jan 18 17:03:12 2016 (r294280) @@ -133,7 +133,6 @@ > > uart_cpu_getdev(int devtype, struct uart struct uart_class *class; > > phandle_t node, chosen; > > pcell_t shift, br, rclk; > > - u_long start, size, pbase, psize; > > char *cp; > > int err; > > > > @@ -212,16 +211,6 @@ uart_cpu_getdev(int devtype, struct uart > > di->databits = 8; > > di->stopbits = 1; > > di->parity = UART_PARITY_NONE; > > - di->bas.bst = uart_bus_space_mem; > > > > - err = fdt_regsize(node, &start, &size); > > - if (err) > > - return (ENXIO); > > - err = fdt_get_range(OF_parent(node), 0, &pbase, &psize); > > - if (err) > > - pbase = 0; > > - > > - start += pbase; > > - > > - return (bus_space_map(di->bas.bst, start, size, 0, > > &di->bas.bsh)); > > + return (OF_decode_addr(node, 0, &di->bas.bst, > > &di->bas.bsh)); } > > > >