Browse files

Changes the modem firmware download process to work on the SGS device…

…s, fixed the GPIO mapping.

Use the right GPIO to tell the BP it should turn on. The SGS BP Bootloader won't tell us
that is has booted properly. We miss the magic value MODEM_MSG_SBL_DONE.
So we wait some time an then continue booting the BP.

The firmware is send from userspace in what is loaded by the rild.
It reads the firmware from /dev/mtd/mtd5ro and passes it to the modem. It is tested with
JPM modem from GT-I9000. Userspace won't notice that the radio interface is there until you lock the phone
and unlock it. Looks like a little phone state polling problem.
  • Loading branch information...
1 parent 1cd8330 commit b7cb06bc05d0c22001f20d10c7d6a8387444a028 @coolya coolya committed Dec 22, 2010
@@ -330,7 +330,11 @@
#define GPIO_GPH10 S5PV210_GPH1(0)
+#define GPIO_PDA_ACTIVE S5PV210_MP03(3)
#define GPIO_PDA_ACTIVE S5PV210_GPH1(1)
#define GPIO_GPH12 S5PV210_GPH1(2)
#define GPIO_nINT_ONEDRAM_AP S5PV210_GPH1(3)
@@ -463,6 +463,15 @@ source "drivers/misc/iwmc3200top/Kconfig"
bool "Samsung Modem Control/IO Driver"
+ bool "Samsung Modem Control/IO Driver Bootloader is crap"
+ help
+ If you use the Samsung Modem Control driver on the older
+ SGS devices the bootloader won't tell you that it finished
+ loading. This is a workaround for that, it only waits some
+ time and tries to to continue.
config PN544
bool "NXP PN544 NFC Controller Driver"
default n
@@ -2,6 +2,7 @@
* Copyright (C) 2010 Google, Inc.
* Copyright (C) 2010 Samsung Electronics.
+ * Copyright (C) 2010 Kolja Dummann (
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -292,10 +293,23 @@ static int modem_start(struct modemctl *mc, int ramdump)
return -EINVAL;
+ /* we do this as the BP bootloader from the SGS is a little bit
+ crapy it does not send the magic data MODEM_MSG_SBL_DONE when
+ it has finished loading. so we wait some amount of time */
+ pr_info("[MODEM] we have a crappy bootloader an wait for it");
+ //waiting 1500 ms should be enough, maybe we can decrease this but unsure
+ msleep(1500);
if (readl(mc->mmio + OFF_MBOX_BP) != MODEM_MSG_SBL_DONE) {
pr_err("[MODEM] bootloader not ready\n");
return -EIO;
if (mmio_sem(mc) != 1) {
pr_err("[MODEM] we do not own the semaphore\n");

0 comments on commit b7cb06b

Please sign in to comment.