Patchwork [U-Boot,1/3] net: macb: using AT91FAMILY replace #ifdeferry

login
register
mail settings
Submitter Bo Shen
Date April 24, 2013, 7:59 a.m.
Message ID <1366790368-22327-2-git-send-email-voice.shen@atmel.com>
Download mbox | patch
Permalink /patch/239064/
State Accepted
Delegated to: Joe Hershberger
Headers show

Comments

Bo Shen - April 24, 2013, 7:59 a.m.
Using CONFIG_AT91FAMILY replace #ifdeferry for atmel SoC

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
 drivers/net/macb.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
Andreas Bießmann - May 8, 2013, 11:30 a.m.
On 04/24/2013 09:59 AM, Bo Shen wrote:
> Using CONFIG_AT91FAMILY replace #ifdeferry for atmel SoC
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>

Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>

> ---
>  drivers/net/macb.c |   10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index 8bacbda..753fb96 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -466,19 +466,13 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)
>  
>  	/* choose RMII or MII mode. This depends on the board */
>  #ifdef CONFIG_RMII
> -#if	defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
> -	defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
> -	defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
> -	defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)
> +#ifdef CONFIG_AT91FAMILY
>  	macb_writel(macb, USRIO, MACB_BIT(RMII) | MACB_BIT(CLKEN));
>  #else
>  	macb_writel(macb, USRIO, 0);
>  #endif
>  #else
> -#if	defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
> -	defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
> -	defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
> -	defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)
> +#ifdef CONFIG_AT91FAMILY
>  	macb_writel(macb, USRIO, MACB_BIT(CLKEN));
>  #else
>  	macb_writel(macb, USRIO, MACB_BIT(MII));
>
Andreas Bießmann - June 24, 2013, 2:57 p.m.
Hi Joe,

On 04/24/2013 09:59 AM, Bo Shen wrote:
> Using CONFIG_AT91FAMILY replace #ifdeferry for atmel SoC
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> ---
>  drivers/net/macb.c |   10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index 8bacbda..753fb96 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -466,19 +466,13 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)
>  
>  	/* choose RMII or MII mode. This depends on the board */
>  #ifdef CONFIG_RMII
> -#if	defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
> -	defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
> -	defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
> -	defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)
> +#ifdef CONFIG_AT91FAMILY
>  	macb_writel(macb, USRIO, MACB_BIT(RMII) | MACB_BIT(CLKEN));
>  #else
>  	macb_writel(macb, USRIO, 0);
>  #endif
>  #else
> -#if	defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
> -	defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
> -	defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
> -	defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)
> +#ifdef CONFIG_AT91FAMILY
>  	macb_writel(macb, USRIO, MACB_BIT(CLKEN));
>  #else
>  	macb_writel(macb, USRIO, MACB_BIT(MII));
> 

just realized that this patch is still not in u-boot/master. Will you
apply it (and the rest of the series) for this release?

Best regards

Andreas Bießmann
Joe Hershberger - June 25, 2013, 12:13 a.m.
On Mon, Jun 24, 2013 at 9:57 AM, Andreas Bießmann
<andreas.devel@googlemail.com> wrote:
> Hi Joe,
>
> On 04/24/2013 09:59 AM, Bo Shen wrote:
>> Using CONFIG_AT91FAMILY replace #ifdeferry for atmel SoC
>>
>> Signed-off-by: Bo Shen <voice.shen@atmel.com>
>> ---
>>  drivers/net/macb.c |   10 ++--------
>>  1 file changed, 2 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
>> index 8bacbda..753fb96 100644
>> --- a/drivers/net/macb.c
>> +++ b/drivers/net/macb.c
>> @@ -466,19 +466,13 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)
>>
>>       /* choose RMII or MII mode. This depends on the board */
>>  #ifdef CONFIG_RMII
>> -#if  defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
>> -     defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
>> -     defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
>> -     defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)
>> +#ifdef CONFIG_AT91FAMILY
>>       macb_writel(macb, USRIO, MACB_BIT(RMII) | MACB_BIT(CLKEN));
>>  #else
>>       macb_writel(macb, USRIO, 0);
>>  #endif
>>  #else
>> -#if  defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
>> -     defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
>> -     defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
>> -     defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)
>> +#ifdef CONFIG_AT91FAMILY
>>       macb_writel(macb, USRIO, MACB_BIT(CLKEN));
>>  #else
>>       macb_writel(macb, USRIO, MACB_BIT(MII));
>>
>
> just realized that this patch is still not in u-boot/master. Will you
> apply it (and the rest of the series) for this release?

Yes.  I have a PR ready now.

-Joe

Patch

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 8bacbda..753fb96 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -466,19 +466,13 @@  static int macb_init(struct eth_device *netdev, bd_t *bd)
 
 	/* choose RMII or MII mode. This depends on the board */
 #ifdef CONFIG_RMII
-#if	defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
-	defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
-	defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
-	defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)
+#ifdef CONFIG_AT91FAMILY
 	macb_writel(macb, USRIO, MACB_BIT(RMII) | MACB_BIT(CLKEN));
 #else
 	macb_writel(macb, USRIO, 0);
 #endif
 #else
-#if	defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
-	defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
-	defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
-	defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)
+#ifdef CONFIG_AT91FAMILY
 	macb_writel(macb, USRIO, MACB_BIT(CLKEN));
 #else
 	macb_writel(macb, USRIO, MACB_BIT(MII));