From: Sascha Hauer <s.hauer@pengutronix.de>
To: Renaud Barbier <renaud.barbier@ge.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 0/9] MPC8xxx support
Date: Wed, 25 Jan 2012 20:33:25 +0100 [thread overview]
Message-ID: <20120125193325.GB5446@pengutronix.de> (raw)
In-Reply-To: <1327408443-3519-1-git-send-email-renaud.barbier@ge.com>
Hi Renaud,
On Tue, Jan 24, 2012 at 12:33:54PM +0000, Renaud Barbier wrote:
> These patches are a work in progress to introduce the mpc8xxx
> architecture to barebox.
> They include preparation work to add the new architecture and
> a minimal support for the P2020RDB. That is, serial only, no
> network driver or storage drivers.
> I will follow up with the Ethernet, NAND and I2C driver.
Sorry, but the patches in their current form a nowhere close for being
mergable.
- Generally the #ifdef density is much too high. We have good mechanisms
to avoid that (initcalls, put code together that belongs together, add
function parameters)
- Lots of dead code:
- unused CONFIG_ variables:
CONFIG_USE_IRQ, CONFIG_SYS_SRIO, CONFIG_CMD_SATA, CONFIG_FSL_SATA,
CONFIG_BACKSIDE_L2_CACHE, CONFIG_QE, CONFIG_VSC7385_ENET,...
- unused functions:
arch_preboot_os
- referenced functions not contained in these patches:
qe_init, srio_init
- Files which are not compiled (and also won't compile if enabled)
fdt_8xxx.c, fdt.c
- unused header files:
fsl_portals.h, lmb.h
- driver specific header files under arch/ppc (should be next to the
driver):
tsec.h
- please no typedefs for structs
- All functions in your board file are global, they should *all* be
static. If you need to call them from somewhere else, there is
something wrong.
- default MAC address in code. Don't do that. barebox generates random
MAC addresses if no valid one is found in the EEPROM.
The following snippet is somewhat symptomatic for this patch series:
static struct i2c_board_info i2c_devices[] = {
{
I2C_BOARD_INFO("eepromid", CONFIG_SYS_I2C_EEPROM_ADDR),
},
{
I2C_BOARD_INFO("rtc", CONFIG_SYS_I2C_RTC_ADDR),
},
};
This snippet is board specific, so you don't need a define for the
addresses. "rtc" is not a driver we will ever add to barebox, instead
it must be the specific clock chip in the platform data. btw
CONFIG_SYS_I2C_EEPROM_ADDR is defined twice in your board header file.
Also, please don't #undef things. Just don't define them in the first
place.
Generally please don't use the CONFIG_ namespace for anything else but
kconfig variables.
I suggest that you start by removing all dead code in the patches, then
the patches may be small enough for a closer review.
Sascha
--
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
prev parent reply other threads:[~2012-01-25 19:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 12:33 Renaud Barbier
2012-01-24 12:33 ` [PATCH 1/9] Preparation stage to support multiple PPC architectures Renaud Barbier
2012-01-25 17:33 ` Sascha Hauer
2012-01-24 12:33 ` [PATCH 2/9] Define clock source shift and mask Renaud Barbier
2012-01-25 17:36 ` Sascha Hauer
2012-01-24 12:33 ` [PATCH 3/9] Added support for the mpc8xxx architecture Renaud Barbier
2012-01-24 12:33 ` [PATCH 4/9] Header files added to support " Renaud Barbier
2012-01-24 12:33 ` [PATCH 5/9] Update to existing header files Renaud Barbier
2012-01-24 12:34 ` [PATCH 6/9] Add file and compilation of strmhz Renaud Barbier
2012-01-24 12:34 ` [PATCH 7/9] Add-ons to the PPC library to support the mpc8xxx Renaud Barbier
2012-01-24 12:34 ` [PATCH 8/9] Update (ppc) Makefile and Kconfig Renaud Barbier
2012-01-24 12:34 ` [PATCH 9/9] P1_P2 platform support code and configuratin file for the P2020RDB Renaud Barbier
2012-01-25 19:33 ` Sascha Hauer [this message]
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=20120125193325.GB5446@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=renaud.barbier@ge.com \
/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