diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-02-24 12:11:30 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-03-15 15:16:37 +0100 |
commit | febffa9b2c022300d29f9e6b41b59739db4ca81a (patch) | |
tree | 41bc3208bf5cb46c49991df2f928a009d8be484c | |
parent | 32c555941f7406c7e661ae41be05415389d1fe01 (diff) | |
download | kernel_replicant_linux-febffa9b2c022300d29f9e6b41b59739db4ca81a.tar.gz kernel_replicant_linux-febffa9b2c022300d29f9e6b41b59739db4ca81a.tar.bz2 kernel_replicant_linux-febffa9b2c022300d29f9e6b41b59739db4ca81a.zip |
[HACK] Huge hack to keep the usb link on during HSIC re-enumeration
TODO:
- At least make it take the PHY number from the device tree, else
the kernel will be specific to only 1 device.
- Find a suitable API to hook that better.
- USB Hubs have a PORT_RESET feature.
See toolhub_ctl.pyin the gnuk git at https://git.gniibee.org/
for more details.
- RFKILL would probably not be accepted upstream because it's
only meant to cut radio emmissions (like cutting transmitting
antenna power).
Here's the boot log:
[root@u-boot-i9300 libsamsung-ipc]# git log --oneline HEAD~1..HEAD --no-decorate
e1fb643 device: generic: __FUNCTION__ -> __func__
[root@u-boot-i9300 libsamsung-ipc]# ./tools/ipc-test
[ipc] Starting generic modem boot
[ipc] open_android_modem_partition_by_name: Trying to open /dev/disk/by-partlabel/RADIO
[ipc] Mapped modem image data to memory
[ipc] Turned the modem off
generic_boot: xmm626_kernel_linux_modem_power(NULL, 1) = 0
generic_boot: xmm626_kernel_linux_modem_hci_power(1) = 0
[ipc] Turned the modem on
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ipc] Opened modem boot device
Bus 001 Device 002: ID 058b:0041 Infineon Technologies Flash Loader utility
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ipc] Wrote ATAT in ASCII
[ipc] Read chip id (0x16)
[ipc] Wrote PSI header
[ipc] Wrote PSI, CRC is 0xc8
[ipc] Wrote PSI CRC (0xc8)
[ipc] Read PSI CRC ACK
[ipc] Read PSI ACK
[ipc] Sent XMM626 HSIC PSI
[ipc] Wrote EBL size
[ipc] Wrote EBL, CRC is 0xb5
[ipc] Wrote EBL CRC (0xb5)
[ipc] Sent XMM626 HSIC EBL
[ipc] Read port config
[ipc] Sent XMM626 HSIC port config
Bus 001 Device 002: ID 058b:0041 Infineon Technologies Flash Loader utility
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ipc] Sent XMM626 HSIC SEC start
[ipc] Sent XMM626 HSIC firmware
Bus 001 Device 002: ID 058b:0041 Infineon Technologies Flash Loader utility
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ipc] Checked nv_data path
[ipc] Checked nv_data md5 path
[ipc] Calculated nv_data md5: 50e04bd1ae13445977f3aec356ada08d
[ipc] Read nv_data md5: 50e04bd1ae13445977f3aec356ada08d
[ipc] Checked nv_data backup path
[ipc] Loaded nv_data
[ipc] Sent XMM626 HSIC nv_data
[ipc] Sent XMM626 HSIC SEC end
Bus 001 Device 002: ID 058b:0041 Infineon Technologies Flash Loader utility
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ipc] Sent XMM626 HSIC HW reset
Bus 001 Device 002: ID 058b:0041 Infineon Technologies Flash Loader utility
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ipc] Waited for host wake
Bus 001 Device 002: ID 058b:0041 Infineon Technologies Flash Loader utility
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ipc] Turned off the modem
[ipc] Waited for host wake
[ipc] Turned the modem on
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ipc] Wait for the modem to come up again
Bus 001 Device 002: ID 1519:0020 Comneon HSIC Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ipc] generic_boot complete
ENTER xmm626_kernel_linux_modem_open
xmm626_kernel_linux_modem_open: type: 0
[ipc]
[ipc] xmm626_kernel_smdk4412_fmt_recv: Received FMT message
[ipc] xmm626_kernel_smdk4412_fmt_recv: Message: aseq=0xff, command=IPC_PWR_PHONE_PWR_UP, type=IPC_TYPE_NOTI, size=0
[ipc]
[ipc] xmm626_kernel_smdk4412_fmt_recv: Received FMT message
[ipc] xmm626_kernel_smdk4412_fmt_recv: Message: aseq=0x00, command=IPC_MISC_ME_IMSI, type=IPC_TYPE_NOTI, size=16
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | drivers/usb/host/ehci-exynos.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 54050ebf27aa..51f4a05de587 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -168,13 +168,22 @@ static ssize_t store_ehci_power(struct device *dev, dev_info(dev, "Powering off EHCI\n"); exynos_ehci->power_on = false; usb_remove_hcd(hcd); - exynos_ehci_phy_disable(dev); + /* TODO: at least take the phy number from the device tree */ + if (!IS_ERR(exynos_ehci->phy[1])) { + dev_info(dev, "Powering off EHCI phy #1\n"); + phy_power_off(exynos_ehci->phy[1]); + } + } else if (power_on) { dev_info(dev, "Powering on EHCI\n"); if (exynos_ehci->power_on) usb_remove_hcd(hcd); - exynos_ehci_phy_enable(dev); + /* TODO: at least take the phy number from the device tree */ + if (!IS_ERR(exynos_ehci->phy[1])) { + dev_info(dev, "Powering on EHCI phy #1\n"); + phy_power_on(exynos_ehci->phy[1]); + } writel(EHCI_INSNREG00_ENABLE_DMA_BURST | EHCI_INSNREG00_OHCI_SUSP_LEGACY, EHCI_INSNREG00(hcd->regs)); |