]> git.ipfire.org Git - thirdparty/linux.git/blame - arch/arm/mach-mmp/teton_bga.c
ARM: delete struct sys_timer
[thirdparty/linux.git] / arch / arm / mach-mmp / teton_bga.c
CommitLineData
1bbd7089
MB
1/*
2 * linux/arch/arm/mach-mmp/teton_bga.c
3 *
4 * Support for the Marvell PXA168 Teton BGA Development Platform.
5 *
6 * Author: Mark F. Brown <mark.brown314@gmail.com>
7 *
8 * This code is based on aspenite.c
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * publishhed by the Free Software Foundation.
13 */
14
15#include <linux/init.h>
16#include <linux/kernel.h>
17#include <linux/platform_device.h>
18#include <linux/gpio.h>
d2ce6973 19#include <linux/input.h>
293b2da1 20#include <linux/platform_data/keypad-pxa27x.h>
759305c6 21#include <linux/i2c.h>
1bbd7089
MB
22
23#include <asm/mach-types.h>
24#include <asm/mach/arch.h>
25#include <mach/addr-map.h>
26#include <mach/mfp-pxa168.h>
27#include <mach/pxa168.h>
28#include <mach/teton_bga.h>
8661fb92 29#include <mach/irqs.h>
1bbd7089
MB
30
31#include "common.h"
32
33static unsigned long teton_bga_pin_config[] __initdata = {
34 /* UART1 */
35 GPIO107_UART1_TXD,
36 GPIO108_UART1_RXD,
d2ce6973
MB
37
38 /* Keypad */
39 GPIO109_KP_MKIN1,
40 GPIO110_KP_MKIN0,
41 GPIO111_KP_MKOUT7,
42 GPIO112_KP_MKOUT6,
759305c6
MB
43
44 /* I2C Bus */
45 GPIO105_CI2C_SDA,
46 GPIO106_CI2C_SCL,
47
48 /* RTC */
49 GPIO78_GPIO,
d2ce6973
MB
50};
51
52static unsigned int teton_bga_matrix_key_map[] = {
53 KEY(0, 6, KEY_ESC),
54 KEY(0, 7, KEY_ENTER),
55 KEY(1, 6, KEY_LEFT),
56 KEY(1, 7, KEY_RIGHT),
57};
58
59static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = {
60 .matrix_key_rows = 2,
61 .matrix_key_cols = 8,
62 .matrix_key_map = teton_bga_matrix_key_map,
63 .matrix_key_map_size = ARRAY_SIZE(teton_bga_matrix_key_map),
64 .debounce_interval = 30,
1bbd7089
MB
65};
66
759305c6
MB
67static struct i2c_board_info teton_bga_i2c_info[] __initdata = {
68 {
69 I2C_BOARD_INFO("ds1337", 0x68),
4929f5a8 70 .irq = MMP_GPIO_TO_IRQ(RTC_INT_GPIO)
759305c6
MB
71 },
72};
73
1bbd7089
MB
74static void __init teton_bga_init(void)
75{
76 mfp_config(ARRAY_AND_SIZE(teton_bga_pin_config));
77
78 /* on-chip devices */
79 pxa168_add_uart(1);
d2ce6973 80 pxa168_add_keypad(&teton_bga_keypad_info);
759305c6 81 pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(teton_bga_i2c_info));
157d2644 82 platform_device_register(&pxa168_device_gpio);
1bbd7089
MB
83}
84
85MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform")
1bbd7089 86 .map_io = mmp_map_io,
8661fb92 87 .nr_irqs = MMP_NR_IRQS,
1bbd7089 88 .init_irq = pxa168_init_irq,
6bb27d73 89 .init_time = pxa168_timer_init,
1bbd7089 90 .init_machine = teton_bga_init,
9854a38e 91 .restart = pxa168_restart,
1bbd7089 92MACHINE_END