From: Sascha Hauer <s.hauer@pengutronix.de>
To: Oleksij Rempel <linux@rempel-privat.de>
Cc: barebox@lists.infradead.org,
Oleksij Rempel <bug-track@fisher-privat.net>
Subject: Re: [PATCH 2/3][WiP] add atheros MIPS based ar2313 WiSoC chips
Date: Mon, 22 Apr 2013 18:50:43 +0200 [thread overview]
Message-ID: <20130422165043.GK32299@pengutronix.de> (raw)
In-Reply-To: <1366621553-8947-1-git-send-email-linux@rempel-privat.de>
Only some comments for now, I think you are still working on this
anyway, right?
On Mon, Apr 22, 2013 at 11:05:53AM +0200, Oleksij Rempel wrote:
+
> +static void
> +ar231x_print_mac(unsigned char *mac)
> +{
> + int i;
> + for (i = 0; i < 5; i++) {
> + printf("%02x:", mac[i]);
> + }
> + printf("%02x\n", mac[5]);
> +}
We have a ethaddr_to_string function which could be of use here.
> +ar231x_find_config(u8 *flash_limit)
> +{
> + struct ar231x_board_config *config;
> + u8 *bcfg, bsize;
> + u8 brocken;
> +
> + bcfg = ar231x_find_board_config(flash_limit);
> +
> + bsize = sizeof(struct ar231x_board_config);
> + config = xzalloc(bsize);
> + ar231x_board.config = config;
> +
> + if (bcfg) {
> + u16 cksum;
> + /* Copy the board and radio data to RAM, because accessing the mapped
> + * memory of the flash directly after booting is not safe */
> + memcpy(config, bcfg, bsize);
> + cksum= 0xca + ar231x_cksum16((unsigned char *)config + HDR_SIZE,
> + sizeof(struct ar231x_board_config) - HDR_SIZE);
> + if (cksum != config->cksum) {
> + pr_err("config: checksum is invalid: %04x != %04x\n",
> + cksum, config->cksum);
> + brocken = 1;
This variable is unused.
+
> +/*
> + * Platform device information for the Ethernet MAC
> + */
> +struct ar231x_eth_platform_data {
> + u32 base_eth;
> + u32 base_reset;
> + u32 reset_mac;
> + u32 reset_phy;
> + u32 base_phy;
> +
> + u8 *mac;
> +};
This should be part of the patch adding the ethernet driver.
> +
> +.globl lowlevel_init
> +lowlevel_init:
> + li t5, MEM_CFG0_X # try x16
> + li t6, 0x23000 # use 8-word burst
> +
> + /* Configure for a x16 SDRAM with 8-word burst */
> + li t5, MEM_CFG0_X # try x16
> + li t6, 0x23000 # use 8-word burst
This could use a coding style cleanup, remove trailing whitespaces, use
tabs consistently, remove C++ comments.
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-04-22 16:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 9:05 Oleksij Rempel
2013-04-22 16:50 ` Sascha Hauer [this message]
2013-04-25 14:54 ` antonynpavlov
-- strict thread matches above, loose matches on Subject: below --
2013-04-22 9:00 Oleksij Rempel
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=20130422165043.GK32299@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=bug-track@fisher-privat.net \
--cc=linux@rempel-privat.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