mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
configs/mx1ads: This commit removes board support for the mx1ads board. That board support was never completed and I no longer even have the hardware. The unfinished board support is still available in the Obsoleted repository if anyone would ever like to resurrect it.
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<tr align="center" bgcolor="#e4e4e4">
|
<tr align="center" bgcolor="#e4e4e4">
|
||||||
<td>
|
<td>
|
||||||
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
||||||
<p>Last Updated: October 25, 2017</p>
|
<p>Last Updated: October 28, 2017</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -1931,8 +1931,12 @@
|
|||||||
<b>STATUS:</b>
|
<b>STATUS:</b>
|
||||||
This port has stalled due to development tool issues.
|
This port has stalled due to development tool issues.
|
||||||
Coding is complete on the basic port (timer, serial console, SPI).
|
Coding is complete on the basic port (timer, serial console, SPI).
|
||||||
Refer to the NuttX board <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/mx1ads/README.txt" target="_blank">README</a> file for further information.
|
Refer to the NuttX board <a href="https://bitbucket.org/nuttx/Obsoleted/nuttx/src/master/configs/mx1ads/README.txt" target="_blank">README</a> file for further information.
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
NOTE: This port has been obsoleted.
|
||||||
|
I know longer have the hardware and the likelihood that the port would ever be completed is infitesmal.
|
||||||
|
The unfinished board support is still available in the <code>Obsoleted</code> repository if anyone would ever like to resurrect it.
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -154,8 +154,6 @@ nuttx/
|
|||||||
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/misoc/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/misoc/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
||||||
| |- moteino-mega/
|
| |- moteino-mega/
|
||||||
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/moteino-mega/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/moteino-mega/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
||||||
| |- mx1ads/
|
|
||||||
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/mx1ads/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
|
||||||
| |- ne64badge/
|
| |- ne64badge/
|
||||||
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/ne64badge/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/ne64badge/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
||||||
| |- ntosd-dm320/
|
| |- ntosd-dm320/
|
||||||
|
|||||||
@@ -1697,8 +1697,6 @@ nuttx/
|
|||||||
| | `- README.txt
|
| | `- README.txt
|
||||||
| |- moteino-mega/
|
| |- moteino-mega/
|
||||||
| | `- README.txt
|
| | `- README.txt
|
||||||
| |- mx1ads/
|
|
||||||
| | `- README.txt
|
|
||||||
| |- ne63badge/
|
| |- ne63badge/
|
||||||
| | `- README.txt
|
| | `- README.txt
|
||||||
| |- ntosd-dm320/
|
| |- ntosd-dm320/
|
||||||
|
|||||||
@@ -406,16 +406,6 @@ config ARCH_BOARD_MOTEINO_MEGA
|
|||||||
on the Atmel AVR ATMega1284P MCU. There is not much there yet and what is
|
on the Atmel AVR ATMega1284P MCU. There is not much there yet and what is
|
||||||
there is untested due to tool-related issues.
|
there is untested due to tool-related issues.
|
||||||
|
|
||||||
config ARCH_BOARD_MX1ADS
|
|
||||||
bool "Motorola MX1ADS development board"
|
|
||||||
depends on ARCH_CHIP_IMX1
|
|
||||||
select ARCH_HAVE_LEDS
|
|
||||||
---help---
|
|
||||||
This is a port to the Motorola MX1ADS development board. That board
|
|
||||||
is based on the NXP/FreeScale i.MX1 processor. The i.MX1 is an ARM920T.
|
|
||||||
STATUS: This port is nearly code complete but was never fully
|
|
||||||
integrated due to tool-related issues.
|
|
||||||
|
|
||||||
config ARCH_BOARD_NE64BADGE
|
config ARCH_BOARD_NE64BADGE
|
||||||
bool "FEG NE64 /PoE Badge board"
|
bool "FEG NE64 /PoE Badge board"
|
||||||
depends on ARCH_CHIP_MCS92S12NEC64
|
depends on ARCH_CHIP_MCS92S12NEC64
|
||||||
@@ -1609,7 +1599,6 @@ config ARCH_BOARD
|
|||||||
default "micropendous3" if ARCH_BOARD_MICROPENDOUS3
|
default "micropendous3" if ARCH_BOARD_MICROPENDOUS3
|
||||||
default "mirtoo" if ARCH_BOARD_MIRTOO
|
default "mirtoo" if ARCH_BOARD_MIRTOO
|
||||||
default "moteino-mega" if ARCH_BOARD_MOTEINO_MEGA
|
default "moteino-mega" if ARCH_BOARD_MOTEINO_MEGA
|
||||||
default "mx1ads" if ARCH_BOARD_MX1ADS
|
|
||||||
default "ne64badge" if ARCH_BOARD_NE64BADGE
|
default "ne64badge" if ARCH_BOARD_NE64BADGE
|
||||||
default "ntosd-dm320" if ARCH_BOARD_NTOSD_DM320
|
default "ntosd-dm320" if ARCH_BOARD_NTOSD_DM320
|
||||||
default "nucleo-144" if ARCH_BOARD_NUCLEO_144
|
default "nucleo-144" if ARCH_BOARD_NUCLEO_144
|
||||||
@@ -1884,9 +1873,6 @@ endif
|
|||||||
if ARCH_BOARD_MOXA
|
if ARCH_BOARD_MOXA
|
||||||
source "configs/moxa/Kconfig"
|
source "configs/moxa/Kconfig"
|
||||||
endif
|
endif
|
||||||
if ARCH_BOARD_MX1ADS
|
|
||||||
source "configs/mx1ads/Kconfig"
|
|
||||||
endif
|
|
||||||
if ARCH_BOARD_NE64BADGE
|
if ARCH_BOARD_NE64BADGE
|
||||||
source "configs/ne64badge/Kconfig"
|
source "configs/ne64badge/Kconfig"
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -368,12 +368,6 @@ configs/moteino-mega
|
|||||||
configs/moxa
|
configs/moxa
|
||||||
Moxa NP51x0 series of 2-port advanced RS-232/422/485 serial device servers.
|
Moxa NP51x0 series of 2-port advanced RS-232/422/485 serial device servers.
|
||||||
|
|
||||||
configs/mx1ads
|
|
||||||
This is a port to the Motorola MX1ADS development board. That board
|
|
||||||
is based on the NXP/FreeScale i.MX1 processor. The i.MX1 is an ARM920T.
|
|
||||||
STATUS: This port is nearly code complete but was never fully
|
|
||||||
integrated due to tool-related issues.
|
|
||||||
|
|
||||||
configs/ne64badge
|
configs/ne64badge
|
||||||
Future Electronics Group NE64 /PoE Badge board based on the
|
Future Electronics Group NE64 /PoE Badge board based on the
|
||||||
MC9S12NE64 hcs12 cpu. This port uses the m9s12x GCC toolchain.
|
MC9S12NE64 hcs12 cpu. This port uses the m9s12x GCC toolchain.
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
#
|
|
||||||
# For a description of the syntax of this configuration file,
|
|
||||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
||||||
#
|
|
||||||
|
|
||||||
if ARCH_BOARD_MX1ADS
|
|
||||||
endif
|
|
||||||
@@ -1,176 +0,0 @@
|
|||||||
README
|
|
||||||
^^^^^^
|
|
||||||
|
|
||||||
Toolchain
|
|
||||||
^^^^^^^^^
|
|
||||||
|
|
||||||
A GNU GCC-based toolchain is assumed. The PATH environment variable should
|
|
||||||
be modified to point to the correct path to the ARM920T GCC toolchain (if
|
|
||||||
different from the default).
|
|
||||||
|
|
||||||
If you have no ARM toolchain, one can be downloaded from the NuttX
|
|
||||||
Bitbucket download site (https://bitbucket.org/nuttx/buildroot/downloads/).
|
|
||||||
|
|
||||||
1. You must have already configured Nuttx in <some-dir>nuttx.
|
|
||||||
|
|
||||||
cd tools
|
|
||||||
./configure.sh mx1ads/<sub-dir>
|
|
||||||
|
|
||||||
2. Download the latest buildroot package into <some-dir>
|
|
||||||
|
|
||||||
3. unpack
|
|
||||||
|
|
||||||
4. cd <some-dir>/buildroot
|
|
||||||
|
|
||||||
5. cp configs/arm920t-defconfig-4.2.4 .config
|
|
||||||
|
|
||||||
6. make oldconfig
|
|
||||||
|
|
||||||
7. make
|
|
||||||
|
|
||||||
8. Make sure that the PATH variable includes the path to the newly built
|
|
||||||
binaries.
|
|
||||||
|
|
||||||
Issues
|
|
||||||
^^^^^^
|
|
||||||
|
|
||||||
Title: PORT IS INCOMPLETE
|
|
||||||
Description: The basic port of the i.MX1 architecture was never finished. The port
|
|
||||||
is incomplete (as of this writing, is still lacks a timer, interrupt
|
|
||||||
decoding, USB, network) and untested.
|
|
||||||
Status: Open
|
|
||||||
Priority: Medium (high if you need i.MX1/L support)
|
|
||||||
|
|
||||||
Title: SPI METHODS ARE NOT THREAD SAFE
|
|
||||||
Description: SPI methods are not thread safe. Needs a semaphore to protect from re-entrancy.
|
|
||||||
Status: Open
|
|
||||||
Priority: Medium -- Will be very high if you do SPI access from multiple threads.
|
|
||||||
|
|
||||||
|
|
||||||
ARM/i.MX1-specific Configuration Options
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
CONFIG_ARCH - Identifies the arch/ subdirectory. This should
|
|
||||||
be set to:
|
|
||||||
|
|
||||||
CONFIG_ARCH=arm
|
|
||||||
|
|
||||||
CONFIG_ARCH_family - For use in C code:
|
|
||||||
|
|
||||||
CONFIG_ARCH_ARM=y
|
|
||||||
|
|
||||||
CONFIG_ARCH_architecture - For use in C code:
|
|
||||||
|
|
||||||
CONFIG_ARCH_ARM920T=y
|
|
||||||
|
|
||||||
CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
|
|
||||||
|
|
||||||
CONFIG_ARCH_CHIP=imx1
|
|
||||||
|
|
||||||
CONFIG_ARCH_CHIP_name - For use in C code. Could be line _IMX1,
|
|
||||||
_IMXL, _IMX21, _IMX27, _IMX31, etc. (not all of which are
|
|
||||||
supported).
|
|
||||||
|
|
||||||
CONFIG_ARCH_CHIP_IMX1
|
|
||||||
|
|
||||||
CONFIG_ARCH_BOARD - Identifies the configs subdirectory and
|
|
||||||
hence, the board that supports the particular chip or SoC.
|
|
||||||
|
|
||||||
CONFIG_ARCH_BOARD=mx1ads (for the Freescale MX1ADS evaluation board)
|
|
||||||
|
|
||||||
CONFIG_ARCH_BOARD_name - For use in C code
|
|
||||||
|
|
||||||
CONFIG_ARCH_BOARD_MX1ADS (for the Spectrum Digital C5471 EVM)
|
|
||||||
|
|
||||||
CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation
|
|
||||||
of delay loops
|
|
||||||
|
|
||||||
CONFIG_ENDIAN_BIG - define if big endian (default is little
|
|
||||||
endian)
|
|
||||||
|
|
||||||
CONFIG_RAM_SIZE - Describes the installed DRAM.
|
|
||||||
|
|
||||||
CONFIG_RAM_START - The start address of installed DRAM
|
|
||||||
|
|
||||||
CONFIG_RAM_VSTART - The startaddress of DRAM (virtual)
|
|
||||||
|
|
||||||
CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that
|
|
||||||
have LEDs
|
|
||||||
|
|
||||||
CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
|
|
||||||
stack. If defined, this symbol is the size of the interrupt
|
|
||||||
stack in bytes. If not defined, the user task stacks will be
|
|
||||||
used during interrupt handling.
|
|
||||||
|
|
||||||
CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
|
|
||||||
|
|
||||||
CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that
|
|
||||||
cause a 100 second delay during boot-up. This 100 second delay
|
|
||||||
serves no purpose other than it allows you to calibratre
|
|
||||||
CONFIG_ARCH_LOOPSPERMSEC. You simply use a stop watch to measure
|
|
||||||
the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until
|
|
||||||
the delay actually is 100 seconds.
|
|
||||||
|
|
||||||
IMX specific device driver settings
|
|
||||||
|
|
||||||
CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
|
|
||||||
console and ttys0 (default is the UART0).
|
|
||||||
CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received.
|
|
||||||
This specific the size of the receive buffer
|
|
||||||
CONFIG_UARTn_TXBUFSIZE - Characters are buffered before
|
|
||||||
being sent. This specific the size of the transmit buffer
|
|
||||||
CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be
|
|
||||||
CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8.
|
|
||||||
CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
|
|
||||||
CONFIG_UARTn_2STOP - Two stop bits
|
|
||||||
|
|
||||||
IMX USB Configuration
|
|
||||||
|
|
||||||
CONFIG_IMX1_GIO_USBATTACH
|
|
||||||
GIO that detects USB attach/detach events
|
|
||||||
CONFIG_IMX1_GIO_USBDPPULLUP
|
|
||||||
GIO
|
|
||||||
CONFIG_DMA320_USBDEV_DMA
|
|
||||||
Enable IMX-specific DMA support
|
|
||||||
CONFIG_IMX1_GIO_USBATTACH=6
|
|
||||||
|
|
||||||
Configurations
|
|
||||||
^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Common Configuration Notes
|
|
||||||
--------------------------
|
|
||||||
|
|
||||||
1. Each MX1ADS configuration is maintained in a sub-directory and
|
|
||||||
can be selected as follow:
|
|
||||||
|
|
||||||
cd tools
|
|
||||||
./configure.sh imxads/<subdir>
|
|
||||||
cd -
|
|
||||||
|
|
||||||
Where <subdir> is one of the configuration sub-directories described in
|
|
||||||
the following paragraph.
|
|
||||||
|
|
||||||
2. These configurations use the mconf-based configuration tool. To
|
|
||||||
change a configurations using that tool, you should:
|
|
||||||
|
|
||||||
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
|
||||||
see additional README.txt files in the NuttX tools repository.
|
|
||||||
|
|
||||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
|
||||||
reconfiguration process.
|
|
||||||
|
|
||||||
3. By default, all configurations assume that you are building under
|
|
||||||
Linux (should work under Windows with Cygwin as well). This is
|
|
||||||
is easily reconfigured:
|
|
||||||
|
|
||||||
CONFIG_HOST_LINUX=y
|
|
||||||
|
|
||||||
Configuration Sub-Directories
|
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
Where <subdir> is one of the following:
|
|
||||||
|
|
||||||
ostest
|
|
||||||
|
|
||||||
This configuration directory, performs a simple OS test using
|
|
||||||
examples/ostest.
|
|
||||||
@@ -1,166 +0,0 @@
|
|||||||
/************************************************************************************
|
|
||||||
* configs/mx1ads/include/board.h
|
|
||||||
* include/arch/board/board.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __ARCH_BOARD_BOARD_H
|
|
||||||
#define __ARCH_BOARD_BOARD_H
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Included Files
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/* Clock settings -- All clock values are precalculated */
|
|
||||||
|
|
||||||
#define IMX_SYS_CLK_FREQ 16780000 /* Crystal frequency */
|
|
||||||
|
|
||||||
/* MPCTL0 -- Controls the MCU clock:
|
|
||||||
*
|
|
||||||
* MFI + MFN / (MFD+1)
|
|
||||||
* IMX_MCUPLL_CLK_FREQ = 2 * IMX_SYS_CLK_FREQ * --------------------
|
|
||||||
* PD + 1
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if 0 /* 150 MHz */
|
|
||||||
# define IMX_MPCTL0_MFN 16
|
|
||||||
# define IMX_MPCTL0_MFI 9
|
|
||||||
# define IMX_MPCTL0_MFD 99
|
|
||||||
# define IMX_MPCTL0_PD 1
|
|
||||||
#else /* 180 MHz */
|
|
||||||
# define IMX_MPCTL0_MFN 441
|
|
||||||
# define IMX_MPCTL0_MFI 4
|
|
||||||
# define IMX_MPCTL0_MFD 938
|
|
||||||
# define IMX_MPCTL0_PD 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define IMX_MPCTL0_VALUE \
|
|
||||||
((IMX_MPCTL0_MFN << PLL_MPCTL0_MFN_SHIFT) |\
|
|
||||||
(IMX_MPCTL0_MFI << PLL_MPCTL0_MFI_SHIFT) |\
|
|
||||||
(IMX_MPCTL0_MFD << PLL_MPCTL0_MFD_SHIFT) |\
|
|
||||||
(IMX_MPCTL0_PD << PLL_MPCTL0_PD_SHIFT))
|
|
||||||
|
|
||||||
/* This yields: */
|
|
||||||
|
|
||||||
#if 0 /* 150 MHz */
|
|
||||||
# define IMX_MCUPLL_CLK_FREQ 153704800
|
|
||||||
#else /* 180 MHz */
|
|
||||||
# define IMX_MCUPLL_CLK_FREQ 183561405
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* SPCTL0 -- Controls the system PLL:
|
|
||||||
*
|
|
||||||
* MFI + MFN / (MFD+1)
|
|
||||||
* IMX_SYSPLL_CLK_FREQ = 2 * IMX_SYS_CLK_FREQ * --------------------
|
|
||||||
* PD + 1
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define IMX_SPCTL0_MFN 678
|
|
||||||
#define IMX_SPCTL0_MFI 5
|
|
||||||
#define IMX_SPCTL0_MFD 938
|
|
||||||
#define IMX_SPCTL0_PD 1
|
|
||||||
|
|
||||||
#define IMX_SPCTL0_VALUE \
|
|
||||||
((IMX_SPCTL0_MFN << PLL_SPCTL0_MFN_SHIFT) |\
|
|
||||||
(IMX_SPCTL0_MFI << PLL_SPCTL0_MFI_SHIFT) |\
|
|
||||||
(IMX_SPCTL0_MFD << PLL_SPCTL0_MFD_SHIFT) |\
|
|
||||||
(IMX_SPCTL0_PD << PLL_SPCTL0_PD_SHIFT))
|
|
||||||
|
|
||||||
/* This yields: */
|
|
||||||
|
|
||||||
#define IMX_SYSPLL_CLK_FREQ 96015910
|
|
||||||
|
|
||||||
/* PDCR -- Controls peripheral clocks */
|
|
||||||
|
|
||||||
#define IMX_PCLKDIV1 0
|
|
||||||
#define IMX_PCLKDIV2 0
|
|
||||||
#define IMX_PCLKDIV3 0
|
|
||||||
|
|
||||||
#define IMX_PCDR_VALUE \
|
|
||||||
((IMX_PCLKDIV1 << PLL_PCDR_PCLKDIV1_SHIFT) |\
|
|
||||||
(IMX_PCLKDIV2 << PLL_PCDR_PCLKDIV2_SHIFT) |\
|
|
||||||
(IMX_PCLKDIV3 << PLL_PCDR_PCLKDIV3_SHIFT))
|
|
||||||
|
|
||||||
/* PERCLK1: UART, Timers, PWM */
|
|
||||||
|
|
||||||
#define IMX_PERCLK1_FREQ (IMX_SYSPLL_CLK_FREQ/(IMX_PCLKDIV1+1))
|
|
||||||
|
|
||||||
/* PERCLK2: CSPI, LCD, SD */
|
|
||||||
|
|
||||||
#define IMX_PERCLK2_FREQ (IMX_SYSPLL_CLK_FREQ/(IMX_PCLKDIV2+1))
|
|
||||||
|
|
||||||
/* PERCLK3: SSI */
|
|
||||||
|
|
||||||
#define IMX_PERCLK3_FREQ (IMX_SYSPLL_CLK_FREQ/(IMX_PCLKDIV3+1))
|
|
||||||
|
|
||||||
/* CSCR settings -- Controls HCLK and BCLK and USB clock.
|
|
||||||
* HCLK: SDRAM, CSI, Memory Stick, I2C, DMA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define IMX_CSCR_BCLKDIV 1
|
|
||||||
#define IMX_CSCR_USBDIV 6
|
|
||||||
|
|
||||||
/* LED definitions ******************************************************************/
|
|
||||||
|
|
||||||
/* The MX1ADS has only one usable LED: Port A, bit 2 */
|
|
||||||
|
|
||||||
/* ON OFF */
|
|
||||||
#define LED_STARTED 0 /* OFF OFF */
|
|
||||||
#define LED_HEAPALLOCATE 1 /* OFF OFF */
|
|
||||||
#define LED_IRQSENABLED 2 /* OFF OFF */
|
|
||||||
#define LED_STACKCREATED 3 /* OFF OFF */
|
|
||||||
#define LED_INIRQ 4 /* ON OFF */
|
|
||||||
#define LED_SIGNAL 5 /* ON OFF */
|
|
||||||
#define LED_ASSERTION 6 /* ON OFF */
|
|
||||||
#define LED_PANIC 7 /* ON OFF */
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Public Function Prototypes
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
|
||||||
|
|
||||||
/* All i.MX architectures must provide the following entry point. This entry point
|
|
||||||
* is called early in the intitialization -- after all memory has been configured
|
|
||||||
* and mapped but before any devices have been initialized.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void imx_board_initialize(void);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __ARCH_BOARD_BOARD_H */
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
# CONFIG_SPI_EXCHANGE is not set
|
|
||||||
CONFIG_ARCH_BOARD_MX1ADS=y
|
|
||||||
CONFIG_ARCH_BOARD="mx1ads"
|
|
||||||
CONFIG_ARCH_CHIP_IMX1=y
|
|
||||||
CONFIG_ARCH_LOWVECTORS=y
|
|
||||||
CONFIG_ARCH_STACKDUMP=y
|
|
||||||
CONFIG_ARCH="arm"
|
|
||||||
CONFIG_BOARD_LOOPSPERMSEC=16945
|
|
||||||
CONFIG_DISABLE_ENVIRON=y
|
|
||||||
CONFIG_DISABLE_MOUNTPOINT=y
|
|
||||||
CONFIG_DISABLE_POLL=y
|
|
||||||
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
|
|
||||||
CONFIG_EXAMPLES_OSTEST=y
|
|
||||||
CONFIG_IDLETHREAD_STACKSIZE=4096
|
|
||||||
CONFIG_IMX1_SPI1=y
|
|
||||||
CONFIG_IMX1_UART1=y
|
|
||||||
CONFIG_MAX_TASKS=64
|
|
||||||
CONFIG_MM_REGIONS=2
|
|
||||||
CONFIG_NFILE_DESCRIPTORS=32
|
|
||||||
CONFIG_PTHREAD_STACK_DEFAULT=4096
|
|
||||||
CONFIG_RAM_SIZE=16777216
|
|
||||||
CONFIG_RAM_START=0x08000000
|
|
||||||
CONFIG_RAM_VSTART=0x00000000
|
|
||||||
CONFIG_RR_INTERVAL=200
|
|
||||||
CONFIG_SDCLONE_DISABLE=y
|
|
||||||
CONFIG_START_DAY=29
|
|
||||||
CONFIG_START_MONTH=8
|
|
||||||
CONFIG_START_YEAR=2008
|
|
||||||
CONFIG_TASK_NAME_SIZE=0
|
|
||||||
CONFIG_UART1_SERIAL_CONSOLE=y
|
|
||||||
CONFIG_USER_ENTRYPOINT="ostest_main"
|
|
||||||
CONFIG_USERMAIN_STACKSIZE=4096
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# configs/mx1ads/scripts/Make.defs
|
|
||||||
#
|
|
||||||
# Copyright (C) 2009, 2017 Gregory Nutt. All rights reserved.
|
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
|
||||||
# modification, are permitted provided that the following conditions
|
|
||||||
# are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the above copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer.
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer in
|
|
||||||
# the documentation and/or other materials provided with the
|
|
||||||
# distribution.
|
|
||||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software
|
|
||||||
# without specific prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
include ${TOPDIR}/.config
|
|
||||||
include ${TOPDIR}/tools/Config.mk
|
|
||||||
include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs
|
|
||||||
|
|
||||||
CROSSDEV = arm-nuttx-elf-
|
|
||||||
CC = $(CROSSDEV)gcc
|
|
||||||
CXX = $(CROSSDEV)g++
|
|
||||||
CPP = $(CROSSDEV)gcc -E
|
|
||||||
LD = $(CROSSDEV)ld
|
|
||||||
AR = $(CROSSDEV)ar rcs
|
|
||||||
NM = $(CROSSDEV)nm
|
|
||||||
OBJCOPY = $(CROSSDEV)objcopy
|
|
||||||
OBJDUMP = $(CROSSDEV)objdump
|
|
||||||
|
|
||||||
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
|
|
||||||
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
|
||||||
|
|
||||||
ifeq ($(ARCHCCMAJOR),2)
|
|
||||||
OLDGCC = y
|
|
||||||
else ifeq ($(ARCHCCMAJOR),3)
|
|
||||||
OLDGCC = y
|
|
||||||
else
|
|
||||||
OLDGCC = n
|
|
||||||
endif
|
|
||||||
|
|
||||||
ARCHCFLAGS = -fno-builtin
|
|
||||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new
|
|
||||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
|
||||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|
||||||
ARCHOPTIMIZATION = -g
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|
||||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(OLDGCC),n)
|
|
||||||
ARCHCPUFLAGS = -mtune=arm920t -march=armv4t -mfloat-abi=soft
|
|
||||||
else
|
|
||||||
ARCHCPUFLAGS = -mapcs-32 -mtune=arm920t -march=armv4t -msoft-float
|
|
||||||
endif
|
|
||||||
|
|
||||||
ARCHDEFINES =
|
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
|
||||||
|
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/mx1ads.ld
|
|
||||||
|
|
||||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
|
||||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
|
||||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
|
||||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \
|
|
||||||
$(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
|
||||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
|
||||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
|
||||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
|
||||||
|
|
||||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
|
||||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
|
||||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld \
|
|
||||||
-no-check-sections
|
|
||||||
LDNXFLATFLAGS = -e main -s 2048
|
|
||||||
|
|
||||||
ASMEXT = .S
|
|
||||||
OBJEXT = .o
|
|
||||||
LIBEXT = .a
|
|
||||||
EXEEXT =
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|
||||||
LDFLAGS += -g
|
|
||||||
endif
|
|
||||||
|
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
|
|
||||||
|
|
||||||
HOSTCC = gcc
|
|
||||||
HOSTINCLUDES = -I.
|
|
||||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
|
|
||||||
HOSTLDFLAGS =
|
|
||||||
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/mx1ads/scripts/mx1ads
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009, 2017 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_stext)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
/* The OS entry point is here */
|
|
||||||
|
|
||||||
. = 0x09008000;
|
|
||||||
.text : {
|
|
||||||
_stext = ABSOLUTE(.);
|
|
||||||
*(.text)
|
|
||||||
*(.fixup)
|
|
||||||
*(.gnu.warning)
|
|
||||||
*(.rodata)
|
|
||||||
*(.glue_7)
|
|
||||||
*(.glue_7t)
|
|
||||||
*(.got) /* Global offset table */
|
|
||||||
_etext = ABSOLUTE(.);
|
|
||||||
}
|
|
||||||
|
|
||||||
_eronly = ABSOLUTE(.); /* See below */
|
|
||||||
. = ALIGN(4096);
|
|
||||||
|
|
||||||
.data : {
|
|
||||||
_sdata = ABSOLUTE(.);
|
|
||||||
*(.data)
|
|
||||||
CONSTRUCTORS
|
|
||||||
_edata = ABSOLUTE(.);
|
|
||||||
}
|
|
||||||
|
|
||||||
.bss : { /* BSS */
|
|
||||||
_sbss = ABSOLUTE(.);
|
|
||||||
*(.bss)
|
|
||||||
*(COMMON)
|
|
||||||
_ebss = ABSOLUTE(.);
|
|
||||||
}
|
|
||||||
/* Stabs debugging sections. */
|
|
||||||
.stab 0 : { *(.stab) }
|
|
||||||
.stabstr 0 : { *(.stabstr) }
|
|
||||||
.stab.excl 0 : { *(.stab.excl) }
|
|
||||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
||||||
.stab.index 0 : { *(.stab.index) }
|
|
||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
||||||
.comment 0 : { *(.comment) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_info 0 : { *(.debug_info) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/.depend
|
|
||||||
/Make.dep
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# configs/mx1ads/src/Makefile
|
|
||||||
#
|
|
||||||
# Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
|
||||||
# modification, are permitted provided that the following conditions
|
|
||||||
# are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the above copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer.
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer in
|
|
||||||
# the documentation and/or other materials provided with the
|
|
||||||
# distribution.
|
|
||||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software
|
|
||||||
# without specific prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THEO
|
|
||||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
-include $(TOPDIR)/Make.defs
|
|
||||||
|
|
||||||
ASRCS =
|
|
||||||
CSRCS = mx1_boardinit.c mx1_leds.c mx1_network.c
|
|
||||||
|
|
||||||
include $(TOPDIR)/configs/Board.mk
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
/************************************************************************************
|
|
||||||
* configs/mx1ads/src/mx1_boardinit`.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Included Files
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
|
||||||
|
|
||||||
#include "chip.h"
|
|
||||||
#include "up_arch.h"
|
|
||||||
#include "imx_gpio.h"
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Public Functions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Name: imx_board_initialize
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* All i.MX architectures must provide the following entry point. This entry point
|
|
||||||
* is called early in the initialization -- after all memory has been configured
|
|
||||||
* and mapped but before any devices have been initialized.
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
void imx_board_initialize(void)
|
|
||||||
{
|
|
||||||
uint32_t regval;
|
|
||||||
|
|
||||||
putreg32(0x000003ab, IMX_SC_GPCR); /* I/O pad driving strength */
|
|
||||||
putreg32(IMX_MPCTL0_VALUE, IMX_PLL_MPCTL0);
|
|
||||||
putreg32(IMX_SPCTL0_VALUE, IMX_PLL_SPCTL0);
|
|
||||||
|
|
||||||
regval = (CSCR_CLKOSEL_FCLK | /* Output FCLK on CLK0 */
|
|
||||||
(IMX_CSCR_USBDIV << PLL_CSCR_USBDIV_SHIFT) | /* USB divider */
|
|
||||||
CSCR_SDCNT_4thEDGE | /* Shutdown on 4th edge */
|
|
||||||
(IMX_CSCR_BCLKDIV << PLL_CSCR_BCLKDIV_SHIFT) | /* Bclock divider */
|
|
||||||
PLL_CSCR_SPEN | PLL_CSCR_MPEN); /* Enable MUC and System PLL */
|
|
||||||
putreg32(regval, IMX_PLL_CSCR);
|
|
||||||
|
|
||||||
/* Use these new frequencies now */
|
|
||||||
|
|
||||||
putreg32(IMX_PLL_CSCR, regval | (PLL_CSCR_MPLLRESTART|PLL_CSCR_SPLLRESTART));
|
|
||||||
|
|
||||||
/* Setup peripheral clocking */
|
|
||||||
|
|
||||||
putreg32(IMX_PCDR_VALUE, IMX_PLL_PCDR);
|
|
||||||
|
|
||||||
/* Configure CS4 for cs8900 Ethernet */
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET
|
|
||||||
putreg32(0x00000f00, IMX_EIM_CS4H);
|
|
||||||
putreg32(0x00001501, IMX_EIM_CS4L);
|
|
||||||
|
|
||||||
imxgpio_configprimary(GPIOA, 21);
|
|
||||||
imxgpio_configprimary(GPIOA, 22);
|
|
||||||
|
|
||||||
(void)getreg32(IMX_CS4_VSECTION + 0x0c);
|
|
||||||
(void)getreg32(IMX_CS4_VSECTION + 0x0c);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/mx1ads/src/mx1_leds.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009, 2015 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Included Files
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
#include <nuttx/board.h>
|
|
||||||
|
|
||||||
#include "up_internal.h"
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled_initialize
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
|
||||||
void board_autoled_initialize(void)
|
|
||||||
{
|
|
||||||
/* Configure Port A, Bit 2 as an output, initial value=1 */
|
|
||||||
|
|
||||||
imxgpio_configoutput(GPIOA, 2, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled_on
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled_on(int led)
|
|
||||||
{
|
|
||||||
switch (led)
|
|
||||||
{
|
|
||||||
case LED_STARTED:
|
|
||||||
case LED_HEAPALLOCATE:
|
|
||||||
case LED_IRQSENABLED:
|
|
||||||
case LED_STACKCREATED:
|
|
||||||
imxgpio_setoutput(GPIOA, 2); /* Port A, Bit 2 = 1 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LED_INIRQ:
|
|
||||||
case LED_SIGNAL:
|
|
||||||
case LED_ASSERTION:
|
|
||||||
case LED_PANIC:
|
|
||||||
default:
|
|
||||||
imxgpio_clroutput(GPIOA, 2); /* Port A, Bit 2 = 0 */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled_off
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled_off(int led)
|
|
||||||
{
|
|
||||||
imxgpio_clroutput(GPIOA, 2); /* Port A, Bit 2 = 0 */
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* CONFIG_ARCH_LEDS */
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/mx1ads/src/mx1_network.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Included Files
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
#if defined(CONFIG_NET) && defined(CONFIG_NET_CS8900)
|
|
||||||
|
|
||||||
#include <debug.h>
|
|
||||||
#include <arch/board/board.h>
|
|
||||||
|
|
||||||
#include "up_arch.h"
|
|
||||||
#include "up_internal.h"
|
|
||||||
|
|
||||||
extern void cs8900_initialize(void);
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: up_netinitialize
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void up_netinitialize(void)
|
|
||||||
{
|
|
||||||
# error "Missing implementation"
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* CONFIG_NET && CONFIG_NET_DM90x0 */
|
|
||||||
Reference in New Issue
Block a user