ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

hwinfo.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:         ReactOS Boot Loader
00003  * LICENSE:         BSD - See COPYING.ARM in the top level directory
00004  * FILE:            boot/armllb/hw/omap3-zoom2/hwuart.c
00005  * PURPOSE:         LLB Hardware Info Routines for OMAP3 ZOOM2
00006  * PROGRAMMERS:     ReactOS Portable Systems Group
00007  */
00008 
00009 #include "precomp.h"
00010 
00011 TIMEINFO LlbTime;
00012 
00013 #define BCD_INT(bcd) (((bcd & 0xf0) >> 4) * 10 + (bcd &0x0f))
00014 
00015 ULONG
00016 NTAPI
00017 LlbHwGetBoardType(VOID)
00018 {
00019     return MACH_TYPE_OMAP_ZOOM2;
00020 }
00021 
00022 ULONG
00023 NTAPI
00024 LlbHwGetPClk(VOID)
00025 {
00026     return 48000000;
00027 }
00028 
00029 ULONG
00030 NTAPI
00031 LlbHwGetTmr0Base(VOID)
00032 {
00033     return 0x48318000;
00034 }
00035 
00036 ULONG
00037 NTAPI
00038 LlbHwGetSerialUart(VOID)
00039 {
00040     return 0;
00041 } 
00042 
00043 ULONG
00044 LlbHwRtcRead(VOID)
00045 {
00046     /* Issue the GET_TIME request on the RTC control register */
00047     LlbHwOmap3TwlWrite1(0x4B, 0x29, 0x41);
00048     
00049     /* Read the BCD registers and convert them */
00050     LlbTime.Second = BCD_INT(LlbHwOmap3TwlRead1(0x4B, 0x1C));
00051     LlbTime.Minute = BCD_INT(LlbHwOmap3TwlRead1(0x4B, 0x1D));
00052     LlbTime.Hour = BCD_INT(LlbHwOmap3TwlRead1(0x4B, 0x1E));
00053     LlbTime.Day = BCD_INT(LlbHwOmap3TwlRead1(0x4B, 0x1F));
00054     LlbTime.Month = BCD_INT(LlbHwOmap3TwlRead1(0x4B, 0x20));
00055     LlbTime.Year = BCD_INT(LlbHwOmap3TwlRead1(0x4B, 0x21));
00056     LlbTime.Year += (LlbTime.Year > 80) ? 1900 : 2000;
00057     return 0;
00058 }
00059 
00060 /* EOF */

Generated on Sat May 26 2012 04:17:47 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.