aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/ath79
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-01-04 15:28:17 -0500
committerRalf Baechle <ralf@linux-mips.org>2011-01-18 13:30:26 -0500
commit0cde72284c9c7d4b348ece9e1fe136f787185cd7 (patch)
treeaf4131bf897fc1daeb6e711e3f0c417c53d52c08 /arch/mips/ath79
parent0aabf1a4d9b6b2d2371f641ec19fb7551cea4a90 (diff)
MIPS: ath79: add initial support for the Atheros PB44 reference board
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Imre Kaloz <kaloz@openwrt.org> Cc: linux-mips@linux-mips.org Cc: Luis R. Rodriguez <lrodriguez@atheros.com> Cc: Cliff Holden <Cliff.Holden@Atheros.com> Cc: Kathy Giori <Kathy.Giori@Atheros.com> Patchwork: https://patchwork.linux-mips.org/patch/1950/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ath79')
-rw-r--r--arch/mips/ath79/Kconfig11
-rw-r--r--arch/mips/ath79/Makefile5
-rw-r--r--arch/mips/ath79/mach-pb44.c56
-rw-r--r--arch/mips/ath79/machtypes.h1
4 files changed, 73 insertions, 0 deletions
diff --git a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig
index 50b933446cc0..fabb2b0412d7 100644
--- a/arch/mips/ath79/Kconfig
+++ b/arch/mips/ath79/Kconfig
@@ -1,5 +1,16 @@
1if ATH79 1if ATH79
2 2
3menu "Atheros AR71XX/AR724X/AR913X machine selection"
4
5config ATH79_MACH_PB44
6 bool "Atheros PB44 reference board"
7 select SOC_AR71XX
8 help
9 Say 'Y' here if you want your kernel to support the
10 Atheros PB44 reference board.
11
12endmenu
13
3config SOC_AR71XX 14config SOC_AR71XX
4 def_bool n 15 def_bool n
5 16
diff --git a/arch/mips/ath79/Makefile b/arch/mips/ath79/Makefile
index e621d6c464c1..c3093f7d401f 100644
--- a/arch/mips/ath79/Makefile
+++ b/arch/mips/ath79/Makefile
@@ -16,3 +16,8 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
16# Devices 16# Devices
17# 17#
18obj-y += dev-common.o 18obj-y += dev-common.o
19
20#
21# Machines
22#
23obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o
diff --git a/arch/mips/ath79/mach-pb44.c b/arch/mips/ath79/mach-pb44.c
new file mode 100644
index 000000000000..ffc24d7a2552
--- /dev/null
+++ b/arch/mips/ath79/mach-pb44.c
@@ -0,0 +1,56 @@
1/*
2 * Atheros PB44 reference board support
3 *
4 * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 */
10
11#include <linux/init.h>
12#include <linux/platform_device.h>
13#include <linux/i2c.h>
14#include <linux/i2c-gpio.h>
15#include <linux/i2c/pcf857x.h>
16
17#include "machtypes.h"
18
19#define PB44_GPIO_I2C_SCL 0
20#define PB44_GPIO_I2C_SDA 1
21
22#define PB44_GPIO_EXP_BASE 16
23
24static struct i2c_gpio_platform_data pb44_i2c_gpio_data = {
25 .sda_pin = PB44_GPIO_I2C_SDA,
26 .scl_pin = PB44_GPIO_I2C_SCL,
27};
28
29static struct platform_device pb44_i2c_gpio_device = {
30 .name = "i2c-gpio",
31 .id = 0,
32 .dev = {
33 .platform_data = &pb44_i2c_gpio_data,
34 }
35};
36
37static struct pcf857x_platform_data pb44_pcf857x_data = {
38 .gpio_base = PB44_GPIO_EXP_BASE,
39};
40
41static struct i2c_board_info pb44_i2c_board_info[] __initdata = {
42 {
43 I2C_BOARD_INFO("pcf8575", 0x20),
44 .platform_data = &pb44_pcf857x_data,
45 },
46};
47
48static void __init pb44_init(void)
49{
50 i2c_register_board_info(0, pb44_i2c_board_info,
51 ARRAY_SIZE(pb44_i2c_board_info));
52 platform_device_register(&pb44_i2c_gpio_device);
53}
54
55MIPS_MACHINE(ATH79_MACH_PB44, "PB44", "Atheros PB44 reference board",
56 pb44_init);
diff --git a/arch/mips/ath79/machtypes.h b/arch/mips/ath79/machtypes.h
index fac0e26a2433..a796fa3f92a3 100644
--- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h
@@ -16,6 +16,7 @@
16 16
17enum ath79_mach_type { 17enum ath79_mach_type {
18 ATH79_MACH_GENERIC = 0, 18 ATH79_MACH_GENERIC = 0,
19 ATH79_MACH_PB44, /* Atheros PB44 reference board */
19}; 20};
20 21
21#endif /* _ATH79_MACHTYPE_H */ 22#endif /* _ATH79_MACHTYPE_H */