File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939
4040#define SDHCI_AT91_PRESET_COMMON_CONF 0x400 /* drv type B, programmable clock mode */
4141
42+ /* drv type A, programmable clock mode */
43+ #define SDHCI_AT91_PRESET_DRVA_CONF (SDHCI_AT91_PRESET_COMMON_CONF \
44+ | 0x4000)
4245struct sdhci_at91_soc_data {
4346 const struct sdhci_pltfm_data * pdata ;
4447 bool baseclk_is_generated_internally ;
@@ -294,6 +297,9 @@ static int sdhci_at91_set_clks_presets(struct device *dev)
294297 preset_div = DIV_ROUND_UP (gck_rate , 50000000 ) - 1 ;
295298 writew (SDHCI_AT91_PRESET_COMMON_CONF | preset_div ,
296299 host -> ioaddr + SDHCI_PRESET_FOR_DDR50 );
300+ preset_div = DIV_ROUND_UP (gck_rate , priv -> soc_data -> max_sdr104_clk ) - 1 ;
301+ writew (SDHCI_AT91_PRESET_DRVA_CONF | preset_div ,
302+ host -> ioaddr + SDHCI_PRESET_FOR_HS400 );
297303
298304 clk_prepare_enable (priv -> mainck );
299305 clk_prepare_enable (priv -> gck );
You can’t perform that action at this time.
0 commit comments