~gma500/+junk/emgd152-natty

« back to all changes in this revision

Viewing changes to emgd-dkms-1.5.15.3082/emgd/include/instr_common.h

  • Committer: Luca Forina
  • Date: 2011-02-06 15:11:54 UTC
  • Revision ID: luca.forina@gmail.com-20110206151154-9dzn5ugxjub9qenb
Upload Emgd 1.5.2 for Natty (override Maverick)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- pse-c -*-
 
2
 *-----------------------------------------------------------------------------
 
3
 * Filename: instr_common.h
 
4
 * $Revision: 1.5 $
 
5
 *-----------------------------------------------------------------------------
 
6
 * Copyright © 2002-2010, Intel Corporation.
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or modify it
 
9
 * under the terms and conditions of the GNU General Public License,
 
10
 * version 2, as published by the Free Software Foundation.
 
11
 *
 
12
 * This program is distributed in the hope it will be useful, but WITHOUT
 
13
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
14
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 
15
 * more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License along with
 
18
 * this program; if not, write to the Free Software Foundation, Inc.,
 
19
 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 
20
 *
 
21
 *-----------------------------------------------------------------------------
 
22
 * Description:
 
23
 *  Common tools for hardware that uses instruction engines.
 
24
 *-----------------------------------------------------------------------------
 
25
 */
 
26
 
 
27
#ifndef _IGD_INSTR_COMMON_H
 
28
#define _IGD_INSTR_COMMON_H
 
29
 
 
30
/* Write instructions macro. */
 
31
#ifdef DEBUG_BUILD_TYPE
 
32
#define INSTR_WRITE(data, addr)                                                                                 \
 
33
    if(igd_debug->hal.instr) {                                                                                  \
 
34
                EMGD_DEBUG_S("    addr:%p   data:0x%8.8x", ((void *)(addr)),    \
 
35
                        (unsigned int)(data));                                                                          \
 
36
    }                                                                                                                                   \
 
37
        EMGD_WRITE32 (data, (addr));                                                                                    \
 
38
        addr++;
 
39
 
 
40
#define IGD_PRINT_INSTR(name)                                    \
 
41
    if(igd_debug->hal.instr) {                                                                   \
 
42
                EMGD_DEBUG_S("GMCH Instruction: %s", name);                              \
 
43
    }
 
44
#else
 
45
#define INSTR_WRITE(data, addr) EMGD_WRITE32(data, (addr)++);
 
46
#define IGD_PRINT_INSTR(name)
 
47
#endif
 
48
 
 
49
#endif