From owner-svn-src-all@FreeBSD.ORG Wed May 14 14:37:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B46BF2F5; Wed, 14 May 2014 14:37:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95005263A; Wed, 14 May 2014 14:37:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EEbS6Z069818; Wed, 14 May 2014 14:37:28 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EEbS1K069815; Wed, 14 May 2014 14:37:28 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405141437.s4EEbS1K069815@svn.freebsd.org> From: Ian Lepore Date: Wed, 14 May 2014 14:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266022 - in stable/10/sys/arm: broadcom/bcm2835 conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Wed, 14 May 2014 14:37:28 -0000 Author: ian Date: Wed May 14 14:37:27 2014 New Revision: 266022 URL: http://svnweb.freebsd.org/changeset/base/266022 Log: MFC r259517, r259518 Add vt support for RPi. (No early stage yet.) Added: stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c - copied, changed from r259517, head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Modified: stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 stable/10/sys/arm/conf/RPI-B Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c (from r259517, head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c) ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Tue Dec 17 15:23:47 2013 (r259517, copy source) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Wed May 14 14:37:27 2014 (r266022) @@ -1,7 +1,11 @@ /*- * Copyright (c) 2012 Oleksandr Tymoshenko + * Copyright (c) 2012, 2013 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Oleksandr Rybalko + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -99,13 +103,14 @@ struct bcmsc_softc { static int bcm_fb_probe(device_t); static int bcm_fb_attach(device_t); -static void bcm_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err); +static void bcm_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, + int err); static void bcm_fb_init(void *arg) { - struct bcmsc_softc *sc = arg; - volatile struct bcm_fb_config* fb_config = sc->fb_config; + volatile struct bcm_fb_config *fb_config; + struct bcmsc_softc *sc; struct fb_info *info; phandle_t node; pcell_t cell; @@ -113,6 +118,8 @@ bcm_fb_init(void *arg) device_t fbd; int err = 0; + sc = arg; + fb_config = sc->fb_config; node = ofw_bus_get_node(sc->dev); fb_config->xres = 0; @@ -153,23 +160,25 @@ bcm_fb_init(void *arg) BUS_DMASYNC_POSTREAD); if (fb_config->base != 0) { - device_printf(sc->dev, "%dx%d(%dx%d@%d,%d) %dbpp\n", + device_printf(sc->dev, "%dx%d(%dx%d@%d,%d) %dbpp\n", fb_config->xres, fb_config->yres, fb_config->vxres, fb_config->vyres, fb_config->xoffset, fb_config->yoffset, fb_config->bpp); - device_printf(sc->dev, "pitch %d, base 0x%08x, screen_size %d\n", + device_printf(sc->dev, "pitch %d, base 0x%08x, screen_size %d\n", fb_config->pitch, fb_config->base, fb_config->screen_size); - info = malloc(sizeof(struct fb_info), M_DEVBUF, M_WAITOK | M_ZERO); + info = malloc(sizeof(struct fb_info), M_DEVBUF, + M_WAITOK | M_ZERO); info->fb_name = device_get_nameunit(sc->dev); - info->fb_vbase = (intptr_t)pmap_mapdev(fb_config->base, fb_config->screen_size); + info->fb_vbase = (intptr_t)pmap_mapdev(fb_config->base, + fb_config->screen_size); info->fb_pbase = fb_config->base; info->fb_size = fb_config->screen_size; info->fb_bpp = info->fb_depth = fb_config->bpp; @@ -179,7 +188,8 @@ bcm_fb_init(void *arg) sc->info = info; - fbd = device_add_child(sc->dev, "fbd", device_get_unit(sc->dev)); + fbd = device_add_child(sc->dev, "fbd", + device_get_unit(sc->dev)); if (fbd == NULL) { device_printf(sc->dev, "Failed to add fbd child\n"); return; @@ -244,8 +254,8 @@ bcm_fb_attach(device_t dev) goto fail; } - /* - * We have to wait until interrupts are enabled. + /* + * We have to wait until interrupts are enabled. * Mailbox relies on it to get data from VideoCore */ sc->init_hook.ich_func = bcm_fb_init; Modified: stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Wed May 14 14:19:57 2014 (r266021) +++ stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Wed May 14 14:37:27 2014 (r266022) @@ -3,6 +3,7 @@ arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc arm/broadcom/bcm2835/bcm2835_dma.c standard arm/broadcom/bcm2835/bcm2835_fb.c optional sc +arm/broadcom/bcm2835/bcm2835_fbd.c optional vt arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio arm/broadcom/bcm2835/bcm2835_intr.c standard arm/broadcom/bcm2835/bcm2835_machdep.c standard Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Wed May 14 14:19:57 2014 (r266021) +++ stable/10/sys/arm/conf/RPI-B Wed May 14 14:37:27 2014 (r266022) @@ -66,7 +66,7 @@ device pl011 device pty # Comment following lines for boot console on serial port -device sc +device vt device kbdmux options SC_DFLT_FONT # compile font in makeoptions SC_DFLT_FONT=cp437