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
6cafe48a
Commit
6cafe48a
authored
Jul 30, 2011
by
Uwe Kleine-König
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: mx5: dynamically allocate fsl-usb2-udc devices
Signed-off-by:
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
parent
7d92e8e6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
35 deletions
+18
-35
arch/arm/mach-mx5/Kconfig
arch/arm/mach-mx5/Kconfig
+3
-0
arch/arm/mach-mx5/board-cpuimx51.c
arch/arm/mach-mx5/board-cpuimx51.c
+2
-3
arch/arm/mach-mx5/board-cpuimx51sd.c
arch/arm/mach-mx5/board-cpuimx51sd.c
+2
-3
arch/arm/mach-mx5/board-mx51_babbage.c
arch/arm/mach-mx5/board-mx51_babbage.c
+2
-2
arch/arm/mach-mx5/devices-imx51.h
arch/arm/mach-mx5/devices-imx51.h
+4
-0
arch/arm/mach-mx5/devices.c
arch/arm/mach-mx5/devices.c
+0
-26
arch/arm/mach-mx5/devices.h
arch/arm/mach-mx5/devices.h
+0
-1
arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c
arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c
+5
-0
No files found.
arch/arm/mach-mx5/Kconfig
View file @
6cafe48a
...
@@ -65,6 +65,7 @@ comment "i.MX51 machines:"
...
@@ -65,6 +65,7 @@ comment "i.MX51 machines:"
config MACH_MX51_BABBAGE
config MACH_MX51_BABBAGE
bool "Support MX51 BABBAGE platforms"
bool "Support MX51 BABBAGE platforms"
select SOC_IMX51
select SOC_IMX51
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_UART
...
@@ -92,6 +93,7 @@ config MACH_MX51_3DS
...
@@ -92,6 +93,7 @@ config MACH_MX51_3DS
config MACH_EUKREA_CPUIMX51
config MACH_EUKREA_CPUIMX51
bool "Support Eukrea CPUIMX51 module"
bool "Support Eukrea CPUIMX51 module"
select SOC_IMX51
select SOC_IMX51
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_EHCI
...
@@ -121,6 +123,7 @@ endchoice
...
@@ -121,6 +123,7 @@ endchoice
config MACH_EUKREA_CPUIMX51SD
config MACH_EUKREA_CPUIMX51SD
bool "Support Eukrea CPUIMX51SD module"
bool "Support Eukrea CPUIMX51SD module"
select SOC_IMX51
select SOC_IMX51
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_EHCI
...
...
arch/arm/mach-mx5/board-cpuimx51.c
View file @
6cafe48a
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
#include <asm/mach/time.h>
#include <asm/mach/time.h>
#include "devices-imx51.h"
#include "devices-imx51.h"
#include "devices.h"
#define CPUIMX51_USBH1_STP IMX_GPIO_NR(1, 27)
#define CPUIMX51_USBH1_STP IMX_GPIO_NR(1, 27)
#define CPUIMX51_QUARTA_GPIO IMX_GPIO_NR(3, 28)
#define CPUIMX51_QUARTA_GPIO IMX_GPIO_NR(3, 28)
...
@@ -211,7 +210,7 @@ static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
...
@@ -211,7 +210,7 @@ static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.
portsc
=
MXC_EHCI_UTMI_16BIT
,
.
portsc
=
MXC_EHCI_UTMI_16BIT
,
};
};
static
struct
fsl_usb2_platform_data
usb_pdata
=
{
static
const
struct
fsl_usb2_platform_data
usb_pdata
__initconst
=
{
.
operating_mode
=
FSL_USB2_DR_DEVICE
,
.
operating_mode
=
FSL_USB2_DR_DEVICE
,
.
phy_mode
=
FSL_USB2_PHY_UTMI_WIDE
,
.
phy_mode
=
FSL_USB2_PHY_UTMI_WIDE
,
};
};
...
@@ -273,7 +272,7 @@ static void __init eukrea_cpuimx51_init(void)
...
@@ -273,7 +272,7 @@ static void __init eukrea_cpuimx51_init(void)
imx51_add_mxc_ehci_otg
(
&
dr_utmi_config
);
imx51_add_mxc_ehci_otg
(
&
dr_utmi_config
);
else
{
else
{
initialize_otg_port
(
NULL
);
initialize_otg_port
(
NULL
);
mxc_register_device
(
&
mxc_usbdr_udc_device
,
&
usb_pdata
);
imx51_add_fsl_usb2_udc
(
&
usb_pdata
);
}
}
imx51_add_mxc_ehci_hs
(
1
,
&
usbh1_config
);
imx51_add_mxc_ehci_hs
(
1
,
&
usbh1_config
);
...
...
arch/arm/mach-mx5/board-cpuimx51sd.c
View file @
6cafe48a
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
#include <asm/mach/time.h>
#include <asm/mach/time.h>
#include "devices-imx51.h"
#include "devices-imx51.h"
#include "devices.h"
#include "cpu_op-mx51.h"
#include "cpu_op-mx51.h"
#define USBH1_RST IMX_GPIO_NR(2, 28)
#define USBH1_RST IMX_GPIO_NR(2, 28)
...
@@ -194,7 +193,7 @@ static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
...
@@ -194,7 +193,7 @@ static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.
portsc
=
MXC_EHCI_UTMI_16BIT
,
.
portsc
=
MXC_EHCI_UTMI_16BIT
,
};
};
static
struct
fsl_usb2_platform_data
usb_pdata
=
{
static
const
struct
fsl_usb2_platform_data
usb_pdata
__initconst
=
{
.
operating_mode
=
FSL_USB2_DR_DEVICE
,
.
operating_mode
=
FSL_USB2_DR_DEVICE
,
.
phy_mode
=
FSL_USB2_PHY_UTMI_WIDE
,
.
phy_mode
=
FSL_USB2_PHY_UTMI_WIDE
,
};
};
...
@@ -306,7 +305,7 @@ static void __init eukrea_cpuimx51sd_init(void)
...
@@ -306,7 +305,7 @@ static void __init eukrea_cpuimx51sd_init(void)
imx51_add_mxc_ehci_otg
(
&
dr_utmi_config
);
imx51_add_mxc_ehci_otg
(
&
dr_utmi_config
);
else
{
else
{
initialize_otg_port
(
NULL
);
initialize_otg_port
(
NULL
);
mxc_register_device
(
&
mxc_usbdr_udc_device
,
&
usb_pdata
);
imx51_add_fsl_usb2_udc
(
&
usb_pdata
);
}
}
gpio_request
(
USBH1_RST
,
"usb_rst"
);
gpio_request
(
USBH1_RST
,
"usb_rst"
);
...
...
arch/arm/mach-mx5/board-mx51_babbage.c
View file @
6cafe48a
...
@@ -293,7 +293,7 @@ static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
...
@@ -293,7 +293,7 @@ static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.
portsc
=
MXC_EHCI_UTMI_16BIT
,
.
portsc
=
MXC_EHCI_UTMI_16BIT
,
};
};
static
struct
fsl_usb2_platform_data
usb_pdata
=
{
static
const
struct
fsl_usb2_platform_data
usb_pdata
__initconst
=
{
.
operating_mode
=
FSL_USB2_DR_DEVICE
,
.
operating_mode
=
FSL_USB2_DR_DEVICE
,
.
phy_mode
=
FSL_USB2_PHY_UTMI_WIDE
,
.
phy_mode
=
FSL_USB2_PHY_UTMI_WIDE
,
};
};
...
@@ -387,7 +387,7 @@ static void __init mx51_babbage_init(void)
...
@@ -387,7 +387,7 @@ static void __init mx51_babbage_init(void)
imx51_add_mxc_ehci_otg
(
&
dr_utmi_config
);
imx51_add_mxc_ehci_otg
(
&
dr_utmi_config
);
else
{
else
{
initialize_otg_port
(
NULL
);
initialize_otg_port
(
NULL
);
mxc_register_device
(
&
mxc_usbdr_udc_device
,
&
usb_pdata
);
imx51_add_fsl_usb2_udc
(
&
usb_pdata
);
}
}
gpio_usbh1_active
();
gpio_usbh1_active
();
...
...
arch/arm/mach-mx5/devices-imx51.h
View file @
6cafe48a
...
@@ -13,6 +13,10 @@ extern const struct imx_fec_data imx51_fec_data;
...
@@ -13,6 +13,10 @@ extern const struct imx_fec_data imx51_fec_data;
#define imx51_add_fec(pdata) \
#define imx51_add_fec(pdata) \
imx_add_fec(&imx51_fec_data, pdata)
imx_add_fec(&imx51_fec_data, pdata)
extern
const
struct
imx_fsl_usb2_udc_data
imx51_fsl_usb2_udc_data
;
#define imx51_add_fsl_usb2_udc(pdata) \
imx_add_fsl_usb2_udc(&imx51_fsl_usb2_udc_data, pdata)
extern
const
struct
imx_imx_i2c_data
imx51_imx_i2c_data
[];
extern
const
struct
imx_imx_i2c_data
imx51_imx_i2c_data
[];
#define imx51_add_imx_i2c(id, pdata) \
#define imx51_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata)
imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata)
...
...
arch/arm/mach-mx5/devices.c
View file @
6cafe48a
...
@@ -35,29 +35,3 @@ struct platform_device mxc_hsi2c_device = {
...
@@ -35,29 +35,3 @@ struct platform_device mxc_hsi2c_device = {
.
num_resources
=
ARRAY_SIZE
(
mxc_hsi2c_resources
),
.
num_resources
=
ARRAY_SIZE
(
mxc_hsi2c_resources
),
.
resource
=
mxc_hsi2c_resources
.
resource
=
mxc_hsi2c_resources
};
};
static
u64
usb_dma_mask
=
DMA_BIT_MASK
(
32
);
static
struct
resource
usbotg_resources
[]
=
{
{
.
start
=
MX51_USB_OTG_BASE_ADDR
,
.
end
=
MX51_USB_OTG_BASE_ADDR
+
0x1ff
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
MX51_INT_USB_OTG
,
.
flags
=
IORESOURCE_IRQ
,
},
};
/* OTG gadget device */
struct
platform_device
mxc_usbdr_udc_device
=
{
.
name
=
"fsl-usb2-udc"
,
.
id
=
-
1
,
.
num_resources
=
ARRAY_SIZE
(
usbotg_resources
),
.
resource
=
usbotg_resources
,
.
dev
=
{
.
dma_mask
=
&
usb_dma_mask
,
.
coherent_dma_mask
=
DMA_BIT_MASK
(
32
),
},
};
arch/arm/mach-mx5/devices.h
View file @
6cafe48a
extern
struct
platform_device
mxc_usbdr_udc_device
;
extern
struct
platform_device
mxc_hsi2c_device
;
extern
struct
platform_device
mxc_hsi2c_device
;
arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c
View file @
6cafe48a
...
@@ -36,6 +36,11 @@ const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst =
...
@@ -36,6 +36,11 @@ const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst =
imx_fsl_usb2_udc_data_entry_single
(
MX35
);
imx_fsl_usb2_udc_data_entry_single
(
MX35
);
#endif
/* ifdef CONFIG_SOC_IMX35 */
#endif
/* ifdef CONFIG_SOC_IMX35 */
#ifdef CONFIG_SOC_IMX51
const
struct
imx_fsl_usb2_udc_data
imx51_fsl_usb2_udc_data
__initconst
=
imx_fsl_usb2_udc_data_entry_single
(
MX51
);
#endif
struct
platform_device
*
__init
imx_add_fsl_usb2_udc
(
struct
platform_device
*
__init
imx_add_fsl_usb2_udc
(
const
struct
imx_fsl_usb2_udc_data
*
data
,
const
struct
imx_fsl_usb2_udc_data
*
data
,
const
struct
fsl_usb2_platform_data
*
pdata
)
const
struct
fsl_usb2_platform_data
*
pdata
)
...
...
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