uart: Replace Init calls with Enable/Disable

* Enable/Disable makes more sense and matches
  platform loader serial functions.
* Rework PL011 code after finding a PDF covering
  the details of it.
* Rename UART global defines in loader to be more
  exact about location
This commit is contained in:
Alexander von Gluck IV
2012-05-09 12:46:35 -05:00
parent 605041242a
commit 57a2ea0d54
6 changed files with 70 additions and 44 deletions
@@ -37,6 +37,9 @@ public:
void Init();
void InitPort(uint32 baud);
void Enable();
void Disable();
int PutChar(char c);
int GetChar(bool wait);
@@ -47,6 +50,7 @@ private:
void WriteUart(uint32 reg, unsigned char data);
unsigned char ReadUart(uint32 reg);
bool fUARTEnabled;
addr_t fUARTBase;
};
+4 -1
View File
@@ -93,9 +93,11 @@ public:
~UartPL011();
void InitEarly();
void Init();
void InitPort(uint32 baud);
void Enable();
void Disable();
int PutChar(char c);
int GetChar(bool wait);
@@ -106,6 +108,7 @@ private:
void WriteUart(uint32 reg, unsigned char data);
unsigned char ReadUart(uint32 reg);
bool fUARTEnabled;
addr_t fUARTBase;
};