Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54024
b: refs/heads/master
c: 56a2564
h: refs/heads/master
v: v3
  • Loading branch information
Syed Mohammed Khasim authored and Russell King committed May 5, 2007
1 parent 8f9e3c6 commit 6c11440
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 20 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: e5c56ed3c9caa6ba717af0a5c23e2c7bf5c97a1f
refs/heads/master: 56a2564185db752d83bbc78be9b1e257bf103444
6 changes: 5 additions & 1 deletion trunk/arch/arm/plat-omap/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@ static inline void omap_init_rng(void) {}
*/
static int __init omap_init_devices(void)
{
/*
* Need to enable relevant once for 2430 SDP
*/
#ifndef CONFIG_MACH_OMAP_2430SDP
/* please keep these calls, and their implementations above,
* in alphabetical order so they're easier to sort through.
*/
Expand All @@ -438,7 +442,7 @@ static int __init omap_init_devices(void)
omap_init_uwire();
omap_init_wdt();
omap_init_rng();

#endif
return 0;
}
arch_initcall(omap_init_devices);
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-omap/dmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,8 @@ int omap_dm_timer_init(void)
BUG_ON(dm_source_clocks[i] == NULL);
}
#endif
if (cpu_is_omap243x())
dm_timers[0].phys_base = 0x49018000;

