]>
Commit | Line | Data |
---|---|---|
45516216 | 1 | struct scatterlist { |
2 | struct page *page; | |
3 | unsigned int offset; | |
4 | }; | |
5 | inline void sg_set_buf(struct scatterlist *sg, const void *buf) | |
6 | { | |
7 | sg->page = ((unsigned long)buf - 0x80000000 >> 12) - 0x0C000000; | |
8 | sg->offset = ((unsigned long)buf & 1UL << 12); | |
9 | } | |
10 | inline void sg_init_one(struct scatterlist *sg, const void *buf) | |
11 | { | |
12 | memset(sg, 0, sizeof(*sg)); | |
13 | sg_set_buf(sg, buf); | |
14 | }; | |
15 | static unsigned int mmc_sd_num_wr_blocks(struct mmc_card *card) | |
16 | { | |
17 | unsigned int blocks; | |
18 | struct scatterlist sg; | |
19 | sg_init_one(&sg, &blocks); | |
20 | } | |
21 | ||
22 | int mmc_blk_issue_rq() | |
23 | { | |
24 | struct mmc_card *card; | |
25 | unsigned int blocks; | |
26 | blocks = mmc_sd_num_wr_blocks(card); | |
27 | if (blocks) | |
28 | local_irq_disable(); | |
29 | } |