All of lore.kernel.org
 help / color / mirror / Atom feed
From: 21cnbao@gmail.com (Barry Song)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] ARM: sirf: add two debug ports for CSRatlas7 SoC
Date: Fri, 2 Jan 2015 15:51:41 +0800	[thread overview]
Message-ID: <CAGsJ_4wgbDkVu4hEgyP6T7Q-RMHE3bhUppSMN28qeDEVPWDDwg@mail.gmail.com> (raw)
In-Reply-To: <43053389.8mSSmmg5HD@wuerfel>

2014-12-31 23:31 GMT+08:00, Arnd Bergmann <arnd@arndb.de>:
> On Wednesday 31 December 2014 23:05:44 Barry Song wrote:
>> 2014-12-31 6:35 GMT+08:00 Arnd Bergmann <arnd@arndb.de>:
>> > On Thursday 25 December 2014 16:34:17 Barry Song wrote:
>> >>  #if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)
>> >> -#define SIRFSOC_UART1_PA_BASE          0xb0060000
>> >> +#define SIRF_LLUART_PA_BASE          0xb0060000
>> >>  #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1)
>> >> -#define SIRFSOC_UART1_PA_BASE          0xcc060000
>> >> +#define SIRF_LLUART_PA_BASE          0xcc060000
>> >> +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART1)
>> >> +#define SIRF_LLUART_PA_BASE          0x18020000
>> >> +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART0)
>> >> +#define SIRF_LLUART_PA_BASE          0x18010000
>> >>  #else
>> >> -#define SIRFSOC_UART1_PA_BASE          0
>> >> +#define SIRF_LLUART_PA_BASE          0
>> >>  #endif
>> >
>> > I think it would be nicer to use DEBUG_UART_PHYS/DEBUG_UART_VIRT here.
>>
>> yes if it is more general name for all. my second feeling is that does
>> this conflict CSR namespace stuff into high-level and common namespace
>> things?
>
> I think my comment was misleading. What I meant was to use
> CONFIG_DEBUG_UART_PHYS from arch/arm/Kconfig.debug the same way
> we do for the 8250 and pl011 compatible uarts.

it is even better if all CSR ports are same in register layout. then
we can simply have a Kconfig options for all ports and use the
CONFIG_DEBUG_UART_VIRT/PHYS to differentiate ports. but here we still
need the options for different ports as TXFIFO_EMPTY bits are
different on different ports.

+#ifdef CONFIG_DEBUG_SIRFATLAS7_UART0
+#define SIRF_LLUART_TXFIFO_EMPTY			(1 << 8)
+#else
+#define SIRF_LLUART_TXFIFO_EMPTY			(1 << 6)
+#endif

but we can still get benefit to define the BASE address from Kconfig
and have some similar ways with:

include/debug/8250.S:           ldr     \rv, =CONFIG_DEBUG_UART_VIRT
include/debug/bcm63xx.S:        ldr     \rv, =CONFIG_DEBUG_UART_VIRT
include/debug/meson.S:  ldr     \rv, =(CONFIG_DEBUG_UART_VIRT)
 @ virtual
include/debug/msm.S:    ldr     \rv, =CONFIG_DEBUG_UART_VIRT
include/debug/pl01x.S:          ldr     \rv, =CONFIG_DEBUG_UART_VIRT
include/debug/s3c24xx.S:                ldr     \rv, = CONFIG_DEBUG_UART_VIRT


>
> 	Arnd
>

-barry

  reply	other threads:[~2015-01-02  7:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-25  8:34 [PATCH 0/4] ARM: add basic CSR atlas7 Auto SoC support Barry Song
2014-12-25  8:34 ` [PATCH 1/4] ARM: sirf: add two debug ports for CSRatlas7 SoC Barry Song
2014-12-30 22:35   ` Arnd Bergmann
2014-12-31 15:05     ` Barry Song
2014-12-31 15:31       ` Arnd Bergmann
2015-01-02  7:51         ` Barry Song [this message]
2015-01-02  8:59           ` Arnd Bergmann
2014-12-25  8:34 ` [PATCH 2/4] ARM: sirf: add atlas7 machine support Barry Song
2014-12-30 22:34   ` Arnd Bergmann
2014-12-31 14:50     ` Barry Song
2015-01-02  9:00       ` Arnd Bergmann
2015-01-04  7:23     ` Barry Song
2014-12-25  8:34 ` [PATCH 3/4] ARM: dts: add init dts file for CSR atlas7 SoC Barry Song
2014-12-25  8:34 ` [PATCH 4/4] ARM: sirf: bring up SMP in " Barry Song
2014-12-30 22:38   ` Arnd Bergmann
2014-12-31 14:52     ` Barry Song

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=CAGsJ_4wgbDkVu4hEgyP6T7Q-RMHE3bhUppSMN28qeDEVPWDDwg@mail.gmail.com \
    --to=21cnbao@gmail.com \
    --cc=linux-arm-kernel@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 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.