ide: remove hw_regs_t typedef

Remove hw_regs_t typedef and rename struct hw_regs_s to struct ide_hw.

There should be no functional changes caused by this patch.
Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent dca39830
...@@ -247,7 +247,7 @@ irqreturn_t at91_irq_handler(int irq, void *dev_id) ...@@ -247,7 +247,7 @@ irqreturn_t at91_irq_handler(int irq, void *dev_id)
static int __init at91_ide_probe(struct platform_device *pdev) static int __init at91_ide_probe(struct platform_device *pdev)
{ {
int ret; int ret;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
struct ide_host *host; struct ide_host *host;
struct resource *res; struct resource *res;
unsigned long tf_base = 0, ctl_base = 0; unsigned long tf_base = 0, ctl_base = 0;
......
...@@ -449,7 +449,7 @@ static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) ...@@ -449,7 +449,7 @@ static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
} }
#endif #endif
static void auide_setup_ports(hw_regs_t *hw, _auide_hwif *ahwif) static void auide_setup_ports(struct ide_hw *hw, _auide_hwif *ahwif)
{ {
int i; int i;
unsigned long *ata_regs = hw->io_ports_array; unsigned long *ata_regs = hw->io_ports_array;
...@@ -508,7 +508,7 @@ static int au_ide_probe(struct platform_device *dev) ...@@ -508,7 +508,7 @@ static int au_ide_probe(struct platform_device *dev)
struct resource *res; struct resource *res;
struct ide_host *host; struct ide_host *host;
int ret = 0; int ret = 0;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA) #if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA)
char *mode = "MWDMA2"; char *mode = "MWDMA2";
......
...@@ -121,7 +121,7 @@ static int xsurf_ack_intr(ide_hwif_t *hwif) ...@@ -121,7 +121,7 @@ static int xsurf_ack_intr(ide_hwif_t *hwif)
return 1; return 1;
} }
static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base, static void __init buddha_setup_ports(struct ide_hw *hw, unsigned long base,
unsigned long ctl, unsigned long irq_port, unsigned long ctl, unsigned long irq_port,
ide_ack_intr_t *ack_intr) ide_ack_intr_t *ack_intr)
{ {
...@@ -160,7 +160,7 @@ static int __init buddha_init(void) ...@@ -160,7 +160,7 @@ static int __init buddha_init(void)
while ((z = zorro_find_device(ZORRO_WILDCARD, z))) { while ((z = zorro_find_device(ZORRO_WILDCARD, z))) {
unsigned long board; unsigned long board;
hw_regs_t hw[MAX_NUM_HWIFS], *hws[MAX_NUM_HWIFS]; struct ide_hw hw[MAX_NUM_HWIFS], *hws[MAX_NUM_HWIFS];
if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA) { if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA) {
buddha_num_hwifs = BUDDHA_NUM_HWIFS; buddha_num_hwifs = BUDDHA_NUM_HWIFS;
......
...@@ -708,7 +708,7 @@ static int __init cmd640x_init(void) ...@@ -708,7 +708,7 @@ static int __init cmd640x_init(void)
int second_port_cmd640 = 0, rc; int second_port_cmd640 = 0, rc;
const char *bus_type, *port2; const char *bus_type, *port2;
u8 b, cfr; u8 b, cfr;
hw_regs_t hw[2], *hws[2]; struct ide_hw hw[2], *hws[2];
if (cmd640_vlb && probe_for_cmd640_vlb()) { if (cmd640_vlb && probe_for_cmd640_vlb()) {
bus_type = "VLB"; bus_type = "VLB";
......
...@@ -110,7 +110,7 @@ static const struct ide_port_info cyrix_chipset __devinitdata = { ...@@ -110,7 +110,7 @@ static const struct ide_port_info cyrix_chipset __devinitdata = {
static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
const struct ide_port_info *d = &cyrix_chipset; const struct ide_port_info *d = &cyrix_chipset;
hw_regs_t hw[2], *hws[] = { NULL, NULL }; struct ide_hw hw[2], *hws[] = { NULL, NULL };
ide_setup_pci_noise(dev, d); ide_setup_pci_noise(dev, d);
......
...@@ -77,7 +77,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) ...@@ -77,7 +77,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
struct ide_host *host; struct ide_host *host;
unsigned long base; unsigned long base;
int rc; int rc;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
rc = pci_enable_device(dev); rc = pci_enable_device(dev);
if (rc) { if (rc) {
......
...@@ -114,7 +114,7 @@ static const struct ide_port_info falconide_port_info = { ...@@ -114,7 +114,7 @@ static const struct ide_port_info falconide_port_info = {
.chipset = ide_generic, .chipset = ide_generic,
}; };
static void __init falconide_setup_ports(hw_regs_t *hw) static void __init falconide_setup_ports(struct ide_hw *hw)
{ {
int i; int i;
...@@ -138,7 +138,7 @@ static void __init falconide_setup_ports(hw_regs_t *hw) ...@@ -138,7 +138,7 @@ static void __init falconide_setup_ports(hw_regs_t *hw)
static int __init falconide_init(void) static int __init falconide_init(void)
{ {
struct ide_host *host; struct ide_host *host;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
int rc; int rc;
if (!MACH_IS_ATARI || !ATARIHW_PRESENT(IDE)) if (!MACH_IS_ATARI || !ATARIHW_PRESENT(IDE))
......
...@@ -88,7 +88,7 @@ static int gayle_ack_intr_a1200(ide_hwif_t *hwif) ...@@ -88,7 +88,7 @@ static int gayle_ack_intr_a1200(ide_hwif_t *hwif)
return 1; return 1;
} }
static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base, static void __init gayle_setup_ports(struct ide_hw *hw, unsigned long base,
unsigned long ctl, unsigned long irq_port, unsigned long ctl, unsigned long irq_port,
ide_ack_intr_t *ack_intr) ide_ack_intr_t *ack_intr)
{ {
...@@ -125,7 +125,7 @@ static int __init gayle_init(void) ...@@ -125,7 +125,7 @@ static int __init gayle_init(void)
unsigned long base, ctrlport, irqport; unsigned long base, ctrlport, irqport;
ide_ack_intr_t *ack_intr; ide_ack_intr_t *ack_intr;
int a4000, i, rc; int a4000, i, rc;
hw_regs_t hw[GAYLE_NUM_HWIFS], *hws[GAYLE_NUM_HWIFS]; struct ide_hw hw[GAYLE_NUM_HWIFS], *hws[GAYLE_NUM_HWIFS];
if (!MACH_IS_AMIGA) if (!MACH_IS_AMIGA)
return -ENODEV; return -ENODEV;
......
...@@ -381,7 +381,7 @@ static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d) ...@@ -381,7 +381,7 @@ static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d)
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
static void icside_setup_ports(hw_regs_t *hw, void __iomem *base, static void icside_setup_ports(struct ide_hw *hw, void __iomem *base,
struct cardinfo *info, struct expansion_card *ec) struct cardinfo *info, struct expansion_card *ec)
{ {
unsigned long port = (unsigned long)base + info->dataoffset; unsigned long port = (unsigned long)base + info->dataoffset;
...@@ -410,7 +410,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec) ...@@ -410,7 +410,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
{ {
void __iomem *base; void __iomem *base;
struct ide_host *host; struct ide_host *host;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
int ret; int ret;
base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0); base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
...@@ -467,7 +467,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) ...@@ -467,7 +467,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
struct ide_host *host; struct ide_host *host;
unsigned int sel = 0; unsigned int sel = 0;
int ret; int ret;
hw_regs_t hw[2], *hws[] = { &hw[0], &hw[1] }; struct ide_hw hw[2], *hws[] = { &hw[0], &hw[1] };
struct ide_port_info d = icside_v6_port_info; struct ide_port_info d = icside_v6_port_info;
ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
......
...@@ -31,7 +31,7 @@ static const struct ide_port_info ide_4drives_port_info = { ...@@ -31,7 +31,7 @@ static const struct ide_port_info ide_4drives_port_info = {
static int __init ide_4drives_init(void) static int __init ide_4drives_init(void)
{ {
unsigned long base = 0x1f0, ctl = 0x3f6; unsigned long base = 0x1f0, ctl = 0x3f6;
hw_regs_t hw, *hws[] = { &hw, &hw }; struct ide_hw hw, *hws[] = { &hw, &hw };
if (probe_4drives == 0) if (probe_4drives == 0)
return -ENODEV; return -ENODEV;
......
...@@ -164,7 +164,7 @@ static struct ide_host *idecs_register(unsigned long io, unsigned long ctl, ...@@ -164,7 +164,7 @@ static struct ide_host *idecs_register(unsigned long io, unsigned long ctl,
struct ide_host *host; struct ide_host *host;
ide_hwif_t *hwif; ide_hwif_t *hwif;
int i, rc; int i, rc;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
if (!request_region(io, 8, DRV_NAME)) { if (!request_region(io, 8, DRV_NAME)) {
printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n", printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n",
......
...@@ -86,7 +86,7 @@ static void ide_generic_check_pci_legacy_iobases(int *primary, int *secondary) ...@@ -86,7 +86,7 @@ static void ide_generic_check_pci_legacy_iobases(int *primary, int *secondary)
static int __init ide_generic_init(void) static int __init ide_generic_init(void)
{ {
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
unsigned long io_addr; unsigned long io_addr;
int i, rc = 0, primary = 0, secondary = 0; int i, rc = 0, primary = 0, secondary = 0;
......
...@@ -64,11 +64,11 @@ static const struct ide_tp_ops h8300_tp_ops = { ...@@ -64,11 +64,11 @@ static const struct ide_tp_ops h8300_tp_ops = {
#define H8300_IDE_GAP (2) #define H8300_IDE_GAP (2)
static inline void hw_setup(hw_regs_t *hw) static inline void hw_setup(struct ide_hw *hw)
{ {
int i; int i;
memset(hw, 0, sizeof(hw_regs_t)); memset(hw, 0, sizeof(*hw));
for (i = 0; i <= 7; i++) for (i = 0; i <= 7; i++)
hw->io_ports_array[i] = CONFIG_H8300_IDE_BASE + H8300_IDE_GAP*i; hw->io_ports_array[i] = CONFIG_H8300_IDE_BASE + H8300_IDE_GAP*i;
hw->io_ports.ctl_addr = CONFIG_H8300_IDE_ALT; hw->io_ports.ctl_addr = CONFIG_H8300_IDE_ALT;
...@@ -83,7 +83,7 @@ static const struct ide_port_info h8300_port_info = { ...@@ -83,7 +83,7 @@ static const struct ide_port_info h8300_port_info = {
static int __init h8300_ide_init(void) static int __init h8300_ide_init(void)
{ {
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
printk(KERN_INFO DRV_NAME ": H8/300 generic IDE interface\n"); printk(KERN_INFO DRV_NAME ": H8/300 generic IDE interface\n");
......
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/ide.h> #include <linux/ide.h>
static void ide_legacy_init_one(hw_regs_t **hws, hw_regs_t *hw, static void ide_legacy_init_one(struct ide_hw **hws, struct ide_hw *hw,
u8 port_no, const struct ide_port_info *d, u8 port_no, const struct ide_port_info *d,
unsigned long config) unsigned long config)
{ {
...@@ -40,7 +40,7 @@ static void ide_legacy_init_one(hw_regs_t **hws, hw_regs_t *hw, ...@@ -40,7 +40,7 @@ static void ide_legacy_init_one(hw_regs_t **hws, hw_regs_t *hw,
int ide_legacy_device_add(const struct ide_port_info *d, unsigned long config) int ide_legacy_device_add(const struct ide_port_info *d, unsigned long config)
{ {
hw_regs_t hw[2], *hws[] = { NULL, NULL }; struct ide_hw hw[2], *hws[] = { NULL, NULL };
memset(&hw, 0, sizeof(hw)); memset(&hw, 0, sizeof(hw));
......
...@@ -37,7 +37,7 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id) ...@@ -37,7 +37,7 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
struct ide_host *host; struct ide_host *host;
unsigned long base, ctl; unsigned long base, ctl;
int rc; int rc;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
printk(KERN_INFO DRV_NAME ": generic PnP IDE interface\n"); printk(KERN_INFO DRV_NAME ": generic PnP IDE interface\n");
......
...@@ -1173,7 +1173,7 @@ static void ide_init_port_data(ide_hwif_t *hwif, unsigned int index) ...@@ -1173,7 +1173,7 @@ static void ide_init_port_data(ide_hwif_t *hwif, unsigned int index)
ide_port_init_devices_data(hwif); ide_port_init_devices_data(hwif);
} }
static void ide_init_port_hw(ide_hwif_t *hwif, hw_regs_t *hw) static void ide_init_port_hw(ide_hwif_t *hwif, struct ide_hw *hw)
{ {
memcpy(&hwif->io_ports, &hw->io_ports, sizeof(hwif->io_ports)); memcpy(&hwif->io_ports, &hw->io_ports, sizeof(hwif->io_ports));
hwif->irq = hw->irq; hwif->irq = hw->irq;
...@@ -1261,8 +1261,8 @@ static int ide_port_alloc_devices(ide_hwif_t *hwif, int node) ...@@ -1261,8 +1261,8 @@ static int ide_port_alloc_devices(ide_hwif_t *hwif, int node)
return -ENOMEM; return -ENOMEM;
} }
struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws, struct ide_host *ide_host_alloc(const struct ide_port_info *d,
unsigned int n_ports) struct ide_hw **hws, unsigned int n_ports)
{ {
struct ide_host *host; struct ide_host *host;
struct device *dev = hws[0] ? hws[0]->dev : NULL; struct device *dev = hws[0] ? hws[0]->dev : NULL;
...@@ -1349,7 +1349,7 @@ static void ide_disable_port(ide_hwif_t *hwif) ...@@ -1349,7 +1349,7 @@ static void ide_disable_port(ide_hwif_t *hwif)
} }
int ide_host_register(struct ide_host *host, const struct ide_port_info *d, int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
hw_regs_t **hws) struct ide_hw **hws)
{ {
ide_hwif_t *hwif, *mate = NULL; ide_hwif_t *hwif, *mate = NULL;
int i, j = 0; int i, j = 0;
...@@ -1443,7 +1443,7 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, ...@@ -1443,7 +1443,7 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
} }
EXPORT_SYMBOL_GPL(ide_host_register); EXPORT_SYMBOL_GPL(ide_host_register);
int ide_host_add(const struct ide_port_info *d, hw_regs_t **hws, int ide_host_add(const struct ide_port_info *d, struct ide_hw **hws,
unsigned int n_ports, struct ide_host **hostp) unsigned int n_ports, struct ide_host **hostp)
{ {
struct ide_host *host; struct ide_host *host;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/io.h> #include <linux/io.h>
static void __devinit plat_ide_setup_ports(hw_regs_t *hw, static void __devinit plat_ide_setup_ports(struct ide_hw *hw,
void __iomem *base, void __iomem *base,
void __iomem *ctrl, void __iomem *ctrl,
struct pata_platform_info *pdata, struct pata_platform_info *pdata,
...@@ -54,7 +54,7 @@ static int __devinit plat_ide_probe(struct platform_device *pdev) ...@@ -54,7 +54,7 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)
struct pata_platform_info *pdata; struct pata_platform_info *pdata;
struct ide_host *host; struct ide_host *host;
int ret = 0, mmio = 0; int ret = 0, mmio = 0;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
struct ide_port_info d = platform_ide_port_info; struct ide_port_info d = platform_ide_port_info;
pdata = pdev->dev.platform_data; pdata = pdev->dev.platform_data;
......
...@@ -62,7 +62,7 @@ int macide_ack_intr(ide_hwif_t* hwif) ...@@ -62,7 +62,7 @@ int macide_ack_intr(ide_hwif_t* hwif)
return 0; return 0;
} }
static void __init macide_setup_ports(hw_regs_t *hw, unsigned long base, static void __init macide_setup_ports(struct ide_hw *hw, unsigned long base,
int irq, ide_ack_intr_t *ack_intr) int irq, ide_ack_intr_t *ack_intr)
{ {
int i; int i;
...@@ -96,7 +96,7 @@ static int __init macide_init(void) ...@@ -96,7 +96,7 @@ static int __init macide_init(void)
ide_ack_intr_t *ack_intr; ide_ack_intr_t *ack_intr;
unsigned long base; unsigned long base;
int irq; int irq;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
if (!MACH_IS_MAC) if (!MACH_IS_MAC)
return -ENODEV; return -ENODEV;
......
...@@ -316,7 +316,7 @@ static int __init palm_bk3710_probe(struct platform_device *pdev) ...@@ -316,7 +316,7 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
void __iomem *base; void __iomem *base;
unsigned long rate, mem_size; unsigned long rate, mem_size;
int i, rc; int i, rc;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
clk = clk_get(&pdev->dev, "IDECLK"); clk = clk_get(&pdev->dev, "IDECLK");
if (IS_ERR(clk)) if (IS_ERR(clk))
......
...@@ -1023,13 +1023,14 @@ static const struct ide_port_info pmac_port_info = { ...@@ -1023,13 +1023,14 @@ static const struct ide_port_info pmac_port_info = {
* Setup, register & probe an IDE channel driven by this driver, this is * Setup, register & probe an IDE channel driven by this driver, this is
* called by one of the 2 probe functions (macio or PCI). * called by one of the 2 probe functions (macio or PCI).
*/ */
static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw) static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif,
struct ide_hw *hw)
{ {
struct device_node *np = pmif->node; struct device_node *np = pmif->node;
const int *bidp; const int *bidp;
struct ide_host *host; struct ide_host *host;
ide_hwif_t *hwif; ide_hwif_t *hwif;
hw_regs_t *hws[] = { hw }; struct ide_hw *hws[] = { hw };
struct ide_port_info d = pmac_port_info; struct ide_port_info d = pmac_port_info;
int rc; int rc;
...@@ -1124,7 +1125,7 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw) ...@@ -1124,7 +1125,7 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw)
return 0; return 0;
} }
static void __devinit pmac_ide_init_ports(hw_regs_t *hw, unsigned long base) static void __devinit pmac_ide_init_ports(struct ide_hw *hw, unsigned long base)
{ {
int i; int i;
...@@ -1144,7 +1145,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) ...@@ -1144,7 +1145,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
unsigned long regbase; unsigned long regbase;
pmac_ide_hwif_t *pmif; pmac_ide_hwif_t *pmif;
int irq, rc; int irq, rc;
hw_regs_t hw; struct ide_hw hw;
pmif = kzalloc(sizeof(*pmif), GFP_KERNEL); pmif = kzalloc(sizeof(*pmif), GFP_KERNEL);
if (pmif == NULL) if (pmif == NULL)
...@@ -1268,7 +1269,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1268,7 +1269,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)
void __iomem *base; void __iomem *base;
unsigned long rbase, rlen; unsigned long rbase, rlen;
int rc; int rc;
hw_regs_t hw; struct ide_hw hw;
np = pci_device_to_OF_node(pdev); np = pci_device_to_OF_node(pdev);
if (np == NULL) { if (np == NULL) {
......
...@@ -51,11 +51,11 @@ static int q40ide_default_irq(unsigned long base) ...@@ -51,11 +51,11 @@ static int q40ide_default_irq(unsigned long base)
/* /*
* Addresses are pretranslated for Q40 ISA access. * Addresses are pretranslated for Q40 ISA access.
*/ */
static void q40_ide_setup_ports(hw_regs_t *hw, unsigned long base, static void q40_ide_setup_ports(struct ide_hw *hw, unsigned long base,
ide_ack_intr_t *ack_intr, ide_ack_intr_t *ack_intr,
int irq) int irq)
{ {
memset(hw, 0, sizeof(hw_regs_t)); memset(hw, 0, sizeof(*hw));
/* BIG FAT WARNING: /* BIG FAT WARNING:
assumption: only DATA port is ever used in 16 bit mode */ assumption: only DATA port is ever used in 16 bit mode */
hw->io_ports.data_addr = Q40_ISA_IO_W(base); hw->io_ports.data_addr = Q40_ISA_IO_W(base);
...@@ -135,7 +135,7 @@ static const char *q40_ide_names[Q40IDE_NUM_HWIFS]={ ...@@ -135,7 +135,7 @@ static const char *q40_ide_names[Q40IDE_NUM_HWIFS]={
static int __init q40ide_init(void) static int __init q40ide_init(void)
{ {
int i; int i;
hw_regs_t hw[Q40IDE_NUM_HWIFS], *hws[] = { NULL, NULL }; struct ide_hw hw[Q40IDE_NUM_HWIFS], *hws[] = { NULL, NULL };
if (!MACH_IS_Q40) if (!MACH_IS_Q40)
return -ENODEV; return -ENODEV;
......
...@@ -16,7 +16,7 @@ static const struct ide_port_info rapide_port_info = { ...@@ -16,7 +16,7 @@ static const struct ide_port_info rapide_port_info = {
.chipset = ide_generic, .chipset = ide_generic,
}; };
static void rapide_setup_ports(hw_regs_t *hw, void __iomem *base, static void rapide_setup_ports(struct ide_hw *hw, void __iomem *base,
void __iomem *ctrl, unsigned int sz, int irq) void __iomem *ctrl, unsigned int sz, int irq)
{ {
unsigned long port = (unsigned long)base; unsigned long port = (unsigned long)base;
...@@ -36,7 +36,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -36,7 +36,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
void __iomem *base; void __iomem *base;
struct ide_host *host; struct ide_host *host;
int ret; int ret;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
ret = ecard_request_resources(ec); ret = ecard_request_resources(ec);
if (ret) if (ret)
......
...@@ -559,7 +559,7 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev, ...@@ -559,7 +559,7 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev,
{ {
struct scc_ports *ports = pci_get_drvdata(dev); struct scc_ports *ports = pci_get_drvdata(dev);
struct ide_host *host; struct ide_host *host;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
int i, rc; int i, rc;
memset(&hw, 0, sizeof(hw)); memset(&hw, 0, sizeof(hw));
......
...@@ -301,11 +301,11 @@ static int ide_pci_check_iomem(struct pci_dev *dev, const struct ide_port_info * ...@@ -301,11 +301,11 @@ static int ide_pci_check_iomem(struct pci_dev *dev, const struct ide_port_info *
} }
/** /**
* ide_hw_configure - configure a hw_regs_t instance * ide_hw_configure - configure a struct ide_hw instance
* @dev: PCI device holding interface * @dev: PCI device holding interface
* @d: IDE port info * @d: IDE port info
* @port: port number * @port: port number
* @hw: hw_regs_t instance corresponding to this port * @hw: struct ide_hw instance corresponding to this port
* *
* Perform the initial set up for the hardware interface structure. This * Perform the initial set up for the hardware interface structure. This
* is done per interface port rather than per PCI device. There may be * is done per interface port rather than per PCI device. There may be
...@@ -315,7 +315,7 @@ static int ide_pci_check_iomem(struct pci_dev *dev, const struct ide_port_info * ...@@ -315,7 +315,7 @@ static int ide_pci_check_iomem(struct pci_dev *dev, const struct ide_port_info *
*/ */
static int ide_hw_configure(struct pci_dev *dev, const struct ide_port_info *d, static int ide_hw_configure(struct pci_dev *dev, const struct ide_port_info *d,
unsigned int port, hw_regs_t *hw) unsigned int port, struct ide_hw *hw)
{ {
unsigned long ctl = 0, base = 0; unsigned long ctl = 0, base = 0;
...@@ -445,8 +445,8 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ...@@ -445,8 +445,8 @@ static int ide_setup_pci_controller(struct pci_dev *dev,
* ide_pci_setup_ports - configure ports/devices on PCI IDE * ide_pci_setup_ports - configure ports/devices on PCI IDE
* @dev: PCI device * @dev: PCI device
* @d: IDE port info * @d: IDE port info
* @hw: hw_regs_t instances corresponding to this PCI IDE device * @hw: struct ide_hw instances corresponding to this PCI IDE device
* @hws: hw_regs_t pointers table to update * @hws: struct ide_hw pointers table to update
* *
* Scan the interfaces attached to this device and do any * Scan the interfaces attached to this device and do any
* necessary per port setup. Attach the devices and ask the * necessary per port setup. Attach the devices and ask the
...@@ -458,7 +458,7 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ...@@ -458,7 +458,7 @@ static int ide_setup_pci_controller(struct pci_dev *dev,
*/ */
void ide_pci_setup_ports(struct pci_dev *dev, const struct ide_port_info *d, void ide_pci_setup_ports(struct pci_dev *dev, const struct ide_port_info *d,
hw_regs_t *hw, hw_regs_t **hws) struct ide_hw *hw, struct ide_hw **hws)
{ {
int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port; int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port;
u8 tmp; u8 tmp;
...@@ -538,7 +538,7 @@ int ide_pci_init_one(struct pci_dev *dev, const struct ide_port_info *d, ...@@ -538,7 +538,7 @@ int ide_pci_init_one(struct pci_dev *dev, const struct ide_port_info *d,
void *priv) void *priv)
{ {
struct ide_host *host; struct ide_host *host;
hw_regs_t hw[2], *hws[] = { NULL, NULL }; struct ide_hw hw[2], *hws[] = { NULL, NULL };
int ret; int ret;
ret = ide_setup_pci_controller(dev, d, 1); ret = ide_setup_pci_controller(dev, d, 1);
...@@ -586,7 +586,7 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2, ...@@ -586,7 +586,7 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2,
struct pci_dev *pdev[] = { dev1, dev2 }; struct pci_dev *pdev[] = { dev1, dev2 };
struct ide_host *host; struct ide_host *host;
int ret, i; int ret, i;
hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL }; struct ide_hw hw[4], *hws[] = { NULL, NULL, NULL, NULL };
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
ret = ide_setup_pci_controller(pdev[i], d, !i); ret = ide_setup_pci_controller(pdev[i], d, !i);
......
...@@ -91,7 +91,7 @@ typedef struct { ...@@ -91,7 +91,7 @@ typedef struct {
static void static void
sgiioc4_init_hwif_ports(hw_regs_t * hw, unsigned long data_port, sgiioc4_init_hwif_ports(struct ide_hw *hw, unsigned long data_port,
unsigned long ctrl_port, unsigned long irq_port) unsigned long ctrl_port, unsigned long irq_port)
{ {
unsigned long reg = data_port; unsigned long reg = data_port;
...@@ -546,7 +546,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) ...@@ -546,7 +546,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
unsigned long cmd_base, irqport; unsigned long cmd_base, irqport;
unsigned long bar0, cmd_phys_base, ctl; unsigned long bar0, cmd_phys_base, ctl;
void __iomem *virt_base; void __iomem *virt_base;
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
int rc; int rc;
/* Get the CmdBlk and CtrlBlk Base Registers */ /* Get the CmdBlk and CtrlBlk Base Registers */
......
...@@ -130,7 +130,7 @@ static const struct ide_port_info tx4938ide_port_info __initdata = { ...@@ -130,7 +130,7 @@ static const struct ide_port_info tx4938ide_port_info __initdata = {
static int __init tx4938ide_probe(struct platform_device *pdev) static int __init tx4938ide_probe(struct platform_device *pdev)
{ {
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
struct ide_host *host; struct ide_host *host;
struct resource *res; struct resource *res;
struct tx4938ide_platform_info *pdata = pdev->dev.platform_data; struct tx4938ide_platform_info *pdata = pdev->dev.platform_data;
......
...@@ -537,7 +537,7 @@ static const struct ide_port_info tx4939ide_port_info __initdata = { ...@@ -537,7 +537,7 @@ static const struct ide_port_info tx4939ide_port_info __initdata = {
static int __init tx4939ide_probe(struct platform_device *pdev) static int __init tx4939ide_probe(struct platform_device *pdev)
{ {
hw_regs_t hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
struct ide_host *host; struct ide_host *host;
struct resource *res; struct resource *res;
int irq, ret; int irq, ret;
......
...@@ -178,7 +178,7 @@ typedef u8 hwif_chipset_t; ...@@ -178,7 +178,7 @@ typedef u8 hwif_chipset_t;
/* /*
* Structure to hold all information about the location of this port * Structure to hold all information about the location of this port
*/ */
typedef struct hw_regs_s { struct ide_hw {
union { union {
struct ide_io_ports io_ports; struct ide_io_ports io_ports;
unsigned long io_ports_array[IDE_NR_PORTS]; unsigned long io_ports_array[IDE_NR_PORTS];
...@@ -188,9 +188,9 @@ typedef struct hw_regs_s { ...@@ -188,9 +188,9 @@ typedef struct hw_regs_s {
ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ ide_ack_intr_t *ack_intr; /* acknowledge interrupt */
struct device *dev, *parent; struct device *dev, *parent;
unsigned long config; unsigned long config;
} hw_regs_t; };
static inline void ide_std_init_ports(hw_regs_t *hw, static inline void ide_std_init_ports(struct ide_hw *hw,
unsigned long io_addr, unsigned long io_addr,
unsigned long ctl_addr) unsigned long ctl_addr)
{ {
...@@ -1212,7 +1212,7 @@ static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev) ...@@ -1212,7 +1212,7 @@ static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev)
} }
void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *,
hw_regs_t *, hw_regs_t **); struct ide_hw *, struct ide_hw **);
void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *);
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI #ifdef CONFIG_BLK_DEV_IDEDMA_PCI
...@@ -1456,12 +1456,12 @@ void ide_undecoded_slave(ide_drive_t *); ...@@ -1456,12 +1456,12 @@ void ide_undecoded_slave(ide_drive_t *);
void ide_port_apply_params(ide_hwif_t *); void ide_port_apply_params(ide_hwif_t *);
int ide_sysfs_register_port(ide_hwif_t *); int ide_sysfs_register_port(ide_hwif_t *);
struct ide_host *ide_host_alloc(const struct ide_port_info *, hw_regs_t **, struct ide_host *ide_host_alloc(const struct ide_port_info *, struct ide_hw **,
unsigned int); unsigned int);
void ide_host_free(struct ide_host *); void ide_host_free(struct ide_host *);
int ide_host_register(struct ide_host *, const struct ide_port_info *, int ide_host_register(struct ide_host *, const struct ide_port_info *,
hw_regs_t **); struct ide_hw **);
int ide_host_add(const struct ide_port_info *, hw_regs_t **, unsigned int, int ide_host_add(const struct ide_port_info *, struct ide_hw **, unsigned int,
struct ide_host **); struct ide_host **);
void ide_host_remove(struct ide_host *); void ide_host_remove(struct ide_host *);
int ide_legacy_device_add(const struct ide_port_info *, unsigned long); int ide_legacy_device_add(const struct ide_port_info *, unsigned long);
......
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