omap24xx: Fix n810bm compilation
[openwrt.git] / target / linux / omap24xx / patches-3.1 / 312-no-hwmod-reset.patch
1 Index: linux-3.1/arch/arm/mach-omap2/omap_hwmod.c
2 ===================================================================
3 --- linux-3.1.orig/arch/arm/mach-omap2/omap_hwmod.c     2011-10-30 21:20:19.205515660 +0100
4 +++ linux-3.1/arch/arm/mach-omap2/omap_hwmod.c  2011-10-30 21:28:16.769945954 +0100
5 @@ -145,6 +145,8 @@
6  #include <plat/omap_hwmod.h>
7  #include <plat/prcm.h>
8  
9 +#include <asm/mach-types.h>
10 +
11  #include "cm2xxx_3xxx.h"
12  #include "cminst44xx.h"
13  #include "prm2xxx_3xxx.h"
14 @@ -1704,6 +1706,16 @@ static int _setup(struct omap_hwmod *oh,
15  
16         oh->_state = _HWMOD_STATE_INITIALIZED;
17  
18 +       if (machine_is_nokia770() ||
19 +           machine_is_nokia_n800() ||
20 +           machine_is_nokia_n810() ||
21 +           machine_is_nokia_n810_wimax()) {
22 +               /* Nokia N-series workaround: Don't reset any hwmod. Some drivers expect
23 +                * the NOLO bootloader initializations to be effective. */
24 +               oh->flags |= HWMOD_INIT_NO_RESET;
25 +               printk_once(KERN_INFO "Nokia N-series HWMOD_INIT_NO_RESET workaround enabled\n");
26 +       }
27 +
28         /*
29          * In the case of hwmod with hardreset that should not be
30          * de-assert at boot time, we have to keep the module