Module Name: src
Committed By: tsutsui
Date: Sat May 4 09:03:08 UTC 2019
Modified Files:
src/sys/arch/atari/pci: pci_hades.c pci_tseng.c pci_vga.c
Log Message:
Use const for register values.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/atari/pci/pci_hades.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/atari/pci/pci_tseng.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/atari/pci/pci_vga.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/atari/pci/pci_hades.c
diff -u src/sys/arch/atari/pci/pci_hades.c:1.15 src/sys/arch/atari/pci/pci_hades.c:1.16
--- src/sys/arch/atari/pci/pci_hades.c:1.15 Sat May 4 08:20:05 2019
+++ src/sys/arch/atari/pci/pci_hades.c Sat May 4 09:03:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_hades.c,v 1.15 2019/05/04 08:20:05 tsutsui Exp $ */
+/* $NetBSD: pci_hades.c,v 1.16 2019/05/04 09:03:08 tsutsui Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman. All rights reserved.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_hades.c,v 1.15 2019/05/04 08:20:05 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_hades.c,v 1.16 2019/05/04 09:03:08 tsutsui Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -206,21 +206,21 @@ pci_intr_disestablish(pci_chipset_tag_t
*/
#define PCI_LINMEMBASE 0x0e000000
-static uint8_t crt_tab[] = {
+static const uint8_t crt_tab[] = {
0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f,
0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00,
0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96, 0xb9, 0xa3,
0xff };
-static uint8_t seq_tab[] = {
+static const uint8_t seq_tab[] = {
0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00
};
-static uint8_t attr_tab[] = {
+static const uint8_t attr_tab[] = {
0x0c, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00
};
-static uint8_t gdc_tab[] = {
+static const uint8_t gdc_tab[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0xff
};
Index: src/sys/arch/atari/pci/pci_tseng.c
diff -u src/sys/arch/atari/pci/pci_tseng.c:1.12 src/sys/arch/atari/pci/pci_tseng.c:1.13
--- src/sys/arch/atari/pci/pci_tseng.c:1.12 Sat May 4 08:20:05 2019
+++ src/sys/arch/atari/pci/pci_tseng.c Sat May 4 09:03:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_tseng.c,v 1.12 2019/05/04 08:20:05 tsutsui Exp $ */
+/* $NetBSD: pci_tseng.c,v 1.13 2019/05/04 09:03:08 tsutsui Exp $ */
/*
* Copyright (c) 1999 Leo Weppelman. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_tseng.c,v 1.12 2019/05/04 08:20:05 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_tseng.c,v 1.13 2019/05/04 09:03:08 tsutsui Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@@ -44,19 +44,19 @@ static void et6000_init(volatile uint8_t
/*
* Use tables for the card init...
*/
-static uint8_t seq_tab[] = {
+static const uint8_t seq_tab[] = {
0x03, 0x01, 0x03, 0x00, 0x02, 0x00, 0x00, 0xb4
};
-static uint8_t gfx_tab[] = {
+static const uint8_t gfx_tab[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff
};
-static uint8_t attr_tab[] = {
+static const uint8_t attr_tab[] = {
0x0a, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00
};
-static uint8_t crt_tab[] = {
+static const uint8_t crt_tab[] = {
0x60, 0x53, 0x4f, 0x94, 0x56, 0x05, 0xc1, 0x1f,
0x00, 0x4f, 0x00, 0x0f, 0x00, 0x00, 0x07, 0x80,
0x98, 0x3d, 0x8f, 0x28, 0x0f, 0x8f, 0xc2, 0xa3,
@@ -71,7 +71,7 @@ static uint8_t crt_tab[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
-static uint8_t ras_cas_tab[] = {
+static const uint8_t ras_cas_tab[] = {
0x11, 0x14, 0x15
};
Index: src/sys/arch/atari/pci/pci_vga.c
diff -u src/sys/arch/atari/pci/pci_vga.c:1.16 src/sys/arch/atari/pci/pci_vga.c:1.17
--- src/sys/arch/atari/pci/pci_vga.c:1.16 Sat May 4 08:30:06 2019
+++ src/sys/arch/atari/pci/pci_vga.c Sat May 4 09:03:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_vga.c,v 1.16 2019/05/04 08:30:06 tsutsui Exp $ */
+/* $NetBSD: pci_vga.c,v 1.17 2019/05/04 09:03:08 tsutsui Exp $ */
/*
* Copyright (c) 1999 Leo Weppelman. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.16 2019/05/04 08:30:06 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.17 2019/05/04 09:03:08 tsutsui Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@@ -55,8 +55,11 @@ extern font_info font_info_8x8;
extern font_info font_info_8x16;
/* Console colors */
-static uint8_t conscolors[3][3] = { /* background, foreground, hilite */
- {0x0, 0x0, 0x0}, {0x30, 0x30, 0x30}, { 0x3f, 0x3f, 0x3f}
+static const uint8_t conscolors[3][3] = {
+ /* background, foreground, hilite */
+ { 0x00, 0x00, 0x00 },
+ { 0x30, 0x30, 0x30 },
+ { 0x3f, 0x3f, 0x3f }
};
static bus_space_tag_t vga_iot, vga_memt;