All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 7/8] add support for palm treo 680 board
Date: Sun, 14 Apr 2013 19:34:09 +0200	[thread overview]
Message-ID: <201304141934.09570.marex@denx.de> (raw)
In-Reply-To: <1365793160-18247-8-git-send-email-mikedunn@newsguy.com>

Dear Mike Dunn,

[...]

> +int board_init(void)
> +{
> +	/* We have RAM, disable cache */
> +	dcache_disable();
> +	icache_disable();
> +
> +	gd->bd->bi_arch_number = MACH_TYPE_TREO680;

This is not needed, just define CONFIG_MACH_TYPE in treo680.h

> +	gd->bd->bi_boot_params = 0xa0000100;

Is this not CONFIG_SYS_DRAM_BASE + 0x100 ? I think it is.

> +
> +	return 0;
> +}
> +
> +int dram_init(void)
> +{
> +	/* IPL initializes SDRAM (we're already running from it) */
> +	gd->ram_size = PHYS_SDRAM_1_SIZE;
> +	return 0;
> +}
> +
> +#ifdef CONFIG_LCD
> +void lcd_enable(void)
> +{
> +	/*
> +	 * Undo the L_BIAS / gpio77 pin configuration performed by the pxa lcd
> +	 * driver code.  We need it as an output gpio.
> +	 */
> +	writel((readl(GAFR2_L) & ~(0xc << 24)), GAFR2_L);
> +
> +	/* power-up and enable the lcd */
> +	writel(0x00400000, GPSR(86)); /* enable; drive high */
> +	writel(0x00002000, GPSR(77)); /* power; drive high */
> +	writel(0x02000000, GPCR(25)); /* enable_n; drive low */
> +
> +	/* turn on LCD backlight and configure PWM for reasonable brightness */
> +	writel(0x00, PWM_CTRL0);
> +	writel(0x1b1, PWM_PERVAL0);
> +	writel(0xfd, PWM_PWDUTY0);
> +	writel(0x00000040, GPSR(38)); /*  backlight power on */
> +}
> +#endif
> +
> +#ifdef CONFIG_MMC
> +int board_mmc_init(bd_t *bis)
> +{
> +	writel(0x00000400, GPSR(42)); /* power on */

Can you not use your bitlibrary for this stuff? Or maybe at least use (1 << n) 
here to make it more readable.

But seriously, do you not want to (in the longer run) implement proper GPIO 
driver for PXA? That'd help a lot. Also, do you not want to volunteer to fix 
PXA? I think it's a bit rotting all around ;-)

> +	return pxa_mmc_register(0);
> +}
> +#endif
> +
> +void board_nand_init(void)
> +{
> +	/* we have one 128M diskonchip G4  */
> +
> +	struct mtd_info *mtd = &nand_info[0];
> +	struct nand_chip *nand = &docg4_nand_chip;
> +	if (docg4_nand_init(mtd, nand, 0))
> +		hang();
> +}
> +
> +#ifdef CONFIG_SPL_BUILD
> +void *memcpy(void *dest, const void *src, size_t count)
> +{

CONFIG_SPL_LIBCOMMON_SUPPORT shall give you memcpy.

[...]

> +void nand_boot(void)
> +{
[...]

Will the common/spl/ NAND loading code not cut it here? I guess it won't since 
PXA is FUBAR when it comes to any kind of SPL loading. Do you not want to fix 
that? I'd be really grateful if you did ;-)

[...]

btw. you dont really need to #define CONFIG_PXA27X to value "1" in your config, 
just remove those useless trailing "1"s .

  reply	other threads:[~2013-04-14 17:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 18:59 [U-Boot] [PATCH v3 0/8] palm treo 680 smartphone board support Mike Dunn
2013-04-12 18:59 ` [U-Boot] [PATCH v3 1/8] pxa_lcd: add the ACX544AKN lcd device Mike Dunn
2013-04-12 18:59 ` [U-Boot] [PATCH v3 2/8] pxa_lcd: make lcd_enable() a weak pointer Mike Dunn
2013-04-12 18:59 ` [U-Boot] [PATCH v3 3/8] pxa27x_udc: remove call to unimplemented set_GPIO_mode() Mike Dunn
2013-04-12 18:59 ` [U-Boot] [PATCH v3 4/8] arm: bootm: call udc_disable() before booting linux Mike Dunn
2013-04-14 17:26   ` Marek Vasut
2013-04-14 19:22   ` Albert ARIBAUD
2013-04-14 20:12     ` Marek Vasut
2013-04-15 12:45       ` Tom Rini
2013-04-15 12:56         ` Albert ARIBAUD
2013-04-15 13:08           ` Marek Vasut
2013-04-12 18:59 ` [U-Boot] [PATCH 5/8] lib: import bitrev library from the linux kernel Mike Dunn
2013-04-12 18:59 ` [U-Boot] [PATCH v3 6/8] mtd: nand: add driver for diskonchip g4 nand flash Mike Dunn
2013-04-12 19:21   ` Scott Wood
2013-04-13 14:42     ` Marek Vasut
2013-04-15 17:51       ` Scott Wood
2013-04-12 18:59 ` [U-Boot] [PATCH v3 7/8] add support for palm treo 680 board Mike Dunn
2013-04-14 17:34   ` Marek Vasut [this message]
2013-04-15 17:34     ` Mike Dunn
2013-04-15 18:33       ` Marek Vasut
2013-04-15 19:11         ` Mike Dunn
2013-04-12 18:59 ` [U-Boot] [PATCH v3 8/8] palmtreo680: add utility that writes u-boot to flash Mike Dunn
2013-04-14 17:38   ` Marek Vasut
2013-04-16 17:50     ` Mike Dunn
2013-04-16 18:06       ` Marek Vasut

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=201304141934.09570.marex@denx.de \
    --to=marex@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.