/* Driver for Realtek RTS51xx USB card reader * Header file * * Copyright(c) 2009 Realtek Semiconductor Corp. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, see block_shift = 5; (xd_card)->page_off = 0x1F #define XD_SET_BAD_NEWBLK(xd_card) (xd_card)->multi_flag |= 0x01 #define XD_CLR_BAD_NEWBLK(xd_card) (xd_card)->multi_flag &= ~0x01 #define XD_CHK_BAD_NEWBLK(xd_card) ((xd_card)->multi_flag & 0x01) #define XD_SET_BAD_OLDBLK(xd_card) (xd_card)->multi_flag |= 0x02 #define XD_CLR_BAD_OLDBLK(xd_card) (xd_card)->multi_flag &= ~0x02 #define XD_CHK_BAD_OLDBLK(xd_card) ((xd_card)->multi_flag & 0x02) #define XD_SET_MBR_FAIL(xd_card) (xd_card)->multi_flag |= 0x04 #define XD_CLR_MBR_FAIL(xd_card) (xd_card)->multi_flag &= ~0x04 #define XD_CHK_MBR_FAIL(xd_card) ((xd_card)->multi_flag & 0x04) #define XD_SET_ECC_FLD_ERR(xd_card) (xd_card)->multi_flag |= 0x08 #define XD_CLR_ECC_FLD_ERR(xd_card) (xd_card)->multi_flag &= ~0x08 #define XD_CHK_ECC_FLD_ERR(xd_card) ((xd_card)->multi_flag & 0x08) #define XD_SET_4MB(xd_card) (xd_card)->multi_flag |= 0x10 #define XD_CLR_4MB(xd_card) (xd_card)->multi_flag &= ~0x10 #define XD_CHK_4MB(xd_card) ((xd_card)->multi_flag & 0x10) #define XD_SET_ECC_ERR(xd_card) (xd_card)->multi_flag |= 0x40 #define XD_CLR_ECC_ERR(xd_card) (xd_card)->multi_flag &= ~0x40 #define XD_CHK_ECC_ERR(xd_card) ((xd_card)->multi_flag & 0x40) #define PAGE_STATUS 0 #define BLOCK_STATUS 1 #define BLOCK_ADDR1_L 2 #define BLOCK_ADDR1_H 3 #define BLOCK_ADDR2_L 4 #define BLOCK_ADDR2_H 5 #define RESERVED0 6 #define RESERVED1 7 #define RESERVED2 8 #define RESERVED3 9 #define PARITY 10 #define CIS0_0 0 #define CIS0_1 1 #define CIS0_2 2 #define CIS0_3 3 #define CIS0_4 4 #define CIS0_5 5 #define CIS0_6 6 #define CIS0_7 7 #define CIS0_8 8 #define CIS0_9 9 #define CIS1_0 256 #define CIS1_1 256 + 1 #define CIS1_2 256 + 2 #define CIS1_3 256 + 3 #define CIS1_4 256 + 4 #define CIS1_5 256 + 5 #define CIS1_6 256 + 6 #define CIS1_7 256 + 7 #define CIS1_8 256 + 8 #define CIS1_9 256 + 9 int reset_xd_card(struct rts51x_chip *chip); int xd_delay_write(struct rts51x_chip *chip); int xd_rw(struct scsi_cmnd *srb, struct rts51x_chip *chip, u32 start_sector, u16 sector_cnt); void xd_free_l2p_tbl(struct rts51x_chip *chip); void xd_cleanup_work(struct rts51x_chip *chip); int xd_power_off_card3v3(struct rts51x_chip *chip); int release_xd_card(struct rts51x_chip *chip); #endif