From: franck.jullien@gmail.com
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] nios2/serial_altera_jtag.c: switch to ressources
Date: Mon, 25 Jul 2011 21:50:20 +0200 [thread overview]
Message-ID: <1311623420-30234-5-git-send-email-franck.jullien@gmail.com> (raw)
In-Reply-To: <1311623420-30234-1-git-send-email-franck.jullien@gmail.com>
From: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
---
drivers/serial/serial_altera_jtag.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/serial/serial_altera_jtag.c b/drivers/serial/serial_altera_jtag.c
index 322f9e9..7d42382 100644
--- a/drivers/serial/serial_altera_jtag.c
+++ b/drivers/serial/serial_altera_jtag.c
@@ -37,7 +37,7 @@ static int altera_serial_jtag_setbaudrate(struct console_device *cdev, int baudr
static void altera_serial_jtag_putc(struct console_device *cdev, char c)
{
- struct nios_jtag *jtag = (struct nios_jtag *)cdev->dev->map_base;
+ struct nios_jtag *jtag = (struct nios_jtag *)dev_request_mem_region(cdev->dev, 0);
uint32_t st;
while (1) {
@@ -51,14 +51,14 @@ static void altera_serial_jtag_putc(struct console_device *cdev, char c)
static int altera_serial_jtag_tstc(struct console_device *cdev)
{
- struct nios_jtag *jtag = (struct nios_jtag *)cdev->dev->map_base;
+ struct nios_jtag *jtag = (struct nios_jtag *)dev_request_mem_region(cdev->dev, 0);
return readl(&jtag->control) & NIOS_JTAG_RRDY;
}
static int altera_serial_jtag_getc(struct console_device *cdev)
{
- struct nios_jtag *jtag = (struct nios_jtag *)cdev->dev->map_base;
+ struct nios_jtag *jtag = (struct nios_jtag *)dev_request_mem_region(cdev->dev, 0);
uint32_t val;
while (1) {
--
1.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-07-25 19:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-25 19:50 [PATCH] Switch Nios2 devices to ressource usage franck.jullien
2011-07-25 19:50 ` [PATCH 1/4] nios2/generic.c: use add_generic_device helper franck.jullien
2011-07-25 19:50 ` [PATCH 2/4] nios2/altera_tse.c: switch to ressources franck.jullien
2011-07-26 6:48 ` Sascha Hauer
2011-07-26 11:41 ` Franck JULLIEN
2011-07-25 19:50 ` [PATCH 3/4] nios2/serial_altera.c: " franck.jullien
2011-07-26 6:52 ` Sascha Hauer
2011-07-25 19:50 ` franck.jullien [this message]
2011-07-26 6:53 ` [PATCH 4/4] nios2/serial_altera_jtag.c: " Sascha Hauer
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=1311623420-30234-5-git-send-email-franck.jullien@gmail.com \
--to=franck.jullien@gmail.com \
--cc=barebox@lists.infradead.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