Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
9bb39b3f
Commit
9bb39b3f
authored
Nov 02, 2010
by
Uwe Kleine-König
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: imx: dynamically allocate mx1-camera device
Signed-off-by:
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
parent
6332c107
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
30 deletions
+57
-30
arch/arm/mach-imx/devices.c
arch/arm/mach-imx/devices.c
+0
-25
arch/arm/mach-imx/devices.h
arch/arm/mach-imx/devices.h
+0
-4
arch/arm/plat-mxc/devices/Kconfig
arch/arm/plat-mxc/devices/Kconfig
+3
-0
arch/arm/plat-mxc/devices/Makefile
arch/arm/plat-mxc/devices/Makefile
+1
-0
arch/arm/plat-mxc/devices/platform-mx1-camera.c
arch/arm/plat-mxc/devices/platform-mx1-camera.c
+42
-0
arch/arm/plat-mxc/include/mach/devices-common.h
arch/arm/plat-mxc/include/mach/devices-common.h
+10
-0
arch/arm/plat-mxc/include/mach/mx1.h
arch/arm/plat-mxc/include/mach/mx1.h
+1
-1
No files found.
arch/arm/mach-imx/devices.c
View file @
9bb39b3f
...
...
@@ -45,31 +45,6 @@
#include "devices.h"
#if defined(CONFIG_ARCH_MX1)
static
struct
resource
imx1_camera_resources
[]
=
{
{
.
start
=
0x00224000
,
.
end
=
0x00224010
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
MX1_CSI_INT
,
.
end
=
MX1_CSI_INT
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
u64
imx1_camera_dmamask
=
DMA_BIT_MASK
(
32
);
struct
platform_device
imx1_camera_device
=
{
.
name
=
"mx1-camera"
,
.
id
=
0
,
/* This is used to put cameras on this interface */
.
dev
=
{
.
dma_mask
=
&
imx1_camera_dmamask
,
.
coherent_dma_mask
=
DMA_BIT_MASK
(
32
),
},
.
resource
=
imx1_camera_resources
,
.
num_resources
=
ARRAY_SIZE
(
imx1_camera_resources
),
};
/* GPIO port description */
static
struct
mxc_gpio_port
imx_gpio_ports
[]
=
{
{
...
...
arch/arm/mach-imx/devices.h
View file @
9bb39b3f
#ifdef CONFIG_ARCH_MX1
extern
struct
platform_device
imx1_camera_device
;
#endif
#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
extern
struct
platform_device
mxc_wdt
;
extern
struct
platform_device
mxc_fb_device
;
...
...
arch/arm/plat-mxc/devices/Kconfig
View file @
9bb39b3f
...
...
@@ -25,6 +25,9 @@ config IMX_HAVE_PLATFORM_IMX_UART
config IMX_HAVE_PLATFORM_IMX_UDC
bool
config IMX_HAVE_PLATFORM_MX1_CAMERA
bool
config IMX_HAVE_PLATFORM_MXC_NAND
bool
...
...
arch/arm/plat-mxc/devices/Makefile
View file @
9bb39b3f
...
...
@@ -7,6 +7,7 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI)
+=
platform-imx-ssi.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART)
+=
platform-imx-uart.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC)
+=
platform-imx_udc.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA)
+=
platform-mx1-camera.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND)
+=
platform-mxc_nand.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1)
+=
platform-mxc_w1.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX)
+=
platform-spi_imx.o
arch/arm/plat-mxc/devices/platform-mx1-camera.c
0 → 100644
View file @
9bb39b3f
/*
* Copyright (C) 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 <mach/hardware.h>
#include <mach/devices-common.h>
#define imx_mx1_camera_data_entry_single(soc, _size) \
{ \
.iobase = soc ## _CSI ## _BASE_ADDR, \
.iosize = _size, \
.irq = soc ## _INT_CSI, \
}
#ifdef CONFIG_SOC_IMX1
const
struct
imx_mx1_camera_data
imx1_mx1_camera_data
__initconst
=
imx_mx1_camera_data_entry_single
(
MX1
,
10
);
#endif
/* ifdef CONFIG_SOC_IMX1 */
struct
platform_device
*
__init
imx_add_mx1_camera
(
const
struct
imx_mx1_camera_data
*
data
,
const
struct
mx1_camera_pdata
*
pdata
)
{
struct
resource
res
[]
=
{
{
.
start
=
data
->
iobase
,
.
end
=
data
->
iobase
+
data
->
iosize
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
data
->
irq
,
.
end
=
data
->
irq
,
.
flags
=
IORESOURCE_IRQ
,
},
};
return
imx_add_platform_device_dmamask
(
"mx1-camera"
,
0
,
res
,
ARRAY_SIZE
(
res
),
pdata
,
sizeof
(
*
pdata
),
DMA_BIT_MASK
(
32
));
}
arch/arm/plat-mxc/include/mach/devices-common.h
View file @
9bb39b3f
...
...
@@ -108,6 +108,16 @@ struct platform_device *__init imx_add_imx_udc(
const
struct
imx_imx_udc_data
*
data
,
const
struct
imxusb_platform_data
*
pdata
);
#include <mach/mx1_camera.h>
struct
imx_mx1_camera_data
{
resource_size_t
iobase
;
resource_size_t
iosize
;
resource_size_t
irq
;
};
struct
platform_device
*
__init
imx_add_mx1_camera
(
const
struct
imx_mx1_camera_data
*
data
,
const
struct
mx1_camera_pdata
*
pdata
);
#include <mach/mxc_nand.h>
struct
imx_mxc_nand_data
{
/*
...
...
arch/arm/plat-mxc/include/mach/mx1.h
View file @
9bb39b3f
...
...
@@ -77,7 +77,7 @@
/* fixed interrput numbers */
#define MX1_INT_SOFTINT 0
#define MX1_
CSI_INT
6
#define MX1_
INT_CSI
6
#define MX1_DSPA_MAC_INT 7
#define MX1_DSPA_INT 8
#define MX1_COMP_INT 9
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment