Re: FOR COMMENT: void __iomem * and similar casts are Bad News

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

 



Hi,

On Wed, Sep 3, 2008 at 2:48 PM, Russell King <rmk@xxxxxxxxxxxxxxxx> wrote:
> On Wed, Sep 03, 2008 at 11:33:51AM -0400, Eduardo Valentin wrote:
>> > @@ -159,7 +159,7 @@ static struct omap_mcbsp_platform_data omap730_mcbsp_pdata[] = {
>> >  #ifdef CONFIG_ARCH_OMAP15XX
>> >  static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
>> >        {
>> > -               .virt_base      = OMAP1510_MCBSP1_BASE,
>> > +               .virt_base      = OMAP1510_MCBSP1_BASE, /* FIXME: virtual or physical */
>> AFAIK, OMAP1510_MCBSP1_BASE is physical. So, I'd say:
>> +               .virt_base      = IO_ADDRESS(OMAP1510_MCBSP1_BASE),
>>
>> Because, plat-omap/mcbsp.c expect .virt_base to be a virtual address.
>
> Ok, I'll fix these which you've confirmed in my version for mainline.
>
>> > @@ -701,6 +702,7 @@ int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer,
>> >        omap_set_dma_dest_params(mcbsp->dma_tx_lch,
>> >                                 src_port,
>> >                                 OMAP_DMA_AMODE_CONSTANT,
>> > +                                /* FIXME: this is a virtual address */
>> >                                 mcbsp->io_base + OMAP_MCBSP_REG_DXR1,
>>
>> yes, that's true. This is expected to be virtual (mcbsp->io_base).
>
> Don't you mean that it is expected to be physical?
>

Well, correct me if I'm wrong, but I meant that the result of
 mcbsp->io_base + OMAP_MCBSP_REG_DXR1

is supposed to be virtual.

Because the mcbsp->io_base reference comes directly from virt_base field of platform_data.

At least it is what says line 895 of plat-omap/mcbsp.c.

And that's why we need to use IO_ADDRESS  while filling up platform_data,
as mentioned above.

> --
> Russell King
>  Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
>  maintainer of:
>

Cheers,

-- 
Eduardo Bezerra Valentin


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux