Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 May 2014 14:37:28 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
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
Message-ID:  <201405141437.s4EEbS1K069815@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <gonzo@freebsd.org>
+ * 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405141437.s4EEbS1K069815>