linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Parvathi Pudi <parvathi@couthit.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: nm@ti.com, Vignesh Raghavendra <vigneshr@ti.com>,
	praneeth@ti.com, edumazet@google.com,
	krishna <krishna@couthit.com>, pmohan <pmohan@couthit.com>,
	diogo ivo <diogo.ivo@siemens.com>,
	robh@kernel.org,
	javier carrasco cruz <javier.carrasco.cruz@gmail.com>,
	m-karicheri2@ti.com, basharath <basharath@couthit.com>,
	kuba@kernel.org, pabeni@redhat.com, devicetree@vger.kernel.org,
	conor+dt@kernel.org, schnelle@linux.ibm.com,
	mohan <mohan@couthit.com>,
	richardcochran@gmail.com, Prajith Jayarajan <prajith@ti.com>,
	rogerq <rogerq@kernel.org>,
	jacob e keller <jacob.e.keller@intel.com>,
	ssantosh@kernel.org, linux-arm-kernel@lists.infradead.org,
	rogerq@ti.com, srk@ti.com, pratheesh <pratheesh@ti.com>,
	m-malladi@ti.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, danishanwar <danishanwar@ti.com>,
	afd@ti.com, andrew+netdev@lunn.ch,
	parvathi <parvathi@couthit.com>,
	horms@kernel.org, krzk+dt@kernel.org, davem@davemloft.net
Subject: Re: [PATCH net-next v3 04/10] net: ti: prueth: Adds link detection, RX and TX support.
Date: Tue, 18 Feb 2025 15:28:29 +0530 (IST)	[thread overview]
Message-ID: <1901840071.600762.1739872709135.JavaMail.zimbra@couthit.local> (raw)
In-Reply-To: <20250214164422.1bb58a89@fedora.home>


Hi,

> On Fri, 14 Feb 2025 13:07:51 +0530
> parvathi <parvathi@couthit.com> wrote:
> 
>> From: Roger Quadros <rogerq@ti.com>
>> 
>> Changes corresponding to link configuration such as speed and duplexity.
>> IRQ and handler initializations are performed for packet reception.Firmware
>> receives the packet from the wire and stores it into OCMC queue. Next, it
>> notifies the CPU via interrupt. Upon receiving the interrupt CPU will
>> service the IRQ and packet will be processed by pushing the newly allocated
>> SKB to upper layers.
>> 
>> When the user application want to transmit a packet, it will invoke
>> sys_send() which will inturn invoke the PRUETH driver, then it will write
>> the packet into OCMC queues. PRU firmware will pick up the packet and
>> transmit it on to the wire.
>> 
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> Signed-off-by: Andrew F. Davis <afd@ti.com>
>> Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>
>> Signed-off-by: Parvathi Pudi <parvathi@couthit.com>
> 
> 
>> +/* update phy/port status information for firmware */
>> +static void icssm_emac_update_phystatus(struct prueth_emac *emac)
>> +{
>> +	struct prueth *prueth = emac->prueth;
>> +	u32 phy_speed, port_status = 0;
>> +	enum prueth_mem region;
>> +	u32 delay;
>> +
>> +	region = emac->dram;
>> +	phy_speed = emac->speed;
>> +	icssm_prueth_write_reg(prueth, region, PHY_SPEED_OFFSET, phy_speed);
>> +
>> +	delay = TX_CLK_DELAY_100M;
>> +
>> +	delay = delay << PRUSS_MII_RT_TXCFG_TX_CLK_DELAY_SHIFT;
>> +
>> +	if (emac->port_id) {
>> +		regmap_update_bits(prueth->mii_rt,
>> +				   PRUSS_MII_RT_TXCFG1,
>> +				   PRUSS_MII_RT_TXCFG_TX_CLK_DELAY_MASK,
>> +				   delay);
>> +	} else {
>> +		regmap_update_bits(prueth->mii_rt,
>> +				   PRUSS_MII_RT_TXCFG0,
>> +				   PRUSS_MII_RT_TXCFG_TX_CLK_DELAY_MASK,
>> +				   delay);
>> +	}
>> +
>> +	if (emac->link)
>> +		port_status |= PORT_LINK_MASK;
>> +
>> +	writeb(port_status, prueth->mem[region].va + PORT_STATUS_OFFSET);
>> +}
>> +
>>  /* called back by PHY layer if there is change in link state of hw port*/
>>  static void icssm_emac_adjust_link(struct net_device *ndev)
>>  {
>> @@ -369,6 +426,8 @@ static void icssm_emac_adjust_link(struct net_device *ndev)
>>  		emac->link = 0;
>>  	}
>>  
>> +	icssm_emac_update_phystatus(emac);
>> +
> 
> It looks to me like emac->link, emac->speed and emac->duplex are only
> used in icssm_emac_update_phystatus(). If you consider either passing
> these as parameters to the above function, or simply merge
> icssm_emac_update_phystatus() into your adjust_link callback, you can get
> rid of these 3 attributes entirely. It even looks like emac->duplex is
> simply unused.
> 

