summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 38f1ae3)
raw | patch | inline | side by side (from parent 1: 38f1ae3)
author | Chandan Nath <chandan.nath@ti.com> | |
Wed, 11 Jan 2012 12:05:47 +0000 (17:35 +0530) | ||
committer | Vaibhav Hiremath <hvaibhav@ti.com> | |
Mon, 23 Jan 2012 19:14:47 +0000 (00:44 +0530) |
This patch fixes missing configuration for MII interface
configuration in device control register. MII mode selection
should be done depending up on the board/phy type.
This was missing in linux, however without this also it was
working as it was configured in uboot. This is required in
linux also in order to remove any dependency on uboot.
Signed-off-by: Chandan Nath <chandan.nath@ti.com>
configuration in device control register. MII mode selection
should be done depending up on the board/phy type.
This was missing in linux, however without this also it was
working as it was configured in uboot. This is required in
linux also in order to remove any dependency on uboot.
Signed-off-by: Chandan Nath <chandan.nath@ti.com>
arch/arm/mach-omap2/board-am335xevm.c | patch | blob | history | |
arch/arm/mach-omap2/devices.c | patch | blob | history | |
arch/arm/mach-omap2/include/mach/board-am335xevm.h | patch | blob | history |
index f8b93e0d2387fa0003342efde4f01497466b91d1..5c47764931bd68f03e5c7556e3eab683ccbee697 100644 (file)
phy_register_fixup_for_uid(BBB_PHY_ID, BBB_PHY_MASK,
beaglebone_phy_fixup);
phy_register_fixup_for_uid(BBB_PHY_ID, BBB_PHY_MASK,
beaglebone_phy_fixup);
+
+ /* Fill up global evmid */
+ am33xx_evmid_fillup(BEAGLE_BONE_OLD);
}
/* BeagleBone after Rev A3 */
}
/* BeagleBone after Rev A3 */
am335x_mmc[0].gpio_wp = -EINVAL;
_configure_device(LOW_COST_EVM, beaglebone_dev_cfg, PROFILE_NONE);
am335x_mmc[0].gpio_wp = -EINVAL;
_configure_device(LOW_COST_EVM, beaglebone_dev_cfg, PROFILE_NONE);
+
+ /* Fill up global evmid */
+ am33xx_evmid_fillup(BEAGLE_BONE_A3);
}
}
index e896e7b3885e9812e700af863dfb53757b734929..bf5d54c44fda7f1fb1aa74b23d74a1c0b91ba739 100644 (file)
return;
}
return;
}
+#define MII_MODE_ENABLE 0x0
+#define RMII_MODE_ENABLE 0x5
+#define RGMII_MODE_ENABLE 0xA
+#define MAC_MII_SEL 0x650
+
void am33xx_cpsw_init(unsigned int gigen)
{
u32 mac_lo, mac_hi;
void am33xx_cpsw_init(unsigned int gigen)
{
u32 mac_lo, mac_hi;
am33xx_cpsw_slaves[1].mac_addr[i] = am33xx_macid1[i];
}
am33xx_cpsw_slaves[1].mac_addr[i] = am33xx_macid1[i];
}
- if (am33xx_evmid == IND_AUT_MTR_EVM) {
+ if (am33xx_evmid == BEAGLE_BONE_OLD) {
+ __raw_writel(RMII_MODE_ENABLE,
+ AM33XX_CTRL_REGADDR(MAC_MII_SEL));
+ } else if (am33xx_evmid == BEAGLE_BONE_A3) {
+ __raw_writel(MII_MODE_ENABLE,
+ AM33XX_CTRL_REGADDR(MAC_MII_SEL));
+ } else if (am33xx_evmid == IND_AUT_MTR_EVM) {
am33xx_cpsw_slaves[0].phy_id = "0:1e";
am33xx_cpsw_slaves[1].phy_id = "0:00";
am33xx_cpsw_slaves[0].phy_id = "0:1e";
am33xx_cpsw_slaves[1].phy_id = "0:00";
+ } else {
+ __raw_writel(RGMII_MODE_ENABLE,
+ AM33XX_CTRL_REGADDR(MAC_MII_SEL));
}
am33xx_cpsw_pdata.gigabit_en = gigen;
}
am33xx_cpsw_pdata.gigabit_en = gigen;
diff --git a/arch/arm/mach-omap2/include/mach/board-am335xevm.h b/arch/arm/mach-omap2/include/mach/board-am335xevm.h
index 521b872c677b882965a4aa11826d3493eddff483..a8fe93a223d01cf9d13b0d6549f1d57b64319406 100644 (file)
#define LOW_COST_EVM 0
#define GEN_PURP_EVM 1
#define IND_AUT_MTR_EVM 2
#define LOW_COST_EVM 0
#define GEN_PURP_EVM 1
#define IND_AUT_MTR_EVM 2
-#define IP_PHN_EVM 3
+#define IP_PHN_EVM 3
+#define BEAGLE_BONE_OLD 4
+#define BEAGLE_BONE_A3 5
/* REVIST : check posibility of PROFILE_(x) syntax usage */
#define PROFILE_NONE -1 /* Few EVM doesn't have profiles */
/* REVIST : check posibility of PROFILE_(x) syntax usage */
#define PROFILE_NONE -1 /* Few EVM doesn't have profiles */