From: Yuri Tikhonov <yur@emcraft.com>
To: linuxppc-dev@ozlabs.org
Cc: sr@denx.de, dzu@denx.de
Subject: [PATCH 2/2] [PPC 44x] enable L2-cache for ALPR, Katmai, Ocotea, and Taishan
Date: Wed, 7 Nov 2007 01:40:41 +0300 [thread overview]
Message-ID: <1416528026.20071107014041@emcraft.com> (raw)
This patch introduces the L2_CACHE configuration option available
for the ppc44x-based boards with L2-cache enabled.
Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Pavel Kolesnikov <concord@emcraft.com>
--
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig
index 1d2ca42..ad6b581 100644
--- a/arch/ppc/platforms/4xx/Kconfig
+++ b/arch/ppc/platforms/4xx/Kconfig
@@ -396,4 +396,12 @@ config SERIAL_SICC_CONSOLE
bool
depends on SERIAL_SICC && UART0_TTYS1
default y
+
+config L2_CACHE
+ bool "Enable Level-2 Cache"
+ depends on NOT_COHERENT_CACHE && (KATMAI || TAISHAN || OCOTEA || ALPR)
+ default y
+ help
+ This option enables L2-cache on ppc44x controllers.
+ If unsure, say Y.
endmenu
diff --git a/arch/ppc/platforms/4xx/alpr.c b/arch/ppc/platforms/4xx/alpr.c
index 3b6519f..0623801 100644
--- a/arch/ppc/platforms/4xx/alpr.c
+++ b/arch/ppc/platforms/4xx/alpr.c
@@ -537,10 +537,12 @@ static void __init alpr_setup_arch(void)
printk("Prodrive ALPR port (DENX Software Engineering <sr@denx.de>)\n");
}
+#ifdef CONFIG_L2_CACHE
static void __init alpr_init(void)
{
ibm440gx_l2c_setup(&clocks);
}
+#endif
static void alpr_progress(char *buf, unsigned short val)
{
@@ -567,7 +569,9 @@ void __init platform_init(unsigned long r3, unsigned long r4,
#ifdef CONFIG_KGDB
ppc_md.early_serial_map = alpr_early_serial_map;
#endif
+#ifdef CONFIG_L2_CACHE
ppc_md.init = alpr_init;
+#endif
ppc_md.restart = alpr_restart;
}
diff --git a/arch/ppc/platforms/4xx/katmai.c b/arch/ppc/platforms/4xx/katmai.c
index d29ebf6..01f1baf 100644
--- a/arch/ppc/platforms/4xx/katmai.c
+++ b/arch/ppc/platforms/4xx/katmai.c
@@ -219,6 +219,7 @@ katmai_show_cpuinfo(struct seq_file *m)
{
seq_printf(m, "vendor\t\t: AMCC\n");
seq_printf(m, "machine\t\t: PPC440SPe EVB (Katmai)\n");
+ ibm440gx_show_cpuinfo(m);
return 0;
}
@@ -584,6 +585,13 @@ static void katmai_restart(char *cmd)
mtspr(SPRN_DBCR0, DBCR0_RST_CHIP);
}
+#ifdef CONFIG_L2_CACHE
+static void __init katmai_init(void)
+{
+ ibm440gx_l2c_setup(&clocks);
+}
+#endif
+
void __init platform_init(unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, unsigned long r7)
{
@@ -599,4 +607,7 @@ void __init platform_init(unsigned long r3, unsigned long r4,
ppc_md.early_serial_map = katmai_early_serial_map;
#endif
ppc_md.restart = katmai_restart;
+#ifdef CONFIG_L2_CACHE
+ ppc_md.init = katmai_init;
+#endif
}
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c
index a7435aa..8b13811 100644
--- a/arch/ppc/platforms/4xx/ocotea.c
+++ b/arch/ppc/platforms/4xx/ocotea.c
@@ -321,10 +321,12 @@ ocotea_setup_arch(void)
printk("IBM Ocotea port (MontaVista Software, Inc. <source@mvista.com>)\n");
}
+#ifdef CONFIG_L2_CACHE
static void __init ocotea_init(void)
{
ibm440gx_l2c_setup(&clocks);
}
+#endif
void __init platform_init(unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, unsigned long r7)
@@ -345,5 +347,7 @@ void __init platform_init(unsigned long r3, unsigned long r4,
#ifdef CONFIG_KGDB
ppc_md.early_serial_map = ocotea_early_serial_map;
#endif
+#ifdef CONFIG_L2_CACHE
ppc_md.init = ocotea_init;
+#endif
}
diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c
index f4b9435..8bb6f15 100644
--- a/arch/ppc/platforms/4xx/taishan.c
+++ b/arch/ppc/platforms/4xx/taishan.c
@@ -370,10 +370,12 @@ taishan_setup_arch(void)
printk("AMCC PowerPC 440GX Taishan Platform\n");
}
+#ifdef CONFIG_L2_CACHE
static void __init taishan_init(void)
{
ibm440gx_l2c_setup(&clocks);
}
+#endif
void __init platform_init(unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, unsigned long r7)
@@ -389,6 +391,8 @@ void __init platform_init(unsigned long r3, unsigned long r4,
#ifdef CONFIG_KGDB
ppc_md.early_serial_map = taishan_early_serial_map;
#endif
+#ifdef CONFIG_L2_CACHE
ppc_md.init = taishan_init;
+#endif
}
next reply other threads:[~2007-11-06 22:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 22:40 Yuri Tikhonov [this message]
2007-11-07 4:06 ` [PATCH 2/2] [PPC 44x] enable L2-cache for ALPR, Katmai, Ocotea, and Taishan Olof Johansson
2007-11-07 23:10 ` Re[2]: " Yuri Tikhonov
2007-11-26 23:41 ` Benjamin Herrenschmidt
2007-11-28 19:47 ` Eugene Surovegin
2007-11-28 20:15 ` Benjamin Herrenschmidt
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=1416528026.20071107014041@emcraft.com \
--to=yur@emcraft.com \
--cc=dzu@denx.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=sr@denx.de \
/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;
as well as URLs for NNTP newsgroup(s).