dragon-nx-32: enable IDE probing
authorAlan Cox <alan@linux.intel.com>
Thu, 4 Jun 2015 18:45:16 +0000 (19:45 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 4 Jun 2015 18:45:16 +0000 (19:45 +0100)
Kernel/platform-dragon-nx32/devices.c

index 307d432..556fd54 100644 (file)
@@ -9,15 +9,17 @@
 #include <vt.h>
 #include <graphics.h>
 #include <devtty.h>
+#include <blkdev.h>
+#include <devide.h>
 
 struct devsw dev_tab[] =  /* The device driver switch table */
 {
 // minor    open         close        read      write       ioctl
 // -----------------------------------------------------------------
-  /* 0: /dev/fd                Floppy disc block devices  */
+  /* 0: /dev/hd                Hard disc block devices (SD and IDE) */
+  {  blkdev_open,  no_close,   blkdev_read,    blkdev_write,   blkdev_ioctl },
+  /* 1: /dev/fd                Floppy disc block devices  */
   {  fd_open,     no_close,    fd_read,   fd_write,   no_ioctl },
-  /* 1: /dev/hd                Hard disc block devices (absent) */
-  {  nxio_open,     no_close,    no_rdwr,   no_rdwr,   no_ioctl },
   /* 2: /dev/tty       TTY devices */
   {  tty_open,     tty_close,   tty_read,  tty_write,  gfx_ioctl },
   /* 3: /dev/lpr       Printer devices */
@@ -41,7 +43,8 @@ bool validdev(uint16_t dev)
     else
         return true;
 }
+
 void device_init(void)
 {
+    devide_init();
 }
-