2010-06-15 13:31:02 +04:00
/*
* Copyright ( C ) 2009 - 2010 Pengutronix
* Uwe Kleine - Koenig < u . kleine - koenig @ pengutronix . de >
*
* This program is free software ; you can redistribute it and / or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation .
*/
# include <linux/kernel.h>
# include <linux/platform_device.h>
# include <linux/init.h>
2010-11-02 13:56:54 +03:00
struct platform_device * imx_add_platform_device_dmamask (
const char * name , int id ,
2010-06-15 13:31:02 +04:00
const struct resource * res , unsigned int num_resources ,
2010-11-02 13:56:54 +03:00
const void * data , size_t size_data , u64 dmamask ) ;
static inline struct platform_device * imx_add_platform_device (
const char * name , int id ,
const struct resource * res , unsigned int num_resources ,
const void * data , size_t size_data )
{
return imx_add_platform_device_dmamask (
name , id , res , num_resources , data , size_data , 0 ) ;
}
2010-06-15 20:14:19 +04:00
2010-10-06 14:00:18 +04:00
# include <linux/fec.h>
struct imx_fec_data {
resource_size_t iobase ;
resource_size_t irq ;
} ;
struct platform_device * __init imx_add_fec (
const struct imx_fec_data * data ,
const struct fec_platform_data * pdata ) ;
2010-07-22 13:45:34 +04:00
# include <linux/can/platform/flexcan.h>
struct platform_device * __init imx_add_flexcan ( int id ,
resource_size_t iobase , resource_size_t iosize ,
resource_size_t irq ,
const struct flexcan_platform_data * pdata ) ;
2010-10-23 18:12:46 +04:00
# include <linux/gpio_keys.h>
struct platform_device * __init imx_add_gpio_keys (
const struct gpio_keys_platform_data * pdata ) ;
2010-06-16 16:37:51 +04:00
# include <mach/i2c.h>
2010-09-21 14:13:34 +04:00
struct imx_imx_i2c_data {
int id ;
resource_size_t iobase ;
resource_size_t iosize ;
resource_size_t irq ;
} ;
struct platform_device * __init imx_add_imx_i2c (
const struct imx_imx_i2c_data * data ,
2010-06-16 16:37:51 +04:00
const struct imxi2c_platform_data * pdata ) ;
2010-08-25 19:37:45 +04:00
# include <mach/ssi.h>
struct imx_imx_ssi_data {
int id ;
resource_size_t iobase ;
resource_size_t iosize ;
resource_size_t irq ;
resource_size_t dmatx0 ;
resource_size_t dmarx0 ;
resource_size_t dmatx1 ;
resource_size_t dmarx1 ;
} ;
struct platform_device * __init imx_add_imx_ssi (
const struct imx_imx_ssi_data * data ,
const struct imx_ssi_platform_data * pdata ) ;
2010-06-22 16:49:20 +04:00
# include <mach/imx-uart.h>
2010-08-11 00:57:24 +04:00
struct imx_imx_uart_3irq_data {
int id ;
resource_size_t iobase ;
resource_size_t iosize ;
resource_size_t irqrx ;
resource_size_t irqtx ;
resource_size_t irqrts ;
} ;
struct platform_device * __init imx_add_imx_uart_3irq (
const struct imx_imx_uart_3irq_data * data ,
2010-06-22 16:49:20 +04:00
const struct imxuart_platform_data * pdata ) ;
2010-08-11 00:57:24 +04:00
struct imx_imx_uart_1irq_data {
int id ;
resource_size_t iobase ;
resource_size_t iosize ;
resource_size_t irq ;
} ;
struct platform_device * __init imx_add_imx_uart_1irq (
const struct imx_imx_uart_1irq_data * data ,
2010-06-22 16:49:20 +04:00
const struct imxuart_platform_data * pdata ) ;
2010-11-02 12:03:51 +03:00
# include <mach/usb.h>
struct imx_imx_udc_data {
resource_size_t iobase ;
resource_size_t iosize ;
resource_size_t irq0 ;
resource_size_t irq1 ;
resource_size_t irq2 ;
resource_size_t irq3 ;
resource_size_t irq4 ;
resource_size_t irq5 ;
resource_size_t irq6 ;
} ;
struct platform_device * __init imx_add_imx_udc (
const struct imx_imx_udc_data * data ,
const struct imxusb_platform_data * pdata ) ;
2010-06-15 20:14:19 +04:00
# include <mach/mxc_nand.h>
2010-08-23 13:25:52 +04:00
struct imx_mxc_nand_data {
2010-08-03 13:59:46 +04:00
/*
* id is traditionally 0 , but - 1 is more appropriate . We use - 1 for new
* machines but don ' t change existing devices as the nand device usually
* appears in the kernel command line to pass its partitioning .
*/
int id ;
2010-08-23 13:25:52 +04:00
resource_size_t iobase ;
resource_size_t iosize ;
2010-08-03 13:59:46 +04:00
resource_size_t axibase ;
2010-08-23 13:25:52 +04:00
resource_size_t irq ;
} ;
struct platform_device * __init imx_add_mxc_nand (
const struct imx_mxc_nand_data * data ,
const struct mxc_nand_platform_data * pdata ) ;
2010-06-21 20:02:55 +04:00
2010-10-29 12:56:07 +04:00
struct imx_mxc_w1_data {
resource_size_t iobase ;
} ;
struct platform_device * __init imx_add_mxc_w1 (
const struct imx_mxc_w1_data * data ) ;
2010-06-21 20:02:55 +04:00
# include <mach/spi.h>
2010-09-09 23:02:02 +04:00
struct imx_spi_imx_data {
2010-09-09 23:02:02 +04:00
const char * devid ;
2010-09-09 23:02:02 +04:00
int id ;
resource_size_t iobase ;
resource_size_t iosize ;
int irq ;
} ;
struct platform_device * __init imx_add_spi_imx (
const struct imx_spi_imx_data * data ,
2010-06-21 20:02:55 +04:00
const struct spi_imx_master * pdata ) ;
2010-10-11 14:55:21 +04:00
# include <mach/esdhc.h>
2010-10-12 15:12:32 +04:00
struct imx_esdhc_imx_data {
int id ;
resource_size_t iobase ;
resource_size_t irq ;
} ;
struct platform_device * __init imx_add_esdhc (
const struct imx_esdhc_imx_data * data ,
2010-10-11 14:55:21 +04:00
const struct esdhc_platform_data * pdata ) ;