Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02b15e34 authored by Todd Poynor's avatar Todd Poynor Committed by Thomas Gleixner
Browse files

[MTD] XIP for AMD CFI flash.



Author: Vitaly Wool <vwool@ru.mvista.com>
Signed-off-by: default avatarTodd Poynor <tpoynor@mvista.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 0dfc6246
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
# drivers/mtd/chips/Kconfig
# $Id: Kconfig,v 1.14 2005/02/08 17:11:15 nico Exp $
# $Id: Kconfig,v 1.15 2005/06/06 23:04:35 tpoynor Exp $

menu "RAM/ROM/Flash chip drivers"
	depends on MTD!=n
@@ -300,7 +300,7 @@ config MTD_JEDEC

config MTD_XIP
	bool "XIP aware MTD support"
	depends on !SMP && MTD_CFI_INTELEXT && EXPERIMENTAL
	depends on !SMP && (MTD_CFI_INTELEXT || MTD_CFI_AMDSTD) && EXPERIMENTAL
	default y if XIP_KERNEL
	help
	  This allows MTD support to work with flash memory which is also
+312 −90

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -58,10 +58,10 @@ static int fwh_xxlock_oneblock(struct map_info *map, struct flchip *chip,
	 * to flash memory - that means that we don't have to check status
	 * and timeout.
	 */
	cfi_spin_lock(chip->mutex);
	spin_lock(chip->mutex);
	ret = get_chip(map, chip, adr, FL_LOCKING);
	if (ret) {
		cfi_spin_unlock(chip->mutex);
		spin_unlock(chip->mutex);
		return ret;
	}

@@ -71,7 +71,7 @@ static int fwh_xxlock_oneblock(struct map_info *map, struct flchip *chip,
	/* Done and happy. */
	chip->state = FL_READY;
	put_chip(map, chip, adr);
	cfi_spin_unlock(chip->mutex);
	spin_unlock(chip->mutex);
	return 0;
}

+6 −5
Original line number Diff line number Diff line
/*
 * $Id: map_funcs.c,v 1.9 2004/07/13 22:33:15 dwmw2 Exp $
 * $Id: map_funcs.c,v 1.10 2005/06/06 23:04:36 tpoynor Exp $
 *
 * Out-of-line map I/O functions for simple maps when CONFIG_COMPLEX_MAPPINGS
 * is enabled.
@@ -9,23 +9,24 @@
#include <linux/module.h>

#include <linux/mtd/map.h>
#include <linux/mtd/xip.h>

static map_word simple_map_read(struct map_info *map, unsigned long ofs)
static map_word __xipram simple_map_read(struct map_info *map, unsigned long ofs)
{
	return inline_map_read(map, ofs);
}

static void simple_map_write(struct map_info *map, const map_word datum, unsigned long ofs)
static void __xipram simple_map_write(struct map_info *map, const map_word datum, unsigned long ofs)
{
	inline_map_write(map, datum, ofs);
}

static void simple_map_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
static void __xipram simple_map_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
{
	inline_map_copy_from(map, to, from, len);
}

static void simple_map_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
static void __xipram simple_map_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
{
	inline_map_copy_to(map, to, from, len);
}
+1 −11

File changed.

Preview size limit exceeded, changes collapsed.