FreeNOS
|
Broadcom 2836 device specific I/O configuration. More...
#include <Broadcom2836.h>
Public Types | |
enum | Timer { PhysicalTimer1 } |
Hardware timers available in BCM 2836. More... | |
enum | Result { Success, NotFound, IOError, FrequencyError } |
Result code. More... | |
Public Member Functions | |
Broadcom2836 (Size coreId) | |
Constructor. More... | |
Result | initialize () |
Initialize the Controller. More... | |
Result | setCoreTimerIrq (Timer timer, bool enable) |
Set Core Timer interrupt. More... | |
bool | getCoreTimerIrqStatus (Timer timer) const |
Get core timer interrupt status. More... | |
Private Types | |
enum | Registers { CorePrescalerRegister = 0x0008, CoreTimerRegister = 0x0040, CoreIrqRegister = 0x0060, CoreSetMailboxRegister = 0x0080 } |
Hardware registers. More... | |
Private Attributes | |
Size | m_coreId |
Core identifier. More... | |
ARMIO | m_io |
I/O instance. More... | |
Static Private Attributes | |
static const Address | IOBase = 0x40000000 |
Base address for the BCM2836 I/O configuration. More... | |
Broadcom 2836 device specific I/O configuration.
Definition at line 38 of file Broadcom2836.h.
|
private |
Hardware registers.
Enumerator | |
---|---|
CorePrescalerRegister | |
CoreTimerRegister | |
CoreIrqRegister | |
CoreSetMailboxRegister |
Definition at line 48 of file Broadcom2836.h.
enum Broadcom2836::Result |
Result code.
Enumerator | |
---|---|
Success | |
NotFound | |
IOError | |
FrequencyError |
Definition at line 69 of file Broadcom2836.h.
enum Broadcom2836::Timer |
Hardware timers available in BCM 2836.
Enumerator | |
---|---|
PhysicalTimer1 |
Definition at line 61 of file Broadcom2836.h.
Broadcom2836::Broadcom2836 | ( | Size | coreId | ) |
Constructor.
Definition at line 20 of file Broadcom2836.cpp.
References IOBase, m_io, and IO::setBase().
bool Broadcom2836::getCoreTimerIrqStatus | ( | Timer | timer | ) | const |
Get core timer interrupt status.
timer | Timer to check for interrupt status |
Definition at line 52 of file Broadcom2836.cpp.
References CoreIrqRegister, m_coreId, m_io, PhysicalTimer1, and ARMIO::read().
Broadcom2836::Result Broadcom2836::initialize | ( | ) |
Initialize the Controller.
Definition at line 26 of file Broadcom2836.cpp.
References Success.
Broadcom2836::Result Broadcom2836::setCoreTimerIrq | ( | Timer | timer, |
bool | enable | ||
) |
timer | Timer to set |
enable | True to enable the timer interrupt |
Definition at line 31 of file Broadcom2836.cpp.
References CoreTimerRegister, m_coreId, m_io, NotFound, PhysicalTimer1, ARMIO::set(), Success, and ARMIO::unset().
|
staticprivate |
Base address for the BCM2836 I/O configuration.
Definition at line 43 of file Broadcom2836.h.
Referenced by Broadcom2836().
|
private |
Core identifier.
Definition at line 113 of file Broadcom2836.h.
Referenced by getCoreTimerIrqStatus(), and setCoreTimerIrq().
|
private |
I/O instance.
Definition at line 116 of file Broadcom2836.h.
Referenced by Broadcom2836(), getCoreTimerIrqStatus(), and setCoreTimerIrq().