From: wangjiankun820624 <wangjiankun820624@163.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] MIPS: about the function of the octeon_twsi_set_addr8
Date: Tue, 27 May 2008 21:14:58 +0800 (CST) [thread overview]
Message-ID: <5004461.722081211894098417.JavaMail.coremail@bj163app18.163.com> (raw)
hello!
the field of [31:0] in the register MIO_TWS_SW_TWSI is data field, in the following function the low-8-bit of the 16-bit address is loaded in the MIO_TWS_SW_TWSI[7:0]. WHY?
int octeon_twsi_set_addr8(uint8_t dev_addr, uint16_t addr)
{
/* 16 bit internal address ONLY */
uint64_t val;
octeon_write64(CVMX_MIO_TWS_SW_TWSI,0x8000000000000000ull | ( 0x0ull << 57) | (((uint64_t)dev_addr) << 40) | (addr & 0xff)); // tell twsii to do the read
while (octeon_read64(CVMX_MIO_TWS_SW_TWSI)&0x8000000000000000ull);
val = octeon_read64(CVMX_MIO_TWS_SW_TWSI);
if (!(val & 0x0100000000000000ull)) {
return -1;
}
return(0);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080527/b06daccf/attachment.htm
reply other threads:[~2008-05-27 13:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5004461.722081211894098417.JavaMail.coremail@bj163app18.163.com \
--to=wangjiankun820624@163.com \
--cc=u-boot@lists.denx.de \
/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