]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Dec 2012 22:27:45 +0000 (14:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Dec 2012 22:27:45 +0000 (14:27 -0800)
Pull MIPS updates from Ralf Baechle:
 "The MIPS bits for 3.8.  This also includes a bunch fixes that were
  sitting in the linux-mips.org git tree for a long time.  This pull
  request contains updates to several OCTEON drivers and the board
  support code for BCM47XX, BCM63XX, XLP, XLR, XLS, lantiq, Loongson1B,
  updates to the SSB bus support, MIPS kexec code and adds support for
  kdump.

  When pulling this, there are two expected merge conflicts in
  include/linux/bcma/bcma_driver_chipcommon.h which are trivial to
  resolve, just remove the conflict markers and keep both alternatives."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (90 commits)
  MIPS: PMC-Sierra Yosemite: Remove support.
  VIDEO: Newport Fix console crashes
  MIPS: wrppmc: Fix build of PCI code.
  MIPS: IP22/IP28: Fix build of EISA code.
  MIPS: RB532: Fix build of prom code.
  MIPS: PowerTV: Fix build.
  MIPS: IP27: Correct fucked grammar in ops-bridge.c
  MIPS: Highmem: Fix build error if CONFIG_DEBUG_HIGHMEM is disabled
  MIPS: Fix potencial corruption
  MIPS: Fix for warning from FPU emulation code
  MIPS: Handle COP3 Unusable exception as COP1X for FP emulation
  MIPS: Fix poweroff failure when HOTPLUG_CPU configured.
  MIPS: MT: Fix build with CONFIG_UIDGID_STRICT_TYPE_CHECKS=y
  MIPS: Remove unused smvp.h
  MIPS/EDAC: Improve OCTEON EDAC support.
  MIPS: OCTEON: Add definitions for OCTEON memory contoller registers.
  MIPS: OCTEON: Add OCTEON family definitions to octeon-model.h
  ata: pata_octeon_cf: Use correct byte order for DMA in when built little-endian.
  MIPS/OCTEON/ata: Convert pata_octeon_cf.c to use device tree.
  MIPS: Remove usage of CEVT_R4K_LIB config option.
  ...

22 files changed:
1  2 
MAINTAINERS
arch/mips/Kconfig
arch/mips/bcm47xx/wgt634u.c
arch/mips/include/asm/pgtable.h
arch/mips/include/asm/processor.h
arch/mips/kernel/mips_ksyms.c
arch/mips/kernel/process.c
arch/mips/kernel/scall64-n32.S
arch/mips/loongson1/common/platform.c
arch/mips/mm/tlb-r4k.c
drivers/bcma/bcma_private.h
drivers/bcma/driver_chipcommon.c
drivers/bcma/main.c
drivers/edac/Kconfig
drivers/ssb/driver_chipcommon.c
drivers/ssb/driver_extif.c
drivers/ssb/main.c
drivers/ssb/ssb_private.h
include/linux/bcma/bcma_driver_chipcommon.h
include/linux/ssb/ssb.h
include/linux/ssb/ssb_driver_chipcommon.h
include/linux/ssb/ssb_driver_extif.h

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index dc96dd8ebff29c573960b475c2a664e359edc2fc,994fce65f77d8b4baeecceb15435bd0a8be242e5..e461ad25fda4825dbc36a632d5781015843eb268
@@@ -25,95 -22,16 +25,97 @@@ static inline u32 bcma_cc_write32_maske
        return value;
  }
  
 -void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
 +static u32 bcma_chipco_get_alp_clock(struct bcma_drv_cc *cc)
  {
 -      u32 leddc_on = 10;
 -      u32 leddc_off = 90;
 +      if (cc->capabilities & BCMA_CC_CAP_PMU)
 +              return bcma_pmu_get_alp_clock(cc);
  
 -      if (cc->setup_done)
 +      return 20000000;
 +}
 +
 +static u32 bcma_chipco_watchdog_get_max_timer(struct bcma_drv_cc *cc)
 +{
 +      struct bcma_bus *bus = cc->core->bus;
 +      u32 nb;
 +
 +      if (cc->capabilities & BCMA_CC_CAP_PMU) {
 +              if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706)
 +                      nb = 32;
 +              else if (cc->core->id.rev < 26)
 +                      nb = 16;
 +              else
 +                      nb = (cc->core->id.rev >= 37) ? 32 : 24;
 +      } else {
 +              nb = 28;
 +      }
 +      if (nb == 32)
 +              return 0xffffffff;
 +      else
 +              return (1 << nb) - 1;
 +}
 +
 +static u32 bcma_chipco_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt,
 +                                            u32 ticks)
 +{
 +      struct bcma_drv_cc *cc = bcm47xx_wdt_get_drvdata(wdt);
 +
 +      return bcma_chipco_watchdog_timer_set(cc, ticks);
 +}
 +
 +static u32 bcma_chipco_watchdog_timer_set_ms_wdt(struct bcm47xx_wdt *wdt,
 +                                               u32 ms)
 +{
 +      struct bcma_drv_cc *cc = bcm47xx_wdt_get_drvdata(wdt);
 +      u32 ticks;
 +
 +      ticks = bcma_chipco_watchdog_timer_set(cc, cc->ticks_per_ms * ms);
 +      return ticks / cc->ticks_per_ms;
 +}
 +
 +static int bcma_chipco_watchdog_ticks_per_ms(struct bcma_drv_cc *cc)
 +{
 +      struct bcma_bus *bus = cc->core->bus;
 +
 +      if (cc->capabilities & BCMA_CC_CAP_PMU) {
 +              if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706)
 +                      /* 4706 CC and PMU watchdogs are clocked at 1/4 of ALP clock */
 +                      return bcma_chipco_get_alp_clock(cc) / 4000;
 +              else
 +                      /* based on 32KHz ILP clock */
 +                      return 32;
 +      } else {
 +              return bcma_chipco_get_alp_clock(cc) / 1000;
 +      }
 +}
 +
 +int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc)
 +{
 +      struct bcm47xx_wdt wdt = {};
 +      struct platform_device *pdev;
 +
 +      wdt.driver_data = cc;
 +      wdt.timer_set = bcma_chipco_watchdog_timer_set_wdt;
 +      wdt.timer_set_ms = bcma_chipco_watchdog_timer_set_ms_wdt;
 +      wdt.max_timer_ms = bcma_chipco_watchdog_get_max_timer(cc) / cc->ticks_per_ms;
 +
 +      pdev = platform_device_register_data(NULL, "bcm47xx-wdt",
 +                                           cc->core->bus->num, &wdt,
 +                                           sizeof(wdt));
 +      if (IS_ERR(pdev))
 +              return PTR_ERR(pdev);
 +
 +      cc->watchdog = pdev;
 +
 +      return 0;
 +}
 +
 +void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc)
 +{
 +      if (cc->early_setup_done)
                return;
  
+       spin_lock_init(&cc->gpio_lock);
        if (cc->core->id.rev >= 11)
                cc->status = bcma_cc_read32(cc, BCMA_CC_CHIPSTAT);
        cc->capabilities = bcma_cc_read32(cc, BCMA_CC_CAP);
index debd4f142f936b084ff7d92c517188d7728cf332,478ba01ca0c24b60c0864b0b19ab859446506e91..53ba20ca17e0d00b1fc9087b540b41645c0f64bb
@@@ -164,13 -152,12 +164,18 @@@ static int bcma_register_cores(struct b
                        bcma_err(bus, "Error registering NAND flash\n");
        }
  #endif
+       err = bcma_gpio_init(&bus->drv_cc);
+       if (err == -ENOTSUPP)
+               bcma_debug(bus, "GPIO driver not activated\n");
+       else if (err)
+               bcma_err(bus, "Error registering GPIO driver: %i\n", err);
  
 +      if (bus->hosttype == BCMA_HOSTTYPE_SOC) {
 +              err = bcma_chipco_watchdog_register(&bus->drv_cc);
 +              if (err)
 +                      bcma_err(bus, "Error registering watchdog driver\n");
 +      }
 +
        return 0;
  }
  
