Thumb-2: Add some .align statements to the .S files
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-ixp23xx / espresso.c
CommitLineData
c4713074
LB
1/*
2 * arch/arm/mach-ixp23xx/espresso.c
3 *
4 * Double Espresso-specific routines
5 *
6 * Author: Lennert Buytenhek <buytenh@wantstofly.org>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
c4713074
LB
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/spinlock.h>
16#include <linux/sched.h>
17#include <linux/interrupt.h>
18#include <linux/serial.h>
19#include <linux/tty.h>
20#include <linux/bitops.h>
21#include <linux/ioport.h>
c4713074
LB
22#include <linux/serial_8250.h>
23#include <linux/serial_core.h>
24#include <linux/device.h>
25#include <linux/mm.h>
26#include <linux/pci.h>
27#include <linux/mtd/physmap.h>
28
29#include <asm/types.h>
30#include <asm/setup.h>
31#include <asm/memory.h>
a09e64fb 32#include <mach/hardware.h>
c4713074
LB
33#include <asm/mach-types.h>
34#include <asm/irq.h>
35#include <asm/system.h>
36#include <asm/tlbflush.h>
37#include <asm/pgtable.h>
38
39#include <asm/mach/map.h>
40#include <asm/mach/irq.h>
41#include <asm/mach/arch.h>
c4713074
LB
42#include <asm/mach/pci.h>
43
532bda5d
LB
44static int __init espresso_pci_init(void)
45{
46 if (machine_is_espresso())
47 ixp23xx_pci_slave_init();
48
49 return 0;
50};
51subsys_initcall(espresso_pci_init);
52
84b61f6d
LB
53static struct physmap_flash_data espresso_flash_data = {
54 .width = 2,
55};
56
57static struct resource espresso_flash_resource = {
58 .start = 0x90000000,
562ca1e3 59 .end = 0x91ffffff,
84b61f6d
LB
60 .flags = IORESOURCE_MEM,
61};
62
63static struct platform_device espresso_flash = {
64 .name = "physmap-flash",
65 .id = 0,
66 .dev = {
67 .platform_data = &espresso_flash_data,
68 },
69 .num_resources = 1,
70 .resource = &espresso_flash_resource,
71};
72
c4713074
LB
73static void __init espresso_init(void)
74{
84b61f6d 75 platform_device_register(&espresso_flash);
c4713074
LB
76
77 /*
78 * Mark flash as writeable.
79 */
80 IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE;
81 IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE;
82
83 ixp23xx_sys_init();
84}
85
86MACHINE_START(ESPRESSO, "IP Fabrics Double Espresso")
87 /* Maintainer: Lennert Buytenhek */
88 .phys_io = IXP23XX_PERIPHERAL_PHYS,
89 .io_pg_offst = ((IXP23XX_PERIPHERAL_VIRT >> 18)) & 0xfffc,
90 .map_io = ixp23xx_map_io,
91 .init_irq = ixp23xx_init_irq,
92 .timer = &ixp23xx_timer,
93 .boot_params = 0x00000100,
94 .init_machine = espresso_init,
95MACHINE_END