From: Sangyong Lee <dobest@lge.com>
To: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Promise Ultra66 - one more time
Date: Mon, 03 Sep 2001 13:54:58 +0900 [thread overview]
Message-ID: <3B930D22.2C2F88A4@lge.com> (raw)
In-Reply-To: 200109010222.TAA05540@krakatoa.gigabitnetworks.com
>
> 2) My ATA driver only requires the following defines now (given the addresses
> above). My question is what the values are for these addresses?
>
> #define CFG_ATA_BASE_ADDR /* MBAR address (MBAR0?) */
> #define CFG_ATA_IDE0_OFFSET /* Offset to Memory base for IDE0 ctrl */
> #define CFG_ATA_IDE1_OFFSET /* Offset to Memory base for IDE0 ctrl */
> /*
> * Definitions for accessing IDE controller registers
> */
> #define CFG_ATA_DATA_OFFSET /* Offset from IDE0/1 addr for DATA registers*/
> #define CFG_ATA_REG_OFFSET /* Offset from IDE0/1 addr for Control regs */
> #define CFG_ATA_ALT_OFFSET /* Offset for IDE0/1 alternate regs */
>
> The BASE_ADDR is one of the MBAR's, I believe this is MBAR0.
> The DATA, REG, and ALT offsets are the values you add to the BASE_ADDR
> to get at these registers.
>
> Second question: Given the MBAR's programmed above, what are the offsets
> for the standard ATA registers?
>
> Many thanks in advance; I know this has little todo with Linux or PPCBoot,
> however, I have sent several emails to Promise Tech Support and they have
> all but ignored my email messages.
>
> -James
>
There are two standard ATA register sets
:command block registers, control block registers.
There are 8 command block registers and 2 control block registers
As you know all are 8 bit registers
Command block registers begin at address MBAR0.
And control block registers begin at address MBAR1.
You can confirm this from chip manual, I guess.
I've used two E-IDE controller: via and cmd.
like this.
see below macros.
And you can know this from ATA spec.
#define IDE_BASE MBAR0
#define IDE_CTL_BASE MBAR1
#define IDE_DATA_REG (IDE_BASE + 0) /* Data register */
#define IDE_ERROR_REG (IDE_BASE + 1) /* Error register */
#define IDE_FEATURES_REG (IDE_BASE + 1) /* Features register */
#define IDE_SECCNT_REG (IDE_BASE + 2) /* Sector Count */
#define IDE_SECTOR_REG (IDE_BASE + 3) /* Sector number */
#define IDE_CYLLO_REG (IDE_BASE + 4) /* Cylinder low */
#define IDE_CYLHI_REG (IDE_BASE + 5) /* Cylinder high */
#define IDE_DRVHD_REG (IDE_BASE + 6) /* Drive/Head */
#define IDE_STATUS_REG (IDE_BASE + 7) /* Status */
#define IDE_COMMAND_REG (IDE_BASE + 7) /* Command */
#define IDE_CNTRL_REG (IDE_CTL_BASE + 2) /* Control (when writing) */
#define IDE_ALTSTATUS_REG IDE_CNTRL_REG /* alternate status(when reading) */
hope this helps to you.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
parent reply other threads:[~2001-09-03 4:54 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <200109010222.TAA05540@krakatoa.gigabitnetworks.com>]
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=3B930D22.2C2F88A4@lge.com \
--to=dobest@lge.com \
--cc=linuxppc-embedded@lists.linuxppc.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.