Simple merge
Simple merge
index 553227a3062dfa739fd6868990dc4a70118ca045,e1d0bb8ad7256c55a463617dd1b5745c307725e0..59385fdab5b0d253dd26587e55390b7fac55a94f
@@@ -112,32 -112,19 +112,39 @@@ void ssb_extif_get_clockcontrol(struct 
        *m = extif_read32(extif, SSB_EXTIF_CLOCK_SB);
  }
  
 -void ssb_extif_watchdog_timer_set(struct ssb_extif *extif,
 -                                u32 ticks)
 +u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks)
  {
 +      struct ssb_extif *extif = bcm47xx_wdt_get_drvdata(wdt);
 +
 +      return ssb_extif_watchdog_timer_set(extif, ticks);
 +}
 +
 +u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms)
 +{
 +      struct ssb_extif *extif = bcm47xx_wdt_get_drvdata(wdt);
 +      u32 ticks = (SSB_EXTIF_WATCHDOG_CLK / 1000) * ms;
 +
 +      ticks = ssb_extif_watchdog_timer_set(extif, ticks);
 +
 +      return (ticks * 1000) / SSB_EXTIF_WATCHDOG_CLK;
 +}
 +
 +u32 ssb_extif_watchdog_timer_set(struct ssb_extif *extif, u32 ticks)
 +{
 +      if (ticks > SSB_EXTIF_WATCHDOG_MAX_TIMER)
 +              ticks = SSB_EXTIF_WATCHDOG_MAX_TIMER;
        extif_write32(extif, SSB_EXTIF_WATCHDOG, ticks);
 +
 +      return ticks;
  }
  
