CVS commit: src/sys/arch/cobalt/dev

2020-03-01 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Mar  2 01:46:02 UTC 2020

Modified Files:
src/sys/arch/cobalt/dev: gt.c

Log Message:
The PCI I/O space extent map needs to reflect the BUS_{START,END}
not the SYS_{START,END}.

This fixes mapping of the viaide DMA registers on my Qube2.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/cobalt/dev/gt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/cobalt/dev/gt.c
diff -u src/sys/arch/cobalt/dev/gt.c:1.29 src/sys/arch/cobalt/dev/gt.c:1.30
--- src/sys/arch/cobalt/dev/gt.c:1.29	Sat Jan 20 13:56:09 2018
+++ src/sys/arch/cobalt/dev/gt.c	Mon Mar  2 01:46:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: gt.c,v 1.29 2018/01/20 13:56:09 skrll Exp $	*/
+/*	$NetBSD: gt.c,v 1.30 2020/03/02 01:46:02 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang.  All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.29 2018/01/20 13:56:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.30 2020/03/02 01:46:02 thorpej Exp $");
 
 #include "opt_pci.h"
 #include "pci.h"
@@ -132,7 +132,7 @@ gt_attach(device_t parent, device_t self
 	pc->pc_bsh = sc->sc_bsh;
 
 #ifdef PCI_NETBSD_CONFIGURE
-	pc->pc_ioext = extent_create("pciio", 0x10001000, 0x11ff,
+	pc->pc_ioext = extent_create("pciio", 0x1000, 0x01ff,
 	NULL, 0, EX_NOWAIT);
 	pc->pc_memext = extent_create("pcimem", 0x1200, 0x13ff,
 	NULL, 0, EX_NOWAIT);



CVS commit: src/sys/arch/cobalt/dev

2011-04-15 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Apr 15 21:03:31 UTC 2011

Modified Files:
src/sys/arch/cobalt/dev: gt.c

Log Message:
Don't set pba.pba_flags twice.  No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/cobalt/dev/gt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/cobalt/dev/gt.c
diff -u src/sys/arch/cobalt/dev/gt.c:1.23 src/sys/arch/cobalt/dev/gt.c:1.24
--- src/sys/arch/cobalt/dev/gt.c:1.23	Sun Feb 20 07:54:11 2011
+++ src/sys/arch/cobalt/dev/gt.c	Fri Apr 15 21:03:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: gt.c,v 1.23 2011/02/20 07:54:11 matt Exp $	*/
+/*	$NetBSD: gt.c,v 1.24 2011/04/15 21:03:31 dyoung Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang.  All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.23 2011/02/20 07:54:11 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.24 2011/04/15 21:03:31 dyoung Exp $");
 
 #include "opt_pci.h"
 #include "pci.h"
@@ -135,7 +135,6 @@
 #endif
 	pba.pba_dmat = &pci_bus_dma_tag;
 	pba.pba_dmat64 = NULL;
-	pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
 	pba.pba_bus = 0;
 	pba.pba_bridgetag = NULL;
 	pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |



CVS commit: src/sys/arch/cobalt/dev

2009-08-31 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Aug 31 15:18:55 UTC 2009

Modified Files:
src/sys/arch/cobalt/dev: panel.c

Log Message:
Replace shutdownhook_establish(9) with pmf_device_register1(9).
Also check howto to print appropriate "Rebooting..." or "Halting..." messages.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cobalt/dev/panel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/cobalt/dev/panel.c
diff -u src/sys/arch/cobalt/dev/panel.c:1.19 src/sys/arch/cobalt/dev/panel.c:1.20
--- src/sys/arch/cobalt/dev/panel.c:1.19	Thu Aug 20 11:43:59 2009
+++ src/sys/arch/cobalt/dev/panel.c	Mon Aug 31 15:18:55 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: panel.c,v 1.19 2009/08/20 11:43:59 tsutsui Exp $ */
+/* $NetBSD: panel.c,v 1.20 2009/08/31 15:18:55 tsutsui Exp $ */
 
 /*
  * Copyright (c) 2002 Dennis I. Chernoivanov
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.19 2009/08/20 11:43:59 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.20 2009/08/31 15:18:55 tsutsui Exp $");
 
 #include 
 #include 
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -76,14 +77,18 @@
 	"NetBSD/cobalt   ",
 	"Starting up...  "
 };
-static const struct lcd_message shutdown_message = {
+static const struct lcd_message halt_message = {
 	"NetBSD/cobalt   ",
-	"Shutting down..."
+	"Halting...  "
+};
+static const struct lcd_message reboot_message = {
+	"NetBSD/cobalt   ",
+	"Rebooting..."
 };
 
 static int	panel_match(device_t, cfdata_t, void *);
 static void	panel_attach(device_t, device_t, void *);
-static void	panel_shutdown(void *);
+static bool	panel_shutdown(device_t, int);
 
 static void	panel_soft(void *);
 
@@ -158,7 +163,7 @@
 	hd44780_ddram_io(&sc->sc_lcd, sc->sc_lcd.sc_curchip, &io,
 	HD_DDRAM_WRITE);
 
-	shutdownhook_establish(panel_shutdown, sc);
+	pmf_device_register1(self, NULL, NULL, panel_shutdown);
 
 	sc->sc_kp.sc_iot = maa->ma_iot;
 	sc->sc_kp.sc_ioh = MIPS_PHYS_TO_KSEG1(PANEL_BASE); /* XXX */
