Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175761
b: refs/heads/master
c: 0c7b87b
h: refs/heads/master
i:
  175759: a3010e7
v: v3
  • Loading branch information
Anton Vorontsov authored and Kumar Gala committed Nov 12, 2009
1 parent 3d3ae8f commit 970c6a9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc2e673dbcbaebdf84c09956b85c3be3a8b7bd02
refs/heads/master: 0c7b87b0857f0e17be982fd840046444a83c3996
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/include/asm/qe.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ extern spinlock_t cmxgcr_lock;

/* Export QE common operations */
#ifdef CONFIG_QUICC_ENGINE
extern void __init qe_reset(void);
extern void qe_reset(void);
#else
static inline void qe_reset(void) {}
#endif
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/powerpc/sysdev/cpm_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static phys_addr_t muram_pbase;
/* Max address size we deal with */
#define OF_MAX_ADDR_CELLS 4

int __init cpm_muram_init(void)
int cpm_muram_init(void)
{
struct device_node *np;
struct resource r;
Expand All @@ -81,6 +81,9 @@ int __init cpm_muram_init(void)
int i = 0;
int ret = 0;

if (muram_pbase)
return 0;

spin_lock_init(&cpm_muram_lock);
/* initialize the info header */
rh_init(&cpm_muram_info, 1,
Expand Down
12 changes: 7 additions & 5 deletions trunk/arch/powerpc/sysdev/qe_lib/qe.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ phys_addr_t get_qe_base(void)

EXPORT_SYMBOL(get_qe_base);

void __init qe_reset(void)
void qe_reset(void)
{
if (qe_immr == NULL)
qe_immr = ioremap(get_qe_base(), QE_IMMAP_SIZE);
Expand Down Expand Up @@ -330,16 +330,18 @@ EXPORT_SYMBOL(qe_put_snum);
static int qe_sdma_init(void)
{
struct sdma __iomem *sdma = &qe_immr->sdma;
unsigned long sdma_buf_offset;
static unsigned long sdma_buf_offset = (unsigned long)-ENOMEM;

if (!sdma)
return -ENODEV;

/* allocate 2 internal temporary buffers (512 bytes size each) for
* the SDMA */
sdma_buf_offset = qe_muram_alloc(512 * 2, 4096);
if (IS_ERR_VALUE(sdma_buf_offset))
return -ENOMEM;
if (IS_ERR_VALUE(sdma_buf_offset)) {
sdma_buf_offset = qe_muram_alloc(512 * 2, 4096);
if (IS_ERR_VALUE(sdma_buf_offset))
return -ENOMEM;
}

out_be32(&sdma->sdebcr, (u32) sdma_buf_offset & QE_SDEBCR_BA_MASK);
out_be32(&sdma->sdmr, (QE_SDMR_GLB_1_MSK |
Expand Down

0 comments on commit 970c6a9

Please sign in to comment.