Re: [PATCH 0/13] Atari EtherNAT/EtherNEC/NetUSBee support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 1, 2013 at 12:10 AM, Michael Schmitz
<schmitz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Another question: Is there a way to find out which physical address maps to
a given ioremapped one?

If I let the USB driver print the physical address, the ioremapped address,
and the result of __pa() on the ioremapped one, I get:

ISP116X probe: data 80000012 virt. 21098012 pa 21098012 , addr 80000016
virt. 21096016 pa 21096016

for the EtherNAT instance, and

ISP116X probe: data 00000340 virt. 2109e340 pa 2109e340 , addr 00000360
virt. 2109c360 pa 2109c360

for the NetUSBee instance. In both cases ioremapped and __pa() are equal.

I had hoped to get the physical address back from __pa() in the first
instance, and check for _pa(reg) > 0x8000000 to differentiate between the
two instances. Not so simple, apparently.

__pa() (and virt_to_phys()) only work for system RAM, where the mapping is
just the addition of an offset.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux