From: Michael Bringmann <michael.bringm...@lsi.com>

Add sections to ".dts" files to describe physical addresses of the
AXM55xx I2C bus regions (and interrupts, if any). Propagate changes
through I2C platform parsing=registration to AI2C bus code.

Remove unneeded ACP34xx personality given that that code is now on
a different branch.

Combine a number of include files to simplify code arrangement of
AI2C.

Signed-off-by: Michael Bringmann <michael.bringm...@lsi.com>
---
 drivers/i2c/busses/ai2c/ai2c_bus_acp3400.c | 150 --------------
 drivers/i2c/busses/ai2c/ai2c_dev_pvt.h     | 170 ---------------
 drivers/i2c/busses/ai2c/ai2c_plat_pvt.h    |  74 -------
 drivers/i2c/busses/ai2c/ai2c_sal_linux.h   | 318 -----------------------------
 drivers/i2c/busses/ai2c/ai2c_sal_types.h   |  48 -----
 5 files changed, 760 deletions(-)
 delete mode 100644 drivers/i2c/busses/ai2c/ai2c_bus_acp3400.c
 delete mode 100644 drivers/i2c/busses/ai2c/ai2c_dev_pvt.h
 delete mode 100644 drivers/i2c/busses/ai2c/ai2c_plat_pvt.h
 delete mode 100644 drivers/i2c/busses/ai2c/ai2c_sal_linux.h
 delete mode 100644 drivers/i2c/busses/ai2c/ai2c_sal_types.h

diff --git a/drivers/i2c/busses/ai2c/ai2c_bus_acp3400.c 
b/drivers/i2c/busses/ai2c/ai2c_bus_acp3400.c
deleted file mode 100644
index 0878227..0000000
--- a/drivers/i2c/busses/ai2c/ai2c_bus_acp3400.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *  Copyright (C) 2013 LSI Corporation
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-/* #define EXTRA_DEBUG */
-
-#include "ai2c_plat_pvt.h"
-#include "ai2c_dev_clock_ext.h"
-#include "regs/ai2c_i2c_regs.h"
-#include "regs/ai2c_axi_timer_regs.h"
-
-
-/*****************************************************************************
-* Local Macros & Constants                                                   *
-*****************************************************************************/
-
-#define AI2C_I2C_ADDR(offset)            (0x00000000+(offset))
-
-
-/*****************************************************************************
-* Local Type Definitions                                                     *
-*****************************************************************************/
-
-struct localTimer {
-       u32    chipType;
-       u32    i2cRegionId;
-       u32    timerRegionId;
-       u32       baseOffset;
-       u32       timerLoadOffset;
-       u32       timerLoadValue;
-       u32       timerControlOffset;
-       u32       timerControlValue;
-};
-
-/*****************************************************************************
-* Forward Function Declarations                                              *
-*****************************************************************************/
-
-/*****************************************************************************
-* Local State                                                                *
-*****************************************************************************/
-
-static u32   protoConfig;
-
-/*****************************************************************************
-* Functions: Initialization & Base Configuration                             *
-*****************************************************************************/
-
-/*
- * Title:       ai2c_bus_init_acp3400
- * Description: This function will initialize the timer(s) and other
- *              features used by I2C.  This is a one time initialization
- *              and will called by the generic initialization sequence.
- * Inputs:
- *   @param[in] priv: handle of device to access
- *   @param[in] regionId: Reference to specific bus within device
- * Returns: completion status
- */
-static int ai2c_bus_init_acp3400(
-       struct ai2c_priv        *priv,
-       u32    regionId)
-{
-       return -ENOSYS;
-}
-
-
-/*
- * Title: ai2c_bus_block_read8_acp3400
- * Description:
- *   Read num bytes from the offset and store it in buffer.
- *
- * Inputs:
- *   @param[in] dev      Device handle
- *   @param[in] regionId Bus reference handle
- *   @param[in] *adap    Ptr to I2C adapter
- *   @param[in] *msg     Ptr to next I2C message to process
- *   @param[in] stop     Op flag: append 'stop' to this msg
- *
- * Returns: completion status
- */
-static int ai2c_bus_block_read8_acp3400(
-       struct ai2c_priv        *priv,
-       u32    regionId,
-       struct i2c_adapter *adap,
-       struct i2c_msg     *msg,
-       int                 stop)
-{
-       return -ENOSYS;
-}
-
-
-/*
- * Title:       ai2c_bus_block_write8_acp3400
- * Description: This function will read count bytes from the buffer
- *              and will store at the offset location in the device.
- * Inputs:
- *   @param[in] dev      Device handle
- *   @param[in] regionId Bus reference handle
- *   @param[in] *adap    Ptr to I2C adapter
- *   @param[in] *msg     Ptr to next I2C message to process
- *   @param[in] stop     Op flag: append 'stop' to this msg
- * Returns: completion status
- *   actCount: Actual number of bytes written from the ones that were
- *             provided.
- */
-static int ai2c_bus_block_write8_acp3400(
-       struct ai2c_priv        *priv,
-       u32    regionId,
-       struct i2c_adapter *adap,
-       struct i2c_msg     *msg,
-       int                 stop)
-{
-       return -ENOSYS;
-}
-
-
-/*****************************************************************************
-* More Exported State                                                        *
-*****************************************************************************/
-
-struct ai2c_i2c_access ai2c_acp3400_cfg = {
-       0,
-       /* maxXfrSize */ AI2C_I2CPROT_MAX_XFR_SIZE,
-       /* deviceLen */ 0,
-       /* i.e. unbounded */
-
-       ai2c_bus_init_acp3400,
-       ai2c_bus_block_write8_acp3400,
-       ai2c_bus_block_read8_acp3400,
-
-       (void *) &protoConfig,
-};
diff --git a/drivers/i2c/busses/ai2c/ai2c_dev_pvt.h 
b/drivers/i2c/busses/ai2c/ai2c_dev_pvt.h
deleted file mode 100644
index 3bae264..0000000
--- a/drivers/i2c/busses/ai2c/ai2c_dev_pvt.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- *  Copyright (C) 2013 LSI Corporation
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#ifndef __AI2C_DEV_PVT_H__
-#define __AI2C_DEV_PVT_H__
-
-#include "ai2c_sal.h"
-
-
-/* BEGIN: Important forward type references */
-
-struct ai2c_region_io;
-struct ai2c_priv;
-
-/* END:   Important forward type references */
-
-#include "regs/ai2c_regions.h"
-#include "ai2c_dev.h"
-
-/* --- Linux References --- */
-#ifndef AI2C_MOD_NAME
-#define AI2C_MOD_NAME        "ai2c"
-#endif
-
-
-/* --- Internal Types & Definitions --- */
-
-#define AI2C_DEV_ACCESS_NONE            (0x00)
-#define AI2C_DEV_ACCESS_READ            (0x01)
-#define AI2C_DEV_ACCESS_WRITE           (0x02)
-#define AI2C_DEV_ACCESS_RW              (0x03)
-#define AI2C_DEV_ACCESS_BIG_ENDIAN      (0x04)
-#define AI2C_DEV_ACCESS_LITTLE_ENDIAN   (0x08)
-
-
-#define AI2C_DEV_SIZE_1KB                (1024*1)
-#define AI2C_DEV_SIZE_4KB                (1024*4)
-#define AI2C_DEV_SIZE_128KB              (1024*128)
-#define AI2C_DEV_SIZE_256KB              (1024*256)
-#define AI2C_DEV_SIZE_2MB                (1024*1024*2)
-#define AI2C_DEV_SIZE_16MB               (1024*1024*16)
-#define AI2C_DEV_SIZE_128MB              (1024*1024*128)
-#define AI2C_DEV_SIZE_1GB                (1024*1024*1024)
-#define AI2C_DEV_SIZE_NO_SIZE            (0)
-
-
-/* read/write fn prototypes for region map function pointers */
-
-typedef int (*_ai2c_dev_read_fn_t) (
-                  struct ai2c_priv          *priv,
-                  struct ai2c_region_io     *region,
-                  u64   offset,
-                  u32  *buffer,
-                  u32   count,
-                  u32   flags,
-                  u32   cmdType,
-                  u32   xferWidth);
-
-typedef int (*_ai2c_dev_write_fn_t) (
-                  struct ai2c_priv          *priv,
-                  struct ai2c_region_io     *region,
-                  u64   offset,
-                  u32  *buffer,
-                  u32   count,
-                  u32   flags,
-                  u32   cmdType,
-                  u32   xferWidth);
-
-/*
- * Structure definition(s) for the region map.
- * See above for typedef ai2c_region_io_t.
- */
-struct ai2c_region_io {
-       u32 regionId;
-       struct ai2c_access_map     *accessMap;
-       _ai2c_dev_read_fn_t    readFn;
-       _ai2c_dev_write_fn_t   writeFn;
-       u32          pageId;
-};
-
-/*
- * Sometimes it would be better to define a range of similar regions
- * with a single entry in the region map, especially, for regions
- * that are logical or virtual entities that involve interpretation,
- * calculated addresses based upon the regionId, or some other
- * transformation.  The alternate region map such definitions.
- */
-struct ai2c_region_iorng {
-       u32 startRegionId;
-       u32 endRegionId;
-       struct ai2c_access_map     *accessMap;
-       _ai2c_dev_read_fn_t    readFn;
-       _ai2c_dev_write_fn_t   writeFn;
-       u32 pageId;
-};
-
-
-/*
- * Basic i/o methods
- */
-
-#ifdef DEBUG_EDEV_IO
-#define AI2C_WRITE_LOG(ctx, dev, pageId, offset, value) \
-       AI2C_MSG(AI2C_MSG_DEBUG_IO, \
-           "%s: pageId=0x%x offset=0x%x addr=0x%x value=0x%02x\n", \
-           ctx, pageId, offset, AI2C_DEV_BUS_ADDR(dev, pageId, offset), value)
-#else
-#define AI2C_WRITE_LOG(ctx, dev, pageId, offset, value)
-#endif
-
-#define AI2C_DEV_BUS_READ8(dev, pageId, offset) \
-       AI2C_BUS_READ8(AI2C_DEV_BUS_ADDR(dev, pageId, offset),\
-               AI2C_DEV_PAGE_ENDIANNESS(pageId))
-
-#define AI2C_DEV_BUS_READ16(dev, pageId, offset) \
-       AI2C_BUS_READ16(AI2C_DEV_BUS_ADDR(dev, pageId, offset),\
-               AI2C_DEV_PAGE_ENDIANNESS(pageId))
-
-#define AI2C_DEV_BUS_READ32(dev, pageId, offset) \
-       AI2C_BUS_READ32(AI2C_DEV_BUS_ADDR(dev, pageId, offset),\
-               AI2C_DEV_PAGE_ENDIANNESS(pageId))
-
-#define AI2C_DEV_BUS_WRITE8(dev, pageId, offset, value) \
-       do { \
-               AI2C_WRITE_LOG("edev_bus_write8", dev, pageId, offset, value); \
-               AI2C_BUS_WRITE8( \
-               AI2C_DEV_BUS_ADDR(dev, pageId, offset), value); \
-               if (AI2C_DEV_PAGE_FLAGS(pageId) == AI2C_IO_SYNC) { \
-                       volatile u32 ___val___; \
-                       ___val___ = AI2C_BUS_READ32(AI2C_DEV_BUS_ADDR(dev, \
-                       AI2C_DEV_PAGE_PCIE0_PEI, AI2C_PEI_CONFIG), \
-                       AI2C_DEV_ACCESS_LITTLE_ENDIAN); \
-               } \
-       } while (0);
-
-#define AI2C_DEV_BUS_WRITE16(dev, pageId, offset, value) \
-       do { \
-               AI2C_WRITE_LOG("edev_bus_write16", \
-                       dev, pageId, offset, value); \
-               AI2C_BUS_WRITE16( \
-                       AI2C_DEV_BUS_ADDR(dev, pageId, offset), value); \
-               if (AI2C_DEV_PAGE_FLAGS(pageId) == AI2C_IO_SYNC) { \
-                       volatile u32 ___val___; \
-                       ___val___ = AI2C_BUS_READ32(AI2C_DEV_BUS_ADDR(dev, \
-                       AI2C_DEV_PAGE_PCIE0_PEI, AI2C_PEI_CONFIG), \
-                       AI2C_DEV_ACCESS_LITTLE_ENDIAN); \
-               } \
-       } while (0);
-
-
-#endif /* __AI2C_DEV_PVT_H__ */
diff --git a/drivers/i2c/busses/ai2c/ai2c_plat_pvt.h 
b/drivers/i2c/busses/ai2c/ai2c_plat_pvt.h
deleted file mode 100644
index 338bb93..0000000
--- a/drivers/i2c/busses/ai2c/ai2c_plat_pvt.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *  Copyright (C) 2013 LSI Corporation
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-/*! @file       ai2c_plat_pvt.h
- *  @brief      Constants, structs, and APIs used to communicate with the
- *              direct ACP I2C Hardware Layer registers
- */
-
-#ifndef AI2C_PLAT_PVT_H
-#define AI2C_PLAT_PVT_H
-
-#include "ai2c_plat.h"
-#include "ai2c_bus.h"
-
-/*****************************************************************************
-* Externally Visible Function Prototypes                                    *
-*****************************************************************************/
-
-/*! @fn u32 ai2c_page_to_region(struct ai2c_priv *priv,
- *                                           u32 pageId);
- *  @brief Map a memory page handle to a regionId handle.
-    @param[in] inPriv Created device state structure
-    @param[in] inPageId Original page id to be mapped
-    @Returns mapped value
- */
-extern u32 ai2c_page_to_region(struct ai2c_priv *priv, u32 pageId);
-
-/*! @fn u32 *ai2c_region_lookup(struct ai2c_priv *priv,
- *                                           u32 regionId);
- *  @brief Map a memory region handle to a region description structure.
-    @param[in] inPriv Created device state structure
-    @param[in] inRegionId Original region id to be mapped
-    @Returns mapped value
- */
-extern struct ai2c_region_io *ai2c_region_lookup(
-       struct ai2c_priv *priv,
-       u32 regionId);
-
-/*! @fn int ai2c_memSetup(struct ai2c_priv **outPriv);
-    @brief This is a one time initialization for the I2C protocol
-          layers to be called by the device initialization step.
-    @param[out] outPriv Created device state structure
-    @Returns success/failure status of the operation
-*/
-extern int ai2c_memSetup(struct ai2c_priv **outPriv);
-
-/*! @fn int ai2c_memDestroy(struct ai2c_priv  *inPriv);
-    @brief This function will release resources acquired for the specified
-          I2C device driver.
-    @param[in] inPriv Created device state structure
-    @Returns success/failure status of the operation
-*/
-extern int ai2c_memDestroy(struct ai2c_priv *inPriv);
-
-#endif   /* defined(AI2C_PLAT_PVT_H) */
diff --git a/drivers/i2c/busses/ai2c/ai2c_sal_linux.h 
b/drivers/i2c/busses/ai2c/ai2c_sal_linux.h
deleted file mode 100644
index 4e96249..0000000
--- a/drivers/i2c/busses/ai2c/ai2c_sal_linux.h
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- *  Copyright (C) 2013 LSI Corporation
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-/*! @file      ai2c_sal_linux.h
-    @brief     OS Specific definitions are located here.
-*/
-
-
-#ifndef __AI2C_SAL_LINUX_H__
-#define __AI2C_SAL_LINUX_H__
-
-#include <linux/module.h>
-#include <generated/autoconf.h>
-#include <linux/init.h>
-#include <linux/poll.h>
-#include <linux/kthread.h>
-
-#include <linux/io.h>
-#include <linux/errno.h>
-#include <linux/ioport.h>
-#include <linux/kernel.h>
-#include <linux/i2c.h>
-#include <linux/i2c-dev.h>
-#include <linux/of_platform.h>
-
-#include <linux/sched.h>
-#include <linux/moduleparam.h>
-#include <linux/cdev.h>
-#include <linux/version.h>
-#include <linux/wait.h>
-#include <asm/pgtable.h>
-
-#include <linux/slab.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/spinlock.h>
-
-#include <linux/irqdomain.h>
-
-#include <linux/signal.h>
-#include <linux/time.h>
-#include <linux/fcntl.h>
-#include <linux/unistd.h>
-#include <linux/errno.h>
-#include <linux/mman.h>
-
-#include <asm/byteorder.h>
-
-#ifdef __BIG_ENDIAN
-#undef  AI2C_BIG_ENDIAN
-#define AI2C_BIG_ENDIAN          9999
-#undef  AI2C_LITTLE_ENDIAN
-#endif
-
-#ifdef __LITTLE_ENDIAN
-#undef  AI2C_BIG_ENDIAN
-#undef  AI2C_LITTLE_ENDIAN
-#define AI2C_LITTLE_ENDIAN      9998
-#endif
-
-
-/*
-* AI2C_MSG
-*
-*   Print a message to the system console.
-*/
-#define AI2C_MSG(type, fmt, args...)                                    \
-       do {                                                             \
-               if ((type) & AI2C_MSG_TRACE_LEVEL) {                     \
-                       if ((type) == AI2C_MSG_ERROR)                    \
-                               printk(KERN_ERR AI2C_MOD_NAME ": ERROR: "); \
-                       else                                             \
-                               printk(KERN_WARNING AI2C_MOD_NAME ": "); \
-                       printk(fmt, ## args);                            \
-               }                                                        \
-       } while (0)
-
-    /*
-     * AI2C_LOG
-     *
-     *   Print a message to the system log device and/or console. This
-     *   interface is callable from interrupt level.
-     */
-#define AI2C_LOG \
-       AI2C_MSG
-
-#ifndef AI2C_MSG_TRACE_LEVEL
-#define AI2C_MSG_TRACE_LEVEL     ai2c_trace_level
-#endif
-
-extern int AI2C_MSG_TRACE_LEVEL;
-
-
-/*
-* Endian-ness Conversion
-*/
-
-#define AI2C_SWAP16m(n) \
-       ((((u16)(n) >>  8) & 0x00ff) |  \
-       (((u16)(n) <<  8) & 0xff00))
-
-#define AI2C_SWAP32m(n) \
-       ((((u32)(n) >> 24) & 0x000000ff) |  \
-       (((u32)(n) >>  8) & 0x0000ff00) |  \
-       (((u32)(n) <<  8) & 0x00ff0000) |  \
-       (((u32)(n) << 24) & 0xff000000))
-
-#define SWAP16(x)      \
-       { { \
-               u16 val = x; \
-               AI2C_SWAP16m(val); \
-       } }
-
-#define SWAP32(x)      \
-       { { \
-               u32 val = x; \
-               AI2C_SWAP32m(val); \
-       } }
-
-
-/*
-* Endian-ness I/O
-*/
-
-#ifdef CONFIG_ARM
-
-#define in_be8(x)              (*x)
-#define in_be16(x)             AI2C_SWAP16m(*x)
-#define in_be32(x)             AI2C_SWAP32m(*x)
-
-#define in_le8(x)              (*x)
-#define in_le16(x)             (*x)
-#define in_le32(x)             (*x)
-
-#define out_be8(a, v)          (*a) = (v)
-#define out_be16(a, v)         (*a) = AI2C_SWAP16m(v)
-#define out_be32(a, v)         (*a) = AI2C_SWAP32m(v)
-
-#define out_le8(a, v)          (*a) = (v)
-#define out_le16(a, v)         (*a) = (v)
-#define out_le32(a, v)         (*a) = (v)
-
-#endif  /* CONFIG_ARM */
-
-
-#define AI2C_EDEV_BUS_ENFORCE_ORDERING()
-
-#define AI2C_BUS_READ8(addr) \
-       readb((volatile u8 __iomem *) (addr))
-
-#define AI2C_BUS_READ16_ENDIAN(endian, addr) \
-       in_##endian##16((volatile u16 __iomem *) (addr))
-
-
-#define AI2C_BUS_READ16_LE(addr) AI2C_BUS_READ16_ENDIAN(le, addr)
-
-#define AI2C_BUS_READ16_BE(addr) AI2C_BUS_READ16_ENDIAN(be, addr)
-
-#define AI2C_BUS_READ16(addr, endian) \
-       (endian == AI2C_DEV_ACCESS_BIG_ENDIAN) ?   \
-               AI2C_BUS_READ16_BE(addr) : AI2C_BUS_READ16_LE(addr)
-
-#define AI2C_BUS_READ32_ENDIAN(endian, addr) \
-       in_##endian##32((volatile u32 __iomem *) (addr))
-
-
-#define AI2C_BUS_READ32_LE(addr) AI2C_BUS_READ32_ENDIAN(le, addr)
-
-#define AI2C_BUS_READ32_BE(addr) AI2C_BUS_READ32_ENDIAN(be, addr)
-
-#define AI2C_BUS_READ32(addr, endian) \
-       (endian == AI2C_DEV_ACCESS_BIG_ENDIAN) ?   \
-       AI2C_BUS_READ32_BE(addr) : AI2C_BUS_READ32_LE(addr)
-
-
-#define AI2C_BUS_WRITE8(addr, data) \
-       writeb((data), (volatile u8 __iomem *) (addr))
-
-#define AI2C_BUS_WRITE16_ENDIAN(endian, addr, data) \
-       do { \
-               u16 *__a__ = (u16 *) addr; \
-               u16 __d__ = data; \
-               out_##endian##16((volatile u16 __iomem *) __a__, __d__); \
-               AI2C_EDEV_BUS_ENFORCE_ORDERING(); \
-       } while (0);
-
-#define AI2C_BUS_WRITE16_LE(addr, data) \
-       AI2C_BUS_WRITE16_ENDIAN(le, addr, data)
-
-#define AI2C_BUS_WRITE16_BE(addr, data) \
-       AI2C_BUS_WRITE16_ENDIAN(be, addr, data)
-
-#define AI2C_BUS_WRITE16(addr, data, endian) \
-               if (endian == AI2C_DEV_ACCESS_BIG_ENDIAN) {  \
-                       AI2C_BUS_WRITE16_BE(addr, data);    \
-               } else { \
-                       AI2C_BUS_WRITE16_LE(addr, data);    \
-       }
-
-#define AI2C_BUS_WRITE32_ENDIAN(endian, addr, data) \
-       do { \
-               u32 *__a__ = (u32 *) addr; \
-               u32 __d__ = data; \
-               out_##endian##32((volatile u32 __iomem *) \
-                       __a__, __d__); \
-               AI2C_EDEV_BUS_ENFORCE_ORDERING(); \
-       } while (0);
-
-#define AI2C_BUS_WRITE32_LE(addr, data) \
-       AI2C_BUS_WRITE32_ENDIAN(le, addr, data)
-
-#define AI2C_BUS_WRITE32_BE(addr, data) \
-       AI2C_BUS_WRITE32_ENDIAN(be, addr, data)
-
-#define AI2C_BUS_WRITE32(addr, data, endian) \
-               if (endian == AI2C_DEV_ACCESS_BIG_ENDIAN) {  \
-                       AI2C_BUS_WRITE32_BE(addr, data);    \
-               } else {                                            \
-                       AI2C_BUS_WRITE32_LE(addr, data);    \
-       }
-
-    /*
-    * Spinlock mutex stuff
-    */
-
-#define AI2C_SPINLOCK_INIT(pSpinlock) \
-       spin_lock_init(pSpinlock)
-
-#define AI2C_SPINLOCK_LOCK(pSpinlock) \
-       spin_lock(pSpinlock)
-
-#define AI2C_SPINLOCK_TRYLOCK(pSpinlock) \
-       spin_trylock(pSpinlock)
-
-#define AI2C_SPINLOCK_UNLOCK(pSpinlock) \
-       spin_unlock(pSpinlock)
-
-#define AI2C_SPINLOCK_INTERRUPT_DISABLE(pSem, flags) \
-       spin_lock_irqsave(pSem, flags)
-
-#define AI2C_SPINLOCK_INTERRUPT_ENABLE(pSem, flags) \
-       spin_unlock_irqrestore(pSem, flags)
-
-#define AI2C_SPINLOCK_SW_INTERRUPT_DISABLE(pSem, flags) \
-       spin_lock_bh(pSem)
-
-#define AI2C_SPINLOCK_SW_INTERRUPT_ENABLE(pSem, flags) \
-       spin_unlock_bh(pSem)
-
-
-    /*
-    * Kernel memory allocation
-    */
-
-#define __ai2c_malloc(size)            kmalloc(size, GFP_KERNEL)
-#define __ai2c_free(ptr)                  kfree(ptr)
-#define __ai2c_realloc(ptr, size)       (NULL)
-#define __ai2c_calloc(no, size)           kcalloc(no, size, GFP_KERNEL)
-
-
-    /*
-    * Miscellaneous externs not provided by other headers reliably
-    */
-
-extern int snprintf(char *s, size_t n, const char *format, ...);
-
-struct ai2c_rev_id {
-
-#ifdef NCP_BIG_ENDIAN
-       unsigned isAsic:1;
-       unsigned isFpga:1;
-       unsigned isSim:1;
-       unsigned:2;
-       unsigned secDisable:1;
-       unsigned sppDisable:1;
-       unsigned cpuDisable:4;
-       unsigned ecidChipType:5;
-       unsigned:1;
-       unsigned packageType:4;
-       unsigned chipVersion:6;
-       unsigned chipTyp:5;
-#else
-       unsigned chipType:5;
-       unsigned chipVersion:6;
-       unsigned packageType:4;
-       unsigned:1;
-       unsigned ecidChipType:5;
-       unsigned cpuDisable:4;
-       unsigned sppDisable:1;
-       unsigned secDisable:1;
-       unsigned:2;
-       unsigned isSim:1;
-       unsigned isFpga:1;
-       unsigned isAsic:1;
-#endif
-};
-
-
-#endif /* __AI2C_SAL_LINUX_H__ */
diff --git a/drivers/i2c/busses/ai2c/ai2c_sal_types.h 
b/drivers/i2c/busses/ai2c/ai2c_sal_types.h
deleted file mode 100644
index a6d2263..0000000
--- a/drivers/i2c/busses/ai2c/ai2c_sal_types.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  Copyright (C) 2013 LSI Corporation
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-/*! @file      ai2c_sal_types.h
-    @brief     OS Specific types are located here.
-*/
-
-#ifndef AI2C_SAL_TYPES_H
-#define AI2C_SAL_TYPES_H
-
-#include <linux/types.h>
-
-/**************************************************************************
-* Constants, #Defines, etc.
-**************************************************************************/
-
-#ifndef NULL
-#define NULL    0
-#endif
-
-#ifndef TRUE
-#define TRUE    1
-#endif
-
-#ifndef FALSE
-#define FALSE   0
-#endif
-
-#endif /* AI2C_SAL_TYPES_H */
-- 
1.8.3

_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to