#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/mtd/concat.h>
#include <linux/mtd/map.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/mtdram.h>
#include <linux/mtd/partitions.h>
#include <linux/cramfs_fs.h>
#include <asm/arch/hwregs/config_defs.h>
#include <asm/axisflashmap.h>
#include <asm/mmu.h>
Include dependency graph for axisflashmap.c:
Go to the source code of this file.
Data Structures | |
struct | partition_name |
Defines | |
#define | MEM_CSE0_SIZE (0x04000000) |
#define | MEM_CSE1_SIZE (0x04000000) |
#define | FLASH_UNCACHED_ADDR KSEG_E |
#define | FLASH_CACHED_ADDR KSEG_F |
#define | PAGESIZE (512) |
#define | NAND_BBT_SPACE 0x00400000 |
#define | MAX_PARTITIONS 7 |
#define | NUM_DEFAULT_PARTITIONS 3 |
#define | DEFAULT_ROOTFS_PARTITION_NO (-1) |
#define | DEFAULT_MEDIA_SIZE 0x800000 |
#define | FILESYSTEM_SECTOR (11 * CONFIG_ETRAX_PTABLE_SECTOR) |
Functions | |
static map_word | flash_read (struct map_info *map, unsigned long ofs) |
static void | flash_copy_from (struct map_info *map, void *to, unsigned long from, ssize_t len) |
static void | flash_write (struct map_info *map, map_word d, unsigned long adr) |
static struct mtd_info * | probe_cs (struct map_info *map_cs) |
mtd_info *__init | crisv32_nand_flash_probe (void) |
static struct mtd_info * | flash_probe (void) |
static int __init | init_axis_flash (void) |
module_init (init_axis_flash) | |
EXPORT_SYMBOL (axisflash_mtd) | |
Variables | |
unsigned long | romfs_in_flash |
unsigned long | romfs_start |
unsigned long | romfs_length |
unsigned long | nand_boot |
mtd_info * | axisflash_mtd = NULL |
static struct map_info | map_cse0 |
static struct map_info | map_cse1 |
static struct mtd_partition | axis_partitions [MAX_PARTITIONS] |
static struct mtd_partition | axis_default_partitions [NUM_DEFAULT_PARTITIONS] |
static struct mtd_partition | aux_partition |
#define DEFAULT_MEDIA_SIZE 0x800000 |
Definition at line 134 of file axisflashmap.c.
#define DEFAULT_ROOTFS_PARTITION_NO (-1) |
Definition at line 133 of file axisflashmap.c.
#define FILESYSTEM_SECTOR (11 * CONFIG_ETRAX_PTABLE_SECTOR) |
#define FLASH_CACHED_ADDR KSEG_F |
Definition at line 40 of file axisflashmap.c.
#define FLASH_UNCACHED_ADDR KSEG_E |
Definition at line 39 of file axisflashmap.c.
#define MAX_PARTITIONS 7 |
Definition at line 126 of file axisflashmap.c.
#define MEM_CSE0_SIZE (0x04000000) |
Definition at line 36 of file axisflashmap.c.
#define MEM_CSE1_SIZE (0x04000000) |
Definition at line 37 of file axisflashmap.c.
#define NAND_BBT_SPACE 0x00400000 |
Definition at line 52 of file axisflashmap.c.
#define NUM_DEFAULT_PARTITIONS 3 |
Definition at line 132 of file axisflashmap.c.
#define PAGESIZE (512) |
struct mtd_info* __init crisv32_nand_flash_probe | ( | void | ) |
EXPORT_SYMBOL | ( | axisflash_mtd | ) |
static void flash_copy_from | ( | struct map_info * | map, | |
void * | to, | |||
unsigned long | from, | |||
ssize_t | len | |||
) | [static] |
static struct mtd_info* flash_probe | ( | void | ) | [static] |
Definition at line 265 of file axisflashmap.c.
References KERN_ERR, map_cse0, map_cse1, printk, and probe_cs().
Referenced by init_axis_flash().
static map_word flash_read | ( | struct map_info * | map, | |
unsigned long | ofs | |||
) | [static] |
Definition at line 67 of file axisflashmap.c.
static void flash_write | ( | struct map_info * | map, | |
map_word | d, | |||
unsigned long | adr | |||
) | [static] |
static int __init init_axis_flash | ( | void | ) | [static] |
Definition at line 323 of file axisflashmap.c.
References axisflash_mtd, mtd_info::block_isbad, crisv32_nand_flash_probe(), mtd_info::erasesize, flash_probe(), KERN_INFO, mtd_info::name, nand_boot, mtd_info::owner, PAGESIZE, printk, mtd_info::read, romfs_in_flash, mtd_info::size, and THIS_MODULE.
module_init | ( | init_axis_flash | ) |
static struct mtd_info* probe_cs | ( | struct map_info * | map_cs | ) | [static] |
Definition at line 234 of file axisflashmap.c.
References KERN_INFO, and printk.
Referenced by flash_probe().
struct mtd_partition aux_partition [static] |
Initial value:
{
.name = "aux",
.size = 0,
.offset = 0
}
Definition at line 224 of file axisflashmap.c.
struct mtd_partition axis_default_partitions[NUM_DEFAULT_PARTITIONS] [static] |
Initial value:
{ { .name = "boot firmware", .size = CONFIG_ETRAX_PTABLE_SECTOR, .offset = 0 }, { .name = "kernel", .size = 10 * CONFIG_ETRAX_PTABLE_SECTOR, .offset = CONFIG_ETRAX_PTABLE_SECTOR }, #define FILESYSTEM_SECTOR { .name = "rwfs", .size = DEFAULT_MEDIA_SIZE - FILESYSTEM_SECTOR, .offset = FILESYSTEM_SECTOR } }
Definition at line 186 of file axisflashmap.c.
struct mtd_partition axis_partitions[MAX_PARTITIONS] [static] |
Definition at line 142 of file axisflashmap.c.
struct mtd_info* axisflash_mtd = NULL |
struct map_info map_cse0 [static] |
Initial value:
{ .name = "cse0", .size = MEM_CSE0_SIZE, .bankwidth = CONFIG_ETRAX_FLASH_BUSWIDTH, .read = flash_read, .copy_from = flash_copy_from, .write = flash_write, .map_priv_1 = FLASH_UNCACHED_ADDR }
Definition at line 100 of file axisflashmap.c.
Referenced by flash_probe().
struct map_info map_cse1 [static] |
Initial value:
{ .name = "cse1", .size = MEM_CSE1_SIZE, .bankwidth = CONFIG_ETRAX_FLASH_BUSWIDTH, .read = flash_read, .copy_from = flash_copy_from, .write = flash_write, .map_priv_1 = FLASH_UNCACHED_ADDR + MEM_CSE0_SIZE }
Definition at line 116 of file axisflashmap.c.
Referenced by flash_probe().
unsigned long nand_boot |
Referenced by init_axis_flash().
unsigned long romfs_in_flash |
Referenced by init_axis_flash(), and setup_arch().
unsigned long romfs_length |
Referenced by setup_arch().
unsigned long romfs_start |
Referenced by setup_arch().