#ifndef _IOKIT_KEYLARGO_H
#define _IOKIT_KEYLARGO_H
#include <IOKit/IOLocks.h>
#include <IOKit/platform/AppleMacIO.h>
#include "USBKeyLargo.h"
#include "KeyLargoWatchDogTimer.h"
enum {
kKeyLargoDeviceId22 = 0x22, kKeyLargoVersion2 = 2,
kPangeaDeviceId25 = 0x25, kPangeaVersion0 = 0,
kIntrepidDeviceId3e = 0x3e, kIntrepidVersion0 = 0
};
enum {
kKeyLargoMediaBay = 0x00034, kKeyLargoFCRBase = 0x00038,
kKeyLargoFCRCount = 5,
kPangeaFCRCount = 6,
kIntrepidFCRCount = 6,
kKeyLargoFCR0 = 0x00038,
kKeyLargoFCR1 = 0x0003C,
kKeyLargoFCR2 = 0x00040,
kKeyLargoFCR3 = 0x00044,
kKeyLargoFCR4 = 0x00048,
kKeyLargoFCR5 = 0x0004C,
kKeyLargoGTimerFreq = 18432000UL,
kKeyLargoWatchDogLowOffset = 0x15030,
kKeyLargoWatchDogHighOffset = 0x15034,
kKeyLargoCounterLoOffset = 0x15038,
kKeyLargoCounterHiOffset = 0x1503C,
kKeyLargoWatchDogEnableOffset = 0x15048,
kKeyLargoI2S0SerialFormat = 0x10010,
kKeyLargoI2S1SerialFormat = 0x11010,
kKeylargoI2SClockSelect = (1<<31) | (1<<30),
kKeylargoI2SSelect45Mhz = 1 << 30,
kKeylargoI2SSelect49Mhz = 1 << 31,
kKeyLargoMB0DevEnable = 1 << 12, kKeyLargoMB0DevPower = 1 << 10, kKeyLargoMB0DevReset = 1 << 9, kKeyLargoMB0Enable = 1 << 8, kKeyLargoMB1DevEnable = 1 << 28, kKeyLargoMB1DevPower = 1 << 26, kKeyLargoMB1DevReset = 1 << 25, kKeyLargoMB1Enable = 1 << 24,
kKeyLargoFCR0ChooseSCCB = 1 << 0, kKeyLargoFCR0ChooseSCCA = 1 << 1, kKeyLargoFCR0SlowSccPClk = 1 << 2, kKeyLargoFCR0ResetSCC = 1 << 3, kKeyLargoFCR0SccAEnable = 1 << 4, kKeyLargoFCR0SccBEnable = 1 << 5, kKeyLargoFCR0SccCellEnable = 1 << 6, kKeyLargoFCR0ChooseVIA = 1 << 7, kKeyLargoFCR0HighBandFor1MB = 1 << 8, kKeyLargoFCR0UseIRSource2 = 1 << 9, kKeyLargoFCR0UseIRSource1 = 1 << 10, kPangeaFCR0USB0PMIEnable = 1 << 10, kKeyLargoFCR0IRDASWReset = 1 << 11, kPangeaFCR0USB0RefSuspendSel = 1 << 11, kKeyLargoFCR0IRDADefault1 = 1 << 12, kPangeaFCR0USB0RefSuspend = 1 << 12, kKeyLargoFCR0IRDADefault0 = 1 << 13, kPangeaFCR0USB0PadSuspendSel = 1 << 13, kKeyLargoFCR0IRDAFastCon = 1 << 14, kPangeaFCR0USB1PMIEnable = 1 << 14, kKeyLargoFCR0IRDAEnable = 1 << 15, kPangeaFCR0USB1RefSuspendSel = 1 << 15, kKeyLargoFCR0IRDAClk32Enable = 1 << 16, kPangeaFCR0USB1RefSuspend = 1 << 16, kKeyLargoFCR0IRDAClk19Enable = 1 << 17, kPangeaFCR0USB1PadSuspendSel = 1 << 17, kKeyLargoFCR0USB0PadSuspend0 = 1 << 18, kKeyLargoFCR0USB0PadSuspend1 = 1 << 19, kKeyLargoFCR0USB0CellEnable = 1 << 20, kKeyLargoFCR0USB1PadSuspend0 = 1 << 22, kKeyLargoFCR0USB1PadSuspend1 = 1 << 23, kKeyLargoFCR0USB1CellEnable = 1 << 24, kKeyLargoFCR0USBRefSuspend = 1 << 28,
kIntrepidFCR1USB2PMIEnable = 1 << 0, kKeyLargoFCR1AudioSel22MClk = 1 << 1, kIntrepidFCR1USB2RefSuspendSel = 1 << 1, kIntrepidFCR1USB2RefSuspend = 1 << 2, kKeyLargoFCR1AudioClkEnable = 1 << 3, kIntrepidFCR1USB2PadSuspendSel = 1 << 3, kIntrepidFCR1USB2PadSuspend0 = 1 << 4, kKeyLargoFCR1AudioClkOutEnable = 1 << 5, kIntrepidFCR1USB2PadSuspend1 = 1 << 5, kKeyLargoFCR1AudioCellEnable = 1 << 6, kIntrepidFCR1USB2CellEnable = 1 << 6, kKeyLargoFCR1ChooseAudio = 1 << 7,
kKeyLargoFCR1ChooseI2S0 = 1 << 9, kKeyLargoFCR1I2S0CellEnable = 1 << 10, kKeyLargoFCR1I2S0ClkEnable = 1 << 12, kKeyLargoFCR1I2S0Enable = 1 << 13,
kKeyLargoFCR1I2S1CellEnable = 1 << 17, kKeyLargoFCR1I2S1ClkEnable = 1 << 19, kKeyLargoFCR1I2S1Enable = 1 << 20, kKeyLargoFCR1EIDE0Enable = 1 << 23,
kKeyLargoFCR1EIDE0Reset = 1 << 24, kKeyLargoFCR1EIDE1Enable = 1 << 26, kKeyLargoFCR1EIDE1Reset = 1 << 27, kKeyLargoFCR1UIDEEnable = 1 << 29, kKeyLargoFCR1UIDEReset = 1 << 30,
kKeyLargoFCR2IOBusEnable = 1 << 1, kKeyLargoFCR2SleepState = 1 << 8, kPangeaFCR2StopAllKLClocks = 1 << 8, kKeyLargoFCR2MPICEnable = 1 << 17, kPangeaCardSlotReset = 1 << 18, kKeyLargoFCR2AltDataOut = 1 << 25,
kKeyLargoFCR3ShutdownPLLTotal = 1 << 0, kKeyLargoFCR3ShutdownPLLKW6 = 1 << 1, kIntrepidFCR3ShutdownPLL3 = 1 << 1, kKeyLargoFCR3ShutdownPLLKW4 = 1 << 2, kIntrepidFCR3ShutdownPLL2 = 1 << 2, kKeyLargoFCR3ShutdownPLLKW35 = 1 << 3, kIntrepidFCR3ShutdownPLL1 = 1 << 3, kKeyLargoFCR3ShutdownPLLKW12 = 1 << 4, kIntrepidFCR3EnablePll3Shutdown = 1 << 4, kKeyLargoFCR3PLLReset = 1 << 5, kIntrepidFCR3EnablePLL2Shutdown = 1 << 5, kIntrepidFCR3EnablePLL1Shutdown = 1 << 6, kKeyLargoFCR3ShutdownPLL2X = 1 << 7,
kKeyLargoFCR3Clk66Enable = 1 << 8, kKeyLargoFCR3Clk49Enable = 1 << 9, kKeyLargoFCR3Clk45Enable = 1 << 10, kKeyLargoFCR3Clk31Enable = 1 << 11, kKeyLargoFCR3TimerClk18Enable = 1 << 12, kKeyLargoFCR3I2S1Clk18Enable = 1 << 13, kKeyLargoFCR3I2S0Clk18Enable = 1 << 14, kKeyLargoFCR3ViaClk16Enable = 1 << 15, kIntrepidFCR3ViaClk32Enable = 1 << 15,
kKeyLargoFCR3Stopping33Enabled = 1 << 19, kPangeaFCR3PLLEnableTest = 1 << 19,
kIntrepidFCR3Port5DisconnectSelect = 1 << 16, kIntrepidFCR3Port5ConnectSelect = 1 << 17, kIntrepidFCR3Port5ResumeSelect = 1 << 18, kIntrepidFCR3Port5Enable = 1 << 19, kIntrepidFCR3Port5Disconnect = 1 << 20, kIntrepidFCR3Port5Connect = 1 << 21, kIntrepidFCR3Port5Resume = 1 << 22,
kIntrepidFCR3Port6DisconnectSelect = 1 << 24, kIntrepidFCR3Port6ConnectSelect = 1 << 25, kIntrepidFCR3Port6ResumeSelect = 1 << 26, kIntrepidFCR3Port6Enable = 1 << 27, kIntrepidFCR3Port6Disconnect = 1 << 28, kIntrepidFCR3Port6Connect = 1 << 29, kIntrepidFCR3Port6Resume = 1 << 30,
kKeyLargoFCR4Port1DisconnectSelect = 1 << 0, kKeyLargoFCR4Port1ConnectSelect = 1 << 1, kKeyLargoFCR4Port1ResumeSelect = 1 << 2, kKeyLargoFCR4Port1Enable = 1 << 3, kKeyLargoFCR4Port1Disconnect = 1 << 4, kKeyLargoFCR4Port1Connect = 1 << 5, kKeyLargoFCR4Port1Resume = 1 << 6,
kKeyLargoFCR4Port2DisconnectSelect = 1 << 8, kKeyLargoFCR4Port2ConnectSelect = 1 << 9, kKeyLargoFCR4Port2ResumeSelect = 1 << 10, kKeyLargoFCR4Port2Enable = 1 << 11, kKeyLargoFCR4Port2Disconnect = 1 << 12, kKeyLargoFCR4Port2Connect = 1 << 13, kKeyLargoFCR4Port2Resume = 1 << 14,
kKeyLargoFCR4Port3DisconnectSelect = 1 << 16, kKeyLargoFCR4Port3ConnectSelect = 1 << 17, kKeyLargoFCR4Port3ResumeSelect = 1 << 18, kKeyLargoFCR4Port3Enable = 1 << 19, kKeyLargoFCR4Port3Disconnect = 1 << 20, kKeyLargoFCR4Port3Connect = 1 << 21, kKeyLargoFCR4Port3Resume = 1 << 22,
kKeyLargoFCR4Port4DisconnectSelect = 1 << 24, kKeyLargoFCR4Port4ConnectSelect = 1 << 25, kKeyLargoFCR4Port4ResumeSelect = 1 << 26, kKeyLargoFCR4Port4Enable = 1 << 27, kKeyLargoFCR4Port4Disconnect = 1 << 28, kKeyLargoFCR4Port4Connect = 1 << 29, kKeyLargoFCR4Port4Resume = 1 << 30,
kPangeaFCR5ViaUseClk31 = 1 << 0, kPangeaFCR5SCCUseClk31 = 1 << 1, kPangeaFCR5PwmClk32Enable = 1 << 2, kPangeaFCR5Clk3_68Enable = 1 << 4, kPangeaFCR5Clk32Enable = 1 << 5, };
enum {
kKeyLargoFCR0SleepBitsSet = (kKeyLargoFCR0USBRefSuspend),
kKeyLargoFCR0SleepBitsClear = (kKeyLargoFCR0SccAEnable |
kKeyLargoFCR0SccBEnable |
kKeyLargoFCR0SccCellEnable |
kKeyLargoFCR0IRDAEnable |
kKeyLargoFCR0IRDAClk32Enable |
kKeyLargoFCR0IRDAClk19Enable),
kKeyLargoFCR1SleepBitsSet = 0,
kKeyLargoFCR1SleepBitsClear = (kKeyLargoFCR1AudioSel22MClk |
kKeyLargoFCR1AudioClkEnable |
kKeyLargoFCR1AudioClkOutEnable |
kKeyLargoFCR1AudioCellEnable |
kKeyLargoFCR1I2S0CellEnable |
kKeyLargoFCR1I2S0ClkEnable |
kKeyLargoFCR1I2S0Enable |
kKeyLargoFCR1I2S1CellEnable |
kKeyLargoFCR1I2S1ClkEnable |
kKeyLargoFCR1I2S1Enable |
kKeyLargoFCR1EIDE0Enable |
kKeyLargoFCR1EIDE1Enable |
kKeyLargoFCR1UIDEEnable |
kKeyLargoFCR1EIDE0Reset |
kKeyLargoFCR1EIDE1Reset),
kKeyLargoFCR2SleepBitsSet = 0,
kKeyLargoFCR2SleepBitsClear = kKeyLargoFCR2IOBusEnable,
kKeyLargoFCR3SleepBitsSet = (kKeyLargoFCR3ShutdownPLLKW6 |
kKeyLargoFCR3ShutdownPLLKW4 |
kKeyLargoFCR3ShutdownPLLKW35 |
kKeyLargoFCR3ShutdownPLLKW12),
kKeyLargoFCR3SleepBitsClear = (kKeyLargoFCR3Clk66Enable |
kKeyLargoFCR3Clk49Enable |
kKeyLargoFCR3Clk45Enable |
kKeyLargoFCR3Clk31Enable |
kKeyLargoFCR3TimerClk18Enable |
kKeyLargoFCR3I2S1Clk18Enable |
kKeyLargoFCR3I2S0Clk18Enable |
kKeyLargoFCR3ViaClk16Enable),
kKeyLargoFCR3RestartBitsSet = (kKeyLargoFCR3ShutdownPLLKW6 |
kKeyLargoFCR3ShutdownPLLKW4 |
kKeyLargoFCR3ShutdownPLLKW35),
kKeyLargoFCR3RestartBitsClear = (kKeyLargoFCR3Clk66Enable |
kKeyLargoFCR3Clk49Enable |
kKeyLargoFCR3Clk45Enable |
kKeyLargoFCR3Clk31Enable |
kKeyLargoFCR3I2S1Clk18Enable |
kKeyLargoFCR3I2S0Clk18Enable),
kKeyLargoFCR4USB0SleepBitsSet = (kKeyLargoFCR4Port1DisconnectSelect |
kKeyLargoFCR4Port1ConnectSelect |
kKeyLargoFCR4Port1ResumeSelect |
kKeyLargoFCR4Port1Enable |
kKeyLargoFCR4Port2DisconnectSelect |
kKeyLargoFCR4Port2ConnectSelect |
kKeyLargoFCR4Port2ResumeSelect |
kKeyLargoFCR4Port2Enable),
kKeyLargoFCR4USB1SleepBitsSet = (kKeyLargoFCR4Port3DisconnectSelect |
kKeyLargoFCR4Port3ConnectSelect |
kKeyLargoFCR4Port3ResumeSelect |
kKeyLargoFCR4Port3Enable |
kKeyLargoFCR4Port4DisconnectSelect |
kKeyLargoFCR4Port4ConnectSelect |
kKeyLargoFCR4Port4ResumeSelect |
kKeyLargoFCR4Port4Enable),
kKeyLargoFCR4SleepBitsSet = (kKeyLargoFCR4USB0SleepBitsSet |
kKeyLargoFCR4USB1SleepBitsSet),
kKeyLargoFCR4USB0SleepBitsClear = 0,
kKeyLargoFCR4USB1SleepBitsClear = 0,
kKeyLargoFCR4SleepBitsClear = kKeyLargoFCR4USB0SleepBitsClear | kKeyLargoFCR4USB1SleepBitsClear
};
enum {
kPangeaFCR0SleepBitsSet = 0,
kPangeaFCR0SleepBitsClear = kKeyLargoFCR0USB1CellEnable |
kKeyLargoFCR0USB0CellEnable |
kKeyLargoFCR0SccCellEnable |
kKeyLargoFCR0SccBEnable |
kKeyLargoFCR0SccAEnable,
kPangeaFCR1SleepBitsSet = 0,
kPangeaFCR1SleepBitsClear = kKeyLargoFCR1UIDEEnable |
kKeyLargoFCR1I2S1Enable |
kKeyLargoFCR1I2S1ClkEnable |
kKeyLargoFCR1I2S1CellEnable |
kKeyLargoFCR1I2S0Enable |
kKeyLargoFCR1I2S0ClkEnable |
kKeyLargoFCR1I2S0CellEnable |
kKeyLargoFCR1AudioCellEnable |
kKeyLargoFCR1AudioClkOutEnable |
kKeyLargoFCR1AudioClkEnable |
kKeyLargoFCR1AudioSel22MClk,
kPangeaFCR2SleepBitsSet = kKeyLargoFCR2AltDataOut,
kPangeaFCR2SleepBitsClear = 0,
kPangeaFCR3SleepBitsSet = kKeyLargoFCR3ShutdownPLLKW35 |
kKeyLargoFCR3ShutdownPLLKW4 |
kKeyLargoFCR3ShutdownPLLKW6,
kPangeaFCR3SleepBitsClear = kKeyLargoFCR3ViaClk16Enable |
kKeyLargoFCR3I2S0Clk18Enable |
kKeyLargoFCR3I2S1Clk18Enable |
kKeyLargoFCR3TimerClk18Enable |
kKeyLargoFCR3Clk31Enable |
kKeyLargoFCR3Clk45Enable |
kKeyLargoFCR3Clk49Enable,
kPangeaFCR3RestartBitsSet = kKeyLargoFCR3ShutdownPLLKW35 |
kKeyLargoFCR3ShutdownPLLKW4 |
kKeyLargoFCR3ShutdownPLLKW6,
kPangeaFCR3RestartBitsClear = kKeyLargoFCR3I2S0Clk18Enable |
kKeyLargoFCR3I2S1Clk18Enable |
kKeyLargoFCR3Clk31Enable |
kKeyLargoFCR3Clk45Enable |
kKeyLargoFCR3Clk49Enable,
kPangeaFCR4SleepBitsSet = 0,
kPangeaFCR4SleepBitsClear = 0
};
enum {
kIntrepidFCR0SleepBitsSet = 0,
kIntrepidFCR0SleepBitsClear = kKeyLargoFCR0SccCellEnable |
kKeyLargoFCR0SccBEnable |
kKeyLargoFCR0SccAEnable,
kIntrepidFCR1SleepBitsSet = 0,
kIntrepidFCR1SleepBitsClear = kKeyLargoFCR1I2S1Enable |
kKeyLargoFCR1I2S1ClkEnable |
kKeyLargoFCR1I2S1CellEnable |
kKeyLargoFCR1I2S0Enable |
kKeyLargoFCR1I2S0ClkEnable |
kKeyLargoFCR1I2S0CellEnable |
kKeyLargoFCR1EIDE0Enable,
kIntrepidFCR2SleepBitsSet = 0,
kIntrepidFCR2SleepBitsClear = 0,
kIntrepidFCR3USB2SleepBitsSet = (kIntrepidFCR3Port5DisconnectSelect |
kIntrepidFCR3Port5ConnectSelect |
kIntrepidFCR3Port5ResumeSelect |
kIntrepidFCR3Port5Enable |
kIntrepidFCR3Port6DisconnectSelect |
kIntrepidFCR3Port6ConnectSelect |
kIntrepidFCR3Port6ResumeSelect |
kIntrepidFCR3Port6Enable),
kIntrepidFCR3USB2SleepBitsClear = 0,
kIntrepidFCR3SleepBitsSet = 0,
kIntrepidFCR3SleepBitsClear = kKeyLargoFCR3ViaClk16Enable |
kKeyLargoFCR3I2S0Clk18Enable |
kKeyLargoFCR3I2S1Clk18Enable |
kKeyLargoFCR3TimerClk18Enable |
kKeyLargoFCR3Clk45Enable |
kKeyLargoFCR3Clk49Enable,
kIntrepidFCR3RestartBitsSet = kIntrepidFCR3ShutdownPLL3 |
kIntrepidFCR3ShutdownPLL2 |
kIntrepidFCR3ShutdownPLL1,
kIntrepidFCR3RestartBitsClear = kKeyLargoFCR3I2S0Clk18Enable |
kKeyLargoFCR3I2S1Clk18Enable |
kKeyLargoFCR3Clk45Enable |
kKeyLargoFCR3Clk49Enable,
kIntrepidFCR4SleepBitsSet = 0,
kIntrepidFCR4SleepBitsClear = 0
};
enum {
kIntrepidIsStopped49 = (1 << (31 - 31)),
kIntrepidIsStopped45 = (1 << (31 - 30)),
kIntrepidIsStopped32 = (1 << (31 - 29)),
kIntrepidIsStoppedUSB2 = (1 << (31 - 28)),
kIntrepidIsStoppedUSB1 = (1 << (31 - 27)),
kIntrepidIsStoppedUSB0 = (1 << (31 - 26)),
kIntrepidIsStoppedVEO1 = (1 << (31 - 25)),
kIntrepidIsStoppedVEO0 = (1 << (31 - 24)),
kIntrepidIsStoppedPCI_FB_CLK_OUT = (1 << (31 - 23)),
kIntrepidIsStoppedSlot2 = (1 << (31 - 22)),
kIntrepidIsStoppedSlot1 = (1 << (31 - 21)),
kIntrepidIsStoppedSlot0 = (1 << (31 - 20)),
kIntrepidIsStoppedVIA32 = (1 << (31 - 19)),
kIntrepidIsStoppedSCC_RTClk32or45 = (1 << (31 - 18)),
kIntrepidIsStoppedSCC_RTClk18 = (1 << (31 - 17)),
kIntrepidIsStoppedTimer = (1 << (31 - 16)),
kIntrepidIsStoppedI2S1_18 = (1 << (31 - 15)),
kIntrepidIsStoppedI2S1_45or49 = (1 << (31 - 14)),
kIntrepidIsStoppedI2S0_18 = (1 << (31 - 13)),
kIntrepidIsStoppedI2S0_45or49 = (1 << (31 - 12)),
kIntrepidIsStoppedAGPDel = (1 << (31 - 11)),
kIntrepidIsStoppedExtAGP = (1 << (31 - 10)),
kIntrepidIsStopped18 = (1 << (31 - 31)),
kIntrepidIsStoppedPCI0 = (1 << (31 - 30)),
kIntrepidIsStoppedAGP = (1 << (31 - 29)),
kIntrepidIsStopped7PCI1 = (1 << (31 - 28)),
kIntrepidIsStoppedUSB2PCI = (1 << (31 - 26)),
kIntrepidIsStoppedUSB1PCI = (1 << (31 - 25)),
kIntrepidIsStoppedUSB0PCI = (1 << (31 - 24)),
kIntrepidIsStoppedKLPCI = (1 << (31 - 23)),
kIntrepidIsStoppedPCI1 = (1 << (31 - 22)),
kIntrepidIsStoppedMAX = (1 << (31 - 21)),
kIntrepidIsStoppedATA100 = (1 << (31 - 20)),
kIntrepidIsStoppedATA66 = (1 << (31 - 19)),
kIntrepidIsStoppedGB = (1 << (31 - 18)),
kIntrepidIsStoppedFW = (1 << (31 - 17)),
kIntrepidIsStoppedPCI2 = (1 << (31 - 16)),
kIntrepidIsStoppedBUF_REF_CLK_OUT = (1 << (31 - 15)),
kIntrepidIsStoppedCPU = (1 << (31 - 14)),
kIntrepidIsStoppedCPUDel = (1 << (31 - 13)),
kIntrepidIsStoppedPLL4Ref = (1 << (31 - 12))
};
enum {
kKeyLargoMPICVectorsCount = 64,
kKeyLargoMPICIPICount = 4,
kKeyLargoMPICTaskPriorityCount = 4,
kKeyLargoMPICTimerCount = 4,
kKeyLargoMPICBaseOffset = 0x40000,
kKeyLargoMPICGlobal0 = 0x1020, kKeyLargoMPICIPI0 = 0x10A0, kKeyLargoMPICIPI1 = 0x10B0, kKeyLargoMPICIPI2 = 0x10C0, kKeyLargoMPICIPI3 = 0x10D0,
kKeyLargoMPICSpuriousVector = 0x10E0, kKeyLargoMPICTimeFreq = 0x10F0,
kKeyLargoMPICTimerBase0 = 0x1110, kKeyLargoMPICTimerBase1 = 0x1150, kKeyLargoMPICTimerBase2 = 0x1190, kKeyLargoMPICTimerBase3 = 0x11D0,
kKeyLargoMPICIntSrcSize = 0x20,
kKeyLargoMPICIntSrcVectPriBase = 0x10000, kKeyLargoMPICIntSrcDestBase = 0x10010,
kKeyLargoMPICP0CurrTaskPriority = 0x20080, kKeyLargoMPICP1CurrTaskPriority = 0x21080, kKeyLargoMPICP2CurrTaskPriority = 0x22080, kKeyLargoMPICP3CurrTaskPriority = 0x23080 };
enum {
kKeyLargoVIABaseOffset = 0x16000, kKeyLargovBufB = 0, kKeyLargovBufAH = 0x200, kKeyLargovDIRB = 0x400, kKeyLargovDIRA = 0x600, kKeyLargovT1C = 0x800, kKeyLargovT1CH = 0xA00, kKeyLargovT1L = 0xC00, kKeyLargovT1LH = 0xE00, kKeyLargovT2C = 0x1000, kKeyLargovT2CH = 0x1200, kKeyLargovSR = 0x1400, kKeyLargovACR = 0x1600, kKeyLargovPCR = 0x1800, kKeyLargovIFR = 0x1A00, kKeyLargovIER = 0x1C00, kKeyLargovBufA = 0x1E00, kKeyLargovBufD = kKeyLargovBufA };
enum {
kKeyLargoDBDMAChannelCount = 13, kKeyLargoDBDMABaseOffset = 0x8000, kKeyLargoDBDMAChannelStride = 0x100 };
enum {
kKeyLargoAudioRegisterCount = 25, kKeyLargoAudioBaseOffset = 0x14000, kKeyLargoAudioRegisterStride = 0x10 };
enum {
kKeyLargoI2SRegisterCount = 10, kKeyLargoI2SChannelCount = 2, kKeyLargoI2S0BaseOffset = 0x10000, kKeyLargoI2S1BaseOffset = 0x11000, kKeyLargoI2SRegisterStride = 0x10 };
enum {
kKeyLargoGPIOLevels0 = 0x50, kKeyLargoGPIOLevels1 = 0x54, kKeyLargoExtIntGPIOBase = 0x50, kKeyLargoExtIntGPIORegBase = 0x58, kKeyLargoExtIntGPIOCount = 18, kKeyLargoGPIOBase = 0x6A, kKeyLargoGPIOCount = 17, kKeyLargoGPIOOutputEnable = 0x04, kKeyLargoGPIOData = 0x01,
};
class USBKeyLargo;
class KeyLargoWatchDogTimer;
class KeyLargo : public AppleMacIO
{
OSDeclareDefaultStructors(KeyLargo);
protected:
IOLogicalAddress keyLargoBaseAddress;
UInt32 keyLargoVersion;
UInt32 keyLargoDeviceId;
IOService * keyLargoService;
bool changeModemReset;
virtual void AdjustBusSpeeds ( void );
virtual void saveVIAState(UInt8* savedK2ViaState);
virtual void restoreVIAState(UInt8* savedK2ViaState);
KeyLargoWatchDogTimer *watchDogTimer;
IOSimpleLock *mutex;
long long busSpeed;
bool hostIsMobile;
enum {
kMaxNumUSB = 3,
};
UInt32 fNumUSB;
USBKeyLargo *usbBus[kMaxNumUSB];
UInt8 fBaseUSBID;
bool fHasSoftModem;
public:
virtual bool start(IOService *provider);
virtual long long syncTimeBase(void);
virtual void recalibrateBusSpeeds(void);
virtual UInt8 readRegUInt8(unsigned long offset);
virtual void writeRegUInt8(unsigned long offset, UInt8 data);
virtual UInt32 readRegUInt32(unsigned long offset);
virtual void writeRegUInt32(unsigned long offset, UInt32 data);
virtual void safeWriteRegUInt8(unsigned long offset, UInt8 mask, UInt8 data);
virtual UInt8 safeReadRegUInt8(unsigned long offset);
virtual void safeWriteRegUInt32(unsigned long offset, UInt32 mask, UInt32 data) = 0;
virtual UInt32 safeReadRegUInt32(unsigned long offset);
virtual bool publishChildren(IOService * driver, IOService *(*createChildNub)(IORegistryEntry *) = 0);
virtual bool publishChild(IOService * driver, IORegistryEntry * child,
IOService *(*createChildNub)(IORegistryEntry *) = 0);
};
#endif