From: "Govindraj.R" <govindraj.raja@ti.com>
To: linux-omap@vger.kernel.org
Cc: linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Kevin Hilman <khilman@ti.com>, Tony Lindgren <tony@atomide.com>,
Partha Basak <p-basak2@ti.com>,
Vishwanath Sripathy <vishwanath.bs@ti.com>,
Rajendra Nayak <rnayak@ti.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Govindraj R <govindraj.raja@ti.com>
Subject: [PATCH v8 05/20] OMAP2+: UART: Remove mapbase/membase fields from pdata.
Date: Fri, 11 Nov 2011 15:27:22 +0530 [thread overview]
Message-ID: <1321005446-21741-6-git-send-email-govindraj.raja@ti.com> (raw)
In-Reply-To: <1321005446-21741-1-git-send-email-govindraj.raja@ti.com>
The mapbase (start_address), membase(io_remap cookie) part of
pdata struct omap_uart_port_info are removed as this should be
derived within driver.
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
arch/arm/mach-omap2/serial.c | 2 --
arch/arm/plat-omap/include/plat/omap-serial.h | 2 --
drivers/tty/serial/omap-serial.c | 10 ++++++++--
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 0de1a56..beb46e8 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -605,8 +605,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
omap_up.dma_enabled = uart->dma_enabled;
omap_up.uartclk = OMAP24XX_BASE_BAUD * 16;
- omap_up.mapbase = oh->slaves[0]->addr->pa_start;
- omap_up.membase = omap_hwmod_get_mpu_rt_va(oh);
omap_up.flags = UPF_BOOT_AUTOCONF;
pdata = &omap_up;
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 307cd6f..db9bda9 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -59,8 +59,6 @@
struct omap_uart_port_info {
bool dma_enabled; /* To specify DMA Mode */
unsigned int uartclk; /* UART clock rate */
- void __iomem *membase; /* ioremap cookie or NULL */
- resource_size_t mapbase; /* resource base */
upf_t flags; /* UPF_* flags */
};
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index be368cf7..31f0cbf 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -1275,8 +1275,14 @@ static int serial_omap_probe(struct platform_device *pdev)
up->port.ops = &serial_omap_pops;
up->port.line = pdev->id;
- up->port.membase = omap_up_info->membase;
- up->port.mapbase = omap_up_info->mapbase;
+ up->port.mapbase = mem->start;
+ up->port.membase = ioremap(mem->start, resource_size(mem));
+ if (!up->port.membase) {
+ dev_err(&pdev->dev, "can't ioremap UART\n");
+ ret = -ENOMEM;
+ goto err;
+ }
+
up->port.flags = omap_up_info->flags;
up->port.uartclk = omap_up_info->uartclk;
up->uart_dma.uart_base = mem->start;
--
1.7.4.1
next prev parent reply other threads:[~2011-11-11 9:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 9:57 [PATCH v8 00/20] OMAP2+: UART: Runtime adaptation + cleanup Govindraj.R
2011-11-11 9:57 ` [PATCH v8 01/20] OMAP2+: UART: cleanup + remove uart pm specific API Govindraj.R
2011-11-11 9:57 ` [PATCH v8 02/20] OMAP2+: UART: cleanup 8250 console driver support Govindraj.R
2011-11-11 9:57 ` [PATCH v8 03/20] OMAP2+: UART: Cleanup part of clock gating mechanism for uart Govindraj.R
2011-11-11 9:57 ` [PATCH v8 04/20] OMAP2+: UART: Add default mux for all uarts Govindraj.R
2011-11-11 9:57 ` Govindraj.R [this message]
2011-11-11 9:57 ` [PATCH v8 06/20] OMAP2+: UART: Add runtime pm support for omap-serial driver Govindraj.R
2011-11-11 9:57 ` [PATCH v8 07/20] OMAP2+: UART: Remove context_save and move context restore to driver Govindraj.R
2011-11-11 9:57 ` [PATCH v8 08/20] OMAP2+: UART: Ensure all reg values configured are available from port structure Govindraj.R
2011-11-11 9:57 ` [PATCH v8 09/20] OMAP2+: UART: Remove uart reset function Govindraj.R
2011-12-07 0:21 ` [PATCH v8 00/20] OMAP2+: UART: Runtime adaptation + cleanup Kevin Hilman
2011-12-07 0:46 ` Alan Cox
2011-12-13 14:15 ` Rajendra Nayak
2011-12-13 17:35 ` Kevin Hilman
2011-12-13 13:01 ` Govindraj
2011-12-13 19:26 ` Kevin Hilman
2011-12-14 8:46 ` Govindraj
2011-12-14 15:29 ` Kevin Hilman
2011-12-14 16:20 ` Govindraj
2011-12-14 18:56 ` Kevin Hilman
2011-12-13 23:32 ` Kevin Hilman
2011-12-14 9:21 ` Govindraj
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=1321005446-21741-6-git-send-email-govindraj.raja@ti.com \
--to=govindraj.raja@ti.com \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=p-basak2@ti.com \
--cc=rnayak@ti.com \
--cc=santosh.shilimkar@ti.com \
--cc=tony@atomide.com \
--cc=vishwanath.bs@ti.com \
/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).