static int cache_timeout = 1000;
module_param(cache_timeout, int, S_IRUGO);
static int cache_timeout = 1000;
module_param(cache_timeout, int, S_IRUGO);
};
/* Find out media parameters.
* This ideally has to be based on nand id, but for now device size is enough */
};
/* Find out media parameters.
* This ideally has to be based on nand id, but for now device size is enough */
/* ----------------- cache handling ------------------------------------------*/
/* Initialize the one block cache */
/* ----------------- cache handling ------------------------------------------*/
/* Initialize the one block cache */
{
memcpy(ftl->cache_data + boffset, buffer, SM_SECTOR_SIZE);
clear_bit(boffset / SM_SECTOR_SIZE, &ftl->cache_data_invalid_bitmap);
{
memcpy(ftl->cache_data + boffset, buffer, SM_SECTOR_SIZE);
clear_bit(boffset / SM_SECTOR_SIZE, &ftl->cache_data_invalid_bitmap);
{
if (test_bit(boffset / SM_SECTOR_SIZE,
&ftl->cache_data_invalid_bitmap))
{
if (test_bit(boffset / SM_SECTOR_SIZE,
&ftl->cache_data_invalid_bitmap))