mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Ciminaghi <ciminaghi@gnudd.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, rubini@gnudd.com, sameo@linux.intel.com,
	giancarlo.asnaghi@st.com, mturquette@linaro.org, arnd@arndb.de,
	linus.walleij@linaro.org, rob.herring@calxeda.com,
	broonie@opensource.wolfsonmicro.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] x86, pci sta2x11-fixup: add clk related field to struct sta2x11_instance
Date: Fri,  8 Mar 2013 16:31:29 +0100	[thread overview]
Message-ID: <1362756691-14736-2-git-send-email-ciminaghi@gnudd.com> (raw)
In-Reply-To: <1362756691-14736-1-git-send-email-ciminaghi@gnudd.com>

Use struct sta2x11_instance for storing a pointer to an array
of struct clk pointers representing the set of clocks belonging
to a single connext chip.

Since sta2x11_instance is an opaque type, we also add functions to
access the new field.

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
---
 arch/x86/include/asm/sta2x11.h |   16 ++++++++++++++++
 arch/x86/pci/sta2x11-fixup.c   |   14 ++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/arch/x86/include/asm/sta2x11.h b/arch/x86/include/asm/sta2x11.h
index e9d32df..2b5d8bc 100644
--- a/arch/x86/include/asm/sta2x11.h
+++ b/arch/x86/include/asm/sta2x11.h
@@ -5,8 +5,24 @@
 #define __ASM_STA2X11_H
 
 #include <linux/pci.h>
+#include <linux/clk.h>
 
 /* This needs to be called from the MFD to configure its sub-devices */
 struct sta2x11_instance *sta2x11_get_instance(struct pci_dev *pdev);
 
+/*
+ * Return instance id
+ */
+int sta2x11_get_instance_id(struct sta2x11_instance *instance);
+
+/*
+ * Add clks array to instance. This is called by clock common API
+ */
+void sta2x11_instance_add_clks(struct sta2x11_instance *, struct clk **);
+
+/*
+ * Returns clks array of instance. This is called by clock common API
+ */
+struct clk **sta2x11_instance_get_clks(struct sta2x11_instance *);
+
 #endif /* __ASM_STA2X11_H */
diff --git a/arch/x86/pci/sta2x11-fixup.c b/arch/x86/pci/sta2x11-fixup.c
index 9d8a509..478c228 100644
--- a/arch/x86/pci/sta2x11-fixup.c
+++ b/arch/x86/pci/sta2x11-fixup.c
@@ -27,6 +27,8 @@
 #include <linux/export.h>
 #include <linux/list.h>
 
+#include <asm/sta2x11.h>
+
 #define STA2X11_SWIOTLB_SIZE (4*1024*1024)
 extern int swiotlb_late_init_with_default_size(size_t default_size);
 
@@ -52,6 +54,7 @@ struct sta2x11_instance {
 	struct list_head list;
 	int bus0;
 	struct sta2x11_mapping map[STA2X11_NR_EP];
+	struct clk **clks;
 };
 
 static LIST_HEAD(sta2x11_instance_list);
@@ -78,6 +81,17 @@ static void sta2x11_new_instance(struct pci_dev *pdev)
 }
 DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_STMICRO, 0xcc17, sta2x11_new_instance);
 
+void sta2x11_instance_add_clks(struct sta2x11_instance *instance,
+			       struct clk **clks)
+{
+	instance->clks = clks;
+}
+
+struct clk **sta2x11_instance_get_clks(struct sta2x11_instance *instance)
+{
+	return instance->clks;
+}
+
 /*
  * Utility functions used in this file from below
  */
-- 
1.7.10.4


  reply	other threads:[~2013-03-08 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 15:31 [PATCH 0/3] sta2x11 common clock framework implementation Davide Ciminaghi
2013-03-08 15:31 ` Davide Ciminaghi [this message]
2013-03-08 15:31 ` [PATCH 2/3] x86, pci sta2x11-fixup: add function to access sta2x11 instance id Davide Ciminaghi
2013-03-08 16:13   ` Arnd Bergmann
2013-03-12  0:51     ` Davide Ciminaghi
2013-03-08 15:31 ` [PATCH 3/3] drivers/clk: sta2x11 common clock framework implementation Davide Ciminaghi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362756691-14736-2-git-send-email-ciminaghi@gnudd.com \
    --to=ciminaghi@gnudd.com \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=giancarlo.asnaghi@st.com \
    --cc=hpa@zytor.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mturquette@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=rubini@gnudd.com \
    --cc=sameo@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®