FreeNOS
Public Types | Public Member Functions | Private Types | Private Attributes | Static Private Attributes
SunxiClockControl Class Reference

Allwinner Clock Control Unit (CCU) More...

#include <SunxiClockControl.h>

Public Types

enum  Clock { ClockEmacTx = 1, ClockEphy }
 Clock identifiers. More...
 
enum  Reset { ResetEmacTx = 1, ResetEphy }
 Reset signal identifiers. More...
 
enum  Result { Success, IOError, InvalidArgument }
 Result codes. More...
 

Public Member Functions

Result initialize ()
 Perform initialization. More...
 
Result enable (const Clock clock)
 Enable a clock. More...
 
Result deassert (const Reset reset)
 De-assert a reset signal. More...
 

Private Types

enum  Registers
 Hardware registers. More...
 

Private Attributes

Arch::IO m_io
 Memory I/O object. More...
 

Static Private Attributes

static const Address IOBase = 0x01C20000
 Physical base memory address of the CCU module. More...
 

Detailed Description

Allwinner Clock Control Unit (CCU)

Definition at line 38 of file SunxiClockControl.h.

Member Enumeration Documentation

◆ Clock

Clock identifiers.

Enumerator
ClockEmacTx 
ClockEphy 

Definition at line 59 of file SunxiClockControl.h.

◆ Registers

Hardware registers.

Definition at line 50 of file SunxiClockControl.h.

◆ Reset

Reset signal identifiers.

Enumerator
ResetEmacTx 
ResetEphy 

Definition at line 68 of file SunxiClockControl.h.

◆ Result

Result codes.

Enumerator
Success 
IOError 
InvalidArgument 

Definition at line 77 of file SunxiClockControl.h.

Member Function Documentation

◆ deassert()

SunxiClockControl::Result SunxiClockControl::deassert ( const Reset  reset)

De-assert a reset signal.

Parameters
resetReset signal identification
Returns
Result code

Definition at line 65 of file SunxiClockControl.cpp.

References DEBUG, ERROR, InvalidArgument, m_io, ResetEmacTx, ResetEphy, ARMIO::set(), and Success.

Referenced by Sun8iEmac::resetPhy().

◆ enable()

SunxiClockControl::Result SunxiClockControl::enable ( const Clock  clock)

Enable a clock.

Parameters
clockClock identification
Returns
Result code.

Definition at line 37 of file SunxiClockControl.cpp.

References ClockEmacTx, ClockEphy, DEBUG, ERROR, InvalidArgument, m_io, ARMIO::set(), and Success.

Referenced by Sun8iEmac::resetPhy().

◆ initialize()

SunxiClockControl::Result SunxiClockControl::initialize ( )

Perform initialization.

Returns
Result code.

Definition at line 21 of file SunxiClockControl.cpp.

References DEBUG, Memory::Device, ERROR, IO::getBase(), IOBase, IOError, m_io, IO::map(), PAGESIZE, Memory::Readable, IO::setBase(), IO::Success, Success, Memory::User, and Memory::Writable.

Referenced by Sun8iEmac::initialize().

Field Documentation

◆ IOBase

const Address SunxiClockControl::IOBase = 0x01C20000
staticprivate

Physical base memory address of the CCU module.

Definition at line 43 of file SunxiClockControl.h.

Referenced by initialize().

◆ m_io

Arch::IO SunxiClockControl::m_io
private

Memory I/O object.

Definition at line 114 of file SunxiClockControl.h.

Referenced by deassert(), enable(), and initialize().


The documentation for this class was generated from the following files: