Merge tag 'for-linus-20130509' of git://git.infradead.org/linux-mtd
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 May 2013 17:15:46 +0000 (10:15 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 May 2013 17:15:46 +0000 (10:15 -0700)
Pull MTD update from David Woodhouse:

 - Lots of cleanups from Artem, including deletion of some obsolete
   drivers

 - Support partitions larger than 4GiB in device tree

 - Support for new SPI chips

* tag 'for-linus-20130509' of git://git.infradead.org/linux-mtd: (83 commits)
  mtd: omap2: Use module_platform_driver()
  mtd: bf5xx_nand: Use module_platform_driver()
  mtd: denali_dt: Remove redundant use of of_match_ptr
  mtd: denali_dt: Change return value to fix smatch warning
  mtd: denali_dt: Use module_platform_driver()
  mtd: denali_dt: Fix incorrect error check
  mtd: nand: subpage write support for hardware based ECC schemes
  mtd: omap2: use msecs_to_jiffies()
  mtd: nand_ids: use size macros
  mtd: nand_ids: improve LEGACY_ID_NAND macro a bit
  mtd: add 4 Toshiba nand chips for the full-id case
  mtd: add the support to parse out the full-id nand type
  mtd: add new fields to nand_flash_dev{}
  mtd: sh_flctl: Use of_match_ptr() macro
  mtd: gpio: Use of_match_ptr() macro
  mtd: gpio: Use devm_kzalloc()
  mtd: davinci_nand: Use of_match_ptr()
  mtd: dataflash: Use of_match_ptr() macro
  mtd: remove h720x flash support
  mtd: onenand: remove OneNAND simulator
  ...

1  2 
arch/arm/mach-pxa/Kconfig
drivers/mtd/maps/Kconfig
drivers/mtd/mtdchar.c
drivers/mtd/mtdcore.c
drivers/mtd/nand/Kconfig
drivers/ssb/driver_mipscore.c

index 9075461999c11d31d67af317e3de806666ba987f,0e74ba0cefd135dce93c92fd3487d7fbeca34340..96100dbf5a2e8353e9fad34ded41ec5e83dda7ad
@@@ -51,13 -51,11 +51,13 @@@ config MACH_LITTLETO
  config MACH_TAVOREVB
        bool "PXA930 Evaluation Board (aka TavorEVB)"
        select CPU_PXA930
 +      select CPU_PXA935
        select PXA3xx
  
  config MACH_SAAR
        bool "PXA930 Handheld Platform (aka SAAR)"
        select CPU_PXA930
 +      select CPU_PXA935
        select PXA3xx
  
  comment "Third Party Dev Platforms (sorted by vendor name)"
@@@ -162,7 -160,6 +162,6 @@@ config MACH_XCE
        select MTD
        select MTD_CFI
        select MTD_CFI_INTELEXT
-       select MTD_CHAR
        select MTD_PHYSMAP
        select PXA25x
        select SMC91X
diff --combined drivers/mtd/maps/Kconfig
index c26938382f6488992828d211781b06d84ecde5e3,bed9634026ce7f8084d19ca3e94cc0553866cefc..bed9d58d5741246f58bafe178851e8faf42744e2
@@@ -249,22 -249,6 +249,6 @@@ config MTD_LANTI
        help
          Support for NOR flash attached to the Lantiq SoC's External Bus Unit.
  
- config MTD_DILNETPC
-       tristate "CFI Flash device mapped on DIL/Net PC"
-       depends on X86 && MTD_CFI_INTELEXT && BROKEN
-       help
-         MTD map driver for SSV DIL/Net PC Boards "DNP" and "ADNP".
-         For details, see <http://www.ssv-embedded.de/ssv/pc104/p169.htm>
-         and <http://www.ssv-embedded.de/ssv/pc104/p170.htm>
- config MTD_DILNETPC_BOOTSIZE
-       hex "Size of DIL/Net PC flash boot partition"
-       depends on MTD_DILNETPC
-       default "0x80000"
-       help
-         The amount of space taken up by the kernel or Etherboot
-         on the DIL/Net PC flash chips.
  config MTD_L440GX
        tristate "BIOS flash chip on Intel L440GX boards"
        depends on X86 && MTD_JEDECPROBE
  
          BE VERY CAREFUL.
  
- config MTD_TQM8XXL
-       tristate "CFI Flash device mapped on TQM8XXL"
-       depends on MTD_CFI && TQM8xxL
-       help
-         The TQM8xxL PowerPC board has up to two banks of CFI-compliant
-         chips, currently uses AMD one. This 'mapping' driver supports
-         that arrangement, allowing the CFI probe and command set driver
-         code to communicate with the chips on the TQM8xxL board. More at
-         <http://www.denx.de/wiki/PPCEmbedded/>.
- config MTD_RPXLITE
-       tristate "CFI Flash device mapped on RPX Lite or CLLF"
-       depends on MTD_CFI && (RPXCLASSIC || RPXLITE)
-       help
-         The RPXLite PowerPC board has CFI-compliant chips mapped in
-         a strange sparse mapping. This 'mapping' driver supports that
-         arrangement, allowing the CFI probe and command set driver code
-         to communicate with the chips on the RPXLite board. More at
-         <http://www.embeddedplanet.com/>.
- config MTD_MBX860
-       tristate "System flash on MBX860 board"
-       depends on MTD_CFI && MBX
-       help
-         This enables access routines for the flash chips on the Motorola
-         MBX860 board. If you have one of these boards and would like
-         to use the flash chips on it, say 'Y'.
- config MTD_DBOX2
-       tristate "CFI Flash device mapped on D-Box2"
-       depends on DBOX2 && MTD_CFI_INTELSTD && MTD_CFI_INTELEXT && MTD_CFI_AMDSTD
-       help
-         This enables access routines for the flash chips on the Nokia/Sagem
-         D-Box 2 board. If you have one of these boards and would like to use
-         the flash chips on it, say 'Y'.
  config MTD_CFI_FLAGADM
        tristate "CFI Flash device mapping on FlagaDM"
        depends on 8xx && MTD_CFI
@@@ -349,15 -297,6 +297,6 @@@ config MTD_IXP4X
          IXDP425 and Coyote. If you have an IXP4xx based board and
          would like to use the flash chips on it, say 'Y'.
  
- config MTD_IXP2000
-       tristate "CFI Flash device mapped on Intel IXP2000 based systems"
-       depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP2000
-       help
-         This enables MTD access to flash devices on platforms based
-         on Intel's IXP2000 family of network processors. If you have an
-         IXP2000 based board and would like to use the flash chips on it,
-         say 'Y'.
  config MTD_AUTCPU12
        bool "NV-RAM mapping AUTCPU12 board"
        depends on ARCH_AUTCPU12
@@@ -372,13 -311,6 +311,6 @@@ config MTD_IMPA
          This enables access to the NOR Flash on the impA7 board of
          implementa GmbH. If you have such a board, say 'Y' here.
  
- config MTD_H720X
-       tristate "Hynix evaluation board mappings"
-       depends on MTD_CFI && ( ARCH_H7201 || ARCH_H7202 )
-       help
-         This enables access to the flash chips on the Hynix evaluation boards.
-         If you have such a board, say 'Y'.
  # This needs CFI or JEDEC, depending on the cards found.
  config MTD_PCI
        tristate "PCI MTD driver"
@@@ -419,7 -351,7 +351,7 @@@ config MTD_BFIN_ASYN
  
  config MTD_GPIO_ADDR
        tristate "GPIO-assisted Flash Chip Support"
 -      depends on GENERIC_GPIO || GPIOLIB
 +      depends on GPIOLIB
        depends on MTD_COMPLEX_MAPPINGS
        help
          Map driver which allows flashes to be partially physically addressed
@@@ -433,15 -365,6 +365,6 @@@ config MTD_UCLINU
        help
          Map driver to support image based filesystems for uClinux.
  
- config MTD_DMV182
-         tristate "Map driver for Dy-4 SVME/DMV-182 board."
-         depends on DMV182
-       select MTD_MAP_BANK_WIDTH_32
-       select MTD_CFI_I8
-       select MTD_CFI_AMDSTD
-         help
-           Map driver for Dy-4 SVME/DMV-182 board.
  config MTD_INTEL_VR_NOR
        tristate "NOR flash on Intel Vermilion Range Expansion Bus CS0"
        depends on PCI
diff --combined drivers/mtd/mtdchar.c
index dc571ebc1aa0be8680f4a20397653e9d4a7f84cf,e0e59bf9b915a83c1b30cc09be8e3d61c365699e..c719879284bd7b9921a254a70831a39bae644a7d
@@@ -38,6 -38,8 +38,8 @@@
  
  #include <asm/uaccess.h>
  
+ #include "mtdcore.h"
  static DEFINE_MUTEX(mtd_mutex);
  
  /*
@@@ -365,37 -367,35 +367,35 @@@ static void mtdchar_erase_callback (str
        wake_up((wait_queue_head_t *)instr->priv);
  }
  
- #ifdef CONFIG_HAVE_MTD_OTP
  static int otp_select_filemode(struct mtd_file_info *mfi, int mode)
  {
        struct mtd_info *mtd = mfi->mtd;
        size_t retlen;
-       int ret = 0;
-       /*
-        * Make a fake call to mtd_read_fact_prot_reg() to check if OTP
-        * operations are supported.
-        */
-       if (mtd_read_fact_prot_reg(mtd, -1, 0, &retlen, NULL) == -EOPNOTSUPP)
-               return -EOPNOTSUPP;
  
        switch (mode) {
        case MTD_OTP_FACTORY:
+               if (mtd_read_fact_prot_reg(mtd, -1, 0, &retlen, NULL) ==
+                               -EOPNOTSUPP)
+                       return -EOPNOTSUPP;
                mfi->mode = MTD_FILE_MODE_OTP_FACTORY;
                break;
        case MTD_OTP_USER:
+               if (mtd_read_user_prot_reg(mtd, -1, 0, &retlen, NULL) ==
+                               -EOPNOTSUPP)
+                       return -EOPNOTSUPP;
                mfi->mode = MTD_FILE_MODE_OTP_USER;
                break;
-       default:
-               ret = -EINVAL;
        case MTD_OTP_OFF:
+               mfi->mode = MTD_FILE_MODE_NORMAL;
                break;
+       default:
+               return -EINVAL;
        }
-       return ret;
+       return 0;
  }
