| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The number of ops implementable by MCI drivers increase due to HS200
support and will increase more for HS400. Collecting them into a common
struct makes it easier to specialize them for drivers that support
multiple variants and makes code more similar to Linux.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240517060944.3298926-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
Linux uses a different sdhci_wait_idle function than what barebox
currently does. For HS200 support, the linux version needs to be used.
As currently only arasan-sdhci is tested with HS200, keep the old
sdhci_wait_idle as sdhci_wait_idle_data and convert all users of it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Waiting for the controller being idle is a common pattern in the
different SDHCI drivers we have. Add a common function for it.
Link: https://lore.barebox.org/20230803105003.4088205-15-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
According to the Kernel the DLL should only be enabled for clock
frequencies higher than 52MHz. Do likewise in barebox. Without this
we get
ERROR: rk3568-dwcmshc-sdhci fe2e0000.mmc@fe2e0000.of: DLL lock timeout!
On a RK3588.
The patch is bigger than it actually needs to be. We are updating
register defines with it and move the "Disable cmd conflict check"
block further up to bring the code closer to the corresponding kernel
code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
rockchip,rk3588-dwcmshc can be supported out of the box, add the
compatible string for it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Syncing device trees with Linux upstream can lead to breakage, when
the device trees are switched to newer bindings, which are not yet
supported in barebox. To make it easier to spot such issues, we want to
start applying some heuristics to flag possibly problematic DT changes.
One step towards being able to do that is to know what nodes barebox
actually consumes. Most of the nodes have a compatible entry, which is
matched by an array of of_device_id, so let's have MODULE_DEVICE_TABLE
point at it for future extraction.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230612125908.1087340-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
We have sdhci_reset() which does the same as the driver specific
variant. Use the common function instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have different driver specific variants of functions polling for the
device ready in the tree. Add a common sdhci_wait_for_done() and use
it where appropriate. This fixes a few deficiencies with the driver
specific variants.
rk_sdhci_wait_for_done() didn't check the SDHCI_INT_TIMEOUT bit and
returned -EPERM instead when it ought to return -ETIMEDOUT. The core
tries to detect a SD card first and expects a -ETIMEDOUT for the setup
command when really a eMMC is connected. Only with a -ETIMEDOUT the core
tries to detect a eMMC next.
at91_sdhci_wait_for_done() returned the status instead of the expected
0 value for success.
Link: https://lore.barebox.org/20230321095056.1333669-1-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Some commands are expected to return errors, for example when a non
SDIO card is tested for being an SDIO card. Lower the priority of
these error messages to dev_dbg().
Link: https://lore.barebox.org/20230217094056.1894461-4-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The '_d' suffix was originally meant to distinguish barebox struct
names from Linux struct names. struct driver doesn't exist in Linux,
so we can rename it and remove the meaningless suffix.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20221214123512.189688-4-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The '_d' suffix was originally introduced in case we want to import
Linux struct device as a separate struct into barebox. Over time it
became clear that this won't happen, instead barebox struct device_d
is basically the same as Linux struct device. Rename the struct name
accordingly to make porting Linux code easier.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
This adds support for a Rockchip derivation of the DWCMSHC controller
which itself is a SDHCI controller found on some Rockchip SoCs like the
RK3568.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20210607104411.23071-13-s.hauer@pengutronix.de
Link: https://lore.barebox.org/20210610144720.25620-3-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|