summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xboard/st/u8500/Makefile2
-rwxr-xr-xboard/st/u8500/core2.S56
-rwxr-xr-xboard/st/u8500/mmc_utils.c2
-rwxr-xr-xboard/st/u8500/u8500.c33
-rwxr-xr-xinclude/configs/u8500.h8
5 files changed, 82 insertions, 19 deletions
diff --git a/board/st/u8500/Makefile b/board/st/u8500/Makefile
index 78eece7fe..632a49161 100755
--- a/board/st/u8500/Makefile
+++ b/board/st/u8500/Makefile
@@ -27,7 +27,7 @@ CFLAGS += -D__RELEASE -D__STN_8500
LIB = $(obj)lib$(BOARD).a
COBJS := u8500.o flash.o gpio.o i2c.o mmc.o mmc_utils.o init_mmc.o emmc.o
-SOBJS :=
+SOBJS := core2.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
diff --git a/board/st/u8500/core2.S b/board/st/u8500/core2.S
new file mode 100755
index 000000000..7152e3077
--- /dev/null
+++ b/board/st/u8500/core2.S
@@ -0,0 +1,56 @@
+/*
+ * secondary_wfe()
+ * Copyright (c) 2009 ST Ericsson
+ * Author: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
+ *
+ * puts the secondary core in wfe. This is required for the locked
+ * version of ST Ericsson SMP platform to attach the debugger at this stage.
+ * This is a GCC generated code.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+.global secondary_startup
+secondary_startup:
+ dsb @ WFI may enter a low-power mode
+ wfi
+ mov pc, lr
+
+.global secondary_wfe
+secondary_wfe:
+.L8: wfe
+ ldr r0, .L9
+ ldr r1, .L9+4
+ ldr r3, [r0, #4080]
+ str r3, [r1, #0]
+ ldr r3, .L9+8
+ ldr r2, [r1, #0]
+ cmp r2, r3
+ bne .L8
+ ldr r3, [r0, #4084]
+ str r3, [r1, #4]
+ blx r3
+ b .L8
+.L10:
+ .align 2
+.L9:
+ .word -2146103296
+ .word .LANCHOR0
+ .word -1577128703
+ .size secondary_wfe, .-secondary_wfe
+ .global handler
+ .global magic_num
+ .bss
+ .align 2
+.LANCHOR0 = . + 0
+ .type magic_num, %object
+ .size magic_num, 4
+magic_num:
+ .space 4
+ .type handler, %object
+ .size handler, 4
+handler:
+ .space 4
+ .ident "GCC: (GNU) 4.2.3"
+ .section .note.GNU-stack,"",%progbits
diff --git a/board/st/u8500/mmc_utils.c b/board/st/u8500/mmc_utils.c
index b7d4e7085..3c31d9333 100755
--- a/board/st/u8500/mmc_utils.c
+++ b/board/st/u8500/mmc_utils.c
@@ -224,7 +224,7 @@ t_mmc_error mmc_initCard ()
clockcontrol.pwrsave= MMC_DISABLE;
clockcontrol.bypass = MMC_DISABLE;
clockcontrol.widebus= MMC_DISABLE;
- error = mmc_setclockfrequency (0x0A); // 12MHz
+ error = mmc_setclockfrequency(0x00); /* 26 MHz */
if (error != MMC_OK)
{
goto end;
diff --git a/board/st/u8500/u8500.c b/board/st/u8500/u8500.c
index 0cca76cf3..4bb94e2b9 100755
--- a/board/st/u8500/u8500.c
+++ b/board/st/u8500/u8500.c
@@ -27,20 +27,26 @@
#include <asm/errno.h>
#include "common.h"
+#define NOMADIK_PER4_BASE (0x80150000)
+#define NOMADIK_BACKUPRAM0_BASE (NOMADIK_PER4_BASE + 0x00000)
+#define NOMADIK_BACKUPRAM1_BASE (NOMADIK_PER4_BASE + 0x01000)
-void init_regs(void);
-#if 0
-void *memcopy(void *dest, const void *src, size_t count)
+extern void (*handler)();
+extern unsigned volatile long magic_num;
+extern void secondary_wfe();
+
+void wake_up_other_cores()
{
- u16 *tmp = (u16 *) dest, *s = (u16 *) src;
+ handler = secondary_wfe;
+ *((volatile unsigned int *)(NOMADIK_BACKUPRAM0_BASE+0x1FF4))= handler;
+ *((volatile unsigned int *)(NOMADIK_BACKUPRAM0_BASE+0x1FF0))= 0xA1FEED01;
+ asm("SEV");
+ return;
+}
- count = count / 2;
- while (count--)
- *tmp++ = *s++;
+void init_regs(void);
- return dest;
-}
-#endif
+DECLARE_GLOBAL_DATA_PTR;
#if defined(CONFIG_SHOW_BOOT_PROGRESS)
void show_boot_progress(int progress)
{
@@ -60,7 +66,6 @@ static inline void delay(unsigned long loops)
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
gd->bd->bi_arch_number = 0x1A4;
gd->bd->bi_boot_params = 0x00000100;
//enable the timers in PRCMU reg
@@ -86,12 +91,13 @@ Description:
******************************/
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE_1;
+#ifdef CONFIG_U8500_V1
gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
gd->bd->bi_dram[1].size = PHYS_SDRAM_SIZE_2;
-
+#endif
+ wake_up_other_cores();
return 0;
}
@@ -103,6 +109,7 @@ unsigned int addr_vall_arr[] = {
0x8000F008, 0x00007FFF, // Clocks for I2C TODO Enable reqd only
0x8000E120, 0x003C0000, // GPIO for I2C/SD
0x8000E124, 0x00000000, // GPIO for I2C/SD
+0x80157020, 0x00000130, // I2C 48MHz clock
0x8012F000, 0x00007FFF, // Clocks for SD TODO Enable reqd only
0x8012F008, 0x00007FFF, // Clocks for SD TODO Enable reqd only
0xA03DF000, 0x0000000D, // Clock for MTU Timers
diff --git a/include/configs/u8500.h b/include/configs/u8500.h
index b9aa3c835..89837ea1b 100755
--- a/include/configs/u8500.h
+++ b/include/configs/u8500.h
@@ -98,8 +98,8 @@
#define CONFIG_CMD_EMMC
#define CONFIG_BOOTDELAY 5
-#define CONFIG_BOOTARGS "cachepolicy=writealloc root=/dev/ram0 initrd=0x800000,20M init=linuxrc rw console=ttyAMA2,115200n8 mem=256M board_id=0"
-#define CONFIG_BOOTCOMMAND "emmc_read 0x100000 0x280000 0x200000; bootm 0x100000"
+#define CONFIG_BOOTARGS "cachepolicy=writealloc root=/dev/mmcblk0p2 noinitrd rootfstype=ext3 rootdelay=1 init=/linuxrc console=ttyAMA2,115200n8 board_id=1 mem=96M@0 mem=128M@128M"
+#define CONFIG_BOOTCOMMAND "emmc_read 0x100000 0x14000000 0x200000; bootm 0x100000"
#define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x00100000\0" \
@@ -178,8 +178,8 @@
#define CONFIG_CMD_ENV
#define CONFIG_CMD_SAVEENV /* CMD_ENV is obsolete but used in env_emmc.c */
#define CONFIG_ENV_IS_IN_EMMC 1
-#define CONFIG_ENV_OFFSET_START 0x260000
-#define CONFIG_ENV_OFFSET_END 0x27F000
+#define CONFIG_ENV_OFFSET_START 0x13F80000
+#define CONFIG_ENV_OFFSET_END 0x13FE0000
/*-----------------------------------------------------------------------
* USB related configs