1c582b7e3Smrg/*
2c582b7e3Smrg * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
3c582b7e3Smrg *
4c582b7e3Smrg * Permission to use, copy, modify, distribute, and sell this software and its
5c582b7e3Smrg * documentation for any purpose is hereby granted without fee, provided that
6c582b7e3Smrg * the above copyright notice appear in all copies and that both that copyright
7c582b7e3Smrg * notice and this permission notice appear in supporting documentation, and
8c582b7e3Smrg * that the name of Marc Aurele La France not be used in advertising or
9c582b7e3Smrg * publicity pertaining to distribution of the software without specific,
10c582b7e3Smrg * written prior permission.  Marc Aurele La France makes no representations
11c582b7e3Smrg * about the suitability of this software for any purpose.  It is provided
12c582b7e3Smrg * "as-is" without express or implied warranty.
13c582b7e3Smrg *
14c582b7e3Smrg * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15c582b7e3Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO
16c582b7e3Smrg * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17c582b7e3Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18c582b7e3Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19c582b7e3Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20c582b7e3Smrg * PERFORMANCE OF THIS SOFTWARE.
21c582b7e3Smrg */
22c582b7e3Smrg
23c582b7e3Smrg#ifdef HAVE_CONFIG_H
24c582b7e3Smrg#include "config.h"
25c582b7e3Smrg#endif
26c582b7e3Smrg
27c582b7e3Smrg#include "r128_version.h"
28c582b7e3Smrg
29c582b7e3Smrg#include "xf86.h"
3042a55b46Smrg#include "r128.h"
3142a55b46Smrg#include "r128_probe.h"
32c582b7e3Smrg
33c582b7e3Smrg/* Module loader interface for subsidiary driver module */
34c582b7e3Smrg
35c582b7e3Smrgstatic XF86ModuleVersionInfo R128VersionRec =
36c582b7e3Smrg{
37c582b7e3Smrg    R128_DRIVER_NAME,
38c582b7e3Smrg    MODULEVENDORSTRING,
39c582b7e3Smrg    MODINFOSTRING1,
40c582b7e3Smrg    MODINFOSTRING2,
41c582b7e3Smrg    XORG_VERSION_CURRENT,
42c582b7e3Smrg    PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
43c582b7e3Smrg    ABI_CLASS_VIDEODRV,
44c582b7e3Smrg    ABI_VIDEODRV_VERSION,
45c582b7e3Smrg    MOD_CLASS_VIDEODRV,
46c582b7e3Smrg    {0, 0, 0, 0}
47c582b7e3Smrg};
48c582b7e3Smrg
49c582b7e3Smrg/*
50c582b7e3Smrg * R128Setup --
51c582b7e3Smrg *
52c582b7e3Smrg * This function is called every time the module is loaded.
53c582b7e3Smrg */
54c582b7e3Smrgstatic pointer
55c582b7e3SmrgR128Setup
56c582b7e3Smrg(
57c582b7e3Smrg    pointer Module,
58c582b7e3Smrg    pointer Options,
59c582b7e3Smrg    int     *ErrorMajor,
60c582b7e3Smrg    int     *ErrorMinor
61c582b7e3Smrg)
62c582b7e3Smrg{
63c582b7e3Smrg    static Bool Inited = FALSE;
64c582b7e3Smrg
65c582b7e3Smrg    if (!Inited)
66c582b7e3Smrg    {
67c582b7e3Smrg        Inited = TRUE;
68c582b7e3Smrg        xf86AddDriver(&R128, Module, HaveDriverFuncs);
69c582b7e3Smrg    }
70c582b7e3Smrg
71c582b7e3Smrg    return (pointer)TRUE;
72c582b7e3Smrg}
73c582b7e3Smrg
74c582b7e3Smrg/* The following record must be called r128ModuleData */
75c582b7e3Smrg_X_EXPORT XF86ModuleData r128ModuleData =
76c582b7e3Smrg{
77c582b7e3Smrg    &R128VersionRec,
78c582b7e3Smrg    R128Setup,
79c582b7e3Smrg    NULL
80c582b7e3Smrg};
81