- #else
- # define otp_select_filemode(f,m)     -EOPNOTSUPP
- #endif
  
  static int mtdchar_writeoob(struct file *file, struct mtd_info *mtd,
        uint64_t start, uint32_t length, void __user *ptr,
@@@ -888,7 -888,6 +888,6 @@@ static int mtdchar_ioctl(struct file *f
                break;
        }
  
- #ifdef CONFIG_HAVE_MTD_OTP
        case OTPSELECT:
        {
                int mode;
                ret = mtd_lock_user_prot_reg(mtd, oinfo.start, oinfo.length);
                break;
        }
- #endif
  
        /* This ioctl is being deprecated - it truncates the ECC layout */
        case ECCGETLAYOUT:
@@@ -1123,6 -1121,33 +1121,6 @@@ static unsigned long mtdchar_get_unmapp
  }
  #endif
  
 -static inline unsigned long get_vm_size(struct vm_area_struct *vma)
 -{
 -      return vma->vm_end - vma->vm_start;
 -}
 -
 -static inline resource_size_t get_vm_offset(struct vm_area_struct *vma)
 -{
 -      return (resource_size_t) vma->vm_pgoff << PAGE_SHIFT;
 -}
 -
 -/*
 - * Set a new vm offset.
 - *
 - * Verify that the incoming offset really works as a page offset,
 - * and that the offset and size fit in a resource_size_t.
 - */
 -static inline int set_vm_offset(struct vm_area_struct *vma, resource_size_t off)
 -{
 -      pgoff_t pgoff = off >> PAGE_SHIFT;
 -      if (off != (resource_size_t) pgoff << PAGE_SHIFT)
 -              return -EINVAL;
 -      if (off + get_vm_size(vma) - 1 < off)
 -              return -EINVAL;
 -      vma->vm_pgoff = pgoff;
 -      return 0;
 -}
 -
  /*
   * set up a mapping for shared memory segments
   */
