Skip to contentSkip to conversation

PXA patches

U-Boot New Marek Vasut 2 participants 26 messages Oct 16, 2010 – Oct 18, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi,

these are the patches I have prepared for u-boot-testing.git/Makefile-cleanup.

#1 lore raw

PATCH 1/21 PXA: pxafb: Fix indent problems

Also change the initializer style

---
 arch/arm/cpu/pxa/pxafb.c |  200 +++++++++++++++++++++++-----------------------
 1 files changed, 100 insertions(+), 100 deletions(-)
arch/arm/cpu/pxa/pxafb.c +100 -100
index 0ee6a75..50e9cc0 100644
@@ -56,26 +56,26 @@
 
 /* 640x480x16 @ 61 Hz */
 vidinfo_t panel_info = {
-	vl_col:		640,
-	vl_row:		480,
-	vl_width:	640,
-	vl_height:	480,
-	vl_clkp:	CONFIG_SYS_HIGH,
-	vl_oep:		CONFIG_SYS_HIGH,
-	vl_hsp:		CONFIG_SYS_HIGH,
-	vl_vsp:		CONFIG_SYS_HIGH,
-	vl_dp:		CONFIG_SYS_HIGH,
-	vl_bpix:	LCD_BPP,
-	vl_lbw:		0,
-	vl_splt:	0,
-	vl_clor:	0,
-	vl_tft:		1,
-	vl_hpw:		40,
-	vl_blw:		56,
-	vl_elw:		56,
-	vl_vpw:		20,
-	vl_bfw:		8,
-	vl_efw:		8,
+	.vl_col		= 640,
+	.vl_row		= 480,
+	.vl_width	= 640,
+	.vl_height	= 480,
+	.vl_clkp	= CONFIG_SYS_HIGH,
+	.vl_oep		= CONFIG_SYS_HIGH,
+	.vl_hsp		= CONFIG_SYS_HIGH,
+	.vl_vsp		= CONFIG_SYS_HIGH,
+	.vl_dp		= CONFIG_SYS_HIGH,
+	.vl_bpix	= LCD_BPP,
+	.vl_lbw		= 0,
+	.vl_splt	= 0,
+	.vl_clor	= 0,
+	.vl_tft		= 1,
+	.vl_hpw		= 40,
+	.vl_blw		= 56,
+	.vl_elw		= 56,
+	.vl_vpw		= 20,
+	.vl_bfw		= 8,
+	.vl_efw		= 8,
 };
 #endif /* CONFIG_PXA_VIDEO */
 
