diff options
| author | Shawn Guo <shawn.guo@linaro.org> | 2012-07-07 11:12:03 -0400 |
|---|---|---|
| committer | Shawn Guo <shawn.guo@linaro.org> | 2012-07-10 23:49:50 -0400 |
| commit | 3143bbb42b3d27a5f799c97c84fb7a4a1de88f91 (patch) | |
| tree | 56ee99b412765fb872fd673df5e2b92e35db9a76 /arch/arm/mach-mxs | |
| parent | 8fa62e11283faa203b360c4ebdbd186b2c8dd844 (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')
| -rw-r--r-- | arch/arm/mach-mxs/mach-mxs.c | 20 |
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 d3fc8ba9d759..d0bf4149f3e5 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
| @@ -16,9 +16,11 @@ | |||
| 16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
| 17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
| 18 | #include <linux/irqdomain.h> | 18 | #include <linux/irqdomain.h> |
| 19 | #include <linux/micrel_phy.h> | ||
| 19 | #include <linux/mxsfb.h> | 20 | #include <linux/mxsfb.h> |
| 20 | #include <linux/of_irq.h> | 21 | #include <linux/of_irq.h> |
| 21 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
| 23 | #include <linux/phy.h> | ||
| 22 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
| 23 | #include <asm/mach/time.h> | 25 | #include <asm/mach/time.h> |
| 24 | #include <mach/common.h> | 26 | #include <mach/common.h> |
| @@ -233,6 +235,21 @@ static void __init m28evk_init(void) | |||
| 233 | mxsfb_pdata.ld_intf_width = STMLCDIF_18BIT; | 235 | mxsfb_pdata.ld_intf_width = STMLCDIF_18BIT; |
| 234 | } | 236 | } |
| 235 | 237 | ||
| 238 | static int apx4devkit_phy_fixup(struct phy_device *phy) | ||
| 239 | { | ||
| 240 | phy->dev_flags |= MICREL_PHY_50MHZ_CLK; | ||
| 241 | return 0; | ||
| 242 | } | ||
| 243 | |||
| 244 | static void __init apx4devkit_init(void) | ||
| 245 | { | ||
| 246 | enable_clk_enet_out(); | ||
| 247 | |||
| 248 | if (IS_BUILTIN(CONFIG_PHYLIB)) | ||
| 249 | phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK, | ||
| 250 | apx4devkit_phy_fixup); | ||
| 251 | } | ||
| 252 | |||
| 236 | static void __init mxs_machine_init(void) | 253 | static void __init mxs_machine_init(void) |
| 237 | { | 254 | { |
| 238 | if (of_machine_is_compatible("fsl,imx28-evk")) | 255 | if (of_machine_is_compatible("fsl,imx28-evk")) |
| @@ -241,6 +258,8 @@ static void __init mxs_machine_init(void) | |||
| 241 | imx23_evk_init(); | 258 | imx23_evk_init(); |
| 242 | else if (of_machine_is_compatible("denx,m28evk")) | 259 | else if (of_machine_is_compatible("denx,m28evk")) |
| 243 | m28evk_init(); | 260 | m28evk_init(); |
| 261 | else if (of_machine_is_compatible("bluegiga,apx4devkit")) | ||
| 262 | apx4devkit_init(); | ||
| 244 | 263 | ||
| 245 | of_platform_populate(NULL, of_default_bus_match_table, | 264 | of_platform_populate(NULL, of_default_bus_match_table, |
| 246 | mxs_auxdata_lookup, NULL); | 265 | mxs_auxdata_lookup, NULL); |
| @@ -254,6 +273,7 @@ static const char *imx23_dt_compat[] __initdata = { | |||
| 254 | }; | 273 | }; |
| 255 | 274 | ||
| 256 | static const char *imx28_dt_compat[] __initdata = { | 275 | static const char *imx28_dt_compat[] __initdata = { |
| 276 | "bluegiga,apx4devkit", | ||
| 257 | "crystalfontz,cfa10036", | 277 | "crystalfontz,cfa10036", |
| 258 | "denx,m28evk", | 278 | "denx,m28evk", |
| 259 | "fsl,imx28-evk", | 279 | "fsl,imx28-evk", |
