From: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
To: "Manjunathappa, Prakash" <prakash.pm-l0cyMroinI0@public.gmane.org>
Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
hs-ynQEQJNshbs@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v2 1/5] ARM: davinci: uart: move to devid based clk_get
Date: Thu, 6 Jun 2013 16:02:39 +0530 [thread overview]
Message-ID: <51B06547.8030709@ti.com> (raw)
In-Reply-To: <1369729686-6595-2-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
Hi Prakash,
It appears that this patch was not tested thoroughly. See below:
On 5/28/2013 1:58 PM, Manjunathappa, Prakash wrote:
> For modules having single clock, clk_get should be done with dev_id.
> But current davinci implementation handles multiple instances
> of the UART devices with single platform_device_register. Hence clk_get
> is based on con_id rather than dev_id, this is not correct. Do
> platform_device_register for each instance and clk_get on dev_id.
>
> Signed-off-by: Manjunathappa, Prakash <prakash.pm-l0cyMroinI0@public.gmane.org>
> ---
> -static struct plat_serial8250_port da8xx_serial_pdata[] = {
> +static struct plat_serial8250_port da8xx_serial0_pdata[] = {
> {
> .mapbase = DA8XX_UART0_BASE,
> .irq = IRQ_DA8XX_UARTINT0,
> @@ -75,7 +75,9 @@ static struct plat_serial8250_port da8xx_serial_pdata[] = {
> UPF_IOREMAP,
> .iotype = UPIO_MEM,
> .regshift = 2,
> - },
> + }
> +};
> +static struct plat_serial8250_port da8xx_serial1_pdata[] = {
> {
> .mapbase = DA8XX_UART1_BASE,
> .irq = IRQ_DA8XX_UARTINT1,
> @@ -83,7 +85,9 @@ static struct plat_serial8250_port da8xx_serial_pdata[] = {
> UPF_IOREMAP,
> .iotype = UPIO_MEM,
> .regshift = 2,
> - },
> + }
> +};
> +static struct plat_serial8250_port da8xx_serial2_pdata[] = {
> {
> .mapbase = DA8XX_UART2_BASE,
> .irq = IRQ_DA8XX_UARTINT2,
> @@ -91,18 +95,31 @@ static struct plat_serial8250_port da8xx_serial_pdata[] = {
> UPF_IOREMAP,
> .iotype = UPIO_MEM,
> .regshift = 2,
> - },
> - {
> - .flags = 0,
> - },
> + }
8250_core.c relies on sentinel value with p->flags = 0 to terminate
looking for more ports. You don't have sentinel values in any of pdata
the arrays you introduced so the code basically goes looking into areas
of memory not its own. This caused bunch of "cannot register port"
errors for me but I can easily imagine more serious errors.
Thanks,
Sekhar
next prev parent reply other threads:[~2013-06-06 10:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 8:28 [PATCH v2 0/5] ARM: davinci: fix UART clock enabling Manjunathappa, Prakash
2013-05-28 8:28 ` [PATCH v2 1/5] ARM: davinci: uart: move to devid based clk_get Manjunathappa, Prakash
[not found] ` <1369729686-6595-2-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
2013-06-06 10:32 ` Sekhar Nori [this message]
[not found] ` <51B06547.8030709-l0cyMroinI0@public.gmane.org>
2013-06-06 10:44 ` Sekhar Nori
[not found] ` <51B06803.2020008-l0cyMroinI0@public.gmane.org>
2013-06-19 9:20 ` Manjunathappa, Prakash
2013-06-07 5:35 ` Sekhar Nori
[not found] ` <51B17133.40508-l0cyMroinI0@public.gmane.org>
2013-06-19 9:24 ` Manjunathappa, Prakash
2013-05-28 8:28 ` [PATCH v2 2/5] ARM: davinci: da850: override device name of UART in DT kernel Manjunathappa, Prakash
2013-05-28 8:28 ` [PATCH v2 3/5] ARM: davinci: da850: do not specify clock_frequency for UART DT node Manjunathappa, Prakash
2013-05-28 8:28 ` [PATCH v2 4/5] ARM: davinci: da8xx: remove da8xx_uart_clk_enable Manjunathappa, Prakash
2013-05-28 8:28 ` [PATCH v2 5/5] ARM: davinci: serial: platform code cleanup Manjunathappa, Prakash
[not found] ` <1369729686-6595-6-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
2013-06-05 11:41 ` Sekhar Nori
[not found] ` <51AF2400.3020906-l0cyMroinI0@public.gmane.org>
2013-06-06 10:25 ` Sekhar Nori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B06547.8030709@ti.com \
--to=nsekhar-l0cymroini0@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=hs-ynQEQJNshbs@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=prakash.pm-l0cyMroinI0@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).