This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

about sdio-wifi of dm355 question

hi,all

 

     I have some questions about dm355 evm:

     1.I think  that I make use of sdio-wifi function of dm355 evm,has not sdio-wifi driver of linux 2.6.10 of dm355 evm.if I write drivers of sdio-wifi myself,whether support it of version 2.6.10 of linux or not?

        whether add patchs or not?

 

    2.now dm355 evm,usb driver of linux do  not support DMA and high speed ,I modify usb driver,I do not know whether to correct or not ?

      1) modify of usb driver about high speed:

        ../drivers/usb/musb/davinci.h

         ............add code...............

         #define  DAVINCI_POWER_REG 0x401

        #define   DAVINCI_HOST_TYPE0_REG   0x41a

        #define   DAVINCI_HOST_TXTYPE_REG   0x41a

        #define   DAVINCI_HOST_RXTYPE_REG  0x41c

         .............................................

         ../drivers/usb/musb/davinci.c

          int __init musb_platform_init(struct musb *musb)

         {

                  void *__iomem tibase = musb->ctrl_base;

                    .............

                .....................add code.........................................

                 musb_writel(tibase,DAVINCI_POWER_REG,0x20);

                 musb_writel(tibase,DAVINCI_HOST_TYPE0_REG,0x40);

                musb_writel(tibase,DAVINCI_HOST_TXTYPE_REG,0x40);

                musb_writel(tibase,DAVINCI_HOST_RXTYPE_REG,0x40);

               ..................................................................

              ..............

          }

 

 

         2)modify of usb driver about DMA:

           ../drivers/usb/musb/davinci.c

         static irqreturn_t davinci_interrupt(int irq, void *__hci, struct pt_regs *r)
         {
                       irqreturn_t retval = IRQ_NONE;
                       struct musb *musb = __hci;

                       void *__iomem tibase = musb->ctrl_base;
#ifdef CONFIG_USB_TI_CPPI_DMA
                      {
                                  u32 cppi_tx = musb_readl(tibase, DAVINCI_TXCPPI_MASKED_REG);
                                  u32 cppi_rx = musb_readl(tibase, DAVINCI_RXCPPI_MASKED_REG);

                                  if (cppi_tx || cppi_rx)

                                  {
                                             DBG(4, "<== CPPI IRQ t%x r%x\n", cppi_tx, cppi_rx);
                                              cppi_completion(musb, cppi_rx, cppi_tx);
                                              retval = IRQ_HANDLED;
                                  }

                                  return retval;

                       }
#else

                     {
                               unsigned long flags;

                                u32 tmp;

                               spin_lock_irqsave(&musb->Lock, flags);


                             /* ack and handle non-CPPI interrupts */
                             tmp = musb_readl(tibase, DAVINCI_USB_INT_SRC_MASKED_REG);
                             musb_writel(tibase, DAVINCI_USB_INT_SRC_CLR_REG, tmp);

                             musb->int_rx = (tmp & DAVINCI_USB_RXINT_MASK) >> DAVINCI_USB_RXINT_SHIFT;
                             musb->int_tx = (tmp & DAVINCI_USB_TXINT_MASK) >> DAVINCI_USB_TXINT_SHIFT;
                             musb->int_usb = (tmp & DAVINCI_USB_USBINT_MASK) >> DAVINCI_USB_USBINT_SHIFT;
                            musb->int_regs = r;

                            if (tmp & (1 << (8 + DAVINCI_USB_USBINT_SHIFT))) {
                                  int drvvbus = musb_readl(tibase, DAVINCI_USB_STAT_REG);
                                  DBG(1, "drvvbus Interrupt\n");
#ifndef CONFIG_ARCH_DAVINCI355
#ifdef CONFIG_USB_MUSB_OTG
                                davinci_vbus_power(musb, drvvbus, drvvbus);
#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
                                   davinci_vbus_power(musb, drvvbus, 1);
#endif
#endif
                                 drvvbus = 0;
                                 retval = IRQ_HANDLED;

                          }

                        if (musb->int_tx || musb->int_rx || musb->int_usb)
                                retval |= musb_interrupt(musb);

                           /* irq stays asserted until EOI is written */
                          musb_writel(tibase, DAVINCI_USB_EOI_REG, 0);

                         spin_unlock_irqrestore(&musb->Lock, flags);

                         if (retval != IRQ_HANDLED)
                             DBG(5, "unhandled? %08x\n", tmp);
                           return IRQ_HANDLED;

                   }

#endif

}