[U-Boot] [PATCH v2 2/3] MX31: Add basic support for Freescale i.MX31 PDK board.

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sun May 10 22:32:25 CEST 2009


> >> +
> >> +/*
> >> + * This is just to keep the linker happy.
> >> + */
> >> +
> >> +.globl lowlevel_init
> >> +
> >> +lowlevel_init:
> >> +     mov     pc, lr
> > why do you need it?
> 
> start.S:cpu_init_crit needs it and I haven't defined SKIP_LOWLEVEL.
> Might be possible to define SKIP_LOWLEVEL_INIT and get rid of the
> above line.
if you do not need to do any lowlevel_init
yes please
> 
> >> diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
> >> new file mode 100644
> >> index 0000000..9eed979
> >> --- /dev/null
> >> +++ b/board/freescale/mx31pdk/mx31pdk.c
> >> @@ -0,0 +1,76 @@
> >> +/*
> >> + *

> >> +
> >> +int board_init(void)
> >> +{
> >> +     /* CS5: CPLD incl. network controller */
> >> +     __REG(CSCR_U(5)) = 0x0000d843;
> >> +     __REG(CSCR_L(5)) = 0x22252521;
> >> +     __REG(CSCR_A(5)) = 0x22220a00;
> >> +
> >> +     /* setup pins for UART1 */
> >> +     mx31_gpio_mux(MUX_RXD1__UART1_RXD_MUX);
> >> +     mx31_gpio_mux(MUX_TXD1__UART1_TXD_MUX);
> >> +     mx31_gpio_mux(MUX_RTS1__UART1_RTS_B);
> >> +     mx31_gpio_mux(MUX_CTS1__UART1_CTS_B);
> > I think it's time to create common device init functions
> > as done for davinci or at91
> 
> I think I prefer the at91 way of doing this, I can create
> cpu/arm1136/mx31/serial.c and spi.c.
as I
tks
please note I'll regroup all devices init fuctions
in one file per cpu
maybe you can create a devices.c
> 
> >> +
> >> +     /* SPI2 */
> >> +     mx31_gpio_mux(MUX_CSPI2_SS2__CSPI2_SS2_B);
> >> +     mx31_gpio_mux(MUX_CSPI2_SCLK__CSPI2_CLK);
> >> +     mx31_gpio_mux(MUX_CSPI2_SPI_RDY__CSPI2_DATAREADY_B);
> >> +     mx31_gpio_mux(MUX_CSPI2_MOSI__CSPI2_MOSI);
> >> +     mx31_gpio_mux(MUX_CSPI2_MISO__CSPI2_MISO);
> >> +     mx31_gpio_mux(MUX_CSPI2_SS0__CSPI2_SS0_B);
> >> +     mx31_gpio_mux(MUX_CSPI2_SS1__CSPI2_SS1_B);
> >> diff --git a/board/freescale/mx31pdk/u-boot.lds b/board/freescale/mx31pdk/u-boot.lds
> >> new file mode 100644
> >> index 0000000..e96509a
> >> --- /dev/null
> >> +++ b/board/freescale/mx31pdk/u-boot.lds
> > I've send a patch that unify all arm lds so this one is not anymore needed
> 
> I'll try it. Are you planning other major changes that will affect
> these patches in the near future?
no
> 
> >> @@ -0,0 +1,59 @@
> >> +/*
> >> + * You should have received a copy of the GNU General Public License
> >> + * along with this program; if not, write to the Free Software
> >> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> >> + * MA 02111-1307 USA
> >> + */
> >> +
> >> +#ifndef __CONFIG_H
> >> +#define __CONFIG_H
> >> +
> >> +#include <asm/arch/mx31-regs.h>
> > why?
> 
> So we can use symbolic names for Ethernet base address, SDRAM base
> address. I.e. instead of writing e.g. 0xB6000000 we can write
> CS5_BASE. I can switch to hard coded numerical values and get rid of
> the #include if requested.
if you include it in the final c files
you do not need to include mx31-regs.h always
> 
> >> +/***********************************************************
> >> + * Command definition
> >> + ***********************************************************/
> >> +
> >> +#include <config_cmd_default.h>
> >> +
> >> +#define CONFIG_CMD_MII
> >> +#define CONFIG_CMD_PING
> >> +#define CONFIG_CMD_SPI
> >> +#define CONFIG_CMD_DATE
> >> +
> >> +/* Disabled due to compilation errors in cmd_bootm.c (IMLS seems to require
> >> + * that CFG_NO_FLASH is undefined).
> >> + */
> > please remove the comment
> 
> The comment was added since Wolfgang asked why IMLS was disabled when
> I posted a similar set of patches last year, so I'm going to keep the
> comment.
ok

Best Regards,
J.


More information about the U-Boot mailing list