diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-05-09 14:17:05 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-05-09 14:17:05 +0200 |
commit | afc0bedfd779e0b6e110427290312da5b0021e22 (patch) | |
tree | e304f360110d2a00cc5e3f4a5d1d810bf8f7d654 /drivers | |
parent | 3afde26594c49c6a4c7e0c71911846dd0f85f747 (diff) | |
parent | 78c5b76d4d6dbc68fed99656e90d6803ebd6c345 (diff) | |
download | barebox-afc0bedfd779e0b6e110427290312da5b0021e22.tar.gz barebox-afc0bedfd779e0b6e110427290312da5b0021e22.tar.xz |
Merge branch 'for-next/imx'
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/imx/clk-imx6.c | 26 | ||||
-rw-r--r-- | drivers/serial/serial_lpuart.c | 4 |
2 files changed, 26 insertions, 4 deletions
diff --git a/drivers/clk/imx/clk-imx6.c b/drivers/clk/imx/clk-imx6.c index d0571bce5e..8c3bb46a48 100644 --- a/drivers/clk/imx/clk-imx6.c +++ b/drivers/clk/imx/clk-imx6.c @@ -59,6 +59,11 @@ static struct clk *clks[IMX6QDL_CLK_END]; static struct clk_onecell_data clk_data; +static inline int cpu_is_plus(void) +{ + return cpu_is_mx6qp() || cpu_is_mx6dp(); +} + static const char *step_sels[] = { "osc", "pll2_pfd2_396m", @@ -109,6 +114,15 @@ static const char *enfc_sels[] = { "pll2_pfd2_396m", }; +static const char *enfc_sels_plus[] = { + "pll2_pfd0_352m", + "pll2_bus", + "pll3_usb_otg", + "pll2_pfd2_396m", + "pll3_pfd3_454m", + "dummy", +}; + static const char *eim_sels[] = { "axi", "pll3_usb_otg", @@ -404,7 +418,10 @@ static int imx6_ccm_probe(struct device_d *dev) clks[IMX6QDL_CLK_USDHC2_SEL] = imx_clk_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); clks[IMX6QDL_CLK_USDHC3_SEL] = imx_clk_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); clks[IMX6QDL_CLK_USDHC4_SEL] = imx_clk_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); - clks[IMX6QDL_CLK_ENFC_SEL] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels, ARRAY_SIZE(enfc_sels)); + if (cpu_is_plus()) + clks[IMX6QDL_CLK_ENFC_SEL] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels_plus, ARRAY_SIZE(enfc_sels_plus)); + else + clks[IMX6QDL_CLK_ENFC_SEL] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels, ARRAY_SIZE(enfc_sels)); clks[IMX6QDL_CLK_EIM_SEL] = imx_clk_mux("eim_sel", base + 0x1c, 27, 2, eim_sels, ARRAY_SIZE(eim_sels)); clks[IMX6QDL_CLK_EIM_SLOW_SEL] = imx_clk_mux("eim_slow_sel", base + 0x1c, 29, 2, eim_sels, ARRAY_SIZE(eim_sels)); clks[IMX6QDL_CLK_VDO_AXI_SEL] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels)); @@ -514,6 +531,13 @@ static int imx6_ccm_probe(struct device_d *dev) clk_set_parent(clks[IMX6QDL_CLK_LVDS1_SEL], clks[IMX6QDL_CLK_SATA_REF_100M]); + /* + * The gpmi needs 100MHz frequency in the EDO/Sync mode, + * We can not get the 100MHz from the pll2_pfd0_352m. + * So choose pll2_pfd2_396m as enfc_sel's parent. + */ + clk_set_parent(clks[IMX6QDL_CLK_ENFC_SEL], clks[IMX6QDL_CLK_PLL2_PFD2_396M]); + return 0; } diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c index 52fb6d39c0..8f87f7b9cb 100644 --- a/drivers/serial/serial_lpuart.c +++ b/drivers/serial/serial_lpuart.c @@ -170,9 +170,7 @@ static int lpuart_serial_probe(struct device_d *dev) cdev->linux_console_name = "ttyLP"; - lpuart_setup_with_fifo(lpuart->base, - clk_get_rate(lpuart->clk), - 15); + lpuart_setup(lpuart->base, clk_get_rate(lpuart->clk)); ret = console_register(cdev); if (!ret) { |