From e147701ea73ae6d30de74a6b2f0c137eddbeee5b Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Tue, 13 Dec 2011 18:17:31 +0100 Subject: [PATCH] ecc(4): Move from sys/dev/bridge to sys/dev/misc. While here, make it compilable into the kernel and add it to the LINTs. --- share/man/man4/ecc.4 | 10 +++++++++- sys/conf/files | 3 +++ sys/config/LINT | 2 ++ sys/config/LINT64 | 3 ++- sys/dev/Makefile | 1 - sys/dev/bridge/Makefile | 6 ------ sys/dev/misc/Makefile | 2 +- sys/dev/{bridge => misc}/ecc/Makefile | 3 --- sys/dev/{bridge => misc}/ecc/ecc_amd8000.c | 8 ++++---- sys/dev/{bridge => misc}/ecc/ecc_e31200.c | 10 +++++----- sys/dev/{bridge => misc}/ecc/ecc_e31200_reg.h | 0 sys/dev/{bridge => misc}/ecc/ecc_x3400.c | 10 +++++----- sys/dev/{bridge => misc}/ecc/ecc_x3400_reg.h | 0 13 files changed, 31 insertions(+), 27 deletions(-) delete mode 100644 sys/dev/bridge/Makefile rename sys/dev/{bridge => misc}/ecc/Makefile (72%) rename sys/dev/{bridge => misc}/ecc/ecc_amd8000.c (99%) rename sys/dev/{bridge => misc}/ecc/ecc_e31200.c (99%) rename sys/dev/{bridge => misc}/ecc/ecc_e31200_reg.h (100%) rename sys/dev/{bridge => misc}/ecc/ecc_x3400.c (99%) rename sys/dev/{bridge => misc}/ecc/ecc_x3400_reg.h (100%) diff --git a/share/man/man4/ecc.4 b/share/man/man4/ecc.4 index 7de2f3efd9..b35a05a210 100644 --- a/share/man/man4/ecc.4 +++ b/share/man/man4/ecc.4 @@ -35,7 +35,15 @@ .Nm ecc .Nd ECC memory controller support .Sh SYNOPSIS -To load this driver as a module at boot time, place the following line in +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ecc" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent ecc_load="YES" diff --git a/sys/conf/files b/sys/conf/files index 3077b98984..0559d46bc9 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1786,6 +1786,9 @@ bus/isa/isa_if.m optional isa bus/isa/isa_common.c optional isa bus/isa/isahint.c optional isa bus/isa/pnpeat.c optional isa +dev/misc/ecc/ecc_amd8000.c optional ecc +dev/misc/ecc/ecc_e31200.c optional ecc +dev/misc/ecc/ecc_x3400.c optional ecc dev/misc/joy/joy.c optional joy dev/misc/kbdmux/kbdmux.c optional kbdmux dev/misc/orm/orm.c optional isa diff --git a/sys/config/LINT b/sys/config/LINT index 87dd07f409..defec90a64 100644 --- a/sys/config/LINT +++ b/sys/config/LINT @@ -1527,6 +1527,7 @@ device "snd_uaudio" # apm: Laptop Advanced Power Management (experimental) # bktr: Brooktree bt848/848a/849a/878/879 video capture and TV Tuner board # cy: Cyclades serial driver +# ecc: ECC memory controller # joy: joystick # rp: Comtrol Rocketport(ISA) - single card # si: Specialix SI/XIO 4-32 port terminal multiplexor @@ -1587,6 +1588,7 @@ device "snd_uaudio" # For the PCI cards, "device stl" will suffice. device apm0 +device ecc device joy0 at isa? port IO_GAME device cy0 at isa? irq 10 iomem 0xd4000 iosiz 0x2000 device nrp diff --git a/sys/config/LINT64 b/sys/config/LINT64 index 15cdbc2e0a..c17a6b447c 100644 --- a/sys/config/LINT64 +++ b/sys/config/LINT64 @@ -1337,6 +1337,7 @@ device "snd_uaudio" # Miscellaneous hardware: # # bktr: Brooktree bt848/848a/849a/878/879 video capture and TV Tuner board +# ecc: ECC memory controller # joy: joystick # rp: Comtrol Rocketport(ISA) - single card # si: Specialix SI/XIO 4-32 port terminal multiplexor @@ -1375,7 +1376,7 @@ device "snd_uaudio" # The Rev 2 host cards use a 32K chunk, on a 32K boundary. # The cards can use an IRQ of 11, 12 or 15. -# for the SoundBlaster 16 multicd - up to 4 devices +device ecc device joy0 at isa? port IO_GAME device nrp #device rp0 at isa? port 0x280 diff --git a/sys/dev/Makefile b/sys/dev/Makefile index 16f751039e..9f66709d6d 100644 --- a/sys/dev/Makefile +++ b/sys/dev/Makefile @@ -3,7 +3,6 @@ SUBDIR= \ acpica5 \ agp \ - bridge \ crypto \ disk \ drm \ diff --git a/sys/dev/bridge/Makefile b/sys/dev/bridge/Makefile deleted file mode 100644 index 50265ce631..0000000000 --- a/sys/dev/bridge/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $DragonFly: src/sys/dev/bridge/Makefile,v 1.1 2006/10/10 18:31:02 dillon Exp $ -# - -SUBDIR= ecc - -.include diff --git a/sys/dev/misc/Makefile b/sys/dev/misc/Makefile index d8278e8298..0231df02c5 100644 --- a/sys/dev/misc/Makefile +++ b/sys/dev/misc/Makefile @@ -1,3 +1,3 @@ -SUBDIR=cmx dcons joy kbdmux lpbb pcfclock nmdm syscons snp tbridge +SUBDIR=cmx dcons ecc joy kbdmux lpbb pcfclock nmdm syscons snp tbridge .include diff --git a/sys/dev/bridge/ecc/Makefile b/sys/dev/misc/ecc/Makefile similarity index 72% rename from sys/dev/bridge/ecc/Makefile rename to sys/dev/misc/ecc/Makefile index c95b927842..986d411e7d 100644 --- a/sys/dev/bridge/ecc/Makefile +++ b/sys/dev/misc/ecc/Makefile @@ -1,6 +1,3 @@ -# $DragonFly: src/sys/dev/bridge/ecc/Makefile,v 1.1 2006/10/10 18:31:03 dillon Exp $ -# - KMOD = ecc SRCS = ecc_amd8000.c ecc_e31200.c ecc_x3400.c SRCS += device_if.h bus_if.h pci_if.h pcib_if.h diff --git a/sys/dev/bridge/ecc/ecc_amd8000.c b/sys/dev/misc/ecc/ecc_amd8000.c similarity index 99% rename from sys/dev/bridge/ecc/ecc_amd8000.c rename to sys/dev/misc/ecc/ecc_amd8000.c index 68f3113a43..35278c10a4 100644 --- a/sys/dev/bridge/ecc/ecc_amd8000.c +++ b/sys/dev/misc/ecc/ecc_amd8000.c @@ -1,14 +1,14 @@ /* * Copyright (c) 2006 The DragonFly Project. All rights reserved. - * + * * This code is derived from software contributed to The DragonFly Project * by Matthew Dillon . AMD register addresses and * values were pulled from MemTest-86 and Linux. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright @@ -18,7 +18,7 @@ * 3. Neither the name of The DragonFly Project nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific, prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS diff --git a/sys/dev/bridge/ecc/ecc_e31200.c b/sys/dev/misc/ecc/ecc_e31200.c similarity index 99% rename from sys/dev/bridge/ecc/ecc_e31200.c rename to sys/dev/misc/ecc/ecc_e31200.c index d3217dc6c7..27149bcbf7 100644 --- a/sys/dev/bridge/ecc/ecc_e31200.c +++ b/sys/dev/misc/ecc/ecc_e31200.c @@ -1,13 +1,13 @@ /* * Copyright (c) 2011 The DragonFly Project. All rights reserved. - * + * * This code is derived from software contributed to The DragonFly Project * by Sepherosa Ziehau - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright @@ -17,7 +17,7 @@ * 3. Neither the name of The DragonFly Project nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific, prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS @@ -49,7 +49,7 @@ #include "pcib_if.h" -#include +#include struct ecc_e31200_memctrl { uint16_t vid; diff --git a/sys/dev/bridge/ecc/ecc_e31200_reg.h b/sys/dev/misc/ecc/ecc_e31200_reg.h similarity index 100% rename from sys/dev/bridge/ecc/ecc_e31200_reg.h rename to sys/dev/misc/ecc/ecc_e31200_reg.h diff --git a/sys/dev/bridge/ecc/ecc_x3400.c b/sys/dev/misc/ecc/ecc_x3400.c similarity index 99% rename from sys/dev/bridge/ecc/ecc_x3400.c rename to sys/dev/misc/ecc/ecc_x3400.c index 5c744a7a81..29d1732896 100644 --- a/sys/dev/bridge/ecc/ecc_x3400.c +++ b/sys/dev/misc/ecc/ecc_x3400.c @@ -1,13 +1,13 @@ /* * Copyright (c) 2011 The DragonFly Project. All rights reserved. - * + * * This code is derived from software contributed to The DragonFly Project * by Sepherosa Ziehau - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright @@ -17,7 +17,7 @@ * 3. Neither the name of The DragonFly Project nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific, prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS @@ -49,7 +49,7 @@ #include "pcib_if.h" -#include +#include #define MC_READ_2(ofs) \ pci_cfgregread(PCIBUS_X3400UC, PCISLOT_X3400UC_MC, \ diff --git a/sys/dev/bridge/ecc/ecc_x3400_reg.h b/sys/dev/misc/ecc/ecc_x3400_reg.h similarity index 100% rename from sys/dev/bridge/ecc/ecc_x3400_reg.h rename to sys/dev/misc/ecc/ecc_x3400_reg.h -- 2.41.0