Sure, we will address this in the next version.

Thanks and Regards,
Parvathi.


  reply	other threads:[~2025-02-18 10:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14  5:46 [PATCH net-next v3 00/10] PRU-ICSSM Ethernet Driver parvathi
2025-02-14  5:46 ` [PATCH net-next v3 01/10] dt-bindings: net: ti: Adds DUAL-EMAC mode support on PRU-ICSS2 for AM57xx SOCs parvathi
     [not found]   ` <20250219225130.GA3107198-robh@kernel.org>
2025-02-21 12:32     ` Parvathi Pudi
2025-02-14  5:46 ` [PATCH net-next v3 02/10] net: ti: prueth: Adds ICSSM Ethernet driver parvathi
2025-02-20  9:19   ` Ratheesh Kannoth
2025-02-21 12:35     ` Parvathi Pudi
2025-02-14  5:46 ` [PATCH net-next v3 03/10] net: ti: prueth: Adds PRUETH HW and SW configuration parvathi
2025-02-14  7:37 ` [PATCH net-next v3 04/10] net: ti: prueth: Adds link detection, RX and TX support parvathi
2025-02-14 15:44   ` Maxime Chevallier
2025-02-18  9:58     ` Parvathi Pudi [this message]
2025-02-14  7:37 ` [PATCH net-next v3 05/10] net: ti: prueth: Adds ethtool support for ICSSM PRUETH Driver parvathi
2025-02-14  7:37 ` [PATCH net-next v3 06/10] net: ti: prueth: Adds HW timestamping support for PTP using PRU-ICSS IEP module parvathi
2025-02-14  7:37 ` [PATCH net-next v3 07/10] net: ti: prueth: Adds support for network filters for traffic control supported by PRU-ICSS parvathi
2025-02-14  8:53 ` [PATCH net-next v3 08/10] net: ti: prueth: Adds support for RX interrupt coalescing/pacing parvathi
2025-02-14  8:53 ` [PATCH net-next v3 09/10] net: ti: prueth: Adds power management support for PRU-ICSS parvathi
2025-02-14  8:53 ` [PATCH net-next v3 10/10] soc: ti: PRUSS OCP configuration parvathi
2025-02-15  1:02 ` [PATCH net-next v3 00/10] PRU-ICSSM Ethernet Driver Jakub Kicinski
2025-02-18 10:06   ` Parvathi Pudi
2025-02-18 14:40     ` Jakub Kicinski
2025-02-24  6:56     ` MD Danish Anwar
2025-02-28 10:55       ` Parvathi Pudi
2025-02-26 18:44 ` Nishanth Menon
2025-02-28 10:58   ` Parvathi Pudi
2025-03-06 13:43     ` Parvathi Pudi
2025-03-07 19:47       ` Nishanth Menon

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=1901840071.600762.1739872709135.JavaMail.zimbra@couthit.local \
    --to=parvathi@couthit.com \
    --cc=afd@ti.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=basharath@couthit.com \
    --cc=conor+dt@kernel.org \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=diogo.ivo@siemens.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=krishna@couthit.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=m-malladi@ti.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mohan@couthit.com \
    --cc=netdev@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pabeni@redhat.com \
    --cc=pmohan@couthit.com \
    --cc=prajith@ti.com \
    --cc=praneeth@ti.com \
    --cc=pratheesh@ti.com \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=rogerq@ti.com \
    --cc=schnelle@linux.ibm.com \
    --cc=srk@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=vigneshr@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).