22087975.patch revision 1608
269N/Adiff --git a/src/ast.h b/src/ast.h
269N/Aindex 4cae16b..718e6e9 100644
269N/A--- a/src/ast.h
269N/A+++ b/src/ast.h
269N/A@@ -1,5 +1,6 @@
269N/A /*
269N/A * Copyright (c) 2005 ASPEED Technology Inc.
269N/A+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved
269N/A *
269N/A * Permission to use, copy, modify, distribute, and sell this software and its
269N/A * documentation for any purpose is hereby granted without fee, provided that
269N/A@@ -305,78 +306,6 @@ typedef struct _ASTRec {
269N/A #define ASTPTR(p) ((ASTRecPtr)((p)->driverPrivate))
269N/A
269N/A #if defined(__sparc__)
269N/A-#ifndef VIS_GETPCICONFIG
269N/A-
269N/A-/*
269N/A- * These definitions will be removed when they are included in the
269N/A- * visual_io.h
269N/A- */
269N/A-#define VIS_GETVIDEOMODENAME (VIOC | 12)
269N/A-#define VIS_STOREVIDEOMODENAME (VIOC | 13)
269N/A-#define VIS_MAX_VMODE_LEN 48
269N/A-
269N/A-typedef struct vis_video_mode {
269N/A- char mode_name[VIS_MAX_VMODE_LEN];
269N/A- uint32_t vRefresh;
269N/A- char pad[96];
269N/A-} vis_video_mode_t;
269N/A-
269N/A-
269N/A-#define VIS_GETPCICONFIG (VIOC | 14)
269N/A-
269N/A-typedef struct vis_pci_cfg {
269N/A- uint16_t VendorID;
269N/A- uint16_t DeviceID;
269N/A- uint16_t Command;
269N/A- uint16_t Status;
269N/A- uint8_t RevisionID;
269N/A- uint8_t ProgIF;
269N/A- uint8_t SubClass;
269N/A- uint8_t BaseClass;
269N/A-
269N/A- uint8_t CacheLineSize;
269N/A- uint8_t LatencyTimer;
269N/A- uint8_t HeaderType;
269N/A- uint8_t BIST;
269N/A-
269N/A- uint32_t bar[6];
269N/A- uint32_t CIS;
269N/A- uint16_t SubVendorID;
269N/A- uint16_t SubSystemID;
269N/A- uint32_t ROMBaseAddress;
269N/A-
269N/A- uint8_t CapabilitiesPtr;
284N/A- uint8_t Reserved_1[3];
284N/A- uint32_t Reserved_2;
284N/A-
284N/A- uint8_t InterruptLine;
269N/A- uint8_t InterruptPin;
269N/A- uint8_t MinimumGrant;
269N/A- uint8_t MaximumLatency;
269N/A-
- uint8_t pad[100];
-} vis_pci_cfg_t;
-
-
-#define VIS_SETIOREG (VIOC | 17)
-#define VIS_GETIOREG (VIOC | 18)
-
-#ifdef __sparc
-#define ASTIOC ('Y' << 8)
-#define AST_GET_INDEX (ASTIOC | 14)
-#define AST_SET_INDEX (ASTIOC | 15)
-#endif
-
-typedef struct vis_io_reg {
- uchar_t offset;
- uchar_t value;
-#ifdef __sparc
- uchar_t offset1;
- uchar_t value1;
-#endif
-} vis_io_reg_t;
-#endif
-
extern struct pci_device *ASTGetPciInfo(ASTRecPtr);
extern ScrnInfoPtr ASTAllocScreen(DriverPtr, GDevPtr);
extern pointer ASTMapVidMem(ScrnInfoPtr, unsigned int, CARD32,
diff --git a/src/ast_vgatool.h b/src/ast_vgatool.h
index ded26e3..0b81ea5 100644
--- a/src/ast_vgatool.h
+++ b/src/ast_vgatool.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 ASPEED Technology Inc.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -48,9 +49,6 @@
#if defined(__sparc__)
-#define SET_IO_REG 0x1000
-#define GET_IO_REG 0x1001
-
#define AR_PORT_WRITE 0x40
#define MISC_PORT_WRITE 0x42
#define VGA_ENABLE_PORT 0x43
@@ -89,7 +87,7 @@
.value = index, \
.offset1 = off+1 \
}; \
- ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
+ ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
val = io_reg.value; \
} while (0)
@@ -100,7 +98,7 @@
.offset1 = off+1, \
.value1 = val \
}; \
- ioctl(pAST->fd, AST_SET_INDEX, &io_reg); \
+ ioctl(pAST->fd, VIS_SETINDEX, &io_reg); \
} while (0)
#define GetIndexRegMask(off, index, and, val) do { \
@@ -109,7 +107,7 @@
.value = index, \
.offset1 = off+1 \
}; \
- ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
+ ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
val = io_reg.value & and; \
} while (0)
@@ -120,13 +118,13 @@
.value = index, \
.offset1 = off+1 \
}; \
- ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
+ ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
__Temp = (io_reg.value & and) | val; \
io_reg.offset = off; \
io_reg.value = index; \
io_reg.offset1 = off+1; \
io_reg.value1 = __Temp; \
- ioctl(pAST->fd, AST_SET_INDEX, &io_reg); \
+ ioctl(pAST->fd, VIS_SETINDEX, &io_reg); \
} while (0)
#else /* !__sparc__ */