diff options
author | Zhang Wei <wei.zhang@freescale.com> | 2008-04-18 13:33:42 -0700 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-29 19:40:28 +1000 |
commit | e042323607f5c14844b1c59aebbca8d1251c7d89 (patch) | |
tree | 10c9eac3d5146f3611af9220740e4ec27bf2ade0 /arch/powerpc | |
parent | cc2bb6968a2c842149d285d77cb35200d2d37b15 (diff) | |
download | kernel_samsung_smdk4412-e042323607f5c14844b1c59aebbca8d1251c7d89.tar.gz kernel_samsung_smdk4412-e042323607f5c14844b1c59aebbca8d1251c7d89.tar.bz2 kernel_samsung_smdk4412-e042323607f5c14844b1c59aebbca8d1251c7d89.zip |
[RAPIDIO] Auto-probe the RapidIO system size
The RapidIO system size will auto probe in RIO setup. The route table
and rionet_active in rionet.c are changed to be allocated dynamically
according to the size of the system.
Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/sysdev/fsl_rio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index d2d14708e71..14c106cf4aa 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c @@ -1007,6 +1007,12 @@ int fsl_rio_setup(struct of_device *dev) rio_register_mport(port); priv->regs_win = ioremap(regs.start, regs.end - regs.start + 1); + + port->sys_size = (in_be32((priv->regs_win + RIO_PEF_CAR)) + & RIO_PEF_CTLS) >> 4; + dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n", + port->sys_size ? 65536 : 256); + priv->atmu_regs = (struct rio_atmu_regs *)(priv->regs_win + RIO_ATMU_REGS_OFFSET); priv->maint_atmu_regs = priv->atmu_regs + 1; |