~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-ixp4xx/coyote-setup.c

Version: ~ [ linux-5.11 ] ~ [ linux-5.10.17 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.99 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.176 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.221 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.257 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.257 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 /*
  3  * arch/arm/mach-ixp4xx/coyote-setup.c
  4  *
  5  * Board setup for ADI Engineering and IXDGP425 boards
  6  *
  7  * Copyright (C) 2003-2005 MontaVista Software, Inc.
  8  *
  9  * Author: Deepak Saxena <dsaxena@plexity.net>
 10  */
 11 
 12 #include <linux/kernel.h>
 13 #include <linux/init.h>
 14 #include <linux/device.h>
 15 #include <linux/serial.h>
 16 #include <linux/tty.h>
 17 #include <linux/serial_8250.h>
 18 
 19 #include <asm/types.h>
 20 #include <asm/setup.h>
 21 #include <asm/memory.h>
 22 #include <mach/hardware.h>
 23 #include <asm/irq.h>
 24 #include <asm/mach-types.h>
 25 #include <asm/mach/arch.h>
 26 #include <asm/mach/flash.h>
 27 
 28 #define COYOTE_IDE_BASE_PHYS    IXP4XX_EXP_BUS_BASE(3)
 29 #define COYOTE_IDE_BASE_VIRT    0xFFFE1000
 30 #define COYOTE_IDE_REGION_SIZE  0x1000
 31 
 32 #define COYOTE_IDE_DATA_PORT    0xFFFE10E0
 33 #define COYOTE_IDE_CTRL_PORT    0xFFFE10FC
 34 #define COYOTE_IDE_ERROR_PORT   0xFFFE10E2
 35 #define IRQ_COYOTE_IDE          IRQ_IXP4XX_GPIO5
 36 
 37 static struct flash_platform_data coyote_flash_data = {
 38         .map_name       = "cfi_probe",
 39         .width          = 2,
 40 };
 41 
 42 static struct resource coyote_flash_resource = {
 43         .flags          = IORESOURCE_MEM,
 44 };
 45 
 46 static struct platform_device coyote_flash = {
 47         .name           = "IXP4XX-Flash",
 48         .id             = 0,
 49         .dev            = {
 50                 .platform_data = &coyote_flash_data,
 51         },
 52         .num_resources  = 1,
 53         .resource       = &coyote_flash_resource,
 54 };
 55 
 56 static struct resource coyote_uart_resource = {
 57         .start  = IXP4XX_UART2_BASE_PHYS,
 58         .end    = IXP4XX_UART2_BASE_PHYS + 0x0fff,
 59         .flags  = IORESOURCE_MEM,
 60 };
 61 
 62 static struct plat_serial8250_port coyote_uart_data[] = {
 63         {
 64                 .mapbase        = IXP4XX_UART2_BASE_PHYS,
 65                 .membase        = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
 66                 .irq            = IRQ_IXP4XX_UART2,
 67                 .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
 68                 .iotype         = UPIO_MEM,
 69                 .regshift       = 2,
 70                 .uartclk        = IXP4XX_UART_XTAL,
 71         },
 72         { },
 73 };
 74 
 75 static struct platform_device coyote_uart = {
 76         .name           = "serial8250",
 77         .id             = PLAT8250_DEV_PLATFORM,
 78         .dev                    = {
 79                 .platform_data  = coyote_uart_data,
 80         },
 81         .num_resources  = 1,
 82         .resource       = &coyote_uart_resource,
 83 };
 84 
 85 static struct platform_device *coyote_devices[] __initdata = {
 86         &coyote_flash,
 87         &coyote_uart
 88 };
 89 
 90 static void __init coyote_init(void)
 91 {
 92         ixp4xx_sys_init();
 93 
 94         coyote_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
 95         coyote_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
 96 
 97         *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
 98         *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
 99 
100         if (machine_is_ixdpg425()) {
101                 coyote_uart_data[0].membase =
102                         (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET);
103                 coyote_uart_data[0].mapbase = IXP4XX_UART1_BASE_PHYS;
104                 coyote_uart_data[0].irq = IRQ_IXP4XX_UART1;
105         }
106 
107         platform_add_devices(coyote_devices, ARRAY_SIZE(coyote_devices));
108 }
109 
110 #ifdef CONFIG_ARCH_ADI_COYOTE
111 MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")
112         /* Maintainer: MontaVista Software, Inc. */
113         .map_io         = ixp4xx_map_io,
114         .init_early     = ixp4xx_init_early,
115         .init_irq       = ixp4xx_init_irq,
116         .init_time      = ixp4xx_timer_init,
117         .atag_offset    = 0x100,
118         .init_machine   = coyote_init,
119 #if defined(CONFIG_PCI)
120         .dma_zone_size  = SZ_64M,
121 #endif
122         .restart        = ixp4xx_restart,
123 MACHINE_END
124 #endif
125 
126 /*
127  * IXDPG425 is identical to Coyote except for which serial port
128  * is connected.
129  */
130 #ifdef CONFIG_MACH_IXDPG425
131 MACHINE_START(IXDPG425, "Intel IXDPG425")
132         /* Maintainer: MontaVista Software, Inc. */
133         .map_io         = ixp4xx_map_io,
134         .init_early     = ixp4xx_init_early,
135         .init_irq       = ixp4xx_init_irq,
136         .init_time      = ixp4xx_timer_init,
137         .atag_offset    = 0x100,
138         .init_machine   = coyote_init,
139         .restart        = ixp4xx_restart,
140 MACHINE_END
141 #endif
142 
143 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp