IDE support.

Chris Johns cjohns at cybertec.com.au
Sun May 18 07:45:57 UTC 2003


Angelo Fraietta wrote:
> I forgot the header
> 

Thanks for following up and sending the header. The following bit about the ATA 
driver is kinda important:

> 
> #define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
> 
> #ifdef CONFIGURE_INIT
> rtems_driver_address_table Device_drivers[] =
> 	{
> 	CONSOLE_DRIVER_TABLE_ENTRY
> 	,CLOCK_DRIVER_TABLE_ENTRY
> #ifdef RTEMS_BSP_HAS_IDE_DRIVER
> 	,IDE_CONTROLLER_DRIVER_TABLE_ENTRY
> 	/* important: ATA driver must be after ide drivers */
> 	,ATA_DRIVER_TABLE_ENTRY 
> #endif
> 	};
> 

I use the following code rather than the device table:

   /*
    * Initialise the IDE controller.
    */
   sc = rtems_io_register_driver (7, &ide_drv, &ide_major);
   if (sc != RTEMS_SUCCESSFUL)
   {
     printf ("ide: could register the IDE driver: %s\n",
             rtems_status_text (sc));
     return false;
   }

   /*
    * Initialise the ATA controller.
    */
   sc = rtems_io_register_driver (8, &ata_drv, &ata_major);
   if (sc != RTEMS_SUCCESSFUL)
   {
     printf ("ide: could register the ATA driver: %s\n",
             rtems_status_text (sc));
     return false;
   }

How the fun part, getting it all to work.

-- 
  Chris Johns, cjohns at cybertec.com.au




More information about the users mailing list