Commit 7e074158ce239380259c5fc97e87be2896169973

Authored by Vipin KUMAR
Committed by Tom Rix
1 parent f92994f0f7

SPEAr : Support added for SPEAr300 board

SPEAr300 SoC support contains basic spear300 support along with the
usage of following drivers
- serial driver(UART)
- i2c driver
- smi driver
- nand driver(FSMC)
- usbd driver

Signed-off-by: Vipin <vipin.kumar@st.com>

Showing 6 changed files with 194 additions and 0 deletions Side-by-side Diff

... ... @@ -574,6 +574,7 @@
574 574 sheevaplug \
575 575 smdk2400 \
576 576 smdk2410 \
  577 + spear300 \
577 578 spear600 \
578 579 trab \
579 580 VCMA9 \
... ... @@ -3036,6 +3036,9 @@
3036 3036 smdk2410_config : unconfig
3037 3037 @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0
3038 3038  
  3039 +spear300_config : unconfig
  3040 + @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx arm arm926ejs $(@:_config=) spear spear
  3041 +
3039 3042 spear600_config : unconfig
3040 3043 @$(MKCONFIG) -n $@ -t $(@:_config=) spear6xx arm arm926ejs $(@:_config=) spear spear
3041 3044  
board/spear/spear300/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 := spear300.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/spear300/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 +ifeq ($(CONSOLE),USB)
  38 +PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY
  39 +endif
board/spear/spear300/spear300.c
  1 +/*
  2 + * (C) Copyright 2009
  3 + * Vipin Kumar, ST Micoelectronics, 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 +#include <common.h>
  25 +#include <nand.h>
  26 +#include <asm/io.h>
  27 +#include <asm/arch/hardware.h>
  28 +#include <asm/arch/spr_defs.h>
  29 +#include <asm/arch/spr_misc.h>
  30 +#include <asm/arch/spr_nand.h>
  31 +
  32 +int board_init(void)
  33 +{
  34 + return spear_board_init(MACH_TYPE_SPEAR300);
  35 +}
  36 +
  37 +/*
  38 + * board_nand_init - Board specific NAND initialization
  39 + * @nand: mtd private chip structure
  40 + *
  41 + * Called by nand_init_chip to initialize the board specific functions
  42 + */
  43 +
  44 +int board_nand_init(struct nand_chip *nand)
  45 +{
  46 + struct misc_regs *const misc_regs_p =
  47 + (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
  48 +
  49 + if (((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
  50 + MISC_SOCCFG30) ||
  51 + ((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
  52 + MISC_SOCCFG31)) {
  53 +
  54 + return spear_nand_init(nand);
  55 + }
  56 +
  57 + return -1;
  58 +}
include/configs/spear3xx.h
  1 +/*
  2 + * (C) Copyright 2009
  3 + * Vipin Kumar, STMicroelectronics, <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 +#ifndef __CONFIG_H
  25 +#define __CONFIG_H
  26 +
  27 +/*
  28 + * High Level Configuration Options
  29 + * (easy to change)
  30 + */
  31 +#define CONFIG_SPEAR300 1
  32 +#define CONFIG_SPEAR3XX 1
  33 +
  34 +#include <configs/spear-common.h>
  35 +
  36 +/* Serial Configuration (PL011) */
  37 +#define CONFIG_SYS_SERIAL0 0xD0000000
  38 +#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
  39 +
  40 +#define CONFIG_SYS_NAND_BASE (0x80000000)
  41 +
  42 +#endif /* __CONFIG_H */