* [PATCH v4 1/4] rtc: OMAP: Add system pm_power_off to rtc driver
From: AnilKumar, Chimata @ 2013-01-11 9:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CA+Bv8XaZzWindjhYnXLaqq5mJ6X0Hq=C7NUxW3aK3eh-d6ghtg@mail.gmail.com>
On Fri, Jan 11, 2013 at 14:24:46, Russ Dill wrote:
> On Fri, Jan 11, 2013 at 12:08 AM, Russ Dill <russ.dill@gmail.com> wrote:
> > On Thu, Dec 13, 2012 at 10:03 PM, AnilKumar Ch <anilkumar@ti.com> wrote:
> >> From: Colin Foe-Parker <colin.foeparker@logicpd.com>
> >>
> >> Add system power off control to rtc driver which is the in-charge
> >> of controlling the BeagleBone system power. The power_off routine
> >> can be hooked up to "pm_power_off" system call.
> >>
> >> System power off sequence:-
> >> * Set PMIC STATUS_OFF when PMIC_POWER_EN is pulled low
> >> * Enable PMIC_POWER_EN in rtc module
> >> * Set rtc ALARM2 time
> >> * Enable ALARM2 interrupt
> >>
> >> Signed-off-by: Colin Foe-Parker <colin.foeparker@logicpd.com>
> >> [anilkumar at ti.com: move poweroff additions to rtc driver]
> >> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> >
> > Looks good
> >
> > Reviewed-by: Russ Dill <russ.dill@ti.com>
> > Acked-by: Russ Dill <russ.dill@ti.com>
>
> Sorry, actually, small follow up. Is there any reason this uses
> readl/writel in some places rather than rtc_read/rtc_write?
Hi Russ Dill,
Thanks for the review
At OMAP_RTC_PMIC_POWER_EN_EN, 32-bit value needs to modified so
readl/writel are used. While enabling the INTERRUPTS we can change
it to rtc_read/rtc_write but I am not seeing any advantage if we
do that apart from consistency.
Thanks
AnilKumar
>
> >> ---
> >> Documentation/devicetree/bindings/rtc/rtc-omap.txt | 5 ++
> >> drivers/rtc/rtc-omap.c | 74 +++++++++++++++++++-
> >> 2 files changed, 78 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
> >> index b47aa41..8d9f4f9 100644
> >> --- a/Documentation/devicetree/bindings/rtc/rtc-omap.txt
> >> +++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
> >> @@ -6,6 +6,10 @@ Required properties:
> >> - interrupts: rtc timer, alarm interrupts in order
> >> - interrupt-parent: phandle for the interrupt controller
> >>
> >> +Optional properties:
> >> +- ti,system-power-controller: Telling whether or not rtc is controlling
> >> + the system power.
> >> +
> >> Example:
> >>
> >> rtc at 1c23000 {
> >> @@ -14,4 +18,5 @@ rtc at 1c23000 {
> >> interrupts = <19
> >> 19>;
> >> interrupt-parent = <&intc>;
> >> + ti,system-power-controller;
> >> };
> >> diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
> >> index 6009714..e6d4878 100644
> >> --- a/drivers/rtc/rtc-omap.c
> >> +++ b/drivers/rtc/rtc-omap.c
> >> @@ -72,6 +72,14 @@
> >> #define OMAP_RTC_KICK0_REG 0x6c
> >> #define OMAP_RTC_KICK1_REG 0x70
> >>
> >> +#define OMAP_RTC_ALARM2_SECONDS_REG 0x80
> >> +#define OMAP_RTC_ALARM2_MINUTES_REG 0x84
> >> +#define OMAP_RTC_ALARM2_HOURS_REG 0x88
> >> +#define OMAP_RTC_ALARM2_DAYS_REG 0x8c
> >> +#define OMAP_RTC_ALARM2_MONTHS_REG 0x90
> >> +#define OMAP_RTC_ALARM2_YEARS_REG 0x94
> >> +#define OMAP_RTC_PMIC_REG 0x98
> >> +
> >> /* OMAP_RTC_CTRL_REG bit fields: */
> >> #define OMAP_RTC_CTRL_SPLIT (1<<7)
> >> #define OMAP_RTC_CTRL_DISABLE (1<<6)
> >> @@ -93,15 +101,21 @@
> >> #define OMAP_RTC_STATUS_BUSY (1<<0)
> >>
> >> /* OMAP_RTC_INTERRUPTS_REG bit fields: */
> >> +#define OMAP_RTC_INTERRUPTS_IT_ALARM2 (1<<4)
> >> #define OMAP_RTC_INTERRUPTS_IT_ALARM (1<<3)
> >> #define OMAP_RTC_INTERRUPTS_IT_TIMER (1<<2)
> >>
> >> +/* OMAP_RTC_PMIC_REG bit fields: */
> >> +#define OMAP_RTC_PMIC_POWER_EN_EN (1<<16)
> >> +
> >> /* OMAP_RTC_KICKER values */
> >> #define KICK0_VALUE 0x83e70b13
> >> #define KICK1_VALUE 0x95a4f1e0
> >>
> >> #define OMAP_RTC_HAS_KICKER 0x1
> >>
> >> +#define SHUTDOWN_TIME_SEC 2
> >> +
> >> static void __iomem *rtc_base;
> >>
> >> #define rtc_read(addr) readb(rtc_base + (addr))
> >> @@ -290,6 +304,56 @@ static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
> >> return 0;
> >> }
> >>
> >> +/*
> >> + * rtc_power_off: Set the pmic power off sequence. The RTC generates
> >> + * pmic_pwr_enable control, which can be used to control an external
> >> + * PMIC.
> >> + */
> >> +static void rtc_power_off(void)
> >> +{
> >> + u32 val;
> >> + struct rtc_time tm;
> >> + unsigned long time;
> >> +
> >> + /* Set PMIC power enable */
> >> + val = readl(rtc_base + OMAP_RTC_PMIC_REG);
> >> + writel(val | OMAP_RTC_PMIC_POWER_EN_EN, rtc_base + OMAP_RTC_PMIC_REG);
> >> +
> >> + /* Read rtc time */
> >> + omap_rtc_read_time(NULL, &tm);
> >> +
> >> + /* Convert Gregorian date to seconds since 01-01-1970 00:00:00 */
> >> + rtc_tm_to_time(&tm, &time);
> >> +
> >> + /* Add shutdown time to the current value */
> >> + time += SHUTDOWN_TIME_SEC;
> >> +
> >> + /* Convert seconds since 01-01-1970 00:00:00 to Gregorian date */
> >> + rtc_time_to_tm(time, &tm);
> >> +
> >> + if (tm2bcd(&tm) < 0)
> >> + return;
> >> +
> >> + pr_info("System will go to power_off state in approx. %d secs\n",
> >> + SHUTDOWN_TIME_SEC);
> >> +
> >> + /*
> >> + * pmic_pwr_enable is controlled by means of ALARM2 event. So here
> >> + * programming alarm2 expiry time and enabling alarm2 interrupt
> >> + */
> >> + rtc_write(tm.tm_sec, OMAP_RTC_ALARM2_SECONDS_REG);
> >> + rtc_write(tm.tm_min, OMAP_RTC_ALARM2_MINUTES_REG);
> >> + rtc_write(tm.tm_hour, OMAP_RTC_ALARM2_HOURS_REG);
> >> + rtc_write(tm.tm_mday, OMAP_RTC_ALARM2_DAYS_REG);
> >> + rtc_write(tm.tm_mon, OMAP_RTC_ALARM2_MONTHS_REG);
> >> + rtc_write(tm.tm_year, OMAP_RTC_ALARM2_YEARS_REG);
> >> +
> >> + /* Enable alarm2 interrupt */
> >> + val = readl(rtc_base + OMAP_RTC_INTERRUPTS_REG);
> >> + writel(val | OMAP_RTC_INTERRUPTS_IT_ALARM2,
> >> + rtc_base + OMAP_RTC_INTERRUPTS_REG);
> >> +}
> >> +
> >> static struct rtc_class_ops omap_rtc_ops = {
> >> .read_time = omap_rtc_read_time,
> >> .set_time = omap_rtc_set_time,
> >> @@ -327,12 +391,16 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
> >> struct resource *res, *mem;
> >> struct rtc_device *rtc;
> >> u8 reg, new_ctrl;
> >> + bool pm_off = false;
> >> const struct platform_device_id *id_entry;
> >> const struct of_device_id *of_id;
> >>
> >> of_id = of_match_device(omap_rtc_of_match, &pdev->dev);
> >> - if (of_id)
> >> + if (of_id) {
> >> pdev->id_entry = of_id->data;
> >> + pm_off = of_property_read_bool(pdev->dev.of_node,
> >> + "ti,system-power-controller");
> >> + }
> >>
> >> omap_rtc_timer = platform_get_irq(pdev, 0);
> >> if (omap_rtc_timer <= 0) {
> >> @@ -385,6 +453,10 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
> >> platform_set_drvdata(pdev, rtc);
> >> dev_set_drvdata(&rtc->dev, mem);
> >>
> >> + /* RTC power off */
> >> + if (pm_off && !pm_power_off)
> >> + pm_power_off = rtc_power_off;
> >> +
> >> /* clear pending irqs, and set 1/second periodic,
> >> * which we'll use instead of update irqs
> >> */
> >> --
> >> 1.7.9.5
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> >> the body of a message to majordomo at vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* [PATCH] usb: phy: samsung: Add support to set pmu isolation
From: Sylwester Nawrocki @ 2013-01-11 9:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357891738-26259-1-git-send-email-gautam.vivek@samsung.com>
On 01/11/2013 09:08 AM, Vivek Gautam wrote:
> Adding support to parse device node data in order to get
> required properties to set pmu isolation for usb-phy.
>
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Thanks for addressing my all comments,
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
^ permalink raw reply
* [PATCH 1/2 V3] iio: mxs: Implement support for touchscreen
From: Marek Vasut @ 2013-01-11 9:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50EFCDF2.7090207@bluegiga.com>
Dear Lauri Hintsala,
> Hi,
>
> On 01/11/2013 01:43 AM, Marek Vasut wrote:
> > This patch implements support for sampling of a touchscreen into
> > the MXS LRADC driver. The LRADC block allows configuring some of
> > it's channels into special mode where they either output the drive
> > voltage or sample it, allowing it to operate a 4-wire or 5-wire
> > resistive touchscreen.
> >
> > In case the touchscreen mode is enabled, the LRADC slot #7 is
> > reserved for touchscreen only, therefore it is not possible to
> > sample 8 LRADC channels at time, but only 7 channels.
> >
> > The touchscreen controller is configured such that the PENDOWN event
> > disables touchscreen interrupts and triggers execution of worker
> > thread, which then polls the touchscreen controller for X, Y and
> > Pressure values. This reduces the overhead of interrupt-driven
> > operation. Upon the PENUP event, the worker thread re-enables the
> > PENDOWN detection interrupt and exits.
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: Fabio Estevam <fabio.estevam@freescale.com>
> > Cc: Jonathan Cameron <jic23@kernel.org>
> > Cc: Shawn Guo <shawn.guo@linaro.org>
> > ---
> >
> > .../bindings/staging/iio/adc/mxs-lradc.txt | 6 +
> > drivers/staging/iio/adc/mxs-lradc.c | 473
> > +++++++++++++++++++- 2 files changed, 455 insertions(+), 24
> > deletions(-)
>
> Works fine with apx4devkit.
>
> Tested-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Thanks Lauri :)
Best regards,
Marek Vasut
^ permalink raw reply
* [PATCH v4 1/4] rtc: OMAP: Add system pm_power_off to rtc driver
From: Russ Dill @ 2013-01-11 8:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CA+Bv8XbfkdhZKXtve4VF6uxZB9rw=wj5tda9OxmSByM9k7wa3w@mail.gmail.com>
On Fri, Jan 11, 2013 at 12:08 AM, Russ Dill <russ.dill@gmail.com> wrote:
> On Thu, Dec 13, 2012 at 10:03 PM, AnilKumar Ch <anilkumar@ti.com> wrote:
>> From: Colin Foe-Parker <colin.foeparker@logicpd.com>
>>
>> Add system power off control to rtc driver which is the in-charge
>> of controlling the BeagleBone system power. The power_off routine
>> can be hooked up to "pm_power_off" system call.
>>
>> System power off sequence:-
>> * Set PMIC STATUS_OFF when PMIC_POWER_EN is pulled low
>> * Enable PMIC_POWER_EN in rtc module
>> * Set rtc ALARM2 time
>> * Enable ALARM2 interrupt
>>
>> Signed-off-by: Colin Foe-Parker <colin.foeparker@logicpd.com>
>> [anilkumar at ti.com: move poweroff additions to rtc driver]
>> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
>
> Looks good
>
> Reviewed-by: Russ Dill <russ.dill@ti.com>
> Acked-by: Russ Dill <russ.dill@ti.com>
Sorry, actually, small follow up. Is there any reason this uses
readl/writel in some places rather than rtc_read/rtc_write?
>> ---
>> Documentation/devicetree/bindings/rtc/rtc-omap.txt | 5 ++
>> drivers/rtc/rtc-omap.c | 74 +++++++++++++++++++-
>> 2 files changed, 78 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
>> index b47aa41..8d9f4f9 100644
>> --- a/Documentation/devicetree/bindings/rtc/rtc-omap.txt
>> +++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
>> @@ -6,6 +6,10 @@ Required properties:
>> - interrupts: rtc timer, alarm interrupts in order
>> - interrupt-parent: phandle for the interrupt controller
>>
>> +Optional properties:
>> +- ti,system-power-controller: Telling whether or not rtc is controlling
>> + the system power.
>> +
>> Example:
>>
>> rtc at 1c23000 {
>> @@ -14,4 +18,5 @@ rtc at 1c23000 {
>> interrupts = <19
>> 19>;
>> interrupt-parent = <&intc>;
>> + ti,system-power-controller;
>> };
>> diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
>> index 6009714..e6d4878 100644
>> --- a/drivers/rtc/rtc-omap.c
>> +++ b/drivers/rtc/rtc-omap.c
>> @@ -72,6 +72,14 @@
>> #define OMAP_RTC_KICK0_REG 0x6c
>> #define OMAP_RTC_KICK1_REG 0x70
>>
>> +#define OMAP_RTC_ALARM2_SECONDS_REG 0x80
>> +#define OMAP_RTC_ALARM2_MINUTES_REG 0x84
>> +#define OMAP_RTC_ALARM2_HOURS_REG 0x88
>> +#define OMAP_RTC_ALARM2_DAYS_REG 0x8c
>> +#define OMAP_RTC_ALARM2_MONTHS_REG 0x90
>> +#define OMAP_RTC_ALARM2_YEARS_REG 0x94
>> +#define OMAP_RTC_PMIC_REG 0x98
>> +
>> /* OMAP_RTC_CTRL_REG bit fields: */
>> #define OMAP_RTC_CTRL_SPLIT (1<<7)
>> #define OMAP_RTC_CTRL_DISABLE (1<<6)
>> @@ -93,15 +101,21 @@
>> #define OMAP_RTC_STATUS_BUSY (1<<0)
>>
>> /* OMAP_RTC_INTERRUPTS_REG bit fields: */
>> +#define OMAP_RTC_INTERRUPTS_IT_ALARM2 (1<<4)
>> #define OMAP_RTC_INTERRUPTS_IT_ALARM (1<<3)
>> #define OMAP_RTC_INTERRUPTS_IT_TIMER (1<<2)
>>
>> +/* OMAP_RTC_PMIC_REG bit fields: */
>> +#define OMAP_RTC_PMIC_POWER_EN_EN (1<<16)
>> +
>> /* OMAP_RTC_KICKER values */
>> #define KICK0_VALUE 0x83e70b13
>> #define KICK1_VALUE 0x95a4f1e0
>>
>> #define OMAP_RTC_HAS_KICKER 0x1
>>
>> +#define SHUTDOWN_TIME_SEC 2
>> +
>> static void __iomem *rtc_base;
>>
>> #define rtc_read(addr) readb(rtc_base + (addr))
>> @@ -290,6 +304,56 @@ static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
>> return 0;
>> }
>>
>> +/*
>> + * rtc_power_off: Set the pmic power off sequence. The RTC generates
>> + * pmic_pwr_enable control, which can be used to control an external
>> + * PMIC.
>> + */
>> +static void rtc_power_off(void)
>> +{
>> + u32 val;
>> + struct rtc_time tm;
>> + unsigned long time;
>> +
>> + /* Set PMIC power enable */
>> + val = readl(rtc_base + OMAP_RTC_PMIC_REG);
>> + writel(val | OMAP_RTC_PMIC_POWER_EN_EN, rtc_base + OMAP_RTC_PMIC_REG);
>> +
>> + /* Read rtc time */
>> + omap_rtc_read_time(NULL, &tm);
>> +
>> + /* Convert Gregorian date to seconds since 01-01-1970 00:00:00 */
>> + rtc_tm_to_time(&tm, &time);
>> +
>> + /* Add shutdown time to the current value */
>> + time += SHUTDOWN_TIME_SEC;
>> +
>> + /* Convert seconds since 01-01-1970 00:00:00 to Gregorian date */
>> + rtc_time_to_tm(time, &tm);
>> +
>> + if (tm2bcd(&tm) < 0)
>> + return;
>> +
>> + pr_info("System will go to power_off state in approx. %d secs\n",
>> + SHUTDOWN_TIME_SEC);
>> +
>> + /*
>> + * pmic_pwr_enable is controlled by means of ALARM2 event. So here
>> + * programming alarm2 expiry time and enabling alarm2 interrupt
>> + */
>> + rtc_write(tm.tm_sec, OMAP_RTC_ALARM2_SECONDS_REG);
>> + rtc_write(tm.tm_min, OMAP_RTC_ALARM2_MINUTES_REG);
>> + rtc_write(tm.tm_hour, OMAP_RTC_ALARM2_HOURS_REG);
>> + rtc_write(tm.tm_mday, OMAP_RTC_ALARM2_DAYS_REG);
>> + rtc_write(tm.tm_mon, OMAP_RTC_ALARM2_MONTHS_REG);
>> + rtc_write(tm.tm_year, OMAP_RTC_ALARM2_YEARS_REG);
>> +
>> + /* Enable alarm2 interrupt */
>> + val = readl(rtc_base + OMAP_RTC_INTERRUPTS_REG);
>> + writel(val | OMAP_RTC_INTERRUPTS_IT_ALARM2,
>> + rtc_base + OMAP_RTC_INTERRUPTS_REG);
>> +}
>> +
>> static struct rtc_class_ops omap_rtc_ops = {
>> .read_time = omap_rtc_read_time,
>> .set_time = omap_rtc_set_time,
>> @@ -327,12 +391,16 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
>> struct resource *res, *mem;
>> struct rtc_device *rtc;
>> u8 reg, new_ctrl;
>> + bool pm_off = false;
>> const struct platform_device_id *id_entry;
>> const struct of_device_id *of_id;
>>
>> of_id = of_match_device(omap_rtc_of_match, &pdev->dev);
>> - if (of_id)
>> + if (of_id) {
>> pdev->id_entry = of_id->data;
>> + pm_off = of_property_read_bool(pdev->dev.of_node,
>> + "ti,system-power-controller");
>> + }
>>
>> omap_rtc_timer = platform_get_irq(pdev, 0);
>> if (omap_rtc_timer <= 0) {
>> @@ -385,6 +453,10 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
>> platform_set_drvdata(pdev, rtc);
>> dev_set_drvdata(&rtc->dev, mem);
>>
>> + /* RTC power off */
>> + if (pm_off && !pm_power_off)
>> + pm_power_off = rtc_power_off;
>> +
>> /* clear pending irqs, and set 1/second periodic,
>> * which we'll use instead of update irqs
>> */
>> --
>> 1.7.9.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH 2/2] arm: make return_address available for ARM_UNWIND
From: Keun-O Park @ 2013-01-11 8:53 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357566094.10284.83.camel@gandalf.local.home>
On Mon, Jan 7, 2013 at 10:41 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Fri, 2013-01-04 at 17:45 +0900, Keun-O Park wrote:
>
> > With "CFLAGS_REMOVE_unwind.o = -pg" and with CONFIG_PROVE_LOCKING
> > turned on, I confirmed that
> > there's no trace output like Steve mentioned.
> > However, if I turn off CONFIG_PROVE_LOCKING, "irqsoff" and
> > "preemptirqsoff" ftracer prints these lines :
> >
> > kernel_text_address <-unwind_frame
> > core_kernel_text <-unwind_frame
> > search_index <-unwind_frame
> >
> > While I investigated the reason, I just found out there's two function
> > with same name, trace_hardirqs_off.
> > One in kernel/trace/trace_irqsoff.c and another in kernel/lockdep.c.
> > And both symbols are exported.
> > I am wondering whether it is intentionally maintained code to
> > manipulate ftrace and lockdep or not.
> > I guess it's probably not.
>
> Both the irqsoff tracer from ftrace and lockdep came from the -rt patch.
> The two were very integrated at the time. When they were ported over to
> mainline, they still used the same infrastructure to hook into the
> locations of interrupts being disabled or enabled.
>
> trace_hardirqs_on/off() is the function that is called for both lockdep
> and ftrace's irqsoff tracer. So this was intentional. That way we didn't
> need to have two different callers at every location. But if lockdep
> isn't defined and ftrace irqsoff is, then ftrace would define the
> trace_hardirqs_on/off() routines, otherwise lockdep does. (These
> routines are within CONFIG_PROVE_LOCKING #ifdefs in
> kernel/trace/trace_irqsoff.c)
>
> When both lockdep and irqsoff tracer are configured, then lockdep
> defines the trace_hardirqs_off_caller(), and calls time_hardirqs_off()
> in trace_irqsoff.c which does the same thing as the trace_hardirqs_off()
> does without lockdep.
>
> I'm not sure why one would add the annotations while adding
> PROVE_LOCKING doesn't. They both seems to use CALLER_ADDR0, but maybe
> there's another path that uses CALLER_ADDR1 without it.
>
> -- Steve
>
>
Hello Steve,
Much obliged for your explaining this.
As your guess, there's another path that uses CALLER_ADDR1 without
CONFIG_PROVE_LOCKING though both lockdep and ftrace's irqsoff tracer
is turned on. In this case, ftrace's trace_hardirqs_on/off() would be
called.
And, as you said to me, if lockdep is off and ftrace's irqsoff is on,
ftrace's trace_hardirqs_on/off() would be called.
I think the proper way to avoid calling CALLER_ADDR1 will be calling
trace_hardirqs_off_caller() instead of calling stop_critical_timing()
directly in trace_hardirqs_off(). And, this will suppress the message
outputs of unwind_frame.
If you think this idea is okay, I will push the patch v2 to you.
In my test result, it looks it's functionally correct.
Thanks.
-- kpark
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index f89515a..3552ad9 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -32,13 +32,11 @@ extern void ftrace_call_old(void);
#ifndef __ASSEMBLY__
-#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
+#if defined(CONFIG_FRAME_POINTER) || defined(CONFIG_ARM_UNWIND)
/*
* return_address uses walk_stackframe to do it's work. If both
* CONFIG_FRAME_POINTER=y and CONFIG_ARM_UNWIND=y walk_stackframe uses unwind
- * information. For this to work in the function tracer many functions would
- * have to be marked with __notrace. So for now just depend on
- * !CONFIG_ARM_UNWIND.
+ * information.
*/
void *return_address(unsigned int);
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 5bbec7b..675fd62 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -9,6 +9,9 @@ ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_ftrace.o = -pg
CFLAGS_REMOVE_insn.o = -pg
CFLAGS_REMOVE_patch.o = -pg
+ifdef CONFIG_ARM_UNWIND
+CFLAGS_REMOVE_unwind.o = -pg
+endif
endif
CFLAGS_REMOVE_return_address.o = -pg
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index fafedd8..f202bc0 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -11,7 +11,7 @@
#include <linux/export.h>
#include <linux/ftrace.h>
-#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
+#if defined(CONFIG_FRAME_POINTER) || defined(CONFIG_ARM_UNWIND)
#include <linux/sched.h>
#include <asm/stacktrace.h>
@@ -57,17 +57,13 @@ void *return_address(unsigned int level)
return NULL;
}
-#else /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */
-
-#if defined(CONFIG_ARM_UNWIND)
-#warning "TODO: return_address should use unwind tables"
-#endif
+#else /* CONFIG_FRAME_POINTER || CONFIG_ARM_UNWIND */
void *return_address(unsigned int level)
{
return NULL;
}
-#endif /* if defined(CONFIG_FRAME_POINTER) &&
!defined(CONFIG_ARM_UNWIND) / else */
+#endif /* CONFIG_FRAME_POINTER || CONFIG_ARM_UNWIND */
EXPORT_SYMBOL_GPL(return_address);
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c
index 00f79e5..aab144b 100644
--- a/arch/arm/kernel/stacktrace.c
+++ b/arch/arm/kernel/stacktrace.c
@@ -6,6 +6,9 @@
#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
/*
+ * If both CONFIG_FRAME_POINTER=y and CONFIG_ARM_UNWIND=y walk_stackframe uses
+ * unwind information. So for now just depend on !CONFIG_ARM_UNWIND.
+ *
* Unwind the current stack frame and store the new register values in the
* structure passed as argument. Unwinding is equivalent to a function return,
* hence the new PC value rather than LR should be used for backtrace.
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c
index 713a2ca..6f207ed 100644
--- a/kernel/trace/trace_irqsoff.c
+++ b/kernel/trace/trace_irqsoff.c
@@ -483,20 +483,6 @@ inline void print_irqtrace_events(struct task_struct *curr)
/*
* We are only interested in hardirq on/off events:
*/
-void trace_hardirqs_on(void)
-{
- if (!preempt_trace() && irq_trace())
- stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1);
-}
-EXPORT_SYMBOL(trace_hardirqs_on);
-
-void trace_hardirqs_off(void)
-{
- if (!preempt_trace() && irq_trace())
- start_critical_timing(CALLER_ADDR0, CALLER_ADDR1);
-}
-EXPORT_SYMBOL(trace_hardirqs_off);
-
void trace_hardirqs_on_caller(unsigned long caller_addr)
{
if (!preempt_trace() && irq_trace())
@@ -504,6 +490,12 @@ void trace_hardirqs_on_caller(unsigned long caller_addr)
}
EXPORT_SYMBOL(trace_hardirqs_on_caller);
+void trace_hardirqs_on(void)
+{
+ trace_hardirqs_on_caller(CALLER_ADDR0);
+}
+EXPORT_SYMBOL(trace_hardirqs_on);
+
void trace_hardirqs_off_caller(unsigned long caller_addr)
{
if (!preempt_trace() && irq_trace())
@@ -511,6 +503,12 @@ void trace_hardirqs_off_caller(unsigned long caller_addr)
}
EXPORT_SYMBOL(trace_hardirqs_off_caller);
+void trace_hardirqs_off(void)
+{
+ trace_hardirqs_off_caller(CALLER_ADDR0);
+}
+EXPORT_SYMBOL(trace_hardirqs_off);
+
#endif /* CONFIG_PROVE_LOCKING */
#endif /* CONFIG_IRQSOFF_TRACER */
^ permalink raw reply related
* [PATCH 3/3] ARM: exynos5: Add clock save and restore
From: Prasanna Kumar @ 2013-01-11 8:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130109135344.GK3931@n2100.arm.linux.org.uk>
Hi Russell King ,
Thanks for your review comments.
I will address them soon.
--
Thanks
Prasanna Kumar
^ permalink raw reply
* [PATCH 1/2 V3] iio: mxs: Implement support for touchscreen
From: Lauri Hintsala @ 2013-01-11 8:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357861431-8978-1-git-send-email-marex@denx.de>
Hi,
On 01/11/2013 01:43 AM, Marek Vasut wrote:
> This patch implements support for sampling of a touchscreen into
> the MXS LRADC driver. The LRADC block allows configuring some of
> it's channels into special mode where they either output the drive
> voltage or sample it, allowing it to operate a 4-wire or 5-wire
> resistive touchscreen.
>
> In case the touchscreen mode is enabled, the LRADC slot #7 is
> reserved for touchscreen only, therefore it is not possible to
> sample 8 LRADC channels at time, but only 7 channels.
>
> The touchscreen controller is configured such that the PENDOWN event
> disables touchscreen interrupts and triggers execution of worker
> thread, which then polls the touchscreen controller for X, Y and
> Pressure values. This reduces the overhead of interrupt-driven
> operation. Upon the PENUP event, the worker thread re-enables the
> PENDOWN detection interrupt and exits.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> ---
> .../bindings/staging/iio/adc/mxs-lradc.txt | 6 +
> drivers/staging/iio/adc/mxs-lradc.c | 473 +++++++++++++++++++-
> 2 files changed, 455 insertions(+), 24 deletions(-)
Works fine with apx4devkit.
Tested-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Best Regards,
Lauri Hintsala
^ permalink raw reply
* [PATCH 2/3] ARM: Orion: Bind the orion bridge interrupt controller through DT
From: Thomas Petazzoni @ 2013-01-11 8:13 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130111040219.GA23206@obsidianresearch.com>
Dear Jason Gunthorpe,
On Thu, 10 Jan 2013 21:02:19 -0700, Jason Gunthorpe wrote:
> I've attached the main mv dt patch as a MIME, sorry for the
> awkwardness, I am travelling and won't be available... Please feel
> free to re-post/alter as necessary. As I said before, I'm not happy
> with it because it doesn't follow the standard convention for MDIO
> phys.
The MDIO registers for the mv643xx_eth hardware are the same as the
ones for the mvneta hardware. Therefore, I've splitted this into the
mvmdio driver (available in mainline since 3.8,
drivers/net/ethernet/marvell). This allows to have a nicely separated
driver for the MDIO interface.
My plan was ultimately to modify the mv643xx_eth driver to use the
mvmdio driver, and then do a nice DT binding on top of that.
Does this sounds like a good plan?
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [PATCH v3 0/9] Migrate Tegra to common clock framework
From: Prashant Gaikwad @ 2013-01-11 8:12 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50EDAA39.3040609@wwwdotorg.org>
On Wednesday 09 January 2013 11:04 PM, Stephen Warren wrote:
> On 01/09/2013 03:59 AM, Prashant Gaikwad wrote:
>> On Wednesday 09 January 2013 02:31 AM, Stephen Warren wrote:
>>> On 01/08/2013 11:49 AM, Stephen Warren wrote:
>>>> On 01/08/2013 06:19 AM, Prashant Gaikwad wrote:
>>>>> On Tuesday 08 January 2013 05:40 AM, Stephen Warren wrote:
>>>>>> On 01/04/2013 10:22 AM, Stephen Warren wrote:
>>>>>>> On 01/04/2013 02:40 AM, Prashant Gaikwad wrote:
>>>>>>>> This patchset does following:
>>>>>>>> 1. Decompose single tegra clock structure into multiple clocks.
>>>>>>>> 2. Try to use standard clock types supported by common clock
>>>>>>>> framework.
>>>>>>>> 3. Use dynamic initialization.
>>>>>>>> 4. Move all clock code to drivers/clk/tegra from mach-tegra.
>>>>>>>> 5. Add device tree support for Tegra20 and Tegra30 clocks.
>>>>>>>> 6. Remove all legacy clock code from mach-tegra.
>>>>>>> I think there are bugs here. I applied all your clock patches on
>>>>>>> top of
>>>>>>> Tegra's for-next (see list below), and found that the following don't
>>>>>>> work on Springbank:
>>>>>>>
>>>>>>> * HDMI display
>>>>>>> * Audio playback
>>>>>>> * WiFi
>>>>>> (BTW, I stopped Cc'ing linux-kernel@, but added linux-tegra@
>>>>>> instead...)
>>>>>>
>>>>>> Prashant, some updated testing results based off the "dev/ccf" branch
>>>>>> you sent me on our internal git server:
>>>> ...
>>>>> I have updated the internal branch with all the above mentioned fixes.
>>> ...
>>>> The remaining item is the display issue on Tegra30, which I'll go look
>>>> at now.
>>> The USB3 clock, which isn't used by any drivers on Tegra30, and hence
>>> was disabled at boot, was set up incorrectly and ended up mapping to the
>>> disp1 clock, and hence turned off the display. The following fixes it:
>> Stephen, thanks for the fix!! I have included this and PLLE fix; updated
>> internal branch.
> Almost everything works great now.
Great!!
> However, I don't see any fix for the PLLE issue in the code; if there is
> one it certainly doesn't work. Applying my previous hack makes it work.
There is some difference between Tegra20 and Tegra30 PLLE implementation.
Fixed in latest patches sent.
> FYI, the branch I tested with is at
> git://nv-tegra.nvidia.com/user/swarren/linux-2.6 test-ccf-rework-2
>
> It's rebased onto the latest Tegra for-next.
^ permalink raw reply
* [PATCH v3 0/9] Migrate Tegra to common clock framework
From: Prashant Gaikwad @ 2013-01-11 8:10 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50EDD693.2060905@wwwdotorg.org>
On Thursday 10 January 2013 02:14 AM, Stephen Warren wrote:
> On 01/09/2013 10:34 AM, Stephen Warren wrote:
>> On 01/09/2013 03:59 AM, Prashant Gaikwad wrote:
>>> On Wednesday 09 January 2013 02:31 AM, Stephen Warren wrote:
>>>> On 01/08/2013 11:49 AM, Stephen Warren wrote:
>>>>> On 01/08/2013 06:19 AM, Prashant Gaikwad wrote:
>>>>>> On Tuesday 08 January 2013 05:40 AM, Stephen Warren wrote:
>>>>>>> On 01/04/2013 10:22 AM, Stephen Warren wrote:
>>>>>>>> On 01/04/2013 02:40 AM, Prashant Gaikwad wrote:
>>>>>>>>> This patchset does following:
>>>>>>>>> 1. Decompose single tegra clock structure into multiple clocks.
>>>>>>>>> 2. Try to use standard clock types supported by common clock
>>>>>>>>> framework.
>>>>>>>>> 3. Use dynamic initialization.
>>>>>>>>> 4. Move all clock code to drivers/clk/tegra from mach-tegra.
>>>>>>>>> 5. Add device tree support for Tegra20 and Tegra30 clocks.
>>>>>>>>> 6. Remove all legacy clock code from mach-tegra.
>>>>>>>> I think there are bugs here. I applied all your clock patches on
>>>>>>>> top of
>>>>>>>> Tegra's for-next (see list below), and found that the following don't
>>>>>>>> work on Springbank:
>>>>>>>>
>>>>>>>> * HDMI display
>>>>>>>> * Audio playback
>>>>>>>> * WiFi
>>>>>>> (BTW, I stopped Cc'ing linux-kernel@, but added linux-tegra@
>>>>>>> instead...)
>>>>>>>
>>>>>>> Prashant, some updated testing results based off the "dev/ccf" branch
>>>>>>> you sent me on our internal git server:
>>>>> ...
>>>>>> I have updated the internal branch with all the above mentioned fixes.
>>>> ...
>>>>> The remaining item is the display issue on Tegra30, which I'll go look
>>>>> at now.
>>>> The USB3 clock, which isn't used by any drivers on Tegra30, and hence
>>>> was disabled at boot, was set up incorrectly and ended up mapping to the
>>>> disp1 clock, and hence turned off the display. The following fixes it:
>>> Stephen, thanks for the fix!! I have included this and PLLE fix; updated
>>> internal branch.
>> Almost everything works great now.
> I noticed a couple more issues.
>
> First, the clock rate rounding behaviour changes with your patch series
> for at least the I2C clocks.
>
> With I2C, you specify how fast you want the bus to go. The bus shouldn't
> run any faster than that since the rate matches the max specification
> for the attached devices. So the clock framework should pick the
> smallest divider that yields a clock that doesn't exceed the request
> from clk_set_rate(). However, the new code seems to pick the smallest
> divider that yields at least the requested clock. I can certainly see
> that other clocks (say memory, CPU, or other internal
> performance-related clocks) might want to round the other way though.
>
> The I2C driver sets its module clock to 8 times the desired bus rate.
> This yields a request of:
>
> desired bus rate: 100 KHz
> desired clock rate: 800 KHz
> actual clock rate before your change: 800 KHz
> actual clock rate after your change: 800 KHz
> -> OK
>
> desired bus rate: 400 KHz
> desired clock rate: 3.2 MHz
> actual clock rate before your change: 3 MHz (so 375 KHz bus rate, OK)
> actual clock rate after your change: 4 MHZ (so 500 KHz bus rate, BAD)
>
> desired bus rate: 80 KHz (Toshiba AC100's nvec/I2C slave driver)
> desired clock rate: 640 KHz
> actual clock rate before your change: ~632 KHz (so ~79 KHz bus rate, OK)
> actual clock rate after your change: ~706 KHz (so ~88 KHz bus rate, BAD)
>
> Can this be fixed?
Fixed in latest patches.
> Second, the Toshiba AC100 uses an alternative driver for the I2C HW,
> since it operates in I2C slave mode. So, the DT node for that driver
> needs to include the clocks properties so the driver can get the clocks
> through DT:
>
>> diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
>> index edef66c..6495425 100644
>> --- a/arch/arm/boot/dts/tegra20-paz00.dts
>> +++ b/arch/arm/boot/dts/tegra20-paz00.dts
>> @@ -278,6 +278,8 @@
>> clock-frequency = <50000>;
>> request-gpios = <&gpio 170 0>; /* gpio PV2 */
>> slave-addr = <138>;
>> + clocks = <&tegra_car 67>, <&tegra_car 124>;
>> + clock-names = "div-clk", "fast-clk";
>> };
>>
>> i2c at 7000d000 {
> Your changes don't actually cause the driver to break though, since it
> abuses clk_get_sys() to retrieve clocks under a different driver name,
> which matches what the clock driver provides. However, I think you
> should also include the following patch at the end of your series to fix
> this up, so the clock looking happens through device tree:
>
>> diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
>> index d8826ed..6d44076 100644
>> --- a/drivers/staging/nvec/nvec.c
>> +++ b/drivers/staging/nvec/nvec.c
>> @@ -770,7 +770,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
>> return -ENODEV;
>> }
>>
>> - i2c_clk = clk_get_sys("tegra-i2c.2", "div-clk");
>> + i2c_clk = clk_get(&pdev->dev, "div-clk");
>> if (IS_ERR(i2c_clk)) {
>> dev_err(nvec->dev, "failed to get controller clock\n");
>> return -ENODEV;
Included in the latest patches sent.
> Thanks.
^ permalink raw reply
* [PATCH v4 0/4] pm: Add power off control
From: Russ Dill @ 2013-01-11 8:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <331ABD5ECB02734CA317220B2BBEABC13EAD58C2@DBDE01.ent.ti.com>
On Wed, Jan 2, 2013 at 2:15 AM, AnilKumar, Chimata <anilkumar@ti.com> wrote:
> On Fri, Dec 14, 2012 at 11:33:13, AnilKumar, Chimata wrote:
>> Add PM power_off control to rtc driver and PMIC status is set to
>> STATUS_OFF to shutdown PMIC if PWR_EN is toggled by RTC module.
>>
>> System power off sequence:-
>> * Set PMIC STATUS_OFF when PMIC_POWER_EN is pulled low
>> * Enable PMIC_POWER_EN in rtc module
>> * Set rtc ALARM2 time
>> * Enable ALARM2 interrupt
>>
>> These patches were tested on am335x-bone (BeagleBone). These patchs
>> are based on linux-next.
>
> Hi All,
>
> Happy New Year
>
> Gentle ping to this series
I personally like the series, it certainly adds needed functionality.
I just wish there was a way to get it without a possible 4 second
delay.
> Thanks
> AnilKumar
>
>> Changes from v3:
>> - TPS65217 mfd driver changes are accepted so dropped
>> from this series.
>> - With recent changes in the kernel, reboot_mutex held BUG()
>> is not seen so removed while(1); from rtc_power_off.
>> - Removed spinlock before while(1); which is not necessary.
>>
>> Changes from v2:
>> - Incorporated Kevin's comment on v2
>> * Enabled RTC in ompa2plus_defconfig
>>
>> Changes from v1:
>> - Incorporated Vaibhav's comments on v1
>> * Changed the time rollover logic with the help of
>> rtc-lib APIs
>>
>> AnilKumar Ch (3):
>> ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
>> ARM: dts: AM33XX: Enable system power off control in am335x-bone
>> ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
>>
>> Colin Foe-Parker (1):
>> rtc: OMAP: Add system pm_power_off to rtc driver
>>
>> Documentation/devicetree/bindings/rtc/rtc-omap.txt | 5 ++
>> arch/arm/boot/dts/am335x-bone.dts | 6 ++
>> arch/arm/configs/omap2plus_defconfig | 1 +
>> drivers/rtc/rtc-omap.c | 74 +++++++++++++++++++-
>> 4 files changed, 85 insertions(+), 1 deletion(-)
>>
>> --
>> 1.7.9.5
>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] usb: phy: samsung: Add support to set pmu isolation
From: Vivek Gautam @ 2013-01-11 8:08 UTC (permalink / raw)
To: linux-arm-kernel
Adding support to parse device node data in order to get
required properties to set pmu isolation for usb-phy.
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
---
Changes from v5:
- Using a global spin_lock member in 'samsung_usbphy' structure to be
used in samsung_usbphy_init() and samsung_usbphy_shutdown()
to take care of all register initialization sequence.
- Addressing few nits:
- Using devphy_reg_offset instead of 'pmureg_devphy_offset'
- Using if else block instead of ternary conditional statement
in samsung_usbphy_set_isolation()
- Using 'bool' type instead of 'int' for 'on' argument in
samsung_usbphy_set_isolation()
- Amending few comments.
.../devicetree/bindings/usb/samsung-usbphy.txt | 36 +++++
drivers/usb/phy/samsung-usbphy.c | 161 +++++++++++++++++---
2 files changed, 175 insertions(+), 22 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt
index 7b26e2d..22d06cf 100644
--- a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt
+++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt
@@ -9,3 +9,39 @@ Required properties:
- compatible : should be "samsung,exynos4210-usbphy"
- reg : base physical address of the phy registers and length of memory mapped
region.
+
+Optional properties:
+- #address-cells: should be '1' when usbphy node has a child node with 'reg'
+ property.
+- #size-cells: should be '1' when usbphy node has a child node with 'reg'
+ property.
+- ranges: allows valid translation between child's address space and parent's
+ address space.
+
+- The child node 'usbphy-sys' to the node 'usbphy' is for the system controller
+ interface for usb-phy. It should provide the following information required by
+ usb-phy controller to control phy.
+ - reg : base physical address of PHY_CONTROL registers.
+ The size of this register is the total sum of size of all PHY_CONTROL
+ registers that the SoC has. For example, the size will be
+ '0x4' in case we have only one PHY_CONTROL register (e.g.
+ OTHERS register in S3C64XX or USB_PHY_CONTROL register in S5PV210)
+ and, '0x8' in case we have two PHY_CONTROL registers (e.g.
+ USBDEVICE_PHY_CONTROL and USBHOST_PHY_CONTROL registers in exynos4x).
+ and so on.
+
+Example:
+ - Exynos4210
+
+ usbphy at 125B0000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "samsung,exynos4210-usbphy";
+ reg = <0x125B0000 0x100>;
+ ranges;
+
+ usbphy-sys {
+ /* USB device and host PHY_CONTROL registers */
+ reg = <0x10020704 0x8>;
+ };
+ };
diff --git a/drivers/usb/phy/samsung-usbphy.c b/drivers/usb/phy/samsung-usbphy.c
index 5c5e1bb5..7eec7c3 100644
--- a/drivers/usb/phy/samsung-usbphy.c
+++ b/drivers/usb/phy/samsung-usbphy.c
@@ -24,6 +24,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/of.h>
+#include <linux/of_address.h>
#include <linux/usb/otg.h>
#include <linux/platform_data/samsung-usbphy.h>
@@ -60,20 +61,46 @@
#define MHZ (1000*1000)
#endif
+#define S3C64XX_USBPHY_ENABLE (0x1 << 16)
+#define EXYNOS_USBPHY_ENABLE (0x1 << 0)
+
enum samsung_cpu_type {
TYPE_S3C64XX,
TYPE_EXYNOS4210,
};
/*
+ * struct samsung_usbphy_drvdata - driver data for various SoC variants
+ * @cpu_type: machine identifier
+ * @devphy_en_mask: device phy enable mask for PHY CONTROL register
+ * @devphy_reg_offset: offset to DEVICE PHY CONTROL register from
+ * mapped address of system controller.
+ *
+ * Here we have a separate mask for device type phy.
+ * Having different masks for host and device type phy helps
+ * in setting independent masks in case of SoCs like S5PV210,
+ * in which PHY0 and PHY1 enable bits belong to same register
+ * placed at position 0 and 1 respectively.
+ * Although for newer SoCs like exynos these bits belong to
+ * different registers altogether placed@position 0.
+ */
+struct samsung_usbphy_drvdata {
+ int cpu_type;
+ int devphy_en_mask;
+ u32 devphy_reg_offset;
+};
+
+/*
* struct samsung_usbphy - transceiver driver state
* @phy: transceiver structure
* @plat: platform data
* @dev: The parent device supplied to the probe function
* @clk: usb phy clock
- * @regs: usb phy register memory base
+ * @regs: usb phy controller registers memory base
+ * @pmuregs: USB device PHY_CONTROL register memory base
* @ref_clk_freq: reference clock frequency selection
- * @cpu_type: machine identifier
+ * @drv_data: driver data available for different SoCs
+ * @lock: lock for phy operations
*/
struct samsung_usbphy {
struct usb_phy phy;
@@ -81,12 +108,64 @@ struct samsung_usbphy {
struct device *dev;
struct clk *clk;
void __iomem *regs;
+ void __iomem *pmuregs;
int ref_clk_freq;
- int cpu_type;
+ const struct samsung_usbphy_drvdata *drv_data;
+ spinlock_t lock;
};
#define phy_to_sphy(x) container_of((x), struct samsung_usbphy, phy)
+static int samsung_usbphy_parse_dt(struct samsung_usbphy *sphy)
+{
+ struct device_node *usbphy_sys;
+
+ /* Getting node for system controller interface for usb-phy */
+ usbphy_sys = of_get_child_by_name(sphy->dev->of_node, "usbphy-sys");
+ if (!usbphy_sys)
+ dev_warn(sphy->dev, "No sys-controller interface for usb-phy\n");
+
+ sphy->pmuregs = of_iomap(usbphy_sys, 0);
+
+ of_node_put(usbphy_sys);
+
+ if (sphy->pmuregs == NULL) {
+ dev_err(sphy->dev, "Can't get usb-phy pmu control register\n");
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+/*
+ * Set isolation here for phy.
+ * Here 'on = true' would mean USB PHY block is isolated, hence
+ * de-activated and vice-versa.
+ */
+static void samsung_usbphy_set_isolation(struct samsung_usbphy *sphy, bool on)
+{
+ void __iomem *reg;
+ u32 reg_val;
+ u32 en_mask;
+
+ if (!sphy->pmuregs) {
+ dev_warn(sphy->dev, "Can't set pmu isolation\n");
+ return;
+ }
+
+ reg = sphy->pmuregs + sphy->drv_data->devphy_reg_offset;
+ en_mask = sphy->drv_data->devphy_en_mask;
+
+ reg_val = readl(reg);
+
+ if (on)
+ reg_val &= ~en_mask;
+ else
+ reg_val |= en_mask;
+
+ writel(reg_val, reg);
+}
+
/*
* Returns reference clock frequency selection value
*/
@@ -112,7 +191,7 @@ static int samsung_usbphy_get_refclk_freq(struct samsung_usbphy *sphy)
refclk_freq = PHYCLK_CLKSEL_48M;
break;
default:
- if (sphy->cpu_type == TYPE_S3C64XX)
+ if (sphy->drv_data->cpu_type == TYPE_S3C64XX)
refclk_freq = PHYCLK_CLKSEL_48M;
else
refclk_freq = PHYCLK_CLKSEL_24M;
@@ -135,7 +214,7 @@ static void samsung_usbphy_enable(struct samsung_usbphy *sphy)
phypwr = readl(regs + SAMSUNG_PHYPWR);
rstcon = readl(regs + SAMSUNG_RSTCON);
- switch (sphy->cpu_type) {
+ switch (sphy->drv_data->cpu_type) {
case TYPE_S3C64XX:
phyclk &= ~PHYCLK_COMMON_ON_N;
phypwr &= ~PHYPWR_NORMAL_MASK;
@@ -165,7 +244,7 @@ static void samsung_usbphy_disable(struct samsung_usbphy *sphy)
phypwr = readl(regs + SAMSUNG_PHYPWR);
- switch (sphy->cpu_type) {
+ switch (sphy->drv_data->cpu_type) {
case TYPE_S3C64XX:
phypwr |= PHYPWR_NORMAL_MASK;
break;
@@ -185,6 +264,7 @@ static void samsung_usbphy_disable(struct samsung_usbphy *sphy)
static int samsung_usbphy_init(struct usb_phy *phy)
{
struct samsung_usbphy *sphy;
+ unsigned long flags;
int ret = 0;
sphy = phy_to_sphy(phy);
@@ -196,13 +276,19 @@ static int samsung_usbphy_init(struct usb_phy *phy)
return ret;
}
+ spin_lock_irqsave(&sphy->lock, flags);
+
/* Disable phy isolation */
if (sphy->plat && sphy->plat->pmu_isolation)
sphy->plat->pmu_isolation(false);
+ else
+ samsung_usbphy_set_isolation(sphy, false);
/* Initialize usb phy registers */
samsung_usbphy_enable(sphy);
+ spin_unlock_irqrestore(&sphy->lock, flags);
+
/* Disable the phy clock */
clk_disable_unprepare(sphy->clk);
return ret;
@@ -214,6 +300,7 @@ static int samsung_usbphy_init(struct usb_phy *phy)
static void samsung_usbphy_shutdown(struct usb_phy *phy)
{
struct samsung_usbphy *sphy;
+ unsigned long flags;
sphy = phy_to_sphy(phy);
@@ -222,44 +309,47 @@ static void samsung_usbphy_shutdown(struct usb_phy *phy)
return;
}
+ spin_lock_irqsave(&sphy->lock, flags);
+
/* De-initialize usb phy registers */
samsung_usbphy_disable(sphy);
/* Enable phy isolation */
if (sphy->plat && sphy->plat->pmu_isolation)
sphy->plat->pmu_isolation(true);
+ else
+ samsung_usbphy_set_isolation(sphy, true);
+
+ spin_unlock_irqrestore(&sphy->lock, flags);
clk_disable_unprepare(sphy->clk);
}
static const struct of_device_id samsung_usbphy_dt_match[];
-static inline int samsung_usbphy_get_driver_data(struct platform_device *pdev)
+static inline const struct samsung_usbphy_drvdata
+*samsung_usbphy_get_driver_data(struct platform_device *pdev)
{
if (pdev->dev.of_node) {
const struct of_device_id *match;
match = of_match_node(samsung_usbphy_dt_match,
pdev->dev.of_node);
- return (int) match->data;
+ return match->data;
}
- return platform_get_device_id(pdev)->driver_data;
+ return (struct samsung_usbphy_drvdata *)
+ platform_get_device_id(pdev)->driver_data;
}
static int __devinit samsung_usbphy_probe(struct platform_device *pdev)
{
struct samsung_usbphy *sphy;
- struct samsung_usbphy_data *pdata;
+ struct samsung_usbphy_data *pdata = pdev->dev.platform_data;
struct device *dev = &pdev->dev;
struct resource *phy_mem;
void __iomem *phy_base;
struct clk *clk;
-
- pdata = pdev->dev.platform_data;
- if (!pdata) {
- dev_err(&pdev->dev, "%s: no platform data defined\n", __func__);
- return -EINVAL;
- }
+ int ret;
phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!phy_mem) {
@@ -283,7 +373,19 @@ static int __devinit samsung_usbphy_probe(struct platform_device *pdev)
return PTR_ERR(clk);
}
- sphy->dev = &pdev->dev;
+ sphy->dev = dev;
+
+ if (dev->of_node) {
+ ret = samsung_usbphy_parse_dt(sphy);
+ if (ret < 0)
+ return ret;
+ } else {
+ if (!pdata) {
+ dev_err(dev, "no platform data specified\n");
+ return -EINVAL;
+ }
+ }
+
sphy->plat = pdata;
sphy->regs = phy_base;
sphy->clk = clk;
@@ -291,9 +393,11 @@ static int __devinit samsung_usbphy_probe(struct platform_device *pdev)
sphy->phy.label = "samsung-usbphy";
sphy->phy.init = samsung_usbphy_init;
sphy->phy.shutdown = samsung_usbphy_shutdown;
- sphy->cpu_type = samsung_usbphy_get_driver_data(pdev);
+ sphy->drv_data = samsung_usbphy_get_driver_data(pdev);
sphy->ref_clk_freq = samsung_usbphy_get_refclk_freq(sphy);
+ spin_lock_init(&sphy->lock);
+
platform_set_drvdata(pdev, sphy);
return usb_add_phy(&sphy->phy, USB_PHY_TYPE_USB2);
@@ -305,17 +409,30 @@ static int __exit samsung_usbphy_remove(struct platform_device *pdev)
usb_remove_phy(&sphy->phy);
+ if (sphy->pmuregs)
+ iounmap(sphy->pmuregs);
+
return 0;
}
+static const struct samsung_usbphy_drvdata usbphy_s3c64xx = {
+ .cpu_type = TYPE_S3C64XX,
+ .devphy_en_mask = S3C64XX_USBPHY_ENABLE,
+};
+
+static const struct samsung_usbphy_drvdata usbphy_exynos4 = {
+ .cpu_type = TYPE_EXYNOS4210,
+ .devphy_en_mask = EXYNOS_USBPHY_ENABLE,
+};
+
#ifdef CONFIG_OF
static const struct of_device_id samsung_usbphy_dt_match[] = {
{
.compatible = "samsung,s3c64xx-usbphy",
- .data = (void *)TYPE_S3C64XX,
+ .data = &usbphy_s3c64xx,
}, {
.compatible = "samsung,exynos4210-usbphy",
- .data = (void *)TYPE_EXYNOS4210,
+ .data = &usbphy_exynos4,
},
{},
};
@@ -325,10 +442,10 @@ MODULE_DEVICE_TABLE(of, samsung_usbphy_dt_match);
static struct platform_device_id samsung_usbphy_driver_ids[] = {
{
.name = "s3c64xx-usbphy",
- .driver_data = TYPE_S3C64XX,
+ .driver_data = (unsigned long)&usbphy_s3c64xx,
}, {
.name = "exynos4210-usbphy",
- .driver_data = TYPE_EXYNOS4210,
+ .driver_data = (unsigned long)&usbphy_exynos4,
},
{},
};
--
1.7.6.5
^ permalink raw reply related
* [PATCH v4 1/4] rtc: OMAP: Add system pm_power_off to rtc driver
From: Russ Dill @ 2013-01-11 8:08 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1355464997-19367-2-git-send-email-anilkumar@ti.com>
On Thu, Dec 13, 2012 at 10:03 PM, AnilKumar Ch <anilkumar@ti.com> wrote:
> From: Colin Foe-Parker <colin.foeparker@logicpd.com>
>
> Add system power off control to rtc driver which is the in-charge
> of controlling the BeagleBone system power. The power_off routine
> can be hooked up to "pm_power_off" system call.
>
> System power off sequence:-
> * Set PMIC STATUS_OFF when PMIC_POWER_EN is pulled low
> * Enable PMIC_POWER_EN in rtc module
> * Set rtc ALARM2 time
> * Enable ALARM2 interrupt
>
> Signed-off-by: Colin Foe-Parker <colin.foeparker@logicpd.com>
> [anilkumar at ti.com: move poweroff additions to rtc driver]
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Looks good
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
> ---
> Documentation/devicetree/bindings/rtc/rtc-omap.txt | 5 ++
> drivers/rtc/rtc-omap.c | 74 +++++++++++++++++++-
> 2 files changed, 78 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
> index b47aa41..8d9f4f9 100644
> --- a/Documentation/devicetree/bindings/rtc/rtc-omap.txt
> +++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
> @@ -6,6 +6,10 @@ Required properties:
> - interrupts: rtc timer, alarm interrupts in order
> - interrupt-parent: phandle for the interrupt controller
>
> +Optional properties:
> +- ti,system-power-controller: Telling whether or not rtc is controlling
> + the system power.
> +
> Example:
>
> rtc at 1c23000 {
> @@ -14,4 +18,5 @@ rtc at 1c23000 {
> interrupts = <19
> 19>;
> interrupt-parent = <&intc>;
> + ti,system-power-controller;
> };
> diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
> index 6009714..e6d4878 100644
> --- a/drivers/rtc/rtc-omap.c
> +++ b/drivers/rtc/rtc-omap.c
> @@ -72,6 +72,14 @@
> #define OMAP_RTC_KICK0_REG 0x6c
> #define OMAP_RTC_KICK1_REG 0x70
>
> +#define OMAP_RTC_ALARM2_SECONDS_REG 0x80
> +#define OMAP_RTC_ALARM2_MINUTES_REG 0x84
> +#define OMAP_RTC_ALARM2_HOURS_REG 0x88
> +#define OMAP_RTC_ALARM2_DAYS_REG 0x8c
> +#define OMAP_RTC_ALARM2_MONTHS_REG 0x90
> +#define OMAP_RTC_ALARM2_YEARS_REG 0x94
> +#define OMAP_RTC_PMIC_REG 0x98
> +
> /* OMAP_RTC_CTRL_REG bit fields: */
> #define OMAP_RTC_CTRL_SPLIT (1<<7)
> #define OMAP_RTC_CTRL_DISABLE (1<<6)
> @@ -93,15 +101,21 @@
> #define OMAP_RTC_STATUS_BUSY (1<<0)
>
> /* OMAP_RTC_INTERRUPTS_REG bit fields: */
> +#define OMAP_RTC_INTERRUPTS_IT_ALARM2 (1<<4)
> #define OMAP_RTC_INTERRUPTS_IT_ALARM (1<<3)
> #define OMAP_RTC_INTERRUPTS_IT_TIMER (1<<2)
>
> +/* OMAP_RTC_PMIC_REG bit fields: */
> +#define OMAP_RTC_PMIC_POWER_EN_EN (1<<16)
> +
> /* OMAP_RTC_KICKER values */
> #define KICK0_VALUE 0x83e70b13
> #define KICK1_VALUE 0x95a4f1e0
>
> #define OMAP_RTC_HAS_KICKER 0x1
>
> +#define SHUTDOWN_TIME_SEC 2
> +
> static void __iomem *rtc_base;
>
> #define rtc_read(addr) readb(rtc_base + (addr))
> @@ -290,6 +304,56 @@ static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
> return 0;
> }
>
> +/*
> + * rtc_power_off: Set the pmic power off sequence. The RTC generates
> + * pmic_pwr_enable control, which can be used to control an external
> + * PMIC.
> + */
> +static void rtc_power_off(void)
> +{
> + u32 val;
> + struct rtc_time tm;
> + unsigned long time;
> +
> + /* Set PMIC power enable */
> + val = readl(rtc_base + OMAP_RTC_PMIC_REG);
> + writel(val | OMAP_RTC_PMIC_POWER_EN_EN, rtc_base + OMAP_RTC_PMIC_REG);
> +
> + /* Read rtc time */
> + omap_rtc_read_time(NULL, &tm);
> +
> + /* Convert Gregorian date to seconds since 01-01-1970 00:00:00 */
> + rtc_tm_to_time(&tm, &time);
> +
> + /* Add shutdown time to the current value */
> + time += SHUTDOWN_TIME_SEC;
> +
> + /* Convert seconds since 01-01-1970 00:00:00 to Gregorian date */
> + rtc_time_to_tm(time, &tm);
> +
> + if (tm2bcd(&tm) < 0)
> + return;
> +
> + pr_info("System will go to power_off state in approx. %d secs\n",
> + SHUTDOWN_TIME_SEC);
> +
> + /*
> + * pmic_pwr_enable is controlled by means of ALARM2 event. So here
> + * programming alarm2 expiry time and enabling alarm2 interrupt
> + */
> + rtc_write(tm.tm_sec, OMAP_RTC_ALARM2_SECONDS_REG);
> + rtc_write(tm.tm_min, OMAP_RTC_ALARM2_MINUTES_REG);
> + rtc_write(tm.tm_hour, OMAP_RTC_ALARM2_HOURS_REG);
> + rtc_write(tm.tm_mday, OMAP_RTC_ALARM2_DAYS_REG);
> + rtc_write(tm.tm_mon, OMAP_RTC_ALARM2_MONTHS_REG);
> + rtc_write(tm.tm_year, OMAP_RTC_ALARM2_YEARS_REG);
> +
> + /* Enable alarm2 interrupt */
> + val = readl(rtc_base + OMAP_RTC_INTERRUPTS_REG);
> + writel(val | OMAP_RTC_INTERRUPTS_IT_ALARM2,
> + rtc_base + OMAP_RTC_INTERRUPTS_REG);
> +}
> +
> static struct rtc_class_ops omap_rtc_ops = {
> .read_time = omap_rtc_read_time,
> .set_time = omap_rtc_set_time,
> @@ -327,12 +391,16 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
> struct resource *res, *mem;
> struct rtc_device *rtc;
> u8 reg, new_ctrl;
> + bool pm_off = false;
> const struct platform_device_id *id_entry;
> const struct of_device_id *of_id;
>
> of_id = of_match_device(omap_rtc_of_match, &pdev->dev);
> - if (of_id)
> + if (of_id) {
> pdev->id_entry = of_id->data;
> + pm_off = of_property_read_bool(pdev->dev.of_node,
> + "ti,system-power-controller");
> + }
>
> omap_rtc_timer = platform_get_irq(pdev, 0);
> if (omap_rtc_timer <= 0) {
> @@ -385,6 +453,10 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
> platform_set_drvdata(pdev, rtc);
> dev_set_drvdata(&rtc->dev, mem);
>
> + /* RTC power off */
> + if (pm_off && !pm_power_off)
> + pm_power_off = rtc_power_off;
> +
> /* clear pending irqs, and set 1/second periodic,
> * which we'll use instead of update irqs
> */
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH v4 3/4] ARM: dts: AM33XX: Enable system power off control in am335x-bone
From: Russ Dill @ 2013-01-11 8:08 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1355464997-19367-4-git-send-email-anilkumar@ti.com>
On Thu, Dec 13, 2012 at 10:03 PM, AnilKumar Ch <anilkumar@ti.com> wrote:
> Enable system power off control for BeagleBone in am335x-bone.dts file
> under rtc node. RTC is the incharge of controlling the system power.
> This flag is used by the driver to hook up the pm_power_off system call.
>
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Looks good
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
> ---
> arch/arm/boot/dts/am335x-bone.dts | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
> index e7dff9d..febbe2f 100644
> --- a/arch/arm/boot/dts/am335x-bone.dts
> +++ b/arch/arm/boot/dts/am335x-bone.dts
> @@ -52,6 +52,10 @@
> };
>
> };
> +
> + rtc at 44e3e000 {
> + ti,system-power-controller;
> + };
> };
>
> leds {
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH v4 4/4] ARM: OMAP2+: omap2plus_defconfig: Enable RTC support
From: Russ Dill @ 2013-01-11 8:08 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1355464997-19367-5-git-send-email-anilkumar@ti.com>
On Thu, Dec 13, 2012 at 10:03 PM, AnilKumar Ch <anilkumar@ti.com> wrote:
> AM33XX family of devices use RTC module, one has to manually enable
> this support to use RTC features. So this patch enable RTC driver in
> omap2plus_defconfig.
>
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Looks good
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
> ---
> arch/arm/configs/omap2plus_defconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
> index 0ce6771..e58afc5 100644
> --- a/arch/arm/configs/omap2plus_defconfig
> +++ b/arch/arm/configs/omap2plus_defconfig
> @@ -216,6 +216,7 @@ CONFIG_LEDS_TRIGGER_CPU=y
> CONFIG_LEDS_TRIGGER_GPIO=y
> CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
> CONFIG_RTC_CLASS=y
> +CONFIG_RTC_DRV_OMAP=y
> CONFIG_RTC_DRV_TWL92330=y
> CONFIG_RTC_DRV_TWL4030=y
> CONFIG_DMADEVICES=y
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH v4 2/4] ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone
From: Russ Dill @ 2013-01-11 8:08 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1355464997-19367-3-git-send-email-anilkumar@ti.com>
On Thu, Dec 13, 2012 at 10:03 PM, AnilKumar Ch <anilkumar@ti.com> wrote:
> Set ti,pmic-shutdown-controller for BeagleBone in am335x-bone.dts
> file, this flag is used by the driver to set tps65217 PMIC status
> to OFF when PWR_EN toggle.
>
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Looks good
Reviewed-by: Russ Dill <russ.dill@ti.com>
Acked-by: Russ Dill <russ.dill@ti.com>
> ---
> arch/arm/boot/dts/am335x-bone.dts | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
> index 5302f79..e7dff9d 100644
> --- a/arch/arm/boot/dts/am335x-bone.dts
> +++ b/arch/arm/boot/dts/am335x-bone.dts
> @@ -88,6 +88,8 @@
> /include/ "tps65217.dtsi"
>
> &tps {
> + ti,pmic-shutdown-controller;
> +
> regulators {
> dcdc1_reg: regulator at 0 {
> regulator-always-on;
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH v2 10/10] clk: tegra30: remove unused TEGRA_CLK_DUPLICATE()s
From: Prashant Gaikwad @ 2013-01-11 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357891289-23500-1-git-send-email-pgaikwad@nvidia.com>
With device tree support added for Tegra clocks look up is done from
device tree, remove unused TEGRA_CLK_DUPLICATE()s.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
drivers/clk/tegra/clk-tegra30.c | 70 ---------------------------------------
1 files changed, 0 insertions(+), 70 deletions(-)
diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c
index 987312c..6d1ff86 100644
--- a/drivers/clk/tegra/clk-tegra30.c
+++ b/drivers/clk/tegra/clk-tegra30.c
@@ -1642,41 +1642,6 @@ static void __init tegra30_periph_clk_init(void)
clk_register_clkdev(clk, "emc", NULL);
clks[emc] = clk;
- /* i2c1-fast */
- clk = clk_register_fixed_factor(NULL, "i2c1-fast", "pll_p_out3",
- CLK_SET_RATE_PARENT, 1, 1);
- clk_register_clkdev(clk, "fast-clk", "tegra-i2c.0");
-
- /* i2c2-fast */
- clk = clk_register_fixed_factor(NULL, "i2c2-fast", "pll_p_out3",
- CLK_SET_RATE_PARENT, 1, 1);
- clk_register_clkdev(clk, "fast-clk", "tegra-i2c.1");
-
- /* i2c3-fast */
- clk = clk_register_fixed_factor(NULL, "i2c3-fast", "pll_p_out3",
- CLK_SET_RATE_PARENT, 1, 1);
- clk_register_clkdev(clk, "fast-clk", "tegra-i2c.2");
-
- /* i2c4-fast */
- clk = clk_register_fixed_factor(NULL, "i2c4-fast", "pll_p_out3",
- CLK_SET_RATE_PARENT, 1, 1);
- clk_register_clkdev(clk, "fast-clk", "tegra-i2c.3");
-
- /* i2c5-fast */
- clk = clk_register_fixed_factor(NULL, "i2c5-fast", "pll_p_out3",
- CLK_SET_RATE_PARENT, 1, 1);
- clk_register_clkdev(clk, "fast-clk", "tegra-i2c.5");
-
- /* dsi1-fixed */
- clk = clk_register_fixed_factor(NULL, "dsi1-fixed", "pll_p_out3",
- CLK_SET_RATE_PARENT, 1, 1);
- clk_register_clkdev(clk, "dsi-fixed", "tegradc.0");
-
- /* dsi2-fixed */
- clk = clk_register_fixed_factor(NULL, "dsi2-fixed", "pll_p_out3",
- CLK_SET_RATE_PARENT, 1, 1);
- clk_register_clkdev(clk, "dsi-fixed", "tegradc.1");
-
for (i = 0; i < ARRAY_SIZE(tegra_periph_clk_list); i++) {
data = &tegra_periph_clk_list[i];
clk = tegra_clk_periph(data->name, data->parent_names,
@@ -1935,19 +1900,9 @@ static __initdata struct tegra_clk_init_table init_table[] = {
* table under two names.
*/
static struct tegra_clk_duplicate tegra_clk_duplicates[] = {
- TEGRA_CLK_DUPLICATE(uarta, "serial8250.0", NULL),
- TEGRA_CLK_DUPLICATE(uartb, "serial8250.1", NULL),
- TEGRA_CLK_DUPLICATE(uartc, "serial8250.2", NULL),
- TEGRA_CLK_DUPLICATE(uartd, "serial8250.3", NULL),
- TEGRA_CLK_DUPLICATE(uarte, "serial8250.4", NULL),
TEGRA_CLK_DUPLICATE(usbd, "utmip-pad", NULL),
TEGRA_CLK_DUPLICATE(usbd, "tegra-ehci.0", NULL),
TEGRA_CLK_DUPLICATE(usbd, "tegra-otg", NULL),
- TEGRA_CLK_DUPLICATE(pll_p, "tegradc.0", "parent"),
- TEGRA_CLK_DUPLICATE(pll_p, "tegradc.1", "parent"),
- TEGRA_CLK_DUPLICATE(pll_d2_out0, "hdmi", "parent"),
- TEGRA_CLK_DUPLICATE(dsib, "tegradc.0", "dsib"),
- TEGRA_CLK_DUPLICATE(dsia, "tegradc.1", "dsia"),
TEGRA_CLK_DUPLICATE(bsev, "tegra-avp", "bsev"),
TEGRA_CLK_DUPLICATE(bsev, "nvavp", "bsev"),
TEGRA_CLK_DUPLICATE(vde, "tegra-aes", "vde"),
@@ -1956,33 +1911,8 @@ static struct tegra_clk_duplicate tegra_clk_duplicates[] = {
TEGRA_CLK_DUPLICATE(cml1, "tegra_sata_cml", NULL),
TEGRA_CLK_DUPLICATE(cml0, "tegra_pcie", "cml"),
TEGRA_CLK_DUPLICATE(pciex, "tegra_pcie", "pciex"),
- TEGRA_CLK_DUPLICATE(i2c1, "tegra-i2c-slave.0", NULL),
- TEGRA_CLK_DUPLICATE(i2c2, "tegra-i2c-slave.1", NULL),
- TEGRA_CLK_DUPLICATE(i2c3, "tegra-i2c-slave.2", NULL),
- TEGRA_CLK_DUPLICATE(i2c4, "tegra-i2c-slave.3", NULL),
- TEGRA_CLK_DUPLICATE(i2c5, "tegra-i2c-slave.4", NULL),
- TEGRA_CLK_DUPLICATE(sbc1, "spi_slave_tegra.0", NULL),
- TEGRA_CLK_DUPLICATE(sbc2, "spi_slave_tegra.1", NULL),
- TEGRA_CLK_DUPLICATE(sbc3, "spi_slave_tegra.2", NULL),
- TEGRA_CLK_DUPLICATE(sbc4, "spi_slave_tegra.3", NULL),
- TEGRA_CLK_DUPLICATE(sbc5, "spi_slave_tegra.4", NULL),
- TEGRA_CLK_DUPLICATE(sbc6, "spi_slave_tegra.5", NULL),
TEGRA_CLK_DUPLICATE(twd, "smp_twd", NULL),
TEGRA_CLK_DUPLICATE(vcp, "nvavp", "vcp"),
- TEGRA_CLK_DUPLICATE(i2s0, NULL, "i2s0"),
- TEGRA_CLK_DUPLICATE(i2s1, NULL, "i2s1"),
- TEGRA_CLK_DUPLICATE(i2s2, NULL, "i2s2"),
- TEGRA_CLK_DUPLICATE(i2s3, NULL, "i2s3"),
- TEGRA_CLK_DUPLICATE(i2s4, NULL, "i2s4"),
- TEGRA_CLK_DUPLICATE(dam0, NULL, "dam0"),
- TEGRA_CLK_DUPLICATE(dam1, NULL, "dam1"),
- TEGRA_CLK_DUPLICATE(dam2, NULL, "dam2"),
- TEGRA_CLK_DUPLICATE(spdif_in, NULL, "spdif_in"),
- TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.0", "fast-clk"),
- TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.1", "fast-clk"),
- TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.2", "fast-clk"),
- TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.3", "fast-clk"),
- TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.4", "fast-clk"),
TEGRA_CLK_DUPLICATE(clk_max, NULL, NULL), /* MUST be the last entry */
};
--
1.7.4.1
^ permalink raw reply related
* [PATCH v2 09/10] clk: tegra20: remove unused TEGRA_CLK_DUPLICATE()s
From: Prashant Gaikwad @ 2013-01-11 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357891289-23500-1-git-send-email-pgaikwad@nvidia.com>
With device tree support added for Tegra clocks look up is done from
device tree, remove unused TEGRA_CLK_DUPLICATE()s.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
drivers/clk/tegra/clk-tegra20.c | 17 -----------------
1 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index 4875261..9383b85 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -1174,28 +1174,11 @@ static __initdata struct tegra_clk_init_table init_table[] = {
* table under two names.
*/
static struct tegra_clk_duplicate tegra_clk_duplicates[] = {
- TEGRA_CLK_DUPLICATE(uarta, "serial8250.0", NULL),
- TEGRA_CLK_DUPLICATE(uartb, "serial8250.1", NULL),
- TEGRA_CLK_DUPLICATE(uartc, "serial8250.2", NULL),
- TEGRA_CLK_DUPLICATE(uartd, "serial8250.3", NULL),
- TEGRA_CLK_DUPLICATE(uarte, "serial8250.4", NULL),
TEGRA_CLK_DUPLICATE(usbd, "utmip-pad", NULL),
TEGRA_CLK_DUPLICATE(usbd, "tegra-ehci.0", NULL),
TEGRA_CLK_DUPLICATE(usbd, "tegra-otg", NULL),
- TEGRA_CLK_DUPLICATE(pll_p, "tegradc.0", "parent"),
- TEGRA_CLK_DUPLICATE(pll_p, "tegradc.1", "parent"),
- TEGRA_CLK_DUPLICATE(pll_d_out0, "hdmi", "parent"),
- TEGRA_CLK_DUPLICATE(gr2d, "tegra_grhost", "gr2d"),
- TEGRA_CLK_DUPLICATE(gr3d, "tegra_grhost", "gr3d"),
- TEGRA_CLK_DUPLICATE(epp, "tegra_grhost", "epp"),
- TEGRA_CLK_DUPLICATE(mpe, "tegra_grhost", "mpe"),
- TEGRA_CLK_DUPLICATE(vde, "tegra-aes", "vde"),
TEGRA_CLK_DUPLICATE(cclk, NULL, "cpu"),
TEGRA_CLK_DUPLICATE(twd, "smp_twd", NULL),
- TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.0", "fast-clk"),
- TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.1", "fast-clk"),
- TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.2", "fast-clk"),
- TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.3", "fast-clk"),
TEGRA_CLK_DUPLICATE(clk_max, NULL, NULL), /* Must be the last entry */
};
--
1.7.4.1
^ permalink raw reply related
* [PATCH v2 08/10] arm: tegra30: remove auxdata
From: Prashant Gaikwad @ 2013-01-11 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357891289-23500-1-git-send-email-pgaikwad@nvidia.com>
Remove AUXDATA as clocks are initialized from device node.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
arch/arm/mach-tegra/board-dt-tegra30.c | 31 +------------------------------
1 files changed, 1 insertions(+), 30 deletions(-)
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c
index 92f6014..5b58b64 100644
--- a/arch/arm/mach-tegra/board-dt-tegra30.c
+++ b/arch/arm/mach-tegra/board-dt-tegra30.c
@@ -38,38 +38,9 @@
#include "common.h"
#include "iomap.h"
-static struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = {
- OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000000, "sdhci-tegra.0", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000200, "sdhci-tegra.1", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000400, "sdhci-tegra.2", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000600, "sdhci-tegra.3", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000C000, "tegra-i2c.0", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000C400, "tegra-i2c.1", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000C500, "tegra-i2c.2", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000C700, "tegra-i2c.3", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000D000, "tegra-i2c.4", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-apbdma", 0x6000a000, "tegra-apbdma", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000D400, "spi_tegra.0", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000D600, "spi_tegra.1", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000D800, "spi_tegra.2", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DA00, "spi_tegra.3", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DC00, "spi_tegra.4", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-slink", 0x7000DE00, "spi_tegra.5", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-host1x", 0x50000000, "host1x", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-dc", 0x54200000, "tegradc.0", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-dc", 0x54240000, "tegradc.1", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-hdmi", 0x54280000, "hdmi", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-dsi", 0x54300000, "dsi", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-tvo", 0x542c0000, "tvo", NULL),
- {}
-};
-
static void __init tegra30_dt_init(void)
{
- of_platform_populate(NULL, of_default_bus_match_table,
- tegra30_auxdata_lookup, NULL);
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
static const char *tegra30_dt_board_compat[] = {
--
1.7.4.1
^ permalink raw reply related
* [PATCH v2 07/10] arm: tegra20: remove auxdata
From: Prashant Gaikwad @ 2013-01-11 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357891289-23500-1-git-send-email-pgaikwad@nvidia.com>
Remove AUXDATA as clock are initialized from device node.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
arch/arm/mach-tegra/board-dt-tegra20.c | 26 +-------------------------
1 files changed, 1 insertions(+), 25 deletions(-)
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index 0c11b8a..85a27e5 100644
--- a/arch/arm/mach-tegra/board-dt-tegra20.c
+++ b/arch/arm/mach-tegra/board-dt-tegra20.c
@@ -69,37 +69,13 @@ static struct tegra_ehci_platform_data tegra_ehci3_pdata = {
.vbus_gpio = -1,
};
-static struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
- OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC2_BASE, "sdhci-tegra.1", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC3_BASE, "sdhci-tegra.2", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC4_BASE, "sdhci-tegra.3", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C_BASE, "tegra-i2c.0", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C2_BASE, "tegra-i2c.1", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C3_BASE, "tegra-i2c.2", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2c-dvc", TEGRA_DVC_BASE, "tegra-i2c.3", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2s", TEGRA_I2S1_BASE, "tegra20-i2s.0", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-i2s", TEGRA_I2S2_BASE, "tegra20-i2s.1", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-das", TEGRA_APB_MISC_DAS_BASE, "tegra20-das", NULL),
+struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB_BASE, "tegra-ehci.0",
&tegra_ehci1_pdata),
OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB2_BASE, "tegra-ehci.1",
&tegra_ehci2_pdata),
OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB3_BASE, "tegra-ehci.2",
&tegra_ehci3_pdata),
- OF_DEV_AUXDATA("nvidia,tegra20-apbdma", TEGRA_APB_DMA_BASE, "tegra-apbdma", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-sflash", 0x7000c380, "spi", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D400, "spi_tegra.0", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D600, "spi_tegra.1", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000D800, "spi_tegra.2", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-slink", 0x7000DA00, "spi_tegra.3", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-host1x", 0x50000000, "host1x", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-dc", 0x54200000, "tegradc.0", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-dc", 0x54240000, "tegradc.1", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-hdmi", 0x54280000, "hdmi", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-dsi", 0x54300000, "dsi", NULL),
- OF_DEV_AUXDATA("nvidia,tegra20-tvo", 0x542c0000, "tvo", NULL),
{}
};
--
1.7.4.1
^ permalink raw reply related
* [PATCH v2 06/10] ASoC: tegra: remove auxdata
From: Prashant Gaikwad @ 2013-01-11 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357891289-23500-1-git-send-email-pgaikwad@nvidia.com>
Configlink clock information is added to device tree. Get the clocks
using device node. Remove AUXDATA.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
sound/soc/tegra/tegra30_ahub.c | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
index bb31c41..2355630 100644
--- a/sound/soc/tegra/tegra30_ahub.c
+++ b/sound/soc/tegra/tegra30_ahub.c
@@ -299,15 +299,6 @@ static const char * const configlink_clocks[] = {
"spdif_in",
};
-struct of_dev_auxdata ahub_auxdata[] = {
- OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080300, "tegra30-i2s.0", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080400, "tegra30-i2s.1", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080500, "tegra30-i2s.2", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080600, "tegra30-i2s.3", NULL),
- OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080700, "tegra30-i2s.4", NULL),
- {}
-};
-
#define LAST_REG(name) \
(TEGRA30_AHUB_##name + \
(TEGRA30_AHUB_##name##_STRIDE * TEGRA30_AHUB_##name##_COUNT) - 4)
@@ -451,7 +442,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev)
* Ensure that here.
*/
for (i = 0; i < ARRAY_SIZE(configlink_clocks); i++) {
- clk = clk_get_sys(NULL, configlink_clocks[i]);
+ clk = clk_get(&pdev->dev, configlink_clocks[i]);
if (IS_ERR(clk)) {
dev_err(&pdev->dev, "Can't get clock %s\n",
configlink_clocks[i]);
@@ -569,8 +560,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev)
goto err_pm_disable;
}
- of_platform_populate(pdev->dev.of_node, NULL, ahub_auxdata,
- &pdev->dev);
+ of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
return 0;
--
1.7.4.1
^ permalink raw reply related
* [PATCH v2 05/10] staging: nvec: remove use of clk_get_sys
From: Prashant Gaikwad @ 2013-01-11 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357891289-23500-1-git-send-email-pgaikwad@nvidia.com>
As clock information is added to device tree clock can be looked up
using clk_get. Remove use of clk_get_sys.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
drivers/staging/nvec/nvec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index d51615b..9417941 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -770,7 +770,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
return -ENODEV;
}
- i2c_clk = clk_get_sys("tegra-i2c.2", "div-clk");
+ i2c_clk = clk_get(&pdev->dev, "div-clk");
if (IS_ERR(i2c_clk)) {
dev_err(nvec->dev, "failed to get controller clock\n");
return -ENODEV;
--
1.7.4.1
^ permalink raw reply related
* [PATCH v2 04/10] ARM: dt: tegra: paz00: add clock information
From: Prashant Gaikwad @ 2013-01-11 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357891289-23500-1-git-send-email-pgaikwad@nvidia.com>
Add clock i2c clock information to device node.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
arch/arm/boot/dts/tegra20-paz00.dts | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
index 6a93d14..a965fe9 100644
--- a/arch/arm/boot/dts/tegra20-paz00.dts
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
@@ -266,6 +266,8 @@
clock-frequency = <80000>;
request-gpios = <&gpio 170 0>; /* gpio PV2 */
slave-addr = <138>;
+ clocks = <&tegra_car 67>, <&tegra_car 124>;
+ clock-names = "div-clk", "fast-clk";
};
i2c at 7000d000 {
--
1.7.4.1
^ permalink raw reply related
* [PATCH v2 03/10] ARM: dt: tegra30: Add clock information
From: Prashant Gaikwad @ 2013-01-11 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357891289-23500-1-git-send-email-pgaikwad@nvidia.com>
Add clock information to device nodes.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
arch/arm/boot/dts/tegra30.dtsi | 55 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 54 insertions(+), 1 deletions(-)
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 6765646..c3e129a 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -9,6 +9,7 @@
reg = <0x50000000 0x00024000>;
interrupts = <0 65 0x04 /* mpcore syncpt */
0 67 0x04>; /* mpcore general */
+ clocks = <&tegra_car 28>;
#address-cells = <1>;
#size-cells = <1>;
@@ -19,41 +20,49 @@
compatible = "nvidia,tegra30-mpe";
reg = <0x54040000 0x00040000>;
interrupts = <0 68 0x04>;
+ clocks = <&tegra_car 60>;
};
vi {
compatible = "nvidia,tegra30-vi";
reg = <0x54080000 0x00040000>;
interrupts = <0 69 0x04>;
+ clocks = <&tegra_car 164>;
};
epp {
compatible = "nvidia,tegra30-epp";
reg = <0x540c0000 0x00040000>;
interrupts = <0 70 0x04>;
+ clocks = <&tegra_car 19>;
};
isp {
compatible = "nvidia,tegra30-isp";
reg = <0x54100000 0x00040000>;
interrupts = <0 71 0x04>;
+ clocks = <&tegra_car 23>;
};
gr2d {
compatible = "nvidia,tegra30-gr2d";
reg = <0x54140000 0x00040000>;
interrupts = <0 72 0x04>;
+ clocks = <&tegra_car 21>;
};
gr3d {
compatible = "nvidia,tegra30-gr3d";
reg = <0x54180000 0x00040000>;
+ clocks = <&tegra_car 24>;
};
dc at 54200000 {
compatible = "nvidia,tegra30-dc";
reg = <0x54200000 0x00040000>;
interrupts = <0 73 0x04>;
+ clocks = <&tegra_car 27>, <&tegra_car 179>;
+ clock-names = "disp1", "parent";
rgb {
status = "disabled";
@@ -64,6 +73,8 @@
compatible = "nvidia,tegra30-dc";
reg = <0x54240000 0x00040000>;
interrupts = <0 74 0x04>;
+ clocks = <&tegra_car 26>, <&tegra_car 179>;
+ clock-names = "disp2", "parent";
rgb {
status = "disabled";
@@ -75,6 +86,8 @@
reg = <0x54280000 0x00040000>;
interrupts = <0 75 0x04>;
status = "disabled";
+ clocks = <&tegra_car 51>, <&tegra_car 189>;
+ clock-names = "hdmi", "parent";
};
tvo {
@@ -82,12 +95,14 @@
reg = <0x542c0000 0x00040000>;
interrupts = <0 76 0x04>;
status = "disabled";
+ clocks = <&tegra_car 169>;
};
dsi {
compatible = "nvidia,tegra30-dsi";
reg = <0x54300000 0x00040000>;
status = "disabled";
+ clocks = <&tegra_car 48>;
};
};
@@ -166,6 +181,7 @@
0 141 0x04
0 142 0x04
0 143 0x04>;
+ clocks = <&tegra_car 34>;
};
ahb: ahb {
@@ -202,6 +218,7 @@
reg-shift = <2>;
interrupts = <0 36 0x04>;
status = "disabled";
+ clocks = <&tegra_car 6>;
};
serial at 70006040 {
@@ -210,6 +227,7 @@
reg-shift = <2>;
interrupts = <0 37 0x04>;
status = "disabled";
+ clocks = <&tegra_car 160>;
};
serial at 70006200 {
@@ -218,6 +236,7 @@
reg-shift = <2>;
interrupts = <0 46 0x04>;
status = "disabled";
+ clocks = <&tegra_car 55>;
};
serial at 70006300 {
@@ -226,6 +245,7 @@
reg-shift = <2>;
interrupts = <0 90 0x04>;
status = "disabled";
+ clocks = <&tegra_car 65>;
};
serial at 70006400 {
@@ -234,12 +254,14 @@
reg-shift = <2>;
interrupts = <0 91 0x04>;
status = "disabled";
+ clocks = <&tegra_car 66>;
};
pwm: pwm {
compatible = "nvidia,tegra30-pwm", "nvidia,tegra20-pwm";
reg = <0x7000a000 0x100>;
#pwm-cells = <2>;
+ clocks = <&tegra_car 17>;
};
rtc {
@@ -255,6 +277,8 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 12>, <&tegra_car 182>;
+ clock-names = "div-clk", "fast-clk";
};
i2c at 7000c400 {
@@ -264,6 +288,8 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 54>, <&tegra_car 182>;
+ clock-names = "div-clk", "fast-clk";
};
i2c at 7000c500 {
@@ -273,6 +299,8 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 67>, <&tegra_car 182>;
+ clock-names = "div-clk", "fast-clk";
};
i2c at 7000c700 {
@@ -282,6 +310,8 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 103>, <&tegra_car 182>;
+ clock-names = "div-clk", "fast-clk";
};
i2c at 7000d000 {
@@ -291,6 +321,8 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 47>, <&tegra_car 182>;
+ clock-names = "div-clk", "fast-clk";
};
spi at 7000d400 {
@@ -301,6 +333,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 41>;
};
spi at 7000d600 {
@@ -311,6 +344,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 44>;
};
spi at 7000d800 {
@@ -321,6 +355,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 46>;
};
spi at 7000da00 {
@@ -331,6 +366,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 68>;
};
spi at 7000dc00 {
@@ -341,6 +377,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 104>;
};
spi at 7000de00 {
@@ -351,6 +388,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 105>;
};
pmc {
@@ -383,7 +421,13 @@
0x70080200 0x100>;
interrupts = <0 103 0x04>;
nvidia,dma-request-selector = <&apbdma 1>;
-
+ clocks = <&tegra_car 106>, <&tegra_car 107>, <&tegra_car 30>,
+ <&tegra_car 11>, <&tegra_car 18>, <&tegra_car 101>,
+ <&tegra_car 102>, <&tegra_car 108>, <&tegra_car 109>,
+ <&tegra_car 110>, <&tegra_car 162>;
+ clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2",
+ "i2s3", "i2s4", "dam0", "dam1", "dam2",
+ "spdif_in";
ranges;
#address-cells = <1>;
#size-cells = <1>;
@@ -393,6 +437,7 @@
reg = <0x70080300 0x100>;
nvidia,ahub-cif-ids = <4 4>;
status = "disabled";
+ clocks = <&tegra_car 30>;
};
tegra_i2s1: i2s at 70080400 {
@@ -400,6 +445,7 @@
reg = <0x70080400 0x100>;
nvidia,ahub-cif-ids = <5 5>;
status = "disabled";
+ clocks = <&tegra_car 11>;
};
tegra_i2s2: i2s at 70080500 {
@@ -407,6 +453,7 @@
reg = <0x70080500 0x100>;
nvidia,ahub-cif-ids = <6 6>;
status = "disabled";
+ clocks = <&tegra_car 18>;
};
tegra_i2s3: i2s at 70080600 {
@@ -414,6 +461,7 @@
reg = <0x70080600 0x100>;
nvidia,ahub-cif-ids = <7 7>;
status = "disabled";
+ clocks = <&tegra_car 101>;
};
tegra_i2s4: i2s at 70080700 {
@@ -421,6 +469,7 @@
reg = <0x70080700 0x100>;
nvidia,ahub-cif-ids = <8 8>;
status = "disabled";
+ clocks = <&tegra_car 102>;
};
};
@@ -429,6 +478,7 @@
reg = <0x78000000 0x200>;
interrupts = <0 14 0x04>;
status = "disabled";
+ clocks = <&tegra_car 14>;
};
sdhci at 78000200 {
@@ -436,6 +486,7 @@
reg = <0x78000200 0x200>;
interrupts = <0 15 0x04>;
status = "disabled";
+ clocks = <&tegra_car 9>;
};
sdhci at 78000400 {
@@ -443,6 +494,7 @@
reg = <0x78000400 0x200>;
interrupts = <0 19 0x04>;
status = "disabled";
+ clocks = <&tegra_car 69>;
};
sdhci at 78000600 {
@@ -450,6 +502,7 @@
reg = <0x78000600 0x200>;
interrupts = <0 31 0x04>;
status = "disabled";
+ clocks = <&tegra_car 15>;
};
pmu {
--
1.7.4.1
^ permalink raw reply related
* [PATCH v2 02/10] ARM: dt: tegra20: Add clock information
From: Prashant Gaikwad @ 2013-01-11 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1357891289-23500-1-git-send-email-pgaikwad@nvidia.com>
Add clock information to device nodes.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
arch/arm/boot/dts/tegra20.dtsi | 44 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 5b104f1..8ac1544 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -9,6 +9,7 @@
reg = <0x50000000 0x00024000>;
interrupts = <0 65 0x04 /* mpcore syncpt */
0 67 0x04>; /* mpcore general */
+ clocks = <&tegra_car 28>;
#address-cells = <1>;
#size-cells = <1>;
@@ -19,41 +20,49 @@
compatible = "nvidia,tegra20-mpe";
reg = <0x54040000 0x00040000>;
interrupts = <0 68 0x04>;
+ clocks = <&tegra_car 60>;
};
vi {
compatible = "nvidia,tegra20-vi";
reg = <0x54080000 0x00040000>;
interrupts = <0 69 0x04>;
+ clocks = <&tegra_car 100>;
};
epp {
compatible = "nvidia,tegra20-epp";
reg = <0x540c0000 0x00040000>;
interrupts = <0 70 0x04>;
+ clocks = <&tegra_car 19>;
};
isp {
compatible = "nvidia,tegra20-isp";
reg = <0x54100000 0x00040000>;
interrupts = <0 71 0x04>;
+ clocks = <&tegra_car 23>;
};
gr2d {
compatible = "nvidia,tegra20-gr2d";
reg = <0x54140000 0x00040000>;
interrupts = <0 72 0x04>;
+ clocks = <&tegra_car 21>;
};
gr3d {
compatible = "nvidia,tegra20-gr3d";
reg = <0x54180000 0x00040000>;
+ clocks = <&tegra_car 24>;
};
dc at 54200000 {
compatible = "nvidia,tegra20-dc";
reg = <0x54200000 0x00040000>;
interrupts = <0 73 0x04>;
+ clocks = <&tegra_car 27>, <&tegra_car 121>;
+ clock-names = "disp1", "parent";
rgb {
status = "disabled";
@@ -64,6 +73,8 @@
compatible = "nvidia,tegra20-dc";
reg = <0x54240000 0x00040000>;
interrupts = <0 74 0x04>;
+ clocks = <&tegra_car 26>, <&tegra_car 121>;
+ clock-names = "disp2", "parent";
rgb {
status = "disabled";
@@ -75,6 +86,8 @@
reg = <0x54280000 0x00040000>;
interrupts = <0 75 0x04>;
status = "disabled";
+ clocks = <&tegra_car 51>, <&tegra_car 117>;
+ clock-names = "hdmi", "parent";
};
tvo {
@@ -82,12 +95,14 @@
reg = <0x542c0000 0x00040000>;
interrupts = <0 76 0x04>;
status = "disabled";
+ clocks = <&tegra_car 102>;
};
dsi {
compatible = "nvidia,tegra20-dsi";
reg = <0x54300000 0x00040000>;
status = "disabled";
+ clocks = <&tegra_car 48>;
};
};
@@ -148,6 +163,7 @@
0 117 0x04
0 118 0x04
0 119 0x04>;
+ clocks = <&tegra_car 34>;
};
ahb {
@@ -190,6 +206,7 @@
interrupts = <0 13 0x04>;
nvidia,dma-request-selector = <&apbdma 2>;
status = "disabled";
+ clocks = <&tegra_car 11>;
};
tegra_i2s2: i2s at 70002a00 {
@@ -198,6 +215,7 @@
interrupts = <0 3 0x04>;
nvidia,dma-request-selector = <&apbdma 1>;
status = "disabled";
+ clocks = <&tegra_car 18>;
};
serial at 70006000 {
@@ -206,6 +224,7 @@
reg-shift = <2>;
interrupts = <0 36 0x04>;
status = "disabled";
+ clocks = <&tegra_car 6>;
};
serial at 70006040 {
@@ -214,6 +233,7 @@
reg-shift = <2>;
interrupts = <0 37 0x04>;
status = "disabled";
+ clocks = <&tegra_car 96>;
};
serial at 70006200 {
@@ -222,6 +242,7 @@
reg-shift = <2>;
interrupts = <0 46 0x04>;
status = "disabled";
+ clocks = <&tegra_car 55>;
};
serial at 70006300 {
@@ -230,6 +251,7 @@
reg-shift = <2>;
interrupts = <0 90 0x04>;
status = "disabled";
+ clocks = <&tegra_car 65>;
};
serial at 70006400 {
@@ -238,12 +260,14 @@
reg-shift = <2>;
interrupts = <0 91 0x04>;
status = "disabled";
+ clocks = <&tegra_car 66>;
};
pwm: pwm {
compatible = "nvidia,tegra20-pwm";
reg = <0x7000a000 0x100>;
#pwm-cells = <2>;
+ clocks = <&tegra_car 17>;
};
rtc {
@@ -259,6 +283,8 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 12>, <&tegra_car 124>;
+ clock-names = "div-clk", "fast-clk";
};
spi at 7000c380 {
@@ -269,6 +295,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 43>;
};
i2c at 7000c400 {
@@ -278,6 +305,8 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 54>, <&tegra_car 124>;
+ clock-names = "div-clk", "fast-clk";
};
i2c at 7000c500 {
@@ -287,6 +316,8 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 67>, <&tegra_car 124>;
+ clock-names = "div-clk", "fast-clk";
};
i2c at 7000d000 {
@@ -296,6 +327,8 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 47>, <&tegra_car 124>;
+ clock-names = "div-clk", "fast-clk";
};
spi at 7000d400 {
@@ -306,6 +339,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 41>;
};
spi at 7000d600 {
@@ -316,6 +350,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 44>;
};
spi at 7000d800 {
@@ -326,6 +361,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 46>;
};
spi at 7000da00 {
@@ -336,6 +372,7 @@
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+ clocks = <&tegra_car 68>;
};
pmc {
@@ -370,6 +407,7 @@
phy_type = "utmi";
nvidia,has-legacy-mode;
status = "disabled";
+ clocks = <&tegra_car 22>;
};
usb at c5004000 {
@@ -378,6 +416,7 @@
interrupts = <0 21 0x04>;
phy_type = "ulpi";
status = "disabled";
+ clocks = <&tegra_car 58>;
};
usb at c5008000 {
@@ -386,6 +425,7 @@
interrupts = <0 97 0x04>;
phy_type = "utmi";
status = "disabled";
+ clocks = <&tegra_car 59>;
};
sdhci at c8000000 {
@@ -393,6 +433,7 @@
reg = <0xc8000000 0x200>;
interrupts = <0 14 0x04>;
status = "disabled";
+ clocks = <&tegra_car 14>;
};
sdhci at c8000200 {
@@ -400,6 +441,7 @@
reg = <0xc8000200 0x200>;
interrupts = <0 15 0x04>;
status = "disabled";
+ clocks = <&tegra_car 9>;
};
sdhci at c8000400 {
@@ -407,6 +449,7 @@
reg = <0xc8000400 0x200>;
interrupts = <0 19 0x04>;
status = "disabled";
+ clocks = <&tegra_car 69>;
};
sdhci at c8000600 {
@@ -414,6 +457,7 @@
reg = <0xc8000600 0x200>;
interrupts = <0 31 0x04>;
status = "disabled";
+ clocks = <&tegra_car 15>;
};
pmu {
--
1.7.4.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox