From: Reinhard Meyer <u-boot@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot support for board(s) meesc, otc570
Date: Fri, 21 Jan 2011 12:50:05 +0100 [thread overview]
Message-ID: <4D3972ED.7040403@emk-elektronik.de> (raw)
In-Reply-To: <4D396B65.8080905@esd.eu>
Dear Daniel Gorsulowski,
> Hello Reinhard,
>
> Reinhard Meyer wrote:
>> Dear Daniel Gorsulowski,
>>> Today I found out by GPIO debugging, that U-Boot seems to boot but prints
>>> its startup messages to wrong USART with proper baudrate. I'll try to
>>> find out, why there is no output on DBGU.
>>
>> Note that the USART to use is defined differently than before:
>>
>> /* serial console */
>> #define CONFIG_ATMEL_USART
>> #define CONFIG_USART_BASE ATMEL_BASE_DBGU
>> #define CONFIG_USART_ID ATMEL_ID_SYS
>> #define CONFIG_BAUDRATE 115200
>> #define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
>
> I did so, see http://lists.denx.de/pipermail/u-boot/2011-January/085863.html
>
> But I'm a little bit confused. In the past, USART_ID was defined by '3',
> if DBGU was used. Now, USART_ID is replaced by CONFIG_USART_ID, which is
> defined by ATMEL_ID_SYS, which is defined by '1'.
> However, this discrepancy does not matter, because CONFIG_USART_ID is
> only used once in drivers/serial/atmel_usart.c, line 57:
> usart_hz = get_usart_clk_rate(USART_ID);
> And get_usart_clk_rate(); ignores its parameter. See
> arch/arm/include/asm/arch-at91/clk.h
That is correct for AT91. However AVR32 has separate clock dividers for each USART.
The atmel_usart driver is the same for both architectures. For that reason the ID
is carried along but nowhere used in AT91 clock code. But who knows, maybe there will be
an AT91 variant in the future with different clocks for each peripheral...
What matters is that the driver uses the value of CONFIG_USART_BASE to access the
registers. This value you have set (correctly) to ATMEL_BASE_DBGU. So by all
reasoning output should not come out any other USART...
> static inline unsigned long get_usart_clk_rate(unsigned int dev_id)
> {
> return get_mck_clk_rate();
> }
> (all other functions in clk.h act similar. I think, a rework would be
> advisable?)
No, in AVR32 those functions are different for each peripheral.
>
> Back to the problem...
> In my opinion, my USART configuration is correct. I still have no idea,
> why there is no output on DBGU.
I am at a loss there, too.
Which USART is the output coming from instead? Is it really console output
or maybe some other, independent pulses?
Can you verify that the value for ATMEL_BASE_DBGU in at91sam9263.h is correct?
Are you using the actual driver source? It should have lines like
atmel_usart3_t *usart = (atmel_usart3_t*)CONFIG_USART_BASE;
at the begin of each function.
Best Regards,
Reinhard
next prev parent reply other threads:[~2011-01-21 11:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20101127215828.7CD40220233A@lilith>
[not found] ` <4D072AED.6080703@esd.eu>
[not found] ` <4D355CFC.5050806@esd.eu>
[not found] ` <4D356200.5000801@aribaud.net>
[not found] ` <4D3577A9.8050505@esd.eu>
2011-01-18 12:25 ` [U-Boot] U-Boot support for board(s) meesc, otc570 Reinhard Meyer
2011-01-20 7:48 ` Daniel Gorsulowski
2011-01-21 6:43 ` Reinhard Meyer
2011-01-21 9:11 ` Daniel Gorsulowski
2011-01-21 10:44 ` Reinhard Meyer
2011-01-21 11:17 ` Daniel Gorsulowski
2011-01-21 11:50 ` Reinhard Meyer [this message]
2011-01-21 12:39 ` Daniel Gorsulowski
2011-01-21 13:21 ` Reinhard Meyer
2011-01-24 11:39 ` Daniel Gorsulowski
2011-01-24 12:08 ` Reinhard Meyer
2011-01-25 18:13 ` Albert ARIBAUD
2011-04-11 10:11 ` Reinhard Meyer
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=4D3972ED.7040403@emk-elektronik.de \
--to=u-boot@emk-elektronik.de \
--cc=u-boot@lists.denx.de \
/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