@@ -90,26 +90,26 @@ vidinfo_t panel_info = {
 # define REG_LCCR3	0x0340FF08
 
 vidinfo_t panel_info = {
-	vl_col:		640,
-	vl_row:		480,
-	vl_width:	157,
-	vl_height:	118,
-	vl_clkp:	CONFIG_SYS_HIGH,
-	vl_oep:		CONFIG_SYS_HIGH,
-	vl_hsp:		CONFIG_SYS_HIGH,
-	vl_vsp:		CONFIG_SYS_HIGH,
-	vl_dp:		CONFIG_SYS_HIGH,
-	vl_bpix:	LCD_BPP,
-	vl_lbw:		0,
-	vl_splt:	1,
-	vl_clor:	1,
-	vl_tft:		0,
-	vl_hpw:		1,
-	vl_blw:		3,
-	vl_elw:		3,
-	vl_vpw:		1,
-	vl_bfw:		0,
-	vl_efw:		0,
+	.vl_col		= 640,
+	.vl_row		= 480,
+	.vl_width	= 157,
+	.vl_height	= 118,
+	.vl_clkp	= CONFIG_SYS_HIGH,
+	.vl_oep		= CONFIG_SYS_HIGH,
+	.vl_hsp		= CONFIG_SYS_HIGH,
+	.vl_vsp		= CONFIG_SYS_HIGH,
+	.vl_dp		= CONFIG_SYS_HIGH,
+	.vl_bpix	= LCD_BPP,
+	.vl_lbw		= 0,
+	.vl_splt	= 1,
+	.vl_clor	= 1,
+	.vl_tft		= 0,
+	.vl_hpw		= 1,
+	.vl_blw		= 3,
+	.vl_elw		= 3,
+	.vl_vpw		= 1,
+	.vl_bfw		= 0,
+	.vl_efw		= 0,
 };
 #endif /* CONFIG_SHARP_LM8V31 */
 /*----------------------------------------------------------------------*/
@@ -123,26 +123,26 @@ vidinfo_t panel_info = {
 # define REG_LCCR3	0x0340FF08
 
 vidinfo_t panel_info = {
-	vl_col:		640,
-	vl_row:		480,
-	vl_width:	157,
-	vl_height:	118,
-	vl_clkp:	CONFIG_SYS_HIGH,
-	vl_oep:		CONFIG_SYS_HIGH,
-	vl_hsp:		CONFIG_SYS_HIGH,
-	vl_vsp:		CONFIG_SYS_HIGH,
-	vl_dp:		CONFIG_SYS_HIGH,
-	vl_bpix:	LCD_BPP,
-	vl_lbw:		0,
-	vl_splt:	1,
-	vl_clor:	1,
-	vl_tft:		1,
-	vl_hpw:		32,
-	vl_blw:		144,
-	vl_elw:		32,
-	vl_vpw:		2,
-	vl_bfw:		13,
-	vl_efw:		30,
+	.vl_col		= 640,
+	.vl_row		= 480,
+	.vl_width	= 157,
+	.vl_height	= 118,
+	.vl_clkp	= CONFIG_SYS_HIGH,
+	.vl_oep		= CONFIG_SYS_HIGH,
+	.vl_hsp		= CONFIG_SYS_HIGH,
+	.vl_vsp		= CONFIG_SYS_HIGH,
+	.vl_dp		= CONFIG_SYS_HIGH,
+	.vl_bpix	= LCD_BPP,
+	.vl_lbw		= 0,
+	.vl_splt	= 1,
+	.vl_clor	= 1,
+	.vl_tft		= 1,
+	.vl_hpw		= 32,
+	.vl_blw		= 144,
+	.vl_elw		= 32,
+	.vl_vpw		= 2,
+	.vl_bfw		= 13,
+	.vl_efw		= 30,
 };
 #endif /* CONFIG_VOIPAC_LCD */
 
@@ -156,26 +156,26 @@ vidinfo_t panel_info = {
 #define REG_LCCR3	0x0340FF20
 
 vidinfo_t panel_info = {
-	vl_col:		320,
-	vl_row:		240,
-	vl_width:	167,
-	vl_height:	109,
-	vl_clkp:	CONFIG_SYS_HIGH,
-	vl_oep:		CONFIG_SYS_HIGH,
-	vl_hsp:		CONFIG_SYS_HIGH,
-	vl_vsp:		CONFIG_SYS_HIGH,
-	vl_dp:		CONFIG_SYS_HIGH,
-	vl_bpix:	LCD_BPP,
-	vl_lbw:		1,
-	vl_splt:	0,
-	vl_clor:	1,
-	vl_tft:		0,
-	vl_hpw:		1,
-	vl_blw:		1,
-	vl_elw:		1,
-	vl_vpw:		7,
-	vl_bfw:		0,
-	vl_efw:		0,
+	.vl_col		= 320,
+	.vl_row		= 240,
+	.vl_width	= 167,
+	.vl_height	= 109,
+	.vl_clkp	= CONFIG_SYS_HIGH,
+	.vl_oep		= CONFIG_SYS_HIGH,
+	.vl_hsp		= CONFIG_SYS_HIGH,
+	.vl_vsp		= CONFIG_SYS_HIGH,
+	.vl_dp		= CONFIG_SYS_HIGH,
+	.vl_bpix	= LCD_BPP,
+	.vl_lbw		= 1,
+	.vl_splt	= 0,
+	.vl_clor	= 1,
+	.vl_tft		= 0,
+	.vl_hpw		= 1,
+	.vl_blw		= 1,
+	.vl_elw		= 1,
+	.vl_vpw		= 7,
+	.vl_bfw		= 0,
+	.vl_efw		= 0,
 };
 #endif /* CONFIG_HITACHI_SX14 */
 
@@ -190,26 +190,26 @@ vidinfo_t panel_info = {
 # define REG_LCCR3	0x03b00009
 
 vidinfo_t panel_info = {
-	vl_col:		240,
-	vl_row:		320,
-	vl_width:	240,
-	vl_height:	320,
-	vl_clkp:	CONFIG_SYS_HIGH,
-	vl_oep:		CONFIG_SYS_LOW,
-	vl_hsp:		CONFIG_SYS_LOW,
-	vl_vsp:		CONFIG_SYS_LOW,
-	vl_dp:		CONFIG_SYS_HIGH,
-	vl_bpix:	LCD_BPP,
-	vl_lbw:		0,
-	vl_splt:	1,
-	vl_clor:	1,
-	vl_tft:		1,
-	vl_hpw:		4,
-	vl_blw:		4,
-	vl_elw:		8,
-	vl_vpw:		4,
-	vl_bfw:		4,
-	vl_efw:		8,
+	.vl_col		= 240,
+	.vl_row		= 320,
+	.vl_width	= 240,
+	.vl_height	= 320,
+	.vl_clkp	= CONFIG_SYS_HIGH,
+	.vl_oep		= CONFIG_SYS_LOW,
+	.vl_hsp		= CONFIG_SYS_LOW,
+	.vl_vsp		= CONFIG_SYS_LOW,
+	.vl_dp		= CONFIG_SYS_HIGH,
+	.vl_bpix	= LCD_BPP,
+	.vl_lbw		= 0,
+	.vl_splt	= 1,
+	.vl_clor	= 1,
+	.vl_tft		= 1,
+	.vl_hpw		= 4,
+	.vl_blw		= 4,
+	.vl_elw		= 8,
+	.vl_vpw		= 4,
+	.vl_bfw		= 4,
+	.vl_efw		= 8,
 };
 #endif /* CONFIG_LMS283GF05 */
 
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/21 PXA: pxa-regs.h cleanup

In reply to Marek Vasut
---
 arch/arm/cpu/pxa/cpu.c                   |   28 +-
 arch/arm/cpu/pxa/i2c.c                   |   69 +-
 arch/arm/cpu/pxa/pxafb.c                 |   64 +-
 arch/arm/cpu/pxa/timer.c                 |    7 +-
 arch/arm/cpu/pxa/usb.c                   |   61 +-
 arch/arm/include/asm/arch-pxa/hardware.h |   61 +-
 arch/arm/include/asm/arch-pxa/pxa-regs.h | 2688 ++++++++++++++++--------------
 board/colibri_pxa270/colibri_pxa270.c    |   33 +-
 board/cradle/cradle.c                    |    5 +-
 board/cradle/lowlevel_init.S             |    4 +-
 board/csb226/csb226.c                    |   13 +-
 board/delta/delta.c                      |   37 +-
 board/delta/nand.c                       |  110 +-
 board/innokom/innokom.c                  |   14 +-
 board/pxa255_idp/pxa_idp.c               |   27 +-
 board/trizepsiv/conxs.c                  |   33 +-
 board/vpac270/vpac270.c                  |   37 +-
 board/wepep250/wepep250.c                |   11 +-
 board/zipitz2/zipitz2.c                  |   33 +-
 board/zylonite/nand.c                    |  110 +-
 drivers/mmc/pxa_mmc.c                    |   98 +-
 drivers/serial/serial_pxa.c              |   94 +-
 include/configs/cradle.h                 |    2 -
 include/configs/delta.h                  |    1 +
 include/configs/zylonite.h               |    1 +
 25 files changed, 1911 insertions(+), 1730 deletions(-)
arch/arm/cpu/pxa/cpu.c +17 -11
index 800d120..330d013 100644
@@ -30,10 +30,11 @@
  * CPU specific code
  */
 
-#include <common.h>
-#include <command.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/io.h>
 #include <asm/system.h>
+#include <command.h>
+#include <common.h>
 
 static void cache_flush(void);
 
@@ -71,17 +72,22 @@ void set_GPIO_mode(int gpio_mode)
 {
 	int gpio = gpio_mode & GPIO_MD_MASK_NR;
 	int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
-	int gafr;
+	int val;
+
+	/* This below changes direction setting of GPIO "gpio" */
+	val = readl(GPDR(gpio));
 
 	if (gpio_mode & GPIO_MD_MASK_DIR)
-	{
-		GPDR(gpio) |= GPIO_bit(gpio);
-	}
+		val |= GPIO_bit(gpio);
 	else
-	{
-		GPDR(gpio) &= ~GPIO_bit(gpio);
-	}
-	gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
-	GAFR(gpio) = gafr |  (fn  << (((gpio) & 0xf)*2));
+		val &= ~GPIO_bit(gpio);
+
+	writel(val, GPDR(gpio));
+
+	/* This below updates only AF of GPIO "gpio" */
+	val = readl(GAFR(gpio));
+	val &= ~(0x3 << (((gpio) & 0xf) * 2));
+	val |= fn << (((gpio) & 0xf) * 2);
+	writel(val, GAFR(gpio));
 }
 #endif /* CONFIG_CPU_MONAHANS */
arch/arm/cpu/pxa/i2c.c +40 -29

110 lines not on this page · raw message

arch/arm/cpu/pxa/pxafb.c +35 -29

105 lines not on this page · raw message

arch/arm/cpu/pxa/timer.c +4 -3
index 8d0f826..ec950c7 100644
@@ -26,8 +26,9 @@
  * MA 02111-1307 USA
  */
 
-#include <common.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/io.h>
+#include <common.h>
 #include <div64.h>
 
 #ifdef CONFIG_USE_IRQ
@@ -86,7 +87,7 @@ void __udelay (unsigned long usec)
 
 void reset_timer_masked (void)
 {
-	OSCR = 0;
+	writel(0, OSCR);
 }
 
 ulong get_timer_masked (void)
@@ -113,7 +114,7 @@ void udelay_masked (unsigned long usec)
  */
 unsigned long long get_ticks(void)
 {
-	return OSCR;
+	return readl(OSCR);
 }
 
 /*
arch/arm/cpu/pxa/usb.c +27 -34

113 lines not on this page · raw message

arch/arm/include/asm/arch-pxa/hardware.h +13 -48

73 lines not on this page · raw message

arch/arm/include/asm/arch-pxa/pxa-regs.h +1425 -1263

2,529 lines not on this page · raw message

board/colibri_pxa270/colibri_pxa270.c +18 -15
index 84ec38e..8aa7067 100644

Lines of this file are not shown. View the raw message.

board/cradle/cradle.c +3 -2
index 21eb655..c4a93f9 100644

Lines of this file are not shown. View the raw message.

board/cradle/lowlevel_init.S +2 -2
index 6b5cfb9..39964b6 100644

Lines of this file are not shown. View the raw message.

board/csb226/csb226.c +7 -6
index 0a6c13d..6eed9ad 100644

Lines of this file are not shown. View the raw message.

board/delta/delta.c +19 -18
index 68c39d2..df23076 100644

Lines of this file are not shown. View the raw message.

board/delta/nand.c +57 -53

110 lines not on this page · raw message

board/innokom/innokom.c +8 -6
index 3412f10..2c51125 100644

Lines of this file are not shown. View the raw message.

board/pxa255_idp/pxa_idp.c +14 -13
index a54a95d..4ab8bd4 100644

Lines of this file are not shown. View the raw message.

board/trizepsiv/conxs.c +18 -15
index 8c11456..7fac73d 100644

Lines of this file are not shown. View the raw message.

board/vpac270/vpac270.c +21 -16
index 18e47e2..f792298 100644

Lines of this file are not shown. View the raw message.

board/wepep250/wepep250.c +6 -5
index fe4b6a9..6e41ea6 100644

Lines of this file are not shown. View the raw message.

board/zipitz2/zipitz2.c +17 -16
index 14d1d76..f7edc4c 100644

Lines of this file are not shown. View the raw message.

board/zylonite/nand.c +57 -53

110 lines not on this page · raw message

drivers/mmc/pxa_mmc.c +52 -46

98 lines not on this page · raw message

drivers/serial/serial_pxa.c +49 -45

94 lines not on this page · raw message

include/configs/cradle.h +0 -2
index 200b61e..998e179 100644

Lines of this file are not shown. View the raw message.

include/configs/delta.h +1 -0
index 9c46c5b..d930fb4 100644

Lines of this file are not shown. View the raw message.

include/configs/zylonite.h +1 -0
index d0fc138..c8aa046 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.1

Part of the diff is not shown here. View the raw message.

#3 lore raw

PATCH 3/21 PXA: pxafb: Add ACX517AKN support

In reply to Marek Vasut

ACX517AKN LCD panel is found in Palm Tungsten|C

---
 arch/arm/cpu/pxa/pxafb.c |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)
arch/arm/cpu/pxa/pxafb.c +34 -0
index cb004b2..d698395 100644
@@ -216,6 +216,40 @@ vidinfo_t panel_info = {
 
 /*----------------------------------------------------------------------*/
 
+#ifdef CONFIG_ACX517AKN
+
+# define LCD_BPP	LCD_COLOR8
+
+/* you have to set lccr0 and lccr3 (including pcd) */
+# define REG_LCCR0	0x003008f9
+# define REG_LCCR3	0x03700006
+
+vidinfo_t panel_info = {
+	.vl_col		= 320,
+	.vl_row		= 320,
+	.vl_width	= 320,
+	.vl_height	= 320,
+	.vl_clkp	= CONFIG_SYS_HIGH,
+	.vl_oep		= CONFIG_SYS_LOW,
+	.vl_hsp		= CONFIG_SYS_LOW,
+	.vl_vsp		= CONFIG_SYS_LOW,
+	.vl_dp		= CONFIG_SYS_HIGH,
+	.vl_bpix	= LCD_BPP,
+	.vl_lbw		= 0,
+	.vl_splt	= 1,
+	.vl_clor	= 1,
+	.vl_tft		= 1,
+	.vl_hpw		= 0x04,
+	.vl_blw		= 0x1c,
+	.vl_elw		= 0x08,
+	.vl_vpw		= 0x01,
+	.vl_bfw		= 0x07,
+	.vl_efw		= 0x08,
+};
+#endif /* CONFIG_ACX517AKN */
+
+/*----------------------------------------------------------------------*/
+
 #if LCD_BPP == LCD_COLOR8
 void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue);
 #endif
Signature · 1 line
1.7.1
#4 lore raw

PATCH 4/21 PXA: pxafb: Add support for Sharp LQ038J7DH53

In reply to Marek Vasut

This LCD panel is found in Palm LifeDrive handheld

---
 arch/arm/cpu/pxa/pxafb.c |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)
arch/arm/cpu/pxa/pxafb.c +34 -0
index d698395..2f0f707 100644
@@ -250,6 +250,40 @@ vidinfo_t panel_info = {
 
 /*----------------------------------------------------------------------*/
 
+#ifdef CONFIG_LQ038J7DH53
+
+# define LCD_BPP	LCD_COLOR8
+
+/* you have to set lccr0 and lccr3 (including pcd) */
+# define REG_LCCR0	0x003008f9
+# define REG_LCCR3	0x03700004
+
+vidinfo_t panel_info = {
+	.vl_col		= 320,
+	.vl_row		= 480,
+	.vl_width	= 320,
+	.vl_height	= 480,
+	.vl_clkp	= CONFIG_SYS_HIGH,
+	.vl_oep		= CONFIG_SYS_LOW,
+	.vl_hsp		= CONFIG_SYS_LOW,
+	.vl_vsp		= CONFIG_SYS_LOW,
+	.vl_dp		= CONFIG_SYS_HIGH,
+	.vl_bpix	= LCD_BPP,
+	.vl_lbw		= 0,
+	.vl_splt	= 1,
+	.vl_clor	= 1,
+	.vl_tft		= 1,
+	.vl_hpw		= 0x04,
+	.vl_blw		= 0x20,
+	.vl_elw		= 0x01,
+	.vl_vpw		= 0x01,
+	.vl_bfw		= 0x04,
+	.vl_efw		= 0x01,
+};
+#endif /* CONFIG_ACX517AKN */
+
+/*----------------------------------------------------------------------*/
+
 #if LCD_BPP == LCD_COLOR8
 void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue);
 #endif
Signature · 1 line
1.7.1
#5 lore raw

PATCH 5/21 PXA: pxafb: Marvell Littleton LCD definition

In reply to Marek Vasut
---
 arch/arm/cpu/pxa/pxafb.c |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)
arch/arm/cpu/pxa/pxafb.c +33 -0
index 2f0f707..987fa06 100644
@@ -284,6 +284,39 @@ vidinfo_t panel_info = {
 
 /*----------------------------------------------------------------------*/
 
+#ifdef CONFIG_LITTLETON_LCD
+# define LCD_BPP	LCD_COLOR8
+
+/* you have to set lccr0 and lccr3 (including pcd) */
+# define REG_LCCR0	0x003008f8
+# define REG_LCCR3	0x0300FF04
+
+vidinfo_t panel_info = {
+	.vl_col		= 480,
+	.vl_row		= 640,
+	.vl_width	= 480,
+	.vl_height	= 640,
+	.vl_clkp	= CONFIG_SYS_HIGH,
+	.vl_oep		= CONFIG_SYS_HIGH,
+	.vl_hsp		= CONFIG_SYS_HIGH,
+	.vl_vsp		= CONFIG_SYS_HIGH,
+	.vl_dp		= CONFIG_SYS_HIGH,
+	.vl_bpix	= LCD_BPP,
+	.vl_lbw		= 0,
+	.vl_splt	= 0,
+	.vl_clor	= 0,
+	.vl_tft		= 1,
+	.vl_hpw		= 9,
+	.vl_blw		= 8,
+	.vl_elw		= 24,
+	.vl_vpw		= 2,
+	.vl_bfw		= 2,
+	.vl_efw		= 4,
+};
+#endif /* CONFIG_LITTLETON_LCD */
+
+/*----------------------------------------------------------------------*/
+
 #if LCD_BPP == LCD_COLOR8
 void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue);
 #endif
Signature · 1 line
1.7.1
#6 lore raw

PATCH 6/21 common: Enable serial for PXA250

In reply to Marek Vasut
---
 common/serial.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/serial.c +1 -1
index 7bebc12..c3323ea 100644
@@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR;
 static struct serial_device *serial_devices = NULL;
 static struct serial_device *serial_current = NULL;
 
-#if !defined(CONFIG_LWMON) && !defined(CONFIG_PXA27X)
+#if !defined(CONFIG_LWMON) && !defined(CONFIG_PXA250) && !defined(CONFIG_PXA27X)
 struct serial_device *__default_serial_console (void)
 {
 #if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2)
Signature · 1 line
1.7.1
#7 lore raw

PATCH 6/21 common: Enable serial for PXA250

Dear Marek Vasut,

Quoted 10 lines · In message <[email protected]> you wrote:
---
 common/serial.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/serial.c +0 -0
index 7bebc12..c3323ea 100644

common/serial.c DECLARE_GLOBAL_DATA_PTR; · line 36

Quoted 8 lines
common/serial.c +1 -1
@@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR;
 static struct serial_device *serial_devices = NULL;
 static struct serial_device *serial_current = NULL;
 
-#if !defined(CONFIG_LWMON) && !defined(CONFIG_PXA27X)
+#if !defined(CONFIG_LWMON) && !defined(CONFIG_PXA250) && !defined(CONFIG_PXA27X)
 struct serial_device *__default_serial_console (void)
 {
 #if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2)

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
There's an old proverb that says just about whatever you want it to.
#8 lore raw

PATCH 7/21 PXA: Palm Tungsten|C Support

In reply to Marek Vasut

This patch adds support for the Palm Tungsten|C PXA255 board. The support includes:
- LCD
- MMC
- UART
- NOR

---
 MAINTAINERS                  |    4 +
 board/palmtc/Makefile        |   49 +++++++++
 board/palmtc/config.mk       |    1 +
 board/palmtc/lowlevel_init.S |   39 +++++++
 board/palmtc/palmtc.c        |   59 ++++++++++
 board/palmtc/u-boot.lds      |   56 ++++++++++
 boards.cfg                   |    1 +
 include/configs/palmtc.h     |  245 ++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 454 insertions(+), 0 deletions(-)
 create mode 100644 board/palmtc/Makefile
 create mode 100644 board/palmtc/config.mk
 create mode 100644 board/palmtc/lowlevel_init.S
 create mode 100644 board/palmtc/palmtc.c
 create mode 100644 board/palmtc/u-boot.lds
 create mode 100644 include/configs/palmtc.h
MAINTAINERS +4 -0
index e003226..a7ee984 100644
@@ -795,6 +795,10 @@ Greg Ungerer <[email protected]>
 	cm4116		ks8695p
 	cm4148		ks8695p
 
+Marek Vasut <[email protected]>
+
+	palmtc		xscale
+
 Hugo Villeneuve <[email protected]>
 
 	SFFSDR		ARM926EJS
board/palmtc/Makefile new file +49 -0

49 lines not on this page · raw message

board/palmtc/config.mk new file +1 -0
new file mode 100644
index 0000000..1d650ac
@@ -0,0 +1 @@
+TEXT_BASE = 0xa1000000
board/palmtc/lowlevel_init.S new file +39 -0
new file mode 100644
index 0000000..74050dc
@@ -0,0 +1,39 @@
+/*
+ * Palm Tungsten|C Lowlevel Hardware Initialization
+ *
+ * Copyright (C) 2010 Marek Vasut <[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., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <config.h>
+#include <version.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/macro.h>
+
+.globl lowlevel_init
+lowlevel_init:
+	pxa_gpio_setup
+	pxa_wait_ticks	0x8000
+	pxa_mem_setup
+	pxa_wakeup
+	pxa_intr_setup
+	pxa_clock_setup
+
+	mov	pc, lr
board/palmtc/palmtc.c new file +59 -0

59 lines not on this page · raw message

board/palmtc/u-boot.lds new file +56 -0

56 lines not on this page · raw message

boards.cfg +1 -0
index 9207254..60d8d0f 100644
@@ -58,6 +58,7 @@ csb226		arm	pxa
 delta		arm	pxa
 innokom		arm	pxa
 lubbock		arm	pxa
+palmtc		arm	pxa
 pleb2		arm	pxa
 xaeniax		arm	pxa
 xm250		arm	pxa
include/configs/palmtc.h new file +245 -0

245 lines not on this page · raw message

Signature · 1 line
1.7.1
#9 lore raw

PATCH 8/21 PXA: Add initial Palm LifeDrive support

In reply to Marek Vasut
---
 MAINTAINERS                  |    1 +
 board/palmld/Makefile        |   49 ++++++++
 board/palmld/config.mk       |    1 +
 board/palmld/lowlevel_init.S |   45 +++++++
 board/palmld/palmld.c        |   69 +++++++++++
 board/palmld/u-boot.lds      |   56 +++++++++
 boards.cfg                   |    1 +
 include/configs/palmld.h     |  273 ++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 495 insertions(+), 0 deletions(-)
 create mode 100644 board/palmld/Makefile
 create mode 100644 board/palmld/config.mk
 create mode 100644 board/palmld/lowlevel_init.S
 create mode 100644 board/palmld/palmld.c
 create mode 100644 board/palmld/u-boot.lds
 create mode 100644 include/configs/palmld.h
MAINTAINERS +1 -0
index a7ee984..6571139 100644
@@ -797,6 +797,7 @@ Greg Ungerer <[email protected]>
 
 Marek Vasut <[email protected]>
 
+	palmld		xscale
 	palmtc		xscale
 
 Hugo Villeneuve <[email protected]>
board/palmld/Makefile new file +49 -0

49 lines not on this page · raw message

board/palmld/config.mk new file +1 -0
new file mode 100644
index 0000000..1d650ac
@@ -0,0 +1 @@
+TEXT_BASE = 0xa1000000
board/palmld/lowlevel_init.S new file +45 -0

45 lines not on this page · raw message

board/palmld/palmld.c new file +69 -0

69 lines not on this page · raw message

board/palmld/u-boot.lds new file +56 -0

56 lines not on this page · raw message

boards.cfg +1 -0
index 60d8d0f..fc4083e 100644
@@ -58,6 +58,7 @@ csb226		arm	pxa
 delta		arm	pxa
 innokom		arm	pxa
 lubbock		arm	pxa
+palmld		arm	pxa
 palmtc		arm	pxa
 pleb2		arm	pxa
 xaeniax		arm	pxa
include/configs/palmld.h new file +273 -0

273 lines not on this page · raw message

Signature · 1 line
1.7.1
#10 lore raw

PATCH 9/21 PXA: Voipac270 improvements

In reply to Marek Vasut

128MB NOR module support.
Define __io to get harddrive working. Fix saving of environment into OneNAND. Boot from harddrive when possible. Add missing MAINTAINERS entry.

---
 MAINTAINERS                   |    1 +
 MAKEALL                       |    3 +-
 Makefile                      |    7 ++-
 board/vpac270/Makefile        |    7 +--
 board/vpac270/lowlevel_init.S |    1 -
 board/vpac270/vpac270.c       |   44 ++++++-----------
 include/configs/vpac270.h     |  106 +++++++++++++++++++++++-----------------
 7 files changed, 88 insertions(+), 81 deletions(-)
MAINTAINERS +1 -0
index 6571139..f7e2027 100644
@@ -799,6 +799,7 @@ Marek Vasut <[email protected]>
 
 	palmld		xscale
 	palmtc		xscale
+	vpac270		xscale
 
 Hugo Villeneuve <[email protected]>
 
MAKEALL +2 -1
index 1b506d6..9dd3636 100755
@@ -546,7 +546,8 @@ LIST_at91="			\
 LIST_pxa="$(boards_by_cpu pxa)
 	polaris		\
 	trizepsiv	\
-	vpac270_nor	\
+	vpac270_nor_128M\
+	vpac270_nor_256M\
 	vpac270_onenand	\
 "
 
Makefile +6 -1
index 000ad56..0d2d34a 100644
@@ -1020,13 +1020,18 @@ trizepsiv_config	:	unconfig
 	fi;
 	@$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv
 
-vpac270_nor_config \
+vpac270_nor_256M_config \
+vpac270_nor_128M_config \
 vpac270_onenand_config	: unconfig
 	@mkdir -p $(obj)include
 	@if [ "$(findstring onenand,$@)" ] ; then \
 		echo "#define CONFIG_ONENAND_U_BOOT" \
 			>>$(obj)include/config.h ; \
 	fi;
+	@if [ "$(findstring 256M,$@)" ] ; then \
+		echo "#define CONFIG_256M_U_BOOT" \
+			>>$(obj)include/config.h ; \
+	fi;
 	@$(MKCONFIG) -n $@ -a vpac270 arm pxa vpac270
 
 #########################################################################
board/vpac270/Makefile +2 -5
index c6f4c7c..f5014fc 100644
@@ -1,10 +1,7 @@
-
 #
-# (C) Copyright 2000
-# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+# Voipac PXA270 Support
 #
-# See file CREDITS for list of people who contributed to this
-# project.
+# Copyright (C) 2010 Marek Vasut <[email protected]>
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
board/vpac270/lowlevel_init.S +0 -1
index ec0d12c..c40d12f 100644
@@ -3,7 +3,6 @@
  *
  * Copyright (C) 2010 Marek Vasut <[email protected]>
  *
- *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
board/vpac270/vpac270.c +16 -28

81 lines not on this page · raw message

include/configs/vpac270.h +61 -45

244 lines not on this page · raw message

Signature · 1 line
1.7.1
#11 lore raw

PATCH 9/21 PXA: Voipac270 improvements

Dear Marek Vasut,

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

128MB NOR module support.
Define __io to get harddrive working. Fix saving of environment into OneNAND. Boot from harddrive when possible. Add missing MAINTAINERS entry.

...

Quoted 12 lines
Makefile +2 -1
index 000ad56..0d2d34a 100644
@@ -1020,13 +1020,18 @@ trizepsiv_config	:	unconfig
 	fi;
 	@$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv
 
-vpac270_nor_config \
+vpac270_nor_256M_config \
+vpac270_nor_128M_config \
 vpac270_onenand_config	: unconfig

Makefile trizepsiv_config : unconfig · line 1035

Quoted 10 lines
Makefile +4 -0
 	@mkdir -p $(obj)include
 	@if [ "$(findstring onenand,$@)" ] ; then \
 		echo "#define CONFIG_ONENAND_U_BOOT" \
 			>>$(obj)include/config.h ; \
 	fi;
+	@if [ "$(findstring 256M,$@)" ] ; then \
+		echo "#define CONFIG_256M_U_BOOT" \
+			>>$(obj)include/config.h ; \
+	fi;
 	@$(MKCONFIG) -n $@ -a vpac270 arm pxa vpac270

As discussed before: please don't. Use the new options column in boards.cfg that was added for this very purpose by your own patch.

While doing that, you might want to rebase (as discussed in private communication) against the Makefile-cleanup branch. Basicly this means:

- Rename "TEXT_BASE" into "CONFIG_SYS_TEXT_BASE"
- Move the definition of CONFIG_SYS_TEXT_BASE from board/*/config.mk to include/configs/*.h
- Remove the (now empty) board/*/config.mk files.

[Note: this applies to the other patches as well.]

Best regards,

Wolfgang Denk

Signature · 5 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
"No problem is so formidable that you can't walk away from it."
- C. Schulz
#12 lore raw

PATCH 10/21 PXA: Balloon3 board support

In reply to Marek Vasut

The following hardware is currently supported:
- UART
- USB Host
- FPGA

---
 MAINTAINERS                    |    1 +
 board/balloon3/Makefile        |   49 +++++++
 board/balloon3/balloon3.c      |  228 ++++++++++++++++++++++++++++++++++
 board/balloon3/config.mk       |    1 +
 board/balloon3/lowlevel_init.S |   36 ++++++
 board/balloon3/u-boot.lds      |   55 ++++++++
 boards.cfg                     |    1 +
 include/configs/balloon3.h     |  269 ++++++++++++++++++++++++++++++++++++++++
 8 files changed, 640 insertions(+), 0 deletions(-)
 create mode 100644 board/balloon3/Makefile
 create mode 100644 board/balloon3/balloon3.c
 create mode 100644 board/balloon3/config.mk
 create mode 100644 board/balloon3/lowlevel_init.S
 create mode 100644 board/balloon3/u-boot.lds
 create mode 100644 include/configs/balloon3.h
MAINTAINERS +1 -0
index f7e2027..7aa4e4b 100644
@@ -797,6 +797,7 @@ Greg Ungerer <[email protected]>
 
 Marek Vasut <[email protected]>
 
+	balloon3	xscale
 	palmld		xscale
 	palmtc		xscale
 	vpac270		xscale
board/balloon3/Makefile new file +49 -0

49 lines not on this page · raw message

board/balloon3/balloon3.c new file +228 -0

228 lines not on this page · raw message

board/balloon3/config.mk new file +1 -0
new file mode 100644
index 0000000..1d650ac
@@ -0,0 +1 @@
+TEXT_BASE = 0xa1000000
board/balloon3/lowlevel_init.S new file +36 -0
new file mode 100644
index 0000000..d7b5be6
@@ -0,0 +1,36 @@
+/*
+ * Balloon3 Lowlevel Hardware Initialization
+ *
+ * Copyright (C) 2010 Marek Vasut <[email protected]>
+ *
+ * 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 <config.h>
+#include <version.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/macro.h>
+
+.globl lowlevel_init
+lowlevel_init:
+	pxa_gpio_setup
+	pxa_wait_ticks	0x8000
+	pxa_mem_setup
+	pxa_wakeup
+	pxa_intr_setup
+	pxa_clock_setup
+
+	mov	pc, lr
board/balloon3/u-boot.lds new file +55 -0

55 lines not on this page · raw message

boards.cfg +1 -0
index fc4083e..8d97117 100644
@@ -52,6 +52,7 @@ actux2		arm	ixp
 actux3		arm	ixp
 actux4		arm	ixp
 ixdp425		arm	ixp
+balloon3	arm	pxa
 cerf250		arm	pxa
 cradle		arm	pxa
 csb226		arm	pxa
include/configs/balloon3.h new file +269 -0

269 lines not on this page · raw message

Signature · 1 line
1.7.1
#13 lore raw

PATCH 11/21 PXA: Add missing MAINTAINERS entries

In reply to Marek Vasut
---
 MAINTAINERS |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
MAINTAINERS +2 -0
index 7aa4e4b..a003dda 100644
@@ -798,9 +798,11 @@ Greg Ungerer <[email protected]>
 Marek Vasut <[email protected]>
 
 	balloon3	xscale
+	colibri_pxa270	xscale
 	palmld		xscale
 	palmtc		xscale
 	vpac270		xscale
+	zipitz2		xscale
 
 Hugo Villeneuve <[email protected]>
 
Signature · 1 line
1.7.1
#14 lore raw

PATCH 12/21 PXA: remove unused u-boot.lds from board/vpac270

In reply to Marek Vasut

From: Mikhail Kshevetskiy <[email protected]>

This file is not used, automatically generated u-boot.lds is used instead

---
 board/vpac270/u-boot.lds |   55 ----------------------------------------------
 1 files changed, 0 insertions(+), 55 deletions(-)
 delete mode 100644 board/vpac270/u-boot.lds
board/vpac270/u-boot.lds deleted +0 -55
deleted file mode 100644
index 58c371d..0000000
@@ -1,55 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
- *
- * 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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-	. = 0x00000000;
-
-	. = ALIGN(4);
-	.text      :
-	{
-	  cpu/pxa/start.o	(.text)
-	  *(.text)
-	}
-
-	. = ALIGN(4);
-	.rodata : { *(.rodata) }
-
-	. = ALIGN(4);
-	.data : { *(.data) }
-
-	. = ALIGN(4);
-	.got : { *(.got) }
-
-	__u_boot_cmd_start = .;
-	.u_boot_cmd : { *(.u_boot_cmd) }
-	__u_boot_cmd_end = .;
-
-	. = ALIGN(4);
-	__bss_start = .;
-	.bss : { *(.bss) }
-	_end = .;
-}
Signature · 1 line
1.7.1
#15 lore raw

PATCH 13/21 PXA: cleanup vpac270 config and set CONFIG_SYS_HZ to 1000

In reply to Marek Vasut

From: Mikhail Kshevetskiy <[email protected]>

* CONFIG_SYS_CLKS_IN_HZ is not used anywhere, so removing it
* CONFIG_SYS_HZ is set to 1000 on most architectures, so it seems to be the safe default

---
 include/configs/vpac270.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
include/configs/vpac270.h +1 -2
index 694a8f9..4c18d3a 100644
@@ -146,8 +146,7 @@
 /*
  * Clock Configuration
  */
-#undef	CONFIG_SYS_CLKS_IN_HZ
-#define	CONFIG_SYS_HZ			3250000		/* Timer @ 3250000 Hz */
+#define	CONFIG_SYS_HZ			1000		/* Timer @ 3250000 Hz */
 #define	CONFIG_SYS_CPUSPEED		0x190		/* 312MHz */
 
 /*
Signature · 1 line
1.7.1
#16 lore raw

PATCH 14/21 PXA: fix environment sector size, kernel and environment location for vpac270

In reply to Marek Vasut

From: Mikhail Kshevetskiy <[email protected]>

Define ENV_ADDR as MONITOR_BASE + MONITOR_LEN. Fix environment sector size (NOR: 32Kb for first four sectors and 128Kb for other; OneNAND: 128Kb).

Last but not least: we have MONITOR_LEN = 0x40000 and one sector for environment (size = 0x20000), so the kernel may start from 0x00060000 only.

---
 include/configs/vpac270.h |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)
include/configs/vpac270.h +17 -8
index 4c18d3a..b8440a1 100644
@@ -45,7 +45,7 @@
 	"if ide reset && fatload ide 0 0xa4000000 uImage; then "	\
 		"bootm 0xa4000000; "					\
 	"fi; "								\
-	"bootm 0x40000;"
+	"bootm 0x60000;"
 #define	CONFIG_BOOTARGS			"console=tty0 console=ttyS0,115200"
 #define	CONFIG_TIMESTAMP
 #define	CONFIG_BOOTDELAY		2	/* Autoboot delay */
@@ -185,6 +185,12 @@
 /*
  * NOR FLASH
  */
+#define	CONFIG_SYS_MONITOR_BASE		0x0
+#define	CONFIG_SYS_MONITOR_LEN		0x40000
+#define	CONFIG_ENV_ADDR			\
+			(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
+#define	CONFIG_ENV_SIZE			0x4000
+
 #if	defined(CONFIG_CMD_FLASH)	/* NOR */
 #define	PHYS_FLASH_1			0x00000000	/* Flash Bank #1 */
 
@@ -211,7 +217,16 @@
 #define	CONFIG_SYS_FLASH_PROTECTION		1
 
 #define	CONFIG_ENV_IS_IN_FLASH		1
-#define	CONFIG_ENV_SECT_SIZE		0x4000
+
+/*
+ * The first four sectors of the NOR flash are 0x8000 bytes big, the rest of the
+ * flash consists of 0x20000 bytes big sectors.
+ */
+#if	(CONFIG_ENV_ADDR <= 0x18000)
+#define	CONFIG_ENV_SECT_SIZE		0x8000
+#else
+#define	CONFIG_ENV_SECT_SIZE		0x20000
+#endif
 
 #elif	defined(CONFIG_CMD_ONENAND)	/* OneNAND */
 #define	CONFIG_SYS_NO_FLASH
@@ -225,12 +240,6 @@
 #define	CONFIG_SYS_ENV_IS_NOWHERE
 #endif
 
-#define	CONFIG_SYS_MONITOR_BASE		0x0
-#define	CONFIG_SYS_MONITOR_LEN		0x40000
-
-#define	CONFIG_ENV_ADDR			0x40000
-#define	CONFIG_ENV_SIZE			0x4000
-
 /*
  * IDE
  */
Signature · 1 line
1.7.1
#17 lore raw

PATCH 15/21 PXA: fix MDREFR[APD] bit setting

In reply to Marek Vasut

From: Mikhail Kshevetskiy <[email protected]>

pxa_mem_setup macro use r6 to store CONFIG_SYS_MDREFR_VAL during memory initialization. This reg is modified during execution of pxa_wait_ticks. Later we use r6 to setup MDREFR[APD] bit. As result MDREFR[APD] is always zero.

---
 arch/arm/include/asm/arch-pxa/macro.h |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)
arch/arm/include/asm/arch-pxa/macro.h +12 -8
index 035a57e..85958dd 100644
@@ -102,7 +102,11 @@
 /*
  * This macro sets up the Memory controller of the PXA2xx CPU
  *
- * Clobbered regs: r3, r4, r5
+ * WARNING: This macro uses internally r3 and r7 regs for MEMC_BASE
+ *          and CONFIG_SYS_MDREFR_VAL correspondingly. Please do not
+ *          use this regs for other purpose inside this macro.
+ *
+ * Clobbered regs: r3, r4, r5, r6, r7
  */
 .macro	pxa_mem_setup
 	/* This comes handy when setting MDREFR */
@@ -157,7 +161,7 @@
 	bic	r5, r5, #0xf00	/* MDREFR user config with zeroed DRI */
 
 	ldr	r4, =CONFIG_SYS_MDREFR_VAL
-	mov	r6, r4
+	mov	r7, r4
 	lsl	r4, #20
 	lsr	r4, #20		/* Get a valid DRI field */
 
@@ -187,12 +191,12 @@
 	 * 6) Initialize SDRAM
 	 */
 
-	bic	r6, #MDREFR_SLFRSH
-	str	r6, [r3, #MDREFR_OFFSET]
+	bic	r7, #MDREFR_SLFRSH
+	str	r7, [r3, #MDREFR_OFFSET]
 	ldr	r4, [r3, #MDREFR_OFFSET]
 
-	orr	r6, #MDREFR_E1PIN
-	str	r6, [r3, #MDREFR_OFFSET]
+	orr	r7, #MDREFR_E1PIN
+	str	r7, [r3, #MDREFR_OFFSET]
 	ldr	r4, [r3, #MDREFR_OFFSET]
 
 	/*
@@ -250,8 +254,8 @@
 	 */
 
 	ldr	r4, [r3, #MDREFR_OFFSET]
-	and	r6, r6, #MDREFR_APD
-	orr	r4, r4, r6
+	and	r7, r7, #MDREFR_APD
+	orr	r4, r4, r7
 	str	r4, [r3, #MDREFR_OFFSET]
 	ldr	r4, [r3, #MDREFR_OFFSET]
 .endm
Signature · 1 line
1.7.1
#18 lore raw

PATCH 16/21 PXA: Add necessary information for RELOC

In reply to Marek Vasut
---
 board/vpac270/vpac270.c          |   11 ++++++++++-
 include/configs/balloon3.h       |    3 +++
 include/configs/cerf250.h        |    3 +++
 include/configs/colibri_pxa270.h |    3 +++
 include/configs/cradle.h         |    3 +++
 include/configs/csb226.h         |    3 +++
 include/configs/delta.h          |    3 +++
 include/configs/innokom.h        |    3 +++
 include/configs/lubbock.h        |    3 +++
 include/configs/palmld.h         |    3 +++
 include/configs/palmtc.h         |    3 +++
 include/configs/pleb2.h          |    3 +++
 include/configs/pxa255_idp.h     |    3 +++
 include/configs/trizepsiv.h      |    3 +++
 include/configs/vpac270.h        |    3 +++
 include/configs/wepep250.h       |    4 ++++
 include/configs/xaeniax.h        |    3 +++
 include/configs/xm250.h          |    3 +++
 include/configs/xsengine.h       |    3 +++
 include/configs/zipitz2.h        |    3 +++
 include/configs/zylonite.h       |    2 ++
 21 files changed, 70 insertions(+), 1 deletions(-)
board/vpac270/vpac270.c +10 -1
index 1557d1b..f91ff97 100644
@@ -49,8 +49,18 @@ struct serial_device *default_serial_console(void)
 	return &serial_ffuart_device;
 }
 
+
 int dram_init(void)
 {
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
+#ifdef	CONFIG_256M_U_BOOT
+	gd->ram_size += PHYS_SDRAM_2_SIZE;
+#endif
+	return 0;
+}
+
+void dram_init_banksize(void)
+{
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
 	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 
@@ -58,7 +68,6 @@ int dram_init(void)
 	gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
 	gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
 #endif
-	return 0;
 }
 
 #ifdef	CONFIG_CMD_USB
include/configs/balloon3.h +3 -0
index 9066a24..5e2a285 100644
@@ -130,6 +130,9 @@
 
 #define	CONFIG_SYS_LOAD_ADDR		0xa1000000
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * NOR FLASH
  */
include/configs/cerf250.h +3 -0
index 477b94a..98b69e3 100644
@@ -161,6 +161,9 @@
 
 #define CONFIG_SYS_FLASH_BASE			PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * GPIO settings
  */
include/configs/colibri_pxa270.h +3 -0
index 277ff67..5f457f8 100644
@@ -169,6 +169,9 @@
 
 #define	CONFIG_SYS_LOAD_ADDR		(0xa1000000)
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * NOR FLASH
  */
include/configs/cradle.h +3 -0
index 998e179..d1c1a48 100644
@@ -145,6 +145,9 @@
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * FLASH and environment organization
  */
include/configs/csb226.h +3 -0
index 0661d65..ae05734 100644
@@ -181,6 +181,9 @@
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 # if 0
 /* FIXME: switch to _documented_ registers */
 /*
include/configs/delta.h +3 -0
index d930fb4..d53acbf 100644
@@ -218,6 +218,9 @@
 
 #undef CONFIG_SYS_SKIP_DRAM_SCRUB
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * NAND Flash
  */
include/configs/innokom.h +3 -0
index 9cb0d42..007cceb 100644
@@ -192,6 +192,9 @@
 
 #define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * JFFS2 partitions
  *
include/configs/lubbock.h +3 -0
index 0a69210..3a99ec2 100644
@@ -176,6 +176,9 @@
 
 #define CONFIG_SYS_FLASH_BASE		PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 #define FPGA_REGS_BASE_PHYSICAL 0x08000000
 
 /*
include/configs/palmld.h +3 -0
index affc116..926728b 100644
@@ -154,6 +154,9 @@
 
 #define	CONFIG_SYS_LOAD_ADDR		CONFIG_SYS_DRAM_BASE
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * NOR FLASH
  */
include/configs/palmtc.h +3 -0
index f4fc9cd..fe87648 100644
@@ -155,6 +155,9 @@
 
 #define	CONFIG_SYS_LOAD_ADDR		CONFIG_SYS_DRAM_BASE
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * NOR FLASH
  */
include/configs/pleb2.h +3 -0
index 9e69411..3b6e60a 100644
@@ -179,6 +179,9 @@
 #define CONFIG_SYS_FLASH_BASE		PHYS_FLASH_1
 #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_FLASH_BASE
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * GPIO settings
  */
include/configs/pxa255_idp.h +3 -0
index 6c1defc..4581674 100644
@@ -292,6 +292,9 @@
 
 #define CONFIG_SYS_FLASH_BASE		PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * GPIO settings
  */
include/configs/trizepsiv.h +3 -0
index fa5aae8..4743495 100644
@@ -212,6 +212,9 @@
 
 #define CONFIG_SYS_FLASH_BASE		PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * GPIO settings
  */
include/configs/vpac270.h +3 -0
index b8440a1..1bcd2f3 100644
@@ -181,6 +181,9 @@
 #define	CONFIG_SYS_MEMTEST_END		0xa0800000	/* 4 ... 8 MB in DRAM */
 
 #define	CONFIG_SYS_LOAD_ADDR		(0x5c000000)
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		\
+	(CONFIG_SYS_GBL_DATA_SIZE + CONFIG_STACKSIZE + PHYS_SDRAM_1)
 
 /*
  * NOR FLASH
include/configs/wepep250.h +4 -0
index 9a20cce..a961a27 100644
@@ -183,6 +183,10 @@
 #define CONFIG_ENV_ADDR		0x20000	        /* absolute address for now  */
 #define CONFIG_ENV_SIZE		0x2000
 
+#define	PHYS_SDRAM_1			WEP_SDRAM_1
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 #undef  CONFIG_ENV_OVERWRITE                    /* env is not writable now   */
 
 /*
include/configs/xaeniax.h +3 -0
index 1329f0f..67d4106 100644
@@ -167,6 +167,9 @@
 
 #define CONFIG_SYS_FLASH_BASE		PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * FLASH and environment organization
  */
include/configs/xm250.h +3 -0
index cd56ce7..2ff9a28 100644
@@ -174,6 +174,9 @@
 
 #define CONFIG_SYS_FLASH_BASE		PHYS_FLASH_1
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * FLASH and environment organization
  */
include/configs/xsengine.h +3 -0
index f68461b..9606b53 100644
@@ -53,6 +53,9 @@
 #define CONFIG_SYS_DRAM_BASE			0xa0000000
 #define CONFIG_SYS_DRAM_SIZE			0x04000000
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /* FLASH organization */
 #define CONFIG_SYS_MAX_FLASH_BANKS		1		/* max number of memory banks           */
 #define CONFIG_SYS_MAX_FLASH_SECT		128		/* max number of sectors on one chip    */
include/configs/zipitz2.h +3 -0
index a5a873b..642c575 100644
@@ -175,6 +175,9 @@ unsigned char zipitz2_spi_read(void);
 
 #define	CONFIG_SYS_LOAD_ADDR		CONFIG_SYS_DRAM_BASE
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+
 /*
  * NOR FLASH
  */
include/configs/zylonite.h +2 -0
index c8aa046..c33ca2d 100644
@@ -190,6 +190,8 @@
 
 #undef CONFIG_SYS_SKIP_DRAM_SCRUB
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
 
 /*
  * NAND Flash
Signature · 1 line
1.7.1
#19 lore raw

PATCH 17/21 PXA: Fix reloc, Push lowlevel init into C code

In reply to Marek Vasut

Firstly, this fixes relocation issues. I had to use part of Dcache as RAM for a while. I also moved around the lowlevel init code. It turned out so most of the lowlevel init code ended in cpu.c (and eventually was rewritten into C).

This will also allow easier operation with FDT, multi-CPU-model support etc. in later releases.

NOTE: This breaks most of the PXA boards (actually, the reloc stuff did already, this only finishes the doom).

---
 arch/arm/cpu/pxa/cpu.c   |  229 ++++++++++++++++++++++++++++++-
 arch/arm/cpu/pxa/start.S |  346 ++++++++++++++++++----------------------------
 2 files changed, 360 insertions(+), 215 deletions(-)
arch/arm/cpu/pxa/cpu.c +228 -1
index 330d013..3ea3458 100644
@@ -30,11 +30,11 @@
  * CPU specific code
  */
 
-#include <asm/arch/pxa-regs.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <command.h>
 #include <common.h>
+#include <asm/arch/pxa-regs.h>
 
 static void cache_flush(void);
 
@@ -91,3 +91,230 @@ void set_GPIO_mode(int gpio_mode)
 	writel(val, GAFR(gpio));
 }
 #endif /* CONFIG_CPU_MONAHANS */
+
+void pxa_wait_ticks(int ticks)
+{
+	writel(0, OSCR);
+	while (readl(OSCR) < ticks)
+		asm volatile("":::"memory");
+}
+
+inline void writelrb(uint32_t val, uint32_t addr)
+{
+	writel(val, addr);
+	asm volatile("":::"memory");
+	readl(addr);
+	asm volatile("":::"memory");
+}
+
+void pxa_dram_init(void)
+{
+	uint32_t tmp;
+	int i;
+	/*
+	 * 1) Initialize Asynchronous static memory controller
+	 */
+
+	writelrb(CONFIG_SYS_MSC0_VAL, MSC0);
+	writelrb(CONFIG_SYS_MSC1_VAL, MSC1);
+	writelrb(CONFIG_SYS_MSC2_VAL, MSC2);
+	/*
+	 * 2) Initialize Card Interface
+	 */
+
+	/* MECR: Memory Expansion Card Register */
+	writelrb(CONFIG_SYS_MECR_VAL, MECR);
+	/* MCMEM0: Card Interface slot 0 timing */
+	writelrb(CONFIG_SYS_MCMEM0_VAL, MCMEM0);
+	/* MCMEM1: Card Interface slot 1 timing */
+	writelrb(CONFIG_SYS_MCMEM1_VAL, MCMEM1);
+	/* MCATT0: Card Interface Attribute Space Timing, slot 0 */
+	writelrb(CONFIG_SYS_MCATT0_VAL, MCATT0);
+	/* MCATT1: Card Interface Attribute Space Timing, slot 1 */
+	writelrb(CONFIG_SYS_MCATT1_VAL, MCATT1);
+	/* MCIO0: Card Interface I/O Space Timing, slot 0 */
+	writelrb(CONFIG_SYS_MCIO0_VAL, MCIO0);
+	/* MCIO1: Card Interface I/O Space Timing, slot 1 */
+	writelrb(CONFIG_SYS_MCIO1_VAL, MCIO1);
+
+	/*
+	 * 3) Configure Fly-By DMA register
+	 */
+
+	writelrb(CONFIG_SYS_FLYCNFG_VAL, FLYCNFG);
+
+	/*
+	 * 4) Initialize Timing for Sync Memory (SDCLK0)
+	 */
+
+	/*
+	 * Before accessing MDREFR we need a valid DRI field, so we set
+	 * this to power on defaults + DRI field.
+	 */
+
+	/* Read current MDREFR config and zero out DRI */
+	tmp = readl(MDREFR) & ~0xfff;
+	/* Add user-specified DRI */
+	tmp |= CONFIG_SYS_MDREFR_VAL & 0xfff;
+	/* Configure important bits */
+	tmp |= MDREFR_K0RUN | MDREFR_SLFRSH;
+	tmp &= ~(MDREFR_APD | MDREFR_E1PIN);
+
+	/* Write MDREFR back */
+	writelrb(tmp, MDREFR);
+
+	/*
+	 * 5) Initialize Synchronous Static Memory (Flash/Peripherals)
+	 */
+
+	/* Initialize SXCNFG register. Assert the enable bits.
+	 *
+	 * Write SXMRS to cause an MRS command to all enabled banks of
+	 * synchronous static memory. Note that SXLCR need not be written
+	 *@this time.
+	 */
+	writelrb(CONFIG_SYS_SXCNFG_VAL, SXCNFG);
+
+	/*
+	 * 6) Initialize SDRAM
+	 */
+
+	writelrb(CONFIG_SYS_MDREFR_VAL & ~MDREFR_SLFRSH, MDREFR);
+	writelrb(CONFIG_SYS_MDREFR_VAL | MDREFR_E1PIN, MDREFR);
+
+	/*
+	 * 7) Write MDCNFG with MDCNFG:DEx deasserted (set to 0), to configure
+	 *    but not enable each SDRAM partition pair.
+	 */
+
+	writelrb(CONFIG_SYS_MDCNFG_VAL &
+		~(MDCNFG_DE0 | MDCNFG_DE1 | MDCNFG_DE2 | MDCNFG_DE3), MDCNFG);
+	/* Wait for the clock to the SDRAMs to stabilize, 100..200 usec. */
+	pxa_wait_ticks(0x300);
+
+	/*
+	 * 8) Trigger a number (usually 8) refresh cycles by attempting
+	 *    non-burst read or write accesses to disabled SDRAM, as commonly
+	 *    specified in the power up sequence documented in SDRAM data
+	 *    sheets. The address(es) used for this purpose must not be
+	 *    cacheable.
+	 */
+	for (i = 9; i >= 0; i--) {
+		writel(i, 0xa0000000);
+		asm volatile("":::"memory");
+	}
+	/*
+	 * 9) Write MDCNFG with enable bits asserted (MDCNFG:DEx set to 1).
+	 */
+
+	tmp = CONFIG_SYS_MDCNFG_VAL &
+		(MDCNFG_DE0 | MDCNFG_DE1 | MDCNFG_DE2 | MDCNFG_DE3);
+	tmp |= readl(MDCNFG);
+	writelrb(tmp, MDCNFG);
+
+	/*
+	 * 10) Write MDMRS.
+	 */
+
+	writelrb(CONFIG_SYS_MDMRS_VAL, MDMRS);
+
+	/*
+	 * 11) Enable APD
+	 */
+
+	if (CONFIG_SYS_MDREFR_VAL & MDREFR_APD) {
+		tmp = readl(MDREFR);
+		tmp |= MDREFR_APD;
+		writelrb(tmp, MDREFR);
+	}
+}
+
+void pxa_gpio_setup(void)
+{
+	writel(CONFIG_SYS_GPSR0_VAL, GPSR0);
+	writel(CONFIG_SYS_GPSR1_VAL, GPSR1);
+	writel(CONFIG_SYS_GPSR2_VAL, GPSR2);
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+	writel(CONFIG_SYS_GPSR3_VAL, GPSR3);
+#endif
+
+	writel(CONFIG_SYS_GPCR0_VAL, GPCR0);
+	writel(CONFIG_SYS_GPCR1_VAL, GPCR1);
+	writel(CONFIG_SYS_GPCR2_VAL, GPCR2);
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+	writel(CONFIG_SYS_GPCR3_VAL, GPCR3);
+#endif
+
+	writel(CONFIG_SYS_GPDR0_VAL, GPDR0);
+	writel(CONFIG_SYS_GPDR1_VAL, GPDR1);
+	writel(CONFIG_SYS_GPDR2_VAL, GPDR2);
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+	writel(CONFIG_SYS_GPDR3_VAL, GPDR3);
+#endif
+
+	writel(CONFIG_SYS_GAFR0_L_VAL, GAFR0_L);
+	writel(CONFIG_SYS_GAFR0_U_VAL, GAFR0_U);
+	writel(CONFIG_SYS_GAFR1_L_VAL, GAFR1_L);
+	writel(CONFIG_SYS_GAFR1_U_VAL, GAFR1_U);
+	writel(CONFIG_SYS_GAFR2_L_VAL, GAFR2_L);
+	writel(CONFIG_SYS_GAFR2_U_VAL, GAFR2_U);
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+	writel(CONFIG_SYS_GAFR3_L_VAL, GAFR3_L);
+	writel(CONFIG_SYS_GAFR3_U_VAL, GAFR3_U);
+#endif
+
+	writel(CONFIG_SYS_PSSR_VAL, PSSR);
+}
+
+void pxa_interrupt_setup(void)
+{
+	writel(0, ICLR);
+	writel(0, ICMR);
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
+	writel(0, ICLR2);
+	writel(0, ICMR2);
+#endif
+}
+
+void pxa_clock_setup(void)
+{
+#ifndef CONFIG_CPU_MONAHANS
+	writel(CONFIG_SYS_CKEN, CKEN);
+	writel(CONFIG_SYS_CCCR, CCCR);
+	asm volatile("mcr	p14, 0, %0, c6, c0, 0"::"r"(2));
+#else
+/* Set CKENA/CKENB/ACCR for MH */
+#endif
+
+	/* enable the 32Khz oscillator for RTC and PowerManager */
+	writel(OSCC_OON, OSCC);
+	while(!(readl(OSCC) & OSCC_OOK))
+		asm volatile("":::"memory");
+}
+
+void pxa_wakeup(void)
+{
+	uint32_t rcsr;
+
+	rcsr = readl(RCSR);
+	writel(rcsr & (RCSR_GPR | RCSR_SMR | RCSR_WDR | RCSR_HWR), RCSR);
+
+	/* Wakeup */
+	if (rcsr & RCSR_SMR) {
+		writel(PSSR_PH, PSSR);
+		pxa_dram_init();
+		icache_disable();
+		dcache_disable();
+		asm volatile("mov	pc, %0"::"r"(readl(PSSR)));
+	}
+}
+
+int arch_cpu_init(void)
+{
+	pxa_gpio_setup();
+//	pxa_wait_ticks(0x8000);
+	pxa_wakeup();
+	pxa_interrupt_setup();
+	pxa_clock_setup();
+	return 0;
+}
arch/arm/cpu/pxa/start.S +132 -214

406 lines not on this page · raw message

Signature · 1 line
1.7.1
#20 lore raw

PATCH 18/21 PXA: Fix vpac270 for Reloc

In reply to Marek Vasut
---
 board/vpac270/Makefile        |   10 ++++------
 board/vpac270/config.mk       |    1 -
 board/vpac270/lowlevel_init.S |   39 ---------------------------------------
 board/vpac270/vpac270.c       |   10 ++++++----
 include/configs/vpac270.h     |    6 +++---
 5 files changed, 13 insertions(+), 53 deletions(-)
 delete mode 100644 board/vpac270/config.mk
 delete mode 100644 board/vpac270/lowlevel_init.S
board/vpac270/Makefile +4 -6
index f5014fc..c359917 100644
@@ -24,17 +24,15 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(BOARD).a
 
 COBJS	:= vpac270.o
-SOBJS	:= lowlevel_init.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
-SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
-	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):	$(obj).depend $(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-	rm -f $(SOBJS) $(OBJS)
+	rm -f $(OBJS)
 
 distclean:	clean
 	rm -f $(LIB) core *.bak $(obj).depend
board/vpac270/config.mk deleted +0 -1
deleted file mode 100644
index 0f10662..0000000
@@ -1 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0xa1000000
board/vpac270/lowlevel_init.S deleted +0 -39
deleted file mode 100644
index c40d12f..0000000
@@ -1,39 +0,0 @@
-/*
- * Voipac PXA270 Lowlevel Hardware Initialization
- *
- * Copyright (C) 2010 Marek Vasut <[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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-#include <asm/arch/macro.h>
-
-.globl lowlevel_init
-lowlevel_init:
-	pxa_gpio_setup
-	pxa_wait_ticks	0x8000
-	pxa_mem_setup
-	pxa_wakeup
-	pxa_intr_setup
-	pxa_clock_setup
-
-	mov	pc, lr
board/vpac270/vpac270.c +6 -4
index f91ff97..91d8580 100644
@@ -32,6 +32,10 @@ DECLARE_GLOBAL_DATA_PTR;
  */
 int board_init(void)
 {
+	/* We have RAM, disable cache */
+	dcache_disable();
+	icache_disable();
+
 	/* memory and cpu-speed are setup before relocation */
 	/* so we do _nothing_ here */
 
@@ -49,13 +53,11 @@ struct serial_device *default_serial_console(void)
 	return &serial_ffuart_device;
 }
 
-
+extern void pxa_dram_init(void);
 int dram_init(void)
 {
+	pxa_dram_init();
 	gd->ram_size = PHYS_SDRAM_1_SIZE;
-#ifdef	CONFIG_256M_U_BOOT
-	gd->ram_size += PHYS_SDRAM_2_SIZE;
-#endif
 	return 0;
 }
 
include/configs/vpac270.h +3 -3
index 1bcd2f3..1923a17 100644
@@ -34,7 +34,7 @@
 #define	CONFIG_ENV_OVERWRITE
 #define	CONFIG_SYS_MALLOC_LEN		(128*1024)
 #define	CONFIG_SYS_GBL_DATA_SIZE	128
-
+#define	CONFIG_ARCH_CPU_INIT
 #define	CONFIG_BOOTCOMMAND						\
 	"if mmc init && fatload mmc 0 0xa4000000 uImage; then "		\
 		"bootm 0xa4000000; "					\
@@ -51,7 +51,7 @@
 #define	CONFIG_BOOTDELAY		2	/* Autoboot delay */
 #define	CONFIG_CMDLINE_TAG
 #define	CONFIG_SETUP_MEMORY_TAGS
-
+#define	CONFIG_SYS_TEXT_BASE		0x0
 #define	CONFIG_LZMA			/* LZMA compression support */
 
 /*
@@ -183,7 +183,7 @@
 #define	CONFIG_SYS_LOAD_ADDR		(0x5c000000)
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define	CONFIG_SYS_INIT_SP_ADDR		\
-	(CONFIG_SYS_GBL_DATA_SIZE + CONFIG_STACKSIZE + PHYS_SDRAM_1)
+	(PHYS_SDRAM_1 + CONFIG_SYS_GBL_DATA_SIZE + 2048)
 
 /*
  * NOR FLASH
Signature · 1 line
1.7.1
#21 lore raw

PATCH 19/21 PXA: Fix ZipitZ2 for Reloc

In reply to Marek Vasut
---
 board/zipitz2/Makefile        |   10 ++++------
 board/zipitz2/config.mk       |    1 -
 board/zipitz2/lowlevel_init.S |   40 ----------------------------------------
 board/zipitz2/zipitz2.c       |   24 ++++++++++++------------
 include/configs/zipitz2.h     |    9 +++++----
 5 files changed, 21 insertions(+), 63 deletions(-)
 delete mode 100644 board/zipitz2/config.mk
 delete mode 100644 board/zipitz2/lowlevel_init.S
board/zipitz2/Makefile +4 -6
index 2673835..8d452de 100644
@@ -29,17 +29,15 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(BOARD).a
 
 COBJS	:= zipitz2.o
-SOBJS	:= lowlevel_init.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
-SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
-	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):	$(obj).depend $(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-	rm -f $(SOBJS) $(OBJS)
+	rm -f $(OBJS)
 
 distclean:	clean
 	rm -f $(LIB) core *.bak $(obj).depend
board/zipitz2/config.mk deleted +0 -1
deleted file mode 100644
index 0f10662..0000000
@@ -1 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0xa1000000
board/zipitz2/lowlevel_init.S deleted +0 -40
deleted file mode 100644
index 82a52e8..0000000
@@ -1,40 +0,0 @@
-/*
- * Aeronix Zipit Z2 Lowlevel Hardware Initialization
- *
- * Copyright (C) 2010 Marek Vasut <[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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-#include <asm/arch/macro.h>
-
-.globl lowlevel_init
-lowlevel_init:
-	pxa_gpio_setup
-	pxa_wait_ticks	0x8000
-	pxa_mem_setup
-	pxa_wakeup
-	pxa_intr_setup
-	pxa_clock_setup
-
-	mov	pc, lr
board/zipitz2/zipitz2.c +12 -12
index f7edc4c..9e6a0d5 100644
@@ -44,10 +44,11 @@ inline void lcd_start(void) {};
 
 int board_init (void)
 {
-	/* memory and cpu-speed are setup before relocation */
-	/* so we do _nothing_ here */
+	/* We have RAM, disable cache */
+	dcache_disable();
+	icache_disable();
 
-	/* arch number of Lubbock-Board */
+	/* arch number of Z2 */
 	gd->bd->bi_arch_number = MACH_TYPE_ZIPIT2;
 
 	/* adress of boot parameters */
@@ -59,24 +60,23 @@ int board_init (void)
 	return 0;
 }
 
-int board_late_init(void)
+struct serial_device *default_serial_console (void)
 {
-	setenv("stdout", "serial");
-	setenv("stderr", "serial");
-	return 0;
+	return &serial_stuart_device;
 }
 
-struct serial_device *default_serial_console (void)
+extern void pxa_dram_init(void);
+int dram_init(void)
 {
-	return &serial_stuart_device;
+	pxa_dram_init();
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
+	return 0;
 }
 
-int dram_init (void)
+void dram_init_banksize(void)
 {
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
 	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-	return 0;
 }
 
 #ifdef	CONFIG_CMD_SPI
include/configs/zipitz2.h +5 -4
index 642c575..ce65d1f 100644
@@ -41,8 +41,9 @@
 #define CONFIG_ENV_ADDR			0x40000
 #define CONFIG_ENV_SIZE			0x20000
 
-#define	CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + CONFIG_STACKSIZE)
+#define	CONFIG_SYS_MALLOC_LEN		(128*1024)
 #define	CONFIG_SYS_GBL_DATA_SIZE	512
+#define	CONFIG_ARCH_CPU_INIT
 
 #define	CONFIG_BOOTCOMMAND						\
 	"if mmc init && fatload mmc 0 0xa0000000 uboot.script ; then "	\
@@ -56,7 +57,7 @@
 #define	CONFIG_BOOTDELAY		2	/* Autoboot delay */
 #define	CONFIG_CMDLINE_TAG
 #define	CONFIG_SETUP_MEMORY_TAGS
-
+#define	CONFIG_SYS_TEXT_BASE		0x0
 #define	CONFIG_LZMA			/* LZMA compression support */
 
 /*
@@ -176,7 +177,7 @@ unsigned char zipitz2_spi_read(void);
 #define	CONFIG_SYS_LOAD_ADDR		CONFIG_SYS_DRAM_BASE
 
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
-#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1 + 2048)
 
 /*
  * NOR FLASH
@@ -221,7 +222,7 @@ unsigned char zipitz2_spi_read(void);
 #define CONFIG_SYS_GPCR3_VAL	0x00000000
 #define CONFIG_SYS_GPDR0_VAL	0xdafcee00
 #define CONFIG_SYS_GPDR1_VAL	0xffa3aaab
-#define CONFIG_SYS_GPDR2_VAL	0x8fe1ffff
+#define CONFIG_SYS_GPDR2_VAL	0x8fe9ffff
 #define CONFIG_SYS_GPDR3_VAL	0x001b1f8a
 #define CONFIG_SYS_GPSR0_VAL	0x06080400
 #define CONFIG_SYS_GPSR1_VAL	0x007f0000
Signature · 1 line
1.7.1
#22 lore raw

PATCH 20/21 PXA: Fix Balloon3 for Reloc

In reply to Marek Vasut
---
 board/balloon3/Makefile        |   10 +++----
 board/balloon3/balloon3.c      |   14 ++++++++-
 board/balloon3/config.mk       |    1 -
 board/balloon3/lowlevel_init.S |   36 --------------------------
 board/balloon3/u-boot.lds      |   55 ----------------------------------------
 include/configs/balloon3.h     |   10 ++++---
 6 files changed, 22 insertions(+), 104 deletions(-)
 delete mode 100644 board/balloon3/config.mk
 delete mode 100644 board/balloon3/lowlevel_init.S
 delete mode 100644 board/balloon3/u-boot.lds
board/balloon3/Makefile +4 -6
index 3928e1f..7db615e 100644
@@ -24,17 +24,15 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(BOARD).a
 
 COBJS	:= balloon3.o
-SOBJS	:= lowlevel_init.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
-SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
-	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+$(LIB):	$(obj).depend $(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
 
 clean:
-	rm -f $(SOBJS) $(OBJS)
+	rm -f $(OBJS)
 
 distclean:	clean
 	rm -f $(LIB) core *.bak $(obj).depend
board/balloon3/balloon3.c +12 -2
index 2d6eabe..26e34e9 100644
@@ -36,6 +36,10 @@ void balloon3_init_fpga(void);
 
 int board_init(void)
 {
+	/* We have RAM, disable cache */
+	dcache_disable();
+	icache_disable();
+
 	/* arch number of vpac270 */
 	gd->bd->bi_arch_number = MACH_TYPE_BALLOON3;
 
@@ -53,8 +57,16 @@ struct serial_device *default_serial_console(void)
 	return &serial_stuart_device;
 }
 
+extern void pxa_dram_init(void);
 int dram_init(void)
 {
+	pxa_dram_init();
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
+	return 0;
+}
+
+void dram_init_banksize(void)
+{
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
 	gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
 	gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
@@ -62,8 +74,6 @@ int dram_init(void)
 	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 	gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
 	gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
-
-	return 0;
 }
 
 #ifdef	CONFIG_CMD_USB
board/balloon3/config.mk deleted +0 -1
deleted file mode 100644
index 1d650ac..0000000
@@ -1 +0,0 @@
-TEXT_BASE = 0xa1000000
board/balloon3/lowlevel_init.S deleted +0 -36
deleted file mode 100644
index d7b5be6..0000000
@@ -1,36 +0,0 @@
-/*
- * Balloon3 Lowlevel Hardware Initialization
- *
- * Copyright (C) 2010 Marek Vasut <[email protected]>
- *
- * 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 <config.h>
-#include <version.h>
-#include <asm/arch/pxa-regs.h>
-#include <asm/arch/macro.h>
-
-.globl lowlevel_init
-lowlevel_init:
-	pxa_gpio_setup
-	pxa_wait_ticks	0x8000
-	pxa_mem_setup
-	pxa_wakeup
-	pxa_intr_setup
-	pxa_clock_setup
-
-	mov	pc, lr
board/balloon3/u-boot.lds deleted +0 -55

55 lines not on this page · raw message

include/configs/balloon3.h +6 -4
index 5e2a285..ae60f2e 100644
@@ -34,18 +34,19 @@
 #define	CONFIG_ENV_OVERWRITE
 #define	CONFIG_SYS_MALLOC_LEN		(128*1024)
 #define	CONFIG_SYS_GBL_DATA_SIZE	128
-
+#define	CONFIG_ARCH_CPU_INIT
 #define	CONFIG_BOOTCOMMAND						\
+	"fpga load 0x0 0x50000 0x62638; "				\
 	"if usb reset && fatload usb 0 0xa4000000 uImage; then "	\
 		"bootm 0xa4000000; "					\
 	"fi; "								\
-	"bootm 0x40000;"
+	"bootm 0xd0000;"
 #define	CONFIG_BOOTARGS			"console=tty0 console=ttyS2,115200"
 #define	CONFIG_TIMESTAMP
 #define	CONFIG_BOOTDELAY		2	/* Autoboot delay */
 #define	CONFIG_CMDLINE_TAG
 #define	CONFIG_SETUP_MEMORY_TAGS
-
+#define	CONFIG_SYS_TEXT_BASE		0x0
 #define	CONFIG_LZMA			/* LZMA compression support */
 
 /*
@@ -131,7 +132,8 @@
 #define	CONFIG_SYS_LOAD_ADDR		0xa1000000
 
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
-#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_GBL_DATA_SIZE + PHYS_SDRAM_1)
+#define	CONFIG_SYS_INIT_SP_ADDR		\
+	(PHYS_SDRAM_1 + CONFIG_SYS_GBL_DATA_SIZE + 2048)
 
 /*
  * NOR FLASH
Signature · 1 line
1.7.1
#23 lore raw

PATCH 21/21 PXA: Fix vpac270 OneNAND booter

In reply to Marek Vasut

NOTE: The modification in Makefile will be superseded by a pending patch!

---
 Makefile                           |    2 ++
 include/configs/vpac270.h          |    3 ++-
 onenand_ipl/board/vpac270/Makefile |    5 +++--
 3 files changed, 7 insertions(+), 3 deletions(-)
Makefile +2 -0
index 0d2d34a..47e9057 100644
@@ -1027,6 +1027,8 @@ vpac270_onenand_config	: unconfig
 	@if [ "$(findstring onenand,$@)" ] ; then \
 		echo "#define CONFIG_ONENAND_U_BOOT" \
 			>>$(obj)include/config.h ; \
+		echo "#define CONFIG_256M_U_BOOT" \
+			>>$(obj)include/config.h ; \
 	fi;
 	@if [ "$(findstring 256M,$@)" ] ; then \
 		echo "#define CONFIG_256M_U_BOOT" \
include/configs/vpac270.h +2 -1
index 1923a17..fc680fc 100644
@@ -180,7 +180,8 @@
 #define	CONFIG_SYS_MEMTEST_START	0xa0400000	/* memtest works on */
 #define	CONFIG_SYS_MEMTEST_END		0xa0800000	/* 4 ... 8 MB in DRAM */
 
-#define	CONFIG_SYS_LOAD_ADDR		(0x5c000000)
+#define	CONFIG_SYS_LOAD_ADDR		PHYS_SDRAM_1
+#define	CONFIG_SYS_IPL_LOAD_ADDR	(0x5c000000)
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define	CONFIG_SYS_INIT_SP_ADDR		\
 	(PHYS_SDRAM_1 + CONFIG_SYS_GBL_DATA_SIZE + 2048)
onenand_ipl/board/vpac270/Makefile +3 -2
index ac7a8f0..a86bc00 100644
@@ -1,5 +1,6 @@
-IPL	=onenand_ipl
+
 include $(TOPDIR)/config.mk
+include $(TOPDIR)/board/$(BOARDDIR)/config.mk
 
 LDSCRIPT= $(TOPDIR)/onenand_ipl/board/$(BOARDDIR)/u-boot.onenand.lds
 LDFLAGS	= -Bstatic -T $(onenandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(PLATFORM_LDFLAGS)
@@ -25,7 +26,7 @@ ALL	= $(onenandobj)onenand-ipl $(onenandobj)onenand-ipl.bin $(onenandobj)onenand
 all:	$(obj).depend $(ALL)
 
 $(onenandobj)onenand-ipl-2k.bin:	$(onenandobj)onenand-ipl
-	$(OBJCOPY) ${OBJCFLAGS} --pad-to=0x5c040400 -O binary $< $@
+	$(OBJCOPY) ${OBJCFLAGS} --pad-to=0x0800 -O binary $< $@
 
 $(onenandobj)onenand-ipl.bin:	$(onenandobj)onenand-ipl
 	$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
Signature · 1 line
1.7.1
#24 lore raw

PATCH 21/21 PXA: Fix vpac270 OneNAND booter

Dear Marek Vasut,

Quoted 1 line · In message <[email protected]> you wrote:

NOTE: The modification in Makefile will be superseded by a pending patch!

I think you're calling for a merge conflict here, but if you want it that way...

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
Another megabytes the dust.
#25 lore raw
In reply to Marek Vasut

Dear Marek Vasut,

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

these are the patches I have prepared for u-boot-testing.git/Makefile-cleanup.

General note: most of the patches affect only PXA. They look OK to me, but I don;t knowmuch about these systems; if you like feel free to add my Acked-by: Wolfgang Denk <[email protected]>

There is one commit that affects common code which I explicitely ACKed.

There are a number of places where lists of register declarations should be replaced by C structs, but this is existing code and (as discussed before) I understand that this is stuff for later work.

You mention above that the patches are "for ... Makefile-cleanu", but it seems you missed most of the relevant changes, so you might want to rebase (as discussed in private communication) against the Makefile-cleanup branch. Basicly this means:

- Rename "TEXT_BASE" into "CONFIG_SYS_TEXT_BASE"
- Move the definition of CONFIG_SYS_TEXT_BASE from board/*/config.mk to include/configs/*.h
- Remove the (now empty) board/*/config.mk files.

Best regards,

Wolfgang Denk

Signature · 5 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
Experience is what causes a person to make new  mistakes  instead  of
old ones.