Mercurial > nand-ecoscentric
comparison packages/hal/powerpc/adder/current/src/adder_flash.c @ 2631:13376f3cfc60 jifl-post-flashv2-merge-20081118
Merge flashv2 branch to trunk, with eCosCentric additions
| author | jlarmour |
|---|---|
| date | Tue, 18 Nov 2008 01:28:11 +0000 |
| parents | |
| children | 74dbf4c3f2e1 |
comparison
equal
deleted
inserted
replaced
| 2630:3e8e26d3183a | 2631:13376f3cfc60 |
|---|---|
| 1 //========================================================================== | |
| 2 // | |
| 3 // adder_flash.c | |
| 4 // | |
| 5 // Support for the external AMD flash device on Adder boards | |
| 6 // | |
| 7 //========================================================================== | |
| 8 //####ECOSGPLCOPYRIGHTBEGIN#### | |
| 9 // ------------------------------------------- | |
| 10 // This file is part of eCos, the Embedded Configurable Operating System. | |
| 11 // Copyright (C) 2004, 2006, 2008 eCosCentric Limited | |
| 12 // | |
| 13 // eCos is free software; you can redistribute it and/or modify it under | |
| 14 // the terms of the GNU General Public License as published by the Free | |
| 15 // Software Foundation; either version 2 or (at your option) any later version. | |
| 16 // | |
| 17 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY | |
| 18 // WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 19 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
| 20 // for more details. | |
| 21 // | |
| 22 // You should have received a copy of the GNU General Public License along | |
| 23 // with eCos; if not, write to the Free Software Foundation, Inc., | |
| 24 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
| 25 // | |
| 26 // As a special exception, if other files instantiate templates or use macros | |
| 27 // or inline functions from this file, or you compile this file and link it | |
| 28 // with other works to produce a work based on this file, this file does not | |
| 29 // by itself cause the resulting work to be covered by the GNU General Public | |
| 30 // License. However the source code for this file must still be made available | |
| 31 // in accordance with section (3) of the GNU General Public License. | |
| 32 // | |
| 33 // This exception does not invalidate any other reasons why a work based on | |
| 34 // this file might be covered by the GNU General Public License. | |
| 35 // ------------------------------------------- | |
| 36 //####ECOSGPLCOPYRIGHTEND#### | |
| 37 //========================================================================== | |
| 38 //#####DESCRIPTIONBEGIN#### | |
| 39 // | |
| 40 // Author(s): bartv | |
| 41 // Date: 2004-11-25 | |
| 42 // | |
| 43 //####DESCRIPTIONEND#### | |
| 44 //============================================================================= | |
| 45 | |
| 46 // There is a single AMD AM29LV320D device. DevId 22F6, 4MB, 63*64K, | |
| 47 // 8*8K. | |
| 48 | |
| 49 #include <pkgconf/system.h> | |
| 50 #ifdef CYGPKG_IO_FLASH | |
| 51 #include <cyg/io/flash.h> | |
| 52 #include <cyg/io/flash_dev.h> | |
| 53 #include <cyg/io/am29xxxxx_dev.h> | |
| 54 | |
| 55 static const CYG_FLASH_FUNS(hal_adder_flash_amd_funs, | |
| 56 &cyg_am29xxxxx_init_cfi_16, | |
| 57 &cyg_flash_devfn_query_nop, | |
| 58 &cyg_am29xxxxx_erase_16, | |
| 59 &cyg_am29xxxxx_program_16, | |
| 60 (int (*)(struct cyg_flash_dev*, const cyg_flashaddr_t, void*, size_t))0, | |
| 61 &cyg_flash_devfn_lock_nop, | |
| 62 &cyg_flash_devfn_unlock_nop); | |
| 63 | |
| 64 static cyg_am29xxxxx_dev hal_adder_flash_priv = { | |
| 65 .devid = 0x22F6, | |
| 66 .block_info = { | |
| 67 { 0, 0 }, | |
| 68 { 0, 0 }, | |
| 69 { 0, 0 }, | |
| 70 { 0, 0 } | |
| 71 } | |
| 72 }; | |
| 73 | |
| 74 CYG_FLASH_DRIVER(hal_adder_flash, | |
| 75 &hal_adder_flash_amd_funs, | |
| 76 0, | |
| 77 0xFE000000, | |
| 78 0xFE3FFFFF, | |
| 79 4, | |
| 80 hal_adder_flash_priv.block_info, | |
| 81 &hal_adder_flash_priv | |
| 82 ); | |
| 83 #endif // CYGPKG_IO_FLASH | |
| 84 | |
| 85 // EOF adder_flash.c |
