All of lore.kernel.org
 help / color / mirror / Atom feed
* m28w640fst flash: quarduple words write method
@ 2007-01-18 14:40 Dmitry
  0 siblings, 0 replies; only message in thread
From: Dmitry @ 2007-01-18 14:40 UTC (permalink / raw)
  To: linux-mtd

Hi, All
Kernel: linux-sh4-2.6.11.12_stm20-33
flash:  m28w640fst
This flash is CFI compatible, but it doesn't support buffer write method 
(CFI command - 0xe8). Flash support single (CFI command - 0x10 or 0x40), 
double (CFI command - 0x30) and quadruple (CFI command - 0x56) words 
write method.
MTD supports only single word write method for this flash.
I have implemented double words write method. It works fine.
But I have problem with quadruple word write method implementation.

Part of function:
static int __xipram do_write_quadrupleword(
	struct map_info *map,
	struct flchip *chip,
	unsigned long adr,
	const u_char *buf,
	int len)
{
<...skip...>
         XIP_INVAL_CACHED_RANGE(map, adr, map_bankwidth(map));
         ENABLE_VPP(map);
         xip_disable(map, chip, adr);
         map_write(map, CMD(0x56), adr);

         datum = map_word_ff(map);

         datum = map_word_load(map, buf);
         map_write(map, datum, adr);

         datum = map_word_load(map, buf+2);
         map_write(map, datum, adr+2);

         datum = map_word_load(map, buf+4);
         map_write(map, datum, adr+4);

         datum = map_word_load(map, buf+6);
         map_write(map, datum, adr+6);

         map_write(map,CMD(0x70),adr);
         status = map_read(map, adr);
         printk("--> %s: status %X\n", __FUNCTION__, status);
<...skip...>

Several fist status is 0x80 ('OK'), then function gets status 0x92 
('Program Error' and 'Program/Erase on protected Block, Abort').

Does anybody implement this write method or know what wrong?
Thank you.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-18 14:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-18 14:40 m28w640fst flash: quarduple words write method Dmitry

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.