[U-Boot] [PATCH] Add PR1 Appliance - ISDN PRI board
Mike Frysinger
vapier at gentoo.org
Sat Nov 19 06:42:51 CET 2011
On Thursday 17 November 2011 17:49:07 Dimitar Penev wrote:
> I am supporting Switchfin GPL software (www.switchfin.org) which contains
> supports of PR1 Appliance - Asterisk based ISDN PRI PBX.
> This board is Blackfin BF537 based. The schematics is not fully opened.
the schematics don't need to be open to be merged
> The following patch adds PR1 Appliance support in u-boot.
> It is based on u-boot-2011.09 from the ADI u-boot git repository
you'll need to add an entry to MAINTAINERS for your board
> --- a/board/pr1/config.mk
> +++ b/board/pr1/config.mk
>
> +# Set some default LDR flags based on boot mode.
> +LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
> +LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6
if your board only supports booting from SPI flash, then delete these lines
> --- a/board/pr1/Makefile
> +++ b/board/pr1/Makefile
>
> +COBJS-$(CONFIG_HAS_POST) += post-memory.o
you don't provide this file, so delete this line
> +clean:
> + rm -f $(SOBJS) $(OBJS)
> +
> +distclean: clean
> + rm -f $(LIB) core *.bak $(obj).depend
dead targets. delete.
> --- a/board/pr1/pr1.c
> +++ b/board/pr1/pr1.c
>
> +#include <config.h>
common.h pulls this in. you don't need to. delete it.
> +#include <command.h>
unused -> delete
> +#include <asm/mach-common/bits/bootrom.h>
unused -> delete
> +DECLARE_GLOBAL_DATA_PTR;
unused -> delete
> +void board_reset(void)
> +{
> + /* workaround for weak pull ups on ssel */
> + if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
> + bfin_reset_boot_spi_cs(GPIO_PF10);
> +}
do you actually have this problem in the hardware ? or is this just left over
from copying the old bf537 file ?
> +#ifdef CONFIG_BFIN_MAC
> +static void board_init_enetaddr(uchar *mac_addr)
do you not have dedicated storage for the mac ?
if not, delete board_init_enetaddr()
> --- a/include/configs/bfin_adi_common.h
> +++ b/include/configs/bfin_adi_common.h
>
> # define NAND_ENV_SETTINGS \
> "nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
> "nandboot=" \
> - "nand read $(loadaddr) 0x20000 0x100000;" \
> + "nand read $(loadaddr) 0x0 0x900000;" \
> "run nandargs;" \
> "bootm" \
> "\0"
don't do this. update your board config header by adding this after the
#include at the end of the file:
#undef NAND_ENV_SETTINGS
#define NAND_ENV_SETTINGS \
"nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
"nandboot=" \
"run nandargs;" \
"nboot $(loadaddr) 0x0 0x900000;" \
"\0"
if nboot doesn't work, then original nand read/bootm is fine.
> -# define CONFIG_IPADDR 192.168.0.15
> -# define CONFIG_GATEWAYIP 192.168.0.1
> -# define CONFIG_SERVERIP 192.168.0.2
> +# define CONFIG_IPADDR 192.168.1.100
> +# define CONFIG_GATEWAYIP 192.168.1.1
> +# define CONFIG_SERVERIP 192.168.1.2
NAK. tweak the settings in your board config.
> --- a/include/configs/pr1.h
> +++ b/include/configs/pr1.h
>
> +/*
> + * Debuging
> + *
> +
> +define CONFIG_DEBUG_EARLY_SERIAL 1
> +//define DEBUG 1
> +//define CONFIG_DEBUG_DUMP_SYMS 1
> +*/
just delete
> +/*
> + * TFTP block size
> + */
> +#define CONFIG_TFTP_BLOCKSIZE 4096
might be sensible to move this to the common adi blackfin header. comments in
net/tftp.c suggest this should be more like 4404 (1468 * 3) though.
> +#define CONFIG_NET_MULTI 1
no longer needed -> delete
> +/*#define CONFIG_ENV_OVERWRITE 1 Enable if you want ethaddr and serial#
to be protected */
common adi header has this already, so delete this from your file
> +#define CONFIG_SYS_NO_FLASH /* we have only NAND */
not true ... you have SPI too ;)
> +#define CONFIG_SPI_FLASH_ALL
i doubt the board has more than 1 type of SPI flash. just define the one you
need and forget the rest.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111119/36a6c4ce/attachment.pgp>
More information about the U-Boot
mailing list