Deleted Added
full compact
mmcvar.h (222475) mmcvar.h (234524)
1/*-
2 * Copyright (c) 2006 Bernd Walter. All rights reserved.
3 * Copyright (c) 2006 M. Warner Losh. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

44 * right of the SD Group, SD-3C LLC, the SD Card Association or any third
45 * parties, which may result from its use. No license is granted by
46 * implication, estoppel or otherwise under any patent or other rights of the
47 * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing
48 * herein shall be construed as an obligation by the SD Group, the SD-3C LLC
49 * or the SD Card Association to disclose or distribute any technical
50 * information, know-how or other confidential information to any third party.
51 *
1/*-
2 * Copyright (c) 2006 Bernd Walter. All rights reserved.
3 * Copyright (c) 2006 M. Warner Losh. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

44 * right of the SD Group, SD-3C LLC, the SD Card Association or any third
45 * parties, which may result from its use. No license is granted by
46 * implication, estoppel or otherwise under any patent or other rights of the
47 * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing
48 * herein shall be construed as an obligation by the SD Group, the SD-3C LLC
49 * or the SD Card Association to disclose or distribute any technical
50 * information, know-how or other confidential information to any third party.
51 *
52 * "$FreeBSD: head/sys/dev/mmc/mmcvar.h 222475 2011-05-30 06:23:51Z jchandra $"
52 * "$FreeBSD: head/sys/dev/mmc/mmcvar.h 234524 2012-04-21 01:51:16Z marius $"
53 */
54
55#ifndef DEV_MMC_MMCVAR_H
56#define DEV_MMC_MMCVAR_H
57
58#include <dev/mmc/bridge.h>
59
60enum mmc_device_ivars {
61 MMC_IVAR_DSR_IMP,
62 MMC_IVAR_MEDIA_SIZE,
63 MMC_IVAR_RCA,
64 MMC_IVAR_SECTOR_SIZE,
65 MMC_IVAR_TRAN_SPEED,
66 MMC_IVAR_READ_ONLY,
67 MMC_IVAR_HIGH_CAP,
68 MMC_IVAR_CARD_TYPE,
69 MMC_IVAR_BUS_WIDTH,
70 MMC_IVAR_ERASE_SECTOR,
71 MMC_IVAR_MAX_DATA,
53 */
54
55#ifndef DEV_MMC_MMCVAR_H
56#define DEV_MMC_MMCVAR_H
57
58#include <dev/mmc/bridge.h>
59
60enum mmc_device_ivars {
61 MMC_IVAR_DSR_IMP,
62 MMC_IVAR_MEDIA_SIZE,
63 MMC_IVAR_RCA,
64 MMC_IVAR_SECTOR_SIZE,
65 MMC_IVAR_TRAN_SPEED,
66 MMC_IVAR_READ_ONLY,
67 MMC_IVAR_HIGH_CAP,
68 MMC_IVAR_CARD_TYPE,
69 MMC_IVAR_BUS_WIDTH,
70 MMC_IVAR_ERASE_SECTOR,
71 MMC_IVAR_MAX_DATA,
72// MMC_IVAR_,
72 MMC_IVAR_CARD_ID_STRING
73};
74
75/*
76 * Simplified accessors for pci devices
77 */
78#define MMC_ACCESSOR(var, ivar, type) \
79 __BUS_ACCESSOR(mmc, var, MMC, ivar, type)
80
81MMC_ACCESSOR(dsr_imp, DSR_IMP, int)
82MMC_ACCESSOR(media_size, MEDIA_SIZE, long)
83MMC_ACCESSOR(rca, RCA, int)
84MMC_ACCESSOR(sector_size, SECTOR_SIZE, int)
85MMC_ACCESSOR(tran_speed, TRAN_SPEED, int)
86MMC_ACCESSOR(read_only, READ_ONLY, int)
87MMC_ACCESSOR(high_cap, HIGH_CAP, int)
88MMC_ACCESSOR(card_type, CARD_TYPE, int)
89MMC_ACCESSOR(bus_width, BUS_WIDTH, int)
90MMC_ACCESSOR(erase_sector, ERASE_SECTOR, int)
91MMC_ACCESSOR(max_data, MAX_DATA, int)
73};
74
75/*
76 * Simplified accessors for pci devices
77 */
78#define MMC_ACCESSOR(var, ivar, type) \
79 __BUS_ACCESSOR(mmc, var, MMC, ivar, type)
80
81MMC_ACCESSOR(dsr_imp, DSR_IMP, int)
82MMC_ACCESSOR(media_size, MEDIA_SIZE, long)
83MMC_ACCESSOR(rca, RCA, int)
84MMC_ACCESSOR(sector_size, SECTOR_SIZE, int)
85MMC_ACCESSOR(tran_speed, TRAN_SPEED, int)
86MMC_ACCESSOR(read_only, READ_ONLY, int)
87MMC_ACCESSOR(high_cap, HIGH_CAP, int)
88MMC_ACCESSOR(card_type, CARD_TYPE, int)
89MMC_ACCESSOR(bus_width, BUS_WIDTH, int)
90MMC_ACCESSOR(erase_sector, ERASE_SECTOR, int)
91MMC_ACCESSOR(max_data, MAX_DATA, int)
92MMC_ACCESSOR(card_id_string, CARD_ID_STRING, const char *)
92
93#endif /* DEV_MMC_MMCVAR_H */
93
94#endif /* DEV_MMC_MMCVAR_H */