+ void ssb_extif_init(struct ssb_extif *extif)
+ {
+       if (!extif->dev)
+               return; /* We don't have a Extif core */
+       spin_lock_init(&extif->gpio_lock);
+ }
  u32 ssb_extif_gpio_in(struct ssb_extif *extif, u32 mask)
  {
        return extif_read32(extif, SSB_EXTIF_GPIO_IN) & mask;
Simple merge
index 8942db1d855af8ef69c6f3f4d639f4efe414fdd1,463b76a2140b729525d4d6299a7911b75aea5143..6c10b66c796cf7ee23ae3e9334086034198e911c
@@@ -211,35 -210,22 +211,52 @@@ static inline void b43_pci_ssb_bridge_e
  /* driver_chipcommon_pmu.c */
  extern u32 ssb_pmu_get_cpu_clock(struct ssb_chipcommon *cc);
  extern u32 ssb_pmu_get_controlclock(struct ssb_chipcommon *cc);
 +extern u32 ssb_pmu_get_alp_clock(struct ssb_chipcommon *cc);
 +
 +extern u32 ssb_chipco_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt,
 +                                           u32 ticks);
 +extern u32 ssb_chipco_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms);
 +
 +#ifdef CONFIG_SSB_DRIVER_EXTIF
 +extern u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks);
 +extern u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt, u32 ms);
 +#else
 +static inline u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt,
 +                                                 u32 ticks)
 +{
 +      return 0;
 +}
 +static inline u32 ssb_extif_watchdog_timer_set_ms(struct bcm47xx_wdt *wdt,
 +                                                u32 ms)
 +{
 +      return 0;
 +}
 +#endif
 +
 +#ifdef CONFIG_SSB_EMBEDDED
 +extern int ssb_watchdog_register(struct ssb_bus *bus);
 +#else /* CONFIG_SSB_EMBEDDED */
 +static inline int ssb_watchdog_register(struct ssb_bus *bus)
 +{
 +      return 0;
 +}
 +#endif /* CONFIG_SSB_EMBEDDED */
  
