blob: 74d3f8987c5cfca1529574e76f8876fd36e225ff [file] [log] [blame]
Ian Molton7dc96412008-08-19 12:14:21 +01001/*
Ian Moltonb1ae1b72008-09-26 13:38:59 +01002 * Hardware definitions for the Toshiba e330 PDAs
Ian Molton7dc96412008-08-19 12:14:21 +01003 *
4 * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
5 *
6 * This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 *
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
Ian Moltonb1ae1b72008-09-26 13:38:59 +010015#include <linux/clk.h>
16#include <linux/platform_device.h>
17#include <linux/mfd/tc6387xb.h>
Ian Molton7dc96412008-08-19 12:14:21 +010018
19#include <asm/setup.h>
20#include <asm/mach/arch.h>
21#include <asm/mach-types.h>
22
Eric Miao51c62982009-01-02 23:17:22 +080023#include <mach/pxa25x.h>
Ian Moltonb1ae1b72008-09-26 13:38:59 +010024#include <mach/eseries-gpio.h>
Ian Moltonebcce7b2008-08-19 13:34:56 +010025#include <mach/udc.h>
Ian Molton7dc96412008-08-19 12:14:21 +010026
27#include "generic.h"
28#include "eseries.h"
Ian Moltonb1ae1b72008-09-26 13:38:59 +010029#include "clock.h"
30
31/* -------------------- e330 tc6387xb parameters -------------------- */
32
33static struct tc6387xb_platform_data e330_tc6387xb_info = {
34 .enable = &eseries_tmio_enable,
35 .disable = &eseries_tmio_disable,
36 .suspend = &eseries_tmio_suspend,
37 .resume = &eseries_tmio_resume,
38};
39
40static struct platform_device e330_tc6387xb_device = {
41 .name = "tc6387xb",
42 .id = -1,
43 .dev = {
44 .platform_data = &e330_tc6387xb_info,
45 },
46 .num_resources = 2,
47 .resource = eseries_tmio_resources,
48};
49
50/* --------------------------------------------------------------- */
51
52static struct platform_device *devices[] __initdata = {
53 &e330_tc6387xb_device,
54};
Ian Molton7dc96412008-08-19 12:14:21 +010055
Ian Moltonebcce7b2008-08-19 13:34:56 +010056static void __init e330_init(void)
57{
Ian Moltonb1ae1b72008-09-26 13:38:59 +010058 eseries_register_clks();
59 eseries_get_tmio_gpios();
60 platform_add_devices(devices, ARRAY_SIZE(devices));
Ian Moltonebcce7b2008-08-19 13:34:56 +010061 pxa_set_udc_info(&e7xx_udc_mach_info);
62}
63
Ian Molton7dc96412008-08-19 12:14:21 +010064MACHINE_START(E330, "Toshiba e330")
65 /* Maintainer: Ian Molton (spyro@f2s.com) */
66 .phys_io = 0x40000000,
67 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
68 .boot_params = 0xa0000100,
69 .map_io = pxa_map_io,
70 .init_irq = pxa25x_init_irq,
71 .fixup = eseries_fixup,
Ian Moltonebcce7b2008-08-19 13:34:56 +010072 .init_machine = e330_init,
Ian Molton7dc96412008-08-19 12:14:21 +010073 .timer = &pxa_timer,
74MACHINE_END
75