Skip to contentSkip to conversation

MMC_WBSD depends on ISA

PATCH In review Geert Uytterhoeven 4 participants 14 messages Jan 8, 2005 – Jan 30, 2005 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MMC_WBSD depends on ISA

MMC_WBSD depends on ISA (needs isa_virt_to_bus())

drivers/mmc/Kconfig +1 -1
@@ -51,7 +51,7 @@ config MMC_PXA
 
 config MMC_WBSD
 	tristate "Winbond W83L51xD SD/MMC Card Interface support"
-	depends on MMC
+	depends on MMC && ISA
 	help
 	  This selects the Winbond(R) W83L51xD Secure digital and
           Multimedia card Interface.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#1 lore raw
Quoted 16 lines · Geert Uytterhoeven

MMC_WBSD depends on ISA (needs isa_virt_to_bus())

drivers/mmc/Kconfig +1 -1
@@ -51,7 +51,7 @@ config MMC_PXA
 
 config MMC_WBSD
 	tristate "Winbond W83L51xD SD/MMC Card Interface support"
-	depends on MMC
+	depends on MMC && ISA
 	help
 	  This selects the Winbond(R) W83L51xD Secure digital and
           Multimedia card Interface.
Quoted 4 lines

Gr{oetje,eeting}s,

Geert

Thanks. Shouldn't have missed something so obvious :)

Russell, can you fix this in your next merge?

Rgds
Pierre

#2 lore raw
Quoted 10 lines · Pierre Ossman
Quoted 3 lines · Geert Uytterhoeven

MMC_WBSD depends on ISA (needs isa_virt_to_bus())

Thanks. Shouldn't have missed something so obvious :)

Russell, can you fix this in your next merge?

Russell, please undo this patch. isa_virt_to_bus() is not dependent on CONFIG_ISA. It causes problems on x86_64 platforms which cannot enable ISA support.

Rgds
Pierre

#3 lore raw
Quoted 16 lines · Pierre Ossman
Quoted 10 lines · Pierre Ossman
Quoted 3 lines · Geert Uytterhoeven

MMC_WBSD depends on ISA (needs isa_virt_to_bus())

Thanks. Shouldn't have missed something so obvious :)

Russell, can you fix this in your next merge?

Russell, please undo this patch. isa_virt_to_bus() is not dependent on CONFIG_ISA. It causes problems on x86_64 platforms which cannot enable ISA support.

Quoted 7 lines

Rgds
Pierre
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

---end quoted text---

#4 lore raw

Christoph, did you mean to add anything?

Quoted 25 lines · Christoph Hellwig
Quoted 16 lines · Pierre Ossman
Quoted 10 lines · Pierre Ossman
Quoted 3 lines · Geert Uytterhoeven

MMC_WBSD depends on ISA (needs isa_virt_to_bus())

Thanks. Shouldn't have missed something so obvious :)

Russell, can you fix this in your next merge?

Russell, please undo this patch. isa_virt_to_bus() is not dependent on CONFIG_ISA. It causes problems on x86_64 platforms which cannot enable ISA support.

Quoted 7 lines

Rgds
Pierre
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

---end quoted text---

Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core
#5 lore raw
Quoted 1 line · Russell King

Christoph, did you mean to add anything?

Yes, this somehow got lost:

-----

Quoted 4 lines
Quoted 4 lines

Russell, please undo this patch. isa_virt_to_bus() is not dependent on CONFIG_ISA. It causes problems on x86_64 platforms which cannot enable ISA support.

Actually it is, x86_64 just refuses to set CONFIG_ISA despite having isa-like devices.

Either way a new driver shouldn't use isa_virt_to_bus at all but rather use the proper DMA API and all those problems go away.

#6 lore raw
Quoted 2 lines · Christoph Hellwig

Either way a new driver shouldn't use isa_virt_to_bus at all but rather use the proper DMA API and all those problems go away.

One thing which comes up in this instance is: what struct device should be used.

With ISA devices doing DMA, the device which actually "owns" the DMA is the ISA DMA controller, not the device wiggling its DMA request signal to the ISA DMA controller.

Given that, shouldn't the ISA DMA code have its own struct device to represent the ISA DMA engine for things like the floppy driver and other drivers using the ISA DMA engine?

