Re: [PATCH 2/5] MACH-OMAP1: MCBSP: Add support for mcbsp on mach-omap1

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

 



Hiya,

On 29/05/2008, Eduardo Valentin <edubezval@xxxxxxxxx> wrote:
>  +static struct omap_mcbsp_platform_data omap1_mcbsp_pdata[] = {
>  +#ifdef CONFIG_ARCH_OMAP730
>  +       {
>  +               .virt_base      = io_p2v(OMAP730_MCBSP1_BASE),
>  +               .dma_rx_sync    = OMAP_DMA_MCBSP1_RX,
>  +               .dma_tx_sync    = OMAP_DMA_MCBSP1_TX,
>  +               .rx_irq         = INT_730_McBSP1RX,
>  +               .tx_irq         = INT_730_McBSP1TX,
>  +               .ops            = &omap1_mcbsp_ops,
>  +       },
>  +       {
>  +               .virt_base      = io_p2v(OMAP730_MCBSP2_BASE),
>  +               .dma_rx_sync    = OMAP_DMA_MCBSP3_RX,
>  +               .dma_tx_sync    = OMAP_DMA_MCBSP3_TX,
>  +               .rx_irq         = INT_730_McBSP2RX,
>  +               .tx_irq         = INT_730_McBSP2TX
>  +               .ops            = &omap1_mcbsp_ops,
>  +       },
>  +#endif
>  +#ifdef CONFIG_ARCH_OMAP15XX
>  +       {
>  +               .virt_base      = OMAP1510_MCBSP1_BASE,
>  +               .dma_rx_sync    = OMAP_DMA_MCBSP1_RX,
>  +               .dma_tx_sync    = OMAP_DMA_MCBSP1_TX,
>  +               .rx_irq         = INT_McBSP1RX,
>  +               .tx_irq         = INT_McBSP1TX,
>  +               .ops            = &omap1_mcbsp_ops,
>  +               .clk_name       = "mcbsp_clk",
>  +               },
>  +       {
>  +               .virt_base      = io_p2v(OMAP1510_MCBSP2_BASE),
>  +               .dma_rx_sync    = OMAP_DMA_MCBSP2_RX,
>  +               .dma_tx_sync    = OMAP_DMA_MCBSP2_TX,
>  +               .rx_irq         = INT_1510_SPI_RX,
>  +               .tx_irq         = INT_1510_SPI_TX,
>  +               .ops            = &omap1_mcbsp_ops,
>  +       },
>  +       {
>  +               .virt_base      = OMAP1510_MCBSP3_BASE,
>  +               .dma_rx_sync    = OMAP_DMA_MCBSP3_RX,
>  +               .dma_tx_sync    = OMAP_DMA_MCBSP3_TX,
>  +               .rx_irq         = INT_McBSP3RX,
>  +               .tx_irq         = INT_McBSP3TX,
>  +               .ops            = &omap1_mcbsp_ops,
>  +               .clk_name       = "mcbsp_clk",
>  +       },
>  +#endif
>  +#ifdef CONFIG_ARCH_OMAP16XX
>  +       {
>  +               .virt_base      = OMAP1610_MCBSP1_BASE,
>  +               .dma_rx_sync    = OMAP_DMA_MCBSP1_RX,
>  +               .dma_tx_sync    = OMAP_DMA_MCBSP1_TX,
>  +               .rx_irq         = INT_McBSP1RX,
>  +               .tx_irq         = INT_McBSP1TX,
>  +               .ops            = &omap1_mcbsp_ops,
>  +               .clk_name       = "mcbsp_clk",
>  +       },
>  +       {
>  +               .virt_base      = io_p2v(OMAP1610_MCBSP2_BASE),
>  +               .dma_rx_sync    = OMAP_DMA_MCBSP2_RX,
>  +               .dma_tx_sync    = OMAP_DMA_MCBSP2_TX,
>  +               .rx_irq         = INT_1610_McBSP2_RX,
>  +               .tx_irq         = INT_1610_McBSP2_TX,
>  +               .ops            = &omap1_mcbsp_ops,
>  +       },
>  +       {
>  +               .virt_base      = OMAP1610_MCBSP3_BASE,
>  +               .dma_rx_sync    = OMAP_DMA_MCBSP3_RX,
>  +               .dma_tx_sync    = OMAP_DMA_MCBSP3_TX,
>  +               .rx_irq         = INT_McBSP3RX,
>  +               .tx_irq         = INT_McBSP3TX,
>  +               .ops            = &omap1_mcbsp_ops,
>  +               .clk_name       = "mcbsp_clk",
>  +       },
>  +#endif
>  +};

I think you need a runtime omap model check here.  Otherwise if you
have all three models enabled in the config (I don't remember if that
is supported but that's not the point) you'll get eight
platform_devices.  That will not Oops because there's a sanity check
in omap_mcbsp_register_board_cfg() but only the first three will get
registered.

There is a runtime check in the original version.

Same applies to PATCH 5/5 for omap2.

Cheers,
Andrew
--
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