Lines Matching refs:cycle
66 struct regmap_field *cycle; member
119 int *setup, int *pulse, int *cycle, int *cs_pulse) in calc_smc_vals() argument
142 *cycle += ret_val; in calc_smc_vals()
148 *cycle += ret_val; in calc_smc_vals()
150 ret_val = adjust_smc_value(cycle, range_cycle, ARRAY_SIZE(range_cycle)); in calc_smc_vals()
154 *cs_pulse = *cycle; in calc_smc_vals()
165 *cycle = *cs_pulse; in calc_smc_vals()
180 static void to_smc_format(int *setup, int *pulse, int *cycle, int *cs_pulse) in to_smc_format() argument
184 *cycle = (*cycle & 0x7f) | ((*cycle & 0x300) >> 1); in to_smc_format()
220 unsigned int cycle; /* SMC Cycle width in MCK ticks */ in set_smc_timing() local
229 cycle = calc_mck_cycles(ata->cyc8b, mck_hz); in set_smc_timing()
235 ret = calc_smc_vals(dev, &setup, &pulse, &cycle, &cs_pulse); in set_smc_timing()
242 setup, pulse, cycle, cs_pulse); in set_smc_timing()
243 to_smc_format(&setup, &pulse, &cycle, &cs_pulse); in set_smc_timing()
266 regmap_fields_write(fields.cycle, info->cs, in set_smc_timing()
267 AT91SAM9_SMC_NRDCYCLE(cycle) | in set_smc_timing()
268 AT91SAM9_SMC_NWECYCLE(cycle)); in set_smc_timing()
344 fields.cycle = devm_regmap_field_alloc(dev, smc, field); in at91sam9_smc_fields_init()
345 if (IS_ERR(fields.cycle)) in at91sam9_smc_fields_init()
346 return PTR_ERR(fields.cycle); in at91sam9_smc_fields_init()