mmc.h (08798026f24bd7c706e70372f8c323f0702c9a15) mmc.h (ab769f227f79bedae7840f99b6c0c4d66aafc78e)
1/*
2 * Copyright 2008,2010 Freescale Semiconductor, Inc
3 * Andy Fleming
4 *
5 * Based (loosely) on the Linux code
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */

--- 236 unchanged lines hidden (view full) ---

245 char *dest;
246 const char *src; /* src buffers don't get written to */
247 };
248 uint flags;
249 uint blocks;
250 uint blocksize;
251};
252
1/*
2 * Copyright 2008,2010 Freescale Semiconductor, Inc
3 * Andy Fleming
4 *
5 * Based (loosely) on the Linux code
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */

--- 236 unchanged lines hidden (view full) ---

245 char *dest;
246 const char *src; /* src buffers don't get written to */
247 };
248 uint flags;
249 uint blocks;
250 uint blocksize;
251};
252
253/* forward decl. */
254struct mmc;
255
256struct mmc_ops {
257 int (*send_cmd)(struct mmc *mmc,
258 struct mmc_cmd *cmd, struct mmc_data *data);
259 void (*set_ios)(struct mmc *mmc);
260 int (*init)(struct mmc *mmc);
261 int (*getcd)(struct mmc *mmc);
262 int (*getwp)(struct mmc *mmc);
263};
264
253struct mmc {
254 struct list_head link;
255 char name[32];
256 void *priv;
257 uint voltages;
258 uint version;
259 uint has_init;
260 uint f_min;

--- 17 unchanged lines hidden (view full) ---

278 uint write_bl_len;
279 uint erase_grp_size;
280 u64 capacity;
281 u64 capacity_user;
282 u64 capacity_boot;
283 u64 capacity_rpmb;
284 u64 capacity_gp[4];
285 block_dev_desc_t block_dev;
265struct mmc {
266 struct list_head link;
267 char name[32];
268 void *priv;
269 uint voltages;
270 uint version;
271 uint has_init;
272 uint f_min;

--- 17 unchanged lines hidden (view full) ---

290 uint write_bl_len;
291 uint erase_grp_size;
292 u64 capacity;
293 u64 capacity_user;
294 u64 capacity_boot;
295 u64 capacity_rpmb;
296 u64 capacity_gp[4];
297 block_dev_desc_t block_dev;
286 int (*send_cmd)(struct mmc *mmc,
287 struct mmc_cmd *cmd, struct mmc_data *data);
288 void (*set_ios)(struct mmc *mmc);
289 int (*init)(struct mmc *mmc);
290 int (*getcd)(struct mmc *mmc);
291 int (*getwp)(struct mmc *mmc);
298 const struct mmc_ops *ops;
292 uint b_max;
293 char op_cond_pending; /* 1 if we are waiting on an op_cond command */
294 char init_in_progress; /* 1 if we have done mmc_start_init() */
295 char preinit; /* start init as early as possible */
296 uint op_cond_response; /* the response byte from the last op_cond */
297};
298
299int mmc_register(struct mmc *mmc);

--- 49 unchanged lines hidden (view full) ---

349#else
350#define mmc_host_is_spi(mmc) 0
351#endif
352struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode);
353#else
354int mmc_legacy_init(int verbose);
355#endif
356
299 uint b_max;
300 char op_cond_pending; /* 1 if we are waiting on an op_cond command */
301 char init_in_progress; /* 1 if we have done mmc_start_init() */
302 char preinit; /* start init as early as possible */
303 uint op_cond_response; /* the response byte from the last op_cond */
304};
305
306int mmc_register(struct mmc *mmc);

--- 49 unchanged lines hidden (view full) ---

356#else
357#define mmc_host_is_spi(mmc) 0
358#endif
359struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode);
360#else
361int mmc_legacy_init(int verbose);
362#endif
363
357int board_mmc_init(bd_t *bis);
358
359#endif /* _MMC_H_ */
364#endif /* _MMC_H_ */