Commit 080cfee71459588fd6312e475bb5115bdbda1cb3
Committed by
Tom Rix
1 parent
4bfacad4e7
Exists in
master
and in
54 other branches
SPEAr : Support added for SPEAr310 board
SPEAr310 SoC support contains basic spear310 support along with the usage of following drivers - serial driver(UART) - i2c driver - smi driver - nand driver(FSMC) - usbd driver - emi driver(cfi support) Signed-off-by: Vipin <vipin.kumar@st.com>
Showing 6 changed files with 217 additions and 1 deletions Side-by-side Diff
MAKEALL
Makefile
... | ... | @@ -3036,7 +3036,8 @@ |
3036 | 3036 | smdk2410_config : unconfig |
3037 | 3037 | @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0 |
3038 | 3038 | |
3039 | -spear300_config : unconfig | |
3039 | +spear300_config \ | |
3040 | +spear310_config : unconfig | |
3040 | 3041 | @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx arm arm926ejs $(@:_config=) spear spear |
3041 | 3042 | |
3042 | 3043 | spear600_config : unconfig |
board/spear/spear310/Makefile
1 | +# | |
2 | +# (C) Copyright 2000-2004 | |
3 | +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | +# | |
5 | +# See file CREDITS for list of people who contributed to this | |
6 | +# project. | |
7 | +# | |
8 | +# This program is free software; you can redistribute it and/or | |
9 | +# modify it under the terms of the GNU General Public License as | |
10 | +# published by the Free Software Foundation; either version 2 of | |
11 | +# the License, or (at your option) any later version. | |
12 | +# | |
13 | +# This program is distributed in the hope that it will be useful, | |
14 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | +# GNU General Public License for more details. | |
17 | +# | |
18 | +# You should have received a copy of the GNU General Public License | |
19 | +# along with this program; if not, write to the Free Software | |
20 | +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | +# MA 02111-1307 USA | |
22 | +# | |
23 | + | |
24 | +include $(TOPDIR)/config.mk | |
25 | + | |
26 | +LIB = $(obj)lib$(BOARD).a | |
27 | + | |
28 | +COBJS := spear310.o | |
29 | +SOBJS := | |
30 | + | |
31 | +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) | |
32 | +OBJS := $(addprefix $(obj),$(COBJS)) | |
33 | +SOBJS := $(addprefix $(obj),$(SOBJS)) | |
34 | + | |
35 | +$(LIB): $(obj).depend $(OBJS) $(SOBJS) | |
36 | + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) | |
37 | + | |
38 | +clean: | |
39 | + rm -f $(SOBJS) $(OBJS) | |
40 | + | |
41 | +distclean: clean | |
42 | + rm -f $(LIB) core *.bak $(obj).depend | |
43 | + | |
44 | +######################################################################### | |
45 | + | |
46 | +# defines $(obj).depend target | |
47 | +include $(SRCTREE)/rules.mk | |
48 | + | |
49 | +sinclude $(obj).depend | |
50 | + | |
51 | +######################################################################### |
board/spear/spear310/config.mk
1 | +# | |
2 | +# (C) Copyright 2009 | |
3 | +# Vipin Kumar, ST Microelectronics <vipin.kumar@st.com> | |
4 | +# | |
5 | +# See file CREDITS for list of people who contributed to this | |
6 | +# project. | |
7 | +# | |
8 | +# This program is free software; you can redistribute it and/or | |
9 | +# modify it under the terms of the GNU General Public License as | |
10 | +# published by the Free Software Foundation; either version 2 of | |
11 | +# the License, or (at your option) any later version. | |
12 | +# | |
13 | +# This program is distributed in the hope that it will be useful, | |
14 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | +# GNU General Public License for more details. | |
17 | +# | |
18 | +# You should have received a copy of the GNU General Public License | |
19 | +# along with this program; if not, write to the Free Software | |
20 | +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | +# MA 02111-1307 USA | |
22 | +# | |
23 | + | |
24 | +######################################################################### | |
25 | + | |
26 | +TEXT_BASE = 0x00700000 | |
27 | + | |
28 | +ALL += $(obj)u-boot.img | |
29 | + | |
30 | +# Environment variables in NAND | |
31 | +ifeq ($(ENV),NAND) | |
32 | +PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_NAND | |
33 | +else | |
34 | +PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_FLASH | |
35 | +endif | |
36 | + | |
37 | +# Support parallel flash | |
38 | +ifeq ($(FLASH),PNOR) | |
39 | +PLATFORM_RELFLAGS += -DCONFIG_FLASH_PNOR | |
40 | +endif | |
41 | + | |
42 | +ifeq ($(CONSOLE),USB) | |
43 | +PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY | |
44 | +endif |
board/spear/spear310/spear310.c
1 | +/* | |
2 | + * (C) Copyright 2009 | |
3 | + * Ryan Chen, ST Micoelectronics, ryan.chen@st.com. | |
4 | + * Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com. | |
5 | + * | |
6 | + * See file CREDITS for list of people who contributed to this | |
7 | + * project. | |
8 | + * | |
9 | + * This program is free software; you can redistribute it and/or | |
10 | + * modify it under the terms of the GNU General Public License as | |
11 | + * published by the Free Software Foundation; either version 2 of | |
12 | + * the License, or (at your option) any later version. | |
13 | + * | |
14 | + * This program is distributed in the hope that it will be useful, | |
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + * GNU General Public License for more details. | |
18 | + * | |
19 | + * You should have received a copy of the GNU General Public License | |
20 | + * along with this program; if not, write to the Free Software | |
21 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | + * MA 02111-1307 USA | |
23 | + */ | |
24 | + | |
25 | +#include <common.h> | |
26 | +#include <nand.h> | |
27 | +#include <asm/io.h> | |
28 | +#include <asm/arch/hardware.h> | |
29 | +#include <asm/arch/spr_defs.h> | |
30 | +#include <asm/arch/spr_misc.h> | |
31 | +#include <asm/arch/spr_nand.h> | |
32 | + | |
33 | +int board_init(void) | |
34 | +{ | |
35 | + return spear_board_init(MACH_TYPE_SPEAR300); | |
36 | +} | |
37 | + | |
38 | +/* | |
39 | + * board_nand_init - Board specific NAND initialization | |
40 | + * @nand: mtd private chip structure | |
41 | + * | |
42 | + * Called by nand_init_chip to initialize the board specific functions | |
43 | + */ | |
44 | + | |
45 | +int board_nand_init(struct nand_chip *nand) | |
46 | +{ | |
47 | + struct misc_regs *const misc_regs_p = | |
48 | + (struct misc_regs *)CONFIG_SPEAR_MISCBASE; | |
49 | + | |
50 | + if (((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) == | |
51 | + MISC_SOCCFG30) || | |
52 | + ((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) == | |
53 | + MISC_SOCCFG31)) { | |
54 | + | |
55 | + return spear_nand_init(nand); | |
56 | + } | |
57 | + | |
58 | + return -1; | |
59 | +} |
include/configs/spear3xx.h
... | ... | @@ -28,16 +28,76 @@ |
28 | 28 | * High Level Configuration Options |
29 | 29 | * (easy to change) |
30 | 30 | */ |
31 | +#if defined(CONFIG_MK_spear300) | |
32 | +#define CONFIG_SPEAR3XX 1 | |
31 | 33 | #define CONFIG_SPEAR300 1 |
34 | +#elif defined(CONFIG_MK_spear310) | |
32 | 35 | #define CONFIG_SPEAR3XX 1 |
36 | +#define CONFIG_SPEAR310 1 | |
37 | +#endif | |
33 | 38 | |
34 | 39 | #include <configs/spear-common.h> |
35 | 40 | |
36 | 41 | /* Serial Configuration (PL011) */ |
37 | 42 | #define CONFIG_SYS_SERIAL0 0xD0000000 |
43 | + | |
44 | +#if defined(CONFIG_SPEAR300) | |
38 | 45 | #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0} |
39 | 46 | |
47 | +#elif defined(CONFIG_SPEAR310) | |
48 | + | |
49 | +#if (CONFIG_CONS_INDEX) | |
50 | +#undef CONFIG_PL011_CLOCK | |
51 | +#define CONFIG_PL011_CLOCK (83 * 1000 * 1000) | |
52 | +#endif | |
53 | + | |
54 | +#define CONFIG_SYS_SERIAL1 0xB2000000 | |
55 | +#define CONFIG_SYS_SERIAL2 0xB2080000 | |
56 | +#define CONFIG_SYS_SERIAL3 0xB2100000 | |
57 | +#define CONFIG_SYS_SERIAL4 0xB2180000 | |
58 | +#define CONFIG_SYS_SERIAL5 0xB2200000 | |
59 | +#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \ | |
60 | + (void *)CONFIG_SYS_SERIAL1, \ | |
61 | + (void *)CONFIG_SYS_SERIAL2, \ | |
62 | + (void *)CONFIG_SYS_SERIAL3, \ | |
63 | + (void *)CONFIG_SYS_SERIAL4, \ | |
64 | + (void *)CONFIG_SYS_SERIAL5 } | |
65 | +#endif | |
66 | + | |
67 | +#if defined(CONFIG_SPEAR_EMI) | |
68 | + | |
69 | +#define CONFIG_SYS_FLASH_CFI | |
70 | +#define CONFIG_FLASH_CFI_DRIVER | |
71 | + | |
72 | +#if defined(CONFIG_SPEAR310) | |
73 | +#define CONFIG_SYS_FLASH_BASE 0x50000000 | |
74 | +#define CONFIG_SYS_CS1_FLASH_BASE 0x60000000 | |
75 | +#define CONFIG_SYS_CS2_FLASH_BASE 0x70000000 | |
76 | +#define CONFIG_SYS_CS3_FLASH_BASE 0x80000000 | |
77 | +#define CONFIG_SYS_CS4_FLASH_BASE 0x90000000 | |
78 | +#define CONFIG_SYS_CS5_FLASH_BASE 0xA0000000 | |
79 | +#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \ | |
80 | + CONFIG_SYS_CS1_FLASH_BASE, \ | |
81 | + CONFIG_SYS_CS2_FLASH_BASE, \ | |
82 | + CONFIG_SYS_CS3_FLASH_BASE, \ | |
83 | + CONFIG_SYS_CS4_FLASH_BASE, \ | |
84 | + CONFIG_SYS_CS5_FLASH_BASE } | |
85 | +#define CONFIG_SYS_MAX_FLASH_BANKS 6 | |
86 | + | |
87 | +#endif | |
88 | + | |
89 | +#define CONFIG_SYS_MAX_FLASH_SECT (127 + 8) | |
90 | +#define CONFIG_SYS_FLASH_QUIET_TEST 1 | |
91 | + | |
92 | +#endif | |
93 | + | |
94 | +#if defined(CONFIG_SPEAR300) | |
40 | 95 | #define CONFIG_SYS_NAND_BASE (0x80000000) |
96 | + | |
97 | +#elif defined(CONFIG_SPEAR310) | |
98 | +#define CONFIG_SYS_NAND_BASE (0x40000000) | |
99 | + | |
100 | +#endif | |
41 | 101 | |
42 | 102 | #endif /* __CONFIG_H */ |