Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243489
b: refs/heads/master
c: 021ebc2
h: refs/heads/master
i:
  243487: 991c188
v: v3
  • Loading branch information
Lothar Waßmann authored and Sascha Hauer committed Mar 23, 2011
1 parent 4a70ee5 commit b58330a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d18724588a4f632e836357a43b33bf4b538af82
refs/heads/master: 021ebc2da02a7f3107a8f31d8a0ebfbe4175429e
41 changes: 35 additions & 6 deletions trunk/arch/arm/mach-mxs/module-tx28.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static const iomux_cfg_t tx28_fec_gpio_pads[] __initconst = {
};

#define FEC_MODE (MXS_PAD_8MA | MXS_PAD_PULLUP | MXS_PAD_3V3)
static const iomux_cfg_t tx28_fec_pads[] __initconst = {
static const iomux_cfg_t tx28_fec0_pads[] __initconst = {
MX28_PAD_ENET0_MDC__ENET0_MDC | FEC_MODE,
MX28_PAD_ENET0_MDIO__ENET0_MDIO | FEC_MODE,
MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | FEC_MODE,
Expand All @@ -57,7 +57,20 @@ static const iomux_cfg_t tx28_fec_pads[] __initconst = {
MX28_PAD_ENET_CLK__CLKCTRL_ENET | FEC_MODE,
};

static const struct fec_platform_data tx28_fec_data __initconst = {
static const iomux_cfg_t tx28_fec1_pads[] __initconst = {
MX28_PAD_ENET0_RXD2__ENET1_RXD0,
MX28_PAD_ENET0_RXD3__ENET1_RXD1,
MX28_PAD_ENET0_TXD2__ENET1_TXD0,
MX28_PAD_ENET0_TXD3__ENET1_TXD1,
MX28_PAD_ENET0_COL__ENET1_TX_EN,
MX28_PAD_ENET0_CRS__ENET1_RX_EN,
};

static struct fec_platform_data tx28_fec0_data = {
.phy = PHY_INTERFACE_MODE_RMII,
};

static struct fec_platform_data tx28_fec1_data = {
.phy = PHY_INTERFACE_MODE_RMII,
};

Expand Down Expand Up @@ -108,15 +121,15 @@ int __init tx28_add_fec0(void)
pr_debug("%s: Deasserting FEC PHY RESET\n", __func__);
gpio_set_value(TX28_FEC_PHY_RESET, 1);

ret = mxs_iomux_setup_multiple_pads(tx28_fec_pads,
ARRAY_SIZE(tx28_fec_pads));
ret = mxs_iomux_setup_multiple_pads(tx28_fec0_pads,
ARRAY_SIZE(tx28_fec0_pads));
if (ret) {
pr_debug("%s: mxs_iomux_setup_multiple_pads() failed with rc: %d\n",
__func__, ret);
goto free_gpios;
}
pr_debug("%s: Registering FEC device\n", __func__);
mx28_add_fec(0, &tx28_fec_data);
pr_debug("%s: Registering FEC0 device\n", __func__);
mx28_add_fec(0, &tx28_fec0_data);
return 0;

free_gpios:
Expand All @@ -129,3 +142,19 @@ int __init tx28_add_fec0(void)

return ret;
}

int __init tx28_add_fec1(void)
{
int ret;

ret = mxs_iomux_setup_multiple_pads(tx28_fec1_pads,
ARRAY_SIZE(tx28_fec1_pads));
if (ret) {
pr_debug("%s: mxs_iomux_setup_multiple_pads() failed with rc: %d\n",
__func__, ret);
return ret;
}
pr_debug("%s: Registering FEC1 device\n", __func__);
mx28_add_fec(1, &tx28_fec1_data);
return 0;
}
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-mxs/module-tx28.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
* Free Software Foundation.
*/
int __init tx28_add_fec0(void);
int __init tx28_add_fec1(void);

0 comments on commit b58330a

Please sign in to comment.