All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Koeller <thomas.koeller@baslerweb.com>
To: Manish Lachwani <mlachwani@mvista.com>
Cc: linux-mips@linux-mips.org
Subject: titan code question
Date: Fri, 19 Nov 2004 16:23:14 +0100	[thread overview]
Message-ID: <200411191623.14760.thomas.koeller@baslerweb.com> (raw)

Hi Manish & Ralf,

the code below is from tian_ge.c:

	/*
	 * This is the 1.2 revision of the chip. It has fix for the
	 * IP header alignment. Now, the IP header begins at an
	 * aligned address and this wont need an extra copy in the
	 * driver. This performance drawback existed in the previous
	 * versions of the silicon
	 */
	reg_data_1 = TITAN_GE_READ(0x103c + (port_num << 12));
	reg_data_1 |= 0x40000000;
	TITAN_GE_WRITE((0x103c + (port_num << 12)), reg_data_1);

	reg_data_1 |= 0x04000000;
	TITAN_GE_WRITE((0x103c + (port_num << 12)), reg_data_1);

	mdelay(5);

	reg_data_1 &= ~(0x04000000);
	TITAN_GE_WRITE((0x103c + (port_num << 12)), reg_data_1);

	mdelay(5);


According to the RM9000 user manual, register 0x103c (and 0x203c
and 0x303c), named TTPRI0, contains eight four-bit fields, each
of which is a packet priority value. This would be used to find
the priority for incoming packets.

Given the register description in the cpu manual, I cannot make
any sense of the code above. Whoever did that, would you care to
explain?

thanks,
Thomas
-- 
--------------------------------------------------

Thomas Koeller, Software Development
Basler Vision Technologies

thomas dot koeller at baslerweb dot com
http://www.baslerweb.com

==============================

             reply	other threads:[~2004-11-22  6:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-19 15:23 Thomas Koeller [this message]
2004-11-22 17:35 ` titan code question Manish Lachwani
2004-11-22 19:40   ` Maciej W. Rozycki
2004-11-22 19:42     ` Manish Lachwani

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=200411191623.14760.thomas.koeller@baslerweb.com \
    --to=thomas.koeller@baslerweb.com \
    --cc=linux-mips@linux-mips.org \
    --cc=mlachwani@mvista.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 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.