summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/freescale-mx23-evk/mx23-evk.c
blob: 7e23e9a33799e561b9aabca2d5d141ae4e82205b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
 * (C) Copyright 2010 Juergen Beisert - Pengutronix
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 */

#include <common.h>
#include <init.h>
#include <gpio.h>
#include <environment.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <mach/imx-regs.h>

static int mx23_evk_devices_init(void)
{
	struct device_d *sdram_dev;

	sdram_dev = arm_add_mem_device("ram0", IMX_MEMORY_BASE, 32 * 1024 * 1024);
	armlinux_set_bootparams(dev_get_mem_region(sdram_dev, 0) + 0x100);
	armlinux_set_architecture(MACH_TYPE_MX23EVK);

	return 0;
}

device_initcall(mx23_evk_devices_init);

static int mx23_evk_console_init(void)
{
	add_generic_device("stm_serial", 0, NULL, IMX_DBGUART_BASE, 8192,
			   IORESOURCE_MEM, NULL);
	
	return 0;
}

console_initcall(mx23_evk_console_init);

/** @page mx23_evk Freescale's i.MX23 evaluation kit

This CPU card is based on an i.MX23 CPU. The card is shipped with:

- 32 MiB synchronous dynamic RAM (mobile DDR type)
- ENC28j60 based network (over SPI)

Memory layout when @b barebox is running:

- 0x40000000 start of SDRAM
- 0x40000100 start of kernel's boot parameters
  - below malloc area: stack area
  - below barebox: malloc area
- 0x41000000 start of @b barebox

@section get_imx23evk_binary How to get the bootloader binary image:

Using the default configuration:

@verbatim
make ARCH=arm imx23evk_defconfig
@endverbatim

Build the bootloader binary image:

@verbatim
make ARCH=arm CROSS_COMPILE=armv5compiler
@endverbatim

@note replace the armv5compiler with your ARM v5 cross compiler.
*/