mmci.c (a94c7b0a8f31a8bcf3b136d469f7eb6b6b57bb78) mmci.c (9e5ed094c89e55fbf11d2e81d60be98eb12346c0)
1/*
2 * linux/drivers/mmc/host/mmci.c - ARM PrimeCell MMCI PL180/1 driver
3 *
4 * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved.
5 * Copyright (C) 2010 ST-Ericsson SA
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

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

1266 * Set the maximum segment size. Since we aren't doing DMA
1267 * (yet) we are only limited by the data length register.
1268 */
1269 mmc->max_seg_size = mmc->max_req_size;
1270
1271 /*
1272 * Block size can be up to 2048 bytes, but must be a power of two.
1273 */
1/*
2 * linux/drivers/mmc/host/mmci.c - ARM PrimeCell MMCI PL180/1 driver
3 *
4 * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved.
5 * Copyright (C) 2010 ST-Ericsson SA
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

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

1266 * Set the maximum segment size. Since we aren't doing DMA
1267 * (yet) we are only limited by the data length register.
1268 */
1269 mmc->max_seg_size = mmc->max_req_size;
1270
1271 /*
1272 * Block size can be up to 2048 bytes, but must be a power of two.
1273 */
1274 mmc->max_blk_size = 1 << 11;
1274 mmc->max_blk_size = 2048;
1275
1276 /*
1275
1276 /*
1277 * Limit the number of blocks transferred so that we don't overflow
1278 * the maximum request size.
1277 * No limit on the number of blocks transferred.
1279 */
1278 */
1280 mmc->max_blk_count = mmc->max_req_size >> 11;
1279 mmc->max_blk_count = mmc->max_req_size;
1281
1282 spin_lock_init(&host->lock);
1283
1284 writel(0, host->base + MMCIMASK0);
1285 writel(0, host->base + MMCIMASK1);
1286 writel(0xfff, host->base + MMCICLEAR);
1287
1288 if (gpio_is_valid(plat->gpio_cd)) {

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

1515 },
1516 .probe = mmci_probe,
1517 .remove = __devexit_p(mmci_remove),
1518 .suspend = mmci_suspend,
1519 .resume = mmci_resume,
1520 .id_table = mmci_ids,
1521};
1522
1280
1281 spin_lock_init(&host->lock);
1282
1283 writel(0, host->base + MMCIMASK0);
1284 writel(0, host->base + MMCIMASK1);
1285 writel(0xfff, host->base + MMCICLEAR);
1286
1287 if (gpio_is_valid(plat->gpio_cd)) {

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

1514 },
1515 .probe = mmci_probe,
1516 .remove = __devexit_p(mmci_remove),
1517 .suspend = mmci_suspend,
1518 .resume = mmci_resume,
1519 .id_table = mmci_ids,
1520};
1521
1523static int __init mmci_init(void)
1524{
1525 return amba_driver_register(&mmci_driver);
1526}
1522module_amba_driver(mmci_driver);
1527
1523
1528static void __exit mmci_exit(void)
1529{
1530 amba_driver_unregister(&mmci_driver);
1531}
1532
1533module_init(mmci_init);
1534module_exit(mmci_exit);
1535module_param(fmax, uint, 0444);
1536
1537MODULE_DESCRIPTION("ARM PrimeCell PL180/181 Multimedia Card Interface driver");
1538MODULE_LICENSE("GPL");
1524module_param(fmax, uint, 0444);
1525
1526MODULE_DESCRIPTION("ARM PrimeCell PL180/181 Multimedia Card Interface driver");
1527MODULE_LICENSE("GPL");