FreeNOS
|
Allwinner Power, Reset and Clock Management (PRCM) module. More...
#include <SunxiPowerManagement.h>
Public Types | |
enum | Result { Success, IOError, InvalidArgument } |
Result codes. More... | |
Public Member Functions | |
Result | initialize () |
Perform initialization. More... | |
Result | powerOnCore (const Size coreId) |
Power on a processor. More... | |
Private Types | |
enum | Registers { CpuPowerOff = 0x100, CpuPowerClamp = 0x140 } |
Hardware registers. More... | |
Private Attributes | |
Arch::IO | m_io |
Memory I/O object. More... | |
Static Private Attributes | |
static const Address | IOBase = 0x01F01400 |
Physical base memory address of the PRCM module. More... | |
static const Size | NumberOfCores = 4 |
Total number of cores supported. More... | |
Allwinner Power, Reset and Clock Management (PRCM) module.
Definition at line 38 of file SunxiPowerManagement.h.
|
private |
Hardware registers.
Enumerator | |
---|---|
CpuPowerOff | |
CpuPowerClamp |
Definition at line 53 of file SunxiPowerManagement.h.
Result codes.
Enumerator | |
---|---|
Success | |
IOError | |
InvalidArgument |
Definition at line 64 of file SunxiPowerManagement.h.
SunxiPowerManagement::Result SunxiPowerManagement::initialize | ( | ) |
Perform initialization.
Definition at line 20 of file SunxiPowerManagement.cpp.
References 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 SunxiCpuConfig::initialize().
SunxiPowerManagement::Result SunxiPowerManagement::powerOnCore | ( | const Size | coreId | ) |
Power on a processor.
coreId | Number of the core to power on. |
Definition at line 34 of file SunxiPowerManagement.cpp.
References coreId, CpuPowerClamp, CpuPowerOff, ERROR, InvalidArgument, m_io, NumberOfCores, Success, ARMIO::unset(), and ARMIO::write().
Referenced by SunxiCpuConfig::boot().
|
staticprivate |
Physical base memory address of the PRCM module.
Definition at line 43 of file SunxiPowerManagement.h.
Referenced by initialize().
|
private |
Memory I/O object.
Definition at line 90 of file SunxiPowerManagement.h.
Referenced by initialize(), and powerOnCore().
|
staticprivate |
Total number of cores supported.
Definition at line 46 of file SunxiPowerManagement.h.
Referenced by powerOnCore().