* Moved the intel_info structure and prototypes from intel_extreme.cpp from the shared
headers into intel_extreme_private.h. * Removed non-memory-mapped definitions from driver.h. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17452 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -93,31 +93,6 @@ struct intel_shared_info {
|
|||||||
struct pll_info pll_info;
|
struct pll_info pll_info;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct intel_info {
|
|
||||||
uint32 cookie_magic;
|
|
||||||
int32 open_count;
|
|
||||||
int32 id;
|
|
||||||
pci_info *pci;
|
|
||||||
uint8 *registers;
|
|
||||||
area_id registers_area;
|
|
||||||
struct intel_shared_info *shared_info;
|
|
||||||
area_id shared_area;
|
|
||||||
|
|
||||||
struct overlay_registers *overlay_registers;
|
|
||||||
// update buffer, shares an area with shared_info
|
|
||||||
|
|
||||||
uint8 *graphics_memory;
|
|
||||||
area_id graphics_memory_area;
|
|
||||||
area_id additional_memory_area;
|
|
||||||
// allocated memory beyond the "stolen" amount
|
|
||||||
mem_info *memory_manager;
|
|
||||||
|
|
||||||
bool fake_interrupts;
|
|
||||||
|
|
||||||
const char *device_identifier;
|
|
||||||
uint32 device_type;
|
|
||||||
};
|
|
||||||
|
|
||||||
//----------------- ioctl() interface ----------------
|
//----------------- ioctl() interface ----------------
|
||||||
|
|
||||||
// magic code for ioctls
|
// magic code for ioctls
|
||||||
@@ -487,9 +462,4 @@ struct hardware_status {
|
|||||||
uint32 store[1008];
|
uint32 store[1008];
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------
|
|
||||||
|
|
||||||
extern status_t intel_extreme_init(intel_info &info);
|
|
||||||
extern void intel_extreme_uninit(intel_info &info);
|
|
||||||
|
|
||||||
#endif /* INTEL_EXTREME_H */
|
#endif /* INTEL_EXTREME_H */
|
||||||
|
|||||||
@@ -12,29 +12,17 @@
|
|||||||
#include <KernelExport.h>
|
#include <KernelExport.h>
|
||||||
#include <PCI.h>
|
#include <PCI.h>
|
||||||
|
|
||||||
#include "intel_extreme.h"
|
#include "intel_extreme_private.h"
|
||||||
#include "lock.h"
|
|
||||||
|
|
||||||
// PCI Communications
|
// PCI Communications
|
||||||
|
|
||||||
#define IO_PORT_PCI_ACCESS true
|
#define read8(address) (*((volatile uint8 *)(address)))
|
||||||
//#define MEMORY_MAPPED_PCI_ACCESS true
|
#define read16(address) (*((volatile uint16 *)(address)))
|
||||||
|
#define read32(address) (*((volatile uint32 *)(address)))
|
||||||
#if IO_PORT_PCI_ACCESS
|
#define write8(address,data) (*((volatile uint8 *)(address)) = data)
|
||||||
# define write8(address,value) (*pci->write_io_8)((address),(value))
|
#define write16(address,data) (*((volatile uint16 *)(address)) = (data))
|
||||||
# define write16(address,value) (*pci->write_io_16)((address),(value))
|
#define write32(address,data) (*((volatile uint32 *)(address)) = (data))
|
||||||
# define write32(address,value) (*pci->write_io_32)((address),(value))
|
|
||||||
# define read8(address) ((*pci->read_io_8)(address))
|
|
||||||
# define read16(address) ((*pci->read_io_16)(address))
|
|
||||||
# define read32(address) ((*pci->read_io_32)(address))
|
|
||||||
#else /* MEMORY_MAPPED_PCI_ACCESS */
|
|
||||||
# define read8(address) (*((volatile uint8*)(address)))
|
|
||||||
# define read16(address) (*((volatile uint16*)(address)))
|
|
||||||
# define read32(address) (*((volatile uint32*)(address)))
|
|
||||||
# define write8(address,data) (*((volatile uint8 *)(address)) = data)
|
|
||||||
# define write16(address,data) (*((volatile uint16 *)(address)) = (data))
|
|
||||||
# define write32(address,data) (*((volatile uint32 *)(address)) = (data))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern char *gDeviceNames[];
|
extern char *gDeviceNames[];
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2006, Haiku, Inc. All Rights Reserved.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Axel Dörfler, [email protected]
|
||||||
|
*/
|
||||||
|
#ifndef INTEL_EXTREME_PRIVATE_H
|
||||||
|
#define INTEL_EXTREME_PRIVATE_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <KernelExport.h>
|
||||||
|
#include <PCI.h>
|
||||||
|
|
||||||
|
#include "intel_extreme.h"
|
||||||
|
#include "lock.h"
|
||||||
|
|
||||||
|
|
||||||
|
struct intel_info {
|
||||||
|
uint32 cookie_magic;
|
||||||
|
int32 open_count;
|
||||||
|
int32 id;
|
||||||
|
pci_info *pci;
|
||||||
|
uint8 *registers;
|
||||||
|
area_id registers_area;
|
||||||
|
struct intel_shared_info *shared_info;
|
||||||
|
area_id shared_area;
|
||||||
|
|
||||||
|
struct overlay_registers *overlay_registers;
|
||||||
|
// update buffer, shares an area with shared_info
|
||||||
|
|
||||||
|
uint8 *graphics_memory;
|
||||||
|
area_id graphics_memory_area;
|
||||||
|
area_id additional_memory_area;
|
||||||
|
// allocated memory beyond the "stolen" amount
|
||||||
|
mem_info *memory_manager;
|
||||||
|
|
||||||
|
bool fake_interrupts;
|
||||||
|
|
||||||
|
const char *device_identifier;
|
||||||
|
uint32 device_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern status_t intel_extreme_init(intel_info &info);
|
||||||
|
extern void intel_extreme_uninit(intel_info &info);
|
||||||
|
|
||||||
|
#endif /* INTEL_EXTREME_PRIVATE_H */
|
||||||
Reference in New Issue
Block a user