[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ATA/IDE disk access using PIO and interrupt
- Date: Mon, 29 May 2006 18:08:52 +0400
- From: emints at ru.mvista.com (Eugeny S. Mints)
- Subject: ATA/IDE disk access using PIO and interrupt
Yan Luo wrote:
> Sorry, I mean
> "I was trying to understand how interrupt works for the PIO as it is
> said in the document (ata.t) that PIO is supported by both polling and
> ----- Original Message ----- From: "Yan Luo" <yan_luo at uml.edu>
> To: <rtems-users at rtems.com>
> Sent: Thursday, May 25, 2006 2:25 PM
> Subject: ATA/IDE disk access using PIO and interrupt
>> Hello All,
>> I was trying to understand how interrupt works for the PIO as it is
>> said in the document (ata.t) that PIO is supported by both polling and
>> I don't see the IDE_Controller_Table[ctrl_minor].int_driven set to
>> TRUE anywhere in the source tree. That means the interrupt driven PIO
>> is NOT enabled at all.
you mentioned you are on 4.6.2 but you could check 184.108.40.206 and take a
look at powerpc/gen5200 bsp. ide/idecfg.c in this bsp has 'int_driven'
flag set under 'ifdef ATA_USE_INT'. Since ATA_USE_INT is undefined in
bsp.h for this bsp I have no idea whether anybody gives this a try but I
guess Thomas could shed a light on this :)
But the bottom line is that since all the code needed to support
interrupt driven PIO is implemented in a generic way in ata.c the only
thing an ide controller driver has to export to ata driver is a proper
interrupt vector number (acompanied with int_driven flag set).
>> I tried to set it as true in ide_controller_initialize()
ide controller configuration currently is designed as a compile time
option, is represented as a structure of type
'ide_controller_bsp_table_t' (IDE_Controller_Table is array of
'ide_controller_bsp_table_t' structures, one per ide controller on your
target) and usually locates in ide/idecfg.c under 'your bsp' (for ex
Therefore you just need to set 'int_driven' flag properly among others
initialization values for the structure.
>>in ide_ctrl.c. That caused the RTEMS hang.
You didn't specify what bsp you are on. IIUC there are 3 bsp in 220.127.116.11
which contain ide controller driver: pc386, powerpc/mbx8xx and
powerpc/gen5200. There is no powerpc/gen5200 ide support in 4.6.2.
My guess would be you are on i386. If so, you need to initialize int_vec
field of ide_controller_bsp_table_t structure in
lib/libbsp/i386/pc386/ide/idecfg.c with a proper interrupt number as
well as set up int_driven flag to TRUE.
Hope this helps,
>> How the interrupt for PIO is enabled?
>> My test is on RTEMS 4.6.2 with fileio example application.