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/platform_device.h>
18 #include <asm/setup.h>
19 #include <asm/mach/arch.h>
20 #include <asm/mach-types.h>
22 #include <mach/mfp-pxa25x.h>
23 #include <mach/hardware.h>
24 #include <mach/eseries-gpio.h>
26 #include <mach/irda.h>
30 /* Only e800 has 128MB RAM */
31 void __init eseries_fixup(struct machine_desc *desc,
32 struct tag *tags, char **cmdline, struct meminfo *mi)
35 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 static void e7xx_irda_transceiver_mode(struct device *dev, int mode)
52 gpio_set_value(GPIO_E7XX_IR_OFF, 1);
53 pxa2xx_transceiver_mode(dev, mode);
55 pxa2xx_transceiver_mode(dev, mode);
56 gpio_set_value(GPIO_E7XX_IR_OFF, 0);
60 int e7xx_irda_init(void)
64 ret = gpio_request(GPIO_E7XX_IR_OFF, "IrDA power");
68 ret = gpio_direction_output(GPIO_E7XX_IR_OFF, 0);
72 e7xx_irda_transceiver_mode(NULL, IR_SIRMODE | IR_OFF);
77 static void e7xx_irda_shutdown(struct device *dev)
79 e7xx_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
80 gpio_free(GPIO_E7XX_IR_OFF);
83 struct pxaficp_platform_data e7xx_ficp_platform_data = {
84 .transceiver_cap = IR_SIRMODE | IR_OFF,
85 .transceiver_mode = e7xx_irda_transceiver_mode,
86 .shutdown = e7xx_irda_shutdown,