<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1498" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>Hi 
All,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>I am trying to 
develop a SPI driver for MPC8541. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>I need to allocate 
memory buffers within kernel that their physical address is</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>on 64 byte boundary 
and initialize the transmit and receive buffer descriptors with 
the</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>their physical 
locations. Since I am not sure how to do this within the</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>kernel here is how I 
am doing it:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=973480512-17102005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>&nbsp;unsigned long 
mem_addr_rx = __get_free_page(GFP_KERNEL);&nbsp;&nbsp;//receive 
buffer<BR>&nbsp;unsigned long mem_addr_tx = __get_free_page(GFP_KERNEL); 
//transmit buffer<BR>.....</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>rx_buffer_addr = 
__pa(mem_addr_rx);</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=973480512-17102005>tx_buffer_addr=__pa(mem_addr_tx);</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=973480512-17102005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>My assumption is by 
allocating a page, I am guaranteed that I will have 64 byte boundary 
condition.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>Is this 
correct?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=973480512-17102005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>I have also told, 
the SPI does not have snoop bit, so I need to allocate buffers from iomem, I 
have</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>no idea how to do 
this.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=973480512-17102005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>Please 
help,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=973480512-17102005>Many thanks in 
advance,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=973480512-17102005>Regards,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=973480512-17102005>Bizhan</SPAN></FONT></DIV></BODY></HTML>