/* * $Id: sdmmc.c,v 1.3 2007/12/25 14:10:51 nbrk Exp $ */ #include #include #include #include /* * 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; ddp->sd_sbhp = self->dv_parent->dv_aux; printf("SD/MMC generic device\n"); sdmmc_init(ddp->sd_sbhp); return(0); }