--- /dev/null
+/** @file\r
+\r
+ Copyright (c) 2008-2009, Apple Inc. All rights reserved.\r
+ \r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include <Base.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/OmapLib.h>\r
+#include <Omap3530/Omap3530.h>\r
+\r
+UINT32 \r
+GpioBase (\r
+ IN UINTN Port\r
+ )\r
+{\r
+ switch (Port) {\r
+ case 1: return GPIO1_BASE;\r
+ case 2: return GPIO2_BASE;\r
+ case 3: return GPIO3_BASE;\r
+ case 4: return GPIO4_BASE;\r
+ case 5: return GPIO5_BASE;\r
+ case 6: return GPIO6_BASE;\r
+ default: ASSERT(FALSE); return 0;\r
+ }\r
+}\r
+\r
+UINT32\r
+TimerBase (\r
+ IN UINTN Timer\r
+ )\r
+{\r
+ switch (Timer) {\r
+ case 1: return GPTIMER1_BASE;\r
+ case 2: return GPTIMER2_BASE;\r
+ case 3: return GPTIMER3_BASE;\r
+ case 4: return GPTIMER4_BASE;\r
+ case 5: return GPTIMER5_BASE;\r
+ case 6: return GPTIMER6_BASE;\r
+ case 7: return GPTIMER7_BASE;\r
+ case 8: return GPTIMER8_BASE;\r
+ case 9: return GPTIMER9_BASE;\r
+ case 10: return GPTIMER10_BASE;\r
+ case 11: return GPTIMER11_BASE;\r
+ case 12: return GPTIMER12_BASE;\r
+ default: return 0;\r
+ }\r
+}\r
+\r
+UINTN\r
+InterruptVectorForTimer (\r
+ IN UINTN Timer\r
+ )\r
+{\r
+ if ((Timer < 1) || (Timer > 12)) {\r
+ ASSERT(FALSE);\r
+ return 0xFFFFFFFF;\r
+ }\r
+\r
+ return 36 + Timer;\r
+}\r
+\r
+UINT32\r
+UartBase (\r
+ IN UINTN Uart\r
+ )\r
+{\r
+ switch (Uart) {\r
+ case 1: return UART1_BASE;\r
+ case 2: return UART2_BASE;\r
+ case 3: return UART3_BASE;\r
+ default: ASSERT(FALSE); return 0;\r
+ }\r
+}\r
+\r