Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187472
b: refs/heads/master
c: 16144bf
h: refs/heads/master
v: v3
  • Loading branch information
Haojian Zhuang authored and Eric Miao committed Mar 1, 2010
1 parent 393a06f commit a5d9fc5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 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: 247b4592f385622774de877f568fc30eb37dc831
refs/heads/master: 16144bfb83bb8319c07c18b57eac15368708d02c
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-mmp/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ extern struct sys_timer pxa910_timer;
extern struct sys_timer mmp2_timer;
extern void __init pxa168_init_irq(void);
extern void __init pxa910_init_irq(void);
extern void __init mmp2_init_icu(void);
extern void __init mmp2_init_irq(void);

extern void __init icu_init_irq(void);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mmp/irq-mmp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static void init_mux_irq(struct irq_chip *chip, int start, int num)
}
}

void __init mmp2_init_irq(void)
void __init mmp2_init_icu(void)
{
int irq;

Expand Down
23 changes: 23 additions & 0 deletions trunk/arch/arm/mach-mmp/mmp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,42 @@
#include <mach/cputype.h>
#include <mach/irqs.h>
#include <mach/mfp.h>
#include <mach/gpio.h>
#include <mach/devices.h>

#include "common.h"
#include "clock.h"

#define MFPR_VIRT_BASE (APB_VIRT_BASE + 0x1e000)

#define APMASK(i) (GPIO_REGS_VIRT + BANK_OFF(i) + 0x9c)

static struct mfp_addr_map mmp2_addr_map[] __initdata = {
MFP_ADDR(PMIC_INT, 0x2c4),

MFP_ADDR_END,
};

static void __init mmp2_init_gpio(void)
{
int i;

/* enable GPIO clock */
__raw_writel(APBC_APBCLK | APBC_FNCLK, APBC_MMP2_GPIO);

/* unmask GPIO edge detection for all 6 banks -- APMASKx */
for (i = 0; i < 6; i++)
__raw_writel(0xffffffff, APMASK(i));

pxa_init_gpio(IRQ_MMP2_GPIO, 0, 167, NULL);
}

void __init mmp2_init_irq(void)
{
mmp2_init_icu();
mmp2_init_gpio();
}

/* APB peripheral clocks */
static APBC_CLK(uart1, MMP2_UART1, 1, 26000000);
static APBC_CLK(uart2, MMP2_UART2, 1, 26000000);
Expand Down

0 comments on commit a5d9fc5

Please sign in to comment.