]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BeagleBoardPkg/Tools/generate_image.c
ARM Packages: Removed trailing spaces
[mirror_edk2.git] / BeagleBoardPkg / Tools / generate_image.c
index 9426ca333761a1f3be36ce38fd90781cedc1a2f3..7fc3faba10cafd9c664a953b7238ef59b89c9d16 100644 (file)
@@ -2,13 +2,13 @@
  The data structures in this code come from:\r
  OMAP35x Applications Processor Technical Reference Manual chapter 25\r
  OMAP34xx Multimedia Device Technical Reference Manual chapter 26.4.8.\r
\r
- You should use the OMAP35x manual when possible. Some things, like SectionKey, \r
+\r
+ You should use the OMAP35x manual when possible. Some things, like SectionKey,\r
  are not defined in the OMAP35x manual and you have to use the OMAP34xx manual\r
- to find the data. \r
+ to find the data.\r
 \r
   Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
-  \r
+\r
   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
@@ -44,22 +44,22 @@ typedef struct {
   unsigned char  Version;\r
   unsigned short Reserved;\r
   unsigned int   Flags;\r
-  unsigned int   PRM_CLKSRC_CTRL; \r
-  unsigned int   PRM_CLKSEL; \r
+  unsigned int   PRM_CLKSRC_CTRL;\r
+  unsigned int   PRM_CLKSEL;\r
   unsigned int   CM_CLKSEL1_EMU;\r
   unsigned int   CM_CLKSEL_CORE;\r
   unsigned int   CM_CLKSEL_WKUP;\r
   unsigned int   CM_CLKEN_PLL_DPLL3;\r
-  unsigned int   CM_AUTOIDLE_PLL_DPLL3; \r
-  unsigned int   CM_CLKSEL1_PLL; \r
+  unsigned int   CM_AUTOIDLE_PLL_DPLL3;\r
+  unsigned int   CM_CLKSEL1_PLL;\r
   unsigned int   CM_CLKEN_PLL_DPLL4;\r
   unsigned int   CM_AUTOIDLE_PLL_DPLL4;\r
   unsigned int   CM_CLKSEL2_PLL;\r
-  unsigned int   CM_CLKSEL3_PLL; \r
-  unsigned int   CM_CLKEN_PLL_MPU; \r
-  unsigned int   CM_AUTOIDLE_PLL_MPU; \r
-  unsigned int   CM_CLKSEL1_PLL_MPU; \r
-  unsigned int   CM_CLKSEL2_PLL_MPU; \r
+  unsigned int   CM_CLKSEL3_PLL;\r
+  unsigned int   CM_CLKEN_PLL_MPU;\r
+  unsigned int   CM_AUTOIDLE_PLL_MPU;\r
+  unsigned int   CM_CLKSEL1_PLL_MPU;\r
+  unsigned int   CM_CLKSEL2_PLL_MPU;\r
   unsigned int   CM_CLKSTCTRL_MPU;\r
 } CHSETTINGS_DATA;\r
 \r