for (i = 0; i < dm_timer_count; i++) {
#ifdef CONFIG_ARCH_OMAP2
Expand Down
76 changes: 63 additions & 13 deletions trunk/arch/arm/plat-omap/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,17 @@
/*
* omap24xx specific GPIO registers
*/
#define OMAP24XX_GPIO1_BASE (void __iomem *)0x48018000
#define OMAP24XX_GPIO2_BASE (void __iomem *)0x4801a000
#define OMAP24XX_GPIO3_BASE (void __iomem *)0x4801c000
#define OMAP24XX_GPIO4_BASE (void __iomem *)0x4801e000
#define OMAP242X_GPIO1_BASE (void __iomem *)0x48018000
#define OMAP242X_GPIO2_BASE (void __iomem *)0x4801a000
#define OMAP242X_GPIO3_BASE (void __iomem *)0x4801c000
#define OMAP242X_GPIO4_BASE (void __iomem *)0x4801e000

#define OMAP243X_GPIO1_BASE (void __iomem *)0x4900C000
#define OMAP243X_GPIO2_BASE (void __iomem *)0x4900E000
#define OMAP243X_GPIO3_BASE (void __iomem *)0x49010000
#define OMAP243X_GPIO4_BASE (void __iomem *)0x49012000
#define OMAP243X_GPIO5_BASE (void __iomem *)0x480B6000

#define OMAP24XX_GPIO_REVISION 0x0000
#define OMAP24XX_GPIO_SYSCONFIG 0x0010
#define OMAP24XX_GPIO_SYSSTATUS 0x0014
Expand Down Expand Up @@ -168,12 +175,22 @@ static struct gpio_bank gpio_bank_730[7] = {
#endif

#ifdef CONFIG_ARCH_OMAP24XX
static struct gpio_bank gpio_bank_24xx[4] = {
{ OMAP24XX_GPIO1_BASE, INT_24XX_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_24XX },
{ OMAP24XX_GPIO2_BASE, INT_24XX_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_24XX },
{ OMAP24XX_GPIO3_BASE, INT_24XX_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_24XX },
{ OMAP24XX_GPIO4_BASE, INT_24XX_GPIO_BANK4, IH_GPIO_BASE + 96, METHOD_GPIO_24XX },

static struct gpio_bank gpio_bank_242x[4] = {
{ OMAP242X_GPIO1_BASE, INT_24XX_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_24XX },
{ OMAP242X_GPIO2_BASE, INT_24XX_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_24XX },
{ OMAP242X_GPIO3_BASE, INT_24XX_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_24XX },
{ OMAP242X_GPIO4_BASE, INT_24XX_GPIO_BANK4, IH_GPIO_BASE + 96, METHOD_GPIO_24XX },
};

static struct gpio_bank gpio_bank_243x[5] = {
{ OMAP243X_GPIO1_BASE, INT_24XX_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_24XX },
{ OMAP243X_GPIO2_BASE, INT_24XX_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_24XX },
{ OMAP243X_GPIO3_BASE, INT_24XX_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_24XX },
{ OMAP243X_GPIO4_BASE, INT_24XX_GPIO_BANK4, IH_GPIO_BASE + 96, METHOD_GPIO_24XX },
{ OMAP243X_GPIO5_BASE, INT_24XX_GPIO_BANK5, IH_GPIO_BASE + 128, METHOD_GPIO_24XX },
};

#endif

static struct gpio_bank *gpio_bank;
Expand Down Expand Up @@ -1113,6 +1130,11 @@ static int initialized;
static struct clk * gpio_ick;
static struct clk * gpio_fck;

#ifdef CONFIG_ARCH_OMAP2430
static struct clk * gpio5_ick;
static struct clk * gpio5_fck;
#endif

static int __init _omap_gpio_init(void)
{
int i;
Expand All @@ -1138,7 +1160,25 @@ static int __init _omap_gpio_init(void)
printk("Could not get gpios_fck\n");
else
clk_enable(gpio_fck);
}

/*
* On 2430 GPIO 5 uses CORE L4 ICLK
*/
#ifdef CONFIG_ARCH_OMAP2430
if (cpu_is_omap2430()) {
gpio5_ick = clk_get(NULL, "gpio5_ick");
if (IS_ERR(gpio5_ick))
printk("Could not get gpio5_ick\n");
else
clk_enable(gpio5_ick);
gpio5_fck = clk_get(NULL, "gpio5_fck");
if (IS_ERR(gpio5_fck))
printk("Could not get gpio5_fck\n");
else
clk_enable(gpio5_fck);
}
#endif
}

#ifdef CONFIG_ARCH_OMAP15XX
if (cpu_is_omap15xx()) {
Expand All @@ -1165,14 +1205,24 @@ static int __init _omap_gpio_init(void)
gpio_bank = gpio_bank_730;
}
#endif

#ifdef CONFIG_ARCH_OMAP24XX
if (cpu_is_omap24xx()) {
if (cpu_is_omap242x()) {
int rev;

gpio_bank_count = 4;
gpio_bank = gpio_bank_24xx;
gpio_bank = gpio_bank_242x;
rev = omap_readl(gpio_bank[0].base + OMAP24XX_GPIO_REVISION);
printk(KERN_INFO "OMAP242x GPIO hardware version %d.%d\n",
(rev >> 4) & 0x0f, rev & 0x0f);
}
if (cpu_is_omap243x()) {
int rev;

gpio_bank_count = 5;
gpio_bank = gpio_bank_243x;
rev = omap_readl(gpio_bank[0].base + OMAP24XX_GPIO_REVISION);
printk(KERN_INFO "OMAP24xx GPIO hardware version %d.%d\n",
printk(KERN_INFO "OMAP243x GPIO hardware version %d.%d\n",
(rev >> 4) & 0x0f, rev & 0x0f);
}
#endif
Expand Down
15 changes: 10 additions & 5 deletions trunk/arch/arm/plat-omap/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,16 @@ static void omap_mcbsp_dsp_free(void)
#ifdef CONFIG_ARCH_OMAP2
static void omap2_mcbsp2_mux_setup(void)
{
omap_cfg_reg(Y15_24XX_MCBSP2_CLKX);
omap_cfg_reg(R14_24XX_MCBSP2_FSX);
omap_cfg_reg(W15_24XX_MCBSP2_DR);
omap_cfg_reg(V15_24XX_MCBSP2_DX);
omap_cfg_reg(V14_24XX_GPIO117);
if (cpu_is_omap2420()) {
omap_cfg_reg(Y15_24XX_MCBSP2_CLKX);
omap_cfg_reg(R14_24XX_MCBSP2_FSX);
omap_cfg_reg(W15_24XX_MCBSP2_DR);
omap_cfg_reg(V15_24XX_MCBSP2_DX);
omap_cfg_reg(V14_24XX_GPIO117);
}
/*
* Need to add MUX settings for OMAP 2430 SDP
*/
}
#endif

Expand Down

0 comments on commit 6c11440

Please sign in to comment.