From: Patrice CHOTARD <patrice.chotard@st.com>
To: u-boot@lists.denx.de
Subject: [PATCH v4 1/5] cmd: bind: allow to bind driver with driver data
Date: Tue, 28 Jul 2020 09:10:51 +0000 [thread overview]
Message-ID: <3ab782f6-81f5-fdde-06e6-f2d8ab35a74f@st.com> (raw)
In-Reply-To: <20200707200859.GA10034@bill-the-cat>
Hi Tom
On 7/7/20 10:08 PM, Tom Rini wrote:
> On Thu, Apr 30, 2020 at 12:06:15PM +0200, Patrice Chotard wrote:
>
>> Initial implementation invokes device_bind_with_driver_data()
>> with driver_data parameter equal to 0.
>> For driver with driver data, the bind command can't bind
>> correctly this driver or even worse causes data abort as shown below:
>>
>> As example, for debug purpose on STM32MP1 platform, ethernet (dwc_eth_qos.c)
>> driver needed to be unbinded/binded. This driver is using driver data:
>>
>> static const struct udevice_id eqos_ids[] = {
>> {
>> .compatible = "nvidia,tegra186-eqos",
>> .data = (ulong)&eqos_tegra186_config
>> },
>> {
>> .compatible = "snps,dwmac-4.20a",
>> .data = (ulong)&eqos_stm32_config
>> },
>>
>> { }
>> };
>>
>> After unbinding/binding this driver and probing it (with the dhcp command),
>> we got a prefetch abort as below:
>>
>> STM32MP> unbind eth ethernet at 5800a000
>> STM32MP> bind /soc/ethernet at 5800a000 eth_eqos
>> STM32MP> dhcp
>> prefetch abort
>> pc : [<4310801c>] lr : [<ffc8f4ad>]
>> reloc pc : [<035ba01c>] lr : [<c01414ad>]
>> sp : fdaf19b0 ip : ffcea83c fp : 00000001
>> r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
>> r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
>> r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
>> Flags: nZCv IRQs off FIQs off Mode SVC_32
>> Code: data abort
>> pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
>> reloc pc : [<c01019c0>] lr : [<c01019ad>]
>> sp : fdaf18b8 ip : 00000000 fp : 00000001
>> r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
>> r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
>> r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
>> Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
>> Code: 2f00 d1e9 2c00 dce9 (f855) 2024
>> Resetting CPU ...
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
> Sorry for the delay in getting to this. Currently, this breaks the dm
> unit tests on sandbox, can you please investigate? Thanks!
>
A v5 has been submitted fixing the dm unit test regression
Thanks
Patrice
next prev parent reply other threads:[~2020-07-28 9:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 10:06 [PATCH v4 0/5] cmd: bind allow to bind driver with driver_data Patrice Chotard
2020-04-30 10:06 ` [PATCH v4 1/5] cmd: bind: allow to bind driver with driver data Patrice Chotard
2020-07-07 20:08 ` Tom Rini
2020-07-27 14:25 ` Patrice CHOTARD
2020-07-27 14:35 ` Tom Rini
2020-07-27 14:38 ` Patrice CHOTARD
2020-07-28 9:10 ` Patrice CHOTARD [this message]
2020-04-30 10:06 ` [PATCH v4 2/5] sandbox: phy: add driver_data for bind test cmd Patrice Chotard
2020-04-30 10:06 ` [PATCH v4 3/5] sandbox: dts: Add compatible string for bind-test node Patrice Chotard
2020-04-30 10:06 ` [PATCH v4 4/5] test/py: Update test_bind Patrice Chotard
2020-04-30 10:06 ` [PATCH v4 5/5] doc: add bind/unbind command documentation Patrice Chotard
2020-05-08 1:36 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ab782f6-81f5-fdde-06e6-f2d8ab35a74f@st.com \
--to=patrice.chotard@st.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.