[U-Boot] [PATCH 1/3 v3] Bit-banged MII driver with multi-bus support.

Luigi 'Comio' Mantellini luigi.mantellini at idf-hit.com
Thu Sep 24 14:52:05 CEST 2009


(autoreview)

Hi Ben,

I make some changes to the patch, but I will post after your review.
See my annotation, that will be present into the next patch release.

best regards.

Il mercoledì 23 settembre 2009 15:10:54 Luigi 'Comio' Mantellini ha scritto:
> From: Luigi 'Comio' Mantellini <luigi.mantellini at idf-hit.com>
> 
> Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini at idf-hit.com>
> ---
>  drivers/net/phy/miiphybb.c |  324
>  +++++++++++++++++++++++++++++++------------- include/miiphy.h           | 
>   22 +++
>  2 files changed, 250 insertions(+), 96 deletions(-)
> 
> diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c
> index b77c917..1ed27f1 100644
> --- a/drivers/net/phy/miiphybb.c
> +++ b/drivers/net/phy/miiphybb.c

...

> +
> +struct bbmiibus bbmiibusses[] = {

[COMIO] s/busses/buses - Sorry for the typo.

...

> +
> +void bb_miiphy_init(void)
> +{
> +	int i;
> +	for (i = 0; i < sizeof(bbmiibusses)/sizeof(bbmiibusses[0]); i++) {

[COMIO] Add bbmiibuses_num external variable. The board specific code need
to instance it as:

int bbmiibuses_num = sizeof(bbmiibuses)/sizeof(bbmiibuses[0])

I need this because I cannot know the array size at compile time. The other 
solution may be to use a dummy value at the array end... What do you suggest?

...
> +static inline struct bbmiibus *bb_miiphy_getbus(char *devname)
> +{
> +#ifdef CONFIG_BITBANGMII_MULTI
> +	/* Search the correct bus */
> +	for (j = 0; j < sizeof(bbmiibusses)/sizeof(bbmmis[0]); j++) {

[COMIO] Changed j to i and add i declaration.

> diff --git a/include/miiphy.h b/include/miiphy.h
> index fa33ec7..478c050 100644
> --- a/include/miiphy.h
> +++ b/include/miiphy.h
> @@ -19,6 +19,8 @@
> +
> +extern struct bbmiibus bbmiibusses[];

[COMIO] Change bbmiibusses to bbmiibuses and add the following declaration:

extern int bbmiibuses_num

Any comment is welcome

best regards,

luigi


-- 

Luigi 'Comio' Mantellini
R&D - Software

Industrie Dial Face S.p.A.
Via Canzo, 4 
20068 Peschiera Borromeo (MI) Italy
Tel.: +39 02 5167 2813
Fax: +39 02 5167 2459
E-mail: luigi.mantellini at idf-hit.com

Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle 
persone indicate. La diffusione, copia o qualsiasi altra azione derivante 
dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora 
abbiate ricevuto questo documento per errore siete cortesemente pregati di 
darne immediata comunicazione al mittente e di provvedere alla sua 
distruzione, Grazie.

Rispetta l'ambiente. Non stampare questa mail se non è realmente necessario.

This e-mail and any attachments is confidential and may contain privileged 
information intended for the addressee(s) only. Dissemination, copying, 
printing or use by anybody else is unauthorized. If you are not the intended 
recipient, please delete this message and any attachments and advise the 
sender by return e-mail, Thanks.

Help the environment. Please do not print this email unless it is absolutely 
necessary.


More information about the U-Boot mailing list