Commit fb0bbfda authored by Martin Dalecki's avatar Martin Dalecki Committed by Jens Axboe

[PATCH] 2.5.14 IDE 55

 - Update HPT374 driver carried over from 2.4.xx series by Andrew Morton.
   Resync it with the recent host chip driver changes, or better the
   introduction of an API at all.

 - Consolidate the handling of device ID byte order in one place.
   This was spotted and patched by Bartomiej onierkiewicz.

 - Eliminate CONFIG_BLK_DEV_IDEPCI - it's duplicating the functionality of the
   already present and fine CONFIG_PCI flag and if we are a PCI host, we are
   indeed very likely to need host chip support anyway.

 - Remove some redundant info about the model and channel number from
   /proc/ide. Remove the binary entries not helpful to the user, and not used
   by any program and redundant to corresponding ioctls.

 - Properly return udma_read and udma_write values in taskfile.

 - Only initialize XXX_udma to the default handlers if it has not been
   initialized by the host chip initialization.

I have enabled spin lock debugging and can see that on device
flush the spin locks get wrong counts... no problems elsewher ethus
far. I will re check them next time around.
parent 45bfe840
...@@ -245,7 +245,6 @@ CONFIG_BLK_DEV_IDECD=y ...@@ -245,7 +245,6 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_IDEPCI_SHARE_IRQ is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
......
...@@ -403,7 +403,6 @@ CONFIG_IDEDISK_MULTI_MODE=y ...@@ -403,7 +403,6 @@ CONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_BLK_DEV_OFFBOARD=y CONFIG_BLK_DEV_OFFBOARD=y
......
...@@ -454,7 +454,6 @@ CONFIG_BLK_DEV_IDECD=y ...@@ -454,7 +454,6 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_IDEPCI_SHARE_IRQ is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
......
...@@ -432,7 +432,6 @@ CONFIG_BLK_DEV_IDEFLOPPY=y ...@@ -432,7 +432,6 @@ CONFIG_BLK_DEV_IDEFLOPPY=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_BLK_DEV_SL82C105 is not set # CONFIG_BLK_DEV_SL82C105 is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
......
...@@ -254,7 +254,6 @@ CONFIG_BLK_DEV_CMD640=y ...@@ -254,7 +254,6 @@ CONFIG_BLK_DEV_CMD640=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
CONFIG_BLK_DEV_RZ1000=y CONFIG_BLK_DEV_RZ1000=y
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
......
...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDESCSI=y ...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDESCSI=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
......
...@@ -205,7 +205,6 @@ CONFIG_BLK_DEV_IDEFLOPPY=y ...@@ -205,7 +205,6 @@ CONFIG_BLK_DEV_IDEFLOPPY=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_IDEPCI_SHARE_IRQ is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_BLK_DEV_ADMA=y CONFIG_BLK_DEV_ADMA=y
......
...@@ -205,7 +205,6 @@ CONFIG_BLK_DEV_IDEFLOPPY=y ...@@ -205,7 +205,6 @@ CONFIG_BLK_DEV_IDEFLOPPY=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_IDEPCI_SHARE_IRQ is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_BLK_DEV_ADMA=y CONFIG_BLK_DEV_ADMA=y
......
...@@ -161,7 +161,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -161,7 +161,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -161,7 +161,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -161,7 +161,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -156,7 +156,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -156,7 +156,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -156,7 +156,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -156,7 +156,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -169,7 +169,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -169,7 +169,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -228,7 +228,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -228,7 +228,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -162,7 +162,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -162,7 +162,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -161,7 +161,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -161,7 +161,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -161,7 +161,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -161,7 +161,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -228,7 +228,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -228,7 +228,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -169,7 +169,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -169,7 +169,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -226,7 +226,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_AUTO is not set # CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set # CONFIG_DMA_NONPCI is not set
......
...@@ -221,7 +221,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -221,7 +221,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_IDEPCI_SHARE_IRQ is not set
# CONFIG_BLK_DEV_IDEDMA_PCI is not set # CONFIG_BLK_DEV_IDEDMA_PCI is not set
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
......
...@@ -286,7 +286,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -286,7 +286,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
......
...@@ -256,7 +256,6 @@ CONFIG_BLK_DEV_IDESCSI=m ...@@ -256,7 +256,6 @@ CONFIG_BLK_DEV_IDESCSI=m
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_BLK_DEV_SL82C105 is not set # CONFIG_BLK_DEV_SL82C105 is not set
CONFIG_BLK_DEV_GAYLE=y CONFIG_BLK_DEV_GAYLE=y
CONFIG_BLK_DEV_IDEDOUBLER=y CONFIG_BLK_DEV_IDEDOUBLER=y
......
...@@ -249,7 +249,6 @@ CONFIG_BLK_DEV_IDESCSI=y ...@@ -249,7 +249,6 @@ CONFIG_BLK_DEV_IDESCSI=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
...@@ -282,7 +281,6 @@ CONFIG_BLK_DEV_IDE_PMAC=y ...@@ -282,7 +281,6 @@ CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y CONFIG_BLK_DEV_IDEDMA_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
CONFIG_IDEDMA_AUTO=y CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set # CONFIG_IDEDMA_IVB is not set
......
...@@ -214,7 +214,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -214,7 +214,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_BLK_DEV_SL82C105 is not set # CONFIG_BLK_DEV_SL82C105 is not set
CONFIG_BLK_DEV_CPCI405_IDE=y CONFIG_BLK_DEV_CPCI405_IDE=y
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
......
...@@ -232,7 +232,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -232,7 +232,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
......
...@@ -236,7 +236,6 @@ CONFIG_BLK_DEV_IDECD=y ...@@ -236,7 +236,6 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_IDEPCI_SHARE_IRQ is not set
# CONFIG_BLK_DEV_IDEDMA_PCI is not set # CONFIG_BLK_DEV_IDEDMA_PCI is not set
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
......
...@@ -230,7 +230,6 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -230,7 +230,6 @@ CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_IDEPCI_SHARE_IRQ is not set
# CONFIG_BLK_DEV_IDEDMA_PCI is not set # CONFIG_BLK_DEV_IDEDMA_PCI is not set
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
......
...@@ -239,7 +239,6 @@ CONFIG_BLK_DEV_IDESCSI=y ...@@ -239,7 +239,6 @@ CONFIG_BLK_DEV_IDESCSI=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
...@@ -272,7 +271,6 @@ CONFIG_BLK_DEV_IDE_PMAC=y ...@@ -272,7 +271,6 @@ CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y CONFIG_BLK_DEV_IDEDMA_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
CONFIG_IDEDMA_AUTO=y CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set # CONFIG_IDEDMA_IVB is not set
......
...@@ -243,7 +243,6 @@ CONFIG_BLK_DEV_IDESCSI=y ...@@ -243,7 +243,6 @@ CONFIG_BLK_DEV_IDESCSI=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
......
...@@ -206,7 +206,6 @@ CONFIG_BLK_DEV_IDECD=y ...@@ -206,7 +206,6 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
......
...@@ -249,7 +249,6 @@ CONFIG_BLK_DEV_IDESCSI=y ...@@ -249,7 +249,6 @@ CONFIG_BLK_DEV_IDESCSI=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
...@@ -282,7 +281,6 @@ CONFIG_BLK_DEV_IDE_PMAC=y ...@@ -282,7 +281,6 @@ CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y CONFIG_BLK_DEV_IDEDMA_PMAC=y
CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDE_CHIPSETS is not set # CONFIG_IDE_CHIPSETS is not set
CONFIG_IDEDMA_AUTO=y CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set # CONFIG_IDEDMA_IVB is not set
......
...@@ -256,7 +256,7 @@ ppc4xx_progress(char *s, unsigned short hex) ...@@ -256,7 +256,7 @@ ppc4xx_progress(char *s, unsigned short hex)
* IDE stuff. * IDE stuff.
* should be generic for every IDE PCI chipset * should be generic for every IDE PCI chipset
*/ */
#if defined(CONFIG_BLK_DEV_IDEPCI) #ifdef CONFIG_PCI
static void static void
ppc4xx_ide_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port, ppc4xx_ide_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq) ide_ioreg_t ctrl_port, int *irq)
...@@ -376,7 +376,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -376,7 +376,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
** defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ** defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
*/ */
#ifdef CONFIG_IDE #ifdef CONFIG_IDE
# if defined(CONFIG_BLK_DEV_IDEPCI) # if defined(CONFIG_PCI)
ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports; ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports;
# elif defined (CONFIG_DMA_NONPCI) /* ON board IDE */ # elif defined (CONFIG_DMA_NONPCI) /* ON board IDE */
ppc_ide_md.default_irq = nonpci_ide_default_irq; ppc_ide_md.default_irq = nonpci_ide_default_irq;
......
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
/* Tell string.h we don't want memcpy etc. as cpp defines */ /* Tell string.h we don't want memcpy etc. as cpp defines */
#define EXPORT_SYMTAB_STROPS #define EXPORT_SYMTAB_STROPS
extern void ppc_generic_ide_fix_driveid(struct hd_driveid *id);
extern void transfer_to_handler(void); extern void transfer_to_handler(void);
extern void do_syscall_trace(void); extern void do_syscall_trace(void);
extern void do_IRQ(struct pt_regs *regs); extern void do_IRQ(struct pt_regs *regs);
...@@ -173,7 +172,6 @@ EXPORT_SYMBOL(iounmap); ...@@ -173,7 +172,6 @@ EXPORT_SYMBOL(iounmap);
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
EXPORT_SYMBOL(ppc_ide_md); EXPORT_SYMBOL(ppc_ide_md);
EXPORT_SYMBOL(ppc_generic_ide_fix_driveid);
#endif #endif
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
......
...@@ -616,100 +616,3 @@ void __init setup_arch(char **cmdline_p) ...@@ -616,100 +616,3 @@ void __init setup_arch(char **cmdline_p)
/* this is for modules since _machine can be a define -- Cort */ /* this is for modules since _machine can be a define -- Cort */
ppc_md.ppc_machine = _machine; ppc_md.ppc_machine = _machine;
} }
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/* Convert the shorts/longs in hd_driveid from little to big endian;
* chars are endian independant, of course, but strings need to be flipped.
* (Despite what it says in drivers/block/ide.h, they come up as little
* endian...)
*
* Changes to linux/hdreg.h may require changes here. */
void ppc_generic_ide_fix_driveid(struct hd_driveid *id)
{
int i;
unsigned short *stringcast;
id->config = __le16_to_cpu(id->config);
id->cyls = __le16_to_cpu(id->cyls);
id->reserved2 = __le16_to_cpu(id->reserved2);
id->heads = __le16_to_cpu(id->heads);
id->track_bytes = __le16_to_cpu(id->track_bytes);
id->sector_bytes = __le16_to_cpu(id->sector_bytes);
id->sectors = __le16_to_cpu(id->sectors);
id->vendor0 = __le16_to_cpu(id->vendor0);
id->vendor1 = __le16_to_cpu(id->vendor1);
id->vendor2 = __le16_to_cpu(id->vendor2);
stringcast = (unsigned short *)&id->serial_no[0];
for (i = 0; i < (20/2); i++)
stringcast[i] = __le16_to_cpu(stringcast[i]);
id->buf_type = __le16_to_cpu(id->buf_type);
id->buf_size = __le16_to_cpu(id->buf_size);
id->ecc_bytes = __le16_to_cpu(id->ecc_bytes);
stringcast = (unsigned short *)&id->fw_rev[0];
for (i = 0; i < (8/2); i++)
stringcast[i] = __le16_to_cpu(stringcast[i]);
stringcast = (unsigned short *)&id->model[0];
for (i = 0; i < (40/2); i++)
stringcast[i] = __le16_to_cpu(stringcast[i]);
id->dword_io = __le16_to_cpu(id->dword_io);
id->reserved50 = __le16_to_cpu(id->reserved50);
id->field_valid = __le16_to_cpu(id->field_valid);
id->cur_cyls = __le16_to_cpu(id->cur_cyls);
id->cur_heads = __le16_to_cpu(id->cur_heads);
id->cur_sectors = __le16_to_cpu(id->cur_sectors);
id->cur_capacity0 = __le16_to_cpu(id->cur_capacity0);
id->cur_capacity1 = __le16_to_cpu(id->cur_capacity1);
id->lba_capacity = __le32_to_cpu(id->lba_capacity);
id->dma_1word = __le16_to_cpu(id->dma_1word);
id->dma_mword = __le16_to_cpu(id->dma_mword);
id->eide_pio_modes = __le16_to_cpu(id->eide_pio_modes);
id->eide_dma_min = __le16_to_cpu(id->eide_dma_min);
id->eide_dma_time = __le16_to_cpu(id->eide_dma_time);
id->eide_pio = __le16_to_cpu(id->eide_pio);
id->eide_pio_iordy = __le16_to_cpu(id->eide_pio_iordy);
for (i = 0; i < 2; i++)
id->words69_70[i] = __le16_to_cpu(id->words69_70[i]);
for (i = 0; i < 4; i++)
id->words71_74[i] = __le16_to_cpu(id->words71_74[i]);
id->queue_depth = __le16_to_cpu(id->queue_depth);
for (i = 0; i < 4; i++)
id->words76_79[i] = __le16_to_cpu(id->words76_79[i]);
id->major_rev_num = __le16_to_cpu(id->major_rev_num);
id->minor_rev_num = __le16_to_cpu(id->minor_rev_num);
id->command_set_1 = __le16_to_cpu(id->command_set_1);
id->command_set_2 = __le16_to_cpu(id->command_set_2);
id->cfsse = __le16_to_cpu(id->cfsse);
id->cfs_enable_1 = __le16_to_cpu(id->cfs_enable_1);
id->cfs_enable_2 = __le16_to_cpu(id->cfs_enable_2);
id->csf_default = __le16_to_cpu(id->csf_default);
id->dma_ultra = __le16_to_cpu(id->dma_ultra);
id->word89 = __le16_to_cpu(id->word89);
id->word90 = __le16_to_cpu(id->word90);
id->CurAPMvalues = __le16_to_cpu(id->CurAPMvalues);
id->word92 = __le16_to_cpu(id->word92);
id->hw_config = __le16_to_cpu(id->hw_config);
id->acoustic = __le16_to_cpu(id->acoustic);
for (i = 0; i < 5; i++)
id->words95_99[i] = __le16_to_cpu(id->words95_99[i]);
id->lba_capacity_2 = __le64_to_cpu(id->lba_capacity_2);
for (i = 0; i < 22; i++)
id->words104_125[i] = __le16_to_cpu(id->words104_125[i]);
id->last_lun = __le16_to_cpu(id->last_lun);
id->word127 = __le16_to_cpu(id->word127);
id->dlf = __le16_to_cpu(id->dlf);
id->csfo = __le16_to_cpu(id->csfo);
for (i = 0; i < 26; i++)
id->words130_155[i] = __le16_to_cpu(id->words130_155[i]);
id->word156 = __le16_to_cpu(id->word156);
for (i = 0; i < 3; i++)
id->words157_159[i] = __le16_to_cpu(id->words157_159[i]);
id->cfa_power = __le16_to_cpu(id->cfa_power);
for (i = 0; i < 14; i++)
id->words161_175[i] = __le16_to_cpu(id->words161_175[i]);
for (i = 0; i < 31; i++)
id->words176_205[i] = __le16_to_cpu(id->words176_205[i]);
for (i = 0; i < 48; i++)
id->words206_254[i] = __le16_to_cpu(id->words206_254[i]);
id->integrity_word = __le16_to_cpu(id->integrity_word);
}
#endif
...@@ -543,95 +543,6 @@ void __init setup_arch(char **cmdline_p) ...@@ -543,95 +543,6 @@ void __init setup_arch(char **cmdline_p)
ppc_md.progress("setup_arch: exit", 0x3eab); ppc_md.progress("setup_arch: exit", 0x3eab);
} }
#ifdef CONFIG_IDE
/* Convert the shorts/longs in hd_driveid from little to big endian;
* chars are endian independant, of course, but strings need to be flipped.
* (Despite what it says in drivers/block/ide.h, they come up as little
* endian...)
*
* Changes to linux/hdreg.h may require changes here. */
void ppc64_ide_fix_driveid(struct hd_driveid *id)
{
int i;
unsigned short *stringcast;
id->config = __le16_to_cpu(id->config);
id->cyls = __le16_to_cpu(id->cyls);
id->reserved2 = __le16_to_cpu(id->reserved2);
id->heads = __le16_to_cpu(id->heads);
id->track_bytes = __le16_to_cpu(id->track_bytes);
id->sector_bytes = __le16_to_cpu(id->sector_bytes);
id->sectors = __le16_to_cpu(id->sectors);
id->vendor0 = __le16_to_cpu(id->vendor0);
id->vendor1 = __le16_to_cpu(id->vendor1);
id->vendor2 = __le16_to_cpu(id->vendor2);
stringcast = (unsigned short *)&id->serial_no[0];
for (i = 0; i < (20/2); i++)
stringcast[i] = __le16_to_cpu(stringcast[i]);
id->buf_type = __le16_to_cpu(id->buf_type);
id->buf_size = __le16_to_cpu(id->buf_size);
id->ecc_bytes = __le16_to_cpu(id->ecc_bytes);
stringcast = (unsigned short *)&id->fw_rev[0];
for (i = 0; i < (8/2); i++)
stringcast[i] = __le16_to_cpu(stringcast[i]);
stringcast = (unsigned short *)&id->model[0];
for (i = 0; i < (40/2); i++)
stringcast[i] = __le16_to_cpu(stringcast[i]);
id->dword_io = __le16_to_cpu(id->dword_io);
id->reserved50 = __le16_to_cpu(id->reserved50);
id->field_valid = __le16_to_cpu(id->field_valid);
id->cur_cyls = __le16_to_cpu(id->cur_cyls);
id->cur_heads = __le16_to_cpu(id->cur_heads);
id->cur_sectors = __le16_to_cpu(id->cur_sectors);
id->cur_capacity0 = __le16_to_cpu(id->cur_capacity0);
id->cur_capacity1 = __le16_to_cpu(id->cur_capacity1);
id->lba_capacity = __le32_to_cpu(id->lba_capacity);
id->dma_1word = __le16_to_cpu(id->dma_1word);
id->dma_mword = __le16_to_cpu(id->dma_mword);
id->eide_pio_modes = __le16_to_cpu(id->eide_pio_modes);
id->eide_dma_min = __le16_to_cpu(id->eide_dma_min);
id->eide_dma_time = __le16_to_cpu(id->eide_dma_time);
id->eide_pio = __le16_to_cpu(id->eide_pio);
id->eide_pio_iordy = __le16_to_cpu(id->eide_pio_iordy);
for (i = 0; i < 2; i++)
id->words69_70[i] = __le16_to_cpu(id->words69_70[i]);
for (i = 0; i < 4; i++)
id->words71_74[i] = __le16_to_cpu(id->words71_74[i]);
id->queue_depth = __le16_to_cpu(id->queue_depth);
for (i = 0; i < 4; i++)
id->words76_79[i] = __le16_to_cpu(id->words76_79[i]);
id->major_rev_num = __le16_to_cpu(id->major_rev_num);
id->minor_rev_num = __le16_to_cpu(id->minor_rev_num);
id->command_set_1 = __le16_to_cpu(id->command_set_1);
id->command_set_2 = __le16_to_cpu(id->command_set_2);
id->cfsse = __le16_to_cpu(id->cfsse);
id->cfs_enable_1 = __le16_to_cpu(id->cfs_enable_1);
id->cfs_enable_2 = __le16_to_cpu(id->cfs_enable_2);
id->csf_default = __le16_to_cpu(id->csf_default);
id->dma_ultra = __le16_to_cpu(id->dma_ultra);
id->word89 = __le16_to_cpu(id->word89);
id->word90 = __le16_to_cpu(id->word90);
id->CurAPMvalues = __le16_to_cpu(id->CurAPMvalues);
id->word92 = __le16_to_cpu(id->word92);
id->hw_config = __le16_to_cpu(id->hw_config);
for (i = 0; i < 32; i++)
id->words94_125[i] = __le16_to_cpu(id->words94_125[i]);
id->last_lun = __le16_to_cpu(id->last_lun);
id->word127 = __le16_to_cpu(id->word127);
id->dlf = __le16_to_cpu(id->dlf);
id->csfo = __le16_to_cpu(id->csfo);
for (i = 0; i < 26; i++)
id->words130_155[i] = __le16_to_cpu(id->words130_155[i]);
id->word156 = __le16_to_cpu(id->word156);
for (i = 0; i < 3; i++)
id->words157_159[i] = __le16_to_cpu(id->words157_159[i]);
for (i = 0; i < 96; i++)
id->words160_255[i] = __le16_to_cpu(id->words160_255[i]);
}
#endif
void exception_trace(unsigned long trap) void exception_trace(unsigned long trap)
{ {
unsigned long x, srr0, srr1, reg20, reg1, reg21; unsigned long x, srr0, srr1, reg20, reg1, reg21;
......
...@@ -282,7 +282,6 @@ CONFIG_BLK_DEV_IDECD=y ...@@ -282,7 +282,6 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_IDEPCI_SHARE_IRQ is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
......
...@@ -205,7 +205,6 @@ CONFIG_BLK_DEV_IDECD=y ...@@ -205,7 +205,6 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_IDEPCI_SHARE_IRQ is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
......
...@@ -216,11 +216,6 @@ CONFIG_BLK_DEV_RZ1000 ...@@ -216,11 +216,6 @@ CONFIG_BLK_DEV_RZ1000
Linux. This may slow disk throughput by a few percent, but at least Linux. This may slow disk throughput by a few percent, but at least
things will operate 100% reliably. things will operate 100% reliably.
CONFIG_BLK_DEV_IDEPCI
Say Y here for PCI systems which use IDE drive(s).
This option helps the IDE driver to automatically detect and
configure all PCI-based IDE interfaces in your system.
CONFIG_IDEPCI_SHARE_IRQ CONFIG_IDEPCI_SHARE_IRQ
Some ATA/IDE chipsets have hardware support which allows for Some ATA/IDE chipsets have hardware support which allows for
sharing a single IRQ with other cards. To enable support for sharing a single IRQ with other cards. To enable support for
......
...@@ -33,58 +33,55 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then ...@@ -33,58 +33,55 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
dep_tristate ' Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE dep_tristate ' Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE
dep_tristate ' SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE $CONFIG_SCSI dep_tristate ' SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE $CONFIG_SCSI
comment 'ATA host chipset support' comment 'ATA host chip set support'
dep_bool ' CMD640 chipset bugfix/support' CONFIG_BLK_DEV_CMD640 $CONFIG_X86 dep_bool ' CMD640 chip set bugfix/support' CONFIG_BLK_DEV_CMD640 $CONFIG_X86
dep_bool ' CMD640 enhanced support' CONFIG_BLK_DEV_CMD640_ENHANCED $CONFIG_BLK_DEV_CMD640 dep_bool ' CMD640 enhanced support' CONFIG_BLK_DEV_CMD640_ENHANCED $CONFIG_BLK_DEV_CMD640
dep_bool ' ISA-PNP support' CONFIG_BLK_DEV_ISAPNP $CONFIG_ISAPNP dep_bool ' ISA-PNP support' CONFIG_BLK_DEV_ISAPNP $CONFIG_ISAPNP
if [ "$CONFIG_PCI" = "y" ]; then if [ "$CONFIG_PCI" = "y" ]; then
dep_bool ' RZ1000 chipset bugfix/support' CONFIG_BLK_DEV_RZ1000 $CONFIG_X86 dep_bool ' RZ1000 chip set bugfix/support' CONFIG_BLK_DEV_RZ1000 $CONFIG_X86
bool ' PCI host chipset support' CONFIG_BLK_DEV_IDEPCI comment ' PCI host chip set support'
if [ "$CONFIG_BLK_DEV_IDEPCI" = "y" ]; then dep_bool ' Boot off-board chip sets first support' CONFIG_BLK_DEV_OFFBOARD $CONFIG_PCI
bool ' Boot off-board chipsets first support' CONFIG_BLK_DEV_OFFBOARD dep_bool ' Sharing PCI ATA interrupts support' CONFIG_IDEPCI_SHARE_IRQ $CONFIG_PCI
bool ' Sharing PCI ATA interrupts support' CONFIG_IDEPCI_SHARE_IRQ dep_bool ' Generic PCI bus-master DMA support' CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_PCI
bool ' Generic PCI bus-master DMA support' CONFIG_BLK_DEV_IDEDMA_PCI dep_bool ' Use PCI DMA by default when available' CONFIG_IDEDMA_PCI_AUTO $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Use PCI DMA by default when available' CONFIG_IDEDMA_PCI_AUTO $CONFIG_BLK_DEV_IDEDMA_PCI dep_bool ' Enable DMA only for disks ' CONFIG_IDEDMA_ONLYDISK $CONFIG_IDEDMA_PCI_AUTO
dep_bool ' Enable DMA only for disks ' CONFIG_IDEDMA_ONLYDISK $CONFIG_IDEDMA_PCI_AUTO define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PCI
define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PCI dep_bool ' ATA tagged command queueing (EXPERIMENTAL)' CONFIG_BLK_DEV_IDE_TCQ $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_EXPERIMENTAL
dep_bool ' ATA tagged command queueing (EXPERIMENTAL)' CONFIG_BLK_DEV_IDE_TCQ $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_EXPERIMENTAL dep_bool ' TCQ on by default' CONFIG_BLK_DEV_IDE_TCQ_DEFAULT $CONFIG_BLK_DEV_IDE_TCQ
dep_bool ' TCQ on by default' CONFIG_BLK_DEV_IDE_TCQ_DEFAULT $CONFIG_BLK_DEV_IDE_TCQ if [ "$CONFIG_BLK_DEV_IDE_TCQ" != "n" ]; then
if [ "$CONFIG_BLK_DEV_IDE_TCQ" != "n" ]; then int ' Default queue depth' CONFIG_BLK_DEV_IDE_TCQ_DEPTH 32
int ' Default queue depth' CONFIG_BLK_DEV_IDE_TCQ_DEPTH 32
fi
dep_bool ' Good-Bad DMA Model-Firmware (EXPERIMENTAL)' CONFIG_IDEDMA_NEW_DRIVE_LISTINGS $CONFIG_EXPERIMENTAL
dep_bool ' AEC62XX chipset support' CONFIG_BLK_DEV_AEC62XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' AEC62XX Tuning support' CONFIG_AEC62XX_TUNING $CONFIG_BLK_DEV_AEC62XX
dep_bool ' ALI M15x3 chipset support' CONFIG_BLK_DEV_ALI15X3 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' ALI M15x3 WDC support (DANGEROUS)' CONFIG_WDC_ALI15X3 $CONFIG_BLK_DEV_ALI15X3 $CONFIG_EXPERIMENTAL
dep_bool ' AMD and nVidia chipset support' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' CMD64X chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' CY82C693 chipset support' CONFIG_BLK_DEV_CY82C693 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Cyrix CS5530 MediaGX chipset support' CONFIG_BLK_DEV_CS5530 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' HPT34X chipset support' CONFIG_BLK_DEV_HPT34X $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' HPT34X AUTODMA support (EXPERMENTAL)' CONFIG_HPT34X_AUTODMA $CONFIG_BLK_DEV_HPT34X $CONFIG_EXPERIMENTAL
dep_bool ' HPT366 chipset support' CONFIG_BLK_DEV_HPT366 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Intel and Efar (SMsC) chipset support' CONFIG_BLK_DEV_PIIX $CONFIG_BLK_DEV_IDEDMA_PCI
if [ "$CONFIG_BLK_DEV_PIIX" = "y" ]; then
dep_bool ' Use UDMA133 even on ICH2, ICH3 and CICH chips (EXPERIMENTAL)' CONFIG_BLK_DEV_PIIX_TRY133 $CONFIG_EXPERIMENTAL
fi
if [ "$CONFIG_MIPS_ITE8172" = "y" -o "$CONFIG_MIPS_IVR" = "y" ]; then
dep_mbool ' IT8172 IDE support' CONFIG_BLK_DEV_IT8172 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' IT8172 IDE Tuning support' CONFIG_IT8172_TUNING $CONFIG_BLK_DEV_IT8172 $CONFIG_IDEDMA_PCI_AUTO
fi
dep_bool ' NS87415 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_NS87415 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' OPTi 82C621 chipset enhanced support (EXPERIMENTAL)' CONFIG_BLK_DEV_OPTI621 $CONFIG_EXPERIMENTAL
dep_mbool ' Pacific Digital A-DMA support (EXPERIMENTAL)' CONFIG_BLK_DEV_PDC_ADMA $CONFIG_EXPERIMENTAL
dep_bool ' PROMISE PDC202{46|62|65|67|68|69|70} support' CONFIG_BLK_DEV_PDC202XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Special UDMA Feature' CONFIG_PDC202XX_BURST $CONFIG_BLK_DEV_PDC202XX
dep_bool ' Special FastTrak Feature' CONFIG_PDC202XX_FORCE $CONFIG_BLK_DEV_PDC202XX
dep_bool ' ServerWorks OSB4/CSB5 chipsets support' CONFIG_BLK_DEV_SVWKS $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
dep_bool ' SiS5513 chipset support' CONFIG_BLK_DEV_SIS5513 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
dep_bool ' Tekram TRM290 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_TRM290 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' VIA chipset support' CONFIG_BLK_DEV_VIA82CXXX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Winbond SL82c105 support' CONFIG_BLK_DEV_SL82C105 $CONFIG_BLK_DEV_IDEDMA_PCI
fi fi
dep_bool ' Good-Bad DMA Model-Firmware (EXPERIMENTAL)' CONFIG_IDEDMA_NEW_DRIVE_LISTINGS $CONFIG_EXPERIMENTAL
dep_bool ' AEC62XX chip set support' CONFIG_BLK_DEV_AEC62XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' AEC62XX Tuning support' CONFIG_AEC62XX_TUNING $CONFIG_BLK_DEV_AEC62XX
dep_bool ' ALI M15x3 chipset support' CONFIG_BLK_DEV_ALI15X3 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' ALI M15x3 WDC support (DANGEROUS)' CONFIG_WDC_ALI15X3 $CONFIG_BLK_DEV_ALI15X3 $CONFIG_EXPERIMENTAL
dep_bool ' AMD and nVidia chipset support' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' CMD64X chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' CY82C693 chipset support' CONFIG_BLK_DEV_CY82C693 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Cyrix CS5530 MediaGX chipset support' CONFIG_BLK_DEV_CS5530 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' HPT34X chipset support' CONFIG_BLK_DEV_HPT34X $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' HPT34X AUTODMA support (EXPERMENTAL)' CONFIG_HPT34X_AUTODMA $CONFIG_BLK_DEV_HPT34X $CONFIG_EXPERIMENTAL
dep_bool ' HPT366 chipset support' CONFIG_BLK_DEV_HPT366 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Intel and Efar (SMsC) chipset support' CONFIG_BLK_DEV_PIIX $CONFIG_BLK_DEV_IDEDMA_PCI
if [ "$CONFIG_BLK_DEV_PIIX" = "y" ]; then
dep_bool ' Use UDMA133 even on ICH2, ICH3 and CICH chips (EXPERIMENTAL)' CONFIG_BLK_DEV_PIIX_TRY133 $CONFIG_EXPERIMENTAL
fi
if [ "$CONFIG_MIPS_ITE8172" = "y" -o "$CONFIG_MIPS_IVR" = "y" ]; then
dep_mbool ' IT8172 IDE support' CONFIG_BLK_DEV_IT8172 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' IT8172 IDE Tuning support' CONFIG_IT8172_TUNING $CONFIG_BLK_DEV_IT8172 $CONFIG_IDEDMA_PCI_AUTO
fi
dep_bool ' NS87415 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_NS87415 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' OPTi 82C621 chipset enhanced support (EXPERIMENTAL)' CONFIG_BLK_DEV_OPTI621 $CONFIG_PCI $CONFIG_EXPERIMENTAL
dep_mbool ' Pacific Digital A-DMA support (EXPERIMENTAL)' CONFIG_BLK_DEV_PDC_ADMA $CONFIG_EXPERIMENTAL
dep_bool ' PROMISE PDC202{46|62|65|67|68|69|70} support' CONFIG_BLK_DEV_PDC202XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Special UDMA Feature' CONFIG_PDC202XX_BURST $CONFIG_BLK_DEV_PDC202XX
dep_bool ' Special FastTrak Feature' CONFIG_PDC202XX_FORCE $CONFIG_BLK_DEV_PDC202XX
dep_bool ' ServerWorks OSB4/CSB5 chipsets support' CONFIG_BLK_DEV_SVWKS $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
dep_bool ' SiS5513 chipset support' CONFIG_BLK_DEV_SIS5513 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
dep_bool ' Tekram TRM290 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_TRM290 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' VIA chipset support' CONFIG_BLK_DEV_VIA82CXXX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Winbond SL82c105 support' CONFIG_BLK_DEV_SL82C105 $CONFIG_BLK_DEV_IDEDMA_PCI
fi fi
if [ "$CONFIG_ALL_PPC" = "y" ]; then if [ "$CONFIG_ALL_PPC" = "y" ]; then
bool ' Builtin PowerMac IDE support' CONFIG_BLK_DEV_IDE_PMAC bool ' Builtin PowerMac IDE support' CONFIG_BLK_DEV_IDE_PMAC
...@@ -93,9 +90,6 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then ...@@ -93,9 +90,6 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
if [ "$CONFIG_BLK_DEV_IDE_PMAC" = "y" ]; then if [ "$CONFIG_BLK_DEV_IDE_PMAC" = "y" ]; then
define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PMAC define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PMAC
fi fi
if [ "$CONFIG_BLK_DEV_IDEDMA_PMAC" = "y" ]; then
define_bool CONFIG_BLK_DEV_IDEPCI $CONFIG_BLK_DEV_IDEDMA_PMAC
fi
fi fi
if [ "$CONFIG_ARCH_ACORN" = "y" ]; then if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
dep_bool ' ICS IDE interface support' CONFIG_BLK_DEV_IDE_ICSIDE $CONFIG_ARCH_ACORN dep_bool ' ICS IDE interface support' CONFIG_BLK_DEV_IDE_ICSIDE $CONFIG_ARCH_ACORN
......
...@@ -45,7 +45,7 @@ ide-obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o ...@@ -45,7 +45,7 @@ ide-obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o
ide-obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o ide-obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o
ide-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o ide-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
ide-obj-$(CONFIG_BLK_DEV_IDE_TCQ) += tcq.o ide-obj-$(CONFIG_BLK_DEV_IDE_TCQ) += tcq.o
ide-obj-$(CONFIG_BLK_DEV_IDEPCI) += ide-pci.o ide-obj-$(CONFIG_PCI) += ide-pci.o
ide-obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o ide-obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o
ide-obj-$(CONFIG_BLK_DEV_IDE_PMAC) += ide-pmac.o ide-obj-$(CONFIG_BLK_DEV_IDE_PMAC) += ide-pmac.o
ide-obj-$(CONFIG_BLK_DEV_MAC_IDE) += macide.o ide-obj-$(CONFIG_BLK_DEV_MAC_IDE) += macide.o
......
This diff is collapsed.
...@@ -490,106 +490,6 @@ static void idedisk_pre_reset(struct ata_device *drive) ...@@ -490,106 +490,6 @@ static void idedisk_pre_reset(struct ata_device *drive)
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
static int smart_enable(struct ata_device *drive)
{
struct ata_taskfile args;
memset(&args, 0, sizeof(args));
args.taskfile.feature = SMART_ENABLE;
args.taskfile.low_cylinder = SMART_LCYL_PASS;
args.taskfile.high_cylinder = SMART_HCYL_PASS;
args.taskfile.command = WIN_SMART;
ide_cmd_type_parser(&args);
return ide_raw_taskfile(drive, &args, NULL);
}
static int get_smart_values(struct ata_device *drive, u8 *buf)
{
struct ata_taskfile args;
memset(&args, 0, sizeof(args));
args.taskfile.feature = SMART_READ_VALUES;
args.taskfile.sector_count = 0x01;
args.taskfile.low_cylinder = SMART_LCYL_PASS;
args.taskfile.high_cylinder = SMART_HCYL_PASS;
args.taskfile.command = WIN_SMART;
ide_cmd_type_parser(&args);
smart_enable(drive);
return ide_raw_taskfile(drive, &args, buf);
}
static int get_smart_thresholds(struct ata_device *drive, u8 *buf)
{
struct ata_taskfile args;
memset(&args, 0, sizeof(args));
args.taskfile.feature = SMART_READ_THRESHOLDS;
args.taskfile.sector_count = 0x01;
args.taskfile.low_cylinder = SMART_LCYL_PASS;
args.taskfile.high_cylinder = SMART_HCYL_PASS;
args.taskfile.command = WIN_SMART;
ide_cmd_type_parser(&args);
smart_enable(drive);
return ide_raw_taskfile(drive, &args, buf);
}
static int proc_idedisk_read_cache
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
struct ata_device *drive = (struct ata_device *) data;
char *out = page;
int len;
if (drive->id)
len = sprintf(out,"%i\n", drive->id->buf_size / 2);
else
len = sprintf(out,"(none)\n");
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
static int proc_idedisk_read_smart_thresholds
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
struct ata_device *drive = (struct ata_device *)data;
int len = 0, i = 0;
if (!get_smart_thresholds(drive, page)) {
unsigned short *val = (unsigned short *) page;
char *out = ((char *)val) + (SECTOR_WORDS * 4);
page = out;
do {
out += sprintf(out, "%04x%c", le16_to_cpu(*val), (++i & 7) ? ' ' : '\n');
val += 1;
} while (i < (SECTOR_WORDS * 2));
len = out - page;
}
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
static int proc_idedisk_read_smart_values
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
struct ata_device *drive = (struct ata_device *)data;
int len = 0, i = 0;
if (!get_smart_values(drive, page)) {
unsigned short *val = (unsigned short *) page;
char *out = ((char *)val) + (SECTOR_WORDS * 4);
page = out;
do {
out += sprintf(out, "%04x%c", le16_to_cpu(*val), (++i & 7) ? ' ' : '\n');
val += 1;
} while (i < (SECTOR_WORDS * 2));
len = out - page;
}
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
#ifdef CONFIG_BLK_DEV_IDE_TCQ #ifdef CONFIG_BLK_DEV_IDE_TCQ
static int proc_idedisk_read_tcq static int proc_idedisk_read_tcq
(char *page, char **start, off_t off, int count, int *eof, void *data) (char *page, char **start, off_t off, int count, int *eof, void *data)
...@@ -638,10 +538,6 @@ static int proc_idedisk_read_tcq ...@@ -638,10 +538,6 @@ static int proc_idedisk_read_tcq
#endif #endif
static ide_proc_entry_t idedisk_proc[] = { static ide_proc_entry_t idedisk_proc[] = {
{ "cache", S_IFREG|S_IRUGO, proc_idedisk_read_cache, NULL },
{ "geometry", S_IFREG|S_IRUGO, proc_ide_read_geometry, NULL },
{ "smart_values", S_IFREG|S_IRUSR, proc_idedisk_read_smart_values, NULL },
{ "smart_thresholds", S_IFREG|S_IRUSR, proc_idedisk_read_smart_thresholds, NULL },
#ifdef CONFIG_BLK_DEV_IDE_TCQ #ifdef CONFIG_BLK_DEV_IDE_TCQ
{ "tcq", S_IFREG|S_IRUSR, proc_idedisk_read_tcq, NULL }, { "tcq", S_IFREG|S_IRUSR, proc_idedisk_read_tcq, NULL },
#endif #endif
...@@ -650,9 +546,9 @@ static ide_proc_entry_t idedisk_proc[] = { ...@@ -650,9 +546,9 @@ static ide_proc_entry_t idedisk_proc[] = {
#else #else
#define idedisk_proc NULL # define idedisk_proc NULL
#endif /* CONFIG_PROC_FS */ #endif
/* /*
* This is tightly woven into the driver->special can not touch. * This is tightly woven into the driver->special can not touch.
......
...@@ -489,7 +489,8 @@ void ide_setup_dma(struct ata_channel *ch, unsigned long dma_base, unsigned int ...@@ -489,7 +489,8 @@ void ide_setup_dma(struct ata_channel *ch, unsigned long dma_base, unsigned int
goto dma_alloc_failure; goto dma_alloc_failure;
} }
ch->XXX_udma = XXX_ide_dmaproc; if (!ch->XXX_udma)
ch->XXX_udma = XXX_ide_dmaproc;
if (ch->chipset != ide_trm290) { if (ch->chipset != ide_trm290) {
u8 dma_stat = inb(dma_base+2); u8 dma_stat = inb(dma_base+2);
......
...@@ -103,6 +103,105 @@ byte ide_auto_reduce_xfer (ide_drive_t *drive) ...@@ -103,6 +103,105 @@ byte ide_auto_reduce_xfer (ide_drive_t *drive)
} }
} }
/*
* hd_driveid data come as little endian,
* they need to be converted on big endian machines
*/
void ide_fix_driveid(struct hd_driveid *id)
{
#ifndef __LITTLE_ENDIAN
#ifdef __BIG_ENDIAN
int i;
unsigned short *stringcast;
id->config = __le16_to_cpu(id->config);
id->cyls = __le16_to_cpu(id->cyls);
id->reserved2 = __le16_to_cpu(id->reserved2);
id->heads = __le16_to_cpu(id->heads);
id->track_bytes = __le16_to_cpu(id->track_bytes);
id->sector_bytes = __le16_to_cpu(id->sector_bytes);
id->sectors = __le16_to_cpu(id->sectors);
id->vendor0 = __le16_to_cpu(id->vendor0);
id->vendor1 = __le16_to_cpu(id->vendor1);
id->vendor2 = __le16_to_cpu(id->vendor2);
stringcast = (unsigned short *)&id->serial_no[0];
for (i = 0; i < (20/2); i++)
stringcast[i] = __le16_to_cpu(stringcast[i]);
id->buf_type = __le16_to_cpu(id->buf_type);
id->buf_size = __le16_to_cpu(id->buf_size);
id->ecc_bytes = __le16_to_cpu(id->ecc_bytes);
stringcast = (unsigned short *)&id->fw_rev[0];
for (i = 0; i < (8/2); i++)
stringcast[i] = __le16_to_cpu(stringcast[i]);
stringcast = (unsigned short *)&id->model[0];
for (i = 0; i < (40/2); i++)
stringcast[i] = __le16_to_cpu(stringcast[i]);
id->dword_io = __le16_to_cpu(id->dword_io);
id->reserved50 = __le16_to_cpu(id->reserved50);
id->field_valid = __le16_to_cpu(id->field_valid);
id->cur_cyls = __le16_to_cpu(id->cur_cyls);
id->cur_heads = __le16_to_cpu(id->cur_heads);
id->cur_sectors = __le16_to_cpu(id->cur_sectors);
id->cur_capacity0 = __le16_to_cpu(id->cur_capacity0);
id->cur_capacity1 = __le16_to_cpu(id->cur_capacity1);
id->lba_capacity = __le32_to_cpu(id->lba_capacity);
id->dma_1word = __le16_to_cpu(id->dma_1word);
id->dma_mword = __le16_to_cpu(id->dma_mword);
id->eide_pio_modes = __le16_to_cpu(id->eide_pio_modes);
id->eide_dma_min = __le16_to_cpu(id->eide_dma_min);
id->eide_dma_time = __le16_to_cpu(id->eide_dma_time);
id->eide_pio = __le16_to_cpu(id->eide_pio);
id->eide_pio_iordy = __le16_to_cpu(id->eide_pio_iordy);
for (i = 0; i < 2; i++)
id->words69_70[i] = __le16_to_cpu(id->words69_70[i]);
for (i = 0; i < 4; i++)
id->words71_74[i] = __le16_to_cpu(id->words71_74[i]);
id->queue_depth = __le16_to_cpu(id->queue_depth);
for (i = 0; i < 4; i++)
id->words76_79[i] = __le16_to_cpu(id->words76_79[i]);
id->major_rev_num = __le16_to_cpu(id->major_rev_num);
id->minor_rev_num = __le16_to_cpu(id->minor_rev_num);
id->command_set_1 = __le16_to_cpu(id->command_set_1);
id->command_set_2 = __le16_to_cpu(id->command_set_2);
id->cfsse = __le16_to_cpu(id->cfsse);
id->cfs_enable_1 = __le16_to_cpu(id->cfs_enable_1);
id->cfs_enable_2 = __le16_to_cpu(id->cfs_enable_2);
id->csf_default = __le16_to_cpu(id->csf_default);
id->dma_ultra = __le16_to_cpu(id->dma_ultra);
id->word89 = __le16_to_cpu(id->word89);
id->word90 = __le16_to_cpu(id->word90);
id->CurAPMvalues = __le16_to_cpu(id->CurAPMvalues);
id->word92 = __le16_to_cpu(id->word92);
id->hw_config = __le16_to_cpu(id->hw_config);
id->acoustic = __le16_to_cpu(id->acoustic);
for (i = 0; i < 5; i++)
id->words95_99[i] = __le16_to_cpu(id->words95_99[i]);
id->lba_capacity_2 = __le64_to_cpu(id->lba_capacity_2);
for (i = 0; i < 22; i++)
id->words104_125[i] = __le16_to_cpu(id->words104_125[i]);
id->last_lun = __le16_to_cpu(id->last_lun);
id->word127 = __le16_to_cpu(id->word127);
id->dlf = __le16_to_cpu(id->dlf);
id->csfo = __le16_to_cpu(id->csfo);
for (i = 0; i < 26; i++)
id->words130_155[i] = __le16_to_cpu(id->words130_155[i]);
id->word156 = __le16_to_cpu(id->word156);
for (i = 0; i < 3; i++)
id->words157_159[i] = __le16_to_cpu(id->words157_159[i]);
id->cfa_power = __le16_to_cpu(id->cfa_power);
for (i = 0; i < 14; i++)
id->words161_175[i] = __le16_to_cpu(id->words161_175[i]);
for (i = 0; i < 31; i++)
id->words176_205[i] = __le16_to_cpu(id->words176_205[i]);
for (i = 0; i < 48; i++)
id->words206_254[i] = __le16_to_cpu(id->words206_254[i]);
id->integrity_word = __le16_to_cpu(id->integrity_word);
#else
#error "Please fix <asm/byteorder.h>"
#endif /* __BIG_ENDIAN */
#endif /* __LITTLE_ENDIAN */
}
int ide_driveid_update (ide_drive_t *drive) int ide_driveid_update (ide_drive_t *drive)
{ {
/* /*
...@@ -331,6 +430,7 @@ int ide_config_drive_speed (ide_drive_t *drive, byte speed) ...@@ -331,6 +430,7 @@ int ide_config_drive_speed (ide_drive_t *drive, byte speed)
} }
EXPORT_SYMBOL(ide_auto_reduce_xfer); EXPORT_SYMBOL(ide_auto_reduce_xfer);
EXPORT_SYMBOL(ide_fix_driveid);
EXPORT_SYMBOL(ide_driveid_update); EXPORT_SYMBOL(ide_driveid_update);
EXPORT_SYMBOL(ide_ata66_check); EXPORT_SYMBOL(ide_ata66_check);
EXPORT_SYMBOL(set_transfer); EXPORT_SYMBOL(set_transfer);
......
...@@ -2032,19 +2032,6 @@ static int idefloppy_cleanup (ide_drive_t *drive) ...@@ -2032,19 +2032,6 @@ static int idefloppy_cleanup (ide_drive_t *drive)
return 0; return 0;
} }
#ifdef CONFIG_PROC_FS
static ide_proc_entry_t idefloppy_proc[] = {
{ "geometry", S_IFREG|S_IRUGO, proc_ide_read_geometry, NULL },
{ NULL, 0, NULL, NULL }
};
#else
#define idefloppy_proc NULL
#endif /* CONFIG_PROC_FS */
/* /*
* IDE subdriver functions, registered with ide.c * IDE subdriver functions, registered with ide.c
*/ */
...@@ -2060,7 +2047,6 @@ static struct ata_operations idefloppy_driver = { ...@@ -2060,7 +2047,6 @@ static struct ata_operations idefloppy_driver = {
check_media_change: idefloppy_check_media_change, check_media_change: idefloppy_check_media_change,
revalidate: NULL, /* use default method */ revalidate: NULL, /* use default method */
capacity: idefloppy_capacity, capacity: idefloppy_capacity,
proc: idefloppy_proc
}; };
MODULE_DESCRIPTION("ATAPI FLOPPY Driver"); MODULE_DESCRIPTION("ATAPI FLOPPY Driver");
...@@ -2075,13 +2061,6 @@ static void __exit idefloppy_exit (void) ...@@ -2075,13 +2061,6 @@ static void __exit idefloppy_exit (void)
printk ("%s: cleanup_module() called while still busy\n", drive->name); printk ("%s: cleanup_module() called while still busy\n", drive->name);
failed++; failed++;
} }
#ifdef CONFIG_PROC_FS
/* We must remove proc entries defined in this module.
Otherwise we oops while accessing these entries */
if (drive->proc)
ide_remove_proc_entries(drive->proc, idefloppy_proc);
#endif
} }
} }
......
...@@ -265,6 +265,8 @@ static struct ata_pci_device pci_chipsets[] __initdata = { ...@@ -265,6 +265,8 @@ static struct ata_pci_device pci_chipsets[] __initdata = {
#endif #endif
#ifdef CONFIG_BLK_DEV_HPT366 #ifdef CONFIG_BLK_DEV_HPT366
{PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366, pci_init_hpt366, ata66_hpt366, ide_init_hpt366, ide_dmacapable_hpt366, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 240, ATA_F_IRQ | ATA_F_HPTHACK | ATA_F_DMA }, {PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366, pci_init_hpt366, ata66_hpt366, ide_init_hpt366, ide_dmacapable_hpt366, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 240, ATA_F_IRQ | ATA_F_HPTHACK | ATA_F_DMA },
{PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT372, pci_init_hpt366, ata66_hpt366, ide_init_hpt366, ide_dmacapable_hpt366, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 0, ATA_F_IRQ | ATA_F_HPTHACK | ATA_F_DMA },
{PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT374, pci_init_hpt366, ata66_hpt366, ide_init_hpt366, ide_dmacapable_hpt366, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 0, ATA_F_IRQ | ATA_F_HPTHACK | ATA_F_DMA },
#endif #endif
#ifdef CONFIG_BLK_DEV_ALI15X3 #ifdef CONFIG_BLK_DEV_ALI15X3
{PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229, pci_init_ali15x3, ata66_ali15x3, ide_init_ali15x3, ide_dmacapable_ali15x3, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0, 0 }, {PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229, pci_init_ali15x3, ata66_ali15x3, ide_init_ali15x3, ide_dmacapable_ali15x3, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0, 0 },
...@@ -307,6 +309,8 @@ static struct ata_pci_device pci_chipsets[] __initdata = { ...@@ -307,6 +309,8 @@ static struct ata_pci_device pci_chipsets[] __initdata = {
{PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0, ATA_F_FIXIRQ }, {PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0, ATA_F_FIXIRQ },
{PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C561, NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0, ATA_F_NOADMA }, {PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C561, NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0, ATA_F_NOADMA },
{PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366, NULL, NULL, IDE_NO_DRIVER, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 240, ATA_F_IRQ | ATA_F_HPTHACK }, {PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366, NULL, NULL, IDE_NO_DRIVER, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 240, ATA_F_IRQ | ATA_F_HPTHACK },
{PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT372, NULL, NULL, IDE_NO_DRIVER, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 0, ATA_F_IRQ | ATA_F_HPTHACK },
{PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT374, NULL, NULL, IDE_NO_DRIVER, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, OFF_BOARD, 0, ATA_F_IRQ | ATA_F_HPTHACK },
{0, 0, NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }}; {0, 0, NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }};
/* /*
...@@ -809,6 +813,48 @@ static void __init pdc20270_device_order_fixup (struct pci_dev *dev, struct ata_ ...@@ -809,6 +813,48 @@ static void __init pdc20270_device_order_fixup (struct pci_dev *dev, struct ata_
setup_pci_device(dev2, d2); setup_pci_device(dev2, d2);
} }
static void __init hpt374_device_order_fixup (struct pci_dev *dev, struct ata_pci_device *d)
{
struct pci_dev *dev2 = NULL;
struct pci_dev *findev;
struct ata_pci_device *d2;
if (PCI_FUNC(dev->devfn) & 1)
return;
pci_for_each_dev(findev) {
if ((findev->vendor == dev->vendor) &&
(findev->device == dev->device) &&
((findev->devfn - dev->devfn) == 1) &&
(PCI_FUNC(findev->devfn) & 1)) {
dev2 = findev;
break;
}
}
printk("%s: IDE controller on PCI bus %02x dev %02x\n",
dev->name, dev->bus->number, dev->devfn);
setup_pci_device(dev, d);
if (!dev2) {
return;
} else {
byte irq = 0, irq2 = 0;
pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
pci_read_config_byte(dev2, PCI_INTERRUPT_LINE, &irq2);
if (irq != irq2) {
pci_write_config_byte(dev2, PCI_INTERRUPT_LINE, irq);
dev2->irq = dev->irq;
printk("%s: pci-config space interrupt fixed.\n",
dev2->name);
}
}
d2 = d;
printk("%s: IDE controller on PCI bus %02x dev %02x\n",
dev2->name, dev2->bus->number, dev2->devfn);
setup_pci_device(dev2, d2);
}
static void __init hpt366_device_order_fixup (struct pci_dev *dev, struct ata_pci_device *d) static void __init hpt366_device_order_fixup (struct pci_dev *dev, struct ata_pci_device *d)
{ {
struct pci_dev *dev2 = NULL, *findev; struct pci_dev *dev2 = NULL, *findev;
...@@ -823,6 +869,7 @@ static void __init hpt366_device_order_fixup (struct pci_dev *dev, struct ata_pc ...@@ -823,6 +869,7 @@ static void __init hpt366_device_order_fixup (struct pci_dev *dev, struct ata_pc
class_rev &= 0xff; class_rev &= 0xff;
switch(class_rev) { switch(class_rev) {
case 5:
case 4: case 4:
case 3: printk("%s: IDE controller on PCI slot %s\n", dev->name, dev->slot_name); case 3: printk("%s: IDE controller on PCI slot %s\n", dev->name, dev->slot_name);
setup_pci_device(dev, d); setup_pci_device(dev, d);
...@@ -854,6 +901,8 @@ static void __init hpt366_device_order_fixup (struct pci_dev *dev, struct ata_pc ...@@ -854,6 +901,8 @@ static void __init hpt366_device_order_fixup (struct pci_dev *dev, struct ata_pc
setup_pci_device(dev2, d2); setup_pci_device(dev2, d2);
} }
/* /*
* This finds all PCI IDE controllers and calls appropriate initialization * This finds all PCI IDE controllers and calls appropriate initialization
* functions for them. * functions for them.
...@@ -883,8 +932,12 @@ static void __init scan_pcidev(struct pci_dev *dev) ...@@ -883,8 +932,12 @@ static void __init scan_pcidev(struct pci_dev *dev)
return; /* IT8172G is also more than only an IDE controller */ return; /* IT8172G is also more than only an IDE controller */
else if ((d->vendor == PCI_VENDOR_ID_UMC && d->device == PCI_DEVICE_ID_UMC_UM8886A) && !(PCI_FUNC(dev->devfn) & 1)) else if ((d->vendor == PCI_VENDOR_ID_UMC && d->device == PCI_DEVICE_ID_UMC_UM8886A) && !(PCI_FUNC(dev->devfn) & 1))
return; /* UM8886A/BF pair */ return; /* UM8886A/BF pair */
else if (d->flags & ATA_F_HPTHACK) else if (d->flags & ATA_F_HPTHACK) {
hpt366_device_order_fixup(dev, d); if (d->device == PCI_DEVICE_ID_TTI_HPT366)
hpt366_device_order_fixup(dev, d);
if (d->device == PCI_DEVICE_ID_TTI_HPT374)
hpt374_device_order_fixup(dev, d);
}
else if (d->vendor == PCI_VENDOR_ID_PROMISE && d->device == PCI_DEVICE_ID_PROMISE_20268R) else if (d->vendor == PCI_VENDOR_ID_PROMISE && d->device == PCI_DEVICE_ID_PROMISE_20268R)
pdc20270_device_order_fixup(dev, d); pdc20270_device_order_fixup(dev, d);
else if (!(d->vendor == 0 && d->device == 0) || (dev->class >> 8) == PCI_CLASS_STORAGE_IDE) { else if (!(d->vendor == 0 && d->device == 0) || (dev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
......
...@@ -518,7 +518,7 @@ static void channel_probe(struct ata_channel *ch) ...@@ -518,7 +518,7 @@ static void channel_probe(struct ata_channel *ch)
sprintf(ch->dev.bus_id, "%04x", ch->io_ports[IDE_DATA_OFFSET]); sprintf(ch->dev.bus_id, "%04x", ch->io_ports[IDE_DATA_OFFSET]);
sprintf(ch->dev.name, "ide"); sprintf(ch->dev.name, "ide");
ch->dev.driver_data = ch; ch->dev.driver_data = ch;
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
if (ch->pci_dev) if (ch->pci_dev)
ch->dev.parent = &ch->pci_dev->dev; ch->dev.parent = &ch->pci_dev->dev;
else else
......
...@@ -38,18 +38,6 @@ ...@@ -38,18 +38,6 @@
* "settings" files. e.g. "cat /proc/ide0/hda/settings" * "settings" files. e.g. "cat /proc/ide0/hda/settings"
* To write a new value "val" into a specific setting "name", use: * To write a new value "val" into a specific setting "name", use:
* echo "name:val" >/proc/ide/ide0/hda/settings * echo "name:val" >/proc/ide/ide0/hda/settings
*
* Also useful, "cat /proc/ide0/hda/[identify, smart_values,
* smart_thresholds, capabilities]" will issue an IDENTIFY /
* PACKET_IDENTIFY / SMART_READ_VALUES / SMART_READ_THRESHOLDS /
* SENSE CAPABILITIES command to /dev/hda, and then dump out the
* returned data as 256 16-bit words. The "hdparm" utility will
* be updated someday soon to use this mechanism.
*
* Feel free to develop and distribute fancy GUI configuration
* utilities for your favorite PCI chipsets. I'll be working on
* one for the Promise 20246 someday soon. -ml
*
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -131,80 +119,6 @@ static int ide_getdigit(char c) ...@@ -131,80 +119,6 @@ static int ide_getdigit(char c)
return digit; return digit;
} }
static int proc_ide_read_imodel
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
struct ata_channel *hwif = data;
int len;
const char *name;
switch (hwif->chipset) {
case ide_unknown: name = "(none)"; break;
case ide_generic: name = "generic"; break;
case ide_pci: name = "pci"; break;
case ide_cmd640: name = "cmd640"; break;
case ide_dtc2278: name = "dtc2278"; break;
case ide_ali14xx: name = "ali14xx"; break;
case ide_qd65xx: name = "qd65xx"; break;
case ide_umc8672: name = "umc8672"; break;
case ide_ht6560b: name = "ht6560b"; break;
case ide_pdc4030: name = "pdc4030"; break;
case ide_rz1000: name = "rz1000"; break;
case ide_trm290: name = "trm290"; break;
case ide_cmd646: name = "cmd646"; break;
case ide_cy82c693: name = "cy82c693"; break;
case ide_pmac: name = "mac-io"; break;
default: name = "(unknown)"; break;
}
len = sprintf(page, "%s\n", name);
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
static int proc_ide_read_channel(char *page, char **start,
off_t off, int count, int *eof, void *data)
{
struct ata_channel *hwif = data;
int len;
page[0] = hwif->unit ? '1' : '0';
page[1] = '\n';
len = 2;
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
static int get_identify(ide_drive_t *drive, u8 *buf)
{
struct ata_taskfile args;
memset(&args, 0, sizeof(args));
args.taskfile.sector_count = 0x01;
args.taskfile.command = (drive->type == ATA_DISK) ? WIN_IDENTIFY : WIN_PIDENTIFY ;
ide_cmd_type_parser(&args);
return ide_raw_taskfile(drive, &args, buf);
}
static int proc_ide_read_identify
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
ide_drive_t *drive = data;
int len = 0;
int i = 0;
if (drive && !get_identify(drive, page)) {
unsigned short *val = (unsigned short *) page;
char *out = ((char *)val) + (SECTOR_WORDS * 4);
page = out;
do {
out += sprintf(out, "%04x%c", le16_to_cpu(*val), (++i & 7) ? ' ' : '\n');
val += 1;
} while (i < (SECTOR_WORDS * 2));
len = out - page;
} else
len = sprintf(page, "\n");
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
static int proc_ide_read_settings static int proc_ide_read_settings
(char *page, char **start, off_t off, int count, int *eof, void *data) (char *page, char **start, off_t off, int count, int *eof, void *data)
{ {
...@@ -320,72 +234,7 @@ static int proc_ide_write_settings ...@@ -320,72 +234,7 @@ static int proc_ide_write_settings
return -EINVAL; return -EINVAL;
} }
int proc_ide_read_capacity
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
ide_drive_t *drive = data;
struct ata_operations *driver = drive->driver;
int len;
if (!driver)
len = sprintf(page, "(none)\n");
else
len = sprintf(page,"%llu\n", (unsigned long long) ata_capacity(drive));
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
int proc_ide_read_geometry
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
ide_drive_t *drive = data;
char *out = page;
int len;
out += sprintf(out,"physical %d/%d/%d\n", drive->cyl, drive->head, drive->sect);
out += sprintf(out,"logical %d/%d/%d\n", drive->bios_cyl, drive->bios_head, drive->bios_sect);
len = out - page;
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
static int proc_ide_read_dmodel
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
ide_drive_t *drive = data;
struct hd_driveid *id = drive->id;
int len;
len = sprintf(page, "%.40s\n", (id && id->model[0]) ? (char *)id->model : "(none)");
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
static int proc_ide_read_media
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
ide_drive_t *drive = data;
const char *type;
int len;
switch (drive->type) {
case ATA_DISK: type = "disk\n";
break;
case ATA_ROM: type = "cdrom\n";
break;
case ATA_TAPE: type = "tape\n";
break;
case ATA_FLOPPY:type = "floppy\n";
break;
default: type = "UNKNOWN\n";
break;
}
strcpy(page,type);
len = strlen(type);
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
static ide_proc_entry_t generic_drive_entries[] = { static ide_proc_entry_t generic_drive_entries[] = {
{ "identify", S_IFREG|S_IRUSR, proc_ide_read_identify, NULL },
{ "media", S_IFREG|S_IRUGO, proc_ide_read_media, NULL },
{ "model", S_IFREG|S_IRUGO, proc_ide_read_dmodel, NULL },
{ "settings", S_IFREG|S_IRUSR|S_IWUSR,proc_ide_read_settings, proc_ide_write_settings }, { "settings", S_IFREG|S_IRUSR|S_IWUSR,proc_ide_read_settings, proc_ide_write_settings },
{ NULL, 0, NULL, NULL } { NULL, 0, NULL, NULL }
}; };
...@@ -472,12 +321,6 @@ void destroy_proc_ide_drives(struct ata_channel *hwif) ...@@ -472,12 +321,6 @@ void destroy_proc_ide_drives(struct ata_channel *hwif)
} }
} }
static ide_proc_entry_t hwif_entries[] = {
{ "channel", S_IFREG|S_IRUGO, proc_ide_read_channel, NULL },
{ "model", S_IFREG|S_IRUGO, proc_ide_read_imodel, NULL },
{ NULL, 0, NULL, NULL }
};
void create_proc_ide_interfaces(void) void create_proc_ide_interfaces(void)
{ {
int h; int h;
...@@ -491,7 +334,6 @@ void create_proc_ide_interfaces(void) ...@@ -491,7 +334,6 @@ void create_proc_ide_interfaces(void)
hwif->proc = proc_mkdir(hwif->name, proc_ide_root); hwif->proc = proc_mkdir(hwif->name, proc_ide_root);
if (!hwif->proc) if (!hwif->proc)
return; return;
ide_add_proc_entries(hwif->proc, hwif_entries, hwif);
} }
create_proc_ide_drives(hwif); create_proc_ide_drives(hwif);
} }
...@@ -510,7 +352,6 @@ static void destroy_proc_ide_interfaces(void) ...@@ -510,7 +352,6 @@ static void destroy_proc_ide_interfaces(void)
#endif #endif
if (exist) { if (exist) {
destroy_proc_ide_drives(hwif); destroy_proc_ide_drives(hwif);
ide_remove_proc_entries(hwif->proc, hwif_entries);
remove_proc_entry(hwif->name, proc_ide_root); remove_proc_entry(hwif->name, proc_ide_root);
hwif->proc = NULL; hwif->proc = NULL;
} else } else
......
...@@ -6000,7 +6000,7 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor) ...@@ -6000,7 +6000,7 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor)
if (strstr(drive->id->model, "OnStream DI-")) if (strstr(drive->id->model, "OnStream DI-"))
tape->onstream = 1; tape->onstream = 1;
drive->dsc_overlap = 1; drive->dsc_overlap = 1;
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
if (!tape->onstream && drive->channel->pci_dev != NULL) { if (!tape->onstream && drive->channel->pci_dev != NULL) {
/* /*
* These two ide-pci host adapters appear to need DSC overlap disabled. * These two ide-pci host adapters appear to need DSC overlap disabled.
...@@ -6009,10 +6009,10 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor) ...@@ -6009,10 +6009,10 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor)
if ((drive->channel->pci_dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) || if ((drive->channel->pci_dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) ||
(drive->channel->pci_dev->device == PCI_DEVICE_ID_TTI_HPT343)) { (drive->channel->pci_dev->device == PCI_DEVICE_ID_TTI_HPT343)) {
printk(KERN_INFO "ide-tape: %s: disabling DSC overlap\n", tape->name); printk(KERN_INFO "ide-tape: %s: disabling DSC overlap\n", tape->name);
drive->dsc_overlap = 0; drive->dsc_overlap = 0;
} }
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
tape->drive = drive; tape->drive = drive;
tape->minor = minor; tape->minor = minor;
tape->name[0] = 'h'; tape->name[1] = 't'; tape->name[2] = '0' + minor; tape->name[0] = 'h'; tape->name[1] = 't'; tape->name[2] = '0' + minor;
......
...@@ -468,10 +468,10 @@ ide_startstop_t ata_taskfile(struct ata_device *drive, ...@@ -468,10 +468,10 @@ ide_startstop_t ata_taskfile(struct ata_device *drive,
/* for dma commands we don't set the handler */ /* for dma commands we don't set the handler */
if (args->taskfile.command == WIN_WRITEDMA if (args->taskfile.command == WIN_WRITEDMA
|| args->taskfile.command == WIN_WRITEDMA_EXT) || args->taskfile.command == WIN_WRITEDMA_EXT)
udma_write(drive, rq); return !udma_write(drive, rq);
else if (args->taskfile.command == WIN_READDMA else if (args->taskfile.command == WIN_READDMA
|| args->taskfile.command == WIN_READDMA_EXT) || args->taskfile.command == WIN_READDMA_EXT)
udma_read(drive, rq); return !udma_read(drive, rq);
#ifdef CONFIG_BLK_DEV_IDE_TCQ #ifdef CONFIG_BLK_DEV_IDE_TCQ
else if (args->taskfile.command == WIN_WRITEDMA_QUEUED else if (args->taskfile.command == WIN_WRITEDMA_QUEUED
|| args->taskfile.command == WIN_WRITEDMA_QUEUED_EXT || args->taskfile.command == WIN_WRITEDMA_QUEUED_EXT
......
...@@ -123,7 +123,7 @@ static int initializing; /* set while initializing built-in drivers */ ...@@ -123,7 +123,7 @@ static int initializing; /* set while initializing built-in drivers */
*/ */
spinlock_t ide_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; spinlock_t ide_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */ static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
#endif #endif
...@@ -1614,7 +1614,7 @@ void ata_irq_request(int irq, void *data, struct pt_regs *regs) ...@@ -1614,7 +1614,7 @@ void ata_irq_request(int irq, void *data, struct pt_regs *regs)
* For PCI, we cannot tell the difference, * For PCI, we cannot tell the difference,
* so in that case we just ignore it and hope it goes away. * so in that case we just ignore it and hope it goes away.
*/ */
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
if (ch->pci_dev && !ch->pci_dev->vendor) if (ch->pci_dev && !ch->pci_dev->vendor)
#endif #endif
{ {
...@@ -1622,7 +1622,7 @@ void ata_irq_request(int irq, void *data, struct pt_regs *regs) ...@@ -1622,7 +1622,7 @@ void ata_irq_request(int irq, void *data, struct pt_regs *regs)
* safely try to do something about it: * safely try to do something about it:
*/ */
unexpected_irq(irq); unexpected_irq(irq);
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
} else { } else {
/* /*
* Whack the status register, just in case we have a leftover pending IRQ. * Whack the status register, just in case we have a leftover pending IRQ.
...@@ -1936,7 +1936,6 @@ static int ide_release(struct inode * inode, struct file * file) ...@@ -1936,7 +1936,6 @@ static int ide_release(struct inode * inode, struct file * file)
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
ide_proc_entry_t generic_subdriver_entries[] = { ide_proc_entry_t generic_subdriver_entries[] = {
{ "capacity", S_IFREG|S_IRUGO, proc_ide_read_capacity, NULL },
{ NULL, 0, NULL, NULL } { NULL, 0, NULL, NULL }
}; };
#endif #endif
...@@ -2142,7 +2141,7 @@ void ide_unregister(struct ata_channel *ch) ...@@ -2142,7 +2141,7 @@ void ide_unregister(struct ata_channel *ch)
ch->chipset = old.chipset; ch->chipset = old.chipset;
ch->autodma = old.autodma; ch->autodma = old.autodma;
ch->udma_four = old.udma_four; ch->udma_four = old.udma_four;
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
ch->pci_dev = old.pci_dev; ch->pci_dev = old.pci_dev;
#endif #endif
ch->straight8 = old.straight8; ch->straight8 = old.straight8;
...@@ -2849,7 +2848,7 @@ int __init ide_setup (char *s) ...@@ -2849,7 +2848,7 @@ int __init ide_setup (char *s)
return 1; return 1;
} }
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
if (!strcmp(s, "ide=reverse")) { if (!strcmp(s, "ide=reverse")) {
ide_scan_direction = 1; ide_scan_direction = 1;
printk(" : Enabled support for IDE inverse scan order.\n"); printk(" : Enabled support for IDE inverse scan order.\n");
...@@ -3051,7 +3050,7 @@ int __init ide_setup (char *s) ...@@ -3051,7 +3050,7 @@ int __init ide_setup (char *s)
case -8: /* minus8 */ case -8: /* minus8 */
goto bad_option; goto bad_option;
case -7: /* ata66 */ case -7: /* ata66 */
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
hwif->udma_four = 1; hwif->udma_four = 1;
goto done; goto done;
#else #else
...@@ -3332,7 +3331,6 @@ EXPORT_SYMBOL(ide_stall_queue); ...@@ -3332,7 +3331,6 @@ EXPORT_SYMBOL(ide_stall_queue);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
EXPORT_SYMBOL(ide_add_proc_entries); EXPORT_SYMBOL(ide_add_proc_entries);
EXPORT_SYMBOL(ide_remove_proc_entries); EXPORT_SYMBOL(ide_remove_proc_entries);
EXPORT_SYMBOL(proc_ide_read_geometry);
#endif #endif
EXPORT_SYMBOL(ide_add_setting); EXPORT_SYMBOL(ide_add_setting);
EXPORT_SYMBOL(ide_remove_setting); EXPORT_SYMBOL(ide_remove_setting);
...@@ -3433,7 +3431,7 @@ static int __init ata_module_init(void) ...@@ -3433,7 +3431,7 @@ static int __init ata_module_init(void)
*/ */
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
if (pci_present()) { if (pci_present()) {
# ifdef CONFIG_BLK_DEV_IDEPCI # ifdef CONFIG_PCI
ide_scan_pcibus(ide_scan_direction); ide_scan_pcibus(ide_scan_direction);
# else # else
# ifdef CONFIG_BLK_DEV_RZ1000 # ifdef CONFIG_BLK_DEV_RZ1000
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* Dunno if this fixes both ports, or only the primary port (?). * Dunno if this fixes both ports, or only the primary port (?).
*/ */
#include <linux/config.h> /* for CONFIG_BLK_DEV_IDEPCI */ #include <linux/config.h> /* for CONFIG_PCI */
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <asm/io.h> #include <asm/io.h>
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
void __init ide_init_rz1000(struct ata_channel *hwif) /* called from ide-pci.c */ void __init ide_init_rz1000(struct ata_channel *hwif) /* called from ide-pci.c */
{ {
...@@ -87,4 +87,4 @@ void __init ide_probe_for_rz100x (void) /* called from ide.c */ ...@@ -87,4 +87,4 @@ void __init ide_probe_for_rz100x (void) /* called from ide.c */
init_rz1000 (dev, "RZ1001"); init_rz1000 (dev, "RZ1001");
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
...@@ -70,7 +70,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -70,7 +70,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
*/ */
static __inline__ void ide_init_default_hwifs(void) static __inline__ void ide_init_default_hwifs(void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
...@@ -79,37 +79,10 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -79,37 +79,10 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(ide_default_io_base(index)); hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
} }
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -21,34 +21,7 @@ ...@@ -21,34 +21,7 @@
#include <asm/arch/ide.h> #include <asm/arch/ide.h>
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -88,29 +88,6 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -88,29 +88,6 @@ static __inline__ void ide_init_default_hwifs(void)
} }
} }
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
/* some configuration options we don't need */ /* some configuration options we don't need */
#undef SUPPORT_VLB_SYNC #undef SUPPORT_VLB_SYNC
...@@ -119,11 +96,7 @@ typedef union { ...@@ -119,11 +96,7 @@ typedef union {
#undef SUPPORT_SLOW_DATA_PORTS #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #define SUPPORT_SLOW_DATA_PORTS 0
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/config.h> #include <linux/config.h>
#ifndef MAX_HWIFS #ifndef MAX_HWIFS
# ifdef CONFIG_BLK_DEV_IDEPCI # ifdef CONFIG_PCI
#define MAX_HWIFS 10 #define MAX_HWIFS 10
# else # else
#define MAX_HWIFS 6 #define MAX_HWIFS 6
...@@ -74,7 +74,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -74,7 +74,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
static __inline__ void ide_init_default_hwifs(void) static __inline__ void ide_init_default_hwifs(void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
...@@ -83,37 +83,10 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -83,37 +83,10 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(ide_default_io_base(index)); hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
} }
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <linux/irq.h> #include <linux/irq.h>
#ifndef MAX_HWIFS #ifndef MAX_HWIFS
# ifdef CONFIG_BLK_DEV_IDEPCI # ifdef CONFIG_PCI
#define MAX_HWIFS 10 #define MAX_HWIFS 10
# else # else
#define MAX_HWIFS 6 #define MAX_HWIFS 6
...@@ -80,7 +80,7 @@ ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port ...@@ -80,7 +80,7 @@ ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port
static __inline__ void static __inline__ void
ide_init_default_hwifs (void) ide_init_default_hwifs (void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
...@@ -89,37 +89,10 @@ ide_init_default_hwifs (void) ...@@ -89,37 +89,10 @@ ide_init_default_hwifs (void)
hw.irq = ide_default_irq(ide_default_io_base(index)); hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
} }
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -80,29 +80,6 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -80,29 +80,6 @@ static __inline__ void ide_init_default_hwifs(void)
{ {
} }
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit7 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit5 : 1; /* always 1 */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned head : 4; /* always zeros here */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned HOB : 1; /* 48-bit address ordering */
unsigned reserved456 : 3;
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned SRST : 1; /* host soft reset bit */
unsigned nIEN : 1; /* device INTRQ to host */
unsigned bit0 : 1;
} b;
} control_t;
#undef SUPPORT_SLOW_DATA_PORTS #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #define SUPPORT_SLOW_DATA_PORTS 0
...@@ -155,7 +132,6 @@ typedef union { ...@@ -155,7 +132,6 @@ typedef union {
#define outsl(data_reg, buffer, wcount) outsw(data_reg, buffer, (wcount)<<1) #define outsl(data_reg, buffer, wcount) outsw(data_reg, buffer, (wcount)<<1)
#if defined(CONFIG_ATARI) || defined(CONFIG_Q40) #if defined(CONFIG_ATARI) || defined(CONFIG_Q40)
#define insl_swapw(data_reg, buffer, wcount) \ #define insl_swapw(data_reg, buffer, wcount) \
...@@ -169,101 +145,6 @@ typedef union { ...@@ -169,101 +145,6 @@ typedef union {
#endif /* CONFIG_ATARI || CONFIG_Q40 */ #endif /* CONFIG_ATARI || CONFIG_Q40 */
#define T_CHAR (0x0000) /* char: don't touch */
#define T_SHORT (0x4000) /* short: 12 -> 21 */
#define T_INT (0x8000) /* int: 1234 -> 4321 */
#define T_TEXT (0xc000) /* text: 12 -> 21 */
#define T_MASK_TYPE (0xc000)
#define T_MASK_COUNT (0x3fff)
#define D_CHAR(cnt) (T_CHAR | (cnt))
#define D_SHORT(cnt) (T_SHORT | (cnt))
#define D_INT(cnt) (T_INT | (cnt))
#define D_TEXT(cnt) (T_TEXT | (cnt))
/* Q40 and Atari have byteswapped IDE bus and since many interesting
* values in the identification string are text, chars and words they
* happened to be almost correct without swapping.. However *_capacity
* is needed for drives over 8 GB. RZ */
#if defined(CONFIG_Q40) || defined(CONFIG_ATARI)
#define M68K_IDE_SWAPW (MACH_IS_Q40 || MACH_IS_ATARI)
#endif
#if defined(CONFIG_AMIGA) || defined (CONFIG_MAC) || defined(M68K_IDE_SWAPW)
static u_short driveid_types[] = {
D_SHORT(10), /* config - vendor2 */
D_TEXT(20), /* serial_no */
D_SHORT(3), /* buf_type, buf_size - ecc_bytes */
D_TEXT(48), /* fw_rev - model */
D_CHAR(2), /* max_multsect - vendor3 */
D_SHORT(1), /* dword_io */
D_CHAR(2), /* vendor4 - capability */
D_SHORT(1), /* reserved50 */
D_CHAR(4), /* vendor5 - tDMA */
D_SHORT(4), /* field_valid - cur_sectors */
D_INT(1), /* cur_capacity */
D_CHAR(2), /* multsect - multsect_valid */
D_INT(1), /* lba_capacity */
D_SHORT(194) /* dma_1word - reserved */
};
#define num_driveid_types (sizeof(driveid_types)/sizeof(*driveid_types))
#endif /* CONFIG_AMIGA */
static __inline__ void ide_fix_driveid(struct hd_driveid *id)
{
#if defined(CONFIG_AMIGA) || defined (CONFIG_MAC) || defined(M68K_IDE_SWAPW)
u_char *p = (u_char *)id;
int i, j, cnt;
u_char t;
if (!MACH_IS_AMIGA && !MACH_IS_MAC && !MACH_IS_Q40 && !MACH_IS_ATARI)
return;
#ifdef M68K_IDE_SWAPW
if (M68K_IDE_SWAPW) /* fix bus byteorder first */
for (i=0; i < 512; i+=2) {
t = p[i]; p[i] = p[i+1]; p[i+1] = t;
}
#endif
for (i = 0; i < num_driveid_types; i++) {
cnt = driveid_types[i] & T_MASK_COUNT;
switch (driveid_types[i] & T_MASK_TYPE) {
case T_CHAR:
p += cnt;
break;
case T_SHORT:
for (j = 0; j < cnt; j++) {
t = p[0];
p[0] = p[1];
p[1] = t;
p += 2;
}
break;
case T_INT:
for (j = 0; j < cnt; j++) {
t = p[0];
p[0] = p[3];
p[3] = t;
t = p[1];
p[1] = p[2];
p[2] = t;
p += 4;
}
break;
case T_TEXT:
for (j = 0; j < cnt; j += 2) {
t = p[0];
p[0] = p[1];
p[1] = t;
p += 2;
}
break;
}
}
#endif /* CONFIG_AMIGA */
}
static __inline__ void ide_release_lock (int *ide_lock) static __inline__ void ide_release_lock (int *ide_lock)
{ {
#ifdef CONFIG_ATARI #ifdef CONFIG_ATARI
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <asm/io.h> #include <asm/io.h>
#ifndef MAX_HWIFS #ifndef MAX_HWIFS
# ifdef CONFIG_BLK_DEV_IDEPCI # ifdef CONFIG_PCI
#define MAX_HWIFS 10 #define MAX_HWIFS 10
# else # else
#define MAX_HWIFS 6 #define MAX_HWIFS 6
...@@ -53,7 +53,7 @@ static inline void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -53,7 +53,7 @@ static inline void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
static __inline__ void ide_init_default_hwifs(void) static __inline__ void ide_init_default_hwifs(void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
...@@ -62,137 +62,12 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -62,137 +62,12 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(ide_default_io_base(index)); hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */
}
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
#ifdef __MIPSEB__
unsigned bit7 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit5 : 1; /* always 1 */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned head : 4; /* always zeros here */
#else
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
#endif
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
#ifdef __MIPSEB__
unsigned HOB : 1; /* 48-bit address ordering */
unsigned reserved456 : 3;
unsigned SRST : 1; /* host soft reset bit */
unsigned nIEN : 1; /* device INTRQ to host */
unsigned bit0 : 1;
#else
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
#endif #endif
} b; }
} control_t;
#undef SUPPORT_VLB_SYNC #undef SUPPORT_VLB_SYNC
#define SUPPORT_VLB_SYNC 0 #define SUPPORT_VLB_SYNC 0
#if defined(__MIPSEB__)
#define T_CHAR (0x0000) /* char: don't touch */
#define T_SHORT (0x4000) /* short: 12 -> 21 */
#define T_INT (0x8000) /* int: 1234 -> 4321 */
#define T_TEXT (0xc000) /* text: 12 -> 21 */
#define T_MASK_TYPE (0xc000)
#define T_MASK_COUNT (0x3fff)
#define D_CHAR(cnt) (T_CHAR | (cnt))
#define D_SHORT(cnt) (T_SHORT | (cnt))
#define D_INT(cnt) (T_INT | (cnt))
#define D_TEXT(cnt) (T_TEXT | (cnt))
static u_short driveid_types[] = {
D_SHORT(10), /* config - vendor2 */
D_TEXT(20), /* serial_no */
D_SHORT(3), /* buf_type - ecc_bytes */
D_TEXT(48), /* fw_rev - model */
D_CHAR(2), /* max_multsect - vendor3 */
D_SHORT(1), /* dword_io */
D_CHAR(2), /* vendor4 - capability */
D_SHORT(1), /* reserved50 */
D_CHAR(4), /* vendor5 - tDMA */
D_SHORT(4), /* field_valid - cur_sectors */
D_INT(1), /* cur_capacity */
D_CHAR(2), /* multsect - multsect_valid */
D_INT(1), /* lba_capacity */
D_SHORT(194) /* dma_1word - reservedyy */
};
#define num_driveid_types (sizeof(driveid_types)/sizeof(*driveid_types))
static __inline__ void ide_fix_driveid(struct hd_driveid *id)
{
u_char *p = (u_char *)id;
int i, j, cnt;
u_char t;
for (i = 0; i < num_driveid_types; i++) {
cnt = driveid_types[i] & T_MASK_COUNT;
switch (driveid_types[i] & T_MASK_TYPE) {
case T_CHAR:
p += cnt;
break;
case T_SHORT:
for (j = 0; j < cnt; j++) {
t = p[0];
p[0] = p[1];
p[1] = t;
p += 2;
}
break;
case T_INT:
for (j = 0; j < cnt; j++) {
t = p[0];
p[0] = p[3];
p[3] = t;
t = p[1];
p[1] = p[2];
p[2] = t;
p += 4;
}
break;
case T_TEXT:
for (j = 0; j < cnt; j += 2) {
t = p[0];
p[0] = p[1];
p[1] = t;
p += 2;
}
break;
};
}
}
#else /* defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__) */
#define ide_fix_driveid(id) do {} while (0)
#endif
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
#include <linux/config.h> #include <linux/config.h>
#ifndef MAX_HWIFS #ifndef MAX_HWIFS
# ifdef CONFIG_BLK_DEV_IDEPCI # ifdef CONFIG_PCI
#define MAX_HWIFS 10 # define MAX_HWIFS 10
# else # else
#define MAX_HWIFS 6 # define MAX_HWIFS 6
# endif # endif
#endif #endif
...@@ -56,7 +56,7 @@ static inline void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -56,7 +56,7 @@ static inline void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
static __inline__ void ide_init_default_hwifs(void) static __inline__ void ide_init_default_hwifs(void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
...@@ -65,82 +65,10 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -65,82 +65,10 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(ide_default_io_base(index)); hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */
}
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
#if defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__)
#ifdef insl
#undef insl
#endif
#ifdef outsl
#undef outsl
#endif
#ifdef insw
#undef insw
#endif
#ifdef outsw
#undef outsw
#endif #endif
}
#define insw(p,a,c) \
do { \
unsigned short *ptr = (unsigned short *)(a); \
unsigned int i = (c); \
while (i--) \
*ptr++ = inw(p); \
} while (0)
#define insl(p,a,c) \
do { \
unsigned long *ptr = (unsigned long *)(a); \
unsigned int i = (c); \
while (i--) \
*ptr++ = inl(p); \
} while (0)
#define outsw(p,a,c) \
do { \
unsigned short *ptr = (unsigned short *)(a); \
unsigned int i = (c); \
while (i--) \
outw(*ptr++, (p)); \
} while (0)
#define outsl(p,a,c) { \
unsigned long *ptr = (unsigned long *)(a); \
unsigned int i = (c); \
while (i--) \
outl(*ptr++, (p)); \
} while (0)
#endif /* defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__) */
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -69,7 +69,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -69,7 +69,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
static __inline__ void ide_init_default_hwifs(void) static __inline__ void ide_init_default_hwifs(void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
...@@ -78,37 +78,10 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -78,37 +78,10 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(ide_default_io_base(index)); hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
} }
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <asm/io.h> #include <asm/io.h>
extern void ppc_generic_ide_fix_driveid(struct hd_driveid *id);
struct ide_machdep_calls { struct ide_machdep_calls {
int (*default_irq)(ide_ioreg_t base); int (*default_irq)(ide_ioreg_t base);
ide_ioreg_t (*default_io_base)(int index); ide_ioreg_t (*default_io_base)(int index);
...@@ -43,9 +41,6 @@ struct ide_machdep_calls { ...@@ -43,9 +41,6 @@ struct ide_machdep_calls {
extern struct ide_machdep_calls ppc_ide_md; extern struct ide_machdep_calls ppc_ide_md;
void ppc_generic_ide_fix_driveid(struct hd_driveid *id);
#define ide_fix_driveid(id) ppc_generic_ide_fix_driveid((id))
#undef SUPPORT_SLOW_DATA_PORTS #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #define SUPPORT_SLOW_DATA_PORTS 0
#undef SUPPORT_VLB_SYNC #undef SUPPORT_VLB_SYNC
...@@ -96,7 +91,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ...@@ -96,7 +91,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw,
static __inline__ void ide_init_default_hwifs(void) static __inline__ void ide_init_default_hwifs(void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
ide_ioreg_t base; ide_ioreg_t base;
...@@ -109,36 +104,9 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -109,36 +104,9 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(base); hw.irq = ide_default_irq(base);
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
} }
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit7 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit5 : 1; /* always 1 */
unsigned unit : 1; /* drive select number, 0/1 */
unsigned head : 4; /* always zeros here */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned HOB : 1; /* 48-bit address ordering */
unsigned reserved456 : 3;
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned SRST : 1; /* host soft reset bit */
unsigned nIEN : 1; /* device INTRQ to host */
unsigned bit0 : 1;
} b;
} control_t;
/*
* The following are not needed for the non-m68k ports
* unless direct IDE on 8xx
*/
#if (defined CONFIG_APUS || defined CONFIG_BLK_DEV_MPC8xx_IDE ) #if (defined CONFIG_APUS || defined CONFIG_BLK_DEV_MPC8xx_IDE )
#define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1) #define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1)
#else #else
......
...@@ -24,9 +24,6 @@ ...@@ -24,9 +24,6 @@
#define ide__sti() __sti() #define ide__sti() __sti()
void ppc64_ide_fix_driveid(struct hd_driveid *id);
#define ide_fix_driveid(id) ppc64_ide_fix_driveid((id))
static __inline__ int ide_default_irq(ide_ioreg_t base) { return 0; } static __inline__ int ide_default_irq(ide_ioreg_t base) { return 0; }
static __inline__ ide_ioreg_t ide_default_io_base(int index) { return 0; } static __inline__ ide_ioreg_t ide_default_io_base(int index) { return 0; }
...@@ -53,33 +50,6 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -53,33 +50,6 @@ static __inline__ void ide_init_default_hwifs(void)
{ {
} }
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
/* XXX is this correct? - Anton */
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned HOB : 1; /* 48-bit address ordering */
unsigned reserved456 : 3;
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned SRST : 1; /* host soft reset bit */
unsigned nIEN : 1; /* device INTRQ to host */
unsigned bit0 : 1;
} b;
} control_t;
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
/* /*
* linux/include/asm-arm/ide.h * linux/include/asm-s390/ide.h
* *
* Copyright (C) 1994-1996 Linus Torvalds & authors * Copyright (C) 1994-1996 Linus Torvalds & authors
*/ */
...@@ -17,29 +17,6 @@ ...@@ -17,29 +17,6 @@
#define ide__sti() do {} while (0) #define ide__sti() do {} while (0)
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
/* /*
* The following are not needed for the non-m68k ports * The following are not needed for the non-m68k ports
*/ */
...@@ -57,4 +34,4 @@ typedef union { ...@@ -57,4 +34,4 @@ typedef union {
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* __ASMARM_IDE_H */ #endif /* __ASMS390_IDE_H */
/* /*
* linux/include/asm-arm/ide.h * linux/include/asm-s390/ide.h
* *
* Copyright (C) 1994-1996 Linus Torvalds & authors * Copyright (C) 1994-1996 Linus Torvalds & authors
*/ */
...@@ -17,34 +17,7 @@ ...@@ -17,34 +17,7 @@
#define ide__sti() do {} while (0) #define ide__sti() do {} while (0)
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
...@@ -57,4 +30,4 @@ typedef union { ...@@ -57,4 +30,4 @@ typedef union {
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* __ASMARM_IDE_H */ #endif /* __ASMS390_IDE_H */
...@@ -95,7 +95,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -95,7 +95,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
static __inline__ void ide_init_default_hwifs(void) static __inline__ void ide_init_default_hwifs(void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
...@@ -104,37 +104,10 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -104,37 +104,10 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(ide_default_io_base(index)); hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
} }
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -61,7 +61,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -61,7 +61,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
*/ */
static __inline__ void ide_init_default_hwifs(void) static __inline__ void ide_init_default_hwifs(void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
...@@ -70,32 +70,9 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -70,32 +70,9 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(ide_default_io_base(index)); hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
} }
typedef union {
unsigned int all : 8; /* all of the bits together */
struct {
unsigned int bit7 : 1;
unsigned int lba : 1;
unsigned int bit5 : 1;
unsigned int unit : 1;
unsigned int head : 4;
} b;
} select_t;
typedef union {
unsigned int all : 8; /* all of the bits together */
struct {
unsigned int HOB : 1; /* 48-bit address ordering */
unsigned int reserved456: 3;
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned int SRST : 1; /* host soft reset bit */
unsigned int nIEN : 1; /* device INTRQ to host */
unsigned int bit0 : 1;
} b;
} control_t;
#undef SUPPORT_SLOW_DATA_PORTS #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #define SUPPORT_SLOW_DATA_PORTS 0
...@@ -188,84 +165,6 @@ static __inline__ void ide_outsw(unsigned long port, ...@@ -188,84 +165,6 @@ static __inline__ void ide_outsw(unsigned long port,
/* __flush_dcache_range((unsigned long)src, end); */ /* P3 see hme */ /* __flush_dcache_range((unsigned long)src, end); */ /* P3 see hme */
} }
#define T_CHAR (0x0000) /* char: don't touch */
#define T_SHORT (0x4000) /* short: 12 -> 21 */
#define T_INT (0x8000) /* int: 1234 -> 4321 */
#define T_TEXT (0xc000) /* text: 12 -> 21 */
#define T_MASK_TYPE (0xc000)
#define T_MASK_COUNT (0x3fff)
#define D_CHAR(cnt) (T_CHAR | (cnt))
#define D_SHORT(cnt) (T_SHORT | (cnt))
#define D_INT(cnt) (T_INT | (cnt))
#define D_TEXT(cnt) (T_TEXT | (cnt))
static u_short driveid_types[] = {
D_SHORT(10), /* config - vendor2 */
D_TEXT(20), /* serial_no */
D_SHORT(3), /* buf_type - ecc_bytes */
D_TEXT(48), /* fw_rev - model */
D_CHAR(2), /* max_multsect - vendor3 */
D_SHORT(1), /* dword_io */
D_CHAR(2), /* vendor4 - capability */
D_SHORT(1), /* reserved50 */
D_CHAR(4), /* vendor5 - tDMA */
D_SHORT(4), /* field_valid - cur_sectors */
D_INT(1), /* cur_capacity */
D_CHAR(2), /* multsect - multsect_valid */
D_INT(1), /* lba_capacity */
D_SHORT(194) /* dma_1word - reservedyy */
};
#define num_driveid_types (sizeof(driveid_types)/sizeof(*driveid_types))
static __inline__ void ide_fix_driveid(struct hd_driveid *id)
{
u_char *p = (u_char *)id;
int i, j, cnt;
u_char t;
for (i = 0; i < num_driveid_types; i++) {
cnt = driveid_types[i] & T_MASK_COUNT;
switch (driveid_types[i] & T_MASK_TYPE) {
case T_CHAR:
p += cnt;
break;
case T_SHORT:
for (j = 0; j < cnt; j++) {
t = p[0];
p[0] = p[1];
p[1] = t;
p += 2;
}
break;
case T_INT:
for (j = 0; j < cnt; j++) {
t = p[0];
p[0] = p[3];
p[3] = t;
t = p[1];
p[1] = p[2];
p[2] = t;
p += 4;
}
break;
case T_TEXT:
for (j = 0; j < cnt; j += 2) {
t = p[0];
p[0] = p[1];
p[1] = t;
p += 2;
}
break;
};
}
}
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
/* #define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1) */ /* #define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1) */
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
......
...@@ -57,7 +57,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -57,7 +57,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
*/ */
static __inline__ void ide_init_default_hwifs(void) static __inline__ void ide_init_default_hwifs(void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
...@@ -66,32 +66,9 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -66,32 +66,9 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(ide_default_io_base(index)); hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
} }
typedef union {
unsigned int all : 8; /* all of the bits together */
struct {
unsigned int bit7 : 1;
unsigned int lba : 1;
unsigned int bit5 : 1;
unsigned int unit : 1;
unsigned int head : 4;
} b;
} select_t;
typedef union {
unsigned int all : 8; /* all of the bits together */
struct {
unsigned int HOB : 1; /* 48-bit address ordering */
unsigned int reserved456: 3;
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned int SRST : 1; /* host soft reset bit */
unsigned int nIEN : 1; /* device INTRQ to host */
unsigned int bit0 : 1;
} b;
} control_t;
#undef SUPPORT_SLOW_DATA_PORTS #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #define SUPPORT_SLOW_DATA_PORTS 0
...@@ -204,84 +181,6 @@ static __inline__ void ide_outsw(unsigned long port, ...@@ -204,84 +181,6 @@ static __inline__ void ide_outsw(unsigned long port,
#endif #endif
} }
#define T_CHAR (0x0000) /* char: don't touch */
#define T_SHORT (0x4000) /* short: 12 -> 21 */
#define T_INT (0x8000) /* int: 1234 -> 4321 */
#define T_TEXT (0xc000) /* text: 12 -> 21 */
#define T_MASK_TYPE (0xc000)
#define T_MASK_COUNT (0x3fff)
#define D_CHAR(cnt) (T_CHAR | (cnt))
#define D_SHORT(cnt) (T_SHORT | (cnt))
#define D_INT(cnt) (T_INT | (cnt))
#define D_TEXT(cnt) (T_TEXT | (cnt))
static u_short driveid_types[] = {
D_SHORT(10), /* config - vendor2 */
D_TEXT(20), /* serial_no */
D_SHORT(3), /* buf_type - ecc_bytes */
D_TEXT(48), /* fw_rev - model */
D_CHAR(2), /* max_multsect - vendor3 */
D_SHORT(1), /* dword_io */
D_CHAR(2), /* vendor4 - capability */
D_SHORT(1), /* reserved50 */
D_CHAR(4), /* vendor5 - tDMA */
D_SHORT(4), /* field_valid - cur_sectors */
D_INT(1), /* cur_capacity */
D_CHAR(2), /* multsect - multsect_valid */
D_INT(1), /* lba_capacity */
D_SHORT(194) /* dma_1word - reservedyy */
};
#define num_driveid_types (sizeof(driveid_types)/sizeof(*driveid_types))
static __inline__ void ide_fix_driveid(struct hd_driveid *id)
{
u_char *p = (u_char *)id;
int i, j, cnt;
u_char t;
for (i = 0; i < num_driveid_types; i++) {
cnt = driveid_types[i] & T_MASK_COUNT;
switch (driveid_types[i] & T_MASK_TYPE) {
case T_CHAR:
p += cnt;
break;
case T_SHORT:
for (j = 0; j < cnt; j++) {
t = p[0];
p[0] = p[1];
p[1] = t;
p += 2;
}
break;
case T_INT:
for (j = 0; j < cnt; j++) {
t = p[0];
p[0] = p[3];
p[3] = t;
t = p[1];
p[1] = p[2];
p[2] = t;
p += 4;
}
break;
case T_TEXT:
for (j = 0; j < cnt; j += 2) {
t = p[0];
p[0] = p[1];
p[1] = t;
p += 2;
}
break;
};
}
}
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/config.h> #include <linux/config.h>
#ifndef MAX_HWIFS #ifndef MAX_HWIFS
# ifdef CONFIG_BLK_DEV_IDEPCI # ifdef CONFIG_PCI
#define MAX_HWIFS 10 #define MAX_HWIFS 10
# else # else
#define MAX_HWIFS 6 #define MAX_HWIFS 6
...@@ -74,7 +74,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -74,7 +74,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
static __inline__ void ide_init_default_hwifs(void) static __inline__ void ide_init_default_hwifs(void)
{ {
#ifndef CONFIG_BLK_DEV_IDEPCI #ifndef CONFIG_PCI
hw_regs_t hw; hw_regs_t hw;
int index; int index;
...@@ -83,37 +83,10 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -83,37 +83,10 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(ide_default_io_base(index)); hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif
} }
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number, 0 or 1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
} b;
} control_t;
/*
* The following are not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1) #define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0) #define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0)
......
...@@ -334,6 +334,7 @@ enum { ...@@ -334,6 +334,7 @@ enum {
/* structure returned by HDIO_GET_IDENTITY, /* structure returned by HDIO_GET_IDENTITY,
* as per ANSI NCITS ATA6 rev.1b spec * as per ANSI NCITS ATA6 rev.1b spec
*/ */
/* if you change something here remember to update ide_fix_driveid() */
struct hd_driveid { struct hd_driveid {
unsigned short config; /* lots of obsolete bit flags */ unsigned short config; /* lots of obsolete bit flags */
unsigned short cyls; /* Obsolete, "physical" cyls */ unsigned short cyls; /* Obsolete, "physical" cyls */
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <asm/byteorder.h>
#include <asm/hdreg.h> #include <asm/hdreg.h>
/* /*
...@@ -265,6 +266,50 @@ void ide_setup_ports(hw_regs_t *hw, ...@@ -265,6 +266,50 @@ void ide_setup_ports(hw_regs_t *hw,
struct ide_settings_s; struct ide_settings_s;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
#if defined(__LITTLE_ENDIAN_BITFIELD)
unsigned head : 4; /* always zeros here */
unsigned unit : 1; /* drive select number: 0/1 */
unsigned bit5 : 1; /* always 1 */
unsigned lba : 1; /* using LBA instead of CHS */
unsigned bit7 : 1; /* always 1 */
#elif defined(__BIG_ENDIAN_BITFIELD)
unsigned bit7 : 1;
unsigned lba : 1;
unsigned bit5 : 1;
unsigned unit : 1;
unsigned head : 4;
#else
#error "Please fix <asm/byteorder.h>"
#endif
} b;
} select_t;
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
#if defined(__LITTLE_ENDIAN_BITFIELD)
unsigned bit0 : 1;
unsigned nIEN : 1; /* device INTRQ to host */
unsigned SRST : 1; /* host soft reset bit */
unsigned bit3 : 1; /* ATA-2 thingy */
unsigned reserved456 : 3;
unsigned HOB : 1; /* 48-bit address ordering */
#elif defined(__BIG_ENDIAN_BITFIELD)
unsigned HOB : 1;
unsigned reserved456 : 3;
unsigned bit3 : 1;
unsigned SRST : 1;
unsigned nIEN : 1;
unsigned bit0 : 1;
#else
#error "Please fix <asm/byteorder.h>"
#endif
} b;
} control_t;
/* /*
* ATA/ATAPI device structure : * ATA/ATAPI device structure :
*/ */
...@@ -386,7 +431,7 @@ struct ata_channel { ...@@ -386,7 +431,7 @@ struct ata_channel {
ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */ ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */
hw_regs_t hw; /* Hardware info */ hw_regs_t hw; /* Hardware info */
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
struct pci_dev *pci_dev; /* for pci chipsets */ struct pci_dev *pci_dev; /* for pci chipsets */
#endif #endif
struct ata_device drives[MAX_DRIVES]; /* drive info */ struct ata_device drives[MAX_DRIVES]; /* drive info */
...@@ -589,7 +634,6 @@ void destroy_proc_ide_drives(struct ata_channel *); ...@@ -589,7 +634,6 @@ void destroy_proc_ide_drives(struct ata_channel *);
void create_proc_ide_interfaces(void); void create_proc_ide_interfaces(void);
void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p, void *data); void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p, void *data);
void ide_remove_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p); void ide_remove_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p);
read_proc_t proc_ide_read_capacity;
read_proc_t proc_ide_read_geometry; read_proc_t proc_ide_read_geometry;
/* /*
...@@ -797,6 +841,7 @@ extern int ide_cmd_ioctl(struct ata_device *drive, unsigned long arg); ...@@ -797,6 +841,7 @@ extern int ide_cmd_ioctl(struct ata_device *drive, unsigned long arg);
void ide_delay_50ms(void); void ide_delay_50ms(void);
extern byte ide_auto_reduce_xfer(struct ata_device *); extern byte ide_auto_reduce_xfer(struct ata_device *);
extern void ide_fix_driveid(struct hd_driveid *id);
extern int ide_driveid_update(struct ata_device *); extern int ide_driveid_update(struct ata_device *);
extern int ide_ata66_check(struct ata_device *, struct ata_taskfile *); extern int ide_ata66_check(struct ata_device *, struct ata_taskfile *);
extern int ide_config_drive_speed(struct ata_device *, byte); extern int ide_config_drive_speed(struct ata_device *, byte);
...@@ -854,7 +899,7 @@ extern struct ata_device *ide_scan_devices(byte, const char *, struct ata_operat ...@@ -854,7 +899,7 @@ extern struct ata_device *ide_scan_devices(byte, const char *, struct ata_operat
extern int ide_register_subdriver(struct ata_device *, struct ata_operations *); extern int ide_register_subdriver(struct ata_device *, struct ata_operations *);
extern int ide_unregister_subdriver(struct ata_device *drive); extern int ide_unregister_subdriver(struct ata_device *drive);
#ifdef CONFIG_BLK_DEV_IDEPCI #ifdef CONFIG_PCI
# define ON_BOARD 1 # define ON_BOARD 1
# define NEVER_BOARD 0 # define NEVER_BOARD 0
# ifdef CONFIG_BLK_DEV_OFFBOARD # ifdef CONFIG_BLK_DEV_OFFBOARD
......
...@@ -932,6 +932,8 @@ ...@@ -932,6 +932,8 @@
#define PCI_VENDOR_ID_TTI 0x1103 #define PCI_VENDOR_ID_TTI 0x1103
#define PCI_DEVICE_ID_TTI_HPT343 0x0003 #define PCI_DEVICE_ID_TTI_HPT343 0x0003
#define PCI_DEVICE_ID_TTI_HPT366 0x0004 #define PCI_DEVICE_ID_TTI_HPT366 0x0004
#define PCI_DEVICE_ID_TTI_HPT372 0x0005
#define PCI_DEVICE_ID_TTI_HPT374 0x0008
#define PCI_VENDOR_ID_VIA 0x1106 #define PCI_VENDOR_ID_VIA 0x1106
#define PCI_DEVICE_ID_VIA_8363_0 0x0305 #define PCI_DEVICE_ID_VIA_8363_0 0x0305
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment