|
From: Paul M. <le...@us...> - 2006-08-07 11:22:20
|
Update of /cvsroot/linuxsh/linux/drivers/mtd/maps In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv27741/drivers/mtd/maps Modified Files: Kconfig Makefile Added Files: se7343.c Log Message: SolutionEngine 7343 MTD flash map. --- NEW FILE: se7343.c --- /* * linux/drivers/mtd/ms7343.c * */ #include <linux/module.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/init.h> #include <asm/io.h> #include <linux/mtd/mtd.h> #include <linux/mtd/map.h> #include <linux/mtd/concat.h> #include <linux/mtd/partitions.h> #include <linux/config.h> #include <linux/errno.h> static struct map_info ms7343_flash_map[2] = { { .name = "Bank 1", .phys = 0xa0000000, .size = (32 * 1024 * 1024), .bankwidth = 2, }, { .name = "Bank 2", .phys = 0xb8000000, .size = (32 * 1024 * 1024), .bankwidth = 2, }, }; static struct mtd_partition ms7343_partitions[] = { { .name = "U-Boot", .offset = 0, .size = (2 * 64 * 1024), .mask_flags = MTD_WRITEABLE, /* Read-only */ }, { .name = "rootfs", .offset = MTDPART_OFS_APPEND, .size = MTDPART_SIZ_FULL, }, }; static struct mtd_info *flash_mtd[2], *concat; static int __init init_ms7343_maps (void) { int i; for (i = 0; i < ARRAY_SIZE(ms7343_flash_map); i++) { printk ("MS7343 flash device: %lx at %lx\n", ms7343_flash_map[i].size, ms7343_flash_map[i].phys); ms7343_flash_map[i].virt = ioremap (ms7343_flash_map[i].phys, ms7343_flash_map[i].size); if (!ms7343_flash_map[i].virt) { printk ("Failed to ioremap\n"); return -EIO; } simple_map_init (&ms7343_flash_map[i]); flash_mtd[i] = do_map_probe ("cfi_probe", &ms7343_flash_map[i]); if (!flash_mtd[i]) return -ENXIO; } concat = mtd_concat_create(flash_mtd, 2, "SolutionEngine 7343 FLASH"); if (concat == NULL) { map_destroy(flash_mtd[0]); map_destroy(flash_mtd[1]); return -ENXIO; } add_mtd_partitions (concat, ms7343_partitions, ARRAY_SIZE(ms7343_partitions)); return 0; } static void __exit cleanup_ms7343_maps (void) { del_mtd_partitions(concat); mtd_concat_destroy(concat); map_destroy(flash_mtd[0]); map_destroy(flash_mtd[1]); } module_init(init_ms7343_maps); module_exit(cleanup_ms7343_maps); MODULE_DESCRIPTION("MTD map driver for MS7343 development board"); MODULE_LICENSE("GPL"); Index: Kconfig =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/mtd/maps/Kconfig,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Kconfig 7 Aug 2006 08:14:03 -0000 1.19 +++ Kconfig 7 Aug 2006 11:22:16 -0000 1.20 @@ -415,12 +415,12 @@ similar boards. Say 'Y' if you are building a kernel for such a board. config MTD_SUPERH_RESERVE - hex "Default reserved Flash size" - depends on MTD_SOLUTIONENGINE - default 300000 - help - The reserved memory is used by kernel and ram disk themselves. It's - starting from 0. + hex "Default reserved Flash size" + depends on MTD_SOLUTIONENGINE + default 300000 + help + The reserved memory is used by kernel and ram disk themselves. It's + starting from 0. config MTD_MPC1211 tristate "CFI Flash device mapped on Interface MPC-1211" @@ -448,6 +448,12 @@ help Enable flash support for the Renesas SH7710 VoIP Gateway. +config MTD_SE7343 + bool "CFI Flash on the Renesas SE7343 platform" + depends on MTD_CFI && SH_7343_SOLUTION_ENGINE + help + Enable flash support for the Renesas SolutionEngine 7343 board. + config MTD_ARM_INTEGRATOR tristate "CFI Flash device mapped on ARM Integrator/P720T" depends on ARM && MTD_CFI Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/mtd/maps/Makefile,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Makefile 7 Aug 2006 08:14:03 -0000 1.17 +++ Makefile 7 Aug 2006 11:22:16 -0000 1.18 @@ -74,3 +74,4 @@ obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o obj-$(CONFIG_MTD_TQM834x) += tqm834x.o obj-$(CONFIG_MTD_SH7710VOIPGW) += sh7710voipgw.o +obj-$(CONFIG_MTD_SE7343) += se7343.o |