public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Add PR1 Appliance - ISDN PRI board
Date: Sat, 19 Nov 2011 00:42:51 -0500	[thread overview]
Message-ID: <201111190042.52468.vapier@gentoo.org> (raw)
In-Reply-To: <014501cca57b$1d65e800$2901a8c0@dpn>

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>

  reply	other threads:[~2011-11-19  5:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 22:49 [U-Boot] [PATCH] Add PR1 Appliance - ISDN PRI board Dimitar Penev
2011-11-19  5:42 ` Mike Frysinger [this message]
2011-11-19 15:18   ` Dimitar Penev
2011-11-19 20:17     ` Mike Frysinger
2011-11-20 20:24       ` Dimitar Penev
2011-11-25 20:55         ` Mike Frysinger
2011-11-25 21:54           ` Dimitar Penev
2011-11-25 22:08             ` Mike Frysinger
2011-11-25 23:40               ` Dimitar Penev
2012-01-08  9:24 ` [U-Boot] [PATCH v2] Blackfin: pr1: new board port Mike Frysinger
2012-01-09 17:16   ` Dimitar Penev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201111190042.52468.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox