aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaer-Olof Haakansson <par-olof.hakansson@stericsson.com>2010-06-01 11:49:20 +0200
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:45:30 -0600
commit7fb4b4344dcbfd8115bcf075c7f07c748d2a7ef1 (patch)
tree62f630181220d032934a32981235572dbfecb27d
parent1453f8259ef4100ca689884d5d754761cc10a64f (diff)
downloadlinux-2.6.34-ux500-7fb4b4344dcbfd8115bcf075c7f07c748d2a7ef1.tar.gz
mLoader_helper: pass modem ELF settings from CMDLINE to user space
U-boot parses the modem ELF and places the modem ELF settings in the CMDLINE. mLoader_helper picks up these settings and makes them available in sysfs for the mloader utlity to use when loading the modem ELF. ST-Ericsson ID: WP253874 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/494 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Change-Id: I5bae8e3f0d42042d041c1863d1de0b853f3a2b4e Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2379
-rwxr-xr-xarch/arm/configs/sim5500_defconfig3
-rwxr-xr-xarch/arm/mach-ux500/Kconfig8
-rwxr-xr-xarch/arm/mach-ux500/Makefile1
-rwxr-xr-xarch/arm/mach-ux500/board-u5500.c9
-rwxr-xr-xarch/arm/mach-ux500/devices.c7
-rwxr-xr-xarch/arm/mach-ux500/include/mach/devices.h4
6 files changed, 31 insertions, 1 deletions
diff --git a/arch/arm/configs/sim5500_defconfig b/arch/arm/configs/sim5500_defconfig
index 33952e004c4..09607c5b568 100755
--- a/arch/arm/configs/sim5500_defconfig
+++ b/arch/arm/configs/sim5500_defconfig
@@ -231,6 +231,7 @@ CONFIG_UX500_SOC_DB5500=y
# CONFIG_MACH_U8500_SIMULATOR is not set
CONFIG_MACH_U5500_SIMULATOR=y
# CONFIG_MACH_U8500_MOP is not set
+CONFIG_U5500_MLOADER_HELPER=y
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_SENSORS1P_MOP=y
# CONFIG_MCDE_ENABLE_FEATURE_HW_V1_SUPPORT is not set
@@ -358,7 +359,7 @@ CONFIG_ALIGNMENT_TRAP=y
#
CONFIG_ZBOOT_ROM_TEXT=0
CONFIG_ZBOOT_ROM_BSS=0
-CONFIG_CMDLINE="cachepolicy=writealloc root=/dev/ram0 init=init rw console=ttyAMA2,115200n8 mem=256M initrd=0x800000,60M earlyprintk"
+CONFIG_CMDLINE="cachepolicy=writealloc root=/dev/ram0 init=init rw console=ttyAMA2,115200n8 mem=256M initrd=0x800000,60M earlyprintk memmap=0x02000000$0x01700000 mloader_helper.sml_total_size=0x00100000"
# CONFIG_XIP_KERNEL is not set
# CONFIG_KEXEC is not set
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index df96996d521..cad7589e91e 100755
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -78,4 +78,12 @@ config FORCE_MAX_ZONEORDER
int "Maximum zone order"
default "12"
+config U5500_MLOADER_HELPER
+ bool "mLoader helper, mem config from kernel boot args exported to sysfs"
+ default n
+ depends on MACH_U5500_SIMULATOR
+ help
+ Link between boot args and user space program that loads the modem ELF
+
+
endif
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index 645657ccac7..77212ff2faa 100755
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_U8500_CPUFREQ) += cpufreq.o
obj-$(CONFIG_U8500_PM) += pm.o savecontext.o
obj-$(CONFIG_SENSORS1P_MOP) += sensors1p.o
obj-$(CONFIG_USB) += musb_db8500.o
+obj-$(CONFIG_U5500_MLOADER_HELPER) += mloader_helper.o
ifeq ($(CONFIG_MFD_STE_CONN), m)
obj-y += ste_conn_devices.o
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c
index 85b9f36c9be..3769bd68ddc 100755
--- a/arch/arm/mach-ux500/board-u5500.c
+++ b/arch/arm/mach-ux500/board-u5500.c
@@ -109,6 +109,12 @@ static struct amba_device *amba_board_devs[] __initdata = {
&ux500_uart2_device,
};
+static struct platform_device *u5500_platform_devices[] __initdata = {
+#ifdef CONFIG_U5500_MLOADER_HELPER
+ &mloader_helper_device,
+#endif
+};
+
static void __init u5500_init_machine(void)
{
stm_gpio_set_altfunctable(gpio_altfun_table,
@@ -121,6 +127,9 @@ static void __init u5500_init_machine(void)
u8500_register_device(&ux500_i2c_controller1, &u8500_i2c_1);
u8500_register_device(&ux500_i2c_controller2, &u8500_i2c_2);
u8500_register_device(&ux500_i2c_controller3, &u8500_i2c_3);
+
+ platform_add_devices(u5500_platform_devices,
+ ARRAY_SIZE(u5500_platform_devices));
}
MACHINE_START(NOMADIK, "ST-Ericsson U5500 Platform")
diff --git a/arch/arm/mach-ux500/devices.c b/arch/arm/mach-ux500/devices.c
index b838cfc8db0..711b02b45be 100755
--- a/arch/arm/mach-ux500/devices.c
+++ b/arch/arm/mach-ux500/devices.c
@@ -727,6 +727,13 @@ struct amba_device ux500_uart2_device = {
#endif
+#if defined(CONFIG_U5500_MLOADER_HELPER)
+struct platform_device mloader_helper_device = {
+ .name = "mloader_helper",
+ .id = -1,
+};
+#endif
+
void __init amba_add_devices(struct amba_device *devs[], int num)
{
int i;
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/include/mach/devices.h
index a5973d85d7d..c00a36cffed 100755
--- a/arch/arm/mach-ux500/include/mach/devices.h
+++ b/arch/arm/mach-ux500/include/mach/devices.h
@@ -51,6 +51,10 @@ extern struct amba_device ux500_uart0_device;
extern struct amba_device ux500_uart1_device;
extern struct amba_device ux500_uart2_device;
+#ifdef CONFIG_U5500_MLOADER_HELPER
+extern struct platform_device mloader_helper_device;
+#endif
+
/*
* Do not use inside drivers. Check it in the board file and alter platform
* data.