Dear Kumar,

In message <[EMAIL PROTECTED]> you wrote:
>
> 1. what should the prototype of this function look like:
> 
> phys_addr_t virt_to_phys (void * addr);

That's what I'd prefer, especially since it can  be  easily  resolved
(for example, by an empty macro) where not really needed.

> int virt_to_phys(void *p, phys_addr_t *addr);
> 
> I think the vast majority of implementations will be just 1:1 mapping,  

That's what I think, too.

> however there is a question in a dynamic mapping case of how to report  
> back not finding a mapping.

Return "(phys_addr_t)(~0)" ?

> 2. what impact is there on existing use on:
> 
> cpu/mips/au1x00_eth.c:        fifo_tx[next_tx].addr = (virt_to_phys(packet))| 
> TX_DMA_ENABLE;
> cpu/mips/au1x00_eth.c:                fifo_rx[next_rx].addr =  
> (virt_to_phys(NetRxPackets[next_rx]))|RX_DMA_ENABLE;
> cpu/mips/au1x00_eth.c:                fifo_tx[i].addr = 
> virt_to_phys(&txbuf[0]);
> cpu/mips/au1x00_eth.c:                fifo_rx[i].addr =  
> (virt_to_phys(NetRxPackets[i]))|RX_DMA_ENABLE;

They have to be checked and fixed, like all other uses of
virt_to_phys and eventually __virt_to_phys, too.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
A father doesn't destroy his children.
        -- Lt. Carolyn Palamas, "Who Mourns for Adonais?",
           stardate 3468.1.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to