Convert occurances of U32 to other types.
authorIan Romanick <idr@us.ibm.com>
Tue, 10 Jul 2007 01:54:25 +0000 (18:54 -0700)
committerIan Romanick <idr@us.ibm.com>
Tue, 10 Jul 2007 01:54:25 +0000 (18:54 -0700)
Most occurances of U32 were converted to u32.  These are cases where
the data represents something that will be written to the hardware.
Other cases were converted to 'unsigned int'.

U32 was the last type in xgi_types.h, so that file is removed.

linux-core/xgi_cmdlist.c
linux-core/xgi_cmdlist.h
linux-core/xgi_drv.c
linux-core/xgi_drv.h
linux-core/xgi_fb.c
linux-core/xgi_misc.c
linux-core/xgi_pcie.c
linux-core/xgi_types.h [deleted file]

index ee53d30..7be0ac4 100644 (file)
@@ -26,7 +26,6 @@
  * DEALINGS IN THE SOFTWARE.                                                                                           
  ***************************************************************************/
 
-#include "xgi_types.h"
 #include "xgi_linux.h"
 #include "xgi_drv.h"
 #include "xgi_regs.h"
@@ -183,7 +182,7 @@ void xgi_submit_cmdlist(struct xgi_info * info, struct xgi_cmd_info * pCmdInfo)
                /* Jong 06/13/2006; remove marked for system hang test */
                /* xgi_waitfor_pci_idle(info); */
        } else {
-               U32 *lastBatchVirtAddr;
+               u32 *lastBatchVirtAddr;
 
                XGI_INFO
                    ("Jong-xgi_submit_cmdlist-s_cmdring._lastBatchStartAddr != 0 \n");
@@ -195,9 +194,9 @@ void xgi_submit_cmdlist(struct xgi_info * info, struct xgi_cmd_info * pCmdInfo)
                        addFlush2D(info);
                }
 
-               lastBatchVirtAddr =
-                   (U32 *) xgi_find_pcie_virt(info,
-                                              s_cmdring._lastBatchStartAddr);
+               lastBatchVirtAddr = 
+                       xgi_find_pcie_virt(info,
+                                          s_cmdring._lastBatchStartAddr);
 
                /* lastBatchVirtAddr should *never* be NULL.  However, there
                 * are currently some bugs that cause this to happen.  The
@@ -310,10 +309,9 @@ static unsigned int getCurBatchBeginPort(struct xgi_cmd_info * pCmdInfo)
 
 static void addFlush2D(struct xgi_info * info)
 {
-       U32 *flushBatchVirtAddr;
-       U32 flushBatchHWAddr;
-
-       U32 *lastBatchVirtAddr;
+       u32 *flushBatchVirtAddr;
+       u32 flushBatchHWAddr;
+       u32 *lastBatchVirtAddr;
 
        /* check buf is large enough to contain a new flush batch */
        if ((s_cmdring._cmdRingOffset + 0x20) >= s_cmdring._cmdRingSize) {
@@ -321,7 +319,7 @@ static void addFlush2D(struct xgi_info * info)
        }
 
        flushBatchHWAddr = s_cmdring._cmdRingBuffer + s_cmdring._cmdRingOffset;
-       flushBatchVirtAddr = (U32 *) xgi_find_pcie_virt(info, flushBatchHWAddr);
+       flushBatchVirtAddr = xgi_find_pcie_virt(info, flushBatchHWAddr);
 
        /* not using memcpy for I assume the address is discrete */
        *(flushBatchVirtAddr + 0) = 0x10000000;
@@ -335,7 +333,7 @@ static void addFlush2D(struct xgi_info * info)
 
        // ASSERT(s_cmdring._lastBatchStartAddr != NULL);
        lastBatchVirtAddr =
-           (U32 *) xgi_find_pcie_virt(info, s_cmdring._lastBatchStartAddr);
+               xgi_find_pcie_virt(info, s_cmdring._lastBatchStartAddr);
 
        lastBatchVirtAddr[1] = BEGIN_LINK_ENABLE_MASK + 0x08;
        lastBatchVirtAddr[2] = flushBatchHWAddr >> 4;
index c622151..d2b95c0 100644 (file)
@@ -58,11 +58,11 @@ typedef enum {
 } CMD_SIZE;
 
 struct xgi_cmdring_info {
-       U32 _cmdRingSize;
-       U32 _cmdRingBuffer;
-       U32 _cmdRingBusAddr;
-       U32 _lastBatchStartAddr;
-       U32 _cmdRingOffset;
+       unsigned int _cmdRingSize;
+       u32 _cmdRingBuffer;
+       unsigned long _cmdRingBusAddr;
+       u32 _lastBatchStartAddr;
+       u32 _cmdRingOffset;
 };
 
 extern int xgi_cmdlist_initialize(struct xgi_info * info, size_t size);
index c4cc890..b3425c7 100644 (file)
@@ -25,7 +25,6 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER                       
  * DEALINGS IN THE SOFTWARE.                                                                                           
  ***************************************************************************/
-#include "xgi_types.h"
 #include "xgi_linux.h"
 #include "xgi_drv.h"
 #include "xgi_regs.h"
index efbbd64..983ed0a 100644 (file)
@@ -114,7 +114,7 @@ struct xgi_info {
        struct xgi_sarea_info sarea_info;
 
        /* look up table parameters */
-       U32 *lut_base;
+       u32 *lut_base;
        unsigned int lutPageSize;
        unsigned int lutPageOrder;
        bool isLUTInLFB;
index ac73b41..7d390d4 100644 (file)
@@ -26,7 +26,6 @@
  * DEALINGS IN THE SOFTWARE.                                                                                           
  ***************************************************************************/
 
-#include "xgi_types.h"
 #include "xgi_linux.h"
 #include "xgi_drv.h"
 #include "xgi_fb.h"
index d3385be..2d310a2 100644 (file)
@@ -26,7 +26,6 @@
  * DEALINGS IN THE SOFTWARE.                                                                                           
  ***************************************************************************/
 
-#include "xgi_types.h"
 #include "xgi_linux.h"
 #include "xgi_drv.h"
 #include "xgi_regs.h"
index 0f82e4e..70459b2 100644 (file)
@@ -26,7 +26,6 @@
  * DEALINGS IN THE SOFTWARE.                                                                                           
  ***************************************************************************/
 
-#include "xgi_types.h"
 #include "xgi_linux.h"
 #include "xgi_drv.h"
 #include "xgi_regs.h"
@@ -420,7 +419,7 @@ static struct xgi_pcie_block *xgi_pcie_mem_alloc(struct xgi_info * info,
        struct page *page;
        unsigned long page_order = 0, count = 0, index = 0;
        unsigned long page_addr = 0;
-       unsigned long *lut_addr = NULL;
+       u32 *lut_addr = NULL;
        unsigned long lut_id = 0;
        unsigned long size = (originalSize + PAGE_SIZE - 1) & PAGE_MASK;
        int i, j, page_count = 0;
diff --git a/linux-core/xgi_types.h b/linux-core/xgi_types.h
deleted file mode 100644 (file)
index f9a3360..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-
-/****************************************************************************
- * Copyright (C) 2003-2006 by XGI Technology, Taiwan.                  
- *                                                                                                                                                     *
- * All Rights Reserved.                                                                                                                *
- *                                                                                                                                                     *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the     
- * "Software"), to deal in the Software without restriction, including 
- * without limitation on the rights to use, copy, modify, merge,       
- * publish, distribute, sublicense, and/or sell copies of the Software,        
- * and to permit persons to whom the Software is furnished to do so,   
- * subject to the following conditions:                                        
- *                                                                                                                                                     *
- * The above copyright notice and this permission notice (including the        
- * next paragraph) shall be included in all copies or substantial      
- * portions of the Software.                                           
- *                                                                                                                                                     *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,     
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND               
- * NON-INFRINGEMENT.  IN NO EVENT SHALL XGI AND/OR                     
- * ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,          
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,          
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER                       
- * DEALINGS IN THE SOFTWARE.                                                                                           
- ***************************************************************************/
-
-#ifndef _XGI_TYPES_H_
-#define _XGI_TYPES_H_
-
-/****************************************************************************
- *                                 Typedefs                                 *
- ***************************************************************************/
-
-/*
- * mainly for 64-bit linux, where long is 64 bits
- * and win9x, where int is 16 bit.
- */
-#if defined(vxworks)
-typedef unsigned int U32;      /* 0 to 4294967295                         */
-#else
-typedef unsigned long U32;     /* 0 to 4294967295                         */
-#endif
-
-#endif