1209ff23fSmrg/*
2209ff23fSmrg * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
3209ff23fSmrg *
4209ff23fSmrg * Permission to use, copy, modify, distribute, and sell this software and its
5209ff23fSmrg * documentation for any purpose is hereby granted without fee, provided that
6209ff23fSmrg * the above copyright notice appear in all copies and that both that copyright
7209ff23fSmrg * notice and this permission notice appear in supporting documentation, and
8209ff23fSmrg * that the name of Marc Aurele La France not be used in advertising or
9209ff23fSmrg * publicity pertaining to distribution of the software without specific,
10209ff23fSmrg * written prior permission.  Marc Aurele La France makes no representations
11209ff23fSmrg * about the suitability of this software for any purpose.  It is provided
12209ff23fSmrg * "as-is" without express or implied warranty.
13209ff23fSmrg *
14209ff23fSmrg * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15209ff23fSmrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO
16209ff23fSmrg * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17209ff23fSmrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18209ff23fSmrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19209ff23fSmrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20209ff23fSmrg * PERFORMANCE OF THIS SOFTWARE.
21209ff23fSmrg */
22209ff23fSmrg
23209ff23fSmrg#ifdef HAVE_CONFIG_H
24209ff23fSmrg#include "config.h"
25209ff23fSmrg#endif
26209ff23fSmrg
27209ff23fSmrg#include "radeon_probe.h"
28209ff23fSmrg#include "radeon_version.h"
29209ff23fSmrg
30209ff23fSmrg#include "xf86.h"
31209ff23fSmrg
32209ff23fSmrg/* Module loader interface for subsidiary driver module */
33209ff23fSmrg
34209ff23fSmrgstatic XF86ModuleVersionInfo RADEONVersionRec =
35209ff23fSmrg{
36209ff23fSmrg    RADEON_DRIVER_NAME,
37209ff23fSmrg    MODULEVENDORSTRING,
38209ff23fSmrg    MODINFOSTRING1,
39209ff23fSmrg    MODINFOSTRING2,
40209ff23fSmrg    XORG_VERSION_CURRENT,
41209ff23fSmrg    RADEON_VERSION_MAJOR, RADEON_VERSION_MINOR, RADEON_VERSION_PATCH,
42209ff23fSmrg    ABI_CLASS_VIDEODRV,
43209ff23fSmrg    ABI_VIDEODRV_VERSION,
44209ff23fSmrg    MOD_CLASS_VIDEODRV,
45209ff23fSmrg    {0, 0, 0, 0}
46209ff23fSmrg};
47209ff23fSmrg
48209ff23fSmrg/*
49209ff23fSmrg * RADEONSetup --
50209ff23fSmrg *
51209ff23fSmrg * This function is called every time the module is loaded.
52209ff23fSmrg */
53209ff23fSmrgstatic pointer
54209ff23fSmrgRADEONSetup
55209ff23fSmrg(
56209ff23fSmrg    pointer Module,
57209ff23fSmrg    pointer Options,
58209ff23fSmrg    int     *ErrorMajor,
59209ff23fSmrg    int     *ErrorMinor
60209ff23fSmrg)
61209ff23fSmrg{
62209ff23fSmrg    static Bool Inited = FALSE;
63209ff23fSmrg
64209ff23fSmrg    if (!Inited) {
65209ff23fSmrg        Inited = TRUE;
66209ff23fSmrg        xf86AddDriver(&RADEON, Module, HaveDriverFuncs);
67209ff23fSmrg    }
68209ff23fSmrg
69209ff23fSmrg    return (pointer)TRUE;
70209ff23fSmrg}
71209ff23fSmrg
72209ff23fSmrg/* The following record must be called radeonModuleData */
73209ff23fSmrg_X_EXPORT XF86ModuleData radeonModuleData =
74209ff23fSmrg{
75209ff23fSmrg    &RADEONVersionRec,
76209ff23fSmrg    RADEONSetup,
77209ff23fSmrg    NULL
78209ff23fSmrg};
79