Skip to contentSkip to conversation

Add Marvell New Soc Support ARMADA100

PATCH Superseded Prafulla Wadaskar 4 participants 14 messages Nov 30, 2010 – Dec 1, 2010

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add Marvell New Soc Support ARMADA100

From: Prafulla WADASKAR <[email protected]>

This patch series adds basic ARMADA100 support, with minimal drivers (UART, MFP) support and Aspenite-DB board support for simple boot

Changelog v2:
1. This patch series is in sync latest u-boot
2. config.mk removed
3. CONFIG_SYS_NS16550_IER used for serial drivers
4. mv-common.h updated for aspenite support
5. c-struct used for dram.c
6. All review feedback for v1 implemented

These patches are tested on board

Regards..
Prafulla . .

Prafulla Wadaskar (7):
arm: Add Support for Marvell ARMADA 100 Familiy SoCs.
gpio: Add Multi-Function-Pin configuration driver for Marvell SoCs add Multi Function Pin configuration support for ARMADA100
Serial: ns16550: Add support for CONFIG_SYS_NS16550_IER macro
Serial: Add UART support for Marvell ARMADA 100 SoCs. mv-common.h: Add support for ARMADA100 Platforms
Armada100: Add Board Support for Marvell Aspenite-DB

 MAINTAINERS                                     |    1 +
 MAKEALL                                         |    1 +
 arch/arm/cpu/arm926ejs/armada100/Makefile       |   46 +++++
 arch/arm/cpu/arm926ejs/armada100/cpu.c          |   92 ++++++++++
 arch/arm/cpu/arm926ejs/armada100/dram.c         |  131 ++++++++++++++
 arch/arm/cpu/arm926ejs/armada100/timer.c        |  199 +++++++++++++++++++++
 arch/arm/include/asm/arch-armada100/armada100.h |  120 +++++++++++++
 arch/arm/include/asm/arch-armada100/cpu.h       |   53 ++++++
 arch/arm/include/asm/arch-armada100/mfp.h       |  218 +++++++++++++++++++++++
 board/Marvell/aspenite/Makefile                 |   52 ++++++
 board/Marvell/aspenite/aspenite.c               |   53 ++++++
 boards.cfg                                      |    1 +
 drivers/gpio/Makefile                           |    1 +
 drivers/gpio/mfp.c                              |  105 +++++++++++
 drivers/serial/ns16550.c                        |    4 +-
 drivers/serial/serial.c                         |   14 +-
 include/configs/aspenite.h                      |   65 +++++++
 include/configs/mv-common.h                     |   65 +++++--
 include/mfp.h                                   |   97 ++++++++++
 include/ns16550.h                               |    4 +
 20 files changed, 1298 insertions(+), 24 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/Makefile
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/cpu.c
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/dram.c
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/timer.c
 create mode 100644 arch/arm/include/asm/arch-armada100/armada100.h
 create mode 100644 arch/arm/include/asm/arch-armada100/cpu.h
 create mode 100755 arch/arm/include/asm/arch-armada100/mfp.h
 create mode 100644 board/Marvell/aspenite/Makefile
 create mode 100644 board/Marvell/aspenite/aspenite.c
 create mode 100644 drivers/gpio/mfp.c
 create mode 100644 include/configs/aspenite.h
 create mode 100644 include/mfp.h
#1 lore raw

PATCH v2 1/7 arm: Add Support for Marvell ARMADA 100 Familiy SoCs.

From: Prafulla WADASKAR <[email protected]>

ARMADA 100 Family processors are highly integrated SoCs based on Sheeva_88SV331x-v5 PJ1 cpu core.
Ref: http://www.marvell.com/products/processors/applications/armada_100

SoC versions Supported:
1) ARMADA168/88AP168 (Aspen P)
2) ARMADA166/88AP166 (Aspen M)
3) ARMADA162/88AP162 (Aspen L)

Contributors:
Eric Miao <[email protected]>
Lei Wen <[email protected]>
Mahavir Jain <[email protected]>

---

Change log V2:
1. C-struct used for dram.c
2. lib declaration changed from .a to .o
3. Implemented review feedback for v1

 arch/arm/cpu/arm926ejs/armada100/Makefile       |   46 ++++++
 arch/arm/cpu/arm926ejs/armada100/cpu.c          |   92 +++++++++++
 arch/arm/cpu/arm926ejs/armada100/dram.c         |  131 +++++++++++++++
 arch/arm/cpu/arm926ejs/armada100/timer.c        |  199 +++++++++++++++++++++++
 arch/arm/include/asm/arch-armada100/armada100.h |  120 ++++++++++++++
 arch/arm/include/asm/arch-armada100/cpu.h       |   53 ++++++
 6 files changed, 641 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/Makefile
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/cpu.c
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/dram.c
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/timer.c
 create mode 100644 arch/arm/include/asm/arch-armada100/armada100.h
 create mode 100644 arch/arm/include/asm/arch-armada100/cpu.h
arch/arm/cpu/arm926ejs/armada100/Makefile new file +46 -0
new file mode 100644
index 0000000..76bd06d
@@ -0,0 +1,46 @@
+#
+# (C) Copyright 2010
+# Marvell Semiconductor <www.marvell.com>
+# Written-by: Prafulla Wadaskar <[email protected]>
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(SOC).o
+
+COBJS-y	= cpu.o timer.o dram.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS-y))
+
+all:	$(obj).depend $(LIB)
+
+$(LIB):	$(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
arch/arm/cpu/arm926ejs/armada100/cpu.c new file +92 -0

92 lines not on this page · raw message

arch/arm/cpu/arm926ejs/armada100/dram.c new file +131 -0

131 lines not on this page · raw message

arch/arm/cpu/arm926ejs/armada100/timer.c new file +199 -0

199 lines not on this page · raw message

arch/arm/include/asm/arch-armada100/armada100.h new file +120 -0

120 lines not on this page · raw message

arch/arm/include/asm/arch-armada100/cpu.h new file +53 -0

53 lines not on this page · raw message

Signature · 1 line
1.6.0.3
#2 lore raw

PATCH v2 1/7 arm: Add Support for Marvell ARMADA 100 Familiy SoCs.

Hello Prafulla,

Quoted 39 lines · Prafulla Wadaskar

From: Prafulla WADASKAR <[email protected]>

ARMADA 100 Family processors are highly integrated SoCs based on Sheeva_88SV331x-v5 PJ1 cpu core.
Ref: http://www.marvell.com/products/processors/applications/armada_100

SoC versions Supported:
1) ARMADA168/88AP168 (Aspen P)
2) ARMADA166/88AP166 (Aspen M)
3) ARMADA162/88AP162 (Aspen L)

Contributors:
Eric Miao <[email protected]>
Lei Wen <[email protected]>
Mahavir Jain <[email protected]>

---

Change log V2:
1. C-struct used for dram.c
2. lib declaration changed from .a to .o
3. Implemented review feedback for v1

 arch/arm/cpu/arm926ejs/armada100/Makefile       |   46 ++++++
 arch/arm/cpu/arm926ejs/armada100/cpu.c          |   92 +++++++++++
 arch/arm/cpu/arm926ejs/armada100/dram.c         |  131 +++++++++++++++
 arch/arm/cpu/arm926ejs/armada100/timer.c        |  199 +++++++++++++++++++++++
 arch/arm/include/asm/arch-armada100/armada100.h |  120 ++++++++++++++
 arch/arm/include/asm/arch-armada100/cpu.h       |   53 ++++++
 6 files changed, 641 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/Makefile
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/cpu.c
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/dram.c
 create mode 100644 arch/arm/cpu/arm926ejs/armada100/timer.c
 create mode 100644 arch/arm/include/asm/arch-armada100/armada100.h
 create mode 100644 arch/arm/include/asm/arch-armada100/cpu.h

[...]

Quoted 8 lines
arch/arm/cpu/arm926ejs/armada100/timer.c new file +2 -0
new file mode 100644
index 0000000..b9ef8af
@@ -0,0 +1,199 @@
+/*
+ * (C) Copyright 2010

[...]

arch/arm/cpu/arm926ejs/armada100/timer.c line 74

Quoted 6 lines
arch/arm/cpu/arm926ejs/armada100/timer.c new file +6 -0
+#define READ_TIMER		({volatile int loop=100; \
+				writel(COUNT_RD_REQ, &armd1timers->cvwr); \
+				while (loop--); \
+				readl(&armd1timers->cvwr);})
+static ulong timestamp;
+static ulong lastdec;

This local vars are stored in bss, which is not valid before relocation. And timer_init() is called before relocation and changes this vars.

For an example how to change this issue, look here:
http://git.denx.de/?p=u-boot.git;a=commit;h=5dca710a3d7703e41da0e9894f2d71f9e25bea6b

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#3 lore raw

PATCH v2 1/7 arm: Add Support for Marvell ARMADA 100 Familiy SoCs.

Quoted 13 lines

-----Original Message-----
From: Heiko Schocher [mailto:hs at denx.de]
Sent: Tuesday, November 30, 2010 12:48 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de; Eric Miao; Manas Saksena; Lei Wen; Yu Tang; Ashish Karkare; Kiran Vedere; Prabhanjan Sarnaik
Subject: Re: [U-Boot] [PATCH v2 1/7] arm: Add Support for Marvell ARMADA 100 Familiy SoCs.

Hello Prafulla,

...snip...

Quoted 20 lines

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/cpu/arm926ejs/armada100/timer.c

Quoted 7 lines

new file mode 100644
index 0000000..b9ef8af

arch/arm/cpu/arm926ejs/armada100/timer.c new file +2 -0
@@ -0,0 +1,199 @@
+/*
+ * (C) Copyright 2010

[...]

arch/arm/cpu/arm926ejs/armada100/timer.c line 74

Quoted 6 lines
arch/arm/cpu/arm926ejs/armada100/timer.c new file +6 -0
+#define READ_TIMER		({volatile int loop=100; \
+				writel(COUNT_RD_REQ, &armd1timers->cvwr); \
+				while (loop--); \
+				readl(&armd1timers->cvwr);})
+static ulong timestamp;
+static ulong lastdec;

This local vars are stored in bss, which is not valid before relocation. And timer_init() is called before relocation and changes this vars.

Quoted 3 lines

For an example how to change this issue, look here:
http://git.denx.de/?p=u-
boot.git;a=commit;h=5dca710a3d7703e41da0e9894f2d71f9e25bea6b

Hi Heiko
Thanks for the feedback.
The suggested change seems to be at91 specific. Also some other ARM SoCs do not have this implementation.

Do you mean they should also fix it?
In that case, in gt_t: making timer/clock variables available for all ARM platforms makes sense.

What do you think?

Regards..
Prafulla . .

#4 lore raw

PATCH v2 2/7 gpio: Add Multi-Function-Pin configuration driver for Marvell SoCs

In reply to Prafulla Wadaskar

Most of the Marvell SoCs has Multi Function Pin (MFP) configuration registers For ex. ARMADA100.

These registers are programmed to expose the specific functionality associated with respective SoC Pins

This driver provides configuration APIs,
using them, configuration need to be done in board specific code

for ex- following code configures MFPs 107 and 108 for UART_TX/RX functionality

int board_early_init_f(void)

{
	u32 mfp_cfg[] = {
		/* Console on UART1 */
		MFP107_UART1_RXD,
		MFP108_UART1_TXD,
		MFP_EOC		/*End of configureation*/
	};
	/* configure MFP's */
	mfp_config(mfp_cfg);
	return 0;
}
---
 drivers/gpio/Makefile |    1 +
 drivers/gpio/mfp.c    |  105 +++++++++++++++++++++++++++++++++++++++++++++++++
 include/mfp.h         |   97 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 203 insertions(+), 0 deletions(-)
 create mode 100644 drivers/gpio/mfp.c
 create mode 100644 include/mfp.h
drivers/gpio/Makefile +1 -0
index 398024c..f6903d5 100644
@@ -27,6 +27,7 @@ LIB 	:= $(obj)libgpio.o
 
 COBJS-$(CONFIG_AT91_GPIO)	+= at91_gpio.o
 COBJS-$(CONFIG_KIRKWOOD_GPIO)	+= kw_gpio.o
+COBJS-$(CONFIG_MFP)		+= mfp.o
 COBJS-$(CONFIG_MXC_GPIO)	+= mxc_gpio.o
 COBJS-$(CONFIG_PCA953X)		+= pca953x.o
 COBJS-$(CONFIG_S5P)		+= s5p_gpio.o
drivers/gpio/mfp.c new file +105 -0

105 lines not on this page · raw message

include/mfp.h new file +97 -0

97 lines not on this page · raw message

Signature · 1 line
1.6.0.3
#5 lore raw

PATCH v2 3/7 add Multi Function Pin configuration support for ARMADA100

This patch adds the support MFP support for Marvell ARMADA100 SoCs

---
 arch/arm/include/asm/arch-armada100/mfp.h |  218 +++++++++++++++++++++++++++++
 1 files changed, 218 insertions(+), 0 deletions(-)
 create mode 100755 arch/arm/include/asm/arch-armada100/mfp.h
