aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorDave Liu <daveliu@freescale.com>2010-01-11 19:04:03 -0500
committerKumar Gala <galak@kernel.crashing.org>2012-03-29 09:14:16 -0400
commitfa1b42b45a9c96da77f3ddabf715f49525a87209 (patch)
treef676c9d2eddaa03f7105515fe3cf7c9e22737261 /arch/powerpc
parent8a57d734004b8018f3d320455c1816b1e6810265 (diff)
powerpc/qe: Update the SNUM table for MPC8569 Rev2.0
The MPC8569 Rev2.0 has the correct SNUM table as QE Reference Manual, we must follow it. However the Rev1.0 silicon need the old SNUM table as workaround due to Rev1.0 silicon SNUM erratum. So, we support both snum table, and choose the one FDT tell us. And u-boot will fixup FDT according to SPRN_SVR. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Dave Liu <daveliu@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index ceb09cbd2329..818e763f8265 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved. 2 * Copyright (C) 2006-2010 Freescale Semicondutor, Inc. All rights reserved.
3 * 3 *
4 * Authors: Shlomi Gridish <gridish@freescale.com> 4 * Authors: Shlomi Gridish <gridish@freescale.com>
5 * Li Yang <leoli@freescale.com> 5 * Li Yang <leoli@freescale.com>
@@ -266,7 +266,19 @@ EXPORT_SYMBOL(qe_clock_source);
266static void qe_snums_init(void) 266static void qe_snums_init(void)
267{ 267{
268 int i; 268 int i;
269 static const u8 snum_init[] = { 269 static const u8 snum_init_76[] = {
270 0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D,
271 0x24, 0x25, 0x2C, 0x2D, 0x34, 0x35, 0x88, 0x89,
272 0x98, 0x99, 0xA8, 0xA9, 0xB8, 0xB9, 0xC8, 0xC9,
273 0xD8, 0xD9, 0xE8, 0xE9, 0x44, 0x45, 0x4C, 0x4D,
274 0x54, 0x55, 0x5C, 0x5D, 0x64, 0x65, 0x6C, 0x6D,
275 0x74, 0x75, 0x7C, 0x7D, 0x84, 0x85, 0x8C, 0x8D,
276 0x94, 0x95, 0x9C, 0x9D, 0xA4, 0xA5, 0xAC, 0xAD,
277 0xB4, 0xB5, 0xBC, 0xBD, 0xC4, 0xC5, 0xCC, 0xCD,
278 0xD4, 0xD5, 0xDC, 0xDD, 0xE4, 0xE5, 0xEC, 0xED,
279 0xF4, 0xF5, 0xFC, 0xFD,
280 };
281 static const u8 snum_init_46[] = {
270 0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D, 282 0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D,
271 0x24, 0x25, 0x2C, 0x2D, 0x34, 0x35, 0x88, 0x89, 283 0x24, 0x25, 0x2C, 0x2D, 0x34, 0x35, 0x88, 0x89,
272 0x98, 0x99, 0xA8, 0xA9, 0xB8, 0xB9, 0xC8, 0xC9, 284 0x98, 0x99, 0xA8, 0xA9, 0xB8, 0xB9, 0xC8, 0xC9,
@@ -274,9 +286,15 @@ static void qe_snums_init(void)
274 0x28, 0x29, 0x38, 0x39, 0x48, 0x49, 0x58, 0x59, 286 0x28, 0x29, 0x38, 0x39, 0x48, 0x49, 0x58, 0x59,
275 0x68, 0x69, 0x78, 0x79, 0x80, 0x81, 287 0x68, 0x69, 0x78, 0x79, 0x80, 0x81,
276 }; 288 };
289 static const u8 *snum_init;
277 290
278 qe_num_of_snum = qe_get_num_of_snums(); 291 qe_num_of_snum = qe_get_num_of_snums();
279 292
293 if (qe_num_of_snum == 76)
294 snum_init = snum_init_76;
295 else
296 snum_init = snum_init_46;
297
280 for (i = 0; i < qe_num_of_snum; i++) { 298 for (i = 0; i < qe_num_of_snum; i++) {
281 snums[i].num = snum_init[i]; 299 snums[i].num = snum_init[i];
282 snums[i].state = QE_SNUM_STATE_FREE; 300 snums[i].state = QE_SNUM_STATE_FREE;