To me, it makes no sense to pass the ISA device wiggling its DMA request into the DMA API - this ISA device doesn't care whether the ISA DMA engine can only access the first 16MB of memory or not (which is ISA DMA engine specific), so the DMA mask on the ISA device is rather meaningless.

(This type of DMA also appears on later ARM platforms as well, hence why I have given the whole issue some thought.)

Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core
#7 lore raw
Quoted 2 lines · Russell King

One thing which comes up in this instance is: what struct device should be used.

Current convention is to use a NULL device, it's from pre-generic DMA times were only the pci_* types existed.

#8 lore raw
In reply to Christoph Hellwig
Quoted 5 lines · Christoph Hellwig
Quoted 4 lines
Quoted 4 lines

Russell, please undo this patch. isa_virt_to_bus() is not dependent on CONFIG_ISA. It causes problems on x86_64 platforms which cannot enable ISA support.

Quoted 8 lines

Actually it is, x86_64 just refuses to set CONFIG_ISA despite having isa-like devices.

Either way a new driver shouldn't use isa_virt_to_bus at all but rather use the proper DMA API and all those problems go away.

The problem was that the DMA API didn't work for x86_64 when I wrote the driver. I see now that it has been fixed. isa_virt_to_bus still works even though CONFIG_ISA is not configured. So I still think that the ISA dependency should be removed. I'll move to the new API when I have the time to properly test it.

Rgds
Pierre

#9 lore raw
Quoted 3 lines · Pierre Ossman

The problem was that the DMA API didn't work for x86_64 when I wrote the driver. I see now that it has been fixed.
isa_virt_to_bus still works even though CONFIG_ISA is not configured. So

It may not exist at all.

#10 lore raw
Quoted 12 lines · Christoph Hellwig
Quoted 4 lines · Pierre Ossman

The problem was that the DMA API didn't work for x86_64 when I wrote the driver. I see now that it has been fixed. isa_virt_to_bus still works even though CONFIG_ISA is not configured. So

It may not exist at all.

For i386 and x86_64 it's defined as virt_to_phys in asm/io.h without any #ifdef:s protecting it.

#11 lore raw
Quoted 2 lines · Pierre Ossman

For i386 and x86_64 it's defined as virt_to_phys in asm/io.h without any #ifdef:s protecting it.

Not all the world is a PC

#12 lore raw
Quoted 11 lines · Christoph Hellwig
Quoted 3 lines · Pierre Ossman

For i386 and x86_64 it's defined as virt_to_phys in asm/io.h without any #ifdef:s protecting it.

Not all the world is a PC

Then the dependency should in that case be on architectures. It is connected similar to a floppy (which is not dependent on ISA and uses isa_virt_to_bus).

The point is that isa_virt_to_bus() is the method used by devices connected in the same way. This works on the platforms where the device can be found (i386 and x86_64). We can not make it dependent on ISA since you cannot enable ISA on all platforms where it exists (i.e. x86_64). Either fix that or make the driver depend on architecture the same way floppy does.

Using the generic DMA API might be a viable option now that x86_64 seems to be fixed. But it doesn't have a good track record so I'm not prepared to commit any changes until I have time to properly test it. There might still be assumptions about PCI lurking around.

Rgds
Pierre

#13 lore raw
In reply to Pierre Ossman
Quoted 8 lines · Pierre Ossman
Quoted 7 lines · Christoph Hellwig
Quoted 3 lines
Quoted 3 lines

Russell, please undo this patch. isa_virt_to_bus() is not dependent on CONFIG_ISA. It causes problems on x86_64 platforms which cannot enable ISA support.

Actually it is, x86_64 just refuses to set CONFIG_ISA despite having isa-like devices.

Quoted 7 lines
Quoted 3 lines

Either way a new driver shouldn't use isa_virt_to_bus at all but rather use the proper DMA API and all those problems go away.

The problem was that the DMA API didn't work for x86_64 when I wrote the driver. I see now that it has been fixed.
isa_virt_to_bus still works even though CONFIG_ISA is not configured. So I still think that the ISA dependency should be removed.

... which makes it selectable again on all platforms that don't have ISA and don't provide isa_virt_to_bus(), where it still breaks.

Please don't remove the dependency...

Quoted 1 line

I'll move to the new API when I have the time to properly test it.

.. but change it to e.g. `depends on ISA || X86_64', until you have moved it to the new API.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds