From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/11] zipitz2: restore board support
Date: Mon, 21 Mar 2016 02:45:56 +0100 [thread overview]
Message-ID: <56EF5254.4040104@denx.de> (raw)
In-Reply-To: <1458524230-10827-1-git-send-email-anarsoul@gmail.com>
On 03/21/2016 02:37 AM, Vasily Khoruzhick wrote:
> zipitz2 was dropped in 49d8899ba9c26335e4a12e01c18028fc5e40c796
That's great to know. So what does this patch do ?
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Hi!
> +int dram_init(void)
> +{
> + pxa2xx_dram_init();
> + gd->ram_size = PHYS_SDRAM_1_SIZE;
> + return 0;
> +}
> +
> +void dram_init_banksize(void)
> +{
> + gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
> + gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
There should be a default function for this in common/board_*c
> +}
> +
> +#ifdef CONFIG_CMD_MMC
> +int board_mmc_init(bd_t *bis)
> +{
> + pxa_mmc_register(0);
> + return 0;
> +}
> +#endif
[...]
> +void zipitz2_spi_sda(int set)
> +{
> + /* GPIO 13 */
> + if (set)
> + writel((1 << 13), GPSR0);
> + else
> + writel((1 << 13), GPCR0);
This could seriously use a conversion to GPIO driver, but this can be
done later. You can drop the excess parenthesis around 1 << 13 here and
all over the place. You can even convert it to BIT(13) .
> +}
> +
> +void zipitz2_spi_scl(int set)
> +{
> + /* GPIO 22 */
> + if (set)
> + writel((1 << 22), GPCR0);
> + else
> + writel((1 << 22), GPSR0);
> +}
[...]
> +void lcd_start(void)
> +{
> + int i;
> + unsigned char reg[3] = { 0x74, 0x00, 0 };
> + unsigned char data[3] = { 0x76, 0, 0 };
> + unsigned char dummy[3] = { 0, 0, 0 };
all should be const
> + /* PWM2 AF */
> + writel(readl(GAFR0_L) | 0x00800000, GAFR0_L);
> + /* Enable clock to all PWM */
> + writel(readl(CKEN) | 0x3, CKEN);
> + /* Configure PWM2 */
> + writel(0x4f, PWM_CTRL2);
> + writel(0x2ff, PWM_PWDUTY2);
> + writel(792, PWM_PERVAL2);
> +
> + /* Toggle the reset pin to reset the LCD */
> + writel((1 << 19), GPSR0);
> + udelay(100000);
> + writel((1 << 19), GPCR0);
> + udelay(20000);
> + writel((1 << 19), GPSR0);
BIT()
> + udelay(20000);
> +
> + /* Program the LCD init sequence */
> + for (i = 0; i < sizeof(lcd_data) / sizeof(lcd_data[0]); i++) {
> + reg[0] = 0x74;
> + reg[1] = 0x0;
> + reg[2] = lcd_data[i].reg;
> + spi_xfer(NULL, 24, reg, dummy, SPI_XFER_BEGIN | SPI_XFER_END);
> +
> + data[0] = 0x76;
> + data[1] = lcd_data[i].data >> 8;
> + data[2] = lcd_data[i].data & 0xff;
> + spi_xfer(NULL, 24, data, dummy, SPI_XFER_BEGIN | SPI_XFER_END);
> +
> + if (lcd_data[i].mdelay)
> + udelay(lcd_data[i].mdelay * 1000);
mdelay ;-)
> + }
> +
> + writel((1 << 11), GPSR0);
> +}
> +#endif
[...]
> diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h
> new file mode 100644
> index 0000000..586a445
> --- /dev/null
> +++ b/include/configs/zipitz2.h
> @@ -0,0 +1,224 @@
> +/*
> + * Aeronix Zipit Z2 configuration file
> + *
> + * Copyright (C) 2009-2010 Marek Vasut <marek.vasut@gmail.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +/*
> + * High Level Board Configuration Options
> + */
> +#define CONFIG_CPU_PXA27X 1 /* Marvell PXA270 CPU */
> +#define CONFIG_SYS_TEXT_BASE 0x0
use #define[SPACE] not #define[TAB] and please fix it all over the patch.
> +#undef CONFIG_BOARD_LATE_INIT
> +#undef CONFIG_SKIP_LOWLEVEL_INIT
> +#define CONFIG_PREBOOT
[...]
Run checkpatch.pl on the patches please ;-)
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2016-03-21 1:45 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 1:37 [U-Boot] [PATCH 01/11] zipitz2: restore board support Vasily Khoruzhick
2016-03-21 1:37 ` [U-Boot] [PATCH 02/11] zipitz2: enable LCD rotation Vasily Khoruzhick
2016-03-21 1:47 ` Marek Vasut
2016-03-27 22:29 ` [U-Boot] [U-Boot,02/11] " Tom Rini
2016-03-21 1:37 ` [U-Boot] [PATCH 03/11] pxa_lcd: invert colors for Zipit Z2 to get white on black palette Vasily Khoruzhick
2016-03-21 1:48 ` Marek Vasut
2016-03-21 2:10 ` Vasily Khoruzhick
2016-03-21 2:14 ` Marek Vasut
2016-03-27 22:29 ` [U-Boot] [U-Boot, " Tom Rini
2016-03-27 23:26 ` Marek Vasut
2016-03-28 0:58 ` Tom Rini
2016-03-21 1:37 ` [U-Boot] [PATCH 04/11] zipitz2: enable libfdt Vasily Khoruzhick
2016-03-21 1:48 ` Marek Vasut
2016-03-27 22:29 ` [U-Boot] [U-Boot,04/11] " Tom Rini
2016-03-21 1:37 ` [U-Boot] [PATCH 05/11] pxa-common: pxa27x has 3 OHCI ports Vasily Khoruzhick
2016-03-21 1:49 ` Marek Vasut
2016-03-27 22:29 ` [U-Boot] [U-Boot,05/11] " Tom Rini
2016-03-21 1:37 ` [U-Boot] [PATCH 06/11] zipitz2: enable USB host support Vasily Khoruzhick
2016-03-21 1:49 ` Marek Vasut
2016-03-27 22:29 ` [U-Boot] [U-Boot,06/11] " Tom Rini
2016-03-21 1:37 ` [U-Boot] [PATCH 07/11] pxa: start.S: enable SRAM clock Vasily Khoruzhick
2016-03-21 1:50 ` Marek Vasut
2016-03-27 22:29 ` [U-Boot] [U-Boot,07/11] " Tom Rini
2016-03-21 1:37 ` [U-Boot] [PATCH 08/11] pxa: add support for D- and I- caches Vasily Khoruzhick
2016-03-21 1:51 ` Marek Vasut
2016-03-27 22:29 ` [U-Boot] [U-Boot,08/11] " Tom Rini
2016-03-21 1:37 ` [U-Boot] [PATCH 09/11] pxa_lcd: make driver cache-aware Vasily Khoruzhick
2016-03-21 1:52 ` Marek Vasut
2016-03-27 22:29 ` [U-Boot] [U-Boot,09/11] " Tom Rini
2016-03-27 23:27 ` Marek Vasut
2016-03-28 0:58 ` Tom Rini
2016-03-21 1:37 ` [U-Boot] [PATCH 10/11] zipitz2: enable caches Vasily Khoruzhick
2016-03-21 1:52 ` Marek Vasut
2016-03-27 22:30 ` [U-Boot] [U-Boot,10/11] " Tom Rini
2016-03-21 1:37 ` [U-Boot] [PATCH 11/11] cfi_flash: return device into read array mode after reading status Vasily Khoruzhick
2016-03-21 1:54 ` Marek Vasut
2016-03-21 16:19 ` Stefan Roese
2016-03-21 19:22 ` Vasily Khoruzhick
2016-03-22 6:40 ` Stefan Roese
2016-03-27 22:30 ` [U-Boot] [U-Boot, " Tom Rini
2016-03-21 1:45 ` Marek Vasut [this message]
2016-03-27 22:29 ` [U-Boot] [U-Boot,01/11] zipitz2: restore board support Tom Rini
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=56EF5254.4040104@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.