linux/arch/arm/mach-pxa/mp900.c
Eric Miao 51c62982a3 [ARM] pxa: introduce pxa{25x,27x,300,320,930}.h for board usage
Considering the header mess ATM, it is not always possible to include
the correct header files within board code. Let's keep this simple:

  <mach/pxa25x.h>  - for pxa25x based platforms
  <mach/pxa27x.h>  - for pxa27x based platforms
  <mach/pxa300.h>  - for pxa300 based platforms
  <mach/pxa320.h>  - for pxa320 based platforms
  <mach/pxa930.h>  - for pxa930 based platforms

NOTE:

1. one header one board file, they are not compatible (i.e. they have
   conflicting definitions which won't compile if included together).

2. Unless strictly necessary, the following header files are considered
   to be SoC files use _only_, and is not recommended to be included in
   board code:

    <mach/hardware.h>
    <mach/pxa-regs.h>
    <mach/pxa2xx-regs.h>
    <mach/pxa3xx-regs.h>
    <mach/mfp.h>
    <mach/mfp-pxa2xx.h>
    <mach/mfp-pxa25x.h>
    <mach/mfp-pxa27x.h>
    <mach/mfp-pxa3xx.h>
    <mach/mfp-pxa300.h>
    <mach/mfp-pxa320.h>
    <mach/mfp-pxa930.h>

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:36 +08:00

100 lines
2.2 KiB
C

/*
* linux/arch/arm/mach-pxa/mp900.c
*
* Support for the NEC MobilePro900/C platform
*
* Based on mach-pxa/gumstix.c
*
* 2007, 2008 Kristoffer Ericson <kristoffer.ericson@gmail.com>
* 2007, 2008 Michael Petchkovsky <mkpetch@internode.on.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/init.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/types.h>
#include <linux/usb/isp116x.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/pxa25x.h>
#include "generic.h"
static void isp116x_pfm_delay(struct device *dev, int delay)
{
/* 400Mhz PXA2 = 2.5ns / instruction */
int cyc = delay / 10;
/* 4 Instructions = 4 x 2.5ns = 10ns */
__asm__ volatile ("0:\n"
"subs %0, %1, #1\n"
"bge 0b\n"
:"=r" (cyc)
:"0"(cyc)
);
}
static struct isp116x_platform_data isp116x_pfm_data = {
.remote_wakeup_enable = 1,
.delay = isp116x_pfm_delay,
};
static struct resource isp116x_pfm_resources[] = {
[0] = {
.start = 0x0d000000,
.end = 0x0d000000 + 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 0x0d000000 + 4,
.end = 0x0d000000 + 5,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = 61,
.end = 61,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device mp900c_dummy_device = {
.name = "mp900c_dummy",
.id = -1,
};
static struct platform_device mp900c_usb = {
.name = "isp116x-hcd",
.num_resources = ARRAY_SIZE(isp116x_pfm_resources),
.resource = isp116x_pfm_resources,
.dev.platform_data = &isp116x_pfm_data,
};
static struct platform_device *devices[] __initdata = {
&mp900c_dummy_device,
&mp900c_usb,
};
static void __init mp900c_init(void)
{
printk(KERN_INFO "MobilePro 900/C machine init\n");
platform_add_devices(devices, ARRAY_SIZE(devices));
}
/* Maintainer - Michael Petchkovsky <mkpetch@internode.on.net> */
MACHINE_START(NEC_MP900, "MobilePro900/C")
.phys_io = 0x40000000,
.boot_params = 0xa0220100,
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
.timer = &pxa_timer,
.map_io = pxa_map_io,
.init_irq = pxa25x_init_irq,
.init_machine = mp900c_init,
MACHINE_END