linux/drivers/staging/rts5208/xd.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Driver for Realtek PCI-Express card reader
 *
 * Copyright(c) 2009-2013 Realtek Semiconductor Corp. All rights reserved.
 *
 * Author:
 *   Wei WANG ([email protected])
 *   Micky Ching ([email protected])
 */

#include <linux/blkdev.h>
#include <linux/kthread.h>
#include <linux/sched.h>
#include <linux/vmalloc.h>

#include "rtsx.h"
#include "rtsx_transport.h"
#include "rtsx_scsi.h"
#include "rtsx_card.h"
#include "xd.h"

static int xd_build_l2p_tbl(struct rtsx_chip *chip, int zone_no);
static int xd_init_page(struct rtsx_chip *chip, u32 phy_blk, u16 logoff,
			u8 start_page, u8 end_page);

static inline void xd_set_err_code(struct rtsx_chip *chip, u8 err_code)
{}

static int xd_set_init_para(struct rtsx_chip *chip)
{}

static int xd_switch_clock(struct rtsx_chip *chip)
{}

static int xd_read_id(struct rtsx_chip *chip, u8 id_cmd, u8 *id_buf, u8 buf_len)
{}

static void xd_assign_phy_addr(struct rtsx_chip *chip, u32 addr, u8 mode)
{}

static int xd_read_redundant(struct rtsx_chip *chip, u32 page_addr,
			     u8 *buf, int buf_len)
{}

static int xd_read_data_from_ppb(struct rtsx_chip *chip, int offset,
				 u8 *buf, int buf_len)
{}

static int xd_read_cis(struct rtsx_chip *chip, u32 page_addr, u8 *buf,
		       int buf_len)
{}

static void xd_fill_pull_ctl_disable(struct rtsx_chip *chip)
{}

static void xd_fill_pull_ctl_stage1_barossa(struct rtsx_chip *chip)
{}

static void xd_fill_pull_ctl_enable(struct rtsx_chip *chip)
{}

static int xd_pull_ctl_disable(struct rtsx_chip *chip)
{}

static int reset_xd(struct rtsx_chip *chip)
{}

static int xd_check_data_blank(u8 *redunt)
{}

static u16 xd_load_log_block_addr(u8 *redunt)
{}

static int xd_init_l2p_tbl(struct rtsx_chip *chip)
{}

static inline void free_zone(struct zone_entry *zone)
{}

static void xd_set_unused_block(struct rtsx_chip *chip, u32 phy_blk)
{}

static u32 xd_get_unused_block(struct rtsx_chip *chip, int zone_no)
{}

static void xd_set_l2p_tbl(struct rtsx_chip *chip,
			   int zone_no, u16 log_off, u16 phy_off)
{}

static u32 xd_get_l2p_tbl(struct rtsx_chip *chip, int zone_no, u16 log_off)
{}

int reset_xd_card(struct rtsx_chip *chip)
{}

static int xd_mark_bad_block(struct rtsx_chip *chip, u32 phy_blk)
{}

static int xd_init_page(struct rtsx_chip *chip, u32 phy_blk,
			u16 logoff, u8 start_page, u8 end_page)
{}

static int xd_copy_page(struct rtsx_chip *chip, u32 old_blk, u32 new_blk,
			u8 start_page, u8 end_page)
{}

static int xd_reset_cmd(struct rtsx_chip *chip)
{}

static int xd_erase_block(struct rtsx_chip *chip, u32 phy_blk)
{}

static int xd_build_l2p_tbl(struct rtsx_chip *chip, int zone_no)
{}

static int xd_send_cmd(struct rtsx_chip *chip, u8 cmd)
{}

static int xd_read_multiple_pages(struct rtsx_chip *chip, u32 phy_blk,
				  u32 log_blk, u8 start_page, u8 end_page,
				  u8 *buf, unsigned int *index,
				  unsigned int *offset)
{}

static int xd_finish_write(struct rtsx_chip *chip,
			   u32 old_blk, u32 new_blk, u32 log_blk, u8 page_off)
{}

static int xd_prepare_write(struct rtsx_chip *chip,
			    u32 old_blk, u32 new_blk, u32 log_blk, u8 page_off)
{}

static int xd_write_multiple_pages(struct rtsx_chip *chip, u32 old_blk,
				   u32 new_blk, u32 log_blk, u8 start_page,
				   u8 end_page, u8 *buf, unsigned int *index,
				   unsigned int *offset)
{}

#ifdef XD_DELAY_WRITE
int xd_delay_write(struct rtsx_chip *chip)
{}
#endif

int xd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip,
	  u32 start_sector, u16 sector_cnt)
{}

void xd_free_l2p_tbl(struct rtsx_chip *chip)
{}

void xd_cleanup_work(struct rtsx_chip *chip)
{}

int xd_power_off_card3v3(struct rtsx_chip *chip)
{}

int release_xd_card(struct rtsx_chip *chip)
{}