From 8635cb2c2b1100fa42f27234344f1f31ff53e783 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 14 Dec 2016 00:37:32 +0200 Subject: [PATCH 1/8] ARM: OMAP2+: Remove unused omap_display_init() function The omap_display_init() function is unused, remove it. Signed-off-by: Laurent Pinchart Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/display.c | 256 ---------------------------------- arch/arm/mach-omap2/display.h | 5 - 2 files changed, 261 deletions(-) diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index e71cca0950e9..8bb3e5543ede 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c @@ -46,8 +46,6 @@ #define DISPC_CONTROL3 0x0848 #define DISPC_IRQSTATUS 0x0018 -#define DSS_SYSCONFIG 0x10 -#define DSS_SYSSTATUS 0x14 #define DSS_CONTROL 0x40 #define DSS_SDI_CONTROL 0x44 #define DSS_PLL_CONTROL 0x48 @@ -76,36 +74,6 @@ static struct platform_device omap_display_device = { }, }; -struct omap_dss_hwmod_data { - const char *oh_name; - const char *dev_name; - const int id; -}; - -static const struct omap_dss_hwmod_data omap2_dss_hwmod_data[] __initconst = { - { "dss_core", "omapdss_dss", -1 }, - { "dss_dispc", "omapdss_dispc", -1 }, - { "dss_rfbi", "omapdss_rfbi", -1 }, - { "dss_venc", "omapdss_venc", -1 }, -}; - -static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initconst = { - { "dss_core", "omapdss_dss", -1 }, - { "dss_dispc", "omapdss_dispc", -1 }, - { "dss_rfbi", "omapdss_rfbi", -1 }, - { "dss_venc", "omapdss_venc", -1 }, - { "dss_dsi1", "omapdss_dsi", 0 }, -}; - -static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = { - { "dss_core", "omapdss_dss", -1 }, - { "dss_dispc", "omapdss_dispc", -1 }, - { "dss_rfbi", "omapdss_rfbi", -1 }, - { "dss_dsi1", "omapdss_dsi", 0 }, - { "dss_dsi2", "omapdss_dsi", 1 }, - { "dss_hdmi", "omapdss_hdmi", -1 }, -}; - #define OMAP4_DSIPHY_SYSCON_OFFSET 0x78 static struct regmap *omap4_dsi_mux_syscon; @@ -162,104 +130,6 @@ static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput) return omap_pm_set_min_bus_tput(dev, OCP_INITIATOR_AGENT, tput); } -static struct platform_device *create_dss_pdev(const char *pdev_name, - int pdev_id, const char *oh_name, void *pdata, int pdata_len, - struct platform_device *parent) -{ - struct platform_device *pdev; - struct omap_device *od; - struct omap_hwmod *ohs[1]; - struct omap_hwmod *oh; - int r; - - oh = omap_hwmod_lookup(oh_name); - if (!oh) { - pr_err("Could not look up %s\n", oh_name); - r = -ENODEV; - goto err; - } - - pdev = platform_device_alloc(pdev_name, pdev_id); - if (!pdev) { - pr_err("Could not create pdev for %s\n", pdev_name); - r = -ENOMEM; - goto err; - } - - if (parent != NULL) - pdev->dev.parent = &parent->dev; - - if (pdev->id != -1) - dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id); - else - dev_set_name(&pdev->dev, "%s", pdev->name); - - ohs[0] = oh; - od = omap_device_alloc(pdev, ohs, 1); - if (IS_ERR(od)) { - pr_err("Could not alloc omap_device for %s\n", pdev_name); - r = -ENOMEM; - goto err; - } - - r = platform_device_add_data(pdev, pdata, pdata_len); - if (r) { - pr_err("Could not set pdata for %s\n", pdev_name); - goto err; - } - - r = omap_device_register(pdev); - if (r) { - pr_err("Could not register omap_device for %s\n", pdev_name); - goto err; - } - - return pdev; - -err: - return ERR_PTR(r); -} - -static struct platform_device *create_simple_dss_pdev(const char *pdev_name, - int pdev_id, void *pdata, int pdata_len, - struct platform_device *parent) -{ - struct platform_device *pdev; - int r; - - pdev = platform_device_alloc(pdev_name, pdev_id); - if (!pdev) { - pr_err("Could not create pdev for %s\n", pdev_name); - r = -ENOMEM; - goto err; - } - - if (parent != NULL) - pdev->dev.parent = &parent->dev; - - if (pdev->id != -1) - dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id); - else - dev_set_name(&pdev->dev, "%s", pdev->name); - - r = platform_device_add_data(pdev, pdata, pdata_len); - if (r) { - pr_err("Could not set pdata for %s\n", pdev_name); - goto err; - } - - r = platform_device_add(pdev); - if (r) { - pr_err("Could not register platform_device for %s\n", pdev_name); - goto err; - } - - return pdev; - -err: - return ERR_PTR(r); -} - static enum omapdss_version __init omap_display_get_version(void) { if (cpu_is_omap24xx()) @@ -293,132 +163,6 @@ static enum omapdss_version __init omap_display_get_version(void) return OMAPDSS_VER_UNKNOWN; } -int __init omap_display_init(struct omap_dss_board_info *board_data) -{ - int r = 0; - struct platform_device *pdev; - int i, oh_count; - const struct omap_dss_hwmod_data *curr_dss_hwmod; - struct platform_device *dss_pdev; - enum omapdss_version ver; - - /* create omapdss device */ - - ver = omap_display_get_version(); - - if (ver == OMAPDSS_VER_UNKNOWN) { - pr_err("DSS not supported on this SoC\n"); - return -ENODEV; - } - - board_data->version = ver; - board_data->dsi_enable_pads = omap_dsi_enable_pads; - board_data->dsi_disable_pads = omap_dsi_disable_pads; - board_data->set_min_bus_tput = omap_dss_set_min_bus_tput; - - omap_display_device.dev.platform_data = board_data; - - r = platform_device_register(&omap_display_device); - if (r < 0) { - pr_err("Unable to register omapdss device\n"); - return r; - } - - /* create devices for dss hwmods */ - - if (cpu_is_omap24xx()) { - curr_dss_hwmod = omap2_dss_hwmod_data; - oh_count = ARRAY_SIZE(omap2_dss_hwmod_data); - } else if (cpu_is_omap34xx()) { - curr_dss_hwmod = omap3_dss_hwmod_data; - oh_count = ARRAY_SIZE(omap3_dss_hwmod_data); - } else { - curr_dss_hwmod = omap4_dss_hwmod_data; - oh_count = ARRAY_SIZE(omap4_dss_hwmod_data); - } - - /* - * First create the pdev for dss_core, which is used as a parent device - * by the other dss pdevs. Note: dss_core has to be the first item in - * the hwmod list. - */ - dss_pdev = create_dss_pdev(curr_dss_hwmod[0].dev_name, - curr_dss_hwmod[0].id, - curr_dss_hwmod[0].oh_name, - board_data, sizeof(*board_data), - NULL); - - if (IS_ERR(dss_pdev)) { - pr_err("Could not build omap_device for %s\n", - curr_dss_hwmod[0].oh_name); - - return PTR_ERR(dss_pdev); - } - - for (i = 1; i < oh_count; i++) { - pdev = create_dss_pdev(curr_dss_hwmod[i].dev_name, - curr_dss_hwmod[i].id, - curr_dss_hwmod[i].oh_name, - board_data, sizeof(*board_data), - dss_pdev); - - if (IS_ERR(pdev)) { - pr_err("Could not build omap_device for %s\n", - curr_dss_hwmod[i].oh_name); - - return PTR_ERR(pdev); - } - } - - /* Create devices for DPI and SDI */ - - pdev = create_simple_dss_pdev("omapdss_dpi", 0, - board_data, sizeof(*board_data), dss_pdev); - if (IS_ERR(pdev)) { - pr_err("Could not build platform_device for omapdss_dpi\n"); - return PTR_ERR(pdev); - } - - if (cpu_is_omap34xx()) { - pdev = create_simple_dss_pdev("omapdss_sdi", 0, - board_data, sizeof(*board_data), dss_pdev); - if (IS_ERR(pdev)) { - pr_err("Could not build platform_device for omapdss_sdi\n"); - return PTR_ERR(pdev); - } - } - - /* create DRM device */ - r = omap_init_drm(); - if (r < 0) { - pr_err("Unable to register omapdrm device\n"); - return r; - } - - /* create vrfb device */ - r = omap_init_vrfb(); - if (r < 0) { - pr_err("Unable to register omapvrfb device\n"); - return r; - } - - /* create FB device */ - r = omap_init_fb(); - if (r < 0) { - pr_err("Unable to register omapfb device\n"); - return r; - } - - /* create V4L2 display device */ - r = omap_init_vout(); - if (r < 0) { - pr_err("Unable to register omap_vout device\n"); - return r; - } - - return 0; -} - static void dispc_disable_outputs(void) { u32 v, irq_mask = 0; diff --git a/arch/arm/mach-omap2/display.h b/arch/arm/mach-omap2/display.h index 78f253005279..7375854b16c7 100644 --- a/arch/arm/mach-omap2/display.h +++ b/arch/arm/mach-omap2/display.h @@ -33,9 +33,4 @@ int omap_init_vout(void); struct device_node * __init omapdss_find_dss_of_node(void); -struct omap_dss_board_info; - -/* Init with the board info */ -int omap_display_init(struct omap_dss_board_info *board_data); - #endif From 7afa44e0e8dbf80e28e4f5aeaecf5ab6e5487f0d Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 14 Dec 2016 00:37:33 +0200 Subject: [PATCH 2/8] ARM: OMAP2+: Make the omapdss_find_dss_of_node() function static The omapdss_find_dss_of_node() function isn't used outside of its compilation unit, make it static. Signed-off-by: Laurent Pinchart Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/display.c | 2 +- arch/arm/mach-omap2/display.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 8bb3e5543ede..8fa01c0ecdb2 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c @@ -317,7 +317,7 @@ static const char * const omapdss_compat_names[] __initconst = { "ti,dra7-dss", }; -struct device_node * __init omapdss_find_dss_of_node(void) +static struct device_node * __init omapdss_find_dss_of_node(void) { struct device_node *node; int i; diff --git a/arch/arm/mach-omap2/display.h b/arch/arm/mach-omap2/display.h index 7375854b16c7..9a39646d4316 100644 --- a/arch/arm/mach-omap2/display.h +++ b/arch/arm/mach-omap2/display.h @@ -31,6 +31,4 @@ int omap_init_vrfb(void); int omap_init_fb(void); int omap_init_vout(void); -struct device_node * __init omapdss_find_dss_of_node(void); - #endif From 7e600cadda94fff4f984ffa6fff7b5438e518c05 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Mon, 2 Jan 2017 22:57:03 +0200 Subject: [PATCH 3/8] ARM: OMAP1: USB: tidy up logging output KERN_CONT/pr_cont is now required to continue log messages, use that. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/usb.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 2506e598a067..d4aa118f4ed6 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c @@ -95,17 +95,17 @@ omap_otg_init(struct omap_usb_config *config) printk("USB: hmc %d", config->hmc_mode); if (!alt_pingroup) - printk(", usb2 alt %d wires", config->pins[2]); + pr_cont(", usb2 alt %d wires", config->pins[2]); else if (config->pins[0]) - printk(", usb0 %d wires%s", config->pins[0], + pr_cont(", usb0 %d wires%s", config->pins[0], is_usb0_device(config) ? " (dev)" : ""); if (config->pins[1]) - printk(", usb1 %d wires", config->pins[1]); + pr_cont(", usb1 %d wires", config->pins[1]); if (!alt_pingroup && config->pins[2]) - printk(", usb2 %d wires", config->pins[2]); + pr_cont(", usb2 %d wires", config->pins[2]); if (config->otg) - printk(", Mini-AB on usb%d", config->otg - 1); - printk("\n"); + pr_cont(", Mini-AB on usb%d", config->otg - 1); + pr_cont("\n"); if (cpu_class_is_omap1()) { u16 w; @@ -573,13 +573,13 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config) printk("USB: hmc %d", config->hmc_mode); if (config->pins[0]) - printk(", usb0 %d wires%s", config->pins[0], + pr_cont(", usb0 %d wires%s", config->pins[0], is_usb0_device(config) ? " (dev)" : ""); if (config->pins[1]) - printk(", usb1 %d wires", config->pins[1]); + pr_cont(", usb1 %d wires", config->pins[1]); if (config->pins[2]) - printk(", usb2 %d wires", config->pins[2]); - printk("\n"); + pr_cont(", usb2 %d wires", config->pins[2]); + pr_cont("\n"); /* use DPLL for 48 MHz function clock */ pr_debug("APLL %04x DPLL %04x REQ %04x\n", omap_readw(ULPD_APLL_CTRL), From bde49e5928c5135047749363f40387dad5aa51bf Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Mon, 2 Jan 2017 22:57:04 +0200 Subject: [PATCH 4/8] ARM: OMAP1: USB: make omap_otg_init() static Make omap_otg_init() static. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/include/mach/usb.h | 2 -- arch/arm/mach-omap1/usb.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap1/include/mach/usb.h b/arch/arm/mach-omap1/include/mach/usb.h index a7c5559caef2..eb76628ff843 100644 --- a/arch/arm/mach-omap1/include/mach/usb.h +++ b/arch/arm/mach-omap1/include/mach/usb.h @@ -10,8 +10,6 @@ #include -void omap_otg_init(struct omap_usb_config *config); - #if IS_ENABLED(CONFIG_USB) void omap1_usb_init(struct omap_usb_config *pdata); #else diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index d4aa118f4ed6..0b4ed94c7b99 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c @@ -58,7 +58,7 @@ #ifdef CONFIG_ARCH_OMAP_OTG -void __init +static void __init omap_otg_init(struct omap_usb_config *config) { u32 syscon; @@ -166,7 +166,7 @@ omap_otg_init(struct omap_usb_config *config) } #else -void omap_otg_init(struct omap_usb_config *config) {} +static void omap_otg_init(struct omap_usb_config *config) {} #endif #if IS_ENABLED(CONFIG_USB_OMAP) From 4d94b4a239eec860701f0d2e07123a0ed5283a22 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Mon, 2 Jan 2017 22:57:05 +0200 Subject: [PATCH 5/8] ARM: OMAP1: USB: delete redundant CPU class checks Delete redundant CPU class checks. This code is only used on OMAP1 nowadays. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/usb.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 0b4ed94c7b99..455e2cf2866d 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c @@ -1,5 +1,5 @@ /* - * Platform level USB initialization for FS USB OTG controller on omap1 and 24xx + * Platform level USB initialization for FS USB OTG controller on omap1 * * Copyright (C) 2004 Texas Instruments, Inc. * @@ -63,6 +63,7 @@ omap_otg_init(struct omap_usb_config *config) { u32 syscon; int alt_pingroup = 0; + u16 w; /* NOTE: no bus or clock setup (yet?) */ @@ -87,9 +88,8 @@ omap_otg_init(struct omap_usb_config *config) if (config->otg) syscon |= OTG_EN; #endif - if (cpu_class_is_omap1()) - pr_debug("USB_TRANSCEIVER_CTRL = %03x\n", - omap_readl(USB_TRANSCEIVER_CTRL)); + pr_debug("USB_TRANSCEIVER_CTRL = %03x\n", + omap_readl(USB_TRANSCEIVER_CTRL)); pr_debug("OTG_SYSCON_2 = %08x\n", omap_readl(OTG_SYSCON_2)); omap_writel(syscon, OTG_SYSCON_2); @@ -107,19 +107,16 @@ omap_otg_init(struct omap_usb_config *config) pr_cont(", Mini-AB on usb%d", config->otg - 1); pr_cont("\n"); - if (cpu_class_is_omap1()) { - u16 w; + /* leave USB clocks/controllers off until needed */ + w = omap_readw(ULPD_SOFT_REQ); + w &= ~SOFT_USB_CLK_REQ; + omap_writew(w, ULPD_SOFT_REQ); - /* leave USB clocks/controllers off until needed */ - w = omap_readw(ULPD_SOFT_REQ); - w &= ~SOFT_USB_CLK_REQ; - omap_writew(w, ULPD_SOFT_REQ); + w = omap_readw(ULPD_CLOCK_CTRL); + w &= ~USB_MCLK_EN; + w |= DIS_USB_PVCI_CLK; + omap_writew(w, ULPD_CLOCK_CTRL); - w = omap_readw(ULPD_CLOCK_CTRL); - w &= ~USB_MCLK_EN; - w |= DIS_USB_PVCI_CLK; - omap_writew(w, ULPD_CLOCK_CTRL); - } syscon = omap_readl(OTG_SYSCON_1); syscon |= HST_IDLE_EN|DEV_IDLE_EN|OTG_IDLE_EN; From 57b6bfcf66d197003d7b72f3f85207a3dd7ade04 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 5 Jan 2017 13:41:01 -0800 Subject: [PATCH 6/8] MAINTAINERS: Add Aaro Koskinen as TI omap1 SoC co-maintainer Aaro has been doing a great job making sure mach-omap1 stays working with the mainline kernel. So let's add Aaro as omap1 co-maintainer to the MAINTAINERS file. Acked-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- MAINTAINERS | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index cfff2c9e3d94..51f5d6de4584 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8909,7 +8909,20 @@ M: Josh Poimboeuf S: Supported F: tools/objtool/ -OMAP SUPPORT +OMAP1 SUPPORT +M: Aaro Koskinen +M: Tony Lindgren +L: linux-omap@vger.kernel.org +Q: http://patchwork.kernel.org/project/linux-omap/list/ +T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git +S: Maintained +F: arch/arm/mach-omap1/ +F: arch/arm/plat-omap/ +F: arch/arm/configs/omap1_defconfig +F: drivers/i2c/busses/i2c-omap.c +F: include/linux/i2c-omap.h + +OMAP2+ SUPPORT M: Tony Lindgren L: linux-omap@vger.kernel.org W: http://www.muru.com/linux/omap/ @@ -8917,8 +8930,8 @@ W: http://linux.omap.com/ Q: http://patchwork.kernel.org/project/linux-omap/list/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git S: Maintained -F: arch/arm/*omap*/ -F: arch/arm/configs/omap1_defconfig +F: arch/arm/mach-omap2/ +F: arch/arm/plat-omap/ F: arch/arm/configs/omap2plus_defconfig F: drivers/i2c/busses/i2c-omap.c F: drivers/irqchip/irq-omap-intc.c From 8dd6666f4937d7cc94781771e1a8fc837fea84fb Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Fri, 20 Jan 2017 10:39:10 -0800 Subject: [PATCH 7/8] ARM: OMAP2+: omap_hwmod: Add support for earlycon Hwmod core tries to reset and idles each IP that is registered with hwmod. In case of earlycon, that specific uart IP cannot be reset or keep it in idle state else earlycon hangs once hwmod resets that uart IP. So add support to not reset uart that is being used as earlycon only if CONFIG_SERIAL_EARLYCON is enabled. Signed-off-by: Lokesh Vutla Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap_hwmod.c | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 759e1d45ba25..0ab29097a070 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -3248,6 +3248,36 @@ int __init omap_hwmod_setup_one(const char *oh_name) return 0; } +/** + * omap_hwmod_setup_earlycon_flags - set up flags for early console + * + * Enable DEBUG_OMAPUART_FLAGS for uart hwmod that is being used as + * early concole so that hwmod core doesn't reset and keep it in idle + * that specific uart. + */ +#ifdef CONFIG_SERIAL_EARLYCON +static void __init omap_hwmod_setup_earlycon_flags(void) +{ + struct device_node *np; + struct omap_hwmod *oh; + const char *uart; + + np = of_find_node_by_path("/chosen"); + if (np) { + uart = of_get_property(np, "stdout-path", NULL); + if (uart) { + np = of_find_node_by_path(uart); + if (np) { + uart = of_get_property(np, "ti,hwmods", NULL); + oh = omap_hwmod_lookup(uart); + if (oh) + oh->flags |= DEBUG_OMAPUART_FLAGS; + } + } + } +} +#endif + /** * omap_hwmod_setup_all - set up all registered IP blocks * @@ -3261,6 +3291,9 @@ static int __init omap_hwmod_setup_all(void) _ensure_mpu_hwmod_is_setup(NULL); omap_hwmod_for_each(_init, NULL); +#ifdef CONFIG_SERIAL_EARLYCON + omap_hwmod_setup_earlycon_flags(); +#endif omap_hwmod_for_each(_setup, NULL); return 0; From 8c4bc910633d942b4422e8b264c39a48e230a261 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 23 Jan 2017 22:04:03 +0000 Subject: [PATCH 8/8] ARM: OMAP: clock: Remove unused mpurate cmdline option The 'mpurate' option, historically used for specifying an initial MPU rate at boot, no longer has any effect due to the supporting code being removed as it was 'wrong and dangerous' [1]. This patch removes the remaining dead code associated with the __setup macros to avoid confusion and reduce bloat. [1] https://patchwork.kernel.org/patch/5954631/ Signed-off-by: Andrew Murray Acked-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/clock.c | 20 ------------ arch/arm/mach-omap1/clock.h | 2 -- arch/arm/mach-omap2/clock.c | 61 ------------------------------------- arch/arm/mach-omap2/clock.h | 4 --- 4 files changed, 87 deletions(-) diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 4f5fd4a084c0..43e3e188f521 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -720,26 +720,6 @@ EXPORT_SYMBOL(clk_get_parent); * OMAP specific clock functions shared between omap1 and omap2 */ -int __initdata mpurate; - -/* - * By default we use the rate set by the bootloader. - * You can override this with mpurate= cmdline option. - */ -static int __init omap_clk_setup(char *str) -{ - get_option(&str, &mpurate); - - if (!mpurate) - return 1; - - if (mpurate < 1000) - mpurate *= 1000000; - - return 1; -} -__setup("mpurate=", omap_clk_setup); - /* Used for clocks that always have same value as the parent clock */ unsigned long followparent_recalc(struct clk *clk) { diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h index 1e4918a3a5ee..f2d1be211723 100644 --- a/arch/arm/mach-omap1/clock.h +++ b/arch/arm/mach-omap1/clock.h @@ -173,8 +173,6 @@ struct clk_functions { void (*clk_disable_unused)(struct clk *clk); }; -extern int mpurate; - extern int clk_init(struct clk_functions *custom_clocks); extern void clk_preinit(struct clk *clk); extern int clk_register(struct clk *clk); diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index d058125876d8..1270afdcacdf 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -78,8 +78,6 @@ int __init omap2_clk_setup_ll_ops(void) * OMAP2+ specific clock functions */ -/* Private functions */ - /* Public functions */ /** @@ -112,65 +110,6 @@ void omap2_init_clk_clkdm(struct clk_hw *hw) } } -static int __initdata mpurate; - -/* - * By default we use the rate set by the bootloader. - * You can override this with mpurate= cmdline option. - */ -static int __init omap_clk_setup(char *str) -{ - get_option(&str, &mpurate); - - if (!mpurate) - return 1; - - if (mpurate < 1000) - mpurate *= 1000000; - - return 1; -} -__setup("mpurate=", omap_clk_setup); - -/** - * omap2_clk_print_new_rates - print summary of current clock tree rates - * @hfclkin_ck_name: clk name for the off-chip HF oscillator - * @core_ck_name: clk name for the on-chip CORE_CLK - * @mpu_ck_name: clk name for the ARM MPU clock - * - * Prints a short message to the console with the HFCLKIN oscillator - * rate, the rate of the CORE clock, and the rate of the ARM MPU clock. - * Called by the boot-time MPU rate switching code. XXX This is intended - * to be handled by the OPP layer code in the near future and should be - * removed from the clock code. No return value. - */ -void __init omap2_clk_print_new_rates(const char *hfclkin_ck_name, - const char *core_ck_name, - const char *mpu_ck_name) -{ - struct clk *hfclkin_ck, *core_ck, *mpu_ck; - unsigned long hfclkin_rate; - - mpu_ck = clk_get(NULL, mpu_ck_name); - if (WARN(IS_ERR(mpu_ck), "clock: failed to get %s.\n", mpu_ck_name)) - return; - - core_ck = clk_get(NULL, core_ck_name); - if (WARN(IS_ERR(core_ck), "clock: failed to get %s.\n", core_ck_name)) - return; - - hfclkin_ck = clk_get(NULL, hfclkin_ck_name); - if (WARN(IS_ERR(hfclkin_ck), "Failed to get %s.\n", hfclkin_ck_name)) - return; - - hfclkin_rate = clk_get_rate(hfclkin_ck); - - pr_info("Switched to new clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n", - (hfclkin_rate / 1000000), ((hfclkin_rate / 100000) % 10), - (clk_get_rate(core_ck) / 1000000), - (clk_get_rate(mpu_ck) / 1000000)); -} - /** * ti_clk_init_features - init clock features struct for the SoC * diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 67da640ba1c7..4e66295dca25 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -64,10 +64,6 @@ #define OMAP4XXX_EN_DPLL_FRBYPASS 0x6 #define OMAP4XXX_EN_DPLL_LOCKED 0x7 -void omap2_clk_print_new_rates(const char *hfclkin_ck_name, - const char *core_ck_name, - const char *mpu_ck_name); - extern u16 cpu_mask; extern const struct clkops clkops_omap2_dflt_wait;