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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-pxa/mp900.c

Version: ~ [ linux-5.4-rc7 ] ~ [ linux-5.3.11 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.84 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.154 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.201 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.201 ] ~ [ 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.77 ] ~ [ 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-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ 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-pxa/mp900.c
  3  *
  4  *  Support for the NEC MobilePro900/C platform
  5  *
  6  *  Based on mach-pxa/gumstix.c
  7  *
  8  *  2007, 2008 Kristoffer Ericson <kristoffer.ericson@gmail.com>
  9  *  2007, 2008 Michael Petchkovsky <mkpetch@internode.on.net>
 10  *
 11  *  This program is free software; you can redistribute it and/or modify
 12  *  it under the terms of the GNU General Public License version 2 as
 13  *  published by the Free Software Foundation.
 14  */
 15 
 16 #include <linux/init.h>
 17 #include <linux/device.h>
 18 #include <linux/platform_device.h>
 19 #include <linux/types.h>
 20 #include <linux/usb/isp116x.h>
 21 
 22 #include <asm/mach-types.h>
 23 #include <asm/mach/arch.h>
 24 
 25 #include <mach/pxa25x.h>
 26 #include "generic.h"
 27 
 28 static void isp116x_pfm_delay(struct device *dev, int delay)
 29 {
 30 
 31         /* 400Mhz PXA2 = 2.5ns / instruction */
 32 
 33         int cyc = delay / 10;
 34 
 35         /* 4 Instructions = 4 x 2.5ns = 10ns */
 36         __asm__ volatile ("0:\n"
 37                 "subs %0, %1, #1\n"
 38                 "bge 0b\n"
 39                 :"=r" (cyc)
 40                 :""(cyc)
 41         );
 42 }
 43 
 44 static struct isp116x_platform_data isp116x_pfm_data = {
 45         .remote_wakeup_enable = 1,
 46         .delay = isp116x_pfm_delay,
 47 };
 48 
 49 static struct resource isp116x_pfm_resources[] = {
 50         [0] =   {
 51                 .start  = 0x0d000000,
 52                 .end    = 0x0d000000 + 1,
 53                 .flags  = IORESOURCE_MEM,
 54                 },
 55         [1] =   {
 56                 .start  = 0x0d000000 + 4,
 57                 .end    = 0x0d000000 + 5,
 58                 .flags  = IORESOURCE_MEM,
 59                 },
 60         [2] =   {
 61                 .start  = 61,
 62                 .end    = 61,
 63                 .flags  = IORESOURCE_IRQ,
 64                 },
 65 };
 66 
 67 static struct platform_device mp900c_dummy_device = {
 68         .name           = "mp900c_dummy",
 69         .id             = -1,
 70 };
 71 
 72 static struct platform_device mp900c_usb = {
 73         .name           = "isp116x-hcd",
 74         .num_resources  = ARRAY_SIZE(isp116x_pfm_resources),
 75         .resource       = isp116x_pfm_resources,
 76         .dev.platform_data = &isp116x_pfm_data,
 77 };
 78 
 79 static struct platform_device *devices[] __initdata = {
 80         &mp900c_dummy_device,
 81         &mp900c_usb,
 82 };
 83 
 84 static void __init mp900c_init(void)
 85 {
 86         printk(KERN_INFO "MobilePro 900/C machine init\n");
 87         pxa_set_ffuart_info(NULL);
 88         pxa_set_btuart_info(NULL);
 89         pxa_set_stuart_info(NULL);
 90         platform_add_devices(devices, ARRAY_SIZE(devices));
 91 }
 92 
 93 /* Maintainer - Michael Petchkovsky <mkpetch@internode.on.net> */
 94 MACHINE_START(NEC_MP900, "MobilePro900/C")
 95         .atag_offset    = 0x220100,
 96         .init_time      = pxa_timer_init,
 97         .map_io         = pxa25x_map_io,
 98         .nr_irqs        = PXA_NR_IRQS,
 99         .init_irq       = pxa25x_init_irq,
100         .handle_irq     = pxa25x_handle_irq,
101         .init_machine   = mp900c_init,
102         .restart        = pxa_restart,
103 MACHINE_END
104 
105 

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