@@@ -1132,17 -1157,45 +1130,17 @@@ static int mtdchar_mmap(struct file *fi
        struct mtd_file_info *mfi = file->private_data;
        struct mtd_info *mtd = mfi->mtd;
        struct map_info *map = mtd->priv;
 -      resource_size_t start, off;
 -      unsigned long len, vma_len;
  
          /* This is broken because it assumes the MTD device is map-based
           and that mtd->priv is a valid struct map_info.  It should be
           replaced with something that uses the mtd_get_unmapped_area()
           operation properly. */
        if (0 /*mtd->type == MTD_RAM || mtd->type == MTD_ROM*/) {
 -              off = get_vm_offset(vma);
 -              start = map->phys;
 -              len = PAGE_ALIGN((start & ~PAGE_MASK) + map->size);
 -              start &= PAGE_MASK;
 -              vma_len = get_vm_size(vma);
 -
 -              /* Overflow in off+len? */
 -              if (vma_len + off < off)
 -                      return -EINVAL;
 -              /* Does it fit in the mapping? */
 -              if (vma_len + off > len)
 -                      return -EINVAL;
 -
 -              off += start;
 -              /* Did that overflow? */
 -              if (off < start)
 -                      return -EINVAL;
 -              if (set_vm_offset(vma, off) < 0)
 -                      return -EINVAL;
 -              vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;
 -
  #ifdef pgprot_noncached
 -              if (file->f_flags & O_DSYNC || off >= __pa(high_memory))
 +              if (file->f_flags & O_DSYNC || map->phys >= __pa(high_memory))
                        vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
  #endif
 -              if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
 -                                     vma->vm_end - vma->vm_start,
 -                                     vma->vm_page_prot))
 -                      return -EAGAIN;
 -
 -              return 0;
 +              return vm_iomap_memory(vma, map->phys, map->size);
        }
        return -ENOSYS;
  #else
