aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/linux/modules/other.mk
Commit message (Expand)AuthorAgeFilesLines
* kernel: other.mk: add thermal optionLuka Perkov2014-05-111-0/+1
* kernel: fix bluetooth and zsmalloc for 3.14Jonas Gorski2014-04-041-1/+23
* kernel: add missing zram optionHauke Mehrtens2014-03-121-1/+2
* kernel: add rtc-ds1672 module supportLuka Perkov2013-12-171-0/+17
* kernel: fix dependencies of kmod-thermalHauke Mehrtens2013-11-031-0/+1
* kernel: add packages for sdhci supportJohn Crispin2013-10-281-1/+22
* kernel: add kirkwood thermal moduleLuka Perkov2013-10-121-0/+17
* kernel: add industrialio-triggered-buffer.ko only when the config option is s...Hauke Mehrtens2013-10-011-1/+1
* kernel: disable kmod-iio for linux 3.6 as well (to avoid build issues due to ...Felix Fietkau2013-09-281-1/+1
* kernel: exclude regmap-spi.ko if SPI support cannot be selectedFelix Fietkau2013-09-271-1/+1
* kernel: mark kmod-thermal menuconfig symbol as hidden to avoid building it on...Felix Fietkau2013-09-271-0/+1
* kernel: add thermal modulesLuka Perkov2013-09-271-0/+63
* package/kernel: add support for industrial-io and AD799xGabor Juhos2013-09-251-0/+45
* package/kernel: move I2C-GPIO drivers from i2c.mk to other.mkGabor Juhos2013-09-251-0/+16
* kernel: make most modules use AutoProbeJohn Crispin2013-09-171-16/+14
* kernel: add missing config optionHauke Mehrtens2013-09-131-0/+1
* kernel: kmod-ssb, kmod-b44: fix load orderHauke Mehrtens2013-09-051-1/+1
* kernel: be consistent with formatting styleLuka Perkov2013-07-261-29/+30
* kernel: add a new global config symbol for enabling rfkill support (can be en...Felix Fietkau2013-07-211-1/+1
* kernel: fix kmod-rtc-pcf8563 dependenciesHauke Mehrtens2013-07-191-1/+1
* kernel: kmod-gpio-mcp23s08 depends on i2c-coreJonas Gorski2013-07-181-1/+1
* kernel: mtdtests depends on nandFelix Fietkau2013-07-181-0/+1
* kernel: bluetooth depends on crypto-hashFelix Fietkau2013-07-181-1/+1
* kernel: rfkill depends on input-coreFelix Fietkau2013-07-181-1/+1
* brcm47xx: do not load the kernel modules needed for Ethernet manuallyHauke Mehrtens2013-07-141-2/+2
* kernel: package the HW random core moduleFlorian Fainelli2013-07-101-0/+14
* kernel: fix 8250 ko name for 3.9John Crispin2013-07-041-1/+1
* packages: clean up the package folderJohn Crispin2013-06-211-0/+686
class="kt">uint32_t mmcsd_get_slice(uint32_t *data, uint32_t end, uint32_t start) { unsigned startidx, endidx, startoff; uint32_t endmask; osalDbgCheck((end >= start) && ((end - start) < 32)); startidx = start / 32; startoff = start % 32; endidx = end / 32; endmask = (1 << ((end % 32) + 1)) - 1; /* One or two pieces?*/ if (startidx < endidx) return (data[startidx] >> startoff) | /* Two pieces case. */ ((data[endidx] & endmask) << (32 - startoff)); return (data[startidx] & endmask) >> startoff; /* One piece case. */ } /*===========================================================================*/ /* Driver exported functions. */ /*===========================================================================*/ /** * @brief Extract card capacity from a CSD. * @details The capacity is returned as number of available blocks. * * @param[in] csd the CSD record * * @return The card capacity. * @retval 0 CSD format error */ uint32_t mmcsdGetCapacity(uint32_t csd[4]) { switch (csd[3] >> 30) { uint32_t a, b, c; case 0: /* CSD version 1.0 */ a = mmcsd_get_slice(csd, MMCSD_CSD_10_C_SIZE_SLICE); b = mmcsd_get_slice(csd, MMCSD_CSD_10_C_SIZE_MULT_SLICE); c = mmcsd_get_slice(csd, MMCSD_CSD_10_READ_BL_LEN_SLICE); return (a + 1) << (b + 2) << (c - 9); /* 2^9 == MMCSD_BLOCK_SIZE. */ case 1: /* CSD version 2.0.*/ return 1024 * (mmcsd_get_slice(csd, MMCSD_CSD_20_C_SIZE_SLICE) + 1); default: /* Reserved value detected.*/ return 0; } } #endif /* HAL_USE_MMC_SPI || HAL_USE_SDC */ /** @} */