#include <asm/bootinfo.h>
#include <asm/irq_cpu.h>
#include <asm/io.h>
-#include "ar531x.h"
+#include <ar531x.h>
char *board_config, *radio_config;
printk("WARNING: No board configuration data found!\n");
addr = NULL;
}
-
+
return addr;
}
{
int dataFound;
u32 radio_config;
-
- /*
+
+ /*
* Now find the start of Radio Configuration data, using heuristics:
* Search forward from Board Configuration data by 0x1000 bytes
* at a time until we find non-0xffffffff.
radio_config = board_config + 0x100 + ((rcfg - bcfg) & 0xfff);
printk("Radio config found at offset 0x%x(0x%x)\n", rcfg - bcfg, radio_config - board_config);
- rcfg_size = BOARD_CONFIG_BUFSZ - ((rcfg - bcfg) & (BOARD_CONFIG_BUFSZ - 1));
+ rcfg_size = BOARD_CONFIG_BUFSZ - ((0x100 + rcfg - bcfg) & (BOARD_CONFIG_BUFSZ - 1));
memcpy(radio_config, rcfg, rcfg_size);
-
+
return 0;
}
void __init serial_setup(unsigned long mapbase, unsigned int uartclk)
{
struct uart_port s;
-
+
memset(&s, 0, sizeof(s));
s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
case MACH_ATHEROS_AR2312:
return "Atheros AR2312";
-
+
case MACH_ATHEROS_AR2313:
return "Atheros AR2313";
#endif
DO_AR5312(ar5312_misc_intr_init(AR531X_MISC_IRQ_BASE);)
DO_AR5315(ar5315_misc_intr_init(AR531X_MISC_IRQ_BASE);)
}
+
+static int __init ar531x_register_gpiodev(void)
+{
+ static struct resource res = {
+ .start = 0xFFFFFFFF,
+ };
+ struct platform_device *pdev;
+
+ printk(KERN_INFO "ar531x: Registering GPIODEV device\n");
+
+ pdev = platform_device_register_simple("GPIODEV", 0, &res, 1);
+
+ if (!pdev) {
+ printk(KERN_ERR "ar531x: GPIODEV init failed\n");
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+device_initcall(ar531x_register_gpiodev);