Deleted Added
full compact
mmcvar.h (183763) mmcvar.h (184033)
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 183763 2008-10-11 13:05:13Z mav $"
52 * "$FreeBSD: head/sys/dev/mmc/mmcvar.h 184033 2008-10-18 16:17:04Z mav $"
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,
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,
70// MMC_IVAR_,
71};
72
73/*
74 * Simplified accessors for pci devices
75 */
76#define MMC_ACCESSOR(var, ivar, type) \
77 __BUS_ACCESSOR(mmc, var, MMC, ivar, type)
78
79MMC_ACCESSOR(dsr_imp, DSR_IMP, int)
80MMC_ACCESSOR(media_size, MEDIA_SIZE, off_t)
81MMC_ACCESSOR(rca, RCA, int)
82MMC_ACCESSOR(sector_size, SECTOR_SIZE, int)
83MMC_ACCESSOR(tran_speed, TRAN_SPEED, int)
84MMC_ACCESSOR(read_only, READ_ONLY, int)
85MMC_ACCESSOR(high_cap, HIGH_CAP, int)
86MMC_ACCESSOR(card_type, CARD_TYPE, int)
87MMC_ACCESSOR(bus_width, BUS_WIDTH, int)
71// MMC_IVAR_,
72};
73
74/*
75 * Simplified accessors for pci devices
76 */
77#define MMC_ACCESSOR(var, ivar, type) \
78 __BUS_ACCESSOR(mmc, var, MMC, ivar, type)
79
80MMC_ACCESSOR(dsr_imp, DSR_IMP, int)
81MMC_ACCESSOR(media_size, MEDIA_SIZE, off_t)
82MMC_ACCESSOR(rca, RCA, int)
83MMC_ACCESSOR(sector_size, SECTOR_SIZE, int)
84MMC_ACCESSOR(tran_speed, TRAN_SPEED, int)
85MMC_ACCESSOR(read_only, READ_ONLY, int)
86MMC_ACCESSOR(high_cap, HIGH_CAP, int)
87MMC_ACCESSOR(card_type, CARD_TYPE, int)
88MMC_ACCESSOR(bus_width, BUS_WIDTH, int)
89MMC_ACCESSOR(erase_sector, ERASE_SECTOR, int)
88
89#endif /* DEV_MMC_MMCVAR_H */
90
91#endif /* DEV_MMC_MMCVAR_H */