SDHCI: Add struct sdhci_hardware to describe system to hardware Add a struct sdhci_hardware to describe the specific controls to the hardware the SDHCI controller is in, such as a PCI or generic bus system. Signed-off-by: Ben Dooks Index: linux-2.6.22-rc4-mmc1/drivers/mmc/host/sdhci.h =================================================================== --- linux-2.6.22-rc4-mmc1.orig/drivers/mmc/host/sdhci.h 2007-06-10 12:34:23.000000000 +0100 +++ linux-2.6.22-rc4-mmc1/drivers/mmc/host/sdhci.h 2007-06-10 12:37:57.000000000 +0100 @@ -162,6 +162,7 @@ #define SDHCI_SPEC_VER_SHIFT 0 struct sdhci_chip; +struct sdhci_hardwre; struct sdhci_host { struct sdhci_chip *chip; @@ -208,3 +209,26 @@ struct sdhci_chip { int num_slots; /* Slots on controller */ struct sdhci_host *hosts[0]; /* Pointers to hosts */ }; + +/* controller structure for defining the interface specific functions + * that the core needs to know about the hardware. +*/ + +struct sdhci_hardware { + unsigned int (*update_caps)(struct sdhci_host *host, unsigned int); + + unsigned int (*get_quirks)(struct sdhci_host *host); + unsigned long (*get_max_clk)(struct sdhci_host *host); + unsigned long (*get_timeout_clk)(struct sdhci_host *host); + + int (*set_clock)(struct sdhci_host *host, + unsigned int clock); + + void (*set_dma)(struct sdhci_host *host, int use_dma); + + unsigned long (*map_sg)(struct sdhci_host *host, + struct mmc_data *data); + + void (*unmap_sg)(struct sdhci_host *host, + struct mmc_data *data); +};