Re: [PATCH 3/8] mci: Add dwcmshc-sdhci driver

2023-07-10 Thread Sam Ravnborg
Hi Jules. On Mon, Jul 10, 2023 at 07:23:30PM +0200, Jules Maselbas wrote: > This driver initially started as a modification of dove-sdhci driver, > it has been heavily reworked to be closer to rockchip-dwcmshc-sdhci by > using more common sdhci code. > > Signed-off-by: Jules Maselbas > --- > dr

[PATCH 1/7] mci: sdhci: Add registers defines

2023-07-10 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/mci/sdhci.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mci/sdhci.h b/drivers/mci/sdhci.h index fe8c25cb9c..50179de0e6 100644 --- a/drivers/mci/sdhci.h +++ b/drivers/mci/sdhci.h @@ -117,6 +117,9 @@ #define SDHCI_INT_ERROR_ENABLE

[PATCH 3/8] mci: Add dwcmshc-sdhci driver

2023-07-10 Thread Jules Maselbas
This driver initially started as a modification of dove-sdhci driver, it has been heavily reworked to be closer to rockchip-dwcmshc-sdhci by using more common sdhci code. Signed-off-by: Jules Maselbas --- drivers/mci/Kconfig | 8 + drivers/mci/Makefile| 1 + drivers/mci/dwcms

[PATCH 7/8] mci: sdhci: Force DMA update to the next block boundary

2023-07-10 Thread Jules Maselbas
When working with 64-bit DMA the DMA addresse is stored in two 32-bit registers, different from the usual 32-bit one. Copy what is done by Linux which simple and is also a workaround for some broken controller. Note: in case the 64-bit DMA address needs to be read, it must be done by reading the 3

[PATCH 8/8] mci: dwcmshc: Use sdhci_enable_v4_mode()

2023-07-10 Thread Jules Maselbas
Enable the use of the common sdhci code path by using sdhci_enable_v4_mode(). This removes a bunch of functions that configured v4_mode and 64-bit dma in the dwcmshc driver, which is now handled by common sdhci code. Signed-off-by: Jules Maselbas --- drivers/mci/dwcmshc-sdhci.c | 174 ++-

[PATCH 1/8] mci: sdhci: Set 8-bit host caps

2023-07-10 Thread Jules Maselbas
Set the mci::host_cap MMC_CAP_8_BIT_DATA if supported by the hardware. Signed-off-by: Jules Maselbas --- drivers/mci/sdhci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mci/sdhci.c b/drivers/mci/sdhci.c index 635884e2a2..f6deea4020 100644 --- a/drivers/mci/sdhci.c +++ b/driver

[PATCH 6/8] mci: sdhci: Add 64-bit DMA addressing suport for V4 mode

2023-07-10 Thread Jules Maselbas
Adapted from Linux commit: 8<-- commit 685e444bbaa0a5ed959f39dbb2f219eb44c30421 Author: Chunyan Zhang Date: Thu Aug 30 16:21:40 2018 +0800 mmc: sdhci: Add ADMA2 64-bit addressing support for V4 mode ADMA2 64-bit addres

[PATCH 4/8] mci: sdhci: Actually return the error code instead of 0

2023-07-10 Thread Jules Maselbas
The sdhci_transfer_data_dma function always returned 0 even in case of an error, fix this. Fixes: 60b608b271 ("mci: sdhci: Add DMA transfer helpers") Signed-off-by: Jules Maselbas --- drivers/mci/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mci/sdhci.c b/dr

[PATCH 2/8] mci: sdhci: Add registers defines

2023-07-10 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/mci/sdhci.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mci/sdhci.h b/drivers/mci/sdhci.h index fe8c25cb9c..50179de0e6 100644 --- a/drivers/mci/sdhci.h +++ b/drivers/mci/sdhci.h @@ -117,6 +117,9 @@ #define SDHCI_INT_ERROR_ENABLE

[PATCH 5/8] mci: sdhci: Add sd host v4 mode

2023-07-10 Thread Jules Maselbas
Adapted from Linux commit: 8<-- commit b3f80b434f7261c7ef8922f78589942d02e104f9 Author: Chunyan Zhang Date: Thu Aug 30 16:21:38 2018 +0800 mmc: sdhci: Add sd host v4 mode For SD host controller version 4.00 or later on

Re: [PATCH 3/7] net: phy: sync phy_{write,read,modify}_mmd_indirect with linux

2023-07-10 Thread Ahmad Fatoum
On 10.07.23 14:43, Marco Felsch wrote: > On 23-07-10, Ahmad Fatoum wrote: >> On 10.07.23 13:01, Marco Felsch wrote: >>> On 23-07-10, Ahmad Fatoum wrote: Hello Marco, On 10.07.23 12:49, Marco Felsch wrote: > On 23-07-10, Ahmad Fatoum wrote: >> On 10.07.23 08:36, Marco Felsch w

Re: [PATCH 3/7] net: phy: sync phy_{write,read,modify}_mmd_indirect with linux

2023-07-10 Thread Marco Felsch
On 23-07-10, Ahmad Fatoum wrote: > On 10.07.23 13:01, Marco Felsch wrote: > > On 23-07-10, Ahmad Fatoum wrote: > >> Hello Marco, > >> > >> On 10.07.23 12:49, Marco Felsch wrote: > >>> On 23-07-10, Ahmad Fatoum wrote: > On 10.07.23 08:36, Marco Felsch wrote: > > Sync the barebox phy_{write,

Re: [PATCH 5/7] net: phy: at803x: add support for configuring SmartEEE

2023-07-10 Thread Oleksij Rempel
Am 10.07.23 um 12:10 schrieb Ahmad Fatoum: On 10.07.23 08:36, Marco Felsch wrote: This commit port Linux commit: | commit 390b4cad81484124db2b676ed20a265adc032bae | Author: Russell King | Date: Thu Jan 14 10:45:49 2021 + | | net: phy: at803x: add support for configuring SmartEEE | |

Re: [PATCH 6/7] net: phy: at803x: add disable hibernation mode support

2023-07-10 Thread Ahmad Fatoum
On 10.07.23 12:53, Marco Felsch wrote: > On 23-07-10, Ahmad Fatoum wrote: >> On 10.07.23 08:36, Marco Felsch wrote: >>> This commit ports Linux commit: >>> >>> | commit 9ecf04016c87bcb33b44e24489d33618e2592f41 >>> | Author: Wei Fang >>> | Date: Thu Aug 18 11:00:54 2022 +0800 >>> | >>> | net:

Re: [PATCH 3/7] net: phy: sync phy_{write,read,modify}_mmd_indirect with linux

2023-07-10 Thread Ahmad Fatoum
On 10.07.23 13:01, Marco Felsch wrote: > On 23-07-10, Ahmad Fatoum wrote: >> Hello Marco, >> >> On 10.07.23 12:49, Marco Felsch wrote: >>> On 23-07-10, Ahmad Fatoum wrote: On 10.07.23 08:36, Marco Felsch wrote: > Sync the barebox phy_{write,read,modify}_mmd_indirect API with the Linux

Re: [PATCH 3/7] net: phy: sync phy_{write,read,modify}_mmd_indirect with linux

2023-07-10 Thread Marco Felsch
On 23-07-10, Ahmad Fatoum wrote: > Hello Marco, > > On 10.07.23 12:49, Marco Felsch wrote: > > On 23-07-10, Ahmad Fatoum wrote: > >> On 10.07.23 08:36, Marco Felsch wrote: > >>> Sync the barebox phy_{write,read,modify}_mmd_indirect API with the Linux > >>> phy_{write,read,modify}_mmd API to make i

Re: [PATCH 6/7] net: phy: at803x: add disable hibernation mode support

2023-07-10 Thread Marco Felsch
On 23-07-10, Ahmad Fatoum wrote: > On 10.07.23 08:36, Marco Felsch wrote: > > This commit ports Linux commit: > > > > | commit 9ecf04016c87bcb33b44e24489d33618e2592f41 > > | Author: Wei Fang > > | Date: Thu Aug 18 11:00:54 2022 +0800 > > | > > | net: phy: at803x: add disable hibernation mod

Re: [PATCH 3/7] net: phy: sync phy_{write,read,modify}_mmd_indirect with linux

2023-07-10 Thread Ahmad Fatoum
Hello Marco, On 10.07.23 12:49, Marco Felsch wrote: > On 23-07-10, Ahmad Fatoum wrote: >> On 10.07.23 08:36, Marco Felsch wrote: >>> Sync the barebox phy_{write,read,modify}_mmd_indirect API with the Linux >>> phy_{write,read,modify}_mmd API to make it easier and less error prone >>> to port phy d

Re: [PATCH 3/7] net: phy: sync phy_{write,read,modify}_mmd_indirect with linux

2023-07-10 Thread Marco Felsch
On 23-07-10, Ahmad Fatoum wrote: > On 10.07.23 08:36, Marco Felsch wrote: > > Sync the barebox phy_{write,read,modify}_mmd_indirect API with the Linux > > phy_{write,read,modify}_mmd API to make it easier and less error prone > > to port phy drivers. This also fixes the r8169 driver since this driv

Re: [PATCH 2/7] net: phy: micrel: make use of MDIO_MMD register defines

2023-07-10 Thread Marco Felsch
On 23-07-10, Ahmad Fatoum wrote: > On 10.07.23 08:36, Marco Felsch wrote: > > Make use of the register definition instead of having magic numbers. No > > functional change. > > > > Signed-off-by: Marco Felsch > > FYI, the code is taken from Linux (with arguments swapped). Patch opportunities ^^

Re: [PATCH 5/7] net: phy: at803x: add support for configuring SmartEEE

2023-07-10 Thread Ahmad Fatoum
On 10.07.23 08:36, Marco Felsch wrote: > This commit port Linux commit: > > | commit 390b4cad81484124db2b676ed20a265adc032bae > | Author: Russell King > | Date: Thu Jan 14 10:45:49 2021 + > | > | net: phy: at803x: add support for configuring SmartEEE > | > | SmartEEE for the atheros

Re: [PATCH 6/7] net: phy: at803x: add disable hibernation mode support

2023-07-10 Thread Ahmad Fatoum
On 10.07.23 08:36, Marco Felsch wrote: > This commit ports Linux commit: > > | commit 9ecf04016c87bcb33b44e24489d33618e2592f41 > | Author: Wei Fang > | Date: Thu Aug 18 11:00:54 2022 +0800 > | > | net: phy: at803x: add disable hibernation mode support > | > | When the cable is unplugged

Re: [PATCH 7/7] net: phy: at803x: disable extended next page bit

2023-07-10 Thread Ahmad Fatoum
On 10.07.23 08:36, Marco Felsch wrote: > This commit ports Linux commit: > > | commit 3c51fa5d2afe7a4909b53af5019635326389dd29 > | Author: Russell King > | Date: Tue Jan 12 22:59:43 2021 + > | > | net: phy: ar803x: disable extended next page bit > | > | This bit is enabled by defaul

Re: [PATCH 4/7] net: phy: add phydev_{err,err_probe,info,warn,dbg} macros

2023-07-10 Thread Ahmad Fatoum
On 10.07.23 08:36, Marco Felsch wrote: > Import Linux macros to make it easier to port drivers to barebox. > > Signed-off-by: Marco Felsch Reviewed-by: Ahmad Fatoum > --- > include/linux/phy.h | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/include/linux/phy.h b/inc

Re: [PATCH 3/7] net: phy: sync phy_{write,read,modify}_mmd_indirect with linux

2023-07-10 Thread Ahmad Fatoum
On 10.07.23 08:36, Marco Felsch wrote: > Sync the barebox phy_{write,read,modify}_mmd_indirect API with the Linux > phy_{write,read,modify}_mmd API to make it easier and less error prone > to port phy drivers. This also fixes the r8169 driver since this driver > did not adapt the parameters while p

Re: [PATCH 2/7] net: phy: micrel: make use of MDIO_MMD register defines

2023-07-10 Thread Ahmad Fatoum
On 10.07.23 08:36, Marco Felsch wrote: > Make use of the register definition instead of having magic numbers. No > functional change. > > Signed-off-by: Marco Felsch FYI, the code is taken from Linux (with arguments swapped). Change is ok though: Reviewed-by: Ahmad Fatoum > --- > drivers/ne

Re: [PATCH 1/7] ARM: boards: make use of MDIO_MMD register defines

2023-07-10 Thread Ahmad Fatoum
On 10.07.23 08:36, Marco Felsch wrote: > Make use of the register definition instead of having magic numbers. No > functional change. > > Signed-off-by: Marco Felsch Reviewed-by: Ahmad Fatoum > --- > arch/arm/boards/datamodul-edm-qmx6/board.c | 7 --- > arch/arm/boards/embest-marsboard/