annotate packages/hal/powerpc/adder/current/src/adder_flash.c @ 2729:74dbf4c3f2e1 after-copyright-change-20090129

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