diff mbox series

[U-Boot,2/4] sata: sata_mv: support kirkwood architecture

Message ID 20190403212831.29886-3-michael@walle.cc
State Accepted
Commit 6d294971234005d75b50856371e04fb3fa3e6720
Delegated to: Stefan Roese
Headers show
Series ARM: kirkwood: lsxl: enable DM for SATA | expand

Commit Message

Michael Walle April 3, 2019, 9:28 p.m. UTC
Fix the worng include and offset macros.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 drivers/ata/sata_mv.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Chris Packham April 4, 2019, 7:11 a.m. UTC | #1
On Thu, Apr 4, 2019 at 10:28 AM Michael Walle <michael@walle.cc> wrote:
>
> Fix the worng include and offset macros.

Typo worng -> wrong

>
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
>  drivers/ata/sata_mv.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> index 87ea95f75d..b691107dc0 100644
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
> @@ -44,11 +44,10 @@
>  #include <asm/io.h>
>  #include <linux/mbus.h>
>
> +#include <asm/arch/soc.h>
>  #if defined(CONFIG_KIRKWOOD)
> -#include <asm/arch/kirkwood.h>
>  #define SATAHC_BASE            KW_SATA_BASE
>  #else
> -#include <asm/arch/soc.h>
>  #define SATAHC_BASE            MVEBU_AXP_SATA_BASE
>  #endif

It might be a better idea to update these defines to be definitions
for these in the soc.h. We're already doing this for some other
peripheral blocks between mach-kirkwood and mach-mvebu. On the other
hand SATAHC_BASE already achieves this so maybe it's not worth
bothering.

>
> @@ -218,8 +217,8 @@ struct crqb {
>  #define CRQB_SECTCOUNT_COUNT_EXP_MASK  (0xff << 8)
>  #define CRQB_SECTCOUNT_COUNT_EXP_SHIFT 8
>
> -#define MVSATA_WIN_CONTROL(w)  (MVEBU_AXP_SATA_BASE + 0x30 + ((w) << 4))
> -#define MVSATA_WIN_BASE(w)     (MVEBU_AXP_SATA_BASE + 0x34 + ((w) << 4))
> +#define MVSATA_WIN_CONTROL(w)  (SATAHC_BASE + 0x30 + ((w) << 4))
> +#define MVSATA_WIN_BASE(w)     (SATAHC_BASE + 0x34 + ((w) << 4))
>
>  struct eprd {
>         u32 phyaddr_low;
> --
> 2.11.0
>
Stefan Roese April 4, 2019, 3:18 p.m. UTC | #2
On 03.04.19 23:28, Michael Walle wrote:
> Fix the worng include and offset macros.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
>   drivers/ata/sata_mv.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> index 87ea95f75d..b691107dc0 100644
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
> @@ -44,11 +44,10 @@
>   #include <asm/io.h>
>   #include <linux/mbus.h>
>   
> +#include <asm/arch/soc.h>
>   #if defined(CONFIG_KIRKWOOD)
> -#include <asm/arch/kirkwood.h>
>   #define SATAHC_BASE		KW_SATA_BASE
>   #else
> -#include <asm/arch/soc.h>
>   #define SATAHC_BASE		MVEBU_AXP_SATA_BASE
>   #endif
>   
> @@ -218,8 +217,8 @@ struct crqb {
>   #define CRQB_SECTCOUNT_COUNT_EXP_MASK	(0xff << 8)
>   #define CRQB_SECTCOUNT_COUNT_EXP_SHIFT	8
>   
> -#define MVSATA_WIN_CONTROL(w)	(MVEBU_AXP_SATA_BASE + 0x30 + ((w) << 4))
> -#define MVSATA_WIN_BASE(w)	(MVEBU_AXP_SATA_BASE + 0x34 + ((w) << 4))
> +#define MVSATA_WIN_CONTROL(w)	(SATAHC_BASE + 0x30 + ((w) << 4))
> +#define MVSATA_WIN_BASE(w)	(SATAHC_BASE + 0x34 + ((w) << 4))
>   
>   struct eprd {
>   	u32 phyaddr_low;
> 

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
Stefan Roese April 4, 2019, 3:21 p.m. UTC | #3
On 04.04.19 09:11, Chris Packham wrote:
> On Thu, Apr 4, 2019 at 10:28 AM Michael Walle <michael@walle.cc> wrote:
>>
>> Fix the worng include and offset macros.
> 
> Typo worng -> wrong
> 
>>
>> Signed-off-by: Michael Walle <michael@walle.cc>
>> ---
>>   drivers/ata/sata_mv.c | 7 +++----
>>   1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
>> index 87ea95f75d..b691107dc0 100644
>> --- a/drivers/ata/sata_mv.c
>> +++ b/drivers/ata/sata_mv.c
>> @@ -44,11 +44,10 @@
>>   #include <asm/io.h>
>>   #include <linux/mbus.h>
>>
>> +#include <asm/arch/soc.h>
>>   #if defined(CONFIG_KIRKWOOD)
>> -#include <asm/arch/kirkwood.h>
>>   #define SATAHC_BASE            KW_SATA_BASE
>>   #else
>> -#include <asm/arch/soc.h>
>>   #define SATAHC_BASE            MVEBU_AXP_SATA_BASE
>>   #endif
> 
> It might be a better idea to update these defines to be definitions
> for these in the soc.h. We're already doing this for some other
> peripheral blocks between mach-kirkwood and mach-mvebu. On the other
> hand SATAHC_BASE already achieves this so maybe it's not worth
> bothering.

I'm fine with this change for now. *If* we change something here, we
might make the step towards address probing via DT. But that's some
future work, if it's really worth it. As we most likely won't see new
platforms with new addresses to support any more.

Thanks,
Stefan
Stefan Roese April 11, 2019, 12:10 p.m. UTC | #4
On 03.04.19 23:28, Michael Walle wrote:
> Fix the worng include and offset macros.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>

Applied to u-boot-marvell/master.

Thanks,
Stefan
diff mbox series

Patch

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 87ea95f75d..b691107dc0 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -44,11 +44,10 @@ 
 #include <asm/io.h>
 #include <linux/mbus.h>
 
+#include <asm/arch/soc.h>
 #if defined(CONFIG_KIRKWOOD)
-#include <asm/arch/kirkwood.h>
 #define SATAHC_BASE		KW_SATA_BASE
 #else
-#include <asm/arch/soc.h>
 #define SATAHC_BASE		MVEBU_AXP_SATA_BASE
 #endif
 
@@ -218,8 +217,8 @@  struct crqb {
 #define CRQB_SECTCOUNT_COUNT_EXP_MASK	(0xff << 8)
 #define CRQB_SECTCOUNT_COUNT_EXP_SHIFT	8
 
-#define MVSATA_WIN_CONTROL(w)	(MVEBU_AXP_SATA_BASE + 0x30 + ((w) << 4))
-#define MVSATA_WIN_BASE(w)	(MVEBU_AXP_SATA_BASE + 0x34 + ((w) << 4))
+#define MVSATA_WIN_CONTROL(w)	(SATAHC_BASE + 0x30 + ((w) << 4))
+#define MVSATA_WIN_BASE(w)	(SATAHC_BASE + 0x34 + ((w) << 4))
 
 struct eprd {
 	u32 phyaddr_low;