From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Andreas_Bie=DFmann?= Date: Mon, 06 Aug 2012 14:49:51 +0200 Subject: [U-Boot] [PATCH] at91: Add support for taskit AT91SAM9G20 boards. In-Reply-To: <20120802141437.GA18194@imko.de> References: <1343671291-17435-1-git-send-email-mhubig@imko.de> <5018FDBE.1010209@googlemail.com> <20120802141437.GA18194@imko.de> Message-ID: <501FBD6F.5090509@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Markus Hubig, On 02.08.2012 16:14, Markus Hubig wrote: > 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! can you please ask at taskit what function this pin has and document it here? > 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? Not currently. Maybe the PC9 has some vital functionality for UART to work (some switch, power, ...) and is reset by another part running after board_early_init_f()? > > Cheers, Markus Best regards Andreas Bie?mann