From: Li Yang <leoli@freescale.com>
To: linuxppc-dev@ozlabs.org, galak@kernel.crashing.org
Cc: Li Yang <leoli@freescale.com>
Subject: [PATCH 6/6] powerpc: add 82xx platform level support to SEC engine
Date: Wed, 6 Aug 2008 15:04:45 +0800 [thread overview]
Message-ID: <1218006285-27138-6-git-send-email-leoli@freescale.com> (raw)
In-Reply-To: <1218006285-27138-5-git-send-email-leoli@freescale.com>
Initialize base and size of SEC memory region and bus priority for SEC.
Signed-off-by: Li Yang <leoli@freescale.com>
---
arch/powerpc/include/asm/immap_cpm2.h | 7 +++++--
arch/powerpc/platforms/82xx/mpc8272_ads.c | 1 +
arch/powerpc/platforms/82xx/pq2.c | 19 +++++++++++++++++++
arch/powerpc/platforms/82xx/pq2.h | 1 +
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm/immap_cpm2.h b/arch/powerpc/include/asm/immap_cpm2.h
index d4f069b..71de9d0 100644
--- a/arch/powerpc/include/asm/immap_cpm2.h
+++ b/arch/powerpc/include/asm/immap_cpm2.h
@@ -115,10 +115,13 @@ typedef struct mem_ctlr {
u32 memc_immr;
u32 memc_pcibr0;
u32 memc_pcibr1;
- u8 res10[16];
+ u32 secbr;
+ u8 res10[4];
+ u32 secmr;
+ u8 res11[4];
u32 memc_pcimsk0;
u32 memc_pcimsk1;
- u8 res11[52];
+ u8 res12[52];
} memctl_cpm2_t;
/* System Integration Timers.
diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c
index 69781e6..a98d97c 100644
--- a/arch/powerpc/platforms/82xx/mpc8272_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c
@@ -179,6 +179,7 @@ static void __init mpc8272_ads_setup_arch(void)
init_ioports();
pq2_init_pci();
+ pq2_init_sec();
if (ppc_md.progress)
ppc_md.progress("mpc8272_ads_setup_arch(), finish", 0);
diff --git a/arch/powerpc/platforms/82xx/pq2.c b/arch/powerpc/platforms/82xx/pq2.c
index 1b75902..bacb136 100644
--- a/arch/powerpc/platforms/82xx/pq2.c
+++ b/arch/powerpc/platforms/82xx/pq2.c
@@ -22,6 +22,8 @@
#include <platforms/82xx/pq2.h>
#define RMR_CSRE 0x00000001
+#define PQ2_SECMR_128K 0xfffe0000
+#define PQ2_ALRH_SEC 0x30126745
void pq2_restart(char *cmd)
{
@@ -35,6 +37,23 @@ void pq2_restart(char *cmd)
panic("Restart failed\n");
}
+void __init pq2_init_sec(void)
+{
+ struct device_node *np = NULL;
+ struct resource res;
+
+ np = of_find_compatible_node(NULL, NULL, "fsl,talitos");
+ if (!np)
+ return;
+
+ of_address_to_resource(np, 0, &res);
+ printk(KERN_INFO "Setting SECBR and SECMR\n");
+ out_be32(&cpm2_immr->im_memctl.secbr, (u32)res.start);
+ out_be32(&cpm2_immr->im_memctl.secmr, PQ2_SECMR_128K);
+ out_be32(&cpm2_immr->im_siu_conf.siu_82xx.sc_ppc_alrh, PQ2_ALRH_SEC);
+ of_node_put(np);
+}
+
#ifdef CONFIG_PCI
static int pq2_pci_exclude_device(struct pci_controller *hose,
u_char bus, u8 devfn)
diff --git a/arch/powerpc/platforms/82xx/pq2.h b/arch/powerpc/platforms/82xx/pq2.h
index a41f84a..98d3c3c 100644
--- a/arch/powerpc/platforms/82xx/pq2.h
+++ b/arch/powerpc/platforms/82xx/pq2.h
@@ -2,6 +2,7 @@
#define _PQ2_H
void pq2_restart(char *cmd);
+void pq2_init_sec(void);
#ifdef CONFIG_PCI
int pq2ads_pci_init_irq(void);
--
1.5.5.1.248.g4b17
next prev parent reply other threads:[~2008-08-06 6:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 7:04 [PATCH 1/6] powerpc: update flash size and partition in mpc8272ads dts Li Yang
2008-08-06 7:04 ` [PATCH 2/6] powerpc: export cpm2_immr symbol for CPM2 drivers to compile as module Li Yang
2008-08-06 7:04 ` [PATCH 3/6] powerpc: update QE/CPM2 headers for USB support Li Yang
2008-08-06 7:04 ` [PATCH 4/6] powerpc: add USB peripheral support to MPC8272ADS Li Yang
2008-08-06 7:04 ` [PATCH 5/6] powerpc: add USB peripheral support to MPC836xMDS Li Yang
2008-08-06 7:04 ` Li Yang [this message]
2008-08-06 17:27 ` [PATCH 6/6] powerpc: add 82xx platform level support to SEC engine Scott Wood
2008-08-06 7:50 ` [PATCH 5/6] powerpc: add USB peripheral support to MPC836xMDS Stephen Rothwell
2008-08-06 12:07 ` Anton Vorontsov
2008-08-07 9:31 ` Li Yang
2008-08-07 13:23 ` Anton Vorontsov
2008-08-06 17:29 ` Scott Wood
2008-08-07 3:32 ` Li Yang
2008-08-06 7:48 ` [PATCH 4/6] powerpc: add USB peripheral support to MPC8272ADS Stephen Rothwell
2008-08-06 17:19 ` Scott Wood
2008-08-07 3:50 ` Li Yang
2008-08-07 14:19 ` Scott Wood
2008-08-06 15:24 ` [PATCH 2/6] powerpc: export cpm2_immr symbol for CPM2 drivers to compile as module Anton Vorontsov
2008-08-07 10:19 ` Li Yang
2008-08-07 11:38 ` Anton Vorontsov
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=1218006285-27138-6-git-send-email-leoli@freescale.com \
--to=leoli@freescale.com \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).