Commit 7da692360414d07027c6cf564a15d79cd9dcf488
Committed by
Tom Rix
1 parent
080cfee714
Exists in
master
and in
54 other branches
SPEAr : Support added for SPEAr320 board
SPEAr320 SoC support contains basic spear320 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 186 additions and 1 deletions Side-by-side Diff
MAKEALL
Makefile
... | ... | @@ -3037,7 +3037,8 @@ |
3037 | 3037 | @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0 |
3038 | 3038 | |
3039 | 3039 | spear300_config \ |
3040 | -spear310_config : unconfig | |
3040 | +spear310_config \ | |
3041 | +spear320_config : unconfig | |
3041 | 3042 | @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx arm arm926ejs $(@:_config=) spear spear |
3042 | 3043 | |
3043 | 3044 | spear600_config : unconfig |
board/spear/spear320/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 := spear320.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/spear320/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/spear320/spear320.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
... | ... | @@ -34,6 +34,9 @@ |
34 | 34 | #elif defined(CONFIG_MK_spear310) |
35 | 35 | #define CONFIG_SPEAR3XX 1 |
36 | 36 | #define CONFIG_SPEAR310 1 |
37 | +#elif defined(CONFIG_MK_spear320) | |
38 | +#define CONFIG_SPEAR3XX 1 | |
39 | +#define CONFIG_SPEAR320 1 | |
37 | 40 | #endif |
38 | 41 | |
39 | 42 | #include <configs/spear-common.h> |
40 | 43 | |
... | ... | @@ -62,8 +65,20 @@ |
62 | 65 | (void *)CONFIG_SYS_SERIAL3, \ |
63 | 66 | (void *)CONFIG_SYS_SERIAL4, \ |
64 | 67 | (void *)CONFIG_SYS_SERIAL5 } |
68 | +#elif defined(CONFIG_SPEAR320) | |
69 | + | |
70 | +#if (CONFIG_CONS_INDEX) | |
71 | +#undef CONFIG_PL011_CLOCK | |
72 | +#define CONFIG_PL011_CLOCK (83 * 1000 * 1000) | |
65 | 73 | #endif |
66 | 74 | |
75 | +#define CONFIG_SYS_SERIAL1 0xA3000000 | |
76 | +#define CONFIG_SYS_SERIAL2 0xA4000000 | |
77 | +#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \ | |
78 | + (void *)CONFIG_SYS_SERIAL1, \ | |
79 | + (void *)CONFIG_SYS_SERIAL2 } | |
80 | +#endif | |
81 | + | |
67 | 82 | #if defined(CONFIG_SPEAR_EMI) |
68 | 83 | |
69 | 84 | #define CONFIG_SYS_FLASH_CFI |
... | ... | @@ -84,6 +99,17 @@ |
84 | 99 | CONFIG_SYS_CS5_FLASH_BASE } |
85 | 100 | #define CONFIG_SYS_MAX_FLASH_BANKS 6 |
86 | 101 | |
102 | +#elif defined(CONFIG_SPEAR320) | |
103 | +#define CONFIG_SYS_FLASH_BASE 0x44000000 | |
104 | +#define CONFIG_SYS_CS1_FLASH_BASE 0x45000000 | |
105 | +#define CONFIG_SYS_CS2_FLASH_BASE 0x46000000 | |
106 | +#define CONFIG_SYS_CS3_FLASH_BASE 0x47000000 | |
107 | +#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \ | |
108 | + CONFIG_SYS_CS1_FLASH_BASE, \ | |
109 | + CONFIG_SYS_CS2_FLASH_BASE, \ | |
110 | + CONFIG_SYS_CS3_FLASH_BASE } | |
111 | +#define CONFIG_SYS_MAX_FLASH_BANKS 4 | |
112 | + | |
87 | 113 | #endif |
88 | 114 | |
89 | 115 | #define CONFIG_SYS_MAX_FLASH_SECT (127 + 8) |
... | ... | @@ -96,6 +122,9 @@ |
96 | 122 | |
97 | 123 | #elif defined(CONFIG_SPEAR310) |
98 | 124 | #define CONFIG_SYS_NAND_BASE (0x40000000) |
125 | + | |
126 | +#elif defined(CONFIG_SPEAR320) | |
127 | +#define CONFIG_SYS_NAND_BASE (0x50000000) | |
99 | 128 | |
100 | 129 | #endif |
101 | 130 |