Lines Matching defs:rtsx_softc
74 struct rtsx_softc {
88 void (*rtsx_intr_trans_ok)(struct rtsx_softc *sc);
90 void (*rtsx_intr_trans_ko)(struct rtsx_softc *sc);
201 static int rtsx_dma_alloc(struct rtsx_softc *sc);
203 static void rtsx_dma_free(struct rtsx_softc *sc);
205 static void rtsx_handle_card_present(struct rtsx_softc *sc);
207 static bool rtsx_is_card_present(struct rtsx_softc *sc);
208 static int rtsx_init(struct rtsx_softc *sc);
210 static int rtsx_rts5227_fill_driving(struct rtsx_softc *sc);
211 static int rtsx_rts5249_fill_driving(struct rtsx_softc *sc);
212 static int rtsx_rts5260_fill_driving(struct rtsx_softc *sc);
213 static int rtsx_read(struct rtsx_softc *, uint16_t, uint8_t *);
214 static int rtsx_read_cfg(struct rtsx_softc *sc, uint8_t func, uint16_t addr, uint32_t *val);
215 static int rtsx_write(struct rtsx_softc *sc, uint16_t addr, uint8_t mask, uint8_t val);
216 static int rtsx_read_phy(struct rtsx_softc *sc, uint8_t addr, uint16_t *val);
217 static int rtsx_write_phy(struct rtsx_softc *sc, uint8_t addr, uint16_t val);
218 static int rtsx_bus_power_off(struct rtsx_softc *sc);
219 static int rtsx_bus_power_on(struct rtsx_softc *sc);
220 static int rtsx_set_bus_width(struct rtsx_softc *sc, enum mmc_bus_width width);
221 static int rtsx_set_sd_timing(struct rtsx_softc *sc, enum mmc_bus_timing timing);
222 static int rtsx_set_sd_clock(struct rtsx_softc *sc, uint32_t freq);
223 static int rtsx_stop_sd_clock(struct rtsx_softc *sc);
224 static int rtsx_switch_sd_clock(struct rtsx_softc *sc, uint8_t clk, uint8_t n, uint8_t div, uint8_t mcu);
226 static void rtsx_sd_change_tx_phase(struct rtsx_softc *sc, uint8_t sample_point);
227 static void rtsx_sd_change_rx_phase(struct rtsx_softc *sc, uint8_t sample_point);
228 static void rtsx_sd_tuning_rx_phase(struct rtsx_softc *sc, uint32_t *phase_map);
229 static int rtsx_sd_tuning_rx_cmd(struct rtsx_softc *sc, uint8_t sample_point);
230 static int rtsx_sd_tuning_rx_cmd_wait(struct rtsx_softc *sc, struct mmc_command *cmd);
231 static void rtsx_sd_tuning_rx_cmd_wakeup(struct rtsx_softc *sc);
232 static void rtsx_sd_wait_data_idle(struct rtsx_softc *sc);
233 static uint8_t rtsx_sd_search_final_rx_phase(struct rtsx_softc *sc, uint32_t phase_map);
237 static int rtsx_led_enable(struct rtsx_softc *sc);
238 static int rtsx_led_disable(struct rtsx_softc *sc);
241 static void rtsx_init_cmd(struct rtsx_softc *sc, struct mmc_command *cmd);
242 static void rtsx_push_cmd(struct rtsx_softc *sc, uint8_t cmd, uint16_t reg,
244 static void rtsx_set_cmd_data_len(struct rtsx_softc *sc, uint16_t block_cnt, uint16_t byte_cnt);
245 static void rtsx_send_cmd(struct rtsx_softc *sc);
246 static void rtsx_ret_resp(struct rtsx_softc *sc);
247 static void rtsx_set_resp(struct rtsx_softc *sc, struct mmc_command *cmd);
248 static void rtsx_stop_cmd(struct rtsx_softc *sc);
249 static void rtsx_clear_error(struct rtsx_softc *sc);
250 static void rtsx_req_done(struct rtsx_softc *sc);
251 static int rtsx_send_req(struct rtsx_softc *sc, struct mmc_command *cmd);
252 static int rtsx_xfer_short(struct rtsx_softc *sc, struct mmc_command *cmd);
253 static void rtsx_ask_ppbuf_part1(struct rtsx_softc *sc);
254 static void rtsx_get_ppbuf_part1(struct rtsx_softc *sc);
255 static void rtsx_get_ppbuf_part2(struct rtsx_softc *sc);
256 static void rtsx_put_ppbuf_part1(struct rtsx_softc *sc);
257 static void rtsx_put_ppbuf_part2(struct rtsx_softc *sc);
258 static void rtsx_write_ppbuf(struct rtsx_softc *sc);
259 static int rtsx_xfer(struct rtsx_softc *sc, struct mmc_command *cmd);
260 static void rtsx_xfer_begin(struct rtsx_softc *sc);
261 static void rtsx_xfer_start(struct rtsx_softc *sc);
262 static void rtsx_xfer_finish(struct rtsx_softc *sc);
407 rtsx_dma_alloc(struct rtsx_softc *sc)
514 rtsx_dma_free(struct rtsx_softc *sc)
549 struct rtsx_softc *sc = arg;
614 rtsx_handle_card_present(struct rtsx_softc *sc)
649 struct rtsx_softc *sc = arg;
705 rtsx_is_card_present(struct rtsx_softc *sc)
717 rtsx_init(struct rtsx_softc *sc)
1281 rtsx_rts5227_fill_driving(struct rtsx_softc *sc)
1298 rtsx_rts5249_fill_driving(struct rtsx_softc *sc)
1314 rtsx_rts5260_fill_driving(struct rtsx_softc *sc)
1330 rtsx_read(struct rtsx_softc *sc, uint16_t addr, uint8_t *val)
1355 rtsx_read_cfg(struct rtsx_softc *sc, uint8_t func, uint16_t addr, uint32_t *val)
1384 rtsx_write(struct rtsx_softc *sc, uint16_t addr, uint8_t mask, uint8_t val)
1411 rtsx_read_phy(struct rtsx_softc *sc, uint8_t addr, uint16_t *val)
1435 rtsx_write_phy(struct rtsx_softc *sc, uint8_t addr, uint16_t val)
1460 rtsx_bus_power_off(struct rtsx_softc *sc)
1567 rtsx_bus_power_on(struct rtsx_softc *sc)
1748 rtsx_set_bus_width(struct rtsx_softc *sc, enum mmc_bus_width width)
1779 rtsx_set_sd_timing(struct rtsx_softc *sc, enum mmc_bus_timing timing)
1834 rtsx_set_sd_clock(struct rtsx_softc *sc, uint32_t freq)
1916 rtsx_stop_sd_clock(struct rtsx_softc *sc)
1925 rtsx_switch_sd_clock(struct rtsx_softc *sc, uint8_t clk, uint8_t n, uint8_t div, uint8_t mcu)
1955 rtsx_sd_change_tx_phase(struct rtsx_softc *sc, uint8_t sample_point)
1969 rtsx_sd_change_rx_phase(struct rtsx_softc *sc, uint8_t sample_point)
1983 rtsx_sd_tuning_rx_phase(struct rtsx_softc *sc, uint32_t *phase_map)
1999 rtsx_sd_tuning_rx_cmd(struct rtsx_softc *sc, uint8_t sample_point)
2053 rtsx_sd_tuning_rx_cmd_wait(struct rtsx_softc *sc, struct mmc_command *cmd)
2070 rtsx_sd_tuning_rx_cmd_wakeup(struct rtsx_softc *sc)
2076 rtsx_sd_wait_data_idle(struct rtsx_softc *sc)
2090 rtsx_sd_search_final_rx_phase(struct rtsx_softc *sc, uint32_t phase_map)
2130 rtsx_led_enable(struct rtsx_softc *sc)
2153 rtsx_led_disable(struct rtsx_softc *sc)
2205 rtsx_init_cmd(struct rtsx_softc *sc, struct mmc_command *cmd)
2224 rtsx_push_cmd(struct rtsx_softc *sc, uint8_t cmd, uint16_t reg,
2242 rtsx_set_cmd_data_len(struct rtsx_softc *sc, uint16_t block_cnt, uint16_t byte_cnt)
2258 rtsx_send_cmd(struct rtsx_softc *sc)
2279 rtsx_stop_cmd(struct rtsx_softc *sc)
2306 rtsx_clear_error(struct rtsx_softc *sc)
2317 rtsx_req_done(struct rtsx_softc *sc)
2351 rtsx_send_req(struct rtsx_softc *sc, struct mmc_command *cmd)
2410 rtsx_ret_resp(struct rtsx_softc *sc)
2423 rtsx_set_resp(struct rtsx_softc *sc, struct mmc_command *cmd)
2476 rtsx_xfer_short(struct rtsx_softc *sc, struct mmc_command *cmd)
2546 rtsx_ask_ppbuf_part1(struct rtsx_softc *sc)
2573 rtsx_get_ppbuf_part1(struct rtsx_softc *sc)
2626 rtsx_get_ppbuf_part2(struct rtsx_softc *sc)
2654 rtsx_put_ppbuf_part1(struct rtsx_softc *sc)
2689 rtsx_put_ppbuf_part2(struct rtsx_softc *sc)
2720 rtsx_write_ppbuf(struct rtsx_softc *sc)
2752 rtsx_xfer(struct rtsx_softc *sc, struct mmc_command *cmd)
2789 rtsx_xfer_begin(struct rtsx_softc *sc)
2806 rtsx_xfer_start(struct rtsx_softc *sc)
2901 rtsx_xfer_finish(struct rtsx_softc *sc)
2934 struct rtsx_softc *sc;
2936 sc = (struct rtsx_softc *)arg;
2952 struct rtsx_softc *sc;
2972 struct rtsx_softc *sc;
3041 struct rtsx_softc *sc;
3063 struct rtsx_softc *sc;
3128 struct rtsx_softc *sc;
3189 struct rtsx_softc *sc;
3258 struct rtsx_softc *sc;
3349 struct rtsx_softc *sc;
3420 struct rtsx_softc *sc;
3434 struct rtsx_softc *sc;
3508 struct rtsx_softc *sc;
3521 struct rtsx_softc *sc;
3539 struct rtsx_softc *sc;
3591 struct rtsx_softc *sc = device_get_softc(dev);
3775 struct rtsx_softc *sc = device_get_softc(dev);
3831 struct rtsx_softc *sc = device_get_softc(dev);
3902 DEFINE_CLASS_0(rtsx, rtsx_driver, rtsx_methods, sizeof(struct rtsx_softc));