Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * linux/arch/arm/mach-omap1/board-innovator.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Board specific inits for OMAP-1510 and OMAP-1610 Innovator
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  * Copyright (C) 2001 RidgeRun, Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  * Author: Greg Lonnon <glonnon@ridgerun.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  * Copyright (C) 2002 MontaVista Software, Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  * Separated FPGA interrupts from innovator1510.c and cleaned up for 2.6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  * Copyright (C) 2004 Nokia Corporation by Tony Lindrgen <tony@atomide.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include <linux/gpio.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #include <linux/delay.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #include <linux/mtd/mtd.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #include <linux/mtd/partitions.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #include <linux/mtd/physmap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) #include <linux/input.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #include <linux/smc91x.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #include <linux/omapfb.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #include <asm/mach-types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #include <asm/mach/arch.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #include <asm/mach/map.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #include <mach/mux.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) #include "flash.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #include <mach/tc.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) #include <linux/platform_data/keypad-omap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) #include <mach/hardware.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) #include <mach/usb.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) #include "iomap.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) #include "common.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) #include "mmc.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) #define INNOVATOR1610_ETHR_START	0x04000300
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) static const unsigned int innovator_keymap[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	KEY(0, 0, KEY_F1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	KEY(3, 0, KEY_DOWN),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	KEY(1, 1, KEY_F2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	KEY(2, 1, KEY_RIGHT),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	KEY(0, 2, KEY_F3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	KEY(1, 2, KEY_F4),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	KEY(2, 2, KEY_UP),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	KEY(2, 3, KEY_ENTER),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	KEY(3, 3, KEY_LEFT),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) static struct mtd_partition innovator_partitions[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	/* bootloader (U-Boot, etc) in first sector */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	      .name		= "bootloader",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	      .offset		= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	      .size		= SZ_128K,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	      .mask_flags	= MTD_WRITEABLE, /* force read-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	/* bootloader params in the next sector */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	      .name		= "params",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	      .offset		= MTDPART_OFS_APPEND,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	      .size		= SZ_128K,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	      .mask_flags	= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	/* kernel */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	      .name		= "kernel",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	      .offset		= MTDPART_OFS_APPEND,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	      .size		= SZ_2M,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	      .mask_flags	= 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	/* rest of flash1 is a file system */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	      .name		= "rootfs",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	      .offset		= MTDPART_OFS_APPEND,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	      .size		= SZ_16M - SZ_2M - 2 * SZ_128K,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	      .mask_flags	= 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	/* file system */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	      .name		= "filesystem",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	      .offset		= MTDPART_OFS_APPEND,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	      .size		= MTDPART_SIZ_FULL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	      .mask_flags	= 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) static struct physmap_flash_data innovator_flash_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	.width		= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	.set_vpp	= omap1_set_vpp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	.parts		= innovator_partitions,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	.nr_parts	= ARRAY_SIZE(innovator_partitions),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) static struct resource innovator_flash_resource = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	.start		= OMAP_CS0_PHYS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	.end		= OMAP_CS0_PHYS + SZ_32M - 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	.flags		= IORESOURCE_MEM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) static struct platform_device innovator_flash_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	.name		= "physmap-flash",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	.id		= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	.dev		= {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 		.platform_data	= &innovator_flash_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	.num_resources	= 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	.resource	= &innovator_flash_resource,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) static struct resource innovator_kp_resources[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	[0] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 		.start	= INT_KEYBOARD,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		.end	= INT_KEYBOARD,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		.flags	= IORESOURCE_IRQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) static const struct matrix_keymap_data innovator_keymap_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	.keymap		= innovator_keymap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	.keymap_size	= ARRAY_SIZE(innovator_keymap),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) static struct omap_kp_platform_data innovator_kp_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	.rows		= 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	.cols		= 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	.keymap_data	= &innovator_keymap_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	.delay		= 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) static struct platform_device innovator_kp_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	.name		= "omap-keypad",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	.id		= -1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	.dev		= {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		.platform_data = &innovator_kp_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	.num_resources	= ARRAY_SIZE(innovator_kp_resources),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	.resource	= innovator_kp_resources,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) static struct smc91x_platdata innovator_smc91x_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	.flags	= SMC91X_USE_16BIT | SMC91X_NOWAIT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	.leda	= RPC_LED_100_10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	.ledb	= RPC_LED_TX_RX,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) #ifdef CONFIG_ARCH_OMAP15XX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) #include <linux/spi/spi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) #include <linux/spi/ads7846.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) /* Only FPGA needs to be mapped here. All others are done with ioremap */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) static struct map_desc innovator1510_io_desc[] __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 		.virtual	= OMAP1510_FPGA_BASE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 		.pfn		= __phys_to_pfn(OMAP1510_FPGA_START),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		.length		= OMAP1510_FPGA_SIZE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 		.type		= MT_DEVICE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) static struct resource innovator1510_smc91x_resources[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	[0] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 		.start	= OMAP1510_FPGA_ETHR_START,	/* Physical */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 		.end	= OMAP1510_FPGA_ETHR_START + 0xf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 		.flags	= IORESOURCE_MEM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	[1] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 		.start	= OMAP1510_INT_ETHER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 		.end	= OMAP1510_INT_ETHER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) static struct platform_device innovator1510_smc91x_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	.name		= "smc91x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	.id		= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	.dev	= {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		.platform_data	= &innovator_smc91x_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	.num_resources	= ARRAY_SIZE(innovator1510_smc91x_resources),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	.resource	= innovator1510_smc91x_resources,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) static struct platform_device innovator1510_lcd_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	.name		= "lcd_inn1510",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	.id		= -1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) static struct platform_device innovator1510_spi_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	.name		= "spi_inn1510",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	.id		= -1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) static struct platform_device *innovator1510_devices[] __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	&innovator_flash_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	&innovator1510_smc91x_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	&innovator_kp_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	&innovator1510_lcd_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	&innovator1510_spi_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) static int innovator_get_pendown_state(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	return !(__raw_readb(OMAP1510_FPGA_TOUCHSCREEN) & (1 << 5));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) static const struct ads7846_platform_data innovator1510_ts_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	.model			= 7846,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	.vref_delay_usecs	= 100,	/* internal, no capacitor */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	.x_plate_ohms		= 419,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	.y_plate_ohms		= 486,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	.get_pendown_state	= innovator_get_pendown_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) static struct spi_board_info __initdata innovator1510_boardinfo[] = { {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	/* FPGA (bus "10") CS0 has an ads7846e */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	.modalias		= "ads7846",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	.platform_data		= &innovator1510_ts_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	.irq			= OMAP1510_INT_FPGA_TS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	.max_speed_hz		= 120000 /* max sample rate at 3V */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 					* 26 /* command + data + overhead */,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	.bus_num		= 10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 	.chip_select		= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) } };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) #endif /* CONFIG_ARCH_OMAP15XX */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) #ifdef CONFIG_ARCH_OMAP16XX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) static struct resource innovator1610_smc91x_resources[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 	[0] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 		.start	= INNOVATOR1610_ETHR_START,		/* Physical */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 		.end	= INNOVATOR1610_ETHR_START + 0xf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 		.flags	= IORESOURCE_MEM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 	[1] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) static struct platform_device innovator1610_smc91x_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 	.name		= "smc91x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 	.id		= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	.dev	= {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 		.platform_data	= &innovator_smc91x_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	.num_resources	= ARRAY_SIZE(innovator1610_smc91x_resources),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 	.resource	= innovator1610_smc91x_resources,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) static struct platform_device innovator1610_lcd_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	.name		= "inn1610_lcd",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 	.id		= -1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) static struct platform_device *innovator1610_devices[] __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	&innovator_flash_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 	&innovator1610_smc91x_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 	&innovator_kp_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	&innovator1610_lcd_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) #endif /* CONFIG_ARCH_OMAP16XX */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) static void __init innovator_init_smc91x(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 	if (cpu_is_omap1510()) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 		__raw_writeb(__raw_readb(OMAP1510_FPGA_RST) & ~1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 			   OMAP1510_FPGA_RST);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 		udelay(750);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 	} else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 		if (gpio_request(0, "SMC91x irq") < 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 			printk("Error requesting gpio 0 for smc91x irq\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 			return;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) #ifdef CONFIG_ARCH_OMAP15XX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) static struct omap_usb_config innovator1510_usb_config __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 	/* for bundled non-standard host and peripheral cables */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 	.hmc_mode	= 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 	.register_host	= 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 	.pins[1]	= 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 	.pins[2]	= 6,		/* Conflicts with UART2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 	.register_dev	= 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 	.pins[0]	= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) static const struct omap_lcd_config innovator1510_lcd_config __initconst = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 	.ctrl_name	= "internal",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) #ifdef CONFIG_ARCH_OMAP16XX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) static struct omap_usb_config h2_usb_config __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 	/* usb1 has a Mini-AB port and external isp1301 transceiver */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	.otg		= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) #if IS_ENABLED(CONFIG_USB_OMAP)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) 	.hmc_mode	= 19,	/* 0:host(off) 1:dev|otg 2:disabled */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 	/* .hmc_mode	= 21,*/	/* 0:host(off) 1:dev(loopback) 2:host(loopback) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) #elif	IS_ENABLED(CONFIG_USB_OHCI_HCD)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 	/* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 	.hmc_mode	= 20,	/* 1:dev|otg(off) 1:host 2:disabled */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 	.pins[1]	= 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) static const struct omap_lcd_config innovator1610_lcd_config __initconst = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 	.ctrl_name	= "internal",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) #if IS_ENABLED(CONFIG_MMC_OMAP)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) static int mmc_set_power(struct device *dev, int slot, int power_on,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 				int vdd)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 	if (power_on)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 		__raw_writeb(__raw_readb(OMAP1510_FPGA_POWER) | (1 << 3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 				OMAP1510_FPGA_POWER);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 	else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 		__raw_writeb(__raw_readb(OMAP1510_FPGA_POWER) & ~(1 << 3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 				OMAP1510_FPGA_POWER);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344)  * Innovator could use the following functions tested:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)  * - mmc_get_wp that uses OMAP_MPUIO(3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346)  * - mmc_get_cover_state that uses FPGA F4 UIO43
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) static struct omap_mmc_platform_data mmc1_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) 	.nr_slots                       = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 	.slots[0]       = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 		.set_power		= mmc_set_power,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) 		.wires			= 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 		.name                   = "mmcblk",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) static void __init innovator_mmc_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) 	mmc_data[0] = &mmc1_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) 	omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) static inline void innovator_mmc_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) static void __init innovator_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) 	if (cpu_is_omap1510())
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 		omap1510_fpga_init_irq();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) 	innovator_init_smc91x();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) #ifdef CONFIG_ARCH_OMAP15XX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) 	if (cpu_is_omap1510()) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) 		unsigned char reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) 		/* mux pins for uarts */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 		omap_cfg_reg(UART1_TX);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) 		omap_cfg_reg(UART1_RTS);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) 		omap_cfg_reg(UART2_TX);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) 		omap_cfg_reg(UART2_RTS);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) 		omap_cfg_reg(UART3_TX);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) 		omap_cfg_reg(UART3_RX);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) 		reg = __raw_readb(OMAP1510_FPGA_POWER);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) 		reg |= OMAP1510_FPGA_PCR_COM1_EN;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) 		__raw_writeb(reg, OMAP1510_FPGA_POWER);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) 		udelay(10);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) 		reg = __raw_readb(OMAP1510_FPGA_POWER);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) 		reg |= OMAP1510_FPGA_PCR_COM2_EN;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) 		__raw_writeb(reg, OMAP1510_FPGA_POWER);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) 		udelay(10);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) 		platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) 		spi_register_board_info(innovator1510_boardinfo,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) 				ARRAY_SIZE(innovator1510_boardinfo));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) #ifdef CONFIG_ARCH_OMAP16XX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) 	if (!cpu_is_omap1510()) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) 		innovator1610_smc91x_resources[1].start = gpio_to_irq(0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) 		innovator1610_smc91x_resources[1].end = gpio_to_irq(0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) 		platform_add_devices(innovator1610_devices, ARRAY_SIZE(innovator1610_devices));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) #ifdef CONFIG_ARCH_OMAP15XX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) 	if (cpu_is_omap1510()) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) 		omap1_usb_init(&innovator1510_usb_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) 		omapfb_set_lcd_config(&innovator1510_lcd_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) #ifdef CONFIG_ARCH_OMAP16XX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) 	if (cpu_is_omap1610()) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) 		omap1_usb_init(&h2_usb_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) 		omapfb_set_lcd_config(&innovator1610_lcd_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) 	omap_serial_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) 	omap_register_i2c_bus(1, 100, NULL, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) 	innovator_mmc_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430)  * REVISIT: Assume 15xx for now, we don't want to do revision check
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431)  * until later on. The right way to fix this is to set up a different
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432)  * machine_id for 16xx Innovator, or use device tree.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) static void __init innovator_map_io(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) #ifdef CONFIG_ARCH_OMAP15XX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) 	omap15xx_map_io();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) 	iotable_init(innovator1510_io_desc, ARRAY_SIZE(innovator1510_io_desc));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) 	udelay(10);	/* Delay needed for FPGA */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) 	/* Dump the Innovator FPGA rev early - useful info for support. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) 	pr_debug("Innovator FPGA Rev %d.%d Board Rev %d\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) 			__raw_readb(OMAP1510_FPGA_REV_HIGH),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) 			__raw_readb(OMAP1510_FPGA_REV_LOW),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) 			__raw_readb(OMAP1510_FPGA_BOARD_REV));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) 	/* Maintainer: MontaVista Software, Inc. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) 	.atag_offset	= 0x100,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) 	.map_io		= innovator_map_io,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) 	.init_early     = omap1_init_early,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) 	.init_irq	= omap1_init_irq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) 	.handle_irq	= omap1_handle_irq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) 	.init_machine	= innovator_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) 	.init_late	= omap1_init_late,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) 	.init_time	= omap1_timer_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) 	.restart	= omap1_restart,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) MACHINE_END