All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org, Russell King <rmk@arm.linux.org.uk>,
	Anton Vorontsov <avorontsov@ru.mvista.com>,
	Jeremy Higdon <jeremy@sgi.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH 16/21] ide: add ide_init_port_hw() helper
Date: Tue, 27 Nov 2007 16:21:26 +0300	[thread overview]
Message-ID: <474C19D6.7090108@ru.mvista.com> (raw)
In-Reply-To: <200711182328.15772.bzolnier@gmail.com>

Bartlomiej Zolnierkiewicz wrote:

> * Add ide_init_port_hw() helper.

> * rapide.c: convert rapide_locate_hwif() to rapide_setup_ports()
>   and use ide_init_port_hw().

> * ide_platform.c: convert plat_ide_locate_hwif() to plat_ide_setup_ports()
>   and use ide_init_port_hw().

> * sgiioc4.c: use ide_init_port_hw().

> * pmac.c: add 'hw_regs_t *hw' argument to pmac_ide_setup_device(),
>   setup 'hw' in pmac_ide_{macio,pci}_attach() and use ide_init_port_hw()
>   in pmac_ide_setup_device().

> This patch is a preparation for the future changes in the IDE probing code.

> There should be no functionality changes caused by this patch.

> Cc: Russell King <rmk@arm.linux.org.uk>
> Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
> Cc: Jeremy Higdon <jeremy@sgi.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> @@ -1223,7 +1220,12 @@ pmac_ide_macio_attach(struct macio_dev *
>  #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
>  	dev_set_drvdata(&mdev->ofdev.dev, hwif);
>  
> -	rc = pmac_ide_setup_device(pmif, hwif);
> +	memset(&hw, 0, sizeof(hw));
> +	pmac_ide_init_hwif_ports(&hw, pmif->regbase, 0, NULL);
> +	hw.irq = irq;
> +	hw.dev = &mdev->ofdev.dev;
> +
> +	rc = pmac_ide_setup_device(pmif, hwif, &hw);
>  	if (rc != 0) {
>  		/* The inteface is released to the common IDE layer */
>  		dev_set_drvdata(&mdev->ofdev.dev, NULL);
> @@ -1282,6 +1284,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev
>  	void __iomem *base;
>  	unsigned long rbase, rlen;
>  	int i, rc;
> +	hw_regs_t hw;
>  
>  	np = pci_device_to_OF_node(pdev);
>  	if (np == NULL) {
> @@ -1315,7 +1318,6 @@ pmac_ide_pci_attach(struct pci_dev *pdev
>  	}
>  
>  	hwif->pci_dev = pdev;
> -	hwif->gendev.parent = &pdev->dev;
>  	pmif->mdev = NULL;
>  	pmif->node = np;
>  
> @@ -1332,7 +1334,12 @@ pmac_ide_pci_attach(struct pci_dev *pdev
>  
>  	pci_set_drvdata(pdev, hwif);
>  
> -	rc = pmac_ide_setup_device(pmif, hwif);
> +	memset(&hw, 0, sizeof(hw));
> +	pmac_ide_init_hwif_ports(&hw, pmif->regbase, 0, NULL);

    It seems that the last argument to that function can be dropped now as the 
new code doesn't pass anything but NULL.

MBR, Sergei

      reply	other threads:[~2007-11-27 13:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-18 22:28 [PATCH 16/21] ide: add ide_init_port_hw() helper Bartlomiej Zolnierkiewicz
2007-11-27 13:21 ` Sergei Shtylyov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=474C19D6.7090108@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=avorontsov@ru.mvista.com \
    --cc=benh@kernel.crashing.org \
    --cc=bzolnier@gmail.com \
    --cc=jeremy@sgi.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.