* Re: [PATCH] pch_uart: Add Kontron COMe-mTT10 uart clock quirk
From: Darren Hart @ 2012-03-22 21:49 UTC (permalink / raw)
To: Michael Brunner
Cc: Linux Kernel Mailing List, Greg Kroah-Hartman, Alan Cox,
linux-serial
In-Reply-To: <20120322223112.291e0c59@mail.gmx.de>
On 03/22/2012 02:31 PM, Michael Brunner wrote:
>> These boards should already be supported by the following BIOS check.
>> As the DMI_BOARD_NAME was changing, it was Kontron's recommendation
>> to use the FRI2 prefix in the DMI_BIOS_VERSION.
>>
>>
>>> cmp = dmi_get_system_info(DMI_BIOS_VERSION);
>>> if (cmp && strnstr(cmp, "FRI2", 4))
>>
>> Is this not working for you? If not, what is the DMI_BIOS_VERSION
>> reported by your board?
>>
>> And for clarification, we are talking about this right:
>> http://us.kontron.com/products/systems+and+platforms/m2m/m2m+smart+services+developer+kit.html
>
> My changes refer to the embedded module with the project code NTC1:
> <http://us.kontron.com/products/computeronmodules/com+express/com+express+mini/comemtt10.html>
>
> So unfortunately the FRI2 checks won't work for this.
>
> Michael
OK, my board has DMI_BOARD_NAME as:
"nETXe-TT 1.0GHz E2 KDMS-FRI" but will also undergo a rename in the near
future. I'm concerned about colliding as I believe this kit may use the
same board you are working with. This COM Express module will be renamed
"COMe-mTT10" which will match your strstr compare.
So what does your DMI_BIOS_VERSION report?
I didn't like basing this on BIOS_VERSION, but I did so at Kontron's
preference. Now we're seeing the fallout (sooner than I expected).
So the question is, do we treat these as separate devices (the board and
the development kit which I believe includes your board) or do we lump
them together.
Since it is the firmware that ultimately decides what the initial
UARTCLK is, we can't base this on the hardware alone. The hardware in
fact should be default if a firmware match isn't found first. So, my
preference would be that you move your new comparison AFTER the FRI2
DMI_BIOS_VERSION comparison. This ensures the FRI2 doesn't match your
new comparison which might get a different UARTCLK in the future for
whatever reason.
Thanks,
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply
* Re: [PATCH] pch_uart: Add Kontron COMe-mTT10 uart clock quirk
From: Michael Brunner @ 2012-03-22 21:31 UTC (permalink / raw)
To: Darren Hart
Cc: Linux Kernel Mailing List, Greg Kroah-Hartman, Alan Cox,
linux-serial
In-Reply-To: <4F6B8E1B.9080802@linux.intel.com>
> These boards should already be supported by the following BIOS check.
> As the DMI_BOARD_NAME was changing, it was Kontron's recommendation
> to use the FRI2 prefix in the DMI_BIOS_VERSION.
>
>
> > cmp = dmi_get_system_info(DMI_BIOS_VERSION);
> > if (cmp && strnstr(cmp, "FRI2", 4))
>
> Is this not working for you? If not, what is the DMI_BIOS_VERSION
> reported by your board?
>
> And for clarification, we are talking about this right:
> http://us.kontron.com/products/systems+and+platforms/m2m/m2m+smart+services+developer+kit.html
My changes refer to the embedded module with the project code NTC1:
<http://us.kontron.com/products/computeronmodules/com+express/com+express+mini/comemtt10.html>
So unfortunately the FRI2 checks won't work for this.
Michael
^ permalink raw reply
* Re: [PATCH] pch_uart: Add Kontron COMe-mTT10 uart clock quirk
From: Darren Hart @ 2012-03-22 20:39 UTC (permalink / raw)
To: Michael Brunner
Cc: Linux Kernel Mailing List, Greg Kroah-Hartman, Alan Cox,
linux-serial
In-Reply-To: <20120322211903.6776ab18@mail.gmx.de>
On 03/22/2012 01:19 PM, Michael Brunner wrote:
> Add UART clock quirk for the Kontron COMe-mTT10 module.
> The board has previously been called nanoETXexpress-TT, therefore this
> is also checked.
>
> This patch follows the patchset submitted by Darren Hart at
> commit a46f5533ecfc7bbdd646d84fdab8656031a715c6.
>
> Signed-off-by: Michael Brunner <mibru@gmx.de>
> ---
> drivers/tty/serial/pch_uart.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
> index 332f2eb..0ab5295 100644
> --- a/drivers/tty/serial/pch_uart.c
> +++ b/drivers/tty/serial/pch_uart.c
> @@ -210,6 +210,7 @@ enum {
> #define CMITC_UARTCLK 192000000 /* 192.0000 MHz */
> #define FRI2_64_UARTCLK 64000000 /* 64.0000 MHz */
> #define FRI2_48_UARTCLK 48000000 /* 48.0000 MHz */
> +#define NTC1_UARTCLK 64000000 /* 64.0000 MHz */
>
> struct pch_uart_buffer {
> unsigned char *buf;
> @@ -379,6 +380,10 @@ static int pch_uart_get_uartclk(void)
> cmp = dmi_get_system_info(DMI_BOARD_NAME);
> if (cmp && strstr(cmp, "CM-iTC"))
> return CMITC_UARTCLK;
> + /* Kontron COMe-mTT10 (nanoETXexpress-TT) */
> + if (cmp && (strstr(cmp, "COMe-mTT") ||
> + strstr(cmp, "nanoETXexpress-TT")))
> + return NTC1_UARTCLK;
These boards should already be supported by the following BIOS check. As
the DMI_BOARD_NAME was changing, it was Kontron's recommendation to use
the FRI2 prefix in the DMI_BIOS_VERSION.
> cmp = dmi_get_system_info(DMI_BIOS_VERSION);
> if (cmp && strnstr(cmp, "FRI2", 4))
Is this not working for you? If not, what is the DMI_BIOS_VERSION
reported by your board?
And for clarification, we are talking about this right:
http://us.kontron.com/products/systems+and+platforms/m2m/m2m+smart+services+developer+kit.html
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply
* [PATCH] pch_uart: Add Kontron COMe-mTT10 uart clock quirk
From: Michael Brunner @ 2012-03-22 20:19 UTC (permalink / raw)
To: Linux Kernel Mailing List
Cc: Greg Kroah-Hartman, Alan Cox, Darren Hart, linux-serial
Add UART clock quirk for the Kontron COMe-mTT10 module.
The board has previously been called nanoETXexpress-TT, therefore this
is also checked.
This patch follows the patchset submitted by Darren Hart at
commit a46f5533ecfc7bbdd646d84fdab8656031a715c6.
Signed-off-by: Michael Brunner <mibru@gmx.de>
---
drivers/tty/serial/pch_uart.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index 332f2eb..0ab5295 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -210,6 +210,7 @@ enum {
#define CMITC_UARTCLK 192000000 /* 192.0000 MHz */
#define FRI2_64_UARTCLK 64000000 /* 64.0000 MHz */
#define FRI2_48_UARTCLK 48000000 /* 48.0000 MHz */
+#define NTC1_UARTCLK 64000000 /* 64.0000 MHz */
struct pch_uart_buffer {
unsigned char *buf;
@@ -379,6 +380,10 @@ static int pch_uart_get_uartclk(void)
cmp = dmi_get_system_info(DMI_BOARD_NAME);
if (cmp && strstr(cmp, "CM-iTC"))
return CMITC_UARTCLK;
+ /* Kontron COMe-mTT10 (nanoETXexpress-TT) */
+ if (cmp && (strstr(cmp, "COMe-mTT") ||
+ strstr(cmp, "nanoETXexpress-TT")))
+ return NTC1_UARTCLK;
cmp = dmi_get_system_info(DMI_BIOS_VERSION);
if (cmp && strnstr(cmp, "FRI2", 4))
^ permalink raw reply related
* Re: [PATCH] serial: PL011: move interrupt clearing
From: Linus Walleij @ 2012-03-22 8:00 UTC (permalink / raw)
To: viresh kumar
Cc: linux-serial, Greg Kroah-Hartman, Russell King, Jong-Sung Kim,
stable, Chanho Min, linux-arm-kernel, Shreshtha Kumar Sahu,
spear-devel
In-Reply-To: <CAOh2x==5QHEcA3h216p8rJukx0LR=cVcGYN84aqzw=fnhu8Y-g@mail.gmail.com>
On Thu, Mar 22, 2012 at 2:04 AM, viresh kumar <viresh.linux@gmail.com> wrote:
>> Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Cc: stable <stable@vger.kernel.org>
>> Reported-by: Viresh Kumar <viresh.kumar@st.com>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> drivers/tty/serial/amba-pl011.c | 8 ++++----
>> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> You missed me in CC??
I put you in Reported-by, then used --cc at the prompt because git send-email
still does not realize it must put Reported-by: tags on the CC list.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
From: Raja, Govindraj @ 2012-03-22 6:59 UTC (permalink / raw)
To: Kevin Hilman
Cc: linux-omap, linux-serial, linux-arm-kernel, Paul Walmsley,
Felipe Balbi
In-Reply-To: <87limurpsx.fsf@ti.com>
On Wed, Mar 21, 2012 at 7:58 PM, Kevin Hilman <khilman@ti.com> wrote:
> "Govindraj.R" <govindraj.raja@ti.com> writes:
>
>> From: "Govindraj.R" <govindraj.raja@ti.com>
>>
>> Based on Linux-OMAP tree uart branch.
>> (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
>> remotes/origin/uart)
>>
>> * Removes the cpu checks wherever possible and use version reg
>> for populating features and errata's
>> * enable tx wakeup available in wer reg for applicable
>> module revision's
>
> As this affects multiple SoCs, please report what SoCs it was tested on
> as well.
Sorry I for got to add that, here are details on what was tested.
1.) OMAP2430 SDP : Boot tested with uart1 as console.
2.) OMAP3430 SDP: Boot test, suspend/resume tests, retention off mode
(checking retention and off mode count
in cpu idle cases)
3.) OMAP3630 - Beagle XM: Boot test, suspend/resume tests, retention off mode
(checking retention and
off mode count in cpu idle cases)
4.) OMAP4430 - PANDA: Boot test, suspend/resume tests
5.) OMAP4460 - PANDA: Boot test.
--
Thanks,
Govindraj.R
>
> Thanks,
>
> Kevin
>
>> Govindraj.R (3):
>> OMAP2+: UART: Remove cpu checks for populating errata flags
>> OMAP2+: UART: enable tx wakeup bit for wer reg
>> OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
>>
>> arch/arm/mach-omap2/serial.c | 13 +----
>> arch/arm/plat-omap/include/plat/omap-serial.h | 8 +++-
>> drivers/tty/serial/omap-serial.c | 71 ++++++++++++++++++++++++-
>> 3 files changed, 78 insertions(+), 14 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] serial: PL011: move interrupt clearing
From: viresh kumar @ 2012-03-22 1:04 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-serial, Greg Kroah-Hartman, Russell King, Jong-Sung Kim,
stable, Chanho Min, linux-arm-kernel, Shreshtha Kumar Sahu,
spear-devel
In-Reply-To: <1332357318-8017-1-git-send-email-linus.walleij@linaro.org>
On Thu, Mar 22, 2012 at 12:45 AM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> Commit 360f748b204275229f8398cb2f9f53955db1503b
> "serial: PL011: clear pending interrupts"
> attempts to clear interrupts by writing to a
> yet-unassigned memory address. This fixes the issue.
>
> The breaking patch is marked for stable so should be
> carried along with the other patch.
>
> Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: stable <stable@vger.kernel.org>
> Reported-by: Viresh Kumar <viresh.kumar@st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/tty/serial/amba-pl011.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
You missed me in CC??
>
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 7e01399..4ed35c5 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -1930,10 +1930,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
> goto unmap;
> }
>
> - /* Ensure interrupts from this UART are masked and cleared */
> - writew(0, uap->port.membase + UART011_IMSC);
> - writew(0xffff, uap->port.membase + UART011_ICR);
> -
> uap->vendor = vendor;
> uap->lcrh_rx = vendor->lcrh_rx;
> uap->lcrh_tx = vendor->lcrh_tx;
> @@ -1951,6 +1947,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
> uap->port.line = i;
> pl011_dma_probe(uap);
>
> + /* Ensure interrupts from this UART are masked and cleared */
> + writew(0, uap->port.membase + UART011_IMSC);
> + writew(0xffff, uap->port.membase + UART011_ICR);
> +
> snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev));
>
> amba_ports[i] = uap;
Reviewed-by: Viresh Kumar <viresh.kumar@st.com>
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v3] serial: PL011: clear pending interrupts
From: viresh kumar @ 2012-03-22 0:41 UTC (permalink / raw)
To: Linus Walleij
Cc: Linus Walleij, Greg Kroah-Hartman, linux-serial, Chanho Min,
linux-arm-kernel, Russell King, Jong-Sung Kim, stable,
Shreshtha Kumar Sahu, spear-devel
In-Reply-To: <CACRpkdZ-epTV8dAY4gT9HKgPifRS_wfooy0QqEGsSgCqZ98MYw@mail.gmail.com>
On Thu, Mar 22, 2012 at 12:38 AM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> Strange, because these changes are not even in 3.3. Did you mean 3.4
> HEAD?
Ya. you are correct, actually i was switching between both of them and so
wrote 3.3 :(
> The uap->port is likely the problem. The clock does not need to be
> enabled for this, the clock that need to be enabled is the pclk and that
> should be taken care of by the amba/primecell core.
Ya. I know uap->port is the problem. But i thought like normal platform drivers
writers: "we need to enable clk too". And i was wrong :(.
> I'm sending a fixup patch to sort out my own screwing up.
Waiting for that.
--
viresh
^ permalink raw reply
* [PATCH] serial: PL011: move interrupt clearing
From: Linus Walleij @ 2012-03-21 19:15 UTC (permalink / raw)
To: linux-serial, Greg Kroah-Hartman
Cc: Russell King, Jong-Sung Kim, Linus Walleij, stable, Chanho Min,
linux-arm-kernel, Shreshtha Kumar Sahu
Commit 360f748b204275229f8398cb2f9f53955db1503b
"serial: PL011: clear pending interrupts"
attempts to clear interrupts by writing to a
yet-unassigned memory address. This fixes the issue.
The breaking patch is marked for stable so should be
carried along with the other patch.
Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: stable <stable@vger.kernel.org>
Reported-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/tty/serial/amba-pl011.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 7e01399..4ed35c5 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1930,10 +1930,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
goto unmap;
}
- /* Ensure interrupts from this UART are masked and cleared */
- writew(0, uap->port.membase + UART011_IMSC);
- writew(0xffff, uap->port.membase + UART011_ICR);
-
uap->vendor = vendor;
uap->lcrh_rx = vendor->lcrh_rx;
uap->lcrh_tx = vendor->lcrh_tx;
@@ -1951,6 +1947,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
uap->port.line = i;
pl011_dma_probe(uap);
+ /* Ensure interrupts from this UART are masked and cleared */
+ writew(0, uap->port.membase + UART011_IMSC);
+ writew(0xffff, uap->port.membase + UART011_ICR);
+
snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev));
amba_ports[i] = uap;
--
1.7.7.6
^ permalink raw reply related
* Re: [PATCH v3] serial: PL011: clear pending interrupts
From: Linus Walleij @ 2012-03-21 19:08 UTC (permalink / raw)
To: viresh kumar
Cc: Linus Walleij, Greg Kroah-Hartman, linux-serial, Chanho Min,
linux-arm-kernel, Russell King, Jong-Sung Kim, stable,
Shreshtha Kumar Sahu, spear-devel
In-Reply-To: <CAOh2x=nh-aiJ1FQecm=5WsNw=Fph5osNh5C2YU6x9TGrKBoMmA@mail.gmail.com>
On Wed, Mar 21, 2012 at 12:58 PM, viresh kumar <viresh.linux@gmail.com> wrote:
> On Tue, Mar 13, 2012 at 5:57 PM, Linus Walleij
> <linus.walleij@stericsson.com> wrote:
>> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
>> @@ -1927,6 +1930,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
>> goto unmap;
>> }
>>
>> + /* Ensure interrupts from this UART are masked and cleared */
>> + writew(0, uap->port.membase + UART011_IMSC);
>> + writew(0xffff, uap->port.membase + UART011_ICR);
>> +
>
> I was working on v3.3 and found a crash for my SoC. When i checked i got a crash
> due to above changes.
Strange, because these changes are not even in 3.3. Did you mean 3.4
HEAD?
> There are two issues here
> - uap->port is uninitialized
> - clk is not enabled.
>
> How is this working for you?
The uap->port is likely the problem. The clock does not need to be
enabled for this, the clock that need to be enabled is the pclk and that
should be taken care of by the amba/primecell core.
It worked because I had some system which didn't scream when it wrote
into that NULL-address for some reason :-(
I'm sending a fixup patch to sort out my own screwing up.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
From: Kevin Hilman @ 2012-03-21 14:28 UTC (permalink / raw)
To: Govindraj.R
Cc: linux-omap, linux-serial, linux-arm-kernel, Paul Walmsley,
Felipe Balbi
In-Reply-To: <1332325501-10467-1-git-send-email-govindraj.raja@ti.com>
"Govindraj.R" <govindraj.raja@ti.com> writes:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> Based on Linux-OMAP tree uart branch.
> (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
> remotes/origin/uart)
>
> * Removes the cpu checks wherever possible and use version reg
> for populating features and errata's
> * enable tx wakeup available in wer reg for applicable
> module revision's
As this affects multiple SoCs, please report what SoCs it was tested on
as well.
Thanks,
Kevin
> Govindraj.R (3):
> OMAP2+: UART: Remove cpu checks for populating errata flags
> OMAP2+: UART: enable tx wakeup bit for wer reg
> OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
>
> arch/arm/mach-omap2/serial.c | 13 +----
> arch/arm/plat-omap/include/plat/omap-serial.h | 8 +++-
> drivers/tty/serial/omap-serial.c | 71 ++++++++++++++++++++++++-
> 3 files changed, 78 insertions(+), 14 deletions(-)
^ permalink raw reply
* Easter Bonanza. (Congratulations)
From: Mrs. Laora Fernandez @ 2012-03-21 17:40 UTC (permalink / raw)
Sorteo 12, domingo, 18/03/2012
ELGR/idsorteo.793205012
ATTN: Lucky Winner,
This is to announce to you that your email attached to Elgordo De La Primitiva ticket number 1-13-26-29-54, Clave 4 won in the 2nd category balloting held 18/03/2012. Your category payout is €295.436,09 Euro. A copy of the ticket would be forwarded to you as evidence of play.
View results here: http://www.loteriasyapuestas.es/index.php/mod.sorteos/mem.sorteos/juego.ELGR/idsorteo.793205012
Contact your Claims Representative:
Name: Mr. David Santiago
Email: elgordo_processing@aol.com
Tel: +34-686-902-277
Congratulations.
Regards,
Mrs Laora Fernandez
Coordinator.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v3] serial: PL011: clear pending interrupts
From: viresh kumar @ 2012-03-21 11:58 UTC (permalink / raw)
To: Linus Walleij
Cc: Greg Kroah-Hartman, linux-serial, Chanho Min, linux-arm-kernel,
Russell King, Jong-Sung Kim, Linus Walleij, stable,
Shreshtha Kumar Sahu, spear-devel
In-Reply-To: <1331641643-25929-1-git-send-email-linus.walleij@stericsson.com>
On Tue, Mar 13, 2012 at 5:57 PM, Linus Walleij
<linus.walleij@stericsson.com> wrote:
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> @@ -1927,6 +1930,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
> goto unmap;
> }
>
> + /* Ensure interrupts from this UART are masked and cleared */
> + writew(0, uap->port.membase + UART011_IMSC);
> + writew(0xffff, uap->port.membase + UART011_ICR);
> +
Hey Linus,
I was working on v3.3 and found a crash for my SoC. When i checked i got a crash
due to above changes.
There are two issues here
- uap->port is uninitialized
- clk is not enabled.
How is this working for you?
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH v2] omap-serial: Fix the error handling in the omap_serial probe
From: Shubhrajyoti D @ 2012-03-21 11:52 UTC (permalink / raw)
To: linux-serial
Cc: linux-omap, linux-arm-kernel, Shubhrajyoti D, Mark Brown,
Govindraj.R
The patch does the following
- The pm_runtime_disable is called in the remove not in the error
case of probe.The patch calls the pm_runtime_disable in the error
case.
- Calls pm_runtime_put in the error case.
- The up is not freed in the error path. Fix the memory leak by using
devm_* so that the memory need not be freed in the driver.
- Also the iounmap is not called fix the same by calling using devm_ioremap.
- Make the name of the error tags more meaningful.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
Changes from the v1:
Use devm_* functions instead of freeing in the driver.
drivers/tty/serial/omap-serial.c | 43 +++++++++++++++++--------------------
1 files changed, 20 insertions(+), 23 deletions(-)
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 1e193fc..5386239 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -1381,29 +1381,24 @@ static int serial_omap_probe(struct platform_device *pdev)
return -ENODEV;
}
- if (!request_mem_region(mem->start, resource_size(mem),
+ if (!devm_request_mem_region(&pdev->dev, mem->start, resource_size(mem),
pdev->dev.driver->name)) {
dev_err(&pdev->dev, "memory region already claimed\n");
return -EBUSY;
}
dma_rx = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
- if (!dma_rx) {
- ret = -EINVAL;
- goto err;
- }
+ if (!dma_rx)
+ return -ENXIO;
dma_tx = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
- if (!dma_tx) {
- ret = -EINVAL;
- goto err;
- }
+ if (!dma_tx)
+ return -ENXIO;
+
+ up = devm_kzalloc(&pdev->dev, sizeof(*up), GFP_KERNEL);
+ if (!up)
+ return -ENOMEM;
- up = kzalloc(sizeof(*up), GFP_KERNEL);
- if (up == NULL) {
- ret = -ENOMEM;
- goto do_release_region;
- }
up->pdev = pdev;
up->port.dev = &pdev->dev;
up->port.type = PORT_OMAP;
@@ -1423,16 +1418,17 @@ static int serial_omap_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "failed to get alias/pdev id, errno %d\n",
up->port.line);
ret = -ENODEV;
- goto err;
+ goto err_port_line;
}
sprintf(up->name, "OMAP UART%d", up->port.line);
up->port.mapbase = mem->start;
- up->port.membase = ioremap(mem->start, resource_size(mem));
+ up->port.membase = devm_ioremap(&pdev->dev, mem->start,
+ resource_size(mem));
if (!up->port.membase) {
dev_err(&pdev->dev, "can't ioremap UART\n");
ret = -ENOMEM;
- goto err;
+ goto err_ioremap;
}
up->port.flags = omap_up_info->flags;
@@ -1478,16 +1474,19 @@ static int serial_omap_probe(struct platform_device *pdev)
ret = uart_add_one_port(&serial_omap_reg, &up->port);
if (ret != 0)
- goto do_release_region;
+ goto err_add_port;
pm_runtime_put(&pdev->dev);
platform_set_drvdata(pdev, up);
return 0;
-err:
+
+err_add_port:
+ pm_runtime_put(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+err_ioremap:
+err_port_line:
dev_err(&pdev->dev, "[UART%d]: failure [%s]: %d\n",
pdev->id, __func__, ret);
-do_release_region:
- release_mem_region(mem->start, resource_size(mem));
return ret;
}
@@ -1499,8 +1498,6 @@ static int serial_omap_remove(struct platform_device *dev)
pm_runtime_disable(&up->pdev->dev);
uart_remove_one_port(&serial_omap_reg, &up->port);
pm_qos_remove_request(&up->pm_qos_request);
-
- kfree(up);
}
platform_set_drvdata(dev, NULL);
--
1.7.1
^ permalink raw reply related
* [PATCH 3/3] OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
From: Govindraj.R @ 2012-03-21 10:25 UTC (permalink / raw)
To: linux-omap
Cc: linux-serial, linux-arm-kernel, Kevin Hilman, Paul Walmsley,
Felipe Balbi, Govindraj.R
In-Reply-To: <1332325501-10467-1-git-send-email-govindraj.raja@ti.com>
From: "Govindraj.R" <govindraj.raja@ti.com>
Minor cleanup, replace all omap34xx/omap44xx cpu checks with
cpu is not omap24xx check.
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <balbi@ti.com
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
arch/arm/mach-omap2/serial.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 330ee04..83ab5a2 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -377,8 +377,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
oh->dev_attr = uart;
- if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
- && !uart_debug)
+ if ((!cpu_is_omap24xx() && bdata->pads) && !uart_debug)
device_init_wakeup(&pdev->dev, true);
}
@@ -401,7 +400,7 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
bdata.pads = NULL;
bdata.pads_cnt = 0;
- if (cpu_is_omap44xx() || cpu_is_omap34xx())
+ if (!cpu_is_omap24xx())
omap_serial_fill_default_pads(&bdata);
if (!info)
--
1.7.5.4
^ permalink raw reply related
* [PATCH 2/3] OMAP2+: UART: enable tx wakeup bit for wer reg
From: Govindraj.R @ 2012-03-21 10:25 UTC (permalink / raw)
To: linux-omap
Cc: linux-serial, linux-arm-kernel, Kevin Hilman, Paul Walmsley,
Felipe Balbi, Govindraj.R
In-Reply-To: <1332325501-10467-1-git-send-email-govindraj.raja@ti.com>
From: "Govindraj.R" <govindraj.raja@ti.com>
>From omap36xx onwards the module wakeup enable reg
wer has TX wakeup bit available enable the same
by populating the necessary tx wakeup flag for the
applicable module ip blocks and use the same
while configuaring wer reg.
Also wer is not context restored, restore wer when
context is lost.
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <balbi@ti.com
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
arch/arm/plat-omap/include/plat/omap-serial.h | 7 +++++++
drivers/tty/serial/omap-serial.c | 9 ++++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 1a52725..8a4ca5c 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -61,6 +61,11 @@
#define UART_ERRATA_i202_MDR1_ACCESS BIT(0)
#define UART_ERRATA_i291_DMA_FORCEIDLE BIT(1)
+#define OMAP_UART_TX_WAKEUP_EN BIT(7)
+
+/* Feature flags */
+#define OMAP_UART_WER_HAS_TX_WAKEUP BIT(0)
+
struct omap_uart_port_info {
bool dma_enabled; /* To specify DMA Mode */
unsigned int uartclk; /* UART clock rate */
@@ -116,6 +121,7 @@ struct uart_omap_port {
unsigned char dlh;
unsigned char mdr1;
unsigned char scr;
+ unsigned char wer;
int use_dma;
/*
@@ -129,6 +135,7 @@ struct uart_omap_port {
unsigned long port_activity;
u32 context_loss_cnt;
u32 errata;
+ u32 features;
u8 wakeups_enabled;
struct pm_qos_request pm_qos_request;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index c7666d6..20d568d 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -585,7 +585,11 @@ static int serial_omap_startup(struct uart_port *port)
serial_out(up, UART_IER, up->ier);
/* Enable module level wake up */
- serial_out(up, UART_OMAP_WER, OMAP_UART_WER_MOD_WKUP);
+ up->wer = OMAP_UART_WER_MOD_WKUP;
+ if (up->features & OMAP_UART_WER_HAS_TX_WAKEUP)
+ up->wer |= OMAP_UART_TX_WAKEUP_EN;
+
+ serial_out(up, UART_OMAP_WER, up->wer);
pm_runtime_mark_last_busy(&up->pdev->dev);
pm_runtime_put_autosuspend(&up->pdev->dev);
@@ -1396,9 +1400,11 @@ static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
case OMAP_UART_REV_52:
up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
UART_ERRATA_i291_DMA_FORCEIDLE);
+ up->features |= OMAP_UART_WER_HAS_TX_WAKEUP;
break;
case OMAP_UART_REV_63:
up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
+ up->features |= OMAP_UART_WER_HAS_TX_WAKEUP;
break;
default:
break;
@@ -1629,6 +1635,7 @@ static void serial_omap_restore_context(struct uart_omap_port *up)
serial_omap_mdr1_errataset(up, up->mdr1);
else
serial_out(up, UART_OMAP_MDR1, up->mdr1);
+ serial_out(up, UART_OMAP_WER, up->wer);
}
static int serial_omap_runtime_suspend(struct device *dev)
--
1.7.5.4
^ permalink raw reply related
* [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
From: Govindraj.R @ 2012-03-21 10:24 UTC (permalink / raw)
To: linux-omap
Cc: linux-serial, linux-arm-kernel, Kevin Hilman, Paul Walmsley,
Felipe Balbi, Govindraj.R
In-Reply-To: <1332325501-10467-1-git-send-email-govindraj.raja@ti.com>
From: "Govindraj.R" <govindraj.raja@ti.com>
Currently the errata is populated based on cpu checks this can
be removed and replaced with module version check of uart ip block.
MVR reg is provided within the uart reg map use the same
to populate the errata and thus now errata population and handling
can be managed within the driver itself.
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
arch/arm/mach-omap2/serial.c | 8 ---
arch/arm/plat-omap/include/plat/omap-serial.h | 1 -
drivers/tty/serial/omap-serial.c | 62 ++++++++++++++++++++++++-
3 files changed, 61 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index f590afc..330ee04 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
omap_up.autosuspend_timeout = info->autosuspend_timeout;
- /* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
- if (!cpu_is_omap2420() && !cpu_is_ti816x())
- omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
-
- /* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
- if (cpu_is_omap34xx() || cpu_is_omap3630())
- omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
-
pdata = &omap_up;
pdata_size = sizeof(struct omap_uart_port_info);
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 9ff4444..1a52725 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -65,7 +65,6 @@ struct omap_uart_port_info {
bool dma_enabled; /* To specify DMA Mode */
unsigned int uartclk; /* UART clock rate */
upf_t flags; /* UPF_* flags */
- u32 errata;
unsigned int dma_rx_buf_size;
unsigned int dma_rx_timeout;
unsigned int autosuspend_timeout;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index f809041..c7666d6 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -44,6 +44,13 @@
#include <plat/dmtimer.h>
#include <plat/omap-serial.h>
+#define UART_BUILD_REVISION(x, y) (((x) << 8) | (y))
+
+#define OMAP_UART_REV_42 0x0402
+#define OMAP_UART_REV_46 0x0406
+#define OMAP_UART_REV_52 0x0502
+#define OMAP_UART_REV_63 0x0603
+
#define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
/* SCR register bitmasks */
@@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
return;
}
+static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
+{
+ u32 mvr, scheme;
+ u16 revision, major, minor;
+
+ mvr = serial_in(up, UART_OMAP_MVER);
+
+ /* Check revision register scheme */
+ scheme = mvr & (0x03 << 30);
+ scheme >>= 30;
+
+ switch (scheme) {
+ case 0: /* Legacy Scheme: OMAP2/3 */
+ /* MINOR_REV[0:4], MAJOR_REV[4:7] */
+ major = (mvr & 0xf0) >> 4;
+ minor = (mvr & 0x0f);
+ break;
+ case 1:
+ /* New Scheme: OMAP4+ */
+ /* MINOR_REV[0:5], MAJOR_REV[8:10] */
+ major = (mvr & 0x7 << 8) >> 8;
+ minor = (mvr & 0x3f);
+ break;
+ default:
+ dev_warn(&up->pdev->dev,
+ "Unknown %s revision, defaulting to highest\n",
+ up->name);
+ /* highest possible revision */
+ major = 0xff;
+ minor = 0xff;
+ }
+
+ /* normalize revision for the driver */
+ revision = UART_BUILD_REVISION(major, minor);
+
+ switch (revision) {
+ case OMAP_UART_REV_46:
+ up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+ UART_ERRATA_i291_DMA_FORCEIDLE);
+ break;
+ case OMAP_UART_REV_52:
+ up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+ UART_ERRATA_i291_DMA_FORCEIDLE);
+ break;
+ case OMAP_UART_REV_63:
+ up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
+ break;
+ default:
+ break;
+ }
+}
+
static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
{
struct omap_uart_port_info *omap_up_info;
@@ -1443,7 +1502,6 @@ static int serial_omap_probe(struct platform_device *pdev)
"%d\n", DEFAULT_CLK_SPEED);
}
up->uart_dma.uart_base = mem->start;
- up->errata = omap_up_info->errata;
if (omap_up_info->dma_enabled) {
up->uart_dma.uart_dma_tx = dma_tx->start;
@@ -1473,6 +1531,8 @@ static int serial_omap_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
pm_runtime_get_sync(&pdev->dev);
+ omap_serial_fill_features_erratas(up);
+
ui[up->port.line] = up;
serial_omap_add_console_port(up);
--
1.7.5.4
^ permalink raw reply related
* [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
From: Govindraj.R @ 2012-03-21 10:24 UTC (permalink / raw)
To: linux-omap
Cc: linux-serial, linux-arm-kernel, Kevin Hilman, Paul Walmsley,
Felipe Balbi, Govindraj.R
From: "Govindraj.R" <govindraj.raja@ti.com>
Based on Linux-OMAP tree uart branch.
(git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
remotes/origin/uart)
* Removes the cpu checks wherever possible and use version reg
for populating features and errata's
* enable tx wakeup available in wer reg for applicable
module revision's
Govindraj.R (3):
OMAP2+: UART: Remove cpu checks for populating errata flags
OMAP2+: UART: enable tx wakeup bit for wer reg
OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
arch/arm/mach-omap2/serial.c | 13 +----
arch/arm/plat-omap/include/plat/omap-serial.h | 8 +++-
drivers/tty/serial/omap-serial.c | 71 ++++++++++++++++++++++++-
3 files changed, 78 insertions(+), 14 deletions(-)
--
1.7.5.4
^ permalink raw reply
* [GIT PATCH] TTY/serial patches for 3.4-rc1
From: Greg KH @ 2012-03-19 19:56 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, linux-serial
The following changes since commit 19e00f2f1d5273dbc52eab0ebc315cae3aa44b2a:
Merge tag 'tty-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty (2012-02-09 13:52:57 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git/ tags/tty-3.3
for you to fetch changes up to fb8ebec00b04f921ea1614a7303f1a8e5e9e47c5:
serial: pxa: add clk_prepare/clk_unprepare calls (2012-03-15 13:46:04 -0700)
----------------------------------------------------------------
tty and serial merge for 3.4-rc1
Here's the big serial and tty merge for the 3.4-rc1 tree.
There's loads of fixes and reworks in here from Jiri for the tty layer,
and a number of patches from Alan to help try to wrestle the vt layer
into a sane model.
Other than that, lots of driver updates and fixes, and other minor
stuff, all detailed in the shortlog.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----------------------------------------------------------------
Alan Cox (9):
serial: Kill off NO_IRQ
vt: lock the accent table
vt: tidy a few bits of checkpatch noise
vt:tackle kbd_table
vt: sort out locking for font handling
vt: push down the tty lock so we can see what is left to tackle
vt: push down tioclinux cases
vt: waitevent is self locked so drop the tty_lock
vt: tackle the main part of the selection logic
Anton Vorontsov (2):
sysrq: Fix possible race with exiting task
sysrq: Properly check for kernel threads
Chanho Min (1):
amba-pl011/dma: Add check for the residue in DMA callback
Cousson, Benoit (1):
tty: serial: OMAP: Fix oops due to NULL pdata in DT boot
Dan Carpenter (3):
tty: cyclades: TIOCSERGETLSR should should store to a uint
tty: moxa: fix bit test in moxa_start()
vt: NULL dereference in vt_do_kdsk_ioctl()
Danny Kukawka (1):
tty/serial/mux.c: linux/tty.h included twice
Darren Hart (5):
pch_uart: Use uartclk instead of base_baud
pch_uart: Add Fish River Island II uart clock quirks
pch_uart: Add user_uartclk parameter
pch_uart: Use existing default_baud in setup_console
pch_uart: Add module parameter descriptions
Denis 'GNUtoo' Carikli (1):
serial: samsung: fix s3c2442 platform data
Feng Tang (3):
serial: pch_uart: add debugfs hook for register dump
serial: pch_uart: trivial cleanup by removing the get_msr()
serial: pch_uart: trivail cleanup by removing the pch_uart_hal_request()
Frank Benkert (1):
mpc5200b/uart: select more tolerant uart prescaler on low baudrates
Greg Kroah-Hartman (5):
Merge tag 'tty-3.3-rc3' tty-next
Revert "TTY: get rid of BTM around devpts_*"
Revert "TTY: pty, remove superfluous ptm test"
tty: keyboard.c: add uaccess.h to fix a build problem on sparc32
tty: delete briq_panel.c driver
Jiri Slaby (77):
TTY: provide tty_standard_install helper
USB: serial, use tty_standard_install
TTY: use tty_standard_install
TTY: pty, remove superfluous ptm test
TTY: get rid of BTM around devpts_*
USB: cdc-acm, use tty_standard_install
TTY: tty_io, remove buffer re-assignments
TTY: let alloc_tty_driver deduce the owner automatically
TTY: remove minor_num from tty_driver
TTY: remove re-assignments to tty_driver members
TTY: simplify tty_driver_lookup_tty a bit
TTY: remove tty driver re-set from tty_reopen
TTY: serial, simplify ASYNC_USR_MASK
TTY: tty_driver, document tty->ops->shutdown limitation
ALPHA: srmcons, use timer functions
ALPHA: srmcons, fix racy singleton structure
TTY: srmcons, convert to use tty_port
TTY: serialP, remove DECLARE_WAITQUEUE check
TTY: remove unneeded tty->index checks
TTY: ipwireless, fix tty->index handling
NET: pc300, do not zero global variables
NET: pc300, show version info from module init
XTENSA: iss/console, use setup_timer
XTENSA: iss/console, fix potential deadlock
TTY: iss/console, use tty_port
TTY: serial, use atomic_inc_return in ioc4_serial
TTY: serial, include pci.h in m32r_sio
TTY: remove serialP.h inclusion from some files
TTY: speakup, do not use serialP
TTY: serialP, remove unused material
TTY: amiserial, remove tasklet for tty_wakeup
TTY: amiserial, use only one copy of async flags
hpsim, fix SAL handling in fw-emu
simserial, include some headers
hpsim, initialize chip for assigned irqs
simserial, bail out when request_irq fails
TTY: simserial, use only one copy of async flags
TTY: simserial/amiserial, use one instance of other members
TTY: simserial, remove support of shared interrupts
TTY: simserial, remove IRQ_T
TTY: amiserial, remove IRQ_ports
TTY: serialP, merge serial_state and async_struct
TTY: amiserial, simplify set_serial_info
TTY: amiserial, pass tty down to functions
TTY: simserial, pass tty down to functions
TTY: amiserial/simserial, use tty_port
TTY: amiserial/simserial, use close delays from tty_port
TTY: amiserial/simserial, use count from tty_port
TTY: amiserial/simserial, use flags from tty_port
TTY: simserial, remove static initialization
TTY: simserial, remove tmp_buf
TTY: simserial, stop using serial_state->{line,icount}
TTY: simserial no longer needs serialP
TTY: simserial, define local tty_port pointer
TTY: simserial, remove some tty ops
TTY: simserial, use tty_port_close_end
TTY: simserial, use tty_port_close_start
TTY: simserial, properly refcount tty_port->tty
TTY: simserial, use tty_port_open
TTY: simserial, use tty_port_hangup
TTY: simserial, remove useless comments
TTY: simserial, fix includes
TTY: simserial, reindent some code
TTY: simserial, final cleanup
TTY: amiserial, define local tty_port pointer
TTY: amiserial, stop using serial_state->{irq,type,line}
TTY: amiserial no longer needs serialP
TTY: amiserial, provide carrier helpers
TTY: amiserial, use tty_port_block_til_ready
TTY: amiserial, use tty_port_close_end
TTY: amiserial, use tty_port_close_start
TTY: pdc_cons, fix racy tty test
TTY: pdc_cons, fix open vs timer race
TTY: pdc_cons, fix open vs pdc_console_tty_driver race
TTY: pdc_cons, use tty_port
TTY: isdn/gigaset, do not set tty->driver_data to NULL
TTY: isdn/gigaset, use tty_port
Konstantin Khlebnikov (3):
tty: cleanup prohibition of direct opening for unix98 pty master
tty: move pty count limiting into devpts
tty: rework pty count limiting
Linus Walleij (1):
serial: PL011: clear pending interrupts
Liz Clark (1):
TTY: Wrong unicode value copied in con_set_unimap()
Masanari Iida (1):
serial: Fix typo in sn_console.c
Paul Gortmaker (8):
tty: sparc: rename drivers/tty/serial/suncore.h -> include/linux/sunserialcore.h
serial: delete last unused traces of pausing I/O in 8250
serial: make 8250's serial_in shareable to other drivers.
serial: delete useless void casts in 8250.c
serial: reduce number of indirections in 8250 code
serial: introduce generic port in/out helpers
serial: use serial_port_in/out vs serial_in/out in 8250
serial: remove back and forth conversions in serial_out_sync
Paul Walmsley (3):
tty: serial: OMAP: use a 1-byte RX FIFO threshold in PIO mode
tty: serial: OMAP: block idle while the UART is transferring data in PIO mode
tty: serial: omap-serial: wakeup latency constraint is in microseconds, not milliseconds
Philipp Zabel (1):
serial: pxa: add clk_prepare/clk_unprepare calls
Sonic Zhang (1):
serial: bfin-uart: Don't access tty circular buffer in TX DMA interrupt after it is reset.
Stephen Rothwell (1):
tty/powerpc: early udbg consoles can't be modules
Tobias Klauser (2):
tty: serial: altera_uart: remove early_altera_uart_setup
tty: serial: altera_uart: Add CONSOLE_POLL support
Uwe Kleine-König (1):
serial/efm32: add new driver
Wolfram Sang (1):
tty: serial: vt8500: fix annotations for probe/remove
.../devicetree/bindings/tty/serial/efm32-uart.txt | 14 +
MAINTAINERS | 2 +-
arch/alpha/kernel/srmcons.c | 78 +-
arch/ia64/hp/sim/boot/fw-emu.c | 17 +-
arch/ia64/hp/sim/hpsim_irq.c | 36 +-
arch/ia64/hp/sim/hpsim_setup.c | 6 -
arch/ia64/hp/sim/simeth.c | 19 +-
arch/ia64/hp/sim/simserial.c | 705 ++++-------------
arch/ia64/include/asm/hpsim.h | 2 +-
arch/m68k/emu/nfcon.c | 1 -
arch/parisc/kernel/pdc_cons.c | 59 +-
arch/xtensa/platforms/iss/console.c | 22 +-
drivers/accessibility/braille/braille_console.c | 9 +-
drivers/char/Kconfig | 15 -
drivers/char/Makefile | 1 -
drivers/char/briq_panel.c | 266 -------
drivers/char/pcmcia/synclink_cs.c | 3 +-
drivers/char/ttyprintk.c | 2 -
drivers/isdn/capi/capi.c | 13 +-
drivers/isdn/gigaset/common.c | 5 +-
drivers/isdn/gigaset/gigaset.h | 3 +-
drivers/isdn/gigaset/interface.c | 158 +---
drivers/isdn/i4l/isdn_tty.c | 7 +-
drivers/misc/pti.c | 12 +-
drivers/mmc/card/sdio_uart.c | 10 +-
drivers/net/usb/hso.c | 2 -
drivers/net/wan/pc300_drv.c | 13 +-
drivers/net/wan/pc300_tty.c | 18 -
drivers/s390/char/con3215.c | 9 +-
drivers/s390/char/sclp_tty.c | 1 -
drivers/s390/char/sclp_vt220.c | 1 -
drivers/s390/char/tty3270.c | 1 -
drivers/staging/speakup/main.c | 8 +-
drivers/staging/speakup/serialio.c | 11 +-
drivers/staging/speakup/serialio.h | 13 +-
drivers/staging/speakup/spk_priv.h | 2 +-
drivers/staging/speakup/synth.c | 2 +-
drivers/tty/Kconfig | 2 +-
drivers/tty/amiserial.c | 730 ++++++-----------
drivers/tty/bfin_jtag_comm.c | 1 -
drivers/tty/cyclades.c | 9 +-
drivers/tty/ehv_bytechan.c | 1 -
drivers/tty/hvc/hvc_beat.c | 2 +-
drivers/tty/hvc/hvc_console.c | 1 -
drivers/tty/hvc/hvc_rtas.c | 2 +-
drivers/tty/hvc/hvc_udbg.c | 2 +-
drivers/tty/hvc/hvc_xen.c | 2 +-
drivers/tty/hvc/hvcs.c | 30 +-
drivers/tty/hvc/hvsi.c | 8 +-
drivers/tty/ipwireless/tty.c | 37 +-
drivers/tty/isicom.c | 3 -
drivers/tty/moxa.c | 3 +-
drivers/tty/mxser.c | 5 -
drivers/tty/n_gsm.c | 1 -
drivers/tty/nozomi.c | 9 +-
drivers/tty/pty.c | 63 +-
drivers/tty/rocket.c | 7 +-
drivers/tty/serial/21285.c | 4 +-
drivers/tty/serial/68328serial.c | 9 +-
drivers/tty/serial/8250/8250.c | 744 +++++++++---------
drivers/tty/serial/8250/8250.h | 10 +
drivers/tty/serial/Kconfig | 13 +
drivers/tty/serial/Makefile | 3 +-
drivers/tty/serial/altera_uart.c | 47 +-
drivers/tty/serial/amba-pl011.c | 32 +-
drivers/tty/serial/bfin_uart.c | 8 +-
drivers/tty/serial/crisv10.c | 15 +-
drivers/tty/serial/efm32-uart.c | 830 ++++++++++++++++++++
drivers/tty/serial/ifx6x60.c | 3 -
drivers/tty/serial/ioc4_serial.c | 3 +-
drivers/tty/serial/m32r_sio.c | 12 +-
drivers/tty/serial/m32r_sio.h | 1 +
drivers/tty/serial/mpc52xx_uart.c | 9 +-
drivers/tty/serial/msm_smd_tty.c | 1 -
drivers/tty/serial/mux.c | 3 +-
drivers/tty/serial/omap-serial.c | 6 +-
drivers/tty/serial/pch_uart.c | 172 ++--
drivers/tty/serial/pmac_zilog.c | 2 +-
drivers/tty/serial/pxa.c | 8 +-
drivers/tty/serial/samsung.c | 2 +-
drivers/tty/serial/serial_core.c | 1 -
drivers/tty/serial/sn_console.c | 4 +-
drivers/tty/serial/suncore.c | 2 +-
drivers/tty/serial/sunhv.c | 3 +-
drivers/tty/serial/sunsab.c | 2 +-
drivers/tty/serial/sunsu.c | 3 +-
drivers/tty/serial/sunzilog.c | 12 +-
drivers/tty/serial/ucc_uart.c | 2 +-
drivers/tty/serial/vr41xx_siu.c | 4 +-
drivers/tty/serial/vt8500_serial.c | 4 +-
drivers/tty/synclink.c | 3 +-
drivers/tty/synclink_gt.c | 3 +-
drivers/tty/synclinkmp.c | 3 +-
drivers/tty/sysrq.c | 17 +-
drivers/tty/tty_io.c | 54 +-
drivers/tty/vt/consolemap.c | 51 +-
drivers/tty/vt/keyboard.c | 803 ++++++++++++++++++-
drivers/tty/vt/selection.c | 58 +-
drivers/tty/vt/vc_screen.c | 4 +-
drivers/tty/vt/vt.c | 66 +-
drivers/tty/vt/vt_ioctl.c | 495 ++----------
drivers/usb/class/cdc-acm.c | 8 +-
drivers/usb/gadget/u_serial.c | 4 -
drivers/usb/serial/usb-serial.c | 17 +-
fs/devpts/inode.c | 85 +-
include/linux/altera_uart.h | 4 -
include/linux/kbd_kern.h | 7 +-
include/linux/keyboard.h | 2 -
include/linux/platform_data/efm32-uart.h | 18 +
include/linux/serial.h | 4 +-
include/linux/serialP.h | 142 ----
include/linux/serial_core.h | 12 +
.../suncore.h => include/linux/sunserialcore.h | 2 +-
include/linux/tty.h | 6 +-
include/linux/tty_driver.h | 8 +-
include/linux/vt_kern.h | 26 +
net/bluetooth/rfcomm/tty.c | 1 -
net/irda/ircomm/ircomm_tty.c | 7 +-
118 files changed, 3208 insertions(+), 3140 deletions(-)
create mode 100644 Documentation/devicetree/bindings/tty/serial/efm32-uart.txt
delete mode 100644 drivers/char/briq_panel.c
create mode 100644 drivers/tty/serial/efm32-uart.c
create mode 100644 include/linux/platform_data/efm32-uart.h
delete mode 100644 include/linux/serialP.h
rename drivers/tty/serial/suncore.h => include/linux/sunserialcore.h (98%)
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 00/68] TTY buffer in tty_port -- prep no. 1
From: Geert Uytterhoeven @ 2012-03-18 8:56 UTC (permalink / raw)
To: Jiri Slaby; +Cc: gregkh, alan, linux-serial, linux-kernel, jirislaby
In-Reply-To: <1330955575-26641-1-git-send-email-jslaby@suse.cz>
Hi Jiri,
On Mon, Mar 5, 2012 at 14:51, Jiri Slaby <jslaby@suse.cz> wrote:
> this is the first series of patches which allow tty buffers to be
> moved from tty_struct (present from open to close/hangup) to tty_port
> (present as long as the device). This will allow us to get rid of the
> tty refcounting in the interrupt service routines and other hot paths
> after we are done. This is because we won't need to handle races among
> ISRs, timers, hangups and others, because tty_port lives as long as an
> interrupt/timer tick may occur. Unlike tty_struct.
>
> In this series, only first few drivers are converted to use
> tty_port. The rest is to come later.
>
> The first few patches are simple fixes/cleanups which emerged during
> the code investigation here and there. Further serialP header removal
> happens there. Finally, some drivers are forced to use tty_port, which
> will become a necessity in the future.
>
> Simserial (ia64) and standard x86 stuff were runtime-tested. The rest
> is only checked to be compilation-errors free.
I had a look at all 19 patches touching amiserial, and they look fine. So
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Thanks for the cleanup!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* $500,000.00 Lodged
From: Western Union @ 2012-03-15 1:25 UTC (permalink / raw)
Please be informed that you have $500,000.00 Lodged in our Western Union to
transfer to you as Compensation. Contact Mr.Milton Daniel Further detail Via
Email: western.union1424@yahoo.com.hk
^ permalink raw reply
* [PATCH] spi/pxa: add clk_prepare/clk_unprepare calls to spi-pxa2xx
From: Philipp Zabel @ 2012-03-15 18:21 UTC (permalink / raw)
To: linux-serial; +Cc: Eric Miao, Russell King, Haojian Zhuang, GrantLikely
This patch adds clk_prepare/clk_unprepare calls to the spi-pxa2xx
driver by using the helper functions clk_prepare_enable and
clk_disable_unprepare.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
---
drivers/spi/spi-pxa2xx.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index dc25bee..ff0e168 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1625,7 +1625,7 @@ static int __devinit pxa2xx_spi_probe(struct platform_device *pdev)
}
/* Enable SOC clock */
- clk_enable(ssp->clk);
+ clk_prepare_enable(ssp->clk);
/* Load default SSP configuration */
write_SSCR0(0, drv_data->ioaddr);
@@ -1666,7 +1666,7 @@ out_error_queue_alloc:
destroy_queue(drv_data);
out_error_clock_enabled:
- clk_disable(ssp->clk);
+ clk_disable_unprepare(ssp->clk);
out_error_dma_alloc:
if (drv_data->tx_channel != -1)
@@ -1709,7 +1709,7 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)
/* Disable the SSP at the peripheral and SOC level */
write_SSCR0(0, drv_data->ioaddr);
- clk_disable(ssp->clk);
+ clk_disable_unprepare(ssp->clk);
/* Release DMA */
if (drv_data->master_info->enable_dma) {
@@ -1753,7 +1753,7 @@ static int pxa2xx_spi_suspend(struct device *dev)
if (status != 0)
return status;
write_SSCR0(0, drv_data->ioaddr);
- clk_disable(ssp->clk);
+ clk_disable_unprepare(ssp->clk);
return 0;
}
@@ -1772,7 +1772,7 @@ static int pxa2xx_spi_resume(struct device *dev)
DRCMR_MAPVLD | drv_data->tx_channel;
/* Enable the SSP clock */
- clk_enable(ssp->clk);
+ clk_prepare_enable(ssp->clk);
/* Start the queue running */
status = start_queue(drv_data);
--
1.7.9.1
^ permalink raw reply related
* [PATCH] serial: pxa: add clk_prepare/clk_unprepare calls
From: Philipp Zabel @ 2012-03-15 18:15 UTC (permalink / raw)
To: linux-serial; +Cc: Haojian Zhuang, Eric Miao, Alan Cox, GregKroah-Hartman
This patch adds clk_prepare/clk_unprepare calls to the serial/pxa
driver by using the helper functions clk_prepare_enable and
clk_disable_unprepare.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/pxa.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index 5c8e3bb..e2fd3d8 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -579,9 +579,9 @@ serial_pxa_pm(struct uart_port *port, unsigned int state,
struct uart_pxa_port *up = (struct uart_pxa_port *)port;
if (!state)
- clk_enable(up->clk);
+ clk_prepare_enable(up->clk);
else
- clk_disable(up->clk);
+ clk_disable_unprepare(up->clk);
}
static void serial_pxa_release_port(struct uart_port *port)
@@ -668,7 +668,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
struct uart_pxa_port *up = serial_pxa_ports[co->index];
unsigned int ier;
- clk_enable(up->clk);
+ clk_prepare_enable(up->clk);
/*
* First save the IER then disable the interrupts
@@ -685,7 +685,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
wait_for_xmitr(up);
serial_out(up, UART_IER, ier);
- clk_disable(up->clk);
+ clk_disable_unprepare(up->clk);
}
static int __init
--
1.7.9.1
^ permalink raw reply related
* Re: [PATCH] sh-sci: fix a race of DMA submit_tx on transfer
From: Guennadi Liakhovetski @ 2012-03-15 10:50 UTC (permalink / raw)
To: Paul Mundt; +Cc: Takashi Yoshii, SH-Linux, linux-serial
In-Reply-To: <20120315060938.GB10046@linux-sh.org>
Hi Paul
On Thu, 15 Mar 2012, Paul Mundt wrote:
> On Wed, Mar 14, 2012 at 04:14:43PM +0900, Takashi Yoshii wrote:
> > serial: sh-sci: fix a race of DMA submit_tx on transfer
> >
> > When DMA is enabled, sh-sci transfer begins with
> > uart_start()
> > sci_start_tx()
> > if (cookie_tx < 0) schedule_work()
> > Then, starts DMA when wq scheduled, -- (A)
> > process_one_work()
> > work_fn_rx()
> > cookie_tx = desc->submit_tx()
> > And finishes when DMA transfer ends, -- (B)
> > sci_dma_tx_complete()
> > async_tx_ack()
> > cookie_tx = -EINVAL
> > (possible another schedule_work())
> >
> > This A to B sequence is not reentrant, since controlling variables
> > (for example, cookie_tx above) are not queues nor lists. So, they
> > must be invoked as A B A B..., otherwise results in kernel crash.
> >
> > To ensure the sequence, sci_start_tx() seems to test if cookie_tx < 0
> > (represents "not used") to call schedule_work().
> > But cookie_tx will not be set (to a cookie, also means "used") until
> > in the middle of work queue scheduled function work_fn_tx().
> >
> > This gap between the test and set allows the breakage of the sequence
> > under the very frequently call of uart_start().
> > Another gap between async_tx_ack() and another schedule_work() results
> > in the same issue, too.
> >
> > This patch introduces a new condition "cookie_tx == 0" just to mark
> > it is "busy" and assign it within spin-locked region to fill the gaps.
> >
> > Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
> > Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>
> Looks good to me. I'll apply it unless Guennadi has any other concerns.
No, I don't - my ack holds:) However, I do have some concerns regarding a
couple of other possible issues with SCI DMA:
1. As I mentioned earlier, I think, sci_start_tx() should always be called
under the port spinlock to get consistent ->cookie_tx and ->chan_tx
values. This is the case, when called from serial core as
->start_tx() from most locations, but not from uart_handle_cts_change(),
which is an exported function. It is also called internally in the SCI
driver itself several times - with no locking. This might need fixing,
especially in sci_tx_dma_release().
2. The DMA Tx work might need to be cancelled from time to time... E.g.,
when DMA is disabled to switch to PIO, or when shutting down the port.
Both of these might require a bit more thinking and testing.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply
* Re: [PATCH v3] serial: PL011: clear pending interrupts
From: Chanho Min @ 2012-03-14 9:21 UTC (permalink / raw)
To: Linus Walleij
Cc: Linus Walleij, Greg Kroah-Hartman, linux-serial, linux-arm-kernel,
Russell King, Jong-Sung Kim, stable, Shreshtha Kumar Sahu
In-Reply-To: <CACRpkdZXrMW653W=tysY8ncqBKDun3TgPqnEzrdZPqwpW8shYA@mail.gmail.com>
On Wed, Mar 14, 2012 at 6:02 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> Thanks Chanho, Greg will you add the Reported/Reviewed-by
> tags or do you want me to send a v4 of this?
>
> Yours,
> Linus Walleij
No, you don't need to send it again if greg will do it.
Thanks,
Chanho Min
^ permalink raw reply
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