2 * Hardware definitions for the Toshiba eseries PDAs
4 * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
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
13 #include <linux/kernel.h>
14 #include <linux/init.h>
15 #include <linux/gpio.h>
16 #include <linux/delay.h>
17 #include <linux/platform_device.h>
19 #include <asm/setup.h>
20 #include <asm/mach/arch.h>
21 #include <asm/mach-types.h>
23 #include <mach/pxa25x.h>
24 #include <mach/eseries-gpio.h>
26 #include <mach/irda.h>
31 /* Only e800 has 128MB RAM */
32 void __init eseries_fixup(struct machine_desc *desc,
33 struct tag *tags, char **cmdline, struct meminfo *mi)
36 mi->bank[0].start = 0xa0000000;
37 if (machine_is_e800())
38 mi->bank[0].size = (128*1024*1024);
40 mi->bank[0].size = (64*1024*1024);
43 struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
44 .gpio_vbus = GPIO_E7XX_USB_DISC,
45 .gpio_pullup = GPIO_E7XX_USB_PULLUP,
46 .gpio_pullup_inverted = 1
49 struct pxaficp_platform_data e7xx_ficp_platform_data = {
50 .gpio_pwdown = GPIO_E7XX_IR_OFF,
51 .transceiver_cap = IR_SIRMODE | IR_OFF,
54 int eseries_tmio_enable(struct platform_device *dev)
56 /* Reset - bring SUSPEND high before PCLR */
57 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 0);
58 gpio_set_value(GPIO_ESERIES_TMIO_PCLR, 0);
60 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 1);
62 gpio_set_value(GPIO_ESERIES_TMIO_PCLR, 1);
67 int eseries_tmio_disable(struct platform_device *dev)
69 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 0);
70 gpio_set_value(GPIO_ESERIES_TMIO_PCLR, 0);
74 int eseries_tmio_suspend(struct platform_device *dev)
76 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 0);
80 int eseries_tmio_resume(struct platform_device *dev)
82 gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 1);
87 void eseries_get_tmio_gpios(void)
89 gpio_request(GPIO_ESERIES_TMIO_SUSPEND, NULL);
90 gpio_request(GPIO_ESERIES_TMIO_PCLR, NULL);
91 gpio_direction_output(GPIO_ESERIES_TMIO_SUSPEND, 0);
92 gpio_direction_output(GPIO_ESERIES_TMIO_PCLR, 0);
95 /* TMIO controller uses the same resources on all e-series machines. */
96 struct resource eseries_tmio_resources[] = {
98 .start = PXA_CS4_PHYS,
99 .end = PXA_CS4_PHYS + 0x1fffff,
100 .flags = IORESOURCE_MEM,
103 .start = IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ),
104 .end = IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ),
105 .flags = IORESOURCE_IRQ,
109 /* Some e-series hardware cannot control the 32K clock */
110 static void clk_32k_dummy(struct clk *clk)
114 static const struct clkops clk_32k_dummy_ops = {
115 .enable = clk_32k_dummy,
116 .disable = clk_32k_dummy,
119 static struct clk tmio_dummy_clk = {
120 .ops = &clk_32k_dummy_ops,
124 static struct clk_lookup eseries_clkregs[] = {
125 INIT_CLKREG(&tmio_dummy_clk, NULL, "CLK_CK32K"),
128 void eseries_register_clks(void)
130 clkdev_add_table(eseries_clkregs, ARRAY_SIZE(eseries_clkregs));