arch/arm/include/asm/arch-armada100/mfp.h new file +218 -0
new file mode 100755
index 0000000..eddcef7
@@ -0,0 +1,218 @@
+/*
+ * Based on linux/arch/arm/mach-mpp/include/mfp-pxa168.h
+ * (C) Copyright 2007
+ * Marvell Semiconductor <www.marvell.com>
+ * 2007-08-21: eric miao <[email protected]>
+ *
+ * (C) Copyright 2010
+ * Marvell Semiconductor <www.marvell.com>
+ * Written-by: Prafulla Wadaskar <[email protected]>
+ * Contributor: Mahavir Jain <[email protected]>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef __ARMADA100_MFP_H
+#define __ARMADA100_MFP_H
+
+/* By default Pin Drive is set to medium */
+#define MFPD(x)			MFP(x) | MFP_DRIVE(MEDIUM)
+
+/* GPIOs */
+#define	GPIOAF(x)		(if (x <= 15) ? 5 :	\
+				 if (x == 16) ? 0 :	\
+				 if (x == 17) ? 5 :	\
+				 if (x == 18) ? 0 :	\
+				 if (x == 19) ? 5 :	\
+				 if (x == 20) ? 0 :	\
+				 if (x <= 25) ? 5 :	\
+				 if (x == 26) ? 0 :	\
+				 if (x == 33) ? 5 : 0)
+
+#define MFP_GPIO(x)		MFPD(x) | MFP_AF(GPIOAF(x))
+
+/* UART2 */
+#define MFP47_UART2_RXD		MFPD(47) | MFP_AF(6)
+#define MFP48_UART2_TXD		MFPD(48) | MFP_AF(6)
+#define MFP88_UART2_RXD		MFPD(88) | MFP_AF(2)
+#define MFP89_UART2_TXD		MFPD(89) | MFP_AF(2)
+
+/* UART3 */
+#define  GPIO8_UART3_RXD	MFPD(8) | MFP_AF(2)
+#define  GPIO9_UART3_TXD	MFPD(9) | MFP_AF(2)
+
+/* MFU */
+#define MFP86_TX_CLK		MFPD(86) | MFP_AF(5)
+#define MFP87_TX_EN		MFPD(87) | MFP_AF(5)
+#define MFP88_TX_DQ3		MFPD(88) | MFP_AF(5)
+#define MFP89_TX_DQ2		MFPD(89) | MFP_AF(5)
+#define MFP90_TX_DQ1		MFPD(90) | MFP_AF(5)
+#define MFP91_TX_DQ0		MFPD(91) | MFP_AF(5)
+#define MFP92_MII_CRS		MFPD(92) | MFP_AF(5)
+#define MFP93_MII_COL		MFPD(93) | MFP_AF(5)
+#define MFP94_RX_CLK		MFPD(94) | MFP_AF(5)
+#define MFP95_RX_ER		MFPD(95) | MFP_AF(5)
+#define MFP96_RX_DQ3		MFPD(96) | MFP_AF(5)
+#define MFP97_RX_DQ2		MFPD(97) | MFP_AF(5)
+#define MFP98_RX_DQ1		MFPD(98) | MFP_AF(5)
+#define MFP99_RX_DQ0		MFPD(99) | MFP_AF(5)
+#define MFP100_MII_MDC		MFPD(100) | MFP_AF(5)
+#define MFP101_MII_MDIO		MFPD(101) | MFP_AF(5)
+#define MFP103_RX_DV		MFPD(103) | MFP_AF(5)
+
+/* SSP2*/
+#define MFP107_SPI_NOR_RXD	MFPD(107) | MFP_AF(4)
+#define MFP108_SPI_NOR_TXD	MFPD(108) | MFP_AF(4)
+#define MFP109_SPI_NOR_SYSCLK	MFPD(109) | MFP_AF(4)
+#define MFP111_SPI_NOR_CLK	MFPD(111) | MFP_AF(4)
+
+/* DFI */
+#define MFP0_DFI_D15		MFPD(0) | MFP_AF(0)
+#define MFP1_DFI_D14		MFPD(1) | MFP_AF(0)
+#define MFP2_DFI_D13		MFPD(2) | MFP_AF(0)
+#define MFP3_DFI_D12		MFPD(3) | MFP_AF(0)
+#define MFP4_DFI_D11		MFPD(4) | MFP_AF(0)
+#define MFP5_DFI_D10		MFPD(5) | MFP_AF(0)
+#define MFP6_DFI_D9		MFPD(6) | MFP_AF(0)
+#define MFP7_DFI_D8		MFPD(7) | MFP_AF(0)
+#define MFP8_DFI_D7		MFPD(8) | MFP_AF(0)
+#define MFP9_DFI_D6		MFPD(9) | MFP_AF(0)
+#define MFP10_DFI_D5		MFPD(10) | MFP_AF(0)
+#define MFP11_DFI_D4		MFPD(11) | MFP_AF(0)
+#define MFP12_DFI_D3		MFPD(12) | MFP_AF(0)
+#define MFP13_DFI_D2		MFPD(13) | MFP_AF(0)
+#define MFP14_DFI_D1		MFPD(14) | MFP_AF(0)
+#define MFP15_DFI_D0		MFPD(15) | MFP_AF(0)
+
+#define MFP30_DFI_ADDR0		MFPD(30) | MFP_AF(0)
+#define MFP31_DFI_ADDR1		MFPD(31) | MFP_AF(0)
+#define MFP32_DFI_ADDR2		MFPD(32) | MFP_AF(0)
+#define MFP33_DFI_ADDR3		MFPD(33) | MFP_AF(0)
+
+/* NAND */
+#define MFP16_ND_nCS0		MFPD(16) | MFP_AF(1)
+#define MFP17_ND_nWE		MFPD(17) | MFP_AF(0)
+#define MFP21_ND_ALE		MFPD(21) | MFP_AF(0)
+#define MFP22_ND_CLE		MFPD(22) | MFP_AF(0)
+#define MFP24_ND_nRE		MFPD(24) | MFP_AF(0)
+#define MFP26_ND_RnB1		MFPD(26) | MFP_AF(1)
+#define MFP27_ND_RnB2		MFPD(27) | MFP_AF(1)
+
+/* Static Memory Controller */
+#define MFP18_SMC_nCS0		MFPD(18) | MFP_AF(3)
+#define MFP18_SMC_nCS1		MFPD(18) | MFP_AF(2)
+#define MFP16_SMC_nCS0		MFPD(16) | MFP_AF(2)
+#define MFP16_SMC_nCS1		MFPD(16) | MFP_AF(3)
+#define MFP19_SMC_nCS0		MFPD(19) | MFP_AF(0)
+#define MFP20_SMC_nCS1		MFPD(20) | MFP_AF(2)
+#define MFP23_SMC_nLUA		MFPD(23) | MFP_AF(0)
+#define MFP25_SMC_nLLA		MFPD(25) | MFP_AF(0)
+#define MFP27_SMC_IRQ		MFPD(27) | MFP_AF(0)
+#define MFP28_SMC_RDY		MFPD(28) | MFP_AF(0)
+#define MFP29_SMC_SCLK		MFPD(29) | MFP_AF(0)
+#define MFP34_SMC_nCS1		MFPD(34) | MFP_AF(2)
+#define MFP35_SMC_BE1		MFPD(35) | MFP_AF(2)
+#define MFP36_SMC_BE2		MFPD(36) | MFP_AF(2)
+
+/* Compact Flash */
+#define MFP19_CF_nCE1		MFPD(19) | MFP_AF(3)
+#define MFP20_CF_nCE2		MFPD(20) | MFP_AF(3)
+#define MFP23_CF_nALE		MFPD(23) | MFP_AF(3)
+#define MFP25_CF_nRESET		MFPD(25) | MFP_AF(3)
+#define MFP28_CF_RDY		MFPD(28) | MFP_AF(3)
+#define MFP29_CF_STSCH		MFPD(29) | MFP_AF(3)
+#define MFP30_CF_nREG		MFPD(30) | MFP_AF(3)
+#define MFP31_CF_nIOIS16	MFPD(31) | MFP_AF(3)
+#define MFP32_CF_nCD1		MFPD(32) | MFP_AF(3)
+#define MFP33_CF_nCD2		MFPD(33) | MFP_AF(3)
+
+/* UART1 */
+#define MFP107_UART1_TXD	MFP(107) | MFP_AF(1) | MFP_DRIVE(FAST)
+#define MFP107_UART1_RXD	MFP(107) | MFP_AF(2) | MFP_DRIVE(FAST)
+#define MFP108_UART1_RXD	MFP(108) | MFP_AF(1) | MFP_DRIVE(FAST)
+#define MFP108_UART1_TXD	MFP(108) | MFP_AF(2) | MFP_DRIVE(FAST)
+#define MFP109_UART1_CTS	MFPD(109) | MFP_AF(1)
+#define MFP109_UART1_RTS	MFPD(109) | MFP_AF(2)
+#define MFP110_UART1_RTS	MFPD(110) | MFP_AF(1)
+#define MFP110_UART1_CTS	MFPD(110) | MFP_AF(2)
+#define MFP111_UART1_RI		MFPD(111) | MFP_AF(1)
+#define MFP111_UART1_DSR	MFPD(111) | MFP_AF(2)
+#define MFP112_UART1_DTR	MFPD(111) | MFP_AF(1)
+#define MFP112_UART1_DCD	MFPD(112) | MFP_AF(2)
+
+/* MMC1 */
+#define MFP37_MMC1_DAT7		MFPD(37) | MFP_AF(1)
+#define MFP38_MMC1_DAT6		MFPD(38) | MFP_AF(1)
+#define MFP54_MMC1_DAT5		MFPD(54) | MFP_AF(1)
+#define MFP48_MMC1_DAT4		MFPD(48) | MFP_AF(1)
+#define MFP51_MMC1_DAT3		MFPD(51) | MFP_AF(1)
+#define MFP52_MMC1_DAT2		MFPD(52) | MFP_AF(1)
+#define MFP40_MMC1_DAT1		MFPD(40) | MFP_AF(1)
+#define MFP41_MMC1_DAT0		MFPD(41) | MFP_AF(1)
+#define MFP49_MMC1_CMD		MFPD(49) | MFP_AF(1)
+#define MFP43_MMC1_CLK		MFPD(43) | MFP_AF(1)
+#define MFP53_MMC1_CD		MFPD(53) | MFP_AF(1)
+#define MFP46_MMC1_WP		MFPD(46) | MFP_AF(1)
+
+/* LCD */
+#define MFP84_LCD_CS		MFPD(84) | MFP_AF(1)
+#define MFP60_LCD_DD0		MFPD(60) | MFP_AF(1)
+#define MFP61_LCD_DD1		MFPD(61) | MFP_AF(1)
+#define MFP70_LCD_DD10		MFPD(70) | MFP_AF(1)
+#define MFP71_LCD_DD11		MFPD(71) | MFP_AF(1)
+#define MFP72_LCD_DD12		MFPD(72) | MFP_AF(1)
+#define MFP73_LCD_DD13		MFPD(73) | MFP_AF(1)
+#define MFP74_LCD_DD14		MFPD(74) | MFP_AF(1)
+#define MFP75_LCD_DD15		MFPD(75) | MFP_AF(1)
+#define MFP76_LCD_DD16		MFPD(76) | MFP_AF(1)
+#define MFP77_LCD_DD17		MFPD(77) | MFP_AF(1)
+#define MFP78_LCD_DD18		MFPD(78) | MFP_AF(1)
+#define MFP79_LCD_DD19		MFPD(79) | MFP_AF(1)
+#define MFP62_LCD_DD2		MFPD(62) | MFP_AF(1)
+#define MFP80_LCD_DD20		MFPD(80) | MFP_AF(1)
+#define MFP81_LCD_DD21		MFPD(81) | MFP_AF(1)
+#define MFP82_LCD_DD22		MFPD(82) | MFP_AF(1)
+#define MFP83_LCD_DD23		MFPD(83) | MFP_AF(1)
+#define MFP63_LCD_DD3		MFPD(63) | MFP_AF(1)
+#define MFP64_LCD_DD4		MFPD(64) | MFP_AF(1)
+#define MFP65_LCD_DD5		MFPD(65) | MFP_AF(1)
+#define MFP66_LCD_DD6		MFPD(66) | MFP_AF(1)
+#define MFP67_LCD_DD7		MFPD(67) | MFP_AF(1)
+#define MFP68_LCD_DD8		MFPD(68) | MFP_AF(1)
+#define MFP69_LCD_DD9		MFPD(69) | MFP_AF(1)
+#define MFP59_LCD_DENA_BIAS	MFPD(59) | MFP_AF(1)
+#define MFP56_LCD_FCLK_RD	MFPD(56) | MFP_AF(1)
+#define MFP57_LCD_LCLK_A0	MFPD(57) | MFP_AF(1)
+#define MFP58_LCD_PCLK_WR	MFPD(58) | MFP_AF(1)
+#define MFP85_LCD_VSYNC		MFPD(85) | MFP_AF(1)
+
+/* I2C */
+#define MFP105_CI2C_SDA		MFPD(105) | MFP_AF(1)
+#define MFP106_CI2C_SCL		MFPD(106) | MFP_AF(1)
+
+/* I2S */
+#define MFP113_I2S_MCLK		MFPD(113), MFP_AF(6)
+#define MFP114_I2S_FRM		MFPD(114), MFP_AF(1)
+#define MFP115_I2S_BCLK		MFPD(115), MFP_AF(1)
+#define MFP116_I2S_RXD		MFPD(116), MFP_AF(2)
+#define MFP117_I2S_TXD		MFPD(117), MFP_AF(2)
+
+#define MFP_PIN_MAX	117
+
+#endif /* __ARMADA100_MFP_H */
Signature · 1 line
1.6.0.3
#6 lore raw

