[Replicant] libsamsung-ipc on xmm6160 and ste m5730
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Mon Apr 6 15:16:06 UTC 2020
On Sun, 29 Mar 2020 13:05:08 -0700
Jonathan Bakker <xc-racer2 at live.ca> wrote:
> I have managed to get fourkbomb's kernel driver interface working on
> s5pv210. I don't know what its status is on exynos 4412 devices,
I've not worked on that part recently and it's still at the same state:
- I can boot the modem with ipc-test and receive samsung-ipc messages,
however I need to reboot after each tests. I didn't look into it yet
but in some drivers the .remove is not implemented if my memory is
correct.
- In the modem/5.4-with-usb-disconnection-during-modem-init
branch, the usb device is reset during the modem init, so you
loose adb for a short moment that needs to be fixed as well.
- The modem/5.2-without-usb-disconnections-during-modem-init doesn't
that issue but it's based on an older Linux version.
I also did lot of cleanup and fixes on top of forkbomb's code but I
still need to finish cleaning it up. I took forkbomb's most recent
branch at the time to base my work on.
What did you base your code on forkbomb's code directly?
In that case we probably have different fixes. For instance if my
memory is good there was some missing .remove in some drivers but I've
not implemented that yet and that's may be why I need to reboot after
each test.
I use the following repository for that kernel:
https://git.replicant.us/contrib/GNUtoo/kernel_replicant_linux/
> Good to know that there are plans to have a consistent coding style.
> I agree that the Linux code style makes sense for libsamsung-ipc
I've looked rapidly at your libsamsung-ipc patches, and most of the
patches don't touch much the existing code, so I guess it should be
possible to easily rebase your code on top if needed. I've just sent
patches to do this code style change.
If the rebase is too much time consuming for you, we could also make
some of your patches go in before merging this code style patch set,
with a priority for the code that touch paths that are also used for
other devices.
In any case I think it could also be a good idea to try sending the ones
that are the least intrusive and easiest to review first.
Modem abstraction
-----------------
About the "modem abstraction", the idea is that there are functions
like xmm626_kernel_smdk4412_* which, in forkbomb's libsamsung-ipc code
are modified. And in some part of the code, the only change was to use
a different / modified xmm626_kernel_smdk4412 function.
So my idea was just to wrap that in function that then call the actual
implementation, as it's usually done in the various Linux frameworks.
This is pretty easy to do.
What takes me time is choosing the name of the functions, and this
is not simple as we have very few information on how all that works
under the hood.
For instance we have:
- xmm626_kernel_smdk4412_power which calls IOCTL_MODEM_ON
and:
- xmm626_kernel_smdk4412_boot_power which calls IOCTL_MODEM_BOOT_ON.
And it would be better to have names that really describes what
is done under the hood rather that basing them on the ioctl name.
I've started to document all what I found here:
https://redmine.replicant.us/projects/replicant/wiki/XMMBoot
This also helps me understand the GPIO interface between the modem and
the SOC (Exynos 4412).
As I will also need to understand how it works in greater details
anyway if I want try to upstreaming some of the modem drivers, I
took that as an opportunity to do that research now.
However if you need to rebase and merge your code sooner, I could
finish and rebase all the code I have sooner, especially the modem
abstraction part, leaving the function name choice for later.
As the function names won't be exposed outside of the library, we could
also improve them later on without any drawbacks.
Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20200406/d3c6b5ec/attachment.asc>
More information about the Replicant
mailing list