[U-Boot] [PATCH V2] ppc4xx: Initialize magnetic couplers in PLU405

Wolfgang Denk wd at denx.de
Fri Oct 23 16:53:29 CEST 2009


Dear Matthias Fuchs,

In message <200910231638.11295.matthias.fuchs at esd.eu> you wrote:
> This patch fixes an ugly behavior of the IL712 magnetic couplers
> as used on PLU405. These parts will remember their last state
> over a power cycle which might cause unwanted behavior.
...
> --- a/board/esd/plu405/plu405.c
> +++ b/board/esd/plu405/plu405.c
> @@ -45,6 +45,55 @@ const unsigned char fpgadata[] =
>   */
>  #include "../common/fpga.c"
>  
> +/*
> + * SJA1000 register layout in basic can mode
> + */
> +struct sja1000_basic_s {
> +	u8 cr;
> +	u8 cmr;
> +	u8 sr;
> +	u8 ir;
> +	u8 ac;
> +	u8 am;
> +	u8 btr0;
> +	u8 btr1;
> +	u8 oc;
> +	u8 txb[10];
> +	u8 rxb[10];
> +	u8 unused;
> +	u8 cdr;
> +};
> +
> +#define SJA1000_CR_RR 0x01
> +#define SJA1000_OC_MODE0 0x01

Hmm... a SJA1000 is a pretty generic piece of hardware, and in no way
specific to the plu405 board. Would it not make sense to create as
separate header file for this? Eventually other boards will need to
interface to SJA1000's, too ?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
To be awake is to be alive.        - Henry David Thoreau, in "Walden"


More information about the U-Boot mailing list