PATCH v2 4/7 Serial: ns16550: Add support for CONFIG_SYS_NS16550_IER macro

On some processors this ier register configuration is different for ex. Marvell Armada100

This patch introduce CONFIG_SYS_NS16550_IER macro support to unconditionally initialize this register.

---
 drivers/serial/ns16550.c |    4 ++--
 include/ns16550.h        |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/serial/ns16550.c +2 -2
index 32f24de..8dcfcb9 100644
@@ -26,7 +26,7 @@
 
 void NS16550_init (NS16550_t com_port, int baud_divisor)
 {
-	serial_out(0x00, &com_port->ier);
+	serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
 	serial_out(0x7, &com_port->mdr1);	/* mode select reset TL16C750*/
 #endif
@@ -52,7 +52,7 @@ void NS16550_init (NS16550_t com_port, int baud_divisor)
 #ifndef CONFIG_NS16550_MIN_FUNCTIONS
 void NS16550_reinit (NS16550_t com_port, int baud_divisor)
 {
-	serial_out(0x00, &com_port->ier);
+	serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
 	serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr);
 	serial_out(0, &com_port->dll);
 	serial_out(0, &com_port->dlm);
include/ns16550.h +4 -0
index 9ea81e9..e9cb449 100644
@@ -33,6 +33,10 @@
 	unsigned char postpad_##x[-CONFIG_SYS_NS16550_REG_SIZE - 1];
 #endif
 
+#ifndef CONFIG_SYS_NS16550_IER
+#define CONFIG_SYS_NS16550_IER	0x00
+#endif /* CONFIG_SYS_NS16550_IER */
+
 struct NS16550 {
 	UART_REG(rbr);		/* 0 */
 	UART_REG(ier);		/* 1 */
Signature · 1 line
1.6.0.3
#7 lore raw

PATCH v2 5/7 Serial: Add UART support for Marvell ARMADA 100 SoCs.

ARMADA 100 SoCs has NS16550 compatible UART peripheral This patch enables the same for ARMADA100 platforms

---
 drivers/serial/serial.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
drivers/serial/serial.c +8 -6
index 1073ac0..c6b403b 100644
@@ -23,15 +23,17 @@
 
 #include <common.h>
 
-#include <ns16550.h>
-#ifdef CONFIG_NS87308
-#include <ns87308.h>
-#endif
 #ifdef CONFIG_KIRKWOOD
 #include <asm/arch/kirkwood.h>
-#endif
-#ifdef CONFIG_ORION5X
+#elif defined (CONFIG_ORION5X)
 #include <asm/arch/orion5x.h>
+#elif defined (CONFIG_ARMADA100)
+#include <asm/arch/armada100.h>
+#endif
+
+#include <ns16550.h>
+#ifdef CONFIG_NS87308
+#include <ns87308.h>
 #endif
 
 #if defined (CONFIG_SERIAL_MULTI)
Signature · 1 line
1.6.0.3
#8 lore raw

PATCH v2 6/7 mv-common.h: Add support for ARMADA100 Platforms

This patch adds commonly used macros for ARMADA100 based baords, Also some code reshuffled and updated for typos and comments

---
 include/configs/mv-common.h |   65 ++++++++++++++++++++++++++++++++----------
 1 files changed, 49 insertions(+), 16 deletions(-)
include/configs/mv-common.h +49 -16
index de0121e..423cc9f 100644
@@ -39,6 +39,7 @@
 #define CONFIG_MARVELL		1
 #define CONFIG_ARM926EJS	1	/* Basic Architecture */
 
+/* ====> Kirkwood Platform Common Definations */
 #if defined(CONFIG_KIRKWOOD)
 #define CONFIG_MD5	/* get_random_hex on krikwood needs MD5 support */
 #define CONFIG_KIRKWOOD_EGIGA_INIT	/* Enable GbePort0/1 for kernel */
@@ -54,27 +55,45 @@
 #define	CONFIG_SYS_KWD_CONFIG	$(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage.cfg 
 #endif /* CONFIG_SYS_KWD_CONFIG */
 
-/* 
- * CONFIG_SYS_TEXT_BASE can be defined in board specific header file, if needed
- */
-#ifndef CONFIG_SYS_TEXT_BASE
-#define	CONFIG_SYS_TEXT_BASE	0x00600000
-#endif /* CONFIG_SYS_TEXT_BASE */
+/* Kirkwood has 2k of Security SRAM, use it for SP */
+#define CONFIG_SYS_INIT_SP_ADDR		0xC8012000
+#define CONFIG_NR_DRAM_BANKS_MAX	2
 
 #define CONFIG_I2C_MVTWSI_BASE	KW_TWSI_BASE
-#define MV_UART0_BASE		KW_UART0_BASE
+#define MV_UART_CONSOLE_BASE	KW_UART0_BASE
 #define MV_SATA_BASE		KW_SATA_BASE
 #define MV_SATA_PORT0_OFFSET	KW_SATA_PORT0_OFFSET
 #define MV_SATA_PORT1_OFFSET	KW_SATA_PORT1_OFFSET
 
+/* ====> ARMADA100 Platform Common Definations */
+#elif defined (CONFIG_ARMADA100)
+
+#define CONFIG_SYS_TCLK		(14745600)	/* NS16550 clk config */
+#define CONFIG_SYS_HZ_CLOCK	(3250000)	/* Timer Freq. 3.25MHZ */
+#define CONFIG_MFP			/* Enable MFP driver */
+#define MV_UART_CONSOLE_BASE	ARMD1_UART1_BASE
+#define CONFIG_SYS_NS16550_IER	(1 << 6)	/* Bit 6 in UART_IER register
+						represents UART Unit Enable */
+/*
+ * There is no internal RAM in ARMADA100, using DRAM
+ * TBD: dcache to be used for this
+ */
+#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_TEXT_BASE - 0x00200000)
+#define CONFIG_NR_DRAM_BANKS_MAX	2
+
 #else
-#error "Unsupported SoC"
+#error "Unsupported SoC Platform..."
 #endif
 
+/*
+ * Custom CONFIG_SYS_TEXT_BASE can be done in <board>.h
+ */
+#ifndef CONFIG_SYS_TEXT_BASE
+#define	CONFIG_SYS_TEXT_BASE	0x00600000
+#endif /* CONFIG_SYS_TEXT_BASE */
+
 /* additions for new ARM relocation support */
-#define CONFIG_SYS_SDRAM_BASE		0x00000000
-/* Kirkwood has 2k of Security SRAM, use it for SP */
-#define CONFIG_SYS_INIT_SP_ADDR		0xC8012000
+#define CONFIG_SYS_SDRAM_BASE	0x00000000
 
 /*
  * CLKs configurations
@@ -88,7 +107,7 @@
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
 #define CONFIG_SYS_NS16550_CLK		CONFIG_SYS_TCLK
-#define CONFIG_SYS_NS16550_COM1		MV_UART0_BASE
+#define CONFIG_SYS_NS16550_COM1		MV_UART_CONSOLE_BASE
 
 /*
  * Serial Port configuration
@@ -155,26 +174,38 @@
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_CONSOLE_INFO_QUIET	/* some code reduction */
+#ifndef CONFIG_ARMADA100	/* will be removed latter */
 #define CONFIG_ARCH_CPU_INIT	/* call arch_cpu_init() */
 #define CONFIG_ARCH_MISC_INIT	/* call arch_misc_init() */
+#endif /* CONFIG_ARMADA100 */
 #define CONFIG_BOARD_EARLY_INIT_F /* call board_init_f for early inits */ 
 #define CONFIG_DISPLAY_CPUINFO	/* Display cpu info */
-#define CONFIG_NR_DRAM_BANKS	4
 #define CONFIG_STACKSIZE	0x00100000	/* regular stack- 1M */
 #define CONFIG_SYS_LOAD_ADDR	0x00800000	/* default load adr- 8M */
-#define CONFIG_SYS_MEMTEST_START 0x00400000	/* 4M */
-#define CONFIG_SYS_MEMTEST_END	0x007fffff	/*(_8M -1) */
+#define CONFIG_SYS_MEMTEST_START 0x00800000	/* 8M */
+#define CONFIG_SYS_MEMTEST_END	0x00ffffff	/*(_16M -1) */
 #define CONFIG_SYS_RESET_ADDRESS 0xffff0000	/* Rst Vector Adr */
 #define CONFIG_SYS_MAXARGS	16	/* max number of command args */
 
 /*
+ * DRAM Banks configuration, Custom config can be done in <board>.h
+ */
+#ifndef CONFIG_NR_DRAM_BANKS
+#define CONFIG_NR_DRAM_BANKS	CONFIG_NR_DRAM_BANKS_MAX
+#else
+#if (CONFIG_NR_DRAM_BANKS > CONFIG_NR_DRAM_BANKS_MAX)
+#error CONFIG_NR_DRAM_BANKS Configurated more than available
+#endif
+#endif /* CONFIG_NR_DRAM_BANKS */
+
+/*
  * Ethernet Driver configuration
  */
 #ifdef CONFIG_CMD_NET
 #define CONFIG_CMD_MII
 #define CONFIG_NETCONSOLE	/* include NetConsole support   */
 #define CONFIG_NET_MULTI	/* specify more that one ports available */
-#define	CONFIG_MII		/* expose smi ove miiphy interface */
+#define CONFIG_MII		/* expose smi ove miiphy interface */
 #define CONFIG_MVGBE		/* Enable Marvell Gbe Controller Driver */
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	/* detect link using phy */
 #define CONFIG_ENV_OVERWRITE	/* ethaddr can be reprogrammed */
@@ -232,6 +263,7 @@
 /*
  * File system
  */
+#ifndef CONFIG_ARMADA100	/* will be removed latter */
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_FAT
@@ -242,5 +274,6 @@
 #define CONFIG_MTD_PARTITIONS
 #define CONFIG_CMD_MTDPARTS
 #define CONFIG_LZO
+#endif /* CONFIG_ARMADA100 */
 
 #endif /* _MV_COMMON_H */
Signature · 1 line
1.6.0.3
#9 lore raw

PATCH v2 7/7 Armada100: Add Board Support for Marvell Aspenite-DB

From: Prafulla WADASKAR <[email protected]>

Aspenite is a Development Board for ASPEN/ARMADA168(88AP168) with
* Processor upto 1.2GHz
* Parallel 1Gb x8 DDR2-1066 MHz
* 16 Mb x16 NOR, 4Gb x8 SLC NAND, footprint for SPI NOR
* Footprints for eMMC/eSD NAND & MMC x8 card
* 4-in-1 card reader (xD, MMC/SD/MS Pro), CF True IDE socket
* SEAF memory board, subset of PISMO2
With Peripherals:
* 4.3??? WVGA 24-bit LCD
* Audio codecs (AC97 & I2S), TSI
* VGA camera
* Video in via 3 RCA jacks, and HDMI type C out
* Marvell 88W8688 802.11bg/BT module
* GPS RF IC
* Dual analog mics & speakers, headset jack, LED, ambient light sensor
* USB2.0 HS host (A), OTG (micro AB)
* FE PHY, PCIE Mini Card slot
* GPIO, GPIO expander with DIP switches for easier selection UART serial over USB, CIR

This patch adds basic board support with DRAM and UART functionality The patch is tested for boot from DRAM using XDB

---
Change log for v2:
used mv-common.h
defined CONFIG_SYS_NS16550_IER macro in Soc heder file removed config.mk

 MAINTAINERS                       |    1 +
 MAKEALL                           |    1 +
 board/Marvell/aspenite/Makefile   |   52 +++++++++++++++++++++++++++++
 board/Marvell/aspenite/aspenite.c |   53 ++++++++++++++++++++++++++++++
 boards.cfg                        |    1 +
 include/configs/aspenite.h        |   65 +++++++++++++++++++++++++++++++++++++
 6 files changed, 173 insertions(+), 0 deletions(-)
 create mode 100644 board/Marvell/aspenite/Makefile
 create mode 100644 board/Marvell/aspenite/aspenite.c
 create mode 100644 include/configs/aspenite.h
MAINTAINERS +1 -0
index 9bf52fa..66f8585 100644
@@ -838,6 +838,7 @@ Matt Waddel <[email protected]>
 
 Prafulla Wadaskar <[email protected]>
 
+	aspenite	ARM926EJS (ARMADA100 88AP168 SoC)
 	mv88f6281gtw_ge	ARM926EJS (Kirkwood SoC)
 	rd6281a		ARM926EJS (Kirkwood SoC)
 	sheevaplug	ARM926EJS (Kirkwood SoC)
MAKEALL +1 -0
index 767d561..e83c9d7 100755
@@ -326,6 +326,7 @@ LIST_ARM9="			\
 	ap926ejs		\
 	ap946es			\
 	ap966			\
+	aspenite		\
 	cp920t			\
 	cp922_XA10		\
 	cp926ejs		\
board/Marvell/aspenite/Makefile new file +52 -0

52 lines not on this page · raw message

board/Marvell/aspenite/aspenite.c new file +53 -0

53 lines not on this page · raw message

boards.cfg +1 -0
index 67b2efd..808454d 100644
@@ -68,6 +68,7 @@ smdk2410                     arm         arm920t     -                   samsung
 netstar                      arm         arm925t
 voiceblue                    arm         arm925t
 omap1510inn                  arm         arm925t     -                   ti
+aspenite                     arm         arm926ejs   -                   Marvell        armada100
 afeb9260                     arm         arm926ejs   -                   -              at91
 at91cap9adk                  arm         arm926ejs   -                   atmel          at91
 meesc                        arm         arm926ejs   -                   esd            at91
include/configs/aspenite.h new file +65 -0

65 lines not on this page · raw message

Signature · 1 line
1.6.0.3
#10 lore raw

PATCH v2 7/7 Armada100: Add Board Support for Marvell Aspenite-DB

Hi Prafulla,

Quoted 264 lines · Prafulla Wadaskar

From: Prafulla WADASKAR <[email protected]>

Aspenite is a Development Board for ASPEN/ARMADA168(88AP168) with
? ? ? ?* Processor upto 1.2GHz
? ? ? ?* Parallel 1Gb x8 DDR2-1066 MHz
? ? ? ?* 16 Mb x16 NOR, 4Gb x8 SLC NAND, footprint for SPI NOR
? ? ? ?* Footprints for eMMC/eSD NAND & MMC x8 card
? ? ? ?* 4-in-1 card reader (xD, MMC/SD/MS Pro), CF True IDE socket
? ? ? ?* SEAF memory board, subset of PISMO2
? ?With Peripherals:
? ? ? ?* 4.3? WVGA 24-bit LCD
? ? ? ?* Audio codecs (AC97 & I2S), TSI
? ? ? ?* VGA camera
? ? ? ?* Video in via 3 RCA jacks, and HDMI type C out
? ? ? ?* Marvell 88W8688 802.11bg/BT module
? ? ? ?* GPS RF IC
? ? ? ?* Dual analog mics & speakers, headset jack, LED, ambient light sensor ? ? ? ?* USB2.0 HS host ?(A), OTG (micro AB)
? ? ? ?* FE PHY, PCIE Mini Card ?slot
? ? ? ?* GPIO, GPIO expander with DIP switches for easier selection UART serial over USB, CIR

This patch adds basic board support with DRAM and UART functionality The patch is tested for boot from DRAM using XDB

---
Change log for v2:
used mv-common.h
defined CONFIG_SYS_NS16550_IER macro in Soc heder file removed config.mk

?MAINTAINERS ? ? ? ? ? ? ? ? ? ? ? | ? ?1 +
?MAKEALL ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?1 +
?board/Marvell/aspenite/Makefile ? | ? 52 +++++++++++++++++++++++++++++
?board/Marvell/aspenite/aspenite.c | ? 53 ++++++++++++++++++++++++++++++
?boards.cfg ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1 +
?include/configs/aspenite.h ? ? ? ?| ? 65 +++++++++++++++++++++++++++++++++++++

?6 files changed, 173 insertions(+), 0 deletions(-) ?create mode 100644 board/Marvell/aspenite/Makefile ?create mode 100644 board/Marvell/aspenite/aspenite.c ?create mode 100644 include/configs/aspenite.h

MAINTAINERS +0 -0
index 9bf52fa..66f8585 100644
@@ -838,6 +838,7 @@ Matt Waddel <[email protected]>
 

?Prafulla Wadaskar <[email protected]>

+ ? ? ? aspenite ? ? ? ?ARM926EJS (ARMADA100 88AP168 SoC) ? ? ? ?mv88f6281gtw_ge ARM926EJS (Kirkwood SoC) ? ? ? ?rd6281a ? ? ? ? ARM926EJS (Kirkwood SoC) ? ? ? ?sheevaplug ? ? ?ARM926EJS (Kirkwood SoC)

MAKEALL +1 -0
index 767d561..e83c9d7 100755
@@ -326,6 +326,7 @@ LIST_ARM9=" ? ? ? ? ? ? ? ? \
 ? ? ? ?ap926ejs ? ? ? ? ? ? ? ?\
 ? ? ? ?ap946es ? ? ? ? ? ? ? ? \
 ? ? ? ?ap966 ? ? ? ? ? ? ? ? ? \
+ ? ? ? aspenite ? ? ? ? ? ? ? ?\
 ? ? ? ?cp920t ? ? ? ? ? ? ? ? ?\
 ? ? ? ?cp922_XA10 ? ? ? ? ? ? ?\
 ? ? ? ?cp926ejs ? ? ? ? ? ? ? ?\
board/Marvell/aspenite/Makefile new file +52 -0
new file mode 100644
index 0000000..cb1b65f
@@ -0,0 +1,52 @@
+#
+# (C) Copyright 2010
+# Marvell Semiconductor <www.marvell.com>
+# Written-by: Prafulla Wadaskar <[email protected]>
+# Contributor: Mahavir Jain <[email protected]>
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB ? ? = $(obj)lib$(BOARD).o
+
+COBJS ?:= aspenite.o
+
+SRCS ? := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS ? := $(addprefix $(obj),$(COBJS))
+SOBJS ?:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB): ? ? ? ?$(obj).depend $(OBJS) $(SOBJS)
+ ? ? ? $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+ ? ? ? rm -f $(SOBJS) $(OBJS)
+
+distclean: ? ? clean
+ ? ? ? rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/Marvell/aspenite/aspenite.c new file +53 -0
new file mode 100644
index 0000000..e7bc3eb
@@ -0,0 +1,53 @@
+/*
+ * (C) Copyright 2010
+ * Marvell Semiconductor <www.marvell.com>
+ * Written-by: Prafulla Wadaskar <[email protected]>
+ * Contributor: Mahavir Jain <[email protected]>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include <common.h>
+#include <mfp.h>
+#include <asm/arch/mfp.h>
+#include <asm/arch/armada100.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f(void)
+{
+ ? ? ? u32 mfp_cfg[] = {
+ ? ? ? ? ? ? ? /* Enable Console on UART1 */
+ ? ? ? ? ? ? ? MFP107_UART1_RXD,
+ ? ? ? ? ? ? ? MFP108_UART1_TXD,
+ ? ? ? ? ? ? ? MFP_EOC ? ? ? ? /*End of configureation*/
+ ? ? ? };
+ ? ? ? /* configure MFP's */
+ ? ? ? mfp_config(mfp_cfg);
+ ? ? ? return 0;
+}
+
+int board_init(void)
+{
+ ? ? ? /* arch number of Board */
+ ? ? ? gd->bd->bi_arch_number = MACH_TYPE_ASPENITE;
+ ? ? ? /* adress of boot parameters */
+ ? ? ? gd->bd->bi_boot_params = armd1_sdram_base(0) + 0x100;
+ ? ? ? return 0;
+}
boards.cfg +0 -0
index 67b2efd..808454d 100644
@@ -68,6 +68,7 @@ smdk2410 ? ? ? ? ? ? ? ? ? ? arm ? ? ? ? arm920t ? ? - ? ? ? ? ? ? ? ? ? samsung

