summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs/mach-mxs.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-07-07 23:12:03 +0800
committerShawn Guo <shawn.guo@linaro.org>2012-07-11 11:49:50 +0800
commit3143bbb42b3d27a5f799c97c84fb7a4a1de88f91 (patch)
tree56ee99b412765fb872fd673df5e2b92e35db9a76 /arch/arm/mach-mxs/mach-mxs.c
parent8fa62e11283faa203b360c4ebdbd186b2c8dd844 (diff)
ARM: mxs: convert apx4devkit board to device tree
Tested-by: Lauri Hintsala <lauri.hintsala@bluegiga.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-mxs/mach-mxs.c')
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index d3fc8ba9d75..d0bf4149f3e 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -16,9 +16,11 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/irqdomain.h>
+#include <linux/micrel_phy.h>
#include <linux/mxsfb.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
+#include <linux/phy.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <mach/common.h>
@@ -233,6 +235,21 @@ static void __init m28evk_init(void)
mxsfb_pdata.ld_intf_width = STMLCDIF_18BIT;
}
+static int apx4devkit_phy_fixup(struct phy_device *phy)
+{
+ phy->dev_flags |= MICREL_PHY_50MHZ_CLK;
+ return 0;
+}
+
+static void __init apx4devkit_init(void)
+{
+ enable_clk_enet_out();
+
+ if (IS_BUILTIN(CONFIG_PHYLIB))
+ phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
+ apx4devkit_phy_fixup);
+}
+
static void __init mxs_machine_init(void)
{
if (of_machine_is_compatible("fsl,imx28-evk"))
@@ -241,6 +258,8 @@ static void __init mxs_machine_init(void)
imx23_evk_init();
else if (of_machine_is_compatible("denx,m28evk"))
m28evk_init();
+ else if (of_machine_is_compatible("bluegiga,apx4devkit"))
+ apx4devkit_init();
of_platform_populate(NULL, of_default_bus_match_table,
mxs_auxdata_lookup, NULL);
@@ -254,6 +273,7 @@ static const char *imx23_dt_compat[] __initdata = {
};
static const char *imx28_dt_compat[] __initdata = {
+ "bluegiga,apx4devkit",
"crystalfontz,cfa10036",
"denx,m28evk",
"fsl,imx28-evk",