lkml.org 
[lkml]   [2018]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] ata: add Amiga Gayle PATA controller driver
Hi Andy,

On Thu, Mar 1, 2018 at 1:32 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Thu, Mar 1, 2018 at 1:02 PM, Bartlomiej Zolnierkiewicz
> <b.zolnierkie@samsung.com> wrote:
>> + base = ZTWO_VADDR(pdata->base);
>
> Hmm... Can't you use devm_ioremap_resources() to get the virtual
> address for I/O ?

Zorro II address space is always mapped, and address conversion done
through ZTWO_VADDR()/ZTWO_PADDR().

>> + ap->private_data = (void *)ZTWO_VADDR(pdata->irqport);
>> +
>> + ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", (unsigned long)base,
>> + (unsigned long)base + GAYLE_CONTROL);
>
> When you use explicit casting in printf() you are doing in 99.9% cases
> something wrong.

Indeed. This should print the physical addresses, using pdata->base instead
of base.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

\
 
 \ /
  Last update: 2018-03-01 13:42    [W:0.050 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site