?netstar ? ? ? ? ? ? ? ? ? ? ?arm ? ? ? ? arm925t
?voiceblue ? ? ? ? ? ? ? ? ? ?arm ? ? ? ? arm925t
?omap1510inn ? ? ? ? ? ? ? ? ?arm ? ? ? ? arm925t ? ? - ? ? ? ? ? ? ? ? ? ti +aspenite ? ? ? ? ? ? ? ? ? ? arm ? ? ? ? arm926ejs ? - ? ? ? ? ? ? ? ? ? Marvell ? ? ? ?armada100 ?afeb9260 ? ? ? ? ? ? ? ? ? ? arm ? ? ? ? arm926ejs ? - ? ? ? ? ? ? ? ? ? - ? ? ? ? ? ? ?at91 ?at91cap9adk ? ? ? ? ? ? ? ? ?arm ? ? ? ? arm926ejs ? - ? ? ? ? ? ? ? ? ? atmel ? ? ? ? ?at91 ?meesc ? ? ? ? ? ? ? ? ? ? ? ?arm ? ? ? ? arm926ejs ? - ? ? ? ? ? ? ? ? ? esd ? ? ? ? ? ?at91

include/configs/aspenite.h new file +62 -0
new file mode 100644
index 0000000..8c1823f
@@ -0,0 +1,65 @@
+/*
+ * (C) Copyright 2010
+ * Marvell Semiconductor <www.marvell.com>
+ * Written-by: Prafulla Wadaskar <[email protected]>
+ * Contributor: Mahavir Jain <[email protected]>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef __CONFIG_ASPENITE_H
+#define __CONFIG_ASPENITE_H
+
+/*
+ * Version number information
+ */
+#define CONFIG_IDENT_STRING ? ?"\nMarvell-Aspenite DB"
+
+/*
+ * High Level Configuration Options
+ */
+#define CONFIG_SHEEVA_88SV331xV5 ? ? ? 1 ? ? ? /* CPU Core subversion */
+#define CONFIG_ARMADA100 ? ? ? ? ? ? ? 1 ? ? ? /* SOC Family Name */
+#define CONFIG_ARMADA168 ? ? ? ? ? ? ? 1 ? ? ? /* SOC Used on this Board */
+#define CONFIG_MACH_ASPENITE ? ? ? ? ? ? ? ? ? /* Machine type */
+#define CONFIG_SKIP_LOWLEVEL_INIT ? ? ?/* disable board lowlevel_init */
+
+/*
+ * Commands configuration
+ */
+#define CONFIG_SYS_NO_FLASH ? ? ? ? ? ?/* Declare no flash (NOR/SPI) */
+#include <config_cmd_default.h>
+#define CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
+/*
+ * mv-common.h should be defined after CMD configs since it used them
+ * to enable certain macros
+ */
+#include "mv-common.h"
+
+/*
+ * Environment variables configurations
+ */
+#define CONFIG_ENV_IS_NOWHERE ?1 ? ? ? /* if env in SDRAM */
+#define CONFIG_ENV_SIZE ? ? ? ?0x20000 /* 64k */
+