@@@ -1185,23 -1238,25 +1183,25 @@@ static struct file_system_type mtd_inod
  };
  MODULE_ALIAS_FS("mtd_inodefs");
  
static int __init init_mtdchar(void)
+ int __init init_mtdchar(void)
  {
        int ret;
  
        ret = __register_chrdev(MTD_CHAR_MAJOR, 0, 1 << MINORBITS,
                                   "mtd", &mtd_fops);
        if (ret < 0) {
-               pr_notice("Can't allocate major number %d for "
-                               "Memory Technology Devices.\n", MTD_CHAR_MAJOR);
+               pr_err("Can't allocate major number %d for MTD\n",
+                      MTD_CHAR_MAJOR);
                return ret;
        }
  
        ret = register_filesystem(&mtd_inodefs_type);
        if (ret) {
-               pr_notice("Can't register mtd_inodefs filesystem: %d\n", ret);
+               pr_err("Can't register mtd_inodefs filesystem, error %d\n",
+                      ret);
                goto err_unregister_chdev;
        }
        return ret;
  
  err_unregister_chdev:
        return ret;
  }
  
static void __exit cleanup_mtdchar(void)
+ void __exit cleanup_mtdchar(void)
  {
        unregister_filesystem(&mtd_inodefs_type);
        __unregister_chrdev(MTD_CHAR_MAJOR, 0, 1 << MINORBITS, "mtd");
  }
  
- module_init(init_mtdchar);
- module_exit(cleanup_mtdchar);
- MODULE_ALIAS_CHARDEV_MAJOR(MTD_CHAR_MAJOR);
- MODULE_LICENSE("GPL");
- MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
- MODULE_DESCRIPTION("Direct character-device access to MTD devices");
  MODULE_ALIAS_CHARDEV_MAJOR(MTD_CHAR_MAJOR);
