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

[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
# drivers/mtd/chips/Kconfig # 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" menu "RAM/ROM/Flash chip drivers"
depends on MTD!=n depends on MTD!=n
...@@ -300,7 +300,7 @@ config MTD_JEDEC ...@@ -300,7 +300,7 @@ config MTD_JEDEC
config MTD_XIP config MTD_XIP
bool "XIP aware MTD support" 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 default y if XIP_KERNEL
help help
This allows MTD support to work with flash memory which is also This allows MTD support to work with flash memory which is also
......
This diff is collapsed.
...@@ -58,10 +58,10 @@ static int fwh_xxlock_oneblock(struct map_info *map, struct flchip *chip, ...@@ -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 * to flash memory - that means that we don't have to check status
* and timeout. * and timeout.
*/ */
cfi_spin_lock(chip->mutex); spin_lock(chip->mutex);
ret = get_chip(map, chip, adr, FL_LOCKING); ret = get_chip(map, chip, adr, FL_LOCKING);
if (ret) { if (ret) {
cfi_spin_unlock(chip->mutex); spin_unlock(chip->mutex);
return ret; return ret;
} }
...@@ -71,7 +71,7 @@ static int fwh_xxlock_oneblock(struct map_info *map, struct flchip *chip, ...@@ -71,7 +71,7 @@ static int fwh_xxlock_oneblock(struct map_info *map, struct flchip *chip,
/* Done and happy. */ /* Done and happy. */
chip->state = FL_READY; chip->state = FL_READY;
put_chip(map, chip, adr); put_chip(map, chip, adr);
cfi_spin_unlock(chip->mutex); spin_unlock(chip->mutex);
return 0; return 0;
} }
......
/* /*
* $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 * Out-of-line map I/O functions for simple maps when CONFIG_COMPLEX_MAPPINGS
* is enabled. * is enabled.
...@@ -9,23 +9,24 @@ ...@@ -9,23 +9,24 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/mtd/map.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); 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); 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); 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); inline_map_copy_to(map, to, from, len);
} }
......
/* Common Flash Interface structures /* Common Flash Interface structures
* See http://support.intel.com/design/flash/technote/index.htm * See http://support.intel.com/design/flash/technote/index.htm
* $Id: cfi.h,v 1.53 2005/03/15 19:03:13 gleixner Exp $ * $Id: cfi.h,v 1.54 2005/06/06 23:04:36 tpoynor Exp $
*/ */
#ifndef __MTD_CFI_H__ #ifndef __MTD_CFI_H__
...@@ -428,16 +428,6 @@ static inline void cfi_udelay(int us) ...@@ -428,16 +428,6 @@ static inline void cfi_udelay(int us)
} }
} }
static inline void cfi_spin_lock(spinlock_t *mutex)
{
spin_lock_bh(mutex);
}
static inline void cfi_spin_unlock(spinlock_t *mutex)
{
spin_unlock_bh(mutex);
}
struct cfi_extquery *cfi_read_pri(struct map_info *map, uint16_t adr, uint16_t size, struct cfi_extquery *cfi_read_pri(struct map_info *map, uint16_t adr, uint16_t size,
const char* name); const char* name);
struct cfi_fixup { struct cfi_fixup {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment