A boot problem fix for am33xx beaglebone caused by GPMC,

a regression fix for local timer, and a clockdomain locking fix.
 Also few minor fixes for boot time and sparse warnings.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQftwiAAoJEBvUPslcq6Vz0nAQANzNA5Ek5QOE3h77u+fUeYr2
 +zCltDpJdv5ICTYPTbHeckrnaVqK+0udV/Z98iJ4jlraslfAwaIdIx9WDXc+VVic
 grBhROiHx6OsqK0+hpkPM75RiYNJsVBzQ1BY5hdvJwVTiu7GnM+5KcKKPGEr52QA
 ugZmweaJZ5/8flqJKzmVkmYA0EtKcwBEM3YUvYHhIZDol96ec9LX2FT1bUo33duz
 fRq0uZvYgpSSVCiWedt74rzc4oYddMtIiYeQLLTz4bxsMjjgJT1zTEOlJ8TM5Ijl
 XGdwoC9pBhM6vjCGcS2tyUrA3483LvT8ngL8SX3HkrkKus2sdMEtmotskB5xSGSQ
 al9kMBu9EbJE/1I6AG15pUhP6SB+AiRwFOrBZbaavVbeA9b+KykxuYAUyhj/pEQj
 AaC+u46QlhqT4LX2sQPEhosJLRMNucFfs/dkoLM451YzcSA4SEDbHcoxMJMEqpNo
 iLzAuZJygGJlMqJ1OvLNTs86e+3rwZ0jS2T/7M6TUhjoiyUVXPIJooredlq+DTGT
 g6/sQfpqXqcl99a3snzvnS0VjmfSpErg31TD2hPBmmSCG0cw/24vDDHrDACKazzF
 bcCU/2kEfIH/IOKdSvHmIAlhGIFu6aj2HzxTyoOBdH8DMm44pGzasabZ/m9hBU8i
 AFJh28CYM2++pmHmkUF9
 =4meh
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.7-rc1/fixes-take5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren:

A boot problem fix for am33xx beaglebone caused by GPMC,
a regression fix for local timer, and a clockdomain locking fix.
Also few minor fixes for boot time and sparse warnings.

* tag 'omap-for-v3.7-rc1/fixes-take5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory
  ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable
  ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message
  ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
  ARM: OMAP: resolve sparse warning concerning debug_card_init()
  ARM: OMAP4: Fix twd_local_timer_register regression
This commit is contained in:
Olof Johansson 2012-10-17 17:05:25 -07:00
commit b5beb20d03
6 changed files with 34 additions and 12 deletions

View File

@ -3294,7 +3294,7 @@ static struct omap_clk omap44xx_clks[] = {
CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck, CK_443X),
CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X),
CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X),
CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X),
CLK("omap-gpmc", "fck", &dummy_ck, CK_443X),
CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X),
CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X),
CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X),

View File

@ -925,15 +925,18 @@ static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm)
if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_enable)
return -EINVAL;
spin_lock_irqsave(&clkdm->lock, flags);
/*
* For arch's with no autodeps, clkcm_clk_enable
* should be called for every clock instance or hwmod that is
* enabled, so the clkdm can be force woken up.
*/
if ((atomic_inc_return(&clkdm->usecount) > 1) && autodeps)
if ((atomic_inc_return(&clkdm->usecount) > 1) && autodeps) {
spin_unlock_irqrestore(&clkdm->lock, flags);
return 0;
}
spin_lock_irqsave(&clkdm->lock, flags);
arch_clkdm->clkdm_clk_enable(clkdm);
pwrdm_state_switch(clkdm->pwrdm.ptr);
spin_unlock_irqrestore(&clkdm->lock, flags);
@ -950,15 +953,19 @@ static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm)
if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_disable)
return -EINVAL;
spin_lock_irqsave(&clkdm->lock, flags);
if (atomic_read(&clkdm->usecount) == 0) {
spin_unlock_irqrestore(&clkdm->lock, flags);
WARN_ON(1); /* underflow */
return -ERANGE;
}
if (atomic_dec_return(&clkdm->usecount) > 0)
if (atomic_dec_return(&clkdm->usecount) > 0) {
spin_unlock_irqrestore(&clkdm->lock, flags);
return 0;
}
spin_lock_irqsave(&clkdm->lock, flags);
arch_clkdm->clkdm_clk_disable(clkdm);
pwrdm_state_switch(clkdm->pwrdm.ptr);
spin_unlock_irqrestore(&clkdm->lock, flags);

View File

@ -341,7 +341,7 @@ static void __init omap_init_dmic(void)
oh = omap_hwmod_lookup("dmic");
if (!oh) {
printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
pr_err("Could not look up dmic hw_mod\n");
return;
}

View File

@ -868,9 +868,9 @@ static void __devexit gpmc_mem_exit(void)
}
static void __devinit gpmc_mem_init(void)
static int __devinit gpmc_mem_init(void)
{
int cs;
int cs, rc;
unsigned long boot_rom_space = 0;
/* never allocate the first page, to facilitate bug detection;
@ -890,13 +890,21 @@ static void __devinit gpmc_mem_init(void)
if (!gpmc_cs_mem_enabled(cs))
continue;
gpmc_cs_get_memconf(cs, &base, &size);
if (gpmc_cs_insert_mem(cs, base, size) < 0)
BUG();
rc = gpmc_cs_insert_mem(cs, base, size);
if (IS_ERR_VALUE(rc)) {
while (--cs >= 0)
if (gpmc_cs_mem_enabled(cs))
gpmc_cs_delete_mem(cs);
return rc;
}
}
return 0;
}
static __devinit int gpmc_probe(struct platform_device *pdev)
{
int rc;
u32 l;
struct resource *res;
@ -936,7 +944,13 @@ static __devinit int gpmc_probe(struct platform_device *pdev)
dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l),
GPMC_REVISION_MINOR(l));
gpmc_mem_init();
rc = gpmc_mem_init();
if (IS_ERR_VALUE(rc)) {
clk_disable_unprepare(gpmc_l3_clk);
clk_put(gpmc_l3_clk);
dev_err(gpmc_dev, "failed to reserve memory\n");
return rc;
}
if (IS_ERR_VALUE(gpmc_setup_irq()))
dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");

View File

@ -467,7 +467,7 @@ OMAP_SYS_TIMER(3_am33xx)
#ifdef CONFIG_ARCH_OMAP4
#ifdef CONFIG_LOCAL_TIMERS
static DEFINE_TWD_LOCAL_TIMER(twd_local_timer,
OMAP44XX_LOCAL_TWD_BASE, 29 + OMAP_INTC_START);
OMAP44XX_LOCAL_TWD_BASE, 29);
#endif
static void __init omap4_timer_init(void)

View File

@ -16,6 +16,7 @@
#include <linux/smc91x.h>
#include <mach/hardware.h>
#include "../mach-omap2/debug-devices.h"
/* Many OMAP development platforms reuse the same "debug board"; these
* platforms include H2, H3, H4, and Perseus2.