blob: 235e6256775f4d0611d30e89fc66b30c972a9506 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/arch/arm/mach-clps711x/cdb89712.c
3 *
4 * Copyright (C) 2000-2001 Deep Blue Solutions Ltd
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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#include <linux/kernel.h>
21#include <linux/init.h>
22#include <linux/types.h>
23#include <linux/string.h>
24#include <linux/mm.h>
Russell Kingfced80c2008-09-06 12:10:45 +010025#include <linux/io.h>
Alexander Shiyan200daa32012-11-17 17:57:07 +040026#include <linux/interrupt.h>
27#include <linux/platform_device.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Russell Kinga09e64f2008-08-05 16:14:15 +010029#include <mach/hardware.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#include <asm/pgtable.h>
31#include <asm/page.h>
32#include <asm/setup.h>
33#include <asm/mach-types.h>
34#include <asm/mach/arch.h>
35#include <asm/mach/map.h>
36
37#include "common.h"
38
Alexander Shiyan200daa32012-11-17 17:57:07 +040039#define CDB89712_CS8900_BASE (CS2_PHYS_BASE + 0x300)
40#define CDB89712_CS8900_IRQ (IRQ_EINT3)
41
42static struct resource cdb89712_cs8900_resource[] __initdata = {
43 DEFINE_RES_MEM(CDB89712_CS8900_BASE, SZ_1K),
44 DEFINE_RES_IRQ(CDB89712_CS8900_IRQ),
Linus Torvalds1da177e2005-04-16 15:20:36 -070045};
46
Alexander Shiyan200daa32012-11-17 17:57:07 +040047static void __init cdb89712_init(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070048{
Alexander Shiyan200daa32012-11-17 17:57:07 +040049 platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource,
50 ARRAY_SIZE(cdb89712_cs8900_resource));
Linus Torvalds1da177e2005-04-16 15:20:36 -070051}
52
53MACHINE_START(CDB89712, "Cirrus-CDB89712")
Russell Kinge9dea0c2005-07-03 17:38:58 +010054 /* Maintainer: Ray Lehtiniemi */
Nicolas Pitre6244fa92011-07-05 22:38:11 -040055 .atag_offset = 0x100,
Alexander Shiyan200daa32012-11-17 17:57:07 +040056 .map_io = clps711x_map_io,
Russell Kinge9dea0c2005-07-03 17:38:58 +010057 .init_irq = clps711x_init_irq,
Linus Torvalds1da177e2005-04-16 15:20:36 -070058 .timer = &clps711x_timer,
Alexander Shiyan200daa32012-11-17 17:57:07 +040059 .init_machine = cdb89712_init,
Russell King6c000712011-11-05 17:41:52 +000060 .restart = clps711x_restart,
Linus Torvalds1da177e2005-04-16 15:20:36 -070061MACHINE_END