From: Renaud Barbier <renaud.barbier@ge.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/5] ppc: mpc85xx: mpc8544 support
Date: Wed, 30 Oct 2013 10:22:47 +0000 [thread overview]
Message-ID: <1383128571-8250-2-git-send-email-renaud.barbier@ge.com> (raw)
In-Reply-To: <1383128571-8250-1-git-send-email-renaud.barbier@ge.com>
Definitions are added to support the mpc8544 CPU.
The function returning the I2C bus frequency is updated
to take into account the mpc8544 specific clock ratio.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
---
arch/ppc/include/asm/processor.h | 2 ++
arch/ppc/mach-mpc85xx/cpuid.c | 2 ++
.../ppc/mach-mpc85xx/include/mach/config_mpc85xx.h | 5 +++++
arch/ppc/mach-mpc85xx/speed.c | 9 +++++++++
4 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/ppc/include/asm/processor.h b/arch/ppc/include/asm/processor.h
index 9145257..19530b0 100644
--- a/arch/ppc/include/asm/processor.h
+++ b/arch/ppc/include/asm/processor.h
@@ -858,6 +858,8 @@
#define SVR_8548 0x8031
#define SVR_8548_E 0x8039
#define SVR_8641 0x8090
+#define SVR_8544 0x803401
+#define SVR_8544_E 0x803C01
#define SVR_P2020 0x80E200
#define SVR_P2020_E 0x80EA00
diff --git a/arch/ppc/mach-mpc85xx/cpuid.c b/arch/ppc/mach-mpc85xx/cpuid.c
index de56d37..8094978 100644
--- a/arch/ppc/mach-mpc85xx/cpuid.c
+++ b/arch/ppc/mach-mpc85xx/cpuid.c
@@ -27,6 +27,8 @@
#include <mach/immap_85xx.h>
struct cpu_type cpu_type_list[] = {
+ CPU_TYPE_ENTRY(8544, 8544, 1),
+ CPU_TYPE_ENTRY(8544, 8544_E, 1),
CPU_TYPE_ENTRY(P2020, P2020, 2),
CPU_TYPE_ENTRY(P2020, P2020_E, 2),
};
diff --git a/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h b/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h
index 9a5598f..7cdb37f 100644
--- a/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h
+++ b/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h
@@ -28,6 +28,11 @@
#define MAX_CPUS 2
#define FSL_NUM_LAWS 12
#define FSL_SEC_COMPAT 2
+
+#elif defined(CONFIG_MPC8544)
+#define MAX_CPUS 1
+#define FSL_NUM_LAWS 10
+
#else
#error Processor type not defined for this platform
#endif
diff --git a/arch/ppc/mach-mpc85xx/speed.c b/arch/ppc/mach-mpc85xx/speed.c
index 8b447ea..64c10f9 100644
--- a/arch/ppc/mach-mpc85xx/speed.c
+++ b/arch/ppc/mach-mpc85xx/speed.c
@@ -101,9 +101,18 @@ unsigned long fsl_get_timebase_clock(void)
unsigned long fsl_get_i2c_freq(void)
{
+ uint svr;
struct sys_info sysinfo;
+ void __iomem *gur = IOMEM(MPC85xx_GUTS_ADDR);
fsl_get_sys_info(&sysinfo);
+ svr = get_svr();
+ if ((svr == SVR_8544) || (svr == SVR_8544_E)) {
+ if (in_be32(gur + MPC85xx_GUTS_PORDEVSR2_OFFSET) &
+ MPC85xx_PORDEVSR2_SEC_CFG)
+ return sysinfo.freqSystemBus / 3;
+ }
+
return sysinfo.freqSystemBus / 2;
}
--
1.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-10-30 10:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 10:22 [PATCH v2 0/5] GEIP DA923RC board support Renaud Barbier
2013-10-30 10:22 ` Renaud Barbier [this message]
2013-10-30 10:22 ` [PATCH 2/5] ppc: mpc85xx: define Ethernet port count Renaud Barbier
2013-10-30 10:22 ` [PATCH 3/5] ppc: mpc85xx: enable DDR driver Renaud Barbier
2013-10-30 10:22 ` [PATCH 4/5] ppc: DA923RC: add board support Renaud Barbier
2013-10-30 11:34 ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-31 7:48 ` Sascha Hauer
2013-10-31 13:15 ` Renaud Barbier
2013-10-31 20:10 ` Renaud Barbier
2013-11-01 11:58 ` Sascha Hauer
2013-11-01 12:56 ` Renaud Barbier
2013-11-01 13:02 ` Renaud Barbier
2013-11-01 15:03 ` Renaud Barbier
2013-11-01 20:28 ` Sascha Hauer
2013-11-04 18:06 ` Renaud Barbier
2013-11-05 7:35 ` Sascha Hauer
2013-10-31 14:41 ` Renaud Barbier
2013-10-31 16:01 ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-31 18:59 ` Renaud Barbier
2013-10-30 10:22 ` [PATCH 5/5] ppc: mpc85xx: build directives Renaud Barbier
2013-11-05 15:36 [PATCH v3 0/5] GEIP DA923RC board support Renaud Barbier
2013-11-05 15:36 ` [PATCH 1/5] ppc: mpc85xx: mpc8544 support Renaud Barbier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383128571-8250-2-git-send-email-renaud.barbier@ge.com \
--to=renaud.barbier@ge.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox