forked from luck/tmp_suning_uos_patched
f64d6e2aaa
- Removal of most of_platform_populate() calls in arch code. Now the DT core code calls it in the default case and platforms only need to call it if they have special needs. - Use pr_fmt on all the DT core print statements. - CoreSight binding doc improvements to block name descriptions. - Add dt_to_config script which can parse dts files and list corresponding kernel config options. - Fix memory leak hit with a PowerMac DT. - Correct a bunch of STMicro compatible strings to use the correct vendor prefix. - Fix DA9052 PMIC binding doc to match what is actually used in dts files. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXm9KcAAoJEPr7XbWNvGHDRT4QAIIIOSB4AWHardnMLROgGge9 aOQKZ/05O9feOcxYKe8FkQbcH+IujJjrUL+yrRD36yGQPAyBP21gtcmmfrkCcwFM kH915f/JbGvXpfwEf8dcarHhzYH6FFJiQGduPpWfwSSWynx+xq5EKPwCqYzMg8bN SExxt7vUx1MKFOExZ0K8BNCo8VMVLUWQoJ1DNeJDuL25Op4EU3i2l1HQNYV/3XDk BSA3x7Lw3GjrWEH20VWYn2Azq1OFLY+E2FC2lnG4nbkk5X8dZbUH9PR1Sk7uTQDj uxTjWe59NBpliCxKSAbMbTAU/WwSB1pJ0I+zDJBiQsdFT+nb5F4zOrs3qSKHa/A9 Rv6AC8k5gdSMrDB1dOspfF2vWvOOInXgNV4/Kza0D92mbCpwyUuF+vhE6rfcMrZU OiD7rj2/fvO7Y9fUAhrp6zrfrOfH9B1Z9vS+940AlK96YwPE2+J0SA2vBxR/wg8H 7fj4Ud5X+SFisXWQhh5Wlv0W9o6e7C7fsi8vpkQ7gufmezLFWVnJKsUfQaxGEwhG Hkhm9kuSHHMd+6dEnn2756DnNfJAtQv6rSR0/QR4Lf9y5L4dvR3kAQIci8X/nx4P sIk+IJWGZG6wziZq59hh+SO6HEqdSNuvh+5sbR0iUimdE/1HsDBdPiocXf/r8iwK NY9nGeZPRrXmFgdpoZfm =wLMr -----END PGP SIGNATURE----- Merge tag 'devicetree-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: - remove most of_platform_populate() calls in arch code. Now the DT core code calls it in the default case and platforms only need to call it if they have special needs - use pr_fmt on all the DT core print statements - CoreSight binding doc improvements to block name descriptions - add dt_to_config script which can parse dts files and list corresponding kernel config options - fix memory leak hit with a PowerMac DT - correct a bunch of STMicro compatible strings to use the correct vendor prefix - fix DA9052 PMIC binding doc to match what is actually used in dts files * tag 'devicetree-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (35 commits) documentation: da9052: Update regulator bindings names to match DA9052/53 DTS expectations xtensa: Partially Revert "xtensa: Remove unnecessary of_platform_populate with default match table" xtensa: Fix build error due to missing include file MIPS: ath79: Add missing include file Fix spelling errors in Documentation/devicetree ARM: dts: fix STMicroelectronics compatible strings powerpc/dts: fix STMicroelectronics compatible strings Documentation: dt: i2c: use correct STMicroelectronics vendor prefix scripts/dtc: dt_to_config - kernel config options for a devicetree of: fdt: mark unflattened tree as detached of: overlay: add resolver error prints coresight: document binding acronyms Documentation/devicetree: document cavium-pip rx-delay/tx-delay properties of: use pr_fmt prefix for all console printing of/irq: Mark initialised interrupt controllers as populated of: fix memory leak related to safe_name() Revert "of/platform: export of_default_bus_match_table" of: unittest: use of_platform_default_populate() to populate default bus memory: omap-gpmc: use of_platform_default_populate() to populate default bus bus: uniphier-system-bus: use of_platform_default_populate() to populate default bus ...
97 lines
2.2 KiB
C
97 lines
2.2 KiB
C
/*
|
|
* Copyright (C) 2015 Freescale Semiconductor, Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
#include <linux/irqchip.h>
|
|
#include <linux/mfd/syscon.h>
|
|
#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
|
|
#include <linux/micrel_phy.h>
|
|
#include <linux/of_platform.h>
|
|
#include <linux/phy.h>
|
|
#include <linux/regmap.h>
|
|
#include <asm/mach/arch.h>
|
|
#include <asm/mach/map.h>
|
|
|
|
#include "common.h"
|
|
|
|
static void __init imx6ul_enet_clk_init(void)
|
|
{
|
|
struct regmap *gpr;
|
|
|
|
gpr = syscon_regmap_lookup_by_compatible("fsl,imx6ul-iomuxc-gpr");
|
|
if (!IS_ERR(gpr))
|
|
regmap_update_bits(gpr, IOMUXC_GPR1, IMX6UL_GPR1_ENET_CLK_DIR,
|
|
IMX6UL_GPR1_ENET_CLK_OUTPUT);
|
|
else
|
|
pr_err("failed to find fsl,imx6ul-iomux-gpr regmap\n");
|
|
|
|
}
|
|
|
|
static int ksz8081_phy_fixup(struct phy_device *dev)
|
|
{
|
|
if (dev && dev->interface == PHY_INTERFACE_MODE_MII) {
|
|
phy_write(dev, 0x1f, 0x8110);
|
|
phy_write(dev, 0x16, 0x201);
|
|
} else if (dev && dev->interface == PHY_INTERFACE_MODE_RMII) {
|
|
phy_write(dev, 0x1f, 0x8190);
|
|
phy_write(dev, 0x16, 0x202);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
static void __init imx6ul_enet_phy_init(void)
|
|
{
|
|
if (IS_BUILTIN(CONFIG_PHYLIB))
|
|
phy_register_fixup_for_uid(PHY_ID_KSZ8081, MICREL_PHY_ID_MASK,
|
|
ksz8081_phy_fixup);
|
|
}
|
|
|
|
static inline void imx6ul_enet_init(void)
|
|
{
|
|
imx6ul_enet_clk_init();
|
|
imx6ul_enet_phy_init();
|
|
}
|
|
|
|
static void __init imx6ul_init_machine(void)
|
|
{
|
|
struct device *parent;
|
|
|
|
parent = imx_soc_device_init();
|
|
if (parent == NULL)
|
|
pr_warn("failed to initialize soc device\n");
|
|
|
|
imx6ul_enet_init();
|
|
imx_anatop_init();
|
|
imx6ul_pm_init();
|
|
}
|
|
|
|
static void __init imx6ul_init_irq(void)
|
|
{
|
|
imx_init_revision_from_anatop();
|
|
imx_src_init();
|
|
irqchip_init();
|
|
imx6_pm_ccm_init("fsl,imx6ul-ccm");
|
|
}
|
|
|
|
static void __init imx6ul_init_late(void)
|
|
{
|
|
if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ))
|
|
platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0);
|
|
}
|
|
|
|
static const char * const imx6ul_dt_compat[] __initconst = {
|
|
"fsl,imx6ul",
|
|
NULL,
|
|
};
|
|
|
|
DT_MACHINE_START(IMX6UL, "Freescale i.MX6 Ultralite (Device Tree)")
|
|
.init_irq = imx6ul_init_irq,
|
|
.init_machine = imx6ul_init_machine,
|
|
.init_late = imx6ul_init_late,
|
|
.dt_compat = imx6ul_dt_compat,
|
|
MACHINE_END
|