diff for duplicates of <20121007015407.154476821@gmail.com> diff --git a/a/1.txt b/N1/1.txt index b55448c..0cc0138 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,3 +1,132 @@ -An embedded and charset-unspecified text was scrubbed... -Name: arm-bcm476x-add-stub-clock-driver.patch -URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121007/ef925fa1/attachment.ksh> +From: Domenico Andreoli <domenico.andreoli-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org> + +This is the minimal clock support required for the boot, a more complete +implementation will follow (shortly). + +Signed-off-by: Domenico Andreoli <domenico.andreoli-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org> +--- + arch/arm/mach-bcm476x/bcm476x.c | 3 ++ + drivers/clk/Makefile | 1 + + drivers/clk/clk-bcm476x.c | 52 ++++++++++++++++++++++++++++++++++++++++ + include/linux/clk/bcm476x.h | 22 +++++++++++++++++ + 4 files changed, 78 insertions(+) + create mode 100644 drivers/clk/clk-bcm476x.c + create mode 100644 include/linux/clk/bcm476x.h + +Index: b/arch/arm/mach-bcm476x/bcm476x.c +=================================================================== +--- a/arch/arm/mach-bcm476x/bcm476x.c ++++ b/arch/arm/mach-bcm476x/bcm476x.c +@@ -18,6 +18,7 @@ + #include <linux/of_irq.h> + #include <linux/of_platform.h> + #include <linux/bcm476x_timer.h> ++#include <linux/clk/bcm476x.h> + + #include <asm/hardware/vic.h> + #include <asm/mach/arch.h> +@@ -43,6 +44,8 @@ void __init bcm476x_init(void) + { + int ret; + ++ bcm476x_init_clocks(); ++ + ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + if (ret) { + pr_err("of_platform_populate failed: %d\n", ret); +Index: b/drivers/clk/Makefile +=================================================================== +--- a/drivers/clk/Makefile ++++ b/drivers/clk/Makefile +@@ -5,6 +5,7 @@ obj-$(CONFIG_COMMON_CLK) += clk.o clk-fi + clk-mux.o clk-divider.o clk-fixed-factor.o + # SoCs specific + obj-$(CONFIG_ARCH_BCM2835) += clk-bcm2835.o ++obj-$(CONFIG_ARCH_BCM476X) += clk-bcm476x.o + obj-$(CONFIG_ARCH_NOMADIK) += clk-nomadik.o + obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o + obj-$(CONFIG_ARCH_MXS) += mxs/ +Index: b/drivers/clk/clk-bcm476x.c +=================================================================== +--- /dev/null ++++ b/drivers/clk/clk-bcm476x.c +@@ -0,0 +1,52 @@ ++/* ++ * Broadcom BCM476x SoCs clocks ++ * ++ * Copyright (C) 2011-2012 Domenico Andreoli <domenico.andreoli-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#include <linux/clk.h> ++#include <linux/clk-private.h> ++#include <linux/clk-provider.h> ++#include <linux/clkdev.h> ++#include <linux/clk/bcm476x.h> ++ ++/* ++ * These are fixed clocks (and device tree doesn't support clk!). ++ * ++ * They're probably not all root clocks and it may be possible to ++ * turn them on and off but until this is mapped out better it's ++ * the only way they can be used. ++ */ ++DEFINE_CLK_FIXED_RATE(sys_pclk, CLK_IS_ROOT, 312000000, 0); ++DEFINE_CLK_FIXED_RATE(apb_pclk, CLK_IS_ROOT, 156000000, 0); ++DEFINE_CLK_FIXED_RATE(uart0_pclk, CLK_IS_ROOT, 78000000, 0); ++DEFINE_CLK_FIXED_RATE(uart1_pclk, CLK_IS_ROOT, 78000000, 0); ++DEFINE_CLK_FIXED_RATE(uart2_pclk, CLK_IS_ROOT, 78000000, 0); ++ ++static struct clk_lookup lookups[] = { ++ { .con_id = "sys_pclk", .clk = &sys_pclk }, ++ { .con_id = "apb_pclk", .clk = &apb_pclk }, ++ { .dev_id = "c0000.uart0", .clk = &uart0_pclk }, ++ { .dev_id = "c1000.uart1", .clk = &uart1_pclk }, ++ { .dev_id = "b2000.uart2", .clk = &uart2_pclk }, ++}; ++ ++void __init bcm476x_init_clocks(void) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(lookups); i++) { ++ __clk_init(NULL, lookups[i].clk); ++ clkdev_add(&lookups[i]); ++ } ++} +Index: b/include/linux/clk/bcm476x.h +=================================================================== +--- /dev/null ++++ b/include/linux/clk/bcm476x.h +@@ -0,0 +1,22 @@ ++/* ++ * Broadcom BCM476x SoCs clocks ++ * ++ * Copyright (C) 2011-2012 Domenico Andreoli <domenico.andreoli-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#ifndef __LINUX_CLK_BCM476X_H_ ++#define __LINUX_CLK_BCM476X_H_ ++ ++void __init bcm476x_init_clocks(void); ++ ++#endif diff --git a/a/content_digest b/N1/content_digest index 115a8a0..80ade19 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,12 +1,144 @@ "ref\020121007015300.828366635@gmail.com\0" - "From\0cavokz@gmail.com (Domenico Andreoli)\0" + "From\0Domenico Andreoli <cavokz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>\0" "Subject\0[PATCH 4/6] ARM: bcm476x: Add stub clock driver\0" "Date\0Sun, 07 Oct 2012 03:53:04 +0200\0" - "To\0linux-arm-kernel@lists.infradead.org\0" + "To\0linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org\0" + "Cc\0Domenico Andreoli <domenico.andreoli-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>" + " devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org\0" "\00:1\0" + "fn\0arm-bcm476x-add-stub-clock-driver.patch\0" "b\0" - "An embedded and charset-unspecified text was scrubbed...\n" - "Name: arm-bcm476x-add-stub-clock-driver.patch\n" - URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121007/ef925fa1/attachment.ksh> + "From: Domenico Andreoli <domenico.andreoli-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>\n" + "\n" + "This is the minimal clock support required for the boot, a more complete\n" + "implementation will follow (shortly).\n" + "\n" + "Signed-off-by: Domenico Andreoli <domenico.andreoli-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>\n" + "---\n" + " arch/arm/mach-bcm476x/bcm476x.c | 3 ++\n" + " drivers/clk/Makefile | 1 +\n" + " drivers/clk/clk-bcm476x.c | 52 ++++++++++++++++++++++++++++++++++++++++\n" + " include/linux/clk/bcm476x.h | 22 +++++++++++++++++\n" + " 4 files changed, 78 insertions(+)\n" + " create mode 100644 drivers/clk/clk-bcm476x.c\n" + " create mode 100644 include/linux/clk/bcm476x.h\n" + "\n" + "Index: b/arch/arm/mach-bcm476x/bcm476x.c\n" + "===================================================================\n" + "--- a/arch/arm/mach-bcm476x/bcm476x.c\n" + "+++ b/arch/arm/mach-bcm476x/bcm476x.c\n" + "@@ -18,6 +18,7 @@\n" + " #include <linux/of_irq.h>\n" + " #include <linux/of_platform.h>\n" + " #include <linux/bcm476x_timer.h>\n" + "+#include <linux/clk/bcm476x.h>\n" + " \n" + " #include <asm/hardware/vic.h>\n" + " #include <asm/mach/arch.h>\n" + "@@ -43,6 +44,8 @@ void __init bcm476x_init(void)\n" + " {\n" + " \tint ret;\n" + " \n" + "+\tbcm476x_init_clocks();\n" + "+\n" + " \tret = of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);\n" + " \tif (ret) {\n" + " \t\tpr_err(\"of_platform_populate failed: %d\\n\", ret);\n" + "Index: b/drivers/clk/Makefile\n" + "===================================================================\n" + "--- a/drivers/clk/Makefile\n" + "+++ b/drivers/clk/Makefile\n" + "@@ -5,6 +5,7 @@ obj-$(CONFIG_COMMON_CLK)\t+= clk.o clk-fi\n" + " \t\t\t\t clk-mux.o clk-divider.o clk-fixed-factor.o\n" + " # SoCs specific\n" + " obj-$(CONFIG_ARCH_BCM2835)\t+= clk-bcm2835.o\n" + "+obj-$(CONFIG_ARCH_BCM476X)\t+= clk-bcm476x.o\n" + " obj-$(CONFIG_ARCH_NOMADIK)\t+= clk-nomadik.o\n" + " obj-$(CONFIG_ARCH_HIGHBANK)\t+= clk-highbank.o\n" + " obj-$(CONFIG_ARCH_MXS)\t\t+= mxs/\n" + "Index: b/drivers/clk/clk-bcm476x.c\n" + "===================================================================\n" + "--- /dev/null\n" + "+++ b/drivers/clk/clk-bcm476x.c\n" + "@@ -0,0 +1,52 @@\n" + "+/*\n" + "+ * Broadcom BCM476x SoCs clocks\n" + "+ *\n" + "+ * Copyright (C) 2011-2012 Domenico Andreoli <domenico.andreoli-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>\n" + "+ *\n" + "+ * This program is free software; you can redistribute it and/or modify\n" + "+ * it under the terms of the GNU General Public License as published by\n" + "+ * the Free Software Foundation; either version 2 of the License, or\n" + "+ * (at your option) any later version.\n" + "+ *\n" + "+ * This program is distributed in the hope that it will be useful,\n" + "+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "+ * GNU General Public License for more details.\n" + "+ */\n" + "+\n" + "+#include <linux/clk.h>\n" + "+#include <linux/clk-private.h>\n" + "+#include <linux/clk-provider.h>\n" + "+#include <linux/clkdev.h>\n" + "+#include <linux/clk/bcm476x.h>\n" + "+\n" + "+/*\n" + "+ * These are fixed clocks (and device tree doesn't support clk!).\n" + "+ *\n" + "+ * They're probably not all root clocks and it may be possible to\n" + "+ * turn them on and off but until this is mapped out better it's\n" + "+ * the only way they can be used.\n" + "+ */\n" + "+DEFINE_CLK_FIXED_RATE(sys_pclk, CLK_IS_ROOT, 312000000, 0);\n" + "+DEFINE_CLK_FIXED_RATE(apb_pclk, CLK_IS_ROOT, 156000000, 0);\n" + "+DEFINE_CLK_FIXED_RATE(uart0_pclk, CLK_IS_ROOT, 78000000, 0);\n" + "+DEFINE_CLK_FIXED_RATE(uart1_pclk, CLK_IS_ROOT, 78000000, 0);\n" + "+DEFINE_CLK_FIXED_RATE(uart2_pclk, CLK_IS_ROOT, 78000000, 0);\n" + "+\n" + "+static struct clk_lookup lookups[] = {\n" + "+\t{ .con_id = \"sys_pclk\", .clk = &sys_pclk },\n" + "+\t{ .con_id = \"apb_pclk\", .clk = &apb_pclk },\n" + "+\t{ .dev_id = \"c0000.uart0\", .clk = &uart0_pclk },\n" + "+\t{ .dev_id = \"c1000.uart1\", .clk = &uart1_pclk },\n" + "+\t{ .dev_id = \"b2000.uart2\", .clk = &uart2_pclk },\n" + "+};\n" + "+\n" + "+void __init bcm476x_init_clocks(void)\n" + "+{\n" + "+\tint i;\n" + "+\n" + "+\tfor (i = 0; i < ARRAY_SIZE(lookups); i++) {\n" + "+\t\t__clk_init(NULL, lookups[i].clk);\n" + "+\t\tclkdev_add(&lookups[i]);\n" + "+\t}\n" + "+}\n" + "Index: b/include/linux/clk/bcm476x.h\n" + "===================================================================\n" + "--- /dev/null\n" + "+++ b/include/linux/clk/bcm476x.h\n" + "@@ -0,0 +1,22 @@\n" + "+/*\n" + "+ * Broadcom BCM476x SoCs clocks\n" + "+ *\n" + "+ * Copyright (C) 2011-2012 Domenico Andreoli <domenico.andreoli-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>\n" + "+ *\n" + "+ * This program is free software; you can redistribute it and/or modify\n" + "+ * it under the terms of the GNU General Public License as published by\n" + "+ * the Free Software Foundation; either version 2 of the License, or\n" + "+ * (at your option) any later version.\n" + "+ *\n" + "+ * This program is distributed in the hope that it will be useful,\n" + "+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "+ * GNU General Public License for more details.\n" + "+ */\n" + "+\n" + "+#ifndef __LINUX_CLK_BCM476X_H_\n" + "+#define __LINUX_CLK_BCM476X_H_\n" + "+\n" + "+void __init bcm476x_init_clocks(void);\n" + "+\n" + +#endif -6c8226935057661befdddf92a229ff69c2d9224e6fb1bb68769ac0aee76c4ede +46d4965e6ecb0b0510b7d9b06d6a57ee9dfa8adeae595bf1ec0d26e0fe886fb4
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.