2 * WLAN (TI TNETW1100B) support in the rx3715
4 * Copyright (c) 2006 SDG Systems, LLC
5 * Copyright (c) 2006 Roman Moravcik
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file COPYING in the main directory of this archive for
11 * Based on hx4700_acx.c
15 #include <linux/kernel.h>
16 #include <linux/platform_device.h>
17 #include <linux/delay.h>
18 #include <linux/leds.h>
20 #include <asm/hardware.h>
22 #include <asm/arch/regs-gpio.h>
23 #include <linux/soc/asic3_base.h>
24 #include <asm/arch/rx3715-asic3.h>
25 #include <asm/arch/rx3715-leds.h>
30 extern struct platform_device s3c_device_asic3
;
32 #define WLAN_BASE 0x20000000
34 static int rx3715_wlan_start(void)
36 printk( "rx3715_wlan_start\n" );
37 asic3_set_gpio_out_b(&s3c_device_asic3
.dev
, ASIC3_GPB3
, ASIC3_GPB3
);
39 asic3_set_gpio_out_c(&s3c_device_asic3
.dev
, ASIC3_GPC13
, ASIC3_GPC13
);
41 asic3_set_gpio_out_c(&s3c_device_asic3
.dev
, ASIC3_GPC11
, ASIC3_GPC11
);
43 asic3_set_gpio_out_b(&s3c_device_asic3
.dev
, ASIC3_GPB3
, ASIC3_GPB3
);
45 s3c2410_gpio_cfgpin(S3C2410_GPA15
, S3C2410_GPA15_nGCS4
);
47 s3c2410_gpio_setpin(S3C2410_GPA11
, 0);
49 s3c2410_gpio_setpin(S3C2410_GPA11
, 1);
50 led_trigger_event_shared(rx3715_radio_trig
, LED_FULL
);
54 static int rx3715_wlan_stop(void)
56 printk( "rx3715_wlan_stop\n" );
57 s3c2410_gpio_setpin(S3C2410_GPA15
, 1);
58 s3c2410_gpio_cfgpin(S3C2410_GPA15
, S3C2410_GPA15_OUT
);
59 asic3_set_gpio_out_b(&s3c_device_asic3
.dev
, ASIC3_GPB3
, 0);
60 asic3_set_gpio_out_c(&s3c_device_asic3
.dev
, ASIC3_GPC13
, 0);
61 asic3_set_gpio_out_c(&s3c_device_asic3
.dev
, ASIC3_GPC11
, 0);
62 led_trigger_event_shared(rx3715_radio_trig
, LED_OFF
);
66 static struct resource acx_resources
[] = {
69 .end
= WLAN_BASE
+ 0x20,
70 .flags
= IORESOURCE_MEM
,
75 .flags
= IORESOURCE_IRQ
,
79 static struct acx_hardware_data acx_data
= {
80 .start_hw
= rx3715_wlan_start
,
81 .stop_hw
= rx3715_wlan_stop
,
84 static struct platform_device acx_device
= {
87 .platform_data
= &acx_data
,
89 .num_resources
= ARRAY_SIZE(acx_resources
),
90 .resource
= acx_resources
,
93 static int __init
rx3715_wlan_init(void)
95 printk("rx3715_wlan_init: acx-mem platform_device_register\n");
96 return platform_device_register(&acx_device
);
100 static void __exit
rx3715_wlan_exit(void)
102 platform_device_unregister(&acx_device
);
105 module_init(rx3715_wlan_init
);
106 module_exit(rx3715_wlan_exit
);
108 MODULE_AUTHOR("Todd Blumer <todd@sdgsystems.com>");
109 MODULE_DESCRIPTION("WLAN driver for rx3715");
110 MODULE_LICENSE("GPL");