aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/driver.c
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-09-03 18:14:29 -0400
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 02:55:53 -0400
commitaba3792ac2d7c808a2d2fd2adf89531e083bdb90 (patch)
treefdf901fe2d666805ad27a421b076cce2bfed7352 /drivers/net/wimax/i2400m/driver.c
parent32742e6158657f19ad31653705bef56d983508e7 (diff)
wimax/i2400m: rework bootrom initialization to be more flexible
This modifies the bootrom initialization code of the i2400m driver so it can more easily support upcoming hardware. Currently, the code detects two types of barkers (magic numbers) sent by the device to indicate the types of firmware it would take (signed vs non-signed). This schema is extended so that multiple reboot barkers are recognized; upcoming hw will expose more types barkers which will have to match a header in the firmware image before we can load it. For that, a barker database is introduced; the first time the device sends a barker, it is matched in the database. That gives the driver the information needed to decide how to upload the firmware and which types of firmware to use. The database can be populated from module parameters. The execution flow is not altered; a new function (i2400m_is_boot_barker) is introduced to determine in the RX path if the device has sent a boot barker. This function is becoming heavier, so it is put away from the hot reception path [this is why there is some reorganization in sdio-rx.c:i2400ms_rx and usb-notifc.c:i2400mu_notification_grok()]. The documentation on the process has also been updated. All these modifications are heavily based on previous work by Dirk Brandewie <dirk.brandewie@intel.com>. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/driver.c')
-rw-r--r--drivers/net/wimax/i2400m/driver.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c
index e3b2c246cad7..73f45ea010a7 100644
--- a/drivers/net/wimax/i2400m/driver.c
+++ b/drivers/net/wimax/i2400m/driver.c
@@ -98,6 +98,15 @@ MODULE_PARM_DESC(debug,
98 "are the different debug submodules and VALUE are the " 98 "are the different debug submodules and VALUE are the "
99 "initial debug value to set."); 99 "initial debug value to set.");
100 100
101static char i2400m_barkers_params[128];
102module_param_string(barkers, i2400m_barkers_params,
103 sizeof(i2400m_barkers_params), 0644);
104MODULE_PARM_DESC(barkers,
105 "String of comma-separated 32-bit values; each is "
106 "recognized as the value the device sends as a reboot "
107 "signal; values are appended to a list--setting one value "
108 "as zero cleans the existing list and starts a new one.");
109
101/** 110/**
102 * i2400m_queue_work - schedule work on a i2400m's queue 111 * i2400m_queue_work - schedule work on a i2400m's queue
103 * 112 *
@@ -804,7 +813,7 @@ int __init i2400m_driver_init(void)
804{ 813{
805 d_parse_params(D_LEVEL, D_LEVEL_SIZE, i2400m_debug_params, 814 d_parse_params(D_LEVEL, D_LEVEL_SIZE, i2400m_debug_params,
806 "i2400m.debug"); 815 "i2400m.debug");
807 return 0; 816 return i2400m_barker_db_init(i2400m_barkers_params);
808} 817}
809module_init(i2400m_driver_init); 818module_init(i2400m_driver_init);
810 819
@@ -813,6 +822,7 @@ void __exit i2400m_driver_exit(void)
813{ 822{
814 /* for scheds i2400m_dev_reset_handle() */ 823 /* for scheds i2400m_dev_reset_handle() */
815 flush_scheduled_work(); 824 flush_scheduled_work();
825 i2400m_barker_db_exit();
816 return; 826 return;
817} 827}
818module_exit(i2400m_driver_exit); 828module_exit(i2400m_driver_exit);