linux/drivers/memstick/core/ms_block.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 *  ms_block.h - Sony MemoryStick (legacy) storage support

 *  Copyright (C) 2013 Maxim Levitsky <[email protected]>
 *
 * Minor portions of the driver are copied from mspro_block.c which is
 * Copyright (C) 2007 Alex Dubov <[email protected]>
 *
 * Also ms structures were copied from old broken driver by same author
 * These probably come from MS spec
 */

#ifndef MS_BLOCK_NEW_H
#define MS_BLOCK_NEW_H

#define MS_BLOCK_MAX_SEGS
#define MS_BLOCK_MAX_PAGES

#define MS_BLOCK_MAX_BOOT_ADDR
#define MS_BLOCK_BOOT_ID
#define MS_BLOCK_INVALID
#define MS_MAX_ZONES
#define MS_BLOCKS_IN_ZONE

#define MS_BLOCK_MAP_LINE_SZ
#define MS_BLOCK_PART_SHIFT


#define MEMSTICK_UNCORR_ERROR

#define MEMSTICK_CORR_ERROR

#define MEMSTICK_INT_ERROR

#define MEMSTICK_OVERWRITE_FLAG_NORMAL

#define MEMSTICK_OV_PG_NORMAL

#define MEMSTICK_MANAGEMENT_FLAG_NORMAL     \

struct ms_boot_header {} __packed;


struct ms_system_item {} __packed;

struct ms_system_entry {} __packed;

struct ms_boot_attr_info {} __packed;

struct ms_cis_idi {} __packed;


struct ms_boot_page {} __packed;

struct msb_data {};

enum msb_readpage_states {};

enum msb_write_block_states {};

enum msb_send_command_states {};

enum msb_reset_states {};

enum msb_par_switch_states {};

struct chs_entry {};

static int msb_reset(struct msb_data *msb, bool full);

static int h_msb_default_bad(struct memstick_dev *card,
						struct memstick_request **mrq);

#define __dbg(level, format, ...)


#define dbg(format, ...)
#define dbg_verbose(format, ...)

#endif