[BACK]Return to sdmmc.c CVS log [TXT][DIR] Up to [local] / funnyos / dev / sdmmc

Diff for /funnyos/dev/sdmmc/sdmmc.c between version 1.2 and 1.3

version 1.2, 2007/12/21 17:45:26 version 1.3, 2007/12/25 14:10:51
Line 2 
Line 2 
  * $Id$   * $Id$
  */   */
 #include <sys/types.h>  #include <sys/types.h>
   #include <sys/device.h>
 #include <dev/sdmmc/sdmmcvar.h>  #include <dev/sdmmc/sdmmcvar.h>
   
 struct sdmmc_cmdframe  #include <libkern/printf.h>
 sdmmc_command(uint8_t cmd, uint32_t arg, uint8_t crc)  
   /*
    * SD/MMC device.
    */
   struct sdmmc_dd {
           struct sdmmc_bus_handle *sd_sbhp;
   
   };
   
   int     sdmmc_attach(struct device *, uint32_t, uint8_t);
   
   
   
   struct driver sdmmc_dr = {
           sizeof(struct sdmmc_dd),
           sdmmc_attach,
           NULL,
           NULL
   };
   
   
   int
   sdmmc_attach(struct device *self, uint32_t loc, uint8_t flags)
 {  {
         /*          struct sdmmc_dd *ddp = self->dv_devdata;
          * Construct command frame and return it.          ddp->sd_sbhp = self->dv_parent->dv_aux;
          */  
         struct sdmmc_cmdframe cmdframe;  
   
         cmdframe.sc_cmd = CMDFRAME_CMD(cmd);          printf("SD/MMC generic device\n");
         cmdframe.sc_arg = arg;  
         cmdframe.sc_crc = cmd != 0 ? CMDFRAME_CRC(crc) : crc;  
   
         return(cmdframe);          sdmmc_init(ddp->sd_sbhp);
   
           return(0);
 }  }
   
   

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

CVSweb