@@ -173,18 +178,23 @@
 	selinit(&sc->sc_selq);
 }
 
-static void
-panel_shutdown(void *arg)
+static bool
+panel_shutdown(device_t self, int howto)
 {
-	struct panel_softc *sc = arg;
+	struct panel_softc *sc = device_private(self);
 	struct hd44780_io io;
 
 	/* Goodbye World */
 	io.dat = 0;
 	io.len = PANEL_VCOLS * PANEL_ROWS;
-	memcpy(io.buf, &shutdown_message, io.len);
+	if (howto & RB_HALT)
+		memcpy(io.buf, &halt_message, io.len);
+	else
+		memcpy(io.buf, &reboot_message, io.len);
 	hd44780_ddram_io(&sc->sc_lcd, sc->sc_lcd.sc_curchip, &io,
 	HD_DDRAM_WRITE);
+
+	return true;
 }
 
 static uint8_t



CVS commit: src/sys/arch/cobalt/dev

2009-08-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Aug 20 11:44:00 UTC 2009

Modified Files:
src/sys/arch/cobalt/dev: panel.c

Log Message:
Adjust attach message for failure path (found on gxemul).


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cobalt/dev/panel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/cobalt/dev/panel.c
diff -u src/sys/arch/cobalt/dev/panel.c:1.18 src/sys/arch/cobalt/dev/panel.c:1.19
--- src/sys/arch/cobalt/dev/panel.c:1.18	Fri May  9 10:59:55 2008
+++ src/sys/arch/cobalt/dev/panel.c	Thu Aug 20 11:43:59 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: panel.c,v 1.18 2008/05/09 10:59:55 tsutsui Exp $ */
+/* $NetBSD: panel.c,v 1.19 2009/08/20 11:43:59 tsutsui Exp $ */
 
 /*
  * Copyright (c) 2002 Dennis I. Chernoivanov
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.18 2008/05/09 10:59:55 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.19 2009/08/20 11:43:59 tsutsui Exp $");
 
 #include 
 #include 
@@ -139,6 +139,8 @@
 	bus_space_subregion(sc->sc_lcd.sc_iot, sc->sc_lcd.sc_ioir, DATA_OFFSET,
 	1, &sc->sc_lcd.sc_iodr);
 
+	printf("\n");
+
 	sc->sc_lcd.sc_dev_ok = 1;
 	sc->sc_lcd.sc_cols = PANEL_COLS;
 	sc->sc_lcd.sc_vcols = PANEL_VCOLS;
@@ -169,8 +171,6 @@
 
 	callout_init(&sc->sc_callout, 0);
 	selinit(&sc->sc_selq);
-
-	printf("\n");
 }
 
 static void