Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
mmc.c File Reference
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/mmc/host.h>
#include <linux/mmc/card.h>
#include <linux/mmc/mmc.h>
#include "core.h"
#include "bus.h"
#include "mmc_ops.h"
#include "sd_ops.h"

Go to the source code of this file.

Macros

#define UNSTUFF_BITS(resp, start, size)
 

Functions

 MMC_DEV_ATTR (cid,"%08x%08x%08x%08x\n", card->raw_cid[0], card->raw_cid[1], card->raw_cid[2], card->raw_cid[3])
 
 MMC_DEV_ATTR (csd,"%08x%08x%08x%08x\n", card->raw_csd[0], card->raw_csd[1], card->raw_csd[2], card->raw_csd[3])
 
 MMC_DEV_ATTR (date,"%02d/%04d\n", card->cid.month, card->cid.year)
 
 MMC_DEV_ATTR (erase_size,"%u\n", card->erase_size<< 9)
 
 MMC_DEV_ATTR (preferred_erase_size,"%u\n", card->pref_erase<< 9)
 
 MMC_DEV_ATTR (fwrev,"0x%x\n", card->cid.fwrev)
 
 MMC_DEV_ATTR (hwrev,"0x%x\n", card->cid.hwrev)
 
 MMC_DEV_ATTR (manfid,"0x%06x\n", card->cid.manfid)
 
 MMC_DEV_ATTR (name,"%s\n", card->cid.prod_name)
 
 MMC_DEV_ATTR (oemid,"0x%04x\n", card->cid.oemid)
 
 MMC_DEV_ATTR (serial,"0x%08x\n", card->cid.serial)
 
 MMC_DEV_ATTR (enhanced_area_offset,"%llu\n", card->ext_csd.enhanced_area_offset)
 
 MMC_DEV_ATTR (enhanced_area_size,"%u\n", card->ext_csd.enhanced_area_size)
 
int mmc_attach_mmc (struct mmc_host *host)
 

Macro Definition Documentation

#define UNSTUFF_BITS (   resp,
  start,
  size 
)
Value:
({ \
const int __size = size; \
const u32 __mask = (__size < 32 ? 1 << __size : 0) - 1; \
const int __off = 3 - ((start) / 32); \
const int __shft = (start) & 31; \
u32 __res; \
\
__res = resp[__off] >> __shft; \
if (__size + __shft > 32) \
__res |= resp[__off-1] << ((32 - __shft) % 32); \
__res & __mask; \
})

Definition at line 45 of file mmc.c.

Function Documentation

int mmc_attach_mmc ( struct mmc_host host)

Definition at line 1475 of file mmc.c.

MMC_DEV_ATTR ( cid  ,
"%08x%08x%08x%08x\n"  ,
card->  raw_cid[0],
card->  raw_cid[1],
card->  raw_cid[2],
card->  raw_cid[3] 
)
MMC_DEV_ATTR ( csd  ,
"%08x%08x%08x%08x\n"  ,
card->  raw_csd[0],
card->  raw_csd[1],
card->  raw_csd[2],
card->  raw_csd[3] 
)
MMC_DEV_ATTR ( date  ,
"%02d/%04d\n"  ,
card->cid.  month,
card->cid.  year 
)
MMC_DEV_ATTR ( erase_size  ,
"%u\n"  ,
card->erase_size<<  9 
)
MMC_DEV_ATTR ( preferred_erase_size  ,
"%u\n"  ,
card->pref_erase<<  9 
)
MMC_DEV_ATTR ( fwrev  ,
"0x%x\n"  ,
card->cid.  fwrev 
)
MMC_DEV_ATTR ( hwrev  ,
"0x%x\n"  ,
card->cid.  hwrev 
)
MMC_DEV_ATTR ( manfid  ,
"0x%06x\n"  ,
card->cid.  manfid 
)
MMC_DEV_ATTR ( name  ,
"%s\n"  ,
card->cid.  prod_name 
)
MMC_DEV_ATTR ( oemid  ,
"0x%04x\n"  ,
card->cid.  oemid 
)
MMC_DEV_ATTR ( serial  ,
"0x%08x\n"  ,
card->cid.  serial 
)
MMC_DEV_ATTR ( enhanced_area_offset  ,
"%llu\n"  ,
card->ext_csd.  enhanced_area_offset 
)
MMC_DEV_ATTR ( enhanced_area_size  ,
"%u\n"  ,
card->ext_csd.  enhanced_area_size 
)