2 * WLAN (TI TNETW1100B) support in the hx470x.
4 * Copyright (c) 2006 SDG Systems, LLC
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive for
10 * 28-March-2006 Todd Blumer <todd@sdgsystems.com>
14 #include <linux/kernel.h>
15 #include <linux/platform_device.h>
16 #include <linux/delay.h>
17 #include <linux/leds.h>
19 #include <asm/hardware.h>
21 #include <asm/arch/pxa-regs.h>
22 #include <asm/arch/hx4700-gpio.h>
23 #include <asm/arch/hx4700-core.h>
28 #define WLAN_OFFSET 0x1000000
29 #define WLAN_BASE (PXA_CS5_PHYS+WLAN_OFFSET)
33 hx4700_wlan_start( void )
35 SET_HX4700_GPIO( WLAN_RESET_N
, 0 );
37 hx4700_egpio_enable( EGPIO0_VCC_3V3_EN
);
39 hx4700_egpio_enable( EGPIO7_VCC_3V3_WL_EN
);
41 hx4700_egpio_enable( EGPIO1_WL_VREG_EN
| EGPIO2_VCC_2V1_WL_EN
|
44 SET_HX4700_GPIO( WLAN_RESET_N
, 1 );
46 led_trigger_event_shared(hx4700_radio_trig
, LED_FULL
);
51 hx4700_wlan_stop( void )
53 hx4700_egpio_disable( EGPIO0_VCC_3V3_EN
| EGPIO1_WL_VREG_EN
|
54 EGPIO7_VCC_3V3_WL_EN
| EGPIO2_VCC_2V1_WL_EN
|
56 SET_HX4700_GPIO( WLAN_RESET_N
, 0 );
57 led_trigger_event_shared(hx4700_radio_trig
, LED_OFF
);
61 static struct resource acx_resources
[] = {
64 .end
= WLAN_BASE
+ 0x20,
65 .flags
= IORESOURCE_MEM
,
68 .start
= HX4700_IRQ(WLAN_IRQ_N
),
69 .end
= HX4700_IRQ(WLAN_IRQ_N
),
70 .flags
= IORESOURCE_IRQ
,
74 static struct acx_hardware_data acx_data
= {
75 .start_hw
= hx4700_wlan_start
,
76 .stop_hw
= hx4700_wlan_stop
,
79 static struct platform_device acx_device
= {
82 .platform_data
= &acx_data
,
84 .num_resources
= ARRAY_SIZE( acx_resources
),
85 .resource
= acx_resources
,
89 hx4700_wlan_init( void )
91 printk( "hx4700_wlan_init: acx-mem platform_device_register\n" );
92 return platform_device_register( &acx_device
);
97 hx4700_wlan_exit( void )
99 platform_device_unregister( &acx_device
);
102 module_init( hx4700_wlan_init
);
103 module_exit( hx4700_wlan_exit
);
105 MODULE_AUTHOR( "Todd Blumer <todd@sdgsystems.com>" );
106 MODULE_DESCRIPTION( "WLAN driver for iPAQ hx4700" );
107 MODULE_LICENSE( "GPL" );