# HG changeset patch # User gthomas # Date 1081259961 0 # Node ID aaf044e992cfee3c3fa1f87cb246c615b5724a8f # Parent 5c539c544148dc2d5cc99b50eca0b4b9cd32f711 Fix buffered programming mode on parallel devices diff --git a/packages/devs/flash/amd/am29xxxxx/current/ChangeLog b/packages/devs/flash/amd/am29xxxxx/current/ChangeLog --- a/packages/devs/flash/amd/am29xxxxx/current/ChangeLog +++ b/packages/devs/flash/amd/am29xxxxx/current/ChangeLog @@ -1,3 +1,8 @@ +2004-04-06 Gary Thomas + + * include/flash_am29xxxxx.inl (flash_program_buf): Buffered program + writes failed when configured for parallel devices. + 2003-10-21 Jay Foster * include/flash_am29xxxxx_parts.inl (CYGHWR_DEVS_FLASH_AMD_AM29LV033C): diff --git a/packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl b/packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl --- a/packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl +++ b/packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl @@ -11,7 +11,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -// Copyright (C) 2002 Gary Thomas +// Copyright (C) 2002, 2004 Gary Thomas // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -471,7 +471,7 @@ flash_program_buf(void* addr, void* data rem_sect_size /= sizeof (flash_data_t); } - // Computer word count to write + // Compute word count to write nwords = flash_dev_info->bufsiz - (((CYG_ADDRWORD) addr_v & mask) / sizeof (flash_data_t)); if (nwords > len) @@ -481,7 +481,7 @@ flash_program_buf(void* addr, void* data *f_s1 = FLASH_Setup_Code1; *f_s2 = FLASH_Setup_Code2; *SECT = FLASH_Load_Buffer; - *SECT = nwords - 1; + *SECT = FLASHWORD(nwords - 1); // All devices need to see this // Load data into write buffer, flush buffer for(i = 0; i < nwords; i++)