From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Hubig Date: Thu, 2 Aug 2012 16:14:37 +0200 Subject: [U-Boot] [PATCH] at91: Add support for taskit AT91SAM9G20 boards. In-Reply-To: <5018FDBE.1010209@googlemail.com> References: <1343671291-17435-1-git-send-email-mhubig@imko.de> <5018FDBE.1010209@googlemail.com> Message-ID: <20120802141437.GA18194@imko.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Aug 01, 2012 at 11:58:22AM +0200, Andreas Bie?mann wrote: > On 30.07.12 20:01, Markus Hubig wrote: > > > > +int board_early_init_f(void) > > +{ > > + struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; > > + > > + /* Enable clocks for all PIOs */ > > + writel((1 << ATMEL_ID_PIOA) | (1 << ATMEL_ID_PIOB) | > > + (1 << ATMEL_ID_PIOC), &pmc->pcer); > > you should initialize seriald_hw here to avoid strange characters on > serial line when switching from at91bootstrap to u-boot. > > + /* adress of boot parameters */ > > + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; > > + > > + at91_set_gpio_output(AT91_PIN_PC9, 1); > > + at91_set_gpio_output(AT91_PIN_PC5, 1); > > Can you please add some comment why switching these pins? OK now I now that PC5 switches the red LED on and there since is a LED framework in u-boot I will use that in a later patch. PC9 is somewhat strange. If I set it to 0 I don't have a console! So I tried to put both | at91_set_gpio_output(AT91_PIN_PC9, 1); | at91_seriald_hw_init(); into board_early_init_f() to avoid the strange characters at boot time, but again no console output ... Further tests showed that It seems that I can't use at91_set_gpio_output() inside board_early_init_f(). Switching on the red LED with PC5 also do not work in board_early_init_f() ... Any ideas? Cheers, Markus