[Cbe-oss-dev] [PATCH]:Add PM signal groups registers.

Arnd Bergmann arnd at arndb.de
Thu Aug 30 19:44:05 EST 2007


On Thursday 30 August 2007, takaki.azuma wrote:
> Hello,
> 
> I'm working at Toshiba on porting perfmon2 to the Toshiba Cell platform.
> 
> This is a patch to access the registers for the PM signal pass-through and
> for the PPE signal groups. I added the register definition to structures
> included in cbe_regs.h. 

ok.

> In addition, I added the cbe_ppe_priv_regs structure 
> to cbe_regs.h, because it is necessary to access several registers of the
> PPE privilage 1 mmio area. cbe_fill_regs_map() maps PPE privilage 1 area by
> the same procedure as other mmio areas. (This doesn't correspond to SMP).

If there are registers that you need, they should instead be in the device
tree as a child of the /be node.

> @@ -228,6 +237,10 @@ void __init cbe_fill_regs_map(struct cbe
>  		prop = of_get_property(cpu, "mic-tm", NULL);
>  		if (prop != NULL)
>  			map->mic_tm_regs = ioremap(prop->address, prop->len);
> +
> +		prop = of_get_property(cpu, "bp-base", NULL);
> +		if (prop != NULL)
> +			map->ppe_priv_regs = ioremap(prop->address + BP_BASE_OFFSET_PPE_MMIO_REGS, sizeof(struct
> cbe_ppe_priv_regs));
>  	}
>  }

Consequently, please don't add anything to the lower half of the
cbe_full_regs_map(), as we hope to get rid of that in the future.
The registers should all be found through the proper device nodes,
not through something like 'bp-base' or other similar properties.

With the existing device nodes, we made the mistake of identifying
them by parent node and 'device-type'. When you add a new node under /be,
please leave out the device-type and instead use a 'compatible'
property that identifies the programming model of the register
area.

	Arnd <><



More information about the cbe-oss-dev mailing list