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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-footbridge/isa.c

Version: ~ [ linux-5.10-rc6 ] ~ [ linux-5.9.12 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.81 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.161 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.210 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.247 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.247 ] ~ [ 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 /*
  2  *  linux/arch/arm/mach-footbridge/isa.c
  3  *
  4  *  Copyright (C) 2004 Russell King.
  5  *
  6  * This program is free software; you can redistribute it and/or modify
  7  * it under the terms of the GNU General Public License version 2 as
  8  * published by the Free Software Foundation.
  9  */
 10 #include <linux/init.h>
 11 #include <linux/serial_8250.h>
 12 
 13 #include <asm/irq.h>
 14 #include <asm/hardware/dec21285.h>
 15 
 16 #include "common.h"
 17 
 18 static struct resource rtc_resources[] = {
 19         [0] = {
 20                 .start  = 0x70,
 21                 .end    = 0x73,
 22                 .flags  = IORESOURCE_IO,
 23         },
 24         [1] = {
 25                 .start  = IRQ_ISA_RTC_ALARM,
 26                 .end    = IRQ_ISA_RTC_ALARM,
 27                 .flags  = IORESOURCE_IRQ,
 28         }
 29 };
 30 
 31 static struct platform_device rtc_device = {
 32         .name           = "rtc_cmos",
 33         .id             = -1,
 34         .resource       = rtc_resources,
 35         .num_resources  = ARRAY_SIZE(rtc_resources),
 36 };
 37 
 38 static struct resource serial_resources[] = {
 39         [0] = {
 40                 .start  = 0x3f8,
 41                 .end    = 0x3ff,
 42                 .flags  = IORESOURCE_IO,
 43         },
 44         [1] = {
 45                 .start  = 0x2f8,
 46                 .end    = 0x2ff,
 47                 .flags  = IORESOURCE_IO,
 48         },
 49 };
 50 
 51 static struct plat_serial8250_port serial_platform_data[] = {
 52         {
 53                 .iobase         = 0x3f8,
 54                 .irq            = IRQ_ISA_UART,
 55                 .uartclk        = 1843200,
 56                 .regshift       = 0,
 57                 .iotype         = UPIO_PORT,
 58                 .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
 59         },
 60         {
 61                 .iobase         = 0x2f8,
 62                 .irq            = IRQ_ISA_UART2,
 63                 .uartclk        = 1843200,
 64                 .regshift       = 0,
 65                 .iotype         = UPIO_PORT,
 66                 .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
 67         },
 68         { },
 69 };
 70 
 71 static struct platform_device serial_device = {
 72         .name                   = "serial8250",
 73         .id                     = PLAT8250_DEV_PLATFORM,
 74         .dev                    = {
 75                 .platform_data  = serial_platform_data,
 76         },
 77         .resource               = serial_resources,
 78         .num_resources          = ARRAY_SIZE(serial_resources),
 79 };
 80 
 81 static int __init footbridge_isa_init(void)
 82 {
 83         int err = 0;
 84 
 85         if (!footbridge_cfn_mode())
 86                 return 0;
 87 
 88         /* Personal server doesn't have RTC */
 89         if (!machine_is_personal_server()) {
 90                 isa_rtc_init();
 91                 err = platform_device_register(&rtc_device);
 92                 if (err)
 93                         printk(KERN_ERR "Unable to register RTC device: %d\n", err);
 94         }
 95         err = platform_device_register(&serial_device);
 96         if (err)
 97                 printk(KERN_ERR "Unable to register serial device: %d\n", err);
 98         return 0;
 99 }
100 
101 arch_initcall(footbridge_isa_init);
102 

~ [ 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