[PATCH 6/6] powerpc: add 82xx platform level support to SEC engine

Scott Wood scottwood at freescale.com
Thu Aug 7 03:27:52 EST 2008


On Wed, Aug 06, 2008 at 03:04:45PM +0800, Li Yang wrote:
> diff --git a/arch/powerpc/platforms/82xx/pq2.c b/arch/powerpc/platforms/82xx/pq2.c
> index 1b75902..bacb136 100644
> --- a/arch/powerpc/platforms/82xx/pq2.c
> +++ b/arch/powerpc/platforms/82xx/pq2.c
> @@ -22,6 +22,8 @@
>  #include <platforms/82xx/pq2.h>
>  
>  #define RMR_CSRE 0x00000001
> +#define PQ2_SECMR_128K 0xfffe0000
> +#define PQ2_ALRH_SEC 0x30126745
>  
>  void pq2_restart(char *cmd)
>  {
> @@ -35,6 +37,23 @@ void pq2_restart(char *cmd)
>  	panic("Restart failed\n");
>  }
>  
> +void __init pq2_init_sec(void)
> +{
> +	struct device_node *np = NULL;
> +	struct resource res;
> +
> +	np = of_find_compatible_node(NULL, NULL, "fsl,talitos");

This is an obsolete binding. 
See "Documentation/powerpc/dts-bindings/fsl/sec.txt".

> +	if (!np)
> +		return;
> +
> +	of_address_to_resource(np, 0, &res);
> +	printk(KERN_INFO "Setting SECBR and SECMR\n");

This is an unnecessary printk().

> +	out_be32(&cpm2_immr->im_memctl.secbr, (u32)res.start);
> +	out_be32(&cpm2_immr->im_memctl.secmr, PQ2_SECMR_128K);
> +	out_be32(&cpm2_immr->im_siu_conf.siu_82xx.sc_ppc_alrh, PQ2_ALRH_SEC);

Please put some comments here explaining what you're doing, such as 
/* Map the SEC registers */, and /* Lower the SEC arbitration priority */.

-Scott



More information about the Linuxppc-dev mailing list