snip..

Quoted 1 line

+#define DEBUG ?/* Fix it: if removed system hanges after DRAM init */

I think you could need to remove this configure, or the uboot could be brought up with a lot of debug message.

Best regards,
Lei

#11 lore raw

PATCH v2 7/7 Armada100: Add Board Support for Marvell Aspenite-DB

Quoted 10 lines

-----Original Message-----
From: Lei Wen [mailto:adrian.wenl at gmail.com]
Sent: Tuesday, November 30, 2010 3:09 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de; Eric Miao; Manas Saksena; Lei Wen; Yu Tang; Ashish Karkare; Kiran Vedere; Prabhanjan Sarnaik
Subject: Re: [U-Boot] [PATCH v2 7/7] Armada100: Add Board Support for Marvell Aspenite-DB

...snip...

Quoted 10 lines
Quoted 8 lines
include/configs/aspenite.h new file +8 -0
+#include "mv-common.h"
+
+/*
+ * Environment variables configurations
+ */
+#define CONFIG_ENV_IS_NOWHERE ?1 ? ? ? /* if env in SDRAM */
+#define CONFIG_ENV_SIZE ? ? ? ?0x20000 /* 64k */
+

snip..

Quoted 4 lines
Quoted 1 line

+#define DEBUG ?/* Fix it: if removed system hanges after DRAM init */