@@ -131,7 +131,7 @@ PopulateCHSETTINGSData (
   )\r
 {\r
   unsigned int Value;\r
-  \r
+\r
   CHSETTINGSData->SectionKey            = 0xC0C0C0C1;\r
   CHSETTINGSData->Valid                 = 0x1;\r
   CHSETTINGSData->Version               = 0x1;\r
@@ -191,10 +191,10 @@ PopulateCHRAMData (
   )\r
 {\r
   unsigned int Value;\r
-  \r
+\r
   CHRAMData->SectionKey         = 0xC0C0C0C2;\r
   CHRAMData->Valid              = 0x1;\r
-  \r
+\r
   fscanf(DataFile, "SDRC_SYSCONFIG_LSB=0x%04x\n", &Value);\r
   CHRAMData->SDRC_SYSCONFIG_LSB = Value;\r
   fscanf(DataFile, "SDRC_CS_CFG_LSB=0x%04x\n", &Value);\r
@@ -247,8 +247,8 @@ PopulateCHRAMData (
   CHRAMData->Flags              = 0x0003;\r
 }\r
 \r
-static \r
-void \r
+static\r
+void\r
 PrepareConfigurationHeader (\r
   void\r
   )\r
@@ -258,14 +258,14 @@ PrepareConfigurationHeader (
   CHRAM_DATA      CHRAMData;\r
   unsigned int    ConfigurationHdrOffset = 0;\r
   FILE            *DataFile;\r
-  \r
+\r
   // Open data file\r
   DataFile = fopen(gDataFile, "rb");\r
   if (DataFile == NULL) {\r
     fprintf(stderr, "Can't open data file %s.\n", gDataFile);\r
     exit(1);\r
   }\r
-  \r
+\r
   //Initialize configuration header.\r
   memset(gConfigurationHeader, 0x00, sizeof(gConfigurationHeader));\r
 \r
@@ -295,19 +295,19 @@ PrepareConfigurationHeader (
   memset(&CHRAMData, 0x00, sizeof(CHRAM_DATA));\r
   PopulateCHRAMData(DataFile, &CHRAMData);\r
   memcpy(gConfigurationHeader + Toc.Start, &CHRAMData, Toc.Size);\r
-  \r
+\r
   //Adjust ConfigurationHdrOffset to point to next TOC\r
   ConfigurationHdrOffset += sizeof(TOC_DATA);\r
 \r
   //Closing TOC item\r
   memset(gConfigurationHeader + ConfigurationHdrOffset, 0xFF, CLOSING_TOC_ITEM_SIZE);\r
   ConfigurationHdrOffset += CLOSING_TOC_ITEM_SIZE;\r
-  \r
+\r
   // Close data file\r
   fclose(DataFile);\r
 }\r
 \r
-static \r
+static\r
 void\r
 ConstructImage (\r
   void\r
@@ -324,19 +324,19 @@ ConstructImage (
   if (InputFile == NULL) {\r
     fprintf(stderr, "Can't open input file.\n");\r
     exit(0);\r
-  } \r
+  }\r
 \r
   // Get the size of the input image.\r
   fstat(fileno(InputFile), &FileStat);\r
   InputImageFileSize = FileStat.st_size;\r
-  \r
+\r
   OutputFile = fopen(gOutputImageFile, "wb");\r
   if (OutputFile == NULL) {\r
     fprintf(stderr, "Can't open output file %s.\n", gOutputImageFile);\r
     exit(0);\r
   }\r
 \r
-  // Write Configuration header \r
+  // Write Configuration header\r
   fwrite(gConfigurationHeader, 1, sizeof(gConfigurationHeader), OutputFile);\r
 \r
   // Write image header (Input image size, execution address)\r
@@ -354,16 +354,16 @@ ConstructImage (
 }\r
 \r
 \r
-int \r
+int\r
 main (\r
-  int    argc, \r
+  int    argc,\r
   char** argv\r
   )\r
 {\r
   char          Ch;\r
   unsigned char *ptr;\r
   int           i;\r
-  int           TwoArg;  \r
+  int           TwoArg;\r
 \r
   if (argc == 1) {\r
     PrintUsage ();\r
@@ -378,7 +378,7 @@ main (
         case 'E': /* Image execution address */\r
           gImageExecutionAddress = strtoul (TwoArg ? argv[i+1] : &argv[i][2], (char **)&ptr, 16);\r
           break;\r
-        \r
+\r
         case 'I': /* Input image file */\r
           gInputImageFile = TwoArg ? argv[i+1] : &argv[i][2];\r
           break;\r
@@ -386,7 +386,7 @@ main (
         case 'O': /* Output image file */\r
           gOutputImageFile = TwoArg ? argv[i+1] : &argv[i][2];\r
           break;\r
-        \r
+\r
         case 'D': /* Data file */\r
           gDataFile = TwoArg ? argv[i+1] : &argv[i][2];\r
           break;\r
@@ -397,7 +397,7 @@ main (
     }\r
   }\r
 \r
\r
+\r
   //Prepare configuration header\r
   PrepareConfigurationHeader ();\r
 \r