10 Replies Latest reply on Mar 2, 2012 12:01 PM by AMarchini

    DMA on IO mapped devices

    Green Belt

      Hi,

       

        Can any one please help me regarding how to access LPC IO device (IO mapped IO) using LPC DMA. I know that we can access LPC memory mapped devices using DMA by DMA Base and Current registers. But For IO devices it has only IO INDEX PORT address and IO DATA address. So for these how DMA works. Please resolve this issue. I want use this onexisted platform . There is no address translater for IO devices.

       

      Thanks,

      Shiva

        • Re: DMA on IO mapped devices
          Felix_M BlackBelt

          Hello

           

          For a starting point, have you already found the LPC specification document ?

           

          http://www.intel.com/design/chipsets/industry/lpc.htm

           

          Felix

           

          J. Felix McNulty

          Community Moderator (Intel contractor)

            • Re: DMA on IO mapped devices
              Green Belt

              Hi,

               

                I followed intel's LPC Spec.

               

              Regards,

              Shiva

                • Re: DMA on IO mapped devices
                  Felix_M BlackBelt

                  Shiva

                   

                  To find the right people to help you, can you plesae say which chipset you are using ?

                   

                  Felix

                    • Re: DMA on IO mapped devices
                      Green Belt

                      Hi Felix,

                           Thanks for the reply. Actually I am working on Kontron board. I think my question is not related to any chipset. Can we use LPC DMA on io mapped devices. In my experimenting board Embedded Controlled is getting access via LPC io port to PCH. For this can i use LPC DMA on this.

                        • Re: DMA on IO mapped devices
                          Felix_M BlackBelt

                          Hi Shiva

                           

                          You are probably right that the answer is independent of chipset.  However the reason I ask is that Intel provides some dedicated resources for compenents designated as "embedded".  So if you are using an embedded chipset, I can point you to that support resource.

                           

                          Felix

                            • Re: DMA on IO mapped devices
                              Green Belt

                              Hi Felix,

                                 Thanks for information. For generic devices can we access or not???

                                • Re: DMA on IO mapped devices
                                  Felix_M BlackBelt

                                  Shiva-

                                   

                                  Here's the info on the support resource I mentioned.

                                   

                                  The Intel® e-Help desk is staffed by Intel representatives who  support select Intel embedded platforms including Intel® Atom™, 2nd Generation Core™ and

                                  associated chipsets.   Since you are using a Kontron board, chances are high that the chipset is one that Intel classifies as embedded.

                                   

                                  To  access e-Help, you need to be a Privileged member of the Intel®  Embedded Community.  If you are not already a Privileged member, you can  request an upgrade to your community account here:

                                   

                                  https://edc.intel.com/My-Account.aspx

                                   

                                  In addition to access to e-Help, Prvileged members may also access the confidential content within the Intel® Embedded Design Center, such as design documents, specifications, and training materials.

                                   

                                  OK, so with all that said, I have some feedback from my Intel friends that IO DMA may be a feature that is enabled or disabled at the board level design.  It is therefore suggested that you check with Kontron about that specific board.   One way or another you might want to do that since it can take up to 10 business days to process your Privileged membership request.

                                   

                                  I hope this helps.

                                   

                                  Felix

                      • Re: DMA on IO mapped devices
                        Green Belt

                        Are you attempting to use the 8237 DMA engine on the CPU? This may be important , some embedded chipsets don't even support the 8237 and if they do they have limited DMA REQ and ACK lines for LPC devices.
                        Also the 8237 engine is designed to connect one I/O register to memory. If you device absolutely requires to you to write to the device using and Index port , data port pair then you are not going to be able to use DMA. If you can set the IO Address then perhaps you could DMA to the DATA register.
                        The I/O device would need to generate a DMA request too, you can't just DMA to any device without that device having essential handshaking for DMA operation.

                         

                        From your limited description, I don't think you can do what you want to do.

                         

                        Tony

                        1 of 1 people found this helpful
                          • Re: DMA on IO mapped devices
                            Green Belt

                            Hi Tony,

                             

                               Thanks for information. One more my dought is whether DMA device will have the address or not. I know that we can communicate the DMA device through DMA channel number. Shall we need to configure the reading address of device and system physical address for DMA in DMA controller registers? 

                             

                            Regards,

                            Shiva

                              • Re: DMA on IO mapped devices
                                Green Belt

                                Well, you probably don't care at this point. I made a slight error when describing the process. This is sort of how it goes.

                                the DMA request signal is sent from the I/O device on the LPC

                                after the DMA controller has setup the memory address pointer is asserts the DMA acknowledgement

                                depending on the direction of the DMA there is a read or write signal to the I/O device.

                                The I/O device, on seeing the DMA ACK and the read it will place a data  onto the data bus to be written to memory

                                OR on seeing the DMA ACK and the write it will place data from the data bus , read from memory , into some pre-arranged register

                                 

                                The DMA logic on the I/O device moves data to and from the I/O register automagically.

                                 

                                So all that needs to be set in the DMA controller, besides the mode and direction is the address to write/read DMA data.