annotate packages/devs/flash/arm/e7t/current/src/arm_e7t_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 3e8e26d3183a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1134
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
1 //==========================================================================
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
2 //
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
3 // arm_e7t_flash.c
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
4 //
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
5 // Flash programming for SST Flash device on ARM Evaluator-7T board
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
6 //
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
7 //==========================================================================
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2630
diff changeset
8 // ####ECOSGPLCOPYRIGHTBEGIN####
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2630
diff changeset
9 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2630
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: 2630
diff changeset
11 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1134
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
12 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2630
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: 2630
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: 2630
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: 2630
diff changeset
16 // version.
1134
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
17 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2630
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: 2630
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: 2630
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: 2630
diff changeset
21 // for more details.
1134
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
22 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2630
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: 2630
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: 2630
diff changeset
25 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1134
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
26 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2630
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: 2630
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: 2630
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: 2630
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: 2630
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: 2630
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: 2630
diff changeset
33 // General Public License v2.
1134
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
34 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2630
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: 2630
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: 2630
diff changeset
37 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 2630
diff changeset
38 // ####ECOSGPLCOPYRIGHTEND####
1134
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
39 //==========================================================================
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
40 //#####DESCRIPTIONBEGIN####
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
41 //
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
42 // Author(s): Chris Garry <cgarry@sweeneydesign.co.uk>
2630
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
43 // Contributors: andrew.lunn@ascom.ch
1134
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
44 // Date: 2003-04-21
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
45 // Purpose:
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
46 // Description:
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
47 //
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
48 //####DESCRIPTIONEND####
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
49 //
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
50 //==========================================================================
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
51
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
52 //--------------------------------------------------------------------------
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
53 // Device properties
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
54 #include <pkgconf/devs_flash_arm_e7t.h>
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
55
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
56
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
57 // The Evaluator-7T has either one SST 39VF400A part or one Am29LV400B part
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
58 #define CYGNUM_FLASH_INTERLEAVE (1)
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
59 #define CYGNUM_FLASH_SERIES (1)
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
60 #define CYGNUM_FLASH_WIDTH (16)
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
61 #define CYGNUM_FLASH_BASE (0x01800000)
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
62
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
63 //--------------------------------------------------------------------------
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
64 // Platform specific extras
1348
0786f4fb3f8c * cdl/flash_e7t.cdl:
asl
parents: 1134
diff changeset
65 #define CYGPKG_DEVS_FLASH_SST_39VF400
1134
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
66
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
67 //--------------------------------------------------------------------------
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
68 // Now include the driver code.
1348
0786f4fb3f8c * cdl/flash_e7t.cdl:
asl
parents: 1134
diff changeset
69 #ifdef CYGINT_DEVS_FLASH_SST_39VFXXX_REQUIRED
0786f4fb3f8c * cdl/flash_e7t.cdl:
asl
parents: 1134
diff changeset
70 #include "cyg/io/flash_sst_39vfxxx.inl"
2630
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
71
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
72 static const cyg_flash_block_info_t cyg_flash_sst_block_info[1] = {
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
73 { FLASH_BLOCK_SIZE, FLASH_NUM_REGIONS * CYGNUM_FLASH_SERIES }
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
74 };
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
75 CYG_FLASH_DRIVER(cyg_flash_sst_flashdev,
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
76 &cyg_sst_funs,
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
77 0, // Flags
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
78 CYGNUM_FLASH_BASE, // Start
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
79 CYGNUM_FLASH_BASE + (FLASH_BLOCK_SIZE * FLASH_NUM_REGIONS * CYGNUM_FLASH_SERIES) - 1, // End
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
80 1, // Number of block infos
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
81 cyg_flash_sst_block_info,
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
82 NULL // priv
3e8e26d3183a Merge flashv2 branch to trunk, with eCosCentric additions
jlarmour
parents: 1348
diff changeset
83 );
1134
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
84 #endif
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
85
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
86 #ifdef CYGINT_DEVS_FLASH_AMD_AM29XXXXX_REQUIRED
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
87 #include "cyg/io/flash_am29xxxxx.inl"
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
88 #endif
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
89
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
90 // ------------------------------------------------------------------------
1a21a684dbfa New package: Driver for arm e7t flash device.
asl
parents:
diff changeset
91 // EOF arm_e7t_flash.c