+ #ifdef CONFIG_SSB_DRIVER_EXTIF
+ extern void ssb_extif_init(struct ssb_extif *extif);
+ #else
+ static inline void ssb_extif_init(struct ssb_extif *extif)
+ {
+ }
+ #endif
+ #ifdef CONFIG_SSB_DRIVER_GPIO
+ extern int ssb_gpio_init(struct ssb_bus *bus);
+ #else /* CONFIG_SSB_DRIVER_GPIO */
+ static inline int ssb_gpio_init(struct ssb_bus *bus)
+ {
+       return -ENOTSUPP;
+ }
+ #endif /* CONFIG_SSB_DRIVER_GPIO */
  #endif /* LINUX_SSB_PRIVATE_H_ */
index e51359180b6f7c6bdd85bdd33c86eb6792301ca7,7d662a988d24f6c20ab987c328967d98ff1f8e24..9a0e3fa3ca9539123f1a5494cb0007c17b4c9a26
@@@ -1,7 -1,7 +1,8 @@@
  #ifndef LINUX_BCMA_DRIVER_CC_H_
  #define LINUX_BCMA_DRIVER_CC_H_
  
 +#include <linux/platform_device.h>
+ #include <linux/gpio.h>
  
  /** ChipCommon core registers. **/
  #define BCMA_CC_ID                    0x0000
@@@ -572,8 -569,12 +573,14 @@@ struct bcma_drv_cc 
        int nr_serial_ports;
        struct bcma_serial_port serial_ports[4];
  #endif /* CONFIG_BCMA_DRIVER_MIPS */
 +      u32 ticks_per_ms;
 +      struct platform_device *watchdog;
+       /* Lock for GPIO register access. */
+       spinlock_t gpio_lock;
+ #ifdef CONFIG_BCMA_DRIVER_GPIO
+       struct gpio_chip gpio;
+ #endif
  };
  
  /* Register access */
index 1f64e3f1f22b52f5d1db2f57bfb69c4a80bca0e8,3862a5bbd73b3ca513f2c9ad4dc9d5c2ffbd7b40..22958d68ecfe19016e721eb552cd5f901bbbbf89
@@@ -6,9 -6,9 +6,10 @@@
  #include <linux/types.h>
  #include <linux/spinlock.h>
  #include <linux/pci.h>
+ #include <linux/gpio.h>
  #include <linux/mod_devicetable.h>
  #include <linux/dma-mapping.h>
 +#include <linux/platform_device.h>
  
  #include <linux/ssb/ssb_regs.h>
  
@@@ -433,8 -433,10 +434,11 @@@ struct ssb_bus 
  #ifdef CONFIG_SSB_EMBEDDED
        /* Lock for GPIO register access. */
        spinlock_t gpio_lock;
 +      struct platform_device *watchdog;
  #endif /* EMBEDDED */
+ #ifdef CONFIG_SSB_DRIVER_GPIO
+       struct gpio_chip gpio;
+ #endif /* DRIVER_GPIO */
  
        /* Internal-only stuff follows. Do not touch. */
        struct list_head list;
index 38339fd68a5f101ee34393fab98ccfe7db2b0886,30b694345d471f2488e4314d93f161a9a0c656c0..9e492be5244b40d8ead3340aa7ac475cb51e56ff
@@@ -590,9 -590,8 +590,10 @@@ struct ssb_chipcommon 
        u32 status;
        /* Fast Powerup Delay constant */
        u16 fast_pwrup_delay;
+       spinlock_t gpio_lock;
        struct ssb_chipcommon_pmu pmu;
 +      u32 ticks_per_ms;
 +      u32 max_timer_ms;
  };
  
  static inline bool ssb_chipco_available(struct ssb_chipcommon *cc)
Simple merge