From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 19:27:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E06921065670; Mon, 25 Jan 2010 19:27:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D02AA8FC0C; Mon, 25 Jan 2010 19:27:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PJRKHb056046; Mon, 25 Jan 2010 19:27:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PJRKEU056043; Mon, 25 Jan 2010 19:27:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001251927.o0PJRKEU056043@svn.freebsd.org> From: Warner Losh Date: Mon, 25 Jan 2010 19:27:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202985 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 19:27:21 -0000 Author: imp Date: Mon Jan 25 19:27:20 2010 New Revision: 202985 URL: http://svn.freebsd.org/changeset/base/202985 Log: Export knowledge of the special bus space we use for the console to obio. Take advantage of the fact that obio only really supports uart at the moment to use the uart bus tag always for IOPORT allocations. # this needs to be redone to conform to FreeBSD standards and allow for # additional drivers for SoC hardware to attach Modified: head/sys/mips/cavium/obio.c head/sys/mips/cavium/uart_cpu_octeonusart.c Modified: head/sys/mips/cavium/obio.c ============================================================================== --- head/sys/mips/cavium/obio.c Mon Jan 25 19:25:21 2010 (r202984) +++ head/sys/mips/cavium/obio.c Mon Jan 25 19:27:20 2010 (r202985) @@ -36,8 +36,8 @@ */ /* - * On-board device autoconfiguration support for Intel IQ80321 - * evaluation boards. + * On-board device autoconfiguration support for Cavium OCTEON 1 family of + * SoC devices. */ #include @@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include +extern struct bus_space octeon_uart_tag; + int obio_probe(device_t); int obio_attach(device_t); @@ -125,7 +127,7 @@ obio_alloc_resource(device_t bus, device return (NULL); case SYS_RES_IOPORT: rm = &sc->oba_rman; - bt = sc->oba_st; + bt = &octeon_uart_tag; bh = device_get_unit(child) ? OCTEON_MIO_UART1 : OCTEON_MIO_UART0; start = bh; Modified: head/sys/mips/cavium/uart_cpu_octeonusart.c ============================================================================== --- head/sys/mips/cavium/uart_cpu_octeonusart.c Mon Jan 25 19:25:21 2010 (r202984) +++ head/sys/mips/cavium/uart_cpu_octeonusart.c Mon Jan 25 19:27:20 2010 (r202985) @@ -70,7 +70,6 @@ __FBSDID("$FreeBSD$"); * 64-bit word bus that's on the octeon. We only support simple read/write * in this space. Everything else is undefined. */ - static uint8_t ou_bs_r_1(void *t, bus_space_handle_t handle, bus_size_t offset) { @@ -127,7 +126,7 @@ ou_bs_w_8(void *t, bus_space_handle_t bs oct_write64(bsh + (offset << 3), value); } -static struct bus_space octeon_uart_tag = { +struct bus_space octeon_uart_tag = { .bs_map = generic_bs_map, .bs_unmap = generic_bs_unmap, .bs_subregion = generic_bs_subregion,