| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 | 
							- /*
 
-  * TI DaVinci DM365 EVM board support
 
-  *
 
-  * Copyright (C) 2009 Texas Instruments Incorporated
 
-  *
 
-  * 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 version 2.
 
-  *
 
-  * This program is distributed "as is" WITHOUT ANY WARRANTY of any
 
-  * kind, whether express or implied; without even the implied warranty
 
-  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
-  * GNU General Public License for more details.
 
-  */
 
- #include <linux/kernel.h>
 
- #include <linux/init.h>
 
- #include <linux/err.h>
 
- #include <linux/i2c.h>
 
- #include <linux/io.h>
 
- #include <linux/clk.h>
 
- #include <linux/i2c/at24.h>
 
- #include <linux/leds.h>
 
- #include <linux/mtd/mtd.h>
 
- #include <linux/mtd/partitions.h>
 
- #include <linux/slab.h>
 
- #include <linux/mtd/nand.h>
 
- #include <linux/input.h>
 
- #include <linux/spi/spi.h>
 
- #include <linux/spi/eeprom.h>
 
- #include <asm/mach-types.h>
 
- #include <asm/mach/arch.h>
 
- #include <mach/mux.h>
 
- #include <mach/common.h>
 
- #include <linux/platform_data/i2c-davinci.h>
 
- #include <mach/serial.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>
 
- #include "davinci.h"
 
- static inline int have_imager(void)
 
- {
 
- 	/* REVISIT when it's supported, trigger via Kconfig */
 
- 	return 0;
 
- }
 
- static inline int have_tvp7002(void)
 
- {
 
- 	/* REVISIT when it's supported, trigger via Kconfig */
 
- 	return 0;
 
- }
 
- #define DM365_EVM_PHY_ID		"davinci_mdio-0:01"
 
- /*
 
-  * A MAX-II CPLD is used for various board control functions.
 
-  */
 
- #define CPLD_OFFSET(a13a8,a2a1)		(((a13a8) << 10) + ((a2a1) << 3))
 
- #define CPLD_VERSION	CPLD_OFFSET(0,0)	/* r/o */
 
- #define CPLD_TEST	CPLD_OFFSET(0,1)
 
- #define CPLD_LEDS	CPLD_OFFSET(0,2)
 
- #define CPLD_MUX	CPLD_OFFSET(0,3)
 
- #define CPLD_SWITCH	CPLD_OFFSET(1,0)	/* r/o */
 
- #define CPLD_POWER	CPLD_OFFSET(1,1)
 
- #define CPLD_VIDEO	CPLD_OFFSET(1,2)
 
- #define CPLD_CARDSTAT	CPLD_OFFSET(1,3)	/* r/o */
 
- #define CPLD_DILC_OUT	CPLD_OFFSET(2,0)
 
- #define CPLD_DILC_IN	CPLD_OFFSET(2,1)	/* r/o */
 
- #define CPLD_IMG_DIR0	CPLD_OFFSET(2,2)
 
- #define CPLD_IMG_MUX0	CPLD_OFFSET(2,3)
 
- #define CPLD_IMG_MUX1	CPLD_OFFSET(3,0)
 
- #define CPLD_IMG_DIR1	CPLD_OFFSET(3,1)
 
- #define CPLD_IMG_MUX2	CPLD_OFFSET(3,2)
 
- #define CPLD_IMG_MUX3	CPLD_OFFSET(3,3)
 
- #define CPLD_IMG_DIR2	CPLD_OFFSET(4,0)
 
- #define CPLD_IMG_MUX4	CPLD_OFFSET(4,1)
 
- #define CPLD_IMG_MUX5	CPLD_OFFSET(4,2)
 
- #define CPLD_RESETS	CPLD_OFFSET(4,3)
 
- #define CPLD_CCD_DIR1	CPLD_OFFSET(0x3e,0)
 
- #define CPLD_CCD_IO1	CPLD_OFFSET(0x3e,1)
 
- #define CPLD_CCD_DIR2	CPLD_OFFSET(0x3e,2)
 
- #define CPLD_CCD_IO2	CPLD_OFFSET(0x3e,3)
 
- #define CPLD_CCD_DIR3	CPLD_OFFSET(0x3f,0)
 
- #define CPLD_CCD_IO3	CPLD_OFFSET(0x3f,1)
 
- static void __iomem *cpld;
 
- /* NOTE:  this is geared for the standard config, with a socketed
 
-  * 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors.  If you
 
-  * swap chips with a different block size, partitioning will
 
-  * need to be changed. This NAND chip MT29F16G08FAA is the default
 
 
  |