On 15:44 Sun 12 Apr , David Brownell wrote: > From: David Brownell <dbrown...@users.sourceforge.net> > > Start updating DaVinci board support to reduce dependencies on > dm644x chips and EVM-like boards ... beginning with "psc.c", > which hosts a bunch of those dependencies: > > - Pinmux registers and their contents are SoC-specific, and > are also unrelated to the Power and Sleep Controller. > > * Declare more of the pinmux registers; > * Move their bitfield decls to a public header; > * Renaming thse bitfields to be clearly SoC-specific. > > - Rename the errata workarounds to be clearly SoC-specific. > > - Add a CONFIG_SOC_DM6446; use it to prevent some mux goofs. > > - Don't include the I2C support if the I2C driver is not enabled. > > Plus two minor bugfixes: > > - Correct the PSC_MDSTAT mask ... it's six bits, not five. > (Original DM6446 doces said five, FWIW.) > > - Correct the PWREMU_MGT mask ... don't set must-be-zero bits. > > The simplest always-correct way to handle pinmux is in board_init() > calls; or possibly in SoC-specific device setup code. Currently > these chips don't have such SoC-specific support. could you split it in more logical change please > > Signed-off-by: David Brownell <dbrown...@users.sourceforge.net> > --- > board/davinci/common/psc.c | 29 ++++++++++++++++------------- > board/davinci/common/psc.h | 2 +- > board/davinci/dvevm/dvevm.c | 2 +- > board/davinci/schmoogie/schmoogie.c | 2 +- > board/davinci/sffsdr/sffsdr.c | 2 +- > board/davinci/sonata/sonata.c | 2 +- > include/asm-arm/arch-davinci/hardware.h | 23 +++++++++++++++++++++-- > include/configs/davinci_dvevm.h | 1 + > include/configs/davinci_schmoogie.h | 1 + > include/configs/davinci_sffsdr.h | 1 + > include/configs/davinci_sonata.h | 1 + > 11 files changed, 46 insertions(+), 20 deletions(-) > > --- a/board/davinci/common/psc.c > +++ b/board/davinci/common/psc.c > @@ -26,13 +26,6 @@ > #include <common.h> > #include <asm/arch/hardware.h> > > -#define PINMUX0_EMACEN (1 << 31) > -#define PINMUX0_AECS5 (1 << 11) > -#define PINMUX0_AECS4 (1 << 10) > - > -#define PINMUX1_I2C (1 << 7) > -#define PINMUX1_UART1 (1 << 1) > -#define PINMUX1_UART0 (1 << 0) > > /* > * The DM6446 includes two separate power domains: "Always On" and "DSP". The > @@ -57,7 +50,7 @@ void lpsc_on(unsigned int id) > > while (REG(PSC_PTSTAT) & 0x01); > > - if ((*mdstat & 0x1f) == 0x03) > + if ((*mdstat & 0x3f) == 0x03) > return; /* Already on and enabled */ > > *mdctl |= 0x03; > @@ -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
it will be better to init pio/mux in devices file without redefined it in the board as done for the at91 Best Regards, J. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot