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
bb4c853f
Commit
bb4c853f
authored
Nov 11, 2010
by
Uwe Kleine-König
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: mx25: dynamically allocate mx2-camera devices
Signed-off-by:
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
parent
00871505
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
53 deletions
+22
-53
arch/arm/mach-mx25/Makefile
arch/arm/mach-mx25/Makefile
+1
-1
arch/arm/mach-mx25/devices-imx25.h
arch/arm/mach-mx25/devices-imx25.h
+4
-0
arch/arm/mach-mx25/devices.c
arch/arm/mach-mx25/devices.c
+0
-45
arch/arm/mach-mx25/devices.h
arch/arm/mach-mx25/devices.h
+0
-1
arch/arm/plat-mxc/devices/platform-mx2-camera.c
arch/arm/plat-mxc/devices/platform-mx2-camera.c
+17
-6
No files found.
arch/arm/mach-mx25/Makefile
View file @
bb4c853f
obj-y
:=
mm.o
devices.o
obj-y
:=
mm.o
obj-$(CONFIG_ARCH_MX25)
+=
clock.o
obj-$(CONFIG_MACH_MX25_3DS)
+=
mach-mx25_3ds.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX25)
+=
mach-cpuimx25.o
...
...
arch/arm/mach-mx25/devices-imx25.h
View file @
bb4c853f
...
...
@@ -59,6 +59,10 @@ extern const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst;
#define imx25_add_imx_uart3(pdata) imx25_add_imx_uart(3, pdata)
#define imx25_add_imx_uart4(pdata) imx25_add_imx_uart(4, pdata)
extern
const
struct
imx_mx2_camera_data
imx25_mx2_camera_data
__initconst
;
#define imx25_add_mx2_camera(pdata) \
imx_add_mx2_camera(&imx25_mx2_camera_data, pdata)
extern
const
struct
imx_mxc_ehci_data
imx25_mxc_ehci_otg_data
__initconst
;
#define imx25_add_mxc_ehci_otg(pdata) \
imx_add_mxc_ehci(&imx25_mxc_ehci_otg_data, pdata)
...
...
arch/arm/mach-mx25/devices.c
deleted
100644 → 0
View file @
00871505
/*
* Copyright 2009 Sascha Hauer, <kernel@pengutronix.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/gpio.h>
#include <mach/mx25.h>
#include <mach/irqs.h>
static
struct
resource
mx25_csi_resources
[]
=
{
{
.
start
=
MX25_CSI_BASE_ADDR
,
.
end
=
MX25_CSI_BASE_ADDR
+
0xfff
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
MX25_INT_CSI
,
.
flags
=
IORESOURCE_IRQ
},
};
struct
platform_device
mx25_csi_device
=
{
.
name
=
"mx2-camera"
,
.
id
=
0
,
.
num_resources
=
ARRAY_SIZE
(
mx25_csi_resources
),
.
resource
=
mx25_csi_resources
,
.
dev
=
{
.
coherent_dma_mask
=
0xffffffff
,
},
};
arch/arm/mach-mx25/devices.h
View file @
bb4c853f
extern
struct
platform_device
mx25_csi_device
;
arch/arm/plat-mxc/devices/platform-mx2-camera.c
View file @
bb4c853f
...
...
@@ -10,6 +10,12 @@
#include <mach/devices-common.h>
#define imx_mx2_camera_data_entry_single(soc) \
{ \
.iobasecsi = soc ## _CSI_BASE_ADDR, \
.iosizecsi = SZ_4K, \
.irqcsi = soc ## _INT_CSI, \
}
#define imx_mx2_camera_data_entry_single_emma(soc) \
{ \
.iobasecsi = soc ## _CSI_BASE_ADDR, \
.iosizecsi = SZ_32, \
...
...
@@ -19,9 +25,14 @@
.irqemmaprp = soc ## _INT_EMMAPRP, \
}
#ifdef CONFIG_SOC_IMX25
const
struct
imx_mx2_camera_data
imx25_mx2_camera_data
__initconst
=
imx_mx2_camera_data_entry_single
(
MX25
);
#endif
/* ifdef CONFIG_SOC_IMX25 */
#ifdef CONFIG_SOC_IMX27
const
struct
imx_mx2_camera_data
imx27_mx2_camera_data
__initconst
=
imx_mx2_camera_data_entry_single
(
MX27
);
imx_mx2_camera_data_entry_single
_emma
(
MX27
);
#endif
/* ifdef CONFIG_SOC_IMX27 */
struct
platform_device
*
__init
imx_add_mx2_camera
(
...
...
@@ -33,14 +44,14 @@ struct platform_device *__init imx_add_mx2_camera(
.
start
=
data
->
iobasecsi
,
.
end
=
data
->
iobasecsi
+
data
->
iosizecsi
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
data
->
iobaseemmaprp
,
.
end
=
data
->
iobaseemmaprp
+
data
->
iosizeemmaprp
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
data
->
irqcsi
,
.
end
=
data
->
irqcsi
,
.
flags
=
IORESOURCE_IRQ
,
},
{
.
start
=
data
->
iobaseemmaprp
,
.
end
=
data
->
iobaseemmaprp
+
data
->
iosizeemmaprp
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
data
->
irqemmaprp
,
.
end
=
data
->
irqemmaprp
,
...
...
@@ -48,6 +59,6 @@ struct platform_device *__init imx_add_mx2_camera(
},
};
return
imx_add_platform_device_dmamask
(
"mx2-camera"
,
0
,
res
,
ARRAY_SIZE
(
res
)
,
res
,
data
->
iobaseemmaprp
?
4
:
2
,
pdata
,
sizeof
(
*
pdata
),
DMA_BIT_MASK
(
32
));
}
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