diff --combined drivers/mtd/mtdcore.c
index 322ca65b0cc59fe5fd0dcf4c13ce71f9f91e2753,71877ff77cbff90d186f0e9f4f788ef30e70384b..c400c57c394aaddb26147bfe2b1955c6716f74d5
  #include <linux/idr.h>
  #include <linux/backing-dev.h>
  #include <linux/gfp.h>
 +#include <linux/slab.h>
  
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
  
  #include "mtdcore.h"
  /*
   * backing device capabilities for non-mappable devices (such as NAND flash)
   * - permits private mappings, copies are taken of the data
@@@ -97,11 -97,7 +98,7 @@@ EXPORT_SYMBOL_GPL(__mtd_next_device)
  static LIST_HEAD(mtd_notifiers);
  
  
- #if defined(CONFIG_MTD_CHAR) || defined(CONFIG_MTD_CHAR_MODULE)
  #define MTD_DEVT(index) MKDEV(MTD_CHAR_MAJOR, (index)*2)
- #else
- #define MTD_DEVT(index) 0
- #endif
  
  /* REVISIT once MTD uses the driver model better, whoever allocates
   * the mtd_info will probably want to use the release() hook...
@@@ -493,7 -489,7 +490,7 @@@ out_error
   *
   * Returns zero in case of success and a negative error code in case of failure.
   */
