Remember where we found the DBGU and use that for our console.

This commit is contained in:
Warner Losh 2012-07-12 19:11:37 +00:00
parent 747943148c
commit 1c882be4bc
3 changed files with 5 additions and 2 deletions

View File

@ -402,6 +402,7 @@ at91_try_id(uint32_t dbgu_base)
* try to get the matching CPU support.
*/
soc_info.soc_data = at91_match_soc(soc_info.type, soc_info.subtype);
soc_info.dbgu_base = AT91_BASE + dbgu_base;
return (1);
}

View File

@ -121,6 +121,7 @@ struct at91_soc_info {
uint32_t cidr;
uint32_t exid;
char name[AT91_SOC_NAME_MAX];
uint32_t dbgu_base;
struct at91_soc_data *soc_data;
};

View File

@ -71,9 +71,10 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
di->bas.bst = &at91_bs_tag;
/*
* XXX: Not pretty, but will work because we map the needed addresses
* early.
* early. At least we probed this so that the console will work on
* all flavors of Atmel we can detect.
*/
di->bas.bsh = AT91_BASE + AT91RM92_DBGU_BASE;
di->bas.bsh = soc_info.dbgu_base;
di->baudrate = 115200;
di->bas.regshft = 0;
di->bas.rclk = 0;