blob: 12b98ebc563f136bc14ef290532f209e6e971e0a [file] [log] [blame]
/*
* Flash-based transactional key-value store
*
* Copyright (C) 2010 Google, Inc.
* Author: Eugene Surovegin <es@google.com>
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
*/
#include <flash_ts.h>
#include <nand_ts.h>
#include <mmc_ts.h>
int flash_ts_set(const char *key, const char *value)
{
int res = 0;
#ifdef CONFIG_NAND_FTS
res = nand_ts_set(key, value);
#endif
#ifdef CONFIG_MMC_FTS
res = mmc_ts_set(key, value);
#endif
return res;
}
void flash_ts_get(const char *key, char *value, unsigned int size)
{
#ifdef CONFIG_NAND_FTS
nand_ts_get(key, value, size);
#endif
#ifdef CONFIG_MMC_FTS
mmc_ts_get(key, value, size);
#endif
}
int flash_ts_init(void)
{
int res = 0;
#ifdef CONFIG_NAND_FTS
res = nand_ts_init();
#endif
#ifdef CONFIG_MMC_FTS
res = mmc_ts_init();
#endif
return res;
}
/* Make sure MTD subsystem is already initialized */
late_initcall(flash_ts_init);