diff options
author | marius <marius@FreeBSD.org> | 2013-04-06 19:12:49 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2013-04-06 19:12:49 +0000 |
commit | 769bdd48e62f800a49095832ca9d3bf8e2c4db7b (patch) | |
tree | beec354e89c1d44f4ee909a0eea535f9fd251eb7 /sys/powerpc | |
parent | 916607c00957e1ba06f932ded65c62673d164759 (diff) | |
download | FreeBSD-src-769bdd48e62f800a49095832ca9d3bf8e2c4db7b.zip FreeBSD-src-769bdd48e62f800a49095832ca9d3bf8e2c4db7b.tar.gz |
- With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) related
option left but actually consumed by ada(4), so move it to opt_ada.h
and get rid of opt_ata.h.
- Fix stand-alone build of atacore(4) by adding opt_cam.h.
- Use __FBSDID.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/powermac/ata_dbdma.c | 6 | ||||
-rw-r--r-- | sys/powerpc/powermac/ata_kauai.c | 15 | ||||
-rw-r--r-- | sys/powerpc/powermac/ata_macio.c | 13 | ||||
-rw-r--r-- | sys/powerpc/psim/ata_iobus.c | 15 |
4 files changed, 25 insertions, 24 deletions
diff --git a/sys/powerpc/powermac/ata_dbdma.c b/sys/powerpc/powermac/ata_dbdma.c index 23434c8..0e3fbde 100644 --- a/sys/powerpc/powermac/ata_dbdma.c +++ b/sys/powerpc/powermac/ata_dbdma.c @@ -23,16 +23,16 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#include <sys/cdefs.h> +__FBSDID("* $FreeBSD$"); + /* * Common routines for the DMA engine on both the Apple Kauai and MacIO * ATA controllers. */ -#include "opt_ata.h" #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> diff --git a/sys/powerpc/powermac/ata_kauai.c b/sys/powerpc/powermac/ata_kauai.c index ef260d4..1d72f75 100644 --- a/sys/powerpc/powermac/ata_kauai.c +++ b/sys/powerpc/powermac/ata_kauai.c @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); /* * Mac 'Kauai' PCI ATA controller */ -#include "opt_ata.h" #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -99,7 +98,7 @@ static device_method_t ata_kauai_methods[] = { /* ATA interface */ DEVMETHOD(ata_setmode, ata_kauai_setmode), - { 0, 0 } + DEVMETHOD_END }; struct ata_kauai_softc { @@ -120,15 +119,15 @@ static driver_t ata_kauai_driver = { sizeof(struct ata_kauai_softc), }; -DRIVER_MODULE(ata, pci, ata_kauai_driver, ata_devclass, 0, 0); +DRIVER_MODULE(ata, pci, ata_kauai_driver, ata_devclass, NULL, NULL); MODULE_DEPEND(ata, ata, 1, 1, 1); /* * PCI ID search table */ -static struct kauai_pci_dev { - u_int32_t kpd_devid; - char *kpd_desc; +static const struct kauai_pci_dev { + u_int32_t kpd_devid; + const char *kpd_desc; } kauai_pci_devlist[] = { { 0x0033106b, "Uninorth2 Kauai ATA Controller" }, { 0x003b106b, "Intrepid Kauai ATA Controller" }, @@ -152,6 +151,7 @@ static const u_int pio_timing_kauai[] = { 0x05000249, /* PIO3 */ 0x04000148 /* PIO4 */ }; + static const u_int pio_timing_shasta[] = { 0x0a000c97, /* PIO0 */ 0x07000712, /* PIO1 */ @@ -165,6 +165,7 @@ static const u_int dma_timing_kauai[] = { 0x00209000, /* WDMA1 */ 0x00148000 /* WDMA2 */ }; + static const u_int dma_timing_shasta[] = { 0x00820800, /* WDMA0 */ 0x0028b000, /* WDMA1 */ @@ -179,6 +180,7 @@ static const u_int udma_timing_kauai[] = { 0x00002a31, /* UDMA4 */ 0x00002921 /* UDMA5 */ }; + static const u_int udma_timing_shasta[] = { 0x00035901, /* UDMA0 */ 0x000348b1, /* UDMA1 */ @@ -368,4 +370,3 @@ ata_kauai_begin_transaction(struct ata_request *request) return ata_begin_transaction(request); } - diff --git a/sys/powerpc/powermac/ata_macio.c b/sys/powerpc/powermac/ata_macio.c index 447009d..e15ab00 100644 --- a/sys/powerpc/powermac/ata_macio.c +++ b/sys/powerpc/powermac/ata_macio.c @@ -23,14 +23,14 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + /* * Mac-io ATA controller */ -#include "opt_ata.h" #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -85,7 +85,7 @@ struct ide_timings { int active; /* minimum command active time [ns] */ }; -struct ide_timings pio_timings[5] = { +static const struct ide_timings pio_timings[5] = { { 600, 180 }, /* PIO 0 */ { 390, 150 }, /* PIO 1 */ { 240, 105 }, /* PIO 2 */ @@ -122,7 +122,7 @@ static device_method_t ata_macio_methods[] = { /* ATA interface */ DEVMETHOD(ata_setmode, ata_macio_setmode), - { 0, 0 } + DEVMETHOD_END }; struct ata_macio_softc { @@ -143,7 +143,7 @@ static driver_t ata_macio_driver = { sizeof(struct ata_macio_softc), }; -DRIVER_MODULE(ata, macio, ata_macio_driver, ata_devclass, 0, 0); +DRIVER_MODULE(ata, macio, ata_macio_driver, ata_devclass, NULL, NULL); MODULE_DEPEND(ata, ata, 1, 1, 1); static int @@ -332,4 +332,3 @@ ata_macio_begin_transaction(struct ata_request *request) return ata_begin_transaction(request); } - diff --git a/sys/powerpc/psim/ata_iobus.c b/sys/powerpc/psim/ata_iobus.c index 60f6c50..69c2036 100644 --- a/sys/powerpc/psim/ata_iobus.c +++ b/sys/powerpc/psim/ata_iobus.c @@ -23,14 +23,14 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + /* * PSIM local bus ATA controller */ -#include "opt_ata.h" #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -80,7 +80,7 @@ static device_method_t ata_iobus_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - { 0, 0 } + DEVMETHOD_END }; static driver_t ata_iobus_driver = { @@ -91,7 +91,8 @@ static driver_t ata_iobus_driver = { static devclass_t ata_iobus_devclass; -DRIVER_MODULE(ataiobus, iobus, ata_iobus_driver, ata_iobus_devclass, 0, 0); +DRIVER_MODULE(ataiobus, iobus, ata_iobus_driver, ata_iobus_devclass, NULL, + NULL); MODULE_DEPEND(ata, ata, 1, 1, 1); static int @@ -221,7 +222,7 @@ static device_method_t ata_iobus_sub_methods[] = { /* ATA interface */ DEVMETHOD(ata_setmode, ata_iobus_sub_setmode), - { 0, 0 } + DEVMETHOD_END }; static driver_t ata_iobus_sub_driver = { @@ -230,7 +231,7 @@ static driver_t ata_iobus_sub_driver = { sizeof(struct ata_channel), }; -DRIVER_MODULE(ata, ataiobus, ata_iobus_sub_driver, ata_devclass, 0, 0); +DRIVER_MODULE(ata, ataiobus, ata_iobus_sub_driver, ata_devclass, NULL, NULL); static int ata_iobus_sub_probe(device_t dev) |