- int mtd_device_parse_register(struct mtd_info *mtd, const char **types,
+ int mtd_device_parse_register(struct mtd_info *mtd, const char * const *types,
                              struct mtd_part_parser_data *parser_data,
                              const struct mtd_partition *parts,
                              int nr_parts)
@@@ -1117,8 -1113,6 +1114,6 @@@ EXPORT_SYMBOL_GPL(mtd_kmalloc_up_to)
  /*====================================================================*/
  /* Support for /proc/mtd */
  
- static struct proc_dir_entry *proc_mtd;
  static int mtd_proc_show(struct seq_file *m, void *v)
  {
        struct mtd_info *mtd;
@@@ -1164,6 -1158,8 +1159,8 @@@ static int __init mtd_bdi_init(struct b
        return ret;
  }
  
+ static struct proc_dir_entry *proc_mtd;
  static int __init init_mtd(void)
  {
        int ret;
        if (ret)
                goto err_bdi3;
  
- #ifdef CONFIG_PROC_FS
        proc_mtd = proc_create("mtd", 0, NULL, &mtd_proc_ops);
- #endif /* CONFIG_PROC_FS */
+       ret = init_mtdchar();
+       if (ret)
+               goto out_procfs;
        return 0;
  
+ out_procfs:
+       if (proc_mtd)
+               remove_proc_entry("mtd", NULL);
  err_bdi3:
        bdi_destroy(&mtd_bdi_ro_mappable);
  err_bdi2:
@@@ -1202,10 -1204,9 +1205,9 @@@ err_reg
  
  static void __exit cleanup_mtd(void)
  {
- #ifdef CONFIG_PROC_FS
+       cleanup_mtdchar();
        if (proc_mtd)
-               remove_proc_entry( "mtd", NULL);
- #endif /* CONFIG_PROC_FS */
+               remove_proc_entry("mtd", NULL);
        class_unregister(&mtd_class);
        bdi_destroy(&mtd_bdi_unmappable);
        bdi_destroy(&mtd_bdi_ro_mappable);
diff --combined drivers/mtd/nand/Kconfig
index 5d54ad32697fb9675773eb6c035c7a2058d2dfa3,1cca71208340fb505a7d752b344095e879a3d3c0..a60f6c17f57b62acd19528b62a7d1b329df12913
@@@ -41,14 -41,6 +41,6 @@@ config MTD_SM_COMMO
        tristate
        default n
  
- config MTD_NAND_MUSEUM_IDS
-       bool "Enable chip ids for obsolete ancient NAND devices"
-       default n
-       help
-         Enable this option only when your board has first generation
-         NAND chips (page size 256 byte, erase size 4-8KiB). The IDs
-         of these chips were reused by later, larger chips.
  config MTD_NAND_DENALI
          tristate "Support Denali NAND controller"
          help
@@@ -81,15 -73,9 +73,9 @@@ config MTD_NAND_DENALI_SCRATCH_REG_ADD
            scratch register here to enable this feature. On Intel Moorestown
            boards, the scratch register is at 0xFF108018.
  
- config MTD_NAND_H1900
-       tristate "iPAQ H1900 flash"
-       depends on ARCH_PXA && BROKEN
-       help
-         This enables the driver for the iPAQ h1900 flash.
  config MTD_NAND_GPIO
        tristate "GPIO NAND Flash driver"
 -      depends on GENERIC_GPIO && ARM
 +      depends on GPIOLIB && ARM
        help
          This enables a GPIO based NAND flash driver.
  
@@@ -201,22 -187,6 +187,6 @@@ config MTD_NAND_BF5XX_BOOTROM_EC
  
          If unsure, say N.
  
- config MTD_NAND_RTC_FROM4
-       tristate "Renesas Flash ROM 4-slot interface board (FROM_BOARD4)"
-       depends on SH_SOLUTION_ENGINE
-       select REED_SOLOMON
-       select REED_SOLOMON_DEC8
-       select BITREVERSE
-       help
-         This enables the driver for the Renesas Technology AG-AND
-         flash interface board (FROM_BOARD4)
- config MTD_NAND_PPCHAMELEONEVB
-       tristate "NAND Flash device on PPChameleonEVB board"
-       depends on PPCHAMELEONEVB && BROKEN
-       help
-         This enables the NAND flash driver on the PPChameleon EVB Board.
  config MTD_NAND_S3C2410
        tristate "NAND Flash support for Samsung S3C SoCs"
        depends on ARCH_S3C24XX || ARCH_S3C64XX
index fa385a368a561219b3c510524bffd0325ea1446d,8b64f82e1c6a8fbd52ba18e9660e4f998a4e0676..09077067b0c858d5e13ab74819c9985b1429c0ca
@@@ -18,7 -18,7 +18,7 @@@
  
  #include "ssb_private.h"
  
- static const char *part_probes[] = { "bcm47xxpart", NULL };
+ static const char * const part_probes[] = { "bcm47xxpart", NULL };
  
  static struct physmap_flash_data ssb_pflash_data = {
        .part_probe_types       = part_probes,
@@@ -167,22 -167,21 +167,22 @@@ static void set_irq(struct ssb_device *
                irqflag |= (ipsflag & ~ipsflag_irq_mask[irq]);
                ssb_write32(mdev, SSB_IPSFLAG, irqflag);
        }
 -      ssb_dprintk(KERN_INFO PFX
 -                  "set_irq: core 0x%04x, irq %d => %d\n",
 -                  dev->id.coreid, oldirq+2, irq+2);
 +      ssb_dbg("set_irq: core 0x%04x, irq %d => %d\n",
 +              dev->id.coreid, oldirq+2, irq+2);
  }
  
  static void print_irq(struct ssb_device *dev, unsigned int irq)
  {
 -      int i;
        static const char *irq_name[] = {"2(S)", "3", "4", "5", "6", "D", "I"};
 -      ssb_dprintk(KERN_INFO PFX
 -              "core 0x%04x, irq :", dev->id.coreid);
 -      for (i = 0; i <= 6; i++) {
 -              ssb_dprintk(" %s%s", irq_name[i], i==irq?"*":" ");
 -      }
 -      ssb_dprintk("\n");
 +      ssb_dbg("core 0x%04x, irq : %s%s %s%s %s%s %s%s %s%s %s%s %s%s\n",
 +              dev->id.coreid,
 +              irq_name[0], irq == 0 ? "*" : " ",
 +              irq_name[1], irq == 1 ? "*" : " ",
 +              irq_name[2], irq == 2 ? "*" : " ",
 +              irq_name[3], irq == 3 ? "*" : " ",
 +              irq_name[4], irq == 4 ? "*" : " ",
 +              irq_name[5], irq == 5 ? "*" : " ",
 +              irq_name[6], irq == 6 ? "*" : " ");
  }
  
  static void dump_irq(struct ssb_bus *bus)
@@@ -287,7 -286,7 +287,7 @@@ void ssb_mipscore_init(struct ssb_mipsc
        if (!mcore->dev)
                return; /* We don't have a MIPS core */
  
 -      ssb_dprintk(KERN_INFO PFX "Initializing MIPS core...\n");
 +      ssb_dbg("Initializing MIPS core...\n");
  
        bus = mcore->dev->bus;
        hz = ssb_clockspeed(bus);
                        break;
                }
        }
 -      ssb_dprintk(KERN_INFO PFX "after irq reconfiguration\n");
 +      ssb_dbg("after irq reconfiguration\n");
        dump_irq(bus);
  
        ssb_mips_serial_init(mcore);