I think you could need to remove this configure, or the uboot could be brought up with a lot of debug message.

Yes, that is next to be fixed.
But this is basic support and does not have annoying result

Regards..
Prafulla ..

#12 lore raw

PATCH v2 4/7 Serial: ns16550: Add support for CONFIG_SYS_NS16550_IER macro

In reply to Prafulla Wadaskar

Dear Prafulla Wadaskar,

Quoted 5 lines · In message <[email protected]> you wrote:

On some processors this ier register configuration is different for ex. Marvell Armada100

This patch introduce CONFIG_SYS_NS16550_IER macro support to unconditionally initialize this register.

Sorry, but I don't like an implementation detail:

Quoted 21 lines

void NS16550_init (NS16550_t com_port, int baud_divisor) {

drivers/serial/ns16550.c +2 -2
-	serial_out(0x00, &com_port->ier);
+	serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
 	serial_out(0x7, &com_port->mdr1);	/* mode select reset TL16C750*/
 #endif
@@ -52,7 +52,7 @@ void NS16550_init (NS16550_t com_port, int baud_divisor)
 #ifndef CONFIG_NS16550_MIN_FUNCTIONS
 void NS16550_reinit (NS16550_t com_port, int baud_divisor)
 {
-	serial_out(0x00, &com_port->ier);
+	serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
 	serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr);
 	serial_out(0, &com_port->dll);
 	serial_out(0, &com_port->dlm);
include/ns16550.h +0 -0
index 9ea81e9..e9cb449 100644

include/ns16550.h line 38

Quoted 6 lines
include/ns16550.h +3 -0
@@ -33,6 +33,10 @@
 	unsigned char postpad_##x[-CONFIG_SYS_NS16550_REG_SIZE - 1];
 #endif
 
+#ifndef CONFIG_SYS_NS16550_IER
+#define CONFIG_SYS_NS16550_IER	0x00
+#endif /* CONFIG_SYS_NS16550_IER */

As this macro is only used in drivers/serial/ns16550.c, it makes no sense to me to move this to ns16550.h - this makes the code just harder to read. Please move this #ifndef... to drivers/serial/ns16550.c

Also, please add a description of the new CONFIG_ variable to the README file.

Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A fail-safe circuit will destroy others.                 -- Klipstein
#13 lore raw

PATCH v2 4/7 Serial: ns16550: Add support for CONFIG_SYS_NS16550_IER macro

Quoted 48 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Wednesday, December 01, 2010 1:15 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de; Eric Miao; Manas Saksena; Lei Wen; Yu Tang; Ashish Karkare; Kiran Vedere; Prabhanjan Sarnaik
Subject: Re: [U-Boot] [PATCH v2 4/7] Serial: ns16550: Add support for CONFIG_SYS_NS16550_IER macro

Dear Prafulla Wadaskar,

In message <[email protected]> you

Quoted 5 lines · wrote:

On some processors this ier register configuration is different for ex. Marvell Armada100

This patch introduce CONFIG_SYS_NS16550_IER macro support to unconditionally initialize this register.

Sorry, but I don't like an implementation detail:

drivers/serial/ns16550.c void NS16550_init (NS16550_t com_port, int

Quoted 8 lines

void NS16550_init (NS16550_t com_port, int baud_divisor) {

drivers/serial/ns16550.c +1 -1
-	serial_out(0x00, &com_port->ier);
+	serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
 	serial_out(0x7, &com_port->mdr1);	/* mode select reset TL16C750*/
 #endif
@@ -52,7 +52,7 @@ void NS16550_init (NS16550_t com_port, int

baud_divisor)

Quoted 16 lines
drivers/serial/ns16550.c +1 -1
 #ifndef CONFIG_NS16550_MIN_FUNCTIONS
 void NS16550_reinit (NS16550_t com_port, int baud_divisor)
 {
-	serial_out(0x00, &com_port->ier);
+	serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
 	serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr);
 	serial_out(0, &com_port->dll);
 	serial_out(0, &com_port->dlm);
include/ns16550.h +0 -0
index 9ea81e9..e9cb449 100644
@@ -33,6 +33,10 @@
 	unsigned char postpad_##x[-CONFIG_SYS_NS16550_REG_SIZE - 1];
 #endif
 
Quoted 8 lines

include/ns16550.h line 38

Quoted 3 lines
include/ns16550.h +3 -0
+#ifndef CONFIG_SYS_NS16550_IER
+#define CONFIG_SYS_NS16550_IER	0x00
+#endif /* CONFIG_SYS_NS16550_IER */

As this macro is only used in drivers/serial/ns16550.c, it makes no sense to me to move this to ns16550.h - this makes the code just harder to read. Please move this #ifndef... to drivers/serial/ns16550.c

Ack, will be done in v3

Quoted 3 lines

Also, please add a description of the new CONFIG_ variable to the README file.

Ack,

Thanks and regards..
Prafulla . .