1 #ifndef CYGONCE_HAL_PLATFORM_SETUP_H
2 #define CYGONCE_HAL_PLATFORM_SETUP_H
4 //=============================================================================
6 // hal_platform_setup.h
8 // Platform specific support for HAL (assembly code)
10 //=============================================================================
11 //####ECOSGPLCOPYRIGHTBEGIN####
12 // -------------------------------------------
13 // This file is part of eCos, the Embedded Configurable Operating System.
14 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15 // Copyright (C) 2003 Nick Garnett <nickg@calivar.com>
16 // Copyright (C) 2006 eCosCentric Ltd
18 // eCos is free software; you can redistribute it and/or modify it under
19 // the terms of the GNU General Public License as published by the Free
20 // Software Foundation; either version 2 or (at your option) any later version.
22 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
23 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
24 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
27 // You should have received a copy of the GNU General Public License along
28 // with eCos; if not, write to the Free Software Foundation, Inc.,
29 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
31 // As a special exception, if other files instantiate templates or use macros
32 // or inline functions from this file, or you compile this file and link it
33 // with other works to produce a work based on this file, this file does not
34 // by itself cause the resulting work to be covered by the GNU General Public
35 // License. However the source code for this file must still be made available
36 // in accordance with section (3) of the GNU General Public License.
38 // This exception does not invalidate any other reasons why a work based on
39 // this file might be covered by the GNU General Public License.
40 // -------------------------------------------
41 //####ECOSGPLCOPYRIGHTEND####
42 //=============================================================================
43 //#####DESCRIPTIONBEGIN####
45 // Author(s): Ilija Koco <ilijak@siva.com.mk>
48 // Purpose: MAC7100/MACE1 platform specific support routines
50 // Usage: #include <cyg/hal/hal_platform_setup.h>
52 //####DESCRIPTIONEND####
54 //===========================================================================
56 #include <cyg/hal/var_io.h>
57 #include <cyg/hal/hal_var_setup.h>
58 //===========================================================================
61 ldr r0,=MAC7100_PIM_PORTDATA(MAC7100_PORT_A_OFFSET)
69 // Initialize LED PORT
70 // Set appropriate peripheral pins
72 mov r1, #MAC7100_PIM_DDR // Pin setting: Output+Low
73 ldr r0,=MAC7100_PIM_CONFIG(MAC7100_PORT_A_OFFSET, 8) // LED pin cfg
74 strh r1,[r0],#2 // LED: LSB ...
81 strh r1,[r0],#2 // LED: MSB ...
82 _led 0 // Set initial LED state.
86 // Clock initilalization
93 _mac7100_remap_single_chip
97 // Initialize paralel port
102 #define CYGHWR_LED_MACRO _led \x
104 //===========================================================================
106 #if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM)
109 ldr r0,=VAE_MAC7100_FlashSecurity
116 #define CYGSEM_HAL_ROM_RESET_USES_JUMP
129 #define PLATFORM_SETUP1 _setup
131 //-----------------------------------------------------------------------------
132 // end of hal_platform_setup.h
133 #endif // CYGONCE_HAL_PLATFORM_SETUP_H