mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] libata: rework legacy handling to remove much of the cruft
       [not found] <200609241805.k8OI5Xkn007593@hera.kernel.org>
@ 2006-09-25 10:14 ` David Woodhouse
  2006-09-25 11:18   ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: David Woodhouse @ 2006-09-25 10:14 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Alan Cox, Tejun Heo, rmk

On Sun, 2006-09-24 at 18:05 +0000, Linux Kernel Mailing List wrote:
> 
> +#define ATA_PRIMARY_CMD                0x1F0
> +#define ATA_PRIMARY_CTL                0x3F6
> +#define ATA_PRIMARY_IRQ                14
> +
> +#define ATA_SECONDARY_CMD      0x170
> +#define ATA_SECONDARY_CTL      0x376
> +#define ATA_SECONDARY_IRQ      15

Please, don't do this. We've only just cleaned up the serial driver to
get rid of crap like this -- we _don't_ want to do it like this.

We should register the non-discoverable devices as platform devices (or
of_devices, or something), and not just hardcode stuff like this in
asm/foo.h headers.

-- 
dwmw2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libata: rework legacy handling to remove much of the cruft
  2006-09-25 10:14 ` [PATCH] libata: rework legacy handling to remove much of the cruft David Woodhouse
@ 2006-09-25 11:18   ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2006-09-25 11:18 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Linux Kernel Mailing List, Tejun Heo, rmk

Ar Llu, 2006-09-25 am 11:14 +0100, ysgrifennodd David Woodhouse:
> We should register the non-discoverable devices as platform devices (or
> of_devices, or something), and not just hardcode stuff like this in
> asm/foo.h headers

That would be too late. Those "constants"[1] are part of the actual PCI
bus setup. I have some patches to push most of them into
drivers/pci/quirks.c. We cannot use platform devices for this in most
cases because we already have a device for it - the PCI one.

In the non PCI case we can use platform devices and we do, but the
platform device itself has to know what I/O ports are being used so you
end up back with the "constants".

The old IDE layer works this way too except that it doesn't use platform
devices at all.

Alan
[1] as in "constants aren't, variables won't"




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-25 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200609241805.k8OI5Xkn007593@hera.kernel.org>
2006-09-25 10:14 ` [PATCH] libata: rework legacy handling to remove much of the cruft David Woodhouse
2006-09-25 11:18   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®