All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>
Cc: OpenBMC <openbmc@lists.ozlabs.org>,
	Gavin Shan <gwshan@linux.vnet.ibm.com>
Subject: Re: [PATCH linux 3/4] ftgmac100: Add devicetree option for the Aspeed g5 register interface
Date: Fri, 10 Jun 2016 14:08:25 +0200	[thread overview]
Message-ID: <575AADB9.5050501@kaod.org> (raw)
In-Reply-To: <CACPK8Xfe58gdYGV9QcdHVc2y3hp9AYpCtuFFUd1C-pHmNAy0=w@mail.gmail.com>

Hello, 

On 06/10/2016 10:46 AM, Joel Stanley wrote:
> On Thu, Jun 9, 2016 at 11:44 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
>> @@ -1346,6 +1358,15 @@ static int ftgmac100_probe(struct platform_device *pdev)
>>                 priv->use_ncsi = false;
>>         }
>>
>> +       if (pdev->dev.of_node &&
>> +           of_get_property(pdev->dev.of_node, "aspeed-g5-interface", NULL)) {
> 
> We should get our device tree experts to chime in here.
> 
> An alternative could be to use
> of_machine_is_compatible("aspeed,ast2500"). Then we don't need extra
> properties.

yes. That would be better.


So, given that there always has been fixes from Aspeed on the driver in
u-boot (see below), it seems that these EDO bits have been wrong since
the beginning in Linux.

I am wondering what how this was working. We should probably contact 
Aspeed to have some clarification.

C. 


Current SDK (fixed):

./u-boot-v2016.05-ast2500/drivers/net/ftgmac100.h://#define FTGMAC100_TXDES0_EDOTR		(1 << 15)
./u-boot-v2016.05-ast2500/drivers/net/ftgmac100.h:#define FTGMAC100_TXDES0_EDOTR		(1 << 30) //org is 15 ->30
./u-boot-v2016.05-ast2500/drivers/net/ftgmac100.h://#define FTGMAC100_RXDES0_EDORR		(1 << 15)
./u-boot-v2016.05-ast2500/drivers/net/ftgmac100.h:#define FTGMAC100_RXDES0_EDORR		(1 << 30)	//org 15->30
./u-boot-2013.01-aspeed/drivers/net/ftgmac100.h://#define FTGMAC100_TXDES0_EDOTR		(1 << 15)
./u-boot-2013.01-aspeed/drivers/net/ftgmac100.h:#define FTGMAC100_TXDES0_EDOTR		(1 << 30) //org is 15 ->30
./u-boot-2013.01-aspeed/drivers/net/ftgmac100.h://#define FTGMAC100_RXDES0_EDORR		(1 << 15)
./u-boot-2013.01-aspeed/drivers/net/ftgmac100.h:#define FTGMAC100_RXDES0_EDORR		(1 << 30)	//org 15->30

Older SDK (only aspeednic is fixed with a comment)

./u-boot-github-v2016.03-aspeed-openbmc/drivers/net/aspeednic.c://#define EDORR   0x00008000  /* Receive End Of Ring */
./u-boot-github-v2016.03-aspeed-openbmc/drivers/net/aspeednic.c:#define EDORR   0x40000000  /* Receive End Of Ring */
./u-boot-github-v2016.03-aspeed-openbmc/drivers/net/aspeednic.c://#define EDOTR   0x00008000  /* Transmit End Of Ring */
./u-boot-github-v2016.03-aspeed-openbmc/drivers/net/aspeednic.c:#define EDOTR   0x40000000  /* Transmit End Of Ring */
./u-boot-github-v2016.03-aspeed-openbmc/drivers/net/aspeednic.c:  rx_ring[rxRingSize - 1].status |= cpu_to_le32(EDORR);
./u-boot-github-v2016.03-aspeed-openbmc/drivers/net/aspeednic.c:  tx_ring[txRingSize - 1].status |= cpu_to_le32(EDOTR);

./u-boot-github-v2016.03-aspeed-openbmc/drivers/net/ftgmac100.h:#define FTGMAC100_TXDES0_EDOTR		(1 << 15)
./u-boot-github-v2016.03-aspeed-openbmc/drivers/net/ftgmac100.h:#define FTGMAC100_RXDES0_EDORR		(1 << 15)

Mainline (broken):

./u-boot/drivers/net/ftgmac100.h:#define FTGMAC100_TXDES0_EDOTR		(1 << 15)
./u-boot/drivers/net/ftgmac100.h:#define FTGMAC100_RXDES0_EDORR		(1 << 15)

  reply	other threads:[~2016-06-10 13:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10  4:44 [PATCH linux 0/4] Enable ftgmac100 driver on Aspeed g5 SoCs Andrew Jeffery
2016-06-10  4:44 ` [PATCH linux 1/4] aspeed: Use old MDC/MDIO interface for ftgmac100 driver compat Andrew Jeffery
2016-06-10  8:39   ` Joel Stanley
2016-06-10  4:44 ` [PATCH linux 2/4] ftgmac100: Separate rx page storage from rxdesc Andrew Jeffery
2016-06-10  4:44 ` [PATCH linux 3/4] ftgmac100: Add devicetree option for the Aspeed g5 register interface Andrew Jeffery
2016-06-10  8:46   ` Joel Stanley
2016-06-10 12:08     ` Cédric Le Goater [this message]
2016-06-23 17:09       ` Cédric Le Goater
2016-06-24  7:28         ` Joel Stanley
2016-06-24 17:18           ` Cédric Le Goater
2016-06-10  4:44 ` [PATCH linux 4/4] aspeed-g5: Configure ftgmac100s " Andrew Jeffery

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=575AADB9.5050501@kaod.org \
    --to=clg@kaod.org \
    --cc=andrew@aj.id.au \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.org \
    /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.