ARM: davinci: move platform_data definitions
authorArnd Bergmann <arnd@arndb.de>
Fri, 24 Aug 2012 13:11:34 +0000 (15:11 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 14 Sep 2012 09:16:54 +0000 (11:16 +0200)
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the davinci include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: "Ben Dooks" <ben-linux@fluff.org>
Cc: "Wolfram Sang" <w.sang@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Liam Girdwood <lrg@ti.com>
Cc: davinci-linux-open-source@linux.davincidsp.com
40 files changed:
arch/arm/mach-davinci/aemif.c
arch/arm/mach-davinci/board-da830-evm.c
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/board-dm355-evm.c
arch/arm/mach-davinci/board-dm355-leopard.c
arch/arm/mach-davinci/board-dm365-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-dm646x-evm.c
arch/arm/mach-davinci/board-mityomapl138.c
arch/arm/mach-davinci/board-neuros-osd2.c
arch/arm/mach-davinci/board-sffsdr.c
arch/arm/mach-davinci/davinci.h
arch/arm/mach-davinci/devices.c
arch/arm/mach-davinci/dm355.c
arch/arm/mach-davinci/dm365.c
arch/arm/mach-davinci/include/mach/aemif.h [deleted file]
arch/arm/mach-davinci/include/mach/da8xx.h
arch/arm/mach-davinci/include/mach/i2c.h [deleted file]
arch/arm/mach-davinci/include/mach/keyscan.h [deleted file]
arch/arm/mach-davinci/include/mach/mmc.h [deleted file]
arch/arm/mach-davinci/include/mach/nand.h [deleted file]
arch/arm/mach-davinci/include/mach/spi.h [deleted file]
arch/arm/mach-davinci/include/mach/tnetv107x.h
arch/arm/mach-davinci/include/mach/usb.h [deleted file]
arch/arm/mach-davinci/usb.c
drivers/i2c/busses/i2c-davinci.c
drivers/input/keyboard/davinci_keyscan.c
drivers/media/video/davinci/vpbe_venc.c
drivers/mmc/host/davinci_mmc.c
drivers/mtd/nand/davinci_nand.c
drivers/spi/spi-davinci.c
drivers/usb/host/ohci-da8xx.c
drivers/usb/musb/da8xx.c
include/linux/platform_data/i2c-davinci.h [new file with mode: 0644]
include/linux/platform_data/keyscan-davinci.h [new file with mode: 0644]
include/linux/platform_data/mmc-davinci.h [new file with mode: 0644]
include/linux/platform_data/mtd-davinci-aemif.h [new file with mode: 0644]
include/linux/platform_data/mtd-davinci.h [new file with mode: 0644]
include/linux/platform_data/spi-davinci.h [new file with mode: 0644]
include/linux/platform_data/usb-davinci.h [new file with mode: 0644]

index 1ce70a91f2e95bc5f6f44dc5d97a85a70f5bf028..f091a9010c2fb3b36ece218f87a228057edac487 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/module.h>
 #include <linux/time.h>
 
-#include <mach/aemif.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
 
 /* Timing value configuration */
 
index 0031864e7f116908b23b94a0a7a1df8d13e33b69..95b5e102ceb1c34aaceb2031c59eea3e1e52e985 100644 (file)
 
 #include <mach/cp_intc.h>
 #include <mach/mux.h>
-#include <mach/nand.h>
+#include <linux/platform_data/mtd-davinci.h>
 #include <mach/da8xx.h>
-#include <mach/usb.h>
-#include <mach/aemif.h>
-#include <mach/spi.h>
+#include <linux/platform_data/usb-davinci.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
+#include <linux/platform_data/spi-davinci.h>
 
 #define DA830_EVM_PHY_ID               ""
 /*
index 0149fb453be3cd0f83b48cc4290d02d35038925c..1295e616ceee7e32a5b31d62b3cf52a4286578b3 100644 (file)
 
 #include <mach/cp_intc.h>
 #include <mach/da8xx.h>
-#include <mach/nand.h>
+#include <linux/platform_data/mtd-davinci.h>
 #include <mach/mux.h>
-#include <mach/aemif.h>
-#include <mach/spi.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
+#include <linux/platform_data/spi-davinci.h>
 
 #define DA850_EVM_PHY_ID               "davinci_mdio-0:00"
 #define DA850_LCD_PWR_PIN              GPIO_TO_PIN(2, 8)
index 1c7b1f46a8f3c3c42284c6e954526fe8b555fa2b..88ebea89abdf9cbbd9233527057397d297436b7b 100644 (file)
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <mach/i2c.h>
+#include <linux/platform_data/i2c-davinci.h>
 #include <mach/serial.h>
-#include <mach/nand.h>
-#include <mach/mmc.h>
-#include <mach/usb.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include "davinci.h"
 
index 8e7703213b0822102c8475afe9405865ec6ba8f6..2f88103c64595c1f68a3ad9f7ca026e0b8644741 100644 (file)
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <mach/i2c.h>
+#include <linux/platform_data/i2c-davinci.h>
 #include <mach/serial.h>
-#include <mach/nand.h>
-#include <mach/mmc.h>
-#include <mach/usb.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include "davinci.h"
 
index 688a9c556dc9081e518627095ad94f62724a98ad..1b4a8adcfdc9f1f86f87079c8ab8b009e0bc105a 100644 (file)
 
 #include <mach/mux.h>
 #include <mach/common.h>
-#include <mach/i2c.h>
+#include <linux/platform_data/i2c-davinci.h>
 #include <mach/serial.h>
-#include <mach/mmc.h>
-#include <mach/nand.h>
-#include <mach/keyscan.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/keyscan-davinci.h>
 
 #include <media/tvp514x.h>
 
index d34ed55912b2efd1217a0cb8d5a84bc5b271e232..ca72fc4b8ccaac489b3e5e4e800e84e73730149e 100644 (file)
 #include <asm/mach/arch.h>
 
 #include <mach/common.h>
-#include <mach/i2c.h>
+#include <linux/platform_data/i2c-davinci.h>
 #include <mach/serial.h>
 #include <mach/mux.h>
-#include <mach/nand.h>
-#include <mach/mmc.h>
-#include <mach/usb.h>
-#include <mach/aemif.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
 
 #include "davinci.h"
 
index 958679a20e13d3ec018e5b974ae35e1e17d400c0..9944367b4931b9a630a5bd91db7d6e784aebf75f 100644 (file)
 
 #include <mach/common.h>
 #include <mach/serial.h>
-#include <mach/i2c.h>
-#include <mach/nand.h>
+#include <linux/platform_data/i2c-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
 #include <mach/clock.h>
 #include <mach/cdce949.h>
-#include <mach/aemif.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
 
 #include "davinci.h"
 #include "clock.h"
index beecde3a1d2f9a830362cb89aa9d6e7a249b9ae6..43e4a0d663fa8f15b002a50c0f7ac6a903b337b3 100644 (file)
@@ -26,9 +26,9 @@
 #include <mach/common.h>
 #include <mach/cp_intc.h>
 #include <mach/da8xx.h>
-#include <mach/nand.h>
+#include <linux/platform_data/mtd-davinci.h>
 #include <mach/mux.h>
-#include <mach/spi.h>
+#include <linux/platform_data/spi-davinci.h>
 
 #define MITYOMAPL138_PHY_ID            ""
 
index f6b9fc70161b43338772a9f092b589aecfb021df..144bf31d68ddd16a6fec1e3260f462d8ef1140f9 100644 (file)
 #include <asm/mach/arch.h>
 
 #include <mach/common.h>
-#include <mach/i2c.h>
+#include <linux/platform_data/i2c-davinci.h>
 #include <mach/serial.h>
 #include <mach/mux.h>
-#include <mach/nand.h>
-#include <mach/mmc.h>
-#include <mach/usb.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include "davinci.h"
 
index 9078acf94bacfe211c8ec3ff24a427eae6f11895..6957787fa7f397a5670872c6b6562af60838aa32 100644 (file)
 #include <asm/mach/flash.h>
 
 #include <mach/common.h>
-#include <mach/i2c.h>
+#include <linux/platform_data/i2c-davinci.h>
 #include <mach/serial.h>
 #include <mach/mux.h>
-#include <mach/usb.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include "davinci.h"
 
index 8db0fc6809ddd11c6874dbdf709044fad84ee06f..a37fc44e29bc05b2c52d796bf4ace69cb6800601 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/spi/spi.h>
 
 #include <mach/asp.h>
-#include <mach/keyscan.h>
+#include <linux/platform_data/keyscan-davinci.h>
 #include <mach/hardware.h>
 
 #include <media/davinci/vpfe_capture.h>
index d2f9666284a70868dcfe42346657c56fa82f9f9f..3a42b6f79aa9b7275c6dfcc27341968a4b70b1e4 100644 (file)
 #include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <mach/i2c.h>
+#include <linux/platform_data/i2c-davinci.h>
 #include <mach/irqs.h>
 #include <mach/cputype.h>
 #include <mach/mux.h>
 #include <mach/edma.h>
-#include <mach/mmc.h>
+#include <linux/platform_data/mmc-davinci.h>
 #include <mach/time.h>
 
 #include "davinci.h"
index 678cd99b7336151b474580ccbb7eb1fe2ccfead5..adbde33eca015a640217ed1335671645cd874449 100644 (file)
@@ -27,7 +27,7 @@
 #include <mach/serial.h>
 #include <mach/common.h>
 #include <mach/asp.h>
-#include <mach/spi.h>
+#include <linux/platform_data/spi-davinci.h>
 #include <mach/gpio-davinci.h>
 
 #include "davinci.h"
index a50d49de1883394e5cc29ba317becb0ee5e6ceb7..719e22f2a37e42bd4bc11bcf28bc86f629a79adf 100644 (file)
@@ -30,8 +30,8 @@
 #include <mach/serial.h>
 #include <mach/common.h>
 #include <mach/asp.h>
-#include <mach/keyscan.h>
-#include <mach/spi.h>
+#include <linux/platform_data/keyscan-davinci.h>
+#include <linux/platform_data/spi-davinci.h>
 #include <mach/gpio-davinci.h>
 
 #include "davinci.h"
diff --git a/arch/arm/mach-davinci/include/mach/aemif.h b/arch/arm/mach-davinci/include/mach/aemif.h
deleted file mode 100644 (file)
index 05b2934..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * TI DaVinci AEMIF support
- *
- * Copyright 2010 (C) Texas Instruments, Inc. http://www.ti.com/
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
- */
-#ifndef _MACH_DAVINCI_AEMIF_H
-#define _MACH_DAVINCI_AEMIF_H
-
-#define NRCSR_OFFSET           0x00
-#define AWCCR_OFFSET           0x04
-#define A1CR_OFFSET            0x10
-
-#define ACR_ASIZE_MASK         0x3
-#define ACR_EW_MASK            BIT(30)
-#define ACR_SS_MASK            BIT(31)
-
-/* All timings in nanoseconds */
-struct davinci_aemif_timing {
-       u8      wsetup;
-       u8      wstrobe;
-       u8      whold;
-
-       u8      rsetup;
-       u8      rstrobe;
-       u8      rhold;
-
-       u8      ta;
-};
-
-int davinci_aemif_setup_timing(struct davinci_aemif_timing *t,
-                                       void __iomem *base, unsigned cs);
-#endif
index a2f1f274f1897f40bf4ae85f5f1bfc91063cf8e3..33e78ae2a254d3106f97a42dcf68aa2cebc076c2 100644 (file)
 
 #include <mach/serial.h>
 #include <mach/edma.h>
-#include <mach/i2c.h>
 #include <mach/asp.h>
-#include <mach/mmc.h>
-#include <mach/usb.h>
 #include <mach/pm.h>
-#include <mach/spi.h>
+#include <linux/platform_data/i2c-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
+#include <linux/platform_data/spi-davinci.h>
 
 extern void __iomem *da8xx_syscfg0_base;
 extern void __iomem *da8xx_syscfg1_base;
diff --git a/arch/arm/mach-davinci/include/mach/i2c.h b/arch/arm/mach-davinci/include/mach/i2c.h
deleted file mode 100644 (file)
index 2312d19..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * DaVinci I2C controller platform_device info
- *
- * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
- *
- * 2007 (c) MontaVista Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
-*/
-
-#ifndef __ASM_ARCH_I2C_H
-#define __ASM_ARCH_I2C_H
-
-/* All frequencies are expressed in kHz */
-struct davinci_i2c_platform_data {
-       unsigned int    bus_freq;       /* standard bus frequency (kHz) */
-       unsigned int    bus_delay;      /* post-transaction delay (usec) */
-       unsigned int    sda_pin;        /* GPIO pin ID to use for SDA */
-       unsigned int    scl_pin;        /* GPIO pin ID to use for SCL */
-};
-
-/* for board setup code */
-void davinci_init_i2c(struct davinci_i2c_platform_data *);
-
-#endif /* __ASM_ARCH_I2C_H */
diff --git a/arch/arm/mach-davinci/include/mach/keyscan.h b/arch/arm/mach-davinci/include/mach/keyscan.h
deleted file mode 100644 (file)
index 7a560e0..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2009 Texas Instruments, Inc
- *
- * Author: Miguel Aguilar <miguel.aguilar@ridgerun.com>
- *
- * 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 DAVINCI_KEYSCAN_H
-#define DAVINCI_KEYSCAN_H
-
-#include <linux/io.h>
-
-enum davinci_matrix_types {
-       DAVINCI_KEYSCAN_MATRIX_4X4,
-       DAVINCI_KEYSCAN_MATRIX_5X3,
-};
-
-struct davinci_ks_platform_data {
-       int             (*device_enable)(struct device *dev);
-       unsigned short  *keymap;
-       u32             keymapsize;
-       u8              rep:1;
-       u8              strobe;
-       u8              interval;
-       u8              matrix_type;
-};
-
-#endif
-
diff --git a/arch/arm/mach-davinci/include/mach/mmc.h b/arch/arm/mach-davinci/include/mach/mmc.h
deleted file mode 100644 (file)
index 5ba6b22..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  Board-specific MMC configuration
- */
-
-#ifndef _DAVINCI_MMC_H
-#define _DAVINCI_MMC_H
-
-#include <linux/types.h>
-#include <linux/mmc/host.h>
-
-struct davinci_mmc_config {
-       /* get_cd()/get_wp() may sleep */
-       int     (*get_cd)(int module);
-       int     (*get_ro)(int module);
-
-       void    (*set_power)(int module, bool on);
-
-       /* wires == 0 is equivalent to wires == 4 (4-bit parallel) */
-       u8      wires;
-
-       u32     max_freq;
-
-       /* any additional host capabilities: OR'd in to mmc->f_caps */
-       u32     caps;
-
-       /* Version of the MMC/SD controller */
-       u8      version;
-
-       /* Number of sg segments */
-       u8      nr_sg;
-};
-void davinci_setup_mmc(int module, struct davinci_mmc_config *config);
-
-enum {
-       MMC_CTLR_VERSION_1 = 0, /* DM644x and DM355 */
-       MMC_CTLR_VERSION_2,     /* DA830 */
-};
-
-#endif
diff --git a/arch/arm/mach-davinci/include/mach/nand.h b/arch/arm/mach-davinci/include/mach/nand.h
deleted file mode 100644 (file)
index 1cf555a..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * mach-davinci/nand.h
- *
- * Copyright © 2006 Texas Instruments.
- *
- * Ported to 2.6.23 Copyright © 2008 by
- *   Sander Huijsen <Shuijsen@optelecom-nkf.com>
- *   Troy Kisky <troy.kisky@boundarydevices.com>
- *   Dirk Behme <Dirk.Behme@gmail.com>
- *
- * --------------------------------------------------------------------------
- *
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ARCH_ARM_DAVINCI_NAND_H
-#define __ARCH_ARM_DAVINCI_NAND_H
-
-#include <linux/mtd/nand.h>
-
-#define NANDFCR_OFFSET         0x60
-#define NANDFSR_OFFSET         0x64
-#define NANDF1ECC_OFFSET       0x70
-
-/* 4-bit ECC syndrome registers */
-#define NAND_4BIT_ECC_LOAD_OFFSET      0xbc
-#define NAND_4BIT_ECC1_OFFSET          0xc0
-#define NAND_4BIT_ECC2_OFFSET          0xc4
-#define NAND_4BIT_ECC3_OFFSET          0xc8
-#define NAND_4BIT_ECC4_OFFSET          0xcc
-#define NAND_ERR_ADD1_OFFSET           0xd0
-#define NAND_ERR_ADD2_OFFSET           0xd4
-#define NAND_ERR_ERRVAL1_OFFSET                0xd8
-#define NAND_ERR_ERRVAL2_OFFSET                0xdc
-
-/* NOTE:  boards don't need to use these address bits
- * for ALE/CLE unless they support booting from NAND.
- * They're used unless platform data overrides them.
- */
-#define        MASK_ALE                0x08
-#define        MASK_CLE                0x10
-
-struct davinci_nand_pdata {            /* platform_data */
-       uint32_t                mask_ale;
-       uint32_t                mask_cle;
-
-       /* for packages using two chipselects */
-       uint32_t                mask_chipsel;
-
-       /* board's default static partition info */
-       struct mtd_partition    *parts;
-       unsigned                nr_parts;
-
-       /* none  == NAND_ECC_NONE (strongly *not* advised!!)
-        * soft  == NAND_ECC_SOFT
-        * else  == NAND_ECC_HW, according to ecc_bits
-        *
-        * All DaVinci-family chips support 1-bit hardware ECC.
-        * Newer ones also support 4-bit ECC, but are awkward
-        * using it with large page chips.
-        */
-       nand_ecc_modes_t        ecc_mode;
-       u8                      ecc_bits;
-
-       /* e.g. NAND_BUSWIDTH_16 */
-       unsigned                options;
-       /* e.g. NAND_BBT_USE_FLASH */
-       unsigned                bbt_options;
-
-       /* Main and mirror bbt descriptor overrides */
-       struct nand_bbt_descr   *bbt_td;
-       struct nand_bbt_descr   *bbt_md;
-
-       /* Access timings */
-       struct davinci_aemif_timing     *timing;
-};
-
-#endif /* __ARCH_ARM_DAVINCI_NAND_H */
diff --git a/arch/arm/mach-davinci/include/mach/spi.h b/arch/arm/mach-davinci/include/mach/spi.h
deleted file mode 100644 (file)
index 7af305b..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2009 Texas Instruments.
- *
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ARCH_ARM_DAVINCI_SPI_H
-#define __ARCH_ARM_DAVINCI_SPI_H
-
-#include <mach/edma.h>
-
-#define SPI_INTERN_CS  0xFF
-
-enum {
-       SPI_VERSION_1, /* For DM355/DM365/DM6467 */
-       SPI_VERSION_2, /* For DA8xx */
-};
-
-/**
- * davinci_spi_platform_data - Platform data for SPI master device on DaVinci
- *
- * @version:   version of the SPI IP. Different DaVinci devices have slightly
- *             varying versions of the same IP.
- * @num_chipselect: number of chipselects supported by this SPI master
- * @intr_line: interrupt line used to connect the SPI IP to the ARM interrupt
- *             controller withn the SoC. Possible values are 0 and 1.
- * @chip_sel:  list of GPIOs which can act as chip-selects for the SPI.
- *             SPI_INTERN_CS denotes internal SPI chip-select. Not necessary
- *             to populate if all chip-selects are internal.
- * @cshold_bug:        set this to true if the SPI controller on your chip requires
- *             a write to CSHOLD bit in between transfers (like in DM355).
- * @dma_event_q: DMA event queue to use if SPI_IO_TYPE_DMA is used for any
- *             device on the bus.
- */
-struct davinci_spi_platform_data {
-       u8                      version;
-       u8                      num_chipselect;
-       u8                      intr_line;
-       u8                      *chip_sel;
-       bool                    cshold_bug;
-       enum dma_event_q        dma_event_q;
-};
-
-/**
- * davinci_spi_config - Per-chip-select configuration for SPI slave devices
- *
- * @wdelay:    amount of delay between transmissions. Measured in number of
- *             SPI module clocks.
- * @odd_parity:        polarity of parity flag at the end of transmit data stream.
- *             0 - odd parity, 1 - even parity.
- * @parity_enable: enable transmission of parity at end of each transmit
- *             data stream.
- * @io_type:   type of IO transfer. Choose between polled, interrupt and DMA.
- * @timer_disable: disable chip-select timers (setup and hold)
- * @c2tdelay:  chip-select setup time. Measured in number of SPI module clocks.
- * @t2cdelay:  chip-select hold time. Measured in number of SPI module clocks.
- * @t2edelay:  transmit data finished to SPI ENAn pin inactive time. Measured
- *             in number of SPI clocks.
- * @c2edelay:  chip-select active to SPI ENAn signal active time. Measured in
- *             number of SPI clocks.
- */
-struct davinci_spi_config {
-       u8      wdelay;
-       u8      odd_parity;
-       u8      parity_enable;
-#define SPI_IO_TYPE_INTR       0
-#define SPI_IO_TYPE_POLL       1
-#define SPI_IO_TYPE_DMA                2
-       u8      io_type;
-       u8      timer_disable;
-       u8      c2tdelay;
-       u8      t2cdelay;
-       u8      t2edelay;
-       u8      c2edelay;
-};
-
-#endif /* __ARCH_ARM_DAVINCI_SPI_H */
index 83e5926f3c46966f29b01c227d343a64dc12a7da..1656a02e3edaf036026ce7c7d6e624982dd2d840 100644 (file)
@@ -36,8 +36,8 @@
 #include <linux/input/matrix_keypad.h>
 #include <linux/mfd/ti_ssp.h>
 
-#include <mach/mmc.h>
-#include <mach/nand.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
 #include <mach/serial.h>
 
 struct tnetv107x_device_info {
diff --git a/arch/arm/mach-davinci/include/mach/usb.h b/arch/arm/mach-davinci/include/mach/usb.h
deleted file mode 100644 (file)
index e0bc4ab..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * USB related definitions
- *
- * Copyright (C) 2009 MontaVista Software, Inc. <source@mvista.com>
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_USB_H
-#define __ASM_ARCH_USB_H
-
-/* DA8xx CFGCHIP2 (USB 2.0 PHY Control) register bits */
-#define CFGCHIP2_PHYCLKGD      (1 << 17)
-#define CFGCHIP2_VBUSSENSE     (1 << 16)
-#define CFGCHIP2_RESET         (1 << 15)
-#define CFGCHIP2_OTGMODE       (3 << 13)
-#define CFGCHIP2_NO_OVERRIDE   (0 << 13)
-#define CFGCHIP2_FORCE_HOST    (1 << 13)
-#define CFGCHIP2_FORCE_DEVICE  (2 << 13)
-#define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13)
-#define CFGCHIP2_USB1PHYCLKMUX (1 << 12)
-#define CFGCHIP2_USB2PHYCLKMUX (1 << 11)
-#define CFGCHIP2_PHYPWRDN      (1 << 10)
-#define CFGCHIP2_OTGPWRDN      (1 << 9)
-#define CFGCHIP2_DATPOL        (1 << 8)
-#define CFGCHIP2_USB1SUSPENDM  (1 << 7)
-#define CFGCHIP2_PHY_PLLON     (1 << 6)        /* override PLL suspend */
-#define CFGCHIP2_SESENDEN      (1 << 5)        /* Vsess_end comparator */
-#define CFGCHIP2_VBDTCTEN      (1 << 4)        /* Vbus comparator */
-#define CFGCHIP2_REFFREQ       (0xf << 0)
-#define CFGCHIP2_REFFREQ_12MHZ (1 << 0)
-#define CFGCHIP2_REFFREQ_24MHZ (2 << 0)
-#define CFGCHIP2_REFFREQ_48MHZ (3 << 0)
-
-struct da8xx_ohci_root_hub;
-
-typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,
-                                    unsigned port);
-
-/* Passed as the platform data to the OHCI driver */
-struct da8xx_ohci_root_hub {
-       /* Switch the port power on/off */
-       int     (*set_power)(unsigned port, int on);
-       /* Read the port power status */
-       int     (*get_power)(unsigned port);
-       /* Read the port over-current indicator */
-       int     (*get_oci)(unsigned port);
-       /* Over-current indicator change notification (pass NULL to disable) */
-       int     (*ocic_notify)(da8xx_ocic_handler_t handler);
-
-       /* Time from power on to power good (in 2 ms units) */
-       u8      potpgt;
-};
-
-void davinci_setup_usb(unsigned mA, unsigned potpgt_ms);
-
-#endif /* ifndef __ASM_ARCH_USB_H */
index 23d2b6d9fa63bd17bd1b81ebd10673f920aaff9e..f77b95336e2bd7b3d378c9539fa1b7d60b28a4bd 100644 (file)
@@ -10,7 +10,7 @@
 #include <mach/common.h>
 #include <mach/irqs.h>
 #include <mach/cputype.h>
-#include <mach/usb.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #define DAVINCI_USB_OTG_BASE   0x01c64000
 
index 79b4bcb3b85cea6d79d1c447200748811d74d6fc..79a2542d8c41564b1c2b7a337e23a8a0282cda4f 100644 (file)
@@ -40,7 +40,7 @@
 #include <linux/gpio.h>
 
 #include <mach/hardware.h>
-#include <mach/i2c.h>
+#include <linux/platform_data/i2c-davinci.h>
 
 /* ----- global defines ----------------------------------------------- */
 
index 9d82b3aeff5e5535b5f85d4a084a410523359564..d5bacbb479b06f5bc1ef857c9a535f876291aab0 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
-#include <mach/keyscan.h>
+#include <linux/platform_data/keyscan-davinci.h>
 
 /* Key scan registers */
 #define DAVINCI_KEYSCAN_KEYCTRL                0x0000
index b21ecc8d134d2bffa5794c6e6cc51477074a5ca5..0302669622d6d6e2b409be2221d4d34f4d25a5e8 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <mach/hardware.h>
 #include <mach/mux.h>
-#include <mach/i2c.h>
+#include <linux/platform_data/i2c-davinci.h>
 
 #include <linux/io.h>
 
index 7cf6c624bf737fd1858422a0b6237b74de50fb83..3dfd3473269de965bb0500acd2ef5512ebe9269f 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/mmc/mmc.h>
 
-#include <mach/mmc.h>
+#include <linux/platform_data/mmc-davinci.h>
 #include <mach/edma.h>
 
 /*
index d94b03c207af904f05b966783725d194b4d8b412..f1deb1ee2c954c2a15a0c8a60aaf91bc0c9eccb9 100644 (file)
@@ -34,8 +34,8 @@
 #include <linux/mtd/partitions.h>
 #include <linux/slab.h>
 
-#include <mach/nand.h>
-#include <mach/aemif.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
 
 /*
  * This is a device driver for the NAND flash controller found on the
index 9b2901feaf78d4bf3783c9b8b3491f57bfdc2e83..3afe2f4f5b8eb231bae471d6e4bdd5d48d385dae 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/spi/spi_bitbang.h>
 #include <linux/slab.h>
 
-#include <mach/spi.h>
+#include <linux/platform_data/spi-davinci.h>
 #include <mach/edma.h>
 
 #define SPI_NO_RESOURCE                ((resource_size_t)-1)
index 269b1e0f7691972045c0706d85fb354d2aa7a1ef..0b815a856811ed74d4bae53343a910c2d1d0ac05 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/clk.h>
 
 #include <mach/da8xx.h>
-#include <mach/usb.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #ifndef CONFIG_ARCH_DAVINCI_DA8XX
 #error "This file is DA8xx bus glue.  Define CONFIG_ARCH_DAVINCI_DA8XX."
index 0f9fcec4e1d3075d8c4e44c4aaa39066bece4f5c..15a262754150f08a8eb5bc21af2eaa42c2d46522 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/dma-mapping.h>
 
 #include <mach/da8xx.h>
-#include <mach/usb.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include "musb_core.h"
 
diff --git a/include/linux/platform_data/i2c-davinci.h b/include/linux/platform_data/i2c-davinci.h
new file mode 100644 (file)
index 0000000..2312d19
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * DaVinci I2C controller platform_device info
+ *
+ * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
+ *
+ * 2007 (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+*/
+
+#ifndef __ASM_ARCH_I2C_H
+#define __ASM_ARCH_I2C_H
+
+/* All frequencies are expressed in kHz */
+struct davinci_i2c_platform_data {
+       unsigned int    bus_freq;       /* standard bus frequency (kHz) */
+       unsigned int    bus_delay;      /* post-transaction delay (usec) */
+       unsigned int    sda_pin;        /* GPIO pin ID to use for SDA */
+       unsigned int    scl_pin;        /* GPIO pin ID to use for SCL */
+};
+
+/* for board setup code */
+void davinci_init_i2c(struct davinci_i2c_platform_data *);
+
+#endif /* __ASM_ARCH_I2C_H */
diff --git a/include/linux/platform_data/keyscan-davinci.h b/include/linux/platform_data/keyscan-davinci.h
new file mode 100644 (file)
index 0000000..7a560e0
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2009 Texas Instruments, Inc
+ *
+ * Author: Miguel Aguilar <miguel.aguilar@ridgerun.com>
+ *
+ * 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 DAVINCI_KEYSCAN_H
+#define DAVINCI_KEYSCAN_H
+
+#include <linux/io.h>
+
+enum davinci_matrix_types {
+       DAVINCI_KEYSCAN_MATRIX_4X4,
+       DAVINCI_KEYSCAN_MATRIX_5X3,
+};
+
+struct davinci_ks_platform_data {
+       int             (*device_enable)(struct device *dev);
+       unsigned short  *keymap;
+       u32             keymapsize;
+       u8              rep:1;
+       u8              strobe;
+       u8              interval;
+       u8              matrix_type;
+};
+
+#endif
+
diff --git a/include/linux/platform_data/mmc-davinci.h b/include/linux/platform_data/mmc-davinci.h
new file mode 100644 (file)
index 0000000..5ba6b22
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ *  Board-specific MMC configuration
+ */
+
+#ifndef _DAVINCI_MMC_H
+#define _DAVINCI_MMC_H
+
+#include <linux/types.h>
+#include <linux/mmc/host.h>
+
+struct davinci_mmc_config {
+       /* get_cd()/get_wp() may sleep */
+       int     (*get_cd)(int module);
+       int     (*get_ro)(int module);
+
+       void    (*set_power)(int module, bool on);
+
+       /* wires == 0 is equivalent to wires == 4 (4-bit parallel) */
+       u8      wires;
+
+       u32     max_freq;
+
+       /* any additional host capabilities: OR'd in to mmc->f_caps */
+       u32     caps;
+
+       /* Version of the MMC/SD controller */
+       u8      version;
+
+       /* Number of sg segments */
+       u8      nr_sg;
+};
+void davinci_setup_mmc(int module, struct davinci_mmc_config *config);
+
+enum {
+       MMC_CTLR_VERSION_1 = 0, /* DM644x and DM355 */
+       MMC_CTLR_VERSION_2,     /* DA830 */
+};
+
+#endif
diff --git a/include/linux/platform_data/mtd-davinci-aemif.h b/include/linux/platform_data/mtd-davinci-aemif.h
new file mode 100644 (file)
index 0000000..05b2934
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * TI DaVinci AEMIF support
+ *
+ * Copyright 2010 (C) Texas Instruments, Inc. http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+#ifndef _MACH_DAVINCI_AEMIF_H
+#define _MACH_DAVINCI_AEMIF_H
+
+#define NRCSR_OFFSET           0x00
+#define AWCCR_OFFSET           0x04
+#define A1CR_OFFSET            0x10
+
+#define ACR_ASIZE_MASK         0x3
+#define ACR_EW_MASK            BIT(30)
+#define ACR_SS_MASK            BIT(31)
+
+/* All timings in nanoseconds */
+struct davinci_aemif_timing {
+       u8      wsetup;
+       u8      wstrobe;
+       u8      whold;
+
+       u8      rsetup;
+       u8      rstrobe;
+       u8      rhold;
+
+       u8      ta;
+};
+
+int davinci_aemif_setup_timing(struct davinci_aemif_timing *t,
+                                       void __iomem *base, unsigned cs);
+#endif
diff --git a/include/linux/platform_data/mtd-davinci.h b/include/linux/platform_data/mtd-davinci.h
new file mode 100644 (file)
index 0000000..1cf555a
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * mach-davinci/nand.h
+ *
+ * Copyright © 2006 Texas Instruments.
+ *
+ * Ported to 2.6.23 Copyright © 2008 by
+ *   Sander Huijsen <Shuijsen@optelecom-nkf.com>
+ *   Troy Kisky <troy.kisky@boundarydevices.com>
+ *   Dirk Behme <Dirk.Behme@gmail.com>
+ *
+ * --------------------------------------------------------------------------
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ARCH_ARM_DAVINCI_NAND_H
+#define __ARCH_ARM_DAVINCI_NAND_H
+
+#include <linux/mtd/nand.h>
+
+#define NANDFCR_OFFSET         0x60
+#define NANDFSR_OFFSET         0x64
+#define NANDF1ECC_OFFSET       0x70
+
+/* 4-bit ECC syndrome registers */
+#define NAND_4BIT_ECC_LOAD_OFFSET      0xbc
+#define NAND_4BIT_ECC1_OFFSET          0xc0
+#define NAND_4BIT_ECC2_OFFSET          0xc4
+#define NAND_4BIT_ECC3_OFFSET          0xc8
+#define NAND_4BIT_ECC4_OFFSET          0xcc
+#define NAND_ERR_ADD1_OFFSET           0xd0
+#define NAND_ERR_ADD2_OFFSET           0xd4
+#define NAND_ERR_ERRVAL1_OFFSET                0xd8
+#define NAND_ERR_ERRVAL2_OFFSET                0xdc
+
+/* NOTE:  boards don't need to use these address bits
+ * for ALE/CLE unless they support booting from NAND.
+ * They're used unless platform data overrides them.
+ */
+#define        MASK_ALE                0x08
+#define        MASK_CLE                0x10
+
+struct davinci_nand_pdata {            /* platform_data */
+       uint32_t                mask_ale;
+       uint32_t                mask_cle;
+
+       /* for packages using two chipselects */
+       uint32_t                mask_chipsel;
+
+       /* board's default static partition info */
+       struct mtd_partition    *parts;
+       unsigned                nr_parts;
+
+       /* none  == NAND_ECC_NONE (strongly *not* advised!!)
+        * soft  == NAND_ECC_SOFT
+        * else  == NAND_ECC_HW, according to ecc_bits
+        *
+        * All DaVinci-family chips support 1-bit hardware ECC.
+        * Newer ones also support 4-bit ECC, but are awkward
+        * using it with large page chips.
+        */
+       nand_ecc_modes_t        ecc_mode;
+       u8                      ecc_bits;
+
+       /* e.g. NAND_BUSWIDTH_16 */
+       unsigned                options;
+       /* e.g. NAND_BBT_USE_FLASH */
+       unsigned                bbt_options;
+
+       /* Main and mirror bbt descriptor overrides */
+       struct nand_bbt_descr   *bbt_td;
+       struct nand_bbt_descr   *bbt_md;
+
+       /* Access timings */
+       struct davinci_aemif_timing     *timing;
+};
+
+#endif /* __ARCH_ARM_DAVINCI_NAND_H */
diff --git a/include/linux/platform_data/spi-davinci.h b/include/linux/platform_data/spi-davinci.h
new file mode 100644 (file)
index 0000000..7af305b
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2009 Texas Instruments.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ARCH_ARM_DAVINCI_SPI_H
+#define __ARCH_ARM_DAVINCI_SPI_H
+
+#include <mach/edma.h>
+
+#define SPI_INTERN_CS  0xFF
+
+enum {
+       SPI_VERSION_1, /* For DM355/DM365/DM6467 */
+       SPI_VERSION_2, /* For DA8xx */
+};
+
+/**
+ * davinci_spi_platform_data - Platform data for SPI master device on DaVinci
+ *
+ * @version:   version of the SPI IP. Different DaVinci devices have slightly
+ *             varying versions of the same IP.
+ * @num_chipselect: number of chipselects supported by this SPI master
+ * @intr_line: interrupt line used to connect the SPI IP to the ARM interrupt
+ *             controller withn the SoC. Possible values are 0 and 1.
+ * @chip_sel:  list of GPIOs which can act as chip-selects for the SPI.
+ *             SPI_INTERN_CS denotes internal SPI chip-select. Not necessary
+ *             to populate if all chip-selects are internal.
+ * @cshold_bug:        set this to true if the SPI controller on your chip requires
+ *             a write to CSHOLD bit in between transfers (like in DM355).
+ * @dma_event_q: DMA event queue to use if SPI_IO_TYPE_DMA is used for any
+ *             device on the bus.
+ */
+struct davinci_spi_platform_data {
+       u8                      version;
+       u8                      num_chipselect;
+       u8                      intr_line;
+       u8                      *chip_sel;
+       bool                    cshold_bug;
+       enum dma_event_q        dma_event_q;
+};
+
+/**
+ * davinci_spi_config - Per-chip-select configuration for SPI slave devices
+ *
+ * @wdelay:    amount of delay between transmissions. Measured in number of
+ *             SPI module clocks.
+ * @odd_parity:        polarity of parity flag at the end of transmit data stream.
+ *             0 - odd parity, 1 - even parity.
+ * @parity_enable: enable transmission of parity at end of each transmit
+ *             data stream.
+ * @io_type:   type of IO transfer. Choose between polled, interrupt and DMA.
+ * @timer_disable: disable chip-select timers (setup and hold)
+ * @c2tdelay:  chip-select setup time. Measured in number of SPI module clocks.
+ * @t2cdelay:  chip-select hold time. Measured in number of SPI module clocks.
+ * @t2edelay:  transmit data finished to SPI ENAn pin inactive time. Measured
+ *             in number of SPI clocks.
+ * @c2edelay:  chip-select active to SPI ENAn signal active time. Measured in
+ *             number of SPI clocks.
+ */
+struct davinci_spi_config {
+       u8      wdelay;
+       u8      odd_parity;
+       u8      parity_enable;
+#define SPI_IO_TYPE_INTR       0
+#define SPI_IO_TYPE_POLL       1
+#define SPI_IO_TYPE_DMA                2
+       u8      io_type;
+       u8      timer_disable;
+       u8      c2tdelay;
+       u8      t2cdelay;
+       u8      t2edelay;
+       u8      c2edelay;
+};
+
+#endif /* __ARCH_ARM_DAVINCI_SPI_H */
diff --git a/include/linux/platform_data/usb-davinci.h b/include/linux/platform_data/usb-davinci.h
new file mode 100644 (file)
index 0000000..e0bc4ab
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * USB related definitions
+ *
+ * Copyright (C) 2009 MontaVista Software, Inc. <source@mvista.com>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#ifndef __ASM_ARCH_USB_H
+#define __ASM_ARCH_USB_H
+
+/* DA8xx CFGCHIP2 (USB 2.0 PHY Control) register bits */
+#define CFGCHIP2_PHYCLKGD      (1 << 17)
+#define CFGCHIP2_VBUSSENSE     (1 << 16)
+#define CFGCHIP2_RESET         (1 << 15)
+#define CFGCHIP2_OTGMODE       (3 << 13)
+#define CFGCHIP2_NO_OVERRIDE   (0 << 13)
+#define CFGCHIP2_FORCE_HOST    (1 << 13)
+#define CFGCHIP2_FORCE_DEVICE  (2 << 13)
+#define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13)
+#define CFGCHIP2_USB1PHYCLKMUX (1 << 12)
+#define CFGCHIP2_USB2PHYCLKMUX (1 << 11)
+#define CFGCHIP2_PHYPWRDN      (1 << 10)
+#define CFGCHIP2_OTGPWRDN      (1 << 9)
+#define CFGCHIP2_DATPOL        (1 << 8)
+#define CFGCHIP2_USB1SUSPENDM  (1 << 7)
+#define CFGCHIP2_PHY_PLLON     (1 << 6)        /* override PLL suspend */
+#define CFGCHIP2_SESENDEN      (1 << 5)        /* Vsess_end comparator */
+#define CFGCHIP2_VBDTCTEN      (1 << 4)        /* Vbus comparator */
+#define CFGCHIP2_REFFREQ       (0xf << 0)
+#define CFGCHIP2_REFFREQ_12MHZ (1 << 0)
+#define CFGCHIP2_REFFREQ_24MHZ (2 << 0)
+#define CFGCHIP2_REFFREQ_48MHZ (3 << 0)
+
+struct da8xx_ohci_root_hub;
+
+typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,
+                                    unsigned port);
+
+/* Passed as the platform data to the OHCI driver */
+struct da8xx_ohci_root_hub {
+       /* Switch the port power on/off */
+       int     (*set_power)(unsigned port, int on);
+       /* Read the port power status */
+       int     (*get_power)(unsigned port);
+       /* Read the port over-current indicator */
+       int     (*get_oci)(unsigned port);
+       /* Over-current indicator change notification (pass NULL to disable) */
+       int     (*ocic_notify)(da8xx_ocic_handler_t handler);
+
+       /* Time from power on to power good (in 2 ms units) */
+       u8      potpgt;
+};
+
+void davinci_setup_usb(unsigned mA, unsigned potpgt_ms);
+
+#endif /* ifndef __ASM_ARCH_USB_H */