All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Clouter <alex@digriz.org.uk>
To: linux-serial@vger.kernel.org
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART
Date: Thu, 11 Jun 2009 13:41:39 +0100	[thread overview]
Message-ID: <20090611124139.GI2014@woodchuck> (raw)
In-Reply-To: <n967g6-i6b.ln1@woodchuck.wormnet.eu>

Hi,

* Alexander Clouter <alex@digriz.org.uk> [2009-06-11 12:27:19+0100]:
> 
> > static struct plat_serial8250_port uart0_data = {
> >        .mapbase = AR7_REGS_UART0,
> >        .irq = AR7_IRQ_UART0,
> >        .regshift = 2,
> >        .iotype = UPIO_MEM,
> >        .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
> > };
> > 
> >        uart_port[0].type = PORT_16550A;
> >        uart_port[0].line = 0;
> >        uart_port[0].irq = AR7_IRQ_UART0;
> >        uart_port[0].uartclk = ar7_bus_freq() / 2;
> >        uart_port[0].iotype = UPIO_MEM;
> >        uart_port[0].mapbase = AR7_REGS_UART0 + 3;
> >        uart_port[0].membase = ioremap(uart_port[0].mapbase, 256);
> >        uart_port[0].regshift = 2;
> >        res = early_serial_setup(&uart_port[0]);
> >        if (res)
> >                return res;
> > 
> > 
> > the +3 comes from the fact, that this machine is configured to run big
> > endian.
> >
> Alternatively you could not use the byte ordering macro/functions as per 
> the 'Byte Order' section in:
> 
> http://lwn.net/images/pdf/LDD3/ch11.pdf
> 
> Makes the code portable, understandable and...well neater.
> 
Maybe not, scrap that :)

Cheers

-- 
Alexander Clouter
.sigmonster says: "MOKE DAT YIGARETTE"
                  		-- "The Last Coin", James P. Blaylock

  reply	other threads:[~2009-06-11 16:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 14:22 [PATCH 8/8] 8250: add Texas Instruments AR7 internal UART Florian Fainelli
2009-06-04 22:20 ` Thomas Bogendoerfer
2009-06-05 13:52   ` Florian Fainelli
2009-06-05 13:52     ` Florian Fainelli
2009-06-06 17:25   ` Florian Fainelli
2009-06-06 17:25     ` Florian Fainelli
2009-06-11  8:28   ` Florian Fainelli
2009-06-11  8:28     ` Florian Fainelli
2009-06-11  9:30     ` Thomas Bogendoerfer
2009-06-11  9:30       ` Thomas Bogendoerfer
2009-06-11 11:27       ` Alexander Clouter
2009-06-11 11:27         ` Alexander Clouter
2009-06-11 11:27         ` Alexander Clouter
2009-06-11 12:41         ` Alexander Clouter [this message]
2009-06-14 11:18       ` Florian Fainelli
2009-06-14 11:18         ` Florian Fainelli

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=20090611124139.GI2014@woodchuck \
    --to=alex@digriz.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-serial@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.