
On 23:31 Thu 16 Apr , David Brownell wrote:
On Thursday 16 April 2009, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 15:44 Sun 12 Apr , David Brownell wrote:
could you split it in more logical change please
I'll fragment it a bit more, ok. later.
@@ -129,10 +122,12 @@ void davinci_enable_uart0(void) lpsc_on(DAVINCI_LPSC_UART0);
/* Bringup UART0 out of reset */
- REG(UART0_PWREMU_MGMT) = 0x0000e003;
- REG(UART0_PWREMU_MGMT) = 0x00006001;
+#ifdef CONFIG_SOC_DM6446 /* Enable UART0 MUX lines */
- REG(PINMUX1) |= PINMUX1_UART0;
- REG(PINMUX1) |= DM644X_PINMUX1_UART0;
is this the same for all DM6446? and the same question for the I2C and EMAC
Yes, that's why I did it that way. PINMUX1 is part of the DM6446 SoC itself, not an FPGA or CPLD, and on other SoCs the bits in that register have different meanings assigned. UART0 might be in PINMUX4, etc.
(Or, if by "this" you meant the PWREMU_MGMT register, that's also a yes ... plus, I looked at docs for other DaVinci chips, and they all have the same definition for that register.)
it will be better to init pio/mux in devices file without redefined it in the board as done for the at91
Agreed, but there's a limit to how much rewriting I can donate. There *are* no dm6446-specific "devices" files in cpu/arm926ejs/davinci yet ... and in fact, most of that "common" code seems more like it belongs over in cpu/.../davinci, not board/davinci/common.
yes but as it's soc specifc it's not the correct location of the code we need to move it to cpu/.../davinci
(Re the AT91 code, having one file per device type and SoC member seems absurd to me. One per SoC seems about right.)
If you prefer in one file is fine too
Best Regards, J.