From: Josh Cartwright <joshc@eso.teric.us>
To: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/9] ARM: Zynq: Add new architecture zynq
Date: Tue, 12 Mar 2013 08:42:34 -0500 [thread overview]
Message-ID: <20130312134234.GQ16050@kryptos> (raw)
In-Reply-To: <1362993306-19262-3-git-send-email-s.trumtrar@pengutronix.de>
On Mon, Mar 11, 2013 at 10:14:59AM +0100, Steffen Trumtrar wrote:
> Add basic support for the Xilinx Zynq-7000 EPP architecture.
> The Zynq-7000 is an embedded processing platform that combines a Cortex A9
> dualcore MPSoC with an Artix-7 FPGA.
>
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
[..]
> diff --git a/arch/arm/mach-zynq/include/mach/barebox.lds.h b/arch/arm/mach-zynq/include/mach/barebox.lds.h
> new file mode 100644
> index 0000000..674a4ac
> --- /dev/null
> +++ b/arch/arm/mach-zynq/include/mach/barebox.lds.h
> @@ -0,0 +1,9 @@
> +#define PRE_IMAGE \
> + .pre_image : { \
> + KEEP(*(.flash_header_start*)) \
> + . = 0x20; \
> + KEEP(*(.flash_header_0x0*)) \
> + . = 0xa0; \
> + KEEP(*(.ps7reg_entry_0x0A0)) \
> + . = 0x8c0; \
> + }
[..]
> diff --git a/arch/arm/mach-zynq/include/mach/zynq-flash-header.h b/arch/arm/mach-zynq/include/mach/zynq-flash-header.h
> new file mode 100644
> index 0000000..a0251cb
> --- /dev/null
> +++ b/arch/arm/mach-zynq/include/mach/zynq-flash-header.h
> @@ -0,0 +1,40 @@
> +#ifndef __MACH_FLASH_HEADER_H
> +#define __MACH_FLASH_HEADER_H
> +
> +#include <asm-generic/sections.h>
> +
> +#define __flash_header_start __section(.flash_header_start)
> +
> +#define __flash_header_section __section(.flash_header_0x0)
> +#define __ps7reg_entry_section __section(.ps7reg_entry_0x0A0)
> +#define __image_len_section __section(.image_len_0x08c0)
> +#define FLASH_HEADER_OFFSET 0x0
> +#define IMAGE_OFFSET 0x8c0
> +
> +#define DEST_BASE 0x8c0
> +#define FLASH_HEADER_BASE (DEST_BASE + FLASH_HEADER_OFFSET)
> +
> +struct zynq_reg_entry {
> + __le32 addr;
> + __le32 val;
> +};
Was there a particular reason you kept the ps7reg_entry in a separate
section? Since the register initialization section of BOOT.BIN is of
fixed size, it may make more sense/be simpler if you just pull it into
the zynq_flash_header (see below):
> +
> +#define WIDTH_DETECTION_MAGIC 0xAA995566
> +#define IMAGE_IDENTIFICATION 0x584C4E58 /* "XLNX" */
> +
> +struct zynq_flash_header {
> + uint32_t width_det;
> + uint32_t image_id;
> + uint32_t enc_stat;
> + uint32_t user;
> + uint32_t flash_offset;
> + uint32_t length;
> + uint32_t res0;
> + uint32_t start_of_exec;
> + uint32_t total_len;
> + uint32_t res1;
> + uint32_t checksum;
> + uint32_t res2;
> +};
These should probably also be of type __le32.
struct zynq_flash_header {
__le32Â width_det;
__le32Â image_id;
__le32Â enc_stat;
__le32Â user;
__le32Â flash_offset;
__le32Â length;
__le32Â res0;
__le32Â start_of_exec;
__le32Â total_len;
__le32Â res1;
__le32Â checksum;
__le32Â res2[0x15];
struct {
        __le32 addr;
        __le32 val;
}Â reg_init[0x100];
__le32Â res3[0x8];
};
Also, the REG() macro you've introduced in the board file seems
like it should go in this file instead.
#define REG(a,v) { .addr = cpu_to_le32(a), .val = cpu_to_le32(v) }
#define END_REG REG(0xFFFFFFFF, 0)
> +
> +#endif /* __MACH_FLASH_HEADER_H */
[..]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-03-12 13:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 9:14 [PATCH 0/9] ARM: add support for Zynq Steffen Trumtrar
2013-03-11 9:14 ` [PATCH 1/9] serial: Add driver for Cadence UART Steffen Trumtrar
2013-03-11 9:56 ` Sascha Hauer
2013-03-11 9:14 ` [PATCH 2/9] ARM: Zynq: Add new architecture zynq Steffen Trumtrar
2013-03-11 10:04 ` Sascha Hauer
2013-03-11 18:13 ` Josh Cartwright
2013-03-12 13:42 ` Josh Cartwright [this message]
2013-03-11 9:15 ` [PATCH 3/9] ARM: zynq: add zynq fsbl checksum script Steffen Trumtrar
2013-03-11 10:05 ` Sascha Hauer
2013-03-11 9:15 ` [PATCH 4/9] ARM: zynq: Add support for the Avnet Zedboard Steffen Trumtrar
2013-03-11 10:06 ` Sascha Hauer
2013-03-11 9:15 ` [PATCH 5/9] ARM: zynq: add clk support for zynq7000 Steffen Trumtrar
2013-03-11 9:15 ` [PATCH 6/9] ARM: zynq: clk: replace define with header Steffen Trumtrar
2013-03-11 18:29 ` Josh Cartwright
2013-03-11 18:55 ` Steffen Trumtrar
2013-03-11 9:15 ` [PATCH 7/9] ARM: zynq: clk: add pll type Steffen Trumtrar
2013-03-11 18:28 ` Josh Cartwright
2013-03-11 18:59 ` Steffen Trumtrar
2013-03-11 9:15 ` [PATCH 8/9] ARM: zynq: clk: convert to platform driver Steffen Trumtrar
2013-03-11 9:15 ` [PATCH 9/9] ARM: zynq: remove clocksource Steffen Trumtrar
2013-03-11 18:17 ` Josh Cartwright
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=20130312134234.GQ16050@kryptos \
--to=joshc@eso.teric.us \
--cc=barebox@lists.infradead.org \
--cc=